index
int64 0
66.5k
| func_name
stringlengths 2
5.36k
| func_dep
stringlengths 16
2.19k
| func
stringlengths 8
55.3k
| test
stringlengths 0
7.07k
| opt
stringclasses 4
values | language
stringclasses 2
values | asm
stringlengths 0
45.4k
| ida_asm
stringlengths 0
44.7k
| ida_pseudo
stringlengths 0
44.3k
| ghidra_asm
stringlengths 0
49.1k
| ghidra_pseudo
stringlengths 0
64.7k
|
|---|---|---|---|---|---|---|---|---|---|---|---|
16,700
|
setup_key_functions
|
eloqsql/storage/myisam/mi_open.c
|
static void setup_key_functions(register MI_KEYDEF *keyinfo)
{
if (keyinfo->key_alg == HA_KEY_ALG_RTREE)
{
#ifdef HAVE_RTREE_KEYS
keyinfo->ck_insert = rtree_insert;
keyinfo->ck_delete = rtree_delete;
#else
DBUG_ASSERT(0); /* mi_open should check it never happens */
#endif
}
else
{
keyinfo->ck_insert = _mi_ck_write;
keyinfo->ck_delete = _mi_ck_delete;
}
if (keyinfo->flag & HA_BINARY_PACK_KEY)
{ /* Simple prefix compression */
keyinfo->bin_search=_mi_seq_search;
keyinfo->get_key=_mi_get_binary_pack_key;
keyinfo->pack_key=_mi_calc_bin_pack_key_length;
keyinfo->store_key=_mi_store_bin_pack_key;
}
else if (keyinfo->flag & HA_VAR_LENGTH_KEY)
{
keyinfo->get_key= _mi_get_pack_key;
if (keyinfo->seg[0].flag & HA_PACK_KEY)
{ /* Prefix compression */
/*
_mi_prefix_search() compares end-space against ASCII blank (' ').
It cannot be used for character sets, that do not encode the
blank character like ASCII does. UCS2 is an example. All
character sets with a fixed width > 1 or a mimimum width > 1
cannot represent blank like ASCII does. In these cases we have
to use _mi_seq_search() for the search.
*/
if (!keyinfo->seg->charset || use_strnxfrm(keyinfo->seg->charset) ||
(keyinfo->seg->flag & HA_NULL_PART) ||
(keyinfo->seg->charset->mbminlen > 1))
keyinfo->bin_search=_mi_seq_search;
else
keyinfo->bin_search=_mi_prefix_search;
keyinfo->pack_key=_mi_calc_var_pack_key_length;
keyinfo->store_key=_mi_store_var_pack_key;
}
else
{
keyinfo->bin_search=_mi_seq_search;
keyinfo->pack_key=_mi_calc_var_key_length; /* Variable length key */
keyinfo->store_key=_mi_store_static_key;
}
}
else
{
keyinfo->bin_search=_mi_bin_search;
keyinfo->get_key=_mi_get_static_key;
keyinfo->pack_key=_mi_calc_static_key_length;
keyinfo->store_key=_mi_store_static_key;
}
return;
}
|
O0
|
c
|
setup_key_functions:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0xc(%rax), %eax
cmpl $0x2, %eax
jne 0xb9d05
movq -0x8(%rbp), %rax
leaq 0x12fe0(%rip), %rcx # 0xcccd0
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
leaq 0x133a1(%rip), %rcx # 0xcd0a0
movq %rcx, 0x68(%rax)
jmp 0xb9d23
movq -0x8(%rbp), %rax
leaq 0xf630(%rip), %rcx # 0xc9340
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
leaq -0x1275f(%rip), %rcx # 0xa75c0
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xb9d74
movq -0x8(%rbp), %rax
leaq 0x8f72(%rip), %rcx # 0xc2cb0
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
leaq 0xae63(%rip), %rcx # 0xc4bb0
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
leaq 0xcc54(%rip), %rcx # 0xc69b0
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
leaq 0xd425(%rip), %rcx # 0xc7190
movq %rcx, 0x58(%rax)
jmp 0xb9ea8
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xb9e6a
movq -0x8(%rbp), %rax
leaq 0xa7fd(%rip), %rcx # 0xc4590
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movzwl 0x12(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xb9e3b
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, (%rax)
je 0xb9dfb
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0xb9dfb
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movzwl 0x12(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0xb9dfb
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
cmpl $0x1, 0x98(%rax)
jbe 0xb9e0c
movq -0x8(%rbp), %rax
leaq 0x8eaa(%rip), %rcx # 0xc2cb0
movq %rcx, 0x40(%rax)
jmp 0xb9e1b
movq -0x8(%rbp), %rax
leaq 0x9139(%rip), %rcx # 0xc2f50
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
leaq 0xc06a(%rip), %rcx # 0xc5e90
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
leaq 0xceeb(%rip), %rcx # 0xc6d20
movq %rcx, 0x58(%rax)
jmp 0xb9e68
movq -0x8(%rbp), %rax
leaq 0x8e6a(%rip), %rcx # 0xc2cb0
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
leaq 0xbfeb(%rip), %rcx # 0xc5e40
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
leaq 0xce7c(%rip), %rcx # 0xc6ce0
movq %rcx, 0x58(%rax)
jmp 0xb9ea6
movq -0x8(%rbp), %rax
leaq 0x8c7b(%rip), %rcx # 0xc2af0
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
leaq 0xa6ac(%rip), %rcx # 0xc4530
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
leaq 0xbf6d(%rip), %rcx # 0xc5e00
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
leaq 0xce3e(%rip), %rcx # 0xc6ce0
movq %rcx, 0x58(%rax)
jmp 0xb9ea8
popq %rbp
retq
nopw (%rax,%rax)
|
setup_key_functions_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+0Ch]
cmp eax, 2
jnz short loc_B9D05
mov rax, [rbp+var_8]
lea rcx, rtree_insert
mov [rax+60h], rcx
mov rax, [rbp+var_8]
lea rcx, rtree_delete
mov [rax+68h], rcx
jmp short loc_B9D23
loc_B9D05:
mov rax, [rbp+var_8]
lea rcx, _mi_ck_write
mov [rax+60h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_ck_delete
mov [rax+68h], rcx
loc_B9D23:
mov rax, [rbp+var_8]
movzx eax, word ptr [rax+0Ah]
and eax, 20h
cmp eax, 0
jz short loc_B9D74
mov rax, [rbp+var_8]
lea rcx, _mi_seq_search
mov [rax+40h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_get_binary_pack_key
mov [rax+48h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_calc_bin_pack_key_length
mov [rax+50h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_store_bin_pack_key
mov [rax+58h], rcx
jmp loc_B9EA8
loc_B9D74:
mov rax, [rbp+var_8]
movzx eax, word ptr [rax+0Ah]
and eax, 8
cmp eax, 0
jz loc_B9E6A
mov rax, [rbp+var_8]
lea rcx, _mi_get_pack_key
mov [rax+48h], rcx
mov rax, [rbp+var_8]
mov rax, [rax+28h]
movzx eax, word ptr [rax+12h]
and eax, 2
cmp eax, 0
jz loc_B9E3B
mov rax, [rbp+var_8]
mov rax, [rax+28h]
cmp qword ptr [rax], 0
jz short loc_B9DFB
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rax, [rax]
mov eax, [rax+0Ch]
and eax, 40h
cmp eax, 0
jnz short loc_B9DFB
mov rax, [rbp+var_8]
mov rax, [rax+28h]
movzx eax, word ptr [rax+12h]
and eax, 10h
cmp eax, 0
jnz short loc_B9DFB
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rax, [rax]
cmp dword ptr [rax+98h], 1
jbe short loc_B9E0C
loc_B9DFB:
mov rax, [rbp+var_8]
lea rcx, _mi_seq_search
mov [rax+40h], rcx
jmp short loc_B9E1B
loc_B9E0C:
mov rax, [rbp+var_8]
lea rcx, _mi_prefix_search
mov [rax+40h], rcx
loc_B9E1B:
mov rax, [rbp+var_8]
lea rcx, _mi_calc_var_pack_key_length
mov [rax+50h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_store_var_pack_key
mov [rax+58h], rcx
jmp short loc_B9E68
loc_B9E3B:
mov rax, [rbp+var_8]
lea rcx, _mi_seq_search
mov [rax+40h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_calc_var_key_length
mov [rax+50h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_store_static_key
mov [rax+58h], rcx
loc_B9E68:
jmp short loc_B9EA6
loc_B9E6A:
mov rax, [rbp+var_8]
lea rcx, _mi_bin_search
mov [rax+40h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_get_static_key
mov [rax+48h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_calc_static_key_length
mov [rax+50h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_store_static_key
mov [rax+58h], rcx
loc_B9EA6:
jmp short $+2
loc_B9EA8:
pop rbp
retn
|
long long setup_key_functions_0(long long a1)
{
long long result; // rax
if ( *(_BYTE *)(a1 + 12) == 2 )
{
*(_QWORD *)(a1 + 96) = rtree_insert;
*(_QWORD *)(a1 + 104) = rtree_delete;
}
else
{
*(_QWORD *)(a1 + 96) = mi_ck_write;
*(_QWORD *)(a1 + 104) = mi_ck_delete;
}
if ( (*(_WORD *)(a1 + 10) & 0x20) != 0 )
{
*(_QWORD *)(a1 + 64) = mi_seq_search;
*(_QWORD *)(a1 + 72) = mi_get_binary_pack_key;
*(_QWORD *)(a1 + 80) = mi_calc_bin_pack_key_length;
result = a1;
*(_QWORD *)(a1 + 88) = mi_store_bin_pack_key;
}
else if ( (*(_WORD *)(a1 + 10) & 8) != 0 )
{
*(_QWORD *)(a1 + 72) = mi_get_pack_key;
if ( (*(_WORD *)(*(_QWORD *)(a1 + 40) + 18LL) & 2) != 0 )
{
if ( !**(_QWORD **)(a1 + 40)
|| (*(_DWORD *)(**(_QWORD **)(a1 + 40) + 12LL) & 0x40) != 0
|| (*(_WORD *)(*(_QWORD *)(a1 + 40) + 18LL) & 0x10) != 0
|| *(_DWORD *)(**(_QWORD **)(a1 + 40) + 152LL) > 1u )
{
*(_QWORD *)(a1 + 64) = mi_seq_search;
}
else
{
*(_QWORD *)(a1 + 64) = mi_prefix_search;
}
*(_QWORD *)(a1 + 80) = mi_calc_var_pack_key_length;
result = a1;
*(_QWORD *)(a1 + 88) = mi_store_var_pack_key;
}
else
{
*(_QWORD *)(a1 + 64) = mi_seq_search;
*(_QWORD *)(a1 + 80) = mi_calc_var_key_length;
result = a1;
*(_QWORD *)(a1 + 88) = mi_store_static_key;
}
}
else
{
*(_QWORD *)(a1 + 64) = mi_bin_search;
*(_QWORD *)(a1 + 72) = mi_get_static_key;
*(_QWORD *)(a1 + 80) = mi_calc_static_key_length;
result = a1;
*(_QWORD *)(a1 + 88) = mi_store_static_key;
}
return result;
}
|
setup_key_functions:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0xc]
CMP EAX,0x2
JNZ 0x001b9d05
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1cccd0]
MOV qword ptr [RAX + 0x60],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1cd0a0]
MOV qword ptr [RAX + 0x68],RCX
JMP 0x001b9d23
LAB_001b9d05:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c9340]
MOV qword ptr [RAX + 0x60],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1a75c0]
MOV qword ptr [RAX + 0x68],RCX
LAB_001b9d23:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x20
CMP EAX,0x0
JZ 0x001b9d74
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c2cb0]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c4bb0]
MOV qword ptr [RAX + 0x48],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c69b0]
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c7190]
MOV qword ptr [RAX + 0x58],RCX
JMP 0x001b9ea8
LAB_001b9d74:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x8
CMP EAX,0x0
JZ 0x001b9e6a
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c4590]
MOV qword ptr [RAX + 0x48],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001b9e3b
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
CMP qword ptr [RAX],0x0
JZ 0x001b9dfb
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x40
CMP EAX,0x0
JNZ 0x001b9dfb
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x10
CMP EAX,0x0
JNZ 0x001b9dfb
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x98],0x1
JBE 0x001b9e0c
LAB_001b9dfb:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c2cb0]
MOV qword ptr [RAX + 0x40],RCX
JMP 0x001b9e1b
LAB_001b9e0c:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c2f50]
MOV qword ptr [RAX + 0x40],RCX
LAB_001b9e1b:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c5e90]
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c6d20]
MOV qword ptr [RAX + 0x58],RCX
JMP 0x001b9e68
LAB_001b9e3b:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c2cb0]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c5e40]
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c6ce0]
MOV qword ptr [RAX + 0x58],RCX
LAB_001b9e68:
JMP 0x001b9ea6
LAB_001b9e6a:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c2af0]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c4530]
MOV qword ptr [RAX + 0x48],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c5e00]
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c6ce0]
MOV qword ptr [RAX + 0x58],RCX
LAB_001b9ea6:
JMP 0x001b9ea8
LAB_001b9ea8:
POP RBP
RET
|
void setup_key_functions(long param_1)
{
if (*(char *)(param_1 + 0xc) == '\x02') {
*(code **)(param_1 + 0x60) = rtree_insert;
*(code **)(param_1 + 0x68) = rtree_delete;
}
else {
*(code **)(param_1 + 0x60) = _mi_ck_write;
*(code **)(param_1 + 0x68) = _mi_ck_delete;
}
if ((*(ushort *)(param_1 + 10) & 0x20) == 0) {
if ((*(ushort *)(param_1 + 10) & 8) == 0) {
*(code **)(param_1 + 0x40) = _mi_bin_search;
*(code **)(param_1 + 0x48) = _mi_get_static_key;
*(code **)(param_1 + 0x50) = _mi_calc_static_key_length;
*(code **)(param_1 + 0x58) = _mi_store_static_key;
}
else {
*(code **)(param_1 + 0x48) = _mi_get_pack_key;
if ((*(ushort *)(*(long *)(param_1 + 0x28) + 0x12) & 2) == 0) {
*(code **)(param_1 + 0x40) = _mi_seq_search;
*(code **)(param_1 + 0x50) = _mi_calc_var_key_length;
*(code **)(param_1 + 0x58) = _mi_store_static_key;
}
else {
if ((((**(long **)(param_1 + 0x28) == 0) ||
((*(uint *)(**(long **)(param_1 + 0x28) + 0xc) & 0x40) != 0)) ||
((*(ushort *)(*(long *)(param_1 + 0x28) + 0x12) & 0x10) != 0)) ||
(1 < *(uint *)(**(long **)(param_1 + 0x28) + 0x98))) {
*(code **)(param_1 + 0x40) = _mi_seq_search;
}
else {
*(code **)(param_1 + 0x40) = _mi_prefix_search;
}
*(code **)(param_1 + 0x50) = _mi_calc_var_pack_key_length;
*(code **)(param_1 + 0x58) = _mi_store_var_pack_key;
}
}
}
else {
*(code **)(param_1 + 0x40) = _mi_seq_search;
*(code **)(param_1 + 0x48) = _mi_get_binary_pack_key;
*(code **)(param_1 + 0x50) = _mi_calc_bin_pack_key_length;
*(code **)(param_1 + 0x58) = _mi_store_bin_pack_key;
}
return;
}
|
|
16,701
|
SEL_ARG::copy_max(SEL_ARG*)
|
eloqsql/sql/opt_range.h
|
bool copy_max(SEL_ARG* arg)
{ // Get overlapping range
if (cmp_max_to_max(arg) <= 0)
{
max_value=arg->max_value; max_flag=arg->max_flag;
if ((max_flag & (NO_MAX_RANGE | NO_MIN_RANGE)) ==
(NO_MAX_RANGE | NO_MIN_RANGE))
return 1; // Full range
}
maybe_flag|=arg->maybe_flag;
return 0;
}
|
O0
|
c
|
SEL_ARG::copy_max(SEL_ARG*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x18(%rbp), %rsi
callq 0x8ced60
cmpl $0x0, %eax
jg 0x8cf674
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rcx
movb 0x1(%rcx), %cl
movb %cl, 0x1(%rax)
movzbl 0x1(%rax), %eax
andl $0x3, %eax
cmpl $0x3, %eax
jne 0x8cf672
movb $0x1, -0x1(%rbp)
jmp 0x8cf68d
jmp 0x8cf674
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %edx
movzbl 0x2(%rax), %ecx
orl %edx, %ecx
movb %cl, 0x2(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ZN7SEL_ARG8copy_maxEPS_:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]; this
mov [rbp+var_20], rdi
mov rsi, [rbp+var_18]; SEL_ARG *
call _ZNK7SEL_ARG14cmp_max_to_maxEPKS_; SEL_ARG::cmp_max_to_max(SEL_ARG const*)
cmp eax, 0
jg short loc_8CF674
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
mov rcx, [rcx+28h]
mov [rax+28h], rcx
mov rcx, [rbp+var_18]
mov cl, [rcx+1]
mov [rax+1], cl
movzx eax, byte ptr [rax+1]
and eax, 3
cmp eax, 3
jnz short loc_8CF672
mov [rbp+var_1], 1
jmp short loc_8CF68D
loc_8CF672:
jmp short $+2
loc_8CF674:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
movzx edx, byte ptr [rcx+2]
movzx ecx, byte ptr [rax+2]
or ecx, edx
mov [rax+2], cl
mov [rbp+var_1], 0
loc_8CF68D:
mov al, [rbp+var_1]
and al, 1
add rsp, 20h
pop rbp
retn
|
char SEL_ARG::copy_max(SEL_ARG *this, SEL_ARG *a2)
{
if ( (int)SEL_ARG::cmp_max_to_max((SEL_ARG **)this, a2) <= 0 )
{
*((_QWORD *)this + 5) = *((_QWORD *)a2 + 5);
*((_BYTE *)this + 1) = *((_BYTE *)a2 + 1);
if ( (*((_BYTE *)this + 1) & 3) == 3 )
return 1;
}
*((_BYTE *)this + 2) |= *((_BYTE *)a2 + 2);
return 0;
}
|
__cxx_global_var_init.3:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x26cf994]
MOV ESI,0x8
CALL 0x008fd530
POP RBP
RET
|
void __cxx_global_var_init_3(void)
{
date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_INTERVAL_hhmmssff,8);
return;
}
|
|
16,702
|
my_mb_wc_big5
|
eloqsql/strings/ctype-big5.c
|
static int
my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc,const uchar *s,const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1])))
return -2;
return 2;
}
|
O0
|
c
|
my_mb_wc_big5:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x928ce
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x929a7
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0x928f6
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x929a7
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x92910
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x929a7
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
movl $0xa1, %eax
cmpl %ecx, %eax
jg 0x9296a
movl -0x2c(%rbp), %eax
movzbl %al, %eax
cmpl $0xf9, %eax
jg 0x9296a
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x40, %eax
cmpl %ecx, %eax
jg 0x9294a
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x7e, %eax
jle 0x92973
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0xa1, %eax
cmpl %ecx, %eax
jg 0x9296a
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfe, %eax
jle 0x92973
movl $0x0, -0x4(%rbp)
jmp 0x929a7
movl -0x2c(%rbp), %edi
shll $0x8, %edi
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
addl %eax, %edi
callq 0x92ce0
cltq
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x929a0
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x929a7
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
|
my_mb_wc_big5:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_928CE
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_929A7
loc_928CE:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_928F6
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_929A7
loc_928F6:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_92910
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_929A7
loc_92910:
mov eax, [rbp+var_2C]
movzx ecx, al
mov eax, 0A1h
cmp eax, ecx
jg short loc_9296A
mov eax, [rbp+var_2C]
movzx eax, al
cmp eax, 0F9h
jg short loc_9296A
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov eax, 40h ; '@'
cmp eax, ecx
jg short loc_9294A
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 7Eh ; '~'
jle short loc_92973
loc_9294A:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov eax, 0A1h
cmp eax, ecx
jg short loc_9296A
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FEh
jle short loc_92973
loc_9296A:
mov [rbp+var_4], 0
jmp short loc_929A7
loc_92973:
mov edi, [rbp+var_2C]
shl edi, 8
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
add edi, eax
call func_big5_uni_onechar
cdqe
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jnz short loc_929A0
mov [rbp+var_4], 0FFFFFFFEh
jmp short loc_929A7
loc_929A0:
mov [rbp+var_4], 2
loc_929A7:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_mb_wc_big5(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
int v4; // eax
unsigned int v6; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v6 = *a3;
if ( v6 >= 0x80 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( (unsigned __int8)v6 < 0xA1u
|| (unsigned __int8)v6 > 0xF9u
|| (a3[1] < 0x40u || a3[1] > 0x7Eu) && (a3[1] < 0xA1u || a3[1] == 255) )
{
return 0;
}
else
{
v4 = func_big5_uni_onechar(a3[1] + (v6 << 8));
*a2 = v4;
if ( v4 )
return 2;
else
return (unsigned int)-2;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_mb_wc_big5:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x001928ce
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001929a7
LAB_001928ce:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x001928f6
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001929a7
LAB_001928f6:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00192910
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001929a7
LAB_00192910:
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
MOV EAX,0xa1
CMP EAX,ECX
JG 0x0019296a
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EAX,AL
CMP EAX,0xf9
JG 0x0019296a
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0x40
CMP EAX,ECX
JG 0x0019294a
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x7e
JLE 0x00192973
LAB_0019294a:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0xa1
CMP EAX,ECX
JG 0x0019296a
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfe
JLE 0x00192973
LAB_0019296a:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001929a7
LAB_00192973:
MOV EDI,dword ptr [RBP + -0x2c]
SHL EDI,0x8
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
ADD EDI,EAX
CALL 0x00192ce0
CDQE
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x001929a0
MOV dword ptr [RBP + -0x4],0xfffffffe
JMP 0x001929a7
LAB_001929a0:
MOV dword ptr [RBP + -0x4],0x2
LAB_001929a7:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_mb_wc_big5(int8 param_1,long *param_2,byte *param_3,byte *param_4)
{
uint uVar1;
int iVar2;
int4 local_c;
if (param_3 < param_4) {
uVar1 = (uint)*param_3;
if (uVar1 < 0x80) {
*param_2 = (long)(int)uVar1;
local_c = 1;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if (((uVar1 < 0xa1) || (0xf9 < uVar1)) ||
(((param_3[1] < 0x40 || (0x7e < param_3[1])) &&
((param_3[1] < 0xa1 || (param_3[1] == 0xff)))))) {
local_c = 0;
}
else {
iVar2 = func_big5_uni_onechar(uVar1 * 0x100 + (uint)param_3[1]);
*param_2 = (long)iVar2;
if ((long)iVar2 == 0) {
local_c = 0xfffffffe;
}
else {
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
16,703
|
my_mb_wc_big5
|
eloqsql/strings/ctype-big5.c
|
static int
my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc,const uchar *s,const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1])))
return -2;
return 2;
}
|
O3
|
c
|
my_mb_wc_big5:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x631ee
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0x631b8
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x631ee
leal 0x5f(%rdi), %ecx
xorl %eax, %eax
cmpb $0x58, %cl
ja 0x631ee
movzbl 0x1(%rdx), %ecx
leal -0x7f(%rcx), %edx
cmpb $-0x3f, %dl
setb %dl
leal 0x1(%rcx), %r8d
cmpb $-0x5e, %r8b
setb %r8b
testb %r8b, %dl
je 0x631ef
retq
pushq %rbp
movq %rsp, %rbp
movzbl %dil, %eax
shll $0x8, %eax
leal (%rax,%rcx), %edx
addl $0xffff5ec0, %edx # imm = 0xFFFF5EC0
cmpl $0x26bc, %edx # imm = 0x26BC
ja 0x63216
movl %edx, %eax
leaq 0x3696c(%rip), %rcx # 0x99b80
jmp 0x6322d
orl %ecx, %eax
addl $0xffff36c0, %eax # imm = 0xFFFF36C0
cmpl $0x309d, %eax # imm = 0x309D
jae 0x63246
movl %eax, %eax
leaq 0x3b6d3(%rip), %rcx # 0x9e900
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0x63252
jmp 0x6324d
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
|
my_mb_wc_big5:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_631EE
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_631B8
mov [rsi], rdi
mov eax, 1
retn
loc_631B8:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_631EE
lea ecx, [rdi+5Fh]
xor eax, eax
cmp cl, 58h ; 'X'
ja short locret_631EE
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx-7Fh]
cmp dl, 0C1h
setb dl
lea r8d, [rcx+1]
cmp r8b, 0A2h
setb r8b
test dl, r8b
jz short loc_631EF
locret_631EE:
retn
loc_631EF:
push rbp
mov rbp, rsp
movzx eax, dil
shl eax, 8
lea edx, [rax+rcx]
add edx, 0FFFF5EC0h
cmp edx, 26BCh
ja short loc_63216
mov eax, edx
lea rcx, tab_big5_uni0
jmp short loc_6322D
loc_63216:
or eax, ecx
add eax, 0FFFF36C0h
cmp eax, 309Dh
jnb short loc_63246
mov eax, eax
lea rcx, tab_big5_uni1
loc_6322D:
lea rax, [rcx+rax*2]
movzx eax, word ptr [rax]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_63252
jmp short loc_6324D
loc_63246:
mov qword ptr [rsi], 0
loc_6324D:
mov eax, 0FFFFFFFEh
loc_63252:
pop rbp
retn
|
long long my_mb_wc_big5(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
int v6; // ecx
int v7; // eax
unsigned int v8; // edx
long long v9; // rax
unsigned __int16 *v10; // rcx
long long v11; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)(v5 + 95) <= 0x58u )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) >= 0xA2u || (unsigned __int8)(v6 - 127) >= 0xC1u )
{
v7 = (unsigned __int8)v5 << 8;
v8 = v7 + v6 - 41280;
if ( v8 > 0x26BC )
{
LODWORD(v9) = (v6 | v7) - 51520;
if ( (unsigned int)v9 >= 0x309D )
{
*a2 = 0LL;
return 4294967294LL;
}
v9 = (unsigned int)v9;
v10 = (unsigned __int16 *)&tab_big5_uni1;
}
else
{
v9 = v8;
v10 = (unsigned __int16 *)&tab_big5_uni0;
}
v11 = v10[v9];
*a2 = v11;
result = 2LL;
if ( (_WORD)v11 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
|
my_mb_wc_big5:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001631ee
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x001631b8
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_001631b8:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001631ee
LEA ECX,[RDI + 0x5f]
XOR EAX,EAX
CMP CL,0x58
JA 0x001631ee
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + -0x7f]
CMP DL,0xc1
SETC DL
LEA R8D,[RCX + 0x1]
CMP R8B,0xa2
SETC R8B
TEST DL,R8B
JZ 0x001631ef
LAB_001631ee:
RET
LAB_001631ef:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,DIL
SHL EAX,0x8
LEA EDX,[RAX + RCX*0x1]
ADD EDX,0xffff5ec0
CMP EDX,0x26bc
JA 0x00163216
MOV EAX,EDX
LEA RCX,[0x199b80]
JMP 0x0016322d
LAB_00163216:
OR EAX,ECX
ADD EAX,0xffff36c0
CMP EAX,0x309d
JNC 0x00163246
MOV EAX,EAX
LEA RCX,[0x19e900]
LAB_0016322d:
LEA RAX,[RCX + RAX*0x2]
MOVZX EAX,word ptr [RAX]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x00163252
JMP 0x0016324d
LAB_00163246:
MOV qword ptr [RSI],0x0
LAB_0016324d:
MOV EAX,0xfffffffe
LAB_00163252:
POP RBP
RET
|
int8 my_mb_wc_big5(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
int *puVar4;
uint uVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
bVar1 = *param_3;
if (-1 < (long)(char)bVar1) {
*param_2 = (long)(char)bVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if ((byte)(bVar1 + 0x5f) < 0x59) {
bVar2 = param_3[1];
if ((byte)(bVar2 + 0x81) < 0xc1 && (byte)(bVar2 + 1) < 0xa2) {
return 0;
}
uVar5 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0xa140;
if (uVar5 < 0x26bd) {
puVar4 = &tab_big5_uni0;
}
else {
uVar5 = CONCAT11(bVar1,bVar2) - 0xc940;
if (0x309c < uVar5) {
*param_2 = 0;
return 0xfffffffe;
}
puVar4 = &tab_big5_uni1;
}
uVar3 = *(ushort *)(puVar4 + (ulong)uVar5 * 2);
*param_2 = (ulong)uVar3;
if (uVar3 == 0) {
return 0xfffffffe;
}
return 2;
}
return 0;
}
|
|
16,704
|
mysql_read_query_result_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_read_query_result_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_read_query_result,
(parms->mysql),
parms->mysql,
my_bool,
r_my_bool)
}
|
O0
|
c
|
mysql_read_query_result_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x46730
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mysql_read_query_result_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_read_query_result
mov [rbp+var_11], al
mov cl, [rbp+var_11]
mov rax, [rbp+var_20]
mov [rax+8], cl
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
long long mysql_read_query_result_start_internal(long long *a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL);
*(_BYTE *)(v2 + 8) = mysql_read_query_result(*a1);
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_read_query_result_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00146730
MOV byte ptr [RBP + -0x11],AL
MOV CL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_read_query_result_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_read_query_result(*param_1);
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
16,705
|
finish_mysql_upgrade_info_file
|
eloqsql/client/mysql_upgrade.c
|
static void finish_mysql_upgrade_info_file(void)
{
if (info_file < 0)
return;
/* Write new version to file */
(void) my_seek(info_file, 0, SEEK_CUR, MYF(0));
(void) my_chsize(info_file, 0, 0, MYF(0));
(void) my_seek(info_file, 0, 0, MYF(0));
(void) my_write(info_file, (uchar*) MYSQL_SERVER_VERSION,
sizeof(MYSQL_SERVER_VERSION)-1, MYF(MY_WME));
(void) my_write(info_file, (uchar*) "\n", 1, MYF(MY_WME));
(void) my_lock(info_file, F_UNLCK, 0, 1, MYF(0));
/*
Check if the upgrade_info_file was properly created/updated
It's not a fatal error -> just print a message if it fails
*/
if (upgrade_already_done(1))
fprintf(stderr,
"Could not write to the upgrade info file '%s' in "
"the MariaDB Servers datadir, errno: %d\n",
upgrade_info_file, errno);
my_close(info_file, MYF(MY_WME));
info_file= -1;
return;
}
|
O0
|
c
|
finish_mysql_upgrade_info_file:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpl $0x0, 0x21ae99(%rip) # 0x246518
jge 0x2b686
jmp 0x2b771
movl 0x21ae8c(%rip), %edi # 0x246518
xorl %eax, %eax
movl %eax, %ecx
movl $0x1, %edx
movq %rcx, %rsi
callq 0x37fd0
movl 0x21ae75(%rip), %edi # 0x246518
xorl %eax, %eax
movl %eax, %ecx
xorl %edx, %edx
movq %rcx, %rsi
callq 0x30f20
movl 0x21ae61(%rip), %edi # 0x246518
xorl %eax, %eax
movl %eax, %ecx
xorl %edx, %edx
movq %rcx, %rsi
callq 0x37fd0
movl 0x21ae4d(%rip), %edi # 0x246518
leaq 0xc15c6(%rip), %rsi # 0xecc98
movl $0xf, %edx
movl $0x10, %ecx
callq 0x399b0
movl 0x21ae31(%rip), %edi # 0x246518
leaq 0xc6d79(%rip), %rsi # 0xf2467
movl $0x1, %edx
movl $0x10, %ecx
callq 0x399b0
movl 0x21ae15(%rip), %edi # 0x246518
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %ecx
movq %r8, %rdx
callq 0x36d60
movl $0x1, %edi
callq 0x2a310
cmpl $0x0, %eax
je 0x2b757
movq 0x2188a8(%rip), %rax # 0x243fd8
movq (%rax), %rax
movq %rax, -0x8(%rbp)
callq 0x29040
movq -0x8(%rbp), %rdi
movl (%rax), %ecx
leaq 0xc25ad(%rip), %rsi # 0xedcf6
leaq 0x3d2f80(%rip), %rdx # 0x3fe6d0
movb $0x0, %al
callq 0x294e0
movl 0x21adbb(%rip), %edi # 0x246518
movl $0x10, %esi
callq 0x37c50
movl $0xffffffff, 0x21ada7(%rip) # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
finish_mysql_upgrade_info_file:
push rbp
mov rbp, rsp
sub rsp, 10h
cmp cs:info_file, 0
jge short loc_2B686
jmp loc_2B771
loc_2B686:
mov edi, cs:info_file
xor eax, eax
mov ecx, eax
mov edx, 1
mov rsi, rcx
call my_seek
mov edi, cs:info_file
xor eax, eax
mov ecx, eax
xor edx, edx
mov rsi, rcx
call my_chsize
mov edi, cs:info_file
xor eax, eax
mov ecx, eax
xor edx, edx
mov rsi, rcx
call my_seek
mov edi, cs:info_file
lea rsi, a10610Mariadb; "10.6.10-MariaDB"
mov edx, 0Fh
mov ecx, 10h
call my_write
mov edi, cs:info_file
lea rsi, asc_F2464+3; "\n"
mov edx, 1
mov ecx, 10h
call my_write
mov edi, cs:info_file
mov esi, 2
xor eax, eax
mov r8d, eax
mov ecx, 1
mov rdx, r8
call my_lock
mov edi, 1
call upgrade_already_done
cmp eax, 0
jz short loc_2B757
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rbp+var_8], rax
call ___errno_location
mov rdi, [rbp+var_8]
mov ecx, [rax]
lea rsi, aCouldNotWriteT; "Could not write to the upgrade info fil"...
lea rdx, upgrade_info_file
mov al, 0
call _fprintf
loc_2B757:
mov edi, cs:info_file
mov esi, 10h
call my_close
mov cs:info_file, 0FFFFFFFFh
loc_2B771:
add rsp, 10h
pop rbp
retn
|
void finish_mysql_upgrade_info_file(
__m128 a1,
__m128 a2,
__m128 a3,
__m128 a4,
double a5,
double a6,
__m128 a7,
__m128 a8)
{
double v8; // xmm4_8
double v9; // xmm5_8
_DWORD *v10; // rax
long long v11; // [rsp+8h] [rbp-8h]
if ( info_file >= 0 )
{
my_seek((unsigned int)info_file, 0LL, 1LL);
my_chsize((unsigned int)info_file, 0LL, 0LL);
my_seek((unsigned int)info_file, 0LL, 0LL);
my_write((unsigned int)info_file, "10.6.10-MariaDB", 15LL, 16LL);
my_write((unsigned int)info_file, "\n", 1LL, 16LL);
*(double *)a1.m128_u64 = my_lock((unsigned int)info_file, 2LL, 0LL, 1LL);
if ( (unsigned int)upgrade_already_done(1, a1, a2, a3, a4, v8, v9, a7, a8) )
{
v11 = stderr;
v10 = (_DWORD *)__errno_location();
fprintf(
v11,
"Could not write to the upgrade info file '%s' in the MariaDB Servers datadir, errno: %d\n",
upgrade_info_file,
*v10);
}
my_close((unsigned int)info_file, 16LL);
info_file = -1;
}
}
|
finish_mysql_upgrade_info_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
CMP dword ptr [0x00346518],0x0
JGE 0x0012b686
JMP 0x0012b771
LAB_0012b686:
MOV EDI,dword ptr [0x00346518]
XOR EAX,EAX
MOV ECX,EAX
MOV EDX,0x1
MOV RSI,RCX
CALL 0x00137fd0
MOV EDI,dword ptr [0x00346518]
XOR EAX,EAX
MOV ECX,EAX
XOR EDX,EDX
MOV RSI,RCX
CALL 0x00130f20
MOV EDI,dword ptr [0x00346518]
XOR EAX,EAX
MOV ECX,EAX
XOR EDX,EDX
MOV RSI,RCX
CALL 0x00137fd0
MOV EDI,dword ptr [0x00346518]
LEA RSI,[0x1ecc98]
MOV EDX,0xf
MOV ECX,0x10
CALL 0x001399b0
MOV EDI,dword ptr [0x00346518]
LEA RSI,[0x1f2467]
MOV EDX,0x1
MOV ECX,0x10
CALL 0x001399b0
MOV EDI,dword ptr [0x00346518]
MOV ESI,0x2
XOR EAX,EAX
MOV R8D,EAX
MOV ECX,0x1
MOV RDX,R8
CALL 0x00136d60
MOV EDI,0x1
CALL 0x0012a310
CMP EAX,0x0
JZ 0x0012b757
MOV RAX,qword ptr [0x00343fd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
CALL 0x00129040
MOV RDI,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX]
LEA RSI,[0x1edcf6]
LEA RDX,[0x4fe6d0]
MOV AL,0x0
CALL 0x001294e0
LAB_0012b757:
MOV EDI,dword ptr [0x00346518]
MOV ESI,0x10
CALL 0x00137c50
MOV dword ptr [0x00346518],0xffffffff
LAB_0012b771:
ADD RSP,0x10
POP RBP
RET
|
void finish_mysql_upgrade_info_file(void)
{
FILE *__stream;
int iVar1;
uint *puVar2;
if (-1 < info_file) {
my_seek(info_file,0,1);
my_chsize(info_file,0,0);
my_seek(info_file,0,0);
my_write(info_file,"10.6.10-MariaDB",0xf,0x10);
my_write(info_file,&DAT_001f2467,1,0x10);
my_lock(info_file,2,0,1);
iVar1 = upgrade_already_done(1);
if (iVar1 != 0) {
__stream = *(FILE **)PTR_stderr_00343fd8;
puVar2 = (uint *)__errno_location();
fprintf(__stream,
"Could not write to the upgrade info file \'%s\' in the MariaDB Servers datadir, errno: %d\n"
,upgrade_info_file,(ulong)*puVar2);
}
my_close(info_file,0x10);
info_file = -1;
}
return;
}
|
|
16,706
|
SchemaConverter::format_grammar[abi:cxx11]()
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string format_grammar() {
std::stringstream ss;
for (const auto & kv : _rules) {
ss << kv.first << " ::= " << kv.second << std::endl;
}
return ss.str();
}
|
O3
|
cpp
|
SchemaConverter::format_grammar[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x1b640
movq 0x40(%r14), %r15
addq $0x30, %r14
cmpq %r14, %r15
je 0xc199b
leaq 0x10(%rsp), %r12
leaq 0x355c3(%rip), %r13 # 0xf6ef1
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
movq %r12, %rdi
callq 0x1ba10
movq %rax, %rbp
movl $0x5, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x1ba10
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
movq %rbp, %rdi
callq 0x1ba10
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x1b860
movsbl %al, %esi
movq %rbp, %rdi
callq 0x1b040
movq %rax, %rdi
callq 0x1b610
movq %r15, %rdi
callq 0x1b630
movq %rax, %r15
cmpq %r14, %rax
jne 0xc192e
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be40
movq 0x6c569(%rip), %rsi # 0x12df18
movq %rsp, %rdi
callq 0x1b680
leaq 0x80(%rsp), %rdi
callq 0x1b2b0
movq %rbx, %rax
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc19db
movq %rax, %rbx
movq 0x6c533(%rip), %rsi # 0x12df18
movq %rsp, %rdi
callq 0x1b680
leaq 0x80(%rsp), %rdi
callq 0x1b2b0
movq %rbx, %rdi
callq 0x1c030
|
_ZN15SchemaConverter14format_grammarB5cxx11Ev:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 188h
mov r14, rsi
mov rbx, rdi
mov rdi, rsp
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
mov r15, [r14+40h]
add r14, 30h ; '0'
cmp r15, r14
jz short loc_C199B
lea r12, [rsp+1B8h+var_1A8]
lea r13, asc_F6EF1; " ::= "
loc_C192E:
mov rsi, [r15+20h]
mov rdx, [r15+28h]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbp, rax
mov edx, 5
mov rdi, rax
mov rsi, r13
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r15+40h]
mov rdx, [r15+48h]
mov rdi, rbp
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbp, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, rbp
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbp; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rdi, r15
call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *)
mov r15, rax
cmp rax, r14
jnz short loc_C192E
loc_C199B:
lea rsi, [rsp+1B8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
mov rdi, rsp
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1B8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 188h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_C19DB:
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
mov rdi, rsp
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+arg_78]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
long long SchemaConverter::format_grammar[abi:cxx11](long long a1, long long a2)
{
_QWORD *i; // r15
long long v3; // rbp
std::ostream *v4; // rbp
char v5; // al
std::ostream *v6; // rax
_BYTE v8[16]; // [rsp+0h] [rbp-1B8h] BYREF
_BYTE v9[8]; // [rsp+10h] [rbp-1A8h] BYREF
_BYTE v10[104]; // [rsp+18h] [rbp-1A0h] BYREF
_BYTE v11[312]; // [rsp+80h] [rbp-138h] BYREF
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v8);
for ( i = *(_QWORD **)(a2 + 64); i != (_QWORD *)(a2 + 48); i = (_QWORD *)std::_Rb_tree_increment(i) )
{
v3 = std::__ostream_insert<char,std::char_traits<char>>(v9, i[4], i[5]);
std::__ostream_insert<char,std::char_traits<char>>(v3, " ::= ", 5LL);
v4 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(v3, i[8], i[9]);
v5 = std::ios::widen((char *)v4 + *(_QWORD *)(*(_QWORD *)v4 - 24LL), 10LL);
v6 = (std::ostream *)std::ostream::put(v4, v5);
std::ostream::flush(v6);
}
std::stringbuf::str(a1, v10);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v8,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v11);
return a1;
}
|
format_grammar[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x188
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x0011b640
MOV R15,qword ptr [R14 + 0x40]
ADD R14,0x30
CMP R15,R14
JZ 0x001c199b
LEA R12,[RSP + 0x10]
LEA R13,[0x1f6ef1]
LAB_001c192e:
MOV RSI,qword ptr [R15 + 0x20]
MOV RDX,qword ptr [R15 + 0x28]
LAB_001c1936:
MOV RDI,R12
CALL 0x0011ba10
MOV RBP,RAX
MOV EDX,0x5
MOV RDI,RAX
MOV RSI,R13
CALL 0x0011ba10
MOV RSI,qword ptr [R15 + 0x40]
MOV RDX,qword ptr [R15 + 0x48]
MOV RDI,RBP
CALL 0x0011ba10
MOV RBP,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBP
MOV ESI,0xa
CALL 0x0011b860
MOVSX ESI,AL
MOV RDI,RBP
CALL 0x0011b040
MOV RDI,RAX
CALL 0x0011b610
MOV RDI,R15
CALL 0x0011b630
MOV R15,RAX
CMP RAX,R14
JNZ 0x001c192e
LAB_001c199b:
LEA RSI,[RSP + 0x18]
LAB_001c19a0:
MOV RDI,RBX
CALL 0x0011be40
LAB_001c19a8:
MOV RSI,qword ptr [0x0022df18]
MOV RDI,RSP
CALL 0x0011b680
LEA RDI,[RSP + 0x80]
CALL 0x0011b2b0
MOV RAX,RBX
ADD RSP,0x188
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::format_grammar[abi:cxx11]() */
void SchemaConverter::format_grammar_abi_cxx11_(void)
{
ostream *poVar1;
_Rb_tree_node_base *p_Var2;
long in_RSI;
stringstream asStack_1b8 [16];
ostream local_1a8 [112];
ios_base local_138 [264];
std::__cxx11::stringstream::stringstream(asStack_1b8);
p_Var2 = *(_Rb_tree_node_base **)(in_RSI + 0x40);
if (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30)) {
do {
/* try { // try from 001c1936 to 001c198a has its CatchHandler @ 001c19db */
poVar1 = std::__ostream_insert<char,std::char_traits<char>>
(local_1a8,*(char **)(p_Var2 + 0x20),*(long *)(p_Var2 + 0x28));
std::__ostream_insert<char,std::char_traits<char>>(poVar1," ::= ",5);
poVar1 = std::__ostream_insert<char,std::char_traits<char>>
(poVar1,*(char **)(p_Var2 + 0x40),*(long *)(p_Var2 + 0x48));
std::ios::widen((char)*(int8 *)(*(long *)poVar1 + -0x18) + (char)poVar1);
std::ostream::put((char)poVar1);
std::ostream::flush();
p_Var2 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var2);
} while (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30));
}
/* try { // try from 001c19a0 to 001c19a7 has its CatchHandler @ 001c19d9 */
std::__cxx11::stringbuf::str();
std::__cxx11::stringstream::~stringstream(asStack_1b8);
std::ios_base::~ios_base(local_138);
return;
}
|
|
16,707
|
ftxui::(anonymous namespace)::BorderPixel::ComputeRequirement()
|
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/border.cpp
|
void ComputeRequirement() override {
Node::ComputeRequirement();
requirement_ = children_[0]->requirement();
requirement_.min_x += 2;
requirement_.min_y += 2;
if (children_.size() == 2) {
requirement_.min_x =
std::max(requirement_.min_x, children_[1]->requirement().min_x + 2);
}
requirement_.selected_box.x_min++;
requirement_.selected_box.x_max++;
requirement_.selected_box.y_min++;
requirement_.selected_box.y_max++;
}
|
O1
|
cpp
|
ftxui::(anonymous namespace)::BorderPixel::ComputeRequirement():
pushq %rbx
movq %rdi, %rbx
callq 0x2416c
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdx
movq (%rax), %rcx
movq 0x40(%rcx), %rsi
movl 0x48(%rcx), %edi
movups 0x20(%rcx), %xmm0
movups 0x30(%rcx), %xmm1
movups %xmm0, 0x20(%rbx)
movl %edi, 0x48(%rbx)
movq %rsi, 0x40(%rbx)
movups %xmm1, 0x30(%rbx)
movl 0x20(%rbx), %ecx
addl $0x2, %ecx
movl %ecx, 0x20(%rbx)
addl $0x2, 0x24(%rbx)
subq %rax, %rdx
cmpq $0x20, %rdx
jne 0x225ab
leaq 0x20(%rbx), %rdx
movq 0x10(%rax), %rax
movl 0x20(%rax), %eax
addl $0x2, %eax
cmpl %eax, %ecx
cmovgl %ecx, %eax
movl %eax, (%rdx)
incl 0x3c(%rbx)
incl 0x40(%rbx)
incl 0x44(%rbx)
incl 0x48(%rbx)
popq %rbx
retq
nop
|
_ZN5ftxui12_GLOBAL__N_111BorderPixel18ComputeRequirementEv:
push rbx
mov rbx, rdi
call _ZN5ftxui4Node18ComputeRequirementEv; ftxui::Node::ComputeRequirement(void)
mov rax, [rbx+8]
mov rdx, [rbx+10h]
mov rcx, [rax]
mov rsi, [rcx+40h]
mov edi, [rcx+48h]
movups xmm0, xmmword ptr [rcx+20h]
movups xmm1, xmmword ptr [rcx+30h]
movups xmmword ptr [rbx+20h], xmm0
mov [rbx+48h], edi
mov [rbx+40h], rsi
movups xmmword ptr [rbx+30h], xmm1
mov ecx, [rbx+20h]
add ecx, 2
mov [rbx+20h], ecx
add dword ptr [rbx+24h], 2
sub rdx, rax
cmp rdx, 20h ; ' '
jnz short loc_225AB
lea rdx, [rbx+20h]
mov rax, [rax+10h]
mov eax, [rax+20h]
add eax, 2
cmp ecx, eax
cmovg eax, ecx
mov [rdx], eax
loc_225AB:
inc dword ptr [rbx+3Ch]
inc dword ptr [rbx+40h]
inc dword ptr [rbx+44h]
inc dword ptr [rbx+48h]
pop rbx
retn
|
long long ftxui::`anonymous namespace'::BorderPixel::ComputeRequirement(
ftxui::_anonymous_namespace_::BorderPixel *this)
{
long long result; // rax
long long v3; // rdx
long long v4; // rsi
int v5; // edi
__int128 v6; // xmm1
int v7; // ecx
ftxui::Node::ComputeRequirement(this);
result = *((_QWORD *)this + 1);
v3 = *((_QWORD *)this + 2);
v4 = *(_QWORD *)(*(_QWORD *)result + 64LL);
v5 = *(_DWORD *)(*(_QWORD *)result + 72LL);
v6 = *(_OWORD *)(*(_QWORD *)result + 48LL);
*((_OWORD *)this + 2) = *(_OWORD *)(*(_QWORD *)result + 32LL);
*((_DWORD *)this + 18) = v5;
*((_QWORD *)this + 8) = v4;
*((_OWORD *)this + 3) = v6;
v7 = *((_DWORD *)this + 8) + 2;
*((_DWORD *)this + 8) = v7;
*((_DWORD *)this + 9) += 2;
if ( v3 - result == 32 )
{
result = (unsigned int)(*(_DWORD *)(*(_QWORD *)(result + 16) + 32LL) + 2);
if ( v7 > (int)result )
result = (unsigned int)v7;
*((_DWORD *)this + 8) = result;
}
++*((_DWORD *)this + 15);
++*((_DWORD *)this + 16);
++*((_DWORD *)this + 17);
++*((_DWORD *)this + 18);
return result;
}
|
ComputeRequirement:
PUSH RBX
MOV RBX,RDI
CALL 0x0012416c
MOV RAX,qword ptr [RBX + 0x8]
MOV RDX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RAX]
MOV RSI,qword ptr [RCX + 0x40]
MOV EDI,dword ptr [RCX + 0x48]
MOVUPS XMM0,xmmword ptr [RCX + 0x20]
MOVUPS XMM1,xmmword ptr [RCX + 0x30]
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOV dword ptr [RBX + 0x48],EDI
MOV qword ptr [RBX + 0x40],RSI
MOVUPS xmmword ptr [RBX + 0x30],XMM1
MOV ECX,dword ptr [RBX + 0x20]
ADD ECX,0x2
MOV dword ptr [RBX + 0x20],ECX
ADD dword ptr [RBX + 0x24],0x2
SUB RDX,RAX
CMP RDX,0x20
JNZ 0x001225ab
LEA RDX,[RBX + 0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV EAX,dword ptr [RAX + 0x20]
ADD EAX,0x2
CMP ECX,EAX
CMOVG EAX,ECX
MOV dword ptr [RDX],EAX
LAB_001225ab:
INC dword ptr [RBX + 0x3c]
INC dword ptr [RBX + 0x40]
INC dword ptr [RBX + 0x44]
INC dword ptr [RBX + 0x48]
POP RBX
RET
|
/* ftxui::(anonymous namespace)::BorderPixel::ComputeRequirement() */
void __thiscall ftxui::(anonymous_namespace)::BorderPixel::ComputeRequirement(BorderPixel *this)
{
int4 uVar1;
long *plVar2;
long lVar3;
int8 uVar4;
int8 uVar5;
int8 uVar6;
int8 uVar7;
int iVar8;
int iVar9;
Node::ComputeRequirement((Node *)this);
plVar2 = *(long **)(this + 8);
lVar3 = *plVar2;
uVar4 = *(int8 *)(lVar3 + 0x40);
uVar1 = *(int4 *)(lVar3 + 0x48);
uVar5 = *(int8 *)(lVar3 + 0x28);
uVar6 = *(int8 *)(lVar3 + 0x30);
uVar7 = *(int8 *)(lVar3 + 0x38);
*(int8 *)(this + 0x20) = *(int8 *)(lVar3 + 0x20);
*(int8 *)(this + 0x28) = uVar5;
*(int4 *)(this + 0x48) = uVar1;
*(int8 *)(this + 0x40) = uVar4;
*(int8 *)(this + 0x30) = uVar6;
*(int8 *)(this + 0x38) = uVar7;
iVar9 = *(int *)(this + 0x20) + 2;
*(int *)(this + 0x20) = iVar9;
*(int *)(this + 0x24) = *(int *)(this + 0x24) + 2;
if (*(long *)(this + 0x10) - (long)plVar2 == 0x20) {
iVar8 = *(int *)(plVar2[2] + 0x20) + 2;
if (iVar8 < iVar9) {
iVar8 = iVar9;
}
*(int *)(this + 0x20) = iVar8;
}
*(int *)(this + 0x3c) = *(int *)(this + 0x3c) + 1;
*(int *)(this + 0x40) = *(int *)(this + 0x40) + 1;
*(int *)(this + 0x44) = *(int *)(this + 0x44) + 1;
*(int *)(this + 0x48) = *(int *)(this + 0x48) + 1;
return;
}
|
|
16,708
|
my_print_default_files
|
eloqsql/mysys/my_default.c
|
void my_print_default_files(const char *conf_file)
{
const char *empty_list[]= { "", 0 };
my_bool have_ext= fn_ext(conf_file)[0] != 0;
const char **exts_to_use= have_ext ? empty_list : f_extensions;
char name[FN_REFLEN], **ext;
puts("\nDefault options are read from the following files in the given order:");
if (my_defaults_file)
{
puts(my_defaults_file);
return;
}
if (dirname_length(conf_file))
fputs(conf_file,stdout);
else
{
const char **dirs;
MEM_ROOT alloc;
init_alloc_root(key_memory_defaults, &alloc, 512, 0, MYF(0));
if ((dirs= init_default_directories(&alloc)) == NULL)
{
fputs("Internal error initializing default directories list", stdout);
}
else
{
for ( ; *dirs; dirs++)
{
for (ext= (char**) exts_to_use; *ext; ext++)
{
const char *pos;
char *end;
if (**dirs)
pos= *dirs;
else if (my_defaults_extra_file)
{
pos= my_defaults_extra_file;
fputs(pos, stdout);
fputs(" ", stdout);
continue;
}
else
continue;
end= convert_dirname(name, pos, NullS);
if (name[0] == FN_HOMELIB) /* Add . to filenames in home */
*end++= '.';
strxmov(end, conf_file, *ext, " ", NullS);
fputs(name, stdout);
}
}
}
free_root(&alloc, MYF(0));
}
puts("");
}
|
O3
|
c
|
my_print_default_files:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp # imm = 0x258
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
callq 0x94d38
cmpb $0x0, (%rax)
leaq 0x33db1a(%rip), %rax # 0x3d1690
leaq 0x33db23(%rip), %rbx # 0x3d16a0
cmoveq %rax, %rbx
leaq 0x7ea2a(%rip), %rdi # 0x1125b2
callq 0x5fc20
leaq 0x3d46f4(%rip), %rax # 0x468288
movq (%rax), %rdi
testq %rdi, %rdi
je 0x93bc5
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x93d41
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5fc20
movq %r15, %rdi
callq 0x94c64
testq %rax, %rax
je 0x93be9
movq 0x3463bf(%rip), %rax # 0x3d9f98
movq (%rax), %rsi
movq %r15, %rdi
callq 0x5f3a0
jmp 0x93d16
leaq 0x3d54d8(%rip), %rax # 0x4690c8
movl (%rax), %edi
leaq -0x280(%rbp), %r14
movl $0x200, %edx # imm = 0x200
movq %r14, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x98328
movq %r14, %rdi
callq 0x93a33
testq %rax, %rax
je 0x93cf2
movq %rax, %r14
cmpq $0x0, (%rax)
je 0x93d08
movq (%rbx), %rax
movq %rax, -0x238(%rbp)
addq $0x8, %rbx
movq %rbx, -0x240(%rbp)
leaq -0x230(%rbp), %r12
cmpq $0x0, -0x238(%rbp)
je 0x93ce1
movq -0x240(%rbp), %rbx
movq -0x238(%rbp), %r13
movq (%r14), %rsi
cmpb $0x0, (%rsi)
je 0x93ca1
movq %r12, %rdi
xorl %edx, %edx
callq 0x94cdf
cmpb $0x7e, -0x230(%rbp)
jne 0x93c82
movb $0x2e, (%rax)
incq %rax
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
leaq 0x7bb1c(%rip), %rcx # 0x10f7ae
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xee750
movq %r12, %rdi
jmp 0x93cc6
leaq 0x3d45f0(%rip), %rax # 0x468298
movq (%rax), %rdi
testq %rdi, %rdi
je 0x93cd5
movq 0x3462e1(%rip), %rax # 0x3d9f98
movq (%rax), %rsi
callq 0x5f3a0
leaq 0x7bae8(%rip), %rdi # 0x10f7ae
movq 0x3462cb(%rip), %rax # 0x3d9f98
movq (%rax), %rsi
callq 0x5f3a0
movq (%rbx), %r13
addq $0x8, %rbx
testq %r13, %r13
jne 0x93c61
cmpq $0x0, 0x8(%r14)
leaq 0x8(%r14), %r14
jne 0x93c45
jmp 0x93d08
movq 0x34629f(%rip), %rax # 0x3d9f98
movq (%rax), %rsi
leaq 0x7e8f6(%rip), %rdi # 0x1125f9
callq 0x5f3a0
leaq -0x280(%rbp), %rdi
xorl %esi, %esi
callq 0x986f7
movl $0xa, %edi
callq 0x5fdc0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x93d41
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x5f320
|
my_print_default_files:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 258h
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
call fn_ext
cmp byte ptr [rax], 0
lea rax, f_extensions
lea rbx, off_3D16A0
cmovz rbx, rax
lea rdi, aDefaultOptions; "\nDefault options are read from the fol"...
call _puts
lea rax, my_defaults_file
mov rdi, [rax]
test rdi, rdi
jz short loc_93BC5
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_93D41
add rsp, 258h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _puts
loc_93BC5:
mov rdi, r15
call dirname_length
test rax, rax
jz short loc_93BE9
mov rax, cs:stdout_ptr
mov rsi, [rax]
mov rdi, r15
call _fputs
jmp loc_93D16
loc_93BE9:
lea rax, key_memory_defaults
mov edi, [rax]
lea r14, [rbp+var_280]
mov edx, 200h
mov rsi, r14
xor ecx, ecx
xor r8d, r8d
call init_alloc_root
mov rdi, r14
call init_default_directories
test rax, rax
jz loc_93CF2
mov r14, rax
cmp qword ptr [rax], 0
jz loc_93D08
mov rax, [rbx]
mov [rbp+var_238], rax
add rbx, 8
mov [rbp+var_240], rbx
lea r12, [rbp+var_230]
loc_93C45:
cmp [rbp+var_238], 0
jz loc_93CE1
mov rbx, [rbp+var_240]
mov r13, [rbp+var_238]
loc_93C61:
mov rsi, [r14]
cmp byte ptr [rsi], 0
jz short loc_93CA1
mov rdi, r12
xor edx, edx
call convert_dirname
cmp [rbp+var_230], 7Eh ; '~'
jnz short loc_93C82
mov byte ptr [rax], 2Eh ; '.'
inc rax
loc_93C82:
mov rdi, rax
mov rsi, r15
mov rdx, r13
lea rcx, asc_10F7AD+1; " "
xor r8d, r8d
xor eax, eax
call strxmov
mov rdi, r12
jmp short loc_93CC6
loc_93CA1:
lea rax, my_defaults_extra_file
mov rdi, [rax]
test rdi, rdi
jz short loc_93CD5
mov rax, cs:stdout_ptr
mov rsi, [rax]
call _fputs
lea rdi, asc_10F7AD+1; " "
loc_93CC6:
mov rax, cs:stdout_ptr
mov rsi, [rax]
call _fputs
loc_93CD5:
mov r13, [rbx]
add rbx, 8
test r13, r13
jnz short loc_93C61
loc_93CE1:
cmp qword ptr [r14+8], 0
lea r14, [r14+8]
jnz loc_93C45
jmp short loc_93D08
loc_93CF2:
mov rax, cs:stdout_ptr
mov rsi, [rax]
lea rdi, aInternalErrorI; "Internal error initializing default dir"...
call _fputs
loc_93D08:
lea rdi, [rbp+var_280]
xor esi, esi
call free_root
loc_93D16:
mov edi, 0Ah
call _putchar
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_93D41
add rsp, 258h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_93D41:
call ___stack_chk_fail
|
long long my_print_default_files(long long a1)
{
int v1; // r15d
char **v2; // rbx
_OWORD *inited; // rax
_QWORD *v5; // r14
char **v6; // rbx
long long v7; // r13
_BYTE *v8; // rax
int v9; // r9d
char *v10; // rdi
bool v11; // zf
_BYTE v12[64]; // [rsp+0h] [rbp-280h] BYREF
char **v13; // [rsp+40h] [rbp-240h]
char *v14; // [rsp+48h] [rbp-238h]
_BYTE v15[512]; // [rsp+50h] [rbp-230h] BYREF
unsigned long long v16; // [rsp+250h] [rbp-30h]
v1 = a1;
v16 = __readfsqword(0x28u);
v2 = (char **)&off_3D16A0;
if ( !*(_BYTE *)fn_ext() )
v2 = &f_extensions;
puts("\nDefault options are read from the following files in the given order:");
if ( my_defaults_file )
return puts(my_defaults_file);
if ( !dirname_length(a1) )
{
init_alloc_root(key_memory_defaults, v12, 512LL, 0LL, 0LL);
inited = init_default_directories((long long)v12);
if ( inited )
{
v5 = inited;
if ( *(_QWORD *)inited )
{
v14 = *v2;
v13 = v2 + 1;
while ( !v14 )
{
LABEL_20:
v11 = v5[1] == 0LL;
++v5;
if ( v11 )
goto LABEL_23;
}
v6 = v13;
LODWORD(v7) = (_DWORD)v14;
while ( !*(_BYTE *)*v5 )
{
if ( my_defaults_extra_file )
{
fputs(my_defaults_extra_file, stdout);
v10 = " ";
LABEL_18:
fputs(v10, stdout);
}
v7 = (long long)*v6++;
if ( !v7 )
goto LABEL_20;
}
v8 = (_BYTE *)convert_dirname(v15, *v5, 0LL);
if ( v15[0] == 126 )
{
*v8 = 46;
LODWORD(v8) = (_DWORD)v8 + 1;
}
strxmov((_DWORD)v8, v1, v7, (unsigned int)" ", 0, v9);
v10 = v15;
goto LABEL_18;
}
}
else
{
fputs("Internal error initializing default directories list", stdout);
}
LABEL_23:
free_root(v12, 0LL);
goto LABEL_24;
}
fputs(a1, stdout);
LABEL_24:
putchar(10LL);
return __readfsqword(0x28u);
}
|
my_print_default_files:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x258
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x00194d38
CMP byte ptr [RAX],0x0
LEA RAX,[0x4d1690]
LEA RBX,[0x4d16a0]
CMOVZ RBX,RAX
LEA RDI,[0x2125b2]
CALL 0x0015fc20
LEA RAX,[0x568288]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x00193bc5
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00193d41
ADD RSP,0x258
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0015fc20
LAB_00193bc5:
MOV RDI,R15
CALL 0x00194c64
TEST RAX,RAX
JZ 0x00193be9
MOV RAX,qword ptr [0x004d9f98]
MOV RSI,qword ptr [RAX]
MOV RDI,R15
CALL 0x0015f3a0
JMP 0x00193d16
LAB_00193be9:
LEA RAX,[0x5690c8]
MOV EDI,dword ptr [RAX]
LEA R14,[RBP + -0x280]
MOV EDX,0x200
MOV RSI,R14
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00198328
MOV RDI,R14
CALL 0x00193a33
TEST RAX,RAX
JZ 0x00193cf2
MOV R14,RAX
CMP qword ptr [RAX],0x0
JZ 0x00193d08
MOV RAX,qword ptr [RBX]
MOV qword ptr [RBP + -0x238],RAX
ADD RBX,0x8
MOV qword ptr [RBP + -0x240],RBX
LEA R12,[RBP + -0x230]
LAB_00193c45:
CMP qword ptr [RBP + -0x238],0x0
JZ 0x00193ce1
MOV RBX,qword ptr [RBP + -0x240]
MOV R13,qword ptr [RBP + -0x238]
LAB_00193c61:
MOV RSI,qword ptr [R14]
CMP byte ptr [RSI],0x0
JZ 0x00193ca1
MOV RDI,R12
XOR EDX,EDX
CALL 0x00194cdf
CMP byte ptr [RBP + -0x230],0x7e
JNZ 0x00193c82
MOV byte ptr [RAX],0x2e
INC RAX
LAB_00193c82:
MOV RDI,RAX
MOV RSI,R15
MOV RDX,R13
LEA RCX,[0x20f7ae]
XOR R8D,R8D
XOR EAX,EAX
CALL 0x001ee750
MOV RDI,R12
JMP 0x00193cc6
LAB_00193ca1:
LEA RAX,[0x568298]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x00193cd5
MOV RAX,qword ptr [0x004d9f98]
MOV RSI,qword ptr [RAX]
CALL 0x0015f3a0
LEA RDI,[0x20f7ae]
LAB_00193cc6:
MOV RAX,qword ptr [0x004d9f98]
MOV RSI,qword ptr [RAX]
CALL 0x0015f3a0
LAB_00193cd5:
MOV R13,qword ptr [RBX]
ADD RBX,0x8
TEST R13,R13
JNZ 0x00193c61
LAB_00193ce1:
CMP qword ptr [R14 + 0x8],0x0
LEA R14,[R14 + 0x8]
JNZ 0x00193c45
JMP 0x00193d08
LAB_00193cf2:
MOV RAX,qword ptr [0x004d9f98]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x2125f9]
CALL 0x0015f3a0
LAB_00193d08:
LEA RDI,[RBP + -0x280]
XOR ESI,ESI
CALL 0x001986f7
LAB_00193d16:
MOV EDI,0xa
CALL 0x0015fdc0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00193d41
ADD RSP,0x258
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00193d41:
CALL 0x0015f320
|
void my_print_default_files(char *param_1)
{
long *plVar1;
int *puVar2;
char *pcVar3;
long lVar4;
long *plVar5;
int1 *puVar6;
int **ppuVar7;
long in_FS_OFFSET;
int1 local_288 [64];
int **local_248;
int *local_240;
char local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar3 = (char *)fn_ext();
ppuVar7 = &PTR_DAT_004d16a0;
if (*pcVar3 == '\0') {
ppuVar7 = (int **)f_extensions;
}
puts("\nDefault options are read from the following files in the given order:");
if (my_defaults_file == (char *)0x0) {
lVar4 = dirname_length(param_1);
if (lVar4 == 0) {
init_alloc_root(key_memory_defaults,local_288,0x200,0,0);
plVar5 = (long *)init_default_directories(local_288);
if (plVar5 == (long *)0x0) {
fputs("Internal error initializing default directories list",*(FILE **)PTR_stdout_004d9f98);
}
else if (*plVar5 != 0) {
local_240 = *ppuVar7;
local_248 = ppuVar7 + 1;
ppuVar7 = local_248;
puVar2 = local_240;
do {
while (puVar2 != (int *)0x0) {
if (*(char *)*plVar5 == '\0') {
if (my_defaults_extra_file != (char *)0x0) {
fputs(my_defaults_extra_file,*(FILE **)PTR_stdout_004d9f98);
pcVar3 = " ";
goto LAB_00193cc6;
}
}
else {
puVar6 = (int1 *)convert_dirname(local_238,(char *)*plVar5,0);
if (local_238[0] == '~') {
*puVar6 = 0x2e;
puVar6 = puVar6 + 1;
}
strxmov(puVar6,param_1,puVar2,&DAT_0020f7ae,0);
pcVar3 = local_238;
LAB_00193cc6:
fputs(pcVar3,*(FILE **)PTR_stdout_004d9f98);
}
puVar2 = *ppuVar7;
ppuVar7 = ppuVar7 + 1;
}
plVar1 = plVar5 + 1;
plVar5 = plVar5 + 1;
ppuVar7 = local_248;
puVar2 = local_240;
} while (*plVar1 != 0);
}
free_root(local_288,0);
}
else {
fputs(param_1,*(FILE **)PTR_stdout_004d9f98);
}
putchar(10);
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
}
else if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
puts(my_defaults_file);
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
16,709
|
list_free
|
eloqsql/mysys/list.c
|
void list_free(LIST *root, uint free_data)
{
LIST *next;
while (root)
{
next=root->next;
if (free_data)
my_free(root->data);
my_free(root);
root=next;
}
}
|
O3
|
c
|
list_free:
testq %rdi, %rdi
je 0x976de
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%r14), %r15
testl %ebx, %ebx
je 0x976c4
movq 0x10(%r14), %rdi
callq 0xa2e9e
movq %r14, %rdi
callq 0xa2e9e
movq %r15, %r14
testq %r15, %r15
jne 0x976b3
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
list_free:
test rdi, rdi
jz short locret_976DE
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
loc_976B3:
mov r15, [r14+8]
test ebx, ebx
jz short loc_976C4
mov rdi, [r14+10h]
call my_free
loc_976C4:
mov rdi, r14
call my_free
mov r14, r15
test r15, r15
jnz short loc_976B3
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_976DE:
retn
|
long long list_free(long long a1, int a2)
{
long long v2; // r14
long long v3; // r15
long long result; // rax
if ( a1 )
{
v2 = a1;
do
{
v3 = *(_QWORD *)(v2 + 8);
if ( a2 )
my_free(*(_QWORD *)(v2 + 16));
result = my_free(v2);
v2 = v3;
}
while ( v3 );
}
return result;
}
|
list_free:
TEST RDI,RDI
JZ 0x001976de
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LAB_001976b3:
MOV R15,qword ptr [R14 + 0x8]
TEST EBX,EBX
JZ 0x001976c4
MOV RDI,qword ptr [R14 + 0x10]
CALL 0x001a2e9e
LAB_001976c4:
MOV RDI,R14
CALL 0x001a2e9e
MOV R14,R15
TEST R15,R15
JNZ 0x001976b3
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_001976de:
RET
|
void list_free(long param_1,int param_2)
{
long lVar1;
if (param_1 != 0) {
do {
lVar1 = *(long *)(param_1 + 8);
if (param_2 != 0) {
my_free(*(int8 *)(param_1 + 0x10));
}
my_free(param_1);
param_1 = lVar1;
} while (lVar1 != 0);
}
return;
}
|
|
16,710
|
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVertexRelation()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/triRefinement.cpp
|
void
TriRefinement::populateFaceVertexRelation() {
// Both face-vertex and face-edge share the face-vertex counts/offsets within a
// Level, so be sure not to re-initialize it if already done:
//
if (_child->_faceVertCountsAndOffsets.size() == 0) {
populateFaceVertexCountsAndOffsets();
}
_child->_faceVertIndices.resize(_child->getNumFaces() * 3);
populateFaceVerticesFromParentFaces();
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVertexRelation():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x10(%rax), %rdi
addq $0x18, %rdi
callq 0xd7ae0
cmpq $0x0, %rax
jne 0x107520
movq -0x10(%rbp), %rdi
callq 0xd6f40
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x30, %rcx
movq %rcx, -0x18(%rbp)
movq 0x10(%rax), %rdi
callq 0xc3430
movq -0x18(%rbp), %rdi
imull $0x3, %eax, %eax
movslq %eax, %rsi
callq 0xc9aa0
movq -0x10(%rbp), %rdi
callq 0xd2640
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement26populateFaceVertexRelationEv:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rdi, [rax+10h]
add rdi, 18h
call __ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
cmp rax, 0
jnz short loc_107520
mov rdi, [rbp+var_10]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement34populateFaceVertexCountsAndOffsetsEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVertexCountsAndOffsets(void)
loc_107520:
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
add rcx, 30h ; '0'
mov [rbp+var_18], rcx
mov rdi, [rax+10h]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level11getNumFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFaces(void)
mov rdi, [rbp+var_18]
imul eax, 3
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rdi, [rbp+var_10]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement35populateFaceVerticesFromParentFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVerticesFromParentFaces(void)
add rsp, 20h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVertexRelation(
OpenSubdiv::v3_6_0::Vtr::internal::Level **this)
{
int NumFaces; // eax
long long v3; // [rsp+8h] [rbp-18h]
if ( !std::vector<int>::size((char *)this[2] + 24) )
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVertexCountsAndOffsets((OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement *)this);
v3 = (long long)this[2] + 48;
NumFaces = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFaces(this[2]);
std::vector<int>::resize(v3, 3 * NumFaces);
return OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVerticesFromParentFaces((OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement *)this);
}
| |||
16,711
|
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVertexRelation()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/triRefinement.cpp
|
void
TriRefinement::populateFaceVertexRelation() {
// Both face-vertex and face-edge share the face-vertex counts/offsets within a
// Level, so be sure not to re-initialize it if already done:
//
if (_child->_faceVertCountsAndOffsets.size() == 0) {
populateFaceVertexCountsAndOffsets();
}
_child->_faceVertIndices.resize(_child->getNumFaces() * 3);
populateFaceVerticesFromParentFaces();
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVertexRelation():
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x20(%rdi), %rax
cmpq 0x18(%rdi), %rax
jne 0x4d7b4
movq %rbx, %rdi
callq 0x3c190
movq 0x10(%rbx), %rdi
movslq (%rdi), %rax
addq $0x30, %rdi
leaq (%rax,%rax,2), %rsi
callq 0x39670
movq %rbx, %rdi
popq %rbx
jmp 0x3b230
nop
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement26populateFaceVertexRelationEv:
push rbx
mov rbx, rdi
mov rdi, [rdi+10h]
mov rax, [rdi+20h]
cmp rax, [rdi+18h]
jnz short loc_4D7B4
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement34populateFaceVertexCountsAndOffsetsEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVertexCountsAndOffsets(void)
mov rdi, [rbx+10h]
loc_4D7B4:
movsxd rax, dword ptr [rdi]
add rdi, 30h ; '0'
lea rsi, [rax+rax*2]
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rdi, rbx; this
pop rbx
jmp __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement35populateFaceVerticesFromParentFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVerticesFromParentFaces(void)
|
long long OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVertexRelation(
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement *this)
{
int *v2; // rdi
v2 = (int *)*((_QWORD *)this + 2);
if ( *((_QWORD *)v2 + 4) == *((_QWORD *)v2 + 3) )
{
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVertexCountsAndOffsets(this);
v2 = (int *)*((_QWORD *)this + 2);
}
std::vector<int>::resize(v2 + 12, 3LL * *v2);
return OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVerticesFromParentFaces(this);
}
|
populateFaceVertexRelation:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
MOV RAX,qword ptr [RDI + 0x20]
CMP RAX,qword ptr [RDI + 0x18]
JNZ 0x0014d7b4
MOV RDI,RBX
CALL 0x0013c190
MOV RDI,qword ptr [RBX + 0x10]
LAB_0014d7b4:
MOVSXD RAX,dword ptr [RDI]
ADD RDI,0x30
LEA RSI,[RAX + RAX*0x2]
CALL 0x00139670
MOV RDI,RBX
POP RBX
JMP 0x0013b230
|
/* OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVertexRelation() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateFaceVertexRelation(TriRefinement *this)
{
int *piVar1;
piVar1 = *(int **)(this + 0x10);
if (*(long *)(piVar1 + 8) == *(long *)(piVar1 + 6)) {
populateFaceVertexCountsAndOffsets(this);
piVar1 = *(int **)(this + 0x10);
}
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(piVar1 + 0xc),(long)*piVar1 * 3);
populateFaceVerticesFromParentFaces(this);
return;
}
|
|
16,712
|
get_unpack_function
|
eloqsql/storage/myisam/mi_packrec.c
|
static void (*get_unpack_function(MI_COLUMNDEF *rec))
(MI_COLUMNDEF *, MI_BIT_BUFF *, uchar *, uchar *)
{
switch (rec->base_type) {
case FIELD_SKIP_ZERO:
if (rec->pack_type & PACK_TYPE_ZERO_FILL)
return &uf_zerofill_skip_zero;
return &uf_skip_zero;
case FIELD_NORMAL:
if (rec->pack_type & PACK_TYPE_SPACE_FIELDS)
return &uf_space_normal;
if (rec->pack_type & PACK_TYPE_ZERO_FILL)
return &uf_zerofill_normal;
return &decode_bytes;
case FIELD_SKIP_ENDSPACE:
if (rec->pack_type & PACK_TYPE_SPACE_FIELDS)
{
if (rec->pack_type & PACK_TYPE_SELECTED)
return &uf_space_endspace_selected;
return &uf_space_endspace;
}
if (rec->pack_type & PACK_TYPE_SELECTED)
return &uf_endspace_selected;
return &uf_endspace;
case FIELD_SKIP_PRESPACE:
if (rec->pack_type & PACK_TYPE_SPACE_FIELDS)
{
if (rec->pack_type & PACK_TYPE_SELECTED)
return &uf_space_prespace_selected;
return &uf_space_prespace;
}
if (rec->pack_type & PACK_TYPE_SELECTED)
return &uf_prespace_selected;
return &uf_prespace;
case FIELD_CONSTANT:
return &uf_constant;
case FIELD_INTERVALL:
return &uf_intervall;
case FIELD_ZERO:
case FIELD_CHECK:
return &uf_zero;
case FIELD_BLOB:
return &uf_blob;
case FIELD_VARCHAR:
if (rec->length <= 256) /* 255 + 1 byte length */
return &uf_varchar1;
return &uf_varchar2;
case FIELD_LAST:
default:
return 0; /* This should never happen */
}
}
|
O0
|
c
|
get_unpack_function:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
incl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xa, %eax
ja 0xba6b4
movq -0x18(%rbp), %rax
leaq 0xa5ad5(%rip), %rcx # 0x15ffd0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xba523
leaq 0x1be6(%rip), %rax # 0xbc100
movq %rax, -0x8(%rbp)
jmp 0xba6bc
leaq 0x1cb6(%rip), %rax # 0xbc1e0
movq %rax, -0x8(%rbp)
jmp 0xba6bc
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xba552
leaq 0x1d47(%rip), %rax # 0xbc290
movq %rax, -0x8(%rbp)
jmp 0xba6bc
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xba571
leaq 0x1dd8(%rip), %rax # 0xbc340
movq %rax, -0x8(%rbp)
jmp 0xba6bc
leaq 0x1e38(%rip), %rax # 0xbc3b0
movq %rax, -0x8(%rbp)
jmp 0xba6bc
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xba5bf
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xba5af
leaq 0x227a(%rip), %rax # 0xbc820
movq %rax, -0x8(%rbp)
jmp 0xba6bc
leaq 0x243a(%rip), %rax # 0xbc9f0
movq %rax, -0x8(%rbp)
jmp 0xba6bc
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xba5de
leaq 0x257b(%rip), %rax # 0xbcb50
movq %rax, -0x8(%rbp)
jmp 0xba6bc
leaq 0x26cb(%rip), %rax # 0xbccb0
movq %rax, -0x8(%rbp)
jmp 0xba6bc
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xba62c
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xba61c
leaq 0x278d(%rip), %rax # 0xbcda0
movq %rax, -0x8(%rbp)
jmp 0xba6bc
leaq 0x293d(%rip), %rax # 0xbcf60
movq %rax, -0x8(%rbp)
jmp 0xba6bc
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xba648
leaq 0x2a6e(%rip), %rax # 0xbd0b0
movq %rax, -0x8(%rbp)
jmp 0xba6bc
leaq 0x2bb1(%rip), %rax # 0xbd200
movq %rax, -0x8(%rbp)
jmp 0xba6bc
leaq 0x2c84(%rip), %rax # 0xbd2e0
movq %rax, -0x8(%rbp)
jmp 0xba6bc
leaq 0x2cb7(%rip), %rax # 0xbd320
movq %rax, -0x8(%rbp)
jmp 0xba6bc
leaq 0x2d2a(%rip), %rax # 0xbd3a0
movq %rax, -0x8(%rbp)
jmp 0xba6bc
leaq 0x2d5d(%rip), %rax # 0xbd3e0
movq %rax, -0x8(%rbp)
jmp 0xba6bc
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %eax
cmpl $0x100, %eax # imm = 0x100
jg 0xba6a5
leaq 0x2ed1(%rip), %rax # 0xbd570
movq %rax, -0x8(%rbp)
jmp 0xba6bc
leaq 0x2fd4(%rip), %rax # 0xbd680
movq %rax, -0x8(%rbp)
jmp 0xba6bc
jmp 0xba6b4
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
get_unpack_function_0:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov eax, [rax+18h]
inc eax; switch 11 cases
mov ecx, eax
mov [rbp+var_18], rcx
sub eax, 0Ah
ja def_BA502; jumptable 00000000000BA502 default case
mov rax, [rbp+var_18]
lea rcx, jpt_BA502
movsxd rax, ds:(jpt_BA502 - 15FFD0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_BA504:
mov rax, [rbp+var_10]; jumptable 00000000000BA502 case 3
mov eax, [rax+20h]
and eax, 4
cmp eax, 0
jz short loc_BA523
lea rax, uf_zerofill_skip_zero_0
mov [rbp+var_8], rax
jmp loc_BA6BC
loc_BA523:
lea rax, uf_skip_zero_0
mov [rbp+var_8], rax
jmp loc_BA6BC
loc_BA533:
mov rax, [rbp+var_10]; jumptable 00000000000BA502 case 0
mov eax, [rax+20h]
and eax, 2
cmp eax, 0
jz short loc_BA552
lea rax, uf_space_normal_0
mov [rbp+var_8], rax
jmp loc_BA6BC
loc_BA552:
mov rax, [rbp+var_10]
mov eax, [rax+20h]
and eax, 4
cmp eax, 0
jz short loc_BA571
lea rax, uf_zerofill_normal_0
mov [rbp+var_8], rax
jmp loc_BA6BC
loc_BA571:
lea rax, decode_bytes_0
mov [rbp+var_8], rax
jmp loc_BA6BC
loc_BA581:
mov rax, [rbp+var_10]; jumptable 00000000000BA502 case 1
mov eax, [rax+20h]
and eax, 2
cmp eax, 0
jz short loc_BA5BF
mov rax, [rbp+var_10]
mov eax, [rax+20h]
and eax, 1
cmp eax, 0
jz short loc_BA5AF
lea rax, uf_space_endspace_selected_0
mov [rbp+var_8], rax
jmp loc_BA6BC
loc_BA5AF:
lea rax, uf_space_endspace_0
mov [rbp+var_8], rax
jmp loc_BA6BC
loc_BA5BF:
mov rax, [rbp+var_10]
mov eax, [rax+20h]
and eax, 1
cmp eax, 0
jz short loc_BA5DE
lea rax, uf_endspace_selected_0
mov [rbp+var_8], rax
jmp loc_BA6BC
loc_BA5DE:
lea rax, uf_endspace_0
mov [rbp+var_8], rax
jmp loc_BA6BC
loc_BA5EE:
mov rax, [rbp+var_10]; jumptable 00000000000BA502 case 2
mov eax, [rax+20h]
and eax, 2
cmp eax, 0
jz short loc_BA62C
mov rax, [rbp+var_10]
mov eax, [rax+20h]
and eax, 1
cmp eax, 0
jz short loc_BA61C
lea rax, uf_space_prespace_selected_0
mov [rbp+var_8], rax
jmp loc_BA6BC
loc_BA61C:
lea rax, uf_space_prespace_0
mov [rbp+var_8], rax
jmp loc_BA6BC
loc_BA62C:
mov rax, [rbp+var_10]
mov eax, [rax+20h]
and eax, 1
cmp eax, 0
jz short loc_BA648
lea rax, uf_prespace_selected_0
mov [rbp+var_8], rax
jmp short loc_BA6BC
loc_BA648:
lea rax, uf_prespace_0
mov [rbp+var_8], rax
jmp short loc_BA6BC
loc_BA655:
lea rax, uf_constant_0; jumptable 00000000000BA502 case 5
mov [rbp+var_8], rax
jmp short loc_BA6BC
loc_BA662:
lea rax, uf_intervall_0; jumptable 00000000000BA502 case 6
mov [rbp+var_8], rax
jmp short loc_BA6BC
loc_BA66F:
lea rax, uf_zero_0; jumptable 00000000000BA502 cases 7,9
mov [rbp+var_8], rax
jmp short loc_BA6BC
loc_BA67C:
lea rax, uf_blob_0; jumptable 00000000000BA502 case 4
mov [rbp+var_8], rax
jmp short loc_BA6BC
loc_BA689:
mov rax, [rbp+var_10]; jumptable 00000000000BA502 case 8
movzx eax, word ptr [rax+4]
cmp eax, 100h
jg short loc_BA6A5
lea rax, uf_varchar1_0
mov [rbp+var_8], rax
jmp short loc_BA6BC
loc_BA6A5:
lea rax, uf_varchar2_0
mov [rbp+var_8], rax
jmp short loc_BA6BC
loc_BA6B2:
jmp short $+2; jumptable 00000000000BA502 case -1
def_BA502:
mov [rbp+var_8], 0; jumptable 00000000000BA502 default case
loc_BA6BC:
mov rax, [rbp+var_8]
pop rbp
retn
|
long long ( * get_unpack_function_0(long long a1))()
{
long long ( *v2)(); // [rsp+10h] [rbp-8h]
switch ( *(_DWORD *)(a1 + 24) )
{
case 0:
if ( (*(_DWORD *)(a1 + 32) & 2) != 0 )
{
v2 = uf_space_normal_0;
}
else if ( (*(_DWORD *)(a1 + 32) & 4) != 0 )
{
v2 = uf_zerofill_normal_0;
}
else
{
v2 = decode_bytes_0;
}
break;
case 1:
if ( (*(_DWORD *)(a1 + 32) & 2) != 0 )
{
if ( (*(_DWORD *)(a1 + 32) & 1) != 0 )
v2 = uf_space_endspace_selected_0;
else
v2 = uf_space_endspace_0;
}
else if ( (*(_DWORD *)(a1 + 32) & 1) != 0 )
{
v2 = uf_endspace_selected_0;
}
else
{
v2 = uf_endspace_0;
}
break;
case 2:
if ( (*(_DWORD *)(a1 + 32) & 2) != 0 )
{
if ( (*(_DWORD *)(a1 + 32) & 1) != 0 )
v2 = uf_space_prespace_selected_0;
else
v2 = uf_space_prespace_0;
}
else if ( (*(_DWORD *)(a1 + 32) & 1) != 0 )
{
v2 = uf_prespace_selected_0;
}
else
{
v2 = uf_prespace_0;
}
break;
case 3:
if ( (*(_DWORD *)(a1 + 32) & 4) != 0 )
v2 = uf_zerofill_skip_zero_0;
else
v2 = uf_skip_zero_0;
break;
case 4:
v2 = uf_blob_0;
break;
case 5:
v2 = uf_constant_0;
break;
case 6:
v2 = uf_intervall_0;
break;
case 7:
case 9:
v2 = uf_zero_0;
break;
case 8:
if ( *(unsigned __int16 *)(a1 + 4) > 0x100u )
v2 = uf_varchar2_0;
else
v2 = uf_varchar1_0;
break;
default:
v2 = 0LL;
break;
}
return v2;
}
|
get_unpack_function:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x18]
INC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x18],RCX
SUB EAX,0xa
JA 0x001ba6b4
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x25ffd0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_3:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
AND EAX,0x4
CMP EAX,0x0
JZ 0x001ba523
LEA RAX,[0x1bc100]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
LAB_001ba523:
LEA RAX,[0x1bc1e0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
caseD_0:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001ba552
LEA RAX,[0x1bc290]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
LAB_001ba552:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
AND EAX,0x4
CMP EAX,0x0
JZ 0x001ba571
LEA RAX,[0x1bc340]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
LAB_001ba571:
LEA RAX,[0x1bc3b0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
caseD_1:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001ba5bf
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001ba5af
LEA RAX,[0x1bc820]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
LAB_001ba5af:
LEA RAX,[0x1bc9f0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
LAB_001ba5bf:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001ba5de
LEA RAX,[0x1bcb50]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
LAB_001ba5de:
LEA RAX,[0x1bccb0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
caseD_2:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001ba62c
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001ba61c
LEA RAX,[0x1bcda0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
LAB_001ba61c:
LEA RAX,[0x1bcf60]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
LAB_001ba62c:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001ba648
LEA RAX,[0x1bd0b0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
LAB_001ba648:
LEA RAX,[0x1bd200]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
caseD_5:
LEA RAX,[0x1bd2e0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
caseD_6:
LEA RAX,[0x1bd320]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
caseD_7:
LEA RAX,[0x1bd3a0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
caseD_4:
LEA RAX,[0x1bd3e0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
caseD_8:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0x4]
CMP EAX,0x100
JG 0x001ba6a5
LEA RAX,[0x1bd570]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
LAB_001ba6a5:
LEA RAX,[0x1bd680]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6bc
caseD_ffffffff:
JMP 0x001ba6b4
default:
MOV qword ptr [RBP + -0x8],0x0
LAB_001ba6bc:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
code * get_unpack_function(long param_1)
{
code *local_10;
switch(*(int4 *)(param_1 + 0x18)) {
case 0:
if ((*(uint *)(param_1 + 0x20) & 2) == 0) {
if ((*(uint *)(param_1 + 0x20) & 4) == 0) {
local_10 = decode_bytes;
}
else {
local_10 = uf_zerofill_normal;
}
}
else {
local_10 = uf_space_normal;
}
break;
case 1:
if ((*(uint *)(param_1 + 0x20) & 2) == 0) {
if ((*(uint *)(param_1 + 0x20) & 1) == 0) {
local_10 = uf_endspace;
}
else {
local_10 = uf_endspace_selected;
}
}
else if ((*(uint *)(param_1 + 0x20) & 1) == 0) {
local_10 = uf_space_endspace;
}
else {
local_10 = uf_space_endspace_selected;
}
break;
case 2:
if ((*(uint *)(param_1 + 0x20) & 2) == 0) {
if ((*(uint *)(param_1 + 0x20) & 1) == 0) {
local_10 = uf_prespace;
}
else {
local_10 = uf_prespace_selected;
}
}
else if ((*(uint *)(param_1 + 0x20) & 1) == 0) {
local_10 = uf_space_prespace;
}
else {
local_10 = uf_space_prespace_selected;
}
break;
case 3:
if ((*(uint *)(param_1 + 0x20) & 4) == 0) {
local_10 = uf_skip_zero;
}
else {
local_10 = uf_zerofill_skip_zero;
}
break;
case 4:
local_10 = uf_blob;
break;
case 5:
local_10 = uf_constant;
break;
case 6:
local_10 = uf_intervall;
break;
case 7:
case 9:
local_10 = uf_zero;
break;
case 8:
if (*(ushort *)(param_1 + 4) < 0x101) {
local_10 = uf_varchar1;
}
else {
local_10 = uf_varchar2;
}
break;
case 0xffffffff:
default:
local_10 = (code *)0x0;
}
return local_10;
}
|
|
16,713
|
SDL_CreateWindowAndRenderer
|
SDL3Lite/source/SDL3/SDL_Renderer.cpp
|
bool SDL_CreateWindowAndRenderer(const char* title, int width, int height, SDL_WindowFlags window_flags, SDL_Window** window, SDL_Renderer** renderer)
{
if (window_flags == 0)
{
SDL::SupportedAccelerator supportedAccelerator;
if (supportedAccelerator.IsOpenGL1_2())
{
window_flags = SDL_WINDOW_OPENGL;
}
}
SDL_Window* singleWindow = SDL_CreateWindowImplementation(
SDL::GetApplication().GetWindows(),
SDL::GetApplication().GetOpenGLAttributes(),
SDL::GetApplication().GetResult(),
SDL::GetApplication().GetEventHandler(),
title, width, height, window_flags);
*window = singleWindow;
SDL_Renderer* singleRenderer = SDL_CreateRendererImplementation(
SDL::GetApplication().GetResult(),
singleWindow,
"");
*renderer = singleRenderer;
return true;
}
|
O3
|
cpp
|
SDL_CreateWindowAndRenderer:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
movl %edx, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
movq %r8, 0x48(%rsp)
movq %r9, 0x40(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x25e7d
leaq 0x3f(%rsp), %rdi
callq 0x1e960
leaq 0x3f(%rsp), %rdi
callq 0x1e970
testb $0x1, %al
jne 0x25e72
jmp 0x25e7b
movq $0x2, 0x50(%rsp)
jmp 0x25e7d
callq 0x27cf0
movq %rax, %rdi
callq 0x27bc0
movq %rax, 0x10(%rsp)
callq 0x27cf0
movq %rax, %rdi
callq 0x27c00
movq %rax, 0x18(%rsp)
callq 0x27cf0
movq %rax, %rdi
callq 0x27c10
movq %rax, 0x20(%rsp)
callq 0x27cf0
movq %rax, %rdi
callq 0x27be0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rcx
movq 0x60(%rsp), %r8
movl 0x5c(%rsp), %r9d
movl 0x58(%rsp), %r10d
movq 0x50(%rsp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x26bc0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, (%rax)
callq 0x27cf0
movq %rax, %rdi
callq 0x27c10
movq %rax, %rdi
movq 0x30(%rsp), %rsi
leaq 0x910f(%rip), %rdx # 0x2f031
callq 0x25c80
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movb $0x1, %al
andb $0x1, %al
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
|
SDL_CreateWindowAndRenderer:
sub rsp, 68h
mov qword ptr [rsp+68h+var_8], rdi; int
mov [rsp+68h+var_C], esi
mov [rsp+68h+var_10], edx; int
mov [rsp+68h+var_18], rcx; int
mov [rsp+68h+var_20], r8; void *
mov qword ptr [rsp+68h+var_28], r9; int
cmp [rsp+68h+var_18], 0
jnz short loc_25E7D
lea rdi, [rsp+68h+var_29]; this
call _ZN3SDL20SupportedAcceleratorC2Ev; SDL::SupportedAccelerator::SupportedAccelerator(void)
lea rdi, [rsp+68h+var_29]; this
call _ZN3SDL20SupportedAccelerator11IsOpenGL1_2Ev; SDL::SupportedAccelerator::IsOpenGL1_2(void)
test al, 1
jnz short loc_25E72
jmp short loc_25E7B
loc_25E72:
mov [rsp+68h+var_18], 2
loc_25E7B:
jmp short $+2
loc_25E7D:
call _ZN3SDL14GetApplicationEv; SDL::GetApplication(void)
mov rdi, rax; this
call _ZN3SDL11Application10GetWindowsEv; SDL::Application::GetWindows(void)
mov [rsp+68h+var_58], rax; int
call _ZN3SDL14GetApplicationEv; SDL::GetApplication(void)
mov rdi, rax; this
call _ZN3SDL11Application19GetOpenGLAttributesEv; SDL::Application::GetOpenGLAttributes(void)
mov [rsp+68h+var_50], rax; int
call _ZN3SDL14GetApplicationEv; SDL::GetApplication(void)
mov rdi, rax; this
call _ZN3SDL11Application9GetResultEv; SDL::Application::GetResult(void)
mov [rsp+68h+var_48], rax; void *
call _ZN3SDL14GetApplicationEv; SDL::GetApplication(void)
mov rdi, rax; this
call _ZN3SDL11Application15GetEventHandlerEv; SDL::Application::GetEventHandler(void)
mov rdi, [rsp+68h+var_58]; this
mov rsi, [rsp+68h+var_50]; SDL_Window *
mov rdx, [rsp+68h+var_48]; int
mov rcx, rax; int
mov r8, qword ptr [rsp+68h+var_8]; int
mov r9d, [rsp+68h+var_C]
mov r10d, [rsp+68h+var_10]
mov rax, [rsp+68h+var_18]
mov [rsp+68h+var_68], r10d; int
mov [rsp+68h+var_60], rax; __int64
call _Z30SDL_CreateWindowImplementationRSt6vectorIP10SDL_WindowSaIS1_EERN3SDL16OpenGLAttributesERNS5_6ResultERNS5_12EventHandlerEPKciim; SDL_CreateWindowImplementation(std::vector<SDL_Window *> &,SDL::OpenGLAttributes &,SDL::Result &,SDL::EventHandler &,char const*,int,int,ulong)
mov [rsp+68h+var_38], rax
mov rcx, [rsp+68h+var_38]
mov rax, [rsp+68h+var_20]
mov [rax], rcx
call _ZN3SDL14GetApplicationEv; SDL::GetApplication(void)
mov rdi, rax; this
call _ZN3SDL11Application9GetResultEv; SDL::Application::GetResult(void)
mov rdi, rax; SDL::Result *
mov rsi, [rsp+68h+var_38]; SDL_Window *
lea rdx, aTestFailExpres+2Dh; char *
call _Z32SDL_CreateRendererImplementationRN3SDL6ResultEP10SDL_WindowPKc; SDL_CreateRendererImplementation(SDL::Result &,SDL_Window *,char const*)
mov [rsp+68h+var_40], rax
mov rcx, [rsp+68h+var_40]
mov rax, qword ptr [rsp+68h+var_28]
mov [rax], rcx
mov al, 1
and al, 1
add rsp, 68h
retn
|
SDL_CreateWindowAndRenderer:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV dword ptr [RSP + 0x5c],ESI
MOV dword ptr [RSP + 0x58],EDX
MOV qword ptr [RSP + 0x50],RCX
MOV qword ptr [RSP + 0x48],R8
MOV qword ptr [RSP + 0x40],R9
CMP qword ptr [RSP + 0x50],0x0
JNZ 0x00125e7d
LEA RDI,[RSP + 0x3f]
CALL 0x0011e960
LEA RDI,[RSP + 0x3f]
CALL 0x0011e970
TEST AL,0x1
JNZ 0x00125e72
JMP 0x00125e7b
LAB_00125e72:
MOV qword ptr [RSP + 0x50],0x2
LAB_00125e7b:
JMP 0x00125e7d
LAB_00125e7d:
CALL 0x00127cf0
MOV RDI,RAX
CALL 0x00127bc0
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00127cf0
MOV RDI,RAX
CALL 0x00127c00
MOV qword ptr [RSP + 0x18],RAX
CALL 0x00127cf0
MOV RDI,RAX
CALL 0x00127c10
MOV qword ptr [RSP + 0x20],RAX
CALL 0x00127cf0
MOV RDI,RAX
CALL 0x00127be0
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,RAX
MOV R8,qword ptr [RSP + 0x60]
MOV R9D,dword ptr [RSP + 0x5c]
MOV R10D,dword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x50]
MOV dword ptr [RSP],R10D
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00126bc0
MOV qword ptr [RSP + 0x30],RAX
MOV RCX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX],RCX
CALL 0x00127cf0
MOV RDI,RAX
CALL 0x00127c10
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x30]
LEA RDX,[0x12f031]
CALL 0x00125c80
MOV qword ptr [RSP + 0x28],RAX
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX],RCX
MOV AL,0x1
AND AL,0x1
ADD RSP,0x68
RET
|
int8
SDL_CreateWindowAndRenderer
(char *param_1,int param_2,int param_3,ulong param_4,int8 *param_5,
int8 *param_6)
{
ulong uVar1;
Application *pAVar2;
vector *pvVar3;
OpenGLAttributes *pOVar4;
Result *pRVar5;
EventHandler *pEVar6;
SDL_Window *pSVar7;
int8 uVar8;
SupportedAccelerator local_29;
int8 *local_28;
int8 *local_20;
ulong local_18;
int local_10;
int local_c;
char *local_8;
local_28 = param_6;
local_20 = param_5;
local_18 = param_4;
local_10 = param_3;
local_c = param_2;
local_8 = param_1;
if (param_4 == 0) {
SDL::SupportedAccelerator::SupportedAccelerator(&local_29);
uVar1 = SDL::SupportedAccelerator::IsOpenGL1_2();
if ((uVar1 & 1) != 0) {
local_18 = 2;
}
}
pAVar2 = (Application *)SDL::GetApplication();
pvVar3 = (vector *)SDL::Application::GetWindows(pAVar2);
pAVar2 = (Application *)SDL::GetApplication();
pOVar4 = (OpenGLAttributes *)SDL::Application::GetOpenGLAttributes(pAVar2);
pAVar2 = (Application *)SDL::GetApplication();
pRVar5 = (Result *)SDL::Application::GetResult(pAVar2);
pAVar2 = (Application *)SDL::GetApplication();
pEVar6 = (EventHandler *)SDL::Application::GetEventHandler(pAVar2);
pSVar7 = (SDL_Window *)
SDL_CreateWindowImplementation
(pvVar3,pOVar4,pRVar5,pEVar6,local_8,local_c,local_10,local_18);
*local_20 = pSVar7;
pAVar2 = (Application *)SDL::GetApplication();
pRVar5 = (Result *)SDL::Application::GetResult(pAVar2);
uVar8 = SDL_CreateRendererImplementation(pRVar5,pSVar7,"");
*local_28 = uVar8;
return 1;
}
|
||
16,714
|
d2b
|
eloqsql/strings/dtoa.c
|
static Bigint *d2b(U *d, int *e, int *bits, Stack_alloc *alloc)
{
Bigint *b;
int de, k;
ULong *x, y, z;
int i;
#define d0 word0(d)
#define d1 word1(d)
b= Balloc(1, alloc);
x= b->p.x;
z= d0 & Frac_mask;
d0 &= 0x7fffffff; /* clear sign bit, which we ignore */
if ((de= (int)(d0 >> Exp_shift)))
z|= Exp_msk1;
if ((y= d1))
{
if ((k= lo0bits(&y)))
{
x[0]= y | z << (32 - k);
z>>= k;
}
else
x[0]= y;
i= b->wds= (x[1]= z) ? 2 : 1;
}
else
{
k= lo0bits(&z);
x[0]= z;
i= b->wds= 1;
k+= 32;
}
if (de)
{
*e= de - Bias - (P-1) + k;
*bits= P - k;
}
else
{
*e= de - Bias - (P-1) + 1 + k;
*bits= 32*i - hi0bits(x[i-1]);
}
return b;
#undef d0
#undef d1
}
|
O3
|
c
|
d2b:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdi, %r12
movl $0x1, %edi
movq %rcx, %rsi
callq 0x57c10
movq %rax, %r14
movq (%rax), %r13
movl 0x4(%r12), %ebx
movl %ebx, %r15d
andl $0xfffff, %r15d # imm = 0xFFFFF
movl %r15d, -0x2c(%rbp)
andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF
movl %ebx, 0x4(%r12)
cmpl $0x100000, %ebx # imm = 0x100000
jb 0x57ce4
orl $0x100000, %r15d # imm = 0x100000
movl %r15d, -0x2c(%rbp)
movl (%r12), %eax
movl %eax, -0x30(%rbp)
testl %eax, %eax
je 0x57d2e
leaq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x582e9
movl %eax, %ecx
negb %cl
movl %r15d, %edx
shll %cl, %edx
movl %eax, %ecx
shrl %cl, %r15d
testl %eax, %eax
cmovel %eax, %edx
orl (%r12), %edx
movl %edx, (%r13)
movl %r15d, 0x4(%r13)
cmpl $0x1, %r15d
movl $0x2, %r15d
sbbl $0x0, %r15d
movl %r15d, 0x14(%r14)
jmp 0x57d53
leaq -0x2c(%rbp), %r12
movq %r12, %rdi
callq 0x582e9
movl (%r12), %ecx
movl %ecx, (%r13)
movl $0x1, 0x14(%r14)
addl $0x20, %eax
movl $0x1, %r15d
cmpl $0x100000, %ebx # imm = 0x100000
jae 0x57d7c
addl $0xfffffbce, %eax # imm = 0xFFFFFBCE
movq -0x38(%rbp), %rcx
movl %eax, (%rcx)
movl %r15d, %eax
shll $0x5, %r15d
movl -0x4(%r13,%rax,4), %edi
callq 0x5837a
subl %eax, %r15d
jmp 0x57d97
shrl $0x14, %ebx
leal (%rbx,%rax), %ecx
addl $0xfffffbcd, %ecx # imm = 0xFFFFFBCD
movq -0x38(%rbp), %rdx
movl %ecx, (%rdx)
movl $0x35, %r15d
subl %eax, %r15d
movq -0x40(%rbp), %rax
movl %r15d, (%rax)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
d2b:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], rdx
mov [rbp+var_38], rsi
mov r12, rdi
mov edi, 1
mov rsi, rcx
call Balloc
mov r14, rax
mov r13, [rax]
mov ebx, [r12+4]
mov r15d, ebx
and r15d, 0FFFFFh
mov [rbp+var_2C], r15d
and ebx, 7FFFFFFFh
mov [r12+4], ebx
cmp ebx, offset unk_100000
jb short loc_57CE4
or r15d, 100000h
mov [rbp+var_2C], r15d
loc_57CE4:
mov eax, [r12]
mov [rbp+var_30], eax
test eax, eax
jz short loc_57D2E
lea r12, [rbp+var_30]
mov rdi, r12
call lo0bits
mov ecx, eax
neg cl
mov edx, r15d
shl edx, cl
mov ecx, eax
shr r15d, cl
test eax, eax
cmovz edx, eax
or edx, [r12]
mov [r13+0], edx
mov [r13+4], r15d
cmp r15d, 1
mov r15d, 2
sbb r15d, 0
mov [r14+14h], r15d
jmp short loc_57D53
loc_57D2E:
lea r12, [rbp+var_2C]
mov rdi, r12
call lo0bits
mov ecx, [r12]
mov [r13+0], ecx
mov dword ptr [r14+14h], 1
add eax, 20h ; ' '
mov r15d, 1
loc_57D53:
cmp ebx, offset unk_100000
jnb short loc_57D7C
add eax, 0FFFFFBCEh
mov rcx, [rbp+var_38]
mov [rcx], eax
mov eax, r15d
shl r15d, 5
mov edi, [r13+rax*4-4]
call hi0bits
sub r15d, eax
jmp short loc_57D97
loc_57D7C:
shr ebx, 14h
lea ecx, [rbx+rax]
add ecx, 0FFFFFBCDh
mov rdx, [rbp+var_38]
mov [rdx], ecx
mov r15d, 35h ; '5'
sub r15d, eax
loc_57D97:
mov rax, [rbp+var_40]
mov [rax], r15d
mov rax, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long d2b(int *a1, _DWORD *a2, _DWORD *a3, long long a4)
{
long long v4; // r14
int *v5; // r13
int v6; // ebx
unsigned int v7; // r15d
unsigned int v8; // ebx
int v9; // eax
unsigned int v10; // edx
unsigned int v11; // r15d
unsigned int v12; // r15d
int v13; // eax
int v14; // r15d
int v17; // [rsp+10h] [rbp-30h] BYREF
int v18[11]; // [rsp+14h] [rbp-2Ch] BYREF
v4 = Balloc(1, a4);
v5 = *(int **)v4;
v6 = a1[1];
v7 = v6 & 0xFFFFF;
v18[0] = v6 & 0xFFFFF;
v8 = v6 & 0x7FFFFFFF;
a1[1] = v8;
if ( v8 >= (unsigned int)&unk_100000 )
{
v7 |= 0x100000u;
v18[0] = v7;
}
v17 = *a1;
if ( v17 )
{
v9 = lo0bits(&v17);
v10 = v7 << -(char)v9;
v11 = v7 >> v9;
if ( !v9 )
v10 = 0;
*v5 = v17 | v10;
v5[1] = v11;
v12 = 2 - (v11 == 0);
*(_DWORD *)(v4 + 20) = v12;
}
else
{
v13 = lo0bits(v18);
*v5 = v18[0];
*(_DWORD *)(v4 + 20) = 1;
v9 = v13 + 32;
v12 = 1;
}
if ( v8 >= (unsigned int)&unk_100000 )
{
*a2 = (v8 >> 20) + v9 - 1075;
v14 = 53 - v9;
}
else
{
*a2 = v9 - 1074;
v14 = 32 * v12 - hi0bits((unsigned int)v5[v12 - 1]);
}
*a3 = v14;
return v4;
}
|
d2b:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x38],RSI
MOV R12,RDI
MOV EDI,0x1
MOV RSI,RCX
CALL 0x00157c10
MOV R14,RAX
MOV R13,qword ptr [RAX]
MOV EBX,dword ptr [R12 + 0x4]
MOV R15D,EBX
AND R15D,0xfffff
MOV dword ptr [RBP + -0x2c],R15D
AND EBX,0x7fffffff
MOV dword ptr [R12 + 0x4],EBX
CMP EBX,0x100000
JC 0x00157ce4
OR R15D,0x100000
MOV dword ptr [RBP + -0x2c],R15D
LAB_00157ce4:
MOV EAX,dword ptr [R12]
MOV dword ptr [RBP + -0x30],EAX
TEST EAX,EAX
JZ 0x00157d2e
LEA R12,[RBP + -0x30]
MOV RDI,R12
CALL 0x001582e9
MOV ECX,EAX
NEG CL
MOV EDX,R15D
SHL EDX,CL
MOV ECX,EAX
SHR R15D,CL
TEST EAX,EAX
CMOVZ EDX,EAX
OR EDX,dword ptr [R12]
MOV dword ptr [R13],EDX
MOV dword ptr [R13 + 0x4],R15D
CMP R15D,0x1
MOV R15D,0x2
SBB R15D,0x0
MOV dword ptr [R14 + 0x14],R15D
JMP 0x00157d53
LAB_00157d2e:
LEA R12,[RBP + -0x2c]
MOV RDI,R12
CALL 0x001582e9
MOV ECX,dword ptr [R12]
MOV dword ptr [R13],ECX
MOV dword ptr [R14 + 0x14],0x1
ADD EAX,0x20
MOV R15D,0x1
LAB_00157d53:
CMP EBX,0x100000
JNC 0x00157d7c
ADD EAX,0xfffffbce
MOV RCX,qword ptr [RBP + -0x38]
MOV dword ptr [RCX],EAX
MOV EAX,R15D
SHL R15D,0x5
MOV EDI,dword ptr [R13 + RAX*0x4 + -0x4]
CALL 0x0015837a
SUB R15D,EAX
JMP 0x00157d97
LAB_00157d7c:
SHR EBX,0x14
LEA ECX,[RBX + RAX*0x1]
ADD ECX,0xfffffbcd
MOV RDX,qword ptr [RBP + -0x38]
MOV dword ptr [RDX],ECX
MOV R15D,0x35
SUB R15D,EAX
LAB_00157d97:
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RAX],R15D
MOV RAX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long * d2b(uint *param_1,int *param_2,int *param_3,int8 param_4)
{
uint *puVar1;
int iVar2;
long *plVar3;
uint uVar4;
uint uVar5;
uint uVar6;
uint local_38;
uint local_34;
plVar3 = (long *)Balloc(1,param_4);
puVar1 = (uint *)*plVar3;
uVar6 = param_1[1] & 0xfffff;
uVar5 = param_1[1] & 0x7fffffff;
param_1[1] = uVar5;
if (0xfffff < uVar5) {
uVar6 = uVar6 | 0x100000;
}
local_38 = *param_1;
local_34 = uVar6;
if (local_38 == 0) {
iVar2 = lo0bits(&local_34);
*puVar1 = local_34;
*(int4 *)((long)plVar3 + 0x14) = 1;
iVar2 = iVar2 + 0x20;
uVar6 = 1;
}
else {
iVar2 = lo0bits(&local_38);
uVar4 = uVar6 << (-(byte)iVar2 & 0x1f);
uVar6 = uVar6 >> ((byte)iVar2 & 0x1f);
if (iVar2 == 0) {
uVar4 = 0;
}
*puVar1 = uVar4 | local_38;
puVar1[1] = uVar6;
uVar6 = 2 - (uVar6 == 0);
*(uint *)((long)plVar3 + 0x14) = uVar6;
}
if (uVar5 < 0x100000) {
*param_2 = iVar2 + -0x432;
iVar2 = hi0bits(puVar1[(ulong)uVar6 - 1]);
iVar2 = uVar6 * 0x20 - iVar2;
}
else {
*param_2 = (uVar5 >> 0x14) + iVar2 + -0x433;
iVar2 = 0x35 - iVar2;
}
*param_3 = iVar2;
return plVar3;
}
|
|
16,715
|
mi_make_key
|
eloqsql/storage/myisam/mi_key.c
|
uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
const uchar *record, my_off_t filepos)
{
uchar *pos;
uchar *start;
reg1 HA_KEYSEG *keyseg;
my_bool is_ft= info->s->keyinfo[keynr].flag & HA_FULLTEXT;
DBUG_ENTER("_mi_make_key");
if (info->s->keyinfo[keynr].flag & HA_SPATIAL)
{
/*
TODO: nulls processing
*/
#ifdef HAVE_SPATIAL
DBUG_RETURN(sp_make_key(info,keynr,key,record,filepos));
#else
DBUG_ASSERT(0); /* mi_open should check that this never happens*/
#endif
}
start=key;
for (keyseg=info->s->keyinfo[keynr].seg ; keyseg->type ;keyseg++)
{
enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type;
size_t length=keyseg->length;
size_t char_length;
CHARSET_INFO *cs=keyseg->charset;
if (keyseg->null_bit)
{
if (record[keyseg->null_pos] & keyseg->null_bit)
{
*key++= 0; /* NULL in key */
continue;
}
*key++=1; /* Not NULL */
}
char_length= ((!is_ft && cs && cs->mbmaxlen > 1) ? length/cs->mbmaxlen :
length);
pos= (uchar*) record+keyseg->start;
if (type == HA_KEYTYPE_BIT)
{
if (keyseg->bit_length)
{
uchar bits= get_rec_bits((uchar*) record + keyseg->bit_pos,
keyseg->bit_start, keyseg->bit_length);
*key++= bits;
length--;
}
memcpy((uchar*) key, pos, length);
key+= length;
continue;
}
if (keyseg->flag & HA_SPACE_PACK)
{
if (type != HA_KEYTYPE_NUM)
{
length= my_ci_lengthsp(cs, (char*) pos, length);
}
else
{
uchar *end= pos + length;
while (pos < end && pos[0] == ' ')
pos++;
length=(size_t) (end-pos);
}
FIX_LENGTH(cs, pos, length, char_length);
store_key_length_inc(key,char_length);
memcpy(key, pos,char_length);
key+=char_length;
continue;
}
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= (keyseg->bit_start == 1 ? 1 : 2);
uint tmp_length= (pack_length == 1 ? (uint) *(uchar*) pos :
uint2korr(pos));
pos+= pack_length; /* Skip VARCHAR length */
set_if_smaller(length,tmp_length);
FIX_LENGTH(cs, pos, length, char_length);
store_key_length_inc(key,char_length);
memcpy(key, pos, char_length);
key+= char_length;
continue;
}
else if (keyseg->flag & HA_BLOB_PART)
{
uint tmp_length=_mi_calc_blob_length(keyseg->bit_start,pos);
memcpy(&pos,pos+keyseg->bit_start,sizeof(char*));
set_if_smaller(length,tmp_length);
FIX_LENGTH(cs, pos, length, char_length);
store_key_length_inc(key,char_length);
if (char_length)
{
memcpy(key, pos, char_length);
key+= char_length;
}
continue;
}
else if (keyseg->flag & HA_SWAP_KEY)
{ /* Numerical column */
if (type == HA_KEYTYPE_FLOAT)
{
float nr;
float4get(nr,pos);
if (isnan(nr))
{
/* Replace NAN with zero */
bzero(key,length);
key+=length;
continue;
}
}
else if (type == HA_KEYTYPE_DOUBLE)
{
double nr;
float8get(nr,pos);
if (isnan(nr))
{
bzero(key,length);
key+=length;
continue;
}
}
pos+=length;
while (length--)
{
*key++ = *--pos;
}
continue;
}
FIX_LENGTH(cs, pos, length, char_length);
memcpy((uchar*) key, pos, char_length);
if (length > char_length)
my_ci_fill(cs, (char*) key+char_length, length-char_length, ' ');
key+= length;
}
_mi_dpointer(info,key,filepos);
DBUG_PRINT("exit",("keynr: %d",keynr));
DBUG_DUMP("key",(uchar*) start,(uint) (key-start)+keyseg->length);
DBUG_EXECUTE("key",
_mi_print_key(DBUG_FILE,info->s->keyinfo[keynr].seg,start,
(uint) (key-start)););
DBUG_RETURN((uint) (key-start)); /* Return keylength */
}
|
O3
|
c
|
mi_make_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r9
movq (%rdi), %rax
movq 0x218(%rax), %rax
movl %esi, %ecx
imulq $0x70, %rcx, %rcx
movzwl 0xa(%rax,%rcx), %r10d
movl %r10d, -0x44(%rbp)
btl $0xa, %r10d
jb 0x7b294
movq %rdi, -0x60(%rbp)
movq %r8, -0x68(%rbp)
addq %rcx, %rax
movq 0x28(%rax), %r15
movb 0x18(%r15), %cl
movq %rdx, -0x50(%rbp)
movq %rdx, %rdi
testb %cl, %cl
je 0x7b2aa
leaq -0x1(%r9), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movq %r9, -0x30(%rbp)
movzwl 0x14(%r15), %ebx
movq (%r15), %r13
movb 0x19(%r15), %dl
testb %dl, %dl
je 0x7aef9
movl 0xc(%r15), %esi
leaq 0x1(%rax), %rdi
testb %dl, (%r9,%rsi)
je 0x7aefe
movb $0x0, (%rax)
jmp 0x7b1f9
movq %rax, %rdi
jmp 0x7af01
movb $0x1, (%rax)
cmpb $0x0, -0x44(%rbp)
setns %al
testq %r13, %r13
setne %dl
andb %al, %dl
movq %rbx, %r12
cmpb $0x1, %dl
jne 0x7af30
movl 0x9c(%r13), %esi
movq %rbx, %r12
cmpl $0x2, %esi
jb 0x7af30
movl %ebx, %eax
xorl %edx, %edx
divl %esi
movl %eax, %r12d
movl 0x8(%r15), %eax
leaq (%r9,%rax), %r14
cmpb $0x13, %cl
jne 0x7afa2
movzbl 0x1b(%r15), %eax
testl %eax, %eax
je 0x7af86
movq %rdi, %r8
movzwl 0x10(%r15), %esi
movzbl 0x1a(%r15), %ecx
movzbl (%r9,%rsi), %edx
leal (%rcx,%rax), %edi
cmpl $0x9, %edi
jb 0x7af6b
movzbl 0x1(%r9,%rsi), %esi
shll $0x8, %esi
orl %esi, %edx
movq %r8, %rdi
shrl %cl, %edx
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %esi
notl %esi
andl %edx, %esi
movb %sil, (%r8)
incq %rdi
decq %rbx
movq %rbx, %r12
movq %rdi, %rbx
movq %r14, %rsi
movq %r12, %rdx
callq 0x29080
movq %rbx, %rdi
addq %r12, %rdi
jmp 0x7b1f5
movzwl 0x12(%r15), %edx
testb $0x1, %dl
jne 0x7b048
testb $0x8, %dl
jne 0x7b06f
testb $0x20, %dl
jne 0x7b100
testb $0x40, %dl
jne 0x7b211
cmpl %ebx, %r12d
jae 0x7aff8
leaq (%r14,%rbx), %rdx
movq 0xb8(%r13), %rax
movq %rbx, -0x40(%rbp)
movq %rdi, %rbx
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq *0x10(%rax)
movq %rbx, %rdi
movq -0x40(%rbp), %rbx
movq %rax, %r12
cmpq %rbx, %r12
movq %rbx, %rax
cmovbq %r12, %rbx
movq %rdi, -0x38(%rbp)
movq %r14, %rsi
movq %rax, %r14
movq %rbx, %rdx
callq 0x29080
cmpq %r14, %r12
movq -0x38(%rbp), %r12
jae 0x7b039
leaq (%r12,%rbx), %rsi
movq %r14, %rdx
subq %rbx, %rdx
movq 0xb8(%r13), %rax
movq %r13, %rdi
movl $0x20, %ecx
callq *0x78(%rax)
addq %r14, %r12
movq -0x30(%rbp), %r9
movq %r12, %rdi
jmp 0x7b1f9
cmpb $0x7, %cl
movq %rdi, -0x38(%rbp)
jne 0x7b088
movq %rbx, %rax
addq %r14, %rbx
testq %rax, %rax
je 0x7b06a
cmpb $0x20, (%r14)
jne 0x7b06a
incq %r14
cmpq %rbx, %r14
jb 0x7b05c
subq %r14, %rbx
jmp 0x7b09e
cmpb $0x1, 0x1a(%r15)
jne 0x7b174
movzbl (%r14), %eax
movl $0x1, %ecx
jmp 0x7b17d
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq *0x18(%rax)
movq %rax, %rbx
cmpq %r12, %rbx
jbe 0x7b0bd
leaq (%r14,%rbx), %rdx
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq *0x10(%rax)
movq %rax, %r12
movq -0x38(%rbp), %rcx
cmpq %rbx, %r12
cmovbq %r12, %rbx
cmpq $0xff, %rbx
jae 0x7b0d9
leaq 0x1(%rcx), %r12
movl %ebx, %eax
jmp 0x7b0e5
movb %bl, 0x2(%rcx)
movb %bh, 0x1(%rcx)
leaq 0x3(%rcx), %r12
movb $-0x1, %al
movb %al, (%rcx)
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x29080
addq %rbx, %r12
movq %r12, %rdi
jmp 0x7b1f5
movq %rdi, -0x38(%rbp)
movzbl 0x1a(%r15), %edi
movq %r14, %rsi
callq 0x78b75
movzbl 0x1a(%r15), %ecx
movq (%r14,%rcx), %rsi
movl %eax, %eax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
jbe 0x7b145
leaq (%rsi,%rbx), %rdx
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %rsi, %r14
movq %r12, %rcx
callq *0x10(%rax)
movq %r14, %rsi
movq %rax, %r12
movq -0x30(%rbp), %r9
movq -0x38(%rbp), %rdi
cmpq %rbx, %r12
cmovbq %r12, %rbx
cmpq $0xff, %rbx
jae 0x7b246
movb %bl, (%rdi)
incq %rdi
testq %rbx, %rbx
jne 0x7b253
jmp 0x7b1f9
movzwl (%r14), %eax
movl $0x2, %ecx
addq %rcx, %r14
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
jbe 0x7b1b4
leaq (%r14,%rbx), %rdx
movq 0xb8(%r13), %rax
movq %rbx, -0x40(%rbp)
movq %rdi, %rbx
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq *0x10(%rax)
movq %rbx, %rdi
movq -0x40(%rbp), %rbx
movq %rax, %r12
cmpq %rbx, %r12
cmovbq %r12, %rbx
cmpq $0xff, %rbx
jae 0x7b1d0
movq %rbx, %r12
leaq 0x1(%rdi), %rbx
movl %r12d, %eax
jmp 0x7b1df
movb %bl, 0x2(%rdi)
movb %bh, 0x1(%rdi)
movq %rbx, %r12
leaq 0x3(%rdi), %rbx
movb $-0x1, %al
movb %al, (%rdi)
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x29080
addq %r12, %rbx
movq %rbx, %rdi
movq -0x30(%rbp), %r9
movb 0x38(%r15), %cl
addq $0x20, %r15
movq %rdi, %rax
testb %cl, %cl
jne 0x7aed3
jmp 0x7b2aa
cmpb $0x6, %cl
je 0x7b26a
movzbl %cl, %ecx
cmpl $0x5, %ecx
jne 0x7b228
movss (%r14), %xmm0
ucomiss %xmm0, %xmm0
jp 0x7b275
testl %ebx, %ebx
je 0x7b1f9
addq -0x58(%rbp), %rax
movq %rdi, %rcx
leaq 0x1(%rcx), %rdi
movb (%rax,%rbx), %dl
movb %dl, (%rcx)
movq %rdi, %rcx
decq %rbx
jne 0x7b233
jmp 0x7b1f9
movb $-0x1, (%rdi)
movb %bl, 0x2(%rdi)
movb %bh, 0x1(%rdi)
addq $0x3, %rdi
movq %rdi, %r14
movq %rbx, %rdx
callq 0x29080
movq %r14, %rdi
movq -0x30(%rbp), %r9
addq %rbx, %rdi
jmp 0x7b1f9
movsd (%r14), %xmm0
ucomisd %xmm0, %xmm0
jnp 0x7b228
movq %rbx, %r14
movq %rdi, %rbx
xorl %esi, %esi
movq %r14, %rdx
callq 0x292c0
movq %rbx, %rdi
movq -0x30(%rbp), %r9
addq %r14, %rdi
jmp 0x7b1f9
movq %r9, %rcx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8e9cc
movq %rdi, %rbx
movq -0x60(%rbp), %rdi
movq %rbx, %rsi
movq -0x68(%rbp), %rdx
callq 0x852db
subl -0x50(%rbp), %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_mi_make_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r9, rcx
mov rax, [rdi]
mov rax, [rax+218h]
mov ecx, esi
imul rcx, 70h ; 'p'
movzx r10d, word ptr [rax+rcx+0Ah]
mov [rbp+var_44], r10d
bt r10d, 0Ah
jb loc_7B294
mov [rbp+var_60], rdi
mov [rbp+var_68], r8
add rax, rcx
mov r15, [rax+28h]
mov cl, [r15+18h]
mov [rbp+var_50], rdx
mov rdi, rdx
test cl, cl
jz loc_7B2AA
lea rax, [r9-1]
mov [rbp+var_58], rax
mov rax, [rbp+var_50]
mov [rbp+var_30], r9
loc_7AED3:
movzx ebx, word ptr [r15+14h]
mov r13, [r15]
mov dl, [r15+19h]
test dl, dl
jz short loc_7AEF9
mov esi, [r15+0Ch]
lea rdi, [rax+1]
test [r9+rsi], dl
jz short loc_7AEFE
mov byte ptr [rax], 0
jmp loc_7B1F9
loc_7AEF9:
mov rdi, rax
jmp short loc_7AF01
loc_7AEFE:
mov byte ptr [rax], 1
loc_7AF01:
cmp byte ptr [rbp+var_44], 0
setns al
test r13, r13
setnz dl
and dl, al
mov r12, rbx
cmp dl, 1
jnz short loc_7AF30
mov esi, [r13+9Ch]
mov r12, rbx
cmp esi, 2
jb short loc_7AF30
mov eax, ebx
xor edx, edx
div esi
mov r12d, eax
loc_7AF30:
mov eax, [r15+8]
lea r14, [r9+rax]
cmp cl, 13h
jnz short loc_7AFA2
movzx eax, byte ptr [r15+1Bh]
test eax, eax
jz short loc_7AF86
mov r8, rdi
movzx esi, word ptr [r15+10h]
movzx ecx, byte ptr [r15+1Ah]
movzx edx, byte ptr [r9+rsi]
lea edi, [rcx+rax]
cmp edi, 9
jb short loc_7AF6B
movzx esi, byte ptr [r9+rsi+1]
shl esi, 8
or edx, esi
loc_7AF6B:
mov rdi, r8
shr edx, cl
mov esi, 0FFFFFFFFh
mov ecx, eax
shl esi, cl
not esi
and esi, edx
mov [r8], sil
inc rdi
dec rbx
loc_7AF86:
mov r12, rbx
mov rbx, rdi
mov rsi, r14
mov rdx, r12
call _memcpy
mov rdi, rbx
add rdi, r12
jmp loc_7B1F5
loc_7AFA2:
movzx edx, word ptr [r15+12h]
test dl, 1
jnz loc_7B048
test dl, 8
jnz loc_7B06F
test dl, 20h
jnz loc_7B100
test dl, 40h
jnz loc_7B211
cmp r12d, ebx
jnb short loc_7AFF8
lea rdx, [r14+rbx]
mov rax, [r13+0B8h]
mov [rbp+var_40], rbx
mov rbx, rdi
mov rdi, r13
mov rsi, r14
mov rcx, r12
call qword ptr [rax+10h]
mov rdi, rbx
mov rbx, [rbp+var_40]
mov r12, rax
loc_7AFF8:
cmp r12, rbx
mov rax, rbx
cmovb rbx, r12
mov [rbp+var_38], rdi
mov rsi, r14
mov r14, rax
mov rdx, rbx
call _memcpy
cmp r12, r14
mov r12, [rbp+var_38]
jnb short loc_7B039
lea rsi, [r12+rbx]
mov rdx, r14
sub rdx, rbx
mov rax, [r13+0B8h]
mov rdi, r13
mov ecx, 20h ; ' '
call qword ptr [rax+78h]
loc_7B039:
add r12, r14
mov r9, [rbp+var_30]
mov rdi, r12
jmp loc_7B1F9
loc_7B048:
cmp cl, 7
mov [rbp+var_38], rdi
jnz short loc_7B088
mov rax, rbx
add rbx, r14
test rax, rax
jz short loc_7B06A
loc_7B05C:
cmp byte ptr [r14], 20h ; ' '
jnz short loc_7B06A
inc r14
cmp r14, rbx
jb short loc_7B05C
loc_7B06A:
sub rbx, r14
jmp short loc_7B09E
loc_7B06F:
cmp byte ptr [r15+1Ah], 1
jnz loc_7B174
movzx eax, byte ptr [r14]
mov ecx, 1
jmp loc_7B17D
loc_7B088:
mov rax, [r13+0B8h]
mov rdi, r13
mov rsi, r14
mov rdx, rbx
call qword ptr [rax+18h]
mov rbx, rax
loc_7B09E:
cmp rbx, r12
jbe short loc_7B0BD
lea rdx, [r14+rbx]
mov rax, [r13+0B8h]
mov rdi, r13
mov rsi, r14
mov rcx, r12
call qword ptr [rax+10h]
mov r12, rax
loc_7B0BD:
mov rcx, [rbp+var_38]
cmp r12, rbx
cmovb rbx, r12
cmp rbx, 0FFh
jnb short loc_7B0D9
lea r12, [rcx+1]
mov eax, ebx
jmp short loc_7B0E5
loc_7B0D9:
mov [rcx+2], bl
mov [rcx+1], bh
lea r12, [rcx+3]
mov al, 0FFh
loc_7B0E5:
mov [rcx], al
mov rdi, r12
mov rsi, r14
mov rdx, rbx
call _memcpy
add r12, rbx
mov rdi, r12
jmp loc_7B1F5
loc_7B100:
mov [rbp+var_38], rdi
movzx edi, byte ptr [r15+1Ah]
mov rsi, r14
call _mi_calc_blob_length
movzx ecx, byte ptr [r15+1Ah]
mov rsi, [r14+rcx]
mov eax, eax
cmp rax, rbx
cmovb rbx, rax
cmp rbx, r12
jbe short loc_7B145
lea rdx, [rsi+rbx]
mov rax, [r13+0B8h]
mov rdi, r13
mov r14, rsi
mov rcx, r12
call qword ptr [rax+10h]
mov rsi, r14
mov r12, rax
loc_7B145:
mov r9, [rbp+var_30]
mov rdi, [rbp+var_38]
cmp r12, rbx
cmovb rbx, r12
cmp rbx, 0FFh
jnb loc_7B246
mov [rdi], bl
inc rdi
test rbx, rbx
jnz loc_7B253
jmp loc_7B1F9
loc_7B174:
movzx eax, word ptr [r14]
mov ecx, 2
loc_7B17D:
add r14, rcx
cmp rax, rbx
cmovb rbx, rax
cmp rbx, r12
jbe short loc_7B1B4
lea rdx, [r14+rbx]
mov rax, [r13+0B8h]
mov [rbp+var_40], rbx
mov rbx, rdi
mov rdi, r13
mov rsi, r14
mov rcx, r12
call qword ptr [rax+10h]
mov rdi, rbx
mov rbx, [rbp+var_40]
mov r12, rax
loc_7B1B4:
cmp r12, rbx
cmovb rbx, r12
cmp rbx, 0FFh
jnb short loc_7B1D0
mov r12, rbx
lea rbx, [rdi+1]
mov eax, r12d
jmp short loc_7B1DF
loc_7B1D0:
mov [rdi+2], bl
mov [rdi+1], bh
mov r12, rbx
lea rbx, [rdi+3]
mov al, 0FFh
loc_7B1DF:
mov [rdi], al
mov rdi, rbx
mov rsi, r14
mov rdx, r12
call _memcpy
add rbx, r12
mov rdi, rbx
loc_7B1F5:
mov r9, [rbp+var_30]
loc_7B1F9:
mov cl, [r15+38h]
add r15, 20h ; ' '
mov rax, rdi
test cl, cl
jnz loc_7AED3
jmp loc_7B2AA
loc_7B211:
cmp cl, 6
jz short loc_7B26A
movzx ecx, cl
cmp ecx, 5
jnz short loc_7B228
movss xmm0, dword ptr [r14]
ucomiss xmm0, xmm0
jp short loc_7B275
loc_7B228:
test ebx, ebx
jz short loc_7B1F9
add rax, [rbp+var_58]
mov rcx, rdi
loc_7B233:
lea rdi, [rcx+1]
mov dl, [rax+rbx]
mov [rcx], dl
mov rcx, rdi
dec rbx
jnz short loc_7B233
jmp short loc_7B1F9
loc_7B246:
mov byte ptr [rdi], 0FFh
mov [rdi+2], bl
mov [rdi+1], bh
add rdi, 3
loc_7B253:
mov r14, rdi
mov rdx, rbx
call _memcpy
mov rdi, r14
mov r9, [rbp+var_30]
add rdi, rbx
jmp short loc_7B1F9
loc_7B26A:
movsd xmm0, qword ptr [r14]
ucomisd xmm0, xmm0
jnp short loc_7B228
loc_7B275:
mov r14, rbx
mov rbx, rdi
xor esi, esi
mov rdx, r14
call _memset
mov rdi, rbx
mov r9, [rbp+var_30]
add rdi, r14
jmp loc_7B1F9
loc_7B294:
mov rcx, r9
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp sp_make_key
loc_7B2AA:
mov rbx, rdi
mov rdi, [rbp+var_60]
mov rsi, rbx
mov rdx, [rbp+var_68]
call _mi_dpointer
sub ebx, dword ptr [rbp+var_50]
mov eax, ebx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long mi_make_key(long long a1, long long a2, char *a3, long long a4, long long a5)
{
long long v6; // rax
long long v7; // rcx
long long *v8; // r15
char *v9; // rdi
char *v10; // rax
unsigned long long v11; // rbx
long long v12; // r13
unsigned __int8 v13; // dl
unsigned long long v14; // r12
unsigned int v15; // esi
long long v16; // rax
_BYTE *v17; // r14
int v18; // eax
long long v19; // rsi
int v20; // ecx
unsigned int v21; // edx
__int16 v22; // dx
unsigned long long v23; // rax
_BYTE *v24; // rsi
unsigned long long v25; // r14
unsigned long long v26; // rax
_BYTE *v27; // rbx
unsigned long long v28; // rbx
unsigned long long v29; // rax
long long v30; // rcx
_BYTE *v31; // r12
char v32; // al
unsigned int v33; // eax
long long v34; // rsi
_BYTE *v35; // r14
unsigned long long v36; // r12
_BYTE *v37; // rbx
char v38; // al
long long v39; // rax
long long v43; // [rsp+18h] [rbp-58h]
int v44; // [rsp+20h] [rbp-50h]
__int16 v45; // [rsp+2Ch] [rbp-44h]
long long v46; // [rsp+40h] [rbp-30h]
v6 = *(_QWORD *)(*(_QWORD *)a1 + 536LL);
v7 = 112LL * (unsigned int)a2;
v45 = *(_WORD *)(v6 + v7 + 10);
if ( (v45 & 0x400) != 0 )
return sp_make_key(a1, a2, a3, a4);
v8 = *(long long **)(v7 + v6 + 40);
LOBYTE(v7) = *((_BYTE *)v8 + 24);
v44 = (int)a3;
v9 = a3;
if ( (_BYTE)v7 )
{
v43 = a4 - 1;
v10 = a3;
v46 = a4;
do
{
v11 = *((unsigned __int16 *)v8 + 10);
v12 = *v8;
v13 = *((_BYTE *)v8 + 25);
if ( v13 )
{
v9 = v10 + 1;
if ( (v13 & *(_BYTE *)(a4 + *((unsigned int *)v8 + 3))) != 0 )
{
*v10 = 0;
goto LABEL_66;
}
*v10 = 1;
}
else
{
v9 = v10;
}
v14 = v11;
if ( (v45 & 0x80u) == 0 && v12 != 0 )
{
v15 = *(_DWORD *)(v12 + 156);
v14 = v11;
if ( v15 >= 2 )
v14 = (unsigned int)v11 / v15;
}
v16 = *((unsigned int *)v8 + 2);
v17 = (_BYTE *)(a4 + v16);
if ( (_BYTE)v7 == 19 )
{
v18 = *((unsigned __int8 *)v8 + 27);
if ( *((_BYTE *)v8 + 27) )
{
v19 = *((unsigned __int16 *)v8 + 8);
v20 = *((unsigned __int8 *)v8 + 26);
v21 = *(unsigned __int8 *)(a4 + v19);
if ( (unsigned int)(v20 + v18) >= 9 )
v21 = *(unsigned __int16 *)(a4 + v19);
*v9++ = (v21 >> v20) & ~(-1 << v18);
--v11;
}
memcpy(v9, v17, v11);
v9 += v11;
LABEL_65:
a4 = v46;
goto LABEL_66;
}
v22 = *((_WORD *)v8 + 9);
if ( (v22 & 1) != 0 )
{
if ( (_BYTE)v7 == 7 )
{
v26 = v11;
v27 = &v17[v11];
if ( v26 )
{
do
{
if ( *v17 != 32 )
break;
++v17;
}
while ( v17 < v27 );
}
v28 = v27 - v17;
}
else
{
v28 = (*(long long ( **)(long long, _BYTE *, unsigned long long))(*(_QWORD *)(v12 + 184) + 24LL))(
v12,
v17,
v11);
}
if ( v28 > v14 )
v14 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(v12 + 184) + 16LL))(
v12,
v17,
&v17[v28],
v14);
if ( v14 < v28 )
v28 = v14;
if ( v28 >= 0xFF )
{
v9[2] = v28;
v9[1] = BYTE1(v28);
v31 = v9 + 3;
v32 = -1;
}
else
{
v31 = v9 + 1;
v32 = v28;
}
*v9 = v32;
memcpy(v31, v17, v28);
v9 = &v31[v28];
goto LABEL_65;
}
if ( (v22 & 8) != 0 )
{
if ( *((_BYTE *)v8 + 26) == 1 )
{
v29 = (unsigned __int8)*v17;
v30 = 1LL;
}
else
{
v29 = *(unsigned __int16 *)v17;
v30 = 2LL;
}
v35 = &v17[v30];
if ( v29 < v11 )
v11 = v29;
if ( v11 > v14 )
v14 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(v12 + 184) + 16LL))(
v12,
v35,
&v35[v11],
v14);
if ( v14 < v11 )
v11 = v14;
if ( v11 >= 0xFF )
{
v9[2] = v11;
v9[1] = BYTE1(v11);
v36 = v11;
v37 = v9 + 3;
v38 = -1;
}
else
{
v36 = v11;
v37 = v9 + 1;
v38 = v36;
}
*v9 = v38;
memcpy(v37, v35, v36);
v9 = &v37[v36];
goto LABEL_65;
}
if ( (v22 & 0x20) == 0 )
{
if ( (v22 & 0x40) != 0 )
{
if ( (_BYTE)v7 != 6 )
v7 = (unsigned __int8)v7;
if ( (_DWORD)v11 )
{
v39 = v43 + v16;
v7 = (long long)v9;
do
{
v9 = (char *)(v7 + 1);
*(_BYTE *)v7++ = *(_BYTE *)(v39 + v11--);
}
while ( v11 );
}
}
else
{
if ( (unsigned int)v14 < (unsigned int)v11 )
v14 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(v12 + 184) + 16LL))(
v12,
v17,
&v17[v11],
v14);
v23 = v11;
if ( v14 < v11 )
v11 = v14;
v24 = v17;
v25 = v23;
memcpy(v9, v24, v11);
if ( v14 < v25 )
(*(void ( **)(long long, char *, unsigned long long, long long))(*(_QWORD *)(v12 + 184) + 120LL))(
v12,
&v9[v11],
v25 - v11,
32LL);
a4 = v46;
v9 += v25;
}
goto LABEL_66;
}
v33 = mi_calc_blob_length(*((unsigned __int8 *)v8 + 26), (unsigned __int8 *)(a4 + v16));
v7 = *((unsigned __int8 *)v8 + 26);
v34 = *(_QWORD *)&v17[v7];
if ( v33 < v11 )
v11 = v33;
if ( v11 > v14 )
v14 = (*(long long ( **)(long long, long long, unsigned long long, unsigned long long))(*(_QWORD *)(v12 + 184)
+ 16LL))(
v12,
v34,
v34 + v11,
v14);
a4 = v46;
if ( v14 < v11 )
v11 = v14;
if ( v11 >= 0xFF )
{
*v9 = -1;
v9[2] = v11;
v9[1] = BYTE1(v11);
v9 += 3;
}
else
{
*v9++ = v11;
if ( !v11 )
goto LABEL_66;
}
memcpy(v9, v34, v11);
a4 = v46;
v9 += v11;
LABEL_66:
LOBYTE(v7) = *((_BYTE *)v8 + 56);
v8 += 4;
v10 = v9;
}
while ( (_BYTE)v7 );
}
mi_dpointer(a1, v9, a5, v7, a5);
return (unsigned int)((_DWORD)v9 - v44);
}
|
_mi_make_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R9,RCX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,ESI
IMUL RCX,RCX,0x70
MOVZX R10D,word ptr [RAX + RCX*0x1 + 0xa]
MOV dword ptr [RBP + -0x44],R10D
BT R10D,0xa
JC 0x0017b294
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x68],R8
ADD RAX,RCX
MOV R15,qword ptr [RAX + 0x28]
MOV CL,byte ptr [R15 + 0x18]
MOV qword ptr [RBP + -0x50],RDX
MOV RDI,RDX
TEST CL,CL
JZ 0x0017b2aa
LEA RAX,[R9 + -0x1]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x30],R9
LAB_0017aed3:
MOVZX EBX,word ptr [R15 + 0x14]
MOV R13,qword ptr [R15]
MOV DL,byte ptr [R15 + 0x19]
TEST DL,DL
JZ 0x0017aef9
MOV ESI,dword ptr [R15 + 0xc]
LEA RDI,[RAX + 0x1]
TEST byte ptr [R9 + RSI*0x1],DL
JZ 0x0017aefe
MOV byte ptr [RAX],0x0
JMP 0x0017b1f9
LAB_0017aef9:
MOV RDI,RAX
JMP 0x0017af01
LAB_0017aefe:
MOV byte ptr [RAX],0x1
LAB_0017af01:
CMP byte ptr [RBP + -0x44],0x0
SETNS AL
TEST R13,R13
SETNZ DL
AND DL,AL
MOV R12,RBX
CMP DL,0x1
JNZ 0x0017af30
MOV ESI,dword ptr [R13 + 0x9c]
MOV R12,RBX
CMP ESI,0x2
JC 0x0017af30
MOV EAX,EBX
XOR EDX,EDX
DIV ESI
MOV R12D,EAX
LAB_0017af30:
MOV EAX,dword ptr [R15 + 0x8]
LEA R14,[R9 + RAX*0x1]
CMP CL,0x13
JNZ 0x0017afa2
MOVZX EAX,byte ptr [R15 + 0x1b]
TEST EAX,EAX
JZ 0x0017af86
MOV R8,RDI
MOVZX ESI,word ptr [R15 + 0x10]
MOVZX ECX,byte ptr [R15 + 0x1a]
MOVZX EDX,byte ptr [R9 + RSI*0x1]
LEA EDI,[RCX + RAX*0x1]
CMP EDI,0x9
JC 0x0017af6b
MOVZX ESI,byte ptr [R9 + RSI*0x1 + 0x1]
SHL ESI,0x8
OR EDX,ESI
LAB_0017af6b:
MOV RDI,R8
SHR EDX,CL
MOV ESI,0xffffffff
MOV ECX,EAX
SHL ESI,CL
NOT ESI
AND ESI,EDX
MOV byte ptr [R8],SIL
INC RDI
DEC RBX
LAB_0017af86:
MOV R12,RBX
MOV RBX,RDI
MOV RSI,R14
MOV RDX,R12
CALL 0x00129080
MOV RDI,RBX
ADD RDI,R12
JMP 0x0017b1f5
LAB_0017afa2:
MOVZX EDX,word ptr [R15 + 0x12]
TEST DL,0x1
JNZ 0x0017b048
TEST DL,0x8
JNZ 0x0017b06f
TEST DL,0x20
JNZ 0x0017b100
TEST DL,0x40
JNZ 0x0017b211
CMP R12D,EBX
JNC 0x0017aff8
LEA RDX,[R14 + RBX*0x1]
MOV RAX,qword ptr [R13 + 0xb8]
MOV qword ptr [RBP + -0x40],RBX
MOV RBX,RDI
MOV RDI,R13
MOV RSI,R14
MOV RCX,R12
CALL qword ptr [RAX + 0x10]
MOV RDI,RBX
MOV RBX,qword ptr [RBP + -0x40]
MOV R12,RAX
LAB_0017aff8:
CMP R12,RBX
MOV RAX,RBX
CMOVC RBX,R12
MOV qword ptr [RBP + -0x38],RDI
MOV RSI,R14
MOV R14,RAX
MOV RDX,RBX
CALL 0x00129080
CMP R12,R14
MOV R12,qword ptr [RBP + -0x38]
JNC 0x0017b039
LEA RSI,[R12 + RBX*0x1]
MOV RDX,R14
SUB RDX,RBX
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV ECX,0x20
CALL qword ptr [RAX + 0x78]
LAB_0017b039:
ADD R12,R14
MOV R9,qword ptr [RBP + -0x30]
MOV RDI,R12
JMP 0x0017b1f9
LAB_0017b048:
CMP CL,0x7
MOV qword ptr [RBP + -0x38],RDI
JNZ 0x0017b088
MOV RAX,RBX
ADD RBX,R14
TEST RAX,RAX
JZ 0x0017b06a
LAB_0017b05c:
CMP byte ptr [R14],0x20
JNZ 0x0017b06a
INC R14
CMP R14,RBX
JC 0x0017b05c
LAB_0017b06a:
SUB RBX,R14
JMP 0x0017b09e
LAB_0017b06f:
CMP byte ptr [R15 + 0x1a],0x1
JNZ 0x0017b174
MOVZX EAX,byte ptr [R14]
MOV ECX,0x1
JMP 0x0017b17d
LAB_0017b088:
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV RSI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0x18]
MOV RBX,RAX
LAB_0017b09e:
CMP RBX,R12
JBE 0x0017b0bd
LEA RDX,[R14 + RBX*0x1]
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV RSI,R14
MOV RCX,R12
CALL qword ptr [RAX + 0x10]
MOV R12,RAX
LAB_0017b0bd:
MOV RCX,qword ptr [RBP + -0x38]
CMP R12,RBX
CMOVC RBX,R12
CMP RBX,0xff
JNC 0x0017b0d9
LEA R12,[RCX + 0x1]
MOV EAX,EBX
JMP 0x0017b0e5
LAB_0017b0d9:
MOV byte ptr [RCX + 0x2],BL
MOV byte ptr [RCX + 0x1],BH
LEA R12,[RCX + 0x3]
MOV AL,0xff
LAB_0017b0e5:
MOV byte ptr [RCX],AL
MOV RDI,R12
MOV RSI,R14
MOV RDX,RBX
CALL 0x00129080
ADD R12,RBX
MOV RDI,R12
JMP 0x0017b1f5
LAB_0017b100:
MOV qword ptr [RBP + -0x38],RDI
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,R14
CALL 0x00178b75
MOVZX ECX,byte ptr [R15 + 0x1a]
MOV RSI,qword ptr [R14 + RCX*0x1]
MOV EAX,EAX
CMP RAX,RBX
CMOVC RBX,RAX
CMP RBX,R12
JBE 0x0017b145
LEA RDX,[RSI + RBX*0x1]
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV R14,RSI
MOV RCX,R12
CALL qword ptr [RAX + 0x10]
MOV RSI,R14
MOV R12,RAX
LAB_0017b145:
MOV R9,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x38]
CMP R12,RBX
CMOVC RBX,R12
CMP RBX,0xff
JNC 0x0017b246
MOV byte ptr [RDI],BL
INC RDI
TEST RBX,RBX
JNZ 0x0017b253
JMP 0x0017b1f9
LAB_0017b174:
MOVZX EAX,word ptr [R14]
MOV ECX,0x2
LAB_0017b17d:
ADD R14,RCX
CMP RAX,RBX
CMOVC RBX,RAX
CMP RBX,R12
JBE 0x0017b1b4
LEA RDX,[R14 + RBX*0x1]
MOV RAX,qword ptr [R13 + 0xb8]
MOV qword ptr [RBP + -0x40],RBX
MOV RBX,RDI
MOV RDI,R13
MOV RSI,R14
MOV RCX,R12
CALL qword ptr [RAX + 0x10]
MOV RDI,RBX
MOV RBX,qword ptr [RBP + -0x40]
MOV R12,RAX
LAB_0017b1b4:
CMP R12,RBX
CMOVC RBX,R12
CMP RBX,0xff
JNC 0x0017b1d0
MOV R12,RBX
LEA RBX,[RDI + 0x1]
MOV EAX,R12D
JMP 0x0017b1df
LAB_0017b1d0:
MOV byte ptr [RDI + 0x2],BL
MOV byte ptr [RDI + 0x1],BH
MOV R12,RBX
LEA RBX,[RDI + 0x3]
MOV AL,0xff
LAB_0017b1df:
MOV byte ptr [RDI],AL
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R12
CALL 0x00129080
ADD RBX,R12
MOV RDI,RBX
LAB_0017b1f5:
MOV R9,qword ptr [RBP + -0x30]
LAB_0017b1f9:
MOV CL,byte ptr [R15 + 0x38]
ADD R15,0x20
MOV RAX,RDI
TEST CL,CL
JNZ 0x0017aed3
JMP 0x0017b2aa
LAB_0017b211:
CMP CL,0x6
JZ 0x0017b26a
MOVZX ECX,CL
CMP ECX,0x5
JNZ 0x0017b228
MOVSS XMM0,dword ptr [R14]
UCOMISS XMM0,XMM0
JP 0x0017b275
LAB_0017b228:
TEST EBX,EBX
JZ 0x0017b1f9
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,RDI
LAB_0017b233:
LEA RDI,[RCX + 0x1]
MOV DL,byte ptr [RAX + RBX*0x1]
MOV byte ptr [RCX],DL
MOV RCX,RDI
DEC RBX
JNZ 0x0017b233
JMP 0x0017b1f9
LAB_0017b246:
MOV byte ptr [RDI],0xff
MOV byte ptr [RDI + 0x2],BL
MOV byte ptr [RDI + 0x1],BH
ADD RDI,0x3
LAB_0017b253:
MOV R14,RDI
MOV RDX,RBX
CALL 0x00129080
MOV RDI,R14
MOV R9,qword ptr [RBP + -0x30]
ADD RDI,RBX
JMP 0x0017b1f9
LAB_0017b26a:
MOVSD XMM0,qword ptr [R14]
UCOMISD XMM0,XMM0
JNP 0x0017b228
LAB_0017b275:
MOV R14,RBX
MOV RBX,RDI
XOR ESI,ESI
MOV RDX,R14
CALL 0x001292c0
MOV RDI,RBX
MOV R9,qword ptr [RBP + -0x30]
ADD RDI,R14
JMP 0x0017b1f9
LAB_0017b294:
MOV RCX,R9
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018e9cc
LAB_0017b2aa:
MOV RBX,RDI
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x68]
CALL 0x001852db
SUB EBX,dword ptr [RBP + -0x50]
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong _mi_make_key(long *param_1,ulong param_2,byte *param_3,long param_4,int8 param_5)
{
byte bVar1;
ushort uVar2;
ushort uVar3;
ushort uVar4;
byte bVar5;
ulong uVar6;
ulong uVar7;
char cVar8;
long lVar9;
long lVar10;
byte *pbVar11;
uint uVar12;
ulong uVar13;
double *pdVar14;
byte *__dest;
double *__src;
void *pvVar15;
long *plVar16;
int local_58;
char local_4c;
lVar9 = (param_2 & 0xffffffff) * 0x70;
uVar2 = *(ushort *)(*(long *)(*param_1 + 0x218) + 10 + lVar9);
if ((uVar2 >> 10 & 1) != 0) {
uVar13 = sp_make_key();
return uVar13;
}
plVar16 = *(long **)(*(long *)(*param_1 + 0x218) + lVar9 + 0x28);
cVar8 = (char)plVar16[3];
__dest = param_3;
if (cVar8 != '\0') {
do {
uVar3 = *(ushort *)((long)plVar16 + 0x14);
uVar13 = (ulong)uVar3;
lVar9 = *plVar16;
if (*(byte *)((long)plVar16 + 0x19) == 0) {
LAB_0017af01:
local_4c = (char)uVar2;
uVar6 = uVar13;
if ((lVar9 != 0 && -1 < local_4c) && (1 < *(uint *)(lVar9 + 0x9c))) {
uVar6 = uVar13 / *(uint *)(lVar9 + 0x9c);
}
uVar12 = *(uint *)(plVar16 + 1);
__src = (double *)(param_4 + (ulong)uVar12);
if (cVar8 == '\x13') {
bVar5 = *(byte *)((long)plVar16 + 0x1b);
if (bVar5 != 0) {
bVar1 = *(byte *)(param_4 + (ulong)*(ushort *)(plVar16 + 2));
uVar12 = (uint)bVar1;
if (8 < (uint)*(byte *)((long)plVar16 + 0x1a) + (uint)bVar5) {
uVar12 = (uint)CONCAT11(*(int1 *)(param_4 + 1 + (ulong)*(ushort *)(plVar16 + 2))
,bVar1);
}
*__dest = ~(byte)(-1 << (bVar5 & 0x1f)) &
(byte)(uVar12 >> (*(byte *)((long)plVar16 + 0x1a) & 0x1f));
__dest = __dest + 1;
uVar13 = uVar13 - 1;
}
memcpy(__dest,__src,uVar13);
__dest = __dest + uVar13;
}
else {
uVar4 = *(ushort *)((long)plVar16 + 0x12);
if ((uVar4 & 1) == 0) {
if ((uVar4 & 8) == 0) {
if ((uVar4 & 0x20) == 0) {
if ((uVar4 & 0x40) == 0) {
if ((uint)uVar6 < (uint)uVar3) {
uVar6 = (**(code **)(*(long *)(lVar9 + 0xb8) + 0x10))
(lVar9,__src,(long)__src + uVar13,uVar6);
}
uVar7 = uVar13;
if (uVar6 < uVar13) {
uVar7 = uVar6;
}
memcpy(__dest,__src,uVar7);
if (uVar6 < uVar13) {
(**(code **)(*(long *)(lVar9 + 0xb8) + 0x78))
(lVar9,__dest + uVar7,uVar13 - uVar7,0x20);
}
__dest = __dest + uVar13;
}
else {
if (cVar8 == '\x06') {
if (NAN(*__src)) goto LAB_0017b275;
}
else if ((cVar8 == '\x05') && (NAN(*(float *)__src))) {
LAB_0017b275:
memset(__dest,0,uVar13);
__dest = __dest + uVar13;
goto LAB_0017b1f9;
}
if (uVar3 != 0) {
pbVar11 = __dest;
do {
__dest = pbVar11 + 1;
*pbVar11 = *(byte *)((ulong)uVar12 + param_4 + -1 + uVar13);
uVar13 = uVar13 - 1;
pbVar11 = __dest;
} while (uVar13 != 0);
}
}
}
else {
uVar12 = _mi_calc_blob_length(*(int1 *)((long)plVar16 + 0x1a),__src);
pvVar15 = *(void **)((long)__src + (ulong)*(byte *)((long)plVar16 + 0x1a));
if (uVar12 < uVar13) {
uVar13 = (ulong)uVar12;
}
if (uVar6 < uVar13) {
uVar6 = (**(code **)(*(long *)(lVar9 + 0xb8) + 0x10))
(lVar9,pvVar15,(long)pvVar15 + uVar13,uVar6);
}
if (uVar6 < uVar13) {
uVar13 = uVar6;
}
if (uVar13 < 0xff) {
*__dest = (byte)uVar13;
__dest = __dest + 1;
if (uVar13 == 0) goto LAB_0017b1f9;
}
else {
*__dest = 0xff;
__dest[2] = (byte)uVar13;
__dest[1] = (byte)(uVar13 >> 8);
__dest = __dest + 3;
}
memcpy(__dest,pvVar15,uVar13);
__dest = __dest + uVar13;
}
}
else {
if (*(char *)((long)plVar16 + 0x1a) == '\x01') {
uVar7 = (ulong)*(byte *)__src;
lVar10 = 1;
}
else {
uVar7 = (ulong)*(ushort *)__src;
lVar10 = 2;
}
pvVar15 = (void *)((long)__src + lVar10);
if (uVar7 < uVar13) {
uVar13 = uVar7;
}
if (uVar6 < uVar13) {
uVar6 = (**(code **)(*(long *)(lVar9 + 0xb8) + 0x10))
(lVar9,pvVar15,(long)pvVar15 + uVar13,uVar6);
}
if (uVar6 < uVar13) {
uVar13 = uVar6;
}
bVar5 = (byte)uVar13;
if (uVar13 < 0xff) {
pbVar11 = __dest + 1;
}
else {
__dest[2] = bVar5;
__dest[1] = (byte)(uVar13 >> 8);
pbVar11 = __dest + 3;
bVar5 = 0xff;
}
*__dest = bVar5;
memcpy(pbVar11,pvVar15,uVar13);
__dest = pbVar11 + uVar13;
}
}
else {
if (cVar8 == '\a') {
pdVar14 = (double *)(uVar13 + (long)__src);
if (uVar13 != 0) {
do {
if (*(char *)__src != ' ') break;
__src = (double *)((long)__src + 1);
} while (__src < pdVar14);
}
uVar13 = (long)pdVar14 - (long)__src;
}
else {
uVar13 = (**(code **)(*(long *)(lVar9 + 0xb8) + 0x18))(lVar9,__src,uVar13);
}
if (uVar6 < uVar13) {
uVar6 = (**(code **)(*(long *)(lVar9 + 0xb8) + 0x10))
(lVar9,__src,(long)__src + uVar13,uVar6);
}
if (uVar6 < uVar13) {
uVar13 = uVar6;
}
bVar5 = (byte)uVar13;
if (uVar13 < 0xff) {
pbVar11 = __dest + 1;
}
else {
__dest[2] = bVar5;
__dest[1] = (byte)(uVar13 >> 8);
pbVar11 = __dest + 3;
bVar5 = 0xff;
}
*__dest = bVar5;
memcpy(pbVar11,__src,uVar13);
__dest = pbVar11 + uVar13;
}
}
}
else {
if ((*(byte *)(param_4 + (ulong)*(uint *)((long)plVar16 + 0xc)) &
*(byte *)((long)plVar16 + 0x19)) == 0) {
*__dest = 1;
__dest = __dest + 1;
goto LAB_0017af01;
}
*__dest = 0;
__dest = __dest + 1;
}
LAB_0017b1f9:
cVar8 = (char)plVar16[7];
plVar16 = plVar16 + 4;
} while (cVar8 != '\0');
}
_mi_dpointer(param_1,__dest,param_5);
local_58 = (int)param_3;
return (ulong)(uint)((int)__dest - local_58);
}
|
|
16,716
|
ch2x
|
eloqsql/strings/ctype-uca.c
|
static int ch2x(int ch)
{
if (ch >= '0' && ch <= '9')
return ch - '0';
if (ch >= 'a' && ch <= 'f')
return 10 + ch - 'a';
if (ch >= 'A' && ch <= 'F')
return 10 + ch - 'A';
return -1;
}
|
O0
|
c
|
ch2x:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x30, -0x8(%rbp)
jl 0x85d6e
cmpl $0x39, -0x8(%rbp)
jg 0x85d6e
movl -0x8(%rbp), %eax
subl $0x30, %eax
movl %eax, -0x4(%rbp)
jmp 0x85da9
cmpl $0x61, -0x8(%rbp)
jl 0x85d88
cmpl $0x66, -0x8(%rbp)
jg 0x85d88
movl -0x8(%rbp), %eax
addl $0xa, %eax
subl $0x61, %eax
movl %eax, -0x4(%rbp)
jmp 0x85da9
cmpl $0x41, -0x8(%rbp)
jl 0x85da2
cmpl $0x46, -0x8(%rbp)
jg 0x85da2
movl -0x8(%rbp), %eax
addl $0xa, %eax
subl $0x41, %eax
movl %eax, -0x4(%rbp)
jmp 0x85da9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
|
ch2x:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
cmp [rbp+var_8], 30h ; '0'
jl short loc_85D6E
cmp [rbp+var_8], 39h ; '9'
jg short loc_85D6E
mov eax, [rbp+var_8]
sub eax, 30h ; '0'
mov [rbp+var_4], eax
jmp short loc_85DA9
loc_85D6E:
cmp [rbp+var_8], 61h ; 'a'
jl short loc_85D88
cmp [rbp+var_8], 66h ; 'f'
jg short loc_85D88
mov eax, [rbp+var_8]
add eax, 0Ah
sub eax, 61h ; 'a'
mov [rbp+var_4], eax
jmp short loc_85DA9
loc_85D88:
cmp [rbp+var_8], 41h ; 'A'
jl short loc_85DA2
cmp [rbp+var_8], 46h ; 'F'
jg short loc_85DA2
mov eax, [rbp+var_8]
add eax, 0Ah
sub eax, 41h ; 'A'
mov [rbp+var_4], eax
jmp short loc_85DA9
loc_85DA2:
mov [rbp+var_4], 0FFFFFFFFh
loc_85DA9:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long ch2x(int a1)
{
if ( a1 < 48 || a1 > 57 )
{
if ( a1 < 97 || a1 > 102 )
{
if ( a1 < 65 || a1 > 70 )
return (unsigned int)-1;
else
return (unsigned int)(a1 - 55);
}
else
{
return (unsigned int)(a1 - 87);
}
}
else
{
return (unsigned int)(a1 - 48);
}
}
|
ch2x:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
CMP dword ptr [RBP + -0x8],0x30
JL 0x00185d6e
CMP dword ptr [RBP + -0x8],0x39
JG 0x00185d6e
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x30
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00185da9
LAB_00185d6e:
CMP dword ptr [RBP + -0x8],0x61
JL 0x00185d88
CMP dword ptr [RBP + -0x8],0x66
JG 0x00185d88
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0xa
SUB EAX,0x61
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00185da9
LAB_00185d88:
CMP dword ptr [RBP + -0x8],0x41
JL 0x00185da2
CMP dword ptr [RBP + -0x8],0x46
JG 0x00185da2
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0xa
SUB EAX,0x41
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00185da9
LAB_00185da2:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_00185da9:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int ch2x(int param_1)
{
int4 local_c;
if ((param_1 < 0x30) || (0x39 < param_1)) {
if ((param_1 < 0x61) || (0x66 < param_1)) {
if ((param_1 < 0x41) || (0x46 < param_1)) {
local_c = -1;
}
else {
local_c = param_1 + -0x37;
}
}
else {
local_c = param_1 + -0x57;
}
}
else {
local_c = param_1 + -0x30;
}
return local_c;
}
|
|
16,717
|
ma_once_init_block_record
|
eloqsql/storage/maria/ma_blockrec.c
|
my_bool _ma_once_init_block_record(MARIA_SHARE *share, File data_file)
{
my_bool res;
pgcache_page_no_t last_page;
/*
First calculate the max file length with can have with a pointer of size
rec_reflength.
The 'rec_reflength - 1' is because one byte is used for row
position withing the page.
The /2 comes from _ma_transaction_recpos_to_keypos() where we use
the lowest bit to mark if there is a transid following the rownr.
*/
last_page= ((ulonglong) 1 << ((share->base.rec_reflength-1)*8))/2;
if (!last_page) /* Overflow; set max size */
last_page= ~(pgcache_page_no_t) 0;
res= _ma_bitmap_init(share, data_file, &last_page);
share->base.max_data_file_length= _ma_safe_mul(last_page + 1,
share->block_size);
#if SIZEOF_OFF_T == 4
set_if_smaller(share->base.max_data_file_length, INT_MAX32);
#endif
return res;
}
|
O3
|
c
|
ma_once_init_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x3e0(%rdi), %eax
leal -0x8(,%rax,8), %ecx
movl $0x1, %eax
shlq %cl, %rax
shrq %rax
xorl %edx, %edx
cmpl $0x1, %ecx
sbbq %rdx, %rdx
orq %rax, %rdx
leaq -0x20(%rbp), %r14
movq %rdx, (%r14)
movq %r14, %rdx
callq 0x3f6c8
movl %eax, %r15d
movq (%r14), %rdi
incq %rdi
movl 0x7bc(%rbx), %esi
callq 0x544c5
movq %rax, 0x368(%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_ma_once_init_block_record:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+3E0h]
lea ecx, ds:0FFFFFFFFFFFFFFF8h[rax*8]
mov eax, 1
shl rax, cl
shr rax, 1
xor edx, edx
cmp ecx, 1
sbb rdx, rdx
or rdx, rax
lea r14, [rbp+var_20]
mov [r14], rdx
mov rdx, r14
call _ma_bitmap_init
mov r15d, eax
mov rdi, [r14]
inc rdi
mov esi, [rbx+7BCh]
call _ma_safe_mul
mov [rbx+368h], rax
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long ma_once_init_block_record(long long a1, int a2)
{
unsigned long long v2; // rax
unsigned int v3; // r15d
unsigned long long v5[4]; // [rsp+0h] [rbp-20h] BYREF
v5[0] = v2;
v5[0] = ((unsigned long long)(1LL << (8 * *(_BYTE *)(a1 + 992) - 8)) >> 1) | -(long long)(8 * *(_DWORD *)(a1 + 992) == 8);
v3 = ma_bitmap_init(a1, a2, v5);
*(_QWORD *)(a1 + 872) = ma_safe_mul(v5[0] + 1, *(unsigned int *)(a1 + 1980));
return v3;
}
|
_ma_once_init_block_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x3e0]
LEA ECX,[-0x8 + RAX*0x8]
MOV EAX,0x1
SHL RAX,CL
SHR RAX,0x1
XOR EDX,EDX
CMP ECX,0x1
SBB RDX,RDX
OR RDX,RAX
LEA R14,[RBP + -0x20]
MOV qword ptr [R14],RDX
MOV RDX,R14
CALL 0x0013f6c8
MOV R15D,EAX
MOV RDI,qword ptr [R14]
INC RDI
MOV ESI,dword ptr [RBX + 0x7bc]
CALL 0x001544c5
MOV qword ptr [RBX + 0x368],RAX
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 _ma_once_init_block_record(long param_1,int8 param_2)
{
int iVar1;
int4 uVar2;
int8 uVar3;
ulong local_28;
iVar1 = *(int *)(param_1 + 0x3e0) * 8 + -8;
local_28 = -(ulong)(iVar1 == 0) | (ulong)(1L << ((byte)iVar1 & 0x3f)) >> 1;
uVar2 = _ma_bitmap_init(param_1,param_2,&local_28);
uVar3 = _ma_safe_mul(local_28 + 1,*(int4 *)(param_1 + 0x7bc));
*(int8 *)(param_1 + 0x368) = uVar3;
return uVar2;
}
|
|
16,718
|
binding_system_get_parent_scope
|
tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c
|
uint64_t binding_system_get_parent_scope(BindingSystem* system, uint64_t scope_id) {
assert(system != NULL);
// Search for scope
for (size_t i = 0; i < system->scope_stack.count; i++) {
if (system->scope_stack.ids[i] == scope_id) {
// Found scope
return system->scope_stack.parent_ids[i];
}
}
// Scope not found
return 0;
}
|
O0
|
c
|
binding_system_get_parent_scope:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x53f9
jmp 0x5418
leaq 0x119cf(%rip), %rdi # 0x16dcf
leaq 0x119d7(%rip), %rsi # 0x16dde
movl $0xc0, %edx
leaq 0x11b6b(%rip), %rcx # 0x16f7e
callq 0x1120
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xa0(%rcx), %rax
jae 0x5473
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x18(%rbp), %rax
jne 0x5463
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
jmp 0x547b
jmp 0x5465
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x5420
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
binding_system_get_parent_scope:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_10], 0
jz short loc_53F9
jmp short loc_5418
loc_53F9:
lea rdi, aSystemNull; "system != NULL"
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0C0h
lea rcx, aUint64TBinding_1; "uint64_t binding_system_get_parent_scop"...
call ___assert_fail
loc_5418:
mov [rbp+var_20], 0
loc_5420:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp rax, [rcx+0A0h]
jnb short loc_5473
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov rcx, [rbp+var_20]
mov rax, [rax+rcx*8]
cmp rax, [rbp+var_18]
jnz short loc_5463
mov rax, [rbp+var_10]
mov rax, [rax+88h]
mov rcx, [rbp+var_20]
mov rax, [rax+rcx*8]
mov [rbp+var_8], rax
jmp short loc_547B
loc_5463:
jmp short $+2
loc_5465:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_5420
loc_5473:
mov [rbp+var_8], 0
loc_547B:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
long long binding_system_get_parent_scope(_QWORD *a1, long long a2)
{
unsigned long long i; // [rsp+0h] [rbp-20h]
if ( !a1 )
__assert_fail(
"system != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c",
192LL,
"uint64_t binding_system_get_parent_scope(BindingSystem *, uint64_t)");
for ( i = 0LL; i < a1[20]; ++i )
{
if ( *(_QWORD *)(a1[16] + 8 * i) == a2 )
return *(_QWORD *)(a1[17] + 8 * i);
}
return 0LL;
}
|
binding_system_get_parent_scope:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001053f9
JMP 0x00105418
LAB_001053f9:
LEA RDI,[0x116dcf]
LEA RSI,[0x116dde]
MOV EDX,0xc0
LEA RCX,[0x116f7e]
CALL 0x00101120
LAB_00105418:
MOV qword ptr [RBP + -0x20],0x0
LAB_00105420:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0xa0]
JNC 0x00105473
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x00105463
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x88]
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0010547b
LAB_00105463:
JMP 0x00105465
LAB_00105465:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00105420
LAB_00105473:
MOV qword ptr [RBP + -0x8],0x0
LAB_0010547b:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int8 binding_system_get_parent_scope(long param_1,long param_2)
{
ulong local_28;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("system != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c"
,0xc0,"uint64_t binding_system_get_parent_scope(BindingSystem *, uint64_t)");
}
local_28 = 0;
while( true ) {
if (*(ulong *)(param_1 + 0xa0) <= local_28) {
return 0;
}
if (*(long *)(*(long *)(param_1 + 0x80) + local_28 * 8) == param_2) break;
local_28 = local_28 + 1;
}
return *(int8 *)(*(long *)(param_1 + 0x88) + local_28 * 8);
}
|
|
16,719
|
ma_apply_redo_insert_row_head_or_tail
|
eloqsql/storage/maria/ma_blockrec.c
|
uint _ma_apply_redo_insert_row_head_or_tail(MARIA_HA *info, LSN lsn,
uint page_type,
my_bool new_page,
const uchar *header,
const uchar *data,
size_t data_length)
{
MARIA_SHARE *share= info->s;
pgcache_page_no_t page;
uint rownr, empty_space;
uint block_size= share->block_size;
uint rec_offset;
uchar *buff, *dir;
uint result;
MARIA_PINNED_PAGE page_link;
enum pagecache_page_lock lock_method;
enum pagecache_page_pin pin_method;
my_off_t end_of_page;
uint error;
DBUG_ENTER("_ma_apply_redo_insert_row_head_or_tail");
page= page_korr(header);
rownr= dirpos_korr(header + PAGE_STORE_SIZE);
DBUG_PRINT("enter", ("rowid: %lu page: %lu rownr: %u data_length: %u",
(ulong) ma_recordpos(page, rownr),
(ulong) page, rownr, (uint) data_length));
share->state.changed|= (STATE_CHANGED | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
end_of_page= (page + 1) * share->block_size;
if (end_of_page > share->state.state.data_file_length)
{
DBUG_PRINT("info", ("Enlarging data file from %lu to %lu",
(ulong) share->state.state.data_file_length,
(ulong) end_of_page));
/*
New page at end of file. Note that the test above is also positive if
data_file_length is not a multiple of block_size (system crashed while
writing the last page): in this case we just extend the last page and
fill it entirely with zeroes, then the REDO will put correct data on
it.
*/
lock_method= PAGECACHE_LOCK_WRITE;
pin_method= PAGECACHE_PIN;
DBUG_ASSERT(rownr == 0 && new_page);
if (rownr != 0 || !new_page)
goto crashed_file;
buff= info->keyread_buff;
info->keyread_buff_used= 1;
make_empty_page(info, buff, page_type, 1);
empty_space= (block_size - PAGE_OVERHEAD_SIZE(share));
rec_offset= PAGE_HEADER_SIZE(share);
dir= buff+ block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE;
}
else
{
lock_method= PAGECACHE_LOCK_LEFT_WRITELOCKED;
pin_method= PAGECACHE_PIN_LEFT_PINNED;
share->pagecache->readwrite_flags&= ~MY_WME;
share->silence_encryption_errors= 1;
buff= pagecache_read(share->pagecache, &info->dfile,
page, 0, 0,
PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE,
&page_link.link);
share->pagecache->readwrite_flags= share->pagecache->org_readwrite_flags;
share->silence_encryption_errors= 0;
if (!buff)
{
/* Skip errors when reading outside of file and uninitialized pages */
if (!new_page || (my_errno != HA_ERR_FILE_TOO_SHORT &&
my_errno != HA_ERR_WRONG_CRC &&
my_errno != HA_ERR_DECRYPTION_FAILED))
{
DBUG_PRINT("error", ("Error %d when reading page", (int) my_errno));
goto err;
}
/* Create new page */
buff= pagecache_block_link_to_buffer(page_link.link);
buff[PAGE_TYPE_OFFSET]= UNALLOCATED_PAGE;
}
else if (lsn_korr(buff) >= lsn) /* Test if already applied */
{
check_skipped_lsn(info, lsn_korr(buff), 1, page);
/* Fix bitmap, just in case */
empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET);
if (!enough_free_entries_on_page(share, buff))
empty_space= 0; /* Page is full */
if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE, empty_space))
goto err;
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
DBUG_RETURN(0);
}
if (((uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != page_type))
{
/*
This is a page that has been freed before and now should be
changed to new type.
*/
if (!new_page)
{
DBUG_PRINT("error",
("Found page of wrong type: %u, should have been %u",
(uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK),
page_type));
goto crashed_file;
}
make_empty_page(info, buff, page_type, 0);
empty_space= block_size - PAGE_HEADER_SIZE(share) - PAGE_SUFFIX_SIZE;
(void) extend_directory(info, buff, block_size, 0, rownr, &empty_space,
page_type == HEAD_PAGE);
rec_offset= PAGE_HEADER_SIZE(share);
dir= dir_entry_pos(buff, block_size, rownr);
empty_space+= uint2korr(dir+2);
}
else
{
uint max_entry= (uint) buff[DIR_COUNT_OFFSET];
uint length;
DBUG_ASSERT(!new_page);
dir= dir_entry_pos(buff, block_size, rownr);
empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET);
if (max_entry <= rownr)
{
/* Add directory entry first in directory and data last on page */
if (extend_directory(info, buff, block_size, max_entry, rownr,
&empty_space, page_type == HEAD_PAGE))
goto crashed_file;
}
if (extend_area_on_page(info, buff, dir, rownr,
(uint) data_length, &empty_space,
&rec_offset, &length, page_type == HEAD_PAGE))
goto crashed_file;
}
}
/* Copy data */
int2store(dir+2, data_length);
memcpy(buff + rec_offset, data, data_length);
empty_space-= (uint) data_length;
int2store(buff + EMPTY_SPACE_OFFSET, empty_space);
/* Fix bitmap */
if (!enough_free_entries_on_page(share, buff))
empty_space= 0; /* Page is full */
if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE, empty_space))
goto err;
/*
If page was not read before, write it but keep it pinned.
We don't update its LSN When we have processed all REDOs for this page
in the current REDO's group, we will stamp page with UNDO's LSN
(if we stamped it now, a next REDO, in
this group, for this page, would be skipped) and unpin then.
*/
result= 0;
if (lock_method == PAGECACHE_LOCK_WRITE &&
pagecache_write(share->pagecache,
&info->dfile, page, 0,
buff, PAGECACHE_PLAIN_PAGE,
lock_method, pin_method,
PAGECACHE_WRITE_DELAY, &page_link.link,
LSN_IMPOSSIBLE))
result= my_errno;
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&info->pinned_pages, (void*) &page_link);
/*
Data page and bitmap page are in place, we can update data_file_length in
case we extended the file. We could not do it earlier: bitmap code tests
data_file_length to know if it has to create a new page or not.
*/
set_if_bigger(share->state.state.data_file_length, end_of_page);
DBUG_RETURN(result);
crashed_file:
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
err:
error= my_errno;
if (lock_method == PAGECACHE_LOCK_LEFT_WRITELOCKED)
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
_ma_mark_file_crashed(share);
DBUG_ASSERT(!maria_assert_if_crashed_table); /* catch recovery error early */
DBUG_RETURN((my_errno= error));
}
|
O3
|
c
|
ma_apply_redo_insert_row_head_or_tail:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %r12d
movq %rsi, %r14
movq (%rdi), %rbx
movl 0x7bc(%rbx), %r13d
movl (%r8), %eax
movzbl 0x4(%r8), %ecx
shlq $0x20, %rcx
leaq (%rcx,%rax), %r10
movzbl 0x5(%r8), %r11d
orl $0x181, 0x170(%rbx) # imm = 0x181
leaq (%rcx,%rax), %rsi
incq %rsi
imulq %r13, %rsi
movq 0x40(%rbx), %r8
cmpq %r8, %rsi
jbe 0x50497
testl %r11d, %r11d
setne %al
testb %r12b, %r12b
sete %cl
movl $0x4, %r14d
orb %al, %cl
jne 0x5084c
movq %r9, -0x70(%rbp)
movq %r8, -0x68(%rbp)
movq %r10, -0x60(%rbp)
movq %rsi, -0x58(%rbp)
movq 0x380(%rdi), %r15
movb $0x1, 0x685(%rdi)
movq %rdi, -0x38(%rbp)
movq %r15, %rsi
movl %edx, -0x30(%rbp)
movl $0x1, %ecx
callq 0x508de
movl 0xc18(%rbx), %eax
movl %r13d, %ecx
subl %eax, %ecx
addl $-0x14, %ecx
movl %ecx, -0x2c(%rbp)
addl $0xc, %eax
movl %eax, -0x3c(%rbp)
addq %r15, %r13
addq $-0x8, %r13
movl $0x4, -0x48(%rbp)
movl $0x2, %eax
movq %rax, -0x50(%rbp)
jmp 0x50743
movq %r11, -0x48(%rbp)
movq %r9, -0x70(%rbp)
movq %r8, -0x68(%rbp)
movl %edx, -0x30(%rbp)
movq %rsi, -0x58(%rbp)
movq 0x600(%rbx), %rax
movl $0xffffffef, %ecx # imm = 0xFFFFFFEF
andq %rcx, 0x198(%rax)
movb $0x1, 0x7ec(%rbx)
movq 0x600(%rbx), %rcx
movq %rdi, -0x38(%rbp)
leaq 0x470(%rdi), %rsi
leaq -0x88(%rbp), %rax
movq %rcx, %rdi
movq %r10, -0x60(%rbp)
movq %r10, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq $0x4
callq 0x3e012
addq $0x10, %rsp
movq %rax, %r15
movq 0x600(%rbx), %rax
movq 0x1a0(%rax), %rcx
movq %rcx, 0x198(%rax)
movb $0x0, 0x7ec(%rbx)
testq %r15, %r15
je 0x50550
movzwl (%r15), %eax
shlq $0x20, %rax
movzbl 0x2(%r15), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x3(%r15), %esi
orq %rcx, %rsi
cmpq %r14, %rsi
jge 0x50658
movzbl 0x7(%r15), %eax
andl $0x7, %eax
jmp 0x50599
testb %r12b, %r12b
je 0x506a6
callq 0xa8156
cmpl $0xaf, (%rax)
je 0x50584
callq 0xa8156
cmpl $0xb0, (%rax)
je 0x50584
callq 0xa8156
cmpl $0xc0, (%rax)
jne 0x506a6
movq -0x88(%rbp), %rdi
callq 0x404f5
movq %rax, %r15
movb $0x0, 0x7(%rax)
xorl %eax, %eax
movl -0x30(%rbp), %edx
cmpl %edx, %eax
movq -0x38(%rbp), %rdi
jne 0x506b3
movzbl 0x8(%r15), %ecx
movzwl 0xa(%r15), %eax
movl %eax, -0x2c(%rbp)
movq -0x48(%rbp), %r14
cmpb %r14b, %cl
ja 0x505f0
xorl %eax, %eax
cmpl $0x1, %edx
sete %al
subq $0x8, %rsp
leaq -0x2c(%rbp), %r9
movq %r15, %rsi
movl %r13d, %edx
movl %r14d, %r8d
pushq %rax
callq 0x50974
movl -0x30(%rbp), %edx
movq -0x38(%rbp), %rdi
addq $0x10, %rsp
testb %al, %al
jne 0x50846
addq %r15, %r13
leal (,%r14,4), %eax
subq %rax, %r13
addq $-0x8, %r13
xorl %eax, %eax
cmpl $0x1, %edx
sete %al
subq $0x8, %rsp
leaq -0x8c(%rbp), %r10
leaq -0x3c(%rbp), %r11
leaq -0x2c(%rbp), %r9
movq %r15, %rsi
movq %r13, %rdx
movl %r14d, %ecx
movq 0x10(%rbp), %r8
pushq %rax
pushq %r10
pushq %r11
callq 0x50aea
movq -0x38(%rbp), %rdi
addq $0x20, %rsp
testb %al, %al
jne 0x50846
movl $0x2, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
jmp 0x50743
movq -0x38(%rbp), %rdi
movl $0x1, %edx
movq -0x60(%rbp), %r13
movq %r13, %rcx
callq 0x38c21
movzwl 0xa(%r15), %r14d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4d456
xorl %r12d, %r12d
testb %al, %al
cmovel %r12d, %r14d
xorl %edx, %edx
cmpl $0x1, -0x30(%rbp)
sete %dl
movq -0x38(%rbp), %rdi
movq %r13, %rsi
movl %r14d, %ecx
callq 0x576cf
testb %al, %al
je 0x508b1
callq 0xa8156
movl (%rax), %r12d
jmp 0x50864
testb %r12b, %r12b
je 0x50846
movq $0x0, -0x50(%rbp)
movq %rdi, %r12
movq %r15, %rsi
xorl %ecx, %ecx
movl %edx, %r14d
callq 0x508de
movl %r13d, %eax
subl 0xc18(%rbx), %eax
addl $-0x10, %eax
leaq -0x2c(%rbp), %rcx
movl %eax, (%rcx)
movq %rcx, %r9
xorl %eax, %eax
cmpl $0x1, %r14d
sete %al
subq $0x8, %rsp
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %ecx, %ecx
movq -0x48(%rbp), %r14
movl %r14d, %r8d
movq %r9, %r12
pushq %rax
callq 0x50974
addq $0x10, %rsp
movl 0xc18(%rbx), %eax
addl $0xc, %eax
movl %eax, -0x3c(%rbp)
addq %r15, %r13
leal (,%r14,4), %eax
subq %rax, %r13
movzwl -0x6(%r13), %eax
addq $-0x8, %r13
addl %eax, (%r12)
movl $0x2, -0x48(%rbp)
movq 0x10(%rbp), %r12
movw %r12w, 0x2(%r13)
movl -0x3c(%rbp), %edi
addq %r15, %rdi
movq -0x70(%rbp), %rsi
movq %r12, %rdx
callq 0x2a0a0
movl -0x2c(%rbp), %r14d
subl %r12d, %r14d
movl %r14d, -0x2c(%rbp)
movw %r14w, 0xa(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4d456
testb %al, %al
jne 0x50787
movl $0x0, -0x2c(%rbp)
xorl %r14d, %r14d
xorl %edx, %edx
cmpl $0x1, -0x30(%rbp)
sete %dl
movq -0x38(%rbp), %r12
movq %r12, %rdi
movq -0x60(%rbp), %r13
movq %r13, %rsi
movl %r14d, %ecx
callq 0x576cf
testb %al, %al
movl -0x48(%rbp), %r14d
jne 0x50856
movq %r12, %r14
xorl %r12d, %r12d
movq -0x68(%rbp), %rax
cmpq %rax, -0x58(%rbp)
jbe 0x50815
movq 0x600(%rbx), %rdi
leaq 0x470(%r14), %rsi
movl 0x80(%rdi), %eax
subq $0x8, %rsp
xorl %r12d, %r12d
leaq -0x88(%rbp), %r10
movq %r13, %rdx
xorl %ecx, %ecx
movq %r15, %r8
movl $0x1, %r9d
pushq %rax
pushq %r12
pushq $0x0
pushq %r10
pushq %r12
pushq -0x50(%rbp)
pushq $0x4
callq 0x3f476
addq $0x40, %rsp
testb %al, %al
je 0x50815
callq 0xa8156
movl (%rax), %r12d
leaq -0x88(%rbp), %rsi
movl $0x6, 0x8(%rsi)
movb $0x1, 0x10(%rsi)
movq %r14, %rdi
addq $0x2e8, %rdi # imm = 0x2E8
callq 0x94922
movq -0x58(%rbp), %rax
cmpq %rax, 0x40(%rbx)
jae 0x5089f
movq %rax, 0x40(%rbx)
jmp 0x5089f
movl $0x2, %r14d
movl $0x7f, %esi
callq 0x42bb4
callq 0xa8156
movl (%rax), %r12d
cmpl $0x2, %r14d
jne 0x5088f
movq 0x600(%rbx), %rdi
movq -0x88(%rbp), %rsi
xorl %eax, %eax
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
callq 0x3dd2d
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x45b32
callq 0xa8156
movl %r12d, (%rax)
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x600(%rbx), %rdi
movq -0x88(%rbp), %rsi
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r12
callq 0x3dd2d
addq $0x10, %rsp
jmp 0x5089f
|
_ma_apply_redo_insert_row_head_or_tail:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12d, ecx
mov r14, rsi
mov rbx, [rdi]
mov r13d, [rbx+7BCh]
mov eax, [r8]
movzx ecx, byte ptr [r8+4]
shl rcx, 20h
lea r10, [rcx+rax]
movzx r11d, byte ptr [r8+5]
or dword ptr [rbx+170h], 181h
lea rsi, [rcx+rax]
inc rsi
imul rsi, r13
mov r8, [rbx+40h]
cmp rsi, r8
jbe short loc_50497
test r11d, r11d
setnz al
test r12b, r12b
setz cl
mov r14d, 4
or cl, al
jnz loc_5084C
mov [rbp+var_70], r9
mov [rbp+var_68], r8
mov [rbp+var_60], r10
mov [rbp+var_58], rsi
mov r15, [rdi+380h]
mov byte ptr [rdi+685h], 1
mov [rbp+var_38], rdi
mov rsi, r15
mov [rbp+var_30], edx
mov ecx, 1
call make_empty_page
mov eax, [rbx+0C18h]
mov ecx, r13d
sub ecx, eax
add ecx, 0FFFFFFECh
mov [rbp+var_2C], ecx
add eax, 0Ch
mov [rbp+var_3C], eax
add r13, r15
add r13, 0FFFFFFFFFFFFFFF8h
mov dword ptr [rbp+var_48], 4
mov eax, 2
mov [rbp+var_50], rax
jmp loc_50743
loc_50497:
mov [rbp+var_48], r11
mov [rbp+var_70], r9
mov [rbp+var_68], r8
mov [rbp+var_30], edx
mov [rbp+var_58], rsi
mov rax, [rbx+600h]
mov ecx, 0FFFFFFEFh
and [rax+198h], rcx
mov byte ptr [rbx+7ECh], 1
mov rcx, [rbx+600h]
mov [rbp+var_38], rdi
lea rsi, [rdi+470h]
lea rax, [rbp+var_88]
mov rdi, rcx
mov [rbp+var_60], r10
mov rdx, r10
xor ecx, ecx
xor r8d, r8d
mov r9d, 1
push rax
push 4
call pagecache_read
add rsp, 10h
mov r15, rax
mov rax, [rbx+600h]
mov rcx, [rax+1A0h]
mov [rax+198h], rcx
mov byte ptr [rbx+7ECh], 0
test r15, r15
jz short loc_50550
movzx eax, word ptr [r15]
shl rax, 20h
movzx ecx, byte ptr [r15+2]
shl rcx, 30h
or rcx, rax
mov esi, [r15+3]
or rsi, rcx
cmp rsi, r14
jge loc_50658
movzx eax, byte ptr [r15+7]
and eax, 7
jmp short loc_50599
loc_50550:
test r12b, r12b
jz loc_506A6
call _my_thread_var
cmp dword ptr [rax], 0AFh
jz short loc_50584
call _my_thread_var
cmp dword ptr [rax], 0B0h
jz short loc_50584
call _my_thread_var
cmp dword ptr [rax], 0C0h
jnz loc_506A6
loc_50584:
mov rdi, [rbp+var_88]
call pagecache_block_link_to_buffer
mov r15, rax
mov byte ptr [rax+7], 0
xor eax, eax
loc_50599:
mov edx, [rbp+var_30]
cmp eax, edx
mov rdi, [rbp+var_38]
jnz loc_506B3
movzx ecx, byte ptr [r15+8]
movzx eax, word ptr [r15+0Ah]
mov [rbp+var_2C], eax
mov r14, [rbp+var_48]
cmp cl, r14b
ja short loc_505F0
xor eax, eax
cmp edx, 1
setz al
sub rsp, 8
lea r9, [rbp+var_2C]
mov rsi, r15
mov edx, r13d
mov r8d, r14d
push rax
call extend_directory
mov edx, [rbp+var_30]
mov rdi, [rbp+var_38]
add rsp, 10h
test al, al
jnz loc_50846
loc_505F0:
add r13, r15
lea eax, ds:0[r14*4]
sub r13, rax
add r13, 0FFFFFFFFFFFFFFF8h
xor eax, eax
cmp edx, 1
setz al
sub rsp, 8
lea r10, [rbp+var_8C]
lea r11, [rbp+var_3C]
lea r9, [rbp+var_2C]
mov rsi, r15
mov rdx, r13
mov ecx, r14d
mov r8, [rbp+arg_0]
push rax
push r10
push r11
call extend_area_on_page
mov rdi, [rbp+var_38]
add rsp, 20h
test al, al
jnz loc_50846
mov dword ptr [rbp+var_48], 2
mov [rbp+var_50], 0
jmp loc_50743
loc_50658:
mov rdi, [rbp+var_38]
mov edx, 1
mov r13, [rbp+var_60]
mov rcx, r13
call check_skipped_lsn
movzx r14d, word ptr [r15+0Ah]
mov rdi, rbx
mov rsi, r15
call enough_free_entries_on_page
xor r12d, r12d
test al, al
cmovz r14d, r12d
xor edx, edx
cmp [rbp+var_30], 1
setz dl
mov rdi, [rbp+var_38]
mov rsi, r13
mov ecx, r14d
call _ma_bitmap_set
test al, al
jz loc_508B1
loc_506A6:
call _my_thread_var
mov r12d, [rax]
jmp loc_50864
loc_506B3:
test r12b, r12b
jz loc_50846
mov [rbp+var_50], 0
mov r12, rdi
mov rsi, r15
xor ecx, ecx
mov r14d, edx
call make_empty_page
mov eax, r13d
sub eax, [rbx+0C18h]
add eax, 0FFFFFFF0h
lea rcx, [rbp+var_2C]
mov [rcx], eax
mov r9, rcx
xor eax, eax
cmp r14d, 1
setz al
sub rsp, 8
mov rdi, r12
mov rsi, r15
mov edx, r13d
xor ecx, ecx
mov r14, [rbp+var_48]
mov r8d, r14d
mov r12, r9
push rax
call extend_directory
add rsp, 10h
mov eax, [rbx+0C18h]
add eax, 0Ch
mov [rbp+var_3C], eax
add r13, r15
lea eax, ds:0[r14*4]
sub r13, rax
movzx eax, word ptr [r13-6]
add r13, 0FFFFFFFFFFFFFFF8h
add [r12], eax
mov dword ptr [rbp+var_48], 2
loc_50743:
mov r12, [rbp+arg_0]
mov [r13+2], r12w
mov edi, [rbp+var_3C]
add rdi, r15
mov rsi, [rbp+var_70]
mov rdx, r12
call _memcpy
mov r14d, [rbp+var_2C]
sub r14d, r12d
mov [rbp+var_2C], r14d
mov [r15+0Ah], r14w
mov rdi, rbx
mov rsi, r15
call enough_free_entries_on_page
test al, al
jnz short loc_50787
mov [rbp+var_2C], 0
xor r14d, r14d
loc_50787:
xor edx, edx
cmp [rbp+var_30], 1
setz dl
mov r12, [rbp+var_38]
mov rdi, r12
mov r13, [rbp+var_60]
mov rsi, r13
mov ecx, r14d
call _ma_bitmap_set
test al, al
mov r14d, dword ptr [rbp+var_48]
jnz loc_50856
mov r14, r12
xor r12d, r12d
mov rax, [rbp+var_68]
cmp [rbp+var_58], rax
jbe short loc_50815
mov rdi, [rbx+600h]
lea rsi, [r14+470h]
mov eax, [rdi+80h]
sub rsp, 8
xor r12d, r12d
lea r10, [rbp+var_88]
mov rdx, r13
xor ecx, ecx
mov r8, r15
mov r9d, 1
push rax
push r12
push 0
push r10
push r12
push [rbp+var_50]
push 4
call pagecache_write_part
add rsp, 40h
test al, al
jz short loc_50815
call _my_thread_var
mov r12d, [rax]
loc_50815:
lea rsi, [rbp+var_88]
mov dword ptr [rsi+8], 6
mov byte ptr [rsi+10h], 1
mov rdi, r14
add rdi, 2E8h
call insert_dynamic
mov rax, [rbp+var_58]
cmp [rbx+40h], rax
jnb short loc_5089F
mov [rbx+40h], rax
jmp short loc_5089F
loc_50846:
mov r14d, 2
loc_5084C:
mov esi, 7Fh
call _ma_set_fatal_error
loc_50856:
call _my_thread_var
mov r12d, [rax]
cmp r14d, 2
jnz short loc_5088F
loc_50864:
mov rdi, [rbx+600h]
mov rsi, [rbp+var_88]
xor eax, eax
mov edx, 6
mov ecx, 3
xor r8d, r8d
xor r9d, r9d
push rax
push rax
call pagecache_unlock_by_link
add rsp, 10h
loc_5088F:
mov rdi, rbx
call _ma_mark_file_crashed
call _my_thread_var
mov [rax], r12d
loc_5089F:
mov eax, r12d
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_508B1:
mov rdi, [rbx+600h]
mov rsi, [rbp+var_88]
mov edx, 6
mov ecx, 3
xor r8d, r8d
xor r9d, r9d
push r12
push r12
call pagecache_unlock_by_link
add rsp, 10h
jmp short loc_5089F
|
long long ma_apply_redo_insert_row_head_or_tail(
_DWORD *a1,
long long a2,
long long a3,
char a4,
unsigned int *a5,
long long a6,
long long a7)
{
long long v9; // rbx
long long v10; // r13
long long v11; // rax
unsigned long long v12; // rcx
long long v13; // r10
long long v14; // r11
unsigned long long v15; // rsi
unsigned long long v16; // r8
int v17; // r14d
unsigned __int16 *v18; // r15
int v19; // eax
long long v20; // r13
long long v21; // rcx
long long v22; // rsi
long long v23; // rdi
long long v24; // rsi
int v25; // eax
int v26; // ecx
int v27; // r14d
char v28; // al
char v29; // al
long long v30; // r13
unsigned int v31; // r14d
unsigned int v32; // r12d
unsigned int v33; // r14d
char v34; // al
int v35; // r14d
char *v36; // r13
int v37; // eax
unsigned int v38; // r14d
long long v39; // r12
long long v40; // r13
char v41; // al
long long v42; // r14
__m128i *v43; // rdi
char v45[4]; // [rsp+4h] [rbp-8Ch] BYREF
long long v46; // [rsp+8h] [rbp-88h] BYREF
int v47; // [rsp+10h] [rbp-80h]
char v48; // [rsp+18h] [rbp-78h]
long long v49; // [rsp+20h] [rbp-70h]
unsigned long long v50; // [rsp+28h] [rbp-68h]
long long v51; // [rsp+30h] [rbp-60h]
unsigned long long v52; // [rsp+38h] [rbp-58h]
long long v53; // [rsp+40h] [rbp-50h]
long long v54; // [rsp+48h] [rbp-48h]
unsigned int v55; // [rsp+54h] [rbp-3Ch] BYREF
_DWORD *v56; // [rsp+58h] [rbp-38h]
unsigned int v57; // [rsp+60h] [rbp-30h]
_DWORD v58[11]; // [rsp+64h] [rbp-2Ch] BYREF
v9 = *(_QWORD *)a1;
v10 = *(unsigned int *)(*(_QWORD *)a1 + 1980LL);
v11 = *a5;
v12 = (unsigned long long)*((unsigned __int8 *)a5 + 4) << 32;
v13 = v12 + v11;
v14 = *((unsigned __int8 *)a5 + 5);
*(_DWORD *)(v9 + 368) |= 0x181u;
v15 = v10 * (v12 + v11 + 1);
v16 = *(_QWORD *)(v9 + 64);
if ( v15 > v16 )
{
v17 = 4;
LOBYTE(v12) = (_DWORD)v14 != 0 || a4 == 0;
if ( !(_BYTE)v12 )
{
v49 = a6;
v50 = v16;
v51 = v13;
v52 = v15;
v18 = (unsigned __int16 *)*((_QWORD *)a1 + 112);
*((_BYTE *)a1 + 1669) = 1;
v56 = a1;
v57 = a3;
make_empty_page(a1, v18, a3, 1LL);
v19 = *(_DWORD *)(v9 + 3096);
v58[0] = v10 - v19 - 20;
v55 = v19 + 12;
v20 = (long long)v18 + v10 - 8;
LODWORD(v54) = 4;
v53 = 2LL;
goto LABEL_23;
}
LABEL_32:
ma_set_fatal_error(a1, 127, a3, v12, v16, a6);
goto LABEL_33;
}
v54 = v14;
v49 = a6;
v50 = v16;
v57 = a3;
v52 = v10 * (v12 + v11 + 1);
*(_QWORD *)(*(_QWORD *)(v9 + 1536) + 408LL) &= 0xFFFFFFEFuLL;
*(_BYTE *)(v9 + 2028) = 1;
v21 = *(_QWORD *)(v9 + 1536);
v56 = a1;
v22 = (long long)(a1 + 284);
v23 = v21;
v51 = v13;
v18 = (unsigned __int16 *)pagecache_read(v21, v22, v13, 0, 0LL, 1, 4u, &v46);
*(_QWORD *)(*(_QWORD *)(v9 + 1536) + 408LL) = *(_QWORD *)(*(_QWORD *)(v9 + 1536) + 416LL);
*(_BYTE *)(v9 + 2028) = 0;
if ( v18 )
{
v12 = ((unsigned long long)*v18 << 32) | ((unsigned long long)*((unsigned __int8 *)v18 + 2) << 48);
v24 = v12 | *(unsigned int *)((char *)v18 + 3);
if ( v24 < a2 )
{
v25 = *((_BYTE *)v18 + 7) & 7;
goto LABEL_12;
}
v30 = v51;
check_skipped_lsn((long long)v56, v24, 1, v51);
v31 = v18[5];
v32 = 0;
if ( !enough_free_entries_on_page(v9, v18) )
v31 = 0;
v23 = (long long)v56;
if ( !(unsigned __int8)ma_bitmap_set(v56, v30, v57 == 1, v31) )
{
pagecache_unlock_by_link(*(_QWORD *)(v9 + 1536), v46, 6, 3, 0LL, 0LL, 0);
return v32;
}
LABEL_20:
v32 = *(_DWORD *)my_thread_var(v23);
goto LABEL_34;
}
if ( !a4
|| *(_DWORD *)my_thread_var(v23) != 175
&& *(_DWORD *)my_thread_var(v23) != 176
&& *(_DWORD *)my_thread_var(v23) != 192 )
{
goto LABEL_20;
}
v18 = (unsigned __int16 *)pagecache_block_link_to_buffer(v46);
*((_BYTE *)v18 + 7) = 0;
v25 = 0;
LABEL_12:
a3 = v57;
a1 = v56;
if ( v25 == v57 )
{
v26 = *((unsigned __int8 *)v18 + 8);
v58[0] = v18[5];
v27 = v54;
if ( (unsigned __int8)v26 > (unsigned __int8)v54
|| (v28 = extend_directory((_DWORD)v56, (_DWORD)v18, v10, v26, v54, (unsigned int)v58, v57 == 1),
a3 = v57,
a1 = v56,
!v28) )
{
v20 = (long long)v18 + v10 - (unsigned int)(4 * v27) - 8;
v29 = extend_area_on_page(
(_DWORD)a1,
(_DWORD)v18,
v20,
v27,
a7,
(unsigned int)v58,
(long long)&v55,
(long long)v45,
(_DWORD)a3 == 1);
a1 = v56;
if ( !v29 )
{
LODWORD(v54) = 2;
v53 = 0LL;
goto LABEL_23;
}
}
LABEL_31:
v17 = 2;
goto LABEL_32;
}
if ( !a4 )
goto LABEL_31;
v53 = 0LL;
v33 = v57;
make_empty_page(v56, v18, v57, 0LL);
v58[0] = v10 - *(_DWORD *)(v9 + 3096) - 16;
v34 = v33 == 1;
v35 = v54;
extend_directory((_DWORD)a1, (_DWORD)v18, v10, 0, v54, (unsigned int)v58, v34);
v55 = *(_DWORD *)(v9 + 3096) + 12;
v36 = (char *)v18 + v10 - (unsigned int)(4 * v35);
v37 = *((unsigned __int16 *)v36 - 3);
v20 = (long long)(v36 - 8);
v58[0] += v37;
LODWORD(v54) = 2;
LABEL_23:
*(_WORD *)(v20 + 2) = a7;
memcpy((char *)v18 + v55, v49, a7);
v38 = v58[0] - a7;
v58[0] = v38;
v18[5] = v38;
if ( !enough_free_entries_on_page(v9, v18) )
{
v58[0] = 0;
v38 = 0;
}
v39 = (long long)v56;
a1 = v56;
v40 = v51;
v41 = ma_bitmap_set(v56, v51, v57 == 1, v38);
v17 = v54;
if ( v41 )
{
LABEL_33:
v32 = *(_DWORD *)my_thread_var(a1);
if ( v17 != 2 )
{
LABEL_35:
ma_mark_file_crashed(v9);
*(_DWORD *)my_thread_var(v9) = v32;
return v32;
}
LABEL_34:
pagecache_unlock_by_link(*(_QWORD *)(v9 + 1536), v46, 6, 3, 0LL, 0LL, 0);
goto LABEL_35;
}
v42 = v39;
v32 = 0;
if ( v52 > v50 )
{
v43 = *(__m128i **)(v9 + 1536);
v32 = 0;
if ( (unsigned __int8)pagecache_write_part(
v43,
(char *)(v42 + 1136),
v40,
0,
(char *)v18,
1,
4u,
v53,
0,
&v46,
0LL,
0,
v43[8].m128i_u32[0]) )
v32 = *(_DWORD *)my_thread_var(v43);
}
v47 = 6;
v48 = 1;
insert_dynamic(v42 + 744, &v46);
if ( *(_QWORD *)(v9 + 64) < v52 )
*(_QWORD *)(v9 + 64) = v52;
return v32;
}
|
_ma_apply_redo_insert_row_head_or_tail:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12D,ECX
MOV R14,RSI
MOV RBX,qword ptr [RDI]
MOV R13D,dword ptr [RBX + 0x7bc]
MOV EAX,dword ptr [R8]
MOVZX ECX,byte ptr [R8 + 0x4]
SHL RCX,0x20
LEA R10,[RCX + RAX*0x1]
MOVZX R11D,byte ptr [R8 + 0x5]
OR dword ptr [RBX + 0x170],0x181
LEA RSI,[RCX + RAX*0x1]
INC RSI
IMUL RSI,R13
MOV R8,qword ptr [RBX + 0x40]
CMP RSI,R8
JBE 0x00150497
TEST R11D,R11D
SETNZ AL
TEST R12B,R12B
SETZ CL
MOV R14D,0x4
OR CL,AL
JNZ 0x0015084c
MOV qword ptr [RBP + -0x70],R9
MOV qword ptr [RBP + -0x68],R8
MOV qword ptr [RBP + -0x60],R10
MOV qword ptr [RBP + -0x58],RSI
MOV R15,qword ptr [RDI + 0x380]
MOV byte ptr [RDI + 0x685],0x1
MOV qword ptr [RBP + -0x38],RDI
MOV RSI,R15
MOV dword ptr [RBP + -0x30],EDX
MOV ECX,0x1
CALL 0x001508de
MOV EAX,dword ptr [RBX + 0xc18]
MOV ECX,R13D
SUB ECX,EAX
ADD ECX,-0x14
MOV dword ptr [RBP + -0x2c],ECX
ADD EAX,0xc
MOV dword ptr [RBP + -0x3c],EAX
ADD R13,R15
ADD R13,-0x8
MOV dword ptr [RBP + -0x48],0x4
MOV EAX,0x2
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00150743
LAB_00150497:
MOV qword ptr [RBP + -0x48],R11
MOV qword ptr [RBP + -0x70],R9
MOV qword ptr [RBP + -0x68],R8
MOV dword ptr [RBP + -0x30],EDX
MOV qword ptr [RBP + -0x58],RSI
MOV RAX,qword ptr [RBX + 0x600]
MOV ECX,0xffffffef
AND qword ptr [RAX + 0x198],RCX
MOV byte ptr [RBX + 0x7ec],0x1
MOV RCX,qword ptr [RBX + 0x600]
MOV qword ptr [RBP + -0x38],RDI
LEA RSI,[RDI + 0x470]
LEA RAX,[RBP + -0x88]
MOV RDI,RCX
MOV qword ptr [RBP + -0x60],R10
MOV RDX,R10
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x1
PUSH RAX
PUSH 0x4
CALL 0x0013e012
ADD RSP,0x10
MOV R15,RAX
MOV RAX,qword ptr [RBX + 0x600]
MOV RCX,qword ptr [RAX + 0x1a0]
MOV qword ptr [RAX + 0x198],RCX
MOV byte ptr [RBX + 0x7ec],0x0
TEST R15,R15
JZ 0x00150550
MOVZX EAX,word ptr [R15]
SHL RAX,0x20
MOVZX ECX,byte ptr [R15 + 0x2]
SHL RCX,0x30
OR RCX,RAX
MOV ESI,dword ptr [R15 + 0x3]
OR RSI,RCX
CMP RSI,R14
JGE 0x00150658
MOVZX EAX,byte ptr [R15 + 0x7]
AND EAX,0x7
JMP 0x00150599
LAB_00150550:
TEST R12B,R12B
JZ 0x001506a6
CALL 0x001a8156
CMP dword ptr [RAX],0xaf
JZ 0x00150584
CALL 0x001a8156
CMP dword ptr [RAX],0xb0
JZ 0x00150584
CALL 0x001a8156
CMP dword ptr [RAX],0xc0
JNZ 0x001506a6
LAB_00150584:
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x001404f5
MOV R15,RAX
MOV byte ptr [RAX + 0x7],0x0
XOR EAX,EAX
LAB_00150599:
MOV EDX,dword ptr [RBP + -0x30]
CMP EAX,EDX
MOV RDI,qword ptr [RBP + -0x38]
JNZ 0x001506b3
MOVZX ECX,byte ptr [R15 + 0x8]
MOVZX EAX,word ptr [R15 + 0xa]
MOV dword ptr [RBP + -0x2c],EAX
MOV R14,qword ptr [RBP + -0x48]
CMP CL,R14B
JA 0x001505f0
XOR EAX,EAX
CMP EDX,0x1
SETZ AL
SUB RSP,0x8
LEA R9,[RBP + -0x2c]
MOV RSI,R15
MOV EDX,R13D
MOV R8D,R14D
PUSH RAX
CALL 0x00150974
MOV EDX,dword ptr [RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x38]
ADD RSP,0x10
TEST AL,AL
JNZ 0x00150846
LAB_001505f0:
ADD R13,R15
LEA EAX,[R14*0x4]
SUB R13,RAX
ADD R13,-0x8
XOR EAX,EAX
CMP EDX,0x1
SETZ AL
SUB RSP,0x8
LEA R10,[RBP + -0x8c]
LEA R11,[RBP + -0x3c]
LEA R9,[RBP + -0x2c]
MOV RSI,R15
MOV RDX,R13
MOV ECX,R14D
MOV R8,qword ptr [RBP + 0x10]
PUSH RAX
PUSH R10
PUSH R11
CALL 0x00150aea
MOV RDI,qword ptr [RBP + -0x38]
ADD RSP,0x20
TEST AL,AL
JNZ 0x00150846
MOV dword ptr [RBP + -0x48],0x2
MOV qword ptr [RBP + -0x50],0x0
JMP 0x00150743
LAB_00150658:
MOV RDI,qword ptr [RBP + -0x38]
MOV EDX,0x1
MOV R13,qword ptr [RBP + -0x60]
MOV RCX,R13
CALL 0x00138c21
MOVZX R14D,word ptr [R15 + 0xa]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0014d456
XOR R12D,R12D
TEST AL,AL
CMOVZ R14D,R12D
XOR EDX,EDX
CMP dword ptr [RBP + -0x30],0x1
SETZ DL
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,R13
MOV ECX,R14D
CALL 0x001576cf
TEST AL,AL
JZ 0x001508b1
LAB_001506a6:
CALL 0x001a8156
MOV R12D,dword ptr [RAX]
JMP 0x00150864
LAB_001506b3:
TEST R12B,R12B
JZ 0x00150846
MOV qword ptr [RBP + -0x50],0x0
MOV R12,RDI
MOV RSI,R15
XOR ECX,ECX
MOV R14D,EDX
CALL 0x001508de
MOV EAX,R13D
SUB EAX,dword ptr [RBX + 0xc18]
ADD EAX,-0x10
LEA RCX,[RBP + -0x2c]
MOV dword ptr [RCX],EAX
MOV R9,RCX
XOR EAX,EAX
CMP R14D,0x1
SETZ AL
SUB RSP,0x8
MOV RDI,R12
MOV RSI,R15
MOV EDX,R13D
XOR ECX,ECX
MOV R14,qword ptr [RBP + -0x48]
MOV R8D,R14D
MOV R12,R9
PUSH RAX
CALL 0x00150974
ADD RSP,0x10
MOV EAX,dword ptr [RBX + 0xc18]
ADD EAX,0xc
MOV dword ptr [RBP + -0x3c],EAX
ADD R13,R15
LEA EAX,[R14*0x4]
SUB R13,RAX
MOVZX EAX,word ptr [R13 + -0x6]
ADD R13,-0x8
ADD dword ptr [R12],EAX
MOV dword ptr [RBP + -0x48],0x2
LAB_00150743:
MOV R12,qword ptr [RBP + 0x10]
MOV word ptr [R13 + 0x2],R12W
MOV EDI,dword ptr [RBP + -0x3c]
ADD RDI,R15
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,R12
CALL 0x0012a0a0
MOV R14D,dword ptr [RBP + -0x2c]
SUB R14D,R12D
MOV dword ptr [RBP + -0x2c],R14D
MOV word ptr [R15 + 0xa],R14W
MOV RDI,RBX
MOV RSI,R15
CALL 0x0014d456
TEST AL,AL
JNZ 0x00150787
MOV dword ptr [RBP + -0x2c],0x0
XOR R14D,R14D
LAB_00150787:
XOR EDX,EDX
CMP dword ptr [RBP + -0x30],0x1
SETZ DL
MOV R12,qword ptr [RBP + -0x38]
MOV RDI,R12
MOV R13,qword ptr [RBP + -0x60]
MOV RSI,R13
MOV ECX,R14D
CALL 0x001576cf
TEST AL,AL
MOV R14D,dword ptr [RBP + -0x48]
JNZ 0x00150856
MOV R14,R12
XOR R12D,R12D
MOV RAX,qword ptr [RBP + -0x68]
CMP qword ptr [RBP + -0x58],RAX
JBE 0x00150815
MOV RDI,qword ptr [RBX + 0x600]
LEA RSI,[R14 + 0x470]
MOV EAX,dword ptr [RDI + 0x80]
SUB RSP,0x8
XOR R12D,R12D
LEA R10,[RBP + -0x88]
MOV RDX,R13
XOR ECX,ECX
MOV R8,R15
MOV R9D,0x1
PUSH RAX
PUSH R12
PUSH 0x0
PUSH R10
PUSH R12
PUSH qword ptr [RBP + -0x50]
PUSH 0x4
CALL 0x0013f476
ADD RSP,0x40
TEST AL,AL
JZ 0x00150815
CALL 0x001a8156
MOV R12D,dword ptr [RAX]
LAB_00150815:
LEA RSI,[RBP + -0x88]
MOV dword ptr [RSI + 0x8],0x6
MOV byte ptr [RSI + 0x10],0x1
MOV RDI,R14
ADD RDI,0x2e8
CALL 0x00194922
MOV RAX,qword ptr [RBP + -0x58]
CMP qword ptr [RBX + 0x40],RAX
JNC 0x0015089f
MOV qword ptr [RBX + 0x40],RAX
JMP 0x0015089f
LAB_00150846:
MOV R14D,0x2
LAB_0015084c:
MOV ESI,0x7f
CALL 0x00142bb4
LAB_00150856:
CALL 0x001a8156
MOV R12D,dword ptr [RAX]
CMP R14D,0x2
JNZ 0x0015088f
LAB_00150864:
MOV RDI,qword ptr [RBX + 0x600]
MOV RSI,qword ptr [RBP + -0x88]
XOR EAX,EAX
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH RAX
PUSH RAX
CALL 0x0013dd2d
ADD RSP,0x10
LAB_0015088f:
MOV RDI,RBX
CALL 0x00145b32
CALL 0x001a8156
MOV dword ptr [RAX],R12D
LAB_0015089f:
MOV EAX,R12D
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001508b1:
MOV RDI,qword ptr [RBX + 0x600]
MOV RSI,qword ptr [RBP + -0x88]
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH R12
PUSH R12
CALL 0x0013dd2d
ADD RSP,0x10
JMP 0x0015089f
|
int4
_ma_apply_redo_insert_row_head_or_tail
(long *param_1,long param_2,int8 param_3,char param_4,uint5 *param_5,void *param_6,
size_t param_7)
{
ulong *puVar1;
ulong uVar2;
byte bVar3;
long lVar4;
uint5 uVar5;
long lVar6;
long *plVar7;
uint uVar8;
char cVar9;
uint uVar10;
ushort *puVar11;
int *piVar12;
int4 *puVar13;
ulong uVar14;
ulong uVar15;
int4 uVar16;
ulong uVar17;
long lVar18;
ushort uVar19;
uint uVar20;
int iVar21;
int1 local_94 [4];
int8 local_90;
int4 local_88;
int1 local_80;
void *local_78;
ulong local_70;
ulong local_68;
ulong local_60;
int8 local_58;
ulong local_50;
uint local_44;
long *local_40;
uint local_38;
uint local_34;
lVar4 = *param_1;
uVar20 = *(uint *)(lVar4 + 0x7bc);
uVar17 = (ulong)uVar20;
uVar5 = *param_5;
uVar2 = (ulong)*param_5;
bVar3 = *(byte *)((long)param_5 + 5);
*(uint *)(lVar4 + 0x170) = *(uint *)(lVar4 + 0x170) | 0x181;
uVar14 = ((ulong)uVar5 + 1) * uVar17;
uVar15 = *(ulong *)(lVar4 + 0x40);
if (uVar14 < uVar15 || uVar14 - uVar15 == 0) {
puVar1 = (ulong *)(*(long *)(lVar4 + 0x600) + 0x198);
*puVar1 = *puVar1 & 0xffffffef;
*(int1 *)(lVar4 + 0x7ec) = 1;
local_78 = param_6;
local_70 = uVar15;
local_68 = uVar2;
local_60 = uVar14;
local_50 = (ulong)bVar3;
local_40 = param_1;
local_38 = (uint)param_3;
puVar11 = (ushort *)
pagecache_read(*(int8 *)(lVar4 + 0x600),param_1 + 0x8e,uVar2,0,0,1,4,&local_90);
uVar2 = local_68;
*(int8 *)(*(long *)(lVar4 + 0x600) + 0x198) =
*(int8 *)(*(long *)(lVar4 + 0x600) + 0x1a0);
*(int1 *)(lVar4 + 0x7ec) = 0;
if (puVar11 == (ushort *)0x0) {
if ((param_4 != '\0') &&
(((piVar12 = (int *)_my_thread_var(), *piVar12 == 0xaf ||
(piVar12 = (int *)_my_thread_var(), *piVar12 == 0xb0)) ||
(piVar12 = (int *)_my_thread_var(), *piVar12 == 0xc0)))) {
puVar11 = (ushort *)pagecache_block_link_to_buffer(local_90);
*(int1 *)((long)puVar11 + 7) = 0;
uVar10 = 0;
goto LAB_00150599;
}
}
else {
uVar15 = (ulong)*(uint *)((long)puVar11 + 3) |
(ulong)(byte)puVar11[1] << 0x30 | (ulong)*puVar11 << 0x20;
if ((long)uVar15 < param_2) {
uVar10 = *(byte *)((long)puVar11 + 7) & 7;
LAB_00150599:
uVar8 = local_38;
plVar7 = local_40;
uVar2 = local_50;
if (uVar10 == local_38) {
local_34 = (uint)puVar11[5];
if (((byte)local_50 < (byte)puVar11[4]) ||
(cVar9 = extend_directory(local_40,puVar11,uVar17,(byte)puVar11[4],
local_50 & 0xffffffff,&local_34,local_38 == 1), cVar9 == '\0'
)) {
lVar18 = (long)puVar11 + (uVar17 - (uint)((int)uVar2 * 4)) + -8;
cVar9 = extend_area_on_page(local_40,puVar11,lVar18,uVar2 & 0xffffffff,param_7,&local_34
,&local_44,local_94,local_38 == 1);
if (cVar9 == '\0') {
local_50 = CONCAT44(local_50._4_4_,2);
local_58 = 0;
goto LAB_00150743;
}
}
LAB_00150846:
iVar21 = 2;
param_1 = local_40;
goto LAB_0015084c;
}
if (param_4 == '\0') goto LAB_00150846;
local_58 = 0;
make_empty_page(local_40,puVar11,local_38,0);
uVar2 = local_50;
local_34 = (uVar20 - *(int *)(lVar4 + 0xc18)) - 0x10;
extend_directory(plVar7,puVar11,uVar17,0,local_50 & 0xffffffff,&local_34,uVar8 == 1);
local_44 = *(int *)(lVar4 + 0xc18) + 0xc;
lVar6 = uVar17 - (uint)((int)uVar2 * 4);
lVar18 = (long)puVar11 + lVar6 + -8;
local_34 = local_34 + *(ushort *)((long)puVar11 + lVar6 + -6);
local_50 = CONCAT44(local_50._4_4_,2);
LAB_00150743:
*(short *)(lVar18 + 2) = (short)param_7;
memcpy((void *)((ulong)local_44 + (long)puVar11),local_78,param_7);
uVar20 = local_34 - (int)param_7;
puVar11[5] = (ushort)uVar20;
local_34 = uVar20;
cVar9 = enough_free_entries_on_page(lVar4,puVar11);
plVar7 = local_40;
uVar2 = local_68;
if (cVar9 == '\0') {
local_34 = 0;
uVar20 = 0;
}
cVar9 = _ma_bitmap_set(local_40,local_68,local_38 == 1,uVar20);
iVar21 = (int)local_50;
if (cVar9 == '\0') {
uVar16 = 0;
if (local_70 < local_60) {
uVar16 = 0;
cVar9 = pagecache_write_part
(*(long *)(lVar4 + 0x600),plVar7 + 0x8e,uVar2,0,puVar11,1,4,local_58,0
,&local_90,0,0,*(int4 *)(*(long *)(lVar4 + 0x600) + 0x80));
if (cVar9 != '\0') {
puVar13 = (int4 *)_my_thread_var();
uVar16 = *puVar13;
}
}
local_88 = 6;
local_80 = 1;
insert_dynamic(plVar7 + 0x5d);
if (local_60 <= *(ulong *)(lVar4 + 0x40)) {
return uVar16;
}
*(ulong *)(lVar4 + 0x40) = local_60;
return uVar16;
}
goto LAB_00150856;
}
check_skipped_lsn(local_40,uVar15,1,local_68);
uVar19 = puVar11[5];
cVar9 = enough_free_entries_on_page(lVar4,puVar11);
if (cVar9 == '\0') {
uVar19 = 0;
}
cVar9 = _ma_bitmap_set(local_40,uVar2,local_38 == 1,uVar19);
if (cVar9 == '\0') {
pagecache_unlock_by_link(*(int8 *)(lVar4 + 0x600),local_90,6,3,0,0,0,0);
return 0;
}
}
puVar13 = (int4 *)_my_thread_var();
uVar16 = *puVar13;
}
else {
iVar21 = 4;
if (param_4 != '\0' && bVar3 == 0) {
puVar11 = (ushort *)param_1[0x70];
*(int1 *)((long)param_1 + 0x685) = 1;
local_78 = param_6;
local_70 = uVar15;
local_68 = uVar2;
local_60 = uVar14;
local_40 = param_1;
local_38 = (uint)param_3;
make_empty_page(param_1,puVar11,param_3,1);
local_34 = (uVar20 - *(int *)(lVar4 + 0xc18)) - 0x14;
local_44 = *(int *)(lVar4 + 0xc18) + 0xc;
lVar18 = (long)puVar11 + (uVar17 - 8);
local_50 = CONCAT44(local_50._4_4_,4);
local_58 = 2;
goto LAB_00150743;
}
LAB_0015084c:
_ma_set_fatal_error(param_1,0x7f);
LAB_00150856:
puVar13 = (int4 *)_my_thread_var();
uVar16 = *puVar13;
if (iVar21 != 2) goto LAB_0015088f;
}
pagecache_unlock_by_link(*(int8 *)(lVar4 + 0x600),local_90,6,3,0,0,0,0);
LAB_0015088f:
_ma_mark_file_crashed(lVar4);
puVar13 = (int4 *)_my_thread_var();
*puVar13 = uVar16;
return uVar16;
}
|
|
16,720
|
blst_lendian_from_fp
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
|
void blst_lendian_from_fp(unsigned char ret[48], const vec384 a)
{
vec384 out;
from_fp(out, a);
le_bytes_from_limbs(ret, out, sizeof(vec384));
}
|
O3
|
c
|
blst_lendian_from_fp:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x270ac(%rip), %rdx # 0x8a910
leaq -0x40(%rbp), %r14
movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD
movq %r14, %rdi
callq 0x727c0
cmpq %rbx, %r14
je 0x638a4
xorl %eax, %eax
movq -0x40(%rbp,%rax,8), %rdx
xorl %ecx, %ecx
movb %dl, (%rbx,%rcx)
incq %rcx
shrq $0x8, %rdx
cmpq $0x8, %rcx
jne 0x63888
incq %rax
addq %rcx, %rbx
cmpq $0x6, %rax
jne 0x63881
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
|
blst_lendian_from_fp:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 30h
mov rbx, rdi
lea rdx, BLS12_381_P
lea r14, [rbp+var_40]
mov rcx, 89F3FFFCFFFCFFFDh
mov rdi, r14
call from_mont_384
cmp r14, rbx
jz short loc_638A4
xor eax, eax
loc_63881:
mov rdx, [rbp+rax*8+var_40]
xor ecx, ecx
loc_63888:
mov [rbx+rcx], dl
inc rcx
shr rdx, 8
cmp rcx, 8
jnz short loc_63888
inc rax
add rbx, rcx
cmp rax, 6
jnz short loc_63881
loc_638A4:
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
|
long long blst_lendian_from_fp(_QWORD *a1, long long a2)
{
_QWORD *v2; // rbx
long long result; // rax
unsigned long long v4; // rdx
long long i; // rcx
_QWORD v6[8]; // [rsp+0h] [rbp-40h] BYREF
v2 = a1;
result = from_mont_384(v6, a2, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
if ( v6 != a1 )
{
for ( result = 0LL; result != 6; ++result )
{
v4 = v6[result];
for ( i = 0LL; i != 8; ++i )
{
*((_BYTE *)v2 + i) = v4;
v4 >>= 8;
}
++v2;
}
}
return result;
}
|
blst_lendian_from_fp:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RDI
LEA RDX,[0x18a910]
LEA R14,[RBP + -0x40]
MOV RCX,-0x760c000300030003
MOV RDI,R14
CALL 0x001727c0
CMP R14,RBX
JZ 0x001638a4
XOR EAX,EAX
LAB_00163881:
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x40]
XOR ECX,ECX
LAB_00163888:
MOV byte ptr [RBX + RCX*0x1],DL
INC RCX
SHR RDX,0x8
CMP RCX,0x8
JNZ 0x00163888
INC RAX
ADD RBX,RCX
CMP RAX,0x6
JNZ 0x00163881
LAB_001638a4:
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
|
void blst_lendian_from_fp(ulong *param_1,int8 param_2)
{
long lVar1;
long lVar2;
ulong uVar3;
ulong local_48 [6];
from_mont_384(local_48,param_2,BLS12_381_P);
if (local_48 != param_1) {
lVar1 = 0;
do {
uVar3 = local_48[lVar1];
lVar2 = 0;
do {
*(char *)((long)param_1 + lVar2) = (char)uVar3;
lVar2 = lVar2 + 1;
uVar3 = uVar3 >> 8;
} while (lVar2 != 8);
lVar1 = lVar1 + 1;
param_1 = param_1 + 1;
} while (lVar1 != 6);
}
return;
}
|
|
16,721
|
parse_date
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
static int parse_date(const char *str, size_t length, const char **end_ptr, MYSQL_TIME *tm)
{
int err = 0;
const char *p = str;
const char *end = str + length;
int ret = 1;
tm->year = my_strtoui(p, end - p, &p, &err);
if (err || tm->year > 9999 || p == end || *p != '-')
goto end;
if (p - str == 2) // 2-digit year
tm->year += (tm->year >= 70) ? 1900 : 2000;
p++;
tm->month = my_strtoui(p,end -p, &p, &err);
if (err || tm->month > 12 || p == end || *p != '-')
goto end;
p++;
tm->day = my_strtoui(p, end -p , &p, &err);
if (err || tm->day > 31)
goto end;
ret = 0;
end:
*end_ptr = p;
return ret;
}
|
O0
|
c
|
parse_date:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x1, -0x3c(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
subq %rax, %rsi
leaq -0x30(%rbp), %rdx
leaq -0x24(%rbp), %rcx
callq 0xb7d20
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x0, -0x24(%rbp)
jne 0xb6bd6
movq -0x20(%rbp), %rax
cmpl $0x270f, (%rax) # imm = 0x270F
ja 0xb6bd6
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0xb6bd6
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0xb6bdb
jmp 0xb6cad
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jne 0xb6c0a
movq -0x20(%rbp), %rax
movl (%rax), %edx
movl $0x7d0, %ecx # imm = 0x7D0
movl $0x76c, %eax # imm = 0x76C
cmpl $0x46, %edx
cmovael %eax, %ecx
movq -0x20(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
subq %rax, %rsi
leaq -0x30(%rbp), %rdx
leaq -0x24(%rbp), %rcx
callq 0xb7d20
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
cmpl $0x0, -0x24(%rbp)
jne 0xb6c61
movq -0x20(%rbp), %rax
cmpl $0xc, 0x4(%rax)
ja 0xb6c61
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0xb6c61
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0xb6c63
jmp 0xb6cad
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
subq %rax, %rsi
leaq -0x30(%rbp), %rdx
leaq -0x24(%rbp), %rcx
callq 0xb7d20
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpl $0x0, -0x24(%rbp)
jne 0xb6ca4
movq -0x20(%rbp), %rax
cmpl $0x1f, 0x8(%rax)
jbe 0xb6ca6
jmp 0xb6cad
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
parse_date:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
add rax, [rbp+var_10]
mov [rbp+var_38], rax
mov [rbp+var_3C], 1
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_30]
sub rsi, rax
lea rdx, [rbp+var_30]
lea rcx, [rbp+var_24]
call my_strtoui
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax], ecx
cmp [rbp+var_24], 0
jnz short loc_B6BD6
mov rax, [rbp+var_20]
cmp dword ptr [rax], 270Fh
ja short loc_B6BD6
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_B6BD6
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jz short loc_B6BDB
loc_B6BD6:
jmp loc_B6CAD
loc_B6BDB:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_8]
sub rax, rcx
cmp rax, 2
jnz short loc_B6C0A
mov rax, [rbp+var_20]
mov edx, [rax]
mov ecx, 7D0h
mov eax, 76Ch
cmp edx, 46h ; 'F'
cmovnb ecx, eax
mov rax, [rbp+var_20]
add ecx, [rax]
mov [rax], ecx
loc_B6C0A:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_30]
sub rsi, rax
lea rdx, [rbp+var_30]
lea rcx, [rbp+var_24]
call my_strtoui
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax+4], ecx
cmp [rbp+var_24], 0
jnz short loc_B6C61
mov rax, [rbp+var_20]
cmp dword ptr [rax+4], 0Ch
ja short loc_B6C61
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_B6C61
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jz short loc_B6C63
loc_B6C61:
jmp short loc_B6CAD
loc_B6C63:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_30]
sub rsi, rax
lea rdx, [rbp+var_30]
lea rcx, [rbp+var_24]
call my_strtoui
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax+8], ecx
cmp [rbp+var_24], 0
jnz short loc_B6CA4
mov rax, [rbp+var_20]
cmp dword ptr [rax+8], 1Fh
jbe short loc_B6CA6
loc_B6CA4:
jmp short loc_B6CAD
loc_B6CA6:
mov [rbp+var_3C], 0
loc_B6CAD:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_18]
mov [rax], rcx
mov eax, [rbp+var_3C]
add rsp, 40h
pop rbp
retn
|
long long parse_date(_BYTE *a1, long long a2, _QWORD *a3, _DWORD *a4)
{
int v4; // eax
int v5; // ecx
int v6; // eax
int v7; // eax
unsigned int v9; // [rsp+4h] [rbp-3Ch]
_BYTE *v10; // [rsp+8h] [rbp-38h]
_BYTE *v11; // [rsp+10h] [rbp-30h] BYREF
int v12; // [rsp+1Ch] [rbp-24h] BYREF
_DWORD *v13; // [rsp+20h] [rbp-20h]
_QWORD *v14; // [rsp+28h] [rbp-18h]
long long v15; // [rsp+30h] [rbp-10h]
_BYTE *v16; // [rsp+38h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12 = 0;
v11 = a1;
v10 = &a1[a2];
v9 = 1;
v4 = my_strtoui(a1, a2, &v11, &v12);
*v13 = v4;
if ( !v12 && *v13 <= 0x270Fu && v11 != v10 && *v11 == 45 )
{
if ( v11 - v16 == 2 )
{
v5 = 2000;
if ( *v13 >= 0x46u )
v5 = 1900;
*v13 += v5;
}
++v11;
v6 = my_strtoui(v11, v10 - v11, &v11, &v12);
v13[1] = v6;
if ( !v12 && v13[1] <= 0xCu && v11 != v10 && *v11 == 45 )
{
++v11;
v7 = my_strtoui(v11, v10 - v11, &v11, &v12);
v13[2] = v7;
if ( !v12 && v13[2] <= 0x1Fu )
v9 = 0;
}
}
*v14 = v11;
return v9;
}
|
parse_date:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x1
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
SUB RSI,RAX
LEA RDX,[RBP + -0x30]
LEA RCX,[RBP + -0x24]
CALL 0x001b7d20
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x001b6bd6
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x270f
JA 0x001b6bd6
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x001b6bd6
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JZ 0x001b6bdb
LAB_001b6bd6:
JMP 0x001b6cad
LAB_001b6bdb:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
CMP RAX,0x2
JNZ 0x001b6c0a
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RAX]
MOV ECX,0x7d0
MOV EAX,0x76c
CMP EDX,0x46
CMOVNC ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
ADD ECX,dword ptr [RAX]
MOV dword ptr [RAX],ECX
LAB_001b6c0a:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
SUB RSI,RAX
LEA RDX,[RBP + -0x30]
LEA RCX,[RBP + -0x24]
CALL 0x001b7d20
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x4],ECX
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x001b6c61
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x4],0xc
JA 0x001b6c61
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x001b6c61
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JZ 0x001b6c63
LAB_001b6c61:
JMP 0x001b6cad
LAB_001b6c63:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
SUB RSI,RAX
LEA RDX,[RBP + -0x30]
LEA RCX,[RBP + -0x24]
CALL 0x001b7d20
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x001b6ca4
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x8],0x1f
JBE 0x001b6ca6
LAB_001b6ca4:
JMP 0x001b6cad
LAB_001b6ca6:
MOV dword ptr [RBP + -0x3c],0x0
LAB_001b6cad:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x3c]
ADD RSP,0x40
POP RBP
RET
|
int4 parse_date(char *param_1,long param_2,int8 *param_3,uint *param_4)
{
uint uVar1;
char *pcVar2;
int iVar3;
int4 local_44;
char *local_38;
int local_2c;
uint *local_28;
int8 *local_20;
long local_18;
char *local_10;
local_2c = 0;
pcVar2 = param_1 + param_2;
local_44 = 1;
local_38 = param_1;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
uVar1 = my_strtoui(param_1,(long)pcVar2 - (long)param_1,&local_38,&local_2c);
*local_28 = uVar1;
if ((((local_2c == 0) && (*local_28 < 10000)) && (local_38 != pcVar2)) && (*local_38 == '-')) {
if ((long)local_38 - (long)local_10 == 2) {
iVar3 = 2000;
if (0x45 < *local_28) {
iVar3 = 0x76c;
}
*local_28 = iVar3 + *local_28;
}
local_38 = local_38 + 1;
uVar1 = my_strtoui(local_38,(long)pcVar2 - (long)local_38,&local_38,&local_2c);
local_28[1] = uVar1;
if (((local_2c == 0) && (local_28[1] < 0xd)) && ((local_38 != pcVar2 && (*local_38 == '-')))) {
local_38 = local_38 + 1;
uVar1 = my_strtoui(local_38,(long)pcVar2 - (long)local_38,&local_38,&local_2c);
local_28[2] = uVar1;
if ((local_2c == 0) && (local_28[2] < 0x20)) {
local_44 = 0;
}
}
}
*local_20 = local_38;
return local_44;
}
|
|
16,722
|
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
|
monkey531[P]llama/common/minja.hpp
|
static std::string error_location_suffix(const std::string & source, size_t pos) {
auto get_line = [&](size_t line) {
auto start = source.begin();
for (size_t i = 1; i < line; ++i) {
start = std::find(start, source.end(), '\n') + 1;
}
auto end = std::find(start, source.end(), '\n');
return std::string(start, end);
};
auto start = source.begin();
auto end = source.end();
auto it = start + pos;
auto line = std::count(start, it, '\n') + 1;
auto max_line = std::count(start, end, '\n') + 1;
auto col = pos - std::string(start, it).rfind('\n');
std::ostringstream out;
out << " at row " << line << ", column " << col << ":\n";
if (line > 1) out << get_line(line - 1) << "\n";
out << get_line(line) << "\n";
out << std::string(col - 1, ' ') << "^\n";
if (line < max_line) out << get_line(line + 1) << "\n";
return out.str();
}
|
O3
|
cpp
|
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp # imm = 0x1B8
movq %rdx, %r8
movq %rsi, %r14
movq %rdi, 0x38(%rsp)
movq (%rsi), %rsi
movq 0x8(%r14), %rax
testq %rdx, %rdx
je 0x8fe9a
xorl %ecx, %ecx
xorl %r12d, %r12d
xorl %edx, %edx
cmpb $0xa, (%rsi,%rcx)
sete %dl
addq %rdx, %r12
incq %rcx
cmpq %rcx, %r8
jne 0x8fe84
jmp 0x8fe9d
xorl %r12d, %r12d
leaq (%rsi,%r8), %rdx
testq %rax, %rax
movq %r8, 0x28(%rsp)
je 0x8fec7
xorl %ecx, %ecx
xorl %r15d, %r15d
xorl %edi, %edi
cmpb $0xa, (%rsi,%rcx)
sete %dil
addq %rdi, %r15
incq %rcx
cmpq %rcx, %rax
jne 0x8feb0
jmp 0x8feca
xorl %r15d, %r15d
leaq 0x50(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x4aff0
movq %rbx, %rdi
movl $0xa, %esi
movq $-0x1, %rdx
callq 0x19fb0
movq %rax, %r13
movq (%rbx), %rdi
cmpq %rbp, %rdi
je 0x8ff0c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x197b0
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x19a40
leaq 0x21ad6(%rip), %rsi # 0xb19f6
movl $0x8, %edx
movq %rbx, %rdi
callq 0x198b0
movq 0x28(%rsp), %rbx
leaq 0x1(%r12), %rsi
leaq 0x40(%rsp), %rdi
movq %rsi, 0x30(%rsp)
callq 0x19730
movq %rax, %rbp
leaq 0x20d93(%rip), %rsi # 0xb0ce3
movl $0x9, %edx
movq %rax, %rdi
callq 0x198b0
subq %r13, %rbx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x19510
leaq 0x2a8fd(%rip), %rsi # 0xba86f
movl $0x2, %edx
movq %rax, %rdi
callq 0x198b0
testq %r12, %r12
jle 0x9002e
movq (%r14), %r13
cmpq $0x1, %r12
jne 0x8ff96
movq %r13, %rsi
jmp 0x8ffc2
leaq -0x1(%r12), %rbp
movq (%r14), %rsi
addq 0x8(%r14), %rsi
movb $0xa, 0x7(%rsp)
movq %r13, %rdi
leaq 0x7(%rsp), %rdx
callq 0x4b069
movq %rax, %r13
incq %r13
decq %rbp
jne 0x8ff9b
movq (%r14), %rsi
addq 0x8(%r14), %rsi
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r13, %rdi
callq 0x4b069
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x4aff0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x198b0
leaq 0x1f72f(%rip), %rsi # 0xaf739
movl $0x1, %edx
movq %rax, %rdi
callq 0x198b0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x9002e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x197b0
movq (%r14), %r13
cmpq $0x2, 0x30(%rsp)
jb 0x90072
movq %rbx, 0x28(%rsp)
leaq 0x7(%rsp), %rbp
movq %r12, %rbx
movq (%r14), %rsi
addq 0x8(%r14), %rsi
movb $0xa, 0x7(%rsp)
movq %r13, %rdi
movq %rbp, %rdx
callq 0x4b069
movq %rax, %r13
incq %r13
decq %rbx
jne 0x90046
movq (%r14), %rsi
movq 0x28(%rsp), %rbx
jmp 0x90075
movq %r13, %rsi
addq 0x8(%r14), %rsi
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r13, %rdi
callq 0x4b069
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x4aff0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x198b0
leaq 0x1f67c(%rip), %rsi # 0xaf739
movl $0x1, %edx
movq %rax, %rdi
callq 0x198b0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x900e1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x197b0
decq %rbx
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
movq %rbx, %rsi
movl $0x20, %edx
callq 0x198e0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x198b0
leaq 0x218eb(%rip), %rsi # 0xb19ff
movl $0x2, %edx
movq %rax, %rdi
callq 0x198b0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x90138
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x197b0
cmpq %r15, %r12
jge 0x901e4
movq (%r14), %r15
cmpq $-0x3, %r12
ja 0x9017b
leaq 0x7(%rsp), %r13
movq 0x30(%rsp), %rbx
movq (%r14), %rsi
addq 0x8(%r14), %rsi
movb $0xa, 0x7(%rsp)
movq %r15, %rdi
movq %r13, %rdx
callq 0x4b069
movq %rax, %r15
incq %r15
decq %rbx
jne 0x90154
movq (%r14), %rsi
jmp 0x9017e
movq %r15, %rsi
addq 0x8(%r14), %rsi
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r15, %rdi
callq 0x4b069
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
movq %r15, %rsi
movq %rax, %rdx
callq 0x4aff0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x198b0
leaq 0x1f579(%rip), %rsi # 0xaf739
movl $0x1, %edx
movq %rax, %rdi
callq 0x198b0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x901e4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x197b0
leaq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdi
callq 0x19c90
movq 0x57d86(%rip), %rsi # 0xe7f80
leaq 0x40(%rsp), %rdi
callq 0x19400
leaq 0xb0(%rsp), %rdi
callq 0x19240
addq $0x1b8, %rsp # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9024d
jmp 0x9024d
jmp 0x90231
jmp 0x9024d
jmp 0x9024d
jmp 0x90231
jmp 0x90231
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x90250
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x197b0
jmp 0x90250
movq %rax, %rbx
movq 0x57d29(%rip), %rsi # 0xe7f80
leaq 0x40(%rsp), %rdi
callq 0x19400
leaq 0xb0(%rsp), %rdi
callq 0x19240
movq %rbx, %rdi
callq 0x19e10
|
_ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm_1:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1B8h
mov r8, rdx
mov r14, rsi
mov [rsp+1E8h+var_1B0], rdi
mov rsi, [rsi]
mov rax, [r14+8]
test rdx, rdx
jz short loc_8FE9A
xor ecx, ecx
xor r12d, r12d
loc_8FE84:
xor edx, edx
cmp byte ptr [rsi+rcx], 0Ah
setz dl
add r12, rdx
inc rcx
cmp r8, rcx
jnz short loc_8FE84
jmp short loc_8FE9D
loc_8FE9A:
xor r12d, r12d
loc_8FE9D:
lea rdx, [rsi+r8]
test rax, rax
mov [rsp+1E8h+var_1C0], r8
jz short loc_8FEC7
xor ecx, ecx
xor r15d, r15d
loc_8FEB0:
xor edi, edi
cmp byte ptr [rsi+rcx], 0Ah
setz dil
add r15, rdi
inc rcx
cmp rax, rcx
jnz short loc_8FEB0
jmp short loc_8FECA
loc_8FEC7:
xor r15d, r15d
loc_8FECA:
lea rbp, [rsp+1E8h+var_198]
mov [rbp-10h], rbp
lea rbx, [rsp+1E8h+var_1A8]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rdi, rbx
mov esi, 0Ah
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong)
mov r13, rax
mov rdi, [rbx]; void *
cmp rdi, rbp
jz short loc_8FF0C
mov rsi, [rsp+1E8h+var_198]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8FF0C:
lea rbx, [rsp+1E8h+var_1A8]
mov rdi, rbx
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
lea rsi, aAtRow; " at row "
mov edx, 8
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, [rsp+1E8h+var_1C0]
lea rsi, [r12+1]
lea rdi, [rsp+1E8h+var_1A8]
mov [rsp+1E8h+var_1B8], rsi
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
mov rbp, rax
lea rsi, aColumn; ", column "
mov edx, 9
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
sub rbx, r13
mov rdi, rbp
mov rsi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, aJsonSchemaConv+1Dh; ":\n"
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
test r12, r12
jle loc_9002E
mov r13, [r14]
cmp r12, 1
jnz short loc_8FF96
mov rsi, r13
jmp short loc_8FFC2
loc_8FF96:
lea rbp, [r12-1]
loc_8FF9B:
mov rsi, [r14]
add rsi, [r14+8]
mov [rsp+1E8h+var_1E1], 0Ah
mov rdi, r13
lea rdx, [rsp+1E8h+var_1E1]
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r13, rax
inc r13
dec rbp
jnz short loc_8FF9B
mov rsi, [r14]
loc_8FFC2:
add rsi, [r14+8]
lea rdx, [rsp+1E8h+var_1E1]
mov byte ptr [rdx], 0Ah
mov rdi, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rbp, [rsp+1E8h+var_1D0]
mov [rbp-10h], rbp
lea rdi, [rsp+1E8h+var_1E0]
mov rsi, r13
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, unk_AF739
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_9002E
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9002E:
mov r13, [r14]
cmp [rsp+1E8h+var_1B8], 2
jb short loc_90072
mov [rsp+1E8h+var_1C0], rbx
lea rbp, [rsp+1E8h+var_1E1]
mov rbx, r12
loc_90046:
mov rsi, [r14]
add rsi, [r14+8]
mov [rsp+1E8h+var_1E1], 0Ah
mov rdi, r13
mov rdx, rbp
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r13, rax
inc r13
dec rbx
jnz short loc_90046
mov rsi, [r14]
mov rbx, [rsp+1E8h+var_1C0]
jmp short loc_90075
loc_90072:
mov rsi, r13
loc_90075:
add rsi, [r14+8]
lea rdx, [rsp+1E8h+var_1E1]
mov byte ptr [rdx], 0Ah
mov rdi, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rbp, [rsp+1E8h+var_1D0]
mov [rbp-10h], rbp
lea rdi, [rsp+1E8h+var_1E0]
mov rsi, r13
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, unk_AF739
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_900E1
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_900E1:
dec rbx
lea rdi, [rsp+1E8h+var_1E0]
mov [rdi], rbp
mov rsi, rbx
mov edx, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, asc_B19FF; "^\n"
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_90138
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_90138:
cmp r12, r15
jge loc_901E4
mov r15, [r14]
cmp r12, 0FFFFFFFFFFFFFFFDh
ja short loc_9017B
lea r13, [rsp+1E8h+var_1E1]
mov rbx, [rsp+1E8h+var_1B8]
loc_90154:
mov rsi, [r14]
add rsi, [r14+8]
mov [rsp+1E8h+var_1E1], 0Ah
mov rdi, r15
mov rdx, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r15, rax
inc r15
dec rbx
jnz short loc_90154
mov rsi, [r14]
jmp short loc_9017E
loc_9017B:
mov rsi, r15
loc_9017E:
add rsi, [r14+8]
lea rdx, [rsp+1E8h+var_1E1]
mov byte ptr [rdx], 0Ah
mov rdi, r15
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rdi, [rsp+1E8h+var_1E0]
mov [rdi], rbp
mov rsi, r15
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, unk_AF739
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_901E4
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_901E4:
lea rsi, [rsp+1E8h+var_1A0]
mov rdi, [rsp+1E8h+var_1B0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1E8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1E8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 1B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_9024D
jmp short loc_9024D
jmp short loc_90231
jmp short loc_9024D
jmp short loc_9024D
jmp short loc_90231
jmp short $+2
loc_90231:
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, rbp
jz short loc_90250
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_90250
loc_9024D:
mov rbx, rax
loc_90250:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_38]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_A8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
void minja::error_location_suffix(long long a1, long long a2, long long a3)
{
_BYTE *v4; // rsi
long long v5; // rax
long long v6; // rcx
long long v7; // r12
long long v8; // rcx
long long v9; // r15
long long v10; // r13
long long v11; // rbp
long long v12; // rbx
long long v13; // rax
_BYTE *v14; // r13
_BYTE *v15; // rsi
long long v16; // rbp
long long v17; // rsi
long long v18; // rsi
_BYTE *v19; // rax
long long v20; // rax
_BYTE *v21; // r13
long long v22; // rbx
long long v23; // rsi
_BYTE *v24; // rsi
long long v25; // rsi
_BYTE *v26; // rax
long long v27; // rax
long long v28; // rax
_BYTE *v29; // r15
unsigned long long v30; // rbx
long long v31; // rsi
_BYTE *v32; // rsi
long long v33; // rsi
_BYTE *v34; // rax
long long v35; // rax
char v36; // [rsp+7h] [rbp-1E1h] BYREF
void *v37; // [rsp+8h] [rbp-1E0h] BYREF
long long v38; // [rsp+10h] [rbp-1D8h]
_QWORD v39[2]; // [rsp+18h] [rbp-1D0h] BYREF
long long v40; // [rsp+28h] [rbp-1C0h]
unsigned long long v41; // [rsp+30h] [rbp-1B8h]
long long v42; // [rsp+38h] [rbp-1B0h]
_QWORD *v43; // [rsp+40h] [rbp-1A8h] BYREF
_BYTE v44[8]; // [rsp+48h] [rbp-1A0h] BYREF
_QWORD v45[12]; // [rsp+50h] [rbp-198h] BYREF
_BYTE v46[312]; // [rsp+B0h] [rbp-138h] BYREF
v42 = a1;
v4 = *(_BYTE **)a2;
v5 = *(_QWORD *)(a2 + 8);
if ( a3 )
{
v6 = 0LL;
v7 = 0LL;
do
v7 += v4[v6++] == 10;
while ( a3 != v6 );
}
else
{
v7 = 0LL;
}
v40 = a3;
if ( v5 )
{
v8 = 0LL;
v9 = 0LL;
do
v9 += v4[v8++] == 10;
while ( v5 != v8 );
}
else
{
v9 = 0LL;
}
v43 = v45;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v43, v4, (long long)&v4[a3]);
v10 = std::string::rfind(&v43, 10LL, -1LL);
if ( v43 != v45 )
operator delete(v43, v45[0] + 1LL);
std::ostringstream::basic_ostringstream(&v43);
std::__ostream_insert<char,std::char_traits<char>>(&v43, " at row ", 8LL);
v41 = v7 + 1;
v11 = std::ostream::_M_insert<long>(&v43);
std::__ostream_insert<char,std::char_traits<char>>(v11, ", column ", 9LL);
v12 = v40 - v10;
v13 = std::ostream::_M_insert<unsigned long>(v11, v40 - v10);
std::__ostream_insert<char,std::char_traits<char>>(v13, ":\n", 2LL);
if ( v7 > 0 )
{
v14 = *(_BYTE **)a2;
if ( v7 == 1 )
{
v15 = *(_BYTE **)a2;
}
else
{
v16 = v7 - 1;
do
{
v17 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2;
v36 = 10;
v14 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v14,
v17,
&v36)
+ 1;
--v16;
}
while ( v16 );
v15 = *(_BYTE **)a2;
}
v18 = (long long)&v15[*(_QWORD *)(a2 + 8)];
v36 = 10;
v19 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v14,
v18,
&v36);
v37 = v39;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v14, (long long)v19);
v20 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v20, &unk_AF739, 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
}
v21 = *(_BYTE **)a2;
if ( v41 < 2 )
{
v24 = *(_BYTE **)a2;
}
else
{
v40 = v12;
v22 = v7;
do
{
v23 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2;
v36 = 10;
v21 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v21,
v23,
&v36)
+ 1;
--v22;
}
while ( v22 );
v24 = *(_BYTE **)a2;
v12 = v40;
}
v25 = (long long)&v24[*(_QWORD *)(a2 + 8)];
v36 = 10;
v26 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v21,
v25,
&v36);
v37 = v39;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v21, (long long)v26);
v27 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v27, &unk_AF739, 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
v37 = v39;
std::string::_M_construct(&v37, v12 - 1, 32LL);
v28 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v28, "^\n", 2LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
if ( v7 < v9 )
{
v29 = *(_BYTE **)a2;
if ( (unsigned long long)v7 > 0xFFFFFFFFFFFFFFFDLL )
{
v32 = *(_BYTE **)a2;
}
else
{
v30 = v41;
do
{
v31 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2;
v36 = 10;
v29 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v29,
v31,
&v36)
+ 1;
--v30;
}
while ( v30 );
v32 = *(_BYTE **)a2;
}
v33 = (long long)&v32[*(_QWORD *)(a2 + 8)];
v36 = 10;
v34 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v29,
v33,
&v36);
v37 = v39;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v29, (long long)v34);
v35 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v35, &unk_AF739, 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
}
std::stringbuf::str(v42, v44);
std::ostringstream::~ostringstream(&v43, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v46);
}
|
error_location_suffix:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1b8
MOV R8,RDX
MOV R14,RSI
MOV qword ptr [RSP + 0x38],RDI
MOV RSI,qword ptr [RSI]
MOV RAX,qword ptr [R14 + 0x8]
TEST RDX,RDX
JZ 0x0018fe9a
XOR ECX,ECX
XOR R12D,R12D
LAB_0018fe84:
XOR EDX,EDX
CMP byte ptr [RSI + RCX*0x1],0xa
SETZ DL
ADD R12,RDX
INC RCX
CMP R8,RCX
JNZ 0x0018fe84
JMP 0x0018fe9d
LAB_0018fe9a:
XOR R12D,R12D
LAB_0018fe9d:
LEA RDX,[RSI + R8*0x1]
TEST RAX,RAX
MOV qword ptr [RSP + 0x28],R8
JZ 0x0018fec7
XOR ECX,ECX
XOR R15D,R15D
LAB_0018feb0:
XOR EDI,EDI
CMP byte ptr [RSI + RCX*0x1],0xa
SETZ DIL
ADD R15,RDI
INC RCX
CMP RAX,RCX
JNZ 0x0018feb0
JMP 0x0018feca
LAB_0018fec7:
XOR R15D,R15D
LAB_0018feca:
LEA RBP,[RSP + 0x50]
MOV qword ptr [RBP + -0x10],RBP
LEA RBX,[RSP + 0x40]
MOV RDI,RBX
CALL 0x0014aff0
MOV RDI,RBX
MOV ESI,0xa
MOV RDX,-0x1
CALL 0x00119fb0
MOV R13,RAX
MOV RDI,qword ptr [RBX]
CMP RDI,RBP
JZ 0x0018ff0c
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x001197b0
LAB_0018ff0c:
LEA RBX,[RSP + 0x40]
MOV RDI,RBX
CALL 0x00119a40
LAB_0018ff19:
LEA RSI,[0x1b19f6]
MOV EDX,0x8
MOV RDI,RBX
CALL 0x001198b0
MOV RBX,qword ptr [RSP + 0x28]
LEA RSI,[R12 + 0x1]
LEA RDI,[RSP + 0x40]
MOV qword ptr [RSP + 0x30],RSI
CALL 0x00119730
MOV RBP,RAX
LEA RSI,[0x1b0ce3]
MOV EDX,0x9
MOV RDI,RAX
CALL 0x001198b0
SUB RBX,R13
MOV RDI,RBP
MOV RSI,RBX
CALL 0x00119510
LEA RSI,[0x1ba86f]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x001198b0
TEST R12,R12
JLE 0x0019002e
MOV R13,qword ptr [R14]
CMP R12,0x1
JNZ 0x0018ff96
MOV RSI,R13
JMP 0x0018ffc2
LAB_0018ff96:
LEA RBP,[R12 + -0x1]
LAB_0018ff9b:
MOV RSI,qword ptr [R14]
ADD RSI,qword ptr [R14 + 0x8]
MOV byte ptr [RSP + 0x7],0xa
MOV RDI,R13
LEA RDX,[RSP + 0x7]
CALL 0x0014b069
MOV R13,RAX
INC R13
DEC RBP
JNZ 0x0018ff9b
MOV RSI,qword ptr [R14]
LAB_0018ffc2:
ADD RSI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R13
CALL 0x0014b069
LEA RBP,[RSP + 0x18]
MOV qword ptr [RBP + -0x10],RBP
LAB_0018ffdf:
LEA RDI,[RSP + 0x8]
MOV RSI,R13
MOV RDX,RAX
CALL 0x0014aff0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0018fff9:
LEA RDI,[RSP + 0x40]
CALL 0x001198b0
LEA RSI,[0x1af739]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001198b0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x0019002e
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001197b0
LAB_0019002e:
MOV R13,qword ptr [R14]
CMP qword ptr [RSP + 0x30],0x2
JC 0x00190072
MOV qword ptr [RSP + 0x28],RBX
LEA RBP,[RSP + 0x7]
MOV RBX,R12
LAB_00190046:
MOV RSI,qword ptr [R14]
ADD RSI,qword ptr [R14 + 0x8]
MOV byte ptr [RSP + 0x7],0xa
MOV RDI,R13
MOV RDX,RBP
CALL 0x0014b069
MOV R13,RAX
INC R13
DEC RBX
JNZ 0x00190046
MOV RSI,qword ptr [R14]
MOV RBX,qword ptr [RSP + 0x28]
JMP 0x00190075
LAB_00190072:
MOV RSI,R13
LAB_00190075:
ADD RSI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R13
CALL 0x0014b069
LEA RBP,[RSP + 0x18]
MOV qword ptr [RBP + -0x10],RBP
LAB_00190092:
LEA RDI,[RSP + 0x8]
MOV RSI,R13
MOV RDX,RAX
CALL 0x0014aff0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001900ac:
LEA RDI,[RSP + 0x40]
CALL 0x001198b0
LEA RSI,[0x1af739]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001198b0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x001900e1
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001197b0
LAB_001900e1:
DEC RBX
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RBP
LAB_001900ec:
MOV RSI,RBX
MOV EDX,0x20
CALL 0x001198e0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00190103:
LEA RDI,[RSP + 0x40]
CALL 0x001198b0
LEA RSI,[0x1b19ff]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x001198b0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00190138
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001197b0
LAB_00190138:
CMP R12,R15
JGE 0x001901e4
MOV R15,qword ptr [R14]
CMP R12,-0x3
JA 0x0019017b
LEA R13,[RSP + 0x7]
MOV RBX,qword ptr [RSP + 0x30]
LAB_00190154:
MOV RSI,qword ptr [R14]
ADD RSI,qword ptr [R14 + 0x8]
MOV byte ptr [RSP + 0x7],0xa
MOV RDI,R15
MOV RDX,R13
CALL 0x0014b069
MOV R15,RAX
INC R15
DEC RBX
JNZ 0x00190154
MOV RSI,qword ptr [R14]
JMP 0x0019017e
LAB_0019017b:
MOV RSI,R15
LAB_0019017e:
ADD RSI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R15
CALL 0x0014b069
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RBP
LAB_0019019a:
MOV RSI,R15
MOV RDX,RAX
CALL 0x0014aff0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001901af:
LEA RDI,[RSP + 0x40]
CALL 0x001198b0
LEA RSI,[0x1af739]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001198b0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x001901e4
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001197b0
LAB_001901e4:
LEA RSI,[RSP + 0x48]
LAB_001901e9:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00119c90
LAB_001901f3:
MOV RSI,qword ptr [0x001e7f80]
LEA RDI,[RSP + 0x40]
CALL 0x00119400
LEA RDI,[RSP + 0xb0]
CALL 0x00119240
ADD RSP,0x1b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::error_location_suffix(std::__cxx11::string const&, unsigned long) */
void __thiscall minja::error_location_suffix(minja *this,string *param_1,ulong param_2)
{
long lVar1;
ostream *poVar2;
int8 uVar3;
ulong uVar4;
long lVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
long lVar9;
int1 local_1e1;
long *local_1e0;
long local_1d8;
long local_1d0 [2];
ulong local_1c0;
ulong local_1b8;
minja *local_1b0;
long *local_1a8 [2];
long local_198 [12];
ios_base local_138 [264];
lVar1 = *(long *)param_1;
if (param_2 == 0) {
uVar8 = 0;
}
else {
uVar4 = 0;
uVar8 = 0;
do {
uVar8 = uVar8 + (*(char *)(lVar1 + uVar4) == '\n');
uVar4 = uVar4 + 1;
} while (param_2 != uVar4);
}
if (*(long *)(param_1 + 8) == 0) {
lVar9 = 0;
}
else {
lVar5 = 0;
lVar9 = 0;
do {
lVar9 = lVar9 + (ulong)(*(char *)(lVar1 + lVar5) == '\n');
lVar5 = lVar5 + 1;
} while (*(long *)(param_1 + 8) != lVar5);
}
local_1c0 = param_2;
local_1b0 = this;
local_1a8[0] = local_198;
std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(local_1a8,lVar1,lVar1 + param_2);
lVar1 = std::__cxx11::string::rfind((char)local_1a8,10);
if (local_1a8[0] != local_198) {
operator_delete(local_1a8[0],local_198[0] + 1);
}
std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8);
/* try { // try from 0018ff19 to 0018ff7e has its CatchHandler @ 0019024d */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8," at row ",8);
uVar4 = local_1c0;
local_1b8 = uVar8 + 1;
poVar2 = std::ostream::_M_insert<long>((long)local_1a8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,", column ",9);
uVar4 = uVar4 - lVar1;
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,":\n",2);
if (0 < (long)uVar8) {
lVar1 = *(long *)param_1;
lVar5 = lVar1;
if (uVar8 != 1) {
lVar7 = uVar8 - 1;
do {
local_1e1 = 10;
lVar5 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1);
lVar5 = lVar5 + 1;
lVar7 = lVar7 + -1;
} while (lVar7 != 0);
lVar1 = *(long *)param_1;
}
local_1e1 = 10;
uVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,lVar1 + *(long *)(param_1 + 8));
/* try { // try from 0018ffdf to 0018ffee has its CatchHandler @ 00190225 */
local_1e0 = local_1d0;
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1e0,lVar5,uVar3);
/* try { // try from 0018fff9 to 00190016 has its CatchHandler @ 0019022d */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
}
lVar1 = *(long *)param_1;
lVar5 = lVar1;
if (1 < local_1b8) {
uVar6 = uVar8;
local_1c0 = uVar4;
do {
local_1e1 = 10;
lVar5 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1);
lVar5 = lVar5 + 1;
uVar6 = uVar6 - 1;
} while (uVar6 != 0);
lVar1 = *(long *)param_1;
uVar4 = local_1c0;
}
local_1e1 = 10;
uVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,lVar1 + *(long *)(param_1 + 8));
/* try { // try from 00190092 to 001900a1 has its CatchHandler @ 0019022b */
local_1e0 = local_1d0;
std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1e0,lVar5,uVar3);
/* try { // try from 001900ac to 001900c9 has its CatchHandler @ 00190231 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
local_1e0 = local_1d0;
/* try { // try from 001900ec to 001900f8 has its CatchHandler @ 00190229 */
std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)uVar4 + -1);
/* try { // try from 00190103 to 00190120 has its CatchHandler @ 0019022f */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"^\n",2);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
if ((long)uVar8 < lVar9) {
lVar1 = *(long *)param_1;
lVar9 = lVar1;
if (uVar8 < 0xfffffffffffffffe) {
uVar8 = local_1b8;
do {
local_1e1 = 10;
lVar9 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar9,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1);
lVar9 = lVar9 + 1;
uVar8 = uVar8 - 1;
} while (uVar8 != 0);
lVar1 = *(long *)param_1;
}
local_1e1 = 10;
uVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar9,lVar1 + *(long *)(param_1 + 8));
local_1e0 = local_1d0;
/* try { // try from 0019019a to 001901a4 has its CatchHandler @ 00190223 */
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1e0,lVar9,uVar3);
/* try { // try from 001901af to 001901cc has its CatchHandler @ 00190227 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
}
/* try { // try from 001901e9 to 001901f2 has its CatchHandler @ 0019024d */
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8);
std::ios_base::~ios_base(local_138);
return;
}
|
|
16,723
|
ma_crypt_get_index_page_header_space
|
eloqsql/storage/maria/ma_crypt.c
|
uint
ma_crypt_get_index_page_header_space(MARIA_SHARE *share)
{
if (share->base.born_transactional)
{
return CRYPT_SCHEME_1_KEY_VERSION_SIZE;
}
else
{
/* if the index is not transactional, we add 7 bytes LSN anyway
to be used for counter block
*/
return LSN_STORE_SIZE + CRYPT_SCHEME_1_KEY_VERSION_SIZE;
}
}
|
O3
|
c
|
ma_crypt_get_index_page_header_space:
pushq %rbp
movq %rsp, %rbp
cmpb $0x0, 0x44c(%rdi)
movl $0xb, %ecx
movl $0x4, %eax
cmovel %ecx, %eax
popq %rbp
retq
|
ma_crypt_get_index_page_header_space:
push rbp
mov rbp, rsp
cmp byte ptr [rdi+44Ch], 0
mov ecx, 0Bh
mov eax, 4
cmovz eax, ecx
pop rbp
retn
|
long long ma_crypt_get_index_page_header_space(long long a1)
{
long long result; // rax
result = 4LL;
if ( !*(_BYTE *)(a1 + 1100) )
return 11LL;
return result;
}
|
ma_crypt_get_index_page_header_space:
PUSH RBP
MOV RBP,RSP
CMP byte ptr [RDI + 0x44c],0x0
MOV ECX,0xb
MOV EAX,0x4
CMOVZ EAX,ECX
POP RBP
RET
|
int8 ma_crypt_get_index_page_header_space(long param_1)
{
int8 uVar1;
uVar1 = 4;
if (*(char *)(param_1 + 0x44c) == '\0') {
uVar1 = 0xb;
}
return uVar1;
}
|
|
16,724
|
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&))
|
monkey531[P]llama/common/arg.h
|
common_arg(
const std::initializer_list<const char *> & args,
const std::string & help,
void (*handler)(common_params & params)
) : args(args), help(help), handler_void(handler) {}
|
O2
|
c
|
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&)):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
leaq 0xc(%rsp), %rsi
andl $0x0, (%rsi)
pushq $0x1
popq %rdx
leaq 0xb(%rsp), %rcx
leaq 0xa(%rsp), %r8
callq 0x9f488
leaq 0x38(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
andq $0x0, 0x40(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0x50(%rbx)
andq $0x0, 0x58(%rbx)
leaq 0x60(%rbx), %r12
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0x9(%rsp), %rcx
movq %r12, %rdi
callq 0x9f4ce
leaq 0x90(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rbx)
andq $0x0, 0x88(%rbx)
movq %r15, %rsi
callq 0x28f50
movb $0x0, 0xb0(%rbx)
movq %r14, 0xb8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xc0(%rbx)
andq $0x0, 0xd0(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r12, %rdi
callq 0x9f80a
jmp 0x9e455
movq %rax, %r14
leaq 0x30(%rbx), %rdi
callq 0x9f552
movq %rbx, %rdi
callq 0x9f552
movq %r14, %rdi
callq 0x293c0
|
_ZN10common_argC2ERKSt16initializer_listIPKcERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r14, rcx
mov r15, rdx
mov r13, rsi
mov rbx, rdi
lea rsi, [rsp+38h+var_2C]
and dword ptr [rsi], 0
push 1
pop rdx
lea rcx, [rsp+38h+var_2D]
lea r8, [rsp+38h+var_2E]
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&)
lea rax, [rbx+38h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+30h], xmm0
and qword ptr [rbx+40h], 0
mov [rbx+48h], rax
mov [rbx+50h], rax
and qword ptr [rbx+58h], 0
lea r12, [rbx+60h]
mov rsi, [r13+0]
mov rdx, [r13+8]
lea rcx, [rsp+38h+var_2F]
mov rdi, r12
call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&)
lea rdi, [rbx+90h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+78h], xmm0
and qword ptr [rbx+88h], 0
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov byte ptr [rbx+0B0h], 0
mov [rbx+0B8h], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+0C0h], xmm0
and qword ptr [rbx+0D0h], 0
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, r12
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
jmp short loc_9E455
mov r14, rax
loc_9E455:
lea rdi, [rbx+30h]
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, rbx
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
|
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4)
{
long long result; // rax
char v7; // [rsp+9h] [rbp-2Fh] BYREF
char v8; // [rsp+Ah] [rbp-2Eh] BYREF
char v9; // [rsp+Bh] [rbp-2Dh] BYREF
_DWORD v10[11]; // [rsp+Ch] [rbp-2Ch] BYREF
v10[0] = 0;
std::set<llama_example>::set(a1, v10, 1LL, &v9, &v8);
*(_OWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 64) = 0LL;
*(_QWORD *)(a1 + 72) = a1 + 56;
*(_QWORD *)(a1 + 80) = a1 + 56;
*(_QWORD *)(a1 + 88) = 0LL;
std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v7);
*(_OWORD *)(a1 + 120) = 0LL;
*(_QWORD *)(a1 + 136) = 0LL;
result = std::string::basic_string(a1 + 144, a3);
*(_BYTE *)(a1 + 176) = 0;
*(_QWORD *)(a1 + 184) = a4;
*(_OWORD *)(a1 + 192) = 0LL;
*(_QWORD *)(a1 + 208) = 0LL;
return result;
}
|
common_arg:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14,RCX
MOV R15,RDX
MOV R13,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0xc]
AND dword ptr [RSI],0x0
PUSH 0x1
POP RDX
LEA RCX,[RSP + 0xb]
LEA R8,[RSP + 0xa]
CALL 0x0019f488
LEA RAX,[RBX + 0x38]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
AND qword ptr [RBX + 0x40],0x0
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0x50],RAX
AND qword ptr [RBX + 0x58],0x0
LEA R12,[RBX + 0x60]
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
LAB_0019e3ec:
LEA RCX,[RSP + 0x9]
MOV RDI,R12
CALL 0x0019f4ce
LEA RDI,[RBX + 0x90]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x78],XMM0
AND qword ptr [RBX + 0x88],0x0
LAB_0019e40f:
MOV RSI,R15
CALL 0x00128f50
LAB_0019e417:
MOV byte ptr [RBX + 0xb0],0x0
MOV qword ptr [RBX + 0xb8],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
AND qword ptr [RBX + 0xd0],0x0
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::string const&,
void (*)(common_params&)) */
void __thiscall
common_arg::common_arg
(common_arg *this,initializer_list *param_1,string *param_2,
_func_void_common_params_ptr *param_3)
{
int1 local_2f;
int1 local_2e;
int1 local_2d;
int4 local_2c;
local_2c = 0;
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
(this,&local_2c,1,&local_2d,&local_2e);
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(common_arg **)(this + 0x48) = this + 0x38;
*(common_arg **)(this + 0x50) = this + 0x38;
*(int8 *)(this + 0x58) = 0;
/* try { // try from 0019e3ec to 0019e3f8 has its CatchHandler @ 0019e452 */
std::vector<char_const*,std::allocator<char_const*>>::vector
((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1
,*(int8 *)(param_1 + 8),&local_2f);
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
/* try { // try from 0019e40f to 0019e416 has its CatchHandler @ 0019e445 */
std::__cxx11::string::string((string *)(this + 0x90),param_2);
this[0xb0] = (common_arg)0x0;
*(_func_void_common_params_ptr **)(this + 0xb8) = param_3;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
return;
}
|
|
16,725
|
translog_read_file_header
|
eloqsql/storage/maria/ma_loghandler.c
|
my_bool translog_read_file_header(LOGHANDLER_FILE_INFO *desc, File file)
{
uchar page_buff[LOG_HEADER_DATA_SIZE];
DBUG_ENTER("translog_read_file_header");
if (mysql_file_pread(file, page_buff,
sizeof(page_buff), 0, MYF(MY_FNABP | MY_WME)))
{
DBUG_PRINT("info", ("log read fail error: %d", my_errno));
DBUG_RETURN(1);
}
translog_interpret_file_header(desc, page_buff);
DBUG_PRINT("info", ("timestamp: %llu aria ver: %lu mysql ver: %lu "
"server id %lu page size %lu file number %lu "
"max lsn: " LSN_FMT,
(ulonglong) desc->timestamp,
(ulong) desc->maria_version,
(ulong) desc->mysql_version,
(ulong) desc->server_id,
desc->page_size, (ulong) desc->file_number,
LSN_IN_PARTS(desc->max_lsn)));
DBUG_RETURN(0);
}
|
O0
|
c
|
translog_read_file_header:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x50(%rbp)
movl %esi, -0x54(%rbp)
movl -0x54(%rbp), %edx
leaq -0x40(%rbp), %rcx
leaq 0x1078de(%rip), %rdi # 0x150af8
movl $0x4e0, %esi # imm = 0x4E0
movl $0x2c, %r8d
xorl %eax, %eax
movl %eax, %r9d
movq $0x12, (%rsp)
callq 0x49290
cmpq $0x0, %rax
je 0x49249
jmp 0x4923f
jmp 0x49241
jmp 0x49243
movb $0x1, -0x41(%rbp)
jmp 0x4925e
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x490d0
jmp 0x49258
jmp 0x4925a
movb $0x0, -0x41(%rbp)
movb -0x41(%rbp), %al
movb %al, -0x55(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4927f
movb -0x55(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
callq 0x2a260
nopw %cs:(%rax,%rax)
|
translog_read_file_header:
push rbp
mov rbp, rsp
sub rsp, 60h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_50], rdi
mov [rbp+var_54], esi
mov edx, [rbp+var_54]
lea rcx, [rbp+var_40]
lea rdi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4E0h
mov r8d, 2Ch ; ','
xor eax, eax
mov r9d, eax
mov [rsp+60h+var_60], 12h
call inline_mysql_file_pread_2
cmp rax, 0
jz short loc_49249
jmp short $+2
loc_4923F:
jmp short $+2
loc_49241:
jmp short $+2
loc_49243:
mov [rbp+var_41], 1
jmp short loc_4925E
loc_49249:
mov rdi, [rbp+var_50]
lea rsi, [rbp+var_40]
call translog_interpret_file_header
jmp short $+2
loc_49258:
jmp short $+2
loc_4925A:
mov [rbp+var_41], 0
loc_4925E:
mov al, [rbp+var_41]
mov [rbp+var_55], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4927F
mov al, [rbp+var_55]
add rsp, 60h
pop rbp
retn
loc_4927F:
call ___stack_chk_fail
|
char translog_read_file_header(unsigned long long *a1, int a2)
{
_BYTE v4[56]; // [rsp+20h] [rbp-40h] BYREF
unsigned long long v5; // [rsp+58h] [rbp-8h]
v5 = __readfsqword(0x28u);
if ( inline_mysql_file_pread_2(
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
1248,
a2,
(unsigned int)v4,
44,
0,
18LL) )
{
return 1;
}
translog_interpret_file_header(a1, (long long)v4);
return 0;
}
|
translog_read_file_header:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x50],RDI
MOV dword ptr [RBP + -0x54],ESI
MOV EDX,dword ptr [RBP + -0x54]
LEA RCX,[RBP + -0x40]
LEA RDI,[0x250af8]
MOV ESI,0x4e0
MOV R8D,0x2c
XOR EAX,EAX
MOV R9D,EAX
MOV qword ptr [RSP],0x12
CALL 0x00149290
CMP RAX,0x0
JZ 0x00149249
JMP 0x0014923f
LAB_0014923f:
JMP 0x00149241
LAB_00149241:
JMP 0x00149243
LAB_00149243:
MOV byte ptr [RBP + -0x41],0x1
JMP 0x0014925e
LAB_00149249:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x40]
CALL 0x001490d0
JMP 0x00149258
LAB_00149258:
JMP 0x0014925a
LAB_0014925a:
MOV byte ptr [RBP + -0x41],0x0
LAB_0014925e:
MOV AL,byte ptr [RBP + -0x41]
MOV byte ptr [RBP + -0x55],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014927f
MOV AL,byte ptr [RBP + -0x55]
ADD RSP,0x60
POP RBP
RET
LAB_0014927f:
CALL 0x0012a260
|
int8 translog_read_file_header(int8 param_1,int4 param_2)
{
long lVar1;
long in_FS_OFFSET;
bool local_49;
int1 local_48 [56];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = inline_mysql_file_pread
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x4e0,
param_2,local_48,0x2c,0,0x12);
if (lVar1 == 0) {
translog_interpret_file_header(param_1,local_48);
}
local_49 = lVar1 != 0;
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_49);
}
|
|
16,726
|
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
|
monkey531[P]llama/common/common.cpp
|
std::vector<llama_token> common_tokenize(
const struct llama_vocab * vocab,
const std::string & text,
bool add_special,
bool parse_special) {
// upper limit for the number of tokens
int n_tokens = text.length() + 2 * add_special;
std::vector<llama_token> result(n_tokens);
n_tokens = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
if (n_tokens < 0) {
result.resize(-n_tokens);
int check = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
GGML_ASSERT(check == -n_tokens);
} else {
result.resize(n_tokens);
}
return result;
}
|
O1
|
cpp
|
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leal (%r14,%r14), %eax
addl 0x8(%rdx), %eax
movslq %eax, %rsi
leaq 0x17(%rsp), %rdx
callq 0x7d8d0
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
shrq $0x2, %r8
movl %ebp, (%rsp)
movq %r15, %rdi
movl %r14d, %r9d
callq 0x1c0d0
movl %eax, %r13d
testl %eax, %eax
js 0x79f8c
movl %r13d, %esi
movq %rbx, %rdi
callq 0x7d95a
jmp 0x79fc9
negl %r13d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7d95a
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
shrq $0x2, %r8
movzbl %bpl, %eax
movl %eax, (%rsp)
movzbl %r14b, %r9d
movq %r15, %rdi
callq 0x1c0d0
cmpl %r13d, %eax
jne 0x79fdb
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7b177(%rip), %rdi # 0xf5159
leaq 0x721d1(%rip), %rdx # 0xec1ba
leaq 0x7b7e9(%rip), %rcx # 0xf57d9
movl $0x6b8, %esi # imm = 0x6B8
xorl %eax, %eax
callq 0x1bf40
jmp 0x79ffe
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x7a015
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1b910
movq %r14, %rdi
callq 0x1c030
|
_Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, r8d
mov r14d, ecx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
lea eax, [r14+r14]
add eax, [rdx+8]
movsxd rsi, eax
lea rdx, [rsp+48h+var_31]
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rsi, [r12]
mov edx, [r12+8]
mov rcx, [rbx]
mov r8, [rbx+8]
sub r8, rcx
shr r8, 2
mov [rsp+48h+var_48], ebp
mov rdi, r15
mov r9d, r14d
call _llama_tokenize
mov r13d, eax
test eax, eax
js short loc_79F8C
mov esi, r13d
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
jmp short loc_79FC9
loc_79F8C:
neg r13d
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rsi, [r12]
mov edx, [r12+8]
mov rcx, [rbx]
mov r8, [rbx+8]
sub r8, rcx
shr r8, 2
movzx eax, bpl
mov [rsp+48h+var_48], eax
movzx r9d, r14b
mov rdi, r15
call _llama_tokenize
cmp eax, r13d
jnz short loc_79FDB
loc_79FC9:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_79FDB:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNTokens; "check == -n_tokens"
mov esi, 6B8h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_79FFE:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_7A015
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7A015:
mov rdi, r14
call __Unwind_Resume
|
_QWORD * common_tokenize(_QWORD *a1, long long a2, _QWORD *a3, unsigned int a4, int a5)
{
int v8; // eax
int v9; // r13d
long long v11; // r14
_BYTE v12[49]; // [rsp+17h] [rbp-31h] BYREF
std::vector<int>::vector(a1, (int)(*((_DWORD *)a3 + 2) + 2 * a4), v12);
v8 = llama_tokenize(a2, *a3, *((unsigned int *)a3 + 2), *a1, (a1[1] - *a1) >> 2, a4, a5);
if ( v8 < 0 )
{
v9 = -v8;
std::vector<int>::resize(a1, (unsigned int)-v8);
if ( (unsigned int)llama_tokenize(
a2,
*a3,
*((unsigned int *)a3 + 2),
*a1,
(a1[1] - *a1) >> 2,
(unsigned __int8)a4,
(unsigned __int8)a5) != v9 )
{
v11 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1720LL,
"GGML_ASSERT(%s) failed",
"check == -n_tokens");
if ( *a1 )
operator delete((void *)*a1, a1[2] - *a1);
_Unwind_Resume(v11);
}
}
else
{
std::vector<int>::resize(a1, (unsigned int)v8);
}
return a1;
}
|
common_tokenize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,R8D
MOV R14D,ECX
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
LEA EAX,[R14 + R14*0x1]
ADD EAX,dword ptr [RDX + 0x8]
MOVSXD RSI,EAX
LEA RDX,[RSP + 0x17]
CALL 0x0017d8d0
MOV RSI,qword ptr [R12]
MOV EDX,dword ptr [R12 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
SUB R8,RCX
SHR R8,0x2
LAB_00179f6a:
MOV dword ptr [RSP],EBP
MOV RDI,R15
MOV R9D,R14D
CALL 0x0011c0d0
MOV R13D,EAX
TEST EAX,EAX
JS 0x00179f8c
MOV ESI,R13D
MOV RDI,RBX
CALL 0x0017d95a
JMP 0x00179fc9
LAB_00179f8c:
NEG R13D
MOV RDI,RBX
MOV RSI,R13
CALL 0x0017d95a
MOV RSI,qword ptr [R12]
MOV EDX,dword ptr [R12 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
SUB R8,RCX
SHR R8,0x2
LAB_00179fb1:
MOVZX EAX,BPL
MOV dword ptr [RSP],EAX
MOVZX R9D,R14B
MOV RDI,R15
CALL 0x0011c0d0
CMP EAX,R13D
JNZ 0x00179fdb
LAB_00179fc9:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00179fdb:
LEA RDI,[0x1f5159]
LEA RDX,[0x1ec1ba]
LEA RCX,[0x1f57d9]
MOV ESI,0x6b8
XOR EAX,EAX
CALL 0x0011bf40
|
/* common_tokenize(llama_vocab const*, std::__cxx11::string const&, bool, bool) */
llama_vocab * common_tokenize(llama_vocab *param_1,string *param_2,bool param_3,bool param_4)
{
uint uVar1;
uint uVar2;
int7 in_register_00000009;
int7 in_register_00000011;
int8 *puVar3;
uint in_R8D;
puVar3 = (int8 *)CONCAT71(in_register_00000011,param_3);
std::vector<int,std::allocator<int>>::vector
((ulong)param_1,
(allocator *)
(long)((int)CONCAT71(in_register_00000009,param_4) * 2 + *(int *)(puVar3 + 1)));
/* try { // try from 00179f6a to 00179f99 has its CatchHandler @ 00179ffe */
uVar1 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1,
(ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,
CONCAT71(in_register_00000009,param_4) & 0xffffffff,in_R8D);
if ((int)uVar1 < 0) {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(ulong)-uVar1);
/* try { // try from 00179fb1 to 00179ffb has its CatchHandler @ 00179ffc */
uVar2 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1,
(ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,param_4,
in_R8D & 0xff);
if (uVar2 != -uVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6b8
,"GGML_ASSERT(%s) failed","check == -n_tokens");
}
}
else {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(ulong)uVar1);
}
return param_1;
}
|
|
16,727
|
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
|
monkey531[P]llama/common/common.cpp
|
std::vector<llama_token> common_tokenize(
const struct llama_vocab * vocab,
const std::string & text,
bool add_special,
bool parse_special) {
// upper limit for the number of tokens
int n_tokens = text.length() + 2 * add_special;
std::vector<llama_token> result(n_tokens);
n_tokens = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
if (n_tokens < 0) {
result.resize(-n_tokens);
int check = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
GGML_ASSERT(check == -n_tokens);
} else {
result.resize(n_tokens);
}
return result;
}
|
O3
|
cpp
|
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leal (%r14,%r14), %eax
addl 0x8(%rdx), %eax
movslq %eax, %rsi
leaq 0x17(%rsp), %rdx
callq 0x7df62
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
shrq $0x2, %r8
movl %ebp, (%rsp)
movq %r15, %rdi
movl %r14d, %r9d
callq 0x1c0d0
movl %eax, %r13d
testl %eax, %eax
js 0x7a79c
movl %r13d, %esi
movq %rbx, %rdi
callq 0x7dfee
jmp 0x7a7d9
negl %r13d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7dfee
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
shrq $0x2, %r8
movzbl %bpl, %eax
movl %eax, (%rsp)
movzbl %r14b, %r9d
movq %r15, %rdi
callq 0x1c0d0
cmpl %r13d, %eax
jne 0x7a7eb
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78957(%rip), %rdi # 0xf3149
leaq 0x6f9c1(%rip), %rdx # 0xea1ba
leaq 0x78fc9(%rip), %rcx # 0xf37c9
movl $0x6b8, %esi # imm = 0x6B8
xorl %eax, %eax
callq 0x1bf40
jmp 0x7a80e
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x7a825
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1b910
movq %r14, %rdi
callq 0x1c030
|
_Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, r8d
mov r14d, ecx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
lea eax, [r14+r14]
add eax, [rdx+8]
movsxd rsi, eax
lea rdx, [rsp+48h+var_31]
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rsi, [r12]
mov edx, [r12+8]
mov rcx, [rbx]
mov r8, [rbx+8]
sub r8, rcx
shr r8, 2
mov [rsp+48h+var_48], ebp
mov rdi, r15
mov r9d, r14d
call _llama_tokenize
mov r13d, eax
test eax, eax
js short loc_7A79C
mov esi, r13d
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
jmp short loc_7A7D9
loc_7A79C:
neg r13d
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rsi, [r12]
mov edx, [r12+8]
mov rcx, [rbx]
mov r8, [rbx+8]
sub r8, rcx
shr r8, 2
movzx eax, bpl
mov [rsp+48h+var_48], eax
movzx r9d, r14b
mov rdi, r15
call _llama_tokenize
cmp eax, r13d
jnz short loc_7A7EB
loc_7A7D9:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7A7EB:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNTokens; "check == -n_tokens"
mov esi, 6B8h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_7A80E:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_7A825
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7A825:
mov rdi, r14
call __Unwind_Resume
|
_QWORD * common_tokenize(_QWORD *a1, long long a2, _QWORD *a3, unsigned int a4, int a5)
{
int v8; // eax
int v9; // r13d
long long v11; // r14
_BYTE v12[49]; // [rsp+17h] [rbp-31h] BYREF
std::vector<int>::vector(a1, (int)(*((_DWORD *)a3 + 2) + 2 * a4), v12);
v8 = llama_tokenize(a2, *a3, *((unsigned int *)a3 + 2), *a1, (a1[1] - *a1) >> 2, a4, a5);
if ( v8 < 0 )
{
v9 = -v8;
std::vector<int>::resize(a1, (unsigned int)-v8);
if ( (unsigned int)llama_tokenize(
a2,
*a3,
*((unsigned int *)a3 + 2),
*a1,
(a1[1] - *a1) >> 2,
(unsigned __int8)a4,
(unsigned __int8)a5) != v9 )
{
v11 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1720LL,
"GGML_ASSERT(%s) failed",
"check == -n_tokens");
if ( *a1 )
operator delete((void *)*a1, a1[2] - *a1);
_Unwind_Resume(v11);
}
}
else
{
std::vector<int>::resize(a1, (unsigned int)v8);
}
return a1;
}
|
common_tokenize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,R8D
MOV R14D,ECX
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
LEA EAX,[R14 + R14*0x1]
ADD EAX,dword ptr [RDX + 0x8]
MOVSXD RSI,EAX
LEA RDX,[RSP + 0x17]
CALL 0x0017df62
MOV RSI,qword ptr [R12]
MOV EDX,dword ptr [R12 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
SUB R8,RCX
SHR R8,0x2
LAB_0017a77a:
MOV dword ptr [RSP],EBP
MOV RDI,R15
MOV R9D,R14D
CALL 0x0011c0d0
MOV R13D,EAX
TEST EAX,EAX
JS 0x0017a79c
MOV ESI,R13D
MOV RDI,RBX
CALL 0x0017dfee
JMP 0x0017a7d9
LAB_0017a79c:
NEG R13D
MOV RDI,RBX
MOV RSI,R13
CALL 0x0017dfee
MOV RSI,qword ptr [R12]
MOV EDX,dword ptr [R12 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
SUB R8,RCX
SHR R8,0x2
LAB_0017a7c1:
MOVZX EAX,BPL
MOV dword ptr [RSP],EAX
MOVZX R9D,R14B
MOV RDI,R15
CALL 0x0011c0d0
CMP EAX,R13D
JNZ 0x0017a7eb
LAB_0017a7d9:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017a7eb:
LEA RDI,[0x1f3149]
LEA RDX,[0x1ea1ba]
LEA RCX,[0x1f37c9]
MOV ESI,0x6b8
XOR EAX,EAX
CALL 0x0011bf40
|
/* common_tokenize(llama_vocab const*, std::__cxx11::string const&, bool, bool) */
llama_vocab * common_tokenize(llama_vocab *param_1,string *param_2,bool param_3,bool param_4)
{
uint uVar1;
uint uVar2;
int7 in_register_00000009;
int7 in_register_00000011;
int8 *puVar3;
uint in_R8D;
puVar3 = (int8 *)CONCAT71(in_register_00000011,param_3);
std::vector<int,std::allocator<int>>::vector
((ulong)param_1,
(allocator *)
(long)((int)CONCAT71(in_register_00000009,param_4) * 2 + *(int *)(puVar3 + 1)));
/* try { // try from 0017a77a to 0017a7a9 has its CatchHandler @ 0017a80e */
uVar1 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1,
(ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,
CONCAT71(in_register_00000009,param_4) & 0xffffffff,in_R8D);
if ((int)uVar1 < 0) {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(ulong)-uVar1);
/* try { // try from 0017a7c1 to 0017a80b has its CatchHandler @ 0017a80c */
uVar2 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1,
(ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,param_4,
in_R8D & 0xff);
if (uVar2 != -uVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6b8
,"GGML_ASSERT(%s) failed","check == -n_tokens");
}
}
else {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(ulong)uVar1);
}
return param_1;
}
|
|
16,728
|
nglog::LogDestination::SetLogDestination(nglog::LogSeverity, char const*)
|
ng-log[P]ng-log/src/logging.cc
|
inline void LogDestination::SetLogDestination(LogSeverity severity,
const char* base_filename) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
std::lock_guard<std::mutex> l{log_mutex};
log_destination(severity)->fileobject_.SetBasename(base_filename);
}
|
O1
|
cpp
|
nglog::LogDestination::SetLogDestination(nglog::LogSeverity, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x2ee84(%rip), %rdi # 0x40d48
callq 0x7840
testl %eax, %eax
jne 0x11fba
movl %ebp, %eax
leaq 0x1fdb6(%rip), %rcx # 0x31c90
leaq (%rcx,%rax,8), %r14
cmpq $0x0, (%r14)
jne 0x11f1d
movl $0xd0, %edi
callq 0x9020
movq %rax, %r15
movq %rax, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xa860
leaq 0x8(%rsp), %r12
movq $0x0, (%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x12c64
movq %r12, %rdi
callq 0x11890
movq (%r14), %r12
leaq 0x8(%r12), %r14
movq %r14, %rdi
callq 0x7840
testl %eax, %eax
jne 0x11fc1
movb $0x1, 0x30(%r12)
leaq 0x38(%r12), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7100
testl %eax, %eax
je 0x11f99
movq 0x98(%r12), %rdi
testq %rdi, %rdi
je 0x11f79
movq $0x0, 0x98(%r12)
callq 0x7520
movl $0x1f, 0xb0(%r12)
movq 0x40(%r12), %r12
movq %rbx, %rdi
callq 0x71f0
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x78b0
movq %r14, %rdi
callq 0x73e0
leaq 0x2eda0(%rip), %rdi # 0x40d48
callq 0x73e0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x7350
movl %eax, %edi
callq 0x7350
movq %rax, %rbx
movl $0xd0, %esi
movq %r15, %rdi
callq 0x906c
jmp 0x11fea
movq %rax, %rbx
movq %r14, %rdi
callq 0x73e0
jmp 0x11fea
movq %rax, %rbx
leaq 0x2ed57(%rip), %rdi # 0x40d48
callq 0x73e0
movq %rbx, %rdi
callq 0x79b0
|
_ZN5nglog14LogDestination17SetLogDestinationENS_11LogSeverityEPKc:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rsi
mov ebp, edi
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_11FBA
mov eax, ebp
lea rcx, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
lea r14, [rcx+rax*8]
cmp qword ptr [r14], 0
jnz short loc_11F1D
mov edi, 0D0h; unsigned __int64
call _Znwm; operator new(ulong)
mov r15, rax
mov rdi, rax
mov esi, ebp
xor edx, edx
call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*)
lea r12, [rsp+38h+var_30]
mov qword ptr [r12], 0
mov rdi, r14
mov rsi, r15
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
mov rdi, r12
call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr()
loc_11F1D:
mov r12, [r14]
lea r14, [r12+8]
mov rdi, r14
call _pthread_mutex_lock
test eax, eax
jnz loc_11FC1
mov byte ptr [r12+30h], 1
lea r15, [r12+38h]
mov rdi, r15
mov rsi, rbx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_11F99
mov rdi, [r12+98h]
test rdi, rdi
jz short loc_11F79
mov qword ptr [r12+98h], 0
call _fclose
mov dword ptr [r12+0B0h], 1Fh
loc_11F79:
mov r12, [r12+40h]
mov rdi, rbx
call _strlen
mov rdi, r15
xor esi, esi
mov rdx, r12
mov rcx, rbx
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_11F99:
mov rdi, r14
call _pthread_mutex_unlock
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_11FBA:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
loc_11FC1:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov esi, 0D0h; unsigned __int64
mov rdi, r15; void *
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_11FEA
mov rbx, rax
mov rdi, r14
call _pthread_mutex_unlock
jmp short loc_11FEA
mov rbx, rax
loc_11FEA:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::LogDestination::SetLogDestination(unsigned int a1, long long a2)
{
int v2; // eax
long long *v3; // r14
long long v4; // r15
long long v5; // r12
long long v6; // r14
int v7; // eax
long long v8; // r15
long long v9; // rdi
long long v10; // r12
long long v11; // rax
nglog::LogDestination *v13; // [rsp+8h] [rbp-30h] BYREF
v2 = pthread_mutex_lock(&nglog::log_mutex);
if ( v2 )
std::__throw_system_error(v2);
v3 = (long long *)((char *)&nglog::LogDestination::log_destinations_ + 8 * a1);
if ( !*v3 )
{
v4 = operator new(208LL);
nglog::LogDestination::LogDestination(v4, a1, 0LL);
v13 = 0LL;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(
(char *)&nglog::LogDestination::log_destinations_ + 8 * a1,
v4);
std::unique_ptr<nglog::LogDestination>::~unique_ptr(&v13);
}
v5 = *v3;
v6 = *v3 + 8;
v7 = pthread_mutex_lock(v6);
if ( v7 )
std::__throw_system_error(v7);
*(_BYTE *)(v5 + 48) = 1;
v8 = v5 + 56;
if ( (unsigned int)std::string::compare(v5 + 56, a2) )
{
v9 = *(_QWORD *)(v5 + 152);
if ( v9 )
{
*(_QWORD *)(v5 + 152) = 0LL;
fclose(v9);
*(_DWORD *)(v5 + 176) = 31;
}
v10 = *(_QWORD *)(v5 + 64);
v11 = strlen(a2);
std::string::_M_replace(v8, 0LL, v10, a2, v11);
}
pthread_mutex_unlock(v6);
return pthread_mutex_unlock(&nglog::log_mutex);
}
|
SetLogDestination:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV EBP,EDI
LEA RDI,[0x140d48]
CALL 0x00107840
TEST EAX,EAX
JNZ 0x00111fba
MOV EAX,EBP
LEA RCX,[0x131c90]
LEA R14,[RCX + RAX*0x8]
CMP qword ptr [R14],0x0
JNZ 0x00111f1d
LAB_00111ee4:
MOV EDI,0xd0
CALL 0x00109020
LAB_00111eee:
MOV R15,RAX
MOV RDI,RAX
MOV ESI,EBP
XOR EDX,EDX
CALL 0x0010a860
LEA R12,[RSP + 0x8]
MOV qword ptr [R12],0x0
MOV RDI,R14
MOV RSI,R15
CALL 0x00112c64
MOV RDI,R12
CALL 0x00111890
LAB_00111f1d:
MOV R12,qword ptr [R14]
LEA R14,[R12 + 0x8]
MOV RDI,R14
CALL 0x00107840
TEST EAX,EAX
JNZ 0x00111fc1
MOV byte ptr [R12 + 0x30],0x1
LEA R15,[R12 + 0x38]
MOV RDI,R15
MOV RSI,RBX
CALL 0x00107100
TEST EAX,EAX
JZ 0x00111f99
MOV RDI,qword ptr [R12 + 0x98]
TEST RDI,RDI
JZ 0x00111f79
MOV qword ptr [R12 + 0x98],0x0
CALL 0x00107520
MOV dword ptr [R12 + 0xb0],0x1f
LAB_00111f79:
MOV R12,qword ptr [R12 + 0x40]
MOV RDI,RBX
CALL 0x001071f0
LAB_00111f86:
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
MOV RCX,RBX
MOV R8,RAX
CALL 0x001078b0
LAB_00111f99:
MOV RDI,R14
CALL 0x001073e0
LEA RDI,[0x140d48]
CALL 0x001073e0
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00111fba:
MOV EDI,EAX
CALL 0x00107350
LAB_00111fc1:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::LogDestination::SetLogDestination(nglog::LogSeverity, char const*) */
void nglog::LogDestination::SetLogDestination(uint param_1,char *param_2)
{
__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *this;
long lVar1;
FILE *__stream;
char *pcVar2;
int iVar3;
LogDestination *pLVar4;
int8 local_30;
iVar3 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
this = (__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
(&log_destinations_ + param_1);
if (*(long *)this == 0) {
/* try { // try from 00111ee4 to 00111eed has its CatchHandler @ 00111fe7 */
pLVar4 = (LogDestination *)operator_new(0xd0);
/* try { // try from 00111eee to 00111efc has its CatchHandler @ 00111fc8 */
LogDestination(pLVar4,param_1,0);
local_30 = 0;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset
(this,pLVar4);
std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::~unique_ptr
((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
&local_30);
}
lVar1 = *(long *)this;
iVar3 = pthread_mutex_lock((pthread_mutex_t *)(lVar1 + 8));
if (iVar3 == 0) {
*(int1 *)(lVar1 + 0x30) = 1;
iVar3 = std::__cxx11::string::compare((char *)(lVar1 + 0x38));
if (iVar3 != 0) {
__stream = *(FILE **)(lVar1 + 0x98);
if (__stream != (FILE *)0x0) {
*(int8 *)(lVar1 + 0x98) = 0;
fclose(__stream);
*(int4 *)(lVar1 + 0xb0) = 0x1f;
}
pcVar2 = *(char **)(lVar1 + 0x40);
strlen(param_2);
/* try { // try from 00111f86 to 00111f98 has its CatchHandler @ 00111fda */
std::__cxx11::string::_M_replace((ulong)(lVar1 + 0x38),0,pcVar2,(ulong)param_2);
}
pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 8));
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
/* try { // try from 00111fc1 to 00111fc7 has its CatchHandler @ 00111fe7 */
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
|
|
16,729
|
my_strtod
|
eloqsql/strings/dtoa.c
|
double my_strtod(const char *str, char **end, int *error)
{
char buf[DTOA_BUFF_SIZE];
double res;
DBUG_ASSERT(end != NULL && ((str != NULL && *end != NULL) ||
(str == NULL && *end == NULL)) &&
error != NULL);
res= my_strtod_int(str, end, error, buf, sizeof(buf));
return (*error == 0) ? res : (res < 0 ? -DBL_MAX : DBL_MAX);
}
|
O0
|
c
|
my_strtod:
pushq %rbp
movq %rsp, %rbp
subq $0xea0, %rsp # imm = 0xEA0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0xe78(%rbp)
movq %rsi, -0xe80(%rbp)
movq %rdx, -0xe88(%rbp)
jmp 0x7fa9f
movq -0xe78(%rbp), %rdi
movq -0xe80(%rbp), %rsi
movq -0xe88(%rbp), %rdx
leaq -0xe70(%rbp), %rcx
movl $0xe60, %r8d # imm = 0xE60
callq 0x7fb60
movsd %xmm0, -0xe90(%rbp)
movq -0xe88(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x7faec
movsd -0xe90(%rbp), %xmm0
movsd %xmm0, -0xe98(%rbp)
jmp 0x7fb23
movsd -0xe90(%rbp), %xmm0
movsd 0x73b74(%rip), %xmm3 # 0xf3670
movsd 0x73b74(%rip), %xmm2 # 0xf3678
xorps %xmm1, %xmm1
cmpltsd %xmm1, %xmm0
movaps %xmm0, %xmm1
andpd %xmm3, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
movsd %xmm0, -0xe98(%rbp)
movsd -0xe98(%rbp), %xmm0
movsd %xmm0, -0xea0(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x7fb56
movsd -0xea0(%rbp), %xmm0
addq $0xea0, %rsp # imm = 0xEA0
popq %rbp
retq
callq 0x29390
nopl (%rax,%rax)
|
my_strtod:
push rbp
mov rbp, rsp
sub rsp, 0EA0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_E78], rdi
mov [rbp+var_E80], rsi
mov [rbp+var_E88], rdx
jmp short $+2
loc_7FA9F:
mov rdi, [rbp+var_E78]
mov rsi, [rbp+var_E80]
mov rdx, [rbp+var_E88]
lea rcx, [rbp+var_E70]
mov r8d, 0E60h
call my_strtod_int
movsd [rbp+var_E90], xmm0
mov rax, [rbp+var_E88]
cmp dword ptr [rax], 0
jnz short loc_7FAEC
movsd xmm0, [rbp+var_E90]
movsd [rbp+var_E98], xmm0
jmp short loc_7FB23
loc_7FAEC:
movsd xmm0, [rbp+var_E90]
movsd xmm3, cs:qword_F3670
movsd xmm2, cs:qword_F3678
xorps xmm1, xmm1
cmpltsd xmm0, xmm1
movaps xmm1, xmm0
andpd xmm1, xmm3
andnpd xmm0, xmm2
orpd xmm0, xmm1
movsd [rbp+var_E98], xmm0
loc_7FB23:
movsd xmm0, [rbp+var_E98]
movsd [rbp+var_EA0], xmm0
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_7FB56
movsd xmm0, [rbp+var_EA0]
add rsp, 0EA0h
pop rbp
retn
loc_7FB56:
call ___stack_chk_fail
|
double my_strtod(long long a1, long long a2, _DWORD *a3)
{
__m128d v3; // xmm1
double v4; // xmm0_8
double v6; // [rsp+8h] [rbp-E98h]
double v7; // [rsp+10h] [rbp-E90h]
_BYTE v9[3688]; // [rsp+30h] [rbp-E70h] BYREF
unsigned long long v10; // [rsp+E98h] [rbp-8h]
v10 = __readfsqword(0x28u);
v7 = my_strtod_int(a1, a2, a3, v9, 3680LL);
if ( !*a3 )
return v7;
v3.m128d_f64[0] = 0.0;
v4 = _mm_cmplt_sd((__m128d)*(unsigned long long *)&v7, v3).m128d_f64[0];
*(_QWORD *)&v6 = ~*(_QWORD *)&v4 & 0x7FEFFFFFFFFFFFFFLL | *(_QWORD *)&v4 & 0xFFEFFFFFFFFFFFFFLL;
return v6;
}
|
my_strtod:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xea0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0xe78],RDI
MOV qword ptr [RBP + -0xe80],RSI
MOV qword ptr [RBP + -0xe88],RDX
JMP 0x0017fa9f
LAB_0017fa9f:
MOV RDI,qword ptr [RBP + -0xe78]
MOV RSI,qword ptr [RBP + -0xe80]
MOV RDX,qword ptr [RBP + -0xe88]
LEA RCX,[RBP + -0xe70]
MOV R8D,0xe60
CALL 0x0017fb60
MOVSD qword ptr [RBP + -0xe90],XMM0
MOV RAX,qword ptr [RBP + -0xe88]
CMP dword ptr [RAX],0x0
JNZ 0x0017faec
MOVSD XMM0,qword ptr [RBP + -0xe90]
MOVSD qword ptr [RBP + -0xe98],XMM0
JMP 0x0017fb23
LAB_0017faec:
MOVSD XMM0,qword ptr [RBP + -0xe90]
MOVSD XMM3,qword ptr [0x001f3670]
MOVSD XMM2,qword ptr [0x001f3678]
XORPS XMM1,XMM1
CMPLTSD XMM0,XMM1
MOVAPS XMM1,XMM0
ANDPD XMM1,XMM3
ANDNPD XMM0,XMM2
ORPD XMM0,XMM1
MOVSD qword ptr [RBP + -0xe98],XMM0
LAB_0017fb23:
MOVSD XMM0,qword ptr [RBP + -0xe98]
MOVSD qword ptr [RBP + -0xea0],XMM0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0017fb56
MOVSD XMM0,qword ptr [RBP + -0xea0]
ADD RSP,0xea0
POP RBP
RET
LAB_0017fb56:
CALL 0x00129390
|
double my_strtod(int8 param_1,int8 param_2,int *param_3)
{
long in_FS_OFFSET;
double local_ea0;
int1 local_e78 [3688];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_ea0 = (double)my_strtod_int(param_1,param_2,param_3,local_e78,0xe60);
if (*param_3 != 0) {
local_ea0 = (double)(~-(ulong)(local_ea0 < 0.0) & DAT_001f3678 |
-(ulong)(local_ea0 < 0.0) & DAT_001f3670);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_ea0;
}
|
|
16,730
|
translog_walk_filenames
|
eloqsql/storage/maria/ma_loghandler.c
|
my_bool translog_walk_filenames(const char *directory,
my_bool (*callback)(const char *,
const char *))
{
MY_DIR *dirp;
uint i;
my_bool rc= FALSE;
/* Finds and removes transaction log files */
if (!(dirp = my_dir(directory, MYF(MY_DONT_SORT))))
return FALSE;
for (i= 0; i < dirp->number_of_files; i++)
{
char *file= dirp->dir_entry[i].name;
if (strncmp(file, "aria_log.", 10) == 0 &&
file[10] >= '0' && file[10] <= '9' &&
file[11] >= '0' && file[11] <= '9' &&
file[12] >= '0' && file[12] <= '9' &&
file[13] >= '0' && file[13] <= '9' &&
file[14] >= '0' && file[14] <= '9' &&
file[15] >= '0' && file[15] <= '9' &&
file[16] >= '0' && file[16] <= '9' &&
file[17] >= '0' && file[17] <= '9' &&
file[18] == '\0' && (*callback)(directory, file))
{
rc= TRUE;
break;
}
}
my_dirend(dirp);
return rc;
}
|
O3
|
c
|
translog_walk_filenames:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %esi, %esi
callq 0xa06f1
testq %rax, %rax
je 0x4a155
movq %rax, %rbx
movl 0x8(%rax), %r12d
testl %r12d, %r12d
je 0x4a14a
movq %r15, -0x30(%rbp)
movq %r14, -0x38(%rbp)
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r14), %r13
movl $0xa, %edx
movq %r13, %rdi
leaq 0x910c3(%rip), %rsi # 0xdb188
callq 0x291d0
testl %eax, %eax
jne 0x4a137
movb 0xa(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x4a137
movb 0xb(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x4a137
movb 0xc(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x4a137
movb 0xd(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x4a137
movb 0xe(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x4a137
movb 0xf(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x4a137
movb 0x10(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x4a137
movb 0x11(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x4a137
cmpb $0x0, 0x12(%r13)
jne 0x4a137
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq *-0x38(%rbp)
testb %al, %al
jne 0x4a167
movl 0x8(%rbx), %r12d
incq %r15
movl %r12d, %eax
addq $0x10, %r14
cmpq %rax, %r15
jb 0x4a0af
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0xa06c0
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %r12b
jmp 0x4a14d
|
translog_walk_filenames:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov r15, rdi
xor r12d, r12d
xor esi, esi
call my_dir
test rax, rax
jz loc_4A155
mov rbx, rax
mov r12d, [rax+8]
test r12d, r12d
jz loc_4A14A
mov [rbp+var_30], r15
mov [rbp+var_38], r14
xor r14d, r14d
xor r15d, r15d
loc_4A0AF:
mov rax, [rbx]
mov r13, [rax+r14]
mov edx, 0Ah
mov rdi, r13
lea rsi, aAriaLog; "aria_log."
call _strncmp
test eax, eax
jnz short loc_4A137
mov al, [r13+0Ah]
add al, 0D0h
cmp al, 9
ja short loc_4A137
mov al, [r13+0Bh]
add al, 0D0h
cmp al, 9
ja short loc_4A137
mov al, [r13+0Ch]
add al, 0D0h
cmp al, 9
ja short loc_4A137
mov al, [r13+0Dh]
add al, 0D0h
cmp al, 9
ja short loc_4A137
mov al, [r13+0Eh]
add al, 0D0h
cmp al, 9
ja short loc_4A137
mov al, [r13+0Fh]
add al, 0D0h
cmp al, 9
ja short loc_4A137
mov al, [r13+10h]
add al, 0D0h
cmp al, 9
ja short loc_4A137
mov al, [r13+11h]
add al, 0D0h
cmp al, 9
ja short loc_4A137
cmp byte ptr [r13+12h], 0
jnz short loc_4A137
mov rdi, [rbp+var_30]
mov rsi, r13
call [rbp+var_38]
test al, al
jnz short loc_4A167
mov r12d, [rbx+8]
loc_4A137:
inc r15
mov eax, r12d
add r14, 10h
cmp r15, rax
jb loc_4A0AF
loc_4A14A:
xor r12d, r12d
loc_4A14D:
mov rdi, rbx
call my_dirend
loc_4A155:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4A167:
mov r12b, 1
jmp short loc_4A14D
|
long long translog_walk_filenames(long long a1, unsigned __int8 ( *a2)(long long, _BYTE *))
{
unsigned int v2; // r12d
long long v3; // rax
long long v4; // rbx
long long v5; // r14
unsigned long long v6; // r15
_BYTE *v7; // r13
v2 = 0;
v3 = my_dir(a1, 0LL);
if ( !v3 )
return v2;
v4 = v3;
v2 = *(_DWORD *)(v3 + 8);
if ( !v2 )
{
LABEL_17:
v2 = 0;
goto LABEL_18;
}
v5 = 0LL;
v6 = 0LL;
while ( 1 )
{
v7 = *(_BYTE **)(*(_QWORD *)v4 + v5);
if ( (unsigned int)strncmp(v7, "aria_log.", 10LL)
|| (unsigned __int8)(v7[10] - 48) > 9u
|| (unsigned __int8)(v7[11] - 48) > 9u
|| (unsigned __int8)(v7[12] - 48) > 9u
|| (unsigned __int8)(v7[13] - 48) > 9u
|| (unsigned __int8)(v7[14] - 48) > 9u
|| (unsigned __int8)(v7[15] - 48) > 9u
|| (unsigned __int8)(v7[16] - 48) > 9u
|| (unsigned __int8)(v7[17] - 48) > 9u
|| v7[18] )
{
goto LABEL_16;
}
if ( a2(a1, v7) )
break;
v2 = *(_DWORD *)(v4 + 8);
LABEL_16:
++v6;
v5 += 16LL;
if ( v6 >= v2 )
goto LABEL_17;
}
LOBYTE(v2) = 1;
LABEL_18:
my_dirend(v4);
return v2;
}
|
translog_walk_filenames:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV R15,RDI
XOR R12D,R12D
XOR ESI,ESI
CALL 0x001a06f1
TEST RAX,RAX
JZ 0x0014a155
MOV RBX,RAX
MOV R12D,dword ptr [RAX + 0x8]
TEST R12D,R12D
JZ 0x0014a14a
MOV qword ptr [RBP + -0x30],R15
MOV qword ptr [RBP + -0x38],R14
XOR R14D,R14D
XOR R15D,R15D
LAB_0014a0af:
MOV RAX,qword ptr [RBX]
MOV R13,qword ptr [RAX + R14*0x1]
MOV EDX,0xa
MOV RDI,R13
LEA RSI,[0x1db188]
CALL 0x001291d0
TEST EAX,EAX
JNZ 0x0014a137
MOV AL,byte ptr [R13 + 0xa]
ADD AL,0xd0
CMP AL,0x9
JA 0x0014a137
MOV AL,byte ptr [R13 + 0xb]
ADD AL,0xd0
CMP AL,0x9
JA 0x0014a137
MOV AL,byte ptr [R13 + 0xc]
ADD AL,0xd0
CMP AL,0x9
JA 0x0014a137
MOV AL,byte ptr [R13 + 0xd]
ADD AL,0xd0
CMP AL,0x9
JA 0x0014a137
MOV AL,byte ptr [R13 + 0xe]
ADD AL,0xd0
CMP AL,0x9
JA 0x0014a137
MOV AL,byte ptr [R13 + 0xf]
ADD AL,0xd0
CMP AL,0x9
JA 0x0014a137
MOV AL,byte ptr [R13 + 0x10]
ADD AL,0xd0
CMP AL,0x9
JA 0x0014a137
MOV AL,byte ptr [R13 + 0x11]
ADD AL,0xd0
CMP AL,0x9
JA 0x0014a137
CMP byte ptr [R13 + 0x12],0x0
JNZ 0x0014a137
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R13
CALL qword ptr [RBP + -0x38]
TEST AL,AL
JNZ 0x0014a167
MOV R12D,dword ptr [RBX + 0x8]
LAB_0014a137:
INC R15
MOV EAX,R12D
ADD R14,0x10
CMP R15,RAX
JC 0x0014a0af
LAB_0014a14a:
XOR R12D,R12D
LAB_0014a14d:
MOV RDI,RBX
CALL 0x001a06c0
LAB_0014a155:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014a167:
MOV R12B,0x1
JMP 0x0014a14d
|
int8 translog_walk_filenames(int8 param_1,code *param_2)
{
char *__s1;
char cVar1;
int iVar2;
long *plVar3;
ulong uVar4;
int8 uVar5;
long lVar6;
ulong uVar7;
uVar5 = 0;
plVar3 = (long *)my_dir(param_1,0);
if (plVar3 != (long *)0x0) {
uVar4 = (ulong)*(uint *)(plVar3 + 1);
if (*(uint *)(plVar3 + 1) != 0) {
lVar6 = 0;
uVar7 = 0;
do {
__s1 = *(char **)(*plVar3 + lVar6);
iVar2 = strncmp(__s1,"aria_log.",10);
if ((((((iVar2 == 0) && ((byte)(__s1[10] - 0x30U) < 10)) && ((byte)(__s1[0xb] - 0x30U) < 10)
) && (((byte)(__s1[0xc] - 0x30U) < 10 && ((byte)(__s1[0xd] - 0x30U) < 10)))) &&
(((byte)(__s1[0xe] - 0x30U) < 10 &&
(((byte)(__s1[0xf] - 0x30U) < 10 && ((byte)(__s1[0x10] - 0x30U) < 10)))))) &&
(((byte)(__s1[0x11] - 0x30U) < 10 && (__s1[0x12] == '\0')))) {
cVar1 = (*param_2)(param_1,__s1);
if (cVar1 != '\0') {
uVar5 = CONCAT71((int7)(uVar4 >> 8),1);
goto LAB_0014a14d;
}
uVar4 = (ulong)*(uint *)(plVar3 + 1);
}
uVar7 = uVar7 + 1;
lVar6 = lVar6 + 0x10;
} while (uVar7 < uVar4);
}
uVar5 = 0;
LAB_0014a14d:
my_dirend(plVar3);
}
return uVar5;
}
|
|
16,731
|
ma_check_print_not_visible_error
|
eloqsql/storage/maria/ma_check.c
|
static void _ma_check_print_not_visible_error(HA_CHECK *param, TrID used_trid)
{
char buff[22], buff2[22];
if (!param->not_visible_rows_found++)
{
if (!ma_control_file_inited())
{
_ma_check_print_warning(param,
"Found row with transaction id %s but no "
"aria_control_file was used or specified. "
"The table may be corrupted",
llstr(used_trid, buff));
}
else
{
_ma_check_print_error(param,
"Found row with transaction id %s when max "
"transaction id according to aria_control_file "
"is %s",
llstr(used_trid, buff),
llstr(param->max_trid, buff2));
}
}
}
|
O3
|
c
|
ma_check_print_not_visible_error:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
movq 0xb28(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb28(%rdi)
testq %rax, %rax
jne 0x6f516
movq %rsi, %r14
movq %rdi, %rbx
callq 0x7a57a
movl %eax, %r15d
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0xfa484
movq %rax, %r14
testb %r15b, %r15b
je 0x6f502
movq 0xb18(%rbx), %rdi
leaq -0x60(%rbp), %rsi
callq 0xfa484
leaq 0x94a47(%rip), %rsi # 0x103f37
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x33f2d
jmp 0x6f516
leaq 0x949c1(%rip), %rsi # 0x103eca
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x36206
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x6f530
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2b280
|
_ma_check_print_not_visible_error:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rbp+var_20], rax
mov rax, [rdi+0B28h]
lea rcx, [rax+1]
mov [rdi+0B28h], rcx
test rax, rax
jnz short loc_6F516
mov r14, rsi
mov rbx, rdi
call ma_control_file_inited
mov r15d, eax
lea rsi, [rbp+var_40]
mov rdi, r14
call llstr
mov r14, rax
test r15b, r15b
jz short loc_6F502
mov rdi, [rbx+0B18h]
lea rsi, [rbp+var_60]
call llstr
lea rsi, aFoundRowWithTr; "Found row with transaction id %s when m"...
mov rdi, rbx
mov rdx, r14
mov rcx, rax
xor eax, eax
call _ma_check_print_error
jmp short loc_6F516
loc_6F502:
lea rsi, aFoundRowWithTr_0; "Found row with transaction id %s but no"...
mov rdi, rbx
mov rdx, r14
xor eax, eax
call _ma_check_print_warning
loc_6F516:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_6F530
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_6F530:
call ___stack_chk_fail
|
unsigned long long ma_check_print_not_visible_error(long long a1, long long a2, long long a3)
{
long long v3; // rax
char v4; // r15
const char *v5; // rax
const char *v6; // r14
const char *v7; // rax
_BYTE v9[32]; // [rsp+0h] [rbp-60h] BYREF
_BYTE v10[32]; // [rsp+20h] [rbp-40h] BYREF
unsigned long long v11; // [rsp+40h] [rbp-20h]
v11 = __readfsqword(0x28u);
v3 = *(_QWORD *)(a1 + 2856);
*(_QWORD *)(a1 + 2856) = v3 + 1;
if ( !v3 )
{
v4 = ma_control_file_inited(a1, a2, a3);
v5 = (const char *)llstr(a2, v10);
v6 = v5;
if ( v4 )
{
v7 = (const char *)llstr(*(_QWORD *)(a1 + 2840), v9);
ma_check_print_error(
a1,
(long long)"Found row with transaction id %s when max transaction id according to aria_control_file is %s",
v6,
v7);
}
else
{
ma_check_print_warning(
a1,
(long long)"Found row with transaction id %s but no aria_control_file was used or specified. The table may be corrupted",
v5);
}
}
return __readfsqword(0x28u);
}
|
_ma_check_print_not_visible_error:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RDI + 0xb28]
LEA RCX,[RAX + 0x1]
MOV qword ptr [RDI + 0xb28],RCX
TEST RAX,RAX
JNZ 0x0016f516
MOV R14,RSI
MOV RBX,RDI
CALL 0x0017a57a
MOV R15D,EAX
LEA RSI,[RBP + -0x40]
MOV RDI,R14
CALL 0x001fa484
MOV R14,RAX
TEST R15B,R15B
JZ 0x0016f502
MOV RDI,qword ptr [RBX + 0xb18]
LEA RSI,[RBP + -0x60]
CALL 0x001fa484
LEA RSI,[0x203f37]
MOV RDI,RBX
MOV RDX,R14
MOV RCX,RAX
XOR EAX,EAX
CALL 0x00133f2d
JMP 0x0016f516
LAB_0016f502:
LEA RSI,[0x203eca]
MOV RDI,RBX
MOV RDX,R14
XOR EAX,EAX
CALL 0x00136206
LAB_0016f516:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0016f530
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0016f530:
CALL 0x0012b280
|
void _ma_check_print_not_visible_error(long param_1,int8 param_2)
{
long lVar1;
char cVar2;
int8 uVar3;
int8 uVar4;
long in_FS_OFFSET;
int1 local_68 [32];
int1 local_48 [32];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *(long *)(param_1 + 0xb28);
*(long *)(param_1 + 0xb28) = lVar1 + 1;
if (lVar1 == 0) {
cVar2 = ma_control_file_inited();
uVar3 = llstr(param_2,local_48);
if (cVar2 == '\0') {
_ma_check_print_warning
(param_1,
"Found row with transaction id %s but no aria_control_file was used or specified. The table may be corrupted"
,uVar3);
}
else {
uVar4 = llstr(*(int8 *)(param_1 + 0xb18),local_68);
_ma_check_print_error
(param_1,
"Found row with transaction id %s when max transaction id according to aria_control_file is %s"
,uVar3,uVar4);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
16,732
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
|
monkey531[P]llama/common/json.hpp
|
const_reference operator[](size_type idx) const
{
// const operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x2, (%rdi)
jne 0xa2f27
movq 0x8(%r14), %rax
shlq $0x4, %rsi
addq (%rax), %rsi
movq %rsi, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b460
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f83e
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x510a5(%rip), %rsi # 0xf3ff0
leaq 0x10(%rsp), %rdi
callq 0xa2fc0
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x87de2
xorl %ebp, %ebp
leaq 0x89fa2(%rip), %rsi # 0x12cf18
leaq -0x475fd(%rip), %rdx # 0x5b980
movq %rbx, %rdi
callq 0x1bf40
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa2fab
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b900
jmp 0xa2fab
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xa2fb8
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bfd0
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 2
jnz short loc_A2F27
mov rax, [r14+8]
shl rsi, 4
add rsi, [rax]
mov rax, rsi
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_A2F27:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A2FAB
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A2FAB
mov r14, rax
mov bpl, 1
loc_A2FAB:
test bpl, bpl
jz short loc_A2FB8
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A2FB8:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
v4,
"cannot use operator[] with a numeric argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return **(_QWORD **)(a1 + 8) + 16 * a2;
}
|
operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x2
JNZ 0x001a2f27
MOV RAX,qword ptr [R14 + 0x8]
SHL RSI,0x4
ADD RSI,qword ptr [RAX]
MOV RAX,RSI
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001a2f27:
MOV EDI,0x20
CALL 0x0011b460
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f83e
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001a2f44:
LEA RSI,[0x1f3ff0]
LEA RDI,[RSP + 0x10]
CALL 0x001a2fc0
MOV BPL,0x1
LAB_001a2f58:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x00187de2
XOR EBP,EBP
LEA RSI,[0x22cf18]
LEA RDX,[0x15b980]
MOV RDI,RBX
CALL 0x0011bf40
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) const */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return param_1 * 0x10 + **(long **)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001a2f44 to 001a2f54 has its CatchHandler @ 001a2fa5 */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 001a2f58 to 001a2f84 has its CatchHandler @ 001a2f85 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
16,733
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
|
monkey531[P]llama/common/json.hpp
|
const_reference operator[](size_type idx) const
{
// const operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x2, (%rdi)
jne 0x7858b
movq 0x8(%r14), %rax
shlq $0x4, %rsi
addq (%rax), %rsi
movq %rsi, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23480
movq %rax, %rbx
movq %r14, %rdi
callq 0x43370
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3ca23(%rip), %rsi # 0xb4fd0
leaq 0x10(%rsp), %rdi
callq 0x7860e
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x633b2
xorl %ebp, %ebp
leaq 0x83970(%rip), %rsi # 0xfbf48
leaq -0x386df(%rip), %rdx # 0x3ff00
movq %rbx, %rdi
callq 0x23f40
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x24218
testb %bpl, %bpl
jne 0x785fe
jmp 0x78606
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23fd0
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 2
jnz short loc_7858B
mov rax, [r14+8]
shl rsi, 4
add rsi, [rax]
mov rax, rsi
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_7858B:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_785FE
jmp short loc_78606
mov r14, rax
loc_785FE:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_78606:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
_BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
v4,
"cannot use operator[] with a numeric argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
(long long)v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return **(_QWORD **)(a1 + 8) + 16 * a2;
}
|
operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x2
JNZ 0x0017858b
MOV RAX,qword ptr [R14 + 0x8]
SHL RSI,0x4
ADD RSI,qword ptr [RAX]
MOV RAX,RSI
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0017858b:
PUSH 0x20
POP RDI
CALL 0x00123480
MOV RBX,RAX
MOV RDI,R14
CALL 0x00143370
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001785a6:
LEA RSI,[0x1b4fd0]
LEA RDI,[RSP + 0x10]
CALL 0x0017860e
MOV BPL,0x1
LAB_001785ba:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x001633b2
XOR EBP,EBP
LEA RSI,[0x1fbf48]
LEA RDX,[0x13ff00]
MOV RDI,RBX
CALL 0x00123f40
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) const */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return param_1 * 0x10 + **(long **)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001785a6 to 001785b6 has its CatchHandler @ 001785fb */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 001785ba to 001785e6 has its CatchHandler @ 001785e7 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
16,734
|
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&)
|
llama.cpp/common/minja/minja.hpp
|
SetNode(const Location & loc, const std::string & ns, const std::vector<std::string> & vns, std::shared_ptr<Expression> && v)
: TemplateNode(loc), ns(ns), var_names(vns), value(std::move(v)) {}
|
O3
|
cpp
|
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %rbx
leaq 0x6f3c3(%rip), %r13 # 0x164510
addq $0x10, %r13
movq %r13, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0xf517d
movq 0x6fe29(%rip), %rcx # 0x164f98
cmpb $0x0, (%rcx)
je 0xf5179
incl 0x8(%rax)
jmp 0xf517d
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x6f5ec(%rip), %rax # 0x164778
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %rbp
movq %rbp, 0x20(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x28e14
leaq 0x40(%rbx), %rdi
movq %r15, %rsi
callq 0x674b0
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movups (%r14), %xmm0
movq %rax, 0x8(%r14)
movups %xmm0, 0x58(%rbx)
movq %rax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r12), %rdi
cmpq %rbp, %rdi
je 0xf51fe
movq (%rbp), %rsi
incq %rsi
callq 0x21190
jmp 0xf51fe
movq %rax, %r14
movq %r13, (%rbx)
addq $0x10, %rbx
movq %rbx, %rdi
callq 0x72cea
movq %r14, %rdi
callq 0x21c20
nop
|
_ZN5minja7SetNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS9_SaIS9_EEOSt10shared_ptrINS_10ExpressionEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov rbx, rdi
lea r13, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add r13, 10h
mov [rdi], r13
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_F517D
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_F5179
inc dword ptr [rax+8]
jmp short loc_F517D
loc_F5179:
lock inc dword ptr [rax+8]
loc_F517D:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja7SetNodeE; `vtable for'minja::SetNode
add rax, 10h
mov [rbx], rax
lea r12, [rbx+20h]
lea rbp, [rbx+30h]
mov [rbx+20h], rbp
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rbx+40h]
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
xor eax, eax
mov [rbx+60h], rax
movups xmm0, xmmword ptr [r14]
mov [r14+8], rax
movups xmmword ptr [rbx+58h], xmm0
mov [r14], rax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [r12]; void *
cmp rdi, rbp
jz short loc_F51FE
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_F51FE
mov r14, rax
loc_F51FE:
mov [rbx], r13
add rbx, 10h
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
|
long long minja::SetNode::SetNode(long long a1, _QWORD *a2, long long a3, _QWORD *a4, __int128 *a5)
{
long long v7; // rax
long long result; // rax
__int128 v9; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v7 = a2[1];
*(_QWORD *)(a1 + 16) = v7;
if ( v7 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v7 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v7 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::SetNode + 2;
*(_QWORD *)(a1 + 32) = a1 + 48;
std::string::_M_construct<char *>(a1 + 32, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
std::vector<std::string>::vector(a1 + 64, a4);
result = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
v9 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v9;
*(_QWORD *)a5 = 0LL;
return result;
}
|
SetNode:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV RBX,RDI
LEA R13,[0x264510]
ADD R13,0x10
MOV qword ptr [RDI],R13
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x001f517d
MOV RCX,qword ptr [0x00264f98]
CMP byte ptr [RCX],0x0
JZ 0x001f5179
INC dword ptr [RAX + 0x8]
JMP 0x001f517d
LAB_001f5179:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001f517d:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x264778]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA R12,[RBX + 0x20]
LEA RBP,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RBP
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
LAB_001f51a9:
MOV RDI,R12
CALL 0x00128e14
LEA RDI,[RBX + 0x40]
LAB_001f51b5:
MOV RSI,R15
CALL 0x001674b0
LAB_001f51bd:
XOR EAX,EAX
MOV qword ptr [RBX + 0x60],RAX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RAX
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOV qword ptr [R14],RAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::SetNode::SetNode(minja::Location const&, std::__cxx11::string const&,
std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::SetNode::SetNode
(SetNode *this,Location *param_1,string *param_2,vector *param_3,shared_ptr *param_4)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_00264520;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00264f98 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_00264788;
*(SetNode **)(this + 0x20) = this + 0x30;
/* try { // try from 001f51a9 to 001f51b0 has its CatchHandler @ 001f51fb */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
/* try { // try from 001f51b5 to 001f51bc has its CatchHandler @ 001f51e1 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40),
param_3);
*(int8 *)(this + 0x60) = 0;
uVar2 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x58) = *(int8 *)param_4;
*(int8 *)(this + 0x60) = uVar2;
*(int8 *)param_4 = 0;
return;
}
|
|
16,735
|
std::hash<minja::Value>::operator()(minja::Value const&) const
|
llama.cpp/common/minja/minja.hpp
|
size_t operator()(const minja::Value & v) const {
if (!v.is_hashable())
throw std::runtime_error("Unsupported type for hashing: " + v.dump());
return std::hash<json>()(v.get<json>());
}
|
O3
|
cpp
|
std::hash<minja::Value>::operator()(minja::Value const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
cmpq $0x0, 0x10(%rsi)
jne 0xc850e
cmpq $0x0, 0x20(%r14)
jne 0xc850e
cmpq $0x0, 0x30(%r14)
jne 0xc850e
movq %rsp, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc85f6
movq %rbx, %rdi
callq 0xc8b1d
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r14, %rdi
callq 0x89918
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x21630
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb6084
leaq 0x5950c(%rip), %rsi # 0x121a42
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xaf924
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x21450
xorl %ebp, %ebp
movq 0x9ca66(%rip), %rsi # 0x164fc0
movq 0x9ca17(%rip), %rdx # 0x164f78
movq %rbx, %rdi
callq 0x21a50
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc8587
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21170
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc85a2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21170
testb %bpl, %bpl
jne 0xc85cc
jmp 0xc85ee
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc85cc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0xc85cc
movq %rax, %r14
movq %rbx, %rdi
callq 0x21f00
jmp 0xc85ee
movq %rax, %r14
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x851fe
movq %rbx, %rdi
callq 0x89918
movq %r14, %rdi
callq 0x21af0
|
_ZNKSt4hashIN5minja5ValueEEclERKS1_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rsi
cmp qword ptr [rsi+10h], 0
jnz short loc_C850E
cmp qword ptr [r14+20h], 0
jnz short loc_C850E
cmp qword ptr [r14+30h], 0
jnz short loc_C850E
mov rbx, rsp
mov rdi, rbx
mov rsi, r14
call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(void)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rbx, rax
mov r14, rsp
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_C850E:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+58h+var_38]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnsupportedTyp; "Unsupported type for hashing: "
mov rdi, rsp
lea rdx, [rsp+58h+var_38]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C8587
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C8587:
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C85A2
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C85A2:
test bpl, bpl
jnz short loc_C85CC
jmp short loc_C85EE
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C85CC
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C85CC
mov r14, rax
loc_C85CC:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_C85EE
mov r14, rax
mov rbx, rsp
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_C85EE:
mov rdi, r14
call __Unwind_Resume
|
long long std::hash<minja::Value>::operator()(long long a1, _QWORD *a2)
{
long long v2; // rbx
void *exception; // rbx
_QWORD v5[2]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v6[16]; // [rsp+20h] [rbp-38h] BYREF
if ( a2[2] || a2[4] || a2[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>(v5, (long long)"Unsupported type for hashing: ", (long long)v6);
std::runtime_error::runtime_error(exception, v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
v5,
a2);
v2 = nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(v5);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v5);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v5);
return v2;
}
|
operator():
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
CMP qword ptr [RSI + 0x10],0x0
JNZ 0x001c850e
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x001c850e
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x001c850e
MOV RBX,RSP
MOV RDI,RBX
MOV RSI,R14
CALL 0x001c85f6
LAB_001c84e2:
MOV RDI,RBX
CALL 0x001c8b1d
LAB_001c84ea:
MOV RBX,RAX
MOV R14,RSP
MOV RDI,R14
XOR ESI,ESI
CALL 0x001851fe
MOV RDI,R14
CALL 0x00189918
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_001c850e:
MOV EDI,0x10
CALL 0x00121630
MOV RBX,RAX
LAB_001c851b:
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b6084
LAB_001c852f:
LEA RSI,[0x221a42]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001af924
MOV BPL,0x1
LAB_001c8546:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00121450
XOR EBP,EBP
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,RBX
CALL 0x00121a50
|
/* std::hash<minja::Value>::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
ulong __thiscall std::hash<minja::Value>::operator()(hash<minja::Value> *this,Value *param_1)
{
ulong uVar1;
runtime_error *this_00;
basic_json abStack_58 [32];
int1 local_38 [32];
if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) &&
(*(long *)(param_1 + 0x30) == 0)) {
minja::Value::
get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
();
/* try { // try from 001c84e2 to 001c84e9 has its CatchHandler @ 001c85d6 */
uVar1 = nlohmann::json_abi_v3_11_3::detail::
hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(abStack_58);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(abStack_58,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)abStack_58);
return uVar1;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001c851b to 001c852e has its CatchHandler @ 001c85c9 */
minja::Value::dump_abi_cxx11_((int)local_38,SUB81(param_1,0));
/* try { // try from 001c852f to 001c8542 has its CatchHandler @ 001c85a9 */
operator+((char *)abStack_58,(string *)"Unsupported type for hashing: ");
/* try { // try from 001c8546 to 001c8568 has its CatchHandler @ 001c8569 */
std::runtime_error::runtime_error(this_00,(string *)abStack_58);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
|
|
16,736
|
xml_parse_skip_meta
|
eloqsql/storage/maria/libmarias3/src/xml.c
|
static void xml_parse_skip_meta(struct xml_parser* parser) {
if ('<' == xml_parser_peek(parser, CURRENT_CHARACTER) &&
'?' == xml_parser_peek(parser, NEXT_CHARACTER)) {
size_t pos = parser->position;
while (pos < parser->length) {
if ('?' == parser->buffer[pos] &&
'>' == parser->buffer[pos + 1]) {
parser->position = pos + 2;
return;
}
pos++;
}
}
}
|
O0
|
c
|
xml_parse_skip_meta:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x32dc0
movzbl %al, %ecx
movl $0x3c, %eax
cmpl %ecx, %eax
jne 0x32210
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x32dc0
movzbl %al, %ecx
movl $0x3f, %eax
cmpl %ecx, %eax
jne 0x32210
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x3220e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movl $0x3f, %eax
cmpl %ecx, %eax
jne 0x32200
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rax,%rcx), %ecx
movl $0x3e, %eax
cmpl %ecx, %eax
jne 0x32200
movq -0x10(%rbp), %rcx
addq $0x2, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x32210
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x321af
jmp 0x32210
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
xml_parse_skip_meta:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call xml_parser_peek
movzx ecx, al
mov eax, 3Ch ; '<'
cmp eax, ecx
jnz loc_32210
mov rdi, [rbp+var_8]
mov esi, 1
call xml_parser_peek
movzx ecx, al
mov eax, 3Fh ; '?'
cmp eax, ecx
jnz short loc_32210
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_10], rax
loc_321AF:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jnb short loc_3220E
mov rax, [rbp+var_8]
mov rax, [rax]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rax+rcx]
mov eax, 3Fh ; '?'
cmp eax, ecx
jnz short loc_32200
mov rax, [rbp+var_8]
mov rax, [rax]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rax+rcx+1]
mov eax, 3Eh ; '>'
cmp eax, ecx
jnz short loc_32200
mov rcx, [rbp+var_10]
add rcx, 2
mov rax, [rbp+var_8]
mov [rax+8], rcx
jmp short loc_32210
loc_32200:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_321AF
loc_3220E:
jmp short $+2
loc_32210:
add rsp, 10h
pop rbp
retn
|
long long xml_parse_skip_meta(_QWORD *a1)
{
int v1; // ecx
long long result; // rax
int v3; // ecx
unsigned long long i; // [rsp+0h] [rbp-10h]
v1 = (unsigned __int8)xml_parser_peek(a1, 0LL);
result = 60LL;
if ( v1 == 60 )
{
v3 = (unsigned __int8)xml_parser_peek(a1, 1LL);
result = 63LL;
if ( v3 == 63 )
{
for ( i = a1[1]; ; ++i )
{
result = i;
if ( i >= a1[2] )
break;
if ( *(_BYTE *)(*a1 + i) == 63 && *(_BYTE *)(*a1 + i + 1) == 62 )
{
result = (long long)a1;
a1[1] = i + 2;
return result;
}
}
}
}
return result;
}
|
xml_parse_skip_meta:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00132dc0
MOVZX ECX,AL
MOV EAX,0x3c
CMP EAX,ECX
JNZ 0x00132210
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x1
CALL 0x00132dc0
MOVZX ECX,AL
MOV EAX,0x3f
CMP EAX,ECX
JNZ 0x00132210
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x10],RAX
LAB_001321af:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x0013220e
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
MOV EAX,0x3f
CMP EAX,ECX
JNZ 0x00132200
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + RCX*0x1 + 0x1]
MOV EAX,0x3e
CMP EAX,ECX
JNZ 0x00132200
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x2
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x00132210
LAB_00132200:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001321af
LAB_0013220e:
JMP 0x00132210
LAB_00132210:
ADD RSP,0x10
POP RBP
RET
|
void xml_parse_skip_meta(long *param_1)
{
char cVar1;
ulong local_18;
cVar1 = xml_parser_peek(param_1,0);
if ((cVar1 == '<') && (cVar1 = xml_parser_peek(param_1,1), cVar1 == '?')) {
for (local_18 = param_1[1]; local_18 < (ulong)param_1[2]; local_18 = local_18 + 1) {
if ((*(char *)(*param_1 + local_18) == '?') && (*(char *)(*param_1 + 1 + local_18) == '>')) {
param_1[1] = local_18 + 2;
return;
}
}
}
return;
}
|
|
16,737
|
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
|
monkey531[P]llama/common/./json.hpp
|
iterator find(const key_type& key)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xa1ae0
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rdi
callq 0xa1b50
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xa1b10
testb $0x1, %al
jne 0xd4326
jmp 0xd4366
movq 0x10(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xa1b80
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x20(%rsp), %rdx
callq 0xcf9a0
testb $0x1, %al
jne 0xd4356
jmp 0xd4358
jmp 0xd4375
jmp 0xd435a
leaq 0x30(%rsp), %rdi
callq 0xa1ef0
jmp 0xd4302
movq 0x10(%rsp), %rdi
callq 0xa1b50
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rdi, [rsp+38h+var_10]
mov [rsp+38h+var_28], rdi
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE5beginEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::begin(void)
mov [rsp+38h+var_8], rax
loc_D4302:
mov rdi, [rsp+38h+var_28]
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void)
mov [rsp+38h+var_20], rax
lea rdi, [rsp+38h+var_8]
lea rsi, [rsp+38h+var_20]
call _ZN9__gnu_cxxneIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbRKNS_17__normal_iteratorIT_T0_EEST_; __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&)
test al, 1
jnz short loc_D4326
jmp short loc_D4366
loc_D4326:
mov rax, [rsp+38h+var_28]
add rax, 18h
mov [rsp+38h+var_30], rax
lea rdi, [rsp+38h+var_8]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator->(void)
mov rdi, [rsp+38h+var_30]
mov rsi, rax
mov rdx, [rsp+38h+var_18]
call _ZNKSt8equal_toIvEclIRKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEESI_EEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSJ_OSK_
test al, 1
jnz short loc_D4356
jmp short loc_D4358
loc_D4356:
jmp short loc_D4375
loc_D4358:
jmp short $+2
loc_D435A:
lea rdi, [rsp+38h+var_8]
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator++(void)
jmp short loc_D4302
loc_D4366:
mov rdi, [rsp+38h+var_28]
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void)
mov [rsp+38h+var_8], rax
loc_D4375:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::find(
long long a1,
long long a2)
{
long long v2; // rax
long long v4; // [rsp+18h] [rbp-20h] BYREF
long long v5; // [rsp+20h] [rbp-18h]
long long v6; // [rsp+28h] [rbp-10h]
long long i; // [rsp+30h] [rbp-8h] BYREF
v6 = a1;
v5 = a2;
for ( i = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::begin(a1);
;
__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator++(&i) )
{
v4 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(a1);
if ( !__gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>(
(long long)&i,
(long long)&v4) )
break;
v2 = __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator->((long long)&i);
if ( (std::equal_to<void>::operator()<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>(
a1 + 24,
v2,
v5) & 1) != 0 )
return i;
}
return std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(a1);
}
|
find:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RDI,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x001a1ae0
MOV qword ptr [RSP + 0x30],RAX
LAB_001d4302:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001a1b50
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x18]
CALL 0x001a1b10
TEST AL,0x1
JNZ 0x001d4326
JMP 0x001d4366
LAB_001d4326:
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x18
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x30]
CALL 0x001a1b80
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x001cf9a0
TEST AL,0x1
JNZ 0x001d4356
JMP 0x001d4358
LAB_001d4356:
JMP 0x001d4375
LAB_001d4358:
JMP 0x001d435a
LAB_001d435a:
LEA RDI,[RSP + 0x30]
CALL 0x001a1ef0
JMP 0x001d4302
LAB_001d4366:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001a1b50
MOV qword ptr [RSP + 0x30],RAX
LAB_001d4375:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::find(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1)
{
bool bVar1;
basic_json *pbVar2;
ulong uVar3;
int8 uVar4;
int8 local_20;
basic_json *local_18;
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*local_10;
int8 local_8;
local_18 = param_1;
local_10 = this;
local_8 = std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::begin((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this);
while( true ) {
local_20 = std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::end((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this);
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_8,(__normal_iterator *)&local_20);
if (!bVar1) {
uVar4 = std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::end((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this);
return uVar4;
}
pbVar2 = (basic_json *)
__gnu_cxx::
__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>
::operator->((__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>
*)&local_8);
uVar3 = std::equal_to<void>::operator()((equal_to<void> *)(this + 0x18),pbVar2,local_18);
if ((uVar3 & 1) != 0) break;
__gnu_cxx::
__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>
::operator++((__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>
*)&local_8);
}
return local_8;
}
|
|
16,738
|
iq3_find_best_neighbour
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
static int iq3_find_best_neighbour(const uint16_t * restrict neighbours, const uint32_t * restrict grid,
const float * restrict xval, const float * restrict weight, float scale, int8_t * restrict L) {
int num_neighbors = neighbours[0];
GGML_ASSERT(num_neighbors > 0);
float best_d2 = FLT_MAX;
int grid_index = -1;
for (int j = 1; j <= num_neighbors; ++j) {
const int8_t * pg = (const int8_t *)(grid + neighbours[j]);
float d2 = 0;
for (int i = 0; i < 4; ++i) {
float q = pg[i];
float diff = scale*q - xval[i];
d2 += weight[i]*diff*diff;
}
if (d2 < best_d2) {
best_d2 = d2; grid_index = neighbours[j];
}
}
GGML_ASSERT(grid_index >= 0);
const int8_t * pg = (const int8_t *)(grid + grid_index);
for (int i = 0; i < 4; ++i) L[i] = (pg[i] - 1)/2;
return grid_index;
}
|
O0
|
c
|
iq3_find_best_neighbour:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movss %xmm0, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq -0x8(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jg 0x893b2
leaq 0x379c4(%rip), %rdi # 0xc0d5c
movl $0xdc7, %esi # imm = 0xDC7
leaq 0x28265(%rip), %rdx # 0xb1609
leaq 0x38c2f(%rip), %rcx # 0xc1fda
movb $0x0, %al
callq 0x48a00
movss 0x2cf76(%rip), %xmm0 # 0xb6330
movss %xmm0, -0x38(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x34(%rbp), %eax
jg 0x894be
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq -0x40(%rbp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
cmpl $0x4, -0x50(%rbp)
jge 0x89486
movq -0x48(%rbp), %rax
movslq -0x50(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x54(%rbp)
movss -0x24(%rbp), %xmm0
movss -0x54(%rbp), %xmm2
movq -0x18(%rbp), %rax
movslq -0x50(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x58(%rbp)
movq -0x20(%rbp), %rax
movslq -0x50(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
mulss -0x58(%rbp), %xmm0
movss -0x58(%rbp), %xmm2
movss -0x4c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x89406
movss -0x4c(%rbp), %xmm1
movss -0x38(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x894ae
movss -0x4c(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x3c(%rbp)
jmp 0x894b0
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x893cd
cmpl $0x0, -0x3c(%rbp)
jge 0x894e5
leaq 0x37891(%rip), %rdi # 0xc0d5c
movl $0xdd6, %esi # imm = 0xDD6
leaq 0x28132(%rip), %rdx # 0xb1609
leaq 0x38b0e(%rip), %rcx # 0xc1fec
movb $0x0, %al
callq 0x48a00
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
cmpl $0x4, -0x64(%rbp)
jge 0x89534
movq -0x60(%rbp), %rax
movslq -0x64(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movb %al, %dl
movq -0x30(%rbp), %rax
movslq -0x64(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x894ff
movl -0x3c(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
|
iq3_find_best_neighbour:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
movss [rbp+var_24], xmm0
mov [rbp+var_30], r8
mov rax, [rbp+var_8]
movzx eax, word ptr [rax]
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jg short loc_893B2
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0DC7h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNumNeighbors0; "num_neighbors > 0"
mov al, 0
call _ggml_abort
loc_893B2:
movss xmm0, cs:dword_B6330
movss [rbp+var_38], xmm0
mov [rbp+var_3C], 0FFFFFFFFh
mov [rbp+var_40], 1
loc_893CD:
mov eax, [rbp+var_40]
cmp eax, [rbp+var_34]
jg loc_894BE
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
movsxd rdx, [rbp+var_40]
movzx ecx, word ptr [rcx+rdx*2]
movsxd rcx, ecx
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
xorps xmm0, xmm0
movss [rbp+var_4C], xmm0
mov [rbp+var_50], 0
loc_89406:
cmp [rbp+var_50], 4
jge short loc_89486
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_50]
movsx eax, byte ptr [rax+rcx]
cvtsi2ss xmm0, eax
movss [rbp+var_54], xmm0
movss xmm0, [rbp+var_24]
movss xmm2, [rbp+var_54]
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_50]
movss xmm1, dword ptr [rax+rcx*4]
movd eax, xmm1
xor eax, 80000000h
movd xmm1, eax
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_58], xmm0
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_50]
movss xmm0, dword ptr [rax+rcx*4]
mulss xmm0, [rbp+var_58]
movss xmm2, [rbp+var_58]
movss xmm1, [rbp+var_4C]
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_4C], xmm0
mov eax, [rbp+var_50]
add eax, 1
mov [rbp+var_50], eax
jmp short loc_89406
loc_89486:
movss xmm1, [rbp+var_4C]
movss xmm0, [rbp+var_38]
ucomiss xmm0, xmm1
jbe short loc_894AE
movss xmm0, [rbp+var_4C]
movss [rbp+var_38], xmm0
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_40]
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_3C], eax
loc_894AE:
jmp short $+2
loc_894B0:
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_40], eax
jmp loc_893CD
loc_894BE:
cmp [rbp+var_3C], 0
jge short loc_894E5
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0DD6h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGridIndex0; "grid_index >= 0"
mov al, 0
call _ggml_abort
loc_894E5:
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_3C]
shl rcx, 2
add rax, rcx
mov [rbp+var_60], rax
mov [rbp+var_64], 0
loc_894FF:
cmp [rbp+var_64], 4
jge short loc_89534
mov rax, [rbp+var_60]
movsxd rcx, [rbp+var_64]
movsx eax, byte ptr [rax+rcx]
sub eax, 1
mov ecx, 2
cdq
idiv ecx
mov dl, al
mov rax, [rbp+var_30]
movsxd rcx, [rbp+var_64]
mov [rax+rcx], dl
mov eax, [rbp+var_64]
add eax, 1
mov [rbp+var_64], eax
jmp short loc_894FF
loc_89534:
mov eax, [rbp+var_3C]
add rsp, 70h
pop rbp
retn
|
long long iq3_find_best_neighbour(_WORD *a1, long long a2, long long a3, long long a4, long long a5, float a6)
{
int k; // [rsp+Ch] [rbp-64h]
float v8; // [rsp+18h] [rbp-58h]
int j; // [rsp+20h] [rbp-50h]
float v10; // [rsp+24h] [rbp-4Ch]
int i; // [rsp+30h] [rbp-40h]
int v12; // [rsp+34h] [rbp-3Ch]
float v13; // [rsp+38h] [rbp-38h]
if ( !*a1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
3527,
(long long)"GGML_ASSERT(%s) failed",
"num_neighbors > 0");
v13 = 3.4028235e38;
v12 = -1;
for ( i = 1; i <= (unsigned __int16)*a1; ++i )
{
v10 = 0.0;
for ( j = 0; j < 4; ++j )
{
v8 = (float)(a6 * (float)*(char *)(4LL * (unsigned __int16)a1[i] + a2 + j))
+ COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)*(unsigned int *)(a3 + 4LL * j)) ^ 0x80000000);
v10 = (float)((float)(*(float *)(a4 + 4LL * j) * v8) * v8) + v10;
}
if ( v13 > v10 )
{
v13 = v10;
v12 = (unsigned __int16)a1[i];
}
}
if ( v12 < 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
3542,
(long long)"GGML_ASSERT(%s) failed",
"grid_index >= 0");
for ( k = 0; k < 4; ++k )
*(_BYTE *)(a5 + k) = (*(char *)(4LL * v12 + a2 + k) - 1) / 2;
return (unsigned int)v12;
}
|
iq3_find_best_neighbour:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOVSS dword ptr [RBP + -0x24],XMM0
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x0
JG 0x001893b2
LEA RDI,[0x1c0d5c]
MOV ESI,0xdc7
LEA RDX,[0x1b1609]
LEA RCX,[0x1c1fda]
MOV AL,0x0
CALL 0x00148a00
LAB_001893b2:
MOVSS XMM0,dword ptr [0x001b6330]
MOVSS dword ptr [RBP + -0x38],XMM0
MOV dword ptr [RBP + -0x3c],0xffffffff
MOV dword ptr [RBP + -0x40],0x1
LAB_001893cd:
MOV EAX,dword ptr [RBP + -0x40]
CMP EAX,dword ptr [RBP + -0x34]
JG 0x001894be
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RBP + -0x40]
MOVZX ECX,word ptr [RCX + RDX*0x2]
MOVSXD RCX,ECX
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x4c],XMM0
MOV dword ptr [RBP + -0x50],0x0
LAB_00189406:
CMP dword ptr [RBP + -0x50],0x4
JGE 0x00189486
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x50]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM0,EAX
MOVSS dword ptr [RBP + -0x54],XMM0
MOVSS XMM0,dword ptr [RBP + -0x24]
MOVSS XMM2,dword ptr [RBP + -0x54]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x50]
MOVSS XMM1,dword ptr [RAX + RCX*0x4]
MOVD EAX,XMM1
XOR EAX,0x80000000
MOVD XMM1,EAX
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x58],XMM0
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x50]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MULSS XMM0,dword ptr [RBP + -0x58]
MOVSS XMM2,dword ptr [RBP + -0x58]
MOVSS XMM1,dword ptr [RBP + -0x4c]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x4c],XMM0
MOV EAX,dword ptr [RBP + -0x50]
ADD EAX,0x1
MOV dword ptr [RBP + -0x50],EAX
JMP 0x00189406
LAB_00189486:
MOVSS XMM1,dword ptr [RBP + -0x4c]
MOVSS XMM0,dword ptr [RBP + -0x38]
UCOMISS XMM0,XMM1
JBE 0x001894ae
MOVSS XMM0,dword ptr [RBP + -0x4c]
MOVSS dword ptr [RBP + -0x38],XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x40]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x3c],EAX
LAB_001894ae:
JMP 0x001894b0
LAB_001894b0:
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
JMP 0x001893cd
LAB_001894be:
CMP dword ptr [RBP + -0x3c],0x0
JGE 0x001894e5
LEA RDI,[0x1c0d5c]
MOV ESI,0xdd6
LEA RDX,[0x1b1609]
LEA RCX,[0x1c1fec]
MOV AL,0x0
CALL 0x00148a00
LAB_001894e5:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x3c]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV dword ptr [RBP + -0x64],0x0
LAB_001894ff:
CMP dword ptr [RBP + -0x64],0x4
JGE 0x00189534
MOV RAX,qword ptr [RBP + -0x60]
MOVSXD RCX,dword ptr [RBP + -0x64]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
SUB EAX,0x1
MOV ECX,0x2
CDQ
IDIV ECX
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RCX,dword ptr [RBP + -0x64]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x64]
ADD EAX,0x1
MOV dword ptr [RBP + -0x64],EAX
JMP 0x001894ff
LAB_00189534:
MOV EAX,dword ptr [RBP + -0x3c]
ADD RSP,0x70
POP RBP
RET
|
uint iq3_find_best_neighbour
(float param_1,ushort *param_2,long param_3,long param_4,long param_5,long param_6)
{
ushort uVar1;
float fVar2;
int local_6c;
int local_58;
float local_54;
int local_48;
uint local_44;
float local_40;
uVar1 = *param_2;
if (uVar1 == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0xdc7,"GGML_ASSERT(%s) failed","num_neighbors > 0");
}
local_40 = DAT_001b6330;
local_44 = 0xffffffff;
for (local_48 = 1; local_48 <= (int)(uint)uVar1; local_48 = local_48 + 1) {
local_54 = 0.0;
for (local_58 = 0; local_58 < 4; local_58 = local_58 + 1) {
fVar2 = param_1 * (float)(int)*(char *)(param_3 + (long)(int)(uint)param_2[local_48] * 4 +
(long)local_58) +
-*(float *)(param_4 + (long)local_58 * 4);
local_54 = *(float *)(param_5 + (long)local_58 * 4) * fVar2 * fVar2 + local_54;
}
if (local_54 < local_40) {
local_40 = local_54;
local_44 = (uint)param_2[local_48];
}
}
if ((int)local_44 < 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0xdd6,"GGML_ASSERT(%s) failed","grid_index >= 0");
}
for (local_6c = 0; local_6c < 4; local_6c = local_6c + 1) {
*(char *)(param_6 + local_6c) =
(char)((long)(*(char *)(param_3 + (long)(int)local_44 * 4 + (long)local_6c) + -1) / 2);
}
return local_44;
}
|
|
16,739
|
iq3_find_best_neighbour
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
static int iq3_find_best_neighbour(const uint16_t * restrict neighbours, const uint32_t * restrict grid,
const float * restrict xval, const float * restrict weight, float scale, int8_t * restrict L) {
int num_neighbors = neighbours[0];
GGML_ASSERT(num_neighbors > 0);
float best_d2 = FLT_MAX;
int grid_index = -1;
for (int j = 1; j <= num_neighbors; ++j) {
const int8_t * pg = (const int8_t *)(grid + neighbours[j]);
float d2 = 0;
for (int i = 0; i < 4; ++i) {
float q = pg[i];
float diff = scale*q - xval[i];
d2 += weight[i]*diff*diff;
}
if (d2 < best_d2) {
best_d2 = d2; grid_index = neighbours[j];
}
}
GGML_ASSERT(grid_index >= 0);
const int8_t * pg = (const int8_t *)(grid + grid_index);
for (int i = 0; i < 4; ++i) L[i] = (pg[i] - 1)/2;
return grid_index;
}
|
O1
|
c
|
iq3_find_best_neighbour:
pushq %rbp
pushq %r14
pushq %rbx
movzwl (%rdi), %r9d
testq %r9, %r9
je 0x3cf4a
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movss 0x13ef1(%rip), %xmm1 # 0x50dac
movl $0x1, %r10d
movzwl (%rdi,%r10,2), %r11d
leaq (%rsi,%r11,4), %rbx
xorps %xmm2, %xmm2
xorl %r14d, %r14d
movsbl (%rbx,%r14), %ebp
xorps %xmm3, %xmm3
cvtsi2ss %ebp, %xmm3
mulss %xmm0, %xmm3
subss (%rdx,%r14,4), %xmm3
movss (%rcx,%r14,4), %xmm4
mulss %xmm3, %xmm4
mulss %xmm3, %xmm4
addss %xmm4, %xmm2
incq %r14
cmpq $0x4, %r14
jne 0x3ced0
ucomiss %xmm2, %xmm1
cmoval %r11d, %eax
minss %xmm1, %xmm2
leaq 0x1(%r10), %r11
movaps %xmm2, %xmm1
cmpq %r9, %r10
movq %r11, %r10
jne 0x3cec1
testl %eax, %eax
js 0x3cf66
movl %eax, %ecx
leaq (%rsi,%rcx,4), %rcx
xorl %edx, %edx
movsbl (%rcx,%rdx), %esi
movl %esi, %edi
decl %edi
shrl $0x1f, %edi
addl %edi, %esi
decl %esi
shrl %esi
movb %sil, (%r8,%rdx)
incq %rdx
cmpq $0x4, %rdx
jne 0x3cf27
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1e8b3(%rip), %rdi # 0x5b804
leaq 0xf669(%rip), %rdx # 0x4c5c1
leaq 0x1fad3(%rip), %rcx # 0x5ca32
movl $0xdc7, %esi # imm = 0xDC7
jmp 0x3cf80
leaq 0x1e897(%rip), %rdi # 0x5b804
leaq 0xf64d(%rip), %rdx # 0x4c5c1
leaq 0x1fac9(%rip), %rcx # 0x5ca44
movl $0xdd6, %esi # imm = 0xDD6
xorl %eax, %eax
callq 0x18ce0
|
iq3_find_best_neighbour:
push rbp
push r14
push rbx
movzx r9d, word ptr [rdi]
test r9, r9
jz loc_3CF4A
mov eax, 0FFFFFFFFh
movss xmm1, cs:dword_50DAC
mov r10d, 1
loc_3CEC1:
movzx r11d, word ptr [rdi+r10*2]
lea rbx, [rsi+r11*4]
xorps xmm2, xmm2
xor r14d, r14d
loc_3CED0:
movsx ebp, byte ptr [rbx+r14]
xorps xmm3, xmm3
cvtsi2ss xmm3, ebp
mulss xmm3, xmm0
subss xmm3, dword ptr [rdx+r14*4]
movss xmm4, dword ptr [rcx+r14*4]
mulss xmm4, xmm3
mulss xmm4, xmm3
addss xmm2, xmm4
inc r14
cmp r14, 4
jnz short loc_3CED0
ucomiss xmm1, xmm2
cmova eax, r11d
minss xmm2, xmm1
lea r11, [r10+1]
movaps xmm1, xmm2
cmp r10, r9
mov r10, r11
jnz short loc_3CEC1
test eax, eax
js short loc_3CF66
mov ecx, eax
lea rcx, [rsi+rcx*4]
xor edx, edx
loc_3CF27:
movsx esi, byte ptr [rcx+rdx]
mov edi, esi
dec edi
shr edi, 1Fh
add esi, edi
dec esi
shr esi, 1
mov [r8+rdx], sil
inc rdx
cmp rdx, 4
jnz short loc_3CF27
pop rbx
pop r14
pop rbp
retn
loc_3CF4A:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNumNeighbors0; "num_neighbors > 0"
mov esi, 0DC7h
jmp short loc_3CF80
loc_3CF66:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGridIndex0; "grid_index >= 0"
mov esi, 0DD6h
loc_3CF80:
xor eax, eax
call _ggml_abort
|
long long iq3_find_best_neighbour(_WORD *a1, long long a2, long long a3, long long a4, long long a5, float a6)
{
long long v6; // r9
long long result; // rax
float v8; // xmm1_4
long long v9; // r10
float v10; // xmm2_4
long long i; // r14
float v12; // xmm3_4
long long j; // rdx
const char *v15; // rcx
int v16; // esi
v6 = (unsigned __int16)*a1;
if ( !*a1 )
{
v15 = "num_neighbors > 0";
v16 = 3527;
goto LABEL_14;
}
result = 0xFFFFFFFFLL;
v8 = 3.4028235e38;
v9 = 1LL;
do
{
v10 = 0.0;
for ( i = 0LL; i != 4; ++i )
{
v12 = (float)((float)*(char *)(a2 + 4LL * (unsigned __int16)a1[v9] + i) * a6) - *(float *)(a3 + 4 * i);
v10 = v10 + (float)((float)(*(float *)(a4 + 4 * i) * v12) * v12);
}
if ( v8 > v10 )
result = (unsigned __int16)a1[v9];
v8 = fminf(v10, v8);
}
while ( v9++ != v6 );
if ( (int)result < 0 )
{
v15 = "grid_index >= 0";
v16 = 3542;
LABEL_14:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
v16,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v15,
a5,
v6);
}
for ( j = 0LL; j != 4; ++j )
*(_BYTE *)(a5 + j) = (((unsigned int)(*(char *)(a2 + 4LL * (unsigned int)result + j) - 1) >> 31)
+ *(char *)(a2 + 4LL * (unsigned int)result + j)
- 1) >> 1;
return result;
}
|
iq3_find_best_neighbour:
PUSH RBP
PUSH R14
PUSH RBX
MOVZX R9D,word ptr [RDI]
TEST R9,R9
JZ 0x0013cf4a
MOV EAX,0xffffffff
MOVSS XMM1,dword ptr [0x00150dac]
MOV R10D,0x1
LAB_0013cec1:
MOVZX R11D,word ptr [RDI + R10*0x2]
LEA RBX,[RSI + R11*0x4]
XORPS XMM2,XMM2
XOR R14D,R14D
LAB_0013ced0:
MOVSX EBP,byte ptr [RBX + R14*0x1]
XORPS XMM3,XMM3
CVTSI2SS XMM3,EBP
MULSS XMM3,XMM0
SUBSS XMM3,dword ptr [RDX + R14*0x4]
MOVSS XMM4,dword ptr [RCX + R14*0x4]
MULSS XMM4,XMM3
MULSS XMM4,XMM3
ADDSS XMM2,XMM4
INC R14
CMP R14,0x4
JNZ 0x0013ced0
UCOMISS XMM1,XMM2
CMOVA EAX,R11D
MINSS XMM2,XMM1
LEA R11,[R10 + 0x1]
MOVAPS XMM1,XMM2
CMP R10,R9
MOV R10,R11
JNZ 0x0013cec1
TEST EAX,EAX
JS 0x0013cf66
MOV ECX,EAX
LEA RCX,[RSI + RCX*0x4]
XOR EDX,EDX
LAB_0013cf27:
MOVSX ESI,byte ptr [RCX + RDX*0x1]
MOV EDI,ESI
DEC EDI
SHR EDI,0x1f
ADD ESI,EDI
DEC ESI
SHR ESI,0x1
MOV byte ptr [R8 + RDX*0x1],SIL
INC RDX
CMP RDX,0x4
JNZ 0x0013cf27
POP RBX
POP R14
POP RBP
RET
LAB_0013cf4a:
LEA RDI,[0x15b804]
LEA RDX,[0x14c5c1]
LEA RCX,[0x15ca32]
MOV ESI,0xdc7
JMP 0x0013cf80
LAB_0013cf66:
LEA RDI,[0x15b804]
LEA RDX,[0x14c5c1]
LEA RCX,[0x15ca44]
MOV ESI,0xdd6
LAB_0013cf80:
XOR EAX,EAX
CALL 0x00118ce0
|
void iq3_find_best_neighbour
(float param_1,ushort *param_2,long param_3,long param_4,long param_5,long param_6)
{
ulong uVar1;
ulong uVar2;
char *pcVar3;
int iVar4;
int8 uVar5;
ulong uVar6;
long lVar7;
bool bVar8;
float fVar9;
float fVar10;
float fVar11;
if ((ulong)*param_2 == 0) {
pcVar3 = "num_neighbors > 0";
uVar5 = 0xdc7;
}
else {
uVar2 = 0xffffffff;
uVar6 = 1;
fVar9 = DAT_00150dac;
do {
fVar10 = 0.0;
lVar7 = 0;
do {
fVar11 = (float)(int)*(char *)(param_3 + (ulong)param_2[uVar6] * 4 + lVar7) * param_1 -
*(float *)(param_4 + lVar7 * 4);
fVar10 = fVar10 + *(float *)(param_5 + lVar7 * 4) * fVar11 * fVar11;
lVar7 = lVar7 + 1;
} while (lVar7 != 4);
uVar1 = (ulong)param_2[uVar6];
if (fVar9 <= fVar10) {
fVar10 = fVar9;
uVar1 = uVar2;
}
uVar2 = uVar1;
fVar9 = fVar10;
bVar8 = uVar6 != *param_2;
uVar6 = uVar6 + 1;
} while (bVar8);
if (-1 < (int)uVar2) {
lVar7 = 0;
do {
iVar4 = (int)*(char *)(param_3 + uVar2 * 4 + lVar7);
*(char *)(param_6 + lVar7) = (char)((iVar4 - (iVar4 + -1 >> 0x1f)) - 1U >> 1);
lVar7 = lVar7 + 1;
} while (lVar7 != 4);
return;
}
pcVar3 = "grid_index >= 0";
uVar5 = 0xdd6;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,uVar5,"GGML_ASSERT(%s) failed",pcVar3);
}
|
|
16,740
|
common_model_params_to_llama(common_params&)
|
monkey531[P]llama/common/common.cpp
|
struct llama_model_params common_model_params_to_llama(common_params & params) {
auto mparams = llama_model_default_params();
if (!params.devices.empty()) {
mparams.devices = params.devices.data();
}
if (params.n_gpu_layers != -1) {
mparams.n_gpu_layers = params.n_gpu_layers;
}
mparams.main_gpu = params.main_gpu;
mparams.split_mode = params.split_mode;
mparams.tensor_split = params.tensor_split;
mparams.use_mmap = params.use_mmap;
mparams.use_mlock = params.use_mlock;
mparams.check_tensors = params.check_tensors;
if (params.kv_overrides.empty()) {
mparams.kv_overrides = NULL;
} else {
GGML_ASSERT(params.kv_overrides.back().key[0] == 0 && "KV overrides not terminated with empty key");
mparams.kv_overrides = params.kv_overrides.data();
}
return mparams;
}
|
O3
|
cpp
|
common_model_params_to_llama(common_params&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1bed0
movq 0x50(%r14), %rax
cmpq 0x58(%r14), %rax
je 0x7a7b0
movq %rax, (%rbx)
movl 0x68(%r14), %eax
cmpl $-0x1, %eax
je 0x7a7bc
movl %eax, 0x8(%rbx)
movl 0x6c(%r14), %eax
movl %eax, 0x10(%rbx)
movl 0x270(%r14), %eax
movl %eax, 0xc(%rbx)
leaq 0x70(%r14), %rax
movq %rax, 0x18(%rbx)
movb 0xfe9(%r14), %al
movb %al, 0x39(%rbx)
movb 0xfea(%r14), %al
movb %al, 0x3a(%rbx)
movb 0xff0(%r14), %al
movb %al, 0x3b(%rbx)
movq 0xf48(%r14), %rax
movq 0xf50(%r14), %rcx
cmpq %rcx, %rax
je 0x7a830
cmpb $0x0, -0x104(%rcx)
je 0x7a832
leaq 0x79563(%rip), %rdi # 0xf3d79
leaq 0x6fdb8(%rip), %rdx # 0xea5d5
leaq 0x79a5a(%rip), %rcx # 0xf427e
movl $0x44b, %esi # imm = 0x44B
xorl %eax, %eax
callq 0x1bef0
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_Z28common_model_params_to_llamaR13common_params:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _llama_model_default_params
mov rax, [r14+50h]
cmp rax, [r14+58h]
jz short loc_7A7B0
mov [rbx], rax
loc_7A7B0:
mov eax, [r14+68h]
cmp eax, 0FFFFFFFFh
jz short loc_7A7BC
mov [rbx+8], eax
loc_7A7BC:
mov eax, [r14+6Ch]
mov [rbx+10h], eax
mov eax, [r14+270h]
mov [rbx+0Ch], eax
lea rax, [r14+70h]
mov [rbx+18h], rax
mov al, [r14+0FE9h]
mov [rbx+39h], al
mov al, [r14+0FEAh]
mov [rbx+3Ah], al
mov al, [r14+0FF0h]
mov [rbx+3Bh], al
mov rax, [r14+0F48h]
mov rcx, [r14+0F50h]
cmp rax, rcx
jz short loc_7A830
cmp byte ptr [rcx-104h], 0
jz short loc_7A832
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aParamsKvOverri; "params.kv_overrides.back().key[0] == 0 "...
mov esi, 44Bh
xor eax, eax
call _ggml_abort
loc_7A830:
xor eax, eax
loc_7A832:
mov [rbx+30h], rax
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
|
common_params * common_model_params_to_llama(common_params *a1, long long a2)
{
long long v2; // rax
int v3; // eax
long long v4; // rax
long long v5; // rcx
llama_model_default_params(a1);
v2 = *(_QWORD *)(a2 + 80);
if ( v2 != *(_QWORD *)(a2 + 88) )
*(_QWORD *)a1 = v2;
v3 = *(_DWORD *)(a2 + 104);
if ( v3 != -1 )
*((_DWORD *)a1 + 2) = v3;
*((_DWORD *)a1 + 4) = *(_DWORD *)(a2 + 108);
*((_DWORD *)a1 + 3) = *(_DWORD *)(a2 + 624);
*((_QWORD *)a1 + 3) = a2 + 112;
*((_BYTE *)a1 + 57) = *(_BYTE *)(a2 + 4073);
*((_BYTE *)a1 + 58) = *(_BYTE *)(a2 + 4074);
*((_BYTE *)a1 + 59) = *(_BYTE *)(a2 + 4080);
v4 = *(_QWORD *)(a2 + 3912);
v5 = *(_QWORD *)(a2 + 3920);
if ( v4 == v5 )
goto LABEL_8;
if ( *(_BYTE *)(v5 - 260) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1099LL,
"GGML_ASSERT(%s) failed",
"params.kv_overrides.back().key[0] == 0 && \"KV overrides not terminated with empty key\"");
LABEL_8:
v4 = 0LL;
}
*((_QWORD *)a1 + 6) = v4;
return a1;
}
|
common_model_params_to_llama:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0011bed0
MOV RAX,qword ptr [R14 + 0x50]
CMP RAX,qword ptr [R14 + 0x58]
JZ 0x0017a7b0
MOV qword ptr [RBX],RAX
LAB_0017a7b0:
MOV EAX,dword ptr [R14 + 0x68]
CMP EAX,-0x1
JZ 0x0017a7bc
MOV dword ptr [RBX + 0x8],EAX
LAB_0017a7bc:
MOV EAX,dword ptr [R14 + 0x6c]
MOV dword ptr [RBX + 0x10],EAX
MOV EAX,dword ptr [R14 + 0x270]
MOV dword ptr [RBX + 0xc],EAX
LEA RAX,[R14 + 0x70]
MOV qword ptr [RBX + 0x18],RAX
MOV AL,byte ptr [R14 + 0xfe9]
MOV byte ptr [RBX + 0x39],AL
MOV AL,byte ptr [R14 + 0xfea]
MOV byte ptr [RBX + 0x3a],AL
MOV AL,byte ptr [R14 + 0xff0]
MOV byte ptr [RBX + 0x3b],AL
MOV RAX,qword ptr [R14 + 0xf48]
MOV RCX,qword ptr [R14 + 0xf50]
CMP RAX,RCX
JZ 0x0017a830
CMP byte ptr [RCX + -0x104],0x0
JZ 0x0017a832
LEA RDI,[0x1f3d79]
LEA RDX,[0x1ea5d5]
LEA RCX,[0x1f427e]
MOV ESI,0x44b
XOR EAX,EAX
CALL 0x0011bef0
LAB_0017a830:
XOR EAX,EAX
LAB_0017a832:
MOV qword ptr [RBX + 0x30],RAX
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* common_model_params_to_llama(common_params&) */
common_params * common_model_params_to_llama(common_params *param_1)
{
long lVar1;
long in_RSI;
llama_model_default_params();
if (*(long *)(in_RSI + 0x50) != *(long *)(in_RSI + 0x58)) {
*(long *)param_1 = *(long *)(in_RSI + 0x50);
}
if (*(int *)(in_RSI + 0x68) != -1) {
*(int *)(param_1 + 8) = *(int *)(in_RSI + 0x68);
}
*(int4 *)(param_1 + 0x10) = *(int4 *)(in_RSI + 0x6c);
*(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x270);
*(long *)(param_1 + 0x18) = in_RSI + 0x70;
param_1[0x39] = *(common_params *)(in_RSI + 0xfe9);
param_1[0x3a] = *(common_params *)(in_RSI + 0xfea);
param_1[0x3b] = *(common_params *)(in_RSI + 0xff0);
lVar1 = *(long *)(in_RSI + 0xf48);
if (lVar1 == *(long *)(in_RSI + 0xf50)) {
lVar1 = 0;
}
else if (*(char *)(*(long *)(in_RSI + 0xf50) + -0x104) != '\0') {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",1099,
"GGML_ASSERT(%s) failed",
"params.kv_overrides.back().key[0] == 0 && \"KV overrides not terminated with empty key\""
);
}
*(long *)(param_1 + 0x30) = lVar1;
return param_1;
}
|
|
16,741
|
ma_columndef_write
|
eloqsql/storage/maria/ma_open.c
|
my_bool _ma_columndef_write(File file, MARIA_COLUMNDEF *columndef)
{
uchar buff[MARIA_COLUMNDEF_SIZE];
uchar *ptr=buff;
uint low_offset= (uint) (columndef->offset & 0xffff);
uint high_offset= (uint) (columndef->offset >> 16);
mi_int2store(ptr,(ulong) columndef->column_nr); ptr+= 2;
mi_int2store(ptr, low_offset); ptr+= 2;
mi_int2store(ptr,columndef->type); ptr+= 2;
mi_int2store(ptr,columndef->length); ptr+= 2;
mi_int2store(ptr,columndef->fill_length); ptr+= 2;
mi_int2store(ptr,columndef->null_pos); ptr+= 2;
mi_int2store(ptr,columndef->empty_pos); ptr+= 2;
(*ptr++)= columndef->null_bit;
(*ptr++)= columndef->empty_bit;
mi_int2store(ptr, high_offset); ptr+= 2;
ptr[0]= ptr[1]= 0; ptr+= 2; /* For future */
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
}
|
O3
|
c
|
ma_columndef_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movl %edi, %ebx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movl 0x4(%rsi), %eax
movl %eax, %ecx
movzwl 0xa(%rsi), %edx
movb %dl, -0x2f(%rbp)
movb %dh, -0x30(%rbp)
movb %al, -0x2d(%rbp)
movb %ah, -0x2e(%rbp)
movzwl (%rsi), %edx
rolw $0x8, %dx
movw %dx, -0x2c(%rbp)
movzwl 0x8(%rsi), %edx
rolw $0x8, %dx
movw %dx, -0x2a(%rbp)
movzwl 0xc(%rsi), %edx
rolw $0x8, %dx
movw %dx, -0x28(%rbp)
movzwl 0xe(%rsi), %edx
rolw $0x8, %dx
movw %dx, -0x26(%rbp)
movzwl 0x10(%rsi), %edx
rolw $0x8, %dx
shrl $0x10, %ecx
movw %dx, -0x24(%rbp)
movb 0x12(%rsi), %dl
movb %dl, -0x22(%rbp)
movb 0x13(%rsi), %dl
movb %dl, -0x21(%rbp)
movb %cl, -0x1f(%rbp)
shrl $0x18, %eax
movb %al, -0x20(%rbp)
movw $0x0, -0x1e(%rbp)
leaq 0x31a237(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x80(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x6be25
leaq -0x30(%rbp), %rsi
movl $0x14, %edx
movl $0x4, %ecx
movl %ebx, %edi
callq 0x2efe4
testq %rax, %rax
setne %al
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x6be3f
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x2d44c
movq (%r14), %rax
jmp 0x6be07
callq 0x29250
|
_ma_columndef_write:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 70h
mov ebx, edi
mov rax, fs:28h
mov [rbp+var_18], rax
mov eax, [rsi+4]
mov ecx, eax
movzx edx, word ptr [rsi+0Ah]
mov [rbp+var_2F], dl
mov [rbp+var_30], dh
mov [rbp+var_2D], al
mov [rbp+var_2E], ah
movzx edx, word ptr [rsi]
rol dx, 8
mov [rbp+var_2C], dx
movzx edx, word ptr [rsi+8]
rol dx, 8
mov [rbp+var_2A], dx
movzx edx, word ptr [rsi+0Ch]
rol dx, 8
mov [rbp+var_28], dx
movzx edx, word ptr [rsi+0Eh]
rol dx, 8
mov [rbp+var_26], dx
movzx edx, word ptr [rsi+10h]
rol dx, 8
shr ecx, 10h
mov [rbp+var_24], dx
mov dl, [rsi+12h]
mov [rbp+var_22], dl
mov dl, [rsi+13h]
mov [rbp+var_21], dl
mov [rbp+var_1F], cl
shr eax, 18h
mov [rbp+var_20], al
mov [rbp+var_1E], 0
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_80]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_6BE25
lea rsi, [rbp+var_30]
mov edx, 14h
mov ecx, 4
mov edi, ebx
call my_write
loc_6BE07:
test rax, rax
setnz al
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_6BE3F
add rsp, 70h
pop rbx
pop r14
pop rbp
retn
loc_6BE25:
lea rdx, [rbp+var_30]
lea r14, [rbp+var_38]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call _ma_columndef_write_cold_1
mov rax, [r14]
jmp short loc_6BE07
loc_6BE3F:
call ___stack_chk_fail
|
bool ma_columndef_write(unsigned int a1, long long a2)
{
int v2; // eax
__int16 v3; // kr00_2
long long v4; // rax
long long v5; // rax
_BYTE v7[72]; // [rsp+0h] [rbp-80h] BYREF
long long v8; // [rsp+48h] [rbp-38h] BYREF
_BYTE v9[4]; // [rsp+50h] [rbp-30h] BYREF
__int16 v10; // [rsp+54h] [rbp-2Ch]
__int16 v11; // [rsp+56h] [rbp-2Ah]
__int16 v12; // [rsp+58h] [rbp-28h]
__int16 v13; // [rsp+5Ah] [rbp-26h]
__int16 v14; // [rsp+5Ch] [rbp-24h]
char v15; // [rsp+5Eh] [rbp-22h]
char v16; // [rsp+5Fh] [rbp-21h]
char v17; // [rsp+60h] [rbp-20h]
char v18; // [rsp+61h] [rbp-1Fh]
__int16 v19; // [rsp+62h] [rbp-1Eh]
unsigned long long v20; // [rsp+68h] [rbp-18h]
v20 = __readfsqword(0x28u);
v2 = *(_DWORD *)(a2 + 4);
v3 = *(_WORD *)(a2 + 10);
v9[0] = HIBYTE(v3);
v9[1] = v3;
v9[2] = BYTE1(v2);
v9[3] = v2;
v10 = __ROL2__(*(_WORD *)a2, 8);
v11 = __ROL2__(*(_WORD *)(a2 + 8), 8);
v12 = __ROL2__(*(_WORD *)(a2 + 12), 8);
v13 = __ROL2__(*(_WORD *)(a2 + 14), 8);
v14 = __ROL2__(*(_WORD *)(a2 + 16), 8);
v15 = *(_BYTE *)(a2 + 18);
v16 = *(_BYTE *)(a2 + 19);
v18 = BYTE2(v2);
v17 = HIBYTE(v2);
v19 = 0;
v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a1, 7LL);
if ( v4 )
{
ma_columndef_write_cold_1(v4, a1, (long long)v9, &v8);
v5 = v8;
}
else
{
v5 = my_write(a1, (long long)v9, 20LL, 4LL);
}
return v5 != 0;
}
|
_ma_columndef_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV EBX,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RSI + 0x4]
MOV ECX,EAX
MOVZX EDX,word ptr [RSI + 0xa]
MOV byte ptr [RBP + -0x2f],DL
MOV byte ptr [RBP + -0x30],DH
MOV byte ptr [RBP + -0x2d],AL
MOV byte ptr [RBP + -0x2e],AH
MOVZX EDX,word ptr [RSI]
ROL DX,0x8
MOV word ptr [RBP + -0x2c],DX
MOVZX EDX,word ptr [RSI + 0x8]
ROL DX,0x8
MOV word ptr [RBP + -0x2a],DX
MOVZX EDX,word ptr [RSI + 0xc]
ROL DX,0x8
MOV word ptr [RBP + -0x28],DX
MOVZX EDX,word ptr [RSI + 0xe]
ROL DX,0x8
MOV word ptr [RBP + -0x26],DX
MOVZX EDX,word ptr [RSI + 0x10]
ROL DX,0x8
SHR ECX,0x10
MOV word ptr [RBP + -0x24],DX
MOV DL,byte ptr [RSI + 0x12]
MOV byte ptr [RBP + -0x22],DL
MOV DL,byte ptr [RSI + 0x13]
MOV byte ptr [RBP + -0x21],DL
MOV byte ptr [RBP + -0x1f],CL
SHR EAX,0x18
MOV byte ptr [RBP + -0x20],AL
MOV word ptr [RBP + -0x1e],0x0
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x80]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0016be25
LEA RSI,[RBP + -0x30]
MOV EDX,0x14
MOV ECX,0x4
MOV EDI,EBX
CALL 0x0012efe4
LAB_0016be07:
TEST RAX,RAX
SETNZ AL
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x0016be3f
ADD RSP,0x70
POP RBX
POP R14
POP RBP
RET
LAB_0016be25:
LEA RDX,[RBP + -0x30]
LEA R14,[RBP + -0x38]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x0012d44c
MOV RAX,qword ptr [R14]
JMP 0x0016be07
LAB_0016be3f:
CALL 0x00129250
|
bool _ma_columndef_write(int4 param_1,ushort *param_2)
{
int4 uVar1;
long lVar2;
long in_FS_OFFSET;
int1 local_88 [72];
long local_40;
int1 local_38;
int1 local_37;
int1 local_36;
int1 local_35;
ushort local_34;
ushort local_32;
ushort local_30;
ushort local_2e;
ushort local_2c;
int1 local_2a;
int1 local_29;
int1 local_28;
int1 local_27;
int2 local_26;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
uVar1 = *(int4 *)(param_2 + 2);
local_37 = (int1)param_2[5];
local_38 = (int1)(param_2[5] >> 8);
local_35 = (int1)uVar1;
local_36 = (int1)((uint)uVar1 >> 8);
local_34 = *param_2 << 8 | *param_2 >> 8;
local_32 = param_2[4] << 8 | param_2[4] >> 8;
local_30 = param_2[6] << 8 | param_2[6] >> 8;
local_2e = param_2[7] << 8 | param_2[7] >> 8;
local_2c = param_2[8] << 8 | param_2[8] >> 8;
local_2a = (int1)param_2[9];
local_29 = *(int1 *)((long)param_2 + 0x13);
local_27 = (int1)((uint)uVar1 >> 0x10);
local_28 = (int1)((uint)uVar1 >> 0x18);
local_26 = 0;
lVar2 = (**(code **)(PSI_server + 0x158))(local_88,param_1,7);
if (lVar2 == 0) {
local_40 = my_write(param_1,&local_38,0x14,4);
}
else {
_ma_columndef_write_cold_1(lVar2,param_1,&local_38,&local_40);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return local_40 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
16,742
|
decltype(auto) coro::sync_wait<coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>>, std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>&&>(coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>>&&)
|
AlayaLite/build_O3/_deps/libcoro-src/include/coro/sync_wait.hpp
|
auto sync_wait(awaitable_type&& a) -> decltype(auto)
{
detail::sync_wait_event e{};
auto task = detail::make_sync_wait_task(std::forward<awaitable_type>(a));
task.promise().start(e);
e.wait();
if constexpr (std::is_void_v<return_type>)
{
task.promise().result();
return;
}
else if constexpr (std::is_reference_v<return_type>)
{
return task.promise().result();
}
else if constexpr (std::is_move_assignable_v<return_type>)
{
// issue-242
// For non-trivial types (or possibly types that don't fit in a register)
// the compiler will end up calling the ~return_type() when the promise
// is destructed at the end of sync_wait(). This causes the return_type
// object to also be destructed causing the final return/move from
// sync_wait() to be a 'use after free' bug. To work around this the result
// must be moved off the promise object before the promise is destructed.
// Other solutions could be heap allocating the return_type but that has
// other downsides, for now it is determined that a double move is an
// acceptable solution to work around this bug.
auto result = std::move(task).promise().result();
return result;
}
else
{
return task.promise().result();
}
}
|
O3
|
cpp
|
decltype(auto) coro::sync_wait<coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>>, std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>&&>(coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>>&&):
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x4b84
leaq -0x1b1(%rip), %rax # 0x3d0c
leaq 0x70(%rsp), %rbx
movq %rax, -0x10(%rbx)
leaq -0xf1(%rip), %rax # 0x3ddc
movq %rax, -0x8(%rbx)
movq %r14, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movb $0x0, 0x38(%rbx)
movq %r15, (%rbx)
leaq 0x60(%rsp), %rdi
callq 0x3d0c
movq %rsp, %rdi
callq 0x4c08
movq %rbx, %rdi
callq 0x43a8
movq %rax, %r14
movq %rbx, %rdi
callq 0x44a0
leaq 0x28(%rsp), %rdi
callq 0x33a0
movq %r14, %rax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x44a0
leaq 0x28(%rsp), %rdi
callq 0x33a0
movq %r14, %rdi
callq 0x3380
|
_ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt6vectorINS2_13when_all_taskIvEESaIS6_EEEEOS8_EEDcOT_:
push r15
push r14
push rbx
sub rsp, 0B0h
mov r14, rdi
mov r15, rsp
mov rdi, r15; this
xor esi, esi; bool
call _ZN4coro6detail15sync_wait_eventC2Eb; coro::detail::sync_wait_event::sync_wait_event(bool)
lea rax, _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume
lea rbx, [rsp+0C8h+var_58]
mov [rbx-10h], rax
lea rax, _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__cleanup
mov [rbx-8], rax
mov [rbx+30h], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+8], xmm0
mov qword ptr [rbx+18h], 0
mov byte ptr [rbx+38h], 0
mov [rbx], r15
lea rdi, [rsp+0C8h+var_68]
call _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume
mov rdi, rsp; this
call _ZN4coro6detail15sync_wait_event4waitEv; coro::detail::sync_wait_event::wait(void)
mov rdi, rbx
call _ZNR4coro6detail22sync_wait_task_promiseIOSt6vectorINS0_13when_all_taskIvEESaIS4_EEE6resultEv; coro::detail::sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>> &&>::result(void)
mov r14, rax
mov rdi, rbx
call _ZN4coro6detail22sync_wait_task_promiseIOSt6vectorINS0_13when_all_taskIvEESaIS4_EEED2Ev; coro::detail::sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>> &&>::~sync_wait_task_promise()
lea rdi, [rsp+0C8h+var_A0]; this
call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable()
mov rax, r14
add rsp, 0B0h
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx
call _ZN4coro6detail22sync_wait_task_promiseIOSt6vectorINS0_13when_all_taskIvEESaIS4_EEED2Ev; coro::detail::sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>> &&>::~sync_wait_task_promise()
lea rdi, [rsp+arg_20]; this
call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable()
mov rdi, r14
call __Unwind_Resume
|
long long ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt6vectorINS2_13when_all_taskIvEESaIS6_EEEEOS8_EEDcOT_(
long long a1)
{
long long v1; // r14
_BYTE v3[40]; // [rsp+0h] [rbp-C8h] BYREF
_BYTE v4[56]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v5[2]; // [rsp+60h] [rbp-68h] BYREF
_BYTE *v6; // [rsp+70h] [rbp-58h] BYREF
__int128 v7; // [rsp+78h] [rbp-50h]
long long v8; // [rsp+88h] [rbp-40h]
long long v9; // [rsp+A0h] [rbp-28h]
char v10; // [rsp+A8h] [rbp-20h]
coro::detail::sync_wait_event::sync_wait_event((coro::detail::sync_wait_event *)v3, 0);
v5[0] = ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume;
v5[1] = ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__cleanup;
v9 = a1;
v7 = 0LL;
v8 = 0LL;
v10 = 0;
v6 = v3;
ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume((long long)v5);
coro::detail::sync_wait_event::wait((coro::detail::sync_wait_event *)v3);
v1 = coro::detail::sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>> &&>::result(&v6);
coro::detail::sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>> &&>::~sync_wait_task_promise(&v6);
std::condition_variable::~condition_variable((std::condition_variable *)v4);
return v1;
}
|
_ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt6vectorINS2_13when_all_taskIvEESaIS6_EEEEOS8_EEDcOT_:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xb0
MOV R14,RDI
MOV R15,RSP
MOV RDI,R15
XOR ESI,ESI
CALL 0x00104b84
LEA RAX,[0x103d0c]
LEA RBX,[RSP + 0x70]
MOV qword ptr [RBX + -0x10],RAX
LEA RAX,[0x103ddc]
MOV qword ptr [RBX + -0x8],RAX
MOV qword ptr [RBX + 0x30],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x8],XMM0
MOV qword ptr [RBX + 0x18],0x0
MOV byte ptr [RBX + 0x38],0x0
MOV qword ptr [RBX],R15
LAB_00103eeb:
LEA RDI,[RSP + 0x60]
CALL 0x00103d0c
MOV RDI,RSP
CALL 0x00104c08
MOV RDI,RBX
CALL 0x001043a8
LAB_00103f05:
MOV R14,RAX
MOV RDI,RBX
CALL 0x001044a0
LEA RDI,[RSP + 0x28]
CALL 0x001033a0
MOV RAX,R14
ADD RSP,0xb0
POP RBX
POP R14
POP R15
RET
|
int8
_ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt6vectorINS2_13when_all_taskIvEESaIS6_EEEEOS8_EEDcOT_
(int8 param_1)
{
int8 uVar1;
sync_wait_event asStack_c8 [40];
condition_variable local_a0 [56];
code *local_68;
code *local_60;
int1 *local_58;
int8 local_50;
int8 uStack_48;
int8 local_40;
int8 local_28;
int1 local_20;
coro::detail::sync_wait_event::sync_wait_event(asStack_c8,false);
local_68 =
_ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume
;
local_60 =
_ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__cleanup
;
local_50 = 0;
uStack_48 = 0;
local_40 = 0;
local_20 = 0;
/* try { // try from 00103eeb to 00103f04 has its CatchHandler @ 00103f2a */
local_58 = asStack_c8;
local_28 = param_1;
_ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume
(&local_68);
coro::detail::sync_wait_event::wait(asStack_c8);
uVar1 = coro::detail::
sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>&&>
::result((sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>&&>
*)&local_58);
coro::detail::
sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>&&>
::~sync_wait_task_promise
((sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>&&>
*)&local_58);
std::condition_variable::~condition_variable(local_a0);
return uVar1;
}
|
|
16,743
|
my_interval_timer
|
eloqsql/mysys/my_getsystime.c
|
ulonglong my_interval_timer()
{
#ifdef HAVE_CLOCK_GETTIME
struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp);
return tp.tv_sec*1000000000ULL+tp.tv_nsec;
#elif defined(HAVE_GETHRTIME)
return gethrtime();
#elif defined(_WIN32)
DBUG_ASSERT(query_performance_frequency);
LARGE_INTEGER t_cnt;
QueryPerformanceCounter(&t_cnt);
return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) +
((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL /
query_performance_frequency);
#else
/* TODO: check for other possibilities for hi-res timestamping */
struct timeval tv;
gettimeofday(&tv,NULL);
return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL;
#endif
}
|
O0
|
c
|
my_interval_timer:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
leaq -0x10(%rbp), %rsi
callq 0x24260
imulq $0x3b9aca00, -0x10(%rbp), %rax # imm = 0x3B9ACA00
addq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_interval_timer:
push rbp
mov rbp, rsp
sub rsp, 10h
mov edi, 1
lea rsi, [rbp+var_10]
call _clock_gettime
imul rax, [rbp+var_10], 3B9ACA00h
add rax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
|
long long my_interval_timer()
{
_QWORD v1[2]; // [rsp+0h] [rbp-10h] BYREF
clock_gettime(1LL, v1);
return v1[1] + 1000000000LL * v1[0];
}
|
my_interval_timer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV EDI,0x1
LEA RSI,[RBP + -0x10]
CALL 0x00124260
IMUL RAX,qword ptr [RBP + -0x10],0x3b9aca00
ADD RAX,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
long my_interval_timer(void)
{
timespec local_18;
clock_gettime(1,&local_18);
return local_18.tv_sec * 1000000000 + local_18.tv_nsec;
}
|
|
16,744
|
translog_create_new_file
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_create_new_file()
{
TRANSLOG_FILE *file= (TRANSLOG_FILE*)my_malloc(PSI_INSTRUMENT_ME, sizeof(TRANSLOG_FILE),
MYF(0));
TRANSLOG_FILE *old= get_current_logfile();
uint32 file_no= LSN_FILE_NO(log_descriptor.horizon);
DBUG_ENTER("translog_create_new_file");
if (file == NULL)
goto error;
/*
Writes max_lsn to the file header before finishing it (there is no need
to lock file header buffer because it is still unfinished file, so only
one thread can finish the file and nobody interested of LSN of current
(unfinished) file, because no one can purge it).
*/
if (translog_max_lsn_to_header(old->handler.file, log_descriptor.max_lsn))
goto error;
mysql_rwlock_wrlock(&log_descriptor.open_files_lock);
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
DBUG_ASSERT(file_no == log_descriptor.max_file + 1);
if (allocate_dynamic(&log_descriptor.open_files,
log_descriptor.max_file - log_descriptor.min_file + 2))
goto error_lock;
/* this call just expand the array */
if (insert_dynamic(&log_descriptor.open_files, (uchar*)&file))
goto error_lock;
if ((file->handler.file= create_logfile_by_number_no_cache(file_no)) == -1)
goto error_lock;
translog_file_init(file, file_no, 0);
log_descriptor.max_file++;
{
char *start= (char*) dynamic_element(&log_descriptor.open_files, 0,
TRANSLOG_FILE**);
memmove(start + sizeof(TRANSLOG_FILE*), start,
sizeof(TRANSLOG_FILE*) *
(log_descriptor.max_file - log_descriptor.min_file + 1 - 1));
}
/* can't fail we because we expanded array */
set_dynamic(&log_descriptor.open_files, (uchar*)&file, 0);
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
mysql_rwlock_unlock(&log_descriptor.open_files_lock);
DBUG_PRINT("info", ("file_no: %lu", (ulong)file_no));
if (translog_write_file_header())
goto error;
if (ma_control_file_write_and_force(last_checkpoint_lsn, file_no,
max_trid_in_control_file,
recovery_failures))
goto error;
DBUG_RETURN(0);
error_lock:
mysql_rwlock_unlock(&log_descriptor.open_files_lock);
error:
translog_stop_writing();
my_free(file);
DBUG_RETURN(1);
}
|
O3
|
c
|
translog_create_new_file:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x58, %esi
xorl %edi, %edi
xorl %edx, %edx
callq 0x9fd89
movq %rax, %rbx
movq %rax, -0x18(%rbp)
callq 0x50330
testq %rbx, %rbx
je 0x4f2c5
movl 0xbb01c3(%rip), %ebx # 0xbff40c
movl 0x18(%rax), %edi
movq 0xbb01fd(%rip), %rsi # 0xbff450
callq 0x4f406
testb %al, %al
jne 0x4f2c5
cmpq $0x0, 0x3af844(%rip) # 0x3feaa8
jne 0x4f3d5
leaq 0x3af7a7(%rip), %rdi # 0x3fea18
callq 0xa441d
movl 0x3af794(%rip), %esi # 0x3fea10
subl 0x3af792(%rip), %esi # 0x3fea14
addl $0x2, %esi
leaq 0x3af75c(%rip), %rdi # 0x3fe9e8
callq 0x91d2d
testb %al, %al
jne 0x4f2a9
leaq 0x3af74c(%rip), %rdi # 0x3fe9e8
leaq -0x18(%rbp), %rsi
callq 0x91b9e
testb %al, %al
je 0x4f2fe
movq 0x3af7f8(%rip), %rdi # 0x3feaa8
testq %rdi, %rdi
jne 0x4f3df
leaq 0x3af758(%rip), %rdi # 0x3fea18
callq 0xa44be
xorl %eax, %eax
cmpl $0x3, 0x3ae2e2(%rip) # 0x3fd5b0
setne %al
addl %eax, %eax
movl %eax, 0x3ae2d7(%rip) # 0x3fd5b0
movb $0x1, 0xbb03b0(%rip) # 0xbff690
movl $0x0, 0x3af4e2(%rip) # 0x3fe7cc
movq -0x18(%rbp), %rdi
callq 0x9ffb6
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %ebx, %edi
callq 0x4aa10
movq -0x18(%rbp), %r14
movl %eax, 0x18(%r14)
cmpl $-0x1, %eax
je 0x4f2a9
leaq 0x8(%r14), %rdi
callq 0x34aff
leaq -0x513(%rip), %rax # 0x4ee0f
movq %rax, 0x28(%r14)
leaq 0x12cb(%rip), %rax # 0x505f8
movq %rax, 0x40(%r14)
movq %r14, 0x48(%r14)
movl %ebx, (%r14)
movw $0x0, 0x50(%r14)
movl 0x3af6cb(%rip), %edx # 0x3fea10
incl %edx
movl %edx, 0x3af6c3(%rip) # 0x3fea10
leaq 0x3af694(%rip), %r14 # 0x3fe9e8
movq 0x3af68d(%rip), %rsi # 0x3fe9e8
leaq 0x8(%rsi), %rdi
subl 0x3af6af(%rip), %edx # 0x3fea14
shlq $0x3, %rdx
callq 0x29120
leaq -0x18(%rbp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x91cb0
movq 0x3af725(%rip), %rdi # 0x3feaa8
testq %rdi, %rdi
jne 0x4f3f4
leaq 0x3af689(%rip), %rdi # 0x3fea18
callq 0xa44be
callq 0x4f138
testb %al, %al
jne 0x4f2c5
leaq 0x3ae1c0(%rip), %rax # 0x3fd568
movq (%rax), %rdi
leaq 0x3ae1c6(%rip), %rax # 0x3fd578
movq (%rax), %rdx
leaq 0x3ae1c4(%rip), %rax # 0x3fd580
movzbl (%rax), %ecx
movl %ebx, %esi
callq 0x47f99
testl %eax, %eax
jne 0x4f2c5
xorl %eax, %eax
jmp 0x4f2f5
callq 0x2cda5
jmp 0x4f276
leaq 0x336c2a(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x4f2b9
leaq 0x336c15(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x4f388
|
translog_create_new_file:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov esi, 58h ; 'X'
xor edi, edi
xor edx, edx
call my_malloc
mov rbx, rax
mov [rbp+var_18], rax
call get_current_logfile
test rbx, rbx
jz loc_4F2C5
mov ebx, dword ptr cs:qword_BFF408+4
mov edi, [rax+18h]
mov rsi, cs:qword_BFF450
call translog_max_lsn_to_header
test al, al
jnz short loc_4F2C5
cmp cs:qword_3FEAA8, 0
jnz loc_4F3D5
lea rdi, unk_3FEA18
call my_rw_wrlock
loc_4F276:
mov esi, dword ptr cs:qword_3FEA10
sub esi, dword ptr cs:qword_3FEA10+4
add esi, 2
lea rdi, qword_3FE9E8
call allocate_dynamic
test al, al
jnz short loc_4F2A9
lea rdi, qword_3FE9E8
lea rsi, [rbp+var_18]
call insert_dynamic
test al, al
jz short loc_4F2FE
loc_4F2A9:
mov rdi, cs:qword_3FEAA8
test rdi, rdi
jnz loc_4F3DF
loc_4F2B9:
lea rdi, unk_3FEA18
call my_rw_unlock
loc_4F2C5:
xor eax, eax
cmp cs:translog_status, 3
setnz al
add eax, eax
mov cs:translog_status, eax
mov byte ptr cs:word_BFF690, 1
mov cs:dword_3FE7CC, 0
mov rdi, [rbp+var_18]
call my_free
mov al, 1
loc_4F2F5:
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_4F2FE:
mov edi, ebx
call create_logfile_by_number_no_cache
mov r14, [rbp+var_18]
mov [r14+18h], eax
cmp eax, 0FFFFFFFFh
jz short loc_4F2A9
lea rdi, [r14+8]
call pagecache_file_set_null_hooks
lea rax, translog_page_validator
mov [r14+28h], rax
lea rax, maria_flush_log_for_page_none
mov [r14+40h], rax
mov [r14+48h], r14
mov [r14], ebx
mov word ptr [r14+50h], 0
mov edx, dword ptr cs:qword_3FEA10
inc edx
mov dword ptr cs:qword_3FEA10, edx
lea r14, qword_3FE9E8
mov rsi, cs:qword_3FE9E8
lea rdi, [rsi+8]
sub edx, dword ptr cs:qword_3FEA10+4
shl rdx, 3
call _memmove
lea rsi, [rbp+var_18]
mov rdi, r14
xor edx, edx
call set_dynamic
mov rdi, cs:qword_3FEAA8
test rdi, rdi
jnz short loc_4F3F4
loc_4F388:
lea rdi, unk_3FEA18
call my_rw_unlock
call translog_write_file_header
test al, al
jnz loc_4F2C5
lea rax, last_checkpoint_lsn
mov rdi, [rax]
lea rax, max_trid_in_control_file
mov rdx, [rax]
lea rax, recovery_failures
movzx ecx, byte ptr [rax]
mov esi, ebx
call ma_control_file_write_and_force
test eax, eax
jnz loc_4F2C5
xor eax, eax
jmp loc_4F2F5
loc_4F3D5:
call translog_create_new_file_cold_1
jmp loc_4F276
loc_4F3DF:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp loc_4F2B9
loc_4F3F4:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp short loc_4F388
|
char translog_create_new_file()
{
long long current_logfile; // rax
unsigned int v1; // ebx
long long v2; // rdx
long long v3; // rdx
long long v4; // rcx
int v5; // r8d
int v6; // r9d
int logfile_by_number_no_cache; // eax
long long v9; // r14
_QWORD v10[3]; // [rsp+8h] [rbp-18h] BYREF
v10[0] = my_malloc(0LL, 88LL, 0LL);
current_logfile = get_current_logfile(0LL);
if ( !v10[0]
|| (v1 = HIDWORD(qword_BFF408),
(unsigned __int8)translog_max_lsn_to_header(*(unsigned int *)(current_logfile + 24), qword_BFF450)) )
{
LABEL_10:
translog_status = 2 * (translog_status != 3);
LOBYTE(word_BFF690) = 1;
dword_3FE7CC = 0;
my_free(v10[0]);
return 1;
}
if ( qword_3FEAA8 )
translog_create_new_file_cold_1();
else
my_rw_wrlock(&unk_3FEA18);
if ( (unsigned __int8)allocate_dynamic(&qword_3FE9E8, (unsigned int)(qword_3FEA10 - HIDWORD(qword_3FEA10) + 2), v2)
|| (unsigned __int8)insert_dynamic(&qword_3FE9E8, v10)
|| (logfile_by_number_no_cache = create_logfile_by_number_no_cache(v1, (long long)v10, v3, v4, v5, v6),
v9 = v10[0],
*(_DWORD *)(v10[0] + 24LL) = logfile_by_number_no_cache,
logfile_by_number_no_cache == -1) )
{
if ( qword_3FEAA8 )
PSI_server[45]();
my_rw_unlock(&unk_3FEA18);
goto LABEL_10;
}
pagecache_file_set_null_hooks(v9 + 8);
*(_QWORD *)(v9 + 40) = translog_page_validator;
*(_QWORD *)(v9 + 64) = maria_flush_log_for_page_none;
*(_QWORD *)(v9 + 72) = v9;
*(_DWORD *)v9 = v1;
*(_WORD *)(v9 + 80) = 0;
LODWORD(qword_3FEA10) = qword_3FEA10 + 1;
memmove(qword_3FE9E8 + 8, qword_3FE9E8, 8LL * (unsigned int)(qword_3FEA10 - HIDWORD(qword_3FEA10)));
set_dynamic(&qword_3FE9E8, v10, 0LL);
if ( qword_3FEAA8 )
PSI_server[45]();
my_rw_unlock(&unk_3FEA18);
if ( translog_write_file_header((long long)&unk_3FEA18, (long long)v10)
|| (unsigned int)ma_control_file_write_and_force(
last_checkpoint_lsn,
v1,
max_trid_in_control_file,
(unsigned __int8)recovery_failures) )
{
goto LABEL_10;
}
return 0;
}
|
translog_create_new_file:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV ESI,0x58
XOR EDI,EDI
XOR EDX,EDX
CALL 0x0019fd89
MOV RBX,RAX
MOV qword ptr [RBP + -0x18],RAX
CALL 0x00150330
TEST RBX,RBX
JZ 0x0014f2c5
MOV EBX,dword ptr [0x00cff40c]
MOV EDI,dword ptr [RAX + 0x18]
MOV RSI,qword ptr [0x00cff450]
CALL 0x0014f406
TEST AL,AL
JNZ 0x0014f2c5
CMP qword ptr [0x004feaa8],0x0
JNZ 0x0014f3d5
LEA RDI,[0x4fea18]
CALL 0x001a441d
LAB_0014f276:
MOV ESI,dword ptr [0x004fea10]
SUB ESI,dword ptr [0x004fea14]
ADD ESI,0x2
LEA RDI,[0x4fe9e8]
CALL 0x00191d2d
TEST AL,AL
JNZ 0x0014f2a9
LEA RDI,[0x4fe9e8]
LEA RSI,[RBP + -0x18]
CALL 0x00191b9e
TEST AL,AL
JZ 0x0014f2fe
LAB_0014f2a9:
MOV RDI,qword ptr [0x004feaa8]
TEST RDI,RDI
JNZ 0x0014f3df
LAB_0014f2b9:
LEA RDI,[0x4fea18]
CALL 0x001a44be
LAB_0014f2c5:
XOR EAX,EAX
CMP dword ptr [0x004fd5b0],0x3
SETNZ AL
ADD EAX,EAX
MOV dword ptr [0x004fd5b0],EAX
MOV byte ptr [0x00cff690],0x1
MOV dword ptr [0x004fe7cc],0x0
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0019ffb6
MOV AL,0x1
LAB_0014f2f5:
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
LAB_0014f2fe:
MOV EDI,EBX
CALL 0x0014aa10
MOV R14,qword ptr [RBP + -0x18]
MOV dword ptr [R14 + 0x18],EAX
CMP EAX,-0x1
JZ 0x0014f2a9
LEA RDI,[R14 + 0x8]
CALL 0x00134aff
LEA RAX,[0x14ee0f]
MOV qword ptr [R14 + 0x28],RAX
LEA RAX,[0x1505f8]
MOV qword ptr [R14 + 0x40],RAX
MOV qword ptr [R14 + 0x48],R14
MOV dword ptr [R14],EBX
MOV word ptr [R14 + 0x50],0x0
MOV EDX,dword ptr [0x004fea10]
INC EDX
MOV dword ptr [0x004fea10],EDX
LEA R14,[0x4fe9e8]
MOV RSI,qword ptr [0x004fe9e8]
LEA RDI,[RSI + 0x8]
SUB EDX,dword ptr [0x004fea14]
SHL RDX,0x3
CALL 0x00129120
LEA RSI,[RBP + -0x18]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00191cb0
MOV RDI,qword ptr [0x004feaa8]
TEST RDI,RDI
JNZ 0x0014f3f4
LAB_0014f388:
LEA RDI,[0x4fea18]
CALL 0x001a44be
CALL 0x0014f138
TEST AL,AL
JNZ 0x0014f2c5
LEA RAX,[0x4fd568]
MOV RDI,qword ptr [RAX]
LEA RAX,[0x4fd578]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x4fd580]
MOVZX ECX,byte ptr [RAX]
MOV ESI,EBX
CALL 0x00147f99
TEST EAX,EAX
JNZ 0x0014f2c5
XOR EAX,EAX
JMP 0x0014f2f5
LAB_0014f3d5:
CALL 0x0012cda5
JMP 0x0014f276
LAB_0014f3df:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x0014f2b9
LAB_0014f3f4:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x0014f388
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 translog_create_new_file(void)
{
int4 uVar1;
char cVar2;
int iVar3;
int4 *puVar4;
long lVar5;
int4 *local_20;
puVar4 = (int4 *)my_malloc(0,0x58,0);
local_20 = puVar4;
lVar5 = get_current_logfile();
uVar1 = DAT_00cff408._4_4_;
if ((puVar4 != (int4 *)0x0) &&
(cVar2 = translog_max_lsn_to_header(*(int4 *)(lVar5 + 0x18),DAT_00cff450), cVar2 == '\0')
) {
if (DAT_004feaa8 == 0) {
my_rw_wrlock(&DAT_004fea18);
}
else {
translog_create_new_file_cold_1();
}
cVar2 = allocate_dynamic(&DAT_004fe9e8,(DAT_004fea10 - DAT_004fea14) + 2);
if ((cVar2 == '\0') && (cVar2 = insert_dynamic(&DAT_004fe9e8,&local_20), cVar2 == '\0')) {
iVar3 = create_logfile_by_number_no_cache(uVar1);
puVar4 = local_20;
local_20[6] = iVar3;
if (iVar3 != -1) {
pagecache_file_set_null_hooks(local_20 + 2);
*(code **)(puVar4 + 10) = translog_page_validator;
*(code **)(puVar4 + 0x10) = maria_flush_log_for_page_none;
*(int4 **)(puVar4 + 0x12) = puVar4;
*puVar4 = uVar1;
*(int2 *)(puVar4 + 0x14) = 0;
DAT_004fea10 = DAT_004fea10 + 1;
memmove((void *)((long)DAT_004fe9e8 + 8),DAT_004fe9e8,
(ulong)(uint)(DAT_004fea10 - DAT_004fea14) << 3);
set_dynamic(&DAT_004fe9e8,&local_20,0);
if (DAT_004feaa8 != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(&DAT_004fea18);
cVar2 = translog_write_file_header();
if ((cVar2 == '\0') &&
(iVar3 = ma_control_file_write_and_force
(last_checkpoint_lsn,uVar1,max_trid_in_control_file,recovery_failures)
, iVar3 == 0)) {
return 0;
}
goto LAB_0014f2c5;
}
}
if (DAT_004feaa8 != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(&DAT_004fea18);
}
LAB_0014f2c5:
translog_status = (uint)(translog_status != 3) * 2;
DAT_00cff690 = 1;
_DAT_004fe7cc = 0;
my_free(local_20);
return 1;
}
|
|
16,745
|
bchange
|
eloqsql/strings/bchange.c
|
void bchange(register uchar *dst, size_t old_length, register const uchar *src,
size_t new_length, size_t tot_length)
{
size_t rest=tot_length-old_length;
if (old_length < new_length)
bmove_upp(dst+rest+new_length,dst+tot_length,rest);
else
bmove(dst+new_length,dst+old_length,rest);
memcpy(dst,src,new_length);
}
|
O0
|
c
|
bchange:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x3cd01
movq -0x8(%rbp), %rdi
addq -0x30(%rbp), %rdi
addq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x3cd40
jmp 0x3cd1a
movq -0x8(%rbp), %rdi
addq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x255a0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x25230
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
bchange:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_28]
sub rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
cmp rax, [rbp+var_20]
jnb short loc_3CD01
mov rdi, [rbp+var_8]
add rdi, [rbp+var_30]
add rdi, [rbp+var_20]
mov rsi, [rbp+var_8]
add rsi, [rbp+var_28]
mov rdx, [rbp+var_30]
call bmove_upp
jmp short loc_3CD1A
loc_3CD01:
mov rdi, [rbp+var_8]
add rdi, [rbp+var_20]
mov rsi, [rbp+var_8]
add rsi, [rbp+var_10]
mov rdx, [rbp+var_30]
call _memmove
loc_3CD1A:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
add rsp, 30h
pop rbp
retn
|
long long bchange(long long a1, unsigned long long a2, long long a3, unsigned long long a4, long long a5)
{
long long v6; // [rsp+0h] [rbp-30h]
v6 = a5 - a2;
if ( a2 >= a4 )
memmove(a4 + a1, a2 + a1, v6);
else
bmove_upp(a4 + v6 + a1, a5 + a1, v6);
return memcpy(a1, a3, a4);
}
|
bchange:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0013cd01
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,qword ptr [RBP + -0x30]
ADD RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x0013cd40
JMP 0x0013cd1a
LAB_0013cd01:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001255a0
LAB_0013cd1a:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00125230
ADD RSP,0x30
POP RBP
RET
|
void bchange(void *param_1,ulong param_2,void *param_3,ulong param_4,long param_5)
{
size_t __n;
__n = param_5 - param_2;
if (param_2 < param_4) {
bmove_upp((long)param_1 + param_4 + __n,(long)param_1 + param_5,__n);
}
else {
memmove((void *)((long)param_1 + param_4),(void *)((long)param_1 + param_2),__n);
}
memcpy(param_1,param_3,param_4);
return;
}
|
|
16,746
|
maria_ft_add_word
|
eloqsql/storage/maria/ma_ft_parser.c
|
static int maria_ft_add_word(MYSQL_FTPARSER_PARAM *param,
const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info
__attribute__((unused)))
{
TREE *wtree;
FT_WORD w;
MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam;
DBUG_ENTER("maria_ft_add_word");
wtree= ft_param->wtree;
if (param->flags & MYSQL_FTFLAGS_NEED_COPY)
{
uchar *ptr;
DBUG_ASSERT(wtree->with_delete == 0);
ptr= (uchar *)alloc_root(ft_param->mem_root, word_len);
memcpy(ptr, word, word_len);
w.pos= ptr;
}
else
w.pos= (uchar*) word;
w.len= word_len;
if (!tree_insert(wtree, &w, 0, wtree->custom_arg))
{
delete_tree(wtree, 0);
DBUG_RETURN(1);
}
DBUG_RETURN(0);
}
|
O0
|
c
|
maria_ft_add_word:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x34(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x786b1
jmp 0x7867f
jmp 0x78681
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0x1c(%rbp), %rsi
callq 0xf4f90
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x29090
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x786b9
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x230(%rax), %rcx
leaq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0x102400
cmpq $0x0, %rax
jne 0x786f3
movq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x102230
movl $0x1, -0x4(%rbp)
jmp 0x786fc
jmp 0x786f5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
maria_ft_add_word:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov eax, [rax+34h]
and eax, 1
cmp eax, 0
jz short loc_786B1
jmp short $+2
loc_7867F:
jmp short $+2
loc_78681:
mov rax, [rbp+var_50]
mov rdi, [rax+8]
movsxd rsi, [rbp+var_1C]
call alloc_root
mov [rbp+var_58], rax
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_18]
movsxd rdx, [rbp+var_1C]
call _memcpy
mov rax, [rbp+var_58]
mov [rbp+var_48], rax
jmp short loc_786B9
loc_786B1:
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
loc_786B9:
mov eax, [rbp+var_1C]
mov [rbp+var_40], eax
mov rdi, [rbp+var_30]
mov rax, [rbp+var_30]
mov rcx, [rax+230h]
lea rsi, [rbp+var_48]
xor edx, edx
call tree_insert
cmp rax, 0
jnz short loc_786F3
mov rdi, [rbp+var_30]
xor esi, esi
call delete_tree
mov [rbp+var_4], 1
jmp short loc_786FC
loc_786F3:
jmp short $+2
loc_786F5:
mov [rbp+var_4], 0
loc_786FC:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long maria_ft_add_word(long long a1, long long a2, int a3, long long a4)
{
long long v5; // [rsp+8h] [rbp-58h]
long long *v6; // [rsp+10h] [rbp-50h]
long long v7; // [rsp+18h] [rbp-48h] BYREF
int v8; // [rsp+20h] [rbp-40h]
long long v9; // [rsp+30h] [rbp-30h]
long long v10; // [rsp+38h] [rbp-28h]
int v11; // [rsp+44h] [rbp-1Ch]
long long v12; // [rsp+48h] [rbp-18h]
long long v13; // [rsp+50h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v6 = *(long long **)(a1 + 24);
v9 = *v6;
if ( (*(_DWORD *)(a1 + 52) & 1) != 0 )
{
v5 = alloc_root(v6[1], v11);
memcpy(v5, v12, v11);
v7 = v5;
}
else
{
v7 = v12;
}
v8 = v11;
if ( tree_insert(v9, &v7, 0LL, *(_QWORD *)(v9 + 560)) )
{
return 0;
}
else
{
delete_tree(v9, 0LL);
return 1;
}
}
|
maria_ft_add_word:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x34]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001786b1
JMP 0x0017867f
LAB_0017867f:
JMP 0x00178681
LAB_00178681:
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x8]
MOVSXD RSI,dword ptr [RBP + -0x1c]
CALL 0x001f4f90
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x18]
MOVSXD RDX,dword ptr [RBP + -0x1c]
CALL 0x00129090
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001786b9
LAB_001786b1:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
LAB_001786b9:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x40],EAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0x230]
LEA RSI,[RBP + -0x48]
XOR EDX,EDX
CALL 0x00202400
CMP RAX,0x0
JNZ 0x001786f3
MOV RDI,qword ptr [RBP + -0x30]
XOR ESI,ESI
CALL 0x00202230
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001786fc
LAB_001786f3:
JMP 0x001786f5
LAB_001786f5:
MOV dword ptr [RBP + -0x4],0x0
LAB_001786fc:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
bool maria_ft_add_word(long param_1,void *param_2,int param_3,int8 param_4)
{
void *__dest;
long lVar1;
void *local_50;
int local_48;
long local_38;
int8 local_30;
int local_24;
void *local_20;
long local_18;
local_38 = **(long **)(param_1 + 0x18);
local_50 = param_2;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((*(uint *)(param_1 + 0x34) & 1) != 0) {
__dest = (void *)alloc_root((*(long **)(param_1 + 0x18))[1],(long)param_3);
memcpy(__dest,local_20,(long)local_24);
local_50 = __dest;
}
local_48 = local_24;
lVar1 = tree_insert(local_38,&local_50,0,*(int8 *)(local_38 + 0x230));
if (lVar1 == 0) {
delete_tree(local_38,0);
}
return lVar1 == 0;
}
|
|
16,747
|
my_uni_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static int my_uni_utf8mb3(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r, uchar *e)
{
if (wc < 0x80)
{
if (r >= e)
return MY_CS_TOOSMALL;
*r= (uchar) wc;
return 1;
}
if (wc < 0x800)
{
if (r + 2 > e)
return MY_CS_TOOSMALLN(2);
/* U+0080..U+07FF: 00000xxx.xxyyyyyy -> 110xxxxx 10yyyyyy */
*r++= (uchar) (0xC0 | (wc >> 6));
*r= (uchar) (0x80 | (wc & 0x3F));
return 2;
}
if (wc < 0x10000)
{
if (r + 3 > e)
return MY_CS_TOOSMALLN(3);
/* U+0800..U+FFFF: xxxxyyyy.yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz */
*r++= (uchar) (0xE0 | (wc >> 12));
*r++= (uchar) (0x80 | ((wc >> 6) & 0x3f));
*r= (uchar) (0x80 | (wc & 0x3f));
return 3;
}
return MY_CS_ILUNI;
}
|
O0
|
c
|
my_uni_utf8mb3:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x80, -0x18(%rbp)
jae 0x3465c
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x34644
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x34750
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x34750
cmpq $0x800, -0x18(%rbp) # imm = 0x800
jae 0x346c3
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x34680
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x34750
movq -0x18(%rbp), %rax
shrq $0x6, %rax
orq $0xc0, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x34750
cmpq $0x10000, -0x18(%rbp) # imm = 0x10000
jae 0x34749
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0x346e4
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x34750
movq -0x18(%rbp), %rax
shrq $0xc, %rax
orq $0xe0, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x34750
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_uni_utf8mb3:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
cmp [rbp+var_18], 80h
jnb short loc_3465C
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_34644
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_34750
loc_34644:
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp loc_34750
loc_3465C:
cmp [rbp+var_18], 800h
jnb short loc_346C3
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_34680
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_34750
loc_34680:
mov rax, [rbp+var_18]
shr rax, 6
or rax, 0C0h
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 2
jmp loc_34750
loc_346C3:
cmp [rbp+var_18], 10000h
jnb short loc_34749
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_346E4
mov [rbp+var_4], 0FFFFFF99h
jmp short loc_34750
loc_346E4:
mov rax, [rbp+var_18]
shr rax, 0Ch
or rax, 0E0h
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
shr rax, 6
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 3
jmp short loc_34750
loc_34749:
mov [rbp+var_4], 0
loc_34750:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_uni_utf8mb3(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
if ( a2 >= 0x80 )
{
if ( a2 >= 0x800 )
{
if ( a2 >= 0x10000 )
{
return 0;
}
else if ( (unsigned long long)(a3 + 3) <= a4 )
{
*a3 = (a2 >> 12) | 0xE0;
a3[1] = (a2 >> 6) & 0x3F | 0x80;
a3[2] = a2 & 0x3F | 0x80;
return 3;
}
else
{
return (unsigned int)-103;
}
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = (a2 >> 6) | 0xC0;
a3[1] = a2 & 0x3F | 0x80;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1;
}
else
{
return (unsigned int)-101;
}
}
|
my_uni_utf8mb3:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
CMP qword ptr [RBP + -0x18],0x80
JNC 0x0013465c
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00134644
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00134750
LAB_00134644:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00134750
LAB_0013465c:
CMP qword ptr [RBP + -0x18],0x800
JNC 0x001346c3
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00134680
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00134750
LAB_00134680:
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
OR RAX,0xc0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00134750
LAB_001346c3:
CMP qword ptr [RBP + -0x18],0x10000
JNC 0x00134749
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001346e4
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x00134750
LAB_001346e4:
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0xc
OR RAX,0xe0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x3
JMP 0x00134750
LAB_00134749:
MOV dword ptr [RBP + -0x4],0x0
LAB_00134750:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_uni_utf8mb3(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
byte bVar1;
int4 local_c;
bVar1 = (byte)param_2;
if (param_2 < 0x80) {
if (param_3 < param_4) {
*param_3 = bVar1;
local_c = 1;
}
else {
local_c = 0xffffff9b;
}
}
else if (param_2 < 0x800) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (byte)(param_2 >> 6) | 0xc0;
param_3[1] = bVar1 & 0x3f | 0x80;
local_c = 2;
}
}
else if (param_2 < 0x10000) {
if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
*param_3 = (byte)(param_2 >> 0xc) | 0xe0;
param_3[1] = (byte)(param_2 >> 6) & 0x3f | 0x80;
param_3[2] = bVar1 & 0x3f | 0x80;
local_c = 3;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
16,748
|
my_uni_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static int my_uni_utf8mb3(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r, uchar *e)
{
if (wc < 0x80)
{
if (r >= e)
return MY_CS_TOOSMALL;
*r= (uchar) wc;
return 1;
}
if (wc < 0x800)
{
if (r + 2 > e)
return MY_CS_TOOSMALLN(2);
/* U+0080..U+07FF: 00000xxx.xxyyyyyy -> 110xxxxx 10yyyyyy */
*r++= (uchar) (0xC0 | (wc >> 6));
*r= (uchar) (0x80 | (wc & 0x3F));
return 2;
}
if (wc < 0x10000)
{
if (r + 3 > e)
return MY_CS_TOOSMALLN(3);
/* U+0800..U+FFFF: xxxxyyyy.yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz */
*r++= (uchar) (0xE0 | (wc >> 12));
*r++= (uchar) (0x80 | ((wc >> 6) & 0x3f));
*r= (uchar) (0x80 | (wc & 0x3f));
return 3;
}
return MY_CS_ILUNI;
}
|
O3
|
c
|
my_uni_utf8mb3:
pushq %rbp
movq %rsp, %rbp
cmpq $0x7f, %rsi
ja 0x3006a
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x300dc
movb %sil, (%rdx)
movl $0x1, %eax
jmp 0x300dc
cmpq $0x7ff, %rsi # imm = 0x7FF
ja 0x3009d
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x300dc
movl %esi, %eax
shrl $0x6, %eax
orb $-0x40, %al
movb %al, (%rdx)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%rdx)
movl $0x2, %eax
jmp 0x300dc
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x300dc
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0x300dc
movl %esi, %eax
shrl $0xc, %eax
orb $-0x20, %al
movb %al, (%rdx)
movl %esi, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rdx)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x2(%rdx)
movl $0x3, %eax
popq %rbp
retq
|
my_uni_utf8mb3:
push rbp
mov rbp, rsp
cmp rsi, 7Fh
ja short loc_3006A
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_300DC
mov [rdx], sil
mov eax, 1
jmp short loc_300DC
loc_3006A:
cmp rsi, 7FFh
ja short loc_3009D
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_300DC
mov eax, esi
shr eax, 6
or al, 0C0h
mov [rdx], al
and sil, 3Fh
or sil, 80h
mov [rdx+1], sil
mov eax, 2
jmp short loc_300DC
loc_3009D:
xor eax, eax
cmp rsi, 0FFFFh
ja short loc_300DC
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja short loc_300DC
mov eax, esi
shr eax, 0Ch
or al, 0E0h
mov [rdx], al
mov eax, esi
shr eax, 6
and al, 3Fh
or al, 80h
mov [rdx+1], al
and sil, 3Fh
or sil, 80h
mov [rdx+2], sil
mov eax, 3
loc_300DC:
pop rbp
retn
|
long long my_uni_utf8mb3(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
if ( a2 > 0x7F )
{
if ( a2 > 0x7FF )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) <= a4 )
{
*a3 = ((unsigned int)a2 >> 12) | 0xE0;
a3[1] = ((unsigned int)a2 >> 6) & 0x3F | 0x80;
a3[2] = a2 & 0x3F | 0x80;
return 3LL;
}
}
}
else
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = ((unsigned int)a2 >> 6) | 0xC0;
a3[1] = a2 & 0x3F | 0x80;
return 2LL;
}
}
}
else
{
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1LL;
}
}
return result;
}
|
my_uni_utf8mb3:
PUSH RBP
MOV RBP,RSP
CMP RSI,0x7f
JA 0x0013006a
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001300dc
MOV byte ptr [RDX],SIL
MOV EAX,0x1
JMP 0x001300dc
LAB_0013006a:
CMP RSI,0x7ff
JA 0x0013009d
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x001300dc
MOV EAX,ESI
SHR EAX,0x6
OR AL,0xc0
MOV byte ptr [RDX],AL
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [RDX + 0x1],SIL
MOV EAX,0x2
JMP 0x001300dc
LAB_0013009d:
XOR EAX,EAX
CMP RSI,0xffff
JA 0x001300dc
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x001300dc
MOV EAX,ESI
SHR EAX,0xc
OR AL,0xe0
MOV byte ptr [RDX],AL
MOV EAX,ESI
SHR EAX,0x6
AND AL,0x3f
OR AL,0x80
MOV byte ptr [RDX + 0x1],AL
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [RDX + 0x2],SIL
MOV EAX,0x3
LAB_001300dc:
POP RBP
RET
|
int8 my_uni_utf8mb3(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
int8 uVar1;
byte bVar2;
uint uVar3;
uVar3 = (uint)param_2;
bVar2 = (byte)param_2;
if (param_2 < 0x80) {
uVar1 = 0xffffff9b;
if (param_3 < param_4) {
*param_3 = bVar2;
uVar1 = 1;
}
}
else if (param_2 < 0x800) {
uVar1 = 0xffffff9a;
if (param_3 + 2 <= param_4) {
*param_3 = (byte)(uVar3 >> 6) | 0xc0;
param_3[1] = bVar2 & 0x3f | 0x80;
uVar1 = 2;
}
}
else {
uVar1 = 0;
if ((param_2 < 0x10000) && (uVar1 = 0xffffff99, param_3 + 3 <= param_4)) {
*param_3 = (byte)(uVar3 >> 0xc) | 0xe0;
param_3[1] = (byte)(uVar3 >> 6) & 0x3f | 0x80;
param_3[2] = bVar2 & 0x3f | 0x80;
uVar1 = 3;
}
}
return uVar1;
}
|
|
16,749
|
fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
llama.cpp/common/common.cpp
|
std::string fs_get_cache_file(const std::string & filename) {
GGML_ASSERT(filename.find(DIRECTORY_SEPARATOR) == std::string::npos);
std::string cache_directory = fs_get_cache_directory();
const bool success = fs_create_directory_with_parents(cache_directory);
if (!success) {
throw std::runtime_error("failed to create cache directory: " + cache_directory);
}
return cache_directory + filename;
}
|
O3
|
cpp
|
fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2f, %esi
xorl %edx, %edx
callq 0x17ba0
cmpq $-0x1, %rax
jne 0x55bb1
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x55784
movq %r15, %rdi
callq 0x55686
testb %al, %al
je 0x55bd2
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5291a
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x55ba3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x17100
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xced9(%rip), %rdi # 0x62a91
leaq 0x61d3(%rip), %rdx # 0x5bd92
leaq 0xd0b0(%rip), %rcx # 0x62c76
movl $0x353, %esi # imm = 0x353
xorl %eax, %eax
callq 0x17950
movl $0x10, %edi
callq 0x17400
movq %rax, %rbx
leaq 0xd0c8(%rip), %rsi # 0x62cae
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x49a59
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x17290
xorl %ebp, %ebp
movq 0x223b2(%rip), %rsi # 0x77fc0
movq 0x22373(%rip), %rdx # 0x77f88
movq %rbx, %rdi
callq 0x176f0
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x55c3b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x17100
testb %bpl, %bpl
jne 0x55c45
jmp 0x55c52
movq %rax, %r14
movq %rbx, %rdi
callq 0x179b0
jmp 0x55c52
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x55c6d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x17100
movq %r14, %rdi
callq 0x17710
|
_Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp; int
push r15; int
push r14; __int64
push rbx; int
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
mov esi, 2Fh ; '/'
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_55BB1
lea r15, [rsp+68h+var_60]
mov rdi, r15; int
call _Z22fs_get_cache_directoryB5cxx11v; fs_get_cache_directory(void)
mov rdi, r15
call _Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_create_directory_with_parents(std::string const&)
test al, al
jz short loc_55BD2
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&)
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_55BA3
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_55BA3:
mov rax, rbx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_55BB1:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFilenameFindDi; "filename.find(DIRECTORY_SEPARATOR) == s"...
mov esi, 353h
xor eax, eax
call _ggml_abort
loc_55BD2:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aFailedToCreate; "failed to create cache directory: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_55C3B
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_55C3B:
test bpl, bpl
jnz short loc_55C45
jmp short loc_55C52
mov r14, rax
loc_55C45:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_55C52
mov r14, rax
loc_55C52:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_55C6D
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_55C6D:
mov rdi, r14
call __Unwind_Resume
|
_QWORD * fs_get_cache_file(_QWORD *a1, _QWORD *a2)
{
void *exception; // rbx
int v4[4]; // [rsp+8h] [rbp-60h] BYREF
long long v5; // [rsp+18h] [rbp-50h] BYREF
_BYTE v6[16]; // [rsp+28h] [rbp-40h] BYREF
if ( std::string::find(a2, 47LL, 0LL) != -1 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",
851LL,
"GGML_ASSERT(%s) failed",
"filename.find(DIRECTORY_SEPARATOR) == std::string::npos");
LABEL_7:
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v6, (long long)"failed to create cache directory: ", v4);
std::runtime_error::runtime_error(exception, v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
fs_get_cache_directory[abi:cxx11](v4);
if ( !(unsigned __int8)fs_create_directory_with_parents(v4) )
goto LABEL_7;
std::operator+<char>(a1, (long long)v4, a2);
if ( *(long long **)v4 != &v5 )
operator delete(*(void **)v4, v5 + 1);
return a1;
}
|
fs_get_cache_file:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV ESI,0x2f
XOR EDX,EDX
CALL 0x00117ba0
CMP RAX,-0x1
JNZ 0x00155bb1
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x00155784
LAB_00155b6c:
MOV RDI,R15
CALL 0x00155686
TEST AL,AL
JZ 0x00155bd2
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV RDX,R14
CALL 0x0015291a
LAB_00155b88:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00155ba3
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00117100
LAB_00155ba3:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00155bb1:
LEA RDI,[0x162a91]
LEA RDX,[0x15bd92]
LEA RCX,[0x162c76]
MOV ESI,0x353
XOR EAX,EAX
CALL 0x00117950
LAB_00155bd2:
MOV EDI,0x10
CALL 0x00117400
MOV RBX,RAX
LAB_00155bdf:
LEA RSI,[0x162cae]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00149a59
MOV BPL,0x1
LAB_00155bf8:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00117290
XOR EBP,EBP
MOV RSI,qword ptr [0x00177fc0]
MOV RDX,qword ptr [0x00177f88]
MOV RDI,RBX
CALL 0x001176f0
|
/* fs_get_cache_file(std::__cxx11::string const&) */
string * fs_get_cache_file(string *param_1)
{
char cVar1;
long lVar2;
runtime_error *this;
char in_SIL;
long *local_60 [2];
long local_50 [2];
string local_40 [32];
lVar2 = std::__cxx11::string::find(in_SIL,0x2f);
if (lVar2 != -1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",0x353,
"GGML_ASSERT(%s) failed","filename.find(DIRECTORY_SEPARATOR) == std::string::npos");
}
fs_get_cache_directory_abi_cxx11_();
/* try { // try from 00155b6c to 00155b87 has its CatchHandler @ 00155c4f */
cVar1 = fs_create_directory_with_parents((string *)local_60);
if (cVar1 != '\0') {
std::operator+(param_1,(string *)local_60);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00155bdf to 00155bf4 has its CatchHandler @ 00155c42 */
std::operator+((char *)local_40,(string *)"failed to create cache directory: ");
/* try { // try from 00155bf8 to 00155c1c has its CatchHandler @ 00155c1d */
std::runtime_error::runtime_error(this,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00177fc0,PTR__runtime_error_00177f88);
}
|
|
16,750
|
ma_pack_rec_unpack
|
eloqsql/storage/maria/ma_packrec.c
|
int _ma_pack_rec_unpack(register MARIA_HA *info, MARIA_BIT_BUFF *bit_buff,
register uchar *to, uchar *from, ulong reclength)
{
uchar *end_field;
reg3 MARIA_COLUMNDEF *end;
MARIA_COLUMNDEF *current_field;
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_pack_rec_unpack");
if (info->s->base.null_bytes)
{
memcpy(to, from, info->s->base.null_bytes);
to+= info->s->base.null_bytes;
from+= info->s->base.null_bytes;
reclength-= info->s->base.null_bytes;
}
init_bit_buffer(bit_buff, from, reclength);
for (current_field=share->columndef, end=current_field+share->base.fields ;
current_field < end ;
current_field++,to=end_field)
{
end_field=to+current_field->length;
(*current_field->unpack)(current_field, bit_buff, to, end_field);
}
if (!bit_buff->error &&
bit_buff->pos - bit_buff->bits / 8 == bit_buff->end)
DBUG_RETURN(0);
info->update&= ~HA_STATE_AKTIV;
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
DBUG_RETURN(HA_ERR_WRONG_IN_RECORD);
}
|
O3
|
c
|
ma_pack_rec_unpack:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r13
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq (%rdi), %rbx
movl 0x3fc(%rbx), %edx
testq %rdx, %rdx
movq %rdi, -0x30(%rbp)
je 0x39cb2
movq %r15, %rdi
movq %r12, %rsi
callq 0x29080
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
movl 0x3fc(%rax), %eax
addq %rax, %r15
addq %rax, %r12
subq %rax, %r13
movq %r12, 0x8(%r14)
movl %r13d, %eax
addq %r12, %rax
movq %rax, 0x10(%r14)
movl $0x0, 0x28(%r14)
movq $0x0, (%r14)
movl 0x3c8(%rbx), %eax
testq %rax, %rax
je 0x39d19
movq 0x588(%rbx), %r12
imulq $0x38, %rax, %rbx
addq %r12, %rbx
movzwl 0x8(%r12), %r13d
addq %r15, %r13
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *0x18(%r12)
addq $0x38, %r12
movq %r13, %r15
cmpq %rbx, %r12
jb 0x39ce8
cmpl $0x0, 0x28(%r14)
movq -0x30(%rbp), %rdi
jne 0x39d2d
movq 0x8(%r14), %rax
movl 0x4(%r14), %ecx
shrl $0x3, %ecx
subq %rcx, %rax
cmpq 0x10(%r14), %rax
je 0x39d46
andb $-0x3, 0x624(%rdi)
movl $0x7f, %r14d
movl $0x7f, %esi
callq 0x3659c
jmp 0x39d49
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ma_pack_rec_unpack:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, r8
mov r12, rcx
mov r15, rdx
mov r14, rsi
mov rbx, [rdi]
mov edx, [rbx+3FCh]
test rdx, rdx
mov [rbp+var_30], rdi
jz short loc_39CB2
mov rdi, r15
mov rsi, r12
call _memcpy
mov rdi, [rbp+var_30]
mov rax, [rdi]
mov eax, [rax+3FCh]
add r15, rax
add r12, rax
sub r13, rax
loc_39CB2:
mov [r14+8], r12
mov eax, r13d
add rax, r12
mov [r14+10h], rax
mov dword ptr [r14+28h], 0
mov qword ptr [r14], 0
mov eax, [rbx+3C8h]
test rax, rax
jz short loc_39D19
mov r12, [rbx+588h]
imul rbx, rax, 38h ; '8'
add rbx, r12
loc_39CE8:
movzx r13d, word ptr [r12+8]
add r13, r15
mov rdi, r12
mov rsi, r14
mov rdx, r15
mov rcx, r13
call qword ptr [r12+18h]
add r12, 38h ; '8'
mov r15, r13
cmp r12, rbx
jb short loc_39CE8
cmp dword ptr [r14+28h], 0
mov rdi, [rbp+var_30]
jnz short loc_39D2D
loc_39D19:
mov rax, [r14+8]
mov ecx, [r14+4]
shr ecx, 3
sub rax, rcx
cmp rax, [r14+10h]
jz short loc_39D46
loc_39D2D:
and byte ptr [rdi+624h], 0FDh
mov r14d, 7Fh
mov esi, 7Fh
call _ma_set_fatal_error
jmp short loc_39D49
loc_39D46:
xor r14d, r14d
loc_39D49:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_pack_rec_unpack(_BYTE *a1, long long a2, long long a3, long long a4, long long a5, int a6)
{
unsigned int v6; // r13d
long long v7; // r12
long long v9; // rbx
long long v10; // rdx
long long v11; // rax
unsigned long long v12; // r12
unsigned long long v13; // rbx
long long v14; // r13
long long v15; // rcx
unsigned int v16; // r14d
v6 = a5;
v7 = a4;
v9 = *(_QWORD *)a1;
v10 = *(unsigned int *)(*(_QWORD *)a1 + 1020LL);
if ( *(_DWORD *)(*(_QWORD *)a1 + 1020LL) )
{
memcpy(a3, a4, v10);
v11 = *(unsigned int *)(*(_QWORD *)a1 + 1020LL);
a3 += v11;
v7 += v11;
v6 -= v11;
}
*(_QWORD *)(a2 + 8) = v7;
*(_QWORD *)(a2 + 16) = v7 + v6;
*(_DWORD *)(a2 + 40) = 0;
*(_QWORD *)a2 = 0LL;
if ( *(_DWORD *)(v9 + 968) )
{
v12 = *(_QWORD *)(v9 + 1416);
v13 = v12 + 56LL * *(unsigned int *)(v9 + 968);
do
{
v14 = a3 + *(unsigned __int16 *)(v12 + 8);
(*(void ( **)(unsigned long long, long long, long long, long long))(v12 + 24))(v12, a2, a3, v14);
v12 += 56LL;
a3 = v14;
}
while ( v12 < v13 );
if ( *(_DWORD *)(a2 + 40) )
goto LABEL_8;
}
v15 = *(_DWORD *)(a2 + 4) >> 3;
if ( *(_QWORD *)(a2 + 8) - v15 != *(_QWORD *)(a2 + 16) )
{
LABEL_8:
a1[1572] &= ~2u;
v16 = 127;
ma_set_fatal_error(a1, 127LL, v10, v15, a5, a6);
}
else
{
return 0;
}
return v16;
}
|
_ma_pack_rec_unpack:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,R8
MOV R12,RCX
MOV R15,RDX
MOV R14,RSI
MOV RBX,qword ptr [RDI]
MOV EDX,dword ptr [RBX + 0x3fc]
TEST RDX,RDX
MOV qword ptr [RBP + -0x30],RDI
JZ 0x00139cb2
MOV RDI,R15
MOV RSI,R12
CALL 0x00129080
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RDI]
MOV EAX,dword ptr [RAX + 0x3fc]
ADD R15,RAX
ADD R12,RAX
SUB R13,RAX
LAB_00139cb2:
MOV qword ptr [R14 + 0x8],R12
MOV EAX,R13D
ADD RAX,R12
MOV qword ptr [R14 + 0x10],RAX
MOV dword ptr [R14 + 0x28],0x0
MOV qword ptr [R14],0x0
MOV EAX,dword ptr [RBX + 0x3c8]
TEST RAX,RAX
JZ 0x00139d19
MOV R12,qword ptr [RBX + 0x588]
IMUL RBX,RAX,0x38
ADD RBX,R12
LAB_00139ce8:
MOVZX R13D,word ptr [R12 + 0x8]
ADD R13,R15
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
MOV RCX,R13
CALL qword ptr [R12 + 0x18]
ADD R12,0x38
MOV R15,R13
CMP R12,RBX
JC 0x00139ce8
CMP dword ptr [R14 + 0x28],0x0
MOV RDI,qword ptr [RBP + -0x30]
JNZ 0x00139d2d
LAB_00139d19:
MOV RAX,qword ptr [R14 + 0x8]
MOV ECX,dword ptr [R14 + 0x4]
SHR ECX,0x3
SUB RAX,RCX
CMP RAX,qword ptr [R14 + 0x10]
JZ 0x00139d46
LAB_00139d2d:
AND byte ptr [RDI + 0x624],0xfd
MOV R14D,0x7f
MOV ESI,0x7f
CALL 0x0013659c
JMP 0x00139d49
LAB_00139d46:
XOR R14D,R14D
LAB_00139d49:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_ma_pack_rec_unpack(long *param_1,int8 *param_2,void *param_3,void *param_4,ulong param_5)
{
long lVar1;
ulong uVar2;
ulong uVar3;
void *pvVar4;
lVar1 = *param_1;
if ((ulong)*(uint *)(lVar1 + 0x3fc) != 0) {
memcpy(param_3,param_4,(ulong)*(uint *)(lVar1 + 0x3fc));
uVar3 = (ulong)*(uint *)(*param_1 + 0x3fc);
param_3 = (void *)((long)param_3 + uVar3);
param_4 = (void *)((long)param_4 + uVar3);
param_5 = param_5 - uVar3;
}
param_2[1] = param_4;
param_2[2] = (param_5 & 0xffffffff) + (long)param_4;
*(int4 *)(param_2 + 5) = 0;
*param_2 = 0;
if ((ulong)*(uint *)(lVar1 + 0x3c8) != 0) {
uVar3 = *(ulong *)(lVar1 + 0x588);
uVar2 = (ulong)*(uint *)(lVar1 + 0x3c8) * 0x38 + uVar3;
do {
pvVar4 = (void *)((ulong)*(ushort *)(uVar3 + 8) + (long)param_3);
(**(code **)(uVar3 + 0x18))(uVar3,param_2,param_3,pvVar4);
uVar3 = uVar3 + 0x38;
param_3 = pvVar4;
} while (uVar3 < uVar2);
if (*(int *)(param_2 + 5) != 0) goto LAB_00139d2d;
}
if (param_2[1] - (ulong)(*(uint *)((long)param_2 + 4) >> 3) == param_2[2]) {
return 0;
}
LAB_00139d2d:
*(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) & 0xfd;
_ma_set_fatal_error(param_1,0x7f);
return 0x7f;
}
|
|
16,751
|
memset
|
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
|
void *_memset(void *dest, int value, size_t count) {
// Validate parameters
if (!dest || count == 0) {
return dest;
}
// Safety check for size
if (count > HEAP_SIZE) {
HEAP_LOG("WARNING: Attempted to set unreasonably large block: %zu bytes\n", count);
return dest;
}
// Cast to byte pointer
uint8_t *d = (uint8_t *) dest;
uint8_t v = (uint8_t) value;
// If setting to zero, we can potentially use a faster method
if (v == 0 && count >= 8) {
// Check if pointer is 8-byte aligned
if (!((uintptr_t) dest & 7)) {
// Fast path: 64-bit aligned zero-fill
uint64_t *d64 = (uint64_t *) dest;
// Set 8 bytes at a time with zero
size_t qwords = count / 8;
for (size_t i = 0; i < qwords; i++) {
*d64++ = 0;
}
// Set remaining bytes
size_t offset = qwords * 8;
for (size_t i = offset; i < count; i++) {
d[i] = 0;
}
return dest;
}
}
// For non-zero values or small sizes, use byte-by-byte approach
// Fill the first few bytes until we reach 8-byte alignment
size_t i = 0;
while (i < count && ((uintptr_t) &d[i] & 7)) {
d[i++] = v;
}
// If the value is the same for each byte, use 64-bit optimization
if (count - i >= 8) {
// Create a 64-bit pattern from the byte
uint64_t pattern = 0;
for (int j = 0; j < 8; j++) {
pattern = (pattern << 8) | v;
}
// Set 8 bytes at a time with the pattern
uint64_t *d64 = (uint64_t *) &d[i];
size_t qwords = (count - i) / 8;
for (size_t j = 0; j < qwords; j++) {
*d64++ = pattern;
}
// Update index
i += qwords * 8;
}
// Set any remaining bytes
while (i < count) {
d[i++] = v;
}
return dest;
}
|
O1
|
c
|
memset:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
sete %al
leaq -0x4000001(%rdx), %rcx
cmpq $-0x4000000, %rcx # imm = 0xFC000000
setb %cl
orb %al, %cl
jne 0x2e21
movq %rdx, %r14
movzbl %sil, %ebp
testb $0x7, %bl
jne 0x2d82
testl %ebp, %ebp
jne 0x2d82
cmpq $0x7, %r14
jbe 0x2d82
movl %r14d, %r15d
andl $0x7fffff8, %r15d # imm = 0x7FFFFF8
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1070
cmpq %r14, %r15
je 0x2e21
leaq (%rbx,%r15), %rdi
movq %r15, %rdx
orq $0x1, %rdx
cmpq %rdx, %r14
cmovaq %r14, %rdx
subq %r15, %rdx
xorl %esi, %esi
jmp 0x2e1c
testq %r14, %r14
sete %al
testb $0x7, %bl
sete %cl
orb %al, %cl
jne 0x2dc2
movl %ebx, %r12d
notl %r12d
leaq -0x1(%r14), %rax
andl $0x7, %r12d
cmpq %r12, %rax
cmovbq %rax, %r12
leaq 0x1(%r12), %r15
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x1070
leaq (%rbx,%r12), %rax
incq %rax
jmp 0x2dc8
xorl %r15d, %r15d
movq %rbx, %rax
movq %r14, %rcx
subq %r15, %rcx
cmpq $0x8, %rcx
jb 0x2e0c
movl %ebp, %esi
movl $0x8, %edi
xorl %edx, %edx
shlq $0x8, %rdx
orq %rsi, %rdx
decl %edi
jne 0x2ddd
movq %rcx, %rsi
shrq $0x3, %rsi
cmpq $0x1, %rsi
adcq $0x0, %rsi
xorl %edi, %edi
movq %rdx, (%rax,%rdi,8)
incq %rdi
cmpq %rdi, %rsi
jne 0x2df9
andq $-0x8, %rcx
addq %rcx, %r15
subq %r15, %r14
jbe 0x2e21
addq %rbx, %r15
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x1070
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
|
_memset:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdi
test rdi, rdi
setz al
lea rcx, [rdx-4000001h]
cmp rcx, 0FFFFFFFFFC000000h
setb cl
or cl, al
jnz loc_2E21
mov r14, rdx
movzx ebp, sil
test bl, 7
jnz short loc_2D82
test ebp, ebp
jnz short loc_2D82
cmp r14, 7
jbe short loc_2D82
mov r15d, r14d
and r15d, 7FFFFF8h
mov rdi, rbx
xor esi, esi
mov rdx, r15
call _memset
cmp r15, r14
jz loc_2E21
lea rdi, [rbx+r15]
mov rdx, r15
or rdx, 1
cmp r14, rdx
cmova rdx, r14
sub rdx, r15
xor esi, esi
jmp loc_2E1C
loc_2D82:
test r14, r14
setz al
test bl, 7
setz cl
or cl, al
jnz short loc_2DC2
mov r12d, ebx
not r12d
lea rax, [r14-1]
and r12d, 7
cmp rax, r12
cmovb r12, rax
lea r15, [r12+1]
mov rdi, rbx
mov esi, ebp
mov rdx, r15
call _memset
lea rax, [rbx+r12]
inc rax
jmp short loc_2DC8
loc_2DC2:
xor r15d, r15d
mov rax, rbx
loc_2DC8:
mov rcx, r14
sub rcx, r15
cmp rcx, 8
jb short loc_2E0C
mov esi, ebp
mov edi, 8
xor edx, edx
loc_2DDD:
shl rdx, 8
or rdx, rsi
dec edi
jnz short loc_2DDD
mov rsi, rcx
shr rsi, 3
cmp rsi, 1
adc rsi, 0
xor edi, edi
loc_2DF9:
mov [rax+rdi*8], rdx
inc rdi
cmp rsi, rdi
jnz short loc_2DF9
and rcx, 0FFFFFFFFFFFFFFF8h
add r15, rcx
loc_2E0C:
sub r14, r15
jbe short loc_2E21
add r15, rbx
mov rdi, r15
mov esi, ebp
mov rdx, r14
loc_2E1C:
call _memset
loc_2E21:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long memset(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v5; // r15
unsigned long long v6; // rdi
long long v7; // rdx
unsigned long long v8; // rdx
unsigned long long v9; // r12
unsigned long long v10; // r15
long long v11; // rax
unsigned long long v12; // rcx
int v13; // edi
unsigned long long v14; // rdx
long long v15; // rdi
bool v16; // cc
unsigned long long v17; // r14
if ( a1 != 0 && a3 - 67108865 >= 0xFFFFFFFFFC000000LL )
{
if ( (a1 & 7) != 0 || (_BYTE)a2 || a3 <= 7 )
{
if ( a3 == 0 || (a1 & 7) == 0 )
{
v10 = 0LL;
v11 = a1;
}
else
{
v9 = ~(_BYTE)a1 & 7;
if ( a3 - 1 < v9 )
v9 = a3 - 1;
v10 = v9 + 1;
memset(a1, (unsigned __int8)a2, v9 + 1);
v11 = a1 + v9 + 1;
}
v12 = a3 - v10;
if ( a3 - v10 >= 8 )
{
v13 = 8;
v14 = 0LL;
do
{
v14 = (unsigned __int8)a2 | (v14 << 8);
--v13;
}
while ( v13 );
v15 = 0LL;
do
*(_QWORD *)(v11 + 8 * v15++) = v14;
while ( (v12 >> 3 == 0) + (v12 >> 3) != v15 );
v10 += v12 & 0xFFFFFFFFFFFFFFF8LL;
}
v16 = a3 <= v10;
v17 = a3 - v10;
if ( !v16 )
{
v6 = a1 + v10;
a2 = (unsigned __int8)a2;
v8 = v17;
LABEL_22:
memset(v6, a2, v8);
}
}
else
{
v5 = a3 & 0x7FFFFF8;
memset(a1, 0LL, v5);
if ( v5 != a3 )
{
v6 = a1 + v5;
v7 = v5 | 1;
if ( a3 > (v5 | 1) )
v7 = a3;
v8 = v7 - v5;
a2 = 0LL;
goto LABEL_22;
}
}
}
return a1;
}
|
_memset:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
TEST RDI,RDI
SETZ AL
LEA RCX,[RDX + -0x4000001]
CMP RCX,-0x4000000
SETC CL
OR CL,AL
JNZ 0x00102e21
MOV R14,RDX
MOVZX EBP,SIL
TEST BL,0x7
JNZ 0x00102d82
TEST EBP,EBP
JNZ 0x00102d82
CMP R14,0x7
JBE 0x00102d82
MOV R15D,R14D
AND R15D,0x7fffff8
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R15
CALL 0x00101070
CMP R15,R14
JZ 0x00102e21
LEA RDI,[RBX + R15*0x1]
MOV RDX,R15
OR RDX,0x1
CMP R14,RDX
CMOVA RDX,R14
SUB RDX,R15
XOR ESI,ESI
JMP 0x00102e1c
LAB_00102d82:
TEST R14,R14
SETZ AL
TEST BL,0x7
SETZ CL
OR CL,AL
JNZ 0x00102dc2
MOV R12D,EBX
NOT R12D
LEA RAX,[R14 + -0x1]
AND R12D,0x7
CMP RAX,R12
CMOVC R12,RAX
LEA R15,[R12 + 0x1]
MOV RDI,RBX
MOV ESI,EBP
MOV RDX,R15
CALL 0x00101070
LEA RAX,[RBX + R12*0x1]
INC RAX
JMP 0x00102dc8
LAB_00102dc2:
XOR R15D,R15D
MOV RAX,RBX
LAB_00102dc8:
MOV RCX,R14
SUB RCX,R15
CMP RCX,0x8
JC 0x00102e0c
MOV ESI,EBP
MOV EDI,0x8
XOR EDX,EDX
LAB_00102ddd:
SHL RDX,0x8
OR RDX,RSI
DEC EDI
JNZ 0x00102ddd
MOV RSI,RCX
SHR RSI,0x3
CMP RSI,0x1
ADC RSI,0x0
XOR EDI,EDI
LAB_00102df9:
MOV qword ptr [RAX + RDI*0x8],RDX
INC RDI
CMP RSI,RDI
JNZ 0x00102df9
AND RCX,-0x8
ADD R15,RCX
LAB_00102e0c:
SUB R14,R15
JBE 0x00102e21
ADD R15,RBX
MOV RDI,R15
MOV ESI,EBP
MOV RDX,R14
LAB_00102e1c:
CALL 0x00101070
LAB_00102e21:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void * _memset(void *param_1,uint param_2,ulong param_3)
{
void *pvVar1;
ulong uVar2;
size_t __n;
ulong uVar3;
int iVar4;
long lVar5;
size_t __n_00;
if (0xfffffffffbffffff < param_3 - 0x4000001 && param_1 != (void *)0x0) {
param_2 = param_2 & 0xff;
if (((((ulong)param_1 & 7) == 0) && (param_2 == 0)) && (7 < param_3)) {
__n_00 = (size_t)((uint)param_3 & 0x7fffff8);
memset(param_1,0,__n_00);
if (__n_00 == param_3) {
return param_1;
}
uVar2 = __n_00 | 1;
if ((__n_00 | 1) < param_3) {
uVar2 = param_3;
}
__n = uVar2 - __n_00;
param_2 = 0;
}
else {
if (((ulong)param_1 & 7) == 0 || param_3 == 0) {
__n_00 = 0;
pvVar1 = param_1;
}
else {
uVar2 = (ulong)(~(uint)param_1 & 7);
if (param_3 - 1 < uVar2) {
uVar2 = param_3 - 1;
}
__n_00 = uVar2 + 1;
memset(param_1,param_2,__n_00);
pvVar1 = (void *)((long)param_1 + uVar2 + 1);
}
uVar2 = param_3 - __n_00;
if (7 < uVar2) {
iVar4 = 8;
uVar3 = 0;
do {
uVar3 = uVar3 << 8 | (ulong)param_2;
iVar4 = iVar4 + -1;
} while (iVar4 != 0);
lVar5 = 0;
do {
*(ulong *)((long)pvVar1 + lVar5 * 8) = uVar3;
lVar5 = lVar5 + 1;
} while ((uVar2 >> 3) + (ulong)(uVar2 >> 3 == 0) != lVar5);
__n_00 = __n_00 + (uVar2 & 0xfffffffffffffff8);
}
__n = param_3 - __n_00;
if (param_3 < __n_00 || __n == 0) {
return param_1;
}
}
memset((void *)((long)param_1 + __n_00),param_2,__n);
}
return param_1;
}
|
|
16,752
|
memset
|
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
|
void *_memset(void *dest, int value, size_t count) {
// Validate parameters
if (!dest || count == 0) {
return dest;
}
// Safety check for size
if (count > HEAP_SIZE) {
HEAP_LOG("WARNING: Attempted to set unreasonably large block: %zu bytes\n", count);
return dest;
}
// Cast to byte pointer
uint8_t *d = (uint8_t *) dest;
uint8_t v = (uint8_t) value;
// If setting to zero, we can potentially use a faster method
if (v == 0 && count >= 8) {
// Check if pointer is 8-byte aligned
if (!((uintptr_t) dest & 7)) {
// Fast path: 64-bit aligned zero-fill
uint64_t *d64 = (uint64_t *) dest;
// Set 8 bytes at a time with zero
size_t qwords = count / 8;
for (size_t i = 0; i < qwords; i++) {
*d64++ = 0;
}
// Set remaining bytes
size_t offset = qwords * 8;
for (size_t i = offset; i < count; i++) {
d[i] = 0;
}
return dest;
}
}
// For non-zero values or small sizes, use byte-by-byte approach
// Fill the first few bytes until we reach 8-byte alignment
size_t i = 0;
while (i < count && ((uintptr_t) &d[i] & 7)) {
d[i++] = v;
}
// If the value is the same for each byte, use 64-bit optimization
if (count - i >= 8) {
// Create a 64-bit pattern from the byte
uint64_t pattern = 0;
for (int j = 0; j < 8; j++) {
pattern = (pattern << 8) | v;
}
// Set 8 bytes at a time with the pattern
uint64_t *d64 = (uint64_t *) &d[i];
size_t qwords = (count - i) / 8;
for (size_t j = 0; j < qwords; j++) {
*d64++ = pattern;
}
// Update index
i += qwords * 8;
}
// Set any remaining bytes
while (i < count) {
d[i++] = v;
}
return dest;
}
|
O3
|
c
|
memset:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
sete %al
leaq -0x4000001(%rdx), %rcx
cmpq $-0x4000000, %rcx # imm = 0xFC000000
setb %cl
orb %al, %cl
jne 0x2db8
movq %rdx, %r14
movzbl %sil, %ebp
testb $0x7, %bl
jne 0x2c96
testl %ebp, %ebp
jne 0x2c96
cmpq $0x7, %r14
jbe 0x2c96
movl %r14d, %r15d
andl $0x7fffff8, %r15d # imm = 0x7FFFFF8
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1070
cmpq %r14, %r15
je 0x2db8
leaq (%rbx,%r15), %rdi
movq %r15, %rdx
orq $0x1, %rdx
cmpq %rdx, %r14
cmovaq %r14, %rdx
subq %r15, %rdx
xorl %esi, %esi
jmp 0x2db3
testb $0x7, %bl
je 0x2ccb
movl %ebx, %r12d
notl %r12d
leaq -0x1(%r14), %rax
andl $0x7, %r12d
cmpq %r12, %rax
cmovbq %rax, %r12
leaq 0x1(%r12), %r15
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x1070
leaq (%rbx,%r12), %rax
incq %rax
jmp 0x2cd1
xorl %r15d, %r15d
movq %rbx, %rax
movq %r14, %rcx
subq %r15, %rcx
cmpq $0x8, %rcx
jb 0x2da3
movl %ebp, %esi
movl $0x8, %edi
xorl %edx, %edx
shlq $0x8, %rdx
orq %rsi, %rdx
decl %edi
jne 0x2cea
movq %rcx, %rdi
shrq $0x3, %rdi
cmpq $0x1, %rdi
adcq $0x0, %rdi
leaq 0x1(%rdi), %r8
movabsq $0x3ffffffffffffffe, %rsi # imm = 0x3FFFFFFFFFFFFFFE
andq %r8, %rsi
decq %rdi
movq %rdi, %xmm0
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
xorl %edi, %edi
movdqa 0x584(%rip), %xmm1 # 0x32b0
movdqa 0x58c(%rip), %xmm2 # 0x32c0
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rdi, %xmm4
pshufd $0x44, %xmm4, %xmm4 # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6 # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4 # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %r8d
notl %r8d
testb $0x1, %r8b
je 0x2d7e
movq %rdx, (%rax,%rdi,8)
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %r8d
testb $0x1, %r8b
je 0x2d93
movq %rdx, 0x8(%rax,%rdi,8)
addq $0x2, %rdi
cmpq %rdi, %rsi
jne 0x2d3c
andq $-0x8, %rcx
addq %rcx, %r15
subq %r15, %r14
jbe 0x2db8
addq %rbx, %r15
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x1070
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_memset:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdi
test rdi, rdi
setz al
lea rcx, [rdx-4000001h]
cmp rcx, 0FFFFFFFFFC000000h
setb cl
or cl, al
jnz loc_2DB8
mov r14, rdx
movzx ebp, sil
test bl, 7
jnz short loc_2C96
test ebp, ebp
jnz short loc_2C96
cmp r14, 7
jbe short loc_2C96
mov r15d, r14d
and r15d, 7FFFFF8h
mov rdi, rbx
xor esi, esi
mov rdx, r15
call _memset
cmp r15, r14
jz loc_2DB8
lea rdi, [rbx+r15]
mov rdx, r15
or rdx, 1
cmp r14, rdx
cmova rdx, r14
sub rdx, r15
xor esi, esi
jmp loc_2DB3
loc_2C96:
test bl, 7
jz short loc_2CCB
mov r12d, ebx
not r12d
lea rax, [r14-1]
and r12d, 7
cmp rax, r12
cmovb r12, rax
lea r15, [r12+1]
mov rdi, rbx
mov esi, ebp
mov rdx, r15
call _memset
lea rax, [rbx+r12]
inc rax
jmp short loc_2CD1
loc_2CCB:
xor r15d, r15d
mov rax, rbx
loc_2CD1:
mov rcx, r14
sub rcx, r15
cmp rcx, 8
jb loc_2DA3
mov esi, ebp
mov edi, 8
xor edx, edx
loc_2CEA:
shl rdx, 8
or rdx, rsi
dec edi
jnz short loc_2CEA
mov rdi, rcx
shr rdi, 3
cmp rdi, 1
adc rdi, 0
lea r8, [rdi+1]
mov rsi, 3FFFFFFFFFFFFFFEh
and rsi, r8
dec rdi
movq xmm0, rdi
pshufd xmm0, xmm0, 44h ; 'D'
xor edi, edi
movdqa xmm1, cs:xmmword_32B0
movdqa xmm2, cs:xmmword_32C0
pxor xmm0, xmm2
pcmpeqd xmm3, xmm3
loc_2D3C:
movq xmm4, rdi
pshufd xmm4, xmm4, 44h ; 'D'
por xmm4, xmm1
pxor xmm4, xmm2
movdqa xmm5, xmm4
pcmpgtd xmm5, xmm0
pcmpeqd xmm4, xmm0
pshufd xmm6, xmm4, 0F5h
pand xmm6, xmm5
pshufd xmm4, xmm5, 0F5h
por xmm4, xmm6
movd r8d, xmm4
not r8d
test r8b, 1
jz short loc_2D7E
mov [rax+rdi*8], rdx
loc_2D7E:
pxor xmm4, xmm3
pextrw r8d, xmm4, 4
test r8b, 1
jz short loc_2D93
mov [rax+rdi*8+8], rdx
loc_2D93:
add rdi, 2
cmp rsi, rdi
jnz short loc_2D3C
and rcx, 0FFFFFFFFFFFFFFF8h
add r15, rcx
loc_2DA3:
sub r14, r15
jbe short loc_2DB8
add r15, rbx
mov rdi, r15
mov esi, ebp
mov rdx, r14
loc_2DB3:
call _memset
loc_2DB8:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long memset(long long a1, unsigned __int8 a2, unsigned long long a3)
{
unsigned int v5; // ebp
unsigned long long v6; // r15
unsigned long long v7; // rdi
long long v8; // rdx
unsigned long long v9; // rdx
long long v10; // rsi
unsigned long long v11; // r12
unsigned long long v12; // r15
long long v13; // rax
unsigned long long v14; // rcx
int v15; // edi
unsigned long long v16; // rdx
unsigned long long v17; // rdi
long long v18; // rsi
__m128i v19; // xmm0
unsigned long long v20; // rdi
__m128i si128; // xmm1
__m128i v22; // xmm2
__m128i v23; // xmm0
__m128i v24; // xmm4
__m128i v25; // xmm5
__m128i v26; // xmm4
bool v27; // cc
unsigned long long v28; // r14
if ( a1 != 0 && a3 - 67108865 >= 0xFFFFFFFFFC000000LL )
{
v5 = a2;
if ( (a1 & 7) != 0 || a2 || a3 <= 7 )
{
if ( (a1 & 7) != 0 )
{
v11 = ~(_BYTE)a1 & 7;
if ( a3 - 1 < v11 )
v11 = a3 - 1;
v12 = v11 + 1;
memset(a1, a2, v11 + 1);
v13 = a1 + v11 + 1;
}
else
{
v12 = 0LL;
v13 = a1;
}
v14 = a3 - v12;
if ( a3 - v12 >= 8 )
{
v15 = 8;
v16 = 0LL;
do
{
v16 = a2 | (v16 << 8);
--v15;
}
while ( v15 );
v17 = (v14 >> 3 == 0) + (v14 >> 3);
v18 = (v17 + 1) & 0x3FFFFFFFFFFFFFFELL;
v19 = _mm_shuffle_epi32((__m128i)(v17 - 1), 68);
v20 = 0LL;
si128 = _mm_load_si128((const __m128i *)&xmmword_32B0);
v22 = _mm_load_si128((const __m128i *)&xmmword_32C0);
v23 = _mm_xor_si128(v19, v22);
do
{
v24 = _mm_xor_si128(_mm_or_si128(_mm_shuffle_epi32((__m128i)v20, 68), si128), v22);
v25 = _mm_cmpgt_epi32(v24, v23);
v26 = _mm_or_si128(
_mm_shuffle_epi32(v25, 245),
_mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v24, v23), 245), v25));
if ( (~_mm_cvtsi128_si32(v26) & 1) != 0 )
*(_QWORD *)(v13 + 8 * v20) = v16;
if ( (_mm_extract_epi16(_mm_xor_si128(v26, (__m128i)-1LL), 4) & 1) != 0 )
*(_QWORD *)(v13 + 8 * v20 + 8) = v16;
v20 += 2LL;
}
while ( v18 != v20 );
v12 += v14 & 0xFFFFFFFFFFFFFFF8LL;
}
v27 = a3 <= v12;
v28 = a3 - v12;
if ( !v27 )
{
v7 = a1 + v12;
v10 = v5;
v9 = v28;
LABEL_26:
memset(v7, v10, v9);
}
}
else
{
v6 = a3 & 0x7FFFFF8;
memset(a1, 0LL, v6);
if ( v6 != a3 )
{
v7 = a1 + v6;
v8 = v6 | 1;
if ( a3 > (v6 | 1) )
v8 = a3;
v9 = v8 - v6;
v10 = 0LL;
goto LABEL_26;
}
}
}
return a1;
}
|
_memset:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
TEST RDI,RDI
SETZ AL
LEA RCX,[RDX + -0x4000001]
CMP RCX,-0x4000000
SETC CL
OR CL,AL
JNZ 0x00102db8
MOV R14,RDX
MOVZX EBP,SIL
TEST BL,0x7
JNZ 0x00102c96
TEST EBP,EBP
JNZ 0x00102c96
CMP R14,0x7
JBE 0x00102c96
MOV R15D,R14D
AND R15D,0x7fffff8
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R15
CALL 0x00101070
CMP R15,R14
JZ 0x00102db8
LEA RDI,[RBX + R15*0x1]
MOV RDX,R15
OR RDX,0x1
CMP R14,RDX
CMOVA RDX,R14
SUB RDX,R15
XOR ESI,ESI
JMP 0x00102db3
LAB_00102c96:
TEST BL,0x7
JZ 0x00102ccb
MOV R12D,EBX
NOT R12D
LEA RAX,[R14 + -0x1]
AND R12D,0x7
CMP RAX,R12
CMOVC R12,RAX
LEA R15,[R12 + 0x1]
MOV RDI,RBX
MOV ESI,EBP
MOV RDX,R15
CALL 0x00101070
LEA RAX,[RBX + R12*0x1]
INC RAX
JMP 0x00102cd1
LAB_00102ccb:
XOR R15D,R15D
MOV RAX,RBX
LAB_00102cd1:
MOV RCX,R14
SUB RCX,R15
CMP RCX,0x8
JC 0x00102da3
MOV ESI,EBP
MOV EDI,0x8
XOR EDX,EDX
LAB_00102cea:
SHL RDX,0x8
OR RDX,RSI
DEC EDI
JNZ 0x00102cea
MOV RDI,RCX
SHR RDI,0x3
CMP RDI,0x1
ADC RDI,0x0
LEA R8,[RDI + 0x1]
MOV RSI,0x3ffffffffffffffe
AND RSI,R8
DEC RDI
MOVQ XMM0,RDI
PSHUFD XMM0,XMM0,0x44
XOR EDI,EDI
MOVDQA XMM1,xmmword ptr [0x001032b0]
MOVDQA XMM2,xmmword ptr [0x001032c0]
PXOR XMM0,XMM2
PCMPEQD XMM3,XMM3
LAB_00102d3c:
MOVQ XMM4,RDI
PSHUFD XMM4,XMM4,0x44
POR XMM4,XMM1
PXOR XMM4,XMM2
MOVDQA XMM5,XMM4
PCMPGTD XMM5,XMM0
PCMPEQD XMM4,XMM0
PSHUFD XMM6,XMM4,0xf5
PAND XMM6,XMM5
PSHUFD XMM4,XMM5,0xf5
POR XMM4,XMM6
MOVD R8D,XMM4
NOT R8D
TEST R8B,0x1
JZ 0x00102d7e
MOV qword ptr [RAX + RDI*0x8],RDX
LAB_00102d7e:
PXOR XMM4,XMM3
PEXTRW R8D,XMM4,0x4
TEST R8B,0x1
JZ 0x00102d93
MOV qword ptr [RAX + RDI*0x8 + 0x8],RDX
LAB_00102d93:
ADD RDI,0x2
CMP RSI,RDI
JNZ 0x00102d3c
AND RCX,-0x8
ADD R15,RCX
LAB_00102da3:
SUB R14,R15
JBE 0x00102db8
ADD R15,RBX
MOV RDI,R15
MOV ESI,EBP
MOV RDX,R14
LAB_00102db3:
CALL 0x00101070
LAB_00102db8:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void * _memset(void *param_1,uint param_2,ulong param_3)
{
int1 auVar1 [16];
int1 auVar2 [16];
void *pvVar3;
ulong uVar4;
size_t __n;
ulong uVar5;
int iVar6;
long lVar7;
long lVar8;
ulong uVar9;
size_t __n_00;
int1 auVar10 [16];
int1 auVar11 [16];
if (0xfffffffffbffffff < param_3 - 0x4000001 && param_1 != (void *)0x0) {
param_2 = param_2 & 0xff;
if (((((ulong)param_1 & 7) == 0) && (param_2 == 0)) && (7 < param_3)) {
__n_00 = (size_t)((uint)param_3 & 0x7fffff8);
memset(param_1,0,__n_00);
if (__n_00 == param_3) {
return param_1;
}
uVar4 = __n_00 | 1;
if ((__n_00 | 1) < param_3) {
uVar4 = param_3;
}
__n = uVar4 - __n_00;
param_2 = 0;
}
else {
if (((ulong)param_1 & 7) == 0) {
__n_00 = 0;
pvVar3 = param_1;
}
else {
uVar4 = (ulong)(~(uint)param_1 & 7);
if (param_3 - 1 < uVar4) {
uVar4 = param_3 - 1;
}
__n_00 = uVar4 + 1;
memset(param_1,param_2,__n_00);
pvVar3 = (void *)((long)param_1 + uVar4 + 1);
}
auVar2 = _DAT_001032c0;
auVar1 = _DAT_001032b0;
uVar4 = param_3 - __n_00;
if (7 < uVar4) {
iVar6 = 8;
uVar5 = 0;
do {
uVar5 = uVar5 << 8 | (ulong)param_2;
iVar6 = iVar6 + -1;
} while (iVar6 != 0);
lVar7 = (uVar4 >> 3) + (ulong)(uVar4 >> 3 == 0);
lVar8 = lVar7 + -1;
auVar10._8_4_ = (int)lVar8;
auVar10._0_8_ = lVar8;
auVar10._12_4_ = (int)((ulong)lVar8 >> 0x20);
uVar9 = 0;
auVar10 = auVar10 ^ _DAT_001032c0;
do {
auVar11._8_4_ = (int)uVar9;
auVar11._0_8_ = uVar9;
auVar11._12_4_ = (int)(uVar9 >> 0x20);
auVar11 = (auVar11 | auVar1) ^ auVar2;
if ((bool)(~(auVar11._4_4_ == auVar10._4_4_ && auVar10._0_4_ < auVar11._0_4_ ||
auVar10._4_4_ < auVar11._4_4_) & 1)) {
*(ulong *)((long)pvVar3 + uVar9 * 8) = uVar5;
}
if ((auVar11._12_4_ != auVar10._12_4_ || auVar11._8_4_ <= auVar10._8_4_) &&
auVar11._12_4_ <= auVar10._12_4_) {
*(ulong *)((long)pvVar3 + uVar9 * 8 + 8) = uVar5;
}
uVar9 = uVar9 + 2;
} while ((lVar7 + 1U & 0x3ffffffffffffffe) != uVar9);
__n_00 = __n_00 + (uVar4 & 0xfffffffffffffff8);
}
__n = param_3 - __n_00;
if (param_3 < __n_00 || __n == 0) {
return param_1;
}
}
memset((void *)((long)param_1 + __n_00),param_2,__n);
}
return param_1;
}
|
|
16,753
|
testing::internal::ParseFlagValue(char const*, char const*, bool)
|
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
static const char* ParseFlagValue(const char* str, const char* flag_name,
bool def_optional) {
// str and flag must not be NULL.
if (str == nullptr || flag_name == nullptr) return nullptr;
// The flag must start with "--" followed by GTEST_FLAG_PREFIX_.
const std::string flag_str =
std::string("--") + GTEST_FLAG_PREFIX_ + flag_name;
const size_t flag_len = flag_str.length();
if (strncmp(str, flag_str.c_str(), flag_len) != 0) return nullptr;
// Skips the flag name.
const char* flag_end = str + flag_len;
// When def_optional is true, it's OK to not have a "=value" part.
if (def_optional && (flag_end[0] == '\0')) {
return flag_end;
}
// If def_optional is true and there are more characters after the
// flag name, or if def_optional is false, there must be a '=' after
// the flag name.
if (flag_end[0] != '=') return nullptr;
// Returns the string after "=".
return flag_end + 1;
}
|
O1
|
cpp
|
testing::internal::ParseFlagValue(char const*, char const*, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x3301e
xorl %ebx, %ebx
jmp 0x33173
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x10d6f(%rip), %rsi # 0x43da6
leaq 0x10d6a(%rip), %rdx # 0x43da8
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0xfdfe
leaq 0xf53a(%rip), %rsi # 0x4258c
movq %r15, %rdi
callq 0x9a70
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x33081
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x33088
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rsi
callq 0x9a70
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x330d3
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x330db
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3310a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x33121
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x28(%rsp), %r14
movq 0x30(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x9210
testl %eax, %eax
je 0x33141
xorl %ebx, %ebx
jmp 0x3315e
addq %r15, %rbx
testb %bpl, %bpl
je 0x3314e
cmpb $0x0, (%rbx)
je 0x3315e
xorl %eax, %eax
cmpb $0x3d, (%rbx)
leaq 0x1(%rbx), %rcx
cmoveq %rcx, %rax
movq %rax, %rbx
cmpq %r13, %r14
je 0x33173
movq 0x38(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x94c0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x331a4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x331a4
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x331bb
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x94c0
movq %rbx, %rdi
callq 0x99a0
|
_ZN7testing8internalL14ParseFlagValueEPKcS2_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
test rdi, rdi
setz al
test rsi, rsi
setz cl
or cl, al
jz short loc_3301E
xor ebx, ebx
jmp loc_33173
loc_3301E:
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea r12, [rsp+98h+var_40]
mov [r12-10h], r12
lea rsi, aTheValueOfFlag+12h; "--"
lea rdx, aTheValueOfFlag+14h; ""
lea r15, [rsp+98h+var_50]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aGtest; "gtest_"
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r15, [rsp+98h+var_80]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_33081
mov [rsp+98h+var_90], rdx
mov rdx, [rcx]
mov [rsp+98h+var_80], rdx
jmp short loc_33088
loc_33081:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_33088:
mov rdx, [rax+8]
lea rdi, [rsp+98h+var_90]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r13, [rsp+98h+var_60]
mov [r13-10h], r13
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_330D3
mov [rsp+98h+var_70], rdx
mov rdx, [rcx]
mov [rsp+98h+var_60], rdx
jmp short loc_330DB
loc_330D3:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r13+0], xmm0
loc_330DB:
mov rdx, [rax+8]
mov [rsp+98h+var_68], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+98h+var_90]; void *
cmp rdi, r15
jz short loc_3310A
mov rsi, [rsp+98h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3310A:
mov rdi, [rsp+98h+var_50]; void *
cmp rdi, r12
jz short loc_33121
mov rsi, [rsp+98h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33121:
mov r14, [rsp+98h+var_70]
mov r15, [rsp+98h+var_68]
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call _strncmp
test eax, eax
jz short loc_33141
xor ebx, ebx
jmp short loc_3315E
loc_33141:
add rbx, r15
test bpl, bpl
jz short loc_3314E
cmp byte ptr [rbx], 0
jz short loc_3315E
loc_3314E:
xor eax, eax
cmp byte ptr [rbx], 3Dh ; '='
lea rcx, [rbx+1]
cmovz rax, rcx
mov rbx, rax
loc_3315E:
cmp r14, r13
jz short loc_33173
mov rsi, [rsp+98h+var_60]
inc rsi; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_33173:
mov rax, rbx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_331A4
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_331A4
mov rbx, rax
loc_331A4:
mov rdi, [rsp+arg_40]; void *
cmp rdi, r12
jz short loc_331BB
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_331BB:
mov rdi, rbx
call __Unwind_Resume
|
_BYTE * testing::internal::ParseFlagValue(testing::internal *this, const char *a2, const char *a3)
{
_BYTE *v3; // rbx
char v4; // bp
long long v5; // rax
__int128 *v6; // rcx
long long v7; // rax
__int128 *v8; // rcx
__int128 *v9; // r14
long long v10; // r15
_BYTE *v11; // rax
void *v13[2]; // [rsp+8h] [rbp-90h] BYREF
__int128 v14; // [rsp+18h] [rbp-80h] BYREF
void *v15; // [rsp+28h] [rbp-70h]
long long v16; // [rsp+30h] [rbp-68h]
__int128 v17; // [rsp+38h] [rbp-60h] BYREF
void *v18[2]; // [rsp+48h] [rbp-50h] BYREF
_QWORD v19[8]; // [rsp+58h] [rbp-40h] BYREF
if ( this == 0LL || a2 == 0LL )
return 0LL;
v4 = (char)a3;
v18[0] = v19;
std::string::_M_construct<char const*>(v18, "--", (long long)"");
v5 = std::string::append(v18, "gtest_");
v13[0] = &v14;
v6 = (__int128 *)(v5 + 16);
if ( *(_QWORD *)v5 == v5 + 16 )
{
v14 = *v6;
}
else
{
v13[0] = *(void **)v5;
*(_QWORD *)&v14 = *(_QWORD *)v6;
}
v13[1] = *(void **)(v5 + 8);
*(_QWORD *)v5 = v6;
*(_QWORD *)(v5 + 8) = 0LL;
*(_BYTE *)(v5 + 16) = 0;
v7 = std::string::append(v13, a2);
v15 = &v17;
v8 = (__int128 *)(v7 + 16);
if ( *(_QWORD *)v7 == v7 + 16 )
{
v17 = *v8;
}
else
{
v15 = *(void **)v7;
*(_QWORD *)&v17 = *(_QWORD *)v8;
}
v16 = *(_QWORD *)(v7 + 8);
*(_QWORD *)v7 = v8;
*(_QWORD *)(v7 + 8) = 0LL;
*(_BYTE *)(v7 + 16) = 0;
if ( v13[0] != &v14 )
operator delete(v13[0], v14 + 1);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
v9 = (__int128 *)v15;
v10 = v16;
if ( !(unsigned int)strncmp(this, v15, v16) )
{
v3 = (char *)this + v10;
if ( !v4 || *v3 )
{
v11 = 0LL;
if ( *v3 == 61 )
v11 = v3 + 1;
v3 = v11;
}
}
else
{
v3 = 0LL;
}
if ( v9 != &v17 )
operator delete(v9, v17 + 1);
return v3;
}
|
ParseFlagValue:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
TEST RDI,RDI
SETZ AL
TEST RSI,RSI
SETZ CL
OR CL,AL
JZ 0x0013301e
XOR EBX,EBX
JMP 0x00133173
LAB_0013301e:
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x58]
MOV qword ptr [R12 + -0x10],R12
LEA RSI,[0x143da6]
LEA RDX,[0x143da8]
LEA R15,[RSP + 0x48]
MOV RDI,R15
CALL 0x0010fdfe
LAB_0013304b:
LEA RSI,[0x14258c]
MOV RDI,R15
CALL 0x00109a70
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00133081
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x00133088
LAB_00133081:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_00133088:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001330a4:
MOV RSI,R14
CALL 0x00109a70
LAB_001330ac:
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001330d3
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x001330db
LAB_001330d3:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R13],XMM0
LAB_001330db:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0013310a
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001094c0
LAB_0013310a:
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R12
JZ 0x00133121
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001094c0
LAB_00133121:
MOV R14,qword ptr [RSP + 0x28]
MOV R15,qword ptr [RSP + 0x30]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x00109210
TEST EAX,EAX
JZ 0x00133141
XOR EBX,EBX
JMP 0x0013315e
LAB_00133141:
ADD RBX,R15
TEST BPL,BPL
JZ 0x0013314e
CMP byte ptr [RBX],0x0
JZ 0x0013315e
LAB_0013314e:
XOR EAX,EAX
CMP byte ptr [RBX],0x3d
LEA RCX,[RBX + 0x1]
CMOVZ RAX,RCX
MOV RBX,RAX
LAB_0013315e:
CMP R14,R13
JZ 0x00133173
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
MOV RDI,R14
CALL 0x001094c0
LAB_00133173:
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::ParseFlagValue(char const*, char const*, bool) */
char * testing::internal::ParseFlagValue(char *param_1,char *param_2,bool param_3)
{
size_t sVar1;
int iVar2;
long *plVar3;
long *plVar4;
char *pcVar5;
char *pcVar6;
long *local_90;
long local_88;
long local_80;
long lStack_78;
long *local_70;
size_t local_68;
long local_60;
long lStack_58;
long *local_50 [2];
long local_40 [2];
if (param_2 == (char *)0x0 || param_1 == (char *)0x0) {
pcVar5 = (char *)0x0;
}
else {
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char_const*>(local_50,"--","");
/* try { // try from 0013304b to 00133059 has its CatchHandler @ 001331a1 */
plVar3 = (long *)std::__cxx11::string::append((char *)local_50);
plVar4 = plVar3 + 2;
if ((long *)*plVar3 == plVar4) {
local_80 = *plVar4;
lStack_78 = plVar3[3];
local_90 = &local_80;
}
else {
local_80 = *plVar4;
local_90 = (long *)*plVar3;
}
local_88 = plVar3[1];
*plVar3 = (long)plVar4;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
/* try { // try from 001330a4 to 001330ab has its CatchHandler @ 00133185 */
plVar3 = (long *)std::__cxx11::string::append((char *)&local_90);
plVar4 = plVar3 + 2;
if ((long *)*plVar3 == plVar4) {
local_60 = *plVar4;
lStack_58 = plVar3[3];
local_70 = &local_60;
}
else {
local_60 = *plVar4;
local_70 = (long *)*plVar3;
}
local_68 = plVar3[1];
*plVar3 = (long)plVar4;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
sVar1 = local_68;
plVar3 = local_70;
iVar2 = strncmp(param_1,(char *)local_70,local_68);
if (iVar2 == 0) {
pcVar6 = param_1 + sVar1;
if ((!param_3) || (pcVar5 = pcVar6, *pcVar6 != '\0')) {
pcVar5 = (char *)0x0;
if (*pcVar6 == '=') {
pcVar5 = pcVar6 + 1;
}
}
}
else {
pcVar5 = (char *)0x0;
}
if (plVar3 != &local_60) {
operator_delete(plVar3,local_60 + 1);
}
}
return pcVar5;
}
|
|
16,754
|
psi_rwlock_rdlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_rwlock_rdlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line);
int result= rw_rdlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
}
|
O3
|
c
|
psi_rwlock_rdlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x3573c3(%rip), %r15 # 0x386010
movq (%r15), %rax
movq 0x90(%rdi), %rsi
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *0x1a0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0xa44a4
movl %eax, %r14d
testq %rbx, %rbx
je 0x2ec85
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1a8(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
psi_rwlock_rdlock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+90h]
lea rdi, [rbp+var_48]
xor edx, edx
call qword ptr [rax+1A0h]
mov rbx, rax
mov rdi, r14
call my_rw_rdlock
mov r14d, eax
test rbx, rbx
jz short loc_2EC85
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1A8h]
loc_2EC85:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long psi_rwlock_rdlock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[52])(
v6,
*(_QWORD *)(a1 + 144),
0LL,
a2,
a3);
v4 = my_rw_rdlock(a1);
if ( v3 )
((void ( *)(long long, _QWORD))PSI_server[53])(v3, v4);
return v4;
}
|
psi_rwlock_rdlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x486010]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x90]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL qword ptr [RAX + 0x1a0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x001a44a4
MOV R14D,EAX
TEST RBX,RBX
JZ 0x0012ec85
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1a8]
LAB_0012ec85:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_rwlock_rdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x90),0,param_2,param_3);
uVar1 = my_rw_rdlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
|
|
16,755
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&)
|
monkey531[P]llama/common/json.hpp
|
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
{
JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
}
s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
}
|
O1
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0x8b68c
movq 0x8(%r14), %rax
movq %rsi, %rdi
movq %rax, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x1b570
movl $0x20, %edi
callq 0x1b4d0
movq %rax, %rbx
movq %r14, %rdi
callq 0x622f4
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x69a26(%rip), %rsi # 0xf50d6
leaq 0x10(%rsp), %rdi
callq 0x8a881
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x8a6b2
xorl %ebp, %ebp
leaq 0xa482d(%rip), %rsi # 0x12ff08
leaq -0x2d228(%rip), %rdx # 0x5e4ba
movq %rbx, %rdi
callq 0x1c1c0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8b710
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1ba60
jmp 0x8b710
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x8b71d
movq %rbx, %rdi
callq 0x1b760
movq %r14, %rdi
callq 0x1c250
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_8B68C
mov rax, [r14+8]
mov rdi, rsi
mov rsi, rax
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_8B68C:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeStri; "type must be string, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8B710
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8B710
mov r14, rax
mov bpl, 1
loc_8B710:
test bpl, bpl
jz short loc_8B71D
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8B71D:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
"type must be string, but is ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8));
}
|
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x0018b68c
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,RSI
MOV RSI,RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x0011b570
LAB_0018b68c:
MOV EDI,0x20
CALL 0x0011b4d0
MOV RBX,RAX
MOV RDI,R14
CALL 0x001622f4
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0018b6a9:
LEA RSI,[0x1f50d6]
LEA RDI,[RSP + 0x10]
CALL 0x0018a881
MOV BPL,0x1
LAB_0018b6bd:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x0018a6b2
XOR EBP,EBP
LEA RSI,[0x22ff08]
LEA RDX,[0x15e4ba]
MOV RDI,RBX
CALL 0x0011c1c0
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::string_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,string_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x3) {
std::__cxx11::string::_M_assign((string *)param_2);
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 0018b6a9 to 0018b6b9 has its CatchHandler @ 0018b70a */
concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be string, but is ",&local_40);
/* try { // try from 0018b6bd to 0018b6e9 has its CatchHandler @ 0018b6ea */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
|
|
16,756
|
unsigned char const* google::protobuf::io::(anonymous namespace)::DecodeVarint64KnownSize<3ul>(unsigned char const*, unsigned long*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc
|
const uint8_t* DecodeVarint64KnownSize(const uint8_t* buffer, uint64_t* value) {
GOOGLE_DCHECK_GT(N, 0);
uint64_t result = static_cast<uint64_t>(buffer[N - 1]) << (7 * (N - 1));
for (size_t i = 0, offset = 0; i < N - 1; i++, offset += 7) {
result += static_cast<uint64_t>(buffer[i] - 0x80) << offset;
}
*value = result;
return buffer + N;
}
|
O0
|
cpp
|
unsigned char const* google::protobuf::io::(anonymous namespace)::DecodeVarint64KnownSize<3ul>(unsigned char const*, unsigned long*):
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0x21f02
jmp 0x21f04
jmp 0x21efa
movq -0x8(%rsp), %rax
movzbl 0x9(%rax), %eax
shlq $0x3f, %rax
movq %rax, -0x18(%rsp)
movq $0x0, -0x20(%rsp)
movq $0x0, -0x28(%rsp)
cmpq $0x9, -0x20(%rsp)
jae 0x21f75
movq -0x8(%rsp), %rax
movq -0x20(%rsp), %rcx
movzbl (%rax,%rcx), %eax
subl $0x80, %eax
cltq
movq -0x28(%rsp), %rcx
shlq %cl, %rax
addq -0x18(%rsp), %rax
movq %rax, -0x18(%rsp)
movq -0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rsp)
movq -0x28(%rsp), %rax
addq $0x7, %rax
movq %rax, -0x28(%rsp)
jmp 0x21f28
movq -0x18(%rsp), %rcx
movq -0x10(%rsp), %rax
movq %rcx, (%rax)
movq -0x8(%rsp), %rax
addq $0xa, %rax
retq
nopl (%rax)
|
_ZN6google8protobuf2io12_GLOBAL__N_123DecodeVarint64KnownSizeILm10EEEPKhS5_Pm:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
loc_21EFA:
xor eax, eax
test al, 1
jnz short loc_21F02
jmp short loc_21F04
loc_21F02:
jmp short loc_21EFA
loc_21F04:
mov rax, [rsp+var_8]
movzx eax, byte ptr [rax+9]
shl rax, 3Fh
mov [rsp+var_18], rax
mov [rsp+var_20], 0
mov [rsp+var_28], 0
loc_21F28:
cmp [rsp+var_20], 9
jnb short loc_21F75
mov rax, [rsp+var_8]
mov rcx, [rsp+var_20]
movzx eax, byte ptr [rax+rcx]
sub eax, 80h
cdqe
mov rcx, [rsp+var_28]
shl rax, cl
add rax, [rsp+var_18]
mov [rsp+var_18], rax
mov rax, [rsp+var_20]
add rax, 1
mov [rsp+var_20], rax
mov rax, [rsp+var_28]
add rax, 7
mov [rsp+var_28], rax
jmp short loc_21F28
loc_21F75:
mov rcx, [rsp+var_18]
mov rax, [rsp+var_10]
mov [rax], rcx
mov rax, [rsp+var_8]
add rax, 0Ah
retn
|
long long google::protobuf::io::`anonymous namespace'::DecodeVarint64KnownSize<10ul>(
long long a1,
unsigned long long *a2)
{
long long v3; // [rsp+0h] [rbp-28h]
unsigned long long v4; // [rsp+8h] [rbp-20h]
unsigned long long v5; // [rsp+10h] [rbp-18h]
v5 = (unsigned long long)*(unsigned __int8 *)(a1 + 9) << 63;
v4 = 0LL;
v3 = 0LL;
while ( v4 < 9 )
{
v5 += (long long)(*(unsigned __int8 *)(a1 + v4++) - 128) << v3;
v3 += 7LL;
}
*a2 = v5;
return a1 + 10;
}
|
DecodeVarint64KnownSize<10ul>:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
LAB_00121efa:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x00121f02
JMP 0x00121f04
LAB_00121f02:
JMP 0x00121efa
LAB_00121f04:
MOV RAX,qword ptr [RSP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x9]
SHL RAX,0x3f
MOV qword ptr [RSP + -0x18],RAX
MOV qword ptr [RSP + -0x20],0x0
MOV qword ptr [RSP + -0x28],0x0
LAB_00121f28:
CMP qword ptr [RSP + -0x20],0x9
JNC 0x00121f75
MOV RAX,qword ptr [RSP + -0x8]
MOV RCX,qword ptr [RSP + -0x20]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SUB EAX,0x80
CDQE
MOV RCX,qword ptr [RSP + -0x28]
SHL RAX,CL
ADD RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RSP + -0x18],RAX
MOV RAX,qword ptr [RSP + -0x20]
ADD RAX,0x1
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x28]
ADD RAX,0x7
MOV qword ptr [RSP + -0x28],RAX
JMP 0x00121f28
LAB_00121f75:
MOV RCX,qword ptr [RSP + -0x18]
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + -0x8]
ADD RAX,0xa
RET
|
/* WARNING: Removing unreachable block (ram,0x00121f02) */
/* unsigned char const* google::protobuf::io::(anonymous
namespace)::DecodeVarint64KnownSize<10ul>(unsigned char const*, unsigned long*) */
uchar * google::protobuf::io::(anonymous_namespace)::DecodeVarint64KnownSize<10ul>
(uchar *param_1,ulong *param_2)
{
byte bVar1;
ulong local_20;
ulong local_18;
local_18 = (ulong)param_1[9] << 0x3f;
bVar1 = 0;
for (local_20 = 0; local_20 < 9; local_20 = local_20 + 1) {
local_18 = ((long)(int)(param_1[local_20] - 0x80) << (bVar1 & 0x3f)) + local_18;
bVar1 = bVar1 + 7;
}
*param_2 = local_18;
return param_1 + 10;
}
|
|
16,757
|
coro::net::tcp::server::accept()
|
AlayaLite/build_O3/_deps/libcoro-src/src/net/tcp/server.cpp
|
auto server::accept() -> coro::net::tcp::client
{
sockaddr_in client{};
constexpr const int len = sizeof(struct sockaddr_in);
net::socket s{::accept(
m_accept_socket.native_handle(),
reinterpret_cast<struct sockaddr*>(&client),
const_cast<socklen_t*>(reinterpret_cast<const socklen_t*>(&len)))};
std::span<const uint8_t> ip_addr_view{
reinterpret_cast<uint8_t*>(&client.sin_addr.s_addr),
sizeof(client.sin_addr.s_addr),
};
return tcp::client{
m_io_scheduler,
std::move(s),
client::options{
.address = net::ip_address{ip_addr_view, static_cast<net::domain_t>(client.sin_family)},
.port = ntohs(client.sin_port),
}};
}
|
O3
|
cpp
|
coro::net::tcp::server::accept():
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x4c(%rsp), %rdx
movl $0x10, (%rdx)
movl 0x2c(%r14), %edi
callq 0x30b0
movl %eax, 0x18(%rsp)
leaq 0x34(%rsp), %rsi
movq (%r14), %rcx
movq %rcx, 0x20(%rsp)
movq 0x8(%r14), %rcx
movq %rcx, 0x28(%rsp)
testq %rcx, %rcx
je 0x90dc
movq 0x5ee6(%rip), %rdx # 0xefb0
cmpb $0x0, (%rdx)
je 0x90d4
incl 0x8(%rcx)
jmp 0x90dc
lock
incl 0x8(%rcx)
movl 0x18(%rsp), %eax
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
movl %eax, 0x1c(%rsp)
movzwl 0x30(%rsp), %ecx
leaq 0x50(%rsp), %rdi
movl $0x4, %edx
callq 0x919a
movzwl 0x32(%rsp), %eax
rolw $0x8, %ax
movw %ax, 0x64(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x50(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rsi
leaq 0x1c(%rsp), %rdx
movq %rbx, %rdi
callq 0x8902
leaq 0x1c(%rsp), %rdi
callq 0x854e
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x9148
callq 0x4ca6
leaq 0x18(%rsp), %rdi
callq 0x854e
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
jmp 0x9191
jmp 0x9191
movq %rax, %rbx
leaq 0x1c(%rsp), %rdi
callq 0x854e
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x917d
callq 0x4ca6
leaq 0x18(%rsp), %rdi
callq 0x854e
movq %rbx, %rdi
callq 0x3430
jmp 0x9191
movq %rax, %rdi
callq 0x466e
nop
|
_ZN4coro3net3tcp6server6acceptEv:
push r14
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
lea rsi, [rsp+78h+var_48]
movaps xmmword ptr [rsi], xmm0
lea rdx, [rsp+78h+var_2C]
mov dword ptr [rdx], 10h
mov edi, [r14+2Ch]
call _accept
mov [rsp+78h+var_60], eax
lea rsi, [rsp+78h+var_44]
mov rcx, [r14]
mov [rsp+78h+var_58], rcx
mov rcx, [r14+8]
mov [rsp+78h+var_50], rcx
test rcx, rcx
jz short loc_90DC
mov rdx, cs:__libc_single_threaded_ptr
cmp byte ptr [rdx], 0
jz short loc_90D4
inc dword ptr [rcx+8]
jmp short loc_90DC
loc_90D4:
lock inc dword ptr [rcx+8]
mov eax, [rsp+78h+var_60]
loc_90DC:
mov [rsp+78h+var_60], 0FFFFFFFFh
mov [rsp+78h+var_5C], eax
movzx ecx, [rsp+78h+var_48]
lea rdi, [rsp+78h+var_28]
mov edx, 4
call _ZN4coro3net10ip_addressC2ESt4spanIKhLm18446744073709551615EENS0_8domain_tE; coro::net::ip_address::ip_address(std::span<uchar const,18446744073709551615ul>,coro::net::domain_t)
movzx eax, [rsp+78h+var_46]
rol ax, 8
mov [rsp+78h+var_14], ax
mov rax, [rsp+60h]
mov [rsp+78h+var_68], rax
movups xmm0, [rsp+78h+var_28]
movups [rsp+78h+var_78], xmm0
lea rsi, [rsp+78h+var_58]
lea rdx, [rsp+78h+var_5C]
mov rdi, rbx
call _ZN4coro3net3tcp6clientC2ESt10shared_ptrINS_12io_schedulerEENS0_6socketENS2_7optionsE; coro::net::tcp::client::client(std::shared_ptr<coro::io_scheduler>,coro::net::socket,coro::net::tcp::client::options)
lea rdi, [rsp+78h+var_5C]; this
call _ZN4coro3net6socket5closeEv; coro::net::socket::close(void)
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz short loc_9148
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9148:
lea rdi, [rsp+78h+var_60]; this
call _ZN4coro3net6socket5closeEv; coro::net::socket::close(void)
mov rax, rbx
add rsp, 68h
pop rbx
pop r14
retn
jmp short loc_9191
jmp short loc_9191
mov rbx, rax
lea rdi, [rsp+78h+var_5C]; this
call _ZN4coro3net6socket5closeEv; coro::net::socket::close(void)
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz short loc_917D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_917D:
lea rdi, [rsp+78h+var_60]; this
call _ZN4coro3net6socket5closeEv; coro::net::socket::close(void)
mov rdi, rbx
call __Unwind_Resume
jmp short $+2
loc_9191:
mov rdi, rax
call __clang_call_terminate
|
coro::net::tcp::server * coro::net::tcp::server::accept(coro::net::tcp::server *this, long long a2)
{
unsigned int v2; // eax
long long v3; // rcx
long long v4; // rcx
long long v5; // r8
long long v6; // r9
int v8; // [rsp+18h] [rbp-60h] BYREF
unsigned int v9; // [rsp+1Ch] [rbp-5Ch] BYREF
__int128 v10; // [rsp+20h] [rbp-58h] BYREF
__int128 v11; // [rsp+30h] [rbp-48h] BYREF
int v12; // [rsp+4Ch] [rbp-2Ch] BYREF
__int128 v13; // [rsp+50h] [rbp-28h] BYREF
long long v14; // [rsp+60h] [rbp-18h]
v11 = 0LL;
v12 = 16;
v2 = accept(*(unsigned int *)(a2 + 44), &v11, &v12);
v8 = v2;
*(_QWORD *)&v10 = *(_QWORD *)a2;
v3 = *(_QWORD *)(a2 + 8);
*((_QWORD *)&v10 + 1) = v3;
if ( v3 )
{
if ( _libc_single_threaded )
{
++*(_DWORD *)(v3 + 8);
}
else
{
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
v2 = v8;
}
}
v8 = -1;
v9 = v2;
coro::net::ip_address::ip_address(&v13, (char *)&v11 + 4, 4LL, (unsigned __int16)v11);
WORD2(v14) = __ROL2__(WORD1(v11), 8);
coro::net::tcp::client::client((long long)this, &v10, &v9, v4, v5, v6, v13, v14);
coro::net::socket::close((coro::net::socket *)&v9);
if ( *((_QWORD *)&v10 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v10 + 1));
coro::net::socket::close((coro::net::socket *)&v8);
return this;
}
|
accept:
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
LEA RSI,[RSP + 0x30]
MOVAPS xmmword ptr [RSI],XMM0
LEA RDX,[RSP + 0x4c]
MOV dword ptr [RDX],0x10
MOV EDI,dword ptr [R14 + 0x2c]
CALL 0x001030b0
MOV dword ptr [RSP + 0x18],EAX
LEA RSI,[RSP + 0x34]
MOV RCX,qword ptr [R14]
MOV qword ptr [RSP + 0x20],RCX
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x28],RCX
TEST RCX,RCX
JZ 0x001090dc
MOV RDX,qword ptr [0x0010efb0]
CMP byte ptr [RDX],0x0
JZ 0x001090d4
INC dword ptr [RCX + 0x8]
JMP 0x001090dc
LAB_001090d4:
INC.LOCK dword ptr [RCX + 0x8]
MOV EAX,dword ptr [RSP + 0x18]
LAB_001090dc:
MOV dword ptr [RSP + 0x18],0xffffffff
MOV dword ptr [RSP + 0x1c],EAX
MOVZX ECX,word ptr [RSP + 0x30]
LAB_001090ed:
LEA RDI,[RSP + 0x50]
MOV EDX,0x4
CALL 0x0010919a
MOVZX EAX,word ptr [RSP + 0x32]
ROL AX,0x8
MOV word ptr [RSP + 0x64],AX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0x1c]
MOV RDI,RBX
CALL 0x00108902
LAB_0010912f:
LEA RDI,[RSP + 0x1c]
CALL 0x0010854e
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00109148
CALL 0x00104ca6
LAB_00109148:
LEA RDI,[RSP + 0x18]
CALL 0x0010854e
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R14
RET
|
/* coro::net::tcp::server::accept() */
void coro::net::tcp::server::accept(void)
{
int8 *in_RSI;
int4 local_60;
int local_5c;
int8 local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
sockaddr local_48;
socklen_t local_2c;
ip_address local_28 [20];
ushort uStack_14;
local_48.sa_family = 0;
local_48.sa_data[0] = '\0';
local_48.sa_data[1] = '\0';
local_48.sa_data[2] = '\0';
local_48.sa_data[3] = '\0';
local_48.sa_data[4] = '\0';
local_48.sa_data[5] = '\0';
local_48.sa_data[6] = '\0';
local_48.sa_data[7] = '\0';
local_48.sa_data[8] = '\0';
local_48.sa_data[9] = '\0';
local_48.sa_data[10] = '\0';
local_48.sa_data[0xb] = '\0';
local_48.sa_data[0xc] = '\0';
local_48.sa_data[0xd] = '\0';
local_2c = 0x10;
local_5c = ::accept(*(int *)((long)in_RSI + 0x2c),&local_48,&local_2c);
local_58 = *in_RSI;
local_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0010efb0 == '\0') {
LOCK();
*(int *)(local_50 + 8) = *(int *)(local_50 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_50 + 8) = *(int *)(local_50 + 8) + 1;
}
}
local_60 = 0xffffffff;
/* try { // try from 001090ed to 0010912e has its CatchHandler @ 00109161 */
ip_address::ip_address(local_28,local_48.sa_data + 2,4,local_48._0_8_ & 0xffff);
uStack_14 = local_48.sa_data._0_2_ << 8 | (ushort)local_48.sa_data._0_2_ >> 8;
client::client();
/* try { // try from 0010912f to 00109138 has its CatchHandler @ 0010915f */
socket::close((socket *)&local_5c);
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
/* try { // try from 00109148 to 00109151 has its CatchHandler @ 0010915d */
socket::close((socket *)&local_60);
return;
}
|
|
16,758
|
mi_reset
|
eloqsql/storage/myisam/mi_extra.c
|
int mi_reset(MI_INFO *info)
{
int error= 0;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("mi_reset");
/*
Free buffers and reset the following flags:
EXTRA_CACHE, EXTRA_WRITE_CACHE, EXTRA_KEYREAD, EXTRA_QUICK
If the row buffer cache is large (for dynamic tables), reduce it
to save memory.
*/
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
{
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
error= end_io_cache(&info->rec_cache);
}
if (share->base.blobs)
mi_alloc_rec_buff(info, -1, &info->rec_buff);
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
if (info->opt_flag & MEMMAP_USED)
madvise((char*) share->file_map, share->state.state.data_file_length,
MADV_RANDOM);
#endif
info->opt_flag&= ~(KEY_READ_USED | REMEMBER_OLD_POS);
info->quick_mode=0;
info->lastinx= 0; /* Use first index as def */
info->last_search_keypage= info->lastpos= HA_OFFSET_ERROR;
info->page_changed= 1;
info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND |
HA_STATE_PREV_FOUND);
DBUG_RETURN(error);
}
|
O0
|
c
|
mi_reset:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c8(%rax), %eax
andl $0x12, %eax
cmpl $0x0, %eax
je 0xaf736
movq -0x8(%rbp), %rax
movl 0x1c8(%rax), %ecx
andl $-0x13, %ecx
movl %ecx, 0x1c8(%rax)
movq -0x8(%rbp), %rdi
addq $0x220, %rdi # imm = 0x220
callq 0xe3b10
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x188(%rax)
je 0xaf75e
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x120, %rdx # imm = 0x120
movq $-0x1, %rsi
callq 0xb8640
movq -0x8(%rbp), %rax
movl 0x1c8(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xaf78d
movq -0x18(%rbp), %rax
movq 0x270(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
movl $0x1, %edx
callq 0x29400
movq -0x8(%rbp), %rax
movl 0x1c8(%rax), %ecx
andl $-0x49, %ecx
movl %ecx, 0x1c8(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x33b(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1d4(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x170(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x198(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x33c(%rax)
movq -0x8(%rbp), %rax
movl 0x1d0(%rax), %ecx
andl $0x1, %ecx
orl $0x10, %ecx
orl $0x20, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1d0(%rax)
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
|
mi_reset:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov eax, [rax+1C8h]
and eax, 12h
cmp eax, 0
jz short loc_AF736
mov rax, [rbp+var_8]
mov ecx, [rax+1C8h]
and ecx, 0FFFFFFEDh
mov [rax+1C8h], ecx
mov rdi, [rbp+var_8]
add rdi, 220h
call end_io_cache
mov [rbp+var_C], eax
loc_AF736:
mov rax, [rbp+var_18]
cmp dword ptr [rax+188h], 0
jz short loc_AF75E
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_8]
add rdx, 120h
mov rsi, 0FFFFFFFFFFFFFFFFh
call mi_alloc_rec_buff
loc_AF75E:
mov rax, [rbp+var_8]
mov eax, [rax+1C8h]
and eax, 20h
cmp eax, 0
jz short loc_AF78D
mov rax, [rbp+var_18]
mov rdi, [rax+270h]
mov rax, [rbp+var_18]
mov rsi, [rax+40h]
mov edx, 1
call _madvise
loc_AF78D:
mov rax, [rbp+var_8]
mov ecx, [rax+1C8h]
and ecx, 0FFFFFFB7h
mov [rax+1C8h], ecx
mov rax, [rbp+var_8]
mov byte ptr [rax+33Bh], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+1D4h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_8]
mov qword ptr [rax+198h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_8]
mov byte ptr [rax+33Ch], 1
mov rax, [rbp+var_8]
mov ecx, [rax+1D0h]
and ecx, 1
or ecx, 10h
or ecx, 20h
mov rax, [rbp+var_8]
mov [rax+1D0h], ecx
mov eax, [rbp+var_C]
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
add rsp, 20h
pop rbp
retn
|
long long mi_reset(long long *a1)
{
long long v2; // [rsp+8h] [rbp-18h]
unsigned int v3; // [rsp+14h] [rbp-Ch]
v3 = 0;
v2 = *a1;
if ( (a1[57] & 0x12) != 0 )
{
*((_DWORD *)a1 + 114) &= 0xFFFFFFED;
v3 = end_io_cache(a1 + 68);
}
if ( *(_DWORD *)(v2 + 392) )
mi_alloc_rec_buff(a1, -1LL, a1 + 36);
if ( (a1[57] & 0x20) != 0 )
madvise(*(_QWORD *)(v2 + 624), *(_QWORD *)(v2 + 64), 1LL);
*((_DWORD *)a1 + 114) &= 0xFFFFFFB7;
*((_BYTE *)a1 + 827) = 0;
*((_DWORD *)a1 + 117) = 0;
a1[46] = -1LL;
a1[51] = -1LL;
*((_BYTE *)a1 + 828) = 1;
*((_DWORD *)a1 + 116) = a1[58] & 1 | 0x30;
return v3;
}
|
mi_reset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c8]
AND EAX,0x12
CMP EAX,0x0
JZ 0x001af736
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x1c8]
AND ECX,0xffffffed
MOV dword ptr [RAX + 0x1c8],ECX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x220
CALL 0x001e3b10
MOV dword ptr [RBP + -0xc],EAX
LAB_001af736:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x188],0x0
JZ 0x001af75e
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0x120
MOV RSI,-0x1
CALL 0x001b8640
LAB_001af75e:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c8]
AND EAX,0x20
CMP EAX,0x0
JZ 0x001af78d
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x270]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1
CALL 0x00129400
LAB_001af78d:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x1c8]
AND ECX,0xffffffb7
MOV dword ptr [RAX + 0x1c8],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x33b],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x1d4],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x170],-0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x198],-0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x33c],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x1d0]
AND ECX,0x1
OR ECX,0x10
OR ECX,0x20
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x1d0],ECX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x20
POP RBP
RET
|
int4 mi_reset(long *param_1)
{
long lVar1;
int4 local_14;
local_14 = 0;
lVar1 = *param_1;
if ((*(uint *)(param_1 + 0x39) & 0x12) != 0) {
*(uint *)(param_1 + 0x39) = *(uint *)(param_1 + 0x39) & 0xffffffed;
local_14 = end_io_cache(param_1 + 0x44);
}
if (*(int *)(lVar1 + 0x188) != 0) {
mi_alloc_rec_buff(param_1,0xffffffffffffffff,param_1 + 0x24);
}
if ((*(uint *)(param_1 + 0x39) & 0x20) != 0) {
madvise(*(void **)(lVar1 + 0x270),*(size_t *)(lVar1 + 0x40),1);
}
*(uint *)(param_1 + 0x39) = *(uint *)(param_1 + 0x39) & 0xffffffb7;
*(int1 *)((long)param_1 + 0x33b) = 0;
*(int4 *)((long)param_1 + 0x1d4) = 0;
param_1[0x2e] = -1;
param_1[0x33] = -1;
*(int1 *)((long)param_1 + 0x33c) = 1;
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 1 | 0x30;
return local_14;
}
|
|
16,759
|
inline_mysql_file_delete
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline int
inline_mysql_file_delete(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *name, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, name, &locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
result= my_delete(name, flags);
PSI_FILE_CALL(end_file_close_wait)(locker, result);
return result;
}
#endif
result= my_delete(name, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
leaq 0x1ee23c(%rip), %rax # 0x2c75a0
movq (%rax), %rax
movq 0x148(%rax), %rax
movl -0x8(%rbp), %esi
movq -0x20(%rbp), %rcx
leaq -0x80(%rbp), %rdi
movl $0xe, %edx
leaq -0x38(%rbp), %r8
callq *%rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xd93f8
leaq 0x1ee1f1(%rip), %rax # 0x2c75a0
movq (%rax), %rax
movq 0x220(%rax), %rax
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xf17b0
movl %eax, -0x2c(%rbp)
leaq 0x1ee1c3(%rip), %rax # 0x2c75a0
movq (%rax), %rax
movq 0x228(%rax), %rax
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq *%rax
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xd940e
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xf17b0
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
inline_mysql_file_delete_1:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+148h]
mov esi, [rbp+var_8]
mov rcx, [rbp+var_20]
lea rdi, [rbp+var_80]
mov edx, 0Eh
lea r8, [rbp+var_38]
call rax
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_D93F8
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+220h]
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call my_delete
mov [rbp+var_2C], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+228h]
mov rdi, [rbp+var_38]
mov esi, [rbp+var_2C]
call rax
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
jmp short loc_D940E
loc_D93F8:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call my_delete
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
loc_D940E:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long inline_mysql_file_delete_1(unsigned int a1, long long a2, unsigned int a3, long long a4, long long a5)
{
_BYTE v6[72]; // [rsp+0h] [rbp-80h] BYREF
long long v7; // [rsp+48h] [rbp-38h] BYREF
unsigned int v8; // [rsp+54h] [rbp-2Ch]
long long v9; // [rsp+58h] [rbp-28h]
long long v10; // [rsp+60h] [rbp-20h]
unsigned int v11; // [rsp+6Ch] [rbp-14h]
long long v12; // [rsp+70h] [rbp-10h]
unsigned int v13; // [rsp+78h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = a5;
v7 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v6, a1, 14LL, a4, &v7);
if ( v7 )
{
((void ( *)(long long, long long, _QWORD))PSI_server[68])(v7, v12, v11);
v8 = my_delete(v10, v9);
((void ( *)(long long, _QWORD))PSI_server[69])(v7, v8);
}
else
{
return (unsigned int)my_delete(v10, v9);
}
return v8;
}
|
inline_mysql_file_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
LEA RAX,[0x3c75a0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x80]
MOV EDX,0xe
LEA R8,[RBP + -0x38]
CALL RAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001d93f8
LEA RAX,[0x3c75a0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x220]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001f17b0
MOV dword ptr [RBP + -0x2c],EAX
LEA RAX,[0x3c75a0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x228]
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,dword ptr [RBP + -0x2c]
CALL RAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001d940e
LAB_001d93f8:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001f17b0
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001d940e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_delete
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int8 param_5)
{
int1 local_88 [72];
long local_40;
int4 local_34;
int8 local_30;
int8 local_28;
int4 local_1c;
int8 local_18;
int4 local_10;
int4 local_c;
local_30 = param_5;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0xe,param_4,&local_40);
if (local_40 == 0) {
local_c = my_delete(local_28,local_30);
}
else {
(**(code **)(PSI_server + 0x220))(local_40,local_18,local_1c);
local_34 = my_delete(local_28,local_30);
(**(code **)(PSI_server + 0x228))(local_40,local_34);
local_c = local_34;
}
return local_c;
}
|
|
16,760
|
my_set_error
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
void my_set_error(MYSQL *mysql,
unsigned int error_nr,
const char *sqlstate,
const char *format,
...)
{
va_list ap;
const char *errmsg;
if (!format)
{
if (error_nr >= CR_MIN_ERROR && error_nr <= CR_MYSQL_LAST_ERROR)
errmsg= ER(error_nr);
else if (error_nr >= CER_MIN_ERROR && error_nr <= CR_MARIADB_LAST_ERROR)
errmsg= CER(error_nr);
else
errmsg= ER(CR_UNKNOWN_ERROR);
}
mysql->net.last_errno= error_nr;
ma_strmake(mysql->net.sqlstate, sqlstate, SQLSTATE_LENGTH);
va_start(ap, format);
vsnprintf(mysql->net.last_error, MYSQL_ERRMSG_SIZE - 1,
format ? format : errmsg, ap);
va_end(ap);
return;
}
|
O0
|
c
|
my_set_error:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp # imm = 0x110
testb %al, %al
je 0x39eee
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movq %r8, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x39f82
cmpl $0x7d0, -0xc(%rbp) # imm = 0x7D0
jb 0x39f41
cmpl $0x80d, -0xc(%rbp) # imm = 0x80D
ja 0x39f41
movl -0xc(%rbp), %eax
subl $0x7d0, %eax # imm = 0x7D0
movl %eax, %eax
movl %eax, %ecx
leaq 0x1f9709(%rip), %rax # 0x233640
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
jmp 0x39f80
cmpl $0x1388, -0xc(%rbp) # imm = 0x1388
jb 0x39f70
cmpl $0x1397, -0xc(%rbp) # imm = 0x1397
ja 0x39f70
movl -0xc(%rbp), %eax
subl $0x1388, %eax # imm = 0x1388
movl %eax, %eax
movl %eax, %ecx
leaq 0x1f98da(%rip), %rax # 0x233840
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
jmp 0x39f7e
leaq 0x1f96c9(%rip), %rax # 0x233640
movq (%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x39f80
jmp 0x39f82
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x90(%rax)
movq -0x8(%rbp), %rdi
addq $0x297, %rdi # imm = 0x297
movq -0x18(%rbp), %rsi
movl $0x5, %edx
callq 0x55d30
leaq -0x40(%rbp), %rax
leaq -0x100(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x20, (%rax)
movq -0x8(%rbp), %rax
addq $0x97, %rax
movq %rax, -0x108(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x39ff1
movq -0x20(%rbp), %rax
movq %rax, -0x110(%rbp)
jmp 0x39ffc
movq -0x48(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x108(%rbp), %rdi
movq -0x110(%rbp), %rdx
movl $0x1ff, %esi # imm = 0x1FF
leaq -0x40(%rbp), %rcx
callq 0x36690
addq $0x110, %rsp # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_set_error:
push rbp
mov rbp, rsp
sub rsp, 110h
test al, al
jz short loc_39EEE
movaps [rbp+var_D0], xmm0
movaps [rbp+var_C0], xmm1
movaps [rbp+var_B0], xmm2
movaps [rbp+var_A0], xmm3
movaps [rbp+var_90], xmm4
movaps [rbp+var_80], xmm5
movaps [rbp+var_70], xmm6
movaps [rbp+var_60], xmm7
loc_39EEE:
mov [rbp+var_D8], r9
mov [rbp+var_E0], r8
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
cmp [rbp+var_20], 0
jnz short loc_39F82
cmp [rbp+var_C], 7D0h
jb short loc_39F41
cmp [rbp+var_C], 80Dh
ja short loc_39F41
mov eax, [rbp+var_C]
sub eax, 7D0h
mov eax, eax
mov ecx, eax
lea rax, client_errors
mov rax, [rax+rcx*8]
mov [rbp+var_48], rax
jmp short loc_39F80
loc_39F41:
cmp [rbp+var_C], 1388h
jb short loc_39F70
cmp [rbp+var_C], 1397h
ja short loc_39F70
mov eax, [rbp+var_C]
sub eax, 1388h
mov eax, eax
mov ecx, eax
lea rax, mariadb_client_errors
mov rax, [rax+rcx*8]
mov [rbp+var_48], rax
jmp short loc_39F7E
loc_39F70:
lea rax, client_errors
mov rax, [rax]
mov [rbp+var_48], rax
loc_39F7E:
jmp short $+2
loc_39F80:
jmp short $+2
loc_39F82:
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax+90h], ecx
mov rdi, [rbp+var_8]
add rdi, 297h
mov rsi, [rbp+var_18]
mov edx, 5
call ma_strmake
lea rax, [rbp+var_40]
lea rcx, [rbp+var_100]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 20h ; ' '
mov rax, [rbp+var_8]
add rax, 97h
mov [rbp+var_108], rax
cmp [rbp+var_20], 0
jz short loc_39FF1
mov rax, [rbp+var_20]
mov [rbp+var_110], rax
jmp short loc_39FFC
loc_39FF1:
mov rax, [rbp+var_48]
mov [rbp+var_110], rax
loc_39FFC:
mov rdi, [rbp+var_108]
mov rdx, [rbp+var_110]
mov esi, 1FFh
lea rcx, [rbp+var_40]
call _vsnprintf
add rsp, 110h
pop rbp
retn
|
long long my_set_error(long long a1, unsigned int a2, long long a3, long long a4, ...)
{
long long v5; // [rsp+8h] [rbp-108h]
char *v6; // [rsp+C8h] [rbp-48h]
va_list va; // [rsp+D0h] [rbp-40h] BYREF
long long v8; // [rsp+F0h] [rbp-20h]
long long v9; // [rsp+F8h] [rbp-18h]
unsigned int v10; // [rsp+104h] [rbp-Ch]
long long v11; // [rsp+108h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
if ( !a4 )
{
if ( v10 < 0x7D0 || v10 > 0x80D )
{
if ( v10 < 0x1388 || v10 > 0x1397 )
v6 = client_errors[0];
else
v6 = mariadb_client_errors[v10 - 5000];
}
else
{
v6 = client_errors[v10 - 2000];
}
}
*(_DWORD *)(v11 + 144) = v10;
ma_strmake(v11 + 663, v9, 5LL);
va_start(va, a4);
v5 = v11 + 151;
if ( v8 )
return vsnprintf(v5, 511LL, v8, va);
else
return vsnprintf(v5, 511LL, v6, va);
}
|
my_set_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x110
TEST AL,AL
JZ 0x00139eee
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOVAPS xmmword ptr [RBP + -0xc0],XMM1
MOVAPS xmmword ptr [RBP + -0xb0],XMM2
MOVAPS xmmword ptr [RBP + -0xa0],XMM3
MOVAPS xmmword ptr [RBP + -0x90],XMM4
MOVAPS xmmword ptr [RBP + -0x80],XMM5
MOVAPS xmmword ptr [RBP + -0x70],XMM6
MOVAPS xmmword ptr [RBP + -0x60],XMM7
LAB_00139eee:
MOV qword ptr [RBP + -0xd8],R9
MOV qword ptr [RBP + -0xe0],R8
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x00139f82
CMP dword ptr [RBP + -0xc],0x7d0
JC 0x00139f41
CMP dword ptr [RBP + -0xc],0x80d
JA 0x00139f41
MOV EAX,dword ptr [RBP + -0xc]
SUB EAX,0x7d0
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x333640]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00139f80
LAB_00139f41:
CMP dword ptr [RBP + -0xc],0x1388
JC 0x00139f70
CMP dword ptr [RBP + -0xc],0x1397
JA 0x00139f70
MOV EAX,dword ptr [RBP + -0xc]
SUB EAX,0x1388
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x333840]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00139f7e
LAB_00139f70:
LEA RAX,[0x333640]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
LAB_00139f7e:
JMP 0x00139f80
LAB_00139f80:
JMP 0x00139f82
LAB_00139f82:
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x90],ECX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x297
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x5
CALL 0x00155d30
LEA RAX,[RBP + -0x40]
LEA RCX,[RBP + -0x100]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x20
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x97
MOV qword ptr [RBP + -0x108],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00139ff1
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x110],RAX
JMP 0x00139ffc
LAB_00139ff1:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x110],RAX
LAB_00139ffc:
MOV RDI,qword ptr [RBP + -0x108]
MOV RDX,qword ptr [RBP + -0x110]
MOV ESI,0x1ff
LEA RCX,[RBP + -0x40]
CALL 0x00136690
ADD RSP,0x110
POP RBP
RET
|
void my_set_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
long param_9,uint param_10,int8 param_11,char *param_12,int8 param_13,
int8 param_14)
{
char in_AL;
char *local_118;
int1 local_108 [32];
int8 local_e8;
int8 local_e0;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
char *local_50;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
char *local_28;
int8 local_20;
uint local_14;
long local_10;
if (in_AL != '\0') {
local_d8 = param_1;
local_c8 = param_2;
local_b8 = param_3;
local_a8 = param_4;
local_98 = param_5;
local_88 = param_6;
local_78 = param_7;
local_68 = param_8;
}
if (param_12 == (char *)0x0) {
if ((param_10 < 2000) || (0x80d < param_10)) {
if ((param_10 < 5000) || (0x1397 < param_10)) {
local_50 = client_errors;
}
else {
local_50 = *(char **)(mariadb_client_errors + (ulong)(param_10 - 5000) * 8);
}
}
else {
local_50 = (&client_errors)[param_10 - 2000];
}
}
*(uint *)(param_9 + 0x90) = param_10;
local_e8 = param_13;
local_e0 = param_14;
local_28 = param_12;
local_20 = param_11;
local_14 = param_10;
local_10 = param_9;
ma_strmake(param_9 + 0x297,param_11,5);
local_38 = local_108;
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x20;
if (local_28 == (char *)0x0) {
local_118 = local_50;
}
else {
local_118 = local_28;
}
vsnprintf((char *)(local_10 + 0x97),0x1ff,local_118,&local_48);
return;
}
|
|
16,761
|
js_parse_class_default_ctor
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int js_parse_class_default_ctor(JSParseState *s,
BOOL has_super,
JSFunctionDef **pfd)
{
JSParseFunctionEnum func_type;
JSFunctionDef *fd = s->cur_func;
fd = js_new_function_def(s->ctx, fd, FALSE, FALSE, s->filename,
s->token.line_num, s->token.col_num);
if (!fd)
return -1;
s->cur_func = fd;
fd->has_home_object = TRUE;
fd->super_allowed = TRUE;
fd->has_prototype = FALSE;
fd->has_this_binding = TRUE;
fd->new_target_allowed = TRUE;
/* error if not invoked as a constructor */
emit_op(s, OP_check_ctor);
push_scope(s); /* enter body scope */
fd->body_scope = fd->scope_level;
if (has_super) {
fd->is_derived_class_constructor = TRUE;
fd->super_call_allowed = TRUE;
fd->arguments_allowed = TRUE;
fd->has_arguments_binding = TRUE;
func_type = JS_PARSE_FUNC_DERIVED_CLASS_CONSTRUCTOR;
/* super */
emit_op(s, OP_scope_get_var);
emit_atom(s, JS_ATOM_this_active_func);
emit_u16(s, 0);
emit_op(s, OP_get_super);
emit_op(s, OP_scope_get_var);
emit_atom(s, JS_ATOM_new_target);
emit_u16(s, 0);
emit_op(s, OP_array_from);
emit_u16(s, 0);
emit_op(s, OP_push_i32);
emit_u32(s, 0);
/* arguments */
emit_op(s, OP_scope_get_var);
emit_atom(s, JS_ATOM_arguments);
emit_u16(s, 0);
emit_op(s, OP_append);
/* drop the index */
emit_op(s, OP_drop);
emit_op(s, OP_apply);
emit_u16(s, 1);
/* set the 'this' value */
emit_op(s, OP_dup);
emit_op(s, OP_scope_put_var_init);
emit_atom(s, JS_ATOM_this);
emit_u16(s, 0);
emit_class_field_init(s);
} else {
func_type = JS_PARSE_FUNC_CLASS_CONSTRUCTOR;
emit_class_field_init(s);
}
fd->func_kind = JS_FUNC_NORMAL;
fd->func_type = func_type;
emit_return(s, FALSE);
s->cur_func = fd->parent;
if (pfd)
*pfd = fd;
int idx;
/* the real object will be set at the end of the compilation */
idx = cpool_add(s, JS_NULL);
fd->parent_cpool_idx = idx;
return 0;
}
|
O1
|
c
|
js_parse_class_default_ctor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq 0x90(%rdi), %rsi
movq (%rdi), %rdi
movq 0x18(%rbx), %r8
movl 0x24(%rbx), %r9d
movl 0x28(%rbx), %eax
movl %eax, (%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x118c6
testq %rax, %rax
je 0x12136
movq %rax, %r15
movq %rax, 0x90(%rbx)
movq $0x1, 0x48(%rax)
movl $0x1, 0x70(%rax)
movabsq $0x100000001, %r12 # imm = 0x100000001
movq %r12, 0x64(%rax)
movq %rax, %rdi
addq $0x138, %rdi # imm = 0x138
movl 0x140(%rax), %eax
movl %eax, 0x168(%r15)
pushq $0x2b
popq %rsi
callq 0x1a8bc
movq %rbx, %rdi
callq 0x57865
movl 0xe8(%r15), %eax
movl %eax, 0x120(%r15)
testl %ebp, %ebp
je 0x1213c
pushq $0x1
popq %rax
movl %eax, 0x6c(%r15)
movq %r12, 0x74(%r15)
movl %eax, 0x60(%r15)
movq 0x90(%rbx), %rax
movl $0x138, %r12d # imm = 0x138
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xb7, %esi
callq 0x1a8bc
movq 0x90(%rbx), %rdi
addq %r12, %rdi
leaq 0xc(%rsp), %rbp
movl $0x73, (%rbp)
pushq $0x4
popq %rdx
movq %rbp, %rsi
movq %r14, 0x10(%rsp)
movq %rdx, %r14
callq 0x1a80e
movq 0x90(%rbx), %rdi
addq %r12, %rdi
andw $0x0, (%rbp)
leaq 0xc(%rsp), %r13
pushq $0x2
popq %rbp
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1a80e
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0x34
popq %rsi
callq 0x1a8bc
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xb7, %esi
callq 0x1a8bc
movq 0x90(%rbx), %rdi
addq %r12, %rdi
movl $0x72, (%r13)
leaq 0xc(%rsp), %r13
movq %r13, %rsi
movq %r14, %rdx
callq 0x1a80e
movq 0x90(%rbx), %rdi
addq %r12, %rdi
andw $0x0, (%r13)
leaq 0xc(%rsp), %r13
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1a80e
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0x26
popq %rsi
callq 0x1a8bc
movq 0x90(%rbx), %rdi
addq %r12, %rdi
andw $0x0, (%r13)
leaq 0xc(%rsp), %r13
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1a80e
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0x1
popq %rsi
callq 0x1a8bc
movq 0x90(%rbx), %rdi
addq %r12, %rdi
andl $0x0, (%r13)
leaq 0xc(%rsp), %r13
movq %r13, %rsi
movq %r14, %rdx
callq 0x1a80e
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xb7, %esi
callq 0x1a8bc
movq 0x90(%rbx), %rdi
addq %r12, %rdi
movl $0x4e, (%r13)
leaq 0xc(%rsp), %r13
movq %r13, %rsi
movq %r14, %rdx
movq 0x10(%rsp), %r14
callq 0x1a80e
movq 0x90(%rbx), %rdi
addq %r12, %rdi
andw $0x0, (%r13)
leaq 0xc(%rsp), %r13
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1a80e
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0x52
popq %rsi
callq 0x1a8bc
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0xe
popq %rsi
callq 0x1a8bc
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0x27
popq %rsi
callq 0x1a8bc
movq 0x90(%rbx), %rdi
addq %r12, %rdi
movw $0x1, (%r13)
leaq 0xc(%rsp), %r13
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1a80e
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0x11
popq %rsi
callq 0x1a8bc
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xbc, %esi
callq 0x1a8bc
movq 0x90(%rbx), %rdi
addq %r12, %rdi
movl $0x8, (%r13)
leaq 0xc(%rsp), %r13
movq %r13, %rsi
pushq $0x4
popq %rdx
callq 0x1a80e
addq 0x90(%rbx), %r12
andw $0x0, (%r13)
leaq 0xc(%rsp), %rsi
movq %r12, %rdi
movq %rbp, %rdx
callq 0x1a80e
movw $0x900, %bp # imm = 0x900
jmp 0x12140
pushq $-0x1
popq %r12
jmp 0x12192
movw $0x800, %bp # imm = 0x800
movq %rbx, %rdi
callq 0x62659
movl $0xffff8000, %eax # imm = 0xFFFF8000
andl 0x84(%r15), %eax
movzwl %bp, %ecx
orl %eax, %ecx
movw %cx, 0x84(%r15)
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5e027
movq 0x8(%r15), %rax
movq %rax, 0x90(%rbx)
testq %r14, %r14
je 0x12181
movq %r15, (%r14)
pushq $0x2
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x64527
movl %eax, 0x10(%r15)
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_parse_class_default_ctor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rdx
mov ebp, esi
mov rbx, rdi
mov rsi, [rdi+90h]
mov rdi, [rdi]
mov r8, [rbx+18h]
mov r9d, [rbx+24h]
mov eax, [rbx+28h]
mov [rsp+48h+var_48], eax
xor edx, edx
xor ecx, ecx
call js_new_function_def
test rax, rax
jz loc_12136
mov r15, rax
mov [rbx+90h], rax
mov qword ptr [rax+48h], 1
mov dword ptr [rax+70h], 1
mov r12, 100000001h
mov [rax+64h], r12
mov rdi, rax
add rdi, 138h
mov eax, [rax+140h]
mov [r15+168h], eax
push 2Bh ; '+'
pop rsi
call dbuf_putc
mov rdi, rbx
call push_scope
mov eax, [r15+0E8h]
mov [r15+120h], eax
test ebp, ebp
jz loc_1213C
push 1
pop rax
mov [r15+6Ch], eax
mov [r15+74h], r12
mov [r15+60h], eax
mov rax, [rbx+90h]
mov r12d, 138h
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0B7h
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
lea rbp, [rsp+48h+var_3C]
mov dword ptr [rbp+0], 73h ; 's'
push 4
pop rdx
mov rsi, rbp
mov [rsp+48h+var_38], r14
mov r14, rdx
call dbuf_put
mov rdi, [rbx+90h]
add rdi, r12
and word ptr [rbp+0], 0
lea r13, [rsp+48h+var_3C]
push 2
pop rbp
mov rsi, r13
mov rdx, rbp
call dbuf_put
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 34h ; '4'
pop rsi
call dbuf_putc
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0B7h
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
mov dword ptr [r13+0], 72h ; 'r'
lea r13, [rsp+48h+var_3C]
mov rsi, r13
mov rdx, r14
call dbuf_put
mov rdi, [rbx+90h]
add rdi, r12
and word ptr [r13+0], 0
lea r13, [rsp+48h+var_3C]
mov rsi, r13
mov rdx, rbp
call dbuf_put
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 26h ; '&'
pop rsi
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
and word ptr [r13+0], 0
lea r13, [rsp+48h+var_3C]
mov rsi, r13
mov rdx, rbp
call dbuf_put
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 1
pop rsi
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
and dword ptr [r13+0], 0
lea r13, [rsp+48h+var_3C]
mov rsi, r13
mov rdx, r14
call dbuf_put
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0B7h
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
mov dword ptr [r13+0], 4Eh ; 'N'
lea r13, [rsp+48h+var_3C]
mov rsi, r13
mov rdx, r14
mov r14, [rsp+48h+var_38]
call dbuf_put
mov rdi, [rbx+90h]
add rdi, r12
and word ptr [r13+0], 0
lea r13, [rsp+48h+var_3C]
mov rsi, r13
mov rdx, rbp
call dbuf_put
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 52h ; 'R'
pop rsi
call dbuf_putc
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 0Eh
pop rsi
call dbuf_putc
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 27h ; '''
pop rsi
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
mov word ptr [r13+0], 1
lea r13, [rsp+48h+var_3C]
mov rsi, r13
mov rdx, rbp
call dbuf_put
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 11h
pop rsi
call dbuf_putc
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0BCh
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
mov dword ptr [r13+0], 8
lea r13, [rsp+48h+var_3C]
mov rsi, r13
push 4
pop rdx
call dbuf_put
add r12, [rbx+90h]
and word ptr [r13+0], 0
lea rsi, [rsp+48h+var_3C]
mov rdi, r12
mov rdx, rbp
call dbuf_put
mov bp, 900h
jmp short loc_12140
loc_12136:
push 0FFFFFFFFFFFFFFFFh
pop r12
jmp short loc_12192
loc_1213C:
mov bp, 800h
loc_12140:
mov rdi, rbx
call emit_class_field_init
mov eax, 0FFFF8000h
and eax, [r15+84h]
movzx ecx, bp
or ecx, eax
mov [r15+84h], cx
xor r12d, r12d
mov rdi, rbx
xor esi, esi
call emit_return
mov rax, [r15+8]
mov [rbx+90h], rax
test r14, r14
jz short loc_12181
mov [r14], r15
loc_12181:
push 2
pop rdx
mov rdi, rbx
xor esi, esi
call cpool_add
mov [r15+10h], eax
loc_12192:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long js_parse_class_default_ctor(long long a1, int a2, _QWORD *a3)
{
_QWORD *v5; // rax
_QWORD *v6; // r15
long long v7; // rax
long long v8; // rdi
long long v9; // rdi
__int16 v10; // bp
long long v11; // rax
long long v12; // rax
long long v13; // rdi
long long v14; // rdi
long long v15; // rax
long long v16; // rdi
long long v17; // rax
long long v18; // rdi
long long v19; // rax
long long v20; // rdi
long long v21; // rdi
long long v22; // rax
long long v23; // rax
long long v24; // rax
long long v25; // rdi
long long v26; // rax
long long v27; // rax
long long v28; // rdi
long long v29; // r12
unsigned int v30; // r12d
int v32; // [rsp+Ch] [rbp-3Ch] BYREF
_QWORD *v33; // [rsp+10h] [rbp-38h]
v5 = js_new_function_def(
*(_QWORD *)a1,
*(_QWORD *)(a1 + 144),
0,
0,
*(_QWORD *)(a1 + 24),
*(_DWORD *)(a1 + 36),
*(_DWORD *)(a1 + 40));
if ( v5 )
{
v6 = v5;
*(_QWORD *)(a1 + 144) = v5;
v5[9] = 1LL;
*((_DWORD *)v5 + 28) = 1;
*(_QWORD *)((char *)v5 + 100) = 0x100000001LL;
*((_DWORD *)v5 + 90) = *((_DWORD *)v5 + 80);
dbuf_putc(v5 + 39, 43LL);
push_scope(a1);
*((_DWORD *)v6 + 72) = *((_DWORD *)v6 + 58);
if ( a2 )
{
*((_DWORD *)v6 + 27) = 1;
*(_QWORD *)((char *)v6 + 116) = 0x100000001LL;
*((_DWORD *)v6 + 24) = 1;
v7 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v7 + 360) = *(_DWORD *)(v7 + 320);
dbuf_putc(v7 + 312, 183LL);
v8 = *(_QWORD *)(a1 + 144) + 312LL;
v32 = 115;
v33 = a3;
dbuf_put(v8, &v32, 4LL);
v9 = *(_QWORD *)(a1 + 144) + 312LL;
LOWORD(v32) = 0;
v10 = 2304;
dbuf_put(v9, &v32, 2LL);
v11 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v11 + 360) = *(_DWORD *)(v11 + 320);
dbuf_putc(v11 + 312, 52LL);
v12 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v12 + 360) = *(_DWORD *)(v12 + 320);
dbuf_putc(v12 + 312, 183LL);
v13 = *(_QWORD *)(a1 + 144) + 312LL;
v32 = 114;
dbuf_put(v13, &v32, 4LL);
v14 = *(_QWORD *)(a1 + 144) + 312LL;
LOWORD(v32) = 0;
dbuf_put(v14, &v32, 2LL);
v15 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v15 + 360) = *(_DWORD *)(v15 + 320);
dbuf_putc(v15 + 312, 38LL);
v16 = *(_QWORD *)(a1 + 144) + 312LL;
LOWORD(v32) = 0;
dbuf_put(v16, &v32, 2LL);
v17 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v17 + 360) = *(_DWORD *)(v17 + 320);
dbuf_putc(v17 + 312, 1LL);
v18 = *(_QWORD *)(a1 + 144) + 312LL;
v32 = 0;
dbuf_put(v18, &v32, 4LL);
v19 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v19 + 360) = *(_DWORD *)(v19 + 320);
dbuf_putc(v19 + 312, 183LL);
v20 = *(_QWORD *)(a1 + 144) + 312LL;
v32 = 78;
a3 = v33;
dbuf_put(v20, &v32, 4LL);
v21 = *(_QWORD *)(a1 + 144) + 312LL;
LOWORD(v32) = 0;
dbuf_put(v21, &v32, 2LL);
v22 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v22 + 360) = *(_DWORD *)(v22 + 320);
dbuf_putc(v22 + 312, 82LL);
v23 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v23 + 360) = *(_DWORD *)(v23 + 320);
dbuf_putc(v23 + 312, 14LL);
v24 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v24 + 360) = *(_DWORD *)(v24 + 320);
dbuf_putc(v24 + 312, 39LL);
v25 = *(_QWORD *)(a1 + 144) + 312LL;
LOWORD(v32) = 1;
dbuf_put(v25, &v32, 2LL);
v26 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v26 + 360) = *(_DWORD *)(v26 + 320);
dbuf_putc(v26 + 312, 17LL);
v27 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v27 + 360) = *(_DWORD *)(v27 + 320);
dbuf_putc(v27 + 312, 188LL);
v28 = *(_QWORD *)(a1 + 144) + 312LL;
v32 = 8;
dbuf_put(v28, &v32, 4LL);
v29 = *(_QWORD *)(a1 + 144) + 312LL;
LOWORD(v32) = 0;
dbuf_put(v29, &v32, 2LL);
}
else
{
v10 = 2048;
}
emit_class_field_init(a1);
*((_WORD *)v6 + 66) = *((_WORD *)v6 + 66) & 0x8000 | v10;
v30 = 0;
emit_return(a1, 0LL);
*(_QWORD *)(a1 + 144) = v6[1];
if ( a3 )
*a3 = v6;
*((_DWORD *)v6 + 4) = cpool_add(a1, 0LL, 2LL);
}
else
{
return (unsigned int)-1;
}
return v30;
}
|
js_parse_class_default_ctor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x90]
MOV RDI,qword ptr [RDI]
MOV R8,qword ptr [RBX + 0x18]
MOV R9D,dword ptr [RBX + 0x24]
MOV EAX,dword ptr [RBX + 0x28]
MOV dword ptr [RSP],EAX
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001118c6
TEST RAX,RAX
JZ 0x00112136
MOV R15,RAX
MOV qword ptr [RBX + 0x90],RAX
MOV qword ptr [RAX + 0x48],0x1
MOV dword ptr [RAX + 0x70],0x1
MOV R12,0x100000001
MOV qword ptr [RAX + 0x64],R12
MOV RDI,RAX
ADD RDI,0x138
MOV EAX,dword ptr [RAX + 0x140]
MOV dword ptr [R15 + 0x168],EAX
PUSH 0x2b
POP RSI
CALL 0x0011a8bc
MOV RDI,RBX
CALL 0x00157865
MOV EAX,dword ptr [R15 + 0xe8]
MOV dword ptr [R15 + 0x120],EAX
TEST EBP,EBP
JZ 0x0011213c
PUSH 0x1
POP RAX
MOV dword ptr [R15 + 0x6c],EAX
MOV qword ptr [R15 + 0x74],R12
MOV dword ptr [R15 + 0x60],EAX
MOV RAX,qword ptr [RBX + 0x90]
MOV R12D,0x138
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0xb7
CALL 0x0011a8bc
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
LEA RBP,[RSP + 0xc]
MOV dword ptr [RBP],0x73
PUSH 0x4
POP RDX
MOV RSI,RBP
MOV qword ptr [RSP + 0x10],R14
MOV R14,RDX
CALL 0x0011a80e
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
AND word ptr [RBP],0x0
LEA R13,[RSP + 0xc]
PUSH 0x2
POP RBP
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011a80e
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0x34
POP RSI
CALL 0x0011a8bc
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0xb7
CALL 0x0011a8bc
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
MOV dword ptr [R13],0x72
LEA R13,[RSP + 0xc]
MOV RSI,R13
MOV RDX,R14
CALL 0x0011a80e
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
AND word ptr [R13],0x0
LEA R13,[RSP + 0xc]
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011a80e
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0x26
POP RSI
CALL 0x0011a8bc
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
AND word ptr [R13],0x0
LEA R13,[RSP + 0xc]
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011a80e
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0x1
POP RSI
CALL 0x0011a8bc
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
AND dword ptr [R13],0x0
LEA R13,[RSP + 0xc]
MOV RSI,R13
MOV RDX,R14
CALL 0x0011a80e
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0xb7
CALL 0x0011a8bc
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
MOV dword ptr [R13],0x4e
LEA R13,[RSP + 0xc]
MOV RSI,R13
MOV RDX,R14
MOV R14,qword ptr [RSP + 0x10]
CALL 0x0011a80e
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
AND word ptr [R13],0x0
LEA R13,[RSP + 0xc]
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011a80e
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0x52
POP RSI
CALL 0x0011a8bc
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0xe
POP RSI
CALL 0x0011a8bc
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0x27
POP RSI
CALL 0x0011a8bc
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
MOV word ptr [R13],0x1
LEA R13,[RSP + 0xc]
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011a80e
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0x11
POP RSI
CALL 0x0011a8bc
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0xbc
CALL 0x0011a8bc
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
MOV dword ptr [R13],0x8
LEA R13,[RSP + 0xc]
MOV RSI,R13
PUSH 0x4
POP RDX
CALL 0x0011a80e
ADD R12,qword ptr [RBX + 0x90]
AND word ptr [R13],0x0
LEA RSI,[RSP + 0xc]
MOV RDI,R12
MOV RDX,RBP
CALL 0x0011a80e
MOV BP,0x900
JMP 0x00112140
LAB_00112136:
PUSH -0x1
POP R12
JMP 0x00112192
LAB_0011213c:
MOV BP,0x800
LAB_00112140:
MOV RDI,RBX
CALL 0x00162659
MOV EAX,0xffff8000
AND EAX,dword ptr [R15 + 0x84]
MOVZX ECX,BP
OR ECX,EAX
MOV word ptr [R15 + 0x84],CX
XOR R12D,R12D
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0015e027
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RBX + 0x90],RAX
TEST R14,R14
JZ 0x00112181
MOV qword ptr [R14],R15
LAB_00112181:
PUSH 0x2
POP RDX
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00164527
MOV dword ptr [R15 + 0x10],EAX
LAB_00112192:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 js_parse_class_default_ctor(int8 *param_1,int param_2,long *param_3)
{
long lVar1;
int4 uVar2;
long lVar3;
ushort uVar4;
int4 uVar5;
uint local_3c;
long *local_38;
lVar3 = js_new_function_def(*param_1,param_1[0x12],0,0,param_1[3],
*(int4 *)((long)param_1 + 0x24),*(int4 *)(param_1 + 5));
if (lVar3 == 0) {
uVar5 = 0xffffffff;
}
else {
param_1[0x12] = lVar3;
*(int8 *)(lVar3 + 0x48) = 1;
*(int4 *)(lVar3 + 0x70) = 1;
*(int8 *)(lVar3 + 100) = 0x100000001;
*(int4 *)(lVar3 + 0x168) = *(int4 *)(lVar3 + 0x140);
dbuf_putc(lVar3 + 0x138,0x2b);
push_scope(param_1);
*(int4 *)(lVar3 + 0x120) = *(int4 *)(lVar3 + 0xe8);
if (param_2 == 0) {
uVar4 = 0x800;
}
else {
*(int4 *)(lVar3 + 0x6c) = 1;
*(int8 *)(lVar3 + 0x74) = 0x100000001;
*(int4 *)(lVar3 + 0x60) = 1;
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0xb7);
local_3c = 0x73;
local_38 = param_3;
dbuf_put(param_1[0x12] + 0x138,&local_3c,4);
local_3c = local_3c & 0xffff0000;
dbuf_put(param_1[0x12] + 0x138,&local_3c,2);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0x34);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0xb7);
local_3c = 0x72;
dbuf_put(param_1[0x12] + 0x138,&local_3c,4);
local_3c = local_3c & 0xffff0000;
dbuf_put(param_1[0x12] + 0x138,&local_3c,2);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0x26);
local_3c = local_3c & 0xffff0000;
dbuf_put(param_1[0x12] + 0x138,&local_3c,2);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,1);
local_3c = 0;
dbuf_put(param_1[0x12] + 0x138,&local_3c,4);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0xb7);
param_3 = local_38;
local_3c = 0x4e;
dbuf_put(param_1[0x12] + 0x138,&local_3c,4);
local_3c = local_3c & 0xffff0000;
dbuf_put(param_1[0x12] + 0x138,&local_3c,2);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0x52);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0xe);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0x27);
local_3c = CONCAT22(local_3c._2_2_,1);
dbuf_put(param_1[0x12] + 0x138,&local_3c,2);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0x11);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0xbc);
local_3c = 8;
dbuf_put(param_1[0x12] + 0x138,&local_3c,4);
local_3c = local_3c & 0xffff0000;
dbuf_put(param_1[0x12] + 0x138,&local_3c,2);
uVar4 = 0x900;
}
emit_class_field_init(param_1);
*(ushort *)(lVar3 + 0x84) = uVar4 | (ushort)*(int4 *)(lVar3 + 0x84) & 0x8000;
uVar5 = 0;
emit_return(param_1,0);
param_1[0x12] = *(int8 *)(lVar3 + 8);
if (param_3 != (long *)0x0) {
*param_3 = lVar3;
}
uVar2 = cpool_add(param_1,0,2);
*(int4 *)(lVar3 + 0x10) = uVar2;
}
return uVar5;
}
|
|
16,762
|
js_parse_class_default_ctor
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int js_parse_class_default_ctor(JSParseState *s,
BOOL has_super,
JSFunctionDef **pfd)
{
JSParseFunctionEnum func_type;
JSFunctionDef *fd = s->cur_func;
fd = js_new_function_def(s->ctx, fd, FALSE, FALSE, s->filename,
s->token.line_num, s->token.col_num);
if (!fd)
return -1;
s->cur_func = fd;
fd->has_home_object = TRUE;
fd->super_allowed = TRUE;
fd->has_prototype = FALSE;
fd->has_this_binding = TRUE;
fd->new_target_allowed = TRUE;
/* error if not invoked as a constructor */
emit_op(s, OP_check_ctor);
push_scope(s); /* enter body scope */
fd->body_scope = fd->scope_level;
if (has_super) {
fd->is_derived_class_constructor = TRUE;
fd->super_call_allowed = TRUE;
fd->arguments_allowed = TRUE;
fd->has_arguments_binding = TRUE;
func_type = JS_PARSE_FUNC_DERIVED_CLASS_CONSTRUCTOR;
/* super */
emit_op(s, OP_scope_get_var);
emit_atom(s, JS_ATOM_this_active_func);
emit_u16(s, 0);
emit_op(s, OP_get_super);
emit_op(s, OP_scope_get_var);
emit_atom(s, JS_ATOM_new_target);
emit_u16(s, 0);
emit_op(s, OP_array_from);
emit_u16(s, 0);
emit_op(s, OP_push_i32);
emit_u32(s, 0);
/* arguments */
emit_op(s, OP_scope_get_var);
emit_atom(s, JS_ATOM_arguments);
emit_u16(s, 0);
emit_op(s, OP_append);
/* drop the index */
emit_op(s, OP_drop);
emit_op(s, OP_apply);
emit_u16(s, 1);
/* set the 'this' value */
emit_op(s, OP_dup);
emit_op(s, OP_scope_put_var_init);
emit_atom(s, JS_ATOM_this);
emit_u16(s, 0);
emit_class_field_init(s);
} else {
func_type = JS_PARSE_FUNC_CLASS_CONSTRUCTOR;
emit_class_field_init(s);
}
fd->func_kind = JS_FUNC_NORMAL;
fd->func_type = func_type;
emit_return(s, FALSE);
s->cur_func = fd->parent;
if (pfd)
*pfd = fd;
int idx;
/* the real object will be set at the end of the compilation */
idx = cpool_add(s, JS_NULL);
fd->parent_cpool_idx = idx;
return 0;
}
|
O3
|
c
|
js_parse_class_default_ctor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r13
movl %esi, %ebp
movq %rdi, %rbx
movq 0x90(%rdi), %rsi
movq (%rdi), %rdi
movq 0x18(%rbx), %r8
movl 0x24(%rbx), %r9d
movl 0x28(%rbx), %eax
movl %eax, (%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x11d30
testq %rax, %rax
je 0x127f4
movq %rax, %r15
movq %rax, 0x90(%rbx)
movq $0x1, 0x48(%rax)
movl $0x1, 0x70(%rax)
movabsq $0x100000001, %r14 # imm = 0x100000001
movq %r14, 0x64(%rax)
movq %rax, %rdi
addq $0x138, %rdi # imm = 0x138
movl 0x140(%rax), %eax
movl %eax, 0x168(%r15)
pushq $0x2b
popq %rsi
callq 0x1b1c5
movq %rbx, %rdi
callq 0x5a894
movl 0xe8(%r15), %eax
movl %eax, 0x120(%r15)
testl %ebp, %ebp
je 0x127fa
movq %r13, 0x10(%rsp)
pushq $0x1
popq %rax
movl %eax, 0x6c(%r15)
movq %r14, 0x74(%r15)
movl %eax, 0x60(%r15)
movq 0x90(%rbx), %rax
movl $0x138, %r12d # imm = 0x138
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xb7, %esi
callq 0x1b1c5
movq 0x90(%rbx), %rdi
addq %r12, %rdi
leaq 0xc(%rsp), %rbp
movl $0x73, (%rbp)
pushq $0x4
popq %r13
movq %rbp, %rsi
movq %r13, %rdx
callq 0x1b116
movq 0x90(%rbx), %rdi
addq %r12, %rdi
andw $0x0, (%rbp)
leaq 0xc(%rsp), %r14
pushq $0x2
popq %rbp
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1b116
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0x34
popq %rsi
callq 0x1b1c5
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xb7, %esi
callq 0x1b1c5
movq 0x90(%rbx), %rdi
addq %r12, %rdi
movl $0x72, (%r14)
leaq 0xc(%rsp), %r14
movq %r14, %rsi
movq %r13, %rdx
callq 0x1b116
movq 0x90(%rbx), %rdi
addq %r12, %rdi
andw $0x0, (%r14)
leaq 0xc(%rsp), %r14
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1b116
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0x26
popq %rsi
callq 0x1b1c5
movq 0x90(%rbx), %rdi
addq %r12, %rdi
andw $0x0, (%r14)
leaq 0xc(%rsp), %r14
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1b116
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0x1
popq %rsi
callq 0x1b1c5
movq 0x90(%rbx), %rdi
addq %r12, %rdi
andl $0x0, (%r14)
leaq 0xc(%rsp), %r14
movq %r14, %rsi
movq %r13, %rdx
callq 0x1b116
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xb7, %esi
callq 0x1b1c5
movq 0x90(%rbx), %rdi
addq %r12, %rdi
movl $0x4e, (%r14)
leaq 0xc(%rsp), %r14
movq %r14, %rsi
movq %r13, %rdx
callq 0x1b116
movq 0x90(%rbx), %rdi
addq %r12, %rdi
andw $0x0, (%r14)
leaq 0xc(%rsp), %r13
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1b116
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0x52
popq %rsi
callq 0x1b1c5
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0xe
popq %rsi
callq 0x1b1c5
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0x27
popq %rsi
callq 0x1b1c5
movq 0x90(%rbx), %rdi
addq %r12, %rdi
movw $0x1, (%r13)
movq 0x10(%rsp), %r13
leaq 0xc(%rsp), %r14
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1b116
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
pushq $0x11
popq %rsi
callq 0x1b1c5
movq 0x90(%rbx), %rax
leaq (%rax,%r12), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xbc, %esi
callq 0x1b1c5
movq 0x90(%rbx), %rdi
addq %r12, %rdi
movl $0x8, (%r14)
leaq 0xc(%rsp), %r14
movq %r14, %rsi
pushq $0x4
popq %rdx
callq 0x1b116
addq 0x90(%rbx), %r12
andw $0x0, (%r14)
leaq 0xc(%rsp), %rsi
movq %r12, %rdi
movq %rbp, %rdx
callq 0x1b116
movq %rbx, %rdi
callq 0x64f61
movw $0x900, %ax # imm = 0x900
jmp 0x12806
pushq $-0x1
popq %r12
jmp 0x12858
movq %rbx, %rdi
callq 0x64f61
movw $0x800, %ax # imm = 0x800
movl $0xffff8000, %ecx # imm = 0xFFFF8000
andl 0x84(%r15), %ecx
movzwl %ax, %eax
orl %ecx, %eax
movw %ax, 0x84(%r15)
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x60e5a
movq 0x8(%r15), %rsi
movq %rsi, 0x90(%rbx)
testq %r13, %r13
je 0x12847
movq %r15, (%r13)
movq 0x90(%rbx), %rsi
movq (%rbx), %rdi
pushq $0x2
popq %rcx
xorl %edx, %edx
callq 0x66d7a
movl %eax, 0x10(%r15)
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_parse_class_default_ctor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rdx
mov ebp, esi
mov rbx, rdi
mov rsi, [rdi+90h]
mov rdi, [rdi]
mov r8, [rbx+18h]
mov r9d, [rbx+24h]
mov eax, [rbx+28h]
mov [rsp+48h+var_48], eax
xor edx, edx
xor ecx, ecx
call js_new_function_def
test rax, rax
jz loc_127F4
mov r15, rax
mov [rbx+90h], rax
mov qword ptr [rax+48h], 1
mov dword ptr [rax+70h], 1
mov r14, 100000001h
mov [rax+64h], r14
mov rdi, rax
add rdi, 138h
mov eax, [rax+140h]
mov [r15+168h], eax
push 2Bh ; '+'
pop rsi
call dbuf_putc
mov rdi, rbx
call push_scope
mov eax, [r15+0E8h]
mov [r15+120h], eax
test ebp, ebp
jz loc_127FA
mov [rsp+48h+var_38], r13
push 1
pop rax
mov [r15+6Ch], eax
mov [r15+74h], r14
mov [r15+60h], eax
mov rax, [rbx+90h]
mov r12d, 138h
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0B7h
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
lea rbp, [rsp+48h+var_3C]
mov dword ptr [rbp+0], 73h ; 's'
push 4
pop r13
mov rsi, rbp
mov rdx, r13
call dbuf_put
mov rdi, [rbx+90h]
add rdi, r12
and word ptr [rbp+0], 0
lea r14, [rsp+48h+var_3C]
push 2
pop rbp
mov rsi, r14
mov rdx, rbp
call dbuf_put
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 34h ; '4'
pop rsi
call dbuf_putc
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0B7h
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
mov dword ptr [r14], 72h ; 'r'
lea r14, [rsp+48h+var_3C]
mov rsi, r14
mov rdx, r13
call dbuf_put
mov rdi, [rbx+90h]
add rdi, r12
and word ptr [r14], 0
lea r14, [rsp+48h+var_3C]
mov rsi, r14
mov rdx, rbp
call dbuf_put
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 26h ; '&'
pop rsi
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
and word ptr [r14], 0
lea r14, [rsp+48h+var_3C]
mov rsi, r14
mov rdx, rbp
call dbuf_put
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 1
pop rsi
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
and dword ptr [r14], 0
lea r14, [rsp+48h+var_3C]
mov rsi, r14
mov rdx, r13
call dbuf_put
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0B7h
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
mov dword ptr [r14], 4Eh ; 'N'
lea r14, [rsp+48h+var_3C]
mov rsi, r14
mov rdx, r13
call dbuf_put
mov rdi, [rbx+90h]
add rdi, r12
and word ptr [r14], 0
lea r13, [rsp+48h+var_3C]
mov rsi, r13
mov rdx, rbp
call dbuf_put
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 52h ; 'R'
pop rsi
call dbuf_putc
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 0Eh
pop rsi
call dbuf_putc
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 27h ; '''
pop rsi
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
mov word ptr [r13+0], 1
mov r13, [rsp+48h+var_38]
lea r14, [rsp+48h+var_3C]
mov rsi, r14
mov rdx, rbp
call dbuf_put
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
push 11h
pop rsi
call dbuf_putc
mov rax, [rbx+90h]
lea rdi, [rax+r12]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0BCh
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r12
mov dword ptr [r14], 8
lea r14, [rsp+48h+var_3C]
mov rsi, r14
push 4
pop rdx
call dbuf_put
add r12, [rbx+90h]
and word ptr [r14], 0
lea rsi, [rsp+48h+var_3C]
mov rdi, r12
mov rdx, rbp
call dbuf_put
mov rdi, rbx
call emit_class_field_init
mov ax, 900h
jmp short loc_12806
loc_127F4:
push 0FFFFFFFFFFFFFFFFh
pop r12
jmp short loc_12858
loc_127FA:
mov rdi, rbx
call emit_class_field_init
mov ax, 800h
loc_12806:
mov ecx, 0FFFF8000h
and ecx, [r15+84h]
movzx eax, ax
or eax, ecx
mov [r15+84h], ax
xor r12d, r12d
mov rdi, rbx
xor esi, esi
call emit_return
mov rsi, [r15+8]
mov [rbx+90h], rsi
test r13, r13
jz short loc_12847
mov [r13+0], r15
mov rsi, [rbx+90h]
loc_12847:
mov rdi, [rbx]
push 2
pop rcx
xor edx, edx
call cpool_add
mov [r15+10h], eax
loc_12858:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long js_parse_class_default_ctor(_QWORD *a1, int a2, long long *a3)
{
long long v5; // rax
long long v6; // r15
long long v7; // rax
long long v8; // rdi
long long v9; // rdi
long long v10; // rax
long long v11; // rax
long long v12; // rdi
long long v13; // rdi
long long v14; // rax
long long v15; // rdi
long long v16; // rax
long long v17; // rdi
long long v18; // rax
long long v19; // rdi
long long v20; // rdi
long long v21; // rax
long long v22; // rax
long long v23; // rax
long long v24; // rdi
long long v25; // rax
long long v26; // rax
long long v27; // rdi
long long v28; // r12
__int16 v29; // ax
unsigned int v30; // r12d
long long v31; // rsi
int v33; // [rsp+Ch] [rbp-3Ch] BYREF
long long *v34; // [rsp+10h] [rbp-38h]
v5 = js_new_function_def(*a1, a1[18], 0, 0, a1[3], *((_DWORD *)a1 + 9), *((_DWORD *)a1 + 10));
if ( v5 )
{
v6 = v5;
a1[18] = v5;
*(_QWORD *)(v5 + 72) = 1LL;
*(_DWORD *)(v5 + 112) = 1;
*(_QWORD *)(v5 + 100) = 0x100000001LL;
*(_DWORD *)(v5 + 360) = *(_DWORD *)(v5 + 320);
dbuf_putc(v5 + 312, 43LL);
push_scope(a1);
*(_DWORD *)(v6 + 288) = *(_DWORD *)(v6 + 232);
if ( a2 )
{
v34 = a3;
*(_DWORD *)(v6 + 108) = 1;
*(_QWORD *)(v6 + 116) = 0x100000001LL;
*(_DWORD *)(v6 + 96) = 1;
v7 = a1[18];
*(_DWORD *)(v7 + 360) = *(_DWORD *)(v7 + 320);
dbuf_putc(v7 + 312, 183LL);
v8 = a1[18] + 312LL;
v33 = 115;
dbuf_put(v8, &v33, 4LL);
v9 = a1[18] + 312LL;
LOWORD(v33) = 0;
dbuf_put(v9, &v33, 2LL);
v10 = a1[18];
*(_DWORD *)(v10 + 360) = *(_DWORD *)(v10 + 320);
dbuf_putc(v10 + 312, 52LL);
v11 = a1[18];
*(_DWORD *)(v11 + 360) = *(_DWORD *)(v11 + 320);
dbuf_putc(v11 + 312, 183LL);
v12 = a1[18] + 312LL;
v33 = 114;
dbuf_put(v12, &v33, 4LL);
v13 = a1[18] + 312LL;
LOWORD(v33) = 0;
dbuf_put(v13, &v33, 2LL);
v14 = a1[18];
*(_DWORD *)(v14 + 360) = *(_DWORD *)(v14 + 320);
dbuf_putc(v14 + 312, 38LL);
v15 = a1[18] + 312LL;
LOWORD(v33) = 0;
dbuf_put(v15, &v33, 2LL);
v16 = a1[18];
*(_DWORD *)(v16 + 360) = *(_DWORD *)(v16 + 320);
dbuf_putc(v16 + 312, 1LL);
v17 = a1[18] + 312LL;
v33 = 0;
dbuf_put(v17, &v33, 4LL);
v18 = a1[18];
*(_DWORD *)(v18 + 360) = *(_DWORD *)(v18 + 320);
dbuf_putc(v18 + 312, 183LL);
v19 = a1[18] + 312LL;
v33 = 78;
dbuf_put(v19, &v33, 4LL);
v20 = a1[18] + 312LL;
LOWORD(v33) = 0;
dbuf_put(v20, &v33, 2LL);
v21 = a1[18];
*(_DWORD *)(v21 + 360) = *(_DWORD *)(v21 + 320);
dbuf_putc(v21 + 312, 82LL);
v22 = a1[18];
*(_DWORD *)(v22 + 360) = *(_DWORD *)(v22 + 320);
dbuf_putc(v22 + 312, 14LL);
v23 = a1[18];
*(_DWORD *)(v23 + 360) = *(_DWORD *)(v23 + 320);
dbuf_putc(v23 + 312, 39LL);
v24 = a1[18] + 312LL;
LOWORD(v33) = 1;
a3 = v34;
dbuf_put(v24, &v33, 2LL);
v25 = a1[18];
*(_DWORD *)(v25 + 360) = *(_DWORD *)(v25 + 320);
dbuf_putc(v25 + 312, 17LL);
v26 = a1[18];
*(_DWORD *)(v26 + 360) = *(_DWORD *)(v26 + 320);
dbuf_putc(v26 + 312, 188LL);
v27 = a1[18] + 312LL;
v33 = 8;
dbuf_put(v27, &v33, 4LL);
v28 = a1[18] + 312LL;
LOWORD(v33) = 0;
dbuf_put(v28, &v33, 2LL);
emit_class_field_init(a1);
v29 = 2304;
}
else
{
emit_class_field_init(a1);
v29 = 2048;
}
*(_WORD *)(v6 + 132) = *(_WORD *)(v6 + 132) & 0x8000 | v29;
v30 = 0;
emit_return(a1, 0LL);
v31 = *(_QWORD *)(v6 + 8);
a1[18] = v31;
if ( a3 )
{
*a3 = v6;
v31 = a1[18];
}
*(_DWORD *)(v6 + 16) = cpool_add(*a1, v31, 0LL, 2LL);
}
else
{
return (unsigned int)-1;
}
return v30;
}
|
js_parse_class_default_ctor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RDX
MOV EBP,ESI
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x90]
MOV RDI,qword ptr [RDI]
MOV R8,qword ptr [RBX + 0x18]
MOV R9D,dword ptr [RBX + 0x24]
MOV EAX,dword ptr [RBX + 0x28]
MOV dword ptr [RSP],EAX
XOR EDX,EDX
XOR ECX,ECX
CALL 0x00111d30
TEST RAX,RAX
JZ 0x001127f4
MOV R15,RAX
MOV qword ptr [RBX + 0x90],RAX
MOV qword ptr [RAX + 0x48],0x1
MOV dword ptr [RAX + 0x70],0x1
MOV R14,0x100000001
MOV qword ptr [RAX + 0x64],R14
MOV RDI,RAX
ADD RDI,0x138
MOV EAX,dword ptr [RAX + 0x140]
MOV dword ptr [R15 + 0x168],EAX
PUSH 0x2b
POP RSI
CALL 0x0011b1c5
MOV RDI,RBX
CALL 0x0015a894
MOV EAX,dword ptr [R15 + 0xe8]
MOV dword ptr [R15 + 0x120],EAX
TEST EBP,EBP
JZ 0x001127fa
MOV qword ptr [RSP + 0x10],R13
PUSH 0x1
POP RAX
MOV dword ptr [R15 + 0x6c],EAX
MOV qword ptr [R15 + 0x74],R14
MOV dword ptr [R15 + 0x60],EAX
MOV RAX,qword ptr [RBX + 0x90]
MOV R12D,0x138
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0xb7
CALL 0x0011b1c5
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
LEA RBP,[RSP + 0xc]
MOV dword ptr [RBP],0x73
PUSH 0x4
POP R13
MOV RSI,RBP
MOV RDX,R13
CALL 0x0011b116
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
AND word ptr [RBP],0x0
LEA R14,[RSP + 0xc]
PUSH 0x2
POP RBP
MOV RSI,R14
MOV RDX,RBP
CALL 0x0011b116
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0x34
POP RSI
CALL 0x0011b1c5
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0xb7
CALL 0x0011b1c5
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
MOV dword ptr [R14],0x72
LEA R14,[RSP + 0xc]
MOV RSI,R14
MOV RDX,R13
CALL 0x0011b116
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
AND word ptr [R14],0x0
LEA R14,[RSP + 0xc]
MOV RSI,R14
MOV RDX,RBP
CALL 0x0011b116
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0x26
POP RSI
CALL 0x0011b1c5
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
AND word ptr [R14],0x0
LEA R14,[RSP + 0xc]
MOV RSI,R14
MOV RDX,RBP
CALL 0x0011b116
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0x1
POP RSI
CALL 0x0011b1c5
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
AND dword ptr [R14],0x0
LEA R14,[RSP + 0xc]
MOV RSI,R14
MOV RDX,R13
CALL 0x0011b116
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0xb7
CALL 0x0011b1c5
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
MOV dword ptr [R14],0x4e
LEA R14,[RSP + 0xc]
MOV RSI,R14
MOV RDX,R13
CALL 0x0011b116
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
AND word ptr [R14],0x0
LEA R13,[RSP + 0xc]
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011b116
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0x52
POP RSI
CALL 0x0011b1c5
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0xe
POP RSI
CALL 0x0011b1c5
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0x27
POP RSI
CALL 0x0011b1c5
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
MOV word ptr [R13],0x1
MOV R13,qword ptr [RSP + 0x10]
LEA R14,[RSP + 0xc]
MOV RSI,R14
MOV RDX,RBP
CALL 0x0011b116
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
PUSH 0x11
POP RSI
CALL 0x0011b1c5
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R12*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0xbc
CALL 0x0011b1c5
MOV RDI,qword ptr [RBX + 0x90]
ADD RDI,R12
MOV dword ptr [R14],0x8
LEA R14,[RSP + 0xc]
MOV RSI,R14
PUSH 0x4
POP RDX
CALL 0x0011b116
ADD R12,qword ptr [RBX + 0x90]
AND word ptr [R14],0x0
LEA RSI,[RSP + 0xc]
MOV RDI,R12
MOV RDX,RBP
CALL 0x0011b116
MOV RDI,RBX
CALL 0x00164f61
MOV AX,0x900
JMP 0x00112806
LAB_001127f4:
PUSH -0x1
POP R12
JMP 0x00112858
LAB_001127fa:
MOV RDI,RBX
CALL 0x00164f61
MOV AX,0x800
LAB_00112806:
MOV ECX,0xffff8000
AND ECX,dword ptr [R15 + 0x84]
MOVZX EAX,AX
OR EAX,ECX
MOV word ptr [R15 + 0x84],AX
XOR R12D,R12D
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00160e5a
MOV RSI,qword ptr [R15 + 0x8]
MOV qword ptr [RBX + 0x90],RSI
TEST R13,R13
JZ 0x00112847
MOV qword ptr [R13],R15
MOV RSI,qword ptr [RBX + 0x90]
LAB_00112847:
MOV RDI,qword ptr [RBX]
PUSH 0x2
POP RCX
XOR EDX,EDX
CALL 0x00166d7a
MOV dword ptr [R15 + 0x10],EAX
LAB_00112858:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 js_parse_class_default_ctor(int8 *param_1,int param_2,long *param_3)
{
long lVar1;
ushort uVar2;
int4 uVar3;
long lVar4;
int8 uVar5;
int4 uVar6;
uint local_3c;
long *local_38;
lVar4 = js_new_function_def(*param_1,param_1[0x12],0,0,param_1[3],
*(int4 *)((long)param_1 + 0x24),*(int4 *)(param_1 + 5));
if (lVar4 == 0) {
uVar6 = 0xffffffff;
}
else {
param_1[0x12] = lVar4;
*(int8 *)(lVar4 + 0x48) = 1;
*(int4 *)(lVar4 + 0x70) = 1;
*(int8 *)(lVar4 + 100) = 0x100000001;
*(int4 *)(lVar4 + 0x168) = *(int4 *)(lVar4 + 0x140);
dbuf_putc(lVar4 + 0x138,0x2b);
push_scope(param_1);
*(int4 *)(lVar4 + 0x120) = *(int4 *)(lVar4 + 0xe8);
if (param_2 == 0) {
emit_class_field_init(param_1);
uVar2 = 0x800;
}
else {
*(int4 *)(lVar4 + 0x6c) = 1;
*(int8 *)(lVar4 + 0x74) = 0x100000001;
*(int4 *)(lVar4 + 0x60) = 1;
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
local_38 = param_3;
dbuf_putc(lVar1 + 0x138,0xb7);
local_3c = 0x73;
dbuf_put(param_1[0x12] + 0x138,&local_3c,4);
local_3c = local_3c & 0xffff0000;
dbuf_put(param_1[0x12] + 0x138,&local_3c,2);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0x34);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0xb7);
local_3c = 0x72;
dbuf_put(param_1[0x12] + 0x138,&local_3c,4);
local_3c = local_3c & 0xffff0000;
dbuf_put(param_1[0x12] + 0x138,&local_3c,2);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0x26);
local_3c = local_3c & 0xffff0000;
dbuf_put(param_1[0x12] + 0x138,&local_3c,2);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,1);
local_3c = 0;
dbuf_put(param_1[0x12] + 0x138,&local_3c,4);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0xb7);
local_3c = 0x4e;
dbuf_put(param_1[0x12] + 0x138,&local_3c,4);
local_3c = local_3c & 0xffff0000;
dbuf_put(param_1[0x12] + 0x138,&local_3c,2);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0x52);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0xe);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0x27);
param_3 = local_38;
local_3c = CONCAT22(local_3c._2_2_,1);
dbuf_put(param_1[0x12] + 0x138,&local_3c,2);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0x11);
lVar1 = param_1[0x12];
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0xbc);
local_3c = 8;
dbuf_put(param_1[0x12] + 0x138,&local_3c,4);
local_3c = local_3c & 0xffff0000;
dbuf_put(param_1[0x12] + 0x138,&local_3c,2);
emit_class_field_init(param_1);
uVar2 = 0x900;
}
*(ushort *)(lVar4 + 0x84) = uVar2 | (ushort)*(int4 *)(lVar4 + 0x84) & 0x8000;
uVar6 = 0;
emit_return(param_1,0);
uVar5 = *(int8 *)(lVar4 + 8);
param_1[0x12] = uVar5;
if (param_3 != (long *)0x0) {
*param_3 = lVar4;
uVar5 = param_1[0x12];
}
uVar3 = cpool_add(*param_1,uVar5,0,2);
*(int4 *)(lVar4 + 0x10) = uVar3;
}
return uVar6;
}
|
|
16,763
|
POINTonE1_affine_on_curve
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e1.c
|
static bool_t POINTonE1_affine_on_curve(const POINTonE1_affine *p)
{
vec384 XXX, YY;
sqr_fp(XXX, p->X);
mul_fp(XXX, XXX, p->X); /* X^3 */
add_fp(XXX, XXX, B_E1); /* X^3 + B */
sqr_fp(YY, p->Y); /* Y^2 */
return vec_is_equal(XXX, YY, sizeof(XXX));
}
|
O0
|
c
|
POINTonE1_affine_on_curve:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x40(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xb2560
leaq -0x40(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0xb6080
leaq -0x40(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq 0x3f9a7(%rip), %rdx # 0xe8790
callq 0xafde0
leaq -0x70(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
callq 0xb2560
leaq -0x40(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movl $0x30, %edx
callq 0xab4c0
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
POINTonE1_affine_on_curve:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
lea rdi, [rbp+var_40]
mov rsi, [rbp+var_8]
call sqr_fp
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_40]
mov rdx, [rbp+var_8]
call mul_fp
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_40]
lea rdx, B_E1
call add_fp
lea rdi, [rbp+var_70]
mov rsi, [rbp+var_8]
add rsi, 30h ; '0'
call sqr_fp
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_70]
mov edx, 30h ; '0'
call vec_is_equal
add rsp, 70h
pop rbp
retn
|
long long POINTonE1_affine_on_curve(long long a1)
{
_BYTE v2[48]; // [rsp+0h] [rbp-70h] BYREF
_BYTE v3[56]; // [rsp+30h] [rbp-40h] BYREF
long long v4; // [rsp+68h] [rbp-8h]
v4 = a1;
sqr_fp(v3, a1);
mul_fp(v3, v3, v4);
add_fp(v3, v3, &B_E1);
sqr_fp(v2, v4 + 48);
return vec_is_equal(v3, v2, 48LL);
}
|
POINTonE1_affine_on_curve:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x001b2560
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x8]
CALL 0x001b6080
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x40]
LEA RDX,[0x1e8790]
CALL 0x001afde0
LEA RDI,[RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x30
CALL 0x001b2560
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x70]
MOV EDX,0x30
CALL 0x001ab4c0
ADD RSP,0x70
POP RBP
RET
|
void POINTonE1_affine_on_curve(long param_1)
{
int1 local_78 [48];
int1 local_48 [56];
long local_10;
local_10 = param_1;
sqr_fp(local_48,param_1);
mul_fp(local_48,local_48,local_10);
add_fp(local_48,local_48,B_E1);
sqr_fp(local_78,local_10 + 0x30);
vec_is_equal(local_48,local_78,0x30);
return;
}
|
|
16,764
|
my_hash_next
|
eloqsql/mysys/hash.c
|
uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length,
HASH_SEARCH_STATE *current_record)
{
HASH_LINK *pos;
uint idx;
if (*current_record != NO_RECORD)
{
HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*);
for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next)
{
pos=data+idx;
if (!hashcmp(hash,pos,key,length))
{
*current_record= idx;
return pos->data;
}
}
*current_record= NO_RECORD;
}
return 0;
}
|
O0
|
c
|
my_hash_next:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x2c067
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
cmpl $-0x1, -0x34(%rbp)
je 0x2c05d
movq -0x40(%rbp), %rax
movl -0x34(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x2bef0
cmpl $0x0, %eax
jne 0x2c050
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x2c06f
jmp 0x2c052
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0x2c007
movq -0x28(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
my_hash_next:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_28]
cmp dword ptr [rax], 0FFFFFFFFh
jz loc_2C067
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
mov ecx, [rcx]
shl rcx, 4
add rax, rcx
mov eax, [rax]
mov [rbp+var_34], eax
loc_2C007:
cmp [rbp+var_34], 0FFFFFFFFh
jz short loc_2C05D
mov rax, [rbp+var_40]
mov ecx, [rbp+var_34]
shl rcx, 4
add rax, rcx
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
call hashcmp
cmp eax, 0
jnz short loc_2C050
mov ecx, [rbp+var_34]
mov rax, [rbp+var_28]
mov [rax], ecx
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp short loc_2C06F
loc_2C050:
jmp short $+2
loc_2C052:
mov rax, [rbp+var_30]
mov eax, [rax]
mov [rbp+var_34], eax
jmp short loc_2C007
loc_2C05D:
mov rax, [rbp+var_28]
mov dword ptr [rax], 0FFFFFFFFh
loc_2C067:
mov [rbp+var_8], 0
loc_2C06F:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long my_hash_next(long long a1, long long a2, long long a3, unsigned int *a4)
{
long long v5; // [rsp+0h] [rbp-40h]
unsigned int i; // [rsp+Ch] [rbp-34h]
long long v7; // [rsp+10h] [rbp-30h]
if ( *a4 != -1 )
{
v5 = *(_QWORD *)(a1 + 40);
for ( i = *(_DWORD *)(16LL * *a4 + v5); i != -1; i = *(_DWORD *)v7 )
{
v7 = 16LL * i + v5;
if ( !hashcmp(a1, v7, a2, a3) )
{
*a4 = i;
return *(_QWORD *)(v7 + 8);
}
}
*a4 = -1;
}
return 0LL;
}
|
my_hash_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX],-0x1
JZ 0x0012c067
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX]
SHL RCX,0x4
ADD RAX,RCX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
LAB_0012c007:
CMP dword ptr [RBP + -0x34],-0x1
JZ 0x0012c05d
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x34]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x0012bef0
CMP EAX,0x0
JNZ 0x0012c050
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012c06f
LAB_0012c050:
JMP 0x0012c052
LAB_0012c052:
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0012c007
LAB_0012c05d:
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0xffffffff
LAB_0012c067:
MOV qword ptr [RBP + -0x8],0x0
LAB_0012c06f:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 my_hash_next(long param_1,int8 param_2,int8 param_3,uint *param_4)
{
long lVar1;
int iVar2;
uint *puVar3;
uint local_3c;
if (*param_4 != 0xffffffff) {
lVar1 = *(long *)(param_1 + 0x28);
local_3c = *(uint *)(lVar1 + (ulong)*param_4 * 0x10);
while (local_3c != 0xffffffff) {
puVar3 = (uint *)(lVar1 + (ulong)local_3c * 0x10);
iVar2 = hashcmp(param_1,puVar3,param_2,param_3);
if (iVar2 == 0) {
*param_4 = local_3c;
return *(int8 *)(puVar3 + 2);
}
local_3c = *puVar3;
}
*param_4 = 0xffffffff;
}
return 0;
}
|
|
16,765
|
my_uca_context_weight_find
|
eloqsql/strings/ctype-uca.c
|
static inline const MY_CONTRACTION *
my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc,
size_t max_char_length)
{
const MY_CONTRACTION *cnt;
DBUG_ASSERT(scanner->level->contractions.nitems);
/*
If we have scanned a character which can have previous context,
and there were some more characters already before,
then reconstruct codepoint of the previous character
from "page" and "code" into w[1], and verify that {wc[1], wc[0]}
together form a real previous context pair.
Note, we support only 2-character long sequences with previous
context at the moment. CLDR does not have longer sequences.
*/
if (my_uca_can_be_previous_context_tail(&scanner->level->contractions,
wc[0]) &&
scanner->wbeg != nochar && /* if not the very first character */
my_uca_can_be_previous_context_head(&scanner->level->contractions,
(wc[1]= ((scanner->page << 8) +
scanner->code))) &&
(cnt= my_uca_previous_context_find(scanner, wc[1], wc[0])))
{
scanner->page= scanner->code= 0; /* Clear for the next character */
return cnt;
}
else if (my_uca_can_be_contraction_head(&scanner->level->contractions,
wc[0]))
{
/* Check if w[0] starts a contraction */
if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length)))
return cnt;
}
return NULL;
}
|
O0
|
c
|
my_uca_context_weight_find:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0x85ef6
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x860a0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x85fa1
movq -0x10(%rbp), %rax
leaq 0x160c1b(%rip), %rcx # 0x1e6b40
cmpq %rcx, (%rax)
je 0x85fa1
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
shll $0x8, %eax
movq -0x10(%rbp), %rcx
addl 0x28(%rcx), %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rax
movq %rsi, 0x8(%rax)
callq 0x860d0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x85fa1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
callq 0x86100
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x85fa1
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x85fee
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x7d510
cmpb $0x0, %al
je 0x85fe4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x861b0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x85fe2
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x85fee
jmp 0x85fe4
jmp 0x85fe6
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_uca_context_weight_find:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_85EF6:
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_18]
mov rsi, [rax]
call my_uca_can_be_previous_context_tail
movsx eax, al
cmp eax, 0
jz loc_85FA1
mov rax, [rbp+var_10]
lea rcx, nochar
cmp [rax], rcx
jz short loc_85FA1
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_10]
mov eax, [rax+24h]
shl eax, 8
mov rcx, [rbp+var_10]
add eax, [rcx+28h]
movsxd rsi, eax
mov rax, [rbp+var_18]
mov [rax+8], rsi
call my_uca_can_be_previous_context_head
movsx eax, al
cmp eax, 0
jz short loc_85FA1
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+8]
mov rax, [rbp+var_18]
mov rdx, [rax]
call my_uca_previous_context_find
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_85FA1
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+24h], 0
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_85FEE
loc_85FA1:
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_18]
mov rsi, [rax]
call my_uca_can_be_contraction_head
cmp al, 0
jz short loc_85FE4
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_uca_scanner_contraction_find
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_85FE2
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_85FEE
loc_85FE2:
jmp short $+2
loc_85FE4:
jmp short $+2
loc_85FE6:
mov [rbp+var_8], 0
loc_85FEE:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long my_uca_context_weight_find(long long a1, _QWORD *a2, long long a3)
{
long long v3; // rdi
long long v5; // [rsp+8h] [rbp-28h]
long long v6; // [rsp+8h] [rbp-28h]
if ( (unsigned __int8)my_uca_can_be_previous_context_tail(*(_QWORD *)(a1 + 24) + 24LL, *a2)
&& *(_UNKNOWN **)a1 != &nochar
&& (v3 = *(_QWORD *)(a1 + 24) + 24LL,
a2[1] = *(_DWORD *)(a1 + 40) + (*(_DWORD *)(a1 + 36) << 8),
(unsigned __int8)my_uca_can_be_previous_context_head(v3))
&& (v5 = my_uca_previous_context_find(a1, a2[1], *a2)) != 0 )
{
*(_DWORD *)(a1 + 40) = 0;
*(_DWORD *)(a1 + 36) = 0;
return v5;
}
else if ( (unsigned __int8)my_uca_can_be_contraction_head(*(_QWORD *)(a1 + 24) + 24LL, *a2)
&& (v6 = my_uca_scanner_contraction_find(a1, a2, a3)) != 0 )
{
return v6;
}
else
{
return 0LL;
}
}
|
my_uca_context_weight_find:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
JMP 0x00185ef6
LAB_00185ef6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
CALL 0x001860a0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00185fa1
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2e6b40]
CMP qword ptr [RAX],RCX
JZ 0x00185fa1
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x24]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x10]
ADD EAX,dword ptr [RCX + 0x28]
MOVSXD RSI,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RSI
CALL 0x001860d0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00185fa1
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX]
CALL 0x00186100
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x00185fa1
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x24],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00185fee
LAB_00185fa1:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
CALL 0x0017d510
CMP AL,0x0
JZ 0x00185fe4
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001861b0
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x00185fe2
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00185fee
LAB_00185fe2:
JMP 0x00185fe4
LAB_00185fe4:
JMP 0x00185fe6
LAB_00185fe6:
MOV qword ptr [RBP + -0x8],0x0
LAB_00185fee:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long my_uca_context_weight_find(int8 *param_1,int8 *param_2,int8 param_3)
{
char cVar1;
long lVar2;
long local_10;
cVar1 = my_uca_can_be_previous_context_tail(param_1[3] + 0x18,*param_2);
if ((cVar1 != '\0') && ((int4 *)*param_1 != &nochar)) {
lVar2 = param_1[3];
param_2[1] = (long)(*(int *)((long)param_1 + 0x24) * 0x100 + *(int *)(param_1 + 5));
cVar1 = my_uca_can_be_previous_context_head(lVar2 + 0x18);
if ((cVar1 != '\0') &&
(lVar2 = my_uca_previous_context_find(param_1,param_2[1],*param_2), lVar2 != 0)) {
*(int4 *)(param_1 + 5) = 0;
*(int4 *)((long)param_1 + 0x24) = 0;
return lVar2;
}
}
cVar1 = my_uca_can_be_contraction_head(param_1[3] + 0x18,*param_2);
if ((cVar1 == '\0') ||
(local_10 = my_uca_scanner_contraction_find(param_1,param_2,param_3), local_10 == 0)) {
local_10 = 0;
}
return local_10;
}
|
|
16,766
|
ggml_threadpool_params_init
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
void ggml_threadpool_params_init(struct ggml_threadpool_params * p, int n_threads) {
p->n_threads = n_threads;
p->prio = 0; // default priority (usually means normal or inherited)
p->poll = 50; // hybrid-polling enabled
p->strict_cpu = false; // no strict placement (all threads share same cpumask)
p->paused = false; // threads are ready to go
memset(p->cpumask, 0, GGML_MAX_N_THREADS); // all-zero means use the default affinity (usually inherited)
}
|
O0
|
c
|
ggml_threadpool_params_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x200(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x204(%rax)
movq -0x8(%rbp), %rax
movl $0x32, 0x208(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x20c(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x20d(%rax)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x200, %edx # imm = 0x200
callq 0x44050
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ggml_threadpool_params_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax+200h], ecx
mov rax, [rbp+var_8]
mov dword ptr [rax+204h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+208h], 32h ; '2'
mov rax, [rbp+var_8]
mov byte ptr [rax+20Ch], 0
mov rax, [rbp+var_8]
mov byte ptr [rax+20Dh], 0
mov rdi, [rbp+var_8]
xor esi, esi
mov edx, 200h
call _memset
add rsp, 10h
pop rbp
retn
|
long long ggml_threadpool_params_init(long long a1, int a2)
{
*(_DWORD *)(a1 + 512) = a2;
*(_DWORD *)(a1 + 516) = 0;
*(_DWORD *)(a1 + 520) = 50;
*(_BYTE *)(a1 + 524) = 0;
*(_BYTE *)(a1 + 525) = 0;
return memset(a1, 0LL, 512LL);
}
|
ggml_threadpool_params_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x200],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x204],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x208],0x32
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x20c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x20d],0x0
MOV RDI,qword ptr [RBP + -0x8]
XOR ESI,ESI
MOV EDX,0x200
CALL 0x00144050
ADD RSP,0x10
POP RBP
RET
|
void ggml_threadpool_params_init(void *param_1,int4 param_2)
{
*(int4 *)((long)param_1 + 0x200) = param_2;
*(int4 *)((long)param_1 + 0x204) = 0;
*(int4 *)((long)param_1 + 0x208) = 0x32;
*(int1 *)((long)param_1 + 0x20c) = 0;
*(int1 *)((long)param_1 + 0x20d) = 0;
memset(param_1,0,0x200);
return;
}
|
|
16,767
|
ggml_threadpool_params_init
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
void ggml_threadpool_params_init(struct ggml_threadpool_params * p, int n_threads) {
p->n_threads = n_threads;
p->prio = 0; // default priority (usually means normal or inherited)
p->poll = 50; // hybrid-polling enabled
p->strict_cpu = false; // no strict placement (all threads share same cpumask)
p->paused = false; // threads are ready to go
memset(p->cpumask, 0, GGML_MAX_N_THREADS); // all-zero means use the default affinity (usually inherited)
}
|
O3
|
c
|
ggml_threadpool_params_init:
movl %esi, 0x200(%rdi)
movabsq $0x3200000000, %rax # imm = 0x3200000000
movq %rax, 0x204(%rdi)
movw $0x0, 0x20c(%rdi)
movl $0x200, %edx # imm = 0x200
xorl %esi, %esi
jmp 0x168f0
|
ggml_threadpool_params_init:
mov [rdi+200h], esi
mov rax, 3200000000h
mov [rdi+204h], rax
mov word ptr [rdi+20Ch], 0
mov edx, 200h
xor esi, esi
jmp _memset
|
long long ggml_threadpool_params_init(long long a1, int a2)
{
*(_DWORD *)(a1 + 512) = a2;
*(_QWORD *)(a1 + 516) = 0x3200000000LL;
*(_WORD *)(a1 + 524) = 0;
return memset(a1, 0LL, 512LL);
}
|
ggml_threadpool_params_init:
MOV dword ptr [RDI + 0x200],ESI
MOV RAX,0x3200000000
MOV qword ptr [RDI + 0x204],RAX
MOV word ptr [RDI + 0x20c],0x0
MOV EDX,0x200
XOR ESI,ESI
JMP 0x001168f0
|
void ggml_threadpool_params_init(void *param_1,int4 param_2)
{
*(int4 *)((long)param_1 + 0x200) = param_2;
*(int8 *)((long)param_1 + 0x204) = 0x3200000000;
*(int2 *)((long)param_1 + 0x20c) = 0;
memset(param_1,0,0x200);
return;
}
|
|
16,768
|
evmone::baseline::execute(evmc_vm*, evmc_host_interface const*, evmc_host_context*, evmc_revision, evmc_message const*, unsigned char const*, unsigned long)
|
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/baseline_execution.cpp
|
evmc_result execute(evmc_vm* c_vm, const evmc_host_interface* host, evmc_host_context* ctx,
evmc_revision rev, const evmc_message* msg, const uint8_t* code, size_t code_size) noexcept
{
auto vm = static_cast<VM*>(c_vm);
const bytes_view container{code, code_size};
const auto eof_enabled = rev >= instr::REV_EOF1;
// Since EOF validation recurses into subcontainers, it only makes sense to do for top level
// message calls. The condition for `msg->kind` inside differentiates between creation tx code
// (initcode) and already deployed code (runtime).
if (vm->validate_eof && eof_enabled && is_eof_container(container) && msg->depth == 0)
{
const auto container_kind =
(msg->kind == EVMC_EOFCREATE ? ContainerKind::initcode : ContainerKind::runtime);
if (validate_eof(rev, container_kind, container) != EOFValidationError::success)
return evmc_make_result(EVMC_CONTRACT_VALIDATION_FAILURE, 0, 0, nullptr, 0);
}
const auto code_analysis = analyze(container, eof_enabled);
return execute(*vm, *host, ctx, rev, *msg, code_analysis);
}
|
O2
|
cpp
|
evmone::baseline::execute(evmc_vm*, evmc_host_interface const*, evmc_host_context*, evmc_revision, evmc_message const*, unsigned char const*, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r9, %r14
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movq 0x118(%rsp), %rsi
movq 0x110(%rsp), %rax
cmpl $0xe, %r8d
jl 0x34853
cmpb $0x0, 0x39(%r13)
je 0x34853
movq %rsi, %rdi
movq %rax, %rsi
callq 0x3ccbb
movq 0x118(%rsp), %rsi
testb %al, %al
movq 0x110(%rsp), %rax
je 0x34853
cmpl $0x0, 0x8(%r14)
je 0x348ad
movq %r14, 0x8(%rsp)
movq %r15, %r14
xorl %ecx, %ecx
cmpl $0xe, %ebp
setge %cl
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rax, %rdx
callq 0x47a20
movq %r15, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
movl %ebp, %r8d
movq 0x8(%rsp), %r9
callq 0x2f2e0
movq %r15, %rdi
callq 0x37a68
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %esi, %esi
cmpl $0x5, (%r14)
setne %sil
movl %ebp, %edi
movq 0x118(%rsp), %rdx
movq %rax, %rcx
callq 0x3d0a9
movq 0x118(%rsp), %rsi
testl %eax, %eax
movq 0x110(%rsp), %rax
je 0x34853
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x30(%rbx)
andq $0x0, 0x40(%rbx)
movups %xmm0, 0x20(%rbx)
movl $0xd, (%rbx)
movups %xmm0, 0x8(%rbx)
jmp 0x34898
movq %rax, %rdi
callq 0x2d941
|
_ZN6evmone8baseline7executeEP7evmc_vmPK19evmc_host_interfaceP17evmc_host_context13evmc_revisionPK12evmc_messagePKhm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0D8h
mov r14, r9
mov ebp, r8d
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbx, rdi
mov rsi, [rsp+108h+arg_8]
mov rax, [rsp+108h+arg_0]
cmp r8d, 0Eh
jl short loc_34853
cmp byte ptr [r13+39h], 0
jz short loc_34853
mov rdi, rsi
mov rsi, rax
call _ZN6evmone16is_eof_containerESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::is_eof_container(std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
mov rsi, [rsp+108h+arg_8]
test al, al
mov rax, [rsp+108h+arg_0]
jz short loc_34853
cmp dword ptr [r14+8], 0
jz short loc_348AD
loc_34853:
mov [rsp+108h+var_100], r14
mov r14, r15
xor ecx, ecx
cmp ebp, 0Eh
setnl cl
lea r15, [rsp+108h+var_F8]
mov rdi, r15
mov rdx, rax
call _ZN6evmone8baseline7analyzeESt17basic_string_viewIhN4evmc11byte_traitsIhEEEb; evmone::baseline::analyze(std::basic_string_view<uchar,evmc::byte_traits<uchar>>,bool)
mov [rsp+108h+var_108], r15
mov rdi, rbx
mov rsi, r13
mov rdx, r12
mov rcx, r14
mov r8d, ebp
mov r9, [rsp+108h+var_100]
call _ZN6evmone8baseline7executeERNS_2VMERK19evmc_host_interfaceP17evmc_host_context13evmc_revisionRK12evmc_messageRKNS0_12CodeAnalysisE; evmone::baseline::execute(evmone::VM &,evmc_host_interface const&,evmc_host_context *,evmc_revision,evmc_message const&,evmone::baseline::CodeAnalysis const&)
mov rdi, r15; this
call _ZN6evmone8baseline12CodeAnalysisD2Ev; evmone::baseline::CodeAnalysis::~CodeAnalysis()
loc_34898:
mov rax, rbx
add rsp, 0D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_348AD:
xor esi, esi
cmp dword ptr [r14], 5
setnz sil
mov edi, ebp
mov rdx, [rsp+108h+arg_8]
mov rcx, rax
call _ZN6evmone12validate_eofE13evmc_revisionNS_13ContainerKindESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::validate_eof(evmc_revision,evmone::ContainerKind,std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
mov rsi, [rsp+108h+arg_8]
test eax, eax
mov rax, [rsp+108h+arg_0]
jz loc_34853
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx+30h], xmm0
and qword ptr [rbx+40h], 0
movups xmmword ptr [rbx+20h], xmm0
mov dword ptr [rbx], 0Dh
movups xmmword ptr [rbx+8], xmm0
jmp short loc_34898
mov rdi, rax
call __clang_call_terminate
|
long long evmone::baseline::execute(
long long a1,
long long a2,
int a3,
int a4,
int a5,
_DWORD *a6,
long long a7,
long long a8)
{
int v13; // esi
int v14; // eax
bool v15; // zf
_BYTE v17[248]; // [rsp+10h] [rbp-F8h] BYREF
v13 = a8;
v14 = a7;
if ( a5 < 14
|| !*(_BYTE *)(a2 + 57)
|| (v13 = a8, v15 = (unsigned __int8)evmone::is_eof_container(a8, a7) == 0, v14 = a7, v15)
|| a6[2]
|| (v13 = a8, v15 = (unsigned int)evmone::validate_eof((unsigned int)a5, *a6 != 5, a8, a7) == 0, v14 = a7, v15) )
{
evmone::baseline::analyze((unsigned int)v17, v13, v14, a5 >= 14, a5, (_DWORD)a6);
evmone::baseline::execute(a1, a2, a3, a4, a5, (long long)a6, (long long)v17);
evmone::baseline::CodeAnalysis::~CodeAnalysis((evmone::baseline::CodeAnalysis *)v17);
}
else
{
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_DWORD *)a1 = 13;
*(_OWORD *)(a1 + 8) = 0LL;
}
return a1;
}
|
execute:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xd8
MOV R14,R9
MOV EBP,R8D
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RSP + 0x118]
MOV RAX,qword ptr [RSP + 0x110]
CMP R8D,0xe
JL 0x00134853
CMP byte ptr [R13 + 0x39],0x0
JZ 0x00134853
MOV RDI,RSI
MOV RSI,RAX
CALL 0x0013ccbb
MOV RSI,qword ptr [RSP + 0x118]
TEST AL,AL
MOV RAX,qword ptr [RSP + 0x110]
JZ 0x00134853
CMP dword ptr [R14 + 0x8],0x0
JZ 0x001348ad
LAB_00134853:
MOV qword ptr [RSP + 0x8],R14
MOV R14,R15
XOR ECX,ECX
CMP EBP,0xe
SETGE CL
LAB_00134863:
LEA R15,[RSP + 0x10]
MOV RDI,R15
MOV RDX,RAX
CALL 0x00147a20
MOV qword ptr [RSP],R15
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
MOV RCX,R14
MOV R8D,EBP
MOV R9,qword ptr [RSP + 0x8]
CALL 0x0012f2e0
MOV RDI,R15
CALL 0x00137a68
LAB_00134898:
MOV RAX,RBX
ADD RSP,0xd8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001348ad:
XOR ESI,ESI
CMP dword ptr [R14],0x5
SETNZ SIL
MOV EDI,EBP
MOV RDX,qword ptr [RSP + 0x118]
MOV RCX,RAX
CALL 0x0013d0a9
MOV RSI,qword ptr [RSP + 0x118]
TEST EAX,EAX
MOV RAX,qword ptr [RSP + 0x110]
JZ 0x00134853
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
AND qword ptr [RBX + 0x40],0x0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOV dword ptr [RBX],0xd
MOVUPS xmmword ptr [RBX + 0x8],XMM0
JMP 0x00134898
|
/* evmone::baseline::execute(evmc_vm*, evmc_host_interface const*, evmc_host_context*,
evmc_revision, evmc_message const*, unsigned char const*, unsigned long) */
baseline * __thiscall
evmone::baseline::execute
(baseline *this,long param_1,int8 param_2,int8 param_3,evmone *param_5,
int *param_6,int8 param_7,evmone *param_8)
{
char cVar1;
int iVar2;
CodeAnalysis local_f8 [200];
if ((((0xd < (int)param_5._0_4_) && (*(char *)(param_1 + 0x39) != '\0')) &&
(cVar1 = is_eof_container(param_8,param_7), cVar1 != '\0')) &&
((param_6[2] == 0 &&
(iVar2 = validate_eof(param_5._0_4_,*param_6 != 5,param_8,param_7), iVar2 != 0)))) {
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int4 *)this = 0xd;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
return this;
}
/* try { // try from 00134863 to 00134872 has its CatchHandler @ 00134904 */
analyze(local_f8,param_8,param_7,0xd < (int)param_5._0_4_);
execute(this,param_1,param_2,param_3,(int4)param_5._0_4_,param_6,local_f8);
CodeAnalysis::~CodeAnalysis(local_f8);
return this;
}
|
|
16,769
|
my_wc_mb_gbk
|
eloqsql/strings/ctype-gbk.c
|
static int
my_wc_mb_gbk(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_gbk_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
}
|
O0
|
c
|
my_wc_mb_gbk:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x3de4b
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x3dec4
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x3de6b
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3dec4
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x3e190
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x3de87
movl $0x0, -0x4(%rbp)
jmp 0x3dec4
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x3de9e
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x3dec4
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_wc_mb_gbk:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_3DE4B
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_3DEC4
loc_3DE4B:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_3DE6B
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_3DEC4
loc_3DE6B:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_gbk_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_3DE87
mov [rbp+var_4], 0
jmp short loc_3DEC4
loc_3DE87:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_3DE9E
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_3DEC4
loc_3DE9E:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_3DEC4:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_wc_mb_gbk(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_gbk_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = BYTE1(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_gbk:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0013de4b
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0013dec4
LAB_0013de4b:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x0013de6b
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013dec4
LAB_0013de6b:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x0013e190
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0013de87
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013dec4
LAB_0013de87:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0013de9e
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0013dec4
LAB_0013de9e:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_0013dec4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_gbk(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
int iVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
iVar1 = func_uni_gbk_onechar(param_2);
if (iVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uint)iVar1 >> 8);
param_3[1] = (char)iVar1;
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
16,770
|
CLI::App::run_callback(bool, bool)
|
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/App_inl.hpp
|
CLI11_INLINE void App::run_callback(bool final_mode, bool suppress_final_callback) {
pre_callback();
// in the main app if immediate_callback_ is set it runs the main callback before the used subcommands
if(!final_mode && parse_complete_callback_) {
parse_complete_callback_();
}
// run the callbacks for the received subcommands
for(App *subc : get_subcommands()) {
if(subc->parent_ == this) {
subc->run_callback(true, suppress_final_callback);
}
}
// now run callbacks for option_groups
for(auto &subc : subcommands_) {
if(subc->name_.empty() && subc->count_all() > 0) {
subc->run_callback(true, suppress_final_callback);
}
}
// finally run the main callback
if(final_callback_ && (parsed_ > 0) && (!suppress_final_callback)) {
if(!name_.empty() || count_all() > 0 || parent_ == nullptr) {
final_callback_();
}
}
}
|
O0
|
cpp
|
CLI::App::run_callback(bool, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
andb $0x1, %cl
movb %cl, -0x9(%rbp)
andb $0x1, %al
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movq (%rdi), %rax
callq *0x10(%rax)
testb $0x1, -0x9(%rbp)
jne 0x33ac3
movq -0x80(%rbp), %rdi
addq $0x70, %rdi
callq 0x32e20
testb $0x1, %al
jne 0x33ab6
jmp 0x33ac3
movq -0x80(%rbp), %rdi
addq $0x70, %rdi
callq 0x45c00
movq -0x80(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x3e760
leaq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3a080
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x39f10
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x40b80
testb $0x1, %al
jne 0x33b0e
leaq -0x30(%rbp), %rdi
callq 0x265a0
jmp 0x33b6f
leaq -0x38(%rbp), %rdi
callq 0x409b0
movq -0x80(%rbp), %rcx
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq %rcx, 0x2c8(%rax)
jne 0x33b62
movq -0x48(%rbp), %rdi
movzbl -0xa(%rbp), %edx
andl $0x1, %edx
movl $0x1, %esi
callq 0x33a70
jmp 0x33b46
jmp 0x33b62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x265a0
jmp 0x33c88
jmp 0x33b64
leaq -0x38(%rbp), %rdi
callq 0x409d0
jmp 0x33af2
movq -0x80(%rbp), %rax
addq $0x280, %rax # imm = 0x280
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x33d20
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
callq 0x33d50
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x33d80
testb $0x1, %al
jne 0x33baa
jmp 0x33c14
leaq -0x68(%rbp), %rdi
callq 0x33dc0
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0x33de0
movq %rax, %rdi
addq $0x8, %rdi
callq 0x99c0
testb $0x1, %al
jne 0x33bd2
jmp 0x33c07
movq -0x78(%rbp), %rdi
callq 0x33de0
movq %rax, %rdi
callq 0x3d530
cmpq $0x0, %rax
jbe 0x33c07
movq -0x78(%rbp), %rdi
callq 0x33de0
movq %rax, %rdi
movb -0xa(%rbp), %al
movl $0x1, %esi
andb $0x1, %al
movzbl %al, %edx
callq 0x33a70
jmp 0x33c09
leaq -0x68(%rbp), %rdi
callq 0x33e00
jmp 0x33b97
movq -0x80(%rbp), %rdi
addq $0x90, %rdi
callq 0x32e20
testb $0x1, %al
jne 0x33c2a
jmp 0x33c7f
movq -0x80(%rbp), %rax
cmpl $0x0, 0x2a4(%rax)
jbe 0x33c7f
testb $0x1, -0xa(%rbp)
jne 0x33c7f
movq -0x80(%rbp), %rdi
addq $0x8, %rdi
callq 0x99c0
testb $0x1, %al
jne 0x33c50
jmp 0x33c6d
movq -0x80(%rbp), %rdi
callq 0x3d530
cmpq $0x0, %rax
ja 0x33c6d
movq -0x80(%rbp), %rax
cmpq $0x0, 0x2c8(%rax)
jne 0x33c7d
movq -0x80(%rbp), %rdi
addq $0x90, %rdi
callq 0x45c00
jmp 0x33c7f
addq $0x80, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x9a70
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZN3CLI3App12run_callbackEbb:
push rbp
mov rbp, rsp
sub rsp, 80h
mov al, dl
mov cl, sil
mov [rbp+var_8], rdi
and cl, 1
mov [rbp+var_9], cl
and al, 1
mov [rbp+var_A], al
mov rdi, [rbp+var_8]
mov [rbp+var_80], rdi
mov rax, [rdi]
call qword ptr [rax+10h]
test [rbp+var_9], 1
jnz short loc_33AC3
mov rdi, [rbp+var_80]
add rdi, 70h ; 'p'
call _ZNKSt8functionIFvvEEcvbEv; std::function<void ()(void)>::operator bool(void)
test al, 1
jnz short loc_33AB6
jmp short loc_33AC3
loc_33AB6:
mov rdi, [rbp+var_80]
add rdi, 70h ; 'p'
call _ZNKSt8functionIFvvEEclEv; std::function<void ()(void)>::operator()(void)
loc_33AC3:
mov rsi, [rbp+var_80]
lea rdi, [rbp+var_30]; this
call _ZNK3CLI3App15get_subcommandsEv; CLI::App::get_subcommands(void)
lea rax, [rbp+var_30]
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
call _ZNSt6vectorIPN3CLI3AppESaIS2_EE5beginEv; std::vector<CLI::App *>::begin(void)
mov [rbp+var_38], rax
mov rdi, [rbp+var_18]
call _ZNSt6vectorIPN3CLI3AppESaIS2_EE3endEv; std::vector<CLI::App *>::end(void)
mov [rbp+var_40], rax
loc_33AF2:
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_40]
call _ZN9__gnu_cxxneIPPN3CLI3AppESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<CLI::App **,std::vector<CLI::App *>>(__gnu_cxx::__normal_iterator<CLI::App **,std::vector<CLI::App *>> const&,__gnu_cxx::__normal_iterator<CLI::App **,std::vector<CLI::App *>> const&)
test al, 1
jnz short loc_33B0E
lea rdi, [rbp+var_30]
call _ZNSt6vectorIPN3CLI3AppESaIS2_EED2Ev; std::vector<CLI::App *>::~vector()
jmp short loc_33B6F
loc_33B0E:
lea rdi, [rbp+var_38]
call _ZNK9__gnu_cxx17__normal_iteratorIPPN3CLI3AppESt6vectorIS3_SaIS3_EEEdeEv; __gnu_cxx::__normal_iterator<CLI::App **,std::vector<CLI::App *>>::operator*(void)
mov rcx, [rbp+var_80]
mov rax, [rax]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
cmp [rax+2C8h], rcx
jnz short loc_33B62
mov rdi, [rbp+var_48]; this
movzx edx, [rbp+var_A]
and edx, 1; bool
mov esi, 1; bool
call _ZN3CLI3App12run_callbackEbb; CLI::App::run_callback(bool,bool)
jmp short $+2
loc_33B46:
jmp short loc_33B62
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_30]
call _ZNSt6vectorIPN3CLI3AppESaIS2_EED2Ev; std::vector<CLI::App *>::~vector()
jmp loc_33C88
loc_33B62:
jmp short $+2
loc_33B64:
lea rdi, [rbp+var_38]
call _ZN9__gnu_cxx17__normal_iteratorIPPN3CLI3AppESt6vectorIS3_SaIS3_EEEppEv; __gnu_cxx::__normal_iterator<CLI::App **,std::vector<CLI::App *>>::operator++(void)
jmp short loc_33AF2
loc_33B6F:
mov rax, [rbp+var_80]
add rax, 280h
mov [rbp+var_60], rax
mov rdi, [rbp+var_60]
call _ZNSt6vectorISt10shared_ptrIN3CLI3AppEESaIS3_EE5beginEv; std::vector<std::shared_ptr<CLI::App>>::begin(void)
mov [rbp+var_68], rax
mov rdi, [rbp+var_60]
call _ZNSt6vectorISt10shared_ptrIN3CLI3AppEESaIS3_EE3endEv; std::vector<std::shared_ptr<CLI::App>>::end(void)
mov [rbp+var_70], rax
loc_33B97:
lea rdi, [rbp+var_68]
lea rsi, [rbp+var_70]
call _ZN9__gnu_cxxneIPSt10shared_ptrIN3CLI3AppEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>> const&)
test al, 1
jnz short loc_33BAA
jmp short loc_33C14
loc_33BAA:
lea rdi, [rbp+var_68]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3CLI3AppEESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>::operator*(void)
mov [rbp+var_78], rax
mov rdi, [rbp+var_78]
call _ZNKSt19__shared_ptr_accessIN3CLI3AppELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
add rdi, 8
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_33BD2
jmp short loc_33C07
loc_33BD2:
mov rdi, [rbp+var_78]
call _ZNKSt19__shared_ptr_accessIN3CLI3AppELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax; this
call _ZNK3CLI3App9count_allEv; CLI::App::count_all(void)
cmp rax, 0
jbe short loc_33C07
mov rdi, [rbp+var_78]
call _ZNKSt19__shared_ptr_accessIN3CLI3AppELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax; this
mov al, [rbp+var_A]
mov esi, 1; bool
and al, 1
movzx edx, al; bool
call _ZN3CLI3App12run_callbackEbb; CLI::App::run_callback(bool,bool)
loc_33C07:
jmp short $+2
loc_33C09:
lea rdi, [rbp+var_68]
call _ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3CLI3AppEESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>::operator++(void)
jmp short loc_33B97
loc_33C14:
mov rdi, [rbp+var_80]
add rdi, 90h
call _ZNKSt8functionIFvvEEcvbEv; std::function<void ()(void)>::operator bool(void)
test al, 1
jnz short loc_33C2A
jmp short loc_33C7F
loc_33C2A:
mov rax, [rbp+var_80]
cmp dword ptr [rax+2A4h], 0
jbe short loc_33C7F
test [rbp+var_A], 1
jnz short loc_33C7F
mov rdi, [rbp+var_80]
add rdi, 8
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_33C50
jmp short loc_33C6D
loc_33C50:
mov rdi, [rbp+var_80]; this
call _ZNK3CLI3App9count_allEv; CLI::App::count_all(void)
cmp rax, 0
ja short loc_33C6D
mov rax, [rbp+var_80]
cmp qword ptr [rax+2C8h], 0
jnz short loc_33C7D
loc_33C6D:
mov rdi, [rbp+var_80]
add rdi, 90h
call _ZNKSt8functionIFvvEEclEv; std::function<void ()(void)>::operator()(void)
loc_33C7D:
jmp short $+2
loc_33C7F:
add rsp, 80h
pop rbp
retn
loc_33C88:
mov rdi, [rbp+var_50]
call __Unwind_Resume
|
char CLI::App::run_callback(CLI::App *this, char a2, char a3)
{
long long v3; // rax
CLI::App *v4; // rax
CLI::App *v5; // rax
char result; // al
long long v7; // [rsp+8h] [rbp-78h]
long long v8; // [rsp+10h] [rbp-70h] BYREF
_QWORD v9[2]; // [rsp+18h] [rbp-68h] BYREF
CLI::App *v10; // [rsp+38h] [rbp-48h]
long long v11; // [rsp+40h] [rbp-40h] BYREF
long long v12; // [rsp+48h] [rbp-38h] BYREF
long long v13[3]; // [rsp+50h] [rbp-30h] BYREF
long long *v14; // [rsp+68h] [rbp-18h]
char v15; // [rsp+76h] [rbp-Ah]
char v16; // [rsp+77h] [rbp-9h]
CLI::App *v17; // [rsp+78h] [rbp-8h]
v17 = this;
v16 = a2 & 1;
v15 = a3 & 1;
(*(void ( **)(CLI::App *))(*(_QWORD *)this + 16LL))(this);
if ( (a2 & 1) == 0 && std::function<void ()(void)>::operator bool((CLI::App *)((char *)this + 112)) )
std::function<void ()(void)>::operator()((char *)this + 112);
CLI::App::get_subcommands((CLI::App *)v13);
v14 = v13;
v12 = std::vector<CLI::App *>::begin(v13, this);
v11 = std::vector<CLI::App *>::end(v14);
while ( (__gnu_cxx::operator!=<CLI::App **,std::vector<CLI::App *>>(&v12, &v11) & 1) != 0 )
{
v10 = *(CLI::App **)__gnu_cxx::__normal_iterator<CLI::App **,std::vector<CLI::App *>>::operator*(&v12);
if ( *((CLI::App **)v10 + 89) == this )
CLI::App::run_callback(v10, 1, v15 & 1);
__gnu_cxx::__normal_iterator<CLI::App **,std::vector<CLI::App *>>::operator++(&v12);
}
std::vector<CLI::App *>::~vector(v13);
v9[1] = (char *)this + 640;
v9[0] = std::vector<std::shared_ptr<CLI::App>>::begin((char *)this + 640);
v8 = std::vector<std::shared_ptr<CLI::App>>::end((char *)this + 640);
while ( (__gnu_cxx::operator!=<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>(v9, &v8) & 1) != 0 )
{
v7 = __gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>::operator*(v9);
v3 = std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v7);
if ( (std::string::empty(v3 + 8) & 1) != 0 )
{
v4 = (CLI::App *)std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v7);
if ( CLI::App::count_all(v4) )
{
v5 = (CLI::App *)std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v7);
CLI::App::run_callback(v5, 1, v15 & 1);
}
}
__gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>::operator++(v9);
}
result = std::function<void ()(void)>::operator bool((CLI::App *)((char *)this + 144));
if ( (result & 1) != 0 )
{
result = (char)this;
if ( *((_DWORD *)this + 169) )
{
if ( (v15 & 1) == 0 )
{
if ( (std::string::empty((char *)this + 8) & 1) == 0 )
return std::function<void ()(void)>::operator()((char *)this + 144);
if ( CLI::App::count_all(this) )
return std::function<void ()(void)>::operator()((char *)this + 144);
result = (char)this;
if ( !*((_QWORD *)this + 89) )
return std::function<void ()(void)>::operator()((char *)this + 144);
}
}
}
return result;
}
|
run_callback:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV AL,DL
MOV CL,SIL
MOV qword ptr [RBP + -0x8],RDI
AND CL,0x1
MOV byte ptr [RBP + -0x9],CL
AND AL,0x1
MOV byte ptr [RBP + -0xa],AL
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x80],RDI
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
TEST byte ptr [RBP + -0x9],0x1
JNZ 0x00133ac3
MOV RDI,qword ptr [RBP + -0x80]
ADD RDI,0x70
CALL 0x00132e20
TEST AL,0x1
JNZ 0x00133ab6
JMP 0x00133ac3
LAB_00133ab6:
MOV RDI,qword ptr [RBP + -0x80]
ADD RDI,0x70
CALL 0x00145c00
LAB_00133ac3:
MOV RSI,qword ptr [RBP + -0x80]
LEA RDI,[RBP + -0x30]
CALL 0x0013e760
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0013a080
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00139f10
MOV qword ptr [RBP + -0x40],RAX
LAB_00133af2:
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x40]
CALL 0x00140b80
TEST AL,0x1
JNZ 0x00133b0e
LEA RDI,[RBP + -0x30]
CALL 0x001265a0
JMP 0x00133b6f
LAB_00133b0e:
LEA RDI,[RBP + -0x38]
CALL 0x001409b0
MOV RCX,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
CMP qword ptr [RAX + 0x2c8],RCX
JNZ 0x00133b62
MOV RDI,qword ptr [RBP + -0x48]
MOVZX EDX,byte ptr [RBP + -0xa]
LAB_00133b37:
AND EDX,0x1
MOV ESI,0x1
CALL 0x00133a70
LAB_00133b44:
JMP 0x00133b46
LAB_00133b46:
JMP 0x00133b62
LAB_00133b62:
JMP 0x00133b64
LAB_00133b64:
LEA RDI,[RBP + -0x38]
CALL 0x001409d0
JMP 0x00133af2
LAB_00133b6f:
MOV RAX,qword ptr [RBP + -0x80]
ADD RAX,0x280
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x00133d20
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x00133d50
MOV qword ptr [RBP + -0x70],RAX
LAB_00133b97:
LEA RDI,[RBP + -0x68]
LEA RSI,[RBP + -0x70]
CALL 0x00133d80
TEST AL,0x1
JNZ 0x00133baa
JMP 0x00133c14
LAB_00133baa:
LEA RDI,[RBP + -0x68]
CALL 0x00133dc0
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0x78]
CALL 0x00133de0
MOV RDI,RAX
ADD RDI,0x8
CALL 0x001099c0
TEST AL,0x1
JNZ 0x00133bd2
JMP 0x00133c07
LAB_00133bd2:
MOV RDI,qword ptr [RBP + -0x78]
CALL 0x00133de0
MOV RDI,RAX
CALL 0x0013d530
CMP RAX,0x0
JBE 0x00133c07
MOV RDI,qword ptr [RBP + -0x78]
CALL 0x00133de0
MOV RDI,RAX
MOV AL,byte ptr [RBP + -0xa]
MOV ESI,0x1
AND AL,0x1
MOVZX EDX,AL
CALL 0x00133a70
LAB_00133c07:
JMP 0x00133c09
LAB_00133c09:
LEA RDI,[RBP + -0x68]
CALL 0x00133e00
JMP 0x00133b97
LAB_00133c14:
MOV RDI,qword ptr [RBP + -0x80]
ADD RDI,0x90
CALL 0x00132e20
TEST AL,0x1
JNZ 0x00133c2a
JMP 0x00133c7f
LAB_00133c2a:
MOV RAX,qword ptr [RBP + -0x80]
CMP dword ptr [RAX + 0x2a4],0x0
JBE 0x00133c7f
TEST byte ptr [RBP + -0xa],0x1
JNZ 0x00133c7f
MOV RDI,qword ptr [RBP + -0x80]
ADD RDI,0x8
CALL 0x001099c0
TEST AL,0x1
JNZ 0x00133c50
JMP 0x00133c6d
LAB_00133c50:
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x0013d530
CMP RAX,0x0
JA 0x00133c6d
MOV RAX,qword ptr [RBP + -0x80]
CMP qword ptr [RAX + 0x2c8],0x0
JNZ 0x00133c7d
LAB_00133c6d:
MOV RDI,qword ptr [RBP + -0x80]
ADD RDI,0x90
CALL 0x00145c00
LAB_00133c7d:
JMP 0x00133c7f
LAB_00133c7f:
ADD RSP,0x80
POP RBP
RET
|
/* CLI::App::run_callback(bool, bool) */
void __thiscall CLI::App::run_callback(App *this,bool param_1,bool param_2)
{
bool bVar1;
int8 *puVar2;
__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false> *this_00;
App *pAVar3;
ulong uVar4;
long lVar5;
int8 local_78;
int8 local_70;
vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>> *local_68;
App *local_50;
int8 local_48;
int8 local_40;
vector<CLI::App*,std::allocator<CLI::App*>> local_38 [24];
vector<CLI::App*,std::allocator<CLI::App*>> *local_20;
byte local_12;
byte local_11;
App *local_10;
local_12 = param_2;
local_11 = param_1;
local_10 = this;
(**(code **)(*(long *)this + 0x10))();
if (((local_11 & 1) == 0) &&
(bVar1 = std::function::operator_cast_to_bool((function *)(this + 0x70)), bVar1)) {
std::function<void()>::operator()((function<void()> *)(this + 0x70));
}
get_subcommands();
local_20 = local_38;
local_40 = std::vector<CLI::App*,std::allocator<CLI::App*>>::begin(local_20);
local_48 = std::vector<CLI::App*,std::allocator<CLI::App*>>::end(local_20);
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_40,(__normal_iterator *)&local_48), bVar1) {
puVar2 = (int8 *)
__gnu_cxx::
__normal_iterator<CLI::App**,std::vector<CLI::App*,std::allocator<CLI::App*>>>::
operator*((__normal_iterator<CLI::App**,std::vector<CLI::App*,std::allocator<CLI::App*>>>
*)&local_40);
local_50 = (App *)*puVar2;
if (*(App **)(local_50 + 0x2c8) == this) {
/* try { // try from 00133b37 to 00133b43 has its CatchHandler @ 00133b48 */
run_callback(local_50,true,(bool)(local_12 & 1));
}
__gnu_cxx::__normal_iterator<CLI::App**,std::vector<CLI::App*,std::allocator<CLI::App*>>>::
operator++((__normal_iterator<CLI::App**,std::vector<CLI::App*,std::allocator<CLI::App*>>> *)
&local_40);
}
std::vector<CLI::App*,std::allocator<CLI::App*>>::~vector(local_38);
local_68 = (vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>> *)
(this + 0x280);
local_70 = std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>::begin
(local_68);
local_78 = std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>::end
(local_68);
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_70,(__normal_iterator *)&local_78), bVar1) {
this_00 = (__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false> *)
__gnu_cxx::
__normal_iterator<std::shared_ptr<CLI::App>*,std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>>
::operator*((__normal_iterator<std::shared_ptr<CLI::App>*,std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>>
*)&local_70);
std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(this_00);
uVar4 = std::__cxx11::string::empty();
if ((uVar4 & 1) != 0) {
pAVar3 = (App *)std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(this_00);
lVar5 = count_all(pAVar3);
if (lVar5 != 0) {
pAVar3 = (App *)std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(this_00);
run_callback(pAVar3,true,(bool)(local_12 & 1));
}
}
__gnu_cxx::
__normal_iterator<std::shared_ptr<CLI::App>*,std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>>
::operator++((__normal_iterator<std::shared_ptr<CLI::App>*,std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>>
*)&local_70);
}
bVar1 = std::function::operator_cast_to_bool((function *)(this + 0x90));
if ((((bVar1) && (*(int *)(this + 0x2a4) != 0)) && ((local_12 & 1) == 0)) &&
(((uVar4 = std::__cxx11::string::empty(), (uVar4 & 1) == 0 ||
(lVar5 = count_all(this), lVar5 != 0)) || (*(long *)(this + 0x2c8) == 0)))) {
std::function<void()>::operator()((function<void()> *)(this + 0x90));
}
return;
}
|
|
16,771
|
mthd_my_read_query_result
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
int mthd_my_read_query_result(MYSQL *mysql)
{
uchar *pos;
ulong field_count;
MYSQL_DATA *fields;
ulong length;
const uchar *end;
uchar has_metadata;
my_bool can_local_infile= (mysql->options.extension) && (mysql->extension->auto_local_infile != WAIT_FOR_QUERY);
if (mysql->options.extension && mysql->extension->auto_local_infile == ACCEPT_FILE_REQUEST)
mysql->extension->auto_local_infile= WAIT_FOR_QUERY;
if ((length = ma_net_safe_read(mysql)) == packet_error)
{
return(1);
}
free_old_query(mysql); /* Free old result */
get_info:
pos=(uchar*) mysql->net.read_pos;
end= pos + length;
if ((field_count= net_field_length(&pos)) == 0)
return ma_read_ok_packet(mysql, pos, length);
if (field_count == NULL_LENGTH) /* LOAD DATA LOCAL INFILE */
{
int error=mysql_handle_local_infile(mysql, (char *)pos, can_local_infile);
if ((length=ma_net_safe_read(mysql)) == packet_error || error)
return(-1);
goto get_info; /* Get info packet */
}
has_metadata= 1;
if (ma_supports_cache_metadata(mysql))
{
assert(mysql->fields == NULL);
if (pos < end)
{
has_metadata= *pos;
pos++;
}
}
if (!(mysql->server_status & SERVER_STATUS_AUTOCOMMIT))
mysql->server_status|= SERVER_STATUS_IN_TRANS;
if (has_metadata)
{
if (!(fields= mysql->methods->db_read_rows(mysql, (MYSQL_FIELD *) 0,
ma_result_set_rows(mysql))))
return (-1);
if (!(mysql->fields= unpack_fields(mysql, fields, &mysql->field_alloc,
(uint) field_count, 1)))
return (-1);
}
else
{
/* Read EOF, to get the status and warning count. */
if ((length= ma_net_safe_read(mysql)) == packet_error)
{
return -1;
}
pos= (uchar *) mysql->net.read_pos;
if (length != 5 || pos[0] != 0xfe)
{
return -1;
}
mysql->warning_count= uint2korr(pos + 1);
mysql->server_status= uint2korr(pos + 3);
}
mysql->status=MYSQL_STATUS_GET_RESULT;
mysql->field_count=field_count;
return(0);
}
|
O3
|
c
|
mthd_my_read_query_result:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x480(%rdi)
je 0x3ed8a
movq 0x4f0(%rbx), %rax
movb 0x78(%rax), %cl
cmpb $0x1, %cl
setne %r14b
cmpb $0x2, %cl
jne 0x3ed8d
movb $0x1, 0x78(%rax)
movb $0x1, %r14b
jmp 0x3ed8d
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x39123
movq %rax, %r15
movl $0x1, %r12d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %r15
jne 0x3edba
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x3e07a
movzbl %r14b, %r13d
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
movq 0x20(%rbx), %rsi
movzbl (%rsi), %r14d
cmpq $0xfa, %r14
jbe 0x3ee3b
cmpq $0xfb, %r14
jne 0x3ee13
incq %rsi
movq %rbx, %rdi
movl %r13d, %edx
callq 0x4676f
movl %eax, %r14d
movq %rbx, %rdi
callq 0x39123
movq %rax, %r15
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %r15
je 0x3eda8
testb %r14b, %r14b
je 0x3edcc
jmp 0x3eda8
cmpl $0xfc, %r14d
je 0x3ee41
cmpl $0xfd, %r14d
jne 0x3ee4c
leaq 0x4(%rsi), %rax
movzwl 0x1(%rsi), %ecx
movzbl 0x3(%rsi), %r14d
shll $0x10, %r14d
orq %rcx, %r14
jmp 0x3ee54
leaq 0x1(%rsi), %rax
jmp 0x3ee54
leaq 0x3(%rsi), %rax
movzwl 0x1(%rsi), %r14d
jmp 0x3ee54
leaq 0x9(%rsi), %rax
movl 0x1(%rsi), %r14d
testq %r14, %r14
je 0x3eed6
movq 0x4f0(%rbx), %rcx
xorl %edx, %edx
testb $0x10, 0x70(%rcx)
je 0x3ee76
addq %r15, %rsi
cmpq %rsi, %rax
jae 0x3ee76
cmpb $0x0, (%rax)
sete %dl
movl 0x380(%rbx), %eax
testb $0x2, %al
jne 0x3ee89
orl $0x1, %eax
movl %eax, 0x380(%rbx)
testb %dl, %dl
je 0x3eef2
movq %rbx, %rdi
callq 0x39123
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0x3eda8
cmpq $0x5, %rax
jne 0x3eda8
movq 0x20(%rbx), %rax
cmpb $-0x2, (%rax)
jne 0x3eda8
movzwl 0x1(%rax), %ecx
movl %ecx, 0x388(%rbx)
movzwl 0x3(%rax), %eax
movl %eax, 0x380(%rbx)
jmp 0x3ef4e
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3e40a
movq 0x4d0(%rbx), %rax
movq 0x70(%rcx), %rcx
andl $0x8, %ecx
cmpq $0x1, %rcx
movl $0x9, %edx
sbbl $0x0, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq *0x28(%rax)
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x3eda8
leaq 0x300(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
movl %r14d, %ecx
movl $0x1, %r8d
callq 0x3b64c
movq %rax, 0x2f8(%rbx)
testq %rax, %rax
je 0x3eda8
movl $0x1, 0x488(%rbx)
movl %r14d, 0x37c(%rbx)
xorl %r12d, %r12d
jmp 0x3eda8
|
mthd_my_read_query_result:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
cmp qword ptr [rdi+480h], 0
jz short loc_3ED8A
mov rax, [rbx+4F0h]
mov cl, [rax+78h]
cmp cl, 1
setnz r14b
cmp cl, 2
jnz short loc_3ED8D
mov byte ptr [rax+78h], 1
mov r14b, 1
jmp short loc_3ED8D
loc_3ED8A:
xor r14d, r14d
loc_3ED8D:
mov rdi, rbx
call ma_net_safe_read
mov r15, rax
mov r12d, 1
mov eax, 0FFFFFFFFh
cmp r15, rax
jnz short loc_3EDBA
loc_3EDA8:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3EDBA:
mov rdi, rbx
call free_old_query
movzx r13d, r14b
mov r12d, 0FFFFFFFFh
loc_3EDCC:
mov rsi, [rbx+20h]
movzx r14d, byte ptr [rsi]
cmp r14, 0FAh
jbe short loc_3EE3B
cmp r14, 0FBh
jnz short loc_3EE13
inc rsi
mov rdi, rbx
mov edx, r13d
call mysql_handle_local_infile
mov r14d, eax
mov rdi, rbx
call ma_net_safe_read
mov r15, rax
mov eax, 0FFFFFFFFh
cmp r15, rax
jz short loc_3EDA8
test r14b, r14b
jz short loc_3EDCC
jmp short loc_3EDA8
loc_3EE13:
cmp r14d, 0FCh
jz short loc_3EE41
cmp r14d, 0FDh
jnz short loc_3EE4C
lea rax, [rsi+4]
movzx ecx, word ptr [rsi+1]
movzx r14d, byte ptr [rsi+3]
shl r14d, 10h
or r14, rcx
jmp short loc_3EE54
loc_3EE3B:
lea rax, [rsi+1]
jmp short loc_3EE54
loc_3EE41:
lea rax, [rsi+3]
movzx r14d, word ptr [rsi+1]
jmp short loc_3EE54
loc_3EE4C:
lea rax, [rsi+9]
mov r14d, [rsi+1]
loc_3EE54:
test r14, r14
jz short loc_3EED6
mov rcx, [rbx+4F0h]
xor edx, edx
test byte ptr [rcx+70h], 10h
jz short loc_3EE76
add rsi, r15
cmp rax, rsi
jnb short loc_3EE76
cmp byte ptr [rax], 0
setz dl
loc_3EE76:
mov eax, [rbx+380h]
test al, 2
jnz short loc_3EE89
or eax, 1
mov [rbx+380h], eax
loc_3EE89:
test dl, dl
jz short loc_3EEF2
mov rdi, rbx
call ma_net_safe_read
mov r12d, 0FFFFFFFFh
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jz loc_3EDA8
cmp rax, 5
jnz loc_3EDA8
mov rax, [rbx+20h]
cmp byte ptr [rax], 0FEh
jnz loc_3EDA8
movzx ecx, word ptr [rax+1]
mov [rbx+388h], ecx
movzx eax, word ptr [rax+3]
mov [rbx+380h], eax
jmp short loc_3EF4E
loc_3EED6:
mov rdi, rbx
mov rsi, rax
mov rdx, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp ma_read_ok_packet
loc_3EEF2:
mov rax, [rbx+4D0h]
mov rcx, [rcx+70h]
and ecx, 8
cmp rcx, 1
mov edx, 9
sbb edx, 0
mov rdi, rbx
xor esi, esi
call qword ptr [rax+28h]
mov r12d, 0FFFFFFFFh
test rax, rax
jz loc_3EDA8
lea rdx, [rbx+300h]
mov rdi, rbx
mov rsi, rax
mov ecx, r14d
mov r8d, 1
call unpack_fields
mov [rbx+2F8h], rax
test rax, rax
jz loc_3EDA8
loc_3EF4E:
mov dword ptr [rbx+488h], 1
mov [rbx+37Ch], r14d
xor r12d, r12d
jmp loc_3EDA8
|
long long mthd_my_read_query_result(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned long long a5,
int a6)
{
long long v6; // rax
bool v7; // r14
unsigned long long v8; // r15
unsigned int v9; // r12d
unsigned long long v11; // r8
int v12; // r9d
BOOL v13; // r13d
unsigned __int8 *v14; // rsi
unsigned long long v15; // r14
long long v16; // rsi
char v17; // r14
long long v18; // rdx
long long v19; // rcx
unsigned long long v20; // r8
int v21; // r9d
unsigned __int8 *v22; // rax
long long v23; // rcx
long long v24; // rdx
int v25; // eax
long long v26; // rax
_QWORD *v27; // rax
long long v28; // rax
if ( *(_QWORD *)(a1 + 1152) )
{
v6 = *(_QWORD *)(a1 + 1264);
LOBYTE(a4) = *(_BYTE *)(v6 + 120);
v7 = (_BYTE)a4 != 1;
if ( (_BYTE)a4 == 2 )
{
*(_BYTE *)(v6 + 120) = 1;
v7 = 1;
}
}
else
{
v7 = 0;
}
v8 = ma_net_safe_read(a1, a2, a3, a4, a5, a6);
v9 = 1;
if ( v8 == 0xFFFFFFFF )
return v9;
free_old_query(a1);
v13 = v7;
v9 = -1;
while ( 1 )
{
v14 = *(unsigned __int8 **)(a1 + 32);
v15 = *v14;
if ( v15 <= 0xFA )
{
v22 = v14 + 1;
goto LABEL_19;
}
if ( v15 != 251 )
break;
v16 = (long long)(v14 + 1);
v17 = mysql_handle_local_infile(a1, v16, v13);
v8 = ma_net_safe_read(a1, v16, v18, v19, v20, v21);
if ( v8 == 0xFFFFFFFF || v17 )
return v9;
}
if ( (_DWORD)v15 == 252 )
{
v22 = v14 + 3;
v15 = *(unsigned __int16 *)(v14 + 1);
}
else if ( (_DWORD)v15 == 253 )
{
v22 = v14 + 4;
v15 = *(unsigned __int16 *)(v14 + 1) | (unsigned long long)(v14[3] << 16);
}
else
{
v22 = v14 + 9;
v15 = *(unsigned int *)(v14 + 1);
}
LABEL_19:
if ( v15 )
{
v23 = *(_QWORD *)(a1 + 1264);
v24 = 0LL;
if ( (*(_BYTE *)(v23 + 112) & 0x10) != 0 )
{
v14 += v8;
if ( v22 < v14 )
LOBYTE(v24) = *v22 == 0;
}
v25 = *(_DWORD *)(a1 + 896);
if ( (v25 & 2) == 0 )
*(_DWORD *)(a1 + 896) = v25 | 1;
if ( (_BYTE)v24 )
{
v9 = -1;
if ( ma_net_safe_read(a1, (long long)v14, v24, v23, v11, v12) != 5 )
return v9;
v26 = *(_QWORD *)(a1 + 32);
if ( *(_BYTE *)v26 != 0xFE )
return v9;
*(_DWORD *)(a1 + 904) = *(unsigned __int16 *)(v26 + 1);
*(_DWORD *)(a1 + 896) = *(unsigned __int16 *)(v26 + 3);
}
else
{
v27 = (_QWORD *)(*(long long ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(a1 + 1232) + 40LL))(
a1,
0LL,
9 - (unsigned int)((*(_QWORD *)(v23 + 112) & 8LL) == 0));
v9 = -1;
if ( !v27 )
return v9;
v28 = unpack_fields(a1, v27, a1 + 768, v15, 1);
*(_QWORD *)(a1 + 760) = v28;
if ( !v28 )
return v9;
}
*(_DWORD *)(a1 + 1160) = 1;
*(_DWORD *)(a1 + 892) = v15;
return 0;
}
return ma_read_ok_packet(a1, v22, v8);
}
|
mthd_my_read_query_result:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP qword ptr [RDI + 0x480],0x0
JZ 0x0013ed8a
MOV RAX,qword ptr [RBX + 0x4f0]
MOV CL,byte ptr [RAX + 0x78]
CMP CL,0x1
SETNZ R14B
CMP CL,0x2
JNZ 0x0013ed8d
MOV byte ptr [RAX + 0x78],0x1
MOV R14B,0x1
JMP 0x0013ed8d
LAB_0013ed8a:
XOR R14D,R14D
LAB_0013ed8d:
MOV RDI,RBX
CALL 0x00139123
MOV R15,RAX
MOV R12D,0x1
MOV EAX,0xffffffff
CMP R15,RAX
JNZ 0x0013edba
LAB_0013eda8:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013edba:
MOV RDI,RBX
CALL 0x0013e07a
MOVZX R13D,R14B
MOV R12D,0xffffffff
LAB_0013edcc:
MOV RSI,qword ptr [RBX + 0x20]
MOVZX R14D,byte ptr [RSI]
CMP R14,0xfa
JBE 0x0013ee3b
CMP R14,0xfb
JNZ 0x0013ee13
INC RSI
MOV RDI,RBX
MOV EDX,R13D
CALL 0x0014676f
MOV R14D,EAX
MOV RDI,RBX
CALL 0x00139123
MOV R15,RAX
MOV EAX,0xffffffff
CMP R15,RAX
JZ 0x0013eda8
TEST R14B,R14B
JZ 0x0013edcc
JMP 0x0013eda8
LAB_0013ee13:
CMP R14D,0xfc
JZ 0x0013ee41
CMP R14D,0xfd
JNZ 0x0013ee4c
LEA RAX,[RSI + 0x4]
MOVZX ECX,word ptr [RSI + 0x1]
MOVZX R14D,byte ptr [RSI + 0x3]
SHL R14D,0x10
OR R14,RCX
JMP 0x0013ee54
LAB_0013ee3b:
LEA RAX,[RSI + 0x1]
JMP 0x0013ee54
LAB_0013ee41:
LEA RAX,[RSI + 0x3]
MOVZX R14D,word ptr [RSI + 0x1]
JMP 0x0013ee54
LAB_0013ee4c:
LEA RAX,[RSI + 0x9]
MOV R14D,dword ptr [RSI + 0x1]
LAB_0013ee54:
TEST R14,R14
JZ 0x0013eed6
MOV RCX,qword ptr [RBX + 0x4f0]
XOR EDX,EDX
TEST byte ptr [RCX + 0x70],0x10
JZ 0x0013ee76
ADD RSI,R15
CMP RAX,RSI
JNC 0x0013ee76
CMP byte ptr [RAX],0x0
SETZ DL
LAB_0013ee76:
MOV EAX,dword ptr [RBX + 0x380]
TEST AL,0x2
JNZ 0x0013ee89
OR EAX,0x1
MOV dword ptr [RBX + 0x380],EAX
LAB_0013ee89:
TEST DL,DL
JZ 0x0013eef2
MOV RDI,RBX
CALL 0x00139123
MOV R12D,0xffffffff
MOV ECX,0xffffffff
CMP RAX,RCX
JZ 0x0013eda8
CMP RAX,0x5
JNZ 0x0013eda8
MOV RAX,qword ptr [RBX + 0x20]
CMP byte ptr [RAX],0xfe
JNZ 0x0013eda8
MOVZX ECX,word ptr [RAX + 0x1]
MOV dword ptr [RBX + 0x388],ECX
MOVZX EAX,word ptr [RAX + 0x3]
MOV dword ptr [RBX + 0x380],EAX
JMP 0x0013ef4e
LAB_0013eed6:
MOV RDI,RBX
MOV RSI,RAX
MOV RDX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0013e40a
LAB_0013eef2:
MOV RAX,qword ptr [RBX + 0x4d0]
MOV RCX,qword ptr [RCX + 0x70]
AND ECX,0x8
CMP RCX,0x1
MOV EDX,0x9
SBB EDX,0x0
MOV RDI,RBX
XOR ESI,ESI
CALL qword ptr [RAX + 0x28]
MOV R12D,0xffffffff
TEST RAX,RAX
JZ 0x0013eda8
LEA RDX,[RBX + 0x300]
MOV RDI,RBX
MOV RSI,RAX
MOV ECX,R14D
MOV R8D,0x1
CALL 0x0013b64c
MOV qword ptr [RBX + 0x2f8],RAX
TEST RAX,RAX
JZ 0x0013eda8
LAB_0013ef4e:
MOV dword ptr [RBX + 0x488],0x1
MOV dword ptr [RBX + 0x37c],R14D
XOR R12D,R12D
JMP 0x0013eda8
|
int8 mthd_my_read_query_result(long param_1)
{
byte bVar1;
byte *pbVar2;
char *pcVar3;
char cVar4;
long lVar5;
byte *pbVar6;
int8 uVar7;
uint uVar8;
bool bVar9;
if (*(long *)(param_1 + 0x480) == 0) {
bVar9 = false;
}
else {
cVar4 = *(char *)(*(long *)(param_1 + 0x4f0) + 0x78);
bVar9 = cVar4 != '\x01';
if (cVar4 == '\x02') {
*(int1 *)(*(long *)(param_1 + 0x4f0) + 0x78) = 1;
bVar9 = true;
}
}
lVar5 = ma_net_safe_read(param_1);
if (lVar5 == 0xffffffff) {
return 1;
}
free_old_query(param_1);
do {
pbVar2 = *(byte **)(param_1 + 0x20);
bVar1 = *pbVar2;
uVar8 = (uint)bVar1;
if (uVar8 < 0xfb) {
pbVar6 = pbVar2 + 1;
LAB_0013ee54:
if (uVar8 == 0) {
uVar7 = ma_read_ok_packet(param_1,pbVar6,lVar5);
return uVar7;
}
bVar9 = false;
if (((*(byte *)(*(long *)(param_1 + 0x4f0) + 0x70) & 0x10) != 0) && (pbVar6 < pbVar2 + lVar5))
{
bVar9 = *pbVar6 == 0;
}
if ((*(uint *)(param_1 + 0x380) & 2) == 0) {
*(uint *)(param_1 + 0x380) = *(uint *)(param_1 + 0x380) | 1;
}
if (bVar9) {
lVar5 = ma_net_safe_read(param_1);
if (lVar5 == 0xffffffff) {
return 0xffffffff;
}
if (lVar5 != 5) {
return 0xffffffff;
}
pcVar3 = *(char **)(param_1 + 0x20);
if (*pcVar3 != -2) {
return 0xffffffff;
}
*(uint *)(param_1 + 0x388) = (uint)*(ushort *)(pcVar3 + 1);
*(uint *)(param_1 + 0x380) = (uint)*(ushort *)(pcVar3 + 3);
}
else {
lVar5 = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x28))
(param_1,0,
9 - (uint)((*(ulong *)(*(long *)(param_1 + 0x4f0) + 0x70) & 8) == 0));
if (lVar5 == 0) {
return 0xffffffff;
}
lVar5 = unpack_fields(param_1,lVar5,param_1 + 0x300,uVar8,1);
*(long *)(param_1 + 0x2f8) = lVar5;
if (lVar5 == 0) {
return 0xffffffff;
}
}
*(int4 *)(param_1 + 0x488) = 1;
*(uint *)(param_1 + 0x37c) = uVar8;
return 0;
}
if (uVar8 != 0xfb) {
if (bVar1 == 0xfc) {
pbVar6 = pbVar2 + 3;
uVar8 = (uint)*(ushort *)(pbVar2 + 1);
}
else if (bVar1 == 0xfd) {
pbVar6 = pbVar2 + 4;
uVar8 = (uint)*(uint3 *)(pbVar2 + 1);
}
else {
pbVar6 = pbVar2 + 9;
uVar8 = *(uint *)(pbVar2 + 1);
}
goto LAB_0013ee54;
}
cVar4 = mysql_handle_local_infile(param_1,pbVar2 + 1,bVar9);
lVar5 = ma_net_safe_read(param_1);
if (lVar5 == 0xffffffff) {
return 0xffffffff;
}
if (cVar4 != '\0') {
return 0xffffffff;
}
} while( true );
}
|
|
16,772
|
google::protobuf::DescriptorBuilder::ValidateProto3(google::protobuf::FileDescriptor*, google::protobuf::FileDescriptorProto const&)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
void DescriptorBuilder::ValidateProto3(FileDescriptor* file,
const FileDescriptorProto& proto) {
for (int i = 0; i < file->extension_count(); ++i) {
ValidateProto3Field(file->extensions_ + i, proto.extension(i));
}
for (int i = 0; i < file->message_type_count(); ++i) {
ValidateProto3Message(file->message_types_ + i, proto.message_type(i));
}
for (int i = 0; i < file->enum_type_count(); ++i) {
ValidateProto3Enum(file->enum_types_ + i, proto.enum_type(i));
}
}
|
O3
|
cpp
|
google::protobuf::DescriptorBuilder::ValidateProto3(google::protobuf::FileDescriptor*, google::protobuf::FileDescriptorProto const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x0, 0x4(%rsi)
jle 0x3635b
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x70(%r14), %rsi
addq %r12, %rsi
movq 0x88(%rbx), %rax
movq 0x8(%rax,%r13,8), %rdx
movq %r15, %rdi
callq 0x363d2
incq %r13
movslq 0x4(%r14), %rax
addq $0x48, %r12
cmpq %rax, %r13
jl 0x36330
cmpl $0x0, 0x34(%r14)
jle 0x36393
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x58(%r14), %rsi
addq %r12, %rsi
movq 0x40(%rbx), %rax
movq 0x8(%rax,%r13,8), %rdx
movq %r15, %rdi
callq 0x367ae
incq %r13
movslq 0x34(%r14), %rax
addq $0x88, %r12
cmpq %rax, %r13
jl 0x36368
cmpl $0x0, 0x38(%r14)
jle 0x363c8
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x60(%r14), %rsi
addq %r12, %rsi
movq 0x58(%rbx), %rax
movq 0x8(%rax,%r13,8), %rdx
movq %r15, %rdi
callq 0x36d22
incq %r13
movslq 0x38(%r14), %rax
addq $0x48, %r12
cmpq %rax, %r13
jl 0x363a0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
_ZN6google8protobuf17DescriptorBuilder14ValidateProto3EPNS0_14FileDescriptorERKNS0_19FileDescriptorProtoE:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
cmp dword ptr [rsi+4], 0
jle short loc_3635B
xor r12d, r12d
xor r13d, r13d
loc_36330:
mov rsi, [r14+70h]
add rsi, r12; google::protobuf::FieldDescriptor *
mov rax, [rbx+88h]
mov rdx, [rax+r13*8+8]; google::protobuf::FieldDescriptorProto *
mov rdi, r15; this
call _ZN6google8protobuf17DescriptorBuilder19ValidateProto3FieldEPNS0_15FieldDescriptorERKNS0_20FieldDescriptorProtoE; google::protobuf::DescriptorBuilder::ValidateProto3Field(google::protobuf::FieldDescriptor *,google::protobuf::FieldDescriptorProto const&)
inc r13
movsxd rax, dword ptr [r14+4]
add r12, 48h ; 'H'
cmp r13, rax
jl short loc_36330
loc_3635B:
cmp dword ptr [r14+34h], 0
jle short loc_36393
xor r12d, r12d
xor r13d, r13d
loc_36368:
mov rsi, [r14+58h]
add rsi, r12; google::protobuf::Descriptor *
mov rax, [rbx+40h]
mov rdx, [rax+r13*8+8]; google::protobuf::DescriptorProto *
mov rdi, r15; this
call _ZN6google8protobuf17DescriptorBuilder21ValidateProto3MessageEPNS0_10DescriptorERKNS0_15DescriptorProtoE; google::protobuf::DescriptorBuilder::ValidateProto3Message(google::protobuf::Descriptor *,google::protobuf::DescriptorProto const&)
inc r13
movsxd rax, dword ptr [r14+34h]
add r12, 88h
cmp r13, rax
jl short loc_36368
loc_36393:
cmp dword ptr [r14+38h], 0
jle short loc_363C8
xor r12d, r12d
xor r13d, r13d
loc_363A0:
mov rsi, [r14+60h]
add rsi, r12; google::protobuf::EnumDescriptor *
mov rax, [rbx+58h]
mov rdx, [rax+r13*8+8]; google::protobuf::EnumDescriptorProto *
mov rdi, r15; this
call _ZN6google8protobuf17DescriptorBuilder18ValidateProto3EnumEPNS0_14EnumDescriptorERKNS0_19EnumDescriptorProtoE; google::protobuf::DescriptorBuilder::ValidateProto3Enum(google::protobuf::EnumDescriptor *,google::protobuf::EnumDescriptorProto const&)
inc r13
movsxd rax, dword ptr [r14+38h]
add r12, 48h ; 'H'
cmp r13, rax
jl short loc_363A0
loc_363C8:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
long long google::protobuf::DescriptorBuilder::ValidateProto3(
google::protobuf::DescriptorBuilder *this,
google::protobuf::FileDescriptor *a2,
const google::protobuf::FileDescriptorProto *a3)
{
long long v4; // r12
long long v5; // r13
long long result; // rax
long long v7; // r12
long long v8; // r13
long long v9; // r12
long long v10; // r13
if ( *((int *)a2 + 1) > 0 )
{
v4 = 0LL;
v5 = 0LL;
do
{
google::protobuf::DescriptorBuilder::ValidateProto3Field(
this,
(google::protobuf::FieldDescriptor *)(v4 + *((_QWORD *)a2 + 14)),
*(const google::protobuf::FieldDescriptorProto **)(*((_QWORD *)a3 + 17) + 8 * v5++ + 8));
result = *((int *)a2 + 1);
v4 += 72LL;
}
while ( v5 < result );
}
if ( *((int *)a2 + 13) > 0 )
{
v7 = 0LL;
v8 = 0LL;
do
{
google::protobuf::DescriptorBuilder::ValidateProto3Message(
this,
(google::protobuf::Descriptor *)(v7 + *((_QWORD *)a2 + 11)),
*(const google::protobuf::DescriptorProto **)(*((_QWORD *)a3 + 8) + 8 * v8++ + 8));
result = *((int *)a2 + 13);
v7 += 136LL;
}
while ( v8 < result );
}
if ( *((int *)a2 + 14) > 0 )
{
v9 = 0LL;
v10 = 0LL;
do
{
google::protobuf::DescriptorBuilder::ValidateProto3Enum(
this,
(google::protobuf::EnumDescriptor *)(v9 + *((_QWORD *)a2 + 12)),
*(const google::protobuf::EnumDescriptorProto **)(*((_QWORD *)a3 + 11) + 8 * v10++ + 8));
result = *((int *)a2 + 14);
v9 += 72LL;
}
while ( v10 < result );
}
return result;
}
|
ValidateProto3:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CMP dword ptr [RSI + 0x4],0x0
JLE 0x0013635b
XOR R12D,R12D
XOR R13D,R13D
LAB_00136330:
MOV RSI,qword ptr [R14 + 0x70]
ADD RSI,R12
MOV RAX,qword ptr [RBX + 0x88]
MOV RDX,qword ptr [RAX + R13*0x8 + 0x8]
MOV RDI,R15
CALL 0x001363d2
INC R13
MOVSXD RAX,dword ptr [R14 + 0x4]
ADD R12,0x48
CMP R13,RAX
JL 0x00136330
LAB_0013635b:
CMP dword ptr [R14 + 0x34],0x0
JLE 0x00136393
XOR R12D,R12D
XOR R13D,R13D
LAB_00136368:
MOV RSI,qword ptr [R14 + 0x58]
ADD RSI,R12
MOV RAX,qword ptr [RBX + 0x40]
MOV RDX,qword ptr [RAX + R13*0x8 + 0x8]
MOV RDI,R15
CALL 0x001367ae
INC R13
MOVSXD RAX,dword ptr [R14 + 0x34]
ADD R12,0x88
CMP R13,RAX
JL 0x00136368
LAB_00136393:
CMP dword ptr [R14 + 0x38],0x0
JLE 0x001363c8
XOR R12D,R12D
XOR R13D,R13D
LAB_001363a0:
MOV RSI,qword ptr [R14 + 0x60]
ADD RSI,R12
MOV RAX,qword ptr [RBX + 0x58]
MOV RDX,qword ptr [RAX + R13*0x8 + 0x8]
MOV RDI,R15
CALL 0x00136d22
INC R13
MOVSXD RAX,dword ptr [R14 + 0x38]
ADD R12,0x48
CMP R13,RAX
JL 0x001363a0
LAB_001363c8:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* google::protobuf::DescriptorBuilder::ValidateProto3(google::protobuf::FileDescriptor*,
google::protobuf::FileDescriptorProto const&) */
void __thiscall
google::protobuf::DescriptorBuilder::ValidateProto3
(DescriptorBuilder *this,FileDescriptor *param_1,FileDescriptorProto *param_2)
{
long lVar1;
long lVar2;
if (0 < *(int *)(param_1 + 4)) {
lVar1 = 0;
lVar2 = 0;
do {
ValidateProto3Field(this,(FieldDescriptor *)(*(long *)(param_1 + 0x70) + lVar1),
*(FieldDescriptorProto **)(*(long *)(param_2 + 0x88) + 8 + lVar2 * 8));
lVar2 = lVar2 + 1;
lVar1 = lVar1 + 0x48;
} while (lVar2 < *(int *)(param_1 + 4));
}
if (0 < *(int *)(param_1 + 0x34)) {
lVar1 = 0;
lVar2 = 0;
do {
ValidateProto3Message
(this,(Descriptor *)(*(long *)(param_1 + 0x58) + lVar1),
*(DescriptorProto **)(*(long *)(param_2 + 0x40) + 8 + lVar2 * 8));
lVar2 = lVar2 + 1;
lVar1 = lVar1 + 0x88;
} while (lVar2 < *(int *)(param_1 + 0x34));
}
if (0 < *(int *)(param_1 + 0x38)) {
lVar1 = 0;
lVar2 = 0;
do {
ValidateProto3Enum(this,(EnumDescriptor *)(*(long *)(param_1 + 0x60) + lVar1),
*(EnumDescriptorProto **)(*(long *)(param_2 + 0x58) + 8 + lVar2 * 8));
lVar2 = lVar2 + 1;
lVar1 = lVar1 + 0x48;
} while (lVar2 < *(int *)(param_1 + 0x38));
}
return;
}
|
|
16,773
|
mi_ft_parse
|
eloqsql/storage/myisam/ft_update.c
|
uint _mi_ft_parse(TREE *parsed, MI_INFO *info, uint keynr, const uchar *record,
MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root)
{
FT_SEG_ITERATOR ftsi;
struct st_mysql_ftparser *parser;
DBUG_ENTER("_mi_ft_parse");
_mi_ft_segiterator_init(info, keynr, record, &ftsi);
ft_parse_init(parsed, info->s->keyinfo[keynr].seg->charset);
parser= info->s->keyinfo[keynr].parser;
while (_mi_ft_segiterator(&ftsi))
{
if (ftsi.pos)
if (ft_parse(parsed, (uchar *)ftsi.pos, ftsi.len, parser, param, mem_root))
DBUG_RETURN(1);
}
DBUG_RETURN(0);
}
|
O3
|
c
|
mi_ft_parse:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rsi, -0x30(%rbp)
movq %rdi, %r15
movq (%rsi), %rax
movq 0x218(%rax), %rax
movl %edx, %edx
imulq $0x70, %rdx, %r13
movzwl 0x8(%rax,%r13), %edx
leaq -0x50(%rbp), %r12
movl %edx, (%r12)
movq 0x28(%rax,%r13), %rax
movq %rax, 0x8(%r12)
movq %rcx, 0x10(%r12)
movq $0x0, 0x18(%r12)
movl $0x0, 0x4(%r12)
movq (%rax), %rsi
callq 0x73bf6
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movq 0x38(%rax,%r13), %r13
movq %r12, %rdi
callq 0x73fca
xorl %ecx, %ecx
testl %eax, %eax
je 0x7413e
movq -0x38(%rbp), %rsi
testq %rsi, %rsi
je 0x74129
movl -0x4c(%rbp), %edx
movq %r15, %rdi
movq %r13, %rcx
movq %r14, %r8
movq %rbx, %r9
callq 0x73c46
testl %eax, %eax
jne 0x74139
movq %r12, %rdi
callq 0x73fca
testl %eax, %eax
jne 0x74108
xorl %ecx, %ecx
jmp 0x7413e
movl $0x1, %ecx
movl %ecx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_mi_ft_parse:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, r9
mov r14, r8
mov [rbp+var_30], rsi
mov r15, rdi
mov rax, [rsi]
mov rax, [rax+218h]
mov edx, edx
imul r13, rdx, 70h ; 'p'
movzx edx, word ptr [rax+r13+8]
lea r12, [rbp+var_50]
mov [r12], edx
mov rax, [rax+r13+28h]
mov [r12+8], rax
mov [r12+10h], rcx
mov qword ptr [r12+18h], 0
mov dword ptr [r12+4], 0
mov rsi, [rax]
call ft_parse_init
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax+218h]
mov r13, [rax+r13+38h]
mov rdi, r12
call _mi_ft_segiterator
xor ecx, ecx
test eax, eax
jz short loc_7413E
loc_74108:
mov rsi, [rbp+var_38]
test rsi, rsi
jz short loc_74129
mov edx, [rbp+var_4C]
mov rdi, r15
mov rcx, r13
mov r8, r14
mov r9, rbx
call ft_parse
test eax, eax
jnz short loc_74139
loc_74129:
mov rdi, r12
call _mi_ft_segiterator
test eax, eax
jnz short loc_74108
xor ecx, ecx
jmp short loc_7413E
loc_74139:
mov ecx, 1
loc_7413E:
mov eax, ecx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long mi_ft_parse(_QWORD *a1, long long a2, unsigned int a3, long long a4, long long a5, long long a6)
{
long long v8; // rax
long long v9; // r13
long long v10; // r13
int v11; // eax
unsigned int v12; // ecx
int v14; // [rsp+0h] [rbp-50h] BYREF
int v15; // [rsp+4h] [rbp-4Ch]
long long *v16; // [rsp+8h] [rbp-48h]
long long v17; // [rsp+10h] [rbp-40h]
long long v18; // [rsp+18h] [rbp-38h]
long long v19; // [rsp+20h] [rbp-30h]
v19 = a2;
v8 = *(_QWORD *)(*(_QWORD *)a2 + 536LL);
v9 = 112LL * a3;
v14 = *(unsigned __int16 *)(v8 + v9 + 8);
v16 = *(long long **)(v8 + v9 + 40);
v17 = a4;
v18 = 0LL;
v15 = 0;
ft_parse_init(a1, *v16);
v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a2 + 536LL) + v9 + 56);
v11 = mi_ft_segiterator((long long)&v14);
v12 = 0;
if ( v11 )
{
while ( !v18 || !(unsigned int)ft_parse((long long)a1, v18, v15, v10, a5, a6) )
{
if ( !(unsigned int)mi_ft_segiterator((long long)&v14) )
return 0;
}
return 1;
}
return v12;
}
|
_mi_ft_parse:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,R9
MOV R14,R8
MOV qword ptr [RBP + -0x30],RSI
MOV R15,RDI
MOV RAX,qword ptr [RSI]
MOV RAX,qword ptr [RAX + 0x218]
MOV EDX,EDX
IMUL R13,RDX,0x70
MOVZX EDX,word ptr [RAX + R13*0x1 + 0x8]
LEA R12,[RBP + -0x50]
MOV dword ptr [R12],EDX
MOV RAX,qword ptr [RAX + R13*0x1 + 0x28]
MOV qword ptr [R12 + 0x8],RAX
MOV qword ptr [R12 + 0x10],RCX
MOV qword ptr [R12 + 0x18],0x0
MOV dword ptr [R12 + 0x4],0x0
MOV RSI,qword ptr [RAX]
CALL 0x00173bf6
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV R13,qword ptr [RAX + R13*0x1 + 0x38]
MOV RDI,R12
CALL 0x00173fca
XOR ECX,ECX
TEST EAX,EAX
JZ 0x0017413e
LAB_00174108:
MOV RSI,qword ptr [RBP + -0x38]
TEST RSI,RSI
JZ 0x00174129
MOV EDX,dword ptr [RBP + -0x4c]
MOV RDI,R15
MOV RCX,R13
MOV R8,R14
MOV R9,RBX
CALL 0x00173c46
TEST EAX,EAX
JNZ 0x00174139
LAB_00174129:
MOV RDI,R12
CALL 0x00173fca
TEST EAX,EAX
JNZ 0x00174108
XOR ECX,ECX
JMP 0x0017413e
LAB_00174139:
MOV ECX,0x1
LAB_0017413e:
MOV EAX,ECX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_mi_ft_parse(int8 param_1,long *param_2,uint param_3,int8 param_4,int8 param_5,
int8 param_6)
{
int8 uVar1;
int iVar2;
long lVar3;
uint local_58;
int4 local_54;
int8 *local_50;
int8 local_48;
long local_40;
long *local_38;
lVar3 = (ulong)param_3 * 0x70;
local_58 = (uint)*(ushort *)(*(long *)(*param_2 + 0x218) + 8 + lVar3);
local_50 = *(int8 **)(*(long *)(*param_2 + 0x218) + 0x28 + lVar3);
local_40 = 0;
local_54 = 0;
local_48 = param_4;
local_38 = param_2;
ft_parse_init(param_1,*local_50);
uVar1 = *(int8 *)(*(long *)(*local_38 + 0x218) + 0x38 + lVar3);
iVar2 = _mi_ft_segiterator(&local_58);
while( true ) {
if (iVar2 == 0) {
return 0;
}
if ((local_40 != 0) &&
(iVar2 = ft_parse(param_1,local_40,local_54,uVar1,param_5,param_6), iVar2 != 0)) break;
iVar2 = _mi_ft_segiterator(&local_58);
}
return 1;
}
|
|
16,774
|
stbi__info_main(stbi__context*, int*, int*, int*)
|
SDL3Lite/dependencies/stb_image.h
|
static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp)
{
#ifndef STBI_NO_JPEG
if (stbi__jpeg_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_PNG
if (stbi__png_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_GIF
if (stbi__gif_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_BMP
if (stbi__bmp_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_PSD
if (stbi__psd_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_PIC
if (stbi__pic_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_PNM
if (stbi__pnm_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_HDR
if (stbi__hdr_info(s, x, y, comp)) return 1;
#endif
// test tga last because it's a crappy test!
#ifndef STBI_NO_TGA
if (stbi__tga_info(s, x, y, comp))
return 1;
#endif
return stbi__err("unknown image type", "Image not of any known type, or corrupt");
}
|
O0
|
c
|
stbi__info_main(stbi__context*, int*, int*, int*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x32e10
cmpl $0x0, %eax
je 0x2ff7b
movl $0x1, -0x4(%rbp)
jmp 0x2ff8a
leaq 0xb78a(%rip), %rdi # 0x3b70c
callq 0x2f390
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZL15stbi__info_mainP13stbi__contextPiS1_S1_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
call _ZL14stbi__bmp_infoP13stbi__contextPiS1_S1_; stbi__bmp_info(stbi__context *,int *,int *,int *)
cmp eax, 0
jz short loc_2FF7B
mov [rbp+var_4], 1
jmp short loc_2FF8A
loc_2FF7B:
lea rdi, aUnknownImageTy; "unknown image type"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov [rbp+var_4], eax
loc_2FF8A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long stbi__info_main(long long a1, long long a2, long long a3, long long a4)
{
if ( (unsigned int)stbi__bmp_info(a1, a2, a3, a4) )
return 1;
else
return (unsigned int)stbi__err("unknown image type");
}
|
stbi__info_main:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
CALL 0x00132e10
CMP EAX,0x0
JZ 0x0012ff7b
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0012ff8a
LAB_0012ff7b:
LEA RDI,[0x13b70c]
CALL 0x0012f390
MOV dword ptr [RBP + -0x4],EAX
LAB_0012ff8a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
/* stbi__info_main(stbi__context*, int*, int*, int*) */
int4 stbi__info_main(stbi__context *param_1,int *param_2,int *param_3,int *param_4)
{
int iVar1;
int4 local_c;
iVar1 = stbi__bmp_info(param_1,param_2,param_3,param_4);
if (iVar1 == 0) {
local_c = stbi__err("unknown image type");
}
else {
local_c = 1;
}
return local_c;
}
|
|
16,775
|
stbi__info_main(stbi__context*, int*, int*, int*)
|
SDL3Lite/dependencies/stb_image.h
|
static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp)
{
#ifndef STBI_NO_JPEG
if (stbi__jpeg_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_PNG
if (stbi__png_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_GIF
if (stbi__gif_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_BMP
if (stbi__bmp_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_PSD
if (stbi__psd_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_PIC
if (stbi__pic_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_PNM
if (stbi__pnm_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_HDR
if (stbi__hdr_info(s, x, y, comp)) return 1;
#endif
// test tga last because it's a crappy test!
#ifndef STBI_NO_TGA
if (stbi__tga_info(s, x, y, comp))
return 1;
#endif
return stbi__err("unknown image type", "Image not of any known type, or corrupt");
}
|
O3
|
c
|
stbi__info_main(stbi__context*, int*, int*, int*):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rcx, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq (%rsp), %rcx
callq 0x336b0
cmpl $0x0, %eax
je 0x303be
movl $0x1, 0x24(%rsp)
jmp 0x303ce
leaq 0xb347(%rip), %rdi # 0x3b70c
callq 0x2f5a0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
|
_ZL15stbi__info_mainP13stbi__contextPiS1_S1_:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov [rsp+28h+var_20], rdx
mov [rsp+28h+var_28], rcx
mov rdi, [rsp+28h+var_10]
mov rsi, [rsp+28h+var_18]
mov rdx, [rsp+28h+var_20]
mov rcx, [rsp+28h+var_28]
call _ZL14stbi__bmp_infoP13stbi__contextPiS1_S1_; stbi__bmp_info(stbi__context *,int *,int *,int *)
cmp eax, 0
jz short loc_303BE
mov [rsp+28h+var_4], 1
jmp short loc_303CE
loc_303BE:
lea rdi, aUnknownImageTy; "unknown image type"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov [rsp+28h+var_4], eax
loc_303CE:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long stbi__info_main(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
if ( (unsigned int)stbi__bmp_info(a1, a2, a3, a4, a5, a6, a4, a3, a2, a1) )
return 1;
else
return (unsigned int)stbi__err("unknown image type");
}
|
stbi__info_main:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP],RCX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP]
CALL 0x001336b0
CMP EAX,0x0
JZ 0x001303be
MOV dword ptr [RSP + 0x24],0x1
JMP 0x001303ce
LAB_001303be:
LEA RDI,[0x13b70c]
CALL 0x0012f5a0
MOV dword ptr [RSP + 0x24],EAX
LAB_001303ce:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
/* stbi__info_main(stbi__context*, int*, int*, int*) */
int4 stbi__info_main(stbi__context *param_1,int *param_2,int *param_3,int *param_4)
{
int iVar1;
int4 local_4;
iVar1 = stbi__bmp_info(param_1,param_2,param_3,param_4);
if (iVar1 == 0) {
local_4 = stbi__err("unknown image type");
}
else {
local_4 = 1;
}
return local_4;
}
|
|
16,776
|
LoadSoundFromWave
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
|
Sound LoadSoundFromWave(Wave wave)
{
Sound sound = { 0 };
if (wave.data != NULL)
{
// When using miniaudio we need to do our own mixing
// To simplify this we need convert the format of each sound to be consistent with
// the format used to open the playback AUDIO.System.device. We can do this two ways:
//
// 1) Convert the whole sound in one go at load time (here)
// 2) Convert the audio data in chunks at mixing time
//
// First option has been selected, format conversion is done on the loading stage
// The downside is that it uses more memory if the original sound is u8 or s16
ma_format formatIn = ((wave.sampleSize == 8)? ma_format_u8 : ((wave.sampleSize == 16)? ma_format_s16 : ma_format_f32));
ma_uint32 frameCountIn = wave.frameCount;
ma_uint32 frameCount = (ma_uint32)ma_convert_frames(NULL, 0, AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, NULL, frameCountIn, formatIn, wave.channels, wave.sampleRate);
if (frameCount == 0) TRACELOG(LOG_WARNING, "SOUND: Failed to get frame count for format conversion");
AudioBuffer *audioBuffer = LoadAudioBuffer(AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, frameCount, AUDIO_BUFFER_USAGE_STATIC);
if (audioBuffer == NULL)
{
TRACELOG(LOG_WARNING, "SOUND: Failed to create buffer");
return sound; // early return to avoid dereferencing the audioBuffer null pointer
}
frameCount = (ma_uint32)ma_convert_frames(audioBuffer->data, frameCount, AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, wave.data, frameCountIn, formatIn, wave.channels, wave.sampleRate);
if (frameCount == 0) TRACELOG(LOG_WARNING, "SOUND: Failed format conversion");
sound.frameCount = frameCount;
sound.stream.sampleRate = AUDIO.System.device.sampleRate;
sound.stream.sampleSize = 32;
sound.stream.channels = AUDIO_DEVICE_CHANNELS;
sound.stream.buffer = audioBuffer;
}
return sound;
}
|
O0
|
c
|
LoadSoundFromWave:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x58, %rsp
movq %rdi, -0x38(%rbp)
movq %rdi, %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
xorl %esi, %esi
movl $0x28, %edx
callq 0xa2d0
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x7acd5
movq -0x28(%rbp), %rax
cmpl $0x8, 0x8(%rax)
jne 0x7ab7b
movl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x7ab95
movq -0x28(%rbp), %rax
movl 0x8(%rax), %edx
movl $0x5, %eax
movl $0x2, %ecx
cmpl $0x10, %edx
cmovel %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl %ecx, -0xc(%rbp)
movl (%rax), %ecx
movl %ecx, -0x10(%rbp)
movl 0x19c189(%rip), %r8d # 0x216d34
movl -0x10(%rbp), %ecx
movl %ecx, %ebx
movl -0xc(%rbp), %r11d
movl 0xc(%rax), %r10d
movl 0x4(%rax), %eax
xorl %ecx, %ecx
movl %ecx, %r9d
movl $0x5, %edx
movl $0x2, %ecx
movq %r9, %rdi
movq %r9, %rsi
movq %rbx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x504d0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x7ac03
movl $0x4, %edi
leaq 0x12fa74(%rip), %rsi # 0x1aa670
movb $0x0, %al
callq 0x182c40
movl 0x19c12b(%rip), %edx # 0x216d34
movl -0x14(%rbp), %ecx
movl $0x5, %edi
movl $0x2, %esi
xorl %r8d, %r8d
callq 0x79e50
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7ac41
movl $0x4, %edi
leaq 0x12fa72(%rip), %rsi # 0x1aa6a7
movb $0x0, %al
callq 0x182c40
jmp 0x7acd7
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x170(%rcx), %rdi
movl -0x14(%rbp), %ecx
movl %ecx, %esi
movl 0x19c0d8(%rip), %r8d # 0x216d34
movq 0x10(%rax), %r9
movl -0x10(%rbp), %ecx
movl %ecx, %ebx
movl -0xc(%rbp), %r11d
movl 0xc(%rax), %r10d
movl 0x4(%rax), %eax
movl $0x5, %edx
movl $0x2, %ecx
movq %rbx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x504d0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x7acad
movl $0x4, %edi
leaq 0x12fa20(%rip), %rsi # 0x1aa6c6
movb $0x0, %al
callq 0x182c40
movq -0x38(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x20(%rax)
movl 0x19c077(%rip), %ecx # 0x216d34
movl %ecx, 0x10(%rax)
movl $0x20, 0x14(%rax)
movl $0x2, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x7acd7
movq -0x30(%rbp), %rax
addq $0x58, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
LoadSoundFromWave:
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_38], rdi
mov rax, rdi
mov [rbp+var_30], rax
lea rax, [rbp+arg_0]
mov [rbp+var_28], rax
xor esi, esi
mov edx, 28h ; '('
call _memset
mov rax, [rbp+var_28]
cmp qword ptr [rax+10h], 0
jz loc_7ACD5
mov rax, [rbp+var_28]
cmp dword ptr [rax+8], 8
jnz short loc_7AB7B
mov eax, 1
mov [rbp+var_3C], eax
jmp short loc_7AB95
loc_7AB7B:
mov rax, [rbp+var_28]
mov edx, [rax+8]
mov eax, 5
mov ecx, 2
cmp edx, 10h
cmovz eax, ecx
mov [rbp+var_3C], eax
loc_7AB95:
mov rax, [rbp+var_28]
mov ecx, [rbp+var_3C]
mov [rbp+var_C], ecx
mov ecx, [rax]
mov [rbp+var_10], ecx
mov r8d, cs:dword_216D34
mov ecx, [rbp+var_10]
mov ebx, ecx
mov r11d, [rbp+var_C]
mov r10d, [rax+0Ch]
mov eax, [rax+4]
xor ecx, ecx
mov r9d, ecx
mov edx, 5
mov ecx, 2
mov rdi, r9
mov rsi, r9
mov [rsp+60h+var_60], rbx
mov [rsp+60h+var_58], r11d
mov [rsp+60h+var_50], r10d
mov [rsp+60h+var_48], eax
call ma_convert_frames
mov [rbp+var_14], eax
cmp [rbp+var_14], 0
jnz short loc_7AC03
mov edi, 4
lea rsi, aSoundFailedToG; "SOUND: Failed to get frame count for fo"...
mov al, 0
call TraceLog
loc_7AC03:
mov edx, cs:dword_216D34
mov ecx, [rbp+var_14]
mov edi, 5
mov esi, 2
xor r8d, r8d
call LoadAudioBuffer
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_7AC41
mov edi, 4
lea rsi, aSoundFailedToC; "SOUND: Failed to create buffer"
mov al, 0
call TraceLog
jmp loc_7ACD7
loc_7AC41:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_20]
mov rdi, [rcx+170h]
mov ecx, [rbp+var_14]
mov esi, ecx
mov r8d, cs:dword_216D34
mov r9, [rax+10h]
mov ecx, [rbp+var_10]
mov ebx, ecx
mov r11d, [rbp+var_C]
mov r10d, [rax+0Ch]
mov eax, [rax+4]
mov edx, 5
mov ecx, 2
mov [rsp+60h+var_60], rbx
mov [rsp+60h+var_58], r11d
mov [rsp+60h+var_50], r10d
mov [rsp+60h+var_48], eax
call ma_convert_frames
mov [rbp+var_14], eax
cmp [rbp+var_14], 0
jnz short loc_7ACAD
mov edi, 4
lea rsi, aSoundFailedFor; "SOUND: Failed format conversion"
mov al, 0
call TraceLog
loc_7ACAD:
mov rax, [rbp+var_38]
mov ecx, [rbp+var_14]
mov [rax+20h], ecx
mov ecx, cs:dword_216D34
mov [rax+10h], ecx
mov dword ptr [rax+14h], 20h ; ' '
mov dword ptr [rax+18h], 2
mov rcx, [rbp+var_20]
mov [rax], rcx
loc_7ACD5:
jmp short $+2
loc_7ACD7:
mov rax, [rbp+var_30]
add rsp, 58h
pop rbx
pop rbp
retn
|
long long LoadSoundFromWave(
long long a1,
_DWORD a2,
_DWORD a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
long long a7,
long long a8,
long long a9)
{
int v9; // eax
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
int v14; // edx
int v15; // ecx
int v16; // r8d
int v17; // r9d
int v18; // edx
int v19; // ecx
int v20; // r8d
int v21; // r9d
int v23; // [rsp+24h] [rbp-3Ch]
long long AudioBuffer; // [rsp+40h] [rbp-20h]
unsigned int v25; // [rsp+4Ch] [rbp-14h]
int v26; // [rsp+4Ch] [rbp-14h]
memset(a1, 0LL, 40LL);
if ( a9 )
{
if ( (_DWORD)a8 == 8 )
{
v23 = 1;
}
else
{
v9 = 5;
if ( (_DWORD)a8 == 16 )
v9 = 2;
v23 = v9;
}
v25 = ma_convert_frames(0LL, 0LL, 5, 2, dword_216D34, 0LL, (unsigned int)a7, v23, SHIDWORD(a8), SHIDWORD(a7));
if ( !v25 )
TraceLog(4, (unsigned int)"SOUND: Failed to get frame count for format conversion", v10, v11, v12, v13);
AudioBuffer = LoadAudioBuffer(5u, 2, dword_216D34, v25, 0);
if ( AudioBuffer )
{
v26 = ma_convert_frames(
*(_QWORD *)(AudioBuffer + 368),
v25,
5,
2,
dword_216D34,
a9,
(unsigned int)a7,
v23,
SHIDWORD(a8),
SHIDWORD(a7));
if ( !v26 )
TraceLog(4, (unsigned int)"SOUND: Failed format conversion", v18, v19, v20, v21);
*(_DWORD *)(a1 + 32) = v26;
*(_DWORD *)(a1 + 16) = dword_216D34;
*(_DWORD *)(a1 + 20) = 32;
*(_DWORD *)(a1 + 24) = 2;
*(_QWORD *)a1 = AudioBuffer;
}
else
{
TraceLog(4, (unsigned int)"SOUND: Failed to create buffer", v14, v15, v16, v17);
}
}
return a1;
}
|
LoadSoundFromWave:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RAX
XOR ESI,ESI
MOV EDX,0x28
CALL 0x0010a2d0
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0017acd5
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x8],0x8
JNZ 0x0017ab7b
MOV EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0017ab95
LAB_0017ab7b:
MOV RAX,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RAX + 0x8]
MOV EAX,0x5
MOV ECX,0x2
CMP EDX,0x10
CMOVZ EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
LAB_0017ab95:
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0xc],ECX
MOV ECX,dword ptr [RAX]
MOV dword ptr [RBP + -0x10],ECX
MOV R8D,dword ptr [0x00316d34]
MOV ECX,dword ptr [RBP + -0x10]
MOV EBX,ECX
MOV R11D,dword ptr [RBP + -0xc]
MOV R10D,dword ptr [RAX + 0xc]
MOV EAX,dword ptr [RAX + 0x4]
XOR ECX,ECX
MOV R9D,ECX
MOV EDX,0x5
MOV ECX,0x2
MOV RDI,R9
MOV RSI,R9
MOV qword ptr [RSP],RBX
MOV dword ptr [RSP + 0x8],R11D
MOV dword ptr [RSP + 0x10],R10D
MOV dword ptr [RSP + 0x18],EAX
CALL 0x001504d0
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x0017ac03
MOV EDI,0x4
LEA RSI,[0x2aa670]
MOV AL,0x0
CALL 0x00282c40
LAB_0017ac03:
MOV EDX,dword ptr [0x00316d34]
MOV ECX,dword ptr [RBP + -0x14]
MOV EDI,0x5
MOV ESI,0x2
XOR R8D,R8D
CALL 0x00179e50
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x0017ac41
MOV EDI,0x4
LEA RSI,[0x2aa6a7]
MOV AL,0x0
CALL 0x00282c40
JMP 0x0017acd7
LAB_0017ac41:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RCX + 0x170]
MOV ECX,dword ptr [RBP + -0x14]
MOV ESI,ECX
MOV R8D,dword ptr [0x00316d34]
MOV R9,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [RBP + -0x10]
MOV EBX,ECX
MOV R11D,dword ptr [RBP + -0xc]
MOV R10D,dword ptr [RAX + 0xc]
MOV EAX,dword ptr [RAX + 0x4]
MOV EDX,0x5
MOV ECX,0x2
MOV qword ptr [RSP],RBX
MOV dword ptr [RSP + 0x8],R11D
MOV dword ptr [RSP + 0x10],R10D
MOV dword ptr [RSP + 0x18],EAX
CALL 0x001504d0
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x0017acad
MOV EDI,0x4
LEA RSI,[0x2aa6c6]
MOV AL,0x0
CALL 0x00282c40
LAB_0017acad:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x14]
MOV dword ptr [RAX + 0x20],ECX
MOV ECX,dword ptr [0x00316d34]
MOV dword ptr [RAX + 0x10],ECX
MOV dword ptr [RAX + 0x14],0x20
MOV dword ptr [RAX + 0x18],0x2
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
LAB_0017acd5:
JMP 0x0017acd7
LAB_0017acd7:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x58
POP RBX
POP RBP
RET
|
long * LoadSoundFromWave(long *param_1)
{
int iVar1;
long lVar2;
int4 uStack0000000000000008;
int4 uStack000000000000000c;
int iStack0000000000000010;
int4 uStack0000000000000014;
long in_stack_00000018;
int4 local_44;
memset(param_1,0,0x28);
if (in_stack_00000018 != 0) {
if (iStack0000000000000010 == 8) {
local_44 = 1;
}
else {
local_44 = 5;
if (iStack0000000000000010 == 0x10) {
local_44 = 2;
}
}
iVar1 = ma_convert_frames(0,0,5,2,AUDIO._1028_4_,0,uStack0000000000000008,local_44,
uStack0000000000000014,uStack000000000000000c);
if (iVar1 == 0) {
TraceLog(4,"SOUND: Failed to get frame count for format conversion");
}
lVar2 = LoadAudioBuffer(5,2,AUDIO._1028_4_,iVar1,0);
if (lVar2 == 0) {
TraceLog(4,"SOUND: Failed to create buffer");
}
else {
iVar1 = ma_convert_frames(*(int8 *)(lVar2 + 0x170),iVar1,5,2,AUDIO._1028_4_,
in_stack_00000018,uStack0000000000000008,local_44,
uStack0000000000000014,uStack000000000000000c);
if (iVar1 == 0) {
TraceLog(4,"SOUND: Failed format conversion");
}
*(int *)(param_1 + 4) = iVar1;
*(int4 *)(param_1 + 2) = AUDIO._1028_4_;
*(int4 *)((long)param_1 + 0x14) = 0x20;
*(int4 *)(param_1 + 3) = 2;
*param_1 = lVar2;
}
}
return param_1;
}
|
|
16,777
|
LoadSoundFromWave
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
|
Sound LoadSoundFromWave(Wave wave)
{
Sound sound = { 0 };
if (wave.data != NULL)
{
// When using miniaudio we need to do our own mixing
// To simplify this we need convert the format of each sound to be consistent with
// the format used to open the playback AUDIO.System.device. We can do this two ways:
//
// 1) Convert the whole sound in one go at load time (here)
// 2) Convert the audio data in chunks at mixing time
//
// First option has been selected, format conversion is done on the loading stage
// The downside is that it uses more memory if the original sound is u8 or s16
ma_format formatIn = ((wave.sampleSize == 8)? ma_format_u8 : ((wave.sampleSize == 16)? ma_format_s16 : ma_format_f32));
ma_uint32 frameCountIn = wave.frameCount;
ma_uint32 frameCount = (ma_uint32)ma_convert_frames(NULL, 0, AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, NULL, frameCountIn, formatIn, wave.channels, wave.sampleRate);
if (frameCount == 0) TRACELOG(LOG_WARNING, "SOUND: Failed to get frame count for format conversion");
AudioBuffer *audioBuffer = LoadAudioBuffer(AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, frameCount, AUDIO_BUFFER_USAGE_STATIC);
if (audioBuffer == NULL)
{
TRACELOG(LOG_WARNING, "SOUND: Failed to create buffer");
return sound; // early return to avoid dereferencing the audioBuffer null pointer
}
frameCount = (ma_uint32)ma_convert_frames(audioBuffer->data, frameCount, AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, wave.data, frameCountIn, formatIn, wave.channels, wave.sampleRate);
if (frameCount == 0) TRACELOG(LOG_WARNING, "SOUND: Failed format conversion");
sound.frameCount = frameCount;
sound.stream.sampleRate = AUDIO.System.device.sampleRate;
sound.stream.sampleSize = 32;
sound.stream.channels = AUDIO_DEVICE_CHANNELS;
sound.stream.buffer = audioBuffer;
}
return sound;
}
|
O1
|
c
|
LoadSoundFromWave:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
movq 0xd0(%rsp), %r14
testq %r14, %r14
je 0x43b1d
leaq 0xc0(%rsp), %rax
movl 0x8(%rax), %ecx
xorl %edx, %edx
cmpl $0x10, %ecx
setne %dl
cmpl $0x8, %ecx
leal 0x2(%rdx,%rdx,2), %ecx
movl $0x1, %ebp
cmovnel %ecx, %ebp
movl (%rax), %ecx
movl 0x4(%rax), %esi
movl 0xfa2ad(%rip), %edx # 0x13dc64
movl 0xc(%rax), %r15d
leaq 0x10(%rsp), %r8
movups %xmm0, 0x58(%r8)
movups %xmm0, 0x48(%r8)
movups %xmm0, 0x38(%r8)
movups %xmm0, 0x28(%r8)
movups %xmm0, 0x18(%r8)
movq $0x0, 0x68(%r8)
movl %ebp, (%r8)
movl $0x5, 0x4(%r8)
movl %r15d, 0x8(%r8)
movl $0x2, 0xc(%r8)
movl %esi, 0x4(%rsp)
movl %esi, 0x10(%r8)
movl %edx, 0x14(%r8)
movq $0x4, 0x70(%r8)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
movq %rcx, 0x8(%rsp)
callq 0x27e42
movq %rax, %r13
testl %r13d, %r13d
jne 0x43a37
leaq 0x9857d(%rip), %rsi # 0xdbfa8
movl $0x4, %edi
xorl %eax, %eax
callq 0xbfa73
movl 0xfa227(%rip), %edx # 0x13dc64
movl $0x5, %edi
movl $0x2, %esi
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x43102
testq %rax, %rax
je 0x43b0a
movq %rax, %r12
movq 0x170(%rax), %rdi
movl %r13d, %esi
movl 0xfa1f6(%rip), %eax # 0x13dc64
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r8
movups %xmm0, 0x58(%r8)
movups %xmm0, 0x48(%r8)
movups %xmm0, 0x38(%r8)
movups %xmm0, 0x28(%r8)
movups %xmm0, 0x18(%r8)
movq $0x0, 0x68(%r8)
movl %ebp, (%r8)
movl $0x5, 0x4(%r8)
movl %r15d, 0x8(%r8)
movl $0x2, 0xc(%r8)
movl 0x4(%rsp), %ecx
movl %ecx, 0x10(%r8)
movl %eax, 0x14(%r8)
movq $0x4, 0x70(%r8)
movq %r14, %rdx
movq 0x8(%rsp), %rcx
callq 0x27e42
movq %rax, %r14
testl %r14d, %r14d
jne 0x43aea
leaq 0x98520(%rip), %rsi # 0xdbffe
movl $0x4, %edi
xorl %eax, %eax
callq 0xbfa73
movl %r14d, 0x20(%rbx)
movl 0xfa170(%rip), %eax # 0x13dc64
movl %eax, 0x10(%rbx)
movabsq $0x200000020, %rax # imm = 0x200000020
movq %rax, 0x14(%rbx)
movq %r12, (%rbx)
jmp 0x43b1d
leaq 0x984ce(%rip), %rsi # 0xdbfdf
movl $0x4, %edi
xorl %eax, %eax
callq 0xbfa73
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
LoadSoundFromWave:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+20h], 0
mov r14, [rsp+0B8h+arg_10]
test r14, r14
jz loc_43B1D
lea rax, [rsp+0B8h+arg_0]
mov ecx, [rax+8]
xor edx, edx
cmp ecx, 10h
setnz dl
cmp ecx, 8
lea ecx, [rdx+rdx*2+2]
mov ebp, 1
cmovnz ebp, ecx
mov ecx, [rax]
mov esi, [rax+4]
mov edx, cs:dword_13DC64
mov r15d, [rax+0Ch]
lea r8, [rsp+0B8h+var_A8]
movups xmmword ptr [r8+58h], xmm0
movups xmmword ptr [r8+48h], xmm0
movups xmmword ptr [r8+38h], xmm0
movups xmmword ptr [r8+28h], xmm0
movups xmmword ptr [r8+18h], xmm0
mov qword ptr [r8+68h], 0
mov [r8], ebp
mov dword ptr [r8+4], 5
mov [r8+8], r15d
mov dword ptr [r8+0Ch], 2
mov [rsp+0B8h+var_B4], esi
mov [r8+10h], esi
mov [r8+14h], edx
mov qword ptr [r8+70h], 4
xor edi, edi
xor esi, esi
xor edx, edx
mov [rsp+0B8h+var_B0], rcx
call ma_convert_frames_ex
mov r13, rax
test r13d, r13d
jnz short loc_43A37
lea rsi, aSoundFailedToG; "SOUND: Failed to get frame count for fo"...
mov edi, 4
xor eax, eax
call TraceLog
loc_43A37:
mov edx, cs:dword_13DC64
mov edi, 5
mov esi, 2
mov ecx, r13d
xor r8d, r8d
call LoadAudioBuffer
test rax, rax
jz loc_43B0A
mov r12, rax
mov rdi, [rax+170h]
mov esi, r13d
mov eax, cs:dword_13DC64
xorps xmm0, xmm0
lea r8, [rsp+0B8h+var_A8]
movups xmmword ptr [r8+58h], xmm0
movups xmmword ptr [r8+48h], xmm0
movups xmmword ptr [r8+38h], xmm0
movups xmmword ptr [r8+28h], xmm0
movups xmmword ptr [r8+18h], xmm0
mov qword ptr [r8+68h], 0
mov [r8], ebp
mov dword ptr [r8+4], 5
mov [r8+8], r15d
mov dword ptr [r8+0Ch], 2
mov ecx, [rsp+0B8h+var_B4]
mov [r8+10h], ecx
mov [r8+14h], eax
mov qword ptr [r8+70h], 4
mov rdx, r14
mov rcx, [rsp+0B8h+var_B0]
call ma_convert_frames_ex
mov r14, rax
test r14d, r14d
jnz short loc_43AEA
lea rsi, aSoundFailedFor; "SOUND: Failed format conversion"
mov edi, 4
xor eax, eax
call TraceLog
loc_43AEA:
mov [rbx+20h], r14d
mov eax, cs:dword_13DC64
mov [rbx+10h], eax
mov rax, 200000020h
mov [rbx+14h], rax
mov [rbx], r12
jmp short loc_43B1D
loc_43B0A:
lea rsi, aSoundFailedToC; "SOUND: Failed to create buffer"
mov edi, 4
xor eax, eax
call TraceLog
loc_43B1D:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long LoadSoundFromWave(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9)
{
int v10; // ebp
int v11; // edx
int v12; // ecx
int v13; // r8d
int v14; // r9d
unsigned int v15; // r13d
long long AudioBuffer; // rax
int v17; // edx
int v18; // ecx
int v19; // r8d
int v20; // r9d
long long v21; // r12
long long v22; // rdi
int v23; // edx
int v24; // ecx
int v25; // r8d
int v26; // r9d
unsigned int v27; // r14d
int v29; // [rsp+10h] [rbp-A8h] BYREF
int v30; // [rsp+14h] [rbp-A4h]
int v31; // [rsp+18h] [rbp-A0h]
int v32; // [rsp+1Ch] [rbp-9Ch]
int v33; // [rsp+20h] [rbp-98h]
int v34; // [rsp+24h] [rbp-94h]
__int128 v35; // [rsp+28h] [rbp-90h]
__int128 v36; // [rsp+38h] [rbp-80h]
__int128 v37; // [rsp+48h] [rbp-70h]
__int128 v38; // [rsp+58h] [rbp-60h]
__int128 v39; // [rsp+68h] [rbp-50h]
long long v40; // [rsp+78h] [rbp-40h]
long long v41; // [rsp+80h] [rbp-38h]
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
if ( a9 )
{
v10 = 1;
if ( (_DWORD)a8 != 8 )
v10 = 3 * ((_DWORD)a8 != 16) + 2;
v39 = 0LL;
v38 = 0LL;
v37 = 0LL;
v36 = 0LL;
v35 = 0LL;
v40 = 0LL;
v29 = v10;
v30 = 5;
v31 = HIDWORD(a8);
v32 = 2;
v33 = HIDWORD(a7);
v34 = dword_13DC64;
v41 = 4LL;
v15 = (unsigned int)ma_convert_frames_ex(0LL, 0LL, 0LL, (unsigned int *)(unsigned int)a7, (long long)&v29);
if ( !v15 )
TraceLog(4, (unsigned int)"SOUND: Failed to get frame count for format conversion", v11, v12, v13, v14);
AudioBuffer = LoadAudioBuffer(5, 2, dword_13DC64, v15, 0);
if ( AudioBuffer )
{
v21 = AudioBuffer;
v22 = *(_QWORD *)(AudioBuffer + 368);
v39 = 0LL;
v38 = 0LL;
v37 = 0LL;
v36 = 0LL;
v35 = 0LL;
v40 = 0LL;
v29 = v10;
v30 = 5;
v31 = HIDWORD(a8);
v32 = 2;
v33 = HIDWORD(a7);
v34 = dword_13DC64;
v41 = 4LL;
v27 = (unsigned int)ma_convert_frames_ex(
v22,
(unsigned int *)v15,
a9,
(unsigned int *)(unsigned int)a7,
(long long)&v29);
if ( !v27 )
TraceLog(4, (unsigned int)"SOUND: Failed format conversion", v23, v24, v25, v26);
*(_DWORD *)(a1 + 32) = v27;
*(_DWORD *)(a1 + 16) = dword_13DC64;
*(_QWORD *)(a1 + 20) = 0x200000020LL;
*(_QWORD *)a1 = v21;
}
else
{
TraceLog(4, (unsigned int)"SOUND: Failed to create buffer", v17, v18, v19, v20);
}
}
return a1;
}
|
LoadSoundFromWave:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x20],0x0
MOV R14,qword ptr [RSP + 0xd0]
TEST R14,R14
JZ 0x00143b1d
LEA RAX,[RSP + 0xc0]
MOV ECX,dword ptr [RAX + 0x8]
XOR EDX,EDX
CMP ECX,0x10
SETNZ DL
CMP ECX,0x8
LEA ECX,[RDX + RDX*0x2 + 0x2]
MOV EBP,0x1
CMOVNZ EBP,ECX
MOV ECX,dword ptr [RAX]
MOV ESI,dword ptr [RAX + 0x4]
MOV EDX,dword ptr [0x0023dc64]
MOV R15D,dword ptr [RAX + 0xc]
LEA R8,[RSP + 0x10]
MOVUPS xmmword ptr [R8 + 0x58],XMM0
MOVUPS xmmword ptr [R8 + 0x48],XMM0
MOVUPS xmmword ptr [R8 + 0x38],XMM0
MOVUPS xmmword ptr [R8 + 0x28],XMM0
MOVUPS xmmword ptr [R8 + 0x18],XMM0
MOV qword ptr [R8 + 0x68],0x0
MOV dword ptr [R8],EBP
MOV dword ptr [R8 + 0x4],0x5
MOV dword ptr [R8 + 0x8],R15D
MOV dword ptr [R8 + 0xc],0x2
MOV dword ptr [RSP + 0x4],ESI
MOV dword ptr [R8 + 0x10],ESI
MOV dword ptr [R8 + 0x14],EDX
MOV qword ptr [R8 + 0x70],0x4
XOR EDI,EDI
XOR ESI,ESI
XOR EDX,EDX
MOV qword ptr [RSP + 0x8],RCX
CALL 0x00127e42
MOV R13,RAX
TEST R13D,R13D
JNZ 0x00143a37
LEA RSI,[0x1dbfa8]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001bfa73
LAB_00143a37:
MOV EDX,dword ptr [0x0023dc64]
MOV EDI,0x5
MOV ESI,0x2
MOV ECX,R13D
XOR R8D,R8D
CALL 0x00143102
TEST RAX,RAX
JZ 0x00143b0a
MOV R12,RAX
MOV RDI,qword ptr [RAX + 0x170]
MOV ESI,R13D
MOV EAX,dword ptr [0x0023dc64]
XORPS XMM0,XMM0
LEA R8,[RSP + 0x10]
MOVUPS xmmword ptr [R8 + 0x58],XMM0
MOVUPS xmmword ptr [R8 + 0x48],XMM0
MOVUPS xmmword ptr [R8 + 0x38],XMM0
MOVUPS xmmword ptr [R8 + 0x28],XMM0
MOVUPS xmmword ptr [R8 + 0x18],XMM0
MOV qword ptr [R8 + 0x68],0x0
MOV dword ptr [R8],EBP
MOV dword ptr [R8 + 0x4],0x5
MOV dword ptr [R8 + 0x8],R15D
MOV dword ptr [R8 + 0xc],0x2
MOV ECX,dword ptr [RSP + 0x4]
MOV dword ptr [R8 + 0x10],ECX
MOV dword ptr [R8 + 0x14],EAX
MOV qword ptr [R8 + 0x70],0x4
MOV RDX,R14
MOV RCX,qword ptr [RSP + 0x8]
CALL 0x00127e42
MOV R14,RAX
TEST R14D,R14D
JNZ 0x00143aea
LEA RSI,[0x1dbffe]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001bfa73
LAB_00143aea:
MOV dword ptr [RBX + 0x20],R14D
MOV EAX,dword ptr [0x0023dc64]
MOV dword ptr [RBX + 0x10],EAX
MOV RAX,0x200000020
MOV qword ptr [RBX + 0x14],RAX
MOV qword ptr [RBX],R12
JMP 0x00143b1d
LAB_00143b0a:
LEA RSI,[0x1dbfdf]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001bfa73
LAB_00143b1d:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long * LoadSoundFromWave(long *param_1)
{
int iVar1;
long lVar2;
int4 in_stack_00000008;
long in_stack_00000018;
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
param_1[4] = 0;
if (in_stack_00000018 != 0) {
iVar1 = ma_convert_frames_ex(0,0,0);
if (iVar1 == 0) {
TraceLog(4,"SOUND: Failed to get frame count for format conversion");
}
lVar2 = LoadAudioBuffer(5,2,AUDIO._1028_4_,iVar1,0);
if (lVar2 == 0) {
TraceLog(4,"SOUND: Failed to create buffer");
}
else {
iVar1 = ma_convert_frames_ex
(*(int8 *)(lVar2 + 0x170),iVar1,in_stack_00000018,in_stack_00000008);
if (iVar1 == 0) {
TraceLog(4,"SOUND: Failed format conversion");
}
*(int *)(param_1 + 4) = iVar1;
*(int4 *)(param_1 + 2) = AUDIO._1028_4_;
*(int8 *)((long)param_1 + 0x14) = 0x200000020;
*param_1 = lVar2;
}
}
return param_1;
}
|
|
16,778
|
LoadSoundFromWave
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
|
Sound LoadSoundFromWave(Wave wave)
{
Sound sound = { 0 };
if (wave.data != NULL)
{
// When using miniaudio we need to do our own mixing
// To simplify this we need convert the format of each sound to be consistent with
// the format used to open the playback AUDIO.System.device. We can do this two ways:
//
// 1) Convert the whole sound in one go at load time (here)
// 2) Convert the audio data in chunks at mixing time
//
// First option has been selected, format conversion is done on the loading stage
// The downside is that it uses more memory if the original sound is u8 or s16
ma_format formatIn = ((wave.sampleSize == 8)? ma_format_u8 : ((wave.sampleSize == 16)? ma_format_s16 : ma_format_f32));
ma_uint32 frameCountIn = wave.frameCount;
ma_uint32 frameCount = (ma_uint32)ma_convert_frames(NULL, 0, AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, NULL, frameCountIn, formatIn, wave.channels, wave.sampleRate);
if (frameCount == 0) TRACELOG(LOG_WARNING, "SOUND: Failed to get frame count for format conversion");
AudioBuffer *audioBuffer = LoadAudioBuffer(AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, frameCount, AUDIO_BUFFER_USAGE_STATIC);
if (audioBuffer == NULL)
{
TRACELOG(LOG_WARNING, "SOUND: Failed to create buffer");
return sound; // early return to avoid dereferencing the audioBuffer null pointer
}
frameCount = (ma_uint32)ma_convert_frames(audioBuffer->data, frameCount, AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, wave.data, frameCountIn, formatIn, wave.channels, wave.sampleRate);
if (frameCount == 0) TRACELOG(LOG_WARNING, "SOUND: Failed format conversion");
sound.frameCount = frameCount;
sound.stream.sampleRate = AUDIO.System.device.sampleRate;
sound.stream.sampleSize = 32;
sound.stream.channels = AUDIO_DEVICE_CHANNELS;
sound.stream.buffer = audioBuffer;
}
return sound;
}
|
O2
|
c
|
LoadSoundFromWave:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq 0x60(%rsp), %r14
testq %r14, %r14
je 0x3b2ad
leaq 0x50(%rsp), %rax
movl 0x8(%rax), %ecx
xorl %edx, %edx
cmpl $0x10, %ecx
setne %dl
cmpl $0x8, %ecx
leal 0x2(%rdx,%rdx,2), %ecx
pushq $0x1
popq %r13
cmovnel %ecx, %r13d
movl (%rax), %r10d
movl 0x4(%rax), %ebp
movl 0xe8ac0(%rip), %r8d # 0x123c94
movl 0xc(%rax), %eax
pushq $0x5
popq %rdx
pushq $0x2
popq %rcx
xorl %edi, %edi
xorl %esi, %esi
xorl %r9d, %r9d
pushq %rbp
movq %rax, 0x10(%rsp)
pushq %rax
pushq %r13
movq %r10, 0x28(%rsp)
pushq %r10
callq 0x227f9
addq $0x20, %rsp
movq %rax, %r12
testl %r12d, %r12d
jne 0x3b216
leaq 0x80bac(%rip), %rsi # 0xbbdb8
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0xa128b
movl 0xe8a78(%rip), %edx # 0x123c94
pushq $0x5
popq %rdi
pushq $0x2
popq %rsi
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x3a92c
testq %rax, %rax
je 0x3b29c
movq %rax, %r15
movq 0x170(%rax), %rdi
movl %r12d, %esi
movl 0xe8a4e(%rip), %r8d # 0x123c94
pushq $0x5
popq %rdx
pushq $0x2
popq %rcx
movq %r14, %r9
pushq %rbp
pushq 0x10(%rsp)
pushq %r13
pushq 0x28(%rsp)
callq 0x227f9
addq $0x20, %rsp
movq %rax, %r14
testl %r14d, %r14d
jne 0x3b27c
leaq 0x80b9c(%rip), %rsi # 0xbbe0e
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0xa128b
movl %r14d, 0x20(%rbx)
movl 0xe8a0e(%rip), %eax # 0x123c94
movl %eax, 0x10(%rbx)
movabsq $0x200000020, %rax # imm = 0x200000020
movq %rax, 0x14(%rbx)
movq %r15, (%rbx)
jmp 0x3b2ad
leaq 0x80b4c(%rip), %rsi # 0xbbdef
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0xa128b
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
LoadSoundFromWave:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
xorps xmm0, xmm0
and qword ptr [rdi+20h], 0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov r14, [rsp+48h+arg_10]
test r14, r14
jz loc_3B2AD
lea rax, [rsp+48h+arg_0]
mov ecx, [rax+8]
xor edx, edx
cmp ecx, 10h
setnz dl
cmp ecx, 8
lea ecx, [rdx+rdx*2+2]
push 1
pop r13
cmovnz r13d, ecx
mov r10d, [rax]
mov ebp, [rax+4]
mov r8d, cs:dword_123C94
mov eax, [rax+0Ch]
push 5
pop rdx
push 2
pop rcx
xor edi, edi
xor esi, esi
xor r9d, r9d
push rbp
mov [rsp+50h+var_40], rax
push rax
push r13
mov [rsp+60h+var_38], r10
push r10
call ma_convert_frames
add rsp, 20h
mov r12, rax
test r12d, r12d
jnz short loc_3B216
lea rsi, aSoundFailedToG; "SOUND: Failed to get frame count for fo"...
push 4
pop rdi
xor eax, eax
call TraceLog
loc_3B216:
mov edx, cs:dword_123C94
push 5
pop rdi
push 2
pop rsi
mov ecx, r12d
xor r8d, r8d
call LoadAudioBuffer
test rax, rax
jz short loc_3B29C
mov r15, rax
mov rdi, [rax+170h]
mov esi, r12d
mov r8d, cs:dword_123C94
push 5
pop rdx
push 2
pop rcx
mov r9, r14
push rbp
push [rsp+50h+var_40]
push r13
push [rsp+60h+var_38]
call ma_convert_frames
add rsp, 20h
mov r14, rax
test r14d, r14d
jnz short loc_3B27C
lea rsi, aSoundFailedFor; "SOUND: Failed format conversion"
push 4
pop rdi
xor eax, eax
call TraceLog
loc_3B27C:
mov [rbx+20h], r14d
mov eax, cs:dword_123C94
mov [rbx+10h], eax
mov rax, 200000020h
mov [rbx+14h], rax
mov [rbx], r15
jmp short loc_3B2AD
loc_3B29C:
lea rsi, aSoundFailedToC; "SOUND: Failed to create buffer"
push 4
pop rdi
xor eax, eax
call TraceLog
loc_3B2AD:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long LoadSoundFromWave(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9)
{
int v9; // r13d
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
unsigned int v14; // r12d
long long AudioBuffer; // rax
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
long long v20; // r15
int v21; // edx
int v22; // ecx
int v23; // r8d
int v24; // r9d
int v25; // r14d
*(_QWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( a9 )
{
v9 = 1;
if ( (_DWORD)a8 != 8 )
v9 = 3 * ((_DWORD)a8 != 16) + 2;
v14 = ma_convert_frames(0LL, 0LL, 5, 2, dword_123C94, 0LL, (unsigned int)a7, v9, SHIDWORD(a8), SHIDWORD(a7));
if ( !v14 )
TraceLog(4, (unsigned int)"SOUND: Failed to get frame count for format conversion", v10, v11, v12, v13);
AudioBuffer = LoadAudioBuffer(5, 2, dword_123C94, v14, 0);
if ( AudioBuffer )
{
v20 = AudioBuffer;
v25 = ma_convert_frames(
*(_QWORD *)(AudioBuffer + 368),
v14,
5,
2,
dword_123C94,
a9,
(unsigned int)a7,
v9,
SHIDWORD(a8),
SHIDWORD(a7));
if ( !v25 )
TraceLog(4, (unsigned int)"SOUND: Failed format conversion", v21, v22, v23, v24);
*(_DWORD *)(a1 + 32) = v25;
*(_DWORD *)(a1 + 16) = dword_123C94;
*(_QWORD *)(a1 + 20) = 0x200000020LL;
*(_QWORD *)a1 = v20;
}
else
{
TraceLog(4, (unsigned int)"SOUND: Failed to create buffer", v16, v17, v18, v19);
}
}
return a1;
}
|
LoadSoundFromWave:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
XORPS XMM0,XMM0
AND qword ptr [RDI + 0x20],0x0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV R14,qword ptr [RSP + 0x60]
TEST R14,R14
JZ 0x0013b2ad
LEA RAX,[RSP + 0x50]
MOV ECX,dword ptr [RAX + 0x8]
XOR EDX,EDX
CMP ECX,0x10
SETNZ DL
CMP ECX,0x8
LEA ECX,[RDX + RDX*0x2 + 0x2]
PUSH 0x1
POP R13
CMOVNZ R13D,ECX
MOV R10D,dword ptr [RAX]
MOV EBP,dword ptr [RAX + 0x4]
MOV R8D,dword ptr [0x00223c94]
MOV EAX,dword ptr [RAX + 0xc]
PUSH 0x5
POP RDX
PUSH 0x2
POP RCX
XOR EDI,EDI
XOR ESI,ESI
XOR R9D,R9D
PUSH RBP
MOV qword ptr [RSP + 0x10],RAX
PUSH RAX
PUSH R13
MOV qword ptr [RSP + 0x28],R10
PUSH R10
CALL 0x001227f9
ADD RSP,0x20
MOV R12,RAX
TEST R12D,R12D
JNZ 0x0013b216
LEA RSI,[0x1bbdb8]
PUSH 0x4
POP RDI
XOR EAX,EAX
CALL 0x001a128b
LAB_0013b216:
MOV EDX,dword ptr [0x00223c94]
PUSH 0x5
POP RDI
PUSH 0x2
POP RSI
MOV ECX,R12D
XOR R8D,R8D
CALL 0x0013a92c
TEST RAX,RAX
JZ 0x0013b29c
MOV R15,RAX
MOV RDI,qword ptr [RAX + 0x170]
MOV ESI,R12D
MOV R8D,dword ptr [0x00223c94]
PUSH 0x5
POP RDX
PUSH 0x2
POP RCX
MOV R9,R14
PUSH RBP
PUSH qword ptr [RSP + 0x10]
PUSH R13
PUSH qword ptr [RSP + 0x28]
CALL 0x001227f9
ADD RSP,0x20
MOV R14,RAX
TEST R14D,R14D
JNZ 0x0013b27c
LEA RSI,[0x1bbe0e]
PUSH 0x4
POP RDI
XOR EAX,EAX
CALL 0x001a128b
LAB_0013b27c:
MOV dword ptr [RBX + 0x20],R14D
MOV EAX,dword ptr [0x00223c94]
MOV dword ptr [RBX + 0x10],EAX
MOV RAX,0x200000020
MOV qword ptr [RBX + 0x14],RAX
MOV qword ptr [RBX],R15
JMP 0x0013b2ad
LAB_0013b29c:
LEA RSI,[0x1bbdef]
PUSH 0x4
POP RDI
XOR EAX,EAX
CALL 0x001a128b
LAB_0013b2ad:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long * LoadSoundFromWave(long *param_1)
{
char cVar1;
int iVar2;
long lVar3;
int4 uStack0000000000000008;
int4 uStack000000000000000c;
int iStack0000000000000010;
int4 uStack0000000000000014;
long in_stack_00000018;
param_1[4] = 0;
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
if (in_stack_00000018 != 0) {
cVar1 = '\x01';
if (iStack0000000000000010 != 8) {
cVar1 = (iStack0000000000000010 != 0x10) * '\x03' + '\x02';
}
iVar2 = ma_convert_frames(0,0,5,2,AUDIO._1028_4_,0,uStack0000000000000008,cVar1,
uStack0000000000000014,uStack000000000000000c);
if (iVar2 == 0) {
TraceLog(4,"SOUND: Failed to get frame count for format conversion");
}
lVar3 = LoadAudioBuffer(5,2,AUDIO._1028_4_,iVar2,0);
if (lVar3 == 0) {
TraceLog(4,"SOUND: Failed to create buffer");
}
else {
iVar2 = ma_convert_frames(*(int8 *)(lVar3 + 0x170),iVar2,5,2,AUDIO._1028_4_,
in_stack_00000018,uStack0000000000000008,cVar1,
uStack0000000000000014,uStack000000000000000c);
if (iVar2 == 0) {
TraceLog(4,"SOUND: Failed format conversion");
}
*(int *)(param_1 + 4) = iVar2;
*(int4 *)(param_1 + 2) = AUDIO._1028_4_;
*(int8 *)((long)param_1 + 0x14) = 0x200000020;
*param_1 = lVar3;
}
}
return param_1;
}
|
|
16,779
|
ecp_mod_p448
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/ecp_curves.c
|
static int ecp_mod_p448(mbedtls_mpi *N)
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
size_t i;
mbedtls_mpi M, Q;
mbedtls_mpi_uint Mp[P448_WIDTH + 1], Qp[P448_WIDTH];
if (N->n <= P448_WIDTH) {
return 0;
}
/* M = A1 */
M.s = 1;
M.n = N->n - (P448_WIDTH);
if (M.n > P448_WIDTH) {
/* Shouldn't be called with N larger than 2^896! */
return MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
}
M.p = Mp;
memset(Mp, 0, sizeof(Mp));
memcpy(Mp, N->p + P448_WIDTH, M.n * sizeof(mbedtls_mpi_uint));
/* N = A0 */
for (i = P448_WIDTH; i < N->n; i++) {
N->p[i] = 0;
}
/* N += A1 */
MBEDTLS_MPI_CHK(mbedtls_mpi_add_mpi(N, N, &M));
/* Q = B1, N += B1 */
Q = M;
Q.p = Qp;
memcpy(Qp, Mp, sizeof(Qp));
MBEDTLS_MPI_CHK(mbedtls_mpi_shift_r(&Q, 224));
MBEDTLS_MPI_CHK(mbedtls_mpi_add_mpi(N, N, &Q));
/* M = (B0 + B1) * 2^224, N += M */
if (sizeof(mbedtls_mpi_uint) > 4) {
Mp[P224_WIDTH_MIN] &= ((mbedtls_mpi_uint)-1) >> (P224_UNUSED_BITS);
}
for (i = P224_WIDTH_MAX; i < M.n; ++i) {
Mp[i] = 0;
}
MBEDTLS_MPI_CHK(mbedtls_mpi_add_mpi(&M, &M, &Q));
M.n = P448_WIDTH + 1; /* Make room for shifted carry bit from the addition */
MBEDTLS_MPI_CHK(mbedtls_mpi_shift_l(&M, 224));
MBEDTLS_MPI_CHK(mbedtls_mpi_add_mpi(N, N, &M));
cleanup:
return ret;
}
|
O3
|
c
|
ecp_mod_p448:
movq 0x8(%rdi), %rdx
xorl %eax, %eax
cmpq $0x8, %rdx
jb 0x88c1d
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movl $0x1, 0x8(%rsp)
addq $-0x7, %rdx
movq %rdx, 0x10(%rsp)
movl $0xffffb080, %eax # imm = 0xFFFFB080
cmpq $0x7, %rdx
ja 0x88c13
movq %rdi, %rbx
leaq 0x40(%rsp), %rdi
movq %rdi, 0x18(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x30(%rdi)
movq 0x10(%rbx), %r14
leaq 0x38(%r14), %rsi
shlq $0x3, %rdx
callq 0xf3a0
movl $0x7, %eax
movq $0x0, (%r14,%rax,8)
incq %rax
cmpq 0x8(%rbx), %rax
jb 0x88b24
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x7f3d1
testl %eax, %eax
jne 0x88c13
movups 0x8(%rsp), %xmm0
leaq 0x20(%rsp), %rdi
movaps %xmm0, (%rdi)
leaq 0x80(%rsp), %rax
movq %rax, 0x10(%rdi)
movaps 0x40(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movaps 0x60(%rsp), %xmm2
movaps %xmm0, (%rax)
movaps %xmm1, 0x10(%rax)
movaps %xmm2, 0x20(%rax)
movq 0x70(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl $0xe0, %esi
callq 0x7ef26
testl %eax, %eax
jne 0x88c13
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x7f3d1
testl %eax, %eax
jne 0x88c13
movl $0x0, 0x5c(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x5, %rax
jb 0x88bd2
leaq 0x60(%rsp), %rdi
leaq -0x20(,%rax,8), %rdx
xorl %esi, %esi
callq 0xf2b0
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %rdi, %rsi
callq 0x7f3d1
testl %eax, %eax
jne 0x88c13
leaq 0x8(%rsp), %rdi
movq $0x8, 0x8(%rdi)
movl $0xe0, %esi
callq 0x7ee3c
testl %eax, %eax
jne 0x88c13
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x7f3d1
addq $0xb8, %rsp
popq %rbx
popq %r14
retq
|
ecp_mod_p448:
mov rdx, [rdi+8]
xor eax, eax
cmp rdx, 8
jb locret_88C1D
push r14
push rbx
sub rsp, 0B8h
mov dword ptr [rsp+0C8h+var_C0], 1
add rdx, 0FFFFFFFFFFFFFFF9h
mov qword ptr [rsp+0C8h+var_C0+8], rdx
mov eax, 0FFFFB080h
cmp rdx, 7
ja loc_88C13
mov rbx, rdi
lea rdi, [rsp+0C8h+var_88]
mov [rsp+0C8h+var_B0], rdi
xorps xmm0, xmm0
movaps xmmword ptr [rdi], xmm0
movaps xmmword ptr [rdi+10h], xmm0
movaps xmmword ptr [rdi+20h], xmm0
movaps xmmword ptr [rdi+30h], xmm0
mov r14, [rbx+10h]
lea rsi, [r14+38h]
shl rdx, 3
call _memcpy
mov eax, 7
loc_88B24:
mov qword ptr [r14+rax*8], 0
inc rax
cmp rax, [rbx+8]
jb short loc_88B24
lea rdx, [rsp+0C8h+var_C0]
mov rdi, rbx
mov rsi, rbx
call mbedtls_mpi_add_mpi
test eax, eax
jnz loc_88C13
movups xmm0, [rsp+0C8h+var_C0]
lea rdi, [rsp+0C8h+var_A8]
movaps xmmword ptr [rdi], xmm0
lea rax, [rsp+0C8h+var_48]
mov [rdi+10h], rax
movaps xmm0, [rsp+0C8h+var_88]
movaps xmm1, [rsp+0C8h+var_78]
movaps xmm2, [rsp+0C8h+var_68]
movaps xmmword ptr [rax], xmm0
movaps xmmword ptr [rax+10h], xmm1
movaps xmmword ptr [rax+20h], xmm2
mov rcx, [rsp+0C8h+var_58]
mov [rax+30h], rcx
mov esi, 0E0h
call mbedtls_mpi_shift_r
test eax, eax
jnz short loc_88C13
lea rdx, [rsp+0C8h+var_A8]
mov rdi, rbx
mov rsi, rbx
call mbedtls_mpi_add_mpi
test eax, eax
jnz short loc_88C13
mov dword ptr [rsp+0C8h+var_78+0Ch], 0
mov rax, qword ptr [rsp+0C8h+var_C0+8]
cmp rax, 5
jb short loc_88BD2
lea rdi, [rsp+0C8h+var_68]
lea rdx, ds:0FFFFFFFFFFFFFFE0h[rax*8]
xor esi, esi
call _memset
loc_88BD2:
lea rdi, [rsp+0C8h+var_C0]
lea rdx, [rsp+0C8h+var_A8]
mov rsi, rdi
call mbedtls_mpi_add_mpi
test eax, eax
jnz short loc_88C13
lea rdi, [rsp+0C8h+var_C0]
mov qword ptr [rdi+8], 8
mov esi, 0E0h
call mbedtls_mpi_shift_l
test eax, eax
jnz short loc_88C13
lea rdx, [rsp+0C8h+var_C0]
mov rdi, rbx
mov rsi, rbx
call mbedtls_mpi_add_mpi
loc_88C13:
add rsp, 0B8h
pop rbx
pop r14
locret_88C1D:
retn
|
long long ecp_mod_p448(long long a1)
{
unsigned long long v1; // rdx
long long result; // rax
unsigned long long v3; // rdx
long long v4; // r14
unsigned long long v5; // rax
__int128 v6; // [rsp+0h] [rbp-C0h] BYREF
__int128 *v7; // [rsp+10h] [rbp-B0h]
__int128 v8; // [rsp+18h] [rbp-A8h] BYREF
_OWORD *v9; // [rsp+28h] [rbp-98h]
__int128 v10; // [rsp+38h] [rbp-88h] BYREF
__int128 v11; // [rsp+48h] [rbp-78h]
__int128 v12; // [rsp+58h] [rbp-68h] BYREF
__int128 v13; // [rsp+68h] [rbp-58h]
_OWORD v14[3]; // [rsp+78h] [rbp-48h] BYREF
long long v15; // [rsp+A8h] [rbp-18h]
v1 = *(_QWORD *)(a1 + 8);
result = 0LL;
if ( v1 >= 8 )
{
LODWORD(v6) = 1;
v3 = v1 - 7;
*((_QWORD *)&v6 + 1) = v3;
result = 4294946944LL;
if ( v3 <= 7 )
{
v7 = &v10;
v10 = 0LL;
v11 = 0LL;
v12 = 0LL;
v13 = 0LL;
v4 = *(_QWORD *)(a1 + 16);
memcpy(&v10, v4 + 56, 8 * v3);
v5 = 7LL;
do
*(_QWORD *)(v4 + 8 * v5++) = 0LL;
while ( v5 < *(_QWORD *)(a1 + 8) );
result = mbedtls_mpi_add_mpi(a1, a1, (long long)&v6);
if ( !(_DWORD)result )
{
v8 = v6;
v9 = v14;
v14[0] = v10;
v14[1] = v11;
v14[2] = v12;
v15 = v13;
result = mbedtls_mpi_shift_r((long long)&v8, 0xE0uLL);
if ( !(_DWORD)result )
{
result = mbedtls_mpi_add_mpi(a1, a1, (long long)&v8);
if ( !(_DWORD)result )
{
HIDWORD(v11) = 0;
if ( *((_QWORD *)&v6 + 1) >= 5uLL )
memset(&v12, 0LL, 8LL * *((_QWORD *)&v6 + 1) - 32);
result = mbedtls_mpi_add_mpi((long long)&v6, (long long)&v6, (long long)&v8);
if ( !(_DWORD)result )
{
*((_QWORD *)&v6 + 1) = 8LL;
result = mbedtls_mpi_shift_l((long long)&v6, 0xE0uLL);
if ( !(_DWORD)result )
return mbedtls_mpi_add_mpi(a1, a1, (long long)&v6);
}
}
}
}
}
}
return result;
}
|
ecp_mod_p448:
MOV RDX,qword ptr [RDI + 0x8]
XOR EAX,EAX
CMP RDX,0x8
JC 0x00188c1d
PUSH R14
PUSH RBX
SUB RSP,0xb8
MOV dword ptr [RSP + 0x8],0x1
ADD RDX,-0x7
MOV qword ptr [RSP + 0x10],RDX
MOV EAX,0xffffb080
CMP RDX,0x7
JA 0x00188c13
MOV RBX,RDI
LEA RDI,[RSP + 0x40]
MOV qword ptr [RSP + 0x18],RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RDI],XMM0
MOVAPS xmmword ptr [RDI + 0x10],XMM0
MOVAPS xmmword ptr [RDI + 0x20],XMM0
MOVAPS xmmword ptr [RDI + 0x30],XMM0
MOV R14,qword ptr [RBX + 0x10]
LEA RSI,[R14 + 0x38]
SHL RDX,0x3
CALL 0x0010f3a0
MOV EAX,0x7
LAB_00188b24:
MOV qword ptr [R14 + RAX*0x8],0x0
INC RAX
CMP RAX,qword ptr [RBX + 0x8]
JC 0x00188b24
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,RBX
CALL 0x0017f3d1
TEST EAX,EAX
JNZ 0x00188c13
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x20]
MOVAPS xmmword ptr [RDI],XMM0
LEA RAX,[RSP + 0x80]
MOV qword ptr [RDI + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x40]
MOVAPS XMM1,xmmword ptr [RSP + 0x50]
MOVAPS XMM2,xmmword ptr [RSP + 0x60]
MOVAPS xmmword ptr [RAX],XMM0
MOVAPS xmmword ptr [RAX + 0x10],XMM1
MOVAPS xmmword ptr [RAX + 0x20],XMM2
MOV RCX,qword ptr [RSP + 0x70]
MOV qword ptr [RAX + 0x30],RCX
MOV ESI,0xe0
CALL 0x0017ef26
TEST EAX,EAX
JNZ 0x00188c13
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV RSI,RBX
CALL 0x0017f3d1
TEST EAX,EAX
JNZ 0x00188c13
MOV dword ptr [RSP + 0x5c],0x0
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,0x5
JC 0x00188bd2
LEA RDI,[RSP + 0x60]
LEA RDX,[-0x20 + RAX*0x8]
XOR ESI,ESI
CALL 0x0010f2b0
LAB_00188bd2:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x20]
MOV RSI,RDI
CALL 0x0017f3d1
TEST EAX,EAX
JNZ 0x00188c13
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI + 0x8],0x8
MOV ESI,0xe0
CALL 0x0017ee3c
TEST EAX,EAX
JNZ 0x00188c13
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,RBX
CALL 0x0017f3d1
LAB_00188c13:
ADD RSP,0xb8
POP RBX
POP R14
LAB_00188c1d:
RET
|
int8 ecp_mod_p448(long param_1)
{
long lVar1;
int8 uVar2;
ulong uVar3;
int4 local_c0;
int4 uStack_bc;
ulong uStack_b8;
int8 *local_b0;
int8 local_a8;
ulong uStack_a0;
int4 *local_98;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int4 local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
int4 local_38;
int4 uStack_34;
int4 uStack_30;
int4 uStack_2c;
int4 local_28;
int4 uStack_24;
int4 uStack_20;
int4 uStack_1c;
int8 local_18;
uVar2 = 0;
if (7 < *(ulong *)(param_1 + 8)) {
local_c0 = 1;
uStack_b8 = *(ulong *)(param_1 + 8) - 7;
uVar2 = 0xffffb080;
if (uStack_b8 < 8) {
local_b0 = &local_88;
local_88 = 0;
uStack_80 = 0;
local_78 = 0;
uStack_70 = 0;
local_68 = 0;
uStack_60 = 0;
local_58 = 0;
uStack_50 = 0;
lVar1 = *(long *)(param_1 + 0x10);
memcpy(local_b0,(void *)(lVar1 + 0x38),uStack_b8 * 8);
uVar3 = 7;
do {
*(int8 *)(lVar1 + uVar3 * 8) = 0;
uVar3 = uVar3 + 1;
} while (uVar3 < *(ulong *)(param_1 + 8));
uVar2 = mbedtls_mpi_add_mpi(param_1,param_1,&local_c0);
if ((int)uVar2 == 0) {
local_a8 = CONCAT44(uStack_bc,local_c0);
uStack_a0 = uStack_b8;
local_98 = &local_48;
local_48 = (int4)local_88;
uStack_44 = local_88._4_4_;
uStack_40 = (int4)uStack_80;
uStack_3c = uStack_80._4_4_;
local_38 = (int4)local_78;
uStack_34 = local_78._4_4_;
uStack_30 = (int4)uStack_70;
uStack_2c = uStack_70._4_4_;
local_28 = (int4)local_68;
uStack_24 = local_68._4_4_;
uStack_20 = (int4)uStack_60;
uStack_1c = uStack_60._4_4_;
local_18 = local_58;
uVar2 = mbedtls_mpi_shift_r(&local_a8,0xe0);
if (((int)uVar2 == 0) &&
(uVar2 = mbedtls_mpi_add_mpi(param_1,param_1,&local_a8), (int)uVar2 == 0)) {
uStack_70 = uStack_70 & 0xffffffff;
if (4 < uStack_b8) {
memset(&local_68,0,uStack_b8 * 8 - 0x20);
}
uVar2 = mbedtls_mpi_add_mpi(&local_c0,&local_c0,&local_a8);
if ((int)uVar2 == 0) {
uStack_b8 = 8;
uVar2 = mbedtls_mpi_shift_l(&local_c0,0xe0);
if ((int)uVar2 == 0) {
uVar2 = mbedtls_mpi_add_mpi(param_1,param_1,&local_c0);
}
}
}
}
}
}
return uVar2;
}
|
|
16,780
|
mi_status
|
eloqsql/storage/myisam/mi_info.c
|
int mi_status(MI_INFO *info, register MI_ISAMINFO *x, uint flag)
{
MY_STAT state;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("mi_status");
x->recpos = info->lastpos;
if (flag == HA_STATUS_POS)
DBUG_RETURN(0); /* Compatible with ISAM */
if (!(flag & HA_STATUS_NO_LOCK))
{
mysql_mutex_lock(&share->intern_lock);
(void) _mi_readinfo(info,F_RDLCK,0);
fast_mi_writeinfo(info);
mysql_mutex_unlock(&share->intern_lock);
}
if (flag & HA_STATUS_VARIABLE)
{
x->records = info->state->records;
x->deleted = info->state->del;
x->delete_length = info->state->empty;
x->data_file_length =info->state->data_file_length;
x->index_file_length=info->state->key_file_length;
x->keys = share->state.header.keys;
x->check_time = share->state.check_time;
x->mean_reclength= x->records ?
(ulong) ((x->data_file_length - x->delete_length) / x->records) :
(ulong) share->min_pack_length;
}
if (flag & HA_STATUS_ERRKEY)
{
x->errkey = info->errkey;
x->dupp_key_pos= info->dupp_key_pos;
}
if (flag & HA_STATUS_CONST)
{
x->reclength = share->base.reclength;
x->max_data_file_length=share->base.max_data_file_length;
x->max_index_file_length=info->s->base.max_key_file_length;
x->filenr = info->dfile;
x->options = share->options;
x->create_time=share->state.create_time;
x->reflength= mi_get_pointer_length(share->base.max_data_file_length,
myisam_data_pointer_size);
x->record_offset= ((share->options &
(HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ?
0L : share->base.pack_reclength);
x->sortkey= -1; /* No clustering */
x->rec_per_key = share->state.rec_per_key_part;
x->key_map = share->state.key_map;
x->data_file_name = share->data_file_name;
x->index_file_name = share->index_file_name;
}
if ((flag & HA_STATUS_TIME) && !mysql_file_fstat(info->dfile, &state, MYF(0)))
{
MSAN_STAT_WORKAROUND(&state);
x->update_time=state.st_mtime;
}
else
x->update_time=0;
if (flag & HA_STATUS_AUTO)
{
x->auto_increment= share->state.auto_increment+1;
if (!x->auto_increment) /* This shouldn't happen */
x->auto_increment= ~(ulonglong) 0;
}
DBUG_RETURN(0);
}
|
O3
|
c
|
mi_status:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq (%rdi), %r13
movq 0x170(%rdi), %rax
movq %rax, 0x10(%rsi)
cmpl $0x1, %edx
je 0x7aee4
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
testb $0x2, %r14b
jne 0x7ad1e
leaq 0x480(%r13), %r12
cmpq $0x0, 0x4c0(%r13)
jne 0x7aefe
movq %r12, %rdi
callq 0x29220
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7c823
movq (%r15), %rax
cmpl $0x0, 0x368(%rax)
jne 0x7ad06
movq %r15, %rdi
xorl %esi, %esi
callq 0x7c916
movq 0x4c0(%r13), %rdi
testq %rdi, %rdi
jne 0x7af17
movq %r12, %rdi
callq 0x291e0
testb $0x10, %r14b
je 0x7ad91
movq 0x8(%r15), %rax
movq (%rax), %rcx
movq %rcx, (%rbx)
movq 0x8(%r15), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rbx)
movq 0x8(%r15), %rax
movq 0x10(%rax), %rdx
movq %rdx, 0x48(%rbx)
movq 0x8(%r15), %rax
movq 0x28(%rax), %rax
movq %rax, 0x28(%rbx)
movq 0x8(%r15), %rsi
movq 0x20(%rsi), %rsi
movq %rsi, 0x38(%rbx)
movzbl 0x12(%r13), %esi
movl %esi, 0x80(%rbx)
movq 0xe0(%r13), %rsi
movq %rsi, 0xa0(%rbx)
testq %rcx, %rcx
je 0x7ad86
subq %rdx, %rax
xorl %edx, %edx
divq %rcx
jmp 0x7ad8d
movq 0x320(%r13), %rax
movq %rax, 0x58(%rbx)
testb $0x20, %r14b
je 0x7adaf
movl 0x1f0(%r15), %eax
movl %eax, 0x88(%rbx)
movq 0x1a0(%r15), %rax
movq %rax, 0x20(%rbx)
testb $0x8, %r14b
je 0x7ae75
movq 0x140(%r13), %rax
movq %rax, 0x50(%rbx)
movq 0x110(%r13), %rax
movq %rax, 0x30(%rbx)
movq (%r15), %rax
movq 0x118(%rax), %rax
movq %rax, 0x40(%rbx)
movl 0x1c0(%r15), %eax
movl %eax, 0x90(%rbx)
movl 0x318(%r13), %eax
movl %eax, 0x84(%rbx)
movq 0xd0(%r13), %rax
movq %rax, 0x98(%rbx)
movq 0x110(%r13), %rdi
leaq 0x30a53d(%rip), %rax # 0x385350
movl (%rax), %esi
callq 0x90e1f
movl %eax, 0xb0(%rbx)
testb $0x5, 0x318(%r13)
je 0x7ae2e
xorl %eax, %eax
jmp 0x7ae35
movq 0x148(%r13), %rax
movq %rax, 0xb8(%rbx)
movl $0xffffffff, 0x8c(%rbx) # imm = 0xFFFFFFFF
movq 0x88(%r13), %rax
movq %rax, 0xc0(%rbx)
movq 0xc0(%r13), %rax
movq %rax, 0x68(%rbx)
movq 0x260(%r13), %rax
movq %rax, 0x70(%rbx)
movq 0x268(%r13), %rax
movq %rax, 0x78(%rbx)
testb $0x4, %r14b
je 0x7aebf
movl 0x1c0(%r15), %r15d
leaq 0x30b187(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x108(%rbp), %rdi
movl %r15d, %esi
movl $0xc, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x7af2c
leaq -0xc0(%rbp), %rsi
movl %r15d, %edi
xorl %edx, %edx
callq 0x9fb47
testl %eax, %eax
je 0x7aef8
xorl %eax, %eax
movq %rax, 0xa8(%rbx)
testb $0x40, %r14b
je 0x7aee4
movq 0x60(%r13), %rax
incq %rax
movq $-0x1, %rcx
cmovneq %rax, %rcx
movq %rcx, 0x60(%rbx)
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x68(%rbp), %rax
jmp 0x7aec1
leaq 0x60d35(%rip), %rsi # 0xdbc3a
movq %r12, %rdi
movl $0x2e, %edx
callq 0x2eb8f
jmp 0x7ace4
leaq 0x30b0f2(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x7ad16
leaq -0xc0(%rbp), %rdx
leaq -0x2c(%rbp), %r12
movq %rax, %rdi
movl %r15d, %esi
movq %r12, %rcx
callq 0x2d99f
movl (%r12), %eax
jmp 0x7aebb
|
mi_status:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov r13, [rdi]
mov rax, [rdi+170h]
mov [rsi+10h], rax
cmp edx, 1
jz loc_7AEE4
mov r14d, edx
mov rbx, rsi
mov r15, rdi
test r14b, 2
jnz short loc_7AD1E
lea r12, [r13+480h]
cmp qword ptr [r13+4C0h], 0
jnz loc_7AEFE
mov rdi, r12
call _pthread_mutex_lock
loc_7ACE4:
mov rdi, r15
xor esi, esi
xor edx, edx
call _mi_readinfo
mov rax, [r15]
cmp dword ptr [rax+368h], 0
jnz short loc_7AD06
mov rdi, r15
xor esi, esi
call _mi_writeinfo
loc_7AD06:
mov rdi, [r13+4C0h]
test rdi, rdi
jnz loc_7AF17
loc_7AD16:
mov rdi, r12
call _pthread_mutex_unlock
loc_7AD1E:
test r14b, 10h
jz short loc_7AD91
mov rax, [r15+8]
mov rcx, [rax]
mov [rbx], rcx
mov rax, [r15+8]
mov rax, [rax+8]
mov [rbx+8], rax
mov rax, [r15+8]
mov rdx, [rax+10h]
mov [rbx+48h], rdx
mov rax, [r15+8]
mov rax, [rax+28h]
mov [rbx+28h], rax
mov rsi, [r15+8]
mov rsi, [rsi+20h]
mov [rbx+38h], rsi
movzx esi, byte ptr [r13+12h]
mov [rbx+80h], esi
mov rsi, [r13+0E0h]
mov [rbx+0A0h], rsi
test rcx, rcx
jz short loc_7AD86
sub rax, rdx
xor edx, edx
div rcx
jmp short loc_7AD8D
loc_7AD86:
mov rax, [r13+320h]
loc_7AD8D:
mov [rbx+58h], rax
loc_7AD91:
test r14b, 20h
jz short loc_7ADAF
mov eax, [r15+1F0h]
mov [rbx+88h], eax
mov rax, [r15+1A0h]
mov [rbx+20h], rax
loc_7ADAF:
test r14b, 8
jz loc_7AE75
mov rax, [r13+140h]
mov [rbx+50h], rax
mov rax, [r13+110h]
mov [rbx+30h], rax
mov rax, [r15]
mov rax, [rax+118h]
mov [rbx+40h], rax
mov eax, [r15+1C0h]
mov [rbx+90h], eax
mov eax, [r13+318h]
mov [rbx+84h], eax
mov rax, [r13+0D0h]
mov [rbx+98h], rax
mov rdi, [r13+110h]
lea rax, myisam_data_pointer_size
mov esi, [rax]
call mi_get_pointer_length
mov [rbx+0B0h], eax
test byte ptr [r13+318h], 5
jz short loc_7AE2E
xor eax, eax
jmp short loc_7AE35
loc_7AE2E:
mov rax, [r13+148h]
loc_7AE35:
mov [rbx+0B8h], rax
mov dword ptr [rbx+8Ch], 0FFFFFFFFh
mov rax, [r13+88h]
mov [rbx+0C0h], rax
mov rax, [r13+0C0h]
mov [rbx+68h], rax
mov rax, [r13+260h]
mov [rbx+70h], rax
mov rax, [r13+268h]
mov [rbx+78h], rax
loc_7AE75:
test r14b, 4
jz short loc_7AEBF
mov r15d, [r15+1C0h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_108]
mov esi, r15d
mov edx, 0Ch
call qword ptr [rax+158h]
test rax, rax
jnz loc_7AF2C
lea rsi, [rbp+var_C0]
mov edi, r15d
xor edx, edx
call my_fstat
loc_7AEBB:
test eax, eax
jz short loc_7AEF8
loc_7AEBF:
xor eax, eax
loc_7AEC1:
mov [rbx+0A8h], rax
test r14b, 40h
jz short loc_7AEE4
mov rax, [r13+60h]
inc rax
mov rcx, 0FFFFFFFFFFFFFFFFh
cmovnz rcx, rax
mov [rbx+60h], rcx
loc_7AEE4:
xor eax, eax
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7AEF8:
mov rax, [rbp+var_68]
jmp short loc_7AEC1
loc_7AEFE:
lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r12
mov edx, 2Eh ; '.'
call psi_mutex_lock
jmp loc_7ACE4
loc_7AF17:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_7AD16
loc_7AF2C:
lea rdx, [rbp+var_C0]
lea r12, [rbp+var_2C]
mov rdi, rax
mov esi, r15d
mov rcx, r12
call mi_status_cold_1
mov eax, [r12]
jmp loc_7AEBB
|
long long mi_status(_DWORD *a1, long long a2, int a3)
{
long long v3; // r13
char v4; // r14
unsigned long long v5; // rcx
long long v6; // rdx
long long v7; // rax
unsigned long long v8; // rax
long long v9; // rax
unsigned int v10; // r15d
long long v11; // rax
int v12; // eax
long long v13; // rax
long long v14; // rcx
_BYTE v16[72]; // [rsp+8h] [rbp-108h] BYREF
_BYTE v17[88]; // [rsp+50h] [rbp-C0h] BYREF
long long v18; // [rsp+A8h] [rbp-68h]
_DWORD v19[11]; // [rsp+E4h] [rbp-2Ch] BYREF
v3 = *(_QWORD *)a1;
*(_QWORD *)(a2 + 16) = *((_QWORD *)a1 + 46);
if ( a3 != 1 )
{
v4 = a3;
if ( (a3 & 2) == 0 )
{
if ( *(_QWORD *)(v3 + 1216) )
psi_mutex_lock(v3 + 1152, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_info.c", 0x2Eu);
else
pthread_mutex_lock(v3 + 1152);
mi_readinfo(a1, 0LL, 0LL);
if ( !*(_DWORD *)(*(_QWORD *)a1 + 872LL) )
mi_writeinfo(a1, 0LL);
if ( *(_QWORD *)(v3 + 1216) )
PSI_server[44]();
pthread_mutex_unlock(v3 + 1152);
}
if ( (v4 & 0x10) != 0 )
{
v5 = **((_QWORD **)a1 + 1);
*(_QWORD *)a2 = v5;
*(_QWORD *)(a2 + 8) = *(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL);
v6 = *(_QWORD *)(*((_QWORD *)a1 + 1) + 16LL);
*(_QWORD *)(a2 + 72) = v6;
v7 = *(_QWORD *)(*((_QWORD *)a1 + 1) + 40LL);
*(_QWORD *)(a2 + 40) = v7;
*(_QWORD *)(a2 + 56) = *(_QWORD *)(*((_QWORD *)a1 + 1) + 32LL);
*(_DWORD *)(a2 + 128) = *(unsigned __int8 *)(v3 + 18);
*(_QWORD *)(a2 + 160) = *(_QWORD *)(v3 + 224);
if ( v5 )
v8 = (v7 - v6) / v5;
else
v8 = *(_QWORD *)(v3 + 800);
*(_QWORD *)(a2 + 88) = v8;
}
if ( (v4 & 0x20) != 0 )
{
*(_DWORD *)(a2 + 136) = a1[124];
*(_QWORD *)(a2 + 32) = *((_QWORD *)a1 + 52);
}
if ( (v4 & 8) != 0 )
{
*(_QWORD *)(a2 + 80) = *(_QWORD *)(v3 + 320);
*(_QWORD *)(a2 + 48) = *(_QWORD *)(v3 + 272);
*(_QWORD *)(a2 + 64) = *(_QWORD *)(*(_QWORD *)a1 + 280LL);
*(_DWORD *)(a2 + 144) = a1[112];
*(_DWORD *)(a2 + 132) = *(_DWORD *)(v3 + 792);
*(_QWORD *)(a2 + 152) = *(_QWORD *)(v3 + 208);
*(_DWORD *)(a2 + 176) = mi_get_pointer_length(*(_QWORD *)(v3 + 272), myisam_data_pointer_size);
if ( (*(_BYTE *)(v3 + 792) & 5) != 0 )
v9 = 0LL;
else
v9 = *(_QWORD *)(v3 + 328);
*(_QWORD *)(a2 + 184) = v9;
*(_DWORD *)(a2 + 140) = -1;
*(_QWORD *)(a2 + 192) = *(_QWORD *)(v3 + 136);
*(_QWORD *)(a2 + 104) = *(_QWORD *)(v3 + 192);
*(_QWORD *)(a2 + 112) = *(_QWORD *)(v3 + 608);
*(_QWORD *)(a2 + 120) = *(_QWORD *)(v3 + 616);
}
if ( (v4 & 4) != 0
&& ((v10 = a1[112], (v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v16, v10, 12LL)) != 0)
? (mi_status_cold_1(v11, v10, (long long)v17, v19), v12 = v19[0])
: (v12 = my_fstat(v10, v17, 0LL)),
!v12) )
{
v13 = v18;
}
else
{
v13 = 0LL;
}
*(_QWORD *)(a2 + 168) = v13;
if ( (v4 & 0x40) != 0 )
{
v14 = -1LL;
if ( *(_QWORD *)(v3 + 96) != -1LL )
v14 = *(_QWORD *)(v3 + 96) + 1LL;
*(_QWORD *)(a2 + 96) = v14;
}
}
return 0LL;
}
|
mi_status:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R13,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x170]
MOV qword ptr [RSI + 0x10],RAX
CMP EDX,0x1
JZ 0x0017aee4
MOV R14D,EDX
MOV RBX,RSI
MOV R15,RDI
TEST R14B,0x2
JNZ 0x0017ad1e
LEA R12,[R13 + 0x480]
CMP qword ptr [R13 + 0x4c0],0x0
JNZ 0x0017aefe
MOV RDI,R12
CALL 0x00129220
LAB_0017ace4:
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0017c823
MOV RAX,qword ptr [R15]
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x0017ad06
MOV RDI,R15
XOR ESI,ESI
CALL 0x0017c916
LAB_0017ad06:
MOV RDI,qword ptr [R13 + 0x4c0]
TEST RDI,RDI
JNZ 0x0017af17
LAB_0017ad16:
MOV RDI,R12
CALL 0x001291e0
LAB_0017ad1e:
TEST R14B,0x10
JZ 0x0017ad91
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBX],RCX
MOV RAX,qword ptr [R15 + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV RDX,qword ptr [RAX + 0x10]
MOV qword ptr [RBX + 0x48],RDX
MOV RAX,qword ptr [R15 + 0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBX + 0x28],RAX
MOV RSI,qword ptr [R15 + 0x8]
MOV RSI,qword ptr [RSI + 0x20]
MOV qword ptr [RBX + 0x38],RSI
MOVZX ESI,byte ptr [R13 + 0x12]
MOV dword ptr [RBX + 0x80],ESI
MOV RSI,qword ptr [R13 + 0xe0]
MOV qword ptr [RBX + 0xa0],RSI
TEST RCX,RCX
JZ 0x0017ad86
SUB RAX,RDX
XOR EDX,EDX
DIV RCX
JMP 0x0017ad8d
LAB_0017ad86:
MOV RAX,qword ptr [R13 + 0x320]
LAB_0017ad8d:
MOV qword ptr [RBX + 0x58],RAX
LAB_0017ad91:
TEST R14B,0x20
JZ 0x0017adaf
MOV EAX,dword ptr [R15 + 0x1f0]
MOV dword ptr [RBX + 0x88],EAX
MOV RAX,qword ptr [R15 + 0x1a0]
MOV qword ptr [RBX + 0x20],RAX
LAB_0017adaf:
TEST R14B,0x8
JZ 0x0017ae75
MOV RAX,qword ptr [R13 + 0x140]
MOV qword ptr [RBX + 0x50],RAX
MOV RAX,qword ptr [R13 + 0x110]
MOV qword ptr [RBX + 0x30],RAX
MOV RAX,qword ptr [R15]
MOV RAX,qword ptr [RAX + 0x118]
MOV qword ptr [RBX + 0x40],RAX
MOV EAX,dword ptr [R15 + 0x1c0]
MOV dword ptr [RBX + 0x90],EAX
MOV EAX,dword ptr [R13 + 0x318]
MOV dword ptr [RBX + 0x84],EAX
MOV RAX,qword ptr [R13 + 0xd0]
MOV qword ptr [RBX + 0x98],RAX
MOV RDI,qword ptr [R13 + 0x110]
LEA RAX,[0x485350]
MOV ESI,dword ptr [RAX]
CALL 0x00190e1f
MOV dword ptr [RBX + 0xb0],EAX
TEST byte ptr [R13 + 0x318],0x5
JZ 0x0017ae2e
XOR EAX,EAX
JMP 0x0017ae35
LAB_0017ae2e:
MOV RAX,qword ptr [R13 + 0x148]
LAB_0017ae35:
MOV qword ptr [RBX + 0xb8],RAX
MOV dword ptr [RBX + 0x8c],0xffffffff
MOV RAX,qword ptr [R13 + 0x88]
MOV qword ptr [RBX + 0xc0],RAX
MOV RAX,qword ptr [R13 + 0xc0]
MOV qword ptr [RBX + 0x68],RAX
MOV RAX,qword ptr [R13 + 0x260]
MOV qword ptr [RBX + 0x70],RAX
MOV RAX,qword ptr [R13 + 0x268]
MOV qword ptr [RBX + 0x78],RAX
LAB_0017ae75:
TEST R14B,0x4
JZ 0x0017aebf
MOV R15D,dword ptr [R15 + 0x1c0]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x108]
MOV ESI,R15D
MOV EDX,0xc
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0017af2c
LEA RSI,[RBP + -0xc0]
MOV EDI,R15D
XOR EDX,EDX
CALL 0x0019fb47
LAB_0017aebb:
TEST EAX,EAX
JZ 0x0017aef8
LAB_0017aebf:
XOR EAX,EAX
LAB_0017aec1:
MOV qword ptr [RBX + 0xa8],RAX
TEST R14B,0x40
JZ 0x0017aee4
MOV RAX,qword ptr [R13 + 0x60]
INC RAX
MOV RCX,-0x1
CMOVNZ RCX,RAX
MOV qword ptr [RBX + 0x60],RCX
LAB_0017aee4:
XOR EAX,EAX
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017aef8:
MOV RAX,qword ptr [RBP + -0x68]
JMP 0x0017aec1
LAB_0017aefe:
LEA RSI,[0x1dbc3a]
MOV RDI,R12
MOV EDX,0x2e
CALL 0x0012eb8f
JMP 0x0017ace4
LAB_0017af17:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0017ad16
LAB_0017af2c:
LEA RDX,[RBP + -0xc0]
LEA R12,[RBP + -0x2c]
MOV RDI,RAX
MOV ESI,R15D
MOV RCX,R12
CALL 0x0012d99f
MOV EAX,dword ptr [R12]
JMP 0x0017aebb
|
int8 mi_status(long *param_1,ulong *param_2,uint param_3)
{
pthread_mutex_t *__mutex;
long lVar1;
int4 uVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
ulong uVar6;
int1 local_110 [72];
int1 local_c8 [88];
ulong local_70;
int local_34;
lVar1 = *param_1;
param_2[2] = param_1[0x2e];
if (param_3 == 1) {
return 0;
}
if ((param_3 & 2) == 0) {
__mutex = (pthread_mutex_t *)(lVar1 + 0x480);
if (*(long *)(lVar1 + 0x4c0) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_info.c",
0x2e);
}
_mi_readinfo(param_1,0,0);
if (*(int *)(*param_1 + 0x368) == 0) {
_mi_writeinfo(param_1,0);
}
if (*(long *)(lVar1 + 0x4c0) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
}
if ((param_3 & 0x10) != 0) {
uVar3 = *(ulong *)param_1[1];
*param_2 = uVar3;
param_2[1] = *(ulong *)(param_1[1] + 8);
uVar4 = *(ulong *)(param_1[1] + 0x10);
param_2[9] = uVar4;
uVar6 = *(ulong *)(param_1[1] + 0x28);
param_2[5] = uVar6;
param_2[7] = *(ulong *)(param_1[1] + 0x20);
*(uint *)(param_2 + 0x10) = (uint)*(byte *)(lVar1 + 0x12);
param_2[0x14] = *(ulong *)(lVar1 + 0xe0);
if (uVar3 == 0) {
uVar3 = *(ulong *)(lVar1 + 800);
}
else {
uVar3 = (uVar6 - uVar4) / uVar3;
}
param_2[0xb] = uVar3;
}
if ((param_3 & 0x20) != 0) {
*(int *)(param_2 + 0x11) = (int)param_1[0x3e];
param_2[4] = param_1[0x34];
}
if ((param_3 & 8) != 0) {
param_2[10] = *(ulong *)(lVar1 + 0x140);
param_2[6] = *(ulong *)(lVar1 + 0x110);
param_2[8] = *(ulong *)(*param_1 + 0x118);
*(int *)(param_2 + 0x12) = (int)param_1[0x38];
*(int4 *)((long)param_2 + 0x84) = *(int4 *)(lVar1 + 0x318);
param_2[0x13] = *(ulong *)(lVar1 + 0xd0);
uVar2 = mi_get_pointer_length
(*(int8 *)(lVar1 + 0x110),(int4)myisam_data_pointer_size);
*(int4 *)(param_2 + 0x16) = uVar2;
if ((*(byte *)(lVar1 + 0x318) & 5) == 0) {
uVar4 = *(ulong *)(lVar1 + 0x148);
}
else {
uVar4 = 0;
}
param_2[0x17] = uVar4;
*(int4 *)((long)param_2 + 0x8c) = 0xffffffff;
param_2[0x18] = *(ulong *)(lVar1 + 0x88);
param_2[0xd] = *(ulong *)(lVar1 + 0xc0);
param_2[0xe] = *(ulong *)(lVar1 + 0x260);
param_2[0xf] = *(ulong *)(lVar1 + 0x268);
}
if ((param_3 & 4) != 0) {
uVar2 = (int4)param_1[0x38];
lVar5 = (**(code **)(PSI_server + 0x158))(local_110,uVar2,0xc);
if (lVar5 == 0) {
local_34 = my_fstat(uVar2,local_c8,0);
}
else {
mi_status_cold_1(lVar5,uVar2,local_c8,&local_34);
}
if (local_34 == 0) goto LAB_0017aec1;
}
local_70 = 0;
LAB_0017aec1:
param_2[0x15] = local_70;
if ((param_3 & 0x40) != 0) {
uVar6 = *(long *)(lVar1 + 0x60) + 1;
uVar4 = 0xffffffffffffffff;
if (uVar6 != 0) {
uVar4 = uVar6;
}
param_2[0xc] = uVar4;
}
return 0;
}
|
|
16,781
|
mi_cmp_dynamic_unique
|
eloqsql/storage/myisam/mi_dynrec.c
|
int _mi_cmp_dynamic_unique(MI_INFO *info, MI_UNIQUEDEF *def,
const uchar *record, my_off_t pos)
{
uchar *rec_buff,*old_record;
int error;
DBUG_ENTER("_mi_cmp_dynamic_unique");
if (!(old_record=my_alloca(info->s->base.reclength)))
DBUG_RETURN(1);
/* Don't let the compare destroy blobs that may be in use */
rec_buff=info->rec_buff;
if (info->s->base.blobs)
info->rec_buff=0;
error=_mi_read_dynamic_record(info,pos,old_record);
if (!error)
error=mi_unique_comp(def, record, old_record, def->null_are_equal);
if (info->s->base.blobs)
{
my_free(mi_get_rec_buff_ptr(info, info->rec_buff));
info->rec_buff=rec_buff;
}
my_afree(old_record);
DBUG_RETURN(error);
}
|
O3
|
c
|
mi_cmp_dynamic_unique:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x140(%rax), %rsi
xorl %edi, %edi
xorl %edx, %edx
callq 0x9fd89
testq %rax, %rax
je 0x7948d
movq %rax, %r14
movq (%rbx), %rax
movq 0x120(%rbx), %rcx
movq %rcx, -0x30(%rbp)
cmpl $0x0, 0x188(%rax)
je 0x7941b
movq $0x0, 0x120(%rbx)
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x790b8
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x7944a
movsbl 0x3(%r12), %ecx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x878c6
movl %eax, %r13d
movq (%rbx), %rax
cmpl $0x0, 0x188(%rax)
je 0x79483
movq 0x120(%rbx), %rcx
leaq -0x18(%rcx), %rdi
testq %rcx, %rcx
cmoveq %rcx, %rdi
testb $0x1, 0x318(%rax)
cmoveq %rcx, %rdi
callq 0x9ffb6
movq -0x30(%rbp), %rax
movq %rax, 0x120(%rbx)
movq %r14, %rdi
callq 0x9ffb6
jmp 0x79493
movl $0x1, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_mi_cmp_dynamic_unique:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rax, [rdi]
mov rsi, [rax+140h]
xor edi, edi
xor edx, edx
call my_malloc
test rax, rax
jz loc_7948D
mov r14, rax
mov rax, [rbx]
mov rcx, [rbx+120h]
mov [rbp+var_30], rcx
cmp dword ptr [rax+188h], 0
jz short loc_7941B
mov qword ptr [rbx+120h], 0
loc_7941B:
mov rdi, rbx
mov rsi, r13
mov rdx, r14
call _mi_read_dynamic_record
mov r13d, 0FFFFFFFFh
test eax, eax
jnz short loc_7944A
movsx ecx, byte ptr [r12+3]
mov rdi, r12
mov rsi, r15
mov rdx, r14
call mi_unique_comp
mov r13d, eax
loc_7944A:
mov rax, [rbx]
cmp dword ptr [rax+188h], 0
jz short loc_79483
mov rcx, [rbx+120h]
lea rdi, [rcx-18h]
test rcx, rcx
cmovz rdi, rcx
test byte ptr [rax+318h], 1
cmovz rdi, rcx
call my_free
mov rax, [rbp+var_30]
mov [rbx+120h], rax
loc_79483:
mov rdi, r14
call my_free
jmp short loc_79493
loc_7948D:
mov r13d, 1
loc_79493:
mov eax, r13d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long mi_cmp_dynamic_unique(_QWORD *a1, long long a2, long long a3, unsigned long long a4)
{
const char *v7; // rax
const char *v8; // r14
int dynamic_record; // eax
unsigned int v10; // r13d
long long v11; // rax
long long v12; // rcx
long long v13; // rdi
long long v15; // [rsp+0h] [rbp-30h]
v7 = (const char *)my_malloc(0LL, *(_QWORD *)(*a1 + 320LL), 0LL);
if ( v7 )
{
v8 = v7;
v15 = a1[36];
if ( *(_DWORD *)(*a1 + 392LL) )
a1[36] = 0LL;
dynamic_record = mi_read_dynamic_record(a1, a4, v7);
v10 = -1;
if ( !dynamic_record )
v10 = mi_unique_comp(a2, a3, v8, (unsigned int)*(char *)(a2 + 3));
v11 = *a1;
if ( *(_DWORD *)(*a1 + 392LL) )
{
v12 = a1[36];
v13 = v12 - 24;
if ( !v12 )
v13 = 0LL;
if ( (*(_BYTE *)(v11 + 792) & 1) == 0 )
v13 = a1[36];
my_free(v13);
a1[36] = v15;
}
my_free(v8);
}
else
{
return 1;
}
return v10;
}
|
_mi_cmp_dynamic_unique:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RAX + 0x140]
XOR EDI,EDI
XOR EDX,EDX
CALL 0x0019fd89
TEST RAX,RAX
JZ 0x0017948d
MOV R14,RAX
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x120]
MOV qword ptr [RBP + -0x30],RCX
CMP dword ptr [RAX + 0x188],0x0
JZ 0x0017941b
MOV qword ptr [RBX + 0x120],0x0
LAB_0017941b:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R14
CALL 0x001790b8
MOV R13D,0xffffffff
TEST EAX,EAX
JNZ 0x0017944a
MOVSX ECX,byte ptr [R12 + 0x3]
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x001878c6
MOV R13D,EAX
LAB_0017944a:
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x188],0x0
JZ 0x00179483
MOV RCX,qword ptr [RBX + 0x120]
LEA RDI,[RCX + -0x18]
TEST RCX,RCX
CMOVZ RDI,RCX
TEST byte ptr [RAX + 0x318],0x1
CMOVZ RDI,RCX
CALL 0x0019ffb6
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBX + 0x120],RAX
LAB_00179483:
MOV RDI,R14
CALL 0x0019ffb6
JMP 0x00179493
LAB_0017948d:
MOV R13D,0x1
LAB_00179493:
MOV EAX,R13D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 _mi_cmp_dynamic_unique(long *param_1,long param_2,int8 param_3,int8 param_4)
{
long lVar1;
long lVar2;
int iVar3;
int4 uVar4;
long lVar5;
long lVar6;
lVar5 = my_malloc(0,*(int8 *)(*param_1 + 0x140),0);
if (lVar5 == 0) {
uVar4 = 1;
}
else {
lVar1 = param_1[0x24];
if (*(int *)(*param_1 + 0x188) != 0) {
param_1[0x24] = 0;
}
iVar3 = _mi_read_dynamic_record(param_1,param_4,lVar5);
uVar4 = 0xffffffff;
if (iVar3 == 0) {
uVar4 = mi_unique_comp(param_2,param_3,lVar5,(int)*(char *)(param_2 + 3));
}
if (*(int *)(*param_1 + 0x188) != 0) {
lVar2 = param_1[0x24];
lVar6 = lVar2 + -0x18;
if (lVar2 == 0) {
lVar6 = lVar2;
}
if ((*(byte *)(*param_1 + 0x318) & 1) == 0) {
lVar6 = lVar2;
}
my_free(lVar6);
param_1[0x24] = lVar1;
}
my_free(lVar5);
}
return uVar4;
}
|
|
16,782
|
ggml_backend_cpu_aarch64_buffer_type()
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
|
ggml_backend_buffer_type_t ggml_backend_cpu_aarch64_buffer_type(void) {
static struct ggml_backend_buffer_type ggml_backend_cpu_buffer_type_aarch64 = {
/* .iface = */ {
/* .get_name = */ ggml_backend_cpu_aarch64_buffer_type_get_name,
/* .alloc_buffer = */ ggml_backend_cpu_aarch64_buffer_type_alloc_buffer,
/* .get_alignment = */ ggml_backend_cpu_aarch64_buffer_type_get_alignment,
/* .get_max_size = */ nullptr, // defaults to SIZE_MAX
/* .get_alloc_size = */ nullptr, // defaults to ggml_nbytes
/* .is_host = */ nullptr,
},
/* .device = */ ggml_backend_reg_dev_get(ggml_backend_cpu_reg(), 0),
/* .context = */ new ggml::cpu::aarch64::extra_buffer_type(),
};
return &ggml_backend_cpu_buffer_type_aarch64;
}
|
O1
|
cpp
|
ggml_backend_cpu_aarch64_buffer_type():
pushq %rbx
movb 0x60350(%rip), %al # 0x8d8d0
testb %al, %al
je 0x2d58d
leaq 0x60305(%rip), %rax # 0x8d890
popq %rbx
retq
leaq 0x6033c(%rip), %rdi # 0x8d8d0
callq 0x8ac0
testl %eax, %eax
je 0x2d584
leaq 0x97(%rip), %rax # 0x2d63b
movq %rax, 0x602e5(%rip) # 0x8d890
leaq 0x91(%rip), %rax # 0x2d643
movq %rax, 0x602df(%rip) # 0x8d898
leaq 0xd1(%rip), %rax # 0x2d691
movq %rax, 0x602d9(%rip) # 0x8d8a0
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, 0x602d5(%rip) # 0x8d8a8
movq $0x0, 0x602da(%rip) # 0x8d8b8
callq 0x8230
movq %rax, %rdi
xorl %esi, %esi
callq 0x8a00
movq %rax, 0x602cc(%rip) # 0x8d8c0
movl $0x8, %edi
callq 0x8620
movq 0x1b973(%rip), %rcx # 0x48f78
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, 0x602b5(%rip) # 0x8d8c8
leaq 0x602b6(%rip), %rdi # 0x8d8d0
callq 0x83a0
jmp 0x2d584
movq %rax, %rbx
leaq 0x602a2(%rip), %rdi # 0x8d8d0
callq 0x8390
movq %rbx, %rdi
callq 0x8a70
|
_Z36ggml_backend_cpu_aarch64_buffer_typev:
push rbx
mov al, cs:_ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; `guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
test al, al
jz short loc_2D58D
loc_2D584:
lea rax, _ZZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
pop rbx
retn
loc_2D58D:
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_acquire
test eax, eax
jz short loc_2D584
lea rax, _ZL45ggml_backend_cpu_aarch64_buffer_type_get_nameP24ggml_backend_buffer_type; ggml_backend_cpu_aarch64_buffer_type_get_name(ggml_backend_buffer_type *)
mov cs:_ZZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64, rax; ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
lea rax, _ZL49ggml_backend_cpu_aarch64_buffer_type_alloc_bufferP24ggml_backend_buffer_typem; ggml_backend_cpu_aarch64_buffer_type_alloc_buffer(ggml_backend_buffer_type *,ulong)
mov cs:qword_8D898, rax
lea rax, _ZL50ggml_backend_cpu_aarch64_buffer_type_get_alignmentP24ggml_backend_buffer_type; ggml_backend_cpu_aarch64_buffer_type_get_alignment(ggml_backend_buffer_type *)
mov cs:qword_8D8A0, rax
vxorps xmm0, xmm0, xmm0
vmovups cs:xmmword_8D8A8, xmm0
mov cs:qword_8D8B8, 0
call _ggml_backend_cpu_reg
mov rdi, rax
xor esi, esi
call _ggml_backend_reg_dev_get
mov cs:qword_8D8C0, rax
mov edi, 8; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, cs:_ZTVN4ggml3cpu7aarch6417extra_buffer_typeE_ptr
add rcx, 10h
mov [rax], rcx
mov cs:qword_8D8C8, rax
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_release
jmp loc_2D584
mov rbx, rax
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_abort
mov rdi, rbx
call __Unwind_Resume
|
long long * ggml_backend_cpu_aarch64_buffer_type(__m128 _XMM0)
{
void *v3; // rax
_QWORD *v4; // rax
if ( !(_BYTE)`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
&& __cxa_guard_acquire(&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64) )
{
ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64 = (long long)ggml_backend_cpu_aarch64_buffer_type_get_name;
qword_8D898 = (long long)ggml_backend_cpu_aarch64_buffer_type_alloc_buffer;
qword_8D8A0 = (long long)ggml_backend_cpu_aarch64_buffer_type_get_alignment;
__asm
{
vxorps xmm0, xmm0, xmm0
vmovups cs:xmmword_8D8A8, xmm0
}
qword_8D8B8 = 0LL;
v3 = ggml_backend_cpu_reg((long long)&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64);
qword_8D8C0 = ggml_backend_reg_dev_get(v3, 0LL, *(double *)&_XMM0);
v4 = (_QWORD *)operator new(8uLL);
*v4 = &`vtable for'ggml::cpu::aarch64::extra_buffer_type + 2;
qword_8D8C8 = (long long)v4;
__cxa_guard_release(&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64);
}
return &ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64;
}
|
ggml_backend_cpu_aarch64_buffer_type:
PUSH RBX
MOV AL,byte ptr [0x0018d8d0]
TEST AL,AL
JZ 0x0012d58d
LAB_0012d584:
LEA RAX,[0x18d890]
POP RBX
RET
LAB_0012d58d:
LEA RDI,[0x18d8d0]
CALL 0x00108ac0
TEST EAX,EAX
JZ 0x0012d584
LEA RAX,[0x12d63b]
MOV qword ptr [0x0018d890],RAX
LEA RAX,[0x12d643]
MOV qword ptr [0x0018d898],RAX
LEA RAX,[0x12d691]
MOV qword ptr [0x0018d8a0],RAX
VXORPS XMM0,XMM0,XMM0
VMOVUPS xmmword ptr [0x0018d8a8],XMM0
MOV qword ptr [0x0018d8b8],0x0
LAB_0012d5de:
CALL 0x00108230
MOV RDI,RAX
XOR ESI,ESI
CALL 0x00108a00
MOV qword ptr [0x0018d8c0],RAX
MOV EDI,0x8
CALL 0x00108620
LAB_0012d5fe:
MOV RCX,qword ptr [0x00148f78]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV qword ptr [0x0018d8c8],RAX
LEA RDI,[0x18d8d0]
CALL 0x001083a0
JMP 0x0012d584
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* ggml_backend_cpu_aarch64_buffer_type() */
int1 * ggml_backend_cpu_aarch64_buffer_type(void)
{
int iVar1;
int8 uVar2;
if (ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64 == '\0') {
iVar1 = __cxa_guard_acquire(&ggml_backend_cpu_aarch64_buffer_type()::
ggml_backend_cpu_buffer_type_aarch64);
if (iVar1 != 0) {
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._0_8_ =
ggml_backend_cpu_aarch64_buffer_type_get_name;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._8_8_ =
ggml_backend_cpu_aarch64_buffer_type_alloc_buffer;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._16_8_ =
ggml_backend_cpu_aarch64_buffer_type_get_alignment;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._24_8_ = 0;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._32_8_ = 0;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._40_8_ = 0;
/* try { // try from 0012d5de to 0012d5fd has its CatchHandler @ 0012d624 */
uVar2 = ggml_backend_cpu_reg();
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._48_8_ =
ggml_backend_reg_dev_get(uVar2,0);
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._56_8_ =
operator_new(8);
*(int **)
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._56_8_ =
PTR_vtable_00148f78 + 0x10;
__cxa_guard_release(&ggml_backend_cpu_aarch64_buffer_type()::
ggml_backend_cpu_buffer_type_aarch64);
}
}
return ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64;
}
|
|
16,783
|
ggml_backend_cpu_aarch64_buffer_type()
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
|
ggml_backend_buffer_type_t ggml_backend_cpu_aarch64_buffer_type(void) {
static struct ggml_backend_buffer_type ggml_backend_cpu_buffer_type_aarch64 = {
/* .iface = */ {
/* .get_name = */ ggml_backend_cpu_aarch64_buffer_type_get_name,
/* .alloc_buffer = */ ggml_backend_cpu_aarch64_buffer_type_alloc_buffer,
/* .get_alignment = */ ggml_backend_cpu_aarch64_buffer_type_get_alignment,
/* .get_max_size = */ nullptr, // defaults to SIZE_MAX
/* .get_alloc_size = */ nullptr, // defaults to ggml_nbytes
/* .is_host = */ nullptr,
},
/* .device = */ ggml_backend_reg_dev_get(ggml_backend_cpu_reg(), 0),
/* .context = */ new ggml::cpu::aarch64::extra_buffer_type(),
};
return &ggml_backend_cpu_buffer_type_aarch64;
}
|
O2
|
cpp
|
ggml_backend_cpu_aarch64_buffer_type():
pushq %rbx
movb 0x5f5e5(%rip), %al # 0x8a9a0
testb %al, %al
je 0x2b3c8
leaq 0x5f59a(%rip), %rax # 0x8a960
popq %rbx
retq
leaq 0x5f5d1(%rip), %rdi # 0x8a9a0
callq 0x8c20
testl %eax, %eax
je 0x2b3bf
leaq 0x92(%rip), %rax # 0x2b471
movq %rax, 0x5f57a(%rip) # 0x8a960
leaq 0x8c(%rip), %rax # 0x2b479
movq %rax, 0x5f574(%rip) # 0x8a968
leaq 0xc8(%rip), %rax # 0x2b4c3
movq %rax, 0x5f56e(%rip) # 0x8a970
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, 0x5f56a(%rip) # 0x8a978
andq $0x0, 0x5f572(%rip) # 0x8a988
callq 0x8280
movq %rax, %rdi
xorl %esi, %esi
callq 0x8b50
movq %rax, 0x5f564(%rip) # 0x8a990
pushq $0x8
popq %rdi
callq 0x8700
movq 0x1ab3d(%rip), %rcx # 0x45f78
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, 0x5f54f(%rip) # 0x8a998
leaq 0x5f550(%rip), %rdi # 0x8a9a0
callq 0x8450
jmp 0x2b3bf
movq %rax, %rbx
leaq 0x5f53c(%rip), %rdi # 0x8a9a0
callq 0x8440
movq %rbx, %rdi
callq 0x8bd0
|
_Z36ggml_backend_cpu_aarch64_buffer_typev:
push rbx
mov al, cs:_ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; `guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
test al, al
jz short loc_2B3C8
loc_2B3BF:
lea rax, _ZZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
pop rbx
retn
loc_2B3C8:
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_acquire
test eax, eax
jz short loc_2B3BF
lea rax, _ZL45ggml_backend_cpu_aarch64_buffer_type_get_nameP24ggml_backend_buffer_type; ggml_backend_cpu_aarch64_buffer_type_get_name(ggml_backend_buffer_type *)
mov cs:_ZZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64, rax; ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
lea rax, _ZL49ggml_backend_cpu_aarch64_buffer_type_alloc_bufferP24ggml_backend_buffer_typem; ggml_backend_cpu_aarch64_buffer_type_alloc_buffer(ggml_backend_buffer_type *,ulong)
mov cs:qword_8A968, rax
lea rax, _ZL50ggml_backend_cpu_aarch64_buffer_type_get_alignmentP24ggml_backend_buffer_type; ggml_backend_cpu_aarch64_buffer_type_get_alignment(ggml_backend_buffer_type *)
mov cs:qword_8A970, rax
vxorps xmm0, xmm0, xmm0
vmovups cs:xmmword_8A978, xmm0
and cs:qword_8A988, 0
call _ggml_backend_cpu_reg
mov rdi, rax
xor esi, esi
call _ggml_backend_reg_dev_get
mov cs:qword_8A990, rax
push 8
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, cs:_ZTVN4ggml3cpu7aarch6417extra_buffer_typeE_ptr
add rcx, 10h
mov [rax], rcx
mov cs:qword_8A998, rax
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_release
jmp loc_2B3BF
mov rbx, rax
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_abort
mov rdi, rbx
call __Unwind_Resume
|
long long * ggml_backend_cpu_aarch64_buffer_type(__m128 _XMM0)
{
void *v3; // rax
_QWORD *v4; // rax
if ( !(_BYTE)`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
&& __cxa_guard_acquire(&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64) )
{
ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64 = (long long)ggml_backend_cpu_aarch64_buffer_type_get_name;
qword_8A968 = (long long)ggml_backend_cpu_aarch64_buffer_type_alloc_buffer;
qword_8A970 = (long long)ggml_backend_cpu_aarch64_buffer_type_get_alignment;
__asm
{
vxorps xmm0, xmm0, xmm0
vmovups cs:xmmword_8A978, xmm0
}
qword_8A988 = 0LL;
v3 = ggml_backend_cpu_reg((long long)&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64);
qword_8A990 = ggml_backend_reg_dev_get(v3, 0LL, *(double *)&_XMM0);
v4 = (_QWORD *)operator new(8uLL);
*v4 = &`vtable for'ggml::cpu::aarch64::extra_buffer_type + 2;
qword_8A998 = (long long)v4;
__cxa_guard_release(&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64);
}
return &ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64;
}
|
ggml_backend_cpu_aarch64_buffer_type:
PUSH RBX
MOV AL,byte ptr [0x0018a9a0]
TEST AL,AL
JZ 0x0012b3c8
LAB_0012b3bf:
LEA RAX,[0x18a960]
POP RBX
RET
LAB_0012b3c8:
LEA RDI,[0x18a9a0]
CALL 0x00108c20
TEST EAX,EAX
JZ 0x0012b3bf
LEA RAX,[0x12b471]
MOV qword ptr [0x0018a960],RAX
LEA RAX,[0x12b479]
MOV qword ptr [0x0018a968],RAX
LEA RAX,[0x12b4c3]
MOV qword ptr [0x0018a970],RAX
VXORPS XMM0,XMM0,XMM0
VMOVUPS xmmword ptr [0x0018a978],XMM0
AND qword ptr [0x0018a988],0x0
LAB_0012b416:
CALL 0x00108280
MOV RDI,RAX
XOR ESI,ESI
CALL 0x00108b50
MOV qword ptr [0x0018a990],RAX
PUSH 0x8
POP RDI
CALL 0x00108700
LAB_0012b434:
MOV RCX,qword ptr [0x00145f78]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV qword ptr [0x0018a998],RAX
LEA RDI,[0x18a9a0]
CALL 0x00108450
JMP 0x0012b3bf
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* ggml_backend_cpu_aarch64_buffer_type() */
int1 * ggml_backend_cpu_aarch64_buffer_type(void)
{
int iVar1;
int8 uVar2;
if (ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64 == '\0') {
iVar1 = __cxa_guard_acquire(&ggml_backend_cpu_aarch64_buffer_type()::
ggml_backend_cpu_buffer_type_aarch64);
if (iVar1 != 0) {
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._0_8_ =
ggml_backend_cpu_aarch64_buffer_type_get_name;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._8_8_ =
ggml_backend_cpu_aarch64_buffer_type_alloc_buffer;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._16_8_ =
ggml_backend_cpu_aarch64_buffer_type_get_alignment;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._24_8_ = 0;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._32_8_ = 0;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._40_8_ = 0;
/* try { // try from 0012b416 to 0012b433 has its CatchHandler @ 0012b45a */
uVar2 = ggml_backend_cpu_reg();
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._48_8_ =
ggml_backend_reg_dev_get(uVar2,0);
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._56_8_ =
operator_new(8);
*(int **)
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._56_8_ =
PTR_vtable_00145f78 + 0x10;
__cxa_guard_release(&ggml_backend_cpu_aarch64_buffer_type()::
ggml_backend_cpu_buffer_type_aarch64);
}
}
return ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64;
}
|
|
16,784
|
ggml_backend_cpu_aarch64_buffer_type()
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
|
ggml_backend_buffer_type_t ggml_backend_cpu_aarch64_buffer_type(void) {
static struct ggml_backend_buffer_type ggml_backend_cpu_buffer_type_aarch64 = {
/* .iface = */ {
/* .get_name = */ ggml_backend_cpu_aarch64_buffer_type_get_name,
/* .alloc_buffer = */ ggml_backend_cpu_aarch64_buffer_type_alloc_buffer,
/* .get_alignment = */ ggml_backend_cpu_aarch64_buffer_type_get_alignment,
/* .get_max_size = */ nullptr, // defaults to SIZE_MAX
/* .get_alloc_size = */ nullptr, // defaults to ggml_nbytes
/* .is_host = */ nullptr,
},
/* .device = */ ggml_backend_reg_dev_get(ggml_backend_cpu_reg(), 0),
/* .context = */ new ggml::cpu::aarch64::extra_buffer_type(),
};
return &ggml_backend_cpu_buffer_type_aarch64;
}
|
O3
|
cpp
|
ggml_backend_cpu_aarch64_buffer_type():
pushq %rbx
movb 0x5fb00(%rip), %al # 0x8d8d0
testb %al, %al
je 0x2dddd
leaq 0x5fab5(%rip), %rax # 0x8d890
popq %rbx
retq
leaq 0x5faec(%rip), %rdi # 0x8d8d0
callq 0x8ac0
testl %eax, %eax
je 0x2ddd4
leaq 0x97(%rip), %rax # 0x2de8b
movq %rax, 0x5fa95(%rip) # 0x8d890
leaq 0x91(%rip), %rax # 0x2de93
movq %rax, 0x5fa8f(%rip) # 0x8d898
leaq 0xcd(%rip), %rax # 0x2dedd
movq %rax, 0x5fa89(%rip) # 0x8d8a0
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, 0x5fa85(%rip) # 0x8d8a8
movq $0x0, 0x5fa8a(%rip) # 0x8d8b8
callq 0x8230
movq %rax, %rdi
xorl %esi, %esi
callq 0x8a00
movq %rax, 0x5fa7c(%rip) # 0x8d8c0
movl $0x8, %edi
callq 0x8620
movq 0x1b123(%rip), %rcx # 0x48f78
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, 0x5fa65(%rip) # 0x8d8c8
leaq 0x5fa66(%rip), %rdi # 0x8d8d0
callq 0x83a0
jmp 0x2ddd4
movq %rax, %rbx
leaq 0x5fa52(%rip), %rdi # 0x8d8d0
callq 0x8390
movq %rbx, %rdi
callq 0x8a70
|
_Z36ggml_backend_cpu_aarch64_buffer_typev:
push rbx
mov al, cs:_ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; `guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
test al, al
jz short loc_2DDDD
loc_2DDD4:
lea rax, _ZZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
pop rbx
retn
loc_2DDDD:
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_acquire
test eax, eax
jz short loc_2DDD4
lea rax, _ZL45ggml_backend_cpu_aarch64_buffer_type_get_nameP24ggml_backend_buffer_type; ggml_backend_cpu_aarch64_buffer_type_get_name(ggml_backend_buffer_type *)
mov cs:_ZZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64, rax; ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
lea rax, _ZL49ggml_backend_cpu_aarch64_buffer_type_alloc_bufferP24ggml_backend_buffer_typem; ggml_backend_cpu_aarch64_buffer_type_alloc_buffer(ggml_backend_buffer_type *,ulong)
mov cs:qword_8D898, rax
lea rax, _ZL50ggml_backend_cpu_aarch64_buffer_type_get_alignmentP24ggml_backend_buffer_type; ggml_backend_cpu_aarch64_buffer_type_get_alignment(ggml_backend_buffer_type *)
mov cs:qword_8D8A0, rax
vxorps xmm0, xmm0, xmm0
vmovups cs:xmmword_8D8A8, xmm0
mov cs:qword_8D8B8, 0
call _ggml_backend_cpu_reg
mov rdi, rax
xor esi, esi
call _ggml_backend_reg_dev_get
mov cs:qword_8D8C0, rax
mov edi, 8; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, cs:_ZTVN4ggml3cpu7aarch6417extra_buffer_typeE_ptr
add rcx, 10h
mov [rax], rcx
mov cs:qword_8D8C8, rax
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_release
jmp loc_2DDD4
mov rbx, rax
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_abort
mov rdi, rbx
call __Unwind_Resume
|
long long * ggml_backend_cpu_aarch64_buffer_type(__m128 _XMM0)
{
void *v3; // rax
_QWORD *v4; // rax
if ( !(_BYTE)`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
&& __cxa_guard_acquire(&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64) )
{
ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64 = (long long)ggml_backend_cpu_aarch64_buffer_type_get_name;
qword_8D898 = (long long)ggml_backend_cpu_aarch64_buffer_type_alloc_buffer;
qword_8D8A0 = (long long)ggml_backend_cpu_aarch64_buffer_type_get_alignment;
__asm
{
vxorps xmm0, xmm0, xmm0
vmovups cs:xmmword_8D8A8, xmm0
}
qword_8D8B8 = 0LL;
v3 = ggml_backend_cpu_reg((long long)&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64);
qword_8D8C0 = ggml_backend_reg_dev_get(v3, 0LL, *(double *)&_XMM0);
v4 = (_QWORD *)operator new(8uLL);
*v4 = &`vtable for'ggml::cpu::aarch64::extra_buffer_type + 2;
qword_8D8C8 = (long long)v4;
__cxa_guard_release(&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64);
}
return &ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64;
}
|
ggml_backend_cpu_aarch64_buffer_type:
PUSH RBX
MOV AL,byte ptr [0x0018d8d0]
TEST AL,AL
JZ 0x0012dddd
LAB_0012ddd4:
LEA RAX,[0x18d890]
POP RBX
RET
LAB_0012dddd:
LEA RDI,[0x18d8d0]
CALL 0x00108ac0
TEST EAX,EAX
JZ 0x0012ddd4
LEA RAX,[0x12de8b]
MOV qword ptr [0x0018d890],RAX
LEA RAX,[0x12de93]
MOV qword ptr [0x0018d898],RAX
LEA RAX,[0x12dedd]
MOV qword ptr [0x0018d8a0],RAX
VXORPS XMM0,XMM0,XMM0
VMOVUPS xmmword ptr [0x0018d8a8],XMM0
MOV qword ptr [0x0018d8b8],0x0
LAB_0012de2e:
CALL 0x00108230
MOV RDI,RAX
XOR ESI,ESI
CALL 0x00108a00
MOV qword ptr [0x0018d8c0],RAX
MOV EDI,0x8
CALL 0x00108620
LAB_0012de4e:
MOV RCX,qword ptr [0x00148f78]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV qword ptr [0x0018d8c8],RAX
LEA RDI,[0x18d8d0]
CALL 0x001083a0
JMP 0x0012ddd4
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* ggml_backend_cpu_aarch64_buffer_type() */
int1 * ggml_backend_cpu_aarch64_buffer_type(void)
{
int iVar1;
int8 uVar2;
if (ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64 == '\0') {
iVar1 = __cxa_guard_acquire(&ggml_backend_cpu_aarch64_buffer_type()::
ggml_backend_cpu_buffer_type_aarch64);
if (iVar1 != 0) {
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._0_8_ =
ggml_backend_cpu_aarch64_buffer_type_get_name;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._8_8_ =
ggml_backend_cpu_aarch64_buffer_type_alloc_buffer;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._16_8_ =
ggml_backend_cpu_aarch64_buffer_type_get_alignment;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._24_8_ = 0;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._32_8_ = 0;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._40_8_ = 0;
/* try { // try from 0012de2e to 0012de4d has its CatchHandler @ 0012de74 */
uVar2 = ggml_backend_cpu_reg();
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._48_8_ =
ggml_backend_reg_dev_get(uVar2,0);
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._56_8_ =
operator_new(8);
*(int **)
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._56_8_ =
PTR_vtable_00148f78 + 0x10;
__cxa_guard_release(&ggml_backend_cpu_aarch64_buffer_type()::
ggml_backend_cpu_buffer_type_aarch64);
}
}
return ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64;
}
|
|
16,785
|
mp_sqrtrem_rec
|
bluesky950520[P]quickjs/libbf.c
|
static int mp_sqrtrem_rec(bf_context_t *s, limb_t *tabs, limb_t *taba, limb_t n,
limb_t *tmp_buf, limb_t *prh)
{
limb_t l, h, rh, ql, qh, c, i;
if (n == 1) {
*prh = mp_sqrtrem2(tabs, taba);
return 0;
}
#ifdef DEBUG_SQRTREM
mp_print_str("a", taba, 2 * n);
#endif
l = n / 2;
h = n - l;
if (mp_sqrtrem_rec(s, tabs + l, taba + 2 * l, h, tmp_buf, &qh))
return -1;
#ifdef DEBUG_SQRTREM
mp_print_str("s1", tabs + l, h);
mp_print_str_h("r1", taba + 2 * l, h, qh);
mp_print_str_h("r2", taba + l, n, qh);
#endif
/* the remainder is in taba + 2 * l. Its high bit is in qh */
if (qh) {
mp_sub(taba + 2 * l, taba + 2 * l, tabs + l, h, 0);
}
/* instead of dividing by 2*s, divide by s (which is normalized)
and update q and r */
if (mp_divnorm(s, tmp_buf, taba + l, n, tabs + l, h))
return -1;
qh += tmp_buf[l];
for(i = 0; i < l; i++)
tabs[i] = tmp_buf[i];
ql = mp_shr(tabs, tabs, l, 1, qh & 1);
qh = qh >> 1; /* 0 or 1 */
if (ql)
rh = mp_add(taba + l, taba + l, tabs + l, h, 0);
else
rh = 0;
#ifdef DEBUG_SQRTREM
mp_print_str_h("q", tabs, l, qh);
mp_print_str_h("u", taba + l, h, rh);
#endif
mp_add_ui(tabs + l, qh, h);
#ifdef DEBUG_SQRTREM
mp_print_str_h("s2", tabs, n, sh);
#endif
/* q = qh, tabs[l - 1 ... 0], r = taba[n - 1 ... l] */
/* subtract q^2. if qh = 1 then q = B^l, so we can take shortcuts */
if (qh) {
c = qh;
} else {
if (mp_mul(s, taba + n, tabs, l, tabs, l))
return -1;
c = mp_sub(taba, taba, taba + n, 2 * l, 0);
}
rh -= mp_sub_ui(taba + 2 * l, c, n - 2 * l);
if ((slimb_t)rh < 0) {
mp_sub_ui(tabs, 1, n);
rh += mp_add_mul1(taba, tabs, n, 2);
rh += mp_add_ui(taba, 1, n);
}
*prh = rh;
return 0;
}
|
O0
|
c
|
mp_sqrtrem_rec:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
movq %r8, 0x48(%rsp)
movq %r9, 0x40(%rsp)
cmpq $0x1, 0x50(%rsp)
jne 0xefbd1
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0xfc7f0
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x74(%rsp)
jmp 0xeff18
movq 0x50(%rsp), %rax
shrq %rax
movq %rax, 0x38(%rsp)
movq 0x50(%rsp), %rax
subq 0x38(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x38(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x58(%rsp), %rdx
movq 0x38(%rsp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x30(%rsp), %rcx
movq 0x48(%rsp), %r8
leaq 0x18(%rsp), %r9
callq 0xefb80
cmpl $0x0, %eax
je 0xefc3d
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0xeff18
cmpq $0x0, 0x18(%rsp)
je 0xefc8d
movq 0x58(%rsp), %rdi
movq 0x38(%rsp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdi
movq 0x58(%rsp), %rsi
movq 0x38(%rsp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x60(%rsp), %rdx
movq 0x38(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x30(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xed720
movq 0x68(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x38(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x50(%rsp), %rcx
movq 0x60(%rsp), %r8
movq 0x38(%rsp), %rax
shlq $0x3, %rax
addq %rax, %r8
movq 0x30(%rsp), %r9
callq 0xee380
cmpl $0x0, %eax
je 0xefcda
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0xeff18
movq 0x48(%rsp), %rax
movq 0x38(%rsp), %rcx
movq (%rax,%rcx,8), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0xefd33
movq 0x48(%rsp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x60(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0xefcfb
movq 0x60(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x18(%rsp), %r8
andq $0x1, %r8
movl $0x1, %ecx
callq 0xf04b0
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
shrq %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0xefdb8
movq 0x58(%rsp), %rdi
movq 0x38(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq 0x58(%rsp), %rsi
movq 0x38(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x60(%rsp), %rdx
movq 0x38(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x30(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xed5a0
movq %rax, 0x28(%rsp)
jmp 0xefdc1
movq $0x0, 0x28(%rsp)
movq 0x60(%rsp), %rdi
movq 0x38(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq 0x18(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0xed680
cmpq $0x0, 0x18(%rsp)
je 0xefdf5
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0xefe68
movq 0x68(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x60(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq 0x60(%rsp), %r8
movq 0x38(%rsp), %r9
callq 0xed8a0
cmpl $0x0, %eax
je 0xefe36
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0xeff18
movq 0x58(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x50(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x38(%rsp), %rcx
shlq %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xed720
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rdi
movq 0x38(%rsp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdi
movq 0x10(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x38(%rsp), %rax
shlq %rax
subq %rax, %rdx
callq 0xed800
movq %rax, %rcx
movq 0x28(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jge 0xeff03
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rdx
movl $0x1, %esi
callq 0xed800
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x50(%rsp), %rdx
movl $0x2, %ecx
callq 0xfc080
addq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rdx
movl $0x1, %esi
callq 0xed680
addq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
|
mp_sqrtrem_rec:
sub rsp, 78h
mov [rsp+78h+var_10], rdi
mov [rsp+78h+var_18], rsi
mov [rsp+78h+var_20], rdx
mov [rsp+78h+var_28], rcx
mov [rsp+78h+var_30], r8
mov [rsp+78h+var_38], r9
cmp [rsp+78h+var_28], 1
jnz short loc_EFBD1
mov rdi, [rsp+78h+var_18]
mov rsi, [rsp+78h+var_20]
call mp_sqrtrem2
mov rcx, rax
mov rax, [rsp+78h+var_38]
mov [rax], rcx
mov [rsp+78h+var_4], 0
jmp loc_EFF18
loc_EFBD1:
mov rax, [rsp+78h+var_28]
shr rax, 1
mov [rsp+78h+var_40], rax
mov rax, [rsp+78h+var_28]
sub rax, [rsp+78h+var_40]
mov [rsp+78h+var_48], rax
mov rdi, [rsp+78h+var_10]
mov rsi, [rsp+78h+var_18]
mov rax, [rsp+78h+var_40]
shl rax, 3
add rsi, rax
mov rdx, [rsp+78h+var_20]
mov rax, [rsp+78h+var_40]
shl rax, 1
shl rax, 3
add rdx, rax
mov rcx, [rsp+78h+var_48]
mov r8, [rsp+78h+var_30]
lea r9, [rsp+78h+var_60]
call mp_sqrtrem_rec
cmp eax, 0
jz short loc_EFC3D
mov [rsp+78h+var_4], 0FFFFFFFFh
jmp loc_EFF18
loc_EFC3D:
cmp [rsp+78h+var_60], 0
jz short loc_EFC8D
mov rdi, [rsp+78h+var_20]
mov rax, [rsp+78h+var_40]
shl rax, 1
shl rax, 3
add rdi, rax
mov rsi, [rsp+78h+var_20]
mov rax, [rsp+78h+var_40]
shl rax, 1
shl rax, 3
add rsi, rax
mov rdx, [rsp+78h+var_18]
mov rax, [rsp+78h+var_40]
shl rax, 3
add rdx, rax
mov rcx, [rsp+78h+var_48]
xor eax, eax
mov r8d, eax
call mp_sub
loc_EFC8D:
mov rdi, [rsp+78h+var_10]
mov rsi, [rsp+78h+var_30]
mov rdx, [rsp+78h+var_20]
mov rax, [rsp+78h+var_40]
shl rax, 3
add rdx, rax
mov rcx, [rsp+78h+var_28]
mov r8, [rsp+78h+var_18]
mov rax, [rsp+78h+var_40]
shl rax, 3
add r8, rax
mov r9, [rsp+78h+var_48]
call mp_divnorm
cmp eax, 0
jz short loc_EFCDA
mov [rsp+78h+var_4], 0FFFFFFFFh
jmp loc_EFF18
loc_EFCDA:
mov rax, [rsp+78h+var_30]
mov rcx, [rsp+78h+var_40]
mov rax, [rax+rcx*8]
add rax, [rsp+78h+var_60]
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_70], 0
loc_EFCFB:
mov rax, [rsp+78h+var_70]
cmp rax, [rsp+78h+var_40]
jnb short loc_EFD33
mov rax, [rsp+78h+var_30]
mov rcx, [rsp+78h+var_70]
mov rdx, [rax+rcx*8]
mov rax, [rsp+78h+var_18]
mov rcx, [rsp+78h+var_70]
mov [rax+rcx*8], rdx
mov rax, [rsp+78h+var_70]
add rax, 1
mov [rsp+78h+var_70], rax
jmp short loc_EFCFB
loc_EFD33:
mov rdi, [rsp+78h+var_18]
mov rsi, [rsp+78h+var_18]
mov rdx, [rsp+78h+var_40]
mov r8, [rsp+78h+var_60]
and r8, 1
mov ecx, 1
call mp_shr
mov [rsp+78h+var_58], rax
mov rax, [rsp+78h+var_60]
shr rax, 1
mov [rsp+78h+var_60], rax
cmp [rsp+78h+var_58], 0
jz short loc_EFDB8
mov rdi, [rsp+78h+var_20]
mov rax, [rsp+78h+var_40]
shl rax, 3
add rdi, rax
mov rsi, [rsp+78h+var_20]
mov rax, [rsp+78h+var_40]
shl rax, 3
add rsi, rax
mov rdx, [rsp+78h+var_18]
mov rax, [rsp+78h+var_40]
shl rax, 3
add rdx, rax
mov rcx, [rsp+78h+var_48]
xor eax, eax
mov r8d, eax
call mp_add
mov [rsp+78h+var_50], rax
jmp short loc_EFDC1
loc_EFDB8:
mov [rsp+78h+var_50], 0
loc_EFDC1:
mov rdi, [rsp+78h+var_18]
mov rax, [rsp+78h+var_40]
shl rax, 3
add rdi, rax
mov rsi, [rsp+78h+var_60]
mov rdx, [rsp+78h+var_48]
call mp_add_ui
cmp [rsp+78h+var_60], 0
jz short loc_EFDF5
mov rax, [rsp+78h+var_60]
mov [rsp+78h+var_68], rax
jmp short loc_EFE68
loc_EFDF5:
mov rdi, [rsp+78h+var_10]
mov rsi, [rsp+78h+var_20]
mov rax, [rsp+78h+var_28]
shl rax, 3
add rsi, rax
mov rdx, [rsp+78h+var_18]
mov rcx, [rsp+78h+var_40]
mov r8, [rsp+78h+var_18]
mov r9, [rsp+78h+var_40]
call mp_mul
cmp eax, 0
jz short loc_EFE36
mov [rsp+78h+var_4], 0FFFFFFFFh
jmp loc_EFF18
loc_EFE36:
mov rdi, [rsp+78h+var_20]
mov rsi, [rsp+78h+var_20]
mov rdx, [rsp+78h+var_20]
mov rax, [rsp+78h+var_28]
shl rax, 3
add rdx, rax
mov rcx, [rsp+78h+var_40]
shl rcx, 1
xor eax, eax
mov r8d, eax
call mp_sub
mov [rsp+78h+var_68], rax
loc_EFE68:
mov rdi, [rsp+78h+var_20]
mov rax, [rsp+78h+var_40]
shl rax, 1
shl rax, 3
add rdi, rax
mov rsi, [rsp+78h+var_68]
mov rdx, [rsp+78h+var_28]
mov rax, [rsp+78h+var_40]
shl rax, 1
sub rdx, rax
call mp_sub_ui
mov rcx, rax
mov rax, [rsp+78h+var_50]
sub rax, rcx
mov [rsp+78h+var_50], rax
cmp [rsp+78h+var_50], 0
jge short loc_EFF03
mov rdi, [rsp+78h+var_18]
mov rdx, [rsp+78h+var_28]
mov esi, 1
call mp_sub_ui
mov rdi, [rsp+78h+var_20]
mov rsi, [rsp+78h+var_18]
mov rdx, [rsp+78h+var_28]
mov ecx, 2
call mp_add_mul1
add rax, [rsp+78h+var_50]
mov [rsp+78h+var_50], rax
mov rdi, [rsp+78h+var_20]
mov rdx, [rsp+78h+var_28]
mov esi, 1
call mp_add_ui
add rax, [rsp+78h+var_50]
mov [rsp+78h+var_50], rax
loc_EFF03:
mov rcx, [rsp+78h+var_50]
mov rax, [rsp+78h+var_38]
mov [rax], rcx
mov [rsp+78h+var_4], 0
loc_EFF18:
mov eax, [rsp+78h+var_4]
add rsp, 78h
retn
|
long long mp_sqrtrem_rec(long long a1, long long a2, long long a3, unsigned long long a4, long long a5, long long *a6)
{
long long v6; // rax
long long v7; // rax
long long v8; // rax
unsigned long long i; // [rsp+8h] [rbp-70h]
_BOOL8 v11; // [rsp+10h] [rbp-68h]
unsigned long long v12; // [rsp+18h] [rbp-60h] BYREF
long long v13; // [rsp+20h] [rbp-58h]
long long v14; // [rsp+28h] [rbp-50h]
unsigned long long v15; // [rsp+30h] [rbp-48h]
unsigned long long v16; // [rsp+38h] [rbp-40h]
long long *v17; // [rsp+40h] [rbp-38h]
long long v18; // [rsp+48h] [rbp-30h]
unsigned long long v19; // [rsp+50h] [rbp-28h]
long long v20; // [rsp+58h] [rbp-20h]
long long v21; // [rsp+60h] [rbp-18h]
long long v22; // [rsp+68h] [rbp-10h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
if ( a4 == 1 )
{
*v17 = mp_sqrtrem2(v21, v20);
return 0;
}
else
{
v16 = v19 >> 1;
v15 = v19 - (v19 >> 1);
if ( (unsigned int)mp_sqrtrem_rec(v22, 8 * (v19 >> 1) + v21, 16 * (v19 >> 1) + v20, v15, v18, &v12) )
{
return (unsigned int)-1;
}
else
{
if ( v12 )
mp_sub(16 * v16 + v20, 16 * v16 + v20, 8 * v16 + v21, v15, 0LL);
if ( (unsigned int)mp_divnorm(v22, v18, (_QWORD *)(8 * v16 + v20), v19, 8 * v16 + v21, v15) )
{
return (unsigned int)-1;
}
else
{
v12 += *(_QWORD *)(v18 + 8 * v16);
for ( i = 0LL; i < v16; ++i )
*(_QWORD *)(v21 + 8 * i) = *(_QWORD *)(v18 + 8 * i);
v13 = mp_shr(v21, v21, v16, 1LL, v12 & 1);
v12 >>= 1;
if ( v13 )
v14 = mp_add(8 * v16 + v20, 8 * v16 + v20, 8 * v16 + v21, v15, 0LL);
else
v14 = 0LL;
mp_add_ui(8 * v16 + v21, v12, v15);
if ( v12 )
{
v6 = mp_sub_ui(16 * v16 + v20, v12, v19 - 2 * v16);
}
else
{
if ( (unsigned int)mp_mul(v22, 8 * v19 + v20, v21, v16, v21, v16) )
return (unsigned int)-1;
v11 = mp_sub(v20, v20, 8 * v19 + v20, 2 * v16, 0LL);
v6 = mp_sub_ui(16 * v16 + v20, v11, v19 - 2 * v16);
}
v14 -= v6;
if ( v14 < 0 )
{
mp_sub_ui(v21, 1LL, v19);
v7 = mp_add_mul1(v20, v21, v19, 2LL);
v14 += v7;
v8 = mp_add_ui(v20, 1LL, v19);
v14 += v8;
}
*v17 = v14;
return 0;
}
}
}
}
|
mp_sqrtrem_rec:
SUB RSP,0x78
MOV qword ptr [RSP + 0x68],RDI
MOV qword ptr [RSP + 0x60],RSI
MOV qword ptr [RSP + 0x58],RDX
MOV qword ptr [RSP + 0x50],RCX
MOV qword ptr [RSP + 0x48],R8
MOV qword ptr [RSP + 0x40],R9
CMP qword ptr [RSP + 0x50],0x1
JNZ 0x001efbd1
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x001fc7f0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX],RCX
MOV dword ptr [RSP + 0x74],0x0
JMP 0x001eff18
LAB_001efbd1:
MOV RAX,qword ptr [RSP + 0x50]
SHR RAX,0x1
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x50]
SUB RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x3
ADD RSI,RAX
MOV RDX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x1
SHL RAX,0x3
ADD RDX,RAX
MOV RCX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x48]
LEA R9,[RSP + 0x18]
CALL 0x001efb80
CMP EAX,0x0
JZ 0x001efc3d
MOV dword ptr [RSP + 0x74],0xffffffff
JMP 0x001eff18
LAB_001efc3d:
CMP qword ptr [RSP + 0x18],0x0
JZ 0x001efc8d
MOV RDI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x1
SHL RAX,0x3
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x1
SHL RAX,0x3
ADD RSI,RAX
MOV RDX,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x3
ADD RDX,RAX
MOV RCX,qword ptr [RSP + 0x30]
XOR EAX,EAX
MOV R8D,EAX
CALL 0x001ed720
LAB_001efc8d:
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x3
ADD RDX,RAX
MOV RCX,qword ptr [RSP + 0x50]
MOV R8,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x3
ADD R8,RAX
MOV R9,qword ptr [RSP + 0x30]
CALL 0x001ee380
CMP EAX,0x0
JZ 0x001efcda
MOV dword ptr [RSP + 0x74],0xffffffff
JMP 0x001eff18
LAB_001efcda:
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + RCX*0x8]
ADD RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x8],0x0
LAB_001efcfb:
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,qword ptr [RSP + 0x38]
JNC 0x001efd33
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001efcfb
LAB_001efd33:
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x38]
MOV R8,qword ptr [RSP + 0x18]
AND R8,0x1
MOV ECX,0x1
CALL 0x001f04b0
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x18]
SHR RAX,0x1
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x20],0x0
JZ 0x001efdb8
MOV RDI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x3
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x3
ADD RSI,RAX
MOV RDX,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x3
ADD RDX,RAX
MOV RCX,qword ptr [RSP + 0x30]
XOR EAX,EAX
MOV R8D,EAX
CALL 0x001ed5a0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001efdc1
LAB_001efdb8:
MOV qword ptr [RSP + 0x28],0x0
LAB_001efdc1:
MOV RDI,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x3
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x001ed680
CMP qword ptr [RSP + 0x18],0x0
JZ 0x001efdf5
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001efe68
LAB_001efdf5:
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x50]
SHL RAX,0x3
ADD RSI,RAX
MOV RDX,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RSP + 0x38]
MOV R8,qword ptr [RSP + 0x60]
MOV R9,qword ptr [RSP + 0x38]
CALL 0x001ed8a0
CMP EAX,0x0
JZ 0x001efe36
MOV dword ptr [RSP + 0x74],0xffffffff
JMP 0x001eff18
LAB_001efe36:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x50]
SHL RAX,0x3
ADD RDX,RAX
MOV RCX,qword ptr [RSP + 0x38]
SHL RCX,0x1
XOR EAX,EAX
MOV R8D,EAX
CALL 0x001ed720
MOV qword ptr [RSP + 0x10],RAX
LAB_001efe68:
MOV RDI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x1
SHL RAX,0x3
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x1
SUB RDX,RAX
CALL 0x001ed800
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,RCX
MOV qword ptr [RSP + 0x28],RAX
CMP qword ptr [RSP + 0x28],0x0
JGE 0x001eff03
MOV RDI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x50]
MOV ESI,0x1
CALL 0x001ed800
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x50]
MOV ECX,0x2
CALL 0x001fc080
ADD RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x50]
MOV ESI,0x1
CALL 0x001ed680
ADD RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x28],RAX
LAB_001eff03:
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX],RCX
MOV dword ptr [RSP + 0x74],0x0
LAB_001eff18:
MOV EAX,dword ptr [RSP + 0x74]
ADD RSP,0x78
RET
|
int4
mp_sqrtrem_rec(int8 param_1,long param_2,long param_3,ulong param_4,long param_5,long *param_6
)
{
int iVar1;
long lVar2;
ulong local_70;
ulong local_68;
ulong local_60;
long local_58;
long local_50;
long local_48;
ulong local_40;
long *local_38;
long local_30;
ulong local_28;
long local_20;
long local_18;
int8 local_10;
int4 local_4;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if (param_4 == 1) {
lVar2 = mp_sqrtrem2(param_2,param_3);
*local_38 = lVar2;
local_4 = 0;
}
else {
local_40 = param_4 >> 1;
local_48 = param_4 - local_40;
iVar1 = mp_sqrtrem_rec(param_1,param_2 + local_40 * 8,param_3 + local_40 * 0x10,local_48,param_5
,&local_60);
if (iVar1 == 0) {
if (local_60 != 0) {
mp_sub(local_20 + local_40 * 0x10,local_20 + local_40 * 0x10,local_18 + local_40 * 8,
local_48,0);
}
iVar1 = mp_divnorm(local_10,local_30,local_20 + local_40 * 8,local_28,local_18 + local_40 * 8,
local_48);
if (iVar1 == 0) {
local_60 = *(long *)(local_30 + local_40 * 8) + local_60;
for (local_70 = 0; local_70 < local_40; local_70 = local_70 + 1) {
*(int8 *)(local_18 + local_70 * 8) = *(int8 *)(local_30 + local_70 * 8);
}
local_58 = mp_shr(local_18,local_18,local_40,1,local_60 & 1);
local_60 = local_60 >> 1;
if (local_58 == 0) {
local_50 = 0;
}
else {
local_50 = mp_add(local_20 + local_40 * 8,local_20 + local_40 * 8,local_18 + local_40 * 8,
local_48,0);
}
mp_add_ui(local_18 + local_40 * 8,local_60,local_48);
if (local_60 == 0) {
iVar1 = mp_mul(local_10,local_20 + local_28 * 8,local_18,local_40,local_18,local_40);
if (iVar1 != 0) {
return 0xffffffff;
}
local_68 = mp_sub(local_20,local_20,local_20 + local_28 * 8,local_40 << 1,0);
}
else {
local_68 = local_60;
}
lVar2 = mp_sub_ui(local_20 + local_40 * 0x10,local_68,local_28 + local_40 * -2);
local_50 = local_50 - lVar2;
if (local_50 < 0) {
mp_sub_ui(local_18,1,local_28);
lVar2 = mp_add_mul1(local_20,local_18,local_28,2);
local_50 = lVar2 + local_50;
lVar2 = mp_add_ui(local_20,1,local_28);
local_50 = lVar2 + local_50;
}
*local_38 = local_50;
local_4 = 0;
}
else {
local_4 = 0xffffffff;
}
}
else {
local_4 = 0xffffffff;
}
}
return local_4;
}
|
|
16,786
|
mp_sqrtrem_rec
|
bluesky950520[P]quickjs/libbf.c
|
static int mp_sqrtrem_rec(bf_context_t *s, limb_t *tabs, limb_t *taba, limb_t n,
limb_t *tmp_buf, limb_t *prh)
{
limb_t l, h, rh, ql, qh, c, i;
if (n == 1) {
*prh = mp_sqrtrem2(tabs, taba);
return 0;
}
#ifdef DEBUG_SQRTREM
mp_print_str("a", taba, 2 * n);
#endif
l = n / 2;
h = n - l;
if (mp_sqrtrem_rec(s, tabs + l, taba + 2 * l, h, tmp_buf, &qh))
return -1;
#ifdef DEBUG_SQRTREM
mp_print_str("s1", tabs + l, h);
mp_print_str_h("r1", taba + 2 * l, h, qh);
mp_print_str_h("r2", taba + l, n, qh);
#endif
/* the remainder is in taba + 2 * l. Its high bit is in qh */
if (qh) {
mp_sub(taba + 2 * l, taba + 2 * l, tabs + l, h, 0);
}
/* instead of dividing by 2*s, divide by s (which is normalized)
and update q and r */
if (mp_divnorm(s, tmp_buf, taba + l, n, tabs + l, h))
return -1;
qh += tmp_buf[l];
for(i = 0; i < l; i++)
tabs[i] = tmp_buf[i];
ql = mp_shr(tabs, tabs, l, 1, qh & 1);
qh = qh >> 1; /* 0 or 1 */
if (ql)
rh = mp_add(taba + l, taba + l, tabs + l, h, 0);
else
rh = 0;
#ifdef DEBUG_SQRTREM
mp_print_str_h("q", tabs, l, qh);
mp_print_str_h("u", taba + l, h, rh);
#endif
mp_add_ui(tabs + l, qh, h);
#ifdef DEBUG_SQRTREM
mp_print_str_h("s2", tabs, n, sh);
#endif
/* q = qh, tabs[l - 1 ... 0], r = taba[n - 1 ... l] */
/* subtract q^2. if qh = 1 then q = B^l, so we can take shortcuts */
if (qh) {
c = qh;
} else {
if (mp_mul(s, taba + n, tabs, l, tabs, l))
return -1;
c = mp_sub(taba, taba, taba + n, 2 * l, 0);
}
rh -= mp_sub_ui(taba + 2 * l, c, n - 2 * l);
if ((slimb_t)rh < 0) {
mp_sub_ui(tabs, 1, n);
rh += mp_add_mul1(taba, tabs, n, 2);
rh += mp_add_ui(taba, 1, n);
}
*prh = rh;
return 0;
}
|
O2
|
c
|
mp_sqrtrem_rec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %r14
movq %rsi, %r12
cmpq $0x1, %rcx
jne 0x7526e
movq %r12, %rdi
movq %rdx, %rsi
callq 0x7c01d
movq %rax, %rbp
movq %rbp, (%r14)
xorl %ecx, %ecx
jmp 0x7531a
movq %r8, %r13
movq %r14, 0x28(%rsp)
movq %rcx, %r15
shrq %r15
movq %rcx, %rbp
subq %r15, %rbp
leaq (%r12,%r15,8), %rsi
movq %rcx, %rbx
andq $-0x2, %rbx
leaq (%rdx,%rbx,8), %r14
leaq 0x50(%rsp), %r9
movq %rsi, 0x8(%rsp)
movq %rdi, 0x20(%rsp)
movq %rcx, 0x30(%rsp)
movq %rdx, 0x18(%rsp)
movq %r14, %rdx
movq %rbp, %rcx
callq 0x7523c
pushq $-0x1
popq %rcx
testl %eax, %eax
jne 0x7531a
movq %rbx, 0x38(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x752e6
movq %r14, %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x73a82
movq %r14, 0x40(%rsp)
movq 0x18(%rsp), %rax
leaq (%rax,%r15,8), %rdx
movq 0x20(%rsp), %rdi
movq %r13, %rsi
movq %rdx, 0x48(%rsp)
movq 0x30(%rsp), %rcx
movq 0x8(%rsp), %r8
movq %rbp, %r9
callq 0x74416
testl %eax, %eax
je 0x7532b
pushq $-0x1
popq %rcx
movl %ecx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%rsp), %r14
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %rax
addq (%r13,%r15,8), %rax
movq %rax, 0x10(%rsp)
xorl %eax, %eax
cmpq %rax, %r15
je 0x75359
movq (%r13,%rax,8), %rcx
movq %rcx, (%r12,%rax,8)
incq %rax
jmp 0x75346
movq 0x10(%rsp), %r13
movl %r13d, %ecx
andl $0x1, %ecx
movq %r12, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x75802
shrq %r13
testq %rax, %rax
je 0x75396
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x73a33
movq %rbp, %rdx
movq %rax, %rbp
jmp 0x7539b
movq %rbp, %rdx
xorl %ebp, %ebp
movq 0x20(%rsp), %r14
movq %rbx, %rdi
movq %r13, %rsi
callq 0x73a60
cmpq $0x1, 0x10(%rsp)
movq 0x30(%rsp), %rbx
ja 0x7540d
movq %rbp, 0x8(%rsp)
movq %r14, %rdi
movq 0x18(%rsp), %rbp
leaq (,%rbx,8), %r13
addq %rbp, %r13
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r12, %r8
movq %r15, %r9
callq 0x73ada
testl %eax, %eax
pushq $-0x1
popq %rcx
jne 0x7531a
movq %rbp, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x73a82
movq %rax, %r13
movq 0x8(%rsp), %rbp
movl %ebx, %edx
andl $0x1, %edx
movq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0x73ab6
subq %rax, %rbp
jns 0x75463
pushq $0x1
popq %r14
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x73ab6
pushq $0x2
popq %rcx
movq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x7bfed
movq %rax, %r15
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x73a60
addq %r15, %rax
addq %rax, %rbp
movq 0x28(%rsp), %r14
jmp 0x75264
|
mp_sqrtrem_rec:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, r9
mov r12, rsi
cmp rcx, 1
jnz short loc_7526E
mov rdi, r12
mov rsi, rdx
call mp_sqrtrem2
mov rbp, rax
loc_75264:
mov [r14], rbp
xor ecx, ecx
jmp loc_7531A
loc_7526E:
mov r13, r8
mov [rsp+88h+var_60], r14
mov r15, rcx
shr r15, 1
mov rbp, rcx
sub rbp, r15
lea rsi, [r12+r15*8]
mov rbx, rcx
and rbx, 0FFFFFFFFFFFFFFFEh
lea r14, [rdx+rbx*8]
lea r9, [rsp+88h+var_38]
mov [rsp+88h+var_80], rsi
mov [rsp+88h+var_68], rdi
mov [rsp+88h+var_58], rcx
mov [rsp+88h+var_70], rdx
mov rdx, r14
mov rcx, rbp
call mp_sqrtrem_rec
push 0FFFFFFFFFFFFFFFFh
pop rcx
test eax, eax
jnz short loc_7531A
mov [rsp+88h+var_50], rbx
mov rax, [rsp+88h+var_38]
mov [rsp+88h+var_78], rax
test rax, rax
jz short loc_752E6
mov rdi, r14
mov rsi, r14
mov rdx, [rsp+88h+var_80]
mov rcx, rbp
xor r8d, r8d
call mp_sub
loc_752E6:
mov [rsp+88h+var_48], r14
mov rax, [rsp+88h+var_70]
lea rdx, [rax+r15*8]
mov rdi, [rsp+88h+var_68]
mov rsi, r13
mov [rsp+88h+var_40], rdx
mov rcx, [rsp+88h+var_58]
mov r8, [rsp+88h+var_80]
mov r9, rbp
call mp_divnorm
test eax, eax
jz short loc_7532B
push 0FFFFFFFFFFFFFFFFh
pop rcx
loc_7531A:
mov eax, ecx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7532B:
mov r14, [rsp+88h+var_40]
mov rbx, [rsp+88h+var_80]
mov rax, [rsp+88h+var_78]
add rax, [r13+r15*8+0]
mov [rsp+88h+var_78], rax
xor eax, eax
loc_75346:
cmp r15, rax
jz short loc_75359
mov rcx, [r13+rax*8+0]
mov [r12+rax*8], rcx
inc rax
jmp short loc_75346
loc_75359:
mov r13, [rsp+88h+var_78]
mov ecx, r13d
and ecx, 1
mov rdi, r12
mov rsi, r12
mov rdx, r15
call mp_shr
shr r13, 1
test rax, rax
jz short loc_75396
mov rdi, r14
mov rsi, r14
mov rdx, rbx
mov rcx, rbp
xor r8d, r8d
call mp_add
mov rdx, rbp
mov rbp, rax
jmp short loc_7539B
loc_75396:
mov rdx, rbp
xor ebp, ebp
loc_7539B:
mov r14, [rsp+88h+var_68]
mov rdi, rbx
mov rsi, r13
call mp_add_ui
cmp [rsp+88h+var_78], 1
mov rbx, [rsp+88h+var_58]
ja short loc_7540D
mov [rsp+88h+var_80], rbp
mov rdi, r14
mov rbp, [rsp+88h+var_70]
lea r13, ds:0[rbx*8]
add r13, rbp
mov rsi, r13
mov rdx, r12
mov rcx, r15
mov r8, r12
mov r9, r15
call mp_mul
test eax, eax
push 0FFFFFFFFFFFFFFFFh
pop rcx
jnz loc_7531A
mov rdi, rbp
mov rsi, rbp
mov rdx, r13
mov rcx, [rsp+88h+var_50]
xor r8d, r8d
call mp_sub
mov r13, rax
mov rbp, [rsp+88h+var_80]
loc_7540D:
mov edx, ebx
and edx, 1
mov rdi, [rsp+88h+var_48]
mov rsi, r13
call mp_sub_ui
sub rbp, rax
jns short loc_75463
push 1
pop r14
mov rdi, r12
mov rsi, r14
mov rdx, rbx
call mp_sub_ui
push 2
pop rcx
mov r13, [rsp+88h+var_70]
mov rdi, r13
mov rsi, r12
mov rdx, rbx
call mp_add_mul1
mov r15, rax
mov rdi, r13
mov rsi, r14
mov rdx, rbx
call mp_add_ui
add rax, r15
add rbp, rax
loc_75463:
mov r14, [rsp+88h+var_60]
jmp loc_75264
|
long long mp_sqrtrem_rec(_QWORD *a1, long long a2, long long a3, unsigned long long a4, long long a5, long long *a6)
{
long long *v6; // r14
long long v7; // rbp
unsigned int v8; // ecx
long long v10; // r15
unsigned long long v11; // rbp
unsigned long long v12; // rbx
long long v13; // r14
int v14; // eax
long long i; // rax
unsigned long long v17; // r13
long long v18; // rax
unsigned long long v19; // rdx
long long v20; // rbp
int v21; // eax
long long v22; // r15
long long v23; // [rsp+8h] [rbp-80h]
long long v24; // [rsp+10h] [rbp-78h]
unsigned long long v25; // [rsp+10h] [rbp-78h]
long long v29[7]; // [rsp+50h] [rbp-38h] BYREF
v6 = a6;
if ( a4 == 1 )
{
v7 = mp_sqrtrem2(a2, a3);
}
else
{
v10 = a4 >> 1;
v11 = a4 - (a4 >> 1);
v12 = a4 & 0xFFFFFFFFFFFFFFFELL;
v13 = a3 + 8 * (a4 & 0xFFFFFFFFFFFFFFFELL);
v23 = a2 + 8 * (a4 >> 1);
v14 = mp_sqrtrem_rec(a1, v23, v13, v11, a5, v29);
v8 = -1;
if ( v14 )
return v8;
v24 = v29[0];
if ( v29[0] )
mp_sub(v13, v13, v23, v11, 0LL);
if ( (unsigned int)mp_divnorm(a1, a5, (_QWORD *)(a3 + 8 * v10), a4, v23, v11) )
return (unsigned int)-1;
v25 = *(_QWORD *)(a5 + 8 * v10) + v24;
for ( i = 0LL; v10 != i; ++i )
*(_QWORD *)(a2 + 8 * i) = *(_QWORD *)(a5 + 8 * i);
v17 = v25 >> 1;
if ( mp_shr(a2, a2, v10, v25 & 1) )
{
v18 = mp_add(a3 + 8 * v10, a3 + 8 * v10, v23, v11, 0LL);
v19 = v11;
v20 = v18;
}
else
{
v19 = v11;
v20 = 0LL;
}
mp_add_ui(v23, v17, v19);
if ( v25 <= 1 )
{
v21 = mp_mul((int)a1, a3 + 8 * a4, a2, v10, a2, v10);
v8 = -1;
if ( v21 )
return v8;
v17 = mp_sub(a3, a3, a3 + 8 * a4, v12, 0LL);
}
v7 = v20 - mp_sub_ui(v13, v17, a4 & 1);
if ( v7 < 0 )
{
mp_sub_ui(a2, 1uLL, a4);
v22 = mp_add_mul1(a3, a2, a4, 2LL);
v7 += v22 + mp_add_ui(a3, 1LL, a4);
}
v6 = a6;
}
*v6 = v7;
return 0;
}
|
mp_sqrtrem_rec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,R9
MOV R12,RSI
CMP RCX,0x1
JNZ 0x0017526e
MOV RDI,R12
MOV RSI,RDX
CALL 0x0017c01d
MOV RBP,RAX
LAB_00175264:
MOV qword ptr [R14],RBP
XOR ECX,ECX
JMP 0x0017531a
LAB_0017526e:
MOV R13,R8
MOV qword ptr [RSP + 0x28],R14
MOV R15,RCX
SHR R15,0x1
MOV RBP,RCX
SUB RBP,R15
LEA RSI,[R12 + R15*0x8]
MOV RBX,RCX
AND RBX,-0x2
LEA R14,[RDX + RBX*0x8]
LEA R9,[RSP + 0x50]
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x18],RDX
MOV RDX,R14
MOV RCX,RBP
CALL 0x0017523c
PUSH -0x1
POP RCX
TEST EAX,EAX
JNZ 0x0017531a
MOV qword ptr [RSP + 0x38],RBX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x001752e6
MOV RDI,R14
MOV RSI,R14
MOV RDX,qword ptr [RSP + 0x8]
MOV RCX,RBP
XOR R8D,R8D
CALL 0x00173a82
LAB_001752e6:
MOV qword ptr [RSP + 0x40],R14
MOV RAX,qword ptr [RSP + 0x18]
LEA RDX,[RAX + R15*0x8]
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,R13
MOV qword ptr [RSP + 0x48],RDX
MOV RCX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x8]
MOV R9,RBP
CALL 0x00174416
TEST EAX,EAX
JZ 0x0017532b
PUSH -0x1
POP RCX
LAB_0017531a:
MOV EAX,ECX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017532b:
MOV R14,qword ptr [RSP + 0x48]
MOV RBX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,qword ptr [R13 + R15*0x8]
MOV qword ptr [RSP + 0x10],RAX
XOR EAX,EAX
LAB_00175346:
CMP R15,RAX
JZ 0x00175359
MOV RCX,qword ptr [R13 + RAX*0x8]
MOV qword ptr [R12 + RAX*0x8],RCX
INC RAX
JMP 0x00175346
LAB_00175359:
MOV R13,qword ptr [RSP + 0x10]
MOV ECX,R13D
AND ECX,0x1
MOV RDI,R12
MOV RSI,R12
MOV RDX,R15
CALL 0x00175802
SHR R13,0x1
TEST RAX,RAX
JZ 0x00175396
MOV RDI,R14
MOV RSI,R14
MOV RDX,RBX
MOV RCX,RBP
XOR R8D,R8D
CALL 0x00173a33
MOV RDX,RBP
MOV RBP,RAX
JMP 0x0017539b
LAB_00175396:
MOV RDX,RBP
XOR EBP,EBP
LAB_0017539b:
MOV R14,qword ptr [RSP + 0x20]
MOV RDI,RBX
MOV RSI,R13
CALL 0x00173a60
CMP qword ptr [RSP + 0x10],0x1
MOV RBX,qword ptr [RSP + 0x30]
JA 0x0017540d
MOV qword ptr [RSP + 0x8],RBP
MOV RDI,R14
MOV RBP,qword ptr [RSP + 0x18]
LEA R13,[RBX*0x8]
ADD R13,RBP
MOV RSI,R13
MOV RDX,R12
MOV RCX,R15
MOV R8,R12
MOV R9,R15
CALL 0x00173ada
TEST EAX,EAX
PUSH -0x1
POP RCX
JNZ 0x0017531a
MOV RDI,RBP
MOV RSI,RBP
MOV RDX,R13
MOV RCX,qword ptr [RSP + 0x38]
XOR R8D,R8D
CALL 0x00173a82
MOV R13,RAX
MOV RBP,qword ptr [RSP + 0x8]
LAB_0017540d:
MOV EDX,EBX
AND EDX,0x1
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,R13
CALL 0x00173ab6
SUB RBP,RAX
JNS 0x00175463
PUSH 0x1
POP R14
MOV RDI,R12
MOV RSI,R14
MOV RDX,RBX
CALL 0x00173ab6
PUSH 0x2
POP RCX
MOV R13,qword ptr [RSP + 0x18]
MOV RDI,R13
MOV RSI,R12
MOV RDX,RBX
CALL 0x0017bfed
MOV R15,RAX
MOV RDI,R13
MOV RSI,R14
MOV RDX,RBX
CALL 0x00173a60
ADD RAX,R15
ADD RBP,RAX
LAB_00175463:
MOV R14,qword ptr [RSP + 0x28]
JMP 0x00175264
|
int4
mp_sqrtrem_rec(int8 param_1,long param_2,long param_3,ulong param_4,long param_5,long *param_6
)
{
int iVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
ulong uVar9;
long local_38;
if (param_4 == 1) {
lVar2 = mp_sqrtrem2(param_2,param_3);
}
else {
uVar9 = param_4 >> 1;
lVar7 = param_4 - uVar9;
lVar8 = param_2 + uVar9 * 8;
lVar6 = param_3 + (param_4 & 0xfffffffffffffffe) * 8;
iVar1 = mp_sqrtrem_rec(param_1,lVar8,lVar6,lVar7,param_5,&local_38);
if (iVar1 != 0) {
return 0xffffffff;
}
if (local_38 != 0) {
mp_sub(lVar6,lVar6,lVar8,lVar7,0);
}
lVar2 = param_3 + uVar9 * 8;
iVar1 = mp_divnorm(param_1,param_5,lVar2,param_4,lVar8,lVar7);
if (iVar1 != 0) {
return 0xffffffff;
}
uVar3 = local_38 + *(long *)(param_5 + uVar9 * 8);
for (uVar4 = 0; uVar9 != uVar4; uVar4 = uVar4 + 1) {
*(int8 *)(param_2 + uVar4 * 8) = *(int8 *)(param_5 + uVar4 * 8);
}
lVar5 = mp_shr(param_2,param_2,uVar9,(uint)uVar3 & 1);
uVar4 = uVar3 >> 1;
if (lVar5 == 0) {
lVar2 = 0;
}
else {
lVar2 = mp_add(lVar2,lVar2,lVar8,lVar7,0);
}
mp_add_ui(lVar8,uVar4,lVar7);
if (uVar3 < 2) {
lVar8 = param_4 * 8 + param_3;
iVar1 = mp_mul(param_1,lVar8,param_2,uVar9,param_2,uVar9);
if (iVar1 != 0) {
return 0xffffffff;
}
uVar4 = mp_sub(param_3,param_3,lVar8,param_4 & 0xfffffffffffffffe,0);
}
lVar8 = mp_sub_ui(lVar6,uVar4,(uint)param_4 & 1);
lVar2 = lVar2 - lVar8;
if (lVar2 < 0) {
mp_sub_ui(param_2,1,param_4);
lVar8 = mp_add_mul1(param_3,param_2,param_4,2);
lVar6 = mp_add_ui(param_3,1,param_4);
lVar2 = lVar2 + lVar6 + lVar8;
}
}
*param_6 = lVar2;
return 0;
}
|
|
16,787
|
bc_get_leb128_u16
|
bluesky950520[P]quickjs/quickjs.c
|
static int bc_get_leb128_u16(BCReaderState *s, uint16_t *pval)
{
uint32_t val;
if (bc_get_leb128(s, &val)) {
*pval = 0;
return -1;
}
*pval = val;
return 0;
}
|
O0
|
c
|
bc_get_leb128_u16:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x78f20
cmpl $0x0, %eax
je 0x7bdb6
movq 0x10(%rsp), %rax
movw $0x0, (%rax)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x7bdcd
movl 0xc(%rsp), %eax
movw %ax, %cx
movq 0x10(%rsp), %rax
movw %cx, (%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
|
bc_get_leb128_u16:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rdi, [rsp+28h+var_10]
lea rsi, [rsp+28h+var_1C]
call bc_get_leb128
cmp eax, 0
jz short loc_7BDB6
mov rax, [rsp+28h+var_18]
mov word ptr [rax], 0
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp short loc_7BDCD
loc_7BDB6:
mov eax, [rsp+28h+var_1C]
mov cx, ax
mov rax, [rsp+28h+var_18]
mov [rax], cx
mov [rsp+28h+var_4], 0
loc_7BDCD:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long bc_get_leb128_u16(long long a1, _WORD *a2)
{
int v3; // [rsp+Ch] [rbp-1Ch] BYREF
_WORD *v4; // [rsp+10h] [rbp-18h]
long long v5; // [rsp+18h] [rbp-10h]
v5 = a1;
v4 = a2;
if ( (unsigned int)bc_get_leb128(a1, &v3) )
{
*v4 = 0;
return (unsigned int)-1;
}
else
{
*v4 = v3;
return 0;
}
}
|
bc_get_leb128_u16:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0xc]
CALL 0x00178f20
CMP EAX,0x0
JZ 0x0017bdb6
MOV RAX,qword ptr [RSP + 0x10]
MOV word ptr [RAX],0x0
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x0017bdcd
LAB_0017bdb6:
MOV EAX,dword ptr [RSP + 0xc]
MOV CX,AX
MOV RAX,qword ptr [RSP + 0x10]
MOV word ptr [RAX],CX
MOV dword ptr [RSP + 0x24],0x0
LAB_0017bdcd:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 bc_get_leb128_u16(int8 param_1,int2 *param_2)
{
int iVar1;
int2 local_1c [2];
int2 *local_18;
int8 local_10;
int4 local_4;
local_18 = param_2;
local_10 = param_1;
iVar1 = bc_get_leb128(param_1,local_1c);
if (iVar1 == 0) {
*local_18 = local_1c[0];
local_4 = 0;
}
else {
*local_18 = 0;
local_4 = 0xffffffff;
}
return local_4;
}
|
|
16,788
|
minja::Parser::parseValueExpression()::'lambda'()::operator()() const
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseValueExpression() {
auto parseValue = [&]() -> std::shared_ptr<Expression> {
auto location = get_location();
auto constant = parseConstant();
if (constant) return std::make_shared<LiteralExpr>(location, *constant);
static std::regex null_regex(R"(null\b)");
if (!consumeToken(null_regex).empty()) return std::make_shared<LiteralExpr>(location, Value());
auto identifier = parseIdentifier();
if (identifier) return identifier;
auto braced = parseBracedExpressionOrArray();
if (braced) return braced;
auto array = parseArray();
if (array) return array;
auto dictionary = parseDictionary();
if (dictionary) return dictionary;
throw std::runtime_error("Expected value expression");
};
auto value = parseValue();
while (it != end && consumeSpaces() && peekSymbols({ "[", "." })) {
if (!consumeToken("[").empty()) {
std::shared_ptr<Expression> index;
if (!consumeToken(":").empty()) {
auto slice_end = parseExpression();
index = std::make_shared<SliceExpr>(slice_end->location, nullptr, std::move(slice_end));
} else {
auto slice_start = parseExpression();
if (!consumeToken(":").empty()) {
consumeSpaces();
if (peekSymbols({ "]" })) {
index = std::make_shared<SliceExpr>(slice_start->location, std::move(slice_start), nullptr);
} else {
auto slice_end = parseExpression();
index = std::make_shared<SliceExpr>(slice_start->location, std::move(slice_start), std::move(slice_end));
}
} else {
index = std::move(slice_start);
}
}
if (!index) throw std::runtime_error("Empty index in subscript");
if (consumeToken("]").empty()) throw std::runtime_error("Expected closing bracket in subscript");
value = std::make_shared<SubscriptExpr>(value->location, std::move(value), std::move(index));
} else if (!consumeToken(".").empty()) {
auto identifier = parseIdentifier();
if (!identifier) throw std::runtime_error("Expected identifier in subscript");
consumeSpaces();
if (peekSymbols({ "(" })) {
auto callParams = parseCallArgs();
value = std::make_shared<MethodCallExpr>(identifier->location, std::move(value), std::move(identifier), std::move(callParams));
} else {
auto key = std::make_shared<LiteralExpr>(identifier->location, Value(identifier->get_name()));
value = std::make_shared<SubscriptExpr>(identifier->location, std::move(value), std::move(key));
}
}
consumeSpaces();
}
if (peekSymbols({ "(" })) {
auto location = get_location();
auto callParams = parseCallArgs();
value = std::make_shared<CallExpr>(location, std::move(value), std::move(callParams));
}
return value;
}
|
O2
|
cpp
|
minja::Parser::parseValueExpression()::'lambda'()::operator()() const:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
movq (%rsi), %r14
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0xccd28
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0xd1764
movq 0x28(%rsp), %rdx
testq %rdx, %rdx
je 0xd0ef7
leaq 0x50(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xd19fc
leaq 0x58(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x4b2f2
jmp 0xd0f73
leaq 0x1c0dca(%rip), %rax # 0x291cc8
movb (%rax), %al
testb %al, %al
je 0xd1058
leaq 0x1c0d99(%rip), %rdx # 0x291ca8
leaq 0x50(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0xcd14c
leaq 0x50(%rsp), %rdi
movq 0x8(%rdi), %r15
callq 0x29678
testq %r15, %r15
je 0xd0f97
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0xb6524
movq %rsp, %rdi
leaq 0x38(%rsp), %rsi
movq %r14, %rdx
callq 0xd16fa
leaq 0x8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x4b2f2
leaq 0x50(%rsp), %rdi
callq 0xb445e
leaq 0x30(%rsp), %rdi
callq 0x4b2f2
leaq 0x40(%rsp), %rdi
callq 0x4b2f2
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xcd8c0
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0xd0fcb
movq %rax, (%rbx)
movq 0x58(%rsp), %rax
andq $0x0, 0x58(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, 0x50(%rsp)
jmp 0xd104e
movq %rsp, %rdi
movq %r14, %rsi
callq 0xd1a1e
movq (%rsp), %rax
testq %rax, %rax
je 0xd0ff8
movq %rax, (%rbx)
movq 0x8(%rsp), %rax
andq $0x0, 0x8(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, (%rsp)
jmp 0xd1044
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0xd1dee
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0xd1029
movq %rax, (%rbx)
movq 0x20(%rsp), %rax
andq $0x0, 0x20(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, 0x18(%rsp)
jmp 0xd103a
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd21bc
cmpq $0x0, (%rbx)
je 0xd10ad
leaq 0x20(%rsp), %rdi
callq 0x4b2f2
leaq 0x8(%rsp), %rdi
callq 0x4b2f2
leaq 0x58(%rsp), %rdi
jmp 0xd0ef0
leaq 0x1c0c69(%rip), %rdi # 0x291cc8
callq 0x29460
testl %eax, %eax
je 0xd0f08
leaq 0x1c0c35(%rip), %rdi # 0x291ca8
leaq 0x338e3(%rip), %rsi # 0x10495d
pushq $0x10
popq %rdx
callq 0x61c7c
leaq -0x7a81b(%rip), %rdi # 0x5686e
leaq 0x1c0c18(%rip), %rsi # 0x291ca8
leaq 0x96aa1(%rip), %rdx # 0x167b38
callq 0x289a0
leaq 0x1c0c25(%rip), %rdi # 0x291cc8
callq 0x28750
jmp 0xd0f08
pushq $0x10
popq %rdi
callq 0x28580
movq %rax, %r15
leaq 0x338a5(%rip), %rsi # 0x104964
movq %rax, %rdi
callq 0x28410
movq 0x95f22(%rip), %rsi # 0x166ff0
movq 0x95e83(%rip), %rdx # 0x166f58
movq %r15, %rdi
callq 0x29320
movq %rax, %r14
leaq 0x1c0be1(%rip), %rdi # 0x291cc8
callq 0x28740
jmp 0xd114f
movq %rax, %r14
jmp 0xd10fe
movq %rax, %r14
movq %r15, %rdi
callq 0x28830
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x4b2f2
jmp 0xd110f
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x4b2f2
jmp 0xd111e
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4b2f2
jmp 0xd112d
movq %rax, %r14
leaq 0x58(%rsp), %rdi
callq 0x4b2f2
jmp 0xd114f
jmp 0xd114c
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0xb445e
jmp 0xd114f
jmp 0xd114c
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x4b2f2
jmp 0xd115e
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x4b2f2
movq %r14, %rdi
callq 0x293c0
|
_ZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEv:
push r15
push r14
push rbx
sub rsp, 0A0h
mov rbx, rdi
mov r14, [rsi]
lea rdi, [rsp+0B8h+var_80]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdi, [rsp+0B8h+var_90]; this
mov rsi, r14
call _ZN5minja6Parser13parseConstantEv; minja::Parser::parseConstant(void)
mov rdx, [rsp+0B8h+var_90]
test rdx, rdx
jz short loc_D0EF7
lea rdi, [rsp+0B8h+var_68]
lea rsi, [rsp+0B8h+var_80]
call _ZSt11make_sharedIN5minja11LiteralExprEJRNS0_8LocationERNS0_5ValueEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::LiteralExpr,minja::Location &,minja::Value &>(minja::Location &,minja::Value &)
lea rdi, [rsp+0B8h+var_60]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
loc_D0EF0:
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_D0F73
loc_D0EF7:
lea rax, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; `guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
mov al, [rax]
test al, al
jz loc_D1058
loc_D0F08:
lea rdx, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
lea rdi, [rsp+0B8h+var_68]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+0B8h+var_68]; void *
mov r15, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15, r15
jz short loc_D0F97
lea r14, [rsp+0B8h+var_68]
mov rdi, r14; this
call _ZN5minja5ValueC2Ev; minja::Value::Value(void)
mov rdi, rsp
lea rsi, [rsp+0B8h+var_80]
mov rdx, r14
call _ZSt11make_sharedIN5minja11LiteralExprEJRNS0_8LocationENS0_5ValueEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::LiteralExpr,minja::Location &,minja::Value>(minja::Location &,minja::Value &&)
lea rdi, [rsp+0B8h+var_B0]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_68]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_D0F73:
lea rdi, [rsp+0B8h+var_88]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r14
pop r15
retn
loc_D0F97:
lea rdi, [rsp+0B8h+var_68]; this
mov rsi, r14
call _ZN5minja6Parser15parseIdentifierEv; minja::Parser::parseIdentifier(void)
mov rax, [rsp+0B8h+var_68]
test rax, rax
jz short loc_D0FCB
mov [rbx], rax
mov rax, [rsp+0B8h+var_60]
and [rsp+0B8h+var_60], 0
mov [rbx+8], rax
and [rsp+0B8h+var_68], 0
jmp loc_D104E
loc_D0FCB:
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser28parseBracedExpressionOrArrayEv; minja::Parser::parseBracedExpressionOrArray(void)
mov rax, [rsp+0B8h+var_B8]
test rax, rax
jz short loc_D0FF8
mov [rbx], rax
mov rax, [rsp+0B8h+var_B0]
and [rsp+0B8h+var_B0], 0
mov [rbx+8], rax
and [rsp+0B8h+var_B8], 0
jmp short loc_D1044
loc_D0FF8:
lea rdi, [rsp+0B8h+var_A0]; this
mov rsi, r14
call _ZN5minja6Parser10parseArrayEv; minja::Parser::parseArray(void)
mov rax, [rsp+0B8h+var_A0]
test rax, rax
jz short loc_D1029
mov [rbx], rax
mov rax, [rsp+0B8h+var_98]
and [rsp+0B8h+var_98], 0
mov [rbx+8], rax
and [rsp+0B8h+var_A0], 0
jmp short loc_D103A
loc_D1029:
mov rdi, rbx; this
mov rsi, r14
call _ZN5minja6Parser15parseDictionaryEv; minja::Parser::parseDictionary(void)
cmp qword ptr [rbx], 0
jz short loc_D10AD
loc_D103A:
lea rdi, [rsp+0B8h+var_98]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_D1044:
lea rdi, [rsp+0B8h+var_B0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_D104E:
lea rdi, [rsp+0B8h+var_60]
jmp loc_D0EF0
loc_D1058:
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_D0F08
lea rdi, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
lea rsi, aNullB; "null\\b"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_D0F08
loc_D10AD:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedValueE; "Expected value expression"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r14, rax
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_D114F
mov r14, rax
jmp short loc_D10FE
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
loc_D10FE:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_D110F
mov r14, rax
loc_D110F:
lea rdi, [rsp+0B8h+var_98]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_D111E
mov r14, rax
loc_D111E:
lea rdi, [rsp+0B8h+var_B0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_D112D
mov r14, rax
loc_D112D:
lea rdi, [rsp+0B8h+var_60]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_D114F
jmp short loc_D114C
mov r14, rax
lea rdi, [rsp+0B8h+var_68]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_D114F
jmp short $+2
loc_D114C:
mov r14, rax
loc_D114F:
lea rdi, [rsp+0B8h+var_88]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_D115E
mov r14, rax
loc_D115E:
lea rdi, [rsp+0B8h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator()(
minja::Parser *this,
_QWORD **a2)
{
_QWORD *v2; // r14
__int128 v3; // xmm0
long long v4; // r15
__int128 v5; // xmm0
long long v7; // rax
long long v8; // rax
long long v9; // rax
std::runtime_error *exception; // r15
__int128 v11; // [rsp+0h] [rbp-B8h] BYREF
long long v12; // [rsp+18h] [rbp-A0h] BYREF
long long v13; // [rsp+20h] [rbp-98h] BYREF
long long v14; // [rsp+28h] [rbp-90h] BYREF
long long v15; // [rsp+30h] [rbp-88h] BYREF
_BYTE v16[8]; // [rsp+38h] [rbp-80h] BYREF
long long v17; // [rsp+40h] [rbp-78h] BYREF
_OWORD v18[6]; // [rsp+50h] [rbp-68h] BYREF
v2 = *a2;
minja::Parser::get_location((minja::Parser *)v16, *a2);
minja::Parser::parseConstant((minja::Parser *)&v14);
if ( v14 )
{
std::make_shared<minja::LiteralExpr,minja::Location &,minja::Value &>(v18, v16);
v3 = v18[0];
*((_QWORD *)&v18[0] + 1) = 0LL;
*(_OWORD *)this = v3;
*(_QWORD *)&v18[0] = 0LL;
}
else
{
if ( !(_BYTE)`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
(long long)"null\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]);
}
minja::Parser::consumeToken(
v18,
(long long)v2,
(long long)&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
1u);
v4 = *((_QWORD *)&v18[0] + 1);
std::string::~string(v18);
if ( v4 )
{
minja::Value::Value((minja::Value *)v18);
std::make_shared<minja::LiteralExpr,minja::Location &,minja::Value>(&v11, v16, v18);
v5 = v11;
*((_QWORD *)&v11 + 1) = 0LL;
*(_OWORD *)this = v5;
*(_QWORD *)&v11 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v11 + 1);
minja::Value::~Value((minja::Value *)v18);
goto LABEL_7;
}
minja::Parser::parseIdentifier((minja::Parser *)v18, v2);
if ( *(_QWORD *)&v18[0] )
{
*(_QWORD *)this = *(_QWORD *)&v18[0];
v7 = *((_QWORD *)&v18[0] + 1);
*((_QWORD *)&v18[0] + 1) = 0LL;
*((_QWORD *)this + 1) = v7;
*(_QWORD *)&v18[0] = 0LL;
}
else
{
minja::Parser::parseBracedExpressionOrArray((minja::Parser *)&v11);
if ( (_QWORD)v11 )
{
*(_QWORD *)this = v11;
v8 = *((_QWORD *)&v11 + 1);
*((_QWORD *)&v11 + 1) = 0LL;
*((_QWORD *)this + 1) = v8;
*(_QWORD *)&v11 = 0LL;
}
else
{
minja::Parser::parseArray((minja::Parser *)&v12);
if ( v12 )
{
*(_QWORD *)this = v12;
v9 = v13;
v13 = 0LL;
*((_QWORD *)this + 1) = v9;
v12 = 0LL;
}
else
{
minja::Parser::parseDictionary(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected value expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v11 + 1);
}
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v18 + 1);
LABEL_7:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v17);
return this;
}
|
operator():
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV RBX,RDI
MOV R14,qword ptr [RSI]
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x001ccd28
LAB_001d0eb5:
LEA RDI,[RSP + 0x28]
MOV RSI,R14
CALL 0x001d1764
MOV RDX,qword ptr [RSP + 0x28]
TEST RDX,RDX
JZ 0x001d0ef7
LAB_001d0ecc:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x38]
CALL 0x001d19fc
LEA RDI,[RSP + 0x58]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
LAB_001d0ef0:
CALL 0x0014b2f2
JMP 0x001d0f73
LAB_001d0ef7:
LEA RAX,[0x391cc8]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001d1058
LAB_001d0f08:
LEA RDX,[0x391ca8]
LEA RDI,[RSP + 0x50]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x001cd14c
LEA RDI,[RSP + 0x50]
MOV R15,qword ptr [RDI + 0x8]
CALL 0x00129678
TEST R15,R15
JZ 0x001d0f97
LEA R14,[RSP + 0x50]
MOV RDI,R14
CALL 0x001b6524
LAB_001d0f3f:
MOV RDI,RSP
LEA RSI,[RSP + 0x38]
MOV RDX,R14
CALL 0x001d16fa
LEA RDI,[RSP + 0x8]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x0014b2f2
LEA RDI,[RSP + 0x50]
CALL 0x001b445e
LAB_001d0f73:
LEA RDI,[RSP + 0x30]
CALL 0x0014b2f2
LEA RDI,[RSP + 0x40]
CALL 0x0014b2f2
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R14
POP R15
RET
LAB_001d0f97:
LEA RDI,[RSP + 0x50]
MOV RSI,R14
CALL 0x001cd8c0
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x001d0fcb
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x58]
AND qword ptr [RSP + 0x58],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP + 0x50],0x0
JMP 0x001d104e
LAB_001d0fcb:
MOV RDI,RSP
MOV RSI,R14
CALL 0x001d1a1e
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x001d0ff8
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x8]
AND qword ptr [RSP + 0x8],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP],0x0
JMP 0x001d1044
LAB_001d0ff8:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x001d1dee
MOV RAX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x001d1029
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x20]
AND qword ptr [RSP + 0x20],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP + 0x18],0x0
JMP 0x001d103a
LAB_001d1029:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001d21bc
CMP qword ptr [RBX],0x0
JZ 0x001d10ad
LAB_001d103a:
LEA RDI,[RSP + 0x20]
CALL 0x0014b2f2
LAB_001d1044:
LEA RDI,[RSP + 0x8]
CALL 0x0014b2f2
LAB_001d104e:
LEA RDI,[RSP + 0x58]
JMP 0x001d0ef0
LAB_001d1058:
LEA RDI,[0x391cc8]
CALL 0x00129460
TEST EAX,EAX
JZ 0x001d0f08
LAB_001d106c:
LEA RDI,[0x391ca8]
LEA RSI,[0x20495d]
PUSH 0x10
POP RDX
CALL 0x00161c7c
LAB_001d1082:
LEA RDI,[0x15686e]
LEA RSI,[0x391ca8]
LEA RDX,[0x267b38]
CALL 0x001289a0
LEA RDI,[0x391cc8]
CALL 0x00128750
JMP 0x001d0f08
LAB_001d10ad:
PUSH 0x10
POP RDI
CALL 0x00128580
MOV R15,RAX
LAB_001d10b8:
LEA RSI,[0x204964]
MOV RDI,RAX
CALL 0x00128410
LAB_001d10c7:
MOV RSI,qword ptr [0x00266ff0]
MOV RDX,qword ptr [0x00266f58]
MOV RDI,R15
CALL 0x00129320
|
/* minja::Parser::parseValueExpression()::{lambda()#1}::TEMPNAMEPLACEHOLDERVALUE() const */
_lambda___1_ * __thiscall
minja::Parser::parseValueExpression()::{lambda()#1}::operator()(_lambda___1_ *this)
{
int8 uVar1;
long lVar2;
int iVar3;
runtime_error *this_00;
int8 *in_RSI;
long local_b8;
int8 auStack_b0 [2];
long local_a0;
int8 local_98;
long local_90;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_88 [8];
Value local_80 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_78 [16];
long local_68;
long alStack_60 [9];
uVar1 = *in_RSI;
get_location();
/* try { // try from 001d0eb5 to 001d0ec1 has its CatchHandler @ 001d115b */
parseConstant();
if (local_90 == 0) {
if ((operator()()::null_regex_abi_cxx11_ == '\0') &&
(iVar3 = __cxa_guard_acquire(&operator()()::null_regex_abi_cxx11_), iVar3 != 0)) {
/* try { // try from 001d106c to 001d1081 has its CatchHandler @ 001d10dd */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
operator()()::null_regex_abi_cxx11_,"null\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
operator()()::null_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&operator()()::null_regex_abi_cxx11_);
}
/* try { // try from 001d0f08 to 001d0f1e has its CatchHandler @ 001d114a */
consumeToken(&local_68,uVar1,operator()()::null_regex_abi_cxx11_,1);
lVar2 = alStack_60[0];
std::__cxx11::string::~string((string *)&local_68);
if (lVar2 != 0) {
Value::Value((Value *)&local_68);
/* try { // try from 001d0f3f to 001d0f4e has its CatchHandler @ 001d113b */
std::make_shared<minja::LiteralExpr,minja::Location&,minja::Value>
((Location *)&local_b8,local_80);
uVar1 = auStack_b0[0];
auStack_b0[0] = 0;
*(long *)this = local_b8;
*(int8 *)(this + 8) = uVar1;
local_b8 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_b0);
Value::~Value((Value *)&local_68);
goto LAB_001d0f73;
}
/* try { // try from 001d0f97 to 001d0fa3 has its CatchHandler @ 001d1139 */
parseIdentifier();
lVar2 = alStack_60[0];
if (local_68 == 0) {
/* try { // try from 001d0fcb to 001d0fd5 has its CatchHandler @ 001d112a */
parseBracedExpressionOrArray();
uVar1 = auStack_b0[0];
if (local_b8 == 0) {
/* try { // try from 001d0ff8 to 001d1004 has its CatchHandler @ 001d111b */
parseArray();
uVar1 = local_98;
if (local_a0 == 0) {
/* try { // try from 001d1029 to 001d1033 has its CatchHandler @ 001d110c */
parseDictionary();
if (*(long *)this == 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001d10b8 to 001d10c6 has its CatchHandler @ 001d10f3 */
std::runtime_error::runtime_error(this_00,"Expected value expression");
/* try { // try from 001d10c7 to 001d10dc has its CatchHandler @ 001d10ee */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00266ff0,PTR__runtime_error_00266f58);
}
}
else {
*(long *)this = local_a0;
local_98 = 0;
*(int8 *)(this + 8) = uVar1;
local_a0 = 0;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_98);
}
else {
*(long *)this = local_b8;
auStack_b0[0] = 0;
*(int8 *)(this + 8) = uVar1;
local_b8 = 0;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_b0);
}
else {
*(long *)this = local_68;
alStack_60[0] = 0;
*(long *)(this + 8) = lVar2;
local_68 = 0;
}
}
else {
/* try { // try from 001d0ecc to 001d0eda has its CatchHandler @ 001d114c */
std::make_shared<minja::LiteralExpr,minja::Location&,minja::Value&>
((Location *)&local_68,local_80);
lVar2 = alStack_60[0];
alStack_60[0] = 0;
*(long *)this = local_68;
*(long *)(this + 8) = lVar2;
local_68 = 0;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_60);
LAB_001d0f73:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_88);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_78);
return this;
}
|
|
16,789
|
my_wildcmp_8bit_impl
|
eloqsql/strings/ctype-simple.c
|
static
int my_wildcmp_8bit_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (*wildstr != w_many && *wildstr != w_one)
{
if (*wildstr == escape && wildstr+1 != wildend)
wildstr++;
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
return(1); /* No match */
if (wildstr == wildend)
return(str != str_end); /* Match if both are at end */
result=1; /* Found an anchor char */
}
if (*wildstr == w_one)
{
do
{
if (str == str_end) /* Skip one char if possible */
return(result);
INC_PTR(cs,str,str_end);
} while (++wildstr < wildend && *wildstr == w_one);
if (wildstr == wildend)
break;
}
if (*wildstr == w_many)
{ /* Found w_many */
uchar cmp;
wildstr++;
/* Remove any '%' and '_' from the wild search string */
for (; wildstr != wildend ; wildstr++)
{
if (*wildstr == w_many)
continue;
if (*wildstr == w_one)
{
if (str == str_end)
return(-1);
INC_PTR(cs,str,str_end);
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return(0); /* Ok if w_many is last */
if (str == str_end)
return(-1);
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
cmp= *++wildstr;
INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */
cmp=likeconv(cs,cmp);
do
{
/*
Find the next character in the subject string equal to 'cmp', then
check recursively my_wildcmp_8bit_impl() for the pattern remainder.
*/
while (str != str_end && (uchar) likeconv(cs,*str) != cmp)
str++;
if (str++ == str_end)
return(-1); /* 'cmp' was not found in the subject string */
{
int tmp=my_wildcmp_8bit_impl(cs,str,str_end,
wildstr,wildend,escape,w_one,
w_many, recurse_level+1);
if (tmp <= 0)
return(tmp);
}
/*
The recursion call did not match. But it returned 1, which means
the pattern remainder has some non-special characters.
Continue, there is a chance that we'll find another 'cmp'
at a different position in the subject string.
*/
} while (str != str_end);
return(-1);
}
}
return(str != str_end ? 1 : 0);
}
|
O3
|
c
|
my_wildcmp_8bit_impl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r14
movl 0x20(%rbp), %r10d
leaq 0xb52f91(%rip), %rax # 0xc08998
movq (%rax), %rax
testq %rax, %rax
je 0xb5a3a
movq %rbx, -0x30(%rbp)
movq %rdi, %rbx
movl %r10d, %edi
movl %r9d, %r15d
callq *%rax
movl 0x20(%rbp), %r10d
movq %rbx, %rdi
movq -0x30(%rbp), %rbx
movl %r15d, %r9d
movl $0x1, %r15d
testl %eax, %eax
jne 0xb5b60
movl 0x18(%rbp), %r11d
movl 0x10(%rbp), %r8d
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
cmpq %r12, %r13
je 0xb5b56
movb (%r13), %al
movsbl %al, %ecx
cmpl %r11d, %ecx
sete %sil
cmpl %r8d, %ecx
sete %dl
orb %dl, %sil
je 0xb5ab7
testb %dl, %dl
je 0xb5aad
incq %r13
movq %r13, %rax
cmpq %rbx, %r14
je 0xb5b60
movq %r14, %rcx
movq %rax, %r13
cmpq %r12, %rax
jae 0xb5a9a
leaq 0x1(%rcx), %r14
movsbl (%r13), %edx
leaq 0x1(%r13), %rax
cmpl %r8d, %edx
je 0xb5a74
incq %rcx
cmpq %r12, %r13
je 0xb5b53
movb (%r13), %al
movq %rcx, %r14
movsbl %al, %eax
cmpl %r11d, %eax
jne 0xb5a48
jmp 0xb5b18
movl $0x1, %r15d
cmpq %rbx, %r14
je 0xb5b60
leaq 0x1(%r13), %rax
cmpq %r12, %rax
cmoveq %r13, %rax
cmpl %r9d, %ecx
cmoveq %rax, %r13
movq 0x58(%rdi), %rax
movzbl (%r13), %ecx
movb (%rax,%rcx), %cl
movzbl (%r14), %edx
cmpb (%rax,%rdx), %cl
jne 0xb5b60
incq %r14
incq %r13
cmpq %r12, %r13
je 0xb5b56
movb (%r13), %al
movsbl %al, %ecx
cmpl %r8d, %ecx
sete %dl
cmpl %r11d, %ecx
je 0xb5a6a
cmpl %r8d, %ecx
jne 0xb5ab7
jmp 0xb5a6a
leaq 0x1(%r13), %rax
xorl %r15d, %r15d
cmpq %r12, %rax
je 0xb5b60
addq $0x2, %r13
movb -0x1(%r13), %al
movsbl %al, %ecx
cmpl %r11d, %ecx
je 0xb5b45
cmpl %r8d, %ecx
jne 0xb5b72
cmpq %rbx, %r14
je 0xb5c1d
incq %r14
leaq 0x1(%r13), %rax
cmpq %r12, %r13
movq %rax, %r13
jne 0xb5b28
jmp 0xb5b60
movq %rcx, %r14
xorl %r15d, %r15d
cmpq %rbx, %r14
setne %r15b
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
cmpq %rbx, %r14
je 0xb5b60
movzbl %al, %ecx
leaq -0x1(%r13), %rdx
cmpl %r9d, %ecx
jne 0xb5b95
cmpq %r12, %r13
je 0xb5b95
movb (%r13), %al
movq %r13, %rdx
incq %rdx
movq 0x58(%rdi), %rcx
movzbl %al, %eax
movb (%rcx,%rax), %r13b
incl %r10d
cmpq %rbx, %r14
je 0xb5b60
movq 0x58(%rdi), %rax
movzbl (%r14), %ecx
cmpb %r13b, (%rax,%rcx)
je 0xb5bc3
incq %r14
cmpq %rbx, %r14
jne 0xb5baf
jmp 0xb5b60
incq %r14
subq $0x8, %rsp
movq %rdi, -0x48(%rbp)
movq %r14, %rsi
movq %rdx, %rcx
movq %rbx, %rdx
movq %rcx, -0x38(%rbp)
movq %r8, %rax
movq %r12, %r8
movl %r9d, -0x30(%rbp)
movq %r10, -0x40(%rbp)
pushq %r10
pushq %r11
pushq %rax
callq 0xb59df
addq $0x20, %rsp
testl %eax, %eax
jle 0xb5c28
cmpq %rbx, %r14
movl -0x30(%rbp), %r9d
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %r10
movl 0x18(%rbp), %r11d
movl 0x10(%rbp), %r8d
movq -0x38(%rbp), %rdx
jne 0xb5ba6
jmp 0xb5b60
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
jmp 0xb5b60
movl %eax, %r15d
jmp 0xb5b60
|
my_wildcmp_8bit_impl:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, r8
mov r13, rcx
mov rbx, rdx
mov r14, rsi
mov r10d, [rbp+arg_10]
lea rax, my_string_stack_guard
mov rax, [rax]
test rax, rax
jz short loc_B5A3A
mov [rbp+var_30], rbx
mov rbx, rdi
mov edi, r10d
mov r15d, r9d
call rax
mov r10d, [rbp+arg_10]
mov rdi, rbx
mov rbx, [rbp+var_30]
mov r9d, r15d
mov r15d, 1
test eax, eax
jnz loc_B5B60
loc_B5A3A:
mov r11d, [rbp+arg_8]
mov r8d, [rbp+arg_0]
mov r15d, 0FFFFFFFFh
loc_B5A48:
cmp r13, r12
jz loc_B5B56
mov al, [r13+0]
movsx ecx, al
cmp ecx, r11d
setz sil
cmp ecx, r8d
setz dl
or sil, dl
jz short loc_B5AB7
loc_B5A6A:
test dl, dl
jz short loc_B5AAD
inc r13
mov rax, r13
loc_B5A74:
cmp r14, rbx
jz loc_B5B60
mov rcx, r14
mov r13, rax
cmp rax, r12
jnb short loc_B5A9A
lea r14, [rcx+1]
movsx edx, byte ptr [r13+0]
lea rax, [r13+1]
cmp edx, r8d
jz short loc_B5A74
loc_B5A9A:
inc rcx
cmp r13, r12
jz loc_B5B53
mov al, [r13+0]
mov r14, rcx
loc_B5AAD:
movsx eax, al
cmp eax, r11d
jnz short loc_B5A48
jmp short loc_B5B18
loc_B5AB7:
mov r15d, 1
cmp r14, rbx
jz loc_B5B60
lea rax, [r13+1]
cmp rax, r12
cmovz rax, r13
cmp ecx, r9d
cmovz r13, rax
mov rax, [rdi+58h]
movzx ecx, byte ptr [r13+0]
mov cl, [rax+rcx]
movzx edx, byte ptr [r14]
cmp cl, [rax+rdx]
jnz short loc_B5B60
inc r14
inc r13
cmp r13, r12
jz short loc_B5B56
mov al, [r13+0]
movsx ecx, al
cmp ecx, r8d
setz dl
cmp ecx, r11d
jz loc_B5A6A
cmp ecx, r8d
jnz short loc_B5AB7
jmp loc_B5A6A
loc_B5B18:
lea rax, [r13+1]
xor r15d, r15d
cmp rax, r12
jz short loc_B5B60
add r13, 2
loc_B5B28:
mov al, [r13-1]
movsx ecx, al
cmp ecx, r11d
jz short loc_B5B45
cmp ecx, r8d
jnz short loc_B5B72
cmp r14, rbx
jz loc_B5C1D
inc r14
loc_B5B45:
lea rax, [r13+1]
cmp r13, r12
mov r13, rax
jnz short loc_B5B28
jmp short loc_B5B60
loc_B5B53:
mov r14, rcx
loc_B5B56:
xor r15d, r15d
cmp r14, rbx
setnz r15b
loc_B5B60:
mov eax, r15d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B5B72:
mov r15d, 0FFFFFFFFh
cmp r14, rbx
jz short loc_B5B60
movzx ecx, al
lea rdx, [r13-1]
cmp ecx, r9d
jnz short loc_B5B95
cmp r13, r12
jz short loc_B5B95
mov al, [r13+0]
mov rdx, r13
loc_B5B95:
inc rdx
mov rcx, [rdi+58h]
movzx eax, al
mov r13b, [rcx+rax]
inc r10d
loc_B5BA6:
cmp r14, rbx
jz short loc_B5B60
mov rax, [rdi+58h]
loc_B5BAF:
movzx ecx, byte ptr [r14]
cmp [rax+rcx], r13b
jz short loc_B5BC3
inc r14
cmp r14, rbx
jnz short loc_B5BAF
jmp short loc_B5B60
loc_B5BC3:
inc r14
sub rsp, 8
mov [rbp+var_48], rdi
mov rsi, r14
mov rcx, rdx
mov rdx, rbx
mov [rbp+var_38], rcx
mov rax, r8
mov r8, r12
mov dword ptr [rbp+var_30], r9d
mov [rbp+var_40], r10
push r10
push r11
push rax
call my_wildcmp_8bit_impl
add rsp, 20h
test eax, eax
jle short loc_B5C28
cmp r14, rbx
mov r9d, dword ptr [rbp+var_30]
mov rdi, [rbp+var_48]
mov r10, [rbp+var_40]
mov r11d, [rbp+arg_8]
mov r8d, [rbp+arg_0]
mov rdx, [rbp+var_38]
jnz short loc_B5BA6
jmp loc_B5B60
loc_B5C1D:
mov r15d, 0FFFFFFFFh
jmp loc_B5B60
loc_B5C28:
mov r15d, eax
jmp loc_B5B60
|
long long my_wildcmp_8bit_impl(
long long a1,
unsigned __int8 *a2,
unsigned __int8 *a3,
char *a4,
char *a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
unsigned __int8 *v11; // rbx
unsigned int v13; // r10d
int v14; // r15d
int v15; // eax
unsigned int v16; // r15d
int v17; // r11d
int v18; // r8d
signed __int8 v19; // al
int v20; // ecx
bool v21; // dl
char *v22; // rax
unsigned __int8 *v23; // rcx
int v24; // edx
unsigned __int8 *v25; // rcx
char *v26; // rax
char *v27; // r13
unsigned __int8 v28; // al
char *v31; // rdx
_BYTE *v32; // rdx
char v33; // r13
long long v34; // r10
int v35; // eax
long long v36; // [rsp+10h] [rbp-40h]
_BYTE *v37; // [rsp+18h] [rbp-38h]
int v39; // [rsp+20h] [rbp-30h]
v11 = a3;
v13 = a9;
if ( my_string_stack_guard )
{
v14 = a6;
v15 = my_string_stack_guard(a9);
v13 = a9;
v11 = a3;
a6 = v14;
v16 = 1;
if ( v15 )
return v16;
}
v17 = a8;
v18 = a7;
v16 = -1;
do
{
if ( a4 == a5 )
return a2 != v11;
v19 = *a4;
v20 = *a4;
v21 = v20 == a7;
if ( v20 != a7 && v20 != a8 )
{
do
{
v16 = 1;
if ( a2 == v11 )
return v16;
v26 = a4 + 1;
if ( a4 + 1 == a5 )
v26 = a4;
if ( v20 == a6 )
a4 = v26;
if ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*a4) != *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) )
return v16;
++a2;
if ( ++a4 == a5 )
return a2 != v11;
v19 = *a4;
v20 = *a4;
v21 = v20 == a7;
}
while ( v20 != a8 && v20 != a7 );
}
if ( v21 )
{
v22 = a4 + 1;
do
{
if ( a2 == v11 )
return v16;
v23 = a2;
a4 = v22;
if ( v22 >= a5 )
break;
++a2;
v24 = *v22++;
}
while ( v24 == a7 );
v25 = v23 + 1;
if ( a4 == a5 )
{
a2 = v25;
return a2 != v11;
}
v19 = *a4;
a2 = v25;
}
}
while ( v19 != a8 );
v16 = 0;
if ( a4 + 1 == a5 )
return v16;
v27 = a4 + 2;
while ( 1 )
{
v28 = *(v27 - 1);
if ( (char)v28 == a8 )
goto LABEL_31;
if ( (char)v28 != a7 )
break;
if ( a2 == v11 )
return (unsigned int)-1;
++a2;
LABEL_31:
if ( v27++ == a5 )
return v16;
}
v16 = -1;
if ( a2 != v11 )
{
v31 = v27 - 1;
if ( v28 == a6 && v27 != a5 )
{
v28 = *v27;
v31 = v27;
}
v32 = v31 + 1;
v33 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v28);
v34 = v13 + 1;
while ( a2 != v11 )
{
while ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) != v33 )
{
if ( ++a2 == v11 )
return v16;
}
++a2;
v37 = v32;
v39 = a6;
v36 = v34;
v35 = my_wildcmp_8bit_impl(a1, (_DWORD)a2, (_DWORD)v11, (_DWORD)v32, (_DWORD)a5, a6, v18, v17, v34);
if ( v35 <= 0 )
return (unsigned int)v35;
a6 = v39;
v34 = v36;
v17 = a8;
v18 = a7;
v32 = v37;
if ( a2 == v11 )
return v16;
}
}
return v16;
}
|
my_wildcmp_8bit_impl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,R8
MOV R13,RCX
MOV RBX,RDX
MOV R14,RSI
MOV R10D,dword ptr [RBP + 0x20]
LEA RAX,[0xd08998]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001b5a3a
MOV qword ptr [RBP + -0x30],RBX
MOV RBX,RDI
MOV EDI,R10D
MOV R15D,R9D
CALL RAX
MOV R10D,dword ptr [RBP + 0x20]
MOV RDI,RBX
MOV RBX,qword ptr [RBP + -0x30]
MOV R9D,R15D
MOV R15D,0x1
TEST EAX,EAX
JNZ 0x001b5b60
LAB_001b5a3a:
MOV R11D,dword ptr [RBP + 0x18]
MOV R8D,dword ptr [RBP + 0x10]
MOV R15D,0xffffffff
LAB_001b5a48:
CMP R13,R12
JZ 0x001b5b56
MOV AL,byte ptr [R13]
MOVSX ECX,AL
CMP ECX,R11D
SETZ SIL
CMP ECX,R8D
SETZ DL
OR SIL,DL
JZ 0x001b5ab7
LAB_001b5a6a:
TEST DL,DL
JZ 0x001b5aad
INC R13
MOV RAX,R13
LAB_001b5a74:
CMP R14,RBX
JZ 0x001b5b60
MOV RCX,R14
MOV R13,RAX
CMP RAX,R12
JNC 0x001b5a9a
LEA R14,[RCX + 0x1]
MOVSX EDX,byte ptr [R13]
LEA RAX,[R13 + 0x1]
CMP EDX,R8D
JZ 0x001b5a74
LAB_001b5a9a:
INC RCX
CMP R13,R12
JZ 0x001b5b53
MOV AL,byte ptr [R13]
MOV R14,RCX
LAB_001b5aad:
MOVSX EAX,AL
CMP EAX,R11D
JNZ 0x001b5a48
JMP 0x001b5b18
LAB_001b5ab7:
MOV R15D,0x1
CMP R14,RBX
JZ 0x001b5b60
LEA RAX,[R13 + 0x1]
CMP RAX,R12
CMOVZ RAX,R13
CMP ECX,R9D
CMOVZ R13,RAX
MOV RAX,qword ptr [RDI + 0x58]
MOVZX ECX,byte ptr [R13]
MOV CL,byte ptr [RAX + RCX*0x1]
MOVZX EDX,byte ptr [R14]
CMP CL,byte ptr [RAX + RDX*0x1]
JNZ 0x001b5b60
INC R14
INC R13
CMP R13,R12
JZ 0x001b5b56
MOV AL,byte ptr [R13]
MOVSX ECX,AL
CMP ECX,R8D
SETZ DL
CMP ECX,R11D
JZ 0x001b5a6a
CMP ECX,R8D
JNZ 0x001b5ab7
JMP 0x001b5a6a
LAB_001b5b18:
LEA RAX,[R13 + 0x1]
XOR R15D,R15D
CMP RAX,R12
JZ 0x001b5b60
ADD R13,0x2
LAB_001b5b28:
MOV AL,byte ptr [R13 + -0x1]
MOVSX ECX,AL
CMP ECX,R11D
JZ 0x001b5b45
CMP ECX,R8D
JNZ 0x001b5b72
CMP R14,RBX
JZ 0x001b5c1d
INC R14
LAB_001b5b45:
LEA RAX,[R13 + 0x1]
CMP R13,R12
MOV R13,RAX
JNZ 0x001b5b28
JMP 0x001b5b60
LAB_001b5b53:
MOV R14,RCX
LAB_001b5b56:
XOR R15D,R15D
CMP R14,RBX
SETNZ R15B
LAB_001b5b60:
MOV EAX,R15D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b5b72:
MOV R15D,0xffffffff
CMP R14,RBX
JZ 0x001b5b60
MOVZX ECX,AL
LEA RDX,[R13 + -0x1]
CMP ECX,R9D
JNZ 0x001b5b95
CMP R13,R12
JZ 0x001b5b95
MOV AL,byte ptr [R13]
MOV RDX,R13
LAB_001b5b95:
INC RDX
MOV RCX,qword ptr [RDI + 0x58]
MOVZX EAX,AL
MOV R13B,byte ptr [RCX + RAX*0x1]
INC R10D
LAB_001b5ba6:
CMP R14,RBX
JZ 0x001b5b60
MOV RAX,qword ptr [RDI + 0x58]
LAB_001b5baf:
MOVZX ECX,byte ptr [R14]
CMP byte ptr [RAX + RCX*0x1],R13B
JZ 0x001b5bc3
INC R14
CMP R14,RBX
JNZ 0x001b5baf
JMP 0x001b5b60
LAB_001b5bc3:
INC R14
SUB RSP,0x8
MOV qword ptr [RBP + -0x48],RDI
MOV RSI,R14
MOV RCX,RDX
MOV RDX,RBX
MOV qword ptr [RBP + -0x38],RCX
MOV RAX,R8
MOV R8,R12
MOV dword ptr [RBP + -0x30],R9D
MOV qword ptr [RBP + -0x40],R10
PUSH R10
PUSH R11
PUSH RAX
CALL 0x001b59df
ADD RSP,0x20
TEST EAX,EAX
JLE 0x001b5c28
CMP R14,RBX
MOV R9D,dword ptr [RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x48]
MOV R10,qword ptr [RBP + -0x40]
MOV R11D,dword ptr [RBP + 0x18]
MOV R8D,dword ptr [RBP + 0x10]
MOV RDX,qword ptr [RBP + -0x38]
JNZ 0x001b5ba6
JMP 0x001b5b60
LAB_001b5c1d:
MOV R15D,0xffffffff
JMP 0x001b5b60
LAB_001b5c28:
MOV R15D,EAX
JMP 0x001b5b60
|
uint my_wildcmp_8bit_impl
(long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,ulong param_6,
uint param_7,uint param_8,int param_9)
{
char cVar1;
byte bVar2;
int iVar3;
uint uVar4;
byte *pbVar5;
uint uVar6;
byte *pbVar7;
bool bVar8;
if (my_string_stack_guard != (code *)0x0) {
param_6 = param_6 & 0xffffffff;
iVar3 = (*my_string_stack_guard)(param_9);
if (iVar3 != 0) {
return 1;
}
}
uVar4 = 0xffffffff;
while (param_4 != param_5) {
bVar2 = *param_4;
uVar6 = (uint)(char)bVar2;
bVar8 = uVar6 == param_7;
if (uVar6 != param_8 && !bVar8) {
do {
uVar4 = 1;
if (param_2 == param_3) {
return 1;
}
pbVar5 = param_4 + 1;
if (param_4 + 1 == param_5) {
pbVar5 = param_4;
}
if (uVar6 == (uint)param_6) {
param_4 = pbVar5;
}
if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_4) !=
*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2)) {
return 1;
}
param_2 = param_2 + 1;
param_4 = param_4 + 1;
if (param_4 == param_5) goto LAB_001b5b56;
bVar2 = *param_4;
uVar6 = (uint)(char)bVar2;
bVar8 = uVar6 == param_7;
} while ((uVar6 != param_8) && (uVar6 != param_7));
}
if (bVar8) {
do {
pbVar5 = param_2;
param_4 = param_4 + 1;
if (pbVar5 == param_3) {
return uVar4;
}
} while ((param_4 < param_5) && (param_2 = pbVar5 + 1, (int)(char)*param_4 == param_7));
param_2 = pbVar5 + 1;
if (param_4 == param_5) break;
bVar2 = *param_4;
}
if ((int)(char)bVar2 == param_8) {
if (param_4 + 1 != param_5) {
pbVar5 = param_4 + 2;
do {
bVar2 = pbVar5[-1];
if ((int)(char)bVar2 != param_8) {
if ((int)(char)bVar2 != param_7) {
if (param_2 == param_3) {
return 0xffffffff;
}
pbVar7 = pbVar5 + -1;
if (((uint)bVar2 == (uint)param_6) && (pbVar5 != param_5)) {
bVar2 = *pbVar5;
pbVar7 = pbVar5;
}
cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)bVar2);
while( true ) {
if (param_2 == param_3) {
return 0xffffffff;
}
while (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) != cVar1) {
param_2 = param_2 + 1;
if (param_2 == param_3) {
return 0xffffffff;
}
}
param_2 = param_2 + 1;
uVar4 = my_wildcmp_8bit_impl
(param_1,param_2,param_3,pbVar7 + 1,param_5,param_6,param_7,
param_8,param_9 + 1);
if ((int)uVar4 < 1) break;
param_6 = param_6 & 0xffffffff;
if (param_2 == param_3) {
return 0xffffffff;
}
}
return uVar4;
}
if (param_2 == param_3) {
return 0xffffffff;
}
param_2 = param_2 + 1;
}
bVar8 = pbVar5 != param_5;
pbVar5 = pbVar5 + 1;
} while (bVar8);
}
return 0;
}
}
LAB_001b5b56:
return (uint)(param_2 != param_3);
}
|
|
16,790
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long)
|
monkey531[P]llama/common/json.hpp
|
inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta,
std::uint64_t rest, std::uint64_t ten_k)
{
JSON_ASSERT(len >= 1);
JSON_ASSERT(dist <= delta);
JSON_ASSERT(rest <= delta);
JSON_ASSERT(ten_k > 0);
// <--------------------------- delta ---->
// <---- dist --------->
// --------------[------------------+-------------------]--------------
// M- w M+
//
// ten_k
// <------>
// <---- rest ---->
// --------------[------------------+----+--------------]--------------
// w V
// = buf * 10^k
//
// ten_k represents a unit-in-the-last-place in the decimal representation
// stored in buf.
// Decrement buf by ten_k while this takes buf closer to w.
// The tests are written in this order to avoid overflow in unsigned
// integer arithmetic.
while (rest < dist
&& delta - rest >= ten_k
&& (rest + ten_k < dist || dist - rest > rest + ten_k - dist))
{
JSON_ASSERT(buf[len - 1] != '0');
buf[len - 1]--;
rest += ten_k;
}
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long):
pushq %rax
testl %esi, %esi
jle 0x87deb
cmpq %rcx, %rdx
ja 0x87e07
subq %r8, %rcx
jb 0x87e23
testq %r9, %r9
je 0x87e3f
movl %esi, %eax
movq %r9, %rsi
subq %rdx, %rsi
movq %rdx, %r10
subq %r8, %r10
cmpq %rdx, %r8
jae 0x87dc8
subq %r9, %rcx
jb 0x87dc8
leaq (%r8,%r9), %r11
cmpq %rdx, %r11
jb 0x87dad
addq %rsi, %r8
cmpq %r8, %r10
jbe 0x87dc8
movb -0x1(%rdi,%rax), %r8b
cmpb $0x30, %r8b
je 0x87dca
decb %r8b
movb %r8b, -0x1(%rdi,%rax)
subq %r9, %r10
movq %r11, %r8
jmp 0x87d92
popq %rax
retq
leaq 0x27025(%rip), %rdi # 0xaedf6
leaq 0x27068(%rip), %rdx # 0xaee40
leaq 0x2c8cf(%rip), %rcx # 0xb46ae
movl $0x444d, %esi # imm = 0x444D
xorl %eax, %eax
callq 0x23ed0
leaq 0x27004(%rip), %rdi # 0xaedf6
leaq 0x27047(%rip), %rdx # 0xaee40
leaq 0x2c87f(%rip), %rcx # 0xb467f
movl $0x4431, %esi # imm = 0x4431
jmp 0x87de4
leaq 0x26fe8(%rip), %rdi # 0xaedf6
leaq 0x2702b(%rip), %rdx # 0xaee40
leaq 0x2c86c(%rip), %rcx # 0xb4688
movl $0x4432, %esi # imm = 0x4432
jmp 0x87de4
leaq 0x26fcc(%rip), %rdi # 0xaedf6
leaq 0x2700f(%rip), %rdx # 0xaee40
leaq 0x2c85e(%rip), %rcx # 0xb4696
movl $0x4433, %esi # imm = 0x4433
jmp 0x87de4
leaq 0x26fb0(%rip), %rdi # 0xaedf6
leaq 0x26ff3(%rip), %rdx # 0xaee40
leaq 0x2c850(%rip), %rcx # 0xb46a4
movl $0x4434, %esi # imm = 0x4434
jmp 0x87de4
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm:
push rax
test esi, esi
jle loc_87DEB
cmp rdx, rcx
ja loc_87E07
sub rcx, r8
jb loc_87E23
test r9, r9
jz loc_87E3F
mov eax, esi
mov rsi, r9
sub rsi, rdx
mov r10, rdx
sub r10, r8
loc_87D92:
cmp r8, rdx
jnb short loc_87DC8
sub rcx, r9
jb short loc_87DC8
lea r11, [r8+r9]
cmp r11, rdx
jb short loc_87DAD
add r8, rsi
cmp r10, r8
jbe short loc_87DC8
loc_87DAD:
mov r8b, [rdi+rax-1]
cmp r8b, 30h ; '0'
jz short loc_87DCA
dec r8b
mov [rdi+rax-1], r8b
sub r10, r9
mov r8, r11
jmp short loc_87D92
loc_87DC8:
pop rax
retn
loc_87DCA:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufLen10; "buf[len - 1] != '0'"
mov esi, 444Dh
loc_87DE4:
xor eax, eax
call _ggml_abort
loc_87DEB:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLen1; "len >= 1"
mov esi, 4431h
jmp short loc_87DE4
loc_87E07:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDistDelta; "dist <= delta"
mov esi, 4432h
jmp short loc_87DE4
loc_87E23:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRestDelta; "rest <= delta"
mov esi, 4433h
jmp short loc_87DE4
loc_87E3F:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTenK0; "ten_k > 0"
mov esi, 4434h
jmp short loc_87DE4
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
unsigned long long a6)
{
bool v6; // cf
unsigned long long v7; // rcx
unsigned long long v8; // r10
unsigned long long v9; // r11
char v10; // r8
if ( (int)a2 <= 0 )
{
while ( 1 )
LABEL_14:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17457LL,
"GGML_ASSERT(%s) failed",
"len >= 1");
}
if ( a3 > a4 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17458LL,
"GGML_ASSERT(%s) failed",
"dist <= delta");
goto LABEL_14;
}
v6 = a4 < a5;
v7 = a4 - a5;
if ( v6 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17459LL,
"GGML_ASSERT(%s) failed",
"rest <= delta");
goto LABEL_14;
}
if ( !a6 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17460LL,
"GGML_ASSERT(%s) failed",
"ten_k > 0");
goto LABEL_14;
}
v8 = a3 - a5;
while ( a5 < a3 )
{
v6 = v7 < a6;
v7 -= a6;
if ( v6 )
break;
v9 = a5 + a6;
if ( a5 + a6 >= a3 && v8 <= a6 - a3 + a5 )
break;
v10 = *((_BYTE *)this + (unsigned int)a2 - 1);
if ( v10 == 48 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17485LL,
"GGML_ASSERT(%s) failed",
"buf[len - 1] != '0'");
goto LABEL_14;
}
*((_BYTE *)this + (unsigned int)a2 - 1) = v10 - 1;
v8 -= a6;
a5 = v9;
}
}
|
grisu2_round:
PUSH RAX
TEST ESI,ESI
JLE 0x00187deb
CMP RDX,RCX
JA 0x00187e07
SUB RCX,R8
JC 0x00187e23
TEST R9,R9
JZ 0x00187e3f
MOV EAX,ESI
MOV RSI,R9
SUB RSI,RDX
MOV R10,RDX
SUB R10,R8
LAB_00187d92:
CMP R8,RDX
JNC 0x00187dc8
SUB RCX,R9
JC 0x00187dc8
LEA R11,[R8 + R9*0x1]
CMP R11,RDX
JC 0x00187dad
ADD R8,RSI
CMP R10,R8
JBE 0x00187dc8
LAB_00187dad:
MOV R8B,byte ptr [RDI + RAX*0x1 + -0x1]
CMP R8B,0x30
JZ 0x00187dca
DEC R8B
MOV byte ptr [RDI + RAX*0x1 + -0x1],R8B
SUB R10,R9
MOV R8,R11
JMP 0x00187d92
LAB_00187dc8:
POP RAX
RET
LAB_00187dca:
LEA RDI,[0x1aedf6]
LEA RDX,[0x1aee40]
LEA RCX,[0x1b46ae]
MOV ESI,0x444d
LAB_00187de4:
XOR EAX,EAX
CALL 0x00123ed0
LAB_00187deb:
LEA RDI,[0x1aedf6]
LEA RDX,[0x1aee40]
LEA RCX,[0x1b467f]
MOV ESI,0x4431
JMP 0x00187de4
LAB_00187e07:
LEA RDI,[0x1aedf6]
LEA RDX,[0x1aee40]
LEA RCX,[0x1b4688]
MOV ESI,0x4432
JMP 0x00187de4
LAB_00187e23:
LEA RDI,[0x1aedf6]
LEA RDX,[0x1aee40]
LEA RCX,[0x1b4696]
MOV ESI,0x4433
JMP 0x00187de4
LAB_00187e3f:
LEA RDI,[0x1aedf6]
LEA RDX,[0x1aee40]
LEA RCX,[0x1b46a4]
MOV ESI,0x4434
JMP 0x00187de4
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned
long, unsigned long, unsigned long) */
int8
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round
(char *param_1,int param_2,ulong param_3,ulong param_4,ulong param_5,ulong param_6)
{
int8 in_RAX;
ulong uVar1;
char *pcVar2;
int8 uVar3;
ulong uVar4;
bool bVar5;
if (param_2 < 1) {
pcVar2 = "len >= 1";
uVar3 = 0x4431;
}
else if (param_4 < param_3) {
pcVar2 = "dist <= delta";
uVar3 = 0x4432;
}
else {
uVar1 = param_4 - param_5;
if (param_4 < param_5) {
pcVar2 = "rest <= delta";
uVar3 = 0x4433;
}
else if (param_6 == 0) {
pcVar2 = "ten_k > 0";
uVar3 = 0x4434;
}
else {
uVar4 = param_3 - param_5;
while( true ) {
if (((param_3 <= param_5) || (bVar5 = uVar1 < param_6, uVar1 = uVar1 - param_6, bVar5)) ||
((param_3 <= param_5 + param_6 && (uVar4 <= param_5 + (param_6 - param_3))))) {
return in_RAX;
}
if (param_1[(ulong)(uint)param_2 - 1] == '0') break;
param_1[(ulong)(uint)param_2 - 1] = param_1[(ulong)(uint)param_2 - 1] + -1;
uVar4 = uVar4 - param_6;
param_5 = param_5 + param_6;
}
pcVar2 = "buf[len - 1] != \'0\'";
uVar3 = 0x444d;
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
16,791
|
With_clause::find_table_def(TABLE_LIST*, With_element*)
|
eloqsql/sql/sql_cte.cc
|
With_element *With_clause::find_table_def(TABLE_LIST *table,
With_element *barrier)
{
for (With_element *with_elem= with_list.first;
with_elem != barrier;
with_elem= with_elem->next)
{
if (my_strcasecmp(system_charset_info, with_elem->get_name_str(),
table->table_name.str) == 0 &&
!table->is_fqtn)
{
table->set_derived();
with_elem->referenced= true;
return with_elem;
}
}
return NULL;
}
|
O0
|
cpp
|
With_clause::find_table_def(TABLE_LIST*, With_element*):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x7e6403
leaq 0xdd7053(%rip), %rax # 0x15bd3d8
movq (%rax), %rax
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0xdd703a(%rip), %rax # 0x15bd3d8
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
callq 0x7e7b60
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x28(%rcx), %rdx
callq *%rax
cmpl $0x0, %eax
jne 0x7e63f0
movq -0x18(%rbp), %rax
testb $0x1, 0x3c5(%rax)
jne 0x7e63f0
movq -0x18(%rbp), %rdi
callq 0x538300
movq -0x28(%rbp), %rax
movb $0x1, 0x64(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7e640b
jmp 0x7e63f2
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x7e6370
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN11With_clause14find_table_defEP10TABLE_LISTP12With_element:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_28], rax
loc_7E6370:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jz loc_7E6403
lea rax, system_charset_info
mov rax, [rax]
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov [rbp+var_30], rax
lea rax, system_charset_info
mov rax, [rax]
mov [rbp+var_38], rax
mov rdi, [rbp+var_28]; this
call _ZN12With_element12get_name_strEv; With_element::get_name_str(void)
mov rdi, [rbp+var_38]
mov rsi, rax
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
mov rdx, [rcx+28h]
call rax
cmp eax, 0
jnz short loc_7E63F0
mov rax, [rbp+var_18]
test byte ptr [rax+3C5h], 1
jnz short loc_7E63F0
mov rdi, [rbp+var_18]; this
call _ZN10TABLE_LIST11set_derivedEv; TABLE_LIST::set_derived(void)
mov rax, [rbp+var_28]
mov byte ptr [rax+64h], 1
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_7E640B
loc_7E63F0:
jmp short $+2
loc_7E63F2:
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov [rbp+var_28], rax
jmp loc_7E6370
loc_7E6403:
mov [rbp+var_8], 0
loc_7E640B:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
With_element * With_clause::find_table_def(With_clause *this, TABLE_LIST *a2, With_element *a3)
{
long long name_str; // rax
long long v5; // [rsp+8h] [rbp-38h]
unsigned int ( *v6)(long long, long long, _QWORD); // [rsp+10h] [rbp-30h]
With_element *i; // [rsp+18h] [rbp-28h]
for ( i = (With_element *)*((_QWORD *)this + 2); i != a3; i = (With_element *)*((_QWORD *)i + 1) )
{
v6 = *(unsigned int ( **)(long long, long long, _QWORD))(*(_QWORD *)(system_charset_info + 192) + 64LL);
v5 = system_charset_info;
name_str = With_element::get_name_str(i);
if ( !v6(v5, name_str, *((_QWORD *)a2 + 5)) && (*((_BYTE *)a2 + 965) & 1) == 0 )
{
TABLE_LIST::set_derived(a2);
*((_BYTE *)i + 100) = 1;
return i;
}
}
return 0LL;
}
|
set_last:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
POP RBP
RET
|
/* I_P_List_no_push_back<Wait_for_flush>::set_last(Wait_for_flush**) */
void I_P_List_no_push_back<Wait_for_flush>::set_last(Wait_for_flush **param_1)
{
return;
}
|
|
16,792
|
clip_image_u8_free
|
monkey531[P]llama/examples/llava/clip.cpp
|
void clip_image_u8_free(struct clip_image_u8 * img) { delete img; }
|
O3
|
cpp
|
clip_image_u8_free:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x30c93
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x30c93
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x1dc50
movl $0x20, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1dc50
|
clip_image_u8_free:
push rbx
mov rbx, rdi
test rdi, rdi
jz short loc_30C93
mov rdi, [rbx+8]; void *
test rdi, rdi
jz short loc_30C93
mov rsi, [rbx+18h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_30C93:
mov esi, 20h ; ' '; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
|
void clip_image_u8_free(_QWORD *a1)
{
void *v2; // rdi
if ( a1 )
{
v2 = (void *)a1[1];
if ( v2 )
operator delete(v2, a1[3] - (_QWORD)v2);
}
operator delete(a1, 0x20uLL);
}
|
clip_image_u8_free:
PUSH RBX
MOV RBX,RDI
TEST RDI,RDI
JZ 0x00130c93
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x00130c93
MOV RSI,qword ptr [RBX + 0x18]
SUB RSI,RDI
CALL 0x0011dc50
LAB_00130c93:
MOV ESI,0x20
MOV RDI,RBX
POP RBX
JMP 0x0011dc50
|
void clip_image_u8_free(void *param_1)
{
void *pvVar1;
if ((param_1 != (void *)0x0) && (pvVar1 = *(void **)((long)param_1 + 8), pvVar1 != (void *)0x0)) {
operator_delete(pvVar1,*(long *)((long)param_1 + 0x18) - (long)pvVar1);
}
operator_delete(param_1,0x20);
return;
}
|
|
16,793
|
mi_unique_comp
|
eloqsql/storage/myisam/mi_unique.c
|
int mi_unique_comp(MI_UNIQUEDEF *def, const uchar *a, const uchar *b,
my_bool null_are_equal)
{
const uchar *pos_a, *pos_b, *end;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
{
enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type;
uint a_length, b_length;
a_length= b_length= keyseg->length;
/* If part is NULL it's regarded as different */
if (keyseg->null_bit)
{
uint tmp;
if ((tmp=(a[keyseg->null_pos] & keyseg->null_bit)) !=
(uint) (b[keyseg->null_pos] & keyseg->null_bit))
return 1;
if (tmp)
{
if (!null_are_equal)
return 1;
continue;
}
}
pos_a= a+keyseg->start;
pos_b= b+keyseg->start;
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= keyseg->bit_start;
if (pack_length == 1)
{
a_length= (uint) *(uchar*) pos_a++;
b_length= (uint) *(uchar*) pos_b++;
}
else
{
a_length= uint2korr(pos_a);
b_length= uint2korr(pos_b);
pos_a+= 2; /* Skip VARCHAR length */
pos_b+= 2;
}
set_if_smaller(a_length, keyseg->length); /* Safety */
set_if_smaller(b_length, keyseg->length); /* safety */
}
else if (keyseg->flag & HA_BLOB_PART)
{
/* Only compare 'length' characters if length != 0 */
a_length= _mi_calc_blob_length(keyseg->bit_start,pos_a);
b_length= _mi_calc_blob_length(keyseg->bit_start,pos_b);
/* Check that a and b are of equal length */
if (keyseg->length)
{
/*
This is used in some cases when we are not interested in comparing
the whole length of the blob.
*/
set_if_smaller(a_length, keyseg->length);
set_if_smaller(b_length, keyseg->length);
}
memcpy((char**) &pos_a, pos_a+keyseg->bit_start, sizeof(char*));
memcpy((char**) &pos_b, pos_b+keyseg->bit_start, sizeof(char*));
}
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
type == HA_KEYTYPE_VARTEXT2)
{
if (ha_compare_text(keyseg->charset, (uchar *) pos_a, a_length,
(uchar *) pos_b, b_length, 0))
return 1;
}
else
{
if (a_length != b_length)
return 1;
end= pos_a+a_length;
while (pos_a != end)
{
if (*pos_a++ != *pos_b++)
return 1;
}
}
}
return 0;
}
|
O3
|
c
|
mi_unique_comp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rdi), %r15
movq %rdi, -0x48(%rbp)
cmpq 0x10(%rdi), %r15
jae 0x50d13
movl %ecx, %r14d
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movl %ecx, -0x2c(%rbp)
movzbl 0x18(%r15), %r12d
movzwl 0x14(%r15), %ecx
movb 0x19(%r15), %dil
testb %dil, %dil
je 0x50bfa
movl 0xc(%r15), %eax
movb (%rsi,%rax), %r8b
andb %dil, %r8b
andb (%rdx,%rax), %dil
movl $0x1, %eax
cmpb %dil, %r8b
jne 0x50d15
testb %r8b, %r8b
je 0x50bfa
testb %r14b, %r14b
jne 0x50cd0
jmp 0x50d15
movl 0x8(%r15), %r13d
leaq (%rsi,%r13), %rbx
addq %rdx, %r13
movzwl 0x12(%r15), %eax
testb $0x8, %al
jne 0x50c19
testb $0x20, %al
jne 0x50c30
movl %ecx, %esi
jmp 0x50c9d
cmpb $0x1, 0x1a(%r15)
jne 0x50c7f
movzbl (%rbx), %eax
incq %rbx
movzbl (%r13), %edx
incq %r13
jmp 0x50c8f
movzbl 0x1a(%r15), %edi
movq %rbx, %rsi
callq 0x41b5d
movq %rax, %r14
movzbl 0x1a(%r15), %edi
movq %r13, %rsi
callq 0x41b5d
movzwl 0x14(%r15), %edx
cmpl %edx, %r14d
movl %edx, %ecx
cmovbl %r14d, %ecx
cmpl %edx, %eax
movl %edx, %esi
cmovbl %eax, %esi
testl %edx, %edx
cmovel %r14d, %ecx
movl -0x2c(%rbp), %r14d
cmovel %eax, %esi
movzbl 0x1a(%r15), %eax
movq (%rbx,%rax), %rbx
movq (%r13,%rax), %r13
jmp 0x50c9d
movzwl (%rbx), %eax
movzwl (%r13), %edx
addq $0x2, %rbx
addq $0x2, %r13
cmpl %ecx, %eax
cmovael %ecx, %eax
cmpl %ecx, %edx
movl %ecx, %esi
cmovbl %edx, %esi
movl %eax, %ecx
cmpl $0x11, %r12d
ja 0x50ce4
movl $0x28002, %eax # imm = 0x28002
btl %r12d, %eax
jae 0x50ce4
movq (%r15), %rdi
movl %ecx, %edx
movl %esi, %r8d
movq %rbx, %rsi
movq %r13, %rcx
xorl %r9d, %r9d
callq 0x6ebac
testl %eax, %eax
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
jne 0x50d24
addq $0x20, %r15
movq -0x48(%rbp), %rax
cmpq 0x10(%rax), %r15
jb 0x50bb7
jmp 0x50d13
movl $0x1, %eax
cmpl %esi, %ecx
jne 0x50d15
movl %ecx, %ecx
xorl %r8d, %r8d
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
cmpq %r8, %rcx
je 0x50cd0
movb (%rbx,%r8), %r9b
leaq 0x1(%r8), %rdi
cmpb (%r13,%r8), %r9b
movq %rdi, %r8
je 0x50cfa
jmp 0x50d15
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x50d15
nop
|
mi_unique_comp:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, [rdi+8]
mov [rbp+var_48], rdi
cmp r15, [rdi+10h]
jnb loc_50D13
mov r14d, ecx
mov [rbp+var_40], rdx
mov [rbp+var_38], rsi
mov [rbp+var_2C], ecx
loc_50BB7:
movzx r12d, byte ptr [r15+18h]
movzx ecx, word ptr [r15+14h]
mov dil, [r15+19h]
test dil, dil
jz short loc_50BFA
mov eax, [r15+0Ch]
mov r8b, [rsi+rax]
and r8b, dil
and dil, [rdx+rax]
mov eax, 1
cmp r8b, dil
jnz loc_50D15
test r8b, r8b
jz short loc_50BFA
test r14b, r14b
jnz loc_50CD0
jmp loc_50D15
loc_50BFA:
mov r13d, [r15+8]
lea rbx, [rsi+r13]
add r13, rdx
movzx eax, word ptr [r15+12h]
test al, 8
jnz short loc_50C19
test al, 20h
jnz short loc_50C30
mov esi, ecx
jmp loc_50C9D
loc_50C19:
cmp byte ptr [r15+1Ah], 1
jnz short loc_50C7F
movzx eax, byte ptr [rbx]
inc rbx
movzx edx, byte ptr [r13+0]
inc r13
jmp short loc_50C8F
loc_50C30:
movzx edi, byte ptr [r15+1Ah]
mov rsi, rbx
call _mi_calc_blob_length
mov r14, rax
movzx edi, byte ptr [r15+1Ah]
mov rsi, r13
call _mi_calc_blob_length
movzx edx, word ptr [r15+14h]
cmp r14d, edx
mov ecx, edx
cmovb ecx, r14d
cmp eax, edx
mov esi, edx
cmovb esi, eax
test edx, edx
cmovz ecx, r14d
mov r14d, [rbp+var_2C]
cmovz esi, eax
movzx eax, byte ptr [r15+1Ah]
mov rbx, [rbx+rax]
mov r13, [r13+rax+0]
jmp short loc_50C9D
loc_50C7F:
movzx eax, word ptr [rbx]
movzx edx, word ptr [r13+0]
add rbx, 2
add r13, 2
loc_50C8F:
cmp eax, ecx
cmovnb eax, ecx
cmp edx, ecx
mov esi, ecx
cmovb esi, edx
mov ecx, eax
loc_50C9D:
cmp r12d, 11h
ja short loc_50CE4
mov eax, 28002h
bt eax, r12d
jnb short loc_50CE4
mov rdi, [r15]
mov edx, ecx
mov r8d, esi
mov rsi, rbx
mov rcx, r13
xor r9d, r9d
call ha_compare_text
test eax, eax
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
jnz short loc_50D24
loc_50CD0:
add r15, 20h ; ' '
mov rax, [rbp+var_48]
cmp r15, [rax+10h]
jb loc_50BB7
jmp short loc_50D13
loc_50CE4:
mov eax, 1
cmp ecx, esi
jnz short loc_50D15
mov ecx, ecx
xor r8d, r8d
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
loc_50CFA:
cmp rcx, r8
jz short loc_50CD0
mov r9b, [rbx+r8]
lea rdi, [r8+1]
cmp r9b, [r13+r8+0]
mov r8, rdi
jz short loc_50CFA
jmp short loc_50D15
loc_50D13:
xor eax, eax
loc_50D15:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_50D24:
mov eax, 1
jmp short loc_50D15
|
long long mi_unique_comp(long long a1, long long a2, long long a3, char a4)
{
unsigned long long v4; // r15
char v5; // r14
unsigned int v6; // r12d
unsigned int v7; // ecx
char v8; // di
long long v9; // rax
char v10; // r8
char v11; // di
long long result; // rax
long long v13; // r13
unsigned __int8 *v14; // rbx
unsigned __int8 *v15; // r13
__int16 v16; // ax
unsigned int v17; // esi
unsigned int v18; // eax
unsigned int v19; // edx
unsigned int v20; // r14d
unsigned int v21; // eax
unsigned int v22; // edx
long long v23; // rax
int v24; // eax
int v25; // eax
long long v26; // r8
bool v27; // zf
long long v29; // [rsp+10h] [rbp-40h]
long long v30; // [rsp+18h] [rbp-38h]
v4 = *(_QWORD *)(a1 + 8);
if ( v4 < *(_QWORD *)(a1 + 16) )
{
v5 = a4;
v29 = a3;
v30 = a2;
do
{
v6 = *(unsigned __int8 *)(v4 + 24);
v7 = *(unsigned __int16 *)(v4 + 20);
v8 = *(_BYTE *)(v4 + 25);
if ( !v8 )
goto LABEL_8;
v9 = *(unsigned int *)(v4 + 12);
v10 = v8 & *(_BYTE *)(a2 + v9);
v11 = *(_BYTE *)(a3 + v9) & v8;
result = 1LL;
if ( v10 != v11 )
return result;
if ( v10 )
{
if ( !v5 )
return result;
}
else
{
LABEL_8:
v13 = *(unsigned int *)(v4 + 8);
v14 = (unsigned __int8 *)(a2 + v13);
v15 = (unsigned __int8 *)(a3 + v13);
v16 = *(_WORD *)(v4 + 18);
if ( (v16 & 8) != 0 )
{
if ( *(_BYTE *)(v4 + 26) == 1 )
{
v18 = *v14++;
v19 = *v15++;
}
else
{
v18 = *(unsigned __int16 *)v14;
v19 = *(unsigned __int16 *)v15;
v14 += 2;
v15 += 2;
}
if ( v18 >= v7 )
v18 = *(unsigned __int16 *)(v4 + 20);
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v19 < v7 )
v17 = v19;
v7 = v18;
}
else if ( (v16 & 0x20) != 0 )
{
v20 = mi_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v14);
v21 = mi_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v15);
v22 = *(unsigned __int16 *)(v4 + 20);
v7 = v22;
if ( v20 < v22 )
v7 = v20;
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v21 < v22 )
v17 = v21;
if ( !*(_WORD *)(v4 + 20) )
v7 = v20;
v5 = a4;
if ( !*(_WORD *)(v4 + 20) )
v17 = v21;
v23 = *(unsigned __int8 *)(v4 + 26);
v14 = *(unsigned __int8 **)&v14[v23];
v15 = *(unsigned __int8 **)&v15[v23];
}
else
{
v17 = *(unsigned __int16 *)(v4 + 20);
}
if ( v6 <= 0x11 && (v24 = 163842, _bittest(&v24, v6)) )
{
v25 = ha_compare_text(*(_QWORD *)v4, v14, v7, v15, v17, 0LL);
a3 = v29;
a2 = v30;
if ( v25 )
return 1LL;
}
else
{
result = 1LL;
if ( v7 != v17 )
return result;
v26 = 0LL;
a3 = v29;
a2 = v30;
while ( v7 != v26 )
{
v27 = v14[v26] == v15[v26];
++v26;
if ( !v27 )
return result;
}
}
}
v4 += 32LL;
}
while ( v4 < *(_QWORD *)(a1 + 16) );
}
return 0LL;
}
|
mi_unique_comp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,qword ptr [RDI + 0x8]
MOV qword ptr [RBP + -0x48],RDI
CMP R15,qword ptr [RDI + 0x10]
JNC 0x00150d13
MOV R14D,ECX
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x38],RSI
MOV dword ptr [RBP + -0x2c],ECX
LAB_00150bb7:
MOVZX R12D,byte ptr [R15 + 0x18]
MOVZX ECX,word ptr [R15 + 0x14]
MOV DIL,byte ptr [R15 + 0x19]
TEST DIL,DIL
JZ 0x00150bfa
MOV EAX,dword ptr [R15 + 0xc]
MOV R8B,byte ptr [RSI + RAX*0x1]
AND R8B,DIL
AND DIL,byte ptr [RDX + RAX*0x1]
MOV EAX,0x1
CMP R8B,DIL
JNZ 0x00150d15
TEST R8B,R8B
JZ 0x00150bfa
TEST R14B,R14B
JNZ 0x00150cd0
JMP 0x00150d15
LAB_00150bfa:
MOV R13D,dword ptr [R15 + 0x8]
LEA RBX,[RSI + R13*0x1]
ADD R13,RDX
MOVZX EAX,word ptr [R15 + 0x12]
TEST AL,0x8
JNZ 0x00150c19
TEST AL,0x20
JNZ 0x00150c30
MOV ESI,ECX
JMP 0x00150c9d
LAB_00150c19:
CMP byte ptr [R15 + 0x1a],0x1
JNZ 0x00150c7f
MOVZX EAX,byte ptr [RBX]
INC RBX
MOVZX EDX,byte ptr [R13]
INC R13
JMP 0x00150c8f
LAB_00150c30:
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,RBX
CALL 0x00141b5d
MOV R14,RAX
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,R13
CALL 0x00141b5d
MOVZX EDX,word ptr [R15 + 0x14]
CMP R14D,EDX
MOV ECX,EDX
CMOVC ECX,R14D
CMP EAX,EDX
MOV ESI,EDX
CMOVC ESI,EAX
TEST EDX,EDX
CMOVZ ECX,R14D
MOV R14D,dword ptr [RBP + -0x2c]
CMOVZ ESI,EAX
MOVZX EAX,byte ptr [R15 + 0x1a]
MOV RBX,qword ptr [RBX + RAX*0x1]
MOV R13,qword ptr [R13 + RAX*0x1]
JMP 0x00150c9d
LAB_00150c7f:
MOVZX EAX,word ptr [RBX]
MOVZX EDX,word ptr [R13]
ADD RBX,0x2
ADD R13,0x2
LAB_00150c8f:
CMP EAX,ECX
CMOVNC EAX,ECX
CMP EDX,ECX
MOV ESI,ECX
CMOVC ESI,EDX
MOV ECX,EAX
LAB_00150c9d:
CMP R12D,0x11
JA 0x00150ce4
MOV EAX,0x28002
BT EAX,R12D
JNC 0x00150ce4
MOV RDI,qword ptr [R15]
MOV EDX,ECX
MOV R8D,ESI
MOV RSI,RBX
MOV RCX,R13
XOR R9D,R9D
CALL 0x0016ebac
TEST EAX,EAX
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
JNZ 0x00150d24
LAB_00150cd0:
ADD R15,0x20
MOV RAX,qword ptr [RBP + -0x48]
CMP R15,qword ptr [RAX + 0x10]
JC 0x00150bb7
JMP 0x00150d13
LAB_00150ce4:
MOV EAX,0x1
CMP ECX,ESI
JNZ 0x00150d15
MOV ECX,ECX
XOR R8D,R8D
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
LAB_00150cfa:
CMP RCX,R8
JZ 0x00150cd0
MOV R9B,byte ptr [RBX + R8*0x1]
LEA RDI,[R8 + 0x1]
CMP R9B,byte ptr [R13 + R8*0x1]
MOV R8,RDI
JZ 0x00150cfa
JMP 0x00150d15
LAB_00150d13:
XOR EAX,EAX
LAB_00150d15:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00150d24:
MOV EAX,0x1
JMP 0x00150d15
|
int8 mi_unique_comp(long param_1,long param_2,long param_3,char param_4)
{
byte *pbVar1;
byte *pbVar2;
byte bVar3;
byte bVar4;
ushort uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
int iVar9;
uint uVar10;
ulong uVar11;
uint uVar12;
ushort *puVar13;
byte bVar14;
ulong uVar15;
ushort *puVar16;
int8 *puVar17;
puVar17 = *(int8 **)(param_1 + 8);
if (puVar17 < *(int8 **)(param_1 + 0x10)) {
do {
bVar4 = *(byte *)(puVar17 + 3);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar11 = (ulong)uVar5;
bVar3 = *(byte *)((long)puVar17 + 0x19);
if (bVar3 == 0) {
LAB_00150bfa:
puVar13 = (ushort *)(param_2 + (ulong)*(uint *)(puVar17 + 1));
puVar16 = (ushort *)((ulong)*(uint *)(puVar17 + 1) + param_3);
if ((*(ushort *)((long)puVar17 + 0x12) & 8) == 0) {
if ((*(ushort *)((long)puVar17 + 0x12) & 0x20) == 0) {
uVar10 = (uint)uVar5;
}
else {
uVar7 = _mi_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar13);
uVar8 = _mi_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar16);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar6 = (uint)uVar5;
if (uVar7 < uVar5) {
uVar6 = uVar7;
}
uVar12 = (uint)uVar5;
uVar10 = uVar12;
if (uVar8 < uVar12) {
uVar10 = uVar8;
}
if (uVar12 == 0) {
uVar10 = uVar8;
uVar6 = uVar7;
}
uVar11 = (ulong)uVar6;
puVar13 = *(ushort **)((long)puVar13 + (ulong)*(byte *)((long)puVar17 + 0x1a));
puVar16 = *(ushort **)((long)puVar16 + (ulong)*(byte *)((long)puVar17 + 0x1a));
}
}
else {
if (*(char *)((long)puVar17 + 0x1a) == '\x01') {
uVar6 = (uint)(byte)*puVar13;
puVar13 = (ushort *)((long)puVar13 + 1);
uVar7 = (uint)(byte)*puVar16;
puVar16 = (ushort *)((long)puVar16 + 1);
}
else {
uVar6 = (uint)*puVar13;
uVar7 = (uint)*puVar16;
puVar13 = puVar13 + 1;
puVar16 = puVar16 + 1;
}
uVar10 = (uint)uVar5;
if (uVar10 <= uVar6) {
uVar6 = uVar10;
}
if (uVar7 < uVar10) {
uVar10 = uVar7;
}
uVar11 = (ulong)uVar6;
}
if ((bVar4 < 0x12) && ((0x28002U >> (bVar4 & 0x1f) & 1) != 0)) {
iVar9 = ha_compare_text(*puVar17,puVar13,uVar11,puVar16,uVar10,0);
if (iVar9 != 0) {
return 1;
}
}
else {
if ((uint)uVar11 != uVar10) {
return 1;
}
uVar15 = 0;
while (uVar11 != uVar15) {
pbVar1 = (byte *)((long)puVar13 + uVar15);
pbVar2 = (byte *)((long)puVar16 + uVar15);
uVar15 = uVar15 + 1;
if (*pbVar1 != *pbVar2) {
return 1;
}
}
}
}
else {
bVar14 = *(byte *)(param_2 + (ulong)*(uint *)((long)puVar17 + 0xc)) & bVar3;
if (bVar14 != (bVar3 & *(byte *)(param_3 + (ulong)*(uint *)((long)puVar17 + 0xc)))) {
return 1;
}
if (bVar14 == 0) goto LAB_00150bfa;
if (param_4 == '\0') {
return 1;
}
}
puVar17 = puVar17 + 4;
} while (puVar17 < *(int8 **)(param_1 + 0x10));
}
return 0;
}
|
|
16,794
|
ac_expr_new_rule
|
alca/libalca/expr.c
|
ac_statement *ac_expr_new_rule(ac_token *name, ac_token *event, ac_expr *condition, int external, int private)
{
ac_statement *rule = ac_alloc(sizeof(ac_statement));
rule->type = STMT_RULE;
rule->u.rule.name = name;
rule->u.rule.event = event;
rule->u.rule.condition = condition;
rule->u.rule.external = external;
rule->u.rule.is_private = private;
return rule;
}
|
O0
|
c
|
ac_expr_new_rule:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl $0x28, %edi
callq 0x7890
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ac_expr_new_rule:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_20], r8d
mov edi, 28h ; '('
call _ac_alloc
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov dword ptr [rax], 0
mov rcx, [rbp+var_8]
mov rax, [rbp+var_28]
mov [rax+10h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_28]
mov [rax+18h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rax+20h], rcx
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_28]
mov [rax+8], ecx
mov ecx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rax+0Ch], ecx
mov rax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
|
long long ac_expr_new_rule(long long a1, long long a2, long long a3, int a4, int a5)
{
long long result; // rax
result = ac_alloc(40LL);
*(_DWORD *)result = 0;
*(_QWORD *)(result + 16) = a1;
*(_QWORD *)(result + 24) = a2;
*(_QWORD *)(result + 32) = a3;
*(_DWORD *)(result + 8) = a4;
*(_DWORD *)(result + 12) = a5;
return result;
}
|
ac_expr_new_rule:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV dword ptr [RBP + -0x20],R8D
MOV EDI,0x28
CALL 0x00107890
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x18],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x20],RCX
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x8],ECX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x30
POP RBP
RET
|
int4 *
ac_expr_new_rule(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int4 param_5)
{
int4 *puVar1;
puVar1 = (int4 *)ac_alloc(0x28);
*puVar1 = 0;
*(int8 *)(puVar1 + 4) = param_1;
*(int8 *)(puVar1 + 6) = param_2;
*(int8 *)(puVar1 + 8) = param_3;
puVar1[2] = param_4;
puVar1[3] = param_5;
return puVar1;
}
|
|
16,795
|
MainWindow::after_closedoor(Elevetor&)
|
LeafBlue[P]myElevetor/mainwindow.cpp
|
void MainWindow::after_closedoor(Elevetor &thisele)
{
//一秒后关门,此阶段认为是未关门阶段
QTimer::singleShot(1000,this,[this,&thisele](){
int thenext = thisele.get_next_end();
if(thenext!=0){
thisele.status = 3;
move_ele(thisele);
}else{
//在此处对外部请求进行检查,等下写
thisele.status = 1;
if(thisele.stop_checkout() == 1){
thisele.status = 3;
move_ele(thisele);
}
}
});
}
|
O1
|
cpp
|
MainWindow::after_closedoor(Elevetor&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x20, %edi
callq 0x4380
movl $0x1, (%rax)
leaq 0xbe3(%rip), %rcx # 0x7ba8
movq %rcx, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
movl $0x3e8, %edi # imm = 0x3E8
xorl %esi, %esi
movq %r14, %rdx
movq %rax, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4540
|
_ZN10MainWindow15after_closedoorER8Elevetor:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov dword ptr [rax], 1
lea rcx, _ZN9QtPrivate18QFunctorSlotObjectIZN10MainWindow15after_closedoorER8ElevetorE3$_0Li0ENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QFunctorSlotObject<MainWindow::after_closedoor(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *)
mov [rax+8], rcx
mov [rax+10h], r14
mov [rax+18h], rbx
mov edi, 3E8h
xor esi, esi
mov rdx, r14
mov rcx, rax
add rsp, 8
pop rbx
pop r14
jmp __ZN6QTimer14singleShotImplEiN2Qt9TimerTypeEPK7QObjectPN9QtPrivate15QSlotObjectBaseE; QTimer::singleShotImpl(int,Qt::TimerType,QObject const*,QtPrivate::QSlotObjectBase *)
|
long long MainWindow::after_closedoor(MainWindow *this, Elevetor *a2)
{
long long v2; // rax
v2 = operator new(0x20uLL);
*(_DWORD *)v2 = 1;
*(_QWORD *)(v2 + 8) = &QtPrivate::QFunctorSlotObject<MainWindow::after_closedoor(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl;
*(_QWORD *)(v2 + 16) = this;
*(_QWORD *)(v2 + 24) = a2;
return QTimer::singleShotImpl(1000LL, 0LL, this, v2);
}
|
after_closedoor:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV EDI,0x20
CALL 0x00104380
MOV dword ptr [RAX],0x1
LEA RCX,[0x107ba8]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],R14
MOV qword ptr [RAX + 0x18],RBX
MOV EDI,0x3e8
XOR ESI,ESI
MOV RDX,R14
MOV RCX,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00104540
|
/* MainWindow::after_closedoor(Elevetor&) */
void __thiscall MainWindow::after_closedoor(MainWindow *this,Elevetor *param_1)
{
int4 *puVar1;
puVar1 = (int4 *)operator_new(0x20);
*puVar1 = 1;
*(code **)(puVar1 + 2) =
QtPrivate::
QFunctorSlotObject<MainWindow::after_closedoor(Elevetor&)::$_0,0,QtPrivate::List<>,void>::
impl;
*(MainWindow **)(puVar1 + 4) = this;
*(Elevetor **)(puVar1 + 6) = param_1;
QTimer::singleShotImpl(1000,0,this,puVar1);
return;
}
|
|
16,796
|
common_log::pause()
|
monkey531[P]llama/common/log.cpp
|
void pause() {
{
std::lock_guard<std::mutex> lock(mtx);
if (!running) {
return;
}
running = false;
// push an entry to signal the worker thread to stop
{
auto & entry = entries[tail];
entry.is_end = true;
tail = (tail + 1) % entries.size();
}
cv.notify_one();
}
thrd.join();
}
|
O1
|
cpp
|
common_log::pause():
pushq %rbx
movq %rdi, %rbx
callq 0x1bcf0
testl %eax, %eax
jne 0xcd665
cmpb $0x1, 0x6a(%rbx)
jne 0xcd65c
movb $0x0, 0x6a(%rbx)
movq 0x78(%rbx), %rcx
movq 0x98(%rbx), %rax
leaq (%rax,%rax,2), %rdx
shlq $0x4, %rdx
movb $0x1, 0x28(%rcx,%rdx)
incq %rax
movq 0x80(%rbx), %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
xorl %edx, %edx
divq %rcx
movq %rdx, 0x98(%rbx)
leaq 0x30(%rbx), %rdi
callq 0x1b470
movq %rbx, %rdi
callq 0x1b6d0
addq $0x28, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x1bf20
movq %rbx, %rdi
popq %rbx
jmp 0x1b6d0
movl %eax, %edi
callq 0x1b600
|
_ZN10common_log5pauseEv:
push rbx
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz short loc_CD665
cmp byte ptr [rbx+6Ah], 1
jnz short loc_CD65C
mov byte ptr [rbx+6Ah], 0
mov rcx, [rbx+78h]
mov rax, [rbx+98h]
lea rdx, [rax+rax*2]
shl rdx, 4
mov byte ptr [rcx+rdx+28h], 1
inc rax
mov rdx, [rbx+80h]
sub rdx, rcx
sar rdx, 4
mov rcx, 0AAAAAAAAAAAAAAABh
imul rcx, rdx
xor edx, edx
div rcx
mov [rbx+98h], rdx
lea rdi, [rbx+30h]; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
mov rdi, rbx
call _pthread_mutex_unlock
add rbx, 28h ; '('
mov rdi, rbx; this
pop rbx
jmp __ZNSt6thread4joinEv; std::thread::join(void)
loc_CD65C:
mov rdi, rbx
pop rbx
jmp _pthread_mutex_unlock
loc_CD665:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
|
long long common_log::pause(common_log *this)
{
int v1; // eax
long long v2; // rcx
long long v3; // rax
v1 = pthread_mutex_lock();
if ( v1 )
std::__throw_system_error(v1);
if ( *((_BYTE *)this + 106) != 1 )
return pthread_mutex_unlock(this);
*((_BYTE *)this + 106) = 0;
v2 = *((_QWORD *)this + 15);
v3 = *((_QWORD *)this + 19);
*(_BYTE *)(v2 + 48 * v3 + 40) = 1;
*((_QWORD *)this + 19) = (v3 + 1) % (0xAAAAAAAAAAAAAAABLL * ((*((_QWORD *)this + 16) - v2) >> 4));
std::condition_variable::notify_one((common_log *)((char *)this + 48));
pthread_mutex_unlock(this);
return std::thread::join((common_log *)((char *)this + 40));
}
|
pause:
PUSH RBX
MOV RBX,RDI
CALL 0x0011bcf0
TEST EAX,EAX
JNZ 0x001cd665
CMP byte ptr [RBX + 0x6a],0x1
JNZ 0x001cd65c
MOV byte ptr [RBX + 0x6a],0x0
MOV RCX,qword ptr [RBX + 0x78]
MOV RAX,qword ptr [RBX + 0x98]
LEA RDX,[RAX + RAX*0x2]
SHL RDX,0x4
MOV byte ptr [RCX + RDX*0x1 + 0x28],0x1
INC RAX
MOV RDX,qword ptr [RBX + 0x80]
SUB RDX,RCX
SAR RDX,0x4
MOV RCX,-0x5555555555555555
IMUL RCX,RDX
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBX + 0x98],RDX
LEA RDI,[RBX + 0x30]
CALL 0x0011b470
MOV RDI,RBX
CALL 0x0011b6d0
ADD RBX,0x28
MOV RDI,RBX
POP RBX
JMP 0x0011bf20
LAB_001cd65c:
MOV RDI,RBX
POP RBX
JMP 0x0011b6d0
LAB_001cd665:
MOV EDI,EAX
CALL 0x0011b600
|
/* common_log::pause() */
void __thiscall common_log::pause(common_log *this)
{
long lVar1;
long lVar2;
int iVar3;
iVar3 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
if (this[0x6a] == (common_log)0x1) {
this[0x6a] = (common_log)0x0;
lVar1 = *(long *)(this + 0x78);
lVar2 = *(long *)(this + 0x98);
*(int1 *)(lVar1 + 0x28 + lVar2 * 0x30) = 1;
*(ulong *)(this + 0x98) =
(lVar2 + 1U) % (ulong)((*(long *)(this + 0x80) - lVar1 >> 4) * -0x5555555555555555);
std::condition_variable::notify_one();
pthread_mutex_unlock((pthread_mutex_t *)this);
std::thread::join();
return;
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
|
|
16,797
|
common_log::pause()
|
monkey531[P]llama/common/log.cpp
|
void pause() {
{
std::lock_guard<std::mutex> lock(mtx);
if (!running) {
return;
}
running = false;
// push an entry to signal the worker thread to stop
{
auto & entry = entries[tail];
entry.is_end = true;
tail = (tail + 1) % entries.size();
}
cv.notify_one();
}
thrd.join();
}
|
O2
|
cpp
|
common_log::pause():
pushq %rbx
movq %rdi, %rbx
callq 0x96e32
cmpb $0x1, 0x6a(%rbx)
jne 0x96642
movb $0x0, 0x6a(%rbx)
movq 0x78(%rbx), %rdx
movq 0x98(%rbx), %rcx
imulq $0x30, %rcx, %rax
movb $0x1, 0x28(%rdx,%rax)
incq %rcx
movq 0x80(%rbx), %rax
subq %rdx, %rax
pushq $0x30
popq %rsi
cqto
idivq %rsi
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rdx, 0x98(%rbx)
leaq 0x30(%rbx), %rdi
callq 0x23490
movq %rbx, %rdi
callq 0x236f0
addq $0x28, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x23f20
movq %rbx, %rdi
popq %rbx
jmp 0x236f0
nop
|
_ZN10common_log5pauseEv:
push rbx
mov rbx, rdi
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
cmp byte ptr [rbx+6Ah], 1
jnz short loc_96642
mov byte ptr [rbx+6Ah], 0
mov rdx, [rbx+78h]
mov rcx, [rbx+98h]
imul rax, rcx, 30h ; '0'
mov byte ptr [rdx+rax+28h], 1
inc rcx
mov rax, [rbx+80h]
sub rax, rdx
push 30h ; '0'
pop rsi
cqo
idiv rsi
mov rsi, rax
mov rax, rcx
xor edx, edx
div rsi
mov [rbx+98h], rdx
lea rdi, [rbx+30h]; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
mov rdi, rbx
call _pthread_mutex_unlock
add rbx, 28h ; '('
mov rdi, rbx; this
pop rbx
jmp __ZNSt6thread4joinEv; std::thread::join(void)
loc_96642:
mov rdi, rbx
pop rbx
jmp _pthread_mutex_unlock
|
long long common_log::pause(common_log *this)
{
long long v1; // rdx
long long v2; // rcx
std::mutex::lock(this);
if ( *((_BYTE *)this + 106) != 1 )
return pthread_mutex_unlock(this);
*((_BYTE *)this + 106) = 0;
v1 = *((_QWORD *)this + 15);
v2 = *((_QWORD *)this + 19);
*(_BYTE *)(v1 + 48 * v2 + 40) = 1;
*((_QWORD *)this + 19) = (v2 + 1) % (unsigned long long)((*((_QWORD *)this + 16) - v1) / 48);
std::condition_variable::notify_one((common_log *)((char *)this + 48));
pthread_mutex_unlock(this);
return std::thread::join((common_log *)((char *)this + 40));
}
|
pause:
PUSH RBX
MOV RBX,RDI
CALL 0x00196e32
CMP byte ptr [RBX + 0x6a],0x1
JNZ 0x00196642
MOV byte ptr [RBX + 0x6a],0x0
MOV RDX,qword ptr [RBX + 0x78]
MOV RCX,qword ptr [RBX + 0x98]
IMUL RAX,RCX,0x30
MOV byte ptr [RDX + RAX*0x1 + 0x28],0x1
INC RCX
MOV RAX,qword ptr [RBX + 0x80]
SUB RAX,RDX
PUSH 0x30
POP RSI
CQO
IDIV RSI
MOV RSI,RAX
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x98],RDX
LEA RDI,[RBX + 0x30]
CALL 0x00123490
MOV RDI,RBX
CALL 0x001236f0
ADD RBX,0x28
MOV RDI,RBX
POP RBX
JMP 0x00123f20
LAB_00196642:
MOV RDI,RBX
POP RBX
JMP 0x001236f0
|
/* common_log::pause() */
void __thiscall common_log::pause(common_log *this)
{
long lVar1;
long lVar2;
std::mutex::lock((mutex *)this);
if (this[0x6a] == (common_log)0x1) {
this[0x6a] = (common_log)0x0;
lVar1 = *(long *)(this + 0x78);
lVar2 = *(long *)(this + 0x98);
*(int1 *)(lVar1 + 0x28 + lVar2 * 0x30) = 1;
*(ulong *)(this + 0x98) = (lVar2 + 1U) % (ulong)((*(long *)(this + 0x80) - lVar1) / 0x30);
std::condition_variable::notify_one();
pthread_mutex_unlock((pthread_mutex_t *)this);
std::thread::join();
return;
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
|
|
16,798
|
int fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::width_checker, fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>>>(fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>>)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
|
FMT_CONSTEXPR auto get_dynamic_spec(FormatArg arg) -> int {
unsigned long long value = visit_format_arg(Handler(), arg);
if (value > to_unsigned(max_value<int>()))
throw_format_error("number is too big");
return static_cast<int>(value);
}
|
O0
|
c
|
int fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::width_checker, fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>>>(fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>>):
subq $0x108, %rsp # imm = 0x108
leaq 0x110(%rsp), %rax
leaq 0x4f(%rsp), %rcx
movq %rcx, 0xf8(%rsp)
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rax
movl 0x10(%rax), %eax
movq %rax, 0x40(%rsp)
subq $0xf, %rax
ja 0xe3fb7
movq 0x40(%rsp), %rax
leaq 0x6e6de(%rip), %rcx # 0x152308
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xe3fb7
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movl (%rax), %esi
callq 0xe4030
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movl (%rax), %esi
callq 0xe4070
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movq (%rax), %rsi
callq 0xe40b0
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movq (%rax), %rsi
callq 0xe40f0
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xf0(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq %rcx, 0xe8(%rsp)
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0xcd040
movq 0x38(%rsp), %rdi
movq %rax, 0xd0(%rsp)
movq %rdx, 0xd8(%rsp)
movq 0xd0(%rsp), %rax
movq 0xd8(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdx
callq 0xe4130
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xf0(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq %rcx, 0xb8(%rsp)
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
callq 0xcd0f0
movq 0x30(%rsp), %rdi
movq %rax, 0xa0(%rsp)
movq %rdx, 0xa8(%rsp)
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rcx
movq %rcx, 0x98(%rsp)
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0xe41a0
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xe4210
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movsbl (%rax), %esi
callq 0xe4230
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movss (%rax), %xmm0
callq 0xe4250
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movsd (%rax), %xmm0
callq 0xe4270
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rax
fldt (%rax)
movq %rsp, %rax
fstpt (%rax)
callq 0xe4290
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movq (%rax), %rsi
callq 0xe42b0
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xf0(%rsp), %rax
movq (%rax), %rsi
movq 0xf0(%rsp), %rax
movq 0x8(%rax), %rdx
leaq 0x80(%rsp), %rdi
callq 0x243f0
movq 0x28(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0xe42d0
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movq (%rax), %rsi
callq 0xe42f0
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xf0(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x60(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
leaq 0x70(%rsp), %rdi
callq 0xcd490
movq 0x20(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0xe4310
movq %rax, 0x100(%rsp)
jmp 0xe3fe0
movq 0xf8(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x5f(%rsp), %rdi
callq 0xccb10
movq 0x18(%rsp), %rdi
callq 0xe4330
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0xd4040
movl %eax, %edi
callq 0xc7930
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0xe401d
leaq 0x6e563(%rip), %rdi # 0x15257b
callq 0xc62f0
movq 0x50(%rsp), %rax
addq $0x108, %rsp # imm = 0x108
retq
nopw (%rax,%rax)
|
_ZN3fmt3v106detail16get_dynamic_specINS1_17precision_checkerENS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEEEEiT0_:
sub rsp, 108h
lea rax, [rsp+108h+arg_0]
lea rcx, [rsp+108h+var_B9]
mov [rsp+108h+var_10], rcx
mov [rsp+108h+var_18], rax
mov rax, [rsp+108h+var_18]
mov eax, [rax+10h]
mov [rsp+108h+var_C8], rax
sub rax, 0Fh; switch 16 cases
ja def_E3C31; jumptable 00000000000E3C31 default case
mov rax, [rsp+108h+var_C8]
lea rcx, jpt_E3C31
movsxd rax, ds:(jpt_E3C31 - 152308h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_E3C33:
jmp def_E3C31; jumptable 00000000000E3C31 case 0
loc_E3C38:
mov rdi, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 1
mov rax, [rsp+108h+var_18]
mov esi, [rax]
call _ZN3fmt3v106detail17precision_checkerclIiTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3C5C:
mov rdi, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 2
mov rax, [rsp+108h+var_18]
mov esi, [rax]
call _ZN3fmt3v106detail17precision_checkerclIjTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3C80:
mov rdi, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 3
mov rax, [rsp+108h+var_18]
mov rsi, [rax]
call _ZN3fmt3v106detail17precision_checkerclIxTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3CA5:
mov rdi, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 4
mov rax, [rsp+108h+var_18]
mov rsi, [rax]
call _ZN3fmt3v106detail17precision_checkerclIyTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3CCA:
mov rax, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 5
mov [rsp+108h+var_D0], rax
mov rcx, [rsp+108h+var_18]
mov rax, [rcx]
mov rcx, [rcx+8]
mov [rsp+108h+var_20], rcx
mov [rsp+108h+var_28], rax
mov rdi, [rsp+108h+var_28]
mov rsi, [rsp+108h+var_20]
call _ZN3fmt3v106detail17convert_for_visitInEET_S3_; fmt::v10::detail::convert_for_visit<__int128>(__int128)
mov rdi, [rsp+108h+var_D0]
mov [rsp+108h+var_38], rax
mov [rsp+108h+var_30], rdx
mov rax, [rsp+108h+var_38]
mov rcx, [rsp+108h+var_30]
mov [rsp+108h+var_40], rcx
mov [rsp+108h+var_48], rax
mov rsi, [rsp+108h+var_48]
mov rdx, [rsp+108h+var_40]
call _ZN3fmt3v106detail17precision_checkerclInTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3D62:
mov rax, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 6
mov [rsp+108h+var_D8], rax
mov rcx, [rsp+108h+var_18]
mov rax, [rcx]
mov rcx, [rcx+8]
mov [rsp+108h+var_50], rcx
mov [rsp+108h+var_58], rax
mov rdi, [rsp+108h+var_58]
mov rsi, [rsp+108h+var_50]
call _ZN3fmt3v106detail17convert_for_visitIoEET_S3_; fmt::v10::detail::convert_for_visit<unsigned __int128>(unsigned __int128)
mov rdi, [rsp+108h+var_D8]
mov [rsp+108h+var_68], rax
mov [rsp+108h+var_60], rdx
mov rax, [rsp+108h+var_68]
mov rcx, [rsp+108h+var_60]
mov [rsp+108h+var_70], rcx
mov [rsp+108h+var_78], rax
mov rsi, [rsp+108h+var_78]
mov rdx, [rsp+108h+var_70]
call _ZN3fmt3v106detail17precision_checkerclIoTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3DFA:
mov rdi, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 7
mov rax, [rsp+108h+var_18]
mov al, [rax]
and al, 1
movzx esi, al
call _ZN3fmt3v106detail17precision_checkerclIbTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3E23:
mov rdi, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 8
mov rax, [rsp+108h+var_18]
movsx esi, byte ptr [rax]
call _ZN3fmt3v106detail17precision_checkerclIcTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3E48:
mov rdi, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 9
mov rax, [rsp+108h+var_18]
movss xmm0, dword ptr [rax]
call _ZN3fmt3v106detail17precision_checkerclIfTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3E6E:
mov rdi, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 10
mov rax, [rsp+108h+var_18]
movsd xmm0, qword ptr [rax]
call _ZN3fmt3v106detail17precision_checkerclIdTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3E94:
mov rdi, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 11
mov rax, [rsp+108h+var_18]
fld tbyte ptr [rax]
mov rax, rsp
fstp tbyte ptr [rax]
call _ZN3fmt3v106detail17precision_checkerclIeTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3EBD:
mov rdi, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 12
mov rax, [rsp+108h+var_18]
mov rsi, [rax]
call _ZN3fmt3v106detail17precision_checkerclIPKcTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS7_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3EE2:
mov rax, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 13
mov [rsp+108h+var_E0], rax
mov rax, [rsp+108h+var_18]
mov rsi, [rax]
mov rax, [rsp+108h+var_18]
mov rdx, [rax+8]
lea rdi, [rsp+108h+var_88]
call _ZN3fmt3v1017basic_string_viewIcEC2EPKcm; fmt::v10::basic_string_view<char>::basic_string_view(char const*,ulong)
mov rdi, [rsp+108h+var_E0]
mov rsi, [rsp+108h+var_88]
mov rdx, [rsp+108h+var_80]
call _ZN3fmt3v106detail17precision_checkerclINS0_17basic_string_viewIcEETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS7_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3F3A:
mov rdi, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 14
mov rax, [rsp+108h+var_18]
mov rsi, [rax]
call _ZN3fmt3v106detail17precision_checkerclIPKvTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS7_
mov [rsp+108h+var_8], rax
jmp loc_E3FE0
loc_E3F5F:
mov rax, [rsp+108h+var_10]; jumptable 00000000000E3C31 case 15
mov [rsp+108h+var_E8], rax
mov rax, [rsp+108h+var_18]
mov rcx, [rax]
mov [rsp+108h+var_A8], rcx
mov rax, [rax+8]
mov [rsp+108h+var_A0], rax
mov rsi, [rsp+108h+var_A8]
mov rdx, [rsp+108h+var_A0]
lea rdi, [rsp+108h+var_98]
call _ZN3fmt3v1016basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEE6handleC2ENS0_6detail12custom_valueIS4_EE; fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>::handle::handle(fmt::v10::detail::custom_value<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
mov rdi, [rsp+108h+var_E8]
mov rsi, [rsp+108h+var_98]; char *
mov rdx, [rsp+108h+var_90]
call _ZN3fmt3v106detail17precision_checkerclINS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEE6handleETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEySB_
mov [rsp+108h+var_8], rax
jmp short loc_E3FE0
def_E3C31:
mov rax, [rsp+108h+var_10]; jumptable 00000000000E3C31 default case
mov [rsp+108h+var_F0], rax
lea rdi, [rsp+108h+var_A9]; this
call _ZN3fmt3v109monostateC2Ev; fmt::v10::monostate::monostate(void)
mov rdi, [rsp+108h+var_F0]
call _ZN3fmt3v106detail17precision_checkerclINS0_9monostateETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS6_
mov [rsp+108h+var_8], rax
loc_E3FE0:
mov rax, [rsp+108h+var_8]
mov [rsp+108h+var_B8], rax
mov rax, [rsp+108h+var_B8]
mov [rsp+108h+var_F8], rax
call _ZN3fmt3v106detail9max_valueIiEET_v; fmt::v10::detail::max_value<int>(void)
mov edi, eax
call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int)
mov ecx, eax
mov rax, [rsp+108h+var_F8]
mov ecx, ecx
cmp rax, rcx
jbe short loc_E401D
lea rdi, aNumberIsTooBig; "number is too big"
call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*)
loc_E401D:
mov rax, [rsp+108h+var_B8]
add rsp, 108h
retn
|
long long fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>(
_DWORD a1,
_DWORD a2,
_DWORD a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
char a7,
long long a8,
int a9)
{
long long v9; // rdi
const char *v10; // rsi
long long v11; // rax
long long v12; // rdx
long long v13; // rax
long long v14; // rdx
unsigned int v15; // eax
long double v17; // [rsp+0h] [rbp-108h]
unsigned long long v18; // [rsp+10h] [rbp-F8h]
char *v19; // [rsp+18h] [rbp-F0h]
char *v20; // [rsp+20h] [rbp-E8h]
char *v21; // [rsp+28h] [rbp-E0h]
char v22; // [rsp+4Fh] [rbp-B9h] BYREF
long long v23; // [rsp+50h] [rbp-B8h]
char v24; // [rsp+5Fh] [rbp-A9h] BYREF
long long v25; // [rsp+60h] [rbp-A8h]
long long v26; // [rsp+68h] [rbp-A0h]
char *v27[2]; // [rsp+70h] [rbp-98h] BYREF
_QWORD v28[4]; // [rsp+80h] [rbp-88h] BYREF
long long v29; // [rsp+A0h] [rbp-68h]
long long v30; // [rsp+A8h] [rbp-60h]
long long v31; // [rsp+B0h] [rbp-58h]
long long v32; // [rsp+B8h] [rbp-50h]
long long v33; // [rsp+C0h] [rbp-48h]
long long v34; // [rsp+C8h] [rbp-40h]
long long v35; // [rsp+D0h] [rbp-38h]
long long v36; // [rsp+D8h] [rbp-30h]
long long v37; // [rsp+E0h] [rbp-28h]
long long v38; // [rsp+E8h] [rbp-20h]
long long *v39; // [rsp+F0h] [rbp-18h]
char *v40; // [rsp+F8h] [rbp-10h]
long long v41; // [rsp+100h] [rbp-8h]
v40 = &v22;
v39 = (long long *)&a7;
switch ( a9 )
{
case 1:
v9 = (long long)v40;
v10 = (const char *)*(unsigned int *)v39;
v41 = ZN3fmt3v106detail17precision_checkerclIiTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_(
v40,
v10);
break;
case 2:
v9 = (long long)v40;
v10 = (const char *)*(unsigned int *)v39;
v41 = ZN3fmt3v106detail17precision_checkerclIjTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_(
v40,
v10);
break;
case 3:
v9 = (long long)v40;
v10 = (const char *)*v39;
v41 = ZN3fmt3v106detail17precision_checkerclIxTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_(
v40,
*v39);
break;
case 4:
v9 = (long long)v40;
v10 = (const char *)*v39;
v41 = ZN3fmt3v106detail17precision_checkerclIyTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_(
v40,
*v39);
break;
case 5:
v11 = *v39;
v38 = v39[1];
v37 = v11;
v9 = (long long)v40;
v35 = fmt::v10::detail::convert_for_visit<__int128>(v11);
v36 = v12;
v34 = v12;
v33 = v35;
v10 = (const char *)v35;
v41 = ZN3fmt3v106detail17precision_checkerclInTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_(
v9,
v35,
v12);
break;
case 6:
v13 = *v39;
v32 = v39[1];
v31 = v13;
v9 = (long long)v40;
v29 = fmt::v10::detail::convert_for_visit<unsigned __int128>(v13);
v30 = v14;
v28[3] = v14;
v28[2] = v29;
v10 = (const char *)v29;
v41 = ZN3fmt3v106detail17precision_checkerclIoTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_(
v9,
v29,
v14);
break;
case 7:
ZN3fmt3v106detail17precision_checkerclIbTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_(
v40,
*(_BYTE *)v39 & 1);
case 8:
ZN3fmt3v106detail17precision_checkerclIcTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_(
v40,
(unsigned int)*(char *)v39);
case 9:
ZN3fmt3v106detail17precision_checkerclIfTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_(
v40,
*(float *)v39);
case 10:
ZN3fmt3v106detail17precision_checkerclIdTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_(
v40,
*(double *)v39);
case 11:
v17 = *(long double *)v39;
ZN3fmt3v106detail17precision_checkerclIeTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_(*(_TBYTE *)&v17);
case 12:
ZN3fmt3v106detail17precision_checkerclIPKcTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS7_(
v40,
*v39);
case 13:
v21 = v40;
fmt::v10::basic_string_view<char>::basic_string_view(v28, *v39, v39[1]);
ZN3fmt3v106detail17precision_checkerclINS0_17basic_string_viewIcEETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS7_(
v21,
v28[0],
v28[1]);
case 14:
ZN3fmt3v106detail17precision_checkerclIPKvTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS7_(
v40,
*v39);
case 15:
v20 = v40;
v25 = *v39;
v26 = v39[1];
fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>::handle::handle(v27, v25, v26);
ZN3fmt3v106detail17precision_checkerclINS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEE6handleETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEySB_(
v20,
v27[0],
v27[1]);
default:
v19 = v40;
fmt::v10::monostate::monostate((fmt::v10::monostate *)&v24);
ZN3fmt3v106detail17precision_checkerclINS0_9monostateETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS6_(v19);
}
v23 = v41;
v18 = v41;
v15 = fmt::v10::detail::max_value<int>(v9);
if ( v18 > (unsigned int)fmt::v10::detail::to_unsigned<int>(v15) )
fmt::v10::detail::throw_format_error((fmt::v10::detail *)"number is too big", v10);
return v23;
}
|
get_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>:
SUB RSP,0x108
LEA RAX,[RSP + 0x110]
LEA RCX,[RSP + 0x4f]
MOV qword ptr [RSP + 0xf8],RCX
MOV qword ptr [RSP + 0xf0],RAX
MOV RAX,qword ptr [RSP + 0xf0]
MOV EAX,dword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x40],RAX
SUB RAX,0xf
JA 0x001e3fb7
MOV RAX,qword ptr [RSP + 0x40]
LEA RCX,[0x252308]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
JMP 0x001e3fb7
caseD_1:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xf0]
MOV ESI,dword ptr [RAX]
CALL 0x001e4030
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_2:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xf0]
MOV ESI,dword ptr [RAX]
CALL 0x001e4070
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_3:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RAX]
CALL 0x001e40b0
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_4:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RAX]
CALL 0x001e40f0
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_5:
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0x38],RAX
MOV RCX,qword ptr [RSP + 0xf0]
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0xe8],RCX
MOV qword ptr [RSP + 0xe0],RAX
MOV RDI,qword ptr [RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0xe8]
CALL 0x001cd040
MOV RDI,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0xd0],RAX
MOV qword ptr [RSP + 0xd8],RDX
MOV RAX,qword ptr [RSP + 0xd0]
MOV RCX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0xc8],RCX
MOV qword ptr [RSP + 0xc0],RAX
MOV RSI,qword ptr [RSP + 0xc0]
MOV RDX,qword ptr [RSP + 0xc8]
CALL 0x001e4130
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_6:
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0x30],RAX
MOV RCX,qword ptr [RSP + 0xf0]
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0xb8],RCX
MOV qword ptr [RSP + 0xb0],RAX
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xb8]
CALL 0x001cd0f0
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xa0],RAX
MOV qword ptr [RSP + 0xa8],RDX
MOV RAX,qword ptr [RSP + 0xa0]
MOV RCX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x98],RCX
MOV qword ptr [RSP + 0x90],RAX
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
CALL 0x001e41a0
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_7:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xf0]
MOV AL,byte ptr [RAX]
AND AL,0x1
MOVZX ESI,AL
CALL 0x001e4210
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_8:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xf0]
MOVSX ESI,byte ptr [RAX]
CALL 0x001e4230
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_9:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xf0]
MOVSS XMM0,dword ptr [RAX]
CALL 0x001e4250
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_a:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xf0]
MOVSD XMM0,qword ptr [RAX]
CALL 0x001e4270
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_b:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xf0]
FLD tword ptr [RAX]
MOV RAX,RSP
FSTP tword ptr [RAX]
CALL 0x001e4290
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_c:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RAX]
CALL 0x001e42b0
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_d:
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0xf0]
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x80]
CALL 0x001243f0
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
CALL 0x001e42d0
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_e:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RAX]
CALL 0x001e42f0
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
caseD_f:
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0xf0]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x60],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x68],RAX
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
LEA RDI,[RSP + 0x70]
CALL 0x001cd490
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x001e4310
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001e3fe0
default:
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x5f]
CALL 0x001ccb10
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001e4330
MOV qword ptr [RSP + 0x100],RAX
LAB_001e3fe0:
MOV RAX,qword ptr [RSP + 0x100]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001d4040
MOV EDI,EAX
CALL 0x001c7930
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,ECX
CMP RAX,RCX
JBE 0x001e401d
LEA RDI,[0x25257b]
CALL 0x001c62f0
LAB_001e401d:
MOV RAX,qword ptr [RSP + 0x50]
ADD RSP,0x108
RET
|
/* int fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::precision_checker,
fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char> >
>(fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char> >) */
int fmt::v10::detail::
get_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>
(void)
{
int1 auVar1 [16];
int4 uVar2;
ulong uVar3;
byte bVar4;
int iVar5;
uint uVar6;
int4 extraout_var;
int8 extraout_RDX;
int8 extraout_RDX_00;
byte bStack0000000000000008;
ulong in_stack_00000010;
int4 in_stack_00000018;
unkbyte10 in_stack_fffffffffffffef8;
int6 in_stack_ffffffffffffff02;
int1 local_b9;
ulong local_b8;
monostate local_a9;
detail *local_a8;
ulong local_a0;
int8 local_98;
int8 local_90;
int8 local_88;
int8 local_80;
int8 local_78;
int8 local_68;
detail *local_58;
ulong local_50;
__int128 *local_48;
__int128 *local_38;
detail *local_28;
ulong local_20;
int8 *local_18;
int1 *local_10;
ulong local_8;
uVar2 = _bStack0000000000000008;
local_18 = (int8 *)&stack0x00000008;
local_10 = &local_b9;
_bStack0000000000000008 = uVar2;
switch(in_stack_00000018) {
case 0:
default:
monostate::monostate(&local_a9);
local_8 = _ZN3fmt3v106detail17precision_checkerclINS0_9monostateETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS6_
(&local_b9);
break;
case 1:
local_8 = _ZN3fmt3v106detail17precision_checkerclIiTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
(&local_b9,uVar2);
break;
case 2:
local_8 = _ZN3fmt3v106detail17precision_checkerclIjTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
(&local_b9,uVar2);
break;
case 3:
local_8 = _ZN3fmt3v106detail17precision_checkerclIxTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
(&local_b9,_bStack0000000000000008);
break;
case 4:
local_8 = _ZN3fmt3v106detail17precision_checkerclIyTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
(&local_b9,_bStack0000000000000008);
break;
case 5:
local_28 = _bStack0000000000000008;
local_20 = in_stack_00000010;
auVar1._10_6_ = in_stack_ffffffffffffff02;
auVar1._0_10_ = in_stack_fffffffffffffef8;
local_48 = convert_for_visit<__int128>((__int128 *)_bStack0000000000000008,(__int128)auVar1);
local_38 = local_48;
local_8 = _ZN3fmt3v106detail17precision_checkerclInTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
(&local_b9,local_48,extraout_RDX);
break;
case 6:
local_58 = _bStack0000000000000008;
local_50 = in_stack_00000010;
uVar6 = convert_for_visit<unsigned__int128>(_bStack0000000000000008,(uint)in_stack_00000010);
local_78 = CONCAT44(extraout_var,uVar6);
local_68 = local_78;
local_8 = _ZN3fmt3v106detail17precision_checkerclIoTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
(&local_b9,local_78,extraout_RDX_00);
break;
case 7:
bVar4 = bStack0000000000000008 & 1;
local_8 = _ZN3fmt3v106detail17precision_checkerclIbTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
(&local_b9,bVar4);
break;
case 8:
iVar5 = (int)(char)bStack0000000000000008;
local_8 = _ZN3fmt3v106detail17precision_checkerclIcTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
(&local_b9,iVar5);
break;
case 9:
local_8 = _ZN3fmt3v106detail17precision_checkerclIfTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
(uVar2,&local_b9);
break;
case 10:
local_8 = _ZN3fmt3v106detail17precision_checkerclIdTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
(_bStack0000000000000008,&local_b9);
break;
case 0xb:
local_8 = _ZN3fmt3v106detail17precision_checkerclIeTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS5_
(&local_b9);
break;
case 0xc:
local_8 = _ZN3fmt3v106detail17precision_checkerclIPKcTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS7_
(&local_b9,_bStack0000000000000008);
break;
case 0xd:
basic_string_view<char>::basic_string_view
((basic_string_view<char> *)&local_88,(char *)_bStack0000000000000008,
in_stack_00000010);
local_8 = _ZN3fmt3v106detail17precision_checkerclINS0_17basic_string_viewIcEETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS7_
(&local_b9,local_88,local_80);
break;
case 0xe:
local_8 = _ZN3fmt3v106detail17precision_checkerclIPKvTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEyS7_
(&local_b9,_bStack0000000000000008);
break;
case 0xf:
local_a8 = _bStack0000000000000008;
local_a0 = in_stack_00000010;
basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>::handle::handle
((handle *)&local_98,_bStack0000000000000008,in_stack_00000010);
local_8 = _ZN3fmt3v106detail17precision_checkerclINS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEE6handleETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEySB_
(&local_b9,local_98,local_90);
}
uVar3 = local_8;
local_b8 = local_8;
iVar5 = max_value<int>();
uVar6 = to_unsigned<int>(iVar5);
if (uVar3 <= uVar6) {
return (int)local_b8;
}
/* WARNING: Subroutine does not return */
throw_format_error("number is too big");
}
|
|
16,799
|
mysql_get_timeout_value
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
unsigned int STDCALL
mysql_get_timeout_value(const MYSQL *mysql)
{
unsigned int timeout= 0;
if (mysql->options.extension && mysql->options.extension->async_context)
timeout= mysql->options.extension->async_context->timeout_value;
/* Avoid overflow. */
if (timeout > UINT_MAX - 999)
return (timeout - 1)/1000 + 1;
else
return (timeout+999)/1000;
}
|
O0
|
c
|
mysql_get_timeout_value:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x23834
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x23834
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movl 0x10(%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0xfffffc18, -0x14(%rbp) # imm = 0xFFFFFC18
jbe 0x23854
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divl %ecx
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x23868
movl -0x14(%rbp), %eax
addl $0x3e7, %eax # imm = 0x3E7
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divl %ecx
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
|
mysql_get_timeout_value:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], 0
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz short loc_23834
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_23834
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov eax, [rax+10h]
mov [rbp+var_14], eax
loc_23834:
cmp [rbp+var_14], 0FFFFFC18h
jbe short loc_23854
mov eax, [rbp+var_14]
sub eax, 1
mov ecx, 3E8h
xor edx, edx
div ecx
add eax, 1
mov [rbp+var_4], eax
jmp short loc_23868
loc_23854:
mov eax, [rbp+var_14]
add eax, 3E7h
mov ecx, 3E8h
xor edx, edx
div ecx
mov [rbp+var_4], eax
loc_23868:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long mysql_get_timeout_value(long long a1)
{
unsigned int v2; // [rsp+0h] [rbp-14h]
v2 = 0;
if ( *(_QWORD *)(a1 + 1152) && *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) )
v2 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 16LL);
if ( v2 <= 0xFFFFFC18 )
return (v2 + 999) / 0x3E8;
else
return (v2 - 1) / 0x3E8 + 1;
}
|
mysql_get_timeout_value:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00123834
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00123834
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x14],EAX
LAB_00123834:
CMP dword ptr [RBP + -0x14],0xfffffc18
JBE 0x00123854
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
MOV ECX,0x3e8
XOR EDX,EDX
DIV ECX
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00123868
LAB_00123854:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x3e7
MOV ECX,0x3e8
XOR EDX,EDX
DIV ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_00123868:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint mysql_get_timeout_value(long param_1)
{
int4 local_1c;
int4 local_c;
local_1c = 0;
if ((*(long *)(param_1 + 0x480) != 0) && (*(long *)(*(long *)(param_1 + 0x480) + 0x28) != 0)) {
local_1c = *(uint *)(*(long *)(*(long *)(param_1 + 0x480) + 0x28) + 0x10);
}
if (local_1c < 0xfffffc19) {
local_c = (local_1c + 999) / 1000;
}
else {
local_c = (local_1c - 1) / 1000 + 1;
}
return local_c;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.