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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
39,300 | ma_bin_search | eloqsql/storage/maria/ma_search.c | int _ma_bin_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page,
uint32 comp_flag, uchar **ret_pos,
uchar *buff __attribute__((unused)), my_bool *last_key)
{
int UNINIT_VAR(flag);
uint page_flag;
uint start, mid, end, save_end, totlength, nod_flag;
uint not_used[2];
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_SHARE *share= keyinfo->share;
uchar *page;
DBUG_ENTER("_ma_bin_search");
page_flag= ma_page->flag;
if (page_flag & KEYPAGE_FLAG_HAS_TRANSID)
{
/* Keys have varying length, can't use binary search */
DBUG_RETURN(_ma_seq_search(key, ma_page, comp_flag, ret_pos, buff,
last_key));
}
nod_flag= ma_page->node;
totlength= keyinfo->keylength + nod_flag;
DBUG_ASSERT(ma_page->size >= share->keypage_header + nod_flag + totlength);
start=0;
mid=1;
save_end= end= ((ma_page->size - nod_flag - share->keypage_header) /
totlength-1);
DBUG_PRINT("test",("page_length: %u end: %u", ma_page->size, end));
page= ma_page->buff + share->keypage_header + nod_flag;
while (start != end)
{
mid= (start+end)/2;
if ((flag=ha_key_cmp(keyinfo->seg, page + (uint) mid * totlength,
key->data, key->data_length + key->ref_length,
comp_flag, not_used))
>= 0)
end=mid;
else
start=mid+1;
}
if (mid != start)
flag=ha_key_cmp(keyinfo->seg, page + (uint) start * totlength,
key->data, key->data_length + key->ref_length, comp_flag,
not_used);
if (flag < 0)
start++; /* point at next, bigger key */
*ret_pos= (page + (uint) start * totlength);
*last_key= end == save_end;
DBUG_PRINT("exit",("flag: %d keypos: %d",flag,start));
DBUG_RETURN(flag);
} | O0 | c | ma_bin_search:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x699aa
jmp 0x69986
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0x69b20
movl %eax, -0x4(%rbp)
jmp 0x69b11
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x68(%rbp), %rax
movzwl 0xaa(%rax), %eax
addl -0x58(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x699c7
movl $0x0, -0x44(%rbp)
movl $0x1, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
subl -0x58(%rbp), %eax
movq -0x70(%rbp), %rcx
subl 0x744(%rcx), %eax
xorl %edx, %edx
divl -0x54(%rbp)
subl $0x1, %eax
movl %eax, -0x4c(%rbp)
movl %eax, -0x50(%rbp)
jmp 0x699f9
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x70(%rbp), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rax
movl -0x58(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x4c(%rbp), %eax
je 0x69a83
movl -0x44(%rbp), %eax
addl -0x4c(%rbp), %eax
shrl %eax
movl %eax, -0x48(%rbp)
movq -0x68(%rbp), %rax
movq 0xc0(%rax), %rdi
movq -0x78(%rbp), %rsi
movl -0x48(%rbp), %eax
imull -0x54(%rbp), %eax
movl %eax, %eax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
addl 0x14(%rax), %ecx
movl -0x1c(%rbp), %r8d
leaq -0x60(%rbp), %r9
callq 0xf05d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
jl 0x69a78
movl -0x48(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x69a81
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x69a18
movl -0x48(%rbp), %eax
cmpl -0x44(%rbp), %eax
je 0x69acb
movq -0x68(%rbp), %rax
movq 0xc0(%rax), %rdi
movq -0x78(%rbp), %rsi
movl -0x44(%rbp), %eax
imull -0x54(%rbp), %eax
movl %eax, %eax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
addl 0x14(%rax), %ecx
movl -0x1c(%rbp), %r8d
leaq -0x60(%rbp), %r9
callq 0xf05d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jge 0x69ada
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x78(%rbp), %rcx
movl -0x44(%rbp), %eax
imull -0x54(%rbp), %eax
movl %eax, %eax
addq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl -0x4c(%rbp), %eax
cmpl -0x50(%rbp), %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, (%rax)
jmp 0x69b09
jmp 0x69b0b
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_bin_search:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov eax, [rbp+var_3C]
mov [rbp+var_3C], eax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov rax, [rax]
mov [rbp+var_70], rax
mov rax, [rbp+var_18]
mov eax, [rax+2Ch]
mov [rbp+var_40], eax
mov eax, [rbp+var_40]
and eax, 2
cmp eax, 0
jz short loc_699AA
jmp short $+2
loc_69986:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9, [rbp+var_38]
call _ma_seq_search
mov [rbp+var_4], eax
jmp loc_69B11
loc_699AA:
mov rax, [rbp+var_18]
mov eax, [rax+28h]
mov [rbp+var_58], eax
mov rax, [rbp+var_68]
movzx eax, word ptr [rax+0AAh]
add eax, [rbp+var_58]
mov [rbp+var_54], eax
jmp short $+2
loc_699C7:
mov [rbp+var_44], 0
mov [rbp+var_48], 1
mov rax, [rbp+var_18]
mov eax, [rax+20h]
sub eax, [rbp+var_58]
mov rcx, [rbp+var_70]
sub eax, [rcx+744h]
xor edx, edx
div [rbp+var_54]
sub eax, 1
mov [rbp+var_4C], eax
mov [rbp+var_50], eax
jmp short $+2
loc_699F9:
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_70]
mov ecx, [rcx+744h]
add rax, rcx
mov ecx, [rbp+var_58]
add rax, rcx
mov [rbp+var_78], rax
loc_69A18:
mov eax, [rbp+var_44]
cmp eax, [rbp+var_4C]
jz short loc_69A83
mov eax, [rbp+var_44]
add eax, [rbp+var_4C]
shr eax, 1
mov [rbp+var_48], eax
mov rax, [rbp+var_68]
mov rdi, [rax+0C0h]
mov rsi, [rbp+var_78]
mov eax, [rbp+var_48]
imul eax, [rbp+var_54]
mov eax, eax
add rsi, rax
mov rax, [rbp+var_10]
mov rdx, [rax]
mov rax, [rbp+var_10]
mov ecx, [rax+10h]
mov rax, [rbp+var_10]
add ecx, [rax+14h]
mov r8d, [rbp+var_1C]
lea r9, [rbp+var_60]
call ha_key_cmp
mov [rbp+var_3C], eax
cmp eax, 0
jl short loc_69A78
mov eax, [rbp+var_48]
mov [rbp+var_4C], eax
jmp short loc_69A81
loc_69A78:
mov eax, [rbp+var_48]
add eax, 1
mov [rbp+var_44], eax
loc_69A81:
jmp short loc_69A18
loc_69A83:
mov eax, [rbp+var_48]
cmp eax, [rbp+var_44]
jz short loc_69ACB
mov rax, [rbp+var_68]
mov rdi, [rax+0C0h]
mov rsi, [rbp+var_78]
mov eax, [rbp+var_44]
imul eax, [rbp+var_54]
mov eax, eax
add rsi, rax
mov rax, [rbp+var_10]
mov rdx, [rax]
mov rax, [rbp+var_10]
mov ecx, [rax+10h]
mov rax, [rbp+var_10]
add ecx, [rax+14h]
mov r8d, [rbp+var_1C]
lea r9, [rbp+var_60]
call ha_key_cmp
mov [rbp+var_3C], eax
loc_69ACB:
cmp [rbp+var_3C], 0
jge short loc_69ADA
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
loc_69ADA:
mov rcx, [rbp+var_78]
mov eax, [rbp+var_44]
imul eax, [rbp+var_54]
mov eax, eax
add rcx, rax
mov rax, [rbp+var_28]
mov [rax], rcx
mov eax, [rbp+var_4C]
cmp eax, [rbp+var_50]
setz al
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+var_38]
mov [rax], cl
jmp short $+2
loc_69B09:
jmp short $+2
loc_69B0B:
mov eax, [rbp+var_3C]
mov [rbp+var_4], eax
loc_69B11:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long ma_bin_search(_QWORD *a1, long long a2, unsigned int a3, _QWORD *a4, long long a5, bool *a6)
{
long long v7; // [rsp+8h] [rbp-78h]
long long v8; // [rsp+10h] [rbp-70h]
long long *v9; // [rsp+18h] [rbp-68h]
char v10[8]; // [rsp+20h] [rbp-60h] BYREF
unsigned int v11; // [rsp+28h] [rbp-58h]
unsigned int v12; // [rsp+2Ch] [rbp-54h]
unsigned int v13; // [rsp+30h] [rbp-50h]
unsigned int v14; // [rsp+34h] [rbp-4Ch]
unsigned int v15; // [rsp+38h] [rbp-48h]
unsigned int v16; // [rsp+3Ch] [rbp-44h]
int v17; // [rsp+40h] [rbp-40h]
int v18; // [rsp+44h] [rbp-3Ch]
bool *v19; // [rsp+48h] [rbp-38h]
long long v20; // [rsp+50h] [rbp-30h]
_QWORD *v21; // [rsp+58h] [rbp-28h]
unsigned int v22; // [rsp+64h] [rbp-1Ch]
long long v23; // [rsp+68h] [rbp-18h]
_QWORD *v24; // [rsp+70h] [rbp-10h]
v24 = a1;
v23 = a2;
v22 = a3;
v21 = a4;
v20 = a5;
v19 = a6;
v9 = (long long *)a1[1];
v8 = *v9;
v17 = *(_DWORD *)(a2 + 44);
if ( (v17 & 2) != 0 )
{
return (unsigned int)ma_seq_search(v24, v23, v22, v21, v20, v19);
}
else
{
v11 = *(_DWORD *)(v23 + 40);
v12 = v11 + *((unsigned __int16 *)v9 + 85);
v16 = 0;
v15 = 1;
v14 = (*(_DWORD *)(v23 + 32) - v11 - *(_DWORD *)(v8 + 1860)) / v12 - 1;
v13 = v14;
v7 = v11 + *(unsigned int *)(v8 + 1860) + *(_QWORD *)(v23 + 16);
while ( v16 != v14 )
{
v15 = (v14 + v16) >> 1;
v18 = ha_key_cmp(
v9[24],
v12 * v15 + v7,
*v24,
(unsigned int)(*((_DWORD *)v24 + 5) + *((_DWORD *)v24 + 4)),
v22,
v10);
if ( v18 < 0 )
v16 = v15 + 1;
else
v14 = v15;
}
if ( v15 != v16 )
v18 = ha_key_cmp(
v9[24],
v12 * v16 + v7,
*v24,
(unsigned int)(*((_DWORD *)v24 + 5) + *((_DWORD *)v24 + 4)),
v22,
v10);
if ( v18 < 0 )
++v16;
*v21 = v12 * v16 + v7;
*v19 = v14 == v13;
return (unsigned int)v18;
}
}
| _ma_bin_search:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
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 qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x2c]
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x40]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001699aa
JMP 0x00169986
LAB_00169986:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x38]
CALL 0x00169b20
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00169b11
LAB_001699aa:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
MOV dword ptr [RBP + -0x58],EAX
MOV RAX,qword ptr [RBP + -0x68]
MOVZX EAX,word ptr [RAX + 0xaa]
ADD EAX,dword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001699c7
LAB_001699c7:
MOV dword ptr [RBP + -0x44],0x0
MOV dword ptr [RBP + -0x48],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x20]
SUB EAX,dword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x70]
SUB EAX,dword ptr [RCX + 0x744]
XOR EDX,EDX
DIV dword ptr [RBP + -0x54]
SUB EAX,0x1
MOV dword ptr [RBP + -0x4c],EAX
MOV dword ptr [RBP + -0x50],EAX
JMP 0x001699f9
LAB_001699f9:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x70]
MOV ECX,dword ptr [RCX + 0x744]
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x58]
ADD RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
LAB_00169a18:
MOV EAX,dword ptr [RBP + -0x44]
CMP EAX,dword ptr [RBP + -0x4c]
JZ 0x00169a83
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,dword ptr [RBP + -0x4c]
SHR EAX,0x1
MOV dword ptr [RBP + -0x48],EAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RAX + 0xc0]
MOV RSI,qword ptr [RBP + -0x78]
MOV EAX,dword ptr [RBP + -0x48]
IMUL EAX,dword ptr [RBP + -0x54]
MOV EAX,EAX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
ADD ECX,dword ptr [RAX + 0x14]
MOV R8D,dword ptr [RBP + -0x1c]
LEA R9,[RBP + -0x60]
CALL 0x001f05d0
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JL 0x00169a78
MOV EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x00169a81
LAB_00169a78:
MOV EAX,dword ptr [RBP + -0x48]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
LAB_00169a81:
JMP 0x00169a18
LAB_00169a83:
MOV EAX,dword ptr [RBP + -0x48]
CMP EAX,dword ptr [RBP + -0x44]
JZ 0x00169acb
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RAX + 0xc0]
MOV RSI,qword ptr [RBP + -0x78]
MOV EAX,dword ptr [RBP + -0x44]
IMUL EAX,dword ptr [RBP + -0x54]
MOV EAX,EAX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
ADD ECX,dword ptr [RAX + 0x14]
MOV R8D,dword ptr [RBP + -0x1c]
LEA R9,[RBP + -0x60]
CALL 0x001f05d0
MOV dword ptr [RBP + -0x3c],EAX
LAB_00169acb:
CMP dword ptr [RBP + -0x3c],0x0
JGE 0x00169ada
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
LAB_00169ada:
MOV RCX,qword ptr [RBP + -0x78]
MOV EAX,dword ptr [RBP + -0x44]
IMUL EAX,dword ptr [RBP + -0x54]
MOV EAX,EAX
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x4c]
CMP EAX,dword ptr [RBP + -0x50]
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],CL
JMP 0x00169b09
LAB_00169b09:
JMP 0x00169b0b
LAB_00169b0b:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4],EAX
LAB_00169b11:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int _ma_bin_search(int8 *param_1,long param_2,int4 param_3,long *param_4,
int8 param_5,int8 param_6)
{
long *plVar1;
long lVar2;
int1 local_68 [8];
uint local_60;
uint local_5c;
uint local_58;
uint local_54;
uint local_50;
uint local_4c;
uint local_48;
int local_44;
int8 local_40;
int8 local_38;
long *local_30;
int4 local_24;
long local_20;
int8 *local_18;
int local_c;
plVar1 = (long *)param_1[1];
local_48 = *(uint *)(param_2 + 0x2c);
local_40 = param_6;
local_38 = param_5;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((local_48 & 2) == 0) {
local_60 = *(uint *)(param_2 + 0x28);
local_5c = *(ushort *)((long)plVar1 + 0xaa) + local_60;
local_4c = 0;
local_50 = 1;
local_58 = ((*(int *)(param_2 + 0x20) - local_60) - *(int *)(*plVar1 + 0x744)) / local_5c - 1;
lVar2 = *(long *)(param_2 + 0x10) + (ulong)*(uint *)(*plVar1 + 0x744) + (ulong)local_60;
local_54 = local_58;
while (local_4c != local_54) {
local_50 = local_4c + local_54 >> 1;
local_44 = ha_key_cmp(plVar1[0x18],lVar2 + (ulong)(local_50 * local_5c),*local_18,
*(int *)(local_18 + 2) + *(int *)((long)local_18 + 0x14),local_24,
local_68);
if (local_44 < 0) {
local_4c = local_50 + 1;
}
else {
local_54 = local_50;
}
}
if (local_50 != local_4c) {
local_44 = ha_key_cmp(plVar1[0x18],lVar2 + (ulong)(local_4c * local_5c),*local_18,
*(int *)(local_18 + 2) + *(int *)((long)local_18 + 0x14),local_24,
local_68);
}
if (local_44 < 0) {
local_4c = local_4c + 1;
}
*local_30 = lVar2 + (ulong)(local_4c * local_5c);
*(bool *)local_40 = local_54 == local_58;
local_c = local_44;
}
else {
local_c = _ma_seq_search(param_1,param_2,param_3,param_4,param_5,param_6);
}
return local_c;
}
| |
39,301 | mysql_rollback_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_rollback_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_rollback,
(parms->mysql),
parms->mysql,
my_bool,
r_my_bool)
} | O3 | c | mysql_rollback_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x480(%rdi), %rax
movq 0x28(%rax), %rbx
callq 0x17850
movb %al, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_rollback_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+480h]
mov rbx, [rax+28h]
call _mysql_rollback@libmariadbclient_18
mov [rbx+8], al
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_rollback_start_internal(long long *a1)
{
long long v1; // rdi
long long v2; // rbx
long long result; // rax
v1 = *a1;
v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL);
result = mysql_rollback_libmariadbclient_18(v1);
*(_BYTE *)(v2 + 8) = result;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_rollback_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x00117850
MOV byte ptr [RBX + 0x8],AL
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_rollback_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_rollback();
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
39,302 | plutovg_path_traverse_flatten | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c | void plutovg_path_traverse_flatten(const plutovg_path_t* path, plutovg_path_traverse_func_t traverse_func, void* closure)
{
if(path->num_curves == 0) {
plutovg_path_traverse(path, traverse_func, closure);
return;
}
const float threshold = 0.25f;
plutovg_path_iterator_t it;
plutovg_path_iterator_init(&it, path);
bezier_t beziers[32];
plutovg_point_t points[3];
plutovg_point_t current_point = {0, 0};
while(plutovg_path_iterator_has_next(&it)) {
plutovg_path_command_t command = plutovg_path_iterator_next(&it, points);
switch(command) {
case PLUTOVG_PATH_COMMAND_MOVE_TO:
case PLUTOVG_PATH_COMMAND_LINE_TO:
case PLUTOVG_PATH_COMMAND_CLOSE:
traverse_func(closure, command, points, 1);
current_point = points[0];
break;
case PLUTOVG_PATH_COMMAND_CUBIC_TO:
beziers[0].x1 = current_point.x;
beziers[0].y1 = current_point.y;
beziers[0].x2 = points[0].x;
beziers[0].y2 = points[0].y;
beziers[0].x3 = points[1].x;
beziers[0].y3 = points[1].y;
beziers[0].x4 = points[2].x;
beziers[0].y4 = points[2].y;
bezier_t* b = beziers;
while(b >= beziers) {
float y4y1 = b->y4 - b->y1;
float x4x1 = b->x4 - b->x1;
float l = fabsf(x4x1) + fabsf(y4y1);
float d;
if(l > 1.f) {
d = fabsf((x4x1)*(b->y1 - b->y2) - (y4y1)*(b->x1 - b->x2)) + fabsf((x4x1)*(b->y1 - b->y3) - (y4y1)*(b->x1 - b->x3));
} else {
d = fabsf(b->x1 - b->x2) + fabsf(b->y1 - b->y2) + fabsf(b->x1 - b->x3) + fabsf(b->y1 - b->y3);
l = 1.f;
}
if(d < threshold*l || b == beziers + 31) {
plutovg_point_t p = { b->x4, b->y4 };
traverse_func(closure, PLUTOVG_PATH_COMMAND_LINE_TO, &p, 1);
--b;
} else {
split_bezier(b, b + 1, b);
++b;
}
}
current_point = points[2];
break;
}
}
} | O0 | c | plutovg_path_traverse_flatten:
pushq %rbp
movq %rsp, %rbp
subq $0x490, %rsp # imm = 0x490
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x619c7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x618c0
jmp 0x61e03
movss 0x2cc3d(%rip), %xmm0 # 0x8e60c
movss %xmm0, -0x1c(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x5fc20
leaq -0x458(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0xb1d0
leaq -0x30(%rbp), %rdi
callq 0x5fc60
testb $0x1, %al
jne 0x61a06
jmp 0x61e03
leaq -0x30(%rbp), %rdi
leaq -0x450(%rbp), %rsi
callq 0x5fc80
movl %eax, -0x45c(%rbp)
movl -0x45c(%rbp), %eax
movl %eax, -0x484(%rbp)
subl $0x2, %eax
jb 0x61a4d
jmp 0x61a2f
movl -0x484(%rbp), %eax
subl $0x2, %eax
je 0x61a7c
jmp 0x61a3c
movl -0x484(%rbp), %eax
subl $0x3, %eax
jne 0x61dfe
jmp 0x61a4d
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rdi
movl -0x45c(%rbp), %esi
leaq -0x450(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
movq -0x450(%rbp), %rax
movq %rax, -0x458(%rbp)
jmp 0x61dfe
movss -0x458(%rbp), %xmm0
movss %xmm0, -0x430(%rbp)
movss -0x454(%rbp), %xmm0
movss %xmm0, -0x42c(%rbp)
movss -0x450(%rbp), %xmm0
movss %xmm0, -0x428(%rbp)
movss -0x44c(%rbp), %xmm0
movss %xmm0, -0x424(%rbp)
movss -0x448(%rbp), %xmm0
movss %xmm0, -0x420(%rbp)
movss -0x444(%rbp), %xmm0
movss %xmm0, -0x41c(%rbp)
movss -0x440(%rbp), %xmm0
movss %xmm0, -0x418(%rbp)
movss -0x43c(%rbp), %xmm0
movss %xmm0, -0x414(%rbp)
leaq -0x430(%rbp), %rax
movq %rax, -0x468(%rbp)
movq -0x468(%rbp), %rax
leaq -0x430(%rbp), %rcx
cmpq %rcx, %rax
jb 0x61df0
movq -0x468(%rbp), %rax
movss 0x1c(%rax), %xmm0
movq -0x468(%rbp), %rax
subss 0x4(%rax), %xmm0
movss %xmm0, -0x46c(%rbp)
movq -0x468(%rbp), %rax
movss 0x18(%rax), %xmm0
movq -0x468(%rbp), %rax
subss (%rax), %xmm0
movss %xmm0, -0x470(%rbp)
movss -0x470(%rbp), %xmm0
movaps 0x2add1(%rip), %xmm1 # 0x8c940
pand %xmm1, %xmm0
movss -0x46c(%rbp), %xmm1
movaps 0x2adbe(%rip), %xmm2 # 0x8c940
pand %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x474(%rbp)
movss -0x474(%rbp), %xmm0
movss 0x2a526(%rip), %xmm1 # 0x8c0c8
ucomiss %xmm1, %xmm0
jbe 0x61c82
movss -0x470(%rbp), %xmm0
movq -0x468(%rbp), %rax
movss 0x4(%rax), %xmm2
movq -0x468(%rbp), %rax
subss 0xc(%rax), %xmm2
movss -0x46c(%rbp), %xmm1
movq -0x468(%rbp), %rax
movss (%rax), %xmm3
movq -0x468(%rbp), %rax
subss 0x8(%rax), %xmm3
mulss %xmm3, %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movaps 0x2ad36(%rip), %xmm1 # 0x8c940
pand %xmm1, %xmm0
movss -0x470(%rbp), %xmm1
movq -0x468(%rbp), %rax
movss 0x4(%rax), %xmm3
movq -0x468(%rbp), %rax
subss 0x14(%rax), %xmm3
movss -0x46c(%rbp), %xmm2
movq -0x468(%rbp), %rax
movss (%rax), %xmm4
movq -0x468(%rbp), %rax
subss 0x10(%rax), %xmm4
mulss %xmm4, %xmm2
movd %xmm2, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm2
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
movaps 0x2acd3(%rip), %xmm2 # 0x8c940
pand %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x478(%rbp)
jmp 0x61d30
movq -0x468(%rbp), %rax
movss (%rax), %xmm0
movq -0x468(%rbp), %rax
subss 0x8(%rax), %xmm0
movaps 0x2aca0(%rip), %xmm1 # 0x8c940
pand %xmm1, %xmm0
movq -0x468(%rbp), %rax
movss 0x4(%rax), %xmm1
movq -0x468(%rbp), %rax
subss 0xc(%rax), %xmm1
movaps 0x2ac7d(%rip), %xmm2 # 0x8c940
pand %xmm2, %xmm1
addss %xmm1, %xmm0
movq -0x468(%rbp), %rax
movss (%rax), %xmm1
movq -0x468(%rbp), %rax
subss 0x10(%rax), %xmm1
movaps 0x2ac57(%rip), %xmm2 # 0x8c940
pand %xmm2, %xmm1
addss %xmm1, %xmm0
movq -0x468(%rbp), %rax
movss 0x4(%rax), %xmm1
movq -0x468(%rbp), %rax
subss 0x14(%rax), %xmm1
movaps 0x2ac30(%rip), %xmm2 # 0x8c940
pand %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x478(%rbp)
movss 0x2a3a0(%rip), %xmm0 # 0x8c0c8
movss %xmm0, -0x474(%rbp)
movss -0x478(%rbp), %xmm1
movss 0x2c8cc(%rip), %xmm0 # 0x8e60c
mulss -0x474(%rbp), %xmm0
ucomiss %xmm1, %xmm0
ja 0x61d67
movq -0x468(%rbp), %rax
leaq -0x430(%rbp), %rcx
addq $0x3e0, %rcx # imm = 0x3E0
cmpq %rcx, %rax
jne 0x61dbb
movq -0x468(%rbp), %rax
movss 0x18(%rax), %xmm0
movss %xmm0, -0x480(%rbp)
movq -0x468(%rbp), %rax
movss 0x1c(%rax), %xmm0
movss %xmm0, -0x47c(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rdi
movl $0x1, %ecx
leaq -0x480(%rbp), %rdx
movl %ecx, %esi
callq *%rax
movq -0x468(%rbp), %rax
addq $-0x20, %rax
movq %rax, -0x468(%rbp)
jmp 0x61deb
movq -0x468(%rbp), %rdi
movq -0x468(%rbp), %rsi
addq $0x20, %rsi
movq -0x468(%rbp), %rdx
callq 0x61e10
movq -0x468(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x468(%rbp)
jmp 0x61b0a
movq -0x440(%rbp), %rax
movq %rax, -0x458(%rbp)
jmp 0x619f4
addq $0x490, %rsp # imm = 0x490
popq %rbp
retq
nopl (%rax)
| plutovg_path_traverse_flatten:
push rbp
mov rbp, rsp
sub rsp, 490h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
cmp dword ptr [rax+0Ch], 0
jnz short loc_619C7
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call plutovg_path_traverse
jmp loc_61E03
loc_619C7:
movss xmm0, cs:dword_8E60C
movss [rbp+var_1C], xmm0
mov rsi, [rbp+var_8]
lea rdi, [rbp+var_30]
call plutovg_path_iterator_init
lea rdi, [rbp+var_458]
xor esi, esi
mov edx, 8
call _memset
loc_619F4:
lea rdi, [rbp+var_30]
call plutovg_path_iterator_has_next
test al, 1
jnz short loc_61A06
jmp loc_61E03
loc_61A06:
lea rdi, [rbp+var_30]
lea rsi, [rbp+var_450]
call plutovg_path_iterator_next
mov [rbp+var_45C], eax
mov eax, [rbp+var_45C]
mov [rbp+var_484], eax
sub eax, 2
jb short loc_61A4D
jmp short $+2
loc_61A2F:
mov eax, [rbp+var_484]
sub eax, 2
jz short loc_61A7C
jmp short $+2
loc_61A3C:
mov eax, [rbp+var_484]
sub eax, 3
jnz loc_61DFE
jmp short $+2
loc_61A4D:
mov rax, [rbp+var_10]
mov rdi, [rbp+var_18]
mov esi, [rbp+var_45C]
lea rdx, [rbp+var_450]
mov ecx, 1
call rax
mov rax, [rbp+var_450]
mov [rbp+var_458], rax
jmp loc_61DFE
loc_61A7C:
movss xmm0, dword ptr [rbp+var_458]
movss [rbp+var_430], xmm0
movss xmm0, dword ptr [rbp+var_458+4]
movss [rbp+var_42C], xmm0
movss xmm0, dword ptr [rbp+var_450]
movss [rbp+var_428], xmm0
movss xmm0, dword ptr [rbp+var_450+4]
movss [rbp+var_424], xmm0
movss xmm0, [rbp+var_448]
movss [rbp+var_420], xmm0
movss xmm0, [rbp+var_444]
movss [rbp+var_41C], xmm0
movss xmm0, dword ptr [rbp+var_440]
movss [rbp+var_418], xmm0
movss xmm0, dword ptr [rbp+var_440+4]
movss [rbp+var_414], xmm0
lea rax, [rbp+var_430]
mov [rbp+var_468], rax
loc_61B0A:
mov rax, [rbp+var_468]
lea rcx, [rbp+var_430]
cmp rax, rcx
jb loc_61DF0
mov rax, [rbp+var_468]
movss xmm0, dword ptr [rax+1Ch]
mov rax, [rbp+var_468]
subss xmm0, dword ptr [rax+4]
movss [rbp+var_46C], xmm0
mov rax, [rbp+var_468]
movss xmm0, dword ptr [rax+18h]
mov rax, [rbp+var_468]
subss xmm0, dword ptr [rax]
movss [rbp+var_470], xmm0
movss xmm0, [rbp+var_470]
movaps xmm1, cs:xmmword_8C940
pand xmm0, xmm1
movss xmm1, [rbp+var_46C]
movaps xmm2, cs:xmmword_8C940
pand xmm1, xmm2
addss xmm0, xmm1
movss [rbp+var_474], xmm0
movss xmm0, [rbp+var_474]
movss xmm1, cs:flt_8C0C8
ucomiss xmm0, xmm1
jbe loc_61C82
movss xmm0, [rbp+var_470]
mov rax, [rbp+var_468]
movss xmm2, dword ptr [rax+4]
mov rax, [rbp+var_468]
subss xmm2, dword ptr [rax+0Ch]
movss xmm1, [rbp+var_46C]
mov rax, [rbp+var_468]
movss xmm3, dword ptr [rax]
mov rax, [rbp+var_468]
subss xmm3, dword ptr [rax+8]
mulss xmm1, xmm3
movd eax, xmm1
xor eax, 80000000h
movd xmm1, eax
mulss xmm0, xmm2
addss xmm0, xmm1
movaps xmm1, cs:xmmword_8C940
pand xmm0, xmm1
movss xmm1, [rbp+var_470]
mov rax, [rbp+var_468]
movss xmm3, dword ptr [rax+4]
mov rax, [rbp+var_468]
subss xmm3, dword ptr [rax+14h]
movss xmm2, [rbp+var_46C]
mov rax, [rbp+var_468]
movss xmm4, dword ptr [rax]
mov rax, [rbp+var_468]
subss xmm4, dword ptr [rax+10h]
mulss xmm2, xmm4
movd eax, xmm2
xor eax, 80000000h
movd xmm2, eax
mulss xmm1, xmm3
addss xmm1, xmm2
movaps xmm2, cs:xmmword_8C940
pand xmm1, xmm2
addss xmm0, xmm1
movss [rbp+var_478], xmm0
jmp loc_61D30
loc_61C82:
mov rax, [rbp+var_468]
movss xmm0, dword ptr [rax]
mov rax, [rbp+var_468]
subss xmm0, dword ptr [rax+8]
movaps xmm1, cs:xmmword_8C940
pand xmm0, xmm1
mov rax, [rbp+var_468]
movss xmm1, dword ptr [rax+4]
mov rax, [rbp+var_468]
subss xmm1, dword ptr [rax+0Ch]
movaps xmm2, cs:xmmword_8C940
pand xmm1, xmm2
addss xmm0, xmm1
mov rax, [rbp+var_468]
movss xmm1, dword ptr [rax]
mov rax, [rbp+var_468]
subss xmm1, dword ptr [rax+10h]
movaps xmm2, cs:xmmword_8C940
pand xmm1, xmm2
addss xmm0, xmm1
mov rax, [rbp+var_468]
movss xmm1, dword ptr [rax+4]
mov rax, [rbp+var_468]
subss xmm1, dword ptr [rax+14h]
movaps xmm2, cs:xmmword_8C940
pand xmm1, xmm2
addss xmm0, xmm1
movss [rbp+var_478], xmm0
movss xmm0, cs:flt_8C0C8
movss [rbp+var_474], xmm0
loc_61D30:
movss xmm1, [rbp+var_478]
movss xmm0, cs:dword_8E60C
mulss xmm0, [rbp+var_474]
ucomiss xmm0, xmm1
ja short loc_61D67
mov rax, [rbp+var_468]
lea rcx, [rbp+var_430]
add rcx, 3E0h
cmp rax, rcx
jnz short loc_61DBB
loc_61D67:
mov rax, [rbp+var_468]
movss xmm0, dword ptr [rax+18h]
movss [rbp+var_480], xmm0
mov rax, [rbp+var_468]
movss xmm0, dword ptr [rax+1Ch]
movss [rbp+var_47C], xmm0
mov rax, [rbp+var_10]
mov rdi, [rbp+var_18]
mov ecx, 1
lea rdx, [rbp+var_480]
mov esi, ecx
call rax
mov rax, [rbp+var_468]
add rax, 0FFFFFFFFFFFFFFE0h
mov [rbp+var_468], rax
jmp short loc_61DEB
loc_61DBB:
mov rdi, [rbp+var_468]
mov rsi, [rbp+var_468]
add rsi, 20h ; ' '
mov rdx, [rbp+var_468]
call split_bezier
mov rax, [rbp+var_468]
add rax, 20h ; ' '
mov [rbp+var_468], rax
loc_61DEB:
jmp loc_61B0A
loc_61DF0:
mov rax, [rbp+var_440]
mov [rbp+var_458], rax
loc_61DFE:
jmp loc_619F4
loc_61E03:
add rsp, 490h
pop rbp
retn
| bool plutovg_path_traverse_flatten(
long long a1,
void ( *a2)(long long, long long, _QWORD *),
long long a3)
{
bool result; // al
__m128i v4; // xmm0
__m128i v5; // xmm1
__m128i v6; // xmm1
__m128i v7; // xmm2
__m128i v8; // xmm0
__m128i v9; // xmm1
__m128i v10; // xmm1
__m128i v11; // xmm1
_DWORD v12[2]; // [rsp+10h] [rbp-480h] BYREF
float v13; // [rsp+18h] [rbp-478h]
float v14; // [rsp+1Ch] [rbp-474h]
float v15; // [rsp+20h] [rbp-470h]
float v16; // [rsp+24h] [rbp-46Ch]
float *v17; // [rsp+28h] [rbp-468h]
unsigned int v18; // [rsp+34h] [rbp-45Ch]
long long v19; // [rsp+38h] [rbp-458h] BYREF
long long v20; // [rsp+40h] [rbp-450h] BYREF
int v21; // [rsp+48h] [rbp-448h]
int v22; // [rsp+4Ch] [rbp-444h]
long long v23; // [rsp+50h] [rbp-440h]
_QWORD v24[2]; // [rsp+60h] [rbp-430h] BYREF
int v25; // [rsp+70h] [rbp-420h]
int v26; // [rsp+74h] [rbp-41Ch]
long long v27; // [rsp+78h] [rbp-418h]
long long v28; // [rsp+440h] [rbp-50h] BYREF
_BYTE v29[20]; // [rsp+460h] [rbp-30h] BYREF
int v30; // [rsp+474h] [rbp-1Ch]
long long v31; // [rsp+478h] [rbp-18h]
void ( *v32)(long long, long long, _QWORD *); // [rsp+480h] [rbp-10h]
long long v33; // [rsp+488h] [rbp-8h]
v33 = a1;
v32 = a2;
v31 = a3;
if ( *(_DWORD *)(a1 + 12) )
{
v30 = 1048576000;
plutovg_path_iterator_init((long long)v29, v33);
memset(&v19, 0LL, sizeof(v19));
while ( 1 )
{
result = plutovg_path_iterator_has_next((long long)v29);
if ( !result )
return result;
v18 = plutovg_path_iterator_next((long long)v29, &v20);
if ( v18 < 2 )
{
LABEL_8:
((void ( *)(long long, _QWORD, long long *, long long))v32)(v31, v18, &v20, 1LL);
v19 = v20;
}
else if ( v18 == 2 )
{
v24[0] = v19;
v24[1] = v20;
v25 = v21;
v26 = v22;
v27 = v23;
v17 = (float *)v24;
while ( v17 >= (float *)v24 )
{
v16 = v17[7] - v17[1];
v15 = v17[6] - *v17;
v14 = *(float *)_mm_and_si128((__m128i)LODWORD(v15), (__m128i)xmmword_8C940).m128i_i32
+ *(float *)_mm_and_si128((__m128i)LODWORD(v16), (__m128i)xmmword_8C940).m128i_i32;
if ( v14 <= 1.0 )
{
v8 = (__m128i)*(unsigned int *)v17;
*(float *)v8.m128i_i32 = *(float *)v8.m128i_i32 - v17[2];
v9 = (__m128i)*((unsigned int *)v17 + 1);
*(float *)v9.m128i_i32 = *(float *)v9.m128i_i32 - v17[3];
*(float *)v8.m128i_i32 = *(float *)_mm_and_si128(v8, (__m128i)xmmword_8C940).m128i_i32
+ *(float *)_mm_and_si128(v9, (__m128i)xmmword_8C940).m128i_i32;
v10 = (__m128i)*(unsigned int *)v17;
*(float *)v10.m128i_i32 = *(float *)v10.m128i_i32 - v17[4];
*(float *)v8.m128i_i32 = *(float *)v8.m128i_i32
+ *(float *)_mm_and_si128(v10, (__m128i)xmmword_8C940).m128i_i32;
v11 = (__m128i)*((unsigned int *)v17 + 1);
*(float *)v11.m128i_i32 = *(float *)v11.m128i_i32 - v17[5];
v13 = *(float *)v8.m128i_i32 + *(float *)_mm_and_si128(v11, (__m128i)xmmword_8C940).m128i_i32;
v14 = 1.0;
}
else
{
v4 = (__m128i)LODWORD(v15);
v5 = (__m128i)LODWORD(v16);
*(float *)v5.m128i_i32 = v16 * (float)(*v17 - v17[2]);
*(float *)v4.m128i_i32 = (float)(v15 * (float)(v17[1] - v17[3]))
+ COERCE_FLOAT(_mm_cvtsi128_si32(v5) ^ 0x80000000);
v6 = (__m128i)LODWORD(v15);
v7 = (__m128i)LODWORD(v16);
*(float *)v7.m128i_i32 = v16 * (float)(*v17 - v17[4]);
*(float *)v6.m128i_i32 = (float)(v15 * (float)(v17[1] - v17[5]))
+ COERCE_FLOAT(_mm_cvtsi128_si32(v7) ^ 0x80000000);
v13 = *(float *)_mm_and_si128(v4, (__m128i)xmmword_8C940).m128i_i32
+ *(float *)_mm_and_si128(v6, (__m128i)xmmword_8C940).m128i_i32;
}
if ( (float)(0.25 * v14) > v13 || v17 == (float *)&v28 )
{
*(float *)v12 = v17[6];
*(float *)&v12[1] = v17[7];
v32(v31, 1LL, v12);
v17 -= 8;
}
else
{
split_bezier(v17, v17 + 8, v17);
v17 += 8;
}
}
v19 = v23;
}
else if ( v18 == 3 )
{
goto LABEL_8;
}
}
}
return plutovg_path_traverse(v33, v32, v31);
}
| plutovg_path_traverse_flatten:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x490
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0xc],0x0
JNZ 0x001619c7
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001618c0
JMP 0x00161e03
LAB_001619c7:
MOVSS XMM0,dword ptr [0x0018e60c]
MOVSS dword ptr [RBP + -0x1c],XMM0
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x30]
CALL 0x0015fc20
LEA RDI,[RBP + -0x458]
XOR ESI,ESI
MOV EDX,0x8
CALL 0x0010b1d0
LAB_001619f4:
LEA RDI,[RBP + -0x30]
CALL 0x0015fc60
TEST AL,0x1
JNZ 0x00161a06
JMP 0x00161e03
LAB_00161a06:
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x450]
CALL 0x0015fc80
MOV dword ptr [RBP + -0x45c],EAX
MOV EAX,dword ptr [RBP + -0x45c]
MOV dword ptr [RBP + -0x484],EAX
SUB EAX,0x2
JC 0x00161a4d
JMP 0x00161a2f
LAB_00161a2f:
MOV EAX,dword ptr [RBP + -0x484]
SUB EAX,0x2
JZ 0x00161a7c
JMP 0x00161a3c
LAB_00161a3c:
MOV EAX,dword ptr [RBP + -0x484]
SUB EAX,0x3
JNZ 0x00161dfe
JMP 0x00161a4d
LAB_00161a4d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x45c]
LEA RDX,[RBP + -0x450]
MOV ECX,0x1
CALL RAX
MOV RAX,qword ptr [RBP + -0x450]
MOV qword ptr [RBP + -0x458],RAX
JMP 0x00161dfe
LAB_00161a7c:
MOVSS XMM0,dword ptr [RBP + -0x458]
MOVSS dword ptr [RBP + -0x430],XMM0
MOVSS XMM0,dword ptr [RBP + -0x454]
MOVSS dword ptr [RBP + -0x42c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x450]
MOVSS dword ptr [RBP + -0x428],XMM0
MOVSS XMM0,dword ptr [RBP + -0x44c]
MOVSS dword ptr [RBP + -0x424],XMM0
MOVSS XMM0,dword ptr [RBP + -0x448]
MOVSS dword ptr [RBP + -0x420],XMM0
MOVSS XMM0,dword ptr [RBP + -0x444]
MOVSS dword ptr [RBP + -0x41c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x440]
MOVSS dword ptr [RBP + -0x418],XMM0
MOVSS XMM0,dword ptr [RBP + -0x43c]
MOVSS dword ptr [RBP + -0x414],XMM0
LEA RAX,[RBP + -0x430]
MOV qword ptr [RBP + -0x468],RAX
LAB_00161b0a:
MOV RAX,qword ptr [RBP + -0x468]
LEA RCX,[RBP + -0x430]
CMP RAX,RCX
JC 0x00161df0
MOV RAX,qword ptr [RBP + -0x468]
MOVSS XMM0,dword ptr [RAX + 0x1c]
MOV RAX,qword ptr [RBP + -0x468]
SUBSS XMM0,dword ptr [RAX + 0x4]
MOVSS dword ptr [RBP + -0x46c],XMM0
MOV RAX,qword ptr [RBP + -0x468]
MOVSS XMM0,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x468]
SUBSS XMM0,dword ptr [RAX]
MOVSS dword ptr [RBP + -0x470],XMM0
MOVSS XMM0,dword ptr [RBP + -0x470]
MOVAPS XMM1,xmmword ptr [0x0018c940]
PAND XMM0,XMM1
MOVSS XMM1,dword ptr [RBP + -0x46c]
MOVAPS XMM2,xmmword ptr [0x0018c940]
PAND XMM1,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x474],XMM0
MOVSS XMM0,dword ptr [RBP + -0x474]
MOVSS XMM1,dword ptr [0x0018c0c8]
UCOMISS XMM0,XMM1
JBE 0x00161c82
MOVSS XMM0,dword ptr [RBP + -0x470]
MOV RAX,qword ptr [RBP + -0x468]
MOVSS XMM2,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x468]
SUBSS XMM2,dword ptr [RAX + 0xc]
MOVSS XMM1,dword ptr [RBP + -0x46c]
MOV RAX,qword ptr [RBP + -0x468]
MOVSS XMM3,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x468]
SUBSS XMM3,dword ptr [RAX + 0x8]
MULSS XMM1,XMM3
MOVD EAX,XMM1
XOR EAX,0x80000000
MOVD XMM1,EAX
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVAPS XMM1,xmmword ptr [0x0018c940]
PAND XMM0,XMM1
MOVSS XMM1,dword ptr [RBP + -0x470]
MOV RAX,qword ptr [RBP + -0x468]
MOVSS XMM3,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x468]
SUBSS XMM3,dword ptr [RAX + 0x14]
MOVSS XMM2,dword ptr [RBP + -0x46c]
MOV RAX,qword ptr [RBP + -0x468]
MOVSS XMM4,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x468]
SUBSS XMM4,dword ptr [RAX + 0x10]
MULSS XMM2,XMM4
MOVD EAX,XMM2
XOR EAX,0x80000000
MOVD XMM2,EAX
MULSS XMM1,XMM3
ADDSS XMM1,XMM2
MOVAPS XMM2,xmmword ptr [0x0018c940]
PAND XMM1,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x478],XMM0
JMP 0x00161d30
LAB_00161c82:
MOV RAX,qword ptr [RBP + -0x468]
MOVSS XMM0,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x468]
SUBSS XMM0,dword ptr [RAX + 0x8]
MOVAPS XMM1,xmmword ptr [0x0018c940]
PAND XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x468]
MOVSS XMM1,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x468]
SUBSS XMM1,dword ptr [RAX + 0xc]
MOVAPS XMM2,xmmword ptr [0x0018c940]
PAND XMM1,XMM2
ADDSS XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x468]
MOVSS XMM1,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x468]
SUBSS XMM1,dword ptr [RAX + 0x10]
MOVAPS XMM2,xmmword ptr [0x0018c940]
PAND XMM1,XMM2
ADDSS XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x468]
MOVSS XMM1,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x468]
SUBSS XMM1,dword ptr [RAX + 0x14]
MOVAPS XMM2,xmmword ptr [0x0018c940]
PAND XMM1,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x478],XMM0
MOVSS XMM0,dword ptr [0x0018c0c8]
MOVSS dword ptr [RBP + -0x474],XMM0
LAB_00161d30:
MOVSS XMM1,dword ptr [RBP + -0x478]
MOVSS XMM0,dword ptr [0x0018e60c]
MULSS XMM0,dword ptr [RBP + -0x474]
UCOMISS XMM0,XMM1
JA 0x00161d67
MOV RAX,qword ptr [RBP + -0x468]
LEA RCX,[RBP + -0x430]
ADD RCX,0x3e0
CMP RAX,RCX
JNZ 0x00161dbb
LAB_00161d67:
MOV RAX,qword ptr [RBP + -0x468]
MOVSS XMM0,dword ptr [RAX + 0x18]
MOVSS dword ptr [RBP + -0x480],XMM0
MOV RAX,qword ptr [RBP + -0x468]
MOVSS XMM0,dword ptr [RAX + 0x1c]
MOVSS dword ptr [RBP + -0x47c],XMM0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RBP + -0x18]
MOV ECX,0x1
LEA RDX,[RBP + -0x480]
MOV ESI,ECX
CALL RAX
MOV RAX,qword ptr [RBP + -0x468]
ADD RAX,-0x20
MOV qword ptr [RBP + -0x468],RAX
JMP 0x00161deb
LAB_00161dbb:
MOV RDI,qword ptr [RBP + -0x468]
MOV RSI,qword ptr [RBP + -0x468]
ADD RSI,0x20
MOV RDX,qword ptr [RBP + -0x468]
CALL 0x00161e10
MOV RAX,qword ptr [RBP + -0x468]
ADD RAX,0x20
MOV qword ptr [RBP + -0x468],RAX
LAB_00161deb:
JMP 0x00161b0a
LAB_00161df0:
MOV RAX,qword ptr [RBP + -0x440]
MOV qword ptr [RBP + -0x458],RAX
LAB_00161dfe:
JMP 0x001619f4
LAB_00161e03:
ADD RSP,0x490
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void plutovg_path_traverse_flatten(long param_1,code *param_2,int8 param_3)
{
ulong uVar1;
float local_488;
float local_484;
float local_480;
float local_47c;
float local_478;
float local_474;
float *local_470;
uint local_464;
int8 local_460;
int4 local_458;
int4 uStack_454;
int4 local_450;
int4 local_44c;
int4 local_448;
int4 uStack_444;
float local_438;
int4 local_434;
int4 local_430;
int4 local_42c;
int4 local_428;
int4 local_424;
int4 local_420;
int4 local_41c;
float afStack_58 [8];
int1 local_38 [20];
float local_24;
int8 local_20;
code *local_18;
long local_10;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if (*(int *)(param_1 + 0xc) == 0) {
plutovg_path_traverse(param_1,param_2,param_3);
}
else {
local_24 = DAT_0018e60c;
plutovg_path_iterator_init(local_38);
memset(&local_460,0,8);
while (uVar1 = plutovg_path_iterator_has_next(local_38), (uVar1 & 1) != 0) {
local_464 = plutovg_path_iterator_next(local_38,&local_458);
if (local_464 < 2) {
LAB_00161a4d:
(*local_18)(local_20,local_464,&local_458,1);
local_460 = CONCAT44(uStack_454,local_458);
}
else if (local_464 == 2) {
local_438 = (float)local_460;
local_434 = local_460._4_4_;
local_430 = local_458;
local_42c = uStack_454;
local_428 = local_450;
local_424 = local_44c;
local_420 = local_448;
local_41c = uStack_444;
local_470 = &local_438;
while (&local_438 <= local_470) {
local_474 = local_470[7] - local_470[1];
local_478 = local_470[6] - *local_470;
local_47c = (float)((uint)local_478 & _DAT_0018c940) +
(float)((uint)local_474 & _DAT_0018c940);
if (local_47c <= DAT_0018c0c8) {
local_480 = (float)((uint)(*local_470 - local_470[2]) & _DAT_0018c940) +
(float)((uint)(local_470[1] - local_470[3]) & _DAT_0018c940) +
(float)((uint)(*local_470 - local_470[4]) & _DAT_0018c940) +
(float)((uint)(local_470[1] - local_470[5]) & _DAT_0018c940);
local_47c = DAT_0018c0c8;
}
else {
local_480 = (float)((uint)(local_478 * (local_470[1] - local_470[3]) +
-(local_474 * (*local_470 - local_470[2]))) & _DAT_0018c940) +
(float)((uint)(local_478 * (local_470[1] - local_470[5]) +
-(local_474 * (*local_470 - local_470[4]))) & _DAT_0018c940);
}
if ((local_480 < DAT_0018e60c * local_47c) || (local_470 == afStack_58)) {
local_488 = local_470[6];
local_484 = local_470[7];
(*local_18)(local_20,1,&local_488);
local_470 = local_470 + -8;
}
else {
split_bezier(local_470,local_470 + 8,local_470);
local_470 = local_470 + 8;
}
}
local_460 = CONCAT44(uStack_444,local_448);
}
else if (local_464 == 3) goto LAB_00161a4d;
}
}
return;
}
| |
39,303 | plutovg_path_traverse_flatten | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c | void plutovg_path_traverse_flatten(const plutovg_path_t* path, plutovg_path_traverse_func_t traverse_func, void* closure)
{
if(path->num_curves == 0) {
plutovg_path_traverse(path, traverse_func, closure);
return;
}
const float threshold = 0.25f;
plutovg_path_iterator_t it;
plutovg_path_iterator_init(&it, path);
bezier_t beziers[32];
plutovg_point_t points[3];
plutovg_point_t current_point = {0, 0};
while(plutovg_path_iterator_has_next(&it)) {
plutovg_path_command_t command = plutovg_path_iterator_next(&it, points);
switch(command) {
case PLUTOVG_PATH_COMMAND_MOVE_TO:
case PLUTOVG_PATH_COMMAND_LINE_TO:
case PLUTOVG_PATH_COMMAND_CLOSE:
traverse_func(closure, command, points, 1);
current_point = points[0];
break;
case PLUTOVG_PATH_COMMAND_CUBIC_TO:
beziers[0].x1 = current_point.x;
beziers[0].y1 = current_point.y;
beziers[0].x2 = points[0].x;
beziers[0].y2 = points[0].y;
beziers[0].x3 = points[1].x;
beziers[0].y3 = points[1].y;
beziers[0].x4 = points[2].x;
beziers[0].y4 = points[2].y;
bezier_t* b = beziers;
while(b >= beziers) {
float y4y1 = b->y4 - b->y1;
float x4x1 = b->x4 - b->x1;
float l = fabsf(x4x1) + fabsf(y4y1);
float d;
if(l > 1.f) {
d = fabsf((x4x1)*(b->y1 - b->y2) - (y4y1)*(b->x1 - b->x2)) + fabsf((x4x1)*(b->y1 - b->y3) - (y4y1)*(b->x1 - b->x3));
} else {
d = fabsf(b->x1 - b->x2) + fabsf(b->y1 - b->y2) + fabsf(b->x1 - b->x3) + fabsf(b->y1 - b->y3);
l = 1.f;
}
if(d < threshold*l || b == beziers + 31) {
plutovg_point_t p = { b->x4, b->y4 };
traverse_func(closure, PLUTOVG_PATH_COMMAND_LINE_TO, &p, 1);
--b;
} else {
split_bezier(b, b + 1, b);
++b;
}
}
current_point = points[2];
break;
}
}
} | O1 | c | plutovg_path_traverse_flatten:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp # imm = 0x438
movq %rdx, %rbx
movq %rsi, %r14
cmpl $0x0, 0xc(%rdi)
je 0x2b9b9
movl 0x20(%rdi), %ebp
testl %ebp, %ebp
jle 0x2b9a7
movq 0x18(%rdi), %r13
xorl %r15d, %r15d
xorps %xmm0, %xmm0
movaps 0x1819b(%rip), %xmm10 # 0x43870
leaq 0x28(%rsp), %r12
xorps %xmm1, %xmm1
movl %ebp, 0xc(%rsp)
movslq %r15d, %rax
movl (%r13,%rax,8), %ecx
cmpl $0x2, %ecx
jb 0x2b6f5
je 0x2b701
cmpl $0x3, %ecx
jne 0x2b71f
movq 0x8(%r13,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
jmp 0x2b71f
movq 0x8(%r13,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movq 0x10(%r13,%rax,8), %rcx
movq %rcx, 0x18(%rsp)
movq 0x18(%r13,%rax,8), %rcx
movq %rcx, 0x20(%rsp)
movl 0x4(%r13,%rax,8), %r15d
addl %eax, %r15d
movl (%r13,%rax,8), %esi
cmpl $0x2, %esi
jb 0x2b73c
je 0x2b765
cmpl $0x3, %esi
jne 0x2b99e
movq %rbx, %rdi
leaq 0x10(%rsp), %rdx
movl $0x1, %ecx
callq *%r14
movaps 0x1811c(%rip), %xmm10 # 0x43870
movss 0x10(%rsp), %xmm0
movss 0x14(%rsp), %xmm1
jmp 0x2b99e
movss %xmm0, 0x30(%rsp)
movss %xmm1, 0x34(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
movups 0x18(%rsp), %xmm0
movaps %xmm0, 0x40(%rsp)
leaq 0x30(%rsp), %rax
xorl %ebp, %ebp
movss 0x1c(%rax), %xmm0
movss 0x4(%rax), %xmm1
movss 0x18(%rax), %xmm2
movaps %xmm0, %xmm6
subss %xmm1, %xmm6
movss 0x30(%rsp,%rbp), %xmm3
movaps %xmm2, %xmm7
subss %xmm3, %xmm7
movaps %xmm7, %xmm5
andps %xmm10, %xmm5
movaps %xmm6, %xmm4
andps %xmm10, %xmm4
addss %xmm5, %xmm4
ucomiss 0x1792c(%rip), %xmm4 # 0x430f4
jbe 0x2b821
movaps %xmm1, %xmm8
subss 0xc(%rax), %xmm8
movaps %xmm3, %xmm5
subss 0x8(%rax), %xmm5
mulss %xmm6, %xmm5
mulss %xmm7, %xmm8
subss %xmm5, %xmm8
andps %xmm10, %xmm8
movaps %xmm1, %xmm5
subss 0x14(%rax), %xmm5
movaps %xmm3, %xmm9
subss 0x10(%rax), %xmm9
mulss %xmm6, %xmm9
mulss %xmm7, %xmm5
subss %xmm9, %xmm5
andps %xmm10, %xmm5
addss %xmm8, %xmm5
mulss 0x19e09(%rip), %xmm4 # 0x45628
jmp 0x2b865
movaps %xmm3, %xmm4
subss 0x8(%rax), %xmm4
andps %xmm10, %xmm4
movaps %xmm1, %xmm6
subss 0xc(%rax), %xmm6
andps %xmm10, %xmm6
addss %xmm4, %xmm6
movaps %xmm3, %xmm4
subss 0x10(%rax), %xmm4
andps %xmm10, %xmm4
movaps %xmm1, %xmm5
subss 0x14(%rax), %xmm5
addss %xmm6, %xmm4
andps %xmm10, %xmm5
addss %xmm4, %xmm5
movss 0x19dc3(%rip), %xmm4 # 0x45628
cmpq $0x3e0, %rbp # imm = 0x3E0
je 0x2b952
ucomiss %xmm5, %xmm4
ja 0x2b952
movss 0x8(%rax), %xmm4
movss 0x10(%rax), %xmm5
movaps %xmm3, %xmm6
addss %xmm4, %xmm6
addss %xmm5, %xmm4
movss 0x17fb4(%rip), %xmm7 # 0x4384c
mulss %xmm7, %xmm4
mulss %xmm7, %xmm6
movss %xmm6, 0x58(%rsp,%rbp)
addss %xmm5, %xmm2
mulss %xmm7, %xmm2
movss %xmm2, 0x10(%rax)
movss %xmm3, 0x50(%rsp,%rbp)
addss %xmm4, %xmm6
mulss %xmm7, %xmm6
movss %xmm6, 0x60(%rsp,%rbp)
addss %xmm4, %xmm2
mulss %xmm7, %xmm2
movss %xmm2, 0x8(%rax)
addss %xmm6, %xmm2
mulss %xmm7, %xmm2
movss %xmm2, 0x30(%rsp,%rbp)
movss %xmm2, 0x68(%rsp,%rbp)
movss 0xc(%rax), %xmm2
movss 0x14(%rax), %xmm3
movaps %xmm1, %xmm4
addss %xmm2, %xmm4
addss %xmm3, %xmm2
mulss %xmm7, %xmm2
mulss %xmm7, %xmm4
movss %xmm4, 0x5c(%rsp,%rbp)
addss %xmm3, %xmm0
mulss %xmm7, %xmm0
movss %xmm0, 0x14(%rax)
movss %xmm1, 0x54(%rsp,%rbp)
addss %xmm2, %xmm4
mulss %xmm7, %xmm4
movss %xmm4, 0x64(%rsp,%rbp)
addss %xmm2, %xmm0
mulss %xmm7, %xmm0
movss %xmm0, 0xc(%rax)
addss %xmm4, %xmm0
mulss %xmm7, %xmm0
movss %xmm0, 0x4(%rax)
movss %xmm0, 0x6c(%rsp,%rbp)
addq $0x20, %rbp
jmp 0x2b97d
movss %xmm2, 0x28(%rsp)
movss %xmm0, 0x2c(%rsp)
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rdx
movl $0x1, %ecx
callq *%r14
movaps 0x17ef7(%rip), %xmm10 # 0x43870
addq $-0x20, %rbp
leaq (%rsp,%rbp), %rax
addq $0x30, %rax
testq %rbp, %rbp
jns 0x2b78c
movss 0x20(%rsp), %xmm0
movss 0x24(%rsp), %xmm1
movl 0xc(%rsp), %ebp
cmpl %ebp, %r15d
jl 0x2b6e1
addq $0x438, %rsp # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rsi
movq %rbx, %rdx
addq $0x438, %rsp # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b5c5
| plutovg_path_traverse_flatten:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 438h
mov rbx, rdx
mov r14, rsi
cmp dword ptr [rdi+0Ch], 0
jz loc_2B9B9
mov ebp, [rdi+20h]
test ebp, ebp
jle loc_2B9A7
mov r13, [rdi+18h]
xor r15d, r15d
xorps xmm0, xmm0
movaps xmm10, cs:xmmword_43870
lea r12, [rsp+468h+var_440]
xorps xmm1, xmm1
mov [rsp+468h+var_45C], ebp
loc_2B6E1:
movsxd rax, r15d
mov ecx, [r13+rax*8+0]
cmp ecx, 2
jb short loc_2B6F5
jz short loc_2B701
cmp ecx, 3
jnz short loc_2B71F
loc_2B6F5:
mov rcx, [r13+rax*8+8]
mov [rsp+468h+var_458], rcx
jmp short loc_2B71F
loc_2B701:
mov rcx, [r13+rax*8+8]
mov [rsp+468h+var_458], rcx
mov rcx, [r13+rax*8+10h]
mov qword ptr [rsp+468h+var_450], rcx
mov rcx, [r13+rax*8+18h]
mov qword ptr [rsp+468h+var_450+8], rcx
loc_2B71F:
mov r15d, [r13+rax*8+4]
add r15d, eax
mov esi, [r13+rax*8+0]
cmp esi, 2
jb short loc_2B73C
jz short loc_2B765
cmp esi, 3
jnz loc_2B99E
loc_2B73C:
mov rdi, rbx
lea rdx, [rsp+468h+var_458]
mov ecx, 1
call r14
movaps xmm10, cs:xmmword_43870
movss xmm0, dword ptr [rsp+468h+var_458]
movss xmm1, dword ptr [rsp+468h+var_458+4]
jmp loc_2B99E
loc_2B765:
movss [rsp+468h+var_438], xmm0
movss [rsp+468h+var_434], xmm1
mov rax, [rsp+468h+var_458]
mov [rsp+468h+var_430], rax
movups xmm0, [rsp+468h+var_450]
movaps [rsp+468h+var_428], xmm0
lea rax, [rsp+468h+var_438]
xor ebp, ebp
loc_2B78C:
movss xmm0, dword ptr [rax+1Ch]
movss xmm1, dword ptr [rax+4]
movss xmm2, dword ptr [rax+18h]
movaps xmm6, xmm0
subss xmm6, xmm1
movss xmm3, [rsp+rbp+468h+var_438]
movaps xmm7, xmm2
subss xmm7, xmm3
movaps xmm5, xmm7
andps xmm5, xmm10
movaps xmm4, xmm6
andps xmm4, xmm10
addss xmm4, xmm5
ucomiss xmm4, cs:flt_430F4
jbe short loc_2B821
movaps xmm8, xmm1
subss xmm8, dword ptr [rax+0Ch]
movaps xmm5, xmm3
subss xmm5, dword ptr [rax+8]
mulss xmm5, xmm6
mulss xmm8, xmm7
subss xmm8, xmm5
andps xmm8, xmm10
movaps xmm5, xmm1
subss xmm5, dword ptr [rax+14h]
movaps xmm9, xmm3
subss xmm9, dword ptr [rax+10h]
mulss xmm9, xmm6
mulss xmm5, xmm7
subss xmm5, xmm9
andps xmm5, xmm10
addss xmm5, xmm8
mulss xmm4, cs:dword_45628
jmp short loc_2B865
loc_2B821:
movaps xmm4, xmm3
subss xmm4, dword ptr [rax+8]
andps xmm4, xmm10
movaps xmm6, xmm1
subss xmm6, dword ptr [rax+0Ch]
andps xmm6, xmm10
addss xmm6, xmm4
movaps xmm4, xmm3
subss xmm4, dword ptr [rax+10h]
andps xmm4, xmm10
movaps xmm5, xmm1
subss xmm5, dword ptr [rax+14h]
addss xmm4, xmm6
andps xmm5, xmm10
addss xmm5, xmm4
movss xmm4, cs:dword_45628
loc_2B865:
cmp rbp, 3E0h
jz loc_2B952
ucomiss xmm4, xmm5
ja loc_2B952
movss xmm4, dword ptr [rax+8]
movss xmm5, dword ptr [rax+10h]
movaps xmm6, xmm3
addss xmm6, xmm4
addss xmm4, xmm5
movss xmm7, cs:dword_4384C
mulss xmm4, xmm7
mulss xmm6, xmm7
movss [rsp+rbp+468h+var_410], xmm6
addss xmm2, xmm5
mulss xmm2, xmm7
movss dword ptr [rax+10h], xmm2
movss [rsp+rbp+468h+var_418], xmm3
addss xmm6, xmm4
mulss xmm6, xmm7
movss [rsp+rbp+468h+var_408], xmm6
addss xmm2, xmm4
mulss xmm2, xmm7
movss dword ptr [rax+8], xmm2
addss xmm2, xmm6
mulss xmm2, xmm7
movss [rsp+rbp+468h+var_438], xmm2
movss [rsp+rbp+468h+var_400], xmm2
movss xmm2, dword ptr [rax+0Ch]
movss xmm3, dword ptr [rax+14h]
movaps xmm4, xmm1
addss xmm4, xmm2
addss xmm2, xmm3
mulss xmm2, xmm7
mulss xmm4, xmm7
movss [rsp+rbp+468h+var_40C], xmm4
addss xmm0, xmm3
mulss xmm0, xmm7
movss dword ptr [rax+14h], xmm0
movss [rsp+rbp+468h+var_414], xmm1
addss xmm4, xmm2
mulss xmm4, xmm7
movss [rsp+rbp+468h+var_404], xmm4
addss xmm0, xmm2
mulss xmm0, xmm7
movss dword ptr [rax+0Ch], xmm0
addss xmm0, xmm4
mulss xmm0, xmm7
movss dword ptr [rax+4], xmm0
movss [rsp+rbp+468h+var_3FC], xmm0
add rbp, 20h ; ' '
jmp short loc_2B97D
loc_2B952:
movss [rsp+468h+var_440], xmm2
movss [rsp+468h+var_43C], xmm0
mov rdi, rbx
mov esi, 1
mov rdx, r12
mov ecx, 1
call r14
movaps xmm10, cs:xmmword_43870
add rbp, 0FFFFFFFFFFFFFFE0h
loc_2B97D:
lea rax, [rsp+rbp+468h+var_468]
add rax, 30h ; '0'
test rbp, rbp
jns loc_2B78C
movss xmm0, dword ptr [rsp+468h+var_450+8]
movss xmm1, dword ptr [rsp+468h+var_450+0Ch]
mov ebp, [rsp+468h+var_45C]
loc_2B99E:
cmp r15d, ebp
jl loc_2B6E1
loc_2B9A7:
add rsp, 438h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2B9B9:
mov rsi, r14
mov rdx, rbx
add rsp, 438h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp plutovg_path_traverse
| void plutovg_path_traverse_flatten(
long long a1,
void ( *a2)(long long, long long, long long *, long long, double, double),
long long a3,
long long a4,
long long a5,
long long a6)
{
int v8; // ebp
long long v9; // r13
int v10; // r15d
double v11; // xmm0_8
double v12; // xmm1_8
long long v13; // rax
unsigned int v14; // ecx
long long v15; // rsi
float *v16; // rax
long long i; // rbp
double v18; // xmm0_8
double v19; // xmm1_8
double v20; // xmm2_8
float v21; // xmm6_4
double v22; // xmm3_8
float v23; // xmm7_4
double v24; // xmm4_8
long long v25; // xmm5_8
double v26; // xmm5_8
float v27; // xmm4_4
float v28; // xmm5_4
float v29; // xmm6_4
float v30; // xmm4_4
float v31; // xmm6_4
float v32; // xmm2_4
float v33; // xmm6_4
float v34; // xmm2_4
float v35; // xmm2_4
float v36; // xmm2_4
float v37; // xmm3_4
float v38; // xmm4_4
float v39; // xmm2_4
float v40; // xmm4_4
float v41; // xmm0_4
float v42; // xmm4_4
float v43; // xmm0_4
float v44; // xmm0_4
int v45; // [rsp+Ch] [rbp-45Ch]
long long v46; // [rsp+10h] [rbp-458h] BYREF
__int128 v47; // [rsp+18h] [rbp-450h]
_DWORD v48[2]; // [rsp+28h] [rbp-440h] BYREF
_DWORD v49[2]; // [rsp+30h] [rbp-438h] BYREF
long long v50; // [rsp+38h] [rbp-430h]
__int128 v51; // [rsp+40h] [rbp-428h]
_DWORD v52[262]; // [rsp+50h] [rbp-418h]
if ( *(_DWORD *)(a1 + 12) )
{
v8 = *(_DWORD *)(a1 + 32);
if ( v8 > 0 )
{
v9 = *(_QWORD *)(a1 + 24);
v10 = 0;
v11 = 0.0;
v12 = 0.0;
v45 = *(_DWORD *)(a1 + 32);
do
{
v13 = v10;
v14 = *(_DWORD *)(v9 + 8LL * v10);
if ( v14 < 2 )
goto LABEL_7;
if ( v14 == 2 )
{
v46 = *(_QWORD *)(v9 + 8LL * v10 + 8);
v47 = *(_OWORD *)(v9 + 8LL * v10 + 16);
goto LABEL_9;
}
if ( v14 == 3 )
LABEL_7:
v46 = *(_QWORD *)(v9 + 8LL * v10 + 8);
LABEL_9:
v10 += *(_DWORD *)(v9 + 8LL * v10 + 4);
v15 = *(unsigned int *)(v9 + 8 * v13);
if ( (unsigned int)v15 < 2 )
goto LABEL_12;
if ( (_DWORD)v15 == 2 )
{
v49[0] = LODWORD(v11);
v49[1] = LODWORD(v12);
v50 = v46;
v51 = v47;
v16 = (float *)v49;
for ( i = 0LL; i >= 0; v16 = (float *)&v49[i] )
{
*(_QWORD *)&v18 = *((unsigned int *)v16 + 7);
*(_QWORD *)&v19 = *((unsigned int *)v16 + 1);
*(_QWORD *)&v20 = *((unsigned int *)v16 + 6);
v21 = v16[7] - *(float *)&v19;
*(_QWORD *)&v22 = (unsigned int)v49[i];
v23 = v16[6] - *(float *)&v22;
HIDWORD(v24) = 0;
*(float *)&v24 = fabs(v21) + fabs(v23);
HIDWORD(v25) = HIDWORD(v19);
if ( *(float *)&v24 <= 1.0 )
{
*(float *)&v25 = *(float *)&v19 - v16[5];
*(_QWORD *)&v26 = v25 & 0x7FFFFFFF7FFFFFFFLL;
*(float *)&v26 = *(float *)&v26
+ (float)(fabs(*(float *)&v22 - v16[4])
+ (float)(fabs(*(float *)&v19 - v16[3]) + fabs(*(float *)&v22 - v16[2])));
*(_QWORD *)&v24 = 1048576000LL;
}
else
{
*(float *)&v25 = (float)((float)(*(float *)&v19 - v16[5]) * v23)
- (float)((float)(*(float *)&v22 - v16[4]) * v21);
*(_QWORD *)&v26 = v25 & 0x7FFFFFFF7FFFFFFFLL;
*(float *)&v26 = *(float *)&v26
+ fabs(
(float)((float)(*(float *)&v19 - v16[3]) * v23)
- (float)((float)(*(float *)&v22 - v16[2]) * v21));
*(float *)&v24 = *(float *)&v24 * 0.25;
}
if ( i == 248 || *(float *)&v24 > *(float *)&v26 )
{
*(float *)v48 = v16[6];
v48[1] = LODWORD(v18);
((void ( *)(long long, long long, _DWORD *, long long, double, double, double, double, double, double))a2)(
a3,
1LL,
v48,
1LL,
v18,
v19,
v20,
v22,
v24,
v26);
i -= 8LL;
}
else
{
v27 = v16[2];
v28 = v16[4];
v29 = *(float *)&v22 + v27;
v30 = (float)(v27 + v28) * 0.5;
v31 = v29 * 0.5;
*(float *)&v52[i + 2] = v31;
v32 = (float)(*(float *)&v20 + v28) * 0.5;
v16[4] = v32;
v52[i] = LODWORD(v22);
v33 = (float)(v31 + v30) * 0.5;
*(float *)&v52[i + 4] = v33;
v34 = (float)(v32 + v30) * 0.5;
v16[2] = v34;
v35 = (float)(v34 + v33) * 0.5;
*(float *)&v49[i] = v35;
*(float *)&v52[i + 6] = v35;
v36 = v16[3];
v37 = v16[5];
v38 = *(float *)&v19 + v36;
v39 = (float)(v36 + v37) * 0.5;
v40 = v38 * 0.5;
*(float *)&v52[i + 3] = v40;
v41 = (float)(*(float *)&v18 + v37) * 0.5;
v16[5] = v41;
v52[i + 1] = LODWORD(v19);
v42 = (float)(v40 + v39) * 0.5;
*(float *)&v52[i + 5] = v42;
v43 = (float)(v41 + v39) * 0.5;
v16[3] = v43;
v44 = (float)(v43 + v42) * 0.5;
v16[1] = v44;
*(float *)&v52[i + 7] = v44;
i += 8LL;
}
}
*(_QWORD *)&v11 = DWORD2(v47);
*(_QWORD *)&v12 = HIDWORD(v47);
v8 = v45;
continue;
}
if ( (_DWORD)v15 == 3 )
{
LABEL_12:
a2(a3, v15, &v46, 1LL, v11, v12);
*(_QWORD *)&v11 = (unsigned int)v46;
*(_QWORD *)&v12 = HIDWORD(v46);
}
}
while ( v10 < v8 );
}
}
else
{
plutovg_path_traverse(
a1,
(void ( *)(long long, long long, long long *, long long, long long, long long, long long, long long, long long))a2,
a3,
a4,
a5,
a6);
}
}
| plutovg_path_traverse_flatten:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x438
MOV RBX,RDX
MOV R14,RSI
CMP dword ptr [RDI + 0xc],0x0
JZ 0x0012b9b9
MOV EBP,dword ptr [RDI + 0x20]
TEST EBP,EBP
JLE 0x0012b9a7
MOV R13,qword ptr [RDI + 0x18]
XOR R15D,R15D
XORPS XMM0,XMM0
MOVAPS XMM10,xmmword ptr [0x00143870]
LEA R12,[RSP + 0x28]
XORPS XMM1,XMM1
MOV dword ptr [RSP + 0xc],EBP
LAB_0012b6e1:
MOVSXD RAX,R15D
MOV ECX,dword ptr [R13 + RAX*0x8]
CMP ECX,0x2
JC 0x0012b6f5
JZ 0x0012b701
CMP ECX,0x3
JNZ 0x0012b71f
LAB_0012b6f5:
MOV RCX,qword ptr [R13 + RAX*0x8 + 0x8]
MOV qword ptr [RSP + 0x10],RCX
JMP 0x0012b71f
LAB_0012b701:
MOV RCX,qword ptr [R13 + RAX*0x8 + 0x8]
MOV qword ptr [RSP + 0x10],RCX
MOV RCX,qword ptr [R13 + RAX*0x8 + 0x10]
MOV qword ptr [RSP + 0x18],RCX
MOV RCX,qword ptr [R13 + RAX*0x8 + 0x18]
MOV qword ptr [RSP + 0x20],RCX
LAB_0012b71f:
MOV R15D,dword ptr [R13 + RAX*0x8 + 0x4]
ADD R15D,EAX
MOV ESI,dword ptr [R13 + RAX*0x8]
CMP ESI,0x2
JC 0x0012b73c
JZ 0x0012b765
CMP ESI,0x3
JNZ 0x0012b99e
LAB_0012b73c:
MOV RDI,RBX
LEA RDX,[RSP + 0x10]
MOV ECX,0x1
CALL R14
MOVAPS XMM10,xmmword ptr [0x00143870]
MOVSS XMM0,dword ptr [RSP + 0x10]
MOVSS XMM1,dword ptr [RSP + 0x14]
JMP 0x0012b99e
LAB_0012b765:
MOVSS dword ptr [RSP + 0x30],XMM0
MOVSS dword ptr [RSP + 0x34],XMM1
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x38],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x18]
MOVAPS xmmword ptr [RSP + 0x40],XMM0
LEA RAX,[RSP + 0x30]
XOR EBP,EBP
LAB_0012b78c:
MOVSS XMM0,dword ptr [RAX + 0x1c]
MOVSS XMM1,dword ptr [RAX + 0x4]
MOVSS XMM2,dword ptr [RAX + 0x18]
MOVAPS XMM6,XMM0
SUBSS XMM6,XMM1
MOVSS XMM3,dword ptr [RSP + RBP*0x1 + 0x30]
MOVAPS XMM7,XMM2
SUBSS XMM7,XMM3
MOVAPS XMM5,XMM7
ANDPS XMM5,XMM10
MOVAPS XMM4,XMM6
ANDPS XMM4,XMM10
ADDSS XMM4,XMM5
UCOMISS XMM4,dword ptr [0x001430f4]
JBE 0x0012b821
MOVAPS XMM8,XMM1
SUBSS XMM8,dword ptr [RAX + 0xc]
MOVAPS XMM5,XMM3
SUBSS XMM5,dword ptr [RAX + 0x8]
MULSS XMM5,XMM6
MULSS XMM8,XMM7
SUBSS XMM8,XMM5
ANDPS XMM8,XMM10
MOVAPS XMM5,XMM1
SUBSS XMM5,dword ptr [RAX + 0x14]
MOVAPS XMM9,XMM3
SUBSS XMM9,dword ptr [RAX + 0x10]
MULSS XMM9,XMM6
MULSS XMM5,XMM7
SUBSS XMM5,XMM9
ANDPS XMM5,XMM10
ADDSS XMM5,XMM8
MULSS XMM4,dword ptr [0x00145628]
JMP 0x0012b865
LAB_0012b821:
MOVAPS XMM4,XMM3
SUBSS XMM4,dword ptr [RAX + 0x8]
ANDPS XMM4,XMM10
MOVAPS XMM6,XMM1
SUBSS XMM6,dword ptr [RAX + 0xc]
ANDPS XMM6,XMM10
ADDSS XMM6,XMM4
MOVAPS XMM4,XMM3
SUBSS XMM4,dword ptr [RAX + 0x10]
ANDPS XMM4,XMM10
MOVAPS XMM5,XMM1
SUBSS XMM5,dword ptr [RAX + 0x14]
ADDSS XMM4,XMM6
ANDPS XMM5,XMM10
ADDSS XMM5,XMM4
MOVSS XMM4,dword ptr [0x00145628]
LAB_0012b865:
CMP RBP,0x3e0
JZ 0x0012b952
UCOMISS XMM4,XMM5
JA 0x0012b952
MOVSS XMM4,dword ptr [RAX + 0x8]
MOVSS XMM5,dword ptr [RAX + 0x10]
MOVAPS XMM6,XMM3
ADDSS XMM6,XMM4
ADDSS XMM4,XMM5
MOVSS XMM7,dword ptr [0x0014384c]
MULSS XMM4,XMM7
MULSS XMM6,XMM7
MOVSS dword ptr [RSP + RBP*0x1 + 0x58],XMM6
ADDSS XMM2,XMM5
MULSS XMM2,XMM7
MOVSS dword ptr [RAX + 0x10],XMM2
MOVSS dword ptr [RSP + RBP*0x1 + 0x50],XMM3
ADDSS XMM6,XMM4
MULSS XMM6,XMM7
MOVSS dword ptr [RSP + RBP*0x1 + 0x60],XMM6
ADDSS XMM2,XMM4
MULSS XMM2,XMM7
MOVSS dword ptr [RAX + 0x8],XMM2
ADDSS XMM2,XMM6
MULSS XMM2,XMM7
MOVSS dword ptr [RSP + RBP*0x1 + 0x30],XMM2
MOVSS dword ptr [RSP + RBP*0x1 + 0x68],XMM2
MOVSS XMM2,dword ptr [RAX + 0xc]
MOVSS XMM3,dword ptr [RAX + 0x14]
MOVAPS XMM4,XMM1
ADDSS XMM4,XMM2
ADDSS XMM2,XMM3
MULSS XMM2,XMM7
MULSS XMM4,XMM7
MOVSS dword ptr [RSP + RBP*0x1 + 0x5c],XMM4
ADDSS XMM0,XMM3
MULSS XMM0,XMM7
MOVSS dword ptr [RAX + 0x14],XMM0
MOVSS dword ptr [RSP + RBP*0x1 + 0x54],XMM1
ADDSS XMM4,XMM2
MULSS XMM4,XMM7
MOVSS dword ptr [RSP + RBP*0x1 + 0x64],XMM4
ADDSS XMM0,XMM2
MULSS XMM0,XMM7
MOVSS dword ptr [RAX + 0xc],XMM0
ADDSS XMM0,XMM4
MULSS XMM0,XMM7
MOVSS dword ptr [RAX + 0x4],XMM0
MOVSS dword ptr [RSP + RBP*0x1 + 0x6c],XMM0
ADD RBP,0x20
JMP 0x0012b97d
LAB_0012b952:
MOVSS dword ptr [RSP + 0x28],XMM2
MOVSS dword ptr [RSP + 0x2c],XMM0
MOV RDI,RBX
MOV ESI,0x1
MOV RDX,R12
MOV ECX,0x1
CALL R14
MOVAPS XMM10,xmmword ptr [0x00143870]
ADD RBP,-0x20
LAB_0012b97d:
LEA RAX,[RSP + RBP*0x1]
ADD RAX,0x30
TEST RBP,RBP
JNS 0x0012b78c
MOVSS XMM0,dword ptr [RSP + 0x20]
MOVSS XMM1,dword ptr [RSP + 0x24]
MOV EBP,dword ptr [RSP + 0xc]
LAB_0012b99e:
CMP R15D,EBP
JL 0x0012b6e1
LAB_0012b9a7:
ADD RSP,0x438
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012b9b9:
MOV RSI,R14
MOV RDX,RBX
ADD RSP,0x438
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0012b5c5
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void plutovg_path_traverse_flatten(long param_1,code *param_2,int8 param_3)
{
uint uVar1;
long lVar2;
int1 *puVar3;
long lVar4;
int iVar5;
int iVar6;
float fVar7;
int4 uVar8;
float fVar9;
float fVar10;
float fVar11;
float fVar12;
float fVar13;
float fVar14;
uint uVar15;
int1 auStack_468 [12];
int local_45c;
int8 local_458;
int8 local_450;
int8 uStack_448;
float local_440;
float local_43c;
float local_438 [2];
int8 local_430;
int8 local_428;
int8 uStack_420;
float afStack_418 [250];
if (*(int *)(param_1 + 0xc) == 0) {
plutovg_path_traverse(param_1,param_2,param_3);
return;
}
iVar5 = *(int *)(param_1 + 0x20);
if (0 < iVar5) {
lVar2 = *(long *)(param_1 + 0x18);
iVar6 = 0;
fVar7 = 0.0;
uVar8 = 0;
uVar15 = _DAT_00143870;
local_45c = iVar5;
do {
lVar4 = (long)iVar6;
uVar1 = *(uint *)(lVar2 + lVar4 * 8);
if (uVar1 < 2) {
LAB_0012b6f5:
local_458 = *(int8 *)(lVar2 + 8 + lVar4 * 8);
}
else if (uVar1 == 2) {
local_458 = *(int8 *)(lVar2 + 8 + lVar4 * 8);
local_450 = *(int8 *)(lVar2 + 0x10 + lVar4 * 8);
uStack_448 = *(int8 *)(lVar2 + 0x18 + lVar4 * 8);
}
else if (uVar1 == 3) goto LAB_0012b6f5;
iVar6 = *(int *)(lVar2 + 4 + lVar4 * 8) + iVar6;
uVar1 = *(uint *)(lVar2 + lVar4 * 8);
if (uVar1 < 2) {
LAB_0012b73c:
(*param_2)(param_3,uVar1,&local_458,1);
fVar7 = (float)local_458;
uVar8 = local_458._4_4_;
uVar15 = _DAT_00143870;
}
else if (uVar1 == 2) {
local_438[0] = fVar7;
local_438[1] = (float)uVar8;
local_430 = local_458;
local_428 = local_450;
uStack_420 = uStack_448;
lVar4 = 0;
puVar3 = auStack_468;
do {
fVar7 = *(float *)(puVar3 + 0x4c);
fVar11 = *(float *)(puVar3 + 0x34);
fVar9 = *(float *)(puVar3 + 0x48);
fVar12 = fVar7 - fVar11;
fVar13 = *(float *)((long)local_438 + lVar4);
fVar14 = fVar9 - fVar13;
fVar10 = (float)((uint)fVar12 & uVar15) + (float)((uint)fVar14 & uVar15);
if (fVar10 <= DAT_001430f4) {
fVar12 = (float)((uint)(fVar11 - *(float *)(puVar3 + 0x44)) & uVar15) +
(float)((uint)(fVar13 - *(float *)(puVar3 + 0x40)) & uVar15) +
(float)((uint)(fVar11 - *(float *)(puVar3 + 0x3c)) & uVar15) +
(float)((uint)(fVar13 - *(float *)(puVar3 + 0x38)) & uVar15);
fVar10 = DAT_00145628;
}
else {
fVar12 = (float)((uint)((fVar11 - *(float *)(puVar3 + 0x44)) * fVar14 -
(fVar13 - *(float *)(puVar3 + 0x40)) * fVar12) & uVar15) +
(float)((uint)((fVar11 - *(float *)(puVar3 + 0x3c)) * fVar14 -
(fVar13 - *(float *)(puVar3 + 0x38)) * fVar12) & uVar15);
fVar10 = fVar10 * DAT_00145628;
}
if ((lVar4 == 0x3e0) || (fVar12 < fVar10)) {
local_440 = fVar9;
local_43c = fVar7;
(*param_2)(param_3,1,&local_440,1);
lVar4 = lVar4 + -0x20;
uVar15 = _DAT_00143870;
}
else {
fVar10 = *(float *)(puVar3 + 0x40);
fVar12 = (*(float *)(puVar3 + 0x38) + fVar10) * DAT_0014384c;
fVar14 = (fVar13 + *(float *)(puVar3 + 0x38)) * DAT_0014384c;
*(float *)((long)afStack_418 + lVar4 + 8) = fVar14;
fVar9 = (fVar9 + fVar10) * DAT_0014384c;
*(float *)(puVar3 + 0x40) = fVar9;
*(float *)((long)afStack_418 + lVar4) = fVar13;
fVar13 = (fVar14 + fVar12) * DAT_0014384c;
*(float *)((long)afStack_418 + lVar4 + 0x10) = fVar13;
fVar9 = (fVar9 + fVar12) * DAT_0014384c;
*(float *)(puVar3 + 0x38) = fVar9;
fVar9 = (fVar9 + fVar13) * DAT_0014384c;
*(float *)((long)local_438 + lVar4) = fVar9;
*(float *)((long)afStack_418 + lVar4 + 0x18) = fVar9;
fVar9 = *(float *)(puVar3 + 0x44);
fVar13 = (*(float *)(puVar3 + 0x3c) + fVar9) * DAT_0014384c;
fVar10 = (fVar11 + *(float *)(puVar3 + 0x3c)) * DAT_0014384c;
*(float *)((long)afStack_418 + lVar4 + 0xc) = fVar10;
fVar7 = (fVar7 + fVar9) * DAT_0014384c;
*(float *)(puVar3 + 0x44) = fVar7;
*(float *)((long)afStack_418 + lVar4 + 4) = fVar11;
fVar11 = (fVar10 + fVar13) * DAT_0014384c;
*(float *)((long)afStack_418 + lVar4 + 0x14) = fVar11;
fVar7 = (fVar7 + fVar13) * DAT_0014384c;
*(float *)(puVar3 + 0x3c) = fVar7;
fVar7 = (fVar7 + fVar11) * DAT_0014384c;
*(float *)(puVar3 + 0x34) = fVar7;
*(float *)((long)afStack_418 + lVar4 + 0x1c) = fVar7;
lVar4 = lVar4 + 0x20;
}
puVar3 = auStack_468 + lVar4;
} while (-1 < lVar4);
fVar7 = (float)uStack_448;
uVar8 = uStack_448._4_4_;
iVar5 = local_45c;
}
else if (uVar1 == 3) goto LAB_0012b73c;
} while (iVar6 < iVar5);
}
return;
}
| |
39,304 | ma_crypt_index_post_read_hook | eloqsql/storage/maria/ma_crypt.c | static my_bool ma_crypt_index_post_read_hook(int res,
PAGECACHE_IO_HOOK_ARGS *args)
{
MARIA_SHARE *share= (MARIA_SHARE*) args->data;
const uint block_size= share->block_size;
const uint page_used= _ma_get_page_used(share, args->page);
if (res ||
page_used < share->keypage_header ||
page_used >= block_size - CRC_SIZE)
{
res= 1;
my_errno= HA_ERR_DECRYPTION_FAILED;
}
else
{
const uchar *src= args->page;
uchar* dst= args->crypt_buf;
uint pageno= (uint)args->pageno;
LSN lsn= lsn_korr(src);
const uint head= share->keypage_header;
const uint tail= CRC_SIZE;
const uint32 key_version= _ma_get_key_version(share, src);
/* page_used includes header (but not trailer) */
const uint size= page_used - head;
/* 1 - copy head */
memcpy(dst, src, head);
/* 2 - decrypt page */
res= ma_decrypt(share, share->crypt_data,
src + head, dst + head, size, pageno, lsn, key_version);
/* 3 - copy tail */
memcpy(dst + block_size - tail, src + block_size - tail, tail);
/* 4 clear key version to get correct crc */
_ma_store_key_version(share, dst, 0);
}
if (args->crypt_buf != NULL)
{
uchar *tmp= args->page;
args->page= args->crypt_buf;
args->crypt_buf= NULL;
my_free(tmp);
}
return maria_page_crc_check_index(res, args);
} | O0 | c | ma_crypt_index_post_read_hook:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x744(%rcx), %ecx
movzbl -0x1(%rax,%rcx), %eax
movzwl %ax, %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq -0x18(%rbp), %rdx
movl 0x744(%rdx), %edx
movzbl -0x2(%rcx,%rdx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x8b1f7
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x744(%rcx), %eax
jb 0x8b1f7
movl -0x20(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0x4, %ecx
cmpl %ecx, %eax
jb 0x8b20e
movl $0x1, -0x4(%rbp)
callq 0xf7a40
movl $0xc0, (%rax)
jmp 0x8b326
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movq -0x28(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x28(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
shlq $0x20, %rax
movq -0x28(%rbp), %rcx
movl 0x3(%rcx), %ecx
orq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movl 0x744(%rax), %eax
movl %eax, -0x44(%rbp)
movl $0x4, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x744(%rcx), %ecx
movl -0x8(%rax,%rcx), %eax
movl %eax, -0x4c(%rbp)
movl -0x20(%rbp), %eax
subl -0x44(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x44(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0xc20(%rax), %rsi
movq -0x28(%rbp), %rdx
movl -0x44(%rbp), %eax
addq %rax, %rdx
movq -0x30(%rbp), %rcx
movl -0x44(%rbp), %eax
addq %rax, %rcx
movl -0x50(%rbp), %r8d
movl -0x34(%rbp), %r9d
movq -0x40(%rbp), %r10
movl -0x4c(%rbp), %eax
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x8b640
movl %eax, -0x4(%rbp)
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rdx
movl -0x1c(%rbp), %esi
movl -0x4(%rdx,%rsi), %edx
movl %edx, -0x4(%rax,%rcx)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rax
addq $-0x8, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl $0x0, (%rax)
jmp 0x8b326
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x8b360
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x60(%rbp), %rdi
callq 0xf5560
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x42dc0
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_crypt_index_post_read_hook:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax+7BCh]
mov [rbp+var_1C], eax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_18]
mov ecx, [rcx+744h]
movzx eax, byte ptr [rax+rcx-1]
movzx eax, ax
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov rdx, [rbp+var_18]
mov edx, [rdx+744h]
movzx ecx, byte ptr [rcx+rdx-2]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_20], eax
cmp [rbp+var_4], 0
jnz short loc_8B1F7
mov eax, [rbp+var_20]
mov rcx, [rbp+var_18]
cmp eax, [rcx+744h]
jb short loc_8B1F7
mov eax, [rbp+var_20]
mov ecx, [rbp+var_1C]
sub ecx, 4
cmp eax, ecx
jb short loc_8B20E
loc_8B1F7:
mov [rbp+var_4], 1
call _my_thread_var
mov dword ptr [rax], 0C0h
jmp loc_8B326
loc_8B20E:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_34], eax
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_28]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_28]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
shl rax, 20h
mov rcx, [rbp+var_28]
mov ecx, [rcx+3]
or rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov eax, [rax+744h]
mov [rbp+var_44], eax
mov [rbp+var_48], 4
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
mov ecx, [rcx+744h]
mov eax, [rax+rcx-8]
mov [rbp+var_4C], eax
mov eax, [rbp+var_20]
sub eax, [rbp+var_44]
mov [rbp+var_50], eax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_28]
mov eax, [rbp+var_44]
mov edx, eax
call _memcpy
mov rdi, [rbp+var_18]
mov rax, [rbp+var_18]
mov rsi, [rax+0C20h]
mov rdx, [rbp+var_28]
mov eax, [rbp+var_44]
add rdx, rax
mov rcx, [rbp+var_30]
mov eax, [rbp+var_44]
add rcx, rax
mov r8d, [rbp+var_50]
mov r9d, [rbp+var_34]
mov r10, [rbp+var_40]
mov eax, [rbp+var_4C]
mov [rsp+70h+var_70], r10
mov [rsp+70h+var_68], eax
call ma_decrypt
mov [rbp+var_4], eax
mov rax, [rbp+var_30]
mov ecx, [rbp+var_1C]
mov rdx, [rbp+var_28]
mov esi, [rbp+var_1C]
mov edx, [rdx+rsi-4]
mov [rax+rcx-4], edx
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
mov ecx, [rcx+744h]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov dword ptr [rax], 0
jmp short $+2
loc_8B326:
mov rax, [rbp+var_10]
cmp qword ptr [rax+18h], 0
jz short loc_8B360
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_60], rax
mov rax, [rbp+var_10]
mov rcx, [rax+18h]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+18h], 0
mov rdi, [rbp+var_60]
call my_free
loc_8B360:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call maria_page_crc_check_index
add rsp, 70h
pop rbp
retn
| char ma_crypt_index_post_read_hook(long long a1, char *a2)
{
long long v3; // [rsp+10h] [rbp-60h]
int v4; // [rsp+24h] [rbp-4Ch]
unsigned int v5; // [rsp+2Ch] [rbp-44h]
unsigned long long v6; // [rsp+30h] [rbp-40h]
int v7; // [rsp+3Ch] [rbp-34h]
long long v8; // [rsp+40h] [rbp-30h]
unsigned __int16 *v9; // [rsp+48h] [rbp-28h]
unsigned int v10; // [rsp+50h] [rbp-20h]
unsigned int v11; // [rsp+54h] [rbp-1Ch]
long long v12; // [rsp+58h] [rbp-18h]
int v13; // [rsp+6Ch] [rbp-4h]
v12 = *((_QWORD *)a2 + 2);
v11 = *(_DWORD *)(v12 + 1980);
v10 = _byteswap_ushort(*(_WORD *)(*(_QWORD *)a2 + *(unsigned int *)(v12 + 1860) - 2LL));
if ( (_DWORD)a1 || v10 < *(_DWORD *)(v12 + 1860) || v10 >= v11 - 4 )
{
v13 = 1;
*(_DWORD *)my_thread_var(a1, a2) = 192;
}
else
{
v9 = *(unsigned __int16 **)a2;
v8 = *((_QWORD *)a2 + 3);
v7 = *((_QWORD *)a2 + 1);
v6 = *(unsigned int *)((char *)v9 + 3) | ((unsigned long long)((*((unsigned __int8 *)v9 + 2) << 16) | (unsigned int)*v9) << 32);
v5 = *(_DWORD *)(v12 + 1860);
v4 = *(_DWORD *)(*(_QWORD *)a2 + v5 - 8LL);
memcpy(v8, *(_QWORD *)a2, v5);
v13 = ma_decrypt(v12, *(_QWORD *)(v12 + 3104), v5 + (unsigned int)v9, v5 + (unsigned int)v8, v10 - v5, v7, v6, v4);
*(_DWORD *)(v8 + v11 - 4) = *(_DWORD *)((char *)v9 + v11 - 4);
*(_DWORD *)(*(unsigned int *)(v12 + 1860) + v8 - 8) = 0;
}
if ( *((_QWORD *)a2 + 3) )
{
v3 = *(_QWORD *)a2;
*(_QWORD *)a2 = *((_QWORD *)a2 + 3);
*((_QWORD *)a2 + 3) = 0LL;
my_free(v3);
}
return maria_page_crc_check_index(v13, (long long *)a2);
}
| ma_crypt_index_post_read_hook:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x744]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RDX + 0x744]
MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x2]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x20],EAX
CMP dword ptr [RBP + -0x4],0x0
JNZ 0x0018b1f7
MOV EAX,dword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
CMP EAX,dword ptr [RCX + 0x744]
JC 0x0018b1f7
MOV EAX,dword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x1c]
SUB ECX,0x4
CMP EAX,ECX
JC 0x0018b20e
LAB_0018b1f7:
MOV dword ptr [RBP + -0x4],0x1
CALL 0x001f7a40
MOV dword ptr [RAX],0xc0
JMP 0x0018b326
LAB_0018b20e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
SHL RAX,0x20
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x3]
OR RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x744]
MOV dword ptr [RBP + -0x44],EAX
MOV dword ptr [RBP + -0x48],0x4
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x744]
MOV EAX,dword ptr [RAX + RCX*0x1 + -0x8]
MOV dword ptr [RBP + -0x4c],EAX
MOV EAX,dword ptr [RBP + -0x20]
SUB EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x50],EAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x44]
MOV EDX,EAX
CALL 0x0012a090
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0xc20]
MOV RDX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x44]
ADD RDX,RAX
MOV RCX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x44]
ADD RCX,RAX
MOV R8D,dword ptr [RBP + -0x50]
MOV R9D,dword ptr [RBP + -0x34]
MOV R10,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x4c]
MOV qword ptr [RSP],R10
MOV dword ptr [RSP + 0x8],EAX
CALL 0x0018b640
MOV dword ptr [RBP + -0x4],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0x1c]
MOV EDX,dword ptr [RDX + RSI*0x1 + -0x4]
MOV dword ptr [RAX + RCX*0x1 + -0x4],EDX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x744]
ADD RAX,RCX
ADD RAX,-0x8
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV dword ptr [RAX],0x0
JMP 0x0018b326
LAB_0018b326:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0018b360
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],0x0
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x001f5560
LAB_0018b360:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00142dc0
ADD RSP,0x70
POP RBP
RET
|
void ma_crypt_index_post_read_hook(int param_1,long *param_2)
{
uint uVar1;
int4 uVar2;
uint uVar3;
int4 uVar4;
long lVar5;
int3 *__src;
void *__dest;
ulong uVar6;
int3 uVar7;
uint uVar8;
int4 *puVar9;
int4 local_c;
lVar5 = param_2[2];
uVar1 = *(uint *)(lVar5 + 0x7bc);
uVar8 = (uint)CONCAT11(*(int1 *)(*param_2 + -2 + (ulong)*(uint *)(lVar5 + 0x744)),
*(int1 *)(*param_2 + -1 + (ulong)*(uint *)(lVar5 + 0x744)));
if (((param_1 == 0) && (*(uint *)(lVar5 + 0x744) <= uVar8)) && (uVar8 < uVar1 - 4)) {
__src = (int3 *)*param_2;
__dest = (void *)param_2[3];
uVar6 = param_2[1];
uVar7 = *__src;
uVar2 = *(int4 *)((long)__src + 3);
uVar3 = *(uint *)(lVar5 + 0x744);
uVar4 = *(int4 *)((long)__src + ((ulong)*(uint *)(lVar5 + 0x744) - 8));
memcpy(__dest,__src,(ulong)uVar3);
local_c = ma_decrypt(lVar5,*(int8 *)(lVar5 + 0xc20),(long)__src + (ulong)uVar3,
(long)__dest + (ulong)uVar3,uVar8 - uVar3,uVar6 & 0xffffffff,
(ulong)CONCAT34(uVar7,uVar2),uVar4);
*(int4 *)((long)__dest + ((ulong)uVar1 - 4)) =
*(int4 *)((long)__src + ((ulong)uVar1 - 4));
*(int4 *)((long)__dest + ((ulong)*(uint *)(lVar5 + 0x744) - 8)) = 0;
}
else {
local_c = 1;
puVar9 = (int4 *)_my_thread_var();
*puVar9 = 0xc0;
}
if (param_2[3] != 0) {
lVar5 = *param_2;
*param_2 = param_2[3];
param_2[3] = 0;
my_free(lVar5);
}
maria_page_crc_check_index(local_c,param_2);
return;
}
| |
39,305 | ggml_get_i32_1d | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | int32_t ggml_get_i32_1d(const struct ggml_tensor * tensor, int i) {
if (!ggml_is_contiguous(tensor)) {
int64_t id[4] = { 0, 0, 0, 0 };
ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]);
return ggml_get_i32_nd(tensor, id[0], id[1], id[2], id[3]);
}
switch (tensor->type) {
case GGML_TYPE_I8:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int8_t));
return ((int8_t *)(tensor->data))[i];
}
case GGML_TYPE_I16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int16_t));
return ((int16_t *)(tensor->data))[i];
}
case GGML_TYPE_I32:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int32_t));
return ((int32_t *)(tensor->data))[i];
}
case GGML_TYPE_F16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(ggml_fp16_t));
return GGML_FP16_TO_FP32(((ggml_fp16_t *)(tensor->data))[i]);
}
case GGML_TYPE_BF16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(ggml_bf16_t));
return GGML_BF16_TO_FP32(((ggml_bf16_t *)(tensor->data))[i]);
}
case GGML_TYPE_F32:
{
GGML_ASSERT(tensor->nb[0] == sizeof(float));
return ((float *)(tensor->data))[i];
}
default:
{
GGML_ABORT("fatal error");
}
}
} | O0 | c | ggml_get_i32_1d:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd280
testb $0x1, %al
jne 0xf79f
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0xd560
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x40(%rbp), %rcx
addq $0x8, %rcx
leaq -0x40(%rbp), %r8
addq $0x10, %r8
leaq -0x40(%rbp), %r9
addq $0x18, %r9
callq 0xd850
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rax
movl %eax, %esi
movq -0x38(%rbp), %rax
movl %eax, %edx
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %eax, %r8d
callq 0xd810
movl %eax, -0x4(%rbp)
jmp 0xf997
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x48(%rbp)
subq $0x1e, %rax
ja 0xf97d
movq -0x48(%rbp), %rax
leaq 0x6393a(%rip), %rcx # 0x730f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
cmpq $0x1, 0x30(%rax)
je 0xf7f3
leaq 0x64389(%rip), %rdi # 0x73b62
movl $0xa25, %esi # imm = 0xA25
leaq 0x643dc(%rip), %rdx # 0x73bc1
leaq 0x644eb(%rip), %rcx # 0x73cd7
movb $0x0, %al
callq 0xe270
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0xf997
movq -0x10(%rbp), %rax
cmpq $0x2, 0x30(%rax)
je 0xf83a
leaq 0x64342(%rip), %rdi # 0x73b62
movl $0xa2a, %esi # imm = 0xA2A
leaq 0x64395(%rip), %rdx # 0x73bc1
leaq 0x64504(%rip), %rcx # 0x73d37
movb $0x0, %al
callq 0xe270
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movslq -0x14(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0xf997
movq -0x10(%rbp), %rax
cmpq $0x4, 0x30(%rax)
je 0xf881
leaq 0x642fb(%rip), %rdi # 0x73b62
movl $0xa2f, %esi # imm = 0xA2F
leaq 0x6434e(%rip), %rdx # 0x73bc1
leaq 0x644de(%rip), %rcx # 0x73d58
movb $0x0, %al
callq 0xe270
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4(%rbp)
jmp 0xf997
movq -0x10(%rbp), %rax
cmpq $0x2, 0x30(%rax)
je 0xf8c7
leaq 0x642b5(%rip), %rdi # 0x73b62
movl $0xa34, %esi # imm = 0xA34
leaq 0x64308(%rip), %rdx # 0x73bc1
leaq 0x644b9(%rip), %rcx # 0x73d79
movb $0x0, %al
callq 0xe270
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movslq -0x14(%rbp), %rcx
movzwl (%rax,%rcx,2), %edi
callq 0xfab0
vcvttss2si %xmm0, %eax
movl %eax, -0x4(%rbp)
jmp 0xf997
movq -0x10(%rbp), %rax
cmpq $0x2, 0x30(%rax)
je 0xf917
leaq 0x64265(%rip), %rdi # 0x73b62
movl $0xa39, %esi # imm = 0xA39
leaq 0x642b8(%rip), %rdx # 0x73bc1
leaq 0x644f7(%rip), %rcx # 0x73e07
movb $0x0, %al
callq 0xe270
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movslq -0x14(%rbp), %rcx
movzwl (%rax,%rcx,2), %edi
callq 0xfae0
vcvttss2si %xmm0, %eax
movl %eax, -0x4(%rbp)
jmp 0xf997
movq -0x10(%rbp), %rax
cmpq $0x4, 0x30(%rax)
je 0xf964
leaq 0x64218(%rip), %rdi # 0x73b62
movl $0xa3e, %esi # imm = 0xA3E
leaq 0x6426b(%rip), %rdx # 0x73bc1
leaq 0x64441(%rip), %rcx # 0x73d9e
movb $0x0, %al
callq 0xe270
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movslq -0x14(%rbp), %rcx
vcvttss2si (%rax,%rcx,4), %eax
movl %eax, -0x4(%rbp)
jmp 0xf997
leaq 0x641de(%rip), %rdi # 0x73b62
movl $0xa43, %esi # imm = 0xA43
leaq 0x6442d(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
| ggml_get_i32_1d:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov rdi, [rbp+var_10]
call _ggml_is_contiguous
test al, 1
jnz short loc_F79F
lea rdi, [rbp+var_40]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rbp+var_10]
movsxd rsi, [rbp+var_14]
lea rdx, [rbp+var_40]
lea rcx, [rbp+var_40]
add rcx, 8
lea r8, [rbp+var_40]
add r8, 10h
lea r9, [rbp+var_40]
add r9, 18h
call _ggml_unravel_index
mov rdi, [rbp+var_10]
mov rax, [rbp+var_40]
mov esi, eax
mov rax, [rbp+var_38]
mov edx, eax
mov rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_28]
mov r8d, eax
call _ggml_get_i32_nd
mov [rbp+var_4], eax
jmp loc_F997
loc_F79F:
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_48], rax
sub rax, 1Eh; switch 31 cases
ja def_F7C5; jumptable 000000000000F7C5 default case, cases 2-23,27-29
mov rax, [rbp+var_48]
lea rcx, jpt_F7C5
movsxd rax, ds:(jpt_F7C5 - 730F8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_F7C7:
mov rax, [rbp+var_10]; jumptable 000000000000F7C5 case 24
cmp qword ptr [rax+30h], 1
jz short loc_F7F3
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0A25h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo; "tensor->nb[0] == sizeof(int8_t)"
mov al, 0
call _ggml_abort
loc_F7F3:
mov rax, [rbp+var_10]
mov rax, [rax+0F8h]
movsxd rcx, [rbp+var_14]
movsx eax, byte ptr [rax+rcx]
mov [rbp+var_4], eax
jmp loc_F997
loc_F80E:
mov rax, [rbp+var_10]; jumptable 000000000000F7C5 case 25
cmp qword ptr [rax+30h], 2
jz short loc_F83A
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0A2Ah
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_0; "tensor->nb[0] == sizeof(int16_t)"
mov al, 0
call _ggml_abort
loc_F83A:
mov rax, [rbp+var_10]
mov rax, [rax+0F8h]
movsxd rcx, [rbp+var_14]
movsx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_F997
loc_F855:
mov rax, [rbp+var_10]; jumptable 000000000000F7C5 case 26
cmp qword ptr [rax+30h], 4
jz short loc_F881
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0A2Fh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_1; "tensor->nb[0] == sizeof(int32_t)"
mov al, 0
call _ggml_abort
loc_F881:
mov rax, [rbp+var_10]
mov rax, [rax+0F8h]
movsxd rcx, [rbp+var_14]
mov eax, [rax+rcx*4]
mov [rbp+var_4], eax
jmp loc_F997
loc_F89B:
mov rax, [rbp+var_10]; jumptable 000000000000F7C5 case 1
cmp qword ptr [rax+30h], 2
jz short loc_F8C7
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0A34h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_2; "tensor->nb[0] == sizeof(ggml_fp16_t)"
mov al, 0
call _ggml_abort
loc_F8C7:
mov rax, [rbp+var_10]
mov rax, [rax+0F8h]
movsxd rcx, [rbp+var_14]
movzx edi, word ptr [rax+rcx*2]
call ggml_lookup_fp16_to_fp32
vcvttss2si eax, xmm0
mov [rbp+var_4], eax
jmp loc_F997
loc_F8EB:
mov rax, [rbp+var_10]; jumptable 000000000000F7C5 case 30
cmp qword ptr [rax+30h], 2
jz short loc_F917
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0A39h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_4; "tensor->nb[0] == sizeof(ggml_bf16_t)"
mov al, 0
call _ggml_abort
loc_F917:
mov rax, [rbp+var_10]
mov rax, [rax+0F8h]
movsxd rcx, [rbp+var_14]
movzx edi, word ptr [rax+rcx*2]
call ggml_compute_bf16_to_fp32
vcvttss2si eax, xmm0
mov [rbp+var_4], eax
jmp short loc_F997
loc_F938:
mov rax, [rbp+var_10]; jumptable 000000000000F7C5 case 0
cmp qword ptr [rax+30h], 4
jz short loc_F964
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0A3Eh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_3; "tensor->nb[0] == sizeof(float)"
mov al, 0
call _ggml_abort
loc_F964:
mov rax, [rbp+var_10]
mov rax, [rax+0F8h]
movsxd rcx, [rbp+var_14]
vcvttss2si eax, dword ptr [rax+rcx*4]
mov [rbp+var_4], eax
jmp short loc_F997
def_F7C5:
lea rdi, aWorkspaceLlm4b_0; jumptable 000000000000F7C5 default case, cases 2-23,27-29
mov esi, 0A43h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_F997:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long ggml_get_i32_1d(long long a1, int a2, __m128 _XMM0)
{
long long v8; // [rsp+10h] [rbp-40h] BYREF
long long v9; // [rsp+18h] [rbp-38h] BYREF
long long v10; // [rsp+20h] [rbp-30h] BYREF
long long v11; // [rsp+28h] [rbp-28h] BYREF
int v12; // [rsp+3Ch] [rbp-14h]
long long v13; // [rsp+40h] [rbp-10h]
unsigned int v14; // [rsp+4Ch] [rbp-4h]
v13 = a1;
v12 = a2;
if ( (ggml_is_contiguous(a1) & 1) != 0 )
{
switch ( *(_DWORD *)v13 )
{
case 0:
if ( *(_QWORD *)(v13 + 48) != 4LL )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2622LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(float)");
_RAX = *(_QWORD *)(v13 + 248);
_RCX = v12;
__asm { vcvttss2si eax, dword ptr [rax+rcx*4] }
v14 = _RAX;
break;
case 1:
if ( *(_QWORD *)(v13 + 48) != 2LL )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2612LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(ggml_fp16_t)");
*(double *)_XMM0.m128_u64 = ggml_lookup_fp16_to_fp32(*(unsigned __int16 *)(*(_QWORD *)(v13 + 248) + 2LL * v12));
__asm { vcvttss2si eax, xmm0 }
v14 = _EAX;
break;
case 0x18:
if ( *(_QWORD *)(v13 + 48) != 1LL )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2597LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(int8_t)");
v14 = *(char *)(*(_QWORD *)(v13 + 248) + v12);
break;
case 0x19:
if ( *(_QWORD *)(v13 + 48) != 2LL )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2602LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(int16_t)");
v14 = *(__int16 *)(*(_QWORD *)(v13 + 248) + 2LL * v12);
break;
case 0x1A:
if ( *(_QWORD *)(v13 + 48) != 4LL )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2607LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(int32_t)");
v14 = *(_DWORD *)(*(_QWORD *)(v13 + 248) + 4LL * v12);
break;
case 0x1E:
if ( *(_QWORD *)(v13 + 48) != 2LL )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2617LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(ggml_bf16_t)");
*(double *)_XMM0.m128_u64 = ggml_compute_bf16_to_fp32(*(unsigned __int16 *)(*(_QWORD *)(v13 + 248) + 2LL * v12));
__asm { vcvttss2si eax, xmm0 }
v14 = _EAX;
break;
default:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2627LL,
"fatal error");
break;
}
}
else
{
memset(&v8, 0LL, 32LL);
ggml_unravel_index(v13, v12, &v8, &v9, &v10, &v11);
return (unsigned int)ggml_get_i32_nd(v13, (unsigned int)v8, (unsigned int)v9, (unsigned int)v10, (unsigned int)v11);
}
return v14;
}
| ggml_get_i32_1d:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010d280
TEST AL,0x1
JNZ 0x0010f79f
LEA RDI,[RBP + -0x40]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x0010d560
MOV RDI,qword ptr [RBP + -0x10]
MOVSXD RSI,dword ptr [RBP + -0x14]
LEA RDX,[RBP + -0x40]
LEA RCX,[RBP + -0x40]
ADD RCX,0x8
LEA R8,[RBP + -0x40]
ADD R8,0x10
LEA R9,[RBP + -0x40]
ADD R9,0x18
CALL 0x0010d850
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x40]
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV R8D,EAX
CALL 0x0010d810
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010f997
LAB_0010f79f:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
SUB RAX,0x1e
JA 0x0010f97d
MOV RAX,qword ptr [RBP + -0x48]
LEA RCX,[0x1730f8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_18:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x30],0x1
JZ 0x0010f7f3
LEA RDI,[0x173b62]
MOV ESI,0xa25
LEA RDX,[0x173bc1]
LEA RCX,[0x173cd7]
MOV AL,0x0
CALL 0x0010e270
LAB_0010f7f3:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RBP + -0x14]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010f997
caseD_19:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x30],0x2
JZ 0x0010f83a
LEA RDI,[0x173b62]
MOV ESI,0xa2a
LEA RDX,[0x173bc1]
LEA RCX,[0x173d37]
MOV AL,0x0
CALL 0x0010e270
LAB_0010f83a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RBP + -0x14]
MOVSX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010f997
caseD_1a:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x30],0x4
JZ 0x0010f881
LEA RDI,[0x173b62]
MOV ESI,0xa2f
LEA RDX,[0x173bc1]
LEA RCX,[0x173d58]
MOV AL,0x0
CALL 0x0010e270
LAB_0010f881:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RBP + -0x14]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010f997
caseD_1:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x30],0x2
JZ 0x0010f8c7
LEA RDI,[0x173b62]
MOV ESI,0xa34
LEA RDX,[0x173bc1]
LEA RCX,[0x173d79]
MOV AL,0x0
CALL 0x0010e270
LAB_0010f8c7:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RBP + -0x14]
MOVZX EDI,word ptr [RAX + RCX*0x2]
CALL 0x0010fab0
VCVTTSS2SI EAX,XMM0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010f997
caseD_1e:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x30],0x2
JZ 0x0010f917
LEA RDI,[0x173b62]
MOV ESI,0xa39
LEA RDX,[0x173bc1]
LEA RCX,[0x173e07]
MOV AL,0x0
CALL 0x0010e270
LAB_0010f917:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RBP + -0x14]
MOVZX EDI,word ptr [RAX + RCX*0x2]
CALL 0x0010fae0
VCVTTSS2SI EAX,XMM0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010f997
caseD_0:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x30],0x4
JZ 0x0010f964
LEA RDI,[0x173b62]
MOV ESI,0xa3e
LEA RDX,[0x173bc1]
LEA RCX,[0x173d9e]
MOV AL,0x0
CALL 0x0010e270
LAB_0010f964:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RBP + -0x14]
VCVTTSS2SI EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010f997
caseD_2:
LEA RDI,[0x173b62]
MOV ESI,0xa43
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_0010f997:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int ggml_get_i32_1d(int4 *param_1,int param_2)
{
ulong uVar1;
float fVar2;
ulong local_48;
ulong local_40;
ulong local_38;
ulong local_30 [2];
int local_1c;
int4 *local_18;
int local_c;
local_1c = param_2;
local_18 = param_1;
uVar1 = ggml_is_contiguous(param_1);
if ((uVar1 & 1) == 0) {
memset(&local_48,0,0x20);
ggml_unravel_index(local_18,(long)local_1c,&local_48,&local_40,&local_38,local_30);
local_c = ggml_get_i32_nd(local_18,local_48 & 0xffffffff,local_40 & 0xffffffff,
local_38 & 0xffffffff,local_30[0] & 0xffffffff);
}
else {
switch(*local_18) {
case 0:
if (*(long *)(local_18 + 0xc) != 4) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0xa3e,"GGML_ASSERT(%s) failed","tensor->nb[0] == sizeof(float)");
}
local_c = (int)*(float *)(*(long *)(local_18 + 0x3e) + (long)local_1c * 4);
break;
case 1:
if (*(long *)(local_18 + 0xc) != 2) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0xa34,"GGML_ASSERT(%s) failed","tensor->nb[0] == sizeof(ggml_fp16_t)");
}
fVar2 = (float)ggml_lookup_fp16_to_fp32
(*(int2 *)(*(long *)(local_18 + 0x3e) + (long)local_1c * 2));
local_c = (int)fVar2;
break;
default:
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0xa43,"fatal error");
break;
case 0x18:
if (*(long *)(local_18 + 0xc) != 1) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0xa25,"GGML_ASSERT(%s) failed","tensor->nb[0] == sizeof(int8_t)");
}
local_c = (int)*(char *)(*(long *)(local_18 + 0x3e) + (long)local_1c);
break;
case 0x19:
if (*(long *)(local_18 + 0xc) != 2) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0xa2a,"GGML_ASSERT(%s) failed","tensor->nb[0] == sizeof(int16_t)");
}
local_c = (int)*(short *)(*(long *)(local_18 + 0x3e) + (long)local_1c * 2);
break;
case 0x1a:
if (*(long *)(local_18 + 0xc) != 4) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0xa2f,"GGML_ASSERT(%s) failed","tensor->nb[0] == sizeof(int32_t)");
}
local_c = *(int *)(*(long *)(local_18 + 0x3e) + (long)local_1c * 4);
break;
case 0x1e:
if (*(long *)(local_18 + 0xc) != 2) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0xa39,"GGML_ASSERT(%s) failed","tensor->nb[0] == sizeof(ggml_bf16_t)");
}
fVar2 = (float)ggml_compute_bf16_to_fp32
(*(int2 *)(*(long *)(local_18 + 0x3e) + (long)local_1c * 2));
local_c = (int)fVar2;
}
}
return local_c;
}
| |
39,306 | ggml_get_i32_1d | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | int32_t ggml_get_i32_1d(const struct ggml_tensor * tensor, int i) {
if (!ggml_is_contiguous(tensor)) {
int64_t id[4] = { 0, 0, 0, 0 };
ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]);
return ggml_get_i32_nd(tensor, id[0], id[1], id[2], id[3]);
}
switch (tensor->type) {
case GGML_TYPE_I8:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int8_t));
return ((int8_t *)(tensor->data))[i];
}
case GGML_TYPE_I16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int16_t));
return ((int16_t *)(tensor->data))[i];
}
case GGML_TYPE_I32:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int32_t));
return ((int32_t *)(tensor->data))[i];
}
case GGML_TYPE_F16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(ggml_fp16_t));
return GGML_FP16_TO_FP32(((ggml_fp16_t *)(tensor->data))[i]);
}
case GGML_TYPE_BF16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(ggml_bf16_t));
return GGML_BF16_TO_FP32(((ggml_bf16_t *)(tensor->data))[i]);
}
case GGML_TYPE_F32:
{
GGML_ASSERT(tensor->nb[0] == sizeof(float));
return ((float *)(tensor->data))[i];
}
default:
{
GGML_ABORT("fatal error");
}
}
} | O3 | c | ggml_get_i32_1d:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x81a0
testb %al, %al
je 0x9f17
movl (%rbx), %eax
leal -0x18(%rax), %ecx
cmpl $0x6, %ecx
ja 0x9f63
leaq 0x2c2c5(%rip), %rax # 0x361b8
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpq $0x1, 0x30(%rbx)
jne 0xa032
movq 0xf8(%rbx), %rax
movslq %ebp, %rcx
movsbl (%rax,%rcx), %eax
jmp 0x9f5a
vxorps %xmm0, %xmm0, %xmm0
leaq 0x8(%rsp), %rcx
vmovups %ymm0, -0x8(%rcx)
movslq %ebp, %rsi
leaq 0x10(%rsp), %r8
leaq 0x18(%rsp), %r9
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rdx
vzeroupper
callq 0x84b0
movl (%r14), %esi
movl 0x8(%r14), %edx
movl 0x10(%r14), %ecx
movl 0x18(%r14), %r8d
movq %rbx, %rdi
callq 0x8490
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
testl %eax, %eax
je 0x9ff9
cmpl $0x1, %eax
jne 0xa018
cmpq $0x2, 0x30(%rbx)
jne 0xa0c1
movq 0xf8(%rbx), %rax
movslq %ebp, %rcx
movzwl (%rax,%rcx,2), %eax
movq 0x3efd4(%rip), %rcx # 0x48f68
vcvttss2si (%rcx,%rax,4), %eax
jmp 0x9f5a
cmpq $0x2, 0x30(%rbx)
jne 0xa051
movq 0xf8(%rbx), %rax
movslq %ebp, %rcx
movswl (%rax,%rcx,2), %eax
jmp 0x9f5a
cmpq $0x4, 0x30(%rbx)
jne 0xa06d
movq 0xf8(%rbx), %rax
movslq %ebp, %rcx
movl (%rax,%rcx,4), %eax
jmp 0x9f5a
cmpq $0x2, 0x30(%rbx)
jne 0xa089
movq 0xf8(%rbx), %rax
movslq %ebp, %rcx
movzwl (%rax,%rcx,2), %eax
shll $0x10, %eax
vmovd %eax, %xmm0
vcvttss2si %xmm0, %eax
jmp 0x9f5a
cmpq $0x4, 0x30(%rbx)
jne 0xa0a5
movq 0xf8(%rbx), %rax
movslq %ebp, %rcx
vcvttss2si (%rax,%rcx,4), %eax
jmp 0x9f5a
leaq 0x2c84b(%rip), %rdi # 0x3686a
leaq 0x2ca9f(%rip), %rdx # 0x36ac5
movl $0xa43, %esi # imm = 0xA43
xorl %eax, %eax
callq 0x89c0
leaq 0x2c831(%rip), %rdi # 0x3686a
leaq 0x2c889(%rip), %rdx # 0x368c9
leaq 0x2c998(%rip), %rcx # 0x369df
movl $0xa25, %esi # imm = 0xA25
jmp 0xa0db
leaq 0x2c812(%rip), %rdi # 0x3686a
leaq 0x2c86a(%rip), %rdx # 0x368c9
leaq 0x2c9d9(%rip), %rcx # 0x36a3f
movl $0xa2a, %esi # imm = 0xA2A
jmp 0xa0db
leaq 0x2c7f6(%rip), %rdi # 0x3686a
leaq 0x2c84e(%rip), %rdx # 0x368c9
leaq 0x2c9de(%rip), %rcx # 0x36a60
movl $0xa2f, %esi # imm = 0xA2F
jmp 0xa0db
leaq 0x2c7da(%rip), %rdi # 0x3686a
leaq 0x2c832(%rip), %rdx # 0x368c9
leaq 0x2ca71(%rip), %rcx # 0x36b0f
movl $0xa39, %esi # imm = 0xA39
jmp 0xa0db
leaq 0x2c7be(%rip), %rdi # 0x3686a
leaq 0x2c816(%rip), %rdx # 0x368c9
leaq 0x2c9ec(%rip), %rcx # 0x36aa6
movl $0xa3e, %esi # imm = 0xA3E
jmp 0xa0db
leaq 0x2c7a2(%rip), %rdi # 0x3686a
leaq 0x2c7fa(%rip), %rdx # 0x368c9
leaq 0x2c9ab(%rip), %rcx # 0x36a81
movl $0xa34, %esi # imm = 0xA34
xorl %eax, %eax
callq 0x89c0
| ggml_get_i32_1d:
push rbp
push r14
push rbx
sub rsp, 20h
mov ebp, esi
mov rbx, rdi
call _ggml_is_contiguous
test al, al
jz short loc_9F17
mov eax, [rbx]
lea ecx, [rax-18h]; switch 7 cases
cmp ecx, 6
ja short def_9EFA; jumptable 0000000000009EFA default case
lea rax, jpt_9EFA
movsxd rcx, ds:(jpt_9EFA - 361B8h)[rax+rcx*4]
add rcx, rax
jmp rcx; switch jump
loc_9EFC:
cmp qword ptr [rbx+30h], 1; jumptable 0000000000009EFA case 24
jnz loc_A032
mov rax, [rbx+0F8h]
movsxd rcx, ebp
movsx eax, byte ptr [rax+rcx]
jmp short loc_9F5A
loc_9F17:
vxorps xmm0, xmm0, xmm0
lea rcx, [rsp+38h+var_30]
vmovups ymmword ptr [rcx-8], ymm0
movsxd rsi, ebp
lea r8, [rsp+38h+var_28]
lea r9, [rsp+38h+var_20]
mov r14, rsp
mov rdi, rbx
mov rdx, r14
vzeroupper
call _ggml_unravel_index
mov esi, [r14]
mov edx, [r14+8]
mov ecx, [r14+10h]
mov r8d, [r14+18h]
mov rdi, rbx
call _ggml_get_i32_nd
loc_9F5A:
add rsp, 20h
pop rbx
pop r14
pop rbp
retn
def_9EFA:
test eax, eax; jumptable 0000000000009EFA default case
jz loc_9FF9
cmp eax, 1
jnz loc_A018; jumptable 0000000000009EFA cases 27-29
cmp qword ptr [rbx+30h], 2
jnz loc_A0C1
mov rax, [rbx+0F8h]
movsxd rcx, ebp
movzx eax, word ptr [rax+rcx*2]
mov rcx, cs:ggml_table_f32_f16_ptr
vcvttss2si eax, dword ptr [rcx+rax*4]
jmp short loc_9F5A
loc_9F9B:
cmp qword ptr [rbx+30h], 2; jumptable 0000000000009EFA case 25
jnz loc_A051
mov rax, [rbx+0F8h]
movsxd rcx, ebp
movsx eax, word ptr [rax+rcx*2]
jmp short loc_9F5A
loc_9FB6:
cmp qword ptr [rbx+30h], 4; jumptable 0000000000009EFA case 26
jnz loc_A06D
mov rax, [rbx+0F8h]
movsxd rcx, ebp
mov eax, [rax+rcx*4]
jmp short loc_9F5A
loc_9FD0:
cmp qword ptr [rbx+30h], 2; jumptable 0000000000009EFA case 30
jnz loc_A089
mov rax, [rbx+0F8h]
movsxd rcx, ebp
movzx eax, word ptr [rax+rcx*2]
shl eax, 10h
vmovd xmm0, eax
vcvttss2si eax, xmm0
jmp loc_9F5A
loc_9FF9:
cmp qword ptr [rbx+30h], 4
jnz loc_A0A5
mov rax, [rbx+0F8h]
movsxd rcx, ebp
vcvttss2si eax, dword ptr [rax+rcx*4]
jmp loc_9F5A
loc_A018:
lea rdi, aWorkspaceLlm4b_0; jumptable 0000000000009EFA cases 27-29
lea rdx, aFatalError; "fatal error"
mov esi, 0A43h
xor eax, eax
call _ggml_abort
loc_A032:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo; "tensor->nb[0] == sizeof(int8_t)"
mov esi, 0A25h
jmp loc_A0DB
loc_A051:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_0; "tensor->nb[0] == sizeof(int16_t)"
mov esi, 0A2Ah
jmp short loc_A0DB
loc_A06D:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_1; "tensor->nb[0] == sizeof(int32_t)"
mov esi, 0A2Fh
jmp short loc_A0DB
loc_A089:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_4; "tensor->nb[0] == sizeof(ggml_bf16_t)"
mov esi, 0A39h
jmp short loc_A0DB
loc_A0A5:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_3; "tensor->nb[0] == sizeof(float)"
mov esi, 0A3Eh
jmp short loc_A0DB
loc_A0C1:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_2; "tensor->nb[0] == sizeof(ggml_fp16_t)"
mov esi, 0A34h
loc_A0DB:
xor eax, eax
call _ggml_abort
| int ggml_get_i32_1d(int *a1, int a2, __m128 _XMM0)
{
int v4; // eax
int result; // eax
unsigned int v14; // [rsp+0h] [rbp-38h] BYREF
unsigned int v15; // [rsp+8h] [rbp-30h] BYREF
unsigned int v16; // [rsp+10h] [rbp-28h] BYREF
_DWORD v17[8]; // [rsp+18h] [rbp-20h] BYREF
if ( (unsigned __int8)ggml_is_contiguous() )
{
v4 = *a1;
switch ( *a1 )
{
case 24:
if ( *((_QWORD *)a1 + 6) != 1LL )
goto LABEL_19;
return *(char *)(*((_QWORD *)a1 + 31) + a2);
case 25:
if ( *((_QWORD *)a1 + 6) != 2LL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2602LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(int16_t)");
goto LABEL_25;
}
return *(__int16 *)(*((_QWORD *)a1 + 31) + 2LL * a2);
case 26:
if ( *((_QWORD *)a1 + 6) != 4LL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2607LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(int32_t)");
goto LABEL_25;
}
return *(_DWORD *)(*((_QWORD *)a1 + 31) + 4LL * a2);
case 27:
case 28:
case 29:
goto LABEL_18;
case 30:
if ( *((_QWORD *)a1 + 6) == 2LL )
{
_EAX = *(unsigned __int16 *)(*((_QWORD *)a1 + 31) + 2LL * a2) << 16;
__asm
{
vmovd xmm0, eax
vcvttss2si eax, xmm0
}
return result;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2617LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(ggml_bf16_t)");
goto LABEL_25;
default:
if ( v4 )
{
if ( v4 == 1 )
{
if ( *((_QWORD *)a1 + 6) == 2LL )
{
_RAX = *(unsigned __int16 *)(*((_QWORD *)a1 + 31) + 2LL * a2);
_RCX = &ggml_table_f32_f16;
__asm { vcvttss2si eax, dword ptr [rcx+rax*4] }
return result;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2612LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(ggml_fp16_t)");
}
else
{
LABEL_18:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2627LL,
"fatal error");
LABEL_19:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2597LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(int8_t)");
}
}
else
{
if ( *((_QWORD *)a1 + 6) == 4LL )
{
_RAX = *((_QWORD *)a1 + 31);
_RCX = a2;
__asm { vcvttss2si eax, dword ptr [rax+rcx*4] }
return result;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
2622LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(float)");
}
LABEL_25:
result = ggml_get_i32_nd();
break;
}
}
else
{
__asm { vxorps xmm0, xmm0, xmm0 }
_RCX = &v15;
__asm
{
vmovups ymmword ptr [rcx-8], ymm0
vzeroupper
}
ggml_unravel_index(a1, a2, &v14, &v15, &v16, v17, *(double *)&_XMM0);
return ggml_get_i32_nd(a1, v14, v15, v16, v17[0]);
}
return result;
}
| ggml_get_i32_1d:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV EBP,ESI
MOV RBX,RDI
CALL 0x001081a0
TEST AL,AL
JZ 0x00109f17
MOV EAX,dword ptr [RBX]
LEA ECX,[RAX + -0x18]
CMP ECX,0x6
JA 0x00109f63
LEA RAX,[0x1361b8]
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_18:
CMP qword ptr [RBX + 0x30],0x1
JNZ 0x0010a032
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,EBP
MOVSX EAX,byte ptr [RAX + RCX*0x1]
JMP 0x00109f5a
LAB_00109f17:
VXORPS XMM0,XMM0,XMM0
LEA RCX,[RSP + 0x8]
VMOVUPS ymmword ptr [RCX + -0x8],YMM0
MOVSXD RSI,EBP
LEA R8,[RSP + 0x10]
LEA R9,[RSP + 0x18]
MOV R14,RSP
MOV RDI,RBX
MOV RDX,R14
VZEROUPPER
CALL 0x001084b0
MOV ESI,dword ptr [R14]
MOV EDX,dword ptr [R14 + 0x8]
MOV ECX,dword ptr [R14 + 0x10]
MOV R8D,dword ptr [R14 + 0x18]
MOV RDI,RBX
CALL 0x00108490
LAB_00109f5a:
ADD RSP,0x20
POP RBX
POP R14
POP RBP
RET
default:
TEST EAX,EAX
JZ 0x00109ff9
CMP EAX,0x1
JNZ 0x0010a018
CMP qword ptr [RBX + 0x30],0x2
JNZ 0x0010a0c1
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,EBP
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [0x00148f68]
VCVTTSS2SI EAX,dword ptr [RCX + RAX*0x4]
JMP 0x00109f5a
caseD_19:
CMP qword ptr [RBX + 0x30],0x2
JNZ 0x0010a051
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,EBP
MOVSX EAX,word ptr [RAX + RCX*0x2]
JMP 0x00109f5a
caseD_1a:
CMP qword ptr [RBX + 0x30],0x4
JNZ 0x0010a06d
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,EBP
MOV EAX,dword ptr [RAX + RCX*0x4]
JMP 0x00109f5a
caseD_1e:
CMP qword ptr [RBX + 0x30],0x2
JNZ 0x0010a089
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,EBP
MOVZX EAX,word ptr [RAX + RCX*0x2]
SHL EAX,0x10
VMOVD XMM0,EAX
VCVTTSS2SI EAX,XMM0
JMP 0x00109f5a
LAB_00109ff9:
CMP qword ptr [RBX + 0x30],0x4
JNZ 0x0010a0a5
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,EBP
VCVTTSS2SI EAX,dword ptr [RAX + RCX*0x4]
JMP 0x00109f5a
caseD_1b:
LEA RDI,[0x13686a]
LEA RDX,[0x136ac5]
MOV ESI,0xa43
XOR EAX,EAX
CALL 0x001089c0
LAB_0010a032:
LEA RDI,[0x13686a]
LEA RDX,[0x1368c9]
LEA RCX,[0x1369df]
MOV ESI,0xa25
JMP 0x0010a0db
LAB_0010a051:
LEA RDI,[0x13686a]
LEA RDX,[0x1368c9]
LEA RCX,[0x136a3f]
MOV ESI,0xa2a
JMP 0x0010a0db
LAB_0010a06d:
LEA RDI,[0x13686a]
LEA RDX,[0x1368c9]
LEA RCX,[0x136a60]
MOV ESI,0xa2f
JMP 0x0010a0db
LAB_0010a089:
LEA RDI,[0x13686a]
LEA RDX,[0x1368c9]
LEA RCX,[0x136b0f]
MOV ESI,0xa39
JMP 0x0010a0db
LAB_0010a0a5:
LEA RDI,[0x13686a]
LEA RDX,[0x1368c9]
LEA RCX,[0x136aa6]
MOV ESI,0xa3e
JMP 0x0010a0db
LAB_0010a0c1:
LEA RDI,[0x13686a]
LEA RDX,[0x1368c9]
LEA RCX,[0x136a81]
MOV ESI,0xa34
LAB_0010a0db:
XOR EAX,EAX
CALL 0x001089c0
|
ulong ggml_get_i32_1d(int *param_1,int param_2)
{
int iVar1;
char cVar2;
ulong uVar3;
char *pcVar4;
int8 uVar5;
ulong local_38;
ulong uStack_30;
ulong uStack_28;
ulong uStack_20;
cVar2 = ggml_is_contiguous();
if (cVar2 == '\0') {
local_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
ggml_unravel_index(param_1,(long)param_2,&local_38,&uStack_30,&uStack_28,&uStack_20);
uVar3 = ggml_get_i32_nd(param_1,local_38 & 0xffffffff,uStack_30 & 0xffffffff,
uStack_28 & 0xffffffff,uStack_20 & 0xffffffff);
}
else {
iVar1 = *param_1;
switch(iVar1) {
case 0x18:
if (*(long *)(param_1 + 0xc) != 1) {
pcVar4 = "tensor->nb[0] == sizeof(int8_t)";
uVar5 = 0xa25;
LAB_0010a0db:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,uVar5,"GGML_ASSERT(%s) failed",pcVar4);
}
uVar3 = (ulong)(uint)(int)*(char *)(*(long *)(param_1 + 0x3e) + (long)param_2);
break;
case 0x19:
if (*(long *)(param_1 + 0xc) != 2) {
pcVar4 = "tensor->nb[0] == sizeof(int16_t)";
uVar5 = 0xa2a;
goto LAB_0010a0db;
}
uVar3 = (ulong)(uint)(int)*(short *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 2);
break;
case 0x1a:
if (*(long *)(param_1 + 0xc) != 4) {
pcVar4 = "tensor->nb[0] == sizeof(int32_t)";
uVar5 = 0xa2f;
goto LAB_0010a0db;
}
uVar3 = (ulong)*(uint *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 4);
break;
case 0x1b:
case 0x1c:
case 0x1d:
switchD_00109efa_caseD_1b:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0xa43,"fatal error");
case 0x1e:
if (*(long *)(param_1 + 0xc) != 2) {
pcVar4 = "tensor->nb[0] == sizeof(ggml_bf16_t)";
uVar5 = 0xa39;
goto LAB_0010a0db;
}
uVar3 = (ulong)(uint)(int)(float)((uint)*(ushort *)
(*(long *)(param_1 + 0x3e) + (long)param_2 * 2) <<
0x10);
break;
default:
if (iVar1 == 0) {
if (*(long *)(param_1 + 0xc) != 4) {
pcVar4 = "tensor->nb[0] == sizeof(float)";
uVar5 = 0xa3e;
goto LAB_0010a0db;
}
uVar3 = CONCAT44((int)((ulong)*(long *)(param_1 + 0x3e) >> 0x20),
(int)*(float *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 4));
}
else {
if (iVar1 != 1) goto switchD_00109efa_caseD_1b;
if (*(long *)(param_1 + 0xc) != 2) {
pcVar4 = "tensor->nb[0] == sizeof(ggml_fp16_t)";
uVar5 = 0xa34;
goto LAB_0010a0db;
}
uVar3 = (ulong)(uint)(int)*(float *)(PTR_ggml_table_f32_f16_00148f68 +
(ulong)*(ushort *)
(*(long *)(param_1 + 0x3e) + (long)param_2 * 2)
* 4);
}
}
}
return uVar3;
}
| |
39,307 | LEX::handle_list_of_derived(TABLE_LIST*, unsigned int) | eloqsql/sql/sql_lex.h | bool handle_list_of_derived(TABLE_LIST *table_list, uint phases)
{
for (TABLE_LIST *tl= table_list; tl; tl= tl->next_local)
{
if (tl->is_view_or_derived() && tl->handle_derived(this, phases))
return true;
}
return false;
} | O0 | c | LEX::handle_list_of_derived(TABLE_LIST*, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x57cc54
movq -0x28(%rbp), %rdi
callq 0x56a330
testb $0x1, %al
jne 0x57cc29
jmp 0x57cc45
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %edx
callq 0x6dd760
testb $0x1, %al
jne 0x57cc3f
jmp 0x57cc45
movb $0x1, -0x1(%rbp)
jmp 0x57cc58
jmp 0x57cc47
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x57cc13
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN3LEX22handle_list_of_derivedEP10TABLE_LISTj:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
loc_57CC13:
cmp [rbp+var_28], 0
jz short loc_57CC54
mov rdi, [rbp+var_28]; this
call _ZNK10TABLE_LIST18is_view_or_derivedEv; TABLE_LIST::is_view_or_derived(void)
test al, 1
jnz short loc_57CC29
jmp short loc_57CC45
loc_57CC29:
mov rsi, [rbp+var_30]; LEX *
mov rdi, [rbp+var_28]; this
mov edx, [rbp+var_1C]; unsigned int
call _ZN10TABLE_LIST14handle_derivedEP3LEXj; TABLE_LIST::handle_derived(LEX *,uint)
test al, 1
jnz short loc_57CC3F
jmp short loc_57CC45
loc_57CC3F:
mov [rbp+var_1], 1
jmp short loc_57CC58
loc_57CC45:
jmp short $+2
loc_57CC47:
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_28], rax
jmp short loc_57CC13
loc_57CC54:
mov [rbp+var_1], 0
loc_57CC58:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
| char LEX::handle_list_of_derived(LEX *this, TABLE_LIST *a2, unsigned int a3)
{
while ( a2 )
{
if ( TABLE_LIST::is_view_or_derived(a2) && (TABLE_LIST::handle_derived(a2, this, a3) & 1) != 0 )
return 1;
a2 = *(TABLE_LIST **)a2;
}
return 0;
}
| __cxx_global_var_init.11:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x1f05184]
MOV ESI,0x20
CALL 0x0058cc30
POP RBP
RET
|
void __cxx_global_var_init_11(void)
{
time_round_mode_t::time_round_mode_t((time_round_mode_t *)&TIME_FRAC_TRUNCATE,0x20);
return;
}
| |
39,308 | maria_lock_database | eloqsql/storage/maria/ma_locking.c | int maria_lock_database(MARIA_HA *info, int lock_type)
{
int error;
uint count;
MARIA_SHARE *share= info->s;
DBUG_ENTER("maria_lock_database");
DBUG_PRINT("enter",("lock_type: %d old lock %d r_locks: %u w_locks: %u "
"global_changed: %d open_count: %u name: '%s'",
lock_type, info->lock_type, share->r_locks,
share->w_locks,
share->global_changed, share->state.open_count,
share->index_file_name.str));
if (share->options & HA_OPTION_READ_ONLY_DATA ||
info->lock_type == lock_type)
DBUG_RETURN(0);
if (lock_type == F_EXTRA_LCK) /* Used by TMP tables */
{
++share->w_locks;
++share->tot_locks;
info->lock_type= lock_type;
DBUG_RETURN(0);
}
error=0;
if (!info->intern_lock_locked)
mysql_mutex_lock(&share->intern_lock);
if (share->kfile.file >= 0) /* May only be false on windows */
{
switch (lock_type) {
case F_UNLCK:
maria_ftparser_call_deinitializer(info);
if (info->lock_type == F_RDLCK)
{
count= --share->r_locks;
if (share->lock_restore_status)
(*share->lock_restore_status)(info);
}
else
{
count= --share->w_locks;
if (share->lock.update_status)
_ma_update_status_with_lock(info);
}
--share->tot_locks;
if (info->lock_type == F_WRLCK && !share->w_locks)
{
/* pages of transactional tables get flushed at Checkpoint */
if (!share->base.born_transactional && !share->temporary &&
_ma_flush_table_files(info,
share->delay_key_write ? MARIA_FLUSH_DATA :
MARIA_FLUSH_DATA | MARIA_FLUSH_INDEX,
FLUSH_KEEP, FLUSH_KEEP))
error= my_errno;
}
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
{
if (end_io_cache(&info->rec_cache))
{
error= my_errno;
_ma_set_fatal_error(info, error);
}
}
if (!count)
{
DBUG_PRINT("info",("changed: %u w_locks: %u",
(uint) share->changed, share->w_locks));
if (share->changed && !share->w_locks)
{
#ifdef HAVE_MMAP
if ((share->mmaped_length !=
share->state.state.data_file_length) &&
(share->nonmmaped_inserts > MAX_NONMAPPED_INSERTS))
{
if (share->lock_key_trees)
mysql_rwlock_wrlock(&share->mmap_lock);
_ma_remap_file(info, share->state.state.data_file_length);
share->nonmmaped_inserts= 0;
if (share->lock_key_trees)
mysql_rwlock_unlock(&share->mmap_lock);
}
#endif
#ifdef MARIA_EXTERNAL_LOCKING
share->state.process= share->last_process=share->this_process;
share->state.unique= info->last_unique= info->this_unique;
share->state.update_count= info->last_loop= ++info->this_loop;
#endif
/* transactional tables rather flush their state at Checkpoint */
if (!share->base.born_transactional)
{
if (_ma_state_info_write_sub(share->kfile.file, &share->state,
MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET))
error= my_errno;
else
{
/* A value of 0 means below means "state flushed" */
share->changed= 0;
}
}
if (maria_flush)
{
if (_ma_sync_table_files(info))
error= my_errno;
}
else
share->not_flushed=1;
if (error)
_ma_set_fatal_error(info, error);
}
}
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
info->lock_type= F_UNLCK;
break;
case F_RDLCK:
if (info->lock_type == F_WRLCK)
{
/*
Change RW to READONLY
mysqld does not turn write locks to read locks,
so we're never here in mysqld.
*/
share->w_locks--;
share->r_locks++;
info->lock_type=lock_type;
break;
}
#ifdef MARIA_EXTERNAL_LOCKING
if (!share->r_locks && !share->w_locks)
{
/* note that a transactional table should not do this */
if (_ma_state_info_read_dsk(share->kfile.file, &share->state))
{
error=my_errno;
break;
}
}
#endif
_ma_test_if_changed(info);
share->r_locks++;
share->tot_locks++;
info->lock_type=lock_type;
break;
case F_WRLCK:
if (info->lock_type == F_RDLCK)
{ /* Change READONLY to RW */
if (share->r_locks == 1)
{
share->r_locks--;
share->w_locks++;
info->lock_type=lock_type;
break;
}
}
#ifdef MARIA_EXTERNAL_LOCKING
if (!(share->options & HA_OPTION_READ_ONLY_DATA))
{
if (!share->w_locks)
{
if (!share->r_locks)
{
/*
Note that transactional tables should not do this.
If we enabled this code, we should make sure to skip it if
born_transactional is true. We should not test
now_transactional to decide if we can call
_ma_state_info_read_dsk(), because it can temporarily be 0
(TRUNCATE on a partitioned table) and thus it would make a state
modification below without mutex, confusing a concurrent
checkpoint running.
Even if this code was enabled only for non-transactional tables:
in scenario LOCK TABLE t1 WRITE; INSERT INTO t1; DELETE FROM t1;
state on disk read by DELETE is obsolete as it was not flushed
at the end of INSERT. MyISAM same. It however causes no issue as
maria_delete_all_rows() calls _ma_reset_status() thus is not
influenced by the obsolete read values.
*/
if (_ma_state_info_read_dsk(share->kfile.file, &share->state))
{
error=my_errno;
break;
}
}
}
}
#endif /* defined(MARIA_EXTERNAL_LOCKING) */
_ma_test_if_changed(info);
info->lock_type=lock_type;
info->invalidator=share->invalidator;
share->w_locks++;
share->tot_locks++;
break;
default:
DBUG_ASSERT(0);
break; /* Impossible */
}
}
#ifdef _WIN32
else
{
/*
Check for bad file descriptors if this table is part
of a merge union. Failing to capture this may cause
a crash on windows if the table is renamed and
later on referenced by the merge table.
*/
if( info->owned_by_merge && (info->s)->kfile.file < 0 )
{
error = HA_ERR_NO_SUCH_TABLE;
}
}
#endif
if (!info->intern_lock_locked)
mysql_mutex_unlock(&share->intern_lock);
DBUG_RETURN(error);
} | O3 | c | maria_lock_database:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %rbx
xorl %r15d, %r15d
testb $0x1, 0x722(%rbx)
jne 0x405c6
movl %esi, %r12d
movq %rdi, %r14
cmpl %esi, 0x664(%rdi)
je 0x405c6
cmpl $-0x1, %r12d
je 0x40415
cmpb $0x0, 0x680(%r14)
jne 0x403aa
leaq 0x8f0(%rbx), %rdi
cmpq $0x0, 0x930(%rbx)
jne 0x406c7
callq 0x2a1f0
xorl %r15d, %r15d
cmpl $0x0, 0x760(%rbx)
js 0x4059d
testl %r12d, %r12d
je 0x40464
cmpl $0x1, %r12d
je 0x40431
cmpl $0x2, %r12d
jne 0x4059d
movq %r14, %rdi
callq 0x5ebed
cmpl $0x0, 0x664(%r14)
je 0x404da
movl 0x7b0(%rbx), %r12d
decl %r12d
movl %r12d, 0x7b0(%rbx)
cmpq $0x0, 0x8b0(%rbx)
je 0x404fc
movq %r14, %rdi
callq 0x4108e
jmp 0x404fc
incl 0x7b0(%rbx)
incl 0x7b8(%rbx)
movl $0xffffffff, 0x664(%r14) # imm = 0xFFFFFFFF
jmp 0x405c6
cmpl $0x0, 0x664(%r14)
jne 0x40488
cmpl $0x1, 0x7b4(%rbx)
jne 0x40488
movl $0x0, 0x7b4(%rbx)
incl 0x7b0(%rbx)
movl $0x1, 0x664(%r14)
jmp 0x4059d
cmpl $0x1, 0x664(%r14)
jne 0x404b2
movq 0x7b0(%rbx), %xmm0
paddd 0xa0c52(%rip), %xmm0 # 0xe10d0
movq %xmm0, 0x7b0(%rbx)
jmp 0x404ca
movl $0x1, 0x664(%r14)
movq 0x6f0(%rbx), %rax
movq %rax, 0x3e0(%r14)
incl 0x7b0(%rbx)
incl 0x7b8(%rbx)
jmp 0x4059d
movq 0x7b4(%rbx), %xmm0
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, 0x7b4(%rbx)
movl $0x0, 0x664(%r14)
jmp 0x4059d
movl 0x7b4(%rbx), %r12d
decl %r12d
movl %r12d, 0x7b4(%rbx)
movq 0x8e8(%rbx), %rax
testq %rax, %rax
je 0x404fc
movq %r14, %rdi
callq *%rax
decl 0x7b8(%rbx)
xorl %r15d, %r15d
cmpl $0x1, 0x664(%r14)
jne 0x40558
cmpl $0x0, 0x7b0(%rbx)
jne 0x40558
cmpb $0x0, 0x44c(%rbx)
jne 0x40558
cmpb $0x0, 0x7d9(%rbx)
jne 0x40558
xorl %eax, %eax
cmpb $0x0, 0x7e5(%rbx)
sete %al
leal 0x1(,%rax,2), %esi
xorl %r15d, %r15d
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x39510
testl %eax, %eax
je 0x40558
callq 0xa8dda
movl (%rax), %r15d
testb $0x12, 0x61c(%r14)
je 0x40585
leaq 0x4b8(%r14), %rdi
callq 0x9b2fb
testl %eax, %eax
je 0x40585
callq 0xa8dda
movl (%rax), %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x39cfc
testl %r12d, %r12d
je 0x405d2
andb $-0x13, 0x61c(%r14)
movl $0x2, 0x664(%r14)
cmpb $0x0, 0x680(%r14)
jne 0x405c6
movq 0x930(%rbx), %rdi
addq $0x8f0, %rbx # imm = 0x8F0
testq %rdi, %rdi
jne 0x406dd
movq %rbx, %rdi
callq 0x2a1c0
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x0, 0x7de(%rbx)
je 0x4058a
cmpl $0x0, 0x7b0(%rbx)
jne 0x4058a
movq 0x40(%rbx), %rsi
cmpq %rsi, 0xa00(%rbx)
je 0x40650
cmpl $0x3e9, 0xa08(%rbx) # imm = 0x3E9
jb 0x40650
cmpb $0x0, 0x7e3(%rbx)
je 0x40616
leaq 0xb78(%rbx), %rdi
callq 0x40707
movq 0x40(%rbx), %rsi
movq %r14, %rdi
callq 0x453a9
movl $0x0, 0xa08(%rbx)
cmpb $0x0, 0x7e3(%rbx)
je 0x40650
leaq 0xb78(%rbx), %r12
movq 0xc08(%rbx), %rdi
testq %rdi, %rdi
jne 0x406f2
movq %r12, %rdi
callq 0xab79e
cmpb $0x0, 0x44c(%rbx)
jne 0x40681
movl 0x760(%rbx), %edi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x3791a
testl %eax, %eax
je 0x4067a
callq 0xa8dda
movl (%rax), %r15d
jmp 0x40681
movb $0x0, 0x7de(%rbx)
leaq 0x3c8500(%rip), %rax # 0x408b88
cmpb $0x0, (%rax)
je 0x406a3
movq %r14, %rdi
callq 0x3972a
testl %eax, %eax
je 0x406aa
callq 0xa8dda
movl (%rax), %r15d
jmp 0x406aa
movb $0x1, 0x7e0(%rbx)
testl %r15d, %r15d
je 0x406bf
movq %r14, %rdi
movl %r15d, %esi
callq 0x39cfc
jmp 0x4058a
xorl %r15d, %r15d
jmp 0x4058a
leaq 0xa15e5(%rip), %rsi # 0xe1cb3
movl $0x33, %edx
callq 0x2ff2f
jmp 0x403aa
leaq 0x3507f4(%rip), %rax # 0x390ed8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x405be
leaq 0x3507df(%rip), %rax # 0x390ed8
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x40648
| maria_lock_database:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, [rdi]
xor r15d, r15d
test byte ptr [rbx+722h], 1
jnz loc_405C6
mov r12d, esi
mov r14, rdi
cmp [rdi+664h], esi
jz loc_405C6
cmp r12d, 0FFFFFFFFh
jz loc_40415
cmp byte ptr [r14+680h], 0
jnz short loc_403AA
lea rdi, [rbx+8F0h]
cmp qword ptr [rbx+930h], 0
jnz loc_406C7
call _pthread_mutex_lock
loc_403AA:
xor r15d, r15d
cmp dword ptr [rbx+760h], 0
js loc_4059D
test r12d, r12d
jz loc_40464
cmp r12d, 1
jz short loc_40431
cmp r12d, 2
jnz loc_4059D
mov rdi, r14
call maria_ftparser_call_deinitializer
cmp dword ptr [r14+664h], 0
jz loc_404DA
mov r12d, [rbx+7B0h]
dec r12d
mov [rbx+7B0h], r12d
cmp qword ptr [rbx+8B0h], 0
jz loc_404FC
mov rdi, r14
call _ma_update_status_with_lock
jmp loc_404FC
loc_40415:
inc dword ptr [rbx+7B0h]
inc dword ptr [rbx+7B8h]
mov dword ptr [r14+664h], 0FFFFFFFFh
jmp loc_405C6
loc_40431:
cmp dword ptr [r14+664h], 0
jnz short loc_40488
cmp dword ptr [rbx+7B4h], 1
jnz short loc_40488
mov dword ptr [rbx+7B4h], 0
inc dword ptr [rbx+7B0h]
mov dword ptr [r14+664h], 1
jmp loc_4059D
loc_40464:
cmp dword ptr [r14+664h], 1
jnz short loc_404B2
movq xmm0, qword ptr [rbx+7B0h]
paddd xmm0, cs:xmmword_E10D0
movq qword ptr [rbx+7B0h], xmm0
jmp short loc_404CA
loc_40488:
mov dword ptr [r14+664h], 1
mov rax, [rbx+6F0h]
mov [r14+3E0h], rax
inc dword ptr [rbx+7B0h]
inc dword ptr [rbx+7B8h]
jmp loc_4059D
loc_404B2:
movq xmm0, qword ptr [rbx+7B4h]
pcmpeqd xmm1, xmm1
psubd xmm0, xmm1
movq qword ptr [rbx+7B4h], xmm0
loc_404CA:
mov dword ptr [r14+664h], 0
jmp loc_4059D
loc_404DA:
mov r12d, [rbx+7B4h]
dec r12d
mov [rbx+7B4h], r12d
mov rax, [rbx+8E8h]
test rax, rax
jz short loc_404FC
mov rdi, r14
call rax
loc_404FC:
dec dword ptr [rbx+7B8h]
xor r15d, r15d
cmp dword ptr [r14+664h], 1
jnz short loc_40558
cmp dword ptr [rbx+7B0h], 0
jnz short loc_40558
cmp byte ptr [rbx+44Ch], 0
jnz short loc_40558
cmp byte ptr [rbx+7D9h], 0
jnz short loc_40558
xor eax, eax
cmp byte ptr [rbx+7E5h], 0
setz al
lea esi, ds:1[rax*2]
xor r15d, r15d
mov rdi, r14
xor edx, edx
xor ecx, ecx
call _ma_flush_table_files
test eax, eax
jz short loc_40558
call _my_thread_var
mov r15d, [rax]
loc_40558:
test byte ptr [r14+61Ch], 12h
jz short loc_40585
lea rdi, [r14+4B8h]
call end_io_cache
test eax, eax
jz short loc_40585
call _my_thread_var
mov r15d, [rax]
mov rdi, r14
mov esi, r15d
call _ma_set_fatal_error
loc_40585:
test r12d, r12d
jz short loc_405D2
loc_4058A:
and byte ptr [r14+61Ch], 0EDh
mov dword ptr [r14+664h], 2
loc_4059D:
cmp byte ptr [r14+680h], 0
jnz short loc_405C6
mov rdi, [rbx+930h]
add rbx, 8F0h
test rdi, rdi
jnz loc_406DD
loc_405BE:
mov rdi, rbx
call _pthread_mutex_unlock
loc_405C6:
mov eax, r15d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_405D2:
cmp byte ptr [rbx+7DEh], 0
jz short loc_4058A
cmp dword ptr [rbx+7B0h], 0
jnz short loc_4058A
mov rsi, [rbx+40h]
cmp [rbx+0A00h], rsi
jz short loc_40650
cmp dword ptr [rbx+0A08h], 3E9h
jb short loc_40650
cmp byte ptr [rbx+7E3h], 0
jz short loc_40616
lea rdi, [rbx+0B78h]
call inline_mysql_rwlock_wrlock_0
mov rsi, [rbx+40h]
loc_40616:
mov rdi, r14
call _ma_remap_file
mov dword ptr [rbx+0A08h], 0
cmp byte ptr [rbx+7E3h], 0
jz short loc_40650
lea r12, [rbx+0B78h]
mov rdi, [rbx+0C08h]
test rdi, rdi
jnz loc_406F2
loc_40648:
mov rdi, r12
call my_rw_unlock
loc_40650:
cmp byte ptr [rbx+44Ch], 0
jnz short loc_40681
mov edi, [rbx+760h]
mov rsi, rbx
mov edx, 1
call _ma_state_info_write_sub
test eax, eax
jz short loc_4067A
call _my_thread_var
mov r15d, [rax]
jmp short loc_40681
loc_4067A:
mov byte ptr [rbx+7DEh], 0
loc_40681:
lea rax, maria_flush
cmp byte ptr [rax], 0
jz short loc_406A3
mov rdi, r14
call _ma_sync_table_files
test eax, eax
jz short loc_406AA
call _my_thread_var
mov r15d, [rax]
jmp short loc_406AA
loc_406A3:
mov byte ptr [rbx+7E0h], 1
loc_406AA:
test r15d, r15d
jz short loc_406BF
mov rdi, r14
mov esi, r15d
call _ma_set_fatal_error
jmp loc_4058A
loc_406BF:
xor r15d, r15d
jmp loc_4058A
loc_406C7:
lea rsi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 33h ; '3'
call psi_mutex_lock
jmp loc_403AA
loc_406DD:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_405BE
loc_406F2:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp loc_40648
| long long maria_lock_database(long long a1, const char *a2)
{
long long v2; // rbx
const char *v3; // r15
int v4; // r12d
long long v6; // rdi
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
int v10; // r9d
int v11; // r12d
void ( *v12)(long long); // rax
long long v13; // rdx
long long v14; // rcx
long long v15; // r8
int v16; // r9d
long long v17; // rdi
long long v18; // rbx
const char *v20; // rsi
long long v21; // rdi
int v22; // eax
v2 = *(_QWORD *)a1;
LODWORD(v3) = 0;
if ( (*(_BYTE *)(*(_QWORD *)a1 + 1826LL) & 1) == 0 )
{
v4 = (int)a2;
if ( *(_DWORD *)(a1 + 1636) != (_DWORD)a2 )
{
if ( (_DWORD)a2 == -1 )
{
++*(_DWORD *)(v2 + 1968);
++*(_DWORD *)(v2 + 1976);
*(_DWORD *)(a1 + 1636) = -1;
}
else
{
if ( !*(_BYTE *)(a1 + 1664) )
{
v6 = v2 + 2288;
if ( *(_QWORD *)(v2 + 2352) )
{
a2 = "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c";
psi_mutex_lock(v6, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c", 0x33u);
}
else
{
pthread_mutex_lock(v6);
}
}
LODWORD(v3) = 0;
if ( *(int *)(v2 + 1888) >= 0 )
{
if ( v4 )
{
if ( v4 == 1 )
{
if ( *(_DWORD *)(a1 + 1636) || *(_DWORD *)(v2 + 1972) != 1 )
{
*(_DWORD *)(a1 + 1636) = 1;
*(_QWORD *)(a1 + 992) = *(_QWORD *)(v2 + 1776);
++*(_DWORD *)(v2 + 1968);
++*(_DWORD *)(v2 + 1976);
}
else
{
*(_DWORD *)(v2 + 1972) = 0;
++*(_DWORD *)(v2 + 1968);
*(_DWORD *)(a1 + 1636) = 1;
}
}
else if ( v4 == 2 )
{
maria_ftparser_call_deinitializer(a1);
if ( *(_DWORD *)(a1 + 1636) )
{
v11 = *(_DWORD *)(v2 + 1968) - 1;
*(_DWORD *)(v2 + 1968) = v11;
if ( *(_QWORD *)(v2 + 2224) )
ma_update_status_with_lock(a1);
}
else
{
v11 = *(_DWORD *)(v2 + 1972) - 1;
*(_DWORD *)(v2 + 1972) = v11;
v12 = *(void ( **)(long long))(v2 + 2280);
if ( v12 )
v12(a1);
}
--*(_DWORD *)(v2 + 1976);
LODWORD(v3) = 0;
if ( *(_DWORD *)(a1 + 1636) == 1
&& !*(_DWORD *)(v2 + 1968)
&& !*(_BYTE *)(v2 + 1100)
&& !*(_BYTE *)(v2 + 2009) )
{
a2 = (const char *)(2 * (unsigned int)(*(_BYTE *)(v2 + 2021) == 0) + 1);
LODWORD(v3) = 0;
if ( (unsigned int)ma_flush_table_files((long long *)a1, 2 * (*(_BYTE *)(v2 + 2021) == 0) + 1, 0, 0) )
LODWORD(v3) = *(_DWORD *)my_thread_var(a1, a2);
}
if ( (*(_BYTE *)(a1 + 1564) & 0x12) != 0 && (unsigned int)end_io_cache(a1 + 1208) )
{
v3 = (const char *)*(unsigned int *)my_thread_var(a1 + 1208, a2);
ma_set_fatal_error((_DWORD *)a1, v3, v13, v14, v15, v16);
}
if ( !v11 && *(_BYTE *)(v2 + 2014) && !*(_DWORD *)(v2 + 1968) )
{
v20 = *(const char **)(v2 + 64);
if ( *(const char **)(v2 + 2560) != v20 && *(_DWORD *)(v2 + 2568) >= 0x3E9u )
{
if ( *(_BYTE *)(v2 + 2019) )
{
inline_mysql_rwlock_wrlock_0(v2 + 2936);
v20 = *(const char **)(v2 + 64);
}
ma_remap_file(a1, v20);
*(_DWORD *)(v2 + 2568) = 0;
if ( *(_BYTE *)(v2 + 2019) )
{
if ( *(_QWORD *)(v2 + 3080) )
PSI_server[45]();
my_rw_unlock(v2 + 2936);
}
}
if ( !*(_BYTE *)(v2 + 1100) )
{
v21 = *(unsigned int *)(v2 + 1888);
v20 = (const char *)v2;
LOBYTE(v22) = ma_state_info_write_sub(v21, (__int128 *)v2, 1);
if ( v22 )
LODWORD(v3) = *(_DWORD *)my_thread_var(v21, (const char *)v2);
else
*(_BYTE *)(v2 + 2014) = 0;
}
if ( maria_flush )
{
if ( ma_sync_table_files((_DWORD *)a1) )
LODWORD(v3) = *(_DWORD *)my_thread_var(a1, v20);
}
else
{
*(_BYTE *)(v2 + 2016) = 1;
}
if ( (_DWORD)v3 )
ma_set_fatal_error((_DWORD *)a1, (const char *)(unsigned int)v3, v7, v8, v9, v10);
else
LODWORD(v3) = 0;
}
*(_BYTE *)(a1 + 1564) &= 0xEDu;
*(_DWORD *)(a1 + 1636) = 2;
}
}
else
{
if ( *(_DWORD *)(a1 + 1636) == 1 )
*(_QWORD *)(v2 + 1968) = _mm_add_epi32(
_mm_loadl_epi64((const __m128i *)(v2 + 1968)),
(__m128i)xmmword_E10D0).m128i_u64[0];
else
*(_QWORD *)(v2 + 1972) = _mm_sub_epi32(_mm_loadl_epi64((const __m128i *)(v2 + 1972)), (__m128i)-1LL).m128i_u64[0];
*(_DWORD *)(a1 + 1636) = 0;
}
}
if ( !*(_BYTE *)(a1 + 1664) )
{
v17 = *(_QWORD *)(v2 + 2352);
v18 = v2 + 2288;
if ( v17 )
PSI_server[44]();
pthread_mutex_unlock(v18);
}
}
}
}
return (unsigned int)v3;
}
| maria_lock_database:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,qword ptr [RDI]
XOR R15D,R15D
TEST byte ptr [RBX + 0x722],0x1
JNZ 0x001405c6
MOV R12D,ESI
MOV R14,RDI
CMP dword ptr [RDI + 0x664],ESI
JZ 0x001405c6
CMP R12D,-0x1
JZ 0x00140415
CMP byte ptr [R14 + 0x680],0x0
JNZ 0x001403aa
LEA RDI,[RBX + 0x8f0]
CMP qword ptr [RBX + 0x930],0x0
JNZ 0x001406c7
CALL 0x0012a1f0
LAB_001403aa:
XOR R15D,R15D
CMP dword ptr [RBX + 0x760],0x0
JS 0x0014059d
TEST R12D,R12D
JZ 0x00140464
CMP R12D,0x1
JZ 0x00140431
CMP R12D,0x2
JNZ 0x0014059d
MOV RDI,R14
CALL 0x0015ebed
CMP dword ptr [R14 + 0x664],0x0
JZ 0x001404da
MOV R12D,dword ptr [RBX + 0x7b0]
DEC R12D
MOV dword ptr [RBX + 0x7b0],R12D
CMP qword ptr [RBX + 0x8b0],0x0
JZ 0x001404fc
MOV RDI,R14
CALL 0x0014108e
JMP 0x001404fc
LAB_00140415:
INC dword ptr [RBX + 0x7b0]
INC dword ptr [RBX + 0x7b8]
MOV dword ptr [R14 + 0x664],0xffffffff
JMP 0x001405c6
LAB_00140431:
CMP dword ptr [R14 + 0x664],0x0
JNZ 0x00140488
CMP dword ptr [RBX + 0x7b4],0x1
JNZ 0x00140488
MOV dword ptr [RBX + 0x7b4],0x0
INC dword ptr [RBX + 0x7b0]
MOV dword ptr [R14 + 0x664],0x1
JMP 0x0014059d
LAB_00140464:
CMP dword ptr [R14 + 0x664],0x1
JNZ 0x001404b2
MOVQ XMM0,qword ptr [RBX + 0x7b0]
PADDD XMM0,xmmword ptr [0x001e10d0]
MOVQ qword ptr [RBX + 0x7b0],XMM0
JMP 0x001404ca
LAB_00140488:
MOV dword ptr [R14 + 0x664],0x1
MOV RAX,qword ptr [RBX + 0x6f0]
MOV qword ptr [R14 + 0x3e0],RAX
INC dword ptr [RBX + 0x7b0]
INC dword ptr [RBX + 0x7b8]
JMP 0x0014059d
LAB_001404b2:
MOVQ XMM0,qword ptr [RBX + 0x7b4]
PCMPEQD XMM1,XMM1
PSUBD XMM0,XMM1
MOVQ qword ptr [RBX + 0x7b4],XMM0
LAB_001404ca:
MOV dword ptr [R14 + 0x664],0x0
JMP 0x0014059d
LAB_001404da:
MOV R12D,dword ptr [RBX + 0x7b4]
DEC R12D
MOV dword ptr [RBX + 0x7b4],R12D
MOV RAX,qword ptr [RBX + 0x8e8]
TEST RAX,RAX
JZ 0x001404fc
MOV RDI,R14
CALL RAX
LAB_001404fc:
DEC dword ptr [RBX + 0x7b8]
XOR R15D,R15D
CMP dword ptr [R14 + 0x664],0x1
JNZ 0x00140558
CMP dword ptr [RBX + 0x7b0],0x0
JNZ 0x00140558
CMP byte ptr [RBX + 0x44c],0x0
JNZ 0x00140558
CMP byte ptr [RBX + 0x7d9],0x0
JNZ 0x00140558
XOR EAX,EAX
CMP byte ptr [RBX + 0x7e5],0x0
SETZ AL
LEA ESI,[0x1 + RAX*0x2]
XOR R15D,R15D
MOV RDI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x00139510
TEST EAX,EAX
JZ 0x00140558
CALL 0x001a8dda
MOV R15D,dword ptr [RAX]
LAB_00140558:
TEST byte ptr [R14 + 0x61c],0x12
JZ 0x00140585
LEA RDI,[R14 + 0x4b8]
CALL 0x0019b2fb
TEST EAX,EAX
JZ 0x00140585
CALL 0x001a8dda
MOV R15D,dword ptr [RAX]
MOV RDI,R14
MOV ESI,R15D
CALL 0x00139cfc
LAB_00140585:
TEST R12D,R12D
JZ 0x001405d2
LAB_0014058a:
AND byte ptr [R14 + 0x61c],0xed
MOV dword ptr [R14 + 0x664],0x2
LAB_0014059d:
CMP byte ptr [R14 + 0x680],0x0
JNZ 0x001405c6
MOV RDI,qword ptr [RBX + 0x930]
ADD RBX,0x8f0
TEST RDI,RDI
JNZ 0x001406dd
LAB_001405be:
MOV RDI,RBX
CALL 0x0012a1c0
LAB_001405c6:
MOV EAX,R15D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001405d2:
CMP byte ptr [RBX + 0x7de],0x0
JZ 0x0014058a
CMP dword ptr [RBX + 0x7b0],0x0
JNZ 0x0014058a
MOV RSI,qword ptr [RBX + 0x40]
CMP qword ptr [RBX + 0xa00],RSI
JZ 0x00140650
CMP dword ptr [RBX + 0xa08],0x3e9
JC 0x00140650
CMP byte ptr [RBX + 0x7e3],0x0
JZ 0x00140616
LEA RDI,[RBX + 0xb78]
CALL 0x00140707
MOV RSI,qword ptr [RBX + 0x40]
LAB_00140616:
MOV RDI,R14
CALL 0x001453a9
MOV dword ptr [RBX + 0xa08],0x0
CMP byte ptr [RBX + 0x7e3],0x0
JZ 0x00140650
LEA R12,[RBX + 0xb78]
MOV RDI,qword ptr [RBX + 0xc08]
TEST RDI,RDI
JNZ 0x001406f2
LAB_00140648:
MOV RDI,R12
CALL 0x001ab79e
LAB_00140650:
CMP byte ptr [RBX + 0x44c],0x0
JNZ 0x00140681
MOV EDI,dword ptr [RBX + 0x760]
MOV RSI,RBX
MOV EDX,0x1
CALL 0x0013791a
TEST EAX,EAX
JZ 0x0014067a
CALL 0x001a8dda
MOV R15D,dword ptr [RAX]
JMP 0x00140681
LAB_0014067a:
MOV byte ptr [RBX + 0x7de],0x0
LAB_00140681:
LEA RAX,[0x508b88]
CMP byte ptr [RAX],0x0
JZ 0x001406a3
MOV RDI,R14
CALL 0x0013972a
TEST EAX,EAX
JZ 0x001406aa
CALL 0x001a8dda
MOV R15D,dword ptr [RAX]
JMP 0x001406aa
LAB_001406a3:
MOV byte ptr [RBX + 0x7e0],0x1
LAB_001406aa:
TEST R15D,R15D
JZ 0x001406bf
MOV RDI,R14
MOV ESI,R15D
CALL 0x00139cfc
JMP 0x0014058a
LAB_001406bf:
XOR R15D,R15D
JMP 0x0014058a
LAB_001406c7:
LEA RSI,[0x1e1cb3]
MOV EDX,0x33
CALL 0x0012ff2f
JMP 0x001403aa
LAB_001406dd:
LEA RAX,[0x490ed8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001405be
LAB_001406f2:
LEA RAX,[0x490ed8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x00140648
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int maria_lock_database(long *param_1,int param_2)
{
long lVar1;
int iVar2;
int *piVar3;
long lVar4;
int iVar5;
int iVar6;
lVar1 = *param_1;
iVar6 = 0;
if (((*(byte *)(lVar1 + 0x722) & 1) == 0) &&
(iVar6 = 0, *(int *)((long)param_1 + 0x664) != param_2)) {
if (param_2 == -1) {
*(int *)(lVar1 + 0x7b0) = *(int *)(lVar1 + 0x7b0) + 1;
*(int *)(lVar1 + 0x7b8) = *(int *)(lVar1 + 0x7b8) + 1;
*(int4 *)((long)param_1 + 0x664) = 0xffffffff;
}
else {
if ((char)param_1[0xd0] == '\0') {
if (*(long *)(lVar1 + 0x930) == 0) {
pthread_mutex_lock((pthread_mutex_t *)(lVar1 + 0x8f0));
}
else {
psi_mutex_lock((pthread_mutex_t *)(lVar1 + 0x8f0),
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c",0x33)
;
}
}
iVar5 = 0;
iVar6 = 0;
if (-1 < *(int *)(lVar1 + 0x760)) {
iVar6 = iVar5;
if (param_2 == 0) {
if (*(int *)((long)param_1 + 0x664) == 1) {
*(ulong *)(lVar1 + 0x7b0) =
CONCAT44((int)((ulong)*(int8 *)(lVar1 + 0x7b0) >> 0x20) + _UNK_001e10d4,
(int)*(int8 *)(lVar1 + 0x7b0) + _DAT_001e10d0);
}
else {
*(ulong *)(lVar1 + 0x7b4) =
CONCAT44((int)((ulong)*(int8 *)(lVar1 + 0x7b4) >> 0x20) + 1,
(int)*(int8 *)(lVar1 + 0x7b4) + 1);
}
*(int4 *)((long)param_1 + 0x664) = 0;
}
else if (param_2 == 1) {
if ((*(int *)((long)param_1 + 0x664) == 0) && (*(int *)(lVar1 + 0x7b4) == 1)) {
*(int4 *)(lVar1 + 0x7b4) = 0;
*(int *)(lVar1 + 0x7b0) = *(int *)(lVar1 + 0x7b0) + 1;
*(int4 *)((long)param_1 + 0x664) = 1;
}
else {
*(int4 *)((long)param_1 + 0x664) = 1;
param_1[0x7c] = *(long *)(lVar1 + 0x6f0);
*(int *)(lVar1 + 0x7b0) = *(int *)(lVar1 + 0x7b0) + 1;
*(int *)(lVar1 + 0x7b8) = *(int *)(lVar1 + 0x7b8) + 1;
}
}
else if (param_2 == 2) {
maria_ftparser_call_deinitializer(param_1);
if (*(int *)((long)param_1 + 0x664) == 0) {
iVar5 = *(int *)(lVar1 + 0x7b4) + -1;
*(int *)(lVar1 + 0x7b4) = iVar5;
if (*(code **)(lVar1 + 0x8e8) != (code *)0x0) {
(**(code **)(lVar1 + 0x8e8))(param_1);
}
}
else {
iVar5 = *(int *)(lVar1 + 0x7b0) + -1;
*(int *)(lVar1 + 0x7b0) = iVar5;
if (*(long *)(lVar1 + 0x8b0) != 0) {
_ma_update_status_with_lock(param_1);
}
}
*(int *)(lVar1 + 0x7b8) = *(int *)(lVar1 + 0x7b8) + -1;
iVar2 = 0;
iVar6 = 0;
if ((((*(int *)((long)param_1 + 0x664) == 1) &&
(iVar6 = iVar2, *(int *)(lVar1 + 0x7b0) == 0)) && (*(char *)(lVar1 + 0x44c) == '\0'))
&& (*(char *)(lVar1 + 0x7d9) == '\0')) {
iVar6 = 0;
iVar2 = _ma_flush_table_files
(param_1,(*(char *)(lVar1 + 0x7e5) == '\0') * '\x02' + '\x01',0,0);
if (iVar2 != 0) {
piVar3 = (int *)_my_thread_var();
iVar6 = *piVar3;
}
}
if ((*(byte *)((long)param_1 + 0x61c) & 0x12) != 0) {
iVar2 = end_io_cache(param_1 + 0x97);
if (iVar2 != 0) {
piVar3 = (int *)_my_thread_var();
iVar6 = *piVar3;
_ma_set_fatal_error(param_1,iVar6);
}
}
if (((iVar5 == 0) && (*(char *)(lVar1 + 0x7de) != '\0')) && (*(int *)(lVar1 + 0x7b0) == 0)
) {
lVar4 = *(long *)(lVar1 + 0x40);
if ((*(long *)(lVar1 + 0xa00) != lVar4) && (1000 < *(uint *)(lVar1 + 0xa08))) {
if (*(char *)(lVar1 + 0x7e3) != '\0') {
inline_mysql_rwlock_wrlock(lVar1 + 0xb78);
lVar4 = *(long *)(lVar1 + 0x40);
}
_ma_remap_file(param_1,lVar4);
*(int4 *)(lVar1 + 0xa08) = 0;
if (*(char *)(lVar1 + 0x7e3) != '\0') {
if (*(long *)(lVar1 + 0xc08) != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(lVar1 + 0xb78);
}
}
if (*(char *)(lVar1 + 0x44c) == '\0') {
iVar5 = _ma_state_info_write_sub(*(int4 *)(lVar1 + 0x760),lVar1,1);
if (iVar5 == 0) {
*(int1 *)(lVar1 + 0x7de) = 0;
}
else {
piVar3 = (int *)_my_thread_var();
iVar6 = *piVar3;
}
}
if (maria_flush == '\0') {
*(int1 *)(lVar1 + 0x7e0) = 1;
}
else {
iVar5 = _ma_sync_table_files(param_1);
if (iVar5 != 0) {
piVar3 = (int *)_my_thread_var();
iVar6 = *piVar3;
}
}
if (iVar6 == 0) {
iVar6 = 0;
}
else {
_ma_set_fatal_error(param_1,iVar6);
}
}
*(byte *)((long)param_1 + 0x61c) = *(byte *)((long)param_1 + 0x61c) & 0xed;
*(int4 *)((long)param_1 + 0x664) = 2;
}
}
if ((char)param_1[0xd0] == '\0') {
if (*(long *)(lVar1 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 0x8f0));
}
}
}
return iVar6;
}
| |
39,309 | main | ng-log[P]ng-log/src/cleanup_with_absolute_prefix_unittest.cc | int main(int argc, char** argv) {
FLAGS_colorlogtostderr = false;
FLAGS_timestamp_in_logfile_name = true;
#ifdef NGLOG_USE_GFLAGS
ParseCommandLineFlags(&argc, &argv, true);
#endif
// Make sure stderr is not buffered as stderr seems to be buffered
// on recent windows.
setbuf(stderr, nullptr);
// Test some basics before InitializeLogging:
CaptureTestStderr();
const string early_stderr = GetCapturedTestStderr();
EXPECT_FALSE(IsLoggingInitialized());
InitializeLogging(argv[0]);
EXPECT_TRUE(IsLoggingInitialized());
InitGoogleTest(&argc, argv);
#ifdef HAVE_LIB_GMOCK
InitGoogleMock(&argc, argv);
#endif
// so that death tests run before we use threads
CHECK_EQ(RUN_ALL_TESTS(), 0);
} | O0 | cpp | main:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x6c04d(%rip), %rax # 0x77c96
movb $0x0, (%rax)
leaq 0x6c03d(%rip), %rax # 0x77c90
movb $0x1, (%rax)
movq 0x6b353(%rip), %rax # 0x76fb0
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9ac0
callq 0xbe90
leaq -0x30(%rbp), %rdi
callq 0xbf00
callq 0x4f7a0
movb %al, -0xb9(%rbp)
jmp 0xbc84
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0xbc90
jmp 0xbcca
movq 0x6b319(%rip), %rax # 0x76fb0
movq (%rax), %rdi
leaq 0x45423(%rip), %rsi # 0x510c4
leaq 0x4542e(%rip), %rdx # 0x510d6
movb $0x0, %al
callq 0x9ae0
movl $0x1, %edi
callq 0x98f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xbe6f
jmp 0xbccc
jmp 0xbcce
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x19250
jmp 0xbcdc
jmp 0xbcde
callq 0x4f7a0
movb %al, -0xba(%rbp)
jmp 0xbceb
movb -0xba(%rbp), %al
testb $0x1, %al
jne 0xbd20
jmp 0xbcf7
movq 0x6b2b2(%rip), %rax # 0x76fb0
movq (%rax), %rdi
leaq 0x453bc(%rip), %rsi # 0x510c4
leaq 0x453e1(%rip), %rdx # 0x510f0
movb $0x0, %al
callq 0x9ae0
movl $0x1, %edi
callq 0x98f0
jmp 0xbd22
jmp 0xbd24
movq -0x10(%rbp), %rsi
leaq -0x4(%rbp), %rdi
callq 0xb950
callq 0xbf40
movl %eax, -0xc0(%rbp)
jmp 0xbd3e
movl -0xc0(%rbp), %edi
callq 0xcd50
movl %eax, -0xc4(%rbp)
jmp 0xbd51
xorl %edi, %edi
callq 0xcd50
movl %eax, -0xc8(%rbp)
jmp 0xbd60
movl -0xc8(%rbp), %edx
movl -0xc4(%rbp), %esi
leaq 0x45394(%rip), %rcx # 0x51107
leaq -0x48(%rbp), %rdi
callq 0xcd10
jmp 0xbd7e
leaq -0x48(%rbp), %rdi
callq 0xcd60
testb $0x1, %al
jne 0xbd99
leaq -0x48(%rbp), %rdi
callq 0xce00
jmp 0xbe5b
leaq -0xb8(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
leaq -0x48(%rbp), %rsi
callq 0xcd90
movq -0xd0(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0xcdc0
jmp 0xbdc5
leaq 0x45286(%rip), %rsi # 0x51052
leaq -0xa8(%rbp), %rdi
movl $0x64, %edx
leaq -0xb0(%rbp), %rcx
callq 0x18e90
jmp 0xbde6
leaq -0xa8(%rbp), %rdi
callq 0x14990
jmp 0xbdf4
leaq -0xa8(%rbp), %rdi
callq 0x18ed0
jmp 0xbe02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xbe44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xbe38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x18ed0
jmp 0xbe38
leaq -0xb0(%rbp), %rdi
callq 0xcde0
leaq -0xb8(%rbp), %rdi
callq 0xce00
leaq -0x48(%rbp), %rdi
callq 0xce00
jmp 0xbe6f
leaq -0x30(%rbp), %rdi
callq 0x9ee8
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x9ee8
movq -0x38(%rbp), %rdi
callq 0x9d40
movq %rax, %rdi
callq 0xcc30
nopl (%rax)
| main:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
lea rax, _ZN3fLB22FLAGS_colorlogtostderrE; fLB::FLAGS_colorlogtostderr
mov byte ptr [rax], 0
lea rax, _ZN3fLB31FLAGS_timestamp_in_logfile_nameE; fLB::FLAGS_timestamp_in_logfile_name
mov byte ptr [rax], 1
mov rax, cs:stderr_ptr
mov rdi, [rax]; this
xor eax, eax
mov esi, eax; char *
call _setbuf
call _ZN5nglogL17CaptureTestStderrEv; nglog::CaptureTestStderr(void)
lea rdi, [rbp+var_30]; this
call _ZN5nglogL21GetCapturedTestStderrB5cxx11Ev; nglog::GetCapturedTestStderr(void)
call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void)
mov byte ptr [rbp+var_C0+7], al
jmp short $+2
loc_BC84:
mov al, byte ptr [rbp+var_C0+7]
test al, 1
jnz short loc_BC90
jmp short loc_BCCA
loc_BC90:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aCheckFailedS; "Check failed: %s\n"
lea rdx, aIslogginginiti; "!(IsLoggingInitialized())"
mov al, 0
call _fprintf
mov edi, 1
call _exit
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp loc_BE6F
loc_BCCA:
jmp short $+2
loc_BCCC:
jmp short $+2
loc_BCCE:
mov rax, [rbp+var_10]
mov rdi, [rax]; this
call _ZN5nglog17InitializeLoggingEPKc; nglog::InitializeLogging(char const*)
jmp short $+2
loc_BCDC:
jmp short $+2
loc_BCDE:
call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void)
mov byte ptr [rbp+var_C0+6], al
jmp short $+2
loc_BCEB:
mov al, byte ptr [rbp+var_C0+6]
test al, 1
jnz short loc_BD20
jmp short $+2
loc_BCF7:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aCheckFailedS; "Check failed: %s\n"
lea rdx, aIslogginginiti_0; "IsLoggingInitialized()"
mov al, 0
call _fprintf
mov edi, 1
call _exit
loc_BD20:
jmp short $+2
loc_BD22:
jmp short $+2
loc_BD24:
mov rsi, [rbp+var_10]; int
lea rdi, [rbp+var_4]; this
call _ZN5nglog14InitGoogleTestEPiPPc; nglog::InitGoogleTest(int *,char **)
call _ZN5nglogL13RUN_ALL_TESTSEv; nglog::RUN_ALL_TESTS(void)
mov dword ptr [rbp+var_C0], eax
jmp short $+2
loc_BD3E:
mov edi, dword ptr [rbp+var_C0]; this
call _ZN5nglog8internal21GetReferenceableValueEi; nglog::internal::GetReferenceableValue(int)
mov [rbp+var_C4], eax
jmp short $+2
loc_BD51:
xor edi, edi; this
call _ZN5nglog8internal21GetReferenceableValueEi; nglog::internal::GetReferenceableValue(int)
mov [rbp+var_C8], eax
jmp short $+2
loc_BD60:
mov edx, [rbp+var_C8]
mov esi, [rbp+var_C4]
lea rcx, aRunAllTests0; "RUN_ALL_TESTS() == 0"
lea rdi, [rbp+var_48]
call _ZN5nglog8internal12Check_EQImplB5cxx11EiiPKc; nglog::internal::Check_EQImpl(int,int,char const*)
jmp short $+2
loc_BD7E:
lea rdi, [rbp+var_48]
call _ZNKSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEcvbEv; std::unique_ptr<std::string>::operator bool(void)
test al, 1
jnz short loc_BD99
lea rdi, [rbp+var_48]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
jmp loc_BE5B
loc_BD99:
lea rdi, [rbp+var_B8]
mov [rbp+var_D0], rdi
lea rsi, [rbp+var_48]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEC2EOS8_; std::unique_ptr<std::string>::unique_ptr(std::unique_ptr<std::string>&&)
mov rsi, [rbp+var_D0]
lea rdi, [rbp+var_B0]
call _ZN5nglog8internal13CheckOpStringC2ESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS8_EE; nglog::internal::CheckOpString::CheckOpString(std::unique_ptr<std::string>)
jmp short $+2
loc_BDC5:
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_A8]; this
mov edx, 64h ; 'd'; int
lea rcx, [rbp+var_B0]; nglog::internal::CheckOpString *
call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&)
jmp short $+2
loc_BDE6:
lea rdi, [rbp+var_A8]; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
jmp short $+2
loc_BDF4:
lea rdi, [rbp+var_A8]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_BE02:
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_BE44
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_BE38
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_A8]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_BE38:
lea rdi, [rbp+var_B0]; this
call _ZN5nglog8internal13CheckOpStringD2Ev; nglog::internal::CheckOpString::~CheckOpString()
loc_BE44:
lea rdi, [rbp+var_B8]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
lea rdi, [rbp+var_48]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
jmp short loc_BE6F
loc_BE5B:
lea rdi, [rbp+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
xor eax, eax
add rsp, 0D0h
pop rbp
retn
loc_BE6F:
lea rdi, [rbp+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_38]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| int main(int argc, const char **argv, const char **envp)
{
nglog *v3; // rdi
nglog *v4; // rdi
char **v5; // rdx
int v6; // esi
unsigned int v8; // [rsp+8h] [rbp-C8h]
unsigned int ReferenceableValue; // [rsp+Ch] [rbp-C4h]
unsigned int v10; // [rsp+10h] [rbp-C0h]
_BYTE v11[8]; // [rsp+18h] [rbp-B8h] BYREF
_BYTE v12[8]; // [rsp+20h] [rbp-B0h] BYREF
_BYTE v13[96]; // [rsp+28h] [rbp-A8h] BYREF
_BYTE v14[12]; // [rsp+88h] [rbp-48h] BYREF
_BYTE v15[32]; // [rsp+A0h] [rbp-30h] BYREF
int *v16; // [rsp+C0h] [rbp-10h]
int v17; // [rsp+CCh] [rbp-4h] BYREF
v17 = argc;
v16 = (int *)argv;
fLB::FLAGS_colorlogtostderr = 0;
fLB::FLAGS_timestamp_in_logfile_name = 1;
v3 = (nglog *)stderr;
setbuf(stderr, 0LL, envp);
nglog::CaptureTestStderr(v3);
nglog::GetCapturedTestStderr[abi:cxx11](v15);
if ( (nglog::IsLoggingInitialized((nglog *)v15) & 1) != 0 )
{
fprintf(stderr, "Check failed: %s\n", "!(IsLoggingInitialized())");
exit(1LL);
}
v4 = *(nglog **)v16;
nglog::InitializeLogging(*(nglog **)v16, 0LL);
if ( (nglog::IsLoggingInitialized(v4) & 1) == 0 )
{
fprintf(stderr, "Check failed: %s\n", "IsLoggingInitialized()");
exit(1LL);
}
v6 = (int)v16;
nglog::InitGoogleTest((nglog *)&v17, v16, v5);
v10 = nglog::RUN_ALL_TESTS((nglog *)&v17);
ReferenceableValue = nglog::internal::GetReferenceableValue((nglog::internal *)v10, v6);
v8 = nglog::internal::GetReferenceableValue(0LL, v6);
nglog::internal::Check_EQImpl[abi:cxx11](v14, ReferenceableValue, v8, "RUN_ALL_TESTS() == 0");
if ( (std::unique_ptr<std::string>::operator bool(v14) & 1) != 0 )
{
std::unique_ptr<std::string>::unique_ptr(v11, v14);
nglog::internal::CheckOpString::CheckOpString(v12, v11);
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v13,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/cleanup_with_absolute_prefix_unittest.cc",
100,
(const nglog::internal::CheckOpString *)v12);
nglog::LogMessage::stream((nglog::LogMessage *)v13);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v13);
}
std::unique_ptr<std::string>::~unique_ptr(v14);
std::string::~string(v15);
return 0;
}
| main:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[0x177c96]
MOV byte ptr [RAX],0x0
LEA RAX,[0x177c90]
MOV byte ptr [RAX],0x1
MOV RAX,qword ptr [0x00176fb0]
MOV RDI,qword ptr [RAX]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00109ac0
CALL 0x0010be90
LEA RDI,[RBP + -0x30]
CALL 0x0010bf00
LAB_0010bc77:
CALL 0x0014f7a0
MOV byte ptr [RBP + -0xb9],AL
JMP 0x0010bc84
LAB_0010bc84:
MOV AL,byte ptr [RBP + -0xb9]
TEST AL,0x1
JNZ 0x0010bc90
JMP 0x0010bcca
LAB_0010bc90:
MOV RAX,qword ptr [0x00176fb0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1510c4]
LEA RDX,[0x1510d6]
MOV AL,0x0
CALL 0x00109ae0
MOV EDI,0x1
CALL 0x001098f0
LAB_0010bcca:
JMP 0x0010bccc
LAB_0010bccc:
JMP 0x0010bcce
LAB_0010bcce:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00119250
JMP 0x0010bcdc
LAB_0010bcdc:
JMP 0x0010bcde
LAB_0010bcde:
CALL 0x0014f7a0
MOV byte ptr [RBP + -0xba],AL
JMP 0x0010bceb
LAB_0010bceb:
MOV AL,byte ptr [RBP + -0xba]
TEST AL,0x1
JNZ 0x0010bd20
JMP 0x0010bcf7
LAB_0010bcf7:
MOV RAX,qword ptr [0x00176fb0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1510c4]
LEA RDX,[0x1510f0]
MOV AL,0x0
CALL 0x00109ae0
MOV EDI,0x1
CALL 0x001098f0
LAB_0010bd20:
JMP 0x0010bd22
LAB_0010bd22:
JMP 0x0010bd24
LAB_0010bd24:
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x4]
CALL 0x0010b950
CALL 0x0010bf40
MOV dword ptr [RBP + -0xc0],EAX
JMP 0x0010bd3e
LAB_0010bd3e:
MOV EDI,dword ptr [RBP + -0xc0]
CALL 0x0010cd50
MOV dword ptr [RBP + -0xc4],EAX
JMP 0x0010bd51
LAB_0010bd51:
XOR EDI,EDI
CALL 0x0010cd50
MOV dword ptr [RBP + -0xc8],EAX
JMP 0x0010bd60
LAB_0010bd60:
MOV EDX,dword ptr [RBP + -0xc8]
MOV ESI,dword ptr [RBP + -0xc4]
LEA RCX,[0x151107]
LEA RDI,[RBP + -0x48]
CALL 0x0010cd10
JMP 0x0010bd7e
LAB_0010bd7e:
LEA RDI,[RBP + -0x48]
CALL 0x0010cd60
TEST AL,0x1
JNZ 0x0010bd99
LEA RDI,[RBP + -0x48]
CALL 0x0010ce00
JMP 0x0010be5b
LAB_0010bd99:
LEA RDI,[RBP + -0xb8]
MOV qword ptr [RBP + -0xd0],RDI
LEA RSI,[RBP + -0x48]
CALL 0x0010cd90
MOV RSI,qword ptr [RBP + -0xd0]
LAB_0010bdb7:
LEA RDI,[RBP + -0xb0]
CALL 0x0010cdc0
JMP 0x0010bdc5
LAB_0010bdc5:
LEA RSI,[0x151052]
LEA RDI,[RBP + -0xa8]
MOV EDX,0x64
LEA RCX,[RBP + -0xb0]
CALL 0x00118e90
JMP 0x0010bde6
LAB_0010bde6:
LEA RDI,[RBP + -0xa8]
CALL 0x00114990
JMP 0x0010bdf4
LAB_0010bdf4:
LEA RDI,[RBP + -0xa8]
CALL 0x00118ed0
JMP 0x0010be02
LAB_0010be02:
MOV RCX,RAX
MOV EAX,EDX
MOV qword ptr [RBP + -0x38],RCX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0010be44
LAB_0010be44:
LEA RDI,[RBP + -0xb8]
CALL 0x0010ce00
LEA RDI,[RBP + -0x48]
CALL 0x0010ce00
JMP 0x0010be6f
LAB_0010be5b:
LEA RDI,[RBP + -0x30]
CALL 0x00109ee8
XOR EAX,EAX
ADD RSP,0xd0
POP RBP
RET
LAB_0010be6f:
LEA RDI,[RBP + -0x30]
CALL 0x00109ee8
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00109d40
|
int8 main(int param_1,char **param_2)
{
byte bVar1;
bool bVar2;
int iVar3;
int iVar4;
int1 auVar5 [12];
unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> local_c0 [8];
CheckOpString local_b8 [8];
LogMessageFatal local_b0 [96];
internal local_50 [12];
int4 local_44;
int8 local_40;
nglog local_38 [32];
char **local_18;
int local_c;
fLB::FLAGS_colorlogtostderr = 0;
fLB::FLAGS_timestamp_in_logfile_name = 1;
local_18 = param_2;
local_c = param_1;
setbuf(*(FILE **)PTR_stderr_00176fb0,(char *)0x0);
nglog::CaptureTestStderr();
nglog::GetCapturedTestStderr_abi_cxx11_(local_38);
/* try { // try from 0010bc77 to 0010bd7b has its CatchHandler @ 0010bcb9 */
bVar1 = nglog::IsLoggingInitialized();
if ((bVar1 & 1) != 0) {
fprintf(*(FILE **)PTR_stderr_00176fb0,"Check failed: %s\n","!(IsLoggingInitialized())");
/* WARNING: Subroutine does not return */
exit(1);
}
nglog::InitializeLogging(*local_18);
bVar1 = nglog::IsLoggingInitialized();
if ((bVar1 & 1) == 0) {
fprintf(*(FILE **)PTR_stderr_00176fb0,"Check failed: %s\n","IsLoggingInitialized()");
/* WARNING: Subroutine does not return */
exit(1);
}
nglog::InitGoogleTest(&local_c,local_18);
iVar3 = nglog::RUN_ALL_TESTS();
iVar3 = nglog::internal::GetReferenceableValue(iVar3);
iVar4 = nglog::internal::GetReferenceableValue(0);
nglog::internal::Check_EQImpl_abi_cxx11_(local_50,iVar3,iVar4,"RUN_ALL_TESTS() == 0");
bVar2 = std::unique_ptr::operator_cast_to_bool((unique_ptr *)local_50);
if (!bVar2) {
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
local_50);
std::__cxx11::string::~string((string *)local_38);
return 0;
}
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::unique_ptr
(local_c0,(unique_ptr *)local_50);
/* try { // try from 0010bdb7 to 0010bdc2 has its CatchHandler @ 0010be02 */
nglog::internal::CheckOpString::CheckOpString(local_b8,local_c0);
/* try { // try from 0010bdc5 to 0010bde3 has its CatchHandler @ 0010be10 */
nglog::LogMessageFatal::LogMessageFatal
(local_b0,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/cleanup_with_absolute_prefix_unittest.cc"
,100,local_b8);
/* try { // try from 0010bde6 to 0010bdf1 has its CatchHandler @ 0010be1e */
nglog::LogMessage::stream((LogMessage *)local_b0);
/* try { // try from 0010bdf4 to 0010bdff has its CatchHandler @ 0010be10 */
auVar5 = nglog::LogMessageFatal::~LogMessageFatal(local_b0);
local_44 = auVar5._8_4_;
local_40 = auVar5._0_8_;
/* catch(type#1 @ 00000000) { ... } // from try @ 0010bdb7 with catch @ 0010be02
*/
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
(local_c0);
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)local_50)
;
std::__cxx11::string::~string((string *)local_38);
/* WARNING: Subroutine does not return */
_Unwind_Resume(local_40);
}
| |
39,310 | main | ng-log[P]ng-log/src/cleanup_with_absolute_prefix_unittest.cc | int main(int argc, char** argv) {
FLAGS_colorlogtostderr = false;
FLAGS_timestamp_in_logfile_name = true;
#ifdef NGLOG_USE_GFLAGS
ParseCommandLineFlags(&argc, &argv, true);
#endif
// Make sure stderr is not buffered as stderr seems to be buffered
// on recent windows.
setbuf(stderr, nullptr);
// Test some basics before InitializeLogging:
CaptureTestStderr();
const string early_stderr = GetCapturedTestStderr();
EXPECT_FALSE(IsLoggingInitialized());
InitializeLogging(argv[0]);
EXPECT_TRUE(IsLoggingInitialized());
InitGoogleTest(&argc, argv);
#ifdef HAVE_LIB_GMOCK
InitGoogleMock(&argc, argv);
#endif
// so that death tests run before we use threads
CHECK_EQ(RUN_ALL_TESTS(), 0);
} | O3 | cpp | main:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
leaq 0x28a4b(%rip), %rax # 0x31a7e
movb $0x0, (%rax)
leaq 0x28a3b(%rip), %rax # 0x31a78
movb $0x1, (%rax)
movq 0x27f51(%rip), %r13 # 0x30f98
movq (%r13), %rdi
xorl %esi, %esi
callq 0x77e0
movq (%r13), %rdi
callq 0x7570
movl %eax, %ebp
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x2893b(%rip), %rsi # 0x319a8
movq 0x2893c(%rip), %rdx # 0x319b0
addq %rsi, %rdx
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x9922
leaq 0x1a0de(%rip), %rsi # 0x23169
movq %r14, %rdi
callq 0x7a40
movl %ebp, 0x10(%rsp)
movq 0x27e62(%rip), %r15 # 0x30f00
movq (%r15), %rdi
callq 0x7570
cmpl %ebp, %eax
je 0x90bb
movq (%r13), %rdi
callq 0x7570
cmpl %ebp, %eax
jne 0x9376
movq 0x2898e(%rip), %rcx # 0x31a50
testq %rcx, %rcx
je 0x90f9
leaq 0x2897a(%rip), %rax # 0x31a48
xorl %edx, %edx
cmpl %ebp, 0x20(%rcx)
setl %dl
cmovgeq %rcx, %rax
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x90ce
leaq 0x2895d(%rip), %rcx # 0x31a48
cmpq %rcx, %rax
je 0x90f9
cmpl %ebp, 0x20(%rax)
jle 0x9458
movl $0x28, %edi
callq 0x8eb0
movq %rax, %r14
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x9922
leaq 0x38(%rsp), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x9d8a
movq %r14, 0x8(%rsp)
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x914a
callq 0x7670
leaq 0x288ef(%rip), %rdi # 0x31a40
leaq 0x10(%rsp), %rsi
callq 0x9d24
movq $0x0, 0x8(%rsp)
movq (%rax), %rsi
movq %r14, (%rax)
testq %rsi, %rsi
je 0x9177
movq %rax, %rdi
callq 0x9a82
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x918b
leaq 0x8(%rsp), %rdi
callq 0x9a82
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x919f
callq 0x7670
movq (%r13), %rdi
callq 0x7570
movl %eax, %ebp
movl %eax, 0x10(%rsp)
movq (%r15), %rdi
callq 0x7570
cmpl %ebp, %eax
je 0x91cb
movq (%r13), %rdi
callq 0x7570
cmpl %ebp, %eax
jne 0x93b7
leaq 0x2886e(%rip), %r14 # 0x31a40
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xa240
movq (%rax), %rcx
movq %rcx, 0x8(%rsp)
movq $0x0, (%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0xa2fc
leaq 0x2883d(%rip), %rdi # 0x31a40
movq %rax, %rsi
callq 0xa37a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x93f6
callq 0xa286
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x1a32b(%rip), %rsi # 0x23559
callq 0x7650
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x75c0
movq %r14, %rdi
callq 0x7030
movq %rax, %r15
leaq 0x38(%rsp), %rdi
leaq 0x17(%rsp), %rdx
movq %rax, %rsi
callq 0xa41e
xorl %r12d, %r12d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x75c0
movq 0x38(%rsp), %rdi
addq %r12, %rdi
movq %r15, %rdx
subq %r12, %rdx
movl $0x1, %esi
movq %r14, %rcx
callq 0x7860
addq %rax, %r12
testq %rax, %rax
je 0x9299
cmpq %r15, %r12
jb 0x9271
movq 0x38(%rsp), %rsi
leaq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
movq %rax, (%rdi)
addq %rsi, %r12
movq %r12, %rdx
callq 0xa4b6
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x92c5
callq 0x7670
testq %r14, %r14
je 0x92d2
movq %r14, %rdi
callq 0x7520
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x92e6
leaq 0x8(%rsp), %rdi
callq 0x9a82
callq 0x21f7c
testb %al, %al
jne 0x944e
movq (%rbx), %rdi
callq 0xf1b2
callq 0x21f7c
testb %al, %al
je 0x9453
movq 0x286e9(%rip), %rbx # 0x319f8
cmpq 0x286ea(%rip), %rbx # 0x31a00
jne 0x931d
movq %rbx, %rax
jmp 0x9333
callq *(%rbx)
addq $0x8, %rbx
cmpq 0x286d6(%rip), %rbx # 0x31a00
jne 0x931d
movq 0x286c5(%rip), %rax # 0x319f8
subq %rax, %rbx
movq (%r13), %rdi
shrq $0x3, %rbx
leaq 0x1a081(%rip), %rsi # 0x233c6
movl %ebx, %edx
xorl %eax, %eax
callq 0x7800
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x9362
callq 0x7670
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19dfa(%rip), %rsi # 0x23177
leaq 0x38(%rsp), %rdi
movl $0x16b, %edx # imm = 0x16B
callq 0xee3a
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0xb5b2
leaq 0x19e20(%rip), %rsi # 0x231c0
movl $0x3f, %edx
movq %rax, %rdi
callq 0x7600
leaq 0x38(%rsp), %rdi
callq 0xee7e
leaq 0x19db9(%rip), %rsi # 0x23177
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movl $0x190, %edx # imm = 0x190
callq 0xee3a
movq %rbx, %rdi
callq 0xb5b2
leaq 0x19de1(%rip), %rsi # 0x231c0
movl $0x3f, %edx
movq %rax, %rdi
callq 0x7600
leaq 0x38(%rsp), %rdi
callq 0xee7e
leaq 0x19d7a(%rip), %rsi # 0x23177
leaq 0x38(%rsp), %rdi
movl $0x193, %edx # imm = 0x193
callq 0xee3a
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0xb5b2
movq %rax, %r14
leaq 0x19ee5(%rip), %rsi # 0x23308
movl $0x12, %edx
movq %rax, %rdi
callq 0x7600
leaq 0x19ee4(%rip), %rsi # 0x2331b
movl $0x3c, %edx
movq %r14, %rdi
callq 0x7600
leaq 0x38(%rsp), %rdi
callq 0xee7e
callq 0x7ae8
callq 0x7ac0
leaq 0x19d18(%rip), %rsi # 0x23177
leaq 0x38(%rsp), %rdi
movl $0x16c, %edx # imm = 0x16C
callq 0xee3a
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0xb5b2
leaq 0x19d7e(%rip), %rsi # 0x23200
movl $0x46, %edx
movq %rax, %rdi
callq 0x7600
jmp 0x93ad
jmp 0x94f5
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x94ad
callq 0x7670
jmp 0x94ad
movq %rax, %rbx
testq %r14, %r14
je 0x9506
movq %r14, %rdi
callq 0x7520
jmp 0x9506
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x9a82
jmp 0x951f
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x94e5
callq 0x7670
jmp 0x94e5
movq %rax, %rbx
movq %r14, %rdi
callq 0x7670
jmp 0x951f
jmp 0x951c
jmp 0x951c
jmp 0x9503
movq %rbx, %rdi
callq 0xee7e
jmp 0x9543
jmp 0x953b
jmp 0x951c
movq %rax, %rbx
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x9533
leaq 0x8(%rsp), %rdi
callq 0x9a82
jmp 0x9533
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x9533
callq 0x7670
movq %rbx, %rdi
callq 0x79b0
movq %rbx, %rdi
callq 0xee7e
movq %rax, %rdi
callq 0x9777
nop
| main:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov rbx, rsi
lea rax, _ZN3fLB22FLAGS_colorlogtostderrE; fLB::FLAGS_colorlogtostderr
mov byte ptr [rax], 0
lea rax, _ZN3fLB31FLAGS_timestamp_in_logfile_nameE; fLB::FLAGS_timestamp_in_logfile_name
mov byte ptr [rax], 1
mov r13, cs:stderr_ptr
mov rdi, [r13+0]
xor esi, esi
call _setbuf
mov rdi, [r13+0]
call _fileno
mov ebp, eax
lea rax, [rsp+0C8h+var_A0]
mov [rax-10h], rax
mov rsi, cs:_ZN3fLS21FLAGS_test_tmpdir_bufB5cxx11E; fLS::FLAGS_test_tmpdir_buf
mov rdx, cs:qword_319B0
add rdx, rsi
lea r14, [rsp+0C8h+var_B0]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, aCapturedErr; "/captured.err"
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov [rsp+0C8h+var_B8], ebp
mov r15, cs:stdout_ptr
mov rdi, [r15]
call _fileno
cmp eax, ebp
jz short loc_90BB
mov rdi, [r13+0]
call _fileno
cmp eax, ebp
jnz loc_9376
loc_90BB:
mov rcx, cs:qword_31A50
test rcx, rcx
jz short loc_90F9
lea rax, dword_31A48
loc_90CE:
xor edx, edx
cmp [rcx+20h], ebp
setl dl
cmovge rax, rcx
mov rcx, [rcx+rdx*8+10h]
test rcx, rcx
jnz short loc_90CE
lea rcx, dword_31A48
cmp rax, rcx
jz short loc_90F9
cmp [rax+20h], ebp
jle loc_9458
loc_90F9:
mov edi, 28h ; '('; unsigned __int64
call _Znwm; operator new(ulong)
mov r14, rax
lea r12, [rsp+0C8h+var_80]
mov [r12-10h], r12
mov rsi, [rsp+0C8h+var_B0]
mov rdx, [rsp+0C8h+var_A8]
add rdx, rsi
lea rdi, [rsp+0C8h+var_90]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdx, [rsp+0C8h+var_90]
mov rdi, r14; this
mov esi, ebp
call _ZN5nglog14CapturedStreamC2EiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; nglog::CapturedStream::CapturedStream(int,std::string)
mov [rsp+0C8h+var_C0], r14
mov rdi, [rsp+0C8h+var_90]
cmp rdi, r12
jz short loc_914A
call _free
loc_914A:
lea rdi, _ZN5nglogL18s_captured_streamsE; nglog::s_captured_streams
lea rsi, [rsp+0C8h+var_B8]
call _ZNSt3mapIiSt10unique_ptrIN5nglog14CapturedStreamESt14default_deleteIS2_EESt4lessIiESaISt4pairIKiS5_EEEixERS9_; std::map<int,std::unique_ptr<nglog::CapturedStream>>::operator[](int const&)
mov [rsp+0C8h+var_C0], 0
mov rsi, [rax]
mov [rax], r14
test rsi, rsi
jz short loc_9177
mov rdi, rax
call _ZNKSt14default_deleteIN5nglog14CapturedStreamEEclEPS1_; std::default_delete<nglog::CapturedStream>::operator()(nglog::CapturedStream*)
loc_9177:
mov rsi, [rsp+0C8h+var_C0]
test rsi, rsi
jz short loc_918B
lea rdi, [rsp+0C8h+var_C0]
call _ZNKSt14default_deleteIN5nglog14CapturedStreamEEclEPS1_; std::default_delete<nglog::CapturedStream>::operator()(nglog::CapturedStream*)
loc_918B:
mov rdi, [rsp+0C8h+var_B0]
lea rax, [rsp+0C8h+var_A0]
cmp rdi, rax
jz short loc_919F
call _free
loc_919F:
mov rdi, [r13+0]
call _fileno
mov ebp, eax
mov [rsp+0C8h+var_B8], eax
mov rdi, [r15]
call _fileno
cmp eax, ebp
jz short loc_91CB
mov rdi, [r13+0]
call _fileno
cmp eax, ebp
jnz loc_93B7
loc_91CB:
lea r14, _ZN5nglogL18s_captured_streamsE; nglog::s_captured_streams
lea r15, [rsp+0C8h+var_B8]
mov rdi, r14
mov rsi, r15
call _ZNSt3mapIiSt10unique_ptrIN5nglog14CapturedStreamESt14default_deleteIS2_EESt4lessIiESaISt4pairIKiS5_EEE2atERS9_; std::map<int,std::unique_ptr<nglog::CapturedStream>>::at(int const&)
mov rcx, [rax]
mov [rsp+0C8h+var_C0], rcx
mov qword ptr [rax], 0
mov rdi, r14
mov rsi, r15
call _ZNSt8_Rb_treeIiSt4pairIKiSt10unique_ptrIN5nglog14CapturedStreamESt14default_deleteIS4_EEESt10_Select1stIS8_ESt4lessIiESaIS8_EE11equal_rangeERS1_; std::_Rb_tree<int,std::pair<int const,std::unique_ptr<nglog::CapturedStream>>,std::_Select1st<std::pair<int const,std::unique_ptr<nglog::CapturedStream>>>,std::less<int>,std::allocator<std::pair<int const,std::unique_ptr<nglog::CapturedStream>>>>::equal_range(int const&)
lea rdi, _ZN5nglogL18s_captured_streamsE; nglog::s_captured_streams
mov rsi, rax
call _ZNSt8_Rb_treeIiSt4pairIKiSt10unique_ptrIN5nglog14CapturedStreamESt14default_deleteIS4_EEESt10_Select1stIS8_ESt4lessIiESaIS8_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS8_ESG_; std::_Rb_tree<int,std::pair<int const,std::unique_ptr<nglog::CapturedStream>>,std::_Select1st<std::pair<int const,std::unique_ptr<nglog::CapturedStream>>>,std::less<int>,std::allocator<std::pair<int const,std::unique_ptr<nglog::CapturedStream>>>>::_M_erase_aux(std::_Rb_tree_const_iterator<std::pair<int const,std::unique_ptr<nglog::CapturedStream>>>,std::_Rb_tree_const_iterator<std::pair<int const,std::unique_ptr<nglog::CapturedStream>>>)
mov rdi, [rsp+0C8h+var_C0]; this
test rdi, rdi
jz loc_93F6
call _ZN5nglog14CapturedStream11StopCaptureEv; nglog::CapturedStream::StopCapture(void)
mov rax, [rsp+0C8h+var_C0]
mov rdi, [rax+8]
lea rsi, aNglogLogFileHe+14h; "r"
call _fopen
mov r14, rax
mov rdi, rax
xor esi, esi
mov edx, 2
call _fseek
mov rdi, r14
call _ftell
mov r15, rax
lea rdi, [rsp+0C8h+var_90]
lea rdx, [rsp+0C8h+var_B1]
mov rsi, rax
call _ZNSt6vectorIcSaIcEEC2EmRKS0_; std::vector<char>::vector(ulong,std::allocator<char> const&)
xor r12d, r12d
mov rdi, r14
xor esi, esi
xor edx, edx
call _fseek
loc_9271:
mov rdi, [rsp+0C8h+var_90]
add rdi, r12
mov rdx, r15
sub rdx, r12
mov esi, 1
mov rcx, r14
call _fread
add r12, rax
test rax, rax
jz short loc_9299
cmp r12, r15
jb short loc_9271
loc_9299:
mov rsi, [rsp+0C8h+var_90]
lea rdi, [rsp+0C8h+var_B0]
lea rax, [rsp+0C8h+var_A0]
mov [rdi], rax
add r12, rsi
mov rdx, r12
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)
mov rdi, [rsp+0C8h+var_90]
test rdi, rdi
jz short loc_92C5
call _free
loc_92C5:
test r14, r14
jz short loc_92D2
mov rdi, r14
call _fclose
loc_92D2:
mov rsi, [rsp+0C8h+var_C0]; char *
test rsi, rsi
jz short loc_92E6
lea rdi, [rsp+0C8h+var_C0]; this
call _ZNKSt14default_deleteIN5nglog14CapturedStreamEEclEPS1_; std::default_delete<nglog::CapturedStream>::operator()(nglog::CapturedStream*)
loc_92E6:
call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void)
test al, al
jnz loc_944E
mov rdi, [rbx]; this
call _ZN5nglog17InitializeLoggingEPKc; nglog::InitializeLogging(char const*)
call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void)
test al, al
jz loc_9453
mov rbx, qword ptr cs:_ZN5nglog10g_testlistE; nglog::g_testlist
cmp rbx, qword ptr cs:_ZN5nglog10g_testlistE+8; nglog::g_testlist
jnz short loc_931D
mov rax, rbx
jmp short loc_9333
loc_931D:
call qword ptr [rbx]
add rbx, 8
cmp rbx, qword ptr cs:_ZN5nglog10g_testlistE+8; nglog::g_testlist
jnz short loc_931D
mov rax, qword ptr cs:_ZN5nglog10g_testlistE; nglog::g_testlist
loc_9333:
sub rbx, rax
mov rdi, [r13+0]
shr rbx, 3
lea rsi, aPassedDTestsPa; "Passed %d tests\n\nPASS\n"
mov edx, ebx
xor eax, eax
call _fprintf
mov rdi, [rsp+0C8h+var_B0]
lea rax, [rsp+0C8h+var_A0]
cmp rdi, rax
jz short loc_9362
call _free
loc_9362:
xor eax, eax
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9376:
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+0C8h+var_90]; this
mov edx, 16Bh; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
lea rbx, [rsp+0C8h+var_90]
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedFdF; "Check failed: (fd == fileno(stdout)) ||"...
mov edx, 3Fh ; '?'
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)
loc_93AD:
lea rdi, [rsp+0C8h+var_90]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_93B7:
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rbx, [rsp+0C8h+var_90]
mov rdi, rbx; this
mov edx, 190h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedFdF; "Check failed: (fd == fileno(stdout)) ||"...
mov edx, 3Fh ; '?'
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)
lea rdi, [rsp+0C8h+var_90]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_93F6:
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+0C8h+var_90]; this
mov edx, 193h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
lea rbx, [rsp+0C8h+var_90]
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov r14, rax
lea rsi, aCheckFailedCap; "Check failed: cap "
mov edx, 12h
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)
lea rsi, aDidYouForgetCa; ": did you forget CaptureTestStdout() or"...
mov edx, 3Ch ; '<'
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+0C8h+var_90]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_944E:
call main_cold_2
loc_9453:
call main_cold_1
loc_9458:
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+0C8h+var_90]; this
mov edx, 16Ch; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
lea rbx, [rsp+0C8h+var_90]
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedSCa; "Check failed: s_captured_streams.find(f"...
mov edx, 46h ; 'F'
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)
jmp loc_93AD
jmp short loc_94F5
mov rbx, rax
mov rdi, [rsp+arg_30]
test rdi, rdi
jz short loc_94AD
call _free
jmp short loc_94AD
mov rbx, rax
loc_94AD:
test r14, r14
jz short loc_9506
mov rdi, r14
call _fclose
jmp short loc_9506
mov rbx, rax
lea rdi, [rsp+arg_0]
mov rsi, r14
call _ZNKSt14default_deleteIN5nglog14CapturedStreamEEclEPS1_; std::default_delete<nglog::CapturedStream>::operator()(nglog::CapturedStream*)
jmp short loc_951F
mov rbx, rax
mov rdi, [rsp+arg_30]
cmp rdi, r12
jz short loc_94E5
call _free
jmp short loc_94E5
mov rbx, rax
loc_94E5:
mov rdi, r14
call _free
jmp short loc_951F
jmp short loc_951C
jmp short loc_951C
jmp short loc_9503
loc_94F5:
mov rdi, rbx; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short loc_9543
jmp short loc_953B
jmp short loc_951C
loc_9503:
mov rbx, rax
loc_9506:
mov rsi, [rsp+arg_0]
test rsi, rsi
jz short loc_9533
lea rdi, [rsp+arg_0]
call _ZNKSt14default_deleteIN5nglog14CapturedStreamEEclEPS1_; std::default_delete<nglog::CapturedStream>::operator()(nglog::CapturedStream*)
jmp short loc_9533
loc_951C:
mov rbx, rax
loc_951F:
mov rdi, [rsp+arg_10]
lea rax, [rsp+arg_20]
cmp rdi, rax
jz short loc_9533
call _free
loc_9533:
mov rdi, rbx
call __Unwind_Resume
loc_953B:
mov rdi, rbx; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_9543:
mov rdi, rax
call __clang_call_terminate
| int main(int argc, const char **argv, const char **envp)
{
int v4; // ebp
long long v5; // rcx
int *v6; // rax
nglog::CapturedStream *v7; // r14
nglog::CapturedStream **v8; // rax
nglog::CapturedStream *v9; // rsi
int v10; // ebp
nglog::CapturedStream **v11; // rax
long long v12; // rax
long long v13; // r14
unsigned long long v14; // r15
unsigned long long v15; // r12
long long v16; // rax
nglog::CapturedStream **v17; // rdi
nglog::CapturedStream *v18; // rsi
nglog *v19; // rdi
void (**v20)(void); // rbx
long long v21; // rax
long long v23; // rax
long long v24; // rax
long long v25; // r14
long long v26; // rax
nglog::CapturedStream *v27; // [rsp+8h] [rbp-C0h] BYREF
int v28; // [rsp+10h] [rbp-B8h] BYREF
char v29; // [rsp+17h] [rbp-B1h] BYREF
void *v30[2]; // [rsp+18h] [rbp-B0h] BYREF
_BYTE v31[16]; // [rsp+28h] [rbp-A0h] BYREF
void *v32[2]; // [rsp+38h] [rbp-90h] BYREF
_BYTE v33[128]; // [rsp+48h] [rbp-80h] BYREF
fLB::FLAGS_colorlogtostderr = 0;
fLB::FLAGS_timestamp_in_logfile_name = 1;
setbuf(stderr, 0LL, envp);
v4 = fileno(stderr);
v30[0] = v31;
std::string::_M_construct<char *>(
v30,
fLS::FLAGS_test_tmpdir_buf[abi:cxx11],
fLS::FLAGS_test_tmpdir_buf[abi:cxx11] + qword_319B0);
std::string::append(v30, "/captured.err");
v28 = v4;
if ( (unsigned int)fileno(stdout) != v4 && (unsigned int)fileno(stderr) != v4 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v32,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
363);
v23 = nglog::LogMessage::stream((nglog::LogMessage *)v32);
std::__ostream_insert<char,std::char_traits<char>>(
v23,
"Check failed: (fd == fileno(stdout)) || (fd == fileno(stderr)) ",
63LL);
goto LABEL_40;
}
v5 = qword_31A50;
if ( qword_31A50 )
{
v6 = &dword_31A48;
do
{
if ( *(_DWORD *)(v5 + 32) >= v4 )
v6 = (int *)v5;
v5 = *(_QWORD *)(v5 + 8LL * (*(_DWORD *)(v5 + 32) < v4) + 16);
}
while ( v5 );
if ( v6 != &dword_31A48 && v6[8] <= v4 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v32,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
364);
v26 = nglog::LogMessage::stream((nglog::LogMessage *)v32);
std::__ostream_insert<char,std::char_traits<char>>(
v26,
"Check failed: s_captured_streams.find(fd) == s_captured_streams.end() ",
70LL);
LABEL_40:
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v32);
}
}
v7 = (nglog::CapturedStream *)operator new(40LL);
v32[0] = v33;
std::string::_M_construct<char *>(v32, v30[0], (char *)v30[0] + (unsigned long long)v30[1]);
nglog::CapturedStream::CapturedStream(v7);
v27 = v7;
if ( v32[0] != v33 )
free(v32[0]);
v8 = (nglog::CapturedStream **)std::map<int,std::unique_ptr<nglog::CapturedStream>>::operator[](
&nglog::s_captured_streams,
&v28);
v27 = 0LL;
v9 = *v8;
*v8 = v7;
if ( v9 )
std::default_delete<nglog::CapturedStream>::operator()(v8);
if ( v27 )
std::default_delete<nglog::CapturedStream>::operator()(&v27);
if ( v30[0] != v31 )
free(v30[0]);
v10 = fileno(stderr);
v28 = v10;
if ( (unsigned int)fileno(stdout) != v10 && (unsigned int)fileno(stderr) != v10 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v32,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
400);
v24 = nglog::LogMessage::stream((nglog::LogMessage *)v32);
std::__ostream_insert<char,std::char_traits<char>>(
v24,
"Check failed: (fd == fileno(stdout)) || (fd == fileno(stderr)) ",
63LL);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v32);
}
v11 = (nglog::CapturedStream **)std::map<int,std::unique_ptr<nglog::CapturedStream>>::at(
&nglog::s_captured_streams,
&v28);
v27 = *v11;
*v11 = 0LL;
v12 = std::_Rb_tree<int,std::pair<int const,std::unique_ptr<nglog::CapturedStream>>,std::_Select1st<std::pair<int const,std::unique_ptr<nglog::CapturedStream>>>,std::less<int>,std::allocator<std::pair<int const,std::unique_ptr<nglog::CapturedStream>>>>::equal_range(
&nglog::s_captured_streams,
&v28);
std::_Rb_tree<int,std::pair<int const,std::unique_ptr<nglog::CapturedStream>>,std::_Select1st<std::pair<int const,std::unique_ptr<nglog::CapturedStream>>>,std::less<int>,std::allocator<std::pair<int const,std::unique_ptr<nglog::CapturedStream>>>>::_M_erase_aux(
&nglog::s_captured_streams,
v12);
if ( !v27 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v32,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
403);
v25 = nglog::LogMessage::stream((nglog::LogMessage *)v32);
std::__ostream_insert<char,std::char_traits<char>>(v25, "Check failed: cap ", 18LL);
std::__ostream_insert<char,std::char_traits<char>>(
v25,
": did you forget CaptureTestStdout() or CaptureTestStderr()?",
60LL);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v32);
}
nglog::CapturedStream::StopCapture(v27);
v13 = fopen(*((_QWORD *)v27 + 1), "r");
fseek(v13, 0LL, 2LL);
v14 = ftell(v13);
std::vector<char>::vector(v32, v14, &v29);
v15 = 0LL;
fseek(v13, 0LL, 0LL);
do
{
v16 = fread((char *)v32[0] + v15, 1LL, v14 - v15, v13);
v15 += v16;
}
while ( v16 && v15 < v14 );
v30[0] = v31;
std::string::_M_construct<char const*>(v30, v32[0], (char *)v32[0] + v15);
v17 = (nglog::CapturedStream **)v32[0];
if ( v32[0] )
free(v32[0]);
if ( v13 )
{
v17 = (nglog::CapturedStream **)v13;
fclose(v13);
}
v18 = v27;
if ( v27 )
{
v17 = &v27;
std::default_delete<nglog::CapturedStream>::operator()(&v27);
}
if ( (unsigned __int8)nglog::IsLoggingInitialized((nglog *)v17) )
main_cold_2();
v19 = (nglog *)*argv;
nglog::InitializeLogging((nglog *)*argv, (const char *)v18);
if ( !(unsigned __int8)nglog::IsLoggingInitialized(v19) )
main_cold_1();
v20 = (void (**)(void))nglog::g_testlist;
if ( (_QWORD)nglog::g_testlist == *((_QWORD *)&nglog::g_testlist + 1) )
{
v21 = nglog::g_testlist;
}
else
{
do
(*v20++)();
while ( v20 != *((void (***)(void))&nglog::g_testlist + 1) );
v21 = nglog::g_testlist;
}
fprintf(stderr, "Passed %d tests\n\nPASS\n", ((unsigned long long)v20 - v21) >> 3);
if ( v30[0] != v31 )
free(v30[0]);
return 0;
}
| main:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV RBX,RSI
LEA RAX,[0x131a7e]
MOV byte ptr [RAX],0x0
LEA RAX,[0x131a78]
MOV byte ptr [RAX],0x1
MOV R13,qword ptr [0x00130f98]
MOV RDI,qword ptr [R13]
XOR ESI,ESI
CALL 0x001077e0
MOV RDI,qword ptr [R13]
CALL 0x00107570
MOV EBP,EAX
LEA RAX,[RSP + 0x28]
MOV qword ptr [RAX + -0x10],RAX
MOV RSI,qword ptr [0x001319a8]
MOV RDX,qword ptr [0x001319b0]
ADD RDX,RSI
LEA R14,[RSP + 0x18]
MOV RDI,R14
CALL 0x00109922
LAB_00109084:
LEA RSI,[0x123169]
MOV RDI,R14
CALL 0x00107a40
MOV dword ptr [RSP + 0x10],EBP
MOV R15,qword ptr [0x00130f00]
MOV RDI,qword ptr [R15]
CALL 0x00107570
CMP EAX,EBP
JZ 0x001090bb
MOV RDI,qword ptr [R13]
CALL 0x00107570
CMP EAX,EBP
JNZ 0x00109376
LAB_001090bb:
MOV RCX,qword ptr [0x00131a50]
TEST RCX,RCX
JZ 0x001090f9
LEA RAX,[0x131a48]
LAB_001090ce:
XOR EDX,EDX
CMP dword ptr [RCX + 0x20],EBP
SETL DL
CMOVGE RAX,RCX
MOV RCX,qword ptr [RCX + RDX*0x8 + 0x10]
TEST RCX,RCX
JNZ 0x001090ce
LEA RCX,[0x131a48]
CMP RAX,RCX
JZ 0x001090f9
CMP dword ptr [RAX + 0x20],EBP
JLE 0x00109458
LAB_001090f9:
MOV EDI,0x28
CALL 0x00108eb0
MOV R14,RAX
LEA R12,[RSP + 0x48]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
ADD RDX,RSI
LAB_0010911d:
LEA RDI,[RSP + 0x38]
CALL 0x00109922
LAB_00109127:
LEA RDX,[RSP + 0x38]
MOV RDI,R14
MOV ESI,EBP
CALL 0x00109d8a
MOV qword ptr [RSP + 0x8],R14
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R12
JZ 0x0010914a
CALL 0x00107670
LAB_0010914a:
LEA RDI,[0x131a40]
LEA RSI,[RSP + 0x10]
CALL 0x00109d24
LAB_0010915b:
MOV qword ptr [RSP + 0x8],0x0
MOV RSI,qword ptr [RAX]
MOV qword ptr [RAX],R14
TEST RSI,RSI
JZ 0x00109177
MOV RDI,RAX
CALL 0x00109a82
LAB_00109177:
MOV RSI,qword ptr [RSP + 0x8]
TEST RSI,RSI
JZ 0x0010918b
LEA RDI,[RSP + 0x8]
CALL 0x00109a82
LAB_0010918b:
MOV RDI,qword ptr [RSP + 0x18]
LEA RAX,[RSP + 0x28]
CMP RDI,RAX
JZ 0x0010919f
CALL 0x00107670
LAB_0010919f:
MOV RDI,qword ptr [R13]
CALL 0x00107570
MOV EBP,EAX
MOV dword ptr [RSP + 0x10],EAX
MOV RDI,qword ptr [R15]
CALL 0x00107570
CMP EAX,EBP
JZ 0x001091cb
MOV RDI,qword ptr [R13]
CALL 0x00107570
CMP EAX,EBP
JNZ 0x001093b7
LAB_001091cb:
LEA R14,[0x131a40]
LEA R15,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x0010a240
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RAX],0x0
LAB_001091f1:
MOV RDI,R14
MOV RSI,R15
CALL 0x0010a2fc
LEA RDI,[0x131a40]
MOV RSI,RAX
CALL 0x0010a37a
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001093f6
CALL 0x0010a286
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[0x123559]
CALL 0x00107650
MOV R14,RAX
MOV RDI,RAX
XOR ESI,ESI
MOV EDX,0x2
CALL 0x001075c0
MOV RDI,R14
CALL 0x00107030
MOV R15,RAX
LAB_00109250:
LEA RDI,[RSP + 0x38]
LEA RDX,[RSP + 0x17]
MOV RSI,RAX
CALL 0x0010a41e
XOR R12D,R12D
MOV RDI,R14
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001075c0
LAB_00109271:
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,R12
MOV RDX,R15
SUB RDX,R12
MOV ESI,0x1
MOV RCX,R14
CALL 0x00107860
ADD R12,RAX
TEST RAX,RAX
JZ 0x00109299
CMP R12,R15
JC 0x00109271
LAB_00109299:
MOV RSI,qword ptr [RSP + 0x38]
LEA RDI,[RSP + 0x18]
LEA RAX,[RSP + 0x28]
MOV qword ptr [RDI],RAX
ADD R12,RSI
LAB_001092ae:
MOV RDX,R12
CALL 0x0010a4b6
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x001092c5
CALL 0x00107670
LAB_001092c5:
TEST R14,R14
JZ 0x001092d2
MOV RDI,R14
CALL 0x00107520
LAB_001092d2:
MOV RSI,qword ptr [RSP + 0x8]
TEST RSI,RSI
JZ 0x001092e6
LEA RDI,[RSP + 0x8]
CALL 0x00109a82
LAB_001092e6:
CALL 0x00121f7c
TEST AL,AL
JNZ 0x0010944e
MOV RDI,qword ptr [RBX]
CALL 0x0010f1b2
CALL 0x00121f7c
TEST AL,AL
JZ 0x00109453
MOV RBX,qword ptr [0x001319f8]
CMP RBX,qword ptr [0x00131a00]
JNZ 0x0010931d
MOV RAX,RBX
JMP 0x00109333
LAB_0010931d:
CALL qword ptr [RBX]
ADD RBX,0x8
CMP RBX,qword ptr [0x00131a00]
JNZ 0x0010931d
MOV RAX,qword ptr [0x001319f8]
LAB_00109333:
SUB RBX,RAX
MOV RDI,qword ptr [R13]
SHR RBX,0x3
LEA RSI,[0x1233c6]
MOV EDX,EBX
XOR EAX,EAX
CALL 0x00107800
MOV RDI,qword ptr [RSP + 0x18]
LEA RAX,[RSP + 0x28]
CMP RDI,RAX
JZ 0x00109362
CALL 0x00107670
LAB_00109362:
XOR EAX,EAX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00109376:
LEA RSI,[0x123177]
LEA RDI,[RSP + 0x38]
MOV EDX,0x16b
CALL 0x0010ee3a
LAB_0010938c:
LEA RBX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x0010b5b2
LEA RSI,[0x1231c0]
MOV EDX,0x3f
MOV RDI,RAX
CALL 0x00107600
LAB_001093ad:
LEA RDI,[RSP + 0x38]
LAB_001093b2:
CALL 0x0010ee7e
LAB_001093b7:
LEA RSI,[0x123177]
LEA RBX,[RSP + 0x38]
MOV RDI,RBX
MOV EDX,0x190
CALL 0x0010ee3a
LAB_001093d0:
MOV RDI,RBX
CALL 0x0010b5b2
LEA RSI,[0x1231c0]
MOV EDX,0x3f
MOV RDI,RAX
CALL 0x00107600
LAB_001093ec:
LEA RDI,[RSP + 0x38]
CALL 0x0010ee7e
LAB_001093f6:
LEA RSI,[0x123177]
LEA RDI,[RSP + 0x38]
MOV EDX,0x193
CALL 0x0010ee3a
LAB_0010940c:
LEA RBX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x0010b5b2
MOV R14,RAX
LEA RSI,[0x123308]
MOV EDX,0x12
MOV RDI,RAX
CALL 0x00107600
LEA RSI,[0x12331b]
MOV EDX,0x3c
MOV RDI,R14
CALL 0x00107600
LAB_00109444:
LEA RDI,[RSP + 0x38]
CALL 0x0010ee7e
LAB_0010944e:
CALL 0x00107ae8
LAB_00109453:
CALL 0x00107ac0
LAB_00109458:
LEA RSI,[0x123177]
LEA RDI,[RSP + 0x38]
MOV EDX,0x16c
CALL 0x0010ee3a
LAB_0010946e:
LEA RBX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x0010b5b2
LEA RSI,[0x123200]
MOV EDX,0x46
MOV RDI,RAX
CALL 0x00107600
JMP 0x001093ad
|
int8 main(int8 param_1,int8 *param_2)
{
CapturedStream *pCVar1;
int *puVar2;
int *puVar3;
char cVar4;
int iVar5;
int iVar6;
long lVar7;
CapturedStream *pCVar8;
default_delete<nglog::CapturedStream> *this;
int8 *puVar9;
int8 uVar10;
FILE *__stream;
allocator *paVar11;
size_t sVar12;
ostream *poVar13;
long lVar14;
allocator *paVar15;
CapturedStream *local_c0;
int local_b8 [2];
int1 *local_b0;
long local_a8;
int1 local_a0 [16];
int1 *local_90 [2];
int1 local_80 [80];
puVar3 = PTR_stderr_00130f98;
fLB::FLAGS_colorlogtostderr = 0;
fLB::FLAGS_timestamp_in_logfile_name = 1;
setbuf(*(FILE **)PTR_stderr_00130f98,(char *)0x0);
iVar5 = fileno(*(FILE **)puVar3);
local_b0 = local_a0;
std::__cxx11::string::_M_construct<char*>
(&local_b0,fLS::FLAGS_test_tmpdir_buf_abi_cxx11_,
DAT_001319b0 + fLS::FLAGS_test_tmpdir_buf_abi_cxx11_);
/* try { // try from 00109084 to 00109092 has its CatchHandler @ 001094ef */
std::__cxx11::string::append((char *)&local_b0);
puVar2 = PTR_stdout_00130f00;
local_b8[0] = iVar5;
iVar6 = fileno(*(FILE **)PTR_stdout_00130f00);
if ((iVar6 != iVar5) && (iVar6 = fileno(*(FILE **)puVar3), iVar6 != iVar5)) {
/* try { // try from 00109376 to 0010938b has its CatchHandler @ 0010951c */
nglog::LogMessageFatal::LogMessageFatal
((LogMessageFatal *)local_90,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",0x16b);
/* try { // try from 0010938c to 001093ac has its CatchHandler @ 001094f5 */
poVar13 = (ostream *)nglog::LogMessage::stream((LogMessage *)local_90);
std::__ostream_insert<char,std::char_traits<char>>
(poVar13,"Check failed: (fd == fileno(stdout)) || (fd == fileno(stderr)) ",0x3f);
goto LAB_001093ad;
}
if (nglog::s_captured_streams._16_8_ != 0) {
lVar7 = 0x131a48;
lVar14 = nglog::s_captured_streams._16_8_;
do {
if (iVar5 <= *(int *)(lVar14 + 0x20)) {
lVar7 = lVar14;
}
lVar14 = *(long *)(lVar14 + 0x10 + (ulong)(*(int *)(lVar14 + 0x20) < iVar5) * 8);
} while (lVar14 != 0);
if ((lVar7 != 0x131a48) && (*(int *)(lVar7 + 0x20) <= iVar5)) goto LAB_00109458;
}
/* try { // try from 001090f9 to 00109102 has its CatchHandler @ 0010951c */
pCVar8 = (CapturedStream *)operator_new(0x28);
/* try { // try from 0010911d to 00109126 has its CatchHandler @ 001094e2 */
local_90[0] = local_80;
std::__cxx11::string::_M_construct<char*>(local_90,local_b0,local_b0 + local_a8);
/* try { // try from 00109127 to 00109135 has its CatchHandler @ 001094ce */
nglog::CapturedStream::CapturedStream(pCVar8,iVar5,local_90);
local_c0 = pCVar8;
if (local_90[0] != local_80) {
free(local_90[0]);
}
/* try { // try from 0010914a to 0010915a has its CatchHandler @ 001094bc */
this = (default_delete<nglog::CapturedStream> *)
std::
map<int,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>,std::less<int>,std::allocator<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>>
::operator[]((map<int,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>,std::less<int>,std::allocator<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>>
*)nglog::s_captured_streams,local_b8);
local_c0 = (CapturedStream *)0x0;
pCVar1 = *(CapturedStream **)this;
*(CapturedStream **)this = pCVar8;
if (pCVar1 != (CapturedStream *)0x0) {
std::default_delete<nglog::CapturedStream>::operator()(this,pCVar1);
}
if (local_c0 != (CapturedStream *)0x0) {
std::default_delete<nglog::CapturedStream>::operator()
((default_delete<nglog::CapturedStream> *)&local_c0,local_c0);
}
if (local_b0 != local_a0) {
free(local_b0);
}
iVar5 = fileno(*(FILE **)puVar3);
local_b8[0] = iVar5;
iVar6 = fileno(*(FILE **)puVar2);
if ((iVar6 != iVar5) && (iVar6 = fileno(*(FILE **)puVar3), iVar6 != iVar5)) goto LAB_001093b7;
puVar9 = (int8 *)
std::
map<int,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>,std::less<int>,std::allocator<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>>
::at((map<int,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>,std::less<int>,std::allocator<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>>
*)nglog::s_captured_streams,local_b8);
local_c0 = (CapturedStream *)*puVar9;
*puVar9 = 0;
/* try { // try from 001091f1 to 0010921d has its CatchHandler @ 001094f3 */
uVar10 = std::
_Rb_tree<int,std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>,std::_Select1st<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>,std::less<int>,std::allocator<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>>
::equal_range((_Rb_tree<int,std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>,std::_Select1st<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>,std::less<int>,std::allocator<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>>
*)nglog::s_captured_streams,local_b8);
std::
_Rb_tree<int,std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>,std::_Select1st<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>,std::less<int>,std::allocator<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>>
::_M_erase_aux((_Rb_tree<int,std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>,std::_Select1st<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>,std::less<int>,std::allocator<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>>
*)nglog::s_captured_streams,uVar10);
if (local_c0 == (CapturedStream *)0x0) goto LAB_001093f6;
nglog::CapturedStream::StopCapture(local_c0);
__stream = fopen(*(char **)(local_c0 + 8),"r");
fseek(__stream,0,2);
paVar11 = (allocator *)ftell(__stream);
/* try { // try from 00109250 to 00109261 has its CatchHandler @ 001094aa */
std::vector<char,std::allocator<char>>::vector((ulong)local_90,paVar11);
paVar15 = (allocator *)0x0;
fseek(__stream,0,0);
do {
sVar12 = fread(local_90[0] + (long)paVar15,1,(long)paVar11 - (long)paVar15,__stream);
paVar15 = paVar15 + sVar12;
if (sVar12 == 0) break;
} while (paVar15 < paVar11);
local_b0 = local_a0;
/* try { // try from 001092ae to 001092b5 has its CatchHandler @ 00109496 */
std::__cxx11::string::_M_construct<char_const*>(&local_b0,local_90[0],paVar15 + (long)local_90[0])
;
if (local_90[0] != (int1 *)0x0) {
free(local_90[0]);
}
if (__stream != (FILE *)0x0) {
fclose(__stream);
}
if (local_c0 != (CapturedStream *)0x0) {
std::default_delete<nglog::CapturedStream>::operator()
((default_delete<nglog::CapturedStream> *)&local_c0,local_c0);
}
/* try { // try from 001092e6 to 001092ff has its CatchHandler @ 001094f1 */
cVar4 = nglog::IsLoggingInitialized();
if (cVar4 != '\0') goto LAB_0010944e;
nglog::InitializeLogging((char *)*param_2);
cVar4 = nglog::IsLoggingInitialized();
if (cVar4 == '\0') {
do {
main_cold_1();
LAB_00109458:
/* try { // try from 00109458 to 0010946d has its CatchHandler @ 0010951c */
nglog::LogMessageFatal::LogMessageFatal
((LogMessageFatal *)local_90,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",0x16c);
/* try { // try from 0010946e to 0010948e has its CatchHandler @ 00109494 */
poVar13 = (ostream *)nglog::LogMessage::stream((LogMessage *)local_90);
std::__ostream_insert<char,std::char_traits<char>>
(poVar13,"Check failed: s_captured_streams.find(fd) == s_captured_streams.end() ",
0x46);
LAB_001093ad:
/* try { // try from 001093b2 to 001093b6 has its CatchHandler @ 0010951c */
nglog::LogMessageFatal::~LogMessageFatal((LogMessageFatal *)local_90);
LAB_001093b7:
nglog::LogMessageFatal::LogMessageFatal
((LogMessageFatal *)local_90,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",400);
/* try { // try from 001093d0 to 001093eb has its CatchHandler @ 0010953b */
poVar13 = (ostream *)nglog::LogMessage::stream((LogMessage *)local_90);
std::__ostream_insert<char,std::char_traits<char>>
(poVar13,"Check failed: (fd == fileno(stdout)) || (fd == fileno(stderr)) ",0x3f);
nglog::LogMessageFatal::~LogMessageFatal((LogMessageFatal *)local_90);
LAB_001093f6:
/* try { // try from 001093f6 to 0010940b has its CatchHandler @ 00109503 */
nglog::LogMessageFatal::LogMessageFatal
((LogMessageFatal *)local_90,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",0x193);
/* try { // try from 0010940c to 00109443 has its CatchHandler @ 001094ff */
poVar13 = (ostream *)nglog::LogMessage::stream((LogMessage *)local_90);
std::__ostream_insert<char,std::char_traits<char>>(poVar13,"Check failed: cap ",0x12);
std::__ostream_insert<char,std::char_traits<char>>
(poVar13,": did you forget CaptureTestStdout() or CaptureTestStderr()?",0x3c);
/* try { // try from 00109444 to 0010944d has its CatchHandler @ 00109503 */
nglog::LogMessageFatal::~LogMessageFatal((LogMessageFatal *)local_90);
LAB_0010944e:
main_cold_2();
} while( true );
}
puVar9 = nglog::g_testlist;
if (nglog::g_testlist != DAT_00131a00) {
do {
/* try { // try from 0010931d to 0010931e has its CatchHandler @ 00109501 */
(*(code *)*puVar9)();
puVar9 = puVar9 + 1;
} while (puVar9 != DAT_00131a00);
}
fprintf(*(FILE **)puVar3,"Passed %d tests\n\nPASS\n",
(ulong)((long)puVar9 - (long)nglog::g_testlist) >> 3 & 0xffffffff);
if (local_b0 != local_a0) {
free(local_b0);
}
return 0;
}
| |
39,311 | fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>::operator=(fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&&) | AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | auto operator=(basic_memory_buffer&& other) noexcept -> basic_memory_buffer& {
FMT_ASSERT(this != &other, "");
deallocate();
move(other);
return *this;
} | O3 | c | fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>::operator=(fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0x20(%rbx), %rax
cmpq %rax, %rdi
je 0x2fb8e
movq 0x18(%rbx), %rsi
callq 0x11120
movq %rbx, %rdi
movq %r14, %rsi
callq 0x32c2e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x18a8f
| _ZN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEaSEOS3_:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi+8]; void *
lea rax, [rbx+20h]
cmp rdi, rax
jz short loc_2FB8E
mov rsi, [rbx+18h]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2FB8E:
mov rdi, rbx
mov rsi, r14
call _ZN3fmt3v1019basic_memory_bufferIcLm250ESaIcEE4moveERS3_; fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::move(fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>&)
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
mov rdi, rax
call __clang_call_terminate
| _QWORD * fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::operator=(_QWORD *a1, long long a2)
{
_QWORD *v3; // rdi
v3 = (_QWORD *)a1[1];
if ( v3 != a1 + 4 )
operator delete(v3, a1[3]);
fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::move(a1, a2);
return a1;
}
| operator=:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
LEA RAX,[RBX + 0x20]
CMP RDI,RAX
JZ 0x0012fb8e
MOV RSI,qword ptr [RBX + 0x18]
CALL 0x00111120
LAB_0012fb8e:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00132c2e
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>
>::TEMPNAMEPLACEHOLDERVALUE(fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&&)
*/
basic_memory_buffer<char,250ul,std::allocator<char>> * __thiscall
fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::operator=
(basic_memory_buffer<char,250ul,std::allocator<char>> *this,basic_memory_buffer *param_1)
{
if (*(basic_memory_buffer<char,250ul,std::allocator<char>> **)(this + 8) != this + 0x20) {
operator_delete(*(basic_memory_buffer<char,250ul,std::allocator<char>> **)(this + 8),
*(ulong *)(this + 0x18));
}
/* try { // try from 0012fb8e to 0012fb98 has its CatchHandler @ 0012fba4 */
move(this,param_1);
return this;
}
| |
39,312 | mi_find_writepos | eloqsql/storage/myisam/mi_dynrec.c | static int _mi_find_writepos(MI_INFO *info,
ulong reclength, /* record length */
my_off_t *filepos, /* Return file pos */
ulong *length) /* length of block at filepos */
{
MI_BLOCK_INFO block_info;
ulong tmp;
DBUG_ENTER("_mi_find_writepos");
if (info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end)
{
/* Deleted blocks exists; Get last used block */
*filepos=info->s->state.dellink;
block_info.second_read=0;
info->rec_cache.seek_not_done=1;
if (!(_mi_get_block_info(&block_info,info->dfile,info->s->state.dellink) &
BLOCK_DELETED))
{
DBUG_PRINT("error",("Delete link crashed"));
my_errno=HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(-1);
}
info->s->state.dellink=block_info.next_filepos;
info->state->del--;
info->state->empty-= block_info.block_len;
*length= block_info.block_len;
}
else
{
/* No deleted blocks; Allocate a new block */
*filepos=info->state->data_file_length;
if ((tmp= reclength + 3 + MY_TEST(reclength >= (65520 - 3))) <
info->s->base.min_block_length)
tmp= info->s->base.min_block_length;
else
tmp= ((tmp+MI_DYN_ALIGN_SIZE-1) &
(~ (ulong) (MI_DYN_ALIGN_SIZE-1)));
if (info->state->data_file_length >
(info->s->base.max_data_file_length - tmp))
{
my_errno=HA_ERR_RECORD_FILE_FULL;
DBUG_RETURN(-1);
}
if (tmp > MI_MAX_BLOCK_LENGTH)
tmp=MI_MAX_BLOCK_LENGTH;
*length= tmp;
info->state->data_file_length+= tmp;
info->s->state.split++;
info->update|=HA_STATE_WRITE_AT_END;
}
DBUG_RETURN(0);
} | O3 | c | mi_find_writepos:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rcx, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movq (%rdi), %rax
movq 0x58(%rax), %rax
cmpq $-0x1, %rax
je 0x7cf66
cmpb $0x0, 0x33a(%r14)
je 0x7cfe2
movq 0x8(%r14), %rax
movq 0x28(%rax), %rax
movq %rax, (%rdx)
cmpq $0xffed, %rsi # imm = 0xFFED
sbbq $-0x1, %rsi
leaq 0x3(%rsi), %rax
movq (%r14), %rcx
movq 0x8(%r14), %rdx
movq 0x160(%rcx), %rdi
addq $0x6, %rsi
andq $-0x4, %rsi
cmpq %rdi, %rax
cmovbq %rdi, %rsi
movq 0x110(%rcx), %rax
subq %rsi, %rax
cmpq %rax, 0x28(%rdx)
jbe 0x7cfba
callq 0xa48d6
movl $0x87, (%rax)
jmp 0x7d01d
movl $0xfffffc, %eax # imm = 0xFFFFFC
cmpq %rax, %rsi
cmovbq %rsi, %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rcx
addq %rax, 0x28(%rcx)
movq (%r14), %rax
incq 0x50(%rax)
orb $0x1, 0x1d1(%r14)
jmp 0x7d04a
movq %rax, (%rdx)
leaq -0x70(%rbp), %rdi
movl $0x0, 0x50(%rdi)
movl $0x1, 0x300(%r14)
movl 0x1c0(%r14), %esi
movq (%r14), %rax
movq 0x58(%rax), %rdx
callq 0x7b4df
testb $0x4, %al
jne 0x7d024
callq 0xa48d6
movl $0x7f, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x7d04c
movq -0x30(%rbp), %rax
movq (%r14), %rcx
movq %rax, 0x58(%rcx)
movq 0x8(%r14), %rax
decq 0x8(%rax)
movq -0x48(%rbp), %rax
movq 0x8(%r14), %rcx
subq %rax, 0x10(%rcx)
movq -0x48(%rbp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x7d064
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x29240
nopl (%rax)
| _mi_find_writepos:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 60h
mov rbx, rcx
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
mov rax, [rdi]
mov rax, [rax+58h]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_7CF66
cmp byte ptr [r14+33Ah], 0
jz short loc_7CFE2
loc_7CF66:
mov rax, [r14+8]
mov rax, [rax+28h]
mov [rdx], rax
cmp rsi, 0FFEDh
sbb rsi, 0FFFFFFFFFFFFFFFFh
lea rax, [rsi+3]
mov rcx, [r14]
mov rdx, [r14+8]
mov rdi, [rcx+160h]
add rsi, 6
and rsi, 0FFFFFFFFFFFFFFFCh
cmp rax, rdi
cmovb rsi, rdi
mov rax, [rcx+110h]
sub rax, rsi
cmp [rdx+28h], rax
jbe short loc_7CFBA
call _my_thread_var
mov dword ptr [rax], 87h
jmp short loc_7D01D
loc_7CFBA:
mov eax, 0FFFFFCh
cmp rsi, rax
cmovb rax, rsi
mov [rbx], rax
mov rcx, [r14+8]
add [rcx+28h], rax
mov rax, [r14]
inc qword ptr [rax+50h]
or byte ptr [r14+1D1h], 1
jmp short loc_7D04A
loc_7CFE2:
mov [rdx], rax
lea rdi, [rbp+var_70]
mov dword ptr [rdi+50h], 0
mov dword ptr [r14+300h], 1
mov esi, [r14+1C0h]
mov rax, [r14]
mov rdx, [rax+58h]
call _mi_get_block_info
test al, 4
jnz short loc_7D024
call _my_thread_var
mov dword ptr [rax], 7Fh
loc_7D01D:
mov eax, 0FFFFFFFFh
jmp short loc_7D04C
loc_7D024:
mov rax, [rbp+var_30]
mov rcx, [r14]
mov [rcx+58h], rax
mov rax, [r14+8]
dec qword ptr [rax+8]
mov rax, [rbp+var_48]
mov rcx, [r14+8]
sub [rcx+10h], rax
mov rax, [rbp+var_48]
mov [rbx], rax
loc_7D04A:
xor eax, eax
loc_7D04C:
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_7D064
add rsp, 60h
pop rbx
pop r14
pop rbp
retn
loc_7D064:
call ___stack_chk_fail
| long long mi_find_writepos(_QWORD *a1, unsigned long long a2, _QWORD *a3, long long *a4)
{
long long v6; // rax
unsigned long long v7; // rsi
unsigned long long v8; // rax
long long v9; // rcx
long long v10; // rdx
unsigned long long v11; // rdi
unsigned long long v12; // rsi
long long v13; // rax
_BYTE v15[40]; // [rsp+0h] [rbp-70h] BYREF
long long v16; // [rsp+28h] [rbp-48h]
long long v17; // [rsp+40h] [rbp-30h]
int v18; // [rsp+50h] [rbp-20h]
unsigned long long v19; // [rsp+58h] [rbp-18h]
v19 = __readfsqword(0x28u);
v6 = *(_QWORD *)(*a1 + 88LL);
if ( v6 == -1 || *((_BYTE *)a1 + 826) )
{
*a3 = *(_QWORD *)(a1[1] + 40LL);
v7 = a2 - ((a2 < 0xFFED) - 1LL);
v8 = v7 + 3;
v9 = *a1;
v10 = a1[1];
v11 = *(_QWORD *)(*a1 + 352LL);
v12 = (v7 + 6) & 0xFFFFFFFFFFFFFFFCLL;
if ( v8 < v11 )
v12 = *(_QWORD *)(*a1 + 352LL);
if ( *(_QWORD *)(v10 + 40) > *(_QWORD *)(v9 + 272) - v12 )
{
*(_DWORD *)my_thread_var(v11) = 135;
return 0xFFFFFFFFLL;
}
v13 = 16777212LL;
if ( v12 < 0xFFFFFC )
v13 = v12;
*a4 = v13;
*(_QWORD *)(a1[1] + 40LL) += v13;
++*(_QWORD *)(*a1 + 80LL);
*((_BYTE *)a1 + 465) |= 1u;
}
else
{
*a3 = v6;
v18 = 0;
*((_DWORD *)a1 + 192) = 1;
if ( (mi_get_block_info((long long)v15, *((unsigned int *)a1 + 112), *(_QWORD *)(*a1 + 88LL)) & 4) == 0 )
{
*(_DWORD *)my_thread_var(v15) = 127;
return 0xFFFFFFFFLL;
}
*(_QWORD *)(*a1 + 88LL) = v17;
--*(_QWORD *)(a1[1] + 8LL);
*(_QWORD *)(a1[1] + 16LL) -= v16;
*a4 = v16;
}
return 0LL;
}
| _mi_find_writepos:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV RBX,RCX
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x58]
CMP RAX,-0x1
JZ 0x0017cf66
CMP byte ptr [R14 + 0x33a],0x0
JZ 0x0017cfe2
LAB_0017cf66:
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RDX],RAX
CMP RSI,0xffed
SBB RSI,-0x1
LEA RAX,[RSI + 0x3]
MOV RCX,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [RCX + 0x160]
ADD RSI,0x6
AND RSI,-0x4
CMP RAX,RDI
CMOVC RSI,RDI
MOV RAX,qword ptr [RCX + 0x110]
SUB RAX,RSI
CMP qword ptr [RDX + 0x28],RAX
JBE 0x0017cfba
CALL 0x001a48d6
MOV dword ptr [RAX],0x87
JMP 0x0017d01d
LAB_0017cfba:
MOV EAX,0xfffffc
CMP RSI,RAX
CMOVC RAX,RSI
MOV qword ptr [RBX],RAX
MOV RCX,qword ptr [R14 + 0x8]
ADD qword ptr [RCX + 0x28],RAX
MOV RAX,qword ptr [R14]
INC qword ptr [RAX + 0x50]
OR byte ptr [R14 + 0x1d1],0x1
JMP 0x0017d04a
LAB_0017cfe2:
MOV qword ptr [RDX],RAX
LEA RDI,[RBP + -0x70]
MOV dword ptr [RDI + 0x50],0x0
MOV dword ptr [R14 + 0x300],0x1
MOV ESI,dword ptr [R14 + 0x1c0]
MOV RAX,qword ptr [R14]
MOV RDX,qword ptr [RAX + 0x58]
CALL 0x0017b4df
TEST AL,0x4
JNZ 0x0017d024
CALL 0x001a48d6
MOV dword ptr [RAX],0x7f
LAB_0017d01d:
MOV EAX,0xffffffff
JMP 0x0017d04c
LAB_0017d024:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [R14]
MOV qword ptr [RCX + 0x58],RAX
MOV RAX,qword ptr [R14 + 0x8]
DEC qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [R14 + 0x8]
SUB qword ptr [RCX + 0x10],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBX],RAX
LAB_0017d04a:
XOR EAX,EAX
LAB_0017d04c:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x0017d064
ADD RSP,0x60
POP RBX
POP R14
POP RBP
RET
LAB_0017d064:
CALL 0x00129240
|
int8 _mi_find_writepos(long *param_1,ulong param_2,long *param_3,ulong *param_4)
{
int4 *puVar1;
ulong uVar2;
int8 uVar3;
long lVar4;
ulong uVar5;
long in_FS_OFFSET;
int1 local_78 [40];
ulong local_50;
int8 local_38;
int4 local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
if ((*(long *)(*param_1 + 0x58) == -1) || (*(char *)((long)param_1 + 0x33a) != '\0')) {
*param_3 = *(long *)(param_1[1] + 0x28);
lVar4 = (param_2 + 1) - (ulong)(param_2 < 0xffed);
uVar2 = *(ulong *)(*param_1 + 0x160);
uVar5 = lVar4 + 6U & 0xfffffffffffffffc;
if (lVar4 + 3U < uVar2) {
uVar5 = uVar2;
}
if (*(ulong *)(param_1[1] + 0x28) <= *(long *)(*param_1 + 0x110) - uVar5) {
uVar2 = 0xfffffc;
if (uVar5 < 0xfffffc) {
uVar2 = uVar5;
}
*param_4 = uVar2;
*(long *)(param_1[1] + 0x28) = *(long *)(param_1[1] + 0x28) + uVar2;
*(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + 1;
*(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) | 1;
LAB_0017d04a:
uVar3 = 0;
goto LAB_0017d04c;
}
puVar1 = (int4 *)_my_thread_var();
*puVar1 = 0x87;
}
else {
*param_3 = *(long *)(*param_1 + 0x58);
local_28 = 0;
*(int4 *)(param_1 + 0x60) = 1;
uVar2 = _mi_get_block_info(local_78,(int)param_1[0x38],*(int8 *)(*param_1 + 0x58));
if ((uVar2 & 4) != 0) {
*(int8 *)(*param_1 + 0x58) = local_38;
*(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + -1;
*(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) - local_50;
*param_4 = local_50;
goto LAB_0017d04a;
}
puVar1 = (int4 *)_my_thread_var();
*puVar1 = 0x7f;
}
uVar3 = 0xffffffff;
LAB_0017d04c:
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
39,313 | Translator::translate(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any>>>&) | 11AgReS1SoR11[P]Graph/Common/Translator/src/Translator.cpp | FiguresStorage Translator::translate(std::vector<std::pair<std::string, std::any>>& parsed_ast_tree) {
FiguresStorage _figures_storage;
for (auto& vector_shape : parsed_ast_tree) {
Shape* shape;
const std::string& type = vector_shape.first;
//object_decl
if (type == "object_decl") {
SEMANTICANALYZER::ObjectDecl& _obj = std::any_cast<SEMANTICANALYZER::ObjectDecl&>(vector_shape.second);
shape = parseObject(_obj, {});
}
//relation
else if (type == "relation") {
SEMANTICANALYZER::Relation& _rel = std::any_cast<SEMANTICANALYZER::Relation&>(vector_shape.second);
shape = parseRelation(_rel, {});
}
//note
else if (type == "note") {
SEMANTICANALYZER::Note& nnote = std::any_cast<SEMANTICANALYZER::Note&>(vector_shape.second);
shape = parseNote(nnote);
}
//graph - uncomplete ALL OBJ&REL HAVE GRAPH COMMON style!!!
else if (type == "graph") {
SEMANTICANALYZER::Graph& ggraph = std::any_cast<SEMANTICANALYZER::Graph&>(vector_shape.second);
shape = parseGraph(ggraph);
}
//dot_cloud
else if (type == "dot_cloud") {
SEMANTICANALYZER::DotCloud& dotCloud = std::any_cast<SEMANTICANALYZER::DotCloud&>(vector_shape.second);
shape = parseDotCloud(dotCloud);
}
//add to hashmap
_figures_storage.push_back(shape);
}
return _figures_storage;
} | O0 | cpp | Translator::translate(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any>>>&):
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
movq %rdi, -0xb8(%rbp)
movq %rdi, %rax
movq %rax, -0xb0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x1a7d0
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1bfd0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1b1b0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1a100
testb $0x1, %al
jne 0x200b9
jmp 0x2035e
leaq -0x30(%rbp), %rdi
callq 0x1a330
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
leaq 0xa03c(%rip), %rsi # 0x2a115
callq 0x1ca90
movb %al, -0xb9(%rbp)
jmp 0x200e6
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0x200f2
jmp 0x2016a
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
callq 0x1a8e0
movq %rax, -0xc8(%rbp)
jmp 0x20108
movq -0xc8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
movw $0x0, -0x74(%rbp)
movl $0x1, -0x70(%rbp)
movl $0xa, -0x6c(%rbp)
leaq -0x74(%rbp), %rsi
callq 0x1ab40
movq %rax, -0xd0(%rbp)
jmp 0x2013d
movq -0xd0(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x2033c
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
callq 0x1bca0
jmp 0x20384
movq -0x50(%rbp), %rdi
leaq 0x9fac(%rip), %rsi # 0x2a121
callq 0x1ca90
movb %al, -0xd1(%rbp)
jmp 0x20182
movb -0xd1(%rbp), %al
testb $0x1, %al
jne 0x2018e
jmp 0x201f5
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
callq 0x1a990
movq %rax, -0xe0(%rbp)
jmp 0x201a4
movq -0xe0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
movw $0x0, -0x8c(%rbp)
movl $0x1, -0x88(%rbp)
movl $0xa, -0x84(%rbp)
leaq -0x8c(%rbp), %rsi
callq 0x1b0e0
movq %rax, -0xe8(%rbp)
jmp 0x201e5
movq -0xe8(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x2033a
movq -0x50(%rbp), %rdi
leaq 0x9f2a(%rip), %rsi # 0x2a12a
callq 0x1ca90
movb %al, -0xe9(%rbp)
jmp 0x2020d
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0x20219
jmp 0x20262
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
callq 0x1a320
movq %rax, -0xf8(%rbp)
jmp 0x2022f
movq -0xf8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0x1b720
movq %rax, -0x100(%rbp)
jmp 0x20252
movq -0x100(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x20338
movq -0x50(%rbp), %rdi
leaq 0x9ec2(%rip), %rsi # 0x2a12f
callq 0x1ca90
movb %al, -0x101(%rbp)
jmp 0x2027a
movb -0x101(%rbp), %al
testb $0x1, %al
jne 0x20286
jmp 0x202cc
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
callq 0x1c800
movq %rax, -0x110(%rbp)
jmp 0x2029c
movq -0x110(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
callq 0x1c1d0
movq %rax, -0x118(%rbp)
jmp 0x202bf
movq -0x118(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x20336
movq -0x50(%rbp), %rdi
leaq 0x9e5e(%rip), %rsi # 0x2a135
callq 0x1ca90
movb %al, -0x119(%rbp)
jmp 0x202e4
movb -0x119(%rbp), %al
testb $0x1, %al
jne 0x202f0
jmp 0x20334
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
callq 0x1bdc0
movq %rax, -0x128(%rbp)
jmp 0x20306
movq -0x128(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rdi
callq 0x1aeb0
movq %rax, -0x130(%rbp)
jmp 0x20329
movq -0x130(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x20336
jmp 0x20338
jmp 0x2033a
jmp 0x2033c
movq -0xb8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1b970
jmp 0x2034e
jmp 0x20350
leaq -0x30(%rbp), %rdi
callq 0x1a9e0
jmp 0x200a3
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x20374
movq -0xb8(%rbp), %rdi
callq 0x1bca0
movq -0xb0(%rbp), %rax
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x1c610
nopl (%rax)
| _ZN10Translator9translateERSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anyESaIS9_EE:
push rbp
mov rbp, rsp
sub rsp, 130h
mov [rbp+var_B8], rdi
mov rax, rdi
mov [rbp+var_B0], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_19], 0
call __ZN14FiguresStorageC2Ev; FiguresStorage::FiguresStorage(void)
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
call __ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anyESaIS8_EE5beginEv; std::vector<std::pair<std::string,std::any>>::begin(void)
mov [rbp+var_30], rax
mov rdi, [rbp+var_28]
call __ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anyESaIS8_EE3endEv; std::vector<std::pair<std::string,std::any>>::end(void)
mov [rbp+var_38], rax
loc_200A3:
lea rdi, [rbp+var_30]
lea rsi, [rbp+var_38]
call __ZN9__gnu_cxxneIPSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anyESt6vectorIS9_SaIS9_EEEEbRKNS_17__normal_iteratorIT_T0_EESJ_; __gnu_cxx::operator!=<std::pair<std::string,std::any> *,std::vector<std::pair<std::string,std::any>>>(__gnu_cxx::__normal_iterator<std::pair<std::string,std::any> *,std::vector<std::pair<std::string,std::any>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string,std::any> *,std::vector<std::pair<std::string,std::any>>> const&)
test al, 1
jnz short loc_200B9
jmp loc_2035E
loc_200B9:
lea rdi, [rbp+var_30]
call __ZNK9__gnu_cxx17__normal_iteratorIPSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anyESt6vectorIS9_SaIS9_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<std::string,std::any> *,std::vector<std::pair<std::string,std::any>>>::operator*(void)
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
mov rdi, [rbp+var_50]
lea rsi, aObjectDecl; "object_decl"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_B9], al
jmp short $+2
loc_200E6:
mov al, [rbp+var_B9]
test al, 1
jnz short loc_200F2
jmp short loc_2016A
loc_200F2:
mov rdi, [rbp+var_40]
add rdi, 20h ; ' '
call __ZSt8any_castIRN16SEMANTICANALYZER10ObjectDeclEET_RSt3any; std::any_cast<SEMANTICANALYZER::ObjectDecl &>(std::any &)
mov [rbp+var_C8], rax
jmp short $+2
loc_20108:
mov rax, [rbp+var_C8]
mov [rbp+var_68], rax
mov rdi, [rbp+var_68]
mov [rbp+var_74], 0
mov [rbp+var_70], 1
mov [rbp+var_6C], 0Ah
lea rsi, [rbp+var_74]
call __Z11parseObjectRN16SEMANTICANALYZER10ObjectDeclERK5Style; parseObject(SEMANTICANALYZER::ObjectDecl &,Style const&)
mov [rbp+var_D0], rax
jmp short $+2
loc_2013D:
mov rax, [rbp+var_D0]
mov [rbp+var_48], rax
jmp loc_2033C
mov rdi, [rbp+var_B8]; this
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
call __ZN14FiguresStorageD1Ev; FiguresStorage::~FiguresStorage()
jmp loc_20384
loc_2016A:
mov rdi, [rbp+var_50]
lea rsi, aRelation; "relation"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_D1], al
jmp short $+2
loc_20182:
mov al, [rbp+var_D1]
test al, 1
jnz short loc_2018E
jmp short loc_201F5
loc_2018E:
mov rdi, [rbp+var_40]
add rdi, 20h ; ' '
call __ZSt8any_castIRN16SEMANTICANALYZER8RelationEET_RSt3any; std::any_cast<SEMANTICANALYZER::Relation &>(std::any &)
mov [rbp+var_E0], rax
jmp short $+2
loc_201A4:
mov rax, [rbp+var_E0]
mov [rbp+var_80], rax
mov rdi, [rbp+var_80]
mov [rbp+var_8C], 0
mov [rbp+var_88], 1
mov [rbp+var_84], 0Ah
lea rsi, [rbp+var_8C]
call __Z13parseRelationRN16SEMANTICANALYZER8RelationERK5Style; parseRelation(SEMANTICANALYZER::Relation &,Style const&)
mov [rbp+var_E8], rax
jmp short $+2
loc_201E5:
mov rax, [rbp+var_E8]
mov [rbp+var_48], rax
jmp loc_2033A
loc_201F5:
mov rdi, [rbp+var_50]
lea rsi, aNote; "note"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_E9], al
jmp short $+2
loc_2020D:
mov al, [rbp+var_E9]
test al, 1
jnz short loc_20219
jmp short loc_20262
loc_20219:
mov rdi, [rbp+var_40]
add rdi, 20h ; ' '
call __ZSt8any_castIRN16SEMANTICANALYZER4NoteEET_RSt3any; std::any_cast<SEMANTICANALYZER::Note &>(std::any &)
mov [rbp+var_F8], rax
jmp short $+2
loc_2022F:
mov rax, [rbp+var_F8]
mov [rbp+var_98], rax
mov rdi, [rbp+var_98]; Note *
call __Z9parseNoteRN16SEMANTICANALYZER4NoteE; parseNote(SEMANTICANALYZER::Note &)
mov [rbp+var_100], rax
jmp short $+2
loc_20252:
mov rax, [rbp+var_100]
mov [rbp+var_48], rax
jmp loc_20338
loc_20262:
mov rdi, [rbp+var_50]
lea rsi, aGraph; "graph"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_101], al
jmp short $+2
loc_2027A:
mov al, [rbp+var_101]
test al, 1
jnz short loc_20286
jmp short loc_202CC
loc_20286:
mov rdi, [rbp+var_40]
add rdi, 20h ; ' '
call __ZSt8any_castIRN16SEMANTICANALYZER5GraphEET_RSt3any; std::any_cast<SEMANTICANALYZER::Graph &>(std::any &)
mov [rbp+var_110], rax
jmp short $+2
loc_2029C:
mov rax, [rbp+var_110]
mov [rbp+var_A0], rax
mov rdi, [rbp+var_A0]; Graph *
call __Z10parseGraphRN16SEMANTICANALYZER5GraphE; parseGraph(SEMANTICANALYZER::Graph &)
mov [rbp+var_118], rax
jmp short $+2
loc_202BF:
mov rax, [rbp+var_118]
mov [rbp+var_48], rax
jmp short loc_20336
loc_202CC:
mov rdi, [rbp+var_50]
lea rsi, aDotCloud; "dot_cloud"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_119], al
jmp short $+2
loc_202E4:
mov al, [rbp+var_119]
test al, 1
jnz short loc_202F0
jmp short loc_20334
loc_202F0:
mov rdi, [rbp+var_40]
add rdi, 20h ; ' '
call __ZSt8any_castIRN16SEMANTICANALYZER8DotCloudEET_RSt3any; std::any_cast<SEMANTICANALYZER::DotCloud &>(std::any &)
mov [rbp+var_128], rax
jmp short $+2
loc_20306:
mov rax, [rbp+var_128]
mov [rbp+var_A8], rax
mov rdi, [rbp+var_A8]; DotCloud *
call __Z13parseDotCloudRN16SEMANTICANALYZER8DotCloudE; parseDotCloud(SEMANTICANALYZER::DotCloud &)
mov [rbp+var_130], rax
jmp short $+2
loc_20329:
mov rax, [rbp+var_130]
mov [rbp+var_48], rax
loc_20334:
jmp short $+2
loc_20336:
jmp short $+2
loc_20338:
jmp short $+2
loc_2033A:
jmp short $+2
loc_2033C:
mov rdi, [rbp+var_B8]
lea rsi, [rbp+var_48]
call __ZNSt6vectorIP5ShapeSaIS1_EE9push_backERKS1_; std::vector<Shape *>::push_back(Shape * const&)
jmp short $+2
loc_2034E:
jmp short $+2
loc_20350:
lea rdi, [rbp+var_30]
call __ZN9__gnu_cxx17__normal_iteratorIPSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anyESt6vectorIS9_SaIS9_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::string,std::any> *,std::vector<std::pair<std::string,std::any>>>::operator++(void)
jmp loc_200A3
loc_2035E:
mov [rbp+var_19], 1
test [rbp+var_19], 1
jnz short loc_20374
mov rdi, [rbp+var_B8]; this
call __ZN14FiguresStorageD1Ev; FiguresStorage::~FiguresStorage()
loc_20374:
mov rax, [rbp+var_B0]
add rsp, 130h
pop rbp
retn
loc_20384:
mov rdi, [rbp+var_58]
call __Unwind_Resume
| FiguresStorage * Translator::translate(FiguresStorage *a1, long long a2, long long a3)
{
DotCloud *v4; // [rsp+88h] [rbp-A8h]
Graph *v5; // [rsp+90h] [rbp-A0h]
Note *v6; // [rsp+98h] [rbp-98h]
long long v7; // [rsp+A4h] [rbp-8Ch] BYREF
int v8; // [rsp+ACh] [rbp-84h]
long long v9; // [rsp+B0h] [rbp-80h]
long long v10; // [rsp+BCh] [rbp-74h] BYREF
int v11; // [rsp+C4h] [rbp-6Ch]
long long v12; // [rsp+C8h] [rbp-68h]
long long v13; // [rsp+E0h] [rbp-50h]
Diamond *v14; // [rsp+E8h] [rbp-48h] BYREF
long long v15; // [rsp+F0h] [rbp-40h]
long long v16; // [rsp+F8h] [rbp-38h] BYREF
_QWORD v17[2]; // [rsp+100h] [rbp-30h] BYREF
char v18; // [rsp+117h] [rbp-19h]
long long v19; // [rsp+118h] [rbp-18h]
long long v20; // [rsp+120h] [rbp-10h]
FiguresStorage *v21; // [rsp+128h] [rbp-8h]
v21 = a1;
v20 = a2;
v19 = a3;
v18 = 0;
FiguresStorage::FiguresStorage(a1);
v17[1] = v19;
v17[0] = std::vector<std::pair<std::string,std::any>>::begin(v19);
v16 = std::vector<std::pair<std::string,std::any>>::end(v19);
while ( (__gnu_cxx::operator!=<std::pair<std::string,std::any> *,std::vector<std::pair<std::string,std::any>>>(
v17,
&v16) & 1) != 0 )
{
v15 = __gnu_cxx::__normal_iterator<std::pair<std::string,std::any> *,std::vector<std::pair<std::string,std::any>>>::operator*(v17);
v13 = v15;
if ( (std::operator==<char>(v15, "object_decl") & 1) != 0 )
{
v12 = std::any_cast<SEMANTICANALYZER::ObjectDecl &>(v15 + 32);
LOWORD(v10) = 0;
HIDWORD(v10) = 1;
v11 = 10;
v14 = parseObject(v12, &v10);
}
else if ( (std::operator==<char>(v13, "relation") & 1) != 0 )
{
v9 = std::any_cast<SEMANTICANALYZER::Relation &>(v15 + 32);
LOWORD(v7) = 0;
HIDWORD(v7) = 1;
v8 = 10;
v14 = parseRelation(v9, &v7);
}
else if ( (std::operator==<char>(v13, "note") & 1) != 0 )
{
v6 = (Note *)std::any_cast<SEMANTICANALYZER::Note &>(v15 + 32);
v14 = (Diamond *)parseNote(v6);
}
else if ( (std::operator==<char>(v13, "graph") & 1) != 0 )
{
v5 = (Graph *)std::any_cast<SEMANTICANALYZER::Graph &>(v15 + 32);
v14 = (Diamond *)parseGraph(v5);
}
else if ( (std::operator==<char>(v13, "dot_cloud") & 1) != 0 )
{
v4 = (DotCloud *)std::any_cast<SEMANTICANALYZER::DotCloud &>(v15 + 32);
v14 = (Diamond *)parseDotCloud(v4);
}
std::vector<Shape *>::push_back(a1, &v14);
__gnu_cxx::__normal_iterator<std::pair<std::string,std::any> *,std::vector<std::pair<std::string,std::any>>>::operator++(v17);
}
return a1;
}
| translate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x130
MOV qword ptr [RBP + -0xb8],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xb0],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV byte ptr [RBP + -0x19],0x0
CALL 0x0011a7d0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0011bfd0
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0011b1b0
MOV qword ptr [RBP + -0x38],RAX
LAB_001200a3:
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x38]
CALL 0x0011a100
TEST AL,0x1
JNZ 0x001200b9
JMP 0x0012035e
LAB_001200b9:
LEA RDI,[RBP + -0x30]
CALL 0x0011a330
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x50]
LAB_001200d2:
LEA RSI,[0x12a115]
CALL 0x0011ca90
MOV byte ptr [RBP + -0xb9],AL
JMP 0x001200e6
LAB_001200e6:
MOV AL,byte ptr [RBP + -0xb9]
TEST AL,0x1
JNZ 0x001200f2
JMP 0x0012016a
LAB_001200f2:
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x20
CALL 0x0011a8e0
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x00120108
LAB_00120108:
MOV RAX,qword ptr [RBP + -0xc8]
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x68]
MOV word ptr [RBP + -0x74],0x0
MOV dword ptr [RBP + -0x70],0x1
MOV dword ptr [RBP + -0x6c],0xa
LEA RSI,[RBP + -0x74]
CALL 0x0011ab40
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x0012013d
LAB_0012013d:
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0012033c
LAB_0012016a:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[0x12a121]
CALL 0x0011ca90
MOV byte ptr [RBP + -0xd1],AL
JMP 0x00120182
LAB_00120182:
MOV AL,byte ptr [RBP + -0xd1]
TEST AL,0x1
JNZ 0x0012018e
JMP 0x001201f5
LAB_0012018e:
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x20
CALL 0x0011a990
MOV qword ptr [RBP + -0xe0],RAX
JMP 0x001201a4
LAB_001201a4:
MOV RAX,qword ptr [RBP + -0xe0]
MOV qword ptr [RBP + -0x80],RAX
MOV RDI,qword ptr [RBP + -0x80]
MOV word ptr [RBP + -0x8c],0x0
MOV dword ptr [RBP + -0x88],0x1
MOV dword ptr [RBP + -0x84],0xa
LEA RSI,[RBP + -0x8c]
CALL 0x0011b0e0
MOV qword ptr [RBP + -0xe8],RAX
JMP 0x001201e5
LAB_001201e5:
MOV RAX,qword ptr [RBP + -0xe8]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0012033a
LAB_001201f5:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[0x12a12a]
CALL 0x0011ca90
MOV byte ptr [RBP + -0xe9],AL
JMP 0x0012020d
LAB_0012020d:
MOV AL,byte ptr [RBP + -0xe9]
TEST AL,0x1
JNZ 0x00120219
JMP 0x00120262
LAB_00120219:
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x20
CALL 0x0011a320
MOV qword ptr [RBP + -0xf8],RAX
JMP 0x0012022f
LAB_0012022f:
MOV RAX,qword ptr [RBP + -0xf8]
MOV qword ptr [RBP + -0x98],RAX
MOV RDI,qword ptr [RBP + -0x98]
CALL 0x0011b720
MOV qword ptr [RBP + -0x100],RAX
JMP 0x00120252
LAB_00120252:
MOV RAX,qword ptr [RBP + -0x100]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00120338
LAB_00120262:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[0x12a12f]
CALL 0x0011ca90
MOV byte ptr [RBP + -0x101],AL
JMP 0x0012027a
LAB_0012027a:
MOV AL,byte ptr [RBP + -0x101]
TEST AL,0x1
JNZ 0x00120286
JMP 0x001202cc
LAB_00120286:
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x20
CALL 0x0011c800
MOV qword ptr [RBP + -0x110],RAX
JMP 0x0012029c
LAB_0012029c:
MOV RAX,qword ptr [RBP + -0x110]
MOV qword ptr [RBP + -0xa0],RAX
MOV RDI,qword ptr [RBP + -0xa0]
CALL 0x0011c1d0
MOV qword ptr [RBP + -0x118],RAX
JMP 0x001202bf
LAB_001202bf:
MOV RAX,qword ptr [RBP + -0x118]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00120336
LAB_001202cc:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[0x12a135]
CALL 0x0011ca90
MOV byte ptr [RBP + -0x119],AL
JMP 0x001202e4
LAB_001202e4:
MOV AL,byte ptr [RBP + -0x119]
TEST AL,0x1
JNZ 0x001202f0
JMP 0x00120334
LAB_001202f0:
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x20
CALL 0x0011bdc0
MOV qword ptr [RBP + -0x128],RAX
JMP 0x00120306
LAB_00120306:
MOV RAX,qword ptr [RBP + -0x128]
MOV qword ptr [RBP + -0xa8],RAX
MOV RDI,qword ptr [RBP + -0xa8]
CALL 0x0011aeb0
MOV qword ptr [RBP + -0x130],RAX
JMP 0x00120329
LAB_00120329:
MOV RAX,qword ptr [RBP + -0x130]
MOV qword ptr [RBP + -0x48],RAX
LAB_00120334:
JMP 0x00120336
LAB_00120336:
JMP 0x00120338
LAB_00120338:
JMP 0x0012033a
LAB_0012033a:
JMP 0x0012033c
LAB_0012033c:
MOV RDI,qword ptr [RBP + -0xb8]
LEA RSI,[RBP + -0x48]
CALL 0x0011b970
LAB_0012034c:
JMP 0x0012034e
LAB_0012034e:
JMP 0x00120350
LAB_00120350:
LEA RDI,[RBP + -0x30]
CALL 0x0011a9e0
JMP 0x001200a3
LAB_0012035e:
MOV byte ptr [RBP + -0x19],0x1
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x00120374
MOV RDI,qword ptr [RBP + -0xb8]
CALL 0x0011bca0
LAB_00120374:
MOV RAX,qword ptr [RBP + -0xb0]
ADD RSP,0x130
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00120368) */
/* Translator::translate(std::vector<std::pair<std::__cxx11::string, std::any>,
std::allocator<std::pair<std::__cxx11::string, std::any> > >&) */
vector * Translator::translate(vector *param_1)
{
bool bVar1;
Note *pNVar2;
Graph *pGVar3;
DotCloud *pDVar4;
vector<std::pair<std::__cxx11::string,std::any>,std::allocator<std::pair<std::__cxx11::string,std::any>>>
*in_RDX;
int2 local_94 [2];
int4 local_90;
int4 local_8c;
Relation *local_88;
int2 local_7c [2];
int4 local_78;
int4 local_74;
ObjectDecl *local_70;
string *local_58;
Shape *local_50;
string *local_48;
int8 local_40;
int8 local_38;
vector<std::pair<std::__cxx11::string,std::any>,std::allocator<std::pair<std::__cxx11::string,std::any>>>
*local_30;
int1 local_21;
vector<std::pair<std::__cxx11::string,std::any>,std::allocator<std::pair<std::__cxx11::string,std::any>>>
*local_20;
vector *local_10;
local_21 = 0;
local_20 = in_RDX;
local_10 = param_1;
FiguresStorage::FiguresStorage((FiguresStorage *)param_1);
local_30 = local_20;
local_38 = std::
vector<std::pair<std::__cxx11::string,std::any>,std::allocator<std::pair<std::__cxx11::string,std::any>>>
::begin(local_20);
local_40 = std::
vector<std::pair<std::__cxx11::string,std::any>,std::allocator<std::pair<std::__cxx11::string,std::any>>>
::end(local_30);
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_38,(__normal_iterator *)&local_40), bVar1) {
local_58 = (string *)
__gnu_cxx::
__normal_iterator<std::pair<std::__cxx11::string,std::any>*,std::vector<std::pair<std::__cxx11::string,std::any>,std::allocator<std::pair<std::__cxx11::string,std::any>>>>
::operator*((__normal_iterator<std::pair<std::__cxx11::string,std::any>*,std::vector<std::pair<std::__cxx11::string,std::any>,std::allocator<std::pair<std::__cxx11::string,std::any>>>>
*)&local_38);
local_48 = local_58;
/* try { // try from 001200d2 to 0012034b has its CatchHandler @ 0012014d */
bVar1 = std::operator==(local_58,"object_decl");
if (bVar1) {
local_70 = std::any_cast<SEMANTICANALYZER::ObjectDecl&>((any *)(local_48 + 0x20));
local_7c[0] = 0;
local_78 = 1;
local_74 = 10;
local_50 = (Shape *)parseObject(local_70,(Style *)local_7c);
}
else {
bVar1 = std::operator==(local_58,"relation");
if (bVar1) {
local_88 = std::any_cast<SEMANTICANALYZER::Relation&>((any *)(local_48 + 0x20));
local_94[0] = 0;
local_90 = 1;
local_8c = 10;
local_50 = (Shape *)parseRelation(local_88,(Style *)local_94);
}
else {
bVar1 = std::operator==(local_58,"note");
if (bVar1) {
pNVar2 = std::any_cast<SEMANTICANALYZER::Note&>((any *)(local_48 + 0x20));
local_50 = (Shape *)parseNote(pNVar2);
}
else {
bVar1 = std::operator==(local_58,"graph");
if (bVar1) {
pGVar3 = std::any_cast<SEMANTICANALYZER::Graph&>((any *)(local_48 + 0x20));
local_50 = (Shape *)parseGraph(pGVar3);
}
else {
bVar1 = std::operator==(local_58,"dot_cloud");
if (bVar1) {
pDVar4 = std::any_cast<SEMANTICANALYZER::DotCloud&>((any *)(local_48 + 0x20));
local_50 = (Shape *)parseDotCloud(pDVar4);
}
}
}
}
}
std::vector<Shape*,std::allocator<Shape*>>::push_back
((vector<Shape*,std::allocator<Shape*>> *)param_1,&local_50);
__gnu_cxx::
__normal_iterator<std::pair<std::__cxx11::string,std::any>*,std::vector<std::pair<std::__cxx11::string,std::any>,std::allocator<std::pair<std::__cxx11::string,std::any>>>>
::operator++((__normal_iterator<std::pair<std::__cxx11::string,std::any>*,std::vector<std::pair<std::__cxx11::string,std::any>,std::allocator<std::pair<std::__cxx11::string,std::any>>>>
*)&local_38);
}
return param_1;
}
| |
39,314 | Translator::translate(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any>>>&) | 11AgReS1SoR11[P]Graph/Common/Translator/src/Translator.cpp | FiguresStorage Translator::translate(std::vector<std::pair<std::string, std::any>>& parsed_ast_tree) {
FiguresStorage _figures_storage;
for (auto& vector_shape : parsed_ast_tree) {
Shape* shape;
const std::string& type = vector_shape.first;
//object_decl
if (type == "object_decl") {
SEMANTICANALYZER::ObjectDecl& _obj = std::any_cast<SEMANTICANALYZER::ObjectDecl&>(vector_shape.second);
shape = parseObject(_obj, {});
}
//relation
else if (type == "relation") {
SEMANTICANALYZER::Relation& _rel = std::any_cast<SEMANTICANALYZER::Relation&>(vector_shape.second);
shape = parseRelation(_rel, {});
}
//note
else if (type == "note") {
SEMANTICANALYZER::Note& nnote = std::any_cast<SEMANTICANALYZER::Note&>(vector_shape.second);
shape = parseNote(nnote);
}
//graph - uncomplete ALL OBJ&REL HAVE GRAPH COMMON style!!!
else if (type == "graph") {
SEMANTICANALYZER::Graph& ggraph = std::any_cast<SEMANTICANALYZER::Graph&>(vector_shape.second);
shape = parseGraph(ggraph);
}
//dot_cloud
else if (type == "dot_cloud") {
SEMANTICANALYZER::DotCloud& dotCloud = std::any_cast<SEMANTICANALYZER::DotCloud&>(vector_shape.second);
shape = parseDotCloud(dotCloud);
}
//add to hashmap
_figures_storage.push_back(shape);
}
return _figures_storage;
} | O3 | cpp | Translator::translate(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any>>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %r14
movq 0x8(%rdx), %r13
cmpq %r13, %r14
je 0x8d10
leaq 0x25d2(%rip), %r15 # 0xb184
leaq 0xc(%rsp), %r12
leaq 0x25d2(%rip), %rbp # 0xb190
movq %r14, %rdi
movq %r15, %rsi
callq 0x60f0
testl %eax, %eax
je 0x8c44
movq %r14, %rdi
movq %rbp, %rsi
callq 0x60f0
testl %eax, %eax
je 0x8c79
movq %r14, %rdi
leaq 0x25af(%rip), %rsi # 0xb199
callq 0x60f0
testl %eax, %eax
je 0x8cae
movq %r14, %rdi
leaq 0x259d(%rip), %rsi # 0xb19e
callq 0x60f0
testl %eax, %eax
je 0x8cc6
movq %r14, %rdi
leaq 0x258c(%rip), %rsi # 0xb1a4
callq 0x60f0
testl %eax, %eax
jne 0x8ce0
leaq 0x20(%r14), %rdi
callq 0x6370
testq %rax, %rax
je 0x8d36
movq %rax, %rdi
callq 0x6260
jmp 0x8cdc
leaq 0x20(%r14), %rdi
callq 0x6680
testq %rax, %rax
je 0x8d22
movw $0x0, 0xc(%rsp)
movabsq $0xa00000001, %rcx # imm = 0xA00000001
movq %rcx, 0x10(%rsp)
movq %rax, %rdi
movq %r12, %rsi
callq 0x61f0
jmp 0x8cdc
leaq 0x20(%r14), %rdi
callq 0x6660
testq %rax, %rax
je 0x8d27
movw $0x0, 0xc(%rsp)
movabsq $0xa00000001, %rcx # imm = 0xA00000001
movq %rcx, 0x10(%rsp)
movq %rax, %rdi
movq %r12, %rsi
callq 0x62f0
jmp 0x8cdc
leaq 0x20(%r14), %rdi
callq 0x63f0
testq %rax, %rax
je 0x8d2c
movq %rax, %rdi
callq 0x63d0
jmp 0x8cdc
leaq 0x20(%r14), %rdi
callq 0x6440
testq %rax, %rax
je 0x8d31
movq %rax, %rdi
callq 0x65c0
movq %rax, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x8cf8
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x8d03
movq %rbx, %rdi
movq %rsp, %rdx
callq 0x6160
addq $0x30, %r14
cmpq %r13, %r14
jne 0x8bbe
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6480
callq 0x6480
callq 0x6480
callq 0x6480
callq 0x6480
jmp 0x8d5f
jmp 0x8d5f
jmp 0x8d55
jmp 0x8d55
jmp 0x8d5f
jmp 0x8d5f
jmp 0x8d5f
jmp 0x8d5f
jmp 0x8d55
jmp 0x8d5f
jmp 0x8d5f
jmp 0x8d55
jmp 0x8d5f
movq %rax, %rdi
callq 0x91f0
jmp 0x8d5f
movq %rax, %r14
movq %rbx, %rdi
callq 0x64d0
movq %r14, %rdi
callq 0x66c0
| _ZN10Translator9translateERSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anyESaIS9_EE:
push rbp
push r15
push r14; __int64
push r13; int
push r12; void *
push rbx; __int64
sub rsp, 18h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov r14, [rdx]
mov r13, [rdx+8]
cmp r14, r13
jz loc_8D10
lea r15, aObjectDecl; "object_decl"
lea r12, [rsp+48h+var_3C]
lea rbp, aRelation; "relation"
loc_8BBE:
mov rdi, r14
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_8C44
mov rdi, r14
mov rsi, rbp
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_8C79
mov rdi, r14
lea rsi, aNote; "note"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_8CAE
mov rdi, r14
lea rsi, aGraph; "graph"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_8CC6
mov rdi, r14
lea rsi, aDotCloud; "dot_cloud"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_8CE0
lea rdi, [r14+20h]; this
call __ZSt12__any_casterIN16SEMANTICANALYZER8DotCloudEEPvPKSt3any; std::__any_caster<SEMANTICANALYZER::DotCloud>(std::any const*)
test rax, rax
jz loc_8D36
mov rdi, rax; int
call __Z13parseDotCloudRN16SEMANTICANALYZER8DotCloudE; parseDotCloud(SEMANTICANALYZER::DotCloud &)
jmp loc_8CDC
loc_8C44:
lea rdi, [r14+20h]; this
call __ZSt12__any_casterIN16SEMANTICANALYZER10ObjectDeclEEPvPKSt3any; std::__any_caster<SEMANTICANALYZER::ObjectDecl>(std::any const*)
test rax, rax
jz loc_8D22
mov [rsp+48h+var_3C], 0
mov rcx, 0A00000001h
mov [rsp+48h+var_38], rcx
mov rdi, rax
mov rsi, r12
call __Z11parseObjectRN16SEMANTICANALYZER10ObjectDeclERK5Style; parseObject(SEMANTICANALYZER::ObjectDecl &,Style const&)
jmp short loc_8CDC
loc_8C79:
lea rdi, [r14+20h]; this
call __ZSt12__any_casterIN16SEMANTICANALYZER8RelationEEPvPKSt3any; std::__any_caster<SEMANTICANALYZER::Relation>(std::any const*)
test rax, rax
jz loc_8D27
mov [rsp+48h+var_3C], 0
mov rcx, 0A00000001h
mov [rsp+48h+var_38], rcx
mov rdi, rax
mov rsi, r12
call __Z13parseRelationRN16SEMANTICANALYZER8RelationERK5Style; parseRelation(SEMANTICANALYZER::Relation &,Style const&)
jmp short loc_8CDC
loc_8CAE:
lea rdi, [r14+20h]; this
call __ZSt12__any_casterIN16SEMANTICANALYZER4NoteEEPvPKSt3any; std::__any_caster<SEMANTICANALYZER::Note>(std::any const*)
test rax, rax
jz short loc_8D2C
mov rdi, rax; Note *
call __Z9parseNoteRN16SEMANTICANALYZER4NoteE; parseNote(SEMANTICANALYZER::Note &)
jmp short loc_8CDC
loc_8CC6:
lea rdi, [r14+20h]; this
call __ZSt12__any_casterIN16SEMANTICANALYZER5GraphEEPvPKSt3any; std::__any_caster<SEMANTICANALYZER::Graph>(std::any const*)
test rax, rax
jz short loc_8D31
mov rdi, rax
call __Z10parseGraphRN16SEMANTICANALYZER5GraphE; parseGraph(SEMANTICANALYZER::Graph &)
loc_8CDC:
mov [rsp+48h+var_48], rax
loc_8CE0:
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_8CF8
mov rax, [rsp+48h+var_48]
mov [rsi], rax
add qword ptr [rbx+8], 8
jmp short loc_8D03
loc_8CF8:
mov rdi, rbx
mov rdx, rsp
call __ZNSt6vectorIP5ShapeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_; std::vector<Shape *>::_M_realloc_insert<Shape * const&>(__gnu_cxx::__normal_iterator<Shape **,std::vector<Shape *>>,Shape * const&)
loc_8D03:
add r14, 30h ; '0'
cmp r14, r13
jnz loc_8BBE
loc_8D10:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8D22:
call __ZSt20__throw_bad_any_castv; std::__throw_bad_any_cast(void)
loc_8D27:
call __ZSt20__throw_bad_any_castv; std::__throw_bad_any_cast(void)
loc_8D2C:
call __ZSt20__throw_bad_any_castv; std::__throw_bad_any_cast(void)
loc_8D31:
call __ZSt20__throw_bad_any_castv; std::__throw_bad_any_cast(void)
loc_8D36:
call __ZSt20__throw_bad_any_castv; std::__throw_bad_any_cast(void)
jmp short loc_8D5F
jmp short loc_8D5F
jmp short loc_8D55
jmp short loc_8D55
jmp short loc_8D5F
jmp short loc_8D5F
jmp short loc_8D5F
jmp short loc_8D5F
jmp short loc_8D55
jmp short loc_8D5F
jmp short loc_8D5F
jmp short loc_8D55
jmp short loc_8D5F
loc_8D55:
mov rdi, rax
call __clang_call_terminate
jmp short $+2
loc_8D5F:
mov r14, rax
mov rdi, rbx; this
call __ZN14FiguresStorageD1Ev; FiguresStorage::~FiguresStorage()
mov rdi, r14
call __Unwind_Resume
| long long Translator::translate(long long a1, long long a2, long long *a3)
{
long long v3; // r14
long long v4; // r13
long long v5; // rax
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
long long v10; // rax
long long v11; // rax
long long v12; // rax
Note *v13; // rax
long long *v14; // rax
long long *v15; // rsi
long long v17; // [rsp+0h] [rbp-48h] BYREF
void *v18; // [rsp+8h] [rbp-40h] BYREF
long long v19; // [rsp+10h] [rbp-38h]
long long v20; // [rsp+18h] [rbp-30h]
void *v21; // [rsp+20h] [rbp-28h]
int v22; // [rsp+28h] [rbp-20h]
long long v23; // [rsp+30h] [rbp-18h]
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v3 = *a3;
v4 = a3[1];
if ( *a3 != v4 )
{
while ( 1 )
{
if ( !(unsigned int)std::string::compare(v3, "object_decl") )
{
v11 = std::__any_caster<SEMANTICANALYZER::ObjectDecl>((std::any *)(v3 + 32));
if ( !v11 )
std::__throw_bad_any_cast();
WORD2(v18) = 0;
v19 = 0xA00000001LL;
v10 = (long long)parseObject(v11, (long long *)((char *)&v18 + 4));
goto LABEL_17;
}
if ( !(unsigned int)std::string::compare(v3, "relation") )
{
v12 = std::__any_caster<SEMANTICANALYZER::Relation>((std::any *)(v3 + 32));
if ( !v12 )
std::__throw_bad_any_cast();
WORD2(v18) = 0;
v19 = 0xA00000001LL;
v10 = (long long)parseRelation(v12, (long long *)((char *)&v18 + 4), 0.0);
goto LABEL_17;
}
if ( !(unsigned int)std::string::compare(v3, "note") )
{
v13 = (Note *)std::__any_caster<SEMANTICANALYZER::Note>((std::any *)(v3 + 32));
if ( !v13 )
std::__throw_bad_any_cast();
v10 = parseNote(v13);
goto LABEL_17;
}
if ( !(unsigned int)std::string::compare(v3, "graph") )
break;
if ( !(unsigned int)std::string::compare(v3, "dot_cloud") )
{
v5 = std::__any_caster<SEMANTICANALYZER::DotCloud>((std::any *)(v3 + 32));
if ( !v5 )
std::__throw_bad_any_cast();
v10 = parseDotCloud(v5, (int)"dot_cloud", v6, v7, v8, v9, v17, v18, v19, v20, v21, v22, v23);
LABEL_17:
v17 = v10;
}
v15 = *(long long **)(a1 + 8);
if ( v15 == *(long long **)(a1 + 16) )
{
std::vector<Shape *>::_M_realloc_insert<Shape * const&>(a1, v15, &v17);
}
else
{
*v15 = v17;
*(_QWORD *)(a1 + 8) += 8LL;
}
v3 += 48LL;
if ( v3 == v4 )
return a1;
}
v14 = (long long *)std::__any_caster<SEMANTICANALYZER::Graph>((std::any *)(v3 + 32));
if ( !v14 )
std::__throw_bad_any_cast();
v10 = parseGraph(v14);
goto LABEL_17;
}
return a1;
}
| translate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV R14,qword ptr [RDX]
MOV R13,qword ptr [RDX + 0x8]
CMP R14,R13
JZ 0x00108d10
LEA R15,[0x10b184]
LEA R12,[RSP + 0xc]
LEA RBP,[0x10b190]
LAB_00108bbe:
MOV RDI,R14
MOV RSI,R15
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00108c44
MOV RDI,R14
MOV RSI,RBP
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00108c79
MOV RDI,R14
LEA RSI,[0x10b199]
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00108cae
MOV RDI,R14
LEA RSI,[0x10b19e]
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00108cc6
MOV RDI,R14
LEA RSI,[0x10b1a4]
CALL 0x001060f0
TEST EAX,EAX
JNZ 0x00108ce0
LEA RDI,[R14 + 0x20]
LAB_00108c29:
CALL 0x00106370
TEST RAX,RAX
JZ 0x00108d36
LAB_00108c37:
MOV RDI,RAX
CALL 0x00106260
JMP 0x00108cdc
LAB_00108c44:
LEA RDI,[R14 + 0x20]
LAB_00108c48:
CALL 0x00106680
TEST RAX,RAX
JZ 0x00108d22
MOV word ptr [RSP + 0xc],0x0
MOV RCX,0xa00000001
MOV qword ptr [RSP + 0x10],RCX
LAB_00108c6c:
MOV RDI,RAX
MOV RSI,R12
CALL 0x001061f0
JMP 0x00108cdc
LAB_00108c79:
LEA RDI,[R14 + 0x20]
LAB_00108c7d:
CALL 0x00106660
TEST RAX,RAX
JZ 0x00108d27
MOV word ptr [RSP + 0xc],0x0
MOV RCX,0xa00000001
MOV qword ptr [RSP + 0x10],RCX
LAB_00108ca1:
MOV RDI,RAX
MOV RSI,R12
CALL 0x001062f0
JMP 0x00108cdc
LAB_00108cae:
LEA RDI,[R14 + 0x20]
LAB_00108cb2:
CALL 0x001063f0
TEST RAX,RAX
JZ 0x00108d2c
LAB_00108cbc:
MOV RDI,RAX
CALL 0x001063d0
JMP 0x00108cdc
LAB_00108cc6:
LEA RDI,[R14 + 0x20]
LAB_00108cca:
CALL 0x00106440
TEST RAX,RAX
JZ 0x00108d31
LAB_00108cd4:
MOV RDI,RAX
CALL 0x001065c0
LAB_00108cdc:
MOV qword ptr [RSP],RAX
LAB_00108ce0:
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x00108cf8
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSI],RAX
ADD qword ptr [RBX + 0x8],0x8
JMP 0x00108d03
LAB_00108cf8:
MOV RDI,RBX
MOV RDX,RSP
CALL 0x00106160
LAB_00108d03:
ADD R14,0x30
CMP R14,R13
JNZ 0x00108bbe
LAB_00108d10:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00108d22:
CALL 0x00106480
LAB_00108d27:
CALL 0x00106480
LAB_00108d2c:
CALL 0x00106480
LAB_00108d31:
CALL 0x00106480
LAB_00108d36:
CALL 0x00106480
LAB_00108d3b:
JMP 0x00108d5f
LAB_00108d5f:
MOV R14,RAX
MOV RDI,RBX
CALL 0x001064d0
MOV RDI,R14
CALL 0x001066c0
|
/* Translator::translate(std::vector<std::pair<std::__cxx11::string, std::any>,
std::allocator<std::pair<std::__cxx11::string, std::any> > >&) */
vector * Translator::translate(vector *param_1)
{
char *pcVar1;
int8 *puVar2;
int iVar3;
DotCloud *pDVar4;
ObjectDecl *pOVar5;
Relation *pRVar6;
Note *pNVar7;
Graph *pGVar8;
int8 uVar9;
long *in_RDX;
char *pcVar10;
int8 local_48;
int2 local_3c [2];
int8 local_38;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
pcVar10 = (char *)*in_RDX;
pcVar1 = (char *)in_RDX[1];
if (pcVar10 != pcVar1) {
do {
iVar3 = std::__cxx11::string::compare(pcVar10);
if (iVar3 == 0) {
/* try { // try from 00108c48 to 00108c4c has its CatchHandler @ 00108d55 */
pOVar5 = (ObjectDecl *)
std::__any_caster<SEMANTICANALYZER::ObjectDecl>((any *)(pcVar10 + 0x20));
if (pOVar5 == (ObjectDecl *)0x0) {
/* try { // try from 00108d22 to 00108d26 has its CatchHandler @ 00108d5d */
std::__throw_bad_any_cast();
LAB_00108d27:
/* try { // try from 00108d27 to 00108d2b has its CatchHandler @ 00108d4d */
std::__throw_bad_any_cast();
LAB_00108d2c:
/* try { // try from 00108d2c to 00108d30 has its CatchHandler @ 00108d47 */
std::__throw_bad_any_cast();
LAB_00108d31:
/* try { // try from 00108d31 to 00108d35 has its CatchHandler @ 00108d43 */
std::__throw_bad_any_cast();
LAB_00108d36:
/* try { // try from 00108d36 to 00108d3a has its CatchHandler @ 00108d3b */
uVar9 = std::__throw_bad_any_cast();
/* catch(type#1 @ 00000000) { ... } // from try @ 00108d36 with catch @ 00108d3b
*/
/* catch(type#1 @ 00000000) { ... } // from try @ 00108cf8 with catch @ 00108d5f
*/
FiguresStorage::~FiguresStorage((FiguresStorage *)param_1);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar9);
}
local_3c[0] = 0;
local_38 = 0xa00000001;
/* try { // try from 00108c6c to 00108c76 has its CatchHandler @ 00108d53 */
local_48 = parseObject(pOVar5,(Style *)local_3c);
}
else {
iVar3 = std::__cxx11::string::compare(pcVar10);
if (iVar3 == 0) {
/* try { // try from 00108c7d to 00108c81 has its CatchHandler @ 00108d51 */
pRVar6 = (Relation *)
std::__any_caster<SEMANTICANALYZER::Relation>((any *)(pcVar10 + 0x20));
if (pRVar6 == (Relation *)0x0) goto LAB_00108d27;
local_3c[0] = 0;
local_38 = 0xa00000001;
/* try { // try from 00108ca1 to 00108cab has its CatchHandler @ 00108d4f */
local_48 = parseRelation(pRVar6,(Style *)local_3c);
}
else {
iVar3 = std::__cxx11::string::compare(pcVar10);
if (iVar3 == 0) {
/* try { // try from 00108cb2 to 00108cb6 has its CatchHandler @ 00108d4b */
pNVar7 = (Note *)std::__any_caster<SEMANTICANALYZER::Note>((any *)(pcVar10 + 0x20));
if (pNVar7 == (Note *)0x0) goto LAB_00108d2c;
/* try { // try from 00108cbc to 00108cc3 has its CatchHandler @ 00108d49 */
local_48 = parseNote(pNVar7);
}
else {
iVar3 = std::__cxx11::string::compare(pcVar10);
if (iVar3 == 0) {
/* try { // try from 00108cca to 00108cce has its CatchHandler @ 00108d41 */
pGVar8 = (Graph *)std::__any_caster<SEMANTICANALYZER::Graph>((any *)(pcVar10 + 0x20));
if (pGVar8 == (Graph *)0x0) goto LAB_00108d31;
/* try { // try from 00108cd4 to 00108cdb has its CatchHandler @ 00108d45 */
local_48 = parseGraph(pGVar8);
}
else {
iVar3 = std::__cxx11::string::compare(pcVar10);
if (iVar3 == 0) {
/* try { // try from 00108c29 to 00108c2d has its CatchHandler @ 00108d3f */
pDVar4 = (DotCloud *)
std::__any_caster<SEMANTICANALYZER::DotCloud>((any *)(pcVar10 + 0x20));
if (pDVar4 == (DotCloud *)0x0) goto LAB_00108d36;
/* try { // try from 00108c37 to 00108c3e has its CatchHandler @ 00108d3d */
local_48 = parseDotCloud(pDVar4);
}
}
}
}
}
puVar2 = *(int8 **)(param_1 + 8);
if (puVar2 == *(int8 **)(param_1 + 0x10)) {
/* try { // try from 00108cf8 to 00108d02 has its CatchHandler @ 00108d5f */
std::vector<Shape*,std::allocator<Shape*>>::_M_realloc_insert<Shape*const&>
((vector<Shape*,std::allocator<Shape*>> *)param_1,puVar2,&local_48);
}
else {
*puVar2 = local_48;
*(long *)(param_1 + 8) = *(long *)(param_1 + 8) + 8;
}
pcVar10 = pcVar10 + 0x30;
} while (pcVar10 != pcVar1);
}
return param_1;
}
| |
39,315 | find_head | eloqsql/storage/maria/ma_bitmap.c | static my_bool find_head(MARIA_HA *info, uint length, uint position)
{
MARIA_FILE_BITMAP *bitmap= &info->s->bitmap;
MARIA_BITMAP_BLOCK *block;
/*
There is always place for the head block in bitmap_blocks as these are
preallocated at _ma_init_block_record().
*/
block= dynamic_element(&info->bitmap_blocks, position, MARIA_BITMAP_BLOCK *);
if (info->s->base.extra_options & MA_EXTRA_OPTIONS_INSERT_ORDER)
{
if (bitmap->page != info->s->last_insert_bitmap &&
_ma_change_bitmap_page(info, bitmap,
info->s->last_insert_bitmap))
return 1;
/* Don't allocate any blocks from earlier pages */
info->s->state.first_bitmap_with_space= info->s->last_insert_bitmap;
}
/*
We need to have DIRENTRY_SIZE here to take into account that we may
need an extra directory entry for the row
*/
while (allocate_head(bitmap, length + DIR_ENTRY_SIZE, block))
if (move_to_next_bitmap(info, bitmap))
return 1;
return 0;
} | O0 | c | find_head:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x2c0(%rax), %rax
movl -0x18(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x428(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x425ae
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0xc30(%rcx), %rax
je 0x42592
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xc30(%rax), %rdx
callq 0x42b40
movsbl %al, %eax
cmpl $0x0, %eax
je 0x42592
movb $0x1, -0x1(%rbp)
jmp 0x425e4
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xc30(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0xd0(%rax)
jmp 0x425b0
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x4, %esi
movq -0x28(%rbp), %rdx
callq 0x440a0
cmpb $0x0, %al
je 0x425e0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x443e0
cmpb $0x0, %al
je 0x425de
movb $0x1, -0x1(%rbp)
jmp 0x425e4
jmp 0x425b0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| find_head:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rax, [rbp+var_10]
mov rax, [rax]
add rax, 0A10h
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+2C0h]
mov ecx, [rbp+var_18]
imul rcx, 18h
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+428h]
and eax, 2
cmp eax, 0
jz short loc_425AE
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
cmp rax, [rcx+0C30h]
jz short loc_42592
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rdx, [rax+0C30h]
call _ma_change_bitmap_page
movsx eax, al
cmp eax, 0
jz short loc_42592
mov [rbp+var_1], 1
jmp short loc_425E4
loc_42592:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rax+0C30h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+0D0h], rcx
loc_425AE:
jmp short $+2
loc_425B0:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_14]
add esi, 4
mov rdx, [rbp+var_28]
call allocate_head
cmp al, 0
jz short loc_425E0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call move_to_next_bitmap
cmp al, 0
jz short loc_425DE
mov [rbp+var_1], 1
jmp short loc_425E4
loc_425DE:
jmp short loc_425B0
loc_425E0:
mov [rbp+var_1], 0
loc_425E4:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char find_head(_QWORD *a1, int a2, unsigned int a3)
{
long long v4; // [rsp+8h] [rbp-28h]
long long v5; // [rsp+10h] [rbp-20h]
v5 = *a1 + 2576LL;
v4 = 24LL * a3 + a1[88];
if ( (*(_DWORD *)(*a1 + 1064LL) & 2) != 0 )
{
if ( *(_QWORD *)(*a1 + 2592LL) == *(_QWORD *)(*a1 + 3120LL)
|| !(unsigned __int8)ma_change_bitmap_page(a1, v5, *(_QWORD *)(*a1 + 3120LL)) )
{
*(_QWORD *)(*a1 + 208LL) = *(_QWORD *)(*a1 + 3120LL);
goto LABEL_6;
}
return 1;
}
else
{
LABEL_6:
while ( (unsigned __int8)allocate_head(v5, (unsigned int)(a2 + 4), v4) )
{
if ( (unsigned __int8)move_to_next_bitmap(a1, v5) )
return 1;
}
return 0;
}
}
| find_head:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
ADD RAX,0xa10
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2c0]
MOV ECX,dword ptr [RBP + -0x18]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x428]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001425ae
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0xc30]
JZ 0x00142592
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0xc30]
CALL 0x00142b40
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00142592
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001425e4
LAB_00142592:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0xc30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0xd0],RCX
LAB_001425ae:
JMP 0x001425b0
LAB_001425b0:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x14]
ADD ESI,0x4
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001440a0
CMP AL,0x0
JZ 0x001425e0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001443e0
CMP AL,0x0
JZ 0x001425de
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001425e4
LAB_001425de:
JMP 0x001425b0
LAB_001425e0:
MOV byte ptr [RBP + -0x1],0x0
LAB_001425e4:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 find_head(long *param_1,int param_2,uint param_3)
{
long lVar1;
char cVar2;
long lVar3;
lVar3 = *param_1 + 0xa10;
lVar1 = param_1[0x58];
if ((*(uint *)(*param_1 + 0x428) & 2) != 0) {
if ((*(long *)(*param_1 + 0xa20) != *(long *)(*param_1 + 0xc30)) &&
(cVar2 = _ma_change_bitmap_page(param_1,lVar3,*(int8 *)(*param_1 + 0xc30)),
cVar2 != '\0')) {
return 1;
}
*(int8 *)(*param_1 + 0xd0) = *(int8 *)(*param_1 + 0xc30);
}
do {
cVar2 = allocate_head(lVar3,param_2 + 4,lVar1 + (ulong)param_3 * 0x18);
if (cVar2 == '\0') {
return 0;
}
cVar2 = move_to_next_bitmap(param_1,lVar3);
} while (cVar2 == '\0');
return 1;
}
| |
39,316 | find_head | eloqsql/storage/maria/ma_bitmap.c | static my_bool find_head(MARIA_HA *info, uint length, uint position)
{
MARIA_FILE_BITMAP *bitmap= &info->s->bitmap;
MARIA_BITMAP_BLOCK *block;
/*
There is always place for the head block in bitmap_blocks as these are
preallocated at _ma_init_block_record().
*/
block= dynamic_element(&info->bitmap_blocks, position, MARIA_BITMAP_BLOCK *);
if (info->s->base.extra_options & MA_EXTRA_OPTIONS_INSERT_ORDER)
{
if (bitmap->page != info->s->last_insert_bitmap &&
_ma_change_bitmap_page(info, bitmap,
info->s->last_insert_bitmap))
return 1;
/* Don't allocate any blocks from earlier pages */
info->s->state.first_bitmap_with_space= info->s->last_insert_bitmap;
}
/*
We need to have DIRENTRY_SIZE here to take into account that we may
need an extra directory entry for the row
*/
while (allocate_head(bitmap, length + DIR_ENTRY_SIZE, block))
if (move_to_next_bitmap(info, bitmap))
return 1;
return 0;
} | O3 | c | find_head:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %r14d
movq %rdi, %r15
movq (%rdi), %r12
leaq 0xa10(%r12), %r13
movl %edx, %eax
leaq (%rax,%rax,2), %rbx
shlq $0x3, %rbx
addq 0x2c0(%rdi), %rbx
testb $0x2, 0x428(%r12)
je 0x4029a
movq 0xa20(%r12), %rax
movq 0xc30(%r12), %rdx
movq %r12, %rcx
cmpq %rdx, %rax
je 0x40293
movq %r15, %rdi
movq %r13, %rsi
callq 0x40bb5
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x40553
movq (%r15), %rcx
movq 0xc30(%rcx), %rax
movq %rax, 0xd0(%rcx)
movq %r13, -0x58(%rbp)
addl $0x4, %r14d
movq %r15, -0x60(%rbp)
movq %rbx, -0x38(%rbp)
movl %r14d, -0x44(%rbp)
movl $0x3, %eax
cmpl %r14d, 0xb24(%r12)
jae 0x402d9
movl $0x2, %eax
cmpl %r14d, 0xb20(%r12)
jae 0x402d9
xorl %eax, %eax
cmpl %r14d, 0xb1c(%r12)
setae %al
movq 0xa10(%r12), %rdx
movl 0x428(%rdx), %r9d
testb $0x2, %r9b
je 0x4031b
movq 0xa20(%r12), %rcx
cmpq 0xc30(%rdx), %rcx
jne 0x4031b
movl 0xc28(%rdx), %r8d
movl %r8d, %ecx
shrl $0x3, %ecx
andl $-0x2, %ecx
leal (%rcx,%rcx,2), %ecx
andl $0xf, %r8d
xorl %r14d, %r14d
jmp 0x4033b
movl 0xa38(%r12), %ecx
movl $0xaaaaaaab, %esi # imm = 0xAAAAAAAB
imulq %rsi, %rcx
shrq $0x22, %rcx
addl %ecx, %ecx
leal (%rcx,%rcx,2), %ecx
xorl %r8d, %r8d
movb $0x1, %r14b
movq 0xa18(%r12), %rdi
movl 0xa34(%r12), %esi
movl %ecx, %r11d
addq %rdi, %r11
cmpl %esi, %ecx
jae 0x40444
movl %r9d, -0x2c(%rbp)
movq %rdx, -0x40(%rbp)
movq %rsi, -0x50(%rbp)
addq %rdi, %rsi
movq %rsi, -0x68(%rbp)
movl $0xffffffff, %r10d # imm = 0xFFFFFFFF
xorl %esi, %esi
movl (%r11), %ecx
movzwl 0x4(%r11), %ebx
shlq $0x20, %rbx
orq %rcx, %rbx
testq %rbx, %rbx
sete %cl
testq %rsi, %rsi
setne %r9b
andb %cl, %r9b
movq %rbx, %rcx
notq %rcx
movabsq $0x924924924924, %rdx # imm = 0x924924924924
testq %rcx, %rdx
sete %cl
orb %r9b, %cl
jne 0x4041e
leal (%r8,%r8,2), %ecx
shrq %cl, %rbx
movl %r11d, %ecx
subl %edi, %ecx
movl %ebx, %r9d
andl $0x7, %r9d
cmpl $0x4, %r9d
setb %r13b
testb %r14b, %r14b
setne %dl
andb %r13b, %dl
cmpb $0x1, %dl
jne 0x403e2
movl %ecx, 0xa38(%r12)
xorl %r14d, %r14d
cmpl %eax, %r9d
setbe %dl
cmpl %r10d, %r9d
setg %r13b
andb %dl, %r13b
cmpb $0x1, %r13b
jne 0x40411
cmpl %eax, %r9d
je 0x40478
cmpb $0x0, 0xa32(%r12)
movq %r11, %rsi
movl %r9d, %r10d
movl %r8d, %r15d
jne 0x40480
incl %r8d
shrq $0x3, %rbx
cmpl $0x10, %r8d
jne 0x403ba
addq $0x6, %r11
xorl %r8d, %r8d
cmpq -0x68(%rbp), %r11
jb 0x40374
testq %rsi, %rsi
movq -0x38(%rbp), %rbx
movq -0x40(%rbp), %rdx
movl -0x2c(%rbp), %r9d
jne 0x40580
movl 0xb38(%r12), %eax
addq %rdi, %rax
cmpq %rax, %r11
jb 0x40562
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x41c3c
testb %al, %al
movl -0x44(%rbp), %r14d
je 0x402ae
movb $0x1, %al
jmp 0x40553
movl %r8d, %r15d
movl %eax, %r10d
jmp 0x40486
movl %r8d, %r15d
movl %r9d, %r10d
movq %r11, %rsi
movq -0x38(%rbp), %rbx
movq -0x40(%rbp), %rdx
movl -0x2c(%rbp), %r9d
testb $0x2, %r9b
jne 0x404a5
movq 0xa20(%r12), %rax
jmp 0x404da
movl %esi, %eax
subl %edi, %eax
movl $0xaaaaaaab, %ecx # imm = 0xAAAAAAAB
imulq %rax, %rcx
shrq $0x20, %rcx
andl $-0x4, %ecx
leal (%r15,%rcx,4), %eax
movl %eax, 0xc28(%rdx)
movq 0xa20(%r12), %rax
movq %rax, 0xc30(%rdx)
movq 0xa18(%r12), %rdi
movq %rsi, %rcx
subl %edi, %ecx
movl $0xaaaaaaab, %edx # imm = 0xAAAAAAAB
imulq %rcx, %rdx
shrq $0x20, %rdx
andl $-0x4, %edx
leal (%r15,%rdx,4), %ecx
addq %rcx, %rax
incq %rax
movq %rax, (%rbx)
movl $0xffff, 0x8(%rbx) # imm = 0xFFFF
movl %r10d, %eax
movl 0xb18(%r12,%rax,4), %eax
movl %eax, 0xc(%rbx)
movl $0x0, 0x10(%rbx)
movb %r10b, 0x15(%rbx)
movb $0x4, 0x14(%rbx)
leal (%r15,%r15,2), %ecx
movl %ecx, %eax
shrl $0x3, %eax
andb $0x7, %cl
movl $0x7, %edx
shll %cl, %edx
movzwl (%rsi,%rax), %edi
notl %edx
andl %edi, %edx
movl $0x4, %edi
shll %cl, %edi
orl %edx, %edi
movw %di, (%rsi,%rax)
movb $0x1, 0xa30(%r12)
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r11d, %eax
subl %edi, %eax
addl $0x6, %eax
xorl %r15d, %r15d
xorl %r10d, %r10d
movq %r11, %rsi
movl %eax, 0xa34(%r12)
jmp 0x40495
movl %esi, %eax
subl %edi, %eax
addl $0x6, %eax
cmpl %eax, -0x50(%rbp)
jae 0x40495
jmp 0x40573
| find_head:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14d, esi
mov r15, rdi
mov r12, [rdi]
lea r13, [r12+0A10h]
mov eax, edx
lea rbx, [rax+rax*2]
shl rbx, 3
add rbx, [rdi+2C0h]
test byte ptr [r12+428h], 2
jz short loc_4029A
mov rax, [r12+0A20h]
mov rdx, [r12+0C30h]
mov rcx, r12
cmp rax, rdx
jz short loc_40293
mov rdi, r15
mov rsi, r13
call _ma_change_bitmap_page
mov ecx, eax
mov al, 1
test cl, cl
jnz loc_40553
mov rcx, [r15]
mov rax, [rcx+0C30h]
loc_40293:
mov [rcx+0D0h], rax
loc_4029A:
mov [rbp+var_58], r13
add r14d, 4
mov [rbp+var_60], r15
mov [rbp+var_38], rbx
mov [rbp+var_44], r14d
loc_402AE:
mov eax, 3
cmp [r12+0B24h], r14d
jnb short loc_402D9
mov eax, 2
cmp [r12+0B20h], r14d
jnb short loc_402D9
xor eax, eax
cmp [r12+0B1Ch], r14d
setnb al
loc_402D9:
mov rdx, [r12+0A10h]
mov r9d, [rdx+428h]
test r9b, 2
jz short loc_4031B
mov rcx, [r12+0A20h]
cmp rcx, [rdx+0C30h]
jnz short loc_4031B
mov r8d, [rdx+0C28h]
mov ecx, r8d
shr ecx, 3
and ecx, 0FFFFFFFEh
lea ecx, [rcx+rcx*2]
and r8d, 0Fh
xor r14d, r14d
jmp short loc_4033B
loc_4031B:
mov ecx, [r12+0A38h]
mov esi, 0AAAAAAABh
imul rcx, rsi
shr rcx, 22h
add ecx, ecx
lea ecx, [rcx+rcx*2]
xor r8d, r8d
mov r14b, 1
loc_4033B:
mov rdi, [r12+0A18h]
mov esi, [r12+0A34h]
mov r11d, ecx
add r11, rdi
cmp ecx, esi
jnb loc_40444
mov [rbp+var_2C], r9d
mov [rbp+var_40], rdx
mov [rbp+var_50], rsi
add rsi, rdi
mov [rbp+var_68], rsi
mov r10d, 0FFFFFFFFh
xor esi, esi
loc_40374:
mov ecx, [r11]
movzx ebx, word ptr [r11+4]
shl rbx, 20h
or rbx, rcx
test rbx, rbx
setz cl
test rsi, rsi
setnz r9b
and r9b, cl
mov rcx, rbx
not rcx
mov rdx, 924924924924h
test rdx, rcx
setz cl
or cl, r9b
jnz short loc_4041E
lea ecx, [r8+r8*2]
shr rbx, cl
mov ecx, r11d
sub ecx, edi
loc_403BA:
mov r9d, ebx
and r9d, 7
cmp r9d, 4
setb r13b
test r14b, r14b
setnz dl
and dl, r13b
cmp dl, 1
jnz short loc_403E2
mov [r12+0A38h], ecx
xor r14d, r14d
loc_403E2:
cmp r9d, eax
setbe dl
cmp r9d, r10d
setnle r13b
and r13b, dl
cmp r13b, 1
jnz short loc_40411
cmp r9d, eax
jz short loc_40478
cmp byte ptr [r12+0A32h], 0
mov rsi, r11
mov r10d, r9d
mov r15d, r8d
jnz short loc_40480
loc_40411:
inc r8d
shr rbx, 3
cmp r8d, 10h
jnz short loc_403BA
loc_4041E:
add r11, 6
xor r8d, r8d
cmp r11, [rbp+var_68]
jb loc_40374
test rsi, rsi
mov rbx, [rbp+var_38]
mov rdx, [rbp+var_40]
mov r9d, [rbp+var_2C]
jnz loc_40580
loc_40444:
mov eax, [r12+0B38h]
add rax, rdi
cmp r11, rax
jb loc_40562
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_58]
call move_to_next_bitmap
test al, al
mov r14d, [rbp+var_44]
jz loc_402AE
mov al, 1
jmp loc_40553
loc_40478:
mov r15d, r8d
mov r10d, eax
jmp short loc_40486
loc_40480:
mov r15d, r8d
mov r10d, r9d
loc_40486:
mov rsi, r11
mov rbx, [rbp+var_38]
mov rdx, [rbp+var_40]
mov r9d, [rbp+var_2C]
loc_40495:
test r9b, 2
jnz short loc_404A5
mov rax, [r12+0A20h]
jmp short loc_404DA
loc_404A5:
mov eax, esi
sub eax, edi
mov ecx, 0AAAAAAABh
imul rcx, rax
shr rcx, 20h
and ecx, 0FFFFFFFCh
lea eax, [r15+rcx*4]
mov [rdx+0C28h], eax
mov rax, [r12+0A20h]
mov [rdx+0C30h], rax
mov rdi, [r12+0A18h]
loc_404DA:
mov rcx, rsi
sub ecx, edi
mov edx, 0AAAAAAABh
imul rdx, rcx
shr rdx, 20h
and edx, 0FFFFFFFCh
lea ecx, [r15+rdx*4]
add rax, rcx
inc rax
mov [rbx], rax
mov dword ptr [rbx+8], 0FFFFh
mov eax, r10d
mov eax, [r12+rax*4+0B18h]
mov [rbx+0Ch], eax
mov dword ptr [rbx+10h], 0
mov [rbx+15h], r10b
mov byte ptr [rbx+14h], 4
lea ecx, [r15+r15*2]
mov eax, ecx
shr eax, 3
and cl, 7
mov edx, 7
shl edx, cl
movzx edi, word ptr [rsi+rax]
not edx
and edx, edi
mov edi, 4
shl edi, cl
or edi, edx
mov [rsi+rax], di
mov byte ptr [r12+0A30h], 1
xor eax, eax
loc_40553:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_40562:
mov eax, r11d
sub eax, edi
add eax, 6
xor r15d, r15d
xor r10d, r10d
mov rsi, r11
loc_40573:
mov [r12+0A34h], eax
jmp loc_40495
loc_40580:
mov eax, esi
sub eax, edi
add eax, 6
cmp dword ptr [rbp+var_50], eax
jnb loc_40495
jmp short loc_40573
| char find_head(_QWORD *a1, int a2, unsigned int a3)
{
int v3; // r15d
long long v4; // r12
long long v5; // r13
long long v6; // rbx
long long v7; // rax
long long v8; // rdx
long long v9; // rcx
char v10; // cl
char result; // al
unsigned int v12; // r14d
unsigned int v13; // eax
long long v14; // rdx
long long v15; // r9
unsigned long long v16; // rcx
long long v17; // r8
char v18; // r14
long long v19; // rdi
long long v20; // rsi
unsigned int *v21; // r11
int v22; // r10d
unsigned int *v23; // rsi
unsigned long long v24; // rbx
unsigned long long v25; // rbx
unsigned int v26; // r9d
long long v27; // rax
unsigned int v28; // eax
unsigned long long v29; // [rsp+8h] [rbp-68h]
unsigned int v31; // [rsp+20h] [rbp-50h]
unsigned int v32; // [rsp+2Ch] [rbp-44h]
long long v33; // [rsp+38h] [rbp-38h]
unsigned int v34; // [rsp+44h] [rbp-2Ch]
v3 = (int)a1;
v4 = *a1;
v5 = *a1 + 2576LL;
v6 = a1[88] + 24LL * a3;
if ( (*(_BYTE *)(*a1 + 1064LL) & 2) != 0 )
{
v7 = *(_QWORD *)(v4 + 2592);
v8 = *(_QWORD *)(v4 + 3120);
v9 = *a1;
if ( v7 != v8 )
{
v10 = ma_change_bitmap_page(a1, *a1 + 2576LL, v8, v9);
result = 1;
if ( v10 )
return result;
v9 = *a1;
v7 = *(_QWORD *)(*a1 + 3120LL);
}
*(_QWORD *)(v9 + 208) = v7;
}
v12 = a2 + 4;
v33 = v6;
v32 = a2 + 4;
while ( 1 )
{
v13 = 3;
if ( *(_DWORD *)(v4 + 2852) < v12 )
{
v13 = 2;
if ( *(_DWORD *)(v4 + 2848) < v12 )
v13 = *(_DWORD *)(v4 + 2844) >= v12;
}
v14 = *(_QWORD *)(v4 + 2576);
v15 = *(unsigned int *)(v14 + 1064);
if ( (v15 & 2) != 0 && *(_QWORD *)(v4 + 2592) == *(_QWORD *)(v14 + 3120) )
{
v16 = 3 * ((*(_DWORD *)(v14 + 3112) >> 3) & 0xFFFFFFFE);
v17 = *(_DWORD *)(v14 + 3112) & 0xF;
v18 = 0;
}
else
{
v16 = 6 * (*(_DWORD *)(v4 + 2616) / 6u);
v17 = 0LL;
v18 = 1;
}
v19 = *(_QWORD *)(v4 + 2584);
v20 = *(unsigned int *)(v4 + 2612);
v21 = (unsigned int *)(v19 + (unsigned int)v16);
if ( (unsigned int)v16 < (unsigned int)v20 )
break;
LABEL_26:
if ( (unsigned long long)v21 < v19 + (unsigned long long)*(unsigned int *)(v4 + 2872) )
{
v28 = (_DWORD)v21 - v19 + 6;
v3 = 0;
v22 = 0;
v23 = v21;
LABEL_38:
*(_DWORD *)(v4 + 2612) = v28;
goto LABEL_32;
}
v12 = v32;
if ( (unsigned __int8)move_to_next_bitmap(a1, v5, v14, v16, v17, v15) )
return 1;
}
v34 = *(_DWORD *)(v14 + 1064);
v31 = *(_DWORD *)(v4 + 2612);
v29 = v19 + v20;
v22 = -1;
v23 = 0LL;
do
{
v24 = *v21 | ((unsigned long long)*((unsigned __int16 *)v21 + 2) << 32);
v16 = ~v24;
LOBYTE(v16) = v24 == 0 && v23 != 0LL || (~v24 & 0x924924924924LL) == 0;
if ( !(_BYTE)v16 )
{
v25 = v24 >> (3 * (unsigned __int8)v17);
v16 = (unsigned int)((_DWORD)v21 - v19);
while ( 1 )
{
v26 = v25 & 7;
if ( v26 < 4 && v18 != 0 )
{
*(_DWORD *)(v4 + 2616) = v16;
v18 = 0;
}
if ( v26 <= v13 && (int)v26 > v22 )
{
if ( v26 == v13 )
{
v3 = v17;
v22 = v13;
goto LABEL_31;
}
v23 = v21;
v22 = v25 & 7;
v3 = v17;
if ( *(_BYTE *)(v4 + 2610) )
break;
}
LODWORD(v17) = v17 + 1;
v25 >>= 3;
if ( (_DWORD)v17 == 16 )
goto LABEL_24;
}
v3 = v17;
v22 = v25 & 7;
LABEL_31:
v23 = v21;
v6 = v33;
LOBYTE(v15) = v34;
goto LABEL_32;
}
LABEL_24:
v21 = (unsigned int *)((char *)v21 + 6);
v17 = 0LL;
}
while ( (unsigned long long)v21 < v29 );
v6 = v33;
v15 = v34;
if ( !v23 )
goto LABEL_26;
v28 = (_DWORD)v23 - v19 + 6;
if ( v31 < v28 )
goto LABEL_38;
LABEL_32:
if ( (v15 & 2) != 0 )
{
*(_DWORD *)(v14 + 3112) = v3
+ 4
* (((2863311531u * (unsigned long long)(unsigned int)((_DWORD)v23 - v19)) >> 32) & 0xFFFFFFFC);
v27 = *(_QWORD *)(v4 + 2592);
*(_QWORD *)(v14 + 3120) = v27;
v19 = *(_QWORD *)(v4 + 2584);
}
else
{
v27 = *(_QWORD *)(v4 + 2592);
}
*(_QWORD *)v6 = v3
+ 4 * (((2863311531u * (unsigned long long)(unsigned int)((_DWORD)v23 - v19)) >> 32) & 0xFFFFFFFC)
+ v27
+ 1;
*(_DWORD *)(v6 + 8) = 0xFFFF;
*(_DWORD *)(v6 + 12) = *(_DWORD *)(v4 + 4LL * (unsigned int)v22 + 2840);
*(_DWORD *)(v6 + 16) = 0;
*(_BYTE *)(v6 + 21) = v22;
*(_BYTE *)(v6 + 20) = 4;
*(_WORD *)((char *)v23 + ((unsigned int)(3 * v3) >> 3)) = *(_WORD *)((_BYTE *)v23 + ((unsigned int)(3 * v3) >> 3)) & ~(7 << ((3 * v3) & 7)) | (4 << ((3 * v3) & 7));
*(_BYTE *)(v4 + 2608) = 1;
return 0;
}
| find_head:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14D,ESI
MOV R15,RDI
MOV R12,qword ptr [RDI]
LEA R13,[R12 + 0xa10]
MOV EAX,EDX
LEA RBX,[RAX + RAX*0x2]
SHL RBX,0x3
ADD RBX,qword ptr [RDI + 0x2c0]
TEST byte ptr [R12 + 0x428],0x2
JZ 0x0014029a
MOV RAX,qword ptr [R12 + 0xa20]
MOV RDX,qword ptr [R12 + 0xc30]
MOV RCX,R12
CMP RAX,RDX
JZ 0x00140293
MOV RDI,R15
MOV RSI,R13
CALL 0x00140bb5
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x00140553
MOV RCX,qword ptr [R15]
MOV RAX,qword ptr [RCX + 0xc30]
LAB_00140293:
MOV qword ptr [RCX + 0xd0],RAX
LAB_0014029a:
MOV qword ptr [RBP + -0x58],R13
ADD R14D,0x4
MOV qword ptr [RBP + -0x60],R15
MOV qword ptr [RBP + -0x38],RBX
MOV dword ptr [RBP + -0x44],R14D
LAB_001402ae:
MOV EAX,0x3
CMP dword ptr [R12 + 0xb24],R14D
JNC 0x001402d9
MOV EAX,0x2
CMP dword ptr [R12 + 0xb20],R14D
JNC 0x001402d9
XOR EAX,EAX
CMP dword ptr [R12 + 0xb1c],R14D
SETNC AL
LAB_001402d9:
MOV RDX,qword ptr [R12 + 0xa10]
MOV R9D,dword ptr [RDX + 0x428]
TEST R9B,0x2
JZ 0x0014031b
MOV RCX,qword ptr [R12 + 0xa20]
CMP RCX,qword ptr [RDX + 0xc30]
JNZ 0x0014031b
MOV R8D,dword ptr [RDX + 0xc28]
MOV ECX,R8D
SHR ECX,0x3
AND ECX,0xfffffffe
LEA ECX,[RCX + RCX*0x2]
AND R8D,0xf
XOR R14D,R14D
JMP 0x0014033b
LAB_0014031b:
MOV ECX,dword ptr [R12 + 0xa38]
MOV ESI,0xaaaaaaab
IMUL RCX,RSI
SHR RCX,0x22
ADD ECX,ECX
LEA ECX,[RCX + RCX*0x2]
XOR R8D,R8D
MOV R14B,0x1
LAB_0014033b:
MOV RDI,qword ptr [R12 + 0xa18]
MOV ESI,dword ptr [R12 + 0xa34]
MOV R11D,ECX
ADD R11,RDI
CMP ECX,ESI
JNC 0x00140444
MOV dword ptr [RBP + -0x2c],R9D
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x50],RSI
ADD RSI,RDI
MOV qword ptr [RBP + -0x68],RSI
MOV R10D,0xffffffff
XOR ESI,ESI
LAB_00140374:
MOV ECX,dword ptr [R11]
MOVZX EBX,word ptr [R11 + 0x4]
SHL RBX,0x20
OR RBX,RCX
TEST RBX,RBX
SETZ CL
TEST RSI,RSI
SETNZ R9B
AND R9B,CL
MOV RCX,RBX
NOT RCX
MOV RDX,0x924924924924
TEST RDX,RCX
SETZ CL
OR CL,R9B
JNZ 0x0014041e
LEA ECX,[R8 + R8*0x2]
SHR RBX,CL
MOV ECX,R11D
SUB ECX,EDI
LAB_001403ba:
MOV R9D,EBX
AND R9D,0x7
CMP R9D,0x4
SETC R13B
TEST R14B,R14B
SETNZ DL
AND DL,R13B
CMP DL,0x1
JNZ 0x001403e2
MOV dword ptr [R12 + 0xa38],ECX
XOR R14D,R14D
LAB_001403e2:
CMP R9D,EAX
SETBE DL
CMP R9D,R10D
SETG R13B
AND R13B,DL
CMP R13B,0x1
JNZ 0x00140411
CMP R9D,EAX
JZ 0x00140478
CMP byte ptr [R12 + 0xa32],0x0
MOV RSI,R11
MOV R10D,R9D
MOV R15D,R8D
JNZ 0x00140480
LAB_00140411:
INC R8D
SHR RBX,0x3
CMP R8D,0x10
JNZ 0x001403ba
LAB_0014041e:
ADD R11,0x6
XOR R8D,R8D
CMP R11,qword ptr [RBP + -0x68]
JC 0x00140374
TEST RSI,RSI
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x40]
MOV R9D,dword ptr [RBP + -0x2c]
JNZ 0x00140580
LAB_00140444:
MOV EAX,dword ptr [R12 + 0xb38]
ADD RAX,RDI
CMP R11,RAX
JC 0x00140562
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x58]
CALL 0x00141c3c
TEST AL,AL
MOV R14D,dword ptr [RBP + -0x44]
JZ 0x001402ae
MOV AL,0x1
JMP 0x00140553
LAB_00140478:
MOV R15D,R8D
MOV R10D,EAX
JMP 0x00140486
LAB_00140480:
MOV R15D,R8D
MOV R10D,R9D
LAB_00140486:
MOV RSI,R11
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x40]
MOV R9D,dword ptr [RBP + -0x2c]
LAB_00140495:
TEST R9B,0x2
JNZ 0x001404a5
MOV RAX,qword ptr [R12 + 0xa20]
JMP 0x001404da
LAB_001404a5:
MOV EAX,ESI
SUB EAX,EDI
MOV ECX,0xaaaaaaab
IMUL RCX,RAX
SHR RCX,0x20
AND ECX,0xfffffffc
LEA EAX,[R15 + RCX*0x4]
MOV dword ptr [RDX + 0xc28],EAX
MOV RAX,qword ptr [R12 + 0xa20]
MOV qword ptr [RDX + 0xc30],RAX
MOV RDI,qword ptr [R12 + 0xa18]
LAB_001404da:
MOV RCX,RSI
SUB ECX,EDI
MOV EDX,0xaaaaaaab
IMUL RDX,RCX
SHR RDX,0x20
AND EDX,0xfffffffc
LEA ECX,[R15 + RDX*0x4]
ADD RAX,RCX
INC RAX
MOV qword ptr [RBX],RAX
MOV dword ptr [RBX + 0x8],0xffff
MOV EAX,R10D
MOV EAX,dword ptr [R12 + RAX*0x4 + 0xb18]
MOV dword ptr [RBX + 0xc],EAX
MOV dword ptr [RBX + 0x10],0x0
MOV byte ptr [RBX + 0x15],R10B
MOV byte ptr [RBX + 0x14],0x4
LEA ECX,[R15 + R15*0x2]
MOV EAX,ECX
SHR EAX,0x3
AND CL,0x7
MOV EDX,0x7
SHL EDX,CL
MOVZX EDI,word ptr [RSI + RAX*0x1]
NOT EDX
AND EDX,EDI
MOV EDI,0x4
SHL EDI,CL
OR EDI,EDX
MOV word ptr [RSI + RAX*0x1],DI
MOV byte ptr [R12 + 0xa30],0x1
XOR EAX,EAX
LAB_00140553:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00140562:
MOV EAX,R11D
SUB EAX,EDI
ADD EAX,0x6
XOR R15D,R15D
XOR R10D,R10D
MOV RSI,R11
LAB_00140573:
MOV dword ptr [R12 + 0xa34],EAX
JMP 0x00140495
LAB_00140580:
MOV EAX,ESI
SUB EAX,EDI
ADD EAX,0x6
CMP dword ptr [RBP + -0x50],EAX
JNC 0x00140495
JMP 0x00140573
|
int8 find_head(long *param_1,int param_2,ulong param_3)
{
uint uVar1;
uint uVar2;
long lVar3;
uint6 uVar4;
uint uVar5;
bool bVar6;
char cVar7;
uint uVar8;
long lVar9;
long lVar10;
byte bVar11;
long lVar12;
long *plVar13;
ulong uVar14;
uint6 *puVar15;
int iVar16;
long *plVar17;
uint uVar18;
ulong uVar19;
uint6 *puVar20;
uint uVar21;
int iVar22;
long *plVar23;
lVar3 = *param_1;
plVar13 = (long *)((param_3 & 0xffffffff) * 0x18 + param_1[0x58]);
if ((*(byte *)(lVar3 + 0x428) & 2) != 0) {
lVar9 = *(long *)(lVar3 + 0xa20);
lVar12 = lVar3;
if (lVar9 != *(long *)(lVar3 + 0xc30)) {
cVar7 = _ma_change_bitmap_page(param_1,lVar3 + 0xa10);
if (cVar7 != '\0') {
return 1;
}
lVar12 = *param_1;
lVar9 = *(long *)(lVar12 + 0xc30);
}
*(long *)(lVar12 + 0xd0) = lVar9;
}
uVar21 = param_2 + 4;
plVar23 = param_1;
while( true ) {
uVar8 = 3;
if ((*(uint *)(lVar3 + 0xb24) < uVar21) && (uVar8 = 2, *(uint *)(lVar3 + 0xb20) < uVar21)) {
uVar8 = (uint)(uVar21 <= *(uint *)(lVar3 + 0xb1c));
}
lVar9 = *(long *)(lVar3 + 0xa10);
uVar1 = *(uint *)(lVar9 + 0x428);
if (((uVar1 & 2) == 0) || (*(long *)(lVar3 + 0xa20) != *(long *)(lVar9 + 0xc30))) {
uVar18 = (*(uint *)(lVar3 + 0xa38) / 6) * 6;
plVar17 = (long *)0x0;
bVar6 = true;
}
else {
uVar18 = (*(uint *)(lVar9 + 0xc28) >> 3 & 0xfffffffe) * 3;
plVar17 = (long *)(ulong)(*(uint *)(lVar9 + 0xc28) & 0xf);
bVar6 = false;
}
lVar12 = *(long *)(lVar3 + 0xa18);
uVar2 = *(uint *)(lVar3 + 0xa34);
puVar20 = (uint6 *)((ulong)uVar18 + lVar12);
iVar16 = (int)lVar12;
if (uVar18 < uVar2) break;
LAB_00140444:
puVar15 = puVar20;
if (puVar15 < (uint6 *)((ulong)*(uint *)(lVar3 + 0xb38) + lVar12)) {
uVar21 = ((int)puVar15 - iVar16) + 6;
iVar22 = 0;
uVar19 = 0;
goto LAB_00140573;
}
cVar7 = move_to_next_bitmap(param_1,lVar3 + 0xa10);
if (cVar7 != '\0') {
return 1;
}
}
uVar19 = 0xffffffff;
puVar15 = (uint6 *)0x0;
do {
uVar4 = *puVar20;
if ((~(ulong)uVar4 & 0x924924924924) != 0 && (puVar15 == (uint6 *)0x0 || (ulong)uVar4 != 0)) {
uVar14 = (ulong)(uVar4 >> (char)plVar17 * '\x03');
do {
iVar22 = (int)plVar17;
uVar18 = (uint)uVar14 & 7;
if (bVar6 && uVar18 < 4) {
*(int *)(lVar3 + 0xa38) = (int)puVar20 - iVar16;
bVar6 = false;
}
if (((int)uVar19 < (int)uVar18 && uVar18 <= uVar8) &&
((uVar5 = uVar8, uVar18 == uVar8 ||
(uVar19 = (ulong)uVar18, puVar15 = puVar20, plVar23 = plVar17, uVar5 = uVar18,
*(char *)(lVar3 + 0xa32) != '\0')))) {
uVar19 = (ulong)uVar5;
goto LAB_00140495;
}
plVar17 = (long *)(ulong)(iVar22 + 1U);
uVar14 = uVar14 >> 3;
} while (iVar22 + 1U != 0x10);
}
iVar22 = (int)plVar23;
puVar20 = (uint6 *)((long)puVar20 + 6);
plVar17 = (long *)0x0;
} while (puVar20 < (uint6 *)((ulong)uVar2 + lVar12));
if (puVar15 == (uint6 *)0x0) goto LAB_00140444;
uVar21 = ((int)puVar15 - iVar16) + 6;
puVar20 = puVar15;
if (uVar21 <= uVar2) goto LAB_00140495;
LAB_00140573:
*(uint *)(lVar3 + 0xa34) = uVar21;
puVar20 = puVar15;
LAB_00140495:
if ((uVar1 & 2) == 0) {
lVar10 = *(long *)(lVar3 + 0xa20);
}
else {
*(uint *)(lVar9 + 0xc28) =
iVar22 + ((uint)((ulong)(uint)((int)puVar20 - iVar16) * 0xaaaaaaab >> 0x20) & 0xfffffffc) *
4;
lVar10 = *(long *)(lVar3 + 0xa20);
*(long *)(lVar9 + 0xc30) = lVar10;
lVar12 = *(long *)(lVar3 + 0xa18);
}
*plVar13 = lVar10 + (ulong)(iVar22 + ((uint)((ulong)(uint)((int)puVar20 - (int)lVar12) *
0xaaaaaaab >> 0x20) & 0xfffffffc) * 4) + 1;
*(int4 *)(plVar13 + 1) = 0xffff;
*(int4 *)((long)plVar13 + 0xc) = *(int4 *)(lVar3 + 0xb18 + uVar19 * 4);
*(int4 *)(plVar13 + 2) = 0;
*(char *)((long)plVar13 + 0x15) = (char)uVar19;
*(int1 *)((long)plVar13 + 0x14) = 4;
uVar19 = (ulong)((uint)(iVar22 * 3) >> 3);
bVar11 = (byte)(iVar22 * 3) & 7;
*(ushort *)((long)puVar20 + uVar19) =
(ushort)(4 << bVar11) | ~(ushort)(7 << bVar11) & *(ushort *)((long)puVar20 + uVar19);
*(int1 *)(lVar3 + 0xa30) = 1;
return 0;
}
| |
39,317 | lf_dynarray_value | eloqsql/mysys/lf_dynarray.c | void *lf_dynarray_value(LF_DYNARRAY *array, uint idx)
{
void * ptr, * volatile * ptr_ptr= 0;
int i;
for (i= LF_DYNARRAY_LEVELS-1; idx < dynarray_idxes_in_prev_levels[i]; i--)
/* no-op */;
ptr_ptr= &array->level[i];
idx-= dynarray_idxes_in_prev_levels[i];
for (; i > 0; i--)
{
if (!(ptr= *ptr_ptr))
return(NULL);
ptr_ptr= ((void **)ptr) + idx / dynarray_idxes_in_prev_level[i];
idx %= dynarray_idxes_in_prev_level[i];
}
if (!(ptr= *ptr_ptr))
return(NULL);
return ((uchar*)ptr) + array->size_of_element * idx;
} | O0 | c | lf_dynarray_value:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x3, -0x2c(%rbp)
movl -0x14(%rbp), %eax
movslq -0x2c(%rbp), %rdx
leaq 0x58188(%rip), %rcx # 0xb6980
cmpq (%rcx,%rdx,8), %rax
jae 0x5e80b
jmp 0x5e800
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5e7ea
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x58157(%rip), %rax # 0xb6980
movq (%rax,%rcx,8), %rcx
movl -0x14(%rbp), %eax
subq %rcx, %rax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x2c(%rbp)
jle 0x5e8af
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5e85a
movq $0x0, -0x8(%rbp)
jmp 0x5e8e2
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x14(%rbp), %eax
movslq -0x2c(%rbp), %rsi
leaq 0x58130(%rip), %rcx # 0xb69a0
xorl %edx, %edx
divq (%rcx,%rsi,8)
movq %rax, %rcx
movq -0x38(%rbp), %rax
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x5810d(%rip), %rax # 0xb69a0
movq (%rax,%rcx,8), %rcx
movl -0x14(%rbp), %eax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x14(%rbp)
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5e836
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5e8ca
movq $0x0, -0x8(%rbp)
jmp 0x5e8e2
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x20(%rcx), %ecx
imull -0x14(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
| lf_dynarray_value:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_28], 0
mov [rbp+var_2C], 3
loc_5E7EA:
mov eax, [rbp+var_14]
movsxd rdx, [rbp+var_2C]
lea rcx, dynarray_idxes_in_prev_levels
cmp rax, [rcx+rdx*8]
jnb short loc_5E80B
jmp short $+2
loc_5E800:
mov eax, [rbp+var_2C]
add eax, 0FFFFFFFFh
mov [rbp+var_2C], eax
jmp short loc_5E7EA
loc_5E80B:
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_2C]
shl rcx, 3
add rax, rcx
mov [rbp+var_28], rax
movsxd rcx, [rbp+var_2C]
lea rax, dynarray_idxes_in_prev_levels
mov rcx, [rax+rcx*8]
mov eax, [rbp+var_14]
sub rax, rcx
mov [rbp+var_14], eax
loc_5E836:
cmp [rbp+var_2C], 0
jle short loc_5E8AF
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_5E85A
mov [rbp+var_8], 0
jmp loc_5E8E2
loc_5E85A:
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov eax, [rbp+var_14]
movsxd rsi, [rbp+var_2C]
lea rcx, dynarray_idxes_in_prev_level
xor edx, edx
div qword ptr [rcx+rsi*8]
mov rcx, rax
mov rax, [rbp+var_38]
shl rcx, 3
add rax, rcx
mov [rbp+var_28], rax
movsxd rcx, [rbp+var_2C]
lea rax, dynarray_idxes_in_prev_level
mov rcx, [rax+rcx*8]
mov eax, [rbp+var_14]
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_14], eax
mov eax, [rbp+var_2C]
add eax, 0FFFFFFFFh
mov [rbp+var_2C], eax
jmp short loc_5E836
loc_5E8AF:
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_5E8CA
mov [rbp+var_8], 0
jmp short loc_5E8E2
loc_5E8CA:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov ecx, [rcx+20h]
imul ecx, [rbp+var_14]
mov ecx, ecx
add rax, rcx
mov [rbp+var_8], rax
loc_5E8E2:
mov rax, [rbp+var_8]
pop rbp
retn
| long long lf_dynarray_value(long long a1, unsigned int a2)
{
int i; // [rsp+Ch] [rbp-2Ch]
_QWORD *v4; // [rsp+10h] [rbp-28h]
unsigned int v5; // [rsp+24h] [rbp-14h]
for ( i = 3; (unsigned long long)a2 < dynarray_idxes_in_prev_levels[i]; --i )
;
v4 = (_QWORD *)(8LL * i + a1);
v5 = a2 - dynarray_idxes_in_prev_levels[i];
while ( i > 0 )
{
if ( !*v4 )
return 0LL;
v4 = (_QWORD *)(8 * ((unsigned long long)v5 / dynarray_idxes_in_prev_level[i]) + *v4);
v5 = (unsigned long long)v5 % dynarray_idxes_in_prev_level[i--];
}
if ( *v4 )
return v5 * *(_DWORD *)(a1 + 32) + *v4;
else
return 0LL;
}
| lf_dynarray_value:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x28],0x0
MOV dword ptr [RBP + -0x2c],0x3
LAB_0015e7ea:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,dword ptr [RBP + -0x2c]
LEA RCX,[0x1b6980]
CMP RAX,qword ptr [RCX + RDX*0x8]
JNC 0x0015e80b
JMP 0x0015e800
LAB_0015e800:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0015e7ea
LAB_0015e80b:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x2c]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOVSXD RCX,dword ptr [RBP + -0x2c]
LEA RAX,[0x1b6980]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x14]
SUB RAX,RCX
MOV dword ptr [RBP + -0x14],EAX
LAB_0015e836:
CMP dword ptr [RBP + -0x2c],0x0
JLE 0x0015e8af
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0015e85a
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015e8e2
LAB_0015e85a:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RSI,dword ptr [RBP + -0x2c]
LEA RCX,[0x1b69a0]
XOR EDX,EDX
DIV qword ptr [RCX + RSI*0x8]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOVSXD RCX,dword ptr [RBP + -0x2c]
LEA RAX,[0x1b69a0]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x14]
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0015e836
LAB_0015e8af:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0015e8ca
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015e8e2
LAB_0015e8ca:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x20]
IMUL ECX,dword ptr [RBP + -0x14]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_0015e8e2:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
long lf_dynarray_value(long param_1,uint param_2)
{
int local_34;
long *local_30;
uint local_1c;
long local_10;
local_34 = 3;
while ((ulong)param_2 < *(ulong *)(dynarray_idxes_in_prev_levels + (long)local_34 * 8)) {
local_34 = local_34 + -1;
}
local_30 = (long *)(param_1 + (long)local_34 * 8);
local_1c = param_2 - (int)*(int8 *)(dynarray_idxes_in_prev_levels + (long)local_34 * 8);
while( true ) {
if (local_34 < 1) {
if (*local_30 == 0) {
local_10 = 0;
}
else {
local_10 = *local_30 + (ulong)(*(int *)(param_1 + 0x20) * local_1c);
}
return local_10;
}
if (*local_30 == 0) break;
local_30 = (long *)(*local_30 +
((ulong)local_1c /
*(ulong *)(dynarray_idxes_in_prev_level + (long)local_34 * 8)) * 8);
local_1c = (uint)((ulong)local_1c %
*(ulong *)(dynarray_idxes_in_prev_level + (long)local_34 * 8));
local_34 = local_34 + -1;
}
return 0;
}
| |
39,318 | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key() const | monkey531[P]llama/common/./json.hpp | const string_type& key() const
{
JSON_ASSERT(anchor.m_object != nullptr);
switch (anchor.m_object->type())
{
// use integer array index as key
case value_t::array:
{
if (array_index != array_index_last)
{
int_to_string( array_index_str, array_index );
array_index_last = array_index;
}
return array_index_str;
}
// use key from the object
case value_t::object:
return anchor.key();
// use an empty key for all primitive types
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return empty_str;
}
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key() const:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq (%rax), %rdi
callq 0xa4690
movzbl %al, %ecx
movq %rcx, 0x10(%rsp)
subb $0x9, %al
ja 0x9b3d0
movq 0x10(%rsp), %rax
leaq 0x13e96d(%rip), %rcx # 0x1d9ce0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsp), %rcx
movq 0x20(%rcx), %rax
cmpq 0x28(%rcx), %rax
je 0x9b3ad
movq 0x8(%rsp), %rax
movq %rax, %rdi
addq $0x30, %rdi
movq 0x20(%rax), %rsi
callq 0xc5a30
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rcx
movq %rcx, 0x28(%rax)
movq 0x8(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x20(%rsp)
jmp 0x9b3de
movq 0x8(%rsp), %rdi
callq 0xbd8e0
movq %rax, 0x20(%rsp)
jmp 0x9b3de
jmp 0x9b3d0
movq 0x8(%rsp), %rax
addq $0x50, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
| _ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv:
sub rsp, 28h
mov [rsp+28h+var_10], rdi; __int64
mov rax, [rsp+28h+var_10]
mov qword ptr [rsp+28h+var_20], rax; int
mov rdi, [rax]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4typeEv; 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(void)
movzx ecx, al
mov qword ptr [rsp+28h+var_18], rcx; __int16
sub al, 9; switch 10 cases
ja short def_9B37A; jumptable 000000000009B37A default case
mov rax, qword ptr [rsp+28h+var_18]
lea rcx, jpt_9B37A
movsxd rax, ds:(jpt_9B37A - 1D9CE0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_9B37C:
mov rcx, qword ptr [rsp+28h+var_20]; jumptable 000000000009B37A case 2
mov rax, [rcx+20h]
cmp rax, [rcx+28h]
jz short loc_9B3AD
mov rax, qword ptr [rsp+28h+var_20]
mov rdi, rax
add rdi, 30h ; '0'
mov rsi, [rax+20h]
call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong)
mov rax, qword ptr [rsp+28h+var_20]
mov rcx, [rax+20h]
mov [rax+28h], rcx
loc_9B3AD:
mov rax, qword ptr [rsp+28h+var_20]
add rax, 30h ; '0'
mov [rsp+28h+var_8], rax
jmp short loc_9B3DE
loc_9B3BD:
mov rdi, qword ptr [rsp+28h+var_20]; jumptable 000000000009B37A case 1
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<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>::key(void)
mov [rsp+28h+var_8], rax
jmp short loc_9B3DE
loc_9B3CE:
jmp short $+2; jumptable 000000000009B37A cases 0,3-9
def_9B37A:
mov rax, qword ptr [rsp+28h+var_20]; jumptable 000000000009B37A default case
add rax, 50h ; 'P'
mov [rsp+28h+var_8], rax
loc_9B3DE:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
| key:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RAX]
CALL 0x001a4690
MOVZX ECX,AL
MOV qword ptr [RSP + 0x10],RCX
SUB AL,0x9
JA 0x0019b3d0
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[0x2d9ce0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_2:
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RCX + 0x20]
CMP RAX,qword ptr [RCX + 0x28]
JZ 0x0019b3ad
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,RAX
ADD RDI,0x30
MOV RSI,qword ptr [RAX + 0x20]
CALL 0x001c5a30
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x20]
MOV qword ptr [RAX + 0x28],RCX
LAB_0019b3ad:
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x30
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0019b3de
caseD_1:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001bd8e0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0019b3de
caseD_0:
JMP 0x0019b3d0
default:
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x50
MOV qword ptr [RSP + 0x20],RAX
LAB_0019b3de:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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> >::key() const */
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
*this)
{
int1 uVar1;
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
*local_8;
uVar1 = 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(*(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);
switch(uVar1) {
case 0:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
default:
local_8 = this + 0x50;
break;
case 1:
local_8 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
*)iter_impl<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>
::key((iter_impl<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>
*)this);
break;
case 2:
if (*(long *)(this + 0x20) != *(long *)(this + 0x28)) {
int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20));
*(int8 *)(this + 0x28) = *(int8 *)(this + 0x20);
}
local_8 = this + 0x30;
}
return local_8;
}
| ||
39,319 | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key() const | monkey531[P]llama/common/./json.hpp | const string_type& key() const
{
JSON_ASSERT(anchor.m_object != nullptr);
switch (anchor.m_object->type())
{
// use integer array index as key
case value_t::array:
{
if (array_index != array_index_last)
{
int_to_string( array_index_str, array_index );
array_index_last = array_index;
}
return array_index_str;
}
// use key from the object
case value_t::object:
return anchor.key();
// use an empty key for all primitive types
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return empty_str;
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key() const:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x3fb31
cmpl $0x2, %eax
jne 0x3fb3a
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x3fb2b
leaq 0x30(%rbx), %rdi
callq 0x3fe7d
movq 0x20(%rbx), %rax
movq %rax, 0x28(%rbx)
addq $0x30, %rbx
jmp 0x3fb3e
movq %rbx, %rdi
popq %rbx
jmp 0x3feb0
addq $0x50, %rbx
movq %rbx, %rax
popq %rbx
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv:
push rbx
mov rbx, rdi
mov rax, [rdi]
movzx eax, byte ptr [rax]
cmp eax, 1
jz short loc_3FB31
cmp eax, 2
jnz short loc_3FB3A
mov rsi, [rbx+20h]
cmp rsi, [rbx+28h]
jz short loc_3FB2B
lea rdi, [rbx+30h]
call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong)
mov rax, [rbx+20h]
mov [rbx+28h], rax
loc_3FB2B:
add rbx, 30h ; '0'
jmp short loc_3FB3E
loc_3FB31:
mov rdi, rbx
pop rbx
jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key(void)
loc_3FB3A:
add rbx, 50h ; 'P'
loc_3FB3E:
mov rax, rbx
pop rbx
retn
| long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>>::key(
unsigned __int8 **a1)
{
int v1; // eax
v1 = **a1;
if ( v1 == 1 )
return nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key(a1);
if ( v1 != 2 )
return (long long)(a1 + 10);
if ( a1[4] != a1[5] )
{
nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6);
a1[5] = a1[4];
}
return (long long)(a1 + 6);
}
| key:
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x1
JZ 0x0013fb31
CMP EAX,0x2
JNZ 0x0013fb3a
MOV RSI,qword ptr [RBX + 0x20]
CMP RSI,qword ptr [RBX + 0x28]
JZ 0x0013fb2b
LEA RDI,[RBX + 0x30]
CALL 0x0013fe7d
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x28],RAX
LAB_0013fb2b:
ADD RBX,0x30
JMP 0x0013fb3e
LAB_0013fb31:
MOV RDI,RBX
POP RBX
JMP 0x0013feb0
LAB_0013fb3a:
ADD RBX,0x50
LAB_0013fb3e:
MOV RAX,RBX
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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> > >::key() const */
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>>
::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>>
*this)
{
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>>
*piVar1;
if (**(char **)this != '\x01') {
if (**(char **)this == '\x02') {
if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) {
int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20));
*(int8 *)(this + 0x28) = *(int8 *)(this + 0x20);
}
piVar1 = this + 0x30;
}
else {
piVar1 = this + 0x50;
}
return piVar1;
}
piVar1 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>>
*)iter_impl<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>>
::key((iter_impl<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>>
*)this);
return piVar1;
}
| |
39,320 | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key() const | monkey531[P]llama/common/./json.hpp | const string_type& key() const
{
JSON_ASSERT(anchor.m_object != nullptr);
switch (anchor.m_object->type())
{
// use integer array index as key
case value_t::array:
{
if (array_index != array_index_last)
{
int_to_string( array_index_str, array_index );
array_index_last = array_index;
}
return array_index_str;
}
// use key from the object
case value_t::object:
return anchor.key();
// use an empty key for all primitive types
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return empty_str;
}
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key() const:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x40e13
cmpl $0x2, %eax
jne 0x40e1c
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x40e0d
leaq 0x30(%rbx), %rdi
callq 0x41235
movq 0x20(%rbx), %rax
movq %rax, 0x28(%rbx)
addq $0x30, %rbx
jmp 0x40e20
movq %rbx, %rdi
popq %rbx
jmp 0x412f6
addq $0x50, %rbx
movq %rbx, %rax
popq %rbx
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv:
push rbx
mov rbx, rdi
mov rax, [rdi]
movzx eax, byte ptr [rax]
cmp eax, 1
jz short loc_40E13
cmp eax, 2
jnz short loc_40E1C
mov rsi, [rbx+20h]
cmp rsi, [rbx+28h]
jz short loc_40E0D
lea rdi, [rbx+30h]
call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong)
mov rax, [rbx+20h]
mov [rbx+28h], rax
loc_40E0D:
add rbx, 30h ; '0'
jmp short loc_40E20
loc_40E13:
mov rdi, rbx
pop rbx
jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key(void)
loc_40E1C:
add rbx, 50h ; 'P'
loc_40E20:
mov rax, rbx
pop rbx
retn
| long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>>::key(
unsigned __int8 **a1)
{
int v1; // eax
v1 = **a1;
if ( v1 == 1 )
return nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key(a1);
if ( v1 != 2 )
return (long long)(a1 + 10);
if ( a1[4] != a1[5] )
{
nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6);
a1[5] = a1[4];
}
return (long long)(a1 + 6);
}
| key:
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x1
JZ 0x00140e13
CMP EAX,0x2
JNZ 0x00140e1c
MOV RSI,qword ptr [RBX + 0x20]
CMP RSI,qword ptr [RBX + 0x28]
JZ 0x00140e0d
LEA RDI,[RBX + 0x30]
CALL 0x00141235
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x28],RAX
LAB_00140e0d:
ADD RBX,0x30
JMP 0x00140e20
LAB_00140e13:
MOV RDI,RBX
POP RBX
JMP 0x001412f6
LAB_00140e1c:
ADD RBX,0x50
LAB_00140e20:
MOV RAX,RBX
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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> > >::key() const */
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>>
::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>>
*this)
{
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>>
*piVar1;
if (**(char **)this != '\x01') {
if (**(char **)this == '\x02') {
if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) {
int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20));
*(int8 *)(this + 0x28) = *(int8 *)(this + 0x20);
}
piVar1 = this + 0x30;
}
else {
piVar1 = this + 0x50;
}
return piVar1;
}
piVar1 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>>
*)iter_impl<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>>
::key((iter_impl<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>>
*)this);
return piVar1;
}
| |
39,321 | gray_init_cells | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-raster.c | static void
gray_init_cells( RAS_ARG_ void* buffer,
long byte_size )
{
ras.buffer = buffer;
ras.buffer_size = byte_size;
ras.ycells = (PCell*) buffer;
ras.cells = NULL;
ras.max_cells = 0;
ras.num_cells = 0;
ras.area = 0;
ras.cover = 0;
ras.invalid = 1;
} | O0 | c | gray_init_cells:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x11b0(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x11b8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x11c0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x4c(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
| gray_init_cells:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+11B0h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+11B8h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+11C0h], rcx
mov rax, [rbp+var_8]
mov qword ptr [rax+50h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+58h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+60h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+40h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+48h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+4Ch], 1
pop rbp
retn
| long long gray_init_cells(long long a1, long long a2, long long a3)
{
long long result; // rax
*(_QWORD *)(a1 + 4528) = a2;
*(_QWORD *)(a1 + 4536) = a3;
*(_QWORD *)(a1 + 4544) = a2;
*(_QWORD *)(a1 + 80) = 0LL;
*(_QWORD *)(a1 + 88) = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
*(_QWORD *)(a1 + 64) = 0LL;
*(_DWORD *)(a1 + 72) = 0;
result = a1;
*(_DWORD *)(a1 + 76) = 1;
return result;
}
| gray_init_cells:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x11b0],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x11b8],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x11c0],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x50],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x58],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x60],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x40],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x48],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x4c],0x1
POP RBP
RET
|
void gray_init_cells(long param_1,int8 param_2,int8 param_3)
{
*(int8 *)(param_1 + 0x11b0) = param_2;
*(int8 *)(param_1 + 0x11b8) = param_3;
*(int8 *)(param_1 + 0x11c0) = param_2;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x40) = 0;
*(int4 *)(param_1 + 0x48) = 0;
*(int4 *)(param_1 + 0x4c) = 1;
return;
}
| |
39,322 | OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentVertices() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/../vtr/refinement.h | Index getFirstChildVertexFromVertices() const { return _firstChildVertFromVert; } | O2 | c | OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentVertices():
movslq 0x54(%rdi), %rax
movslq 0x3c(%rdi), %rcx
addq %rax, %rcx
cmpq %rcx, %rax
jge 0x61b7c
movq 0x138(%rdi), %rdx
movslq (%rdx,%rax,4), %rdx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %r8
movq 0x1b0(%rsi), %rsi
movq 0x1b0(%r8), %r8
movzwl (%rsi,%rdx,2), %edx
movw %dx, (%r8,%rax,2)
movq 0x10(%rdi), %rdx
movq 0x1b0(%rdx), %rdx
andw $0xefff, (%rdx,%rax,2) # imm = 0xEFFF
incq %rax
jmp 0x61b37
retq
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement36populateVertexTagsFromParentVerticesEv:
movsxd rax, dword ptr [rdi+54h]
movsxd rcx, dword ptr [rdi+3Ch]
add rcx, rax
loc_61B37:
cmp rax, rcx
jge short locret_61B7C
mov rdx, [rdi+138h]
movsxd rdx, dword ptr [rdx+rax*4]
mov rsi, [rdi+8]
mov r8, [rdi+10h]
mov rsi, [rsi+1B0h]
mov r8, [r8+1B0h]
movzx edx, word ptr [rsi+rdx*2]
mov [r8+rax*2], dx
mov rdx, [rdi+10h]
mov rdx, [rdx+1B0h]
and word ptr [rdx+rax*2], 0EFFFh
inc rax
jmp short loc_61B37
locret_61B7C:
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentVertices(
OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this)
{
long long result; // rax
long long v2; // rcx
result = *((int *)this + 21);
v2 = result + *((int *)this + 15);
while ( result < v2 )
{
*(_WORD *)(*(_QWORD *)(*((_QWORD *)this + 2) + 432LL) + 2 * result) = *(_WORD *)(*(_QWORD *)(*((_QWORD *)this + 1)
+ 432LL)
+ 2LL
* *(int *)(*((_QWORD *)this + 39)
+ 4 * result));
*(_WORD *)(*(_QWORD *)(*((_QWORD *)this + 2) + 432LL) + 2 * result++) &= ~0x1000u;
}
return result;
}
| populateVertexTagsFromParentVertices:
MOVSXD RAX,dword ptr [RDI + 0x54]
MOVSXD RCX,dword ptr [RDI + 0x3c]
ADD RCX,RAX
LAB_00161b37:
CMP RAX,RCX
JGE 0x00161b7c
MOV RDX,qword ptr [RDI + 0x138]
MOVSXD RDX,dword ptr [RDX + RAX*0x4]
MOV RSI,qword ptr [RDI + 0x8]
MOV R8,qword ptr [RDI + 0x10]
MOV RSI,qword ptr [RSI + 0x1b0]
MOV R8,qword ptr [R8 + 0x1b0]
MOVZX EDX,word ptr [RSI + RDX*0x2]
MOV word ptr [R8 + RAX*0x2],DX
MOV RDX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RDX + 0x1b0]
AND word ptr [RDX + RAX*0x2],0xefff
INC RAX
JMP 0x00161b37
LAB_00161b7c:
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentVertices() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentVertices
(Refinement *this)
{
ushort *puVar1;
long lVar2;
long lVar3;
lVar2 = (long)*(int *)(this + 0x54);
lVar3 = *(int *)(this + 0x3c) + lVar2;
for (; lVar2 < lVar3; lVar2 = lVar2 + 1) {
*(int2 *)(*(long *)(*(long *)(this + 0x10) + 0x1b0) + lVar2 * 2) =
*(int2 *)
(*(long *)(*(long *)(this + 8) + 0x1b0) +
(long)*(int *)(*(long *)(this + 0x138) + lVar2 * 4) * 2);
puVar1 = (ushort *)(*(long *)(*(long *)(this + 0x10) + 0x1b0) + lVar2 * 2);
*puVar1 = *puVar1 & 0xefff;
}
return;
}
| |
39,323 | ma_apply_redo_index_new_page | eloqsql/storage/maria/ma_key_recover.c | uint _ma_apply_redo_index_new_page(MARIA_HA *info, LSN lsn,
const uchar *header, uint length)
{
pgcache_page_no_t root_page= page_korr(header);
pgcache_page_no_t free_page= page_korr(header + PAGE_STORE_SIZE);
uint key_nr= key_nr_korr(header + PAGE_STORE_SIZE * 2);
my_bool page_type_flag= header[PAGE_STORE_SIZE * 2 + KEY_NR_STORE_SIZE];
enum pagecache_page_lock unlock_method;
enum pagecache_page_pin unpin_method;
MARIA_PINNED_PAGE page_link;
my_off_t file_size;
uchar *buff;
uint result;
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_apply_redo_index_new_page");
DBUG_PRINT("enter", ("root_page: %lu free_page: %lu",
(ulong) root_page, (ulong) free_page));
/* Set header to point at key data */
share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS |
STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
header+= PAGE_STORE_SIZE * 2 + KEY_NR_STORE_SIZE + 1;
length-= PAGE_STORE_SIZE * 2 + KEY_NR_STORE_SIZE + 1;
file_size= (my_off_t) (root_page + 1) * share->block_size;
if (cmp_translog_addr(lsn, share->state.is_of_horizon) >= 0)
{
/* free_page is 0 if we shouldn't set key_del */
if (free_page)
{
if (free_page != IMPOSSIBLE_PAGE_NO)
share->state.key_del= (my_off_t) free_page * share->block_size;
else
share->state.key_del= HA_OFFSET_ERROR;
}
if (page_type_flag) /* root page */
share->state.key_root[key_nr]= file_size - share->block_size;
}
if (file_size > share->state.state.key_file_length)
{
share->state.state.key_file_length= file_size;
buff= info->keyread_buff;
info->keyread_buff_used= 1;
unlock_method= PAGECACHE_LOCK_WRITE;
unpin_method= PAGECACHE_PIN;
}
else
{
if (!(buff= pagecache_read(share->pagecache, &share->kfile,
root_page, 0, 0,
PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE,
&page_link.link)))
{
if (my_errno != HA_ERR_FILE_TOO_SHORT &&
my_errno != HA_ERR_WRONG_CRC &&
my_errno != HA_ERR_DECRYPTION_FAILED)
{
result= 1;
_ma_set_fatal_error(info, my_errno);
goto err;
}
buff= pagecache_block_link_to_buffer(page_link.link);
}
else if (lsn_korr(buff) >= lsn)
{
/* Already applied */
check_skipped_lsn(info, lsn_korr(buff), 0, root_page);
result= 0;
goto err;
}
unlock_method= PAGECACHE_LOCK_LEFT_WRITELOCKED;
unpin_method= PAGECACHE_PIN_LEFT_PINNED;
}
/* Write modified page */
bzero(buff, LSN_STORE_SIZE);
memcpy(buff + LSN_STORE_SIZE, header, length);
bzero(buff + LSN_STORE_SIZE + length,
share->max_index_block_size - LSN_STORE_SIZE - length);
bfill(buff + share->block_size - KEYPAGE_CHECKSUM_SIZE,
KEYPAGE_CHECKSUM_SIZE, (uchar) 255);
result= 0;
if (unlock_method == PAGECACHE_LOCK_WRITE &&
pagecache_write(share->pagecache,
&share->kfile, root_page, 0,
buff, PAGECACHE_PLAIN_PAGE,
unlock_method, unpin_method,
PAGECACHE_WRITE_DELAY, &page_link.link,
LSN_IMPOSSIBLE))
result= 1;
/* Mark page to be unlocked and written at _ma_unpin_all_pages() */
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&info->pinned_pages, (void*) &page_link);
DBUG_RETURN(result);
err:
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
DBUG_RETURN(result);
} | O0 | c | ma_apply_redo_index_new_page:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
movq -0x30(%rbp), %rdi
callq 0x71680
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
addq $0x5, %rdi
callq 0x71680
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movzbl 0xa(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x30(%rbp), %rax
movb 0xb(%rax), %al
movb %al, -0x4d(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0x71260
movq -0x90(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x1b1, %ecx # imm = 0x1B1
movl %ecx, 0x170(%rax)
movq -0x30(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x30(%rbp)
movl -0x34(%rbp), %eax
subl $0xc, %eax
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq -0x90(%rbp), %rcx
movl 0x7bc(%rcx), %ecx
imulq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rax
movq -0x90(%rbp), %rcx
subq 0x180(%rcx), %rax
cmpq $0x0, %rax
jl 0x71348
cmpq $0x0, -0x48(%rbp)
je 0x71317
movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF
cmpq %rax, -0x48(%rbp)
je 0x71303
movq -0x48(%rbp), %rcx
movq -0x90(%rbp), %rax
movl 0x7bc(%rax), %eax
imulq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x120(%rax)
jmp 0x71315
movq -0x90(%rbp), %rax
movq $-0x1, 0x120(%rax)
jmp 0x71317
cmpb $0x0, -0x4d(%rbp)
je 0x71346
movq -0x78(%rbp), %rdx
movq -0x90(%rbp), %rax
movl 0x7bc(%rax), %eax
subq %rax, %rdx
movq -0x90(%rbp), %rax
movq 0x118(%rax), %rax
movl -0x4c(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x71348
movq -0x78(%rbp), %rax
movq -0x90(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jbe 0x71395
movq -0x78(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x20(%rbp), %rax
movq 0x380(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x20(%rbp), %rax
movb $0x1, 0x685(%rax)
movl $0x4, -0x54(%rbp)
movl $0x2, -0x58(%rbp)
jmp 0x714dd
movq -0x90(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x90(%rbp), %rsi
addq $0x750, %rsi # imm = 0x750
movq -0x40(%rbp), %rdx
leaq -0x70(%rbp), %rax
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
movl $0x4, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2d940
movq %rax, -0x80(%rbp)
cmpq $0x0, %rax
jne 0x71445
callq 0xf6090
cmpl $0xaf, (%rax)
je 0x71433
callq 0xf6090
cmpl $0xb0, (%rax)
je 0x71433
callq 0xf6090
cmpl $0xc0, (%rax)
je 0x71433
movl $0x1, -0x84(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x98(%rbp)
callq 0xf6090
movq -0x98(%rbp), %rdi
movl (%rax), %esi
callq 0x33880
jmp 0x71623
movq -0x70(%rbp), %rdi
callq 0x30490
movq %rax, -0x80(%rbp)
jmp 0x714cf
movq -0x80(%rbp), %rax
movzbl (%rax), %eax
movq -0x80(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x80(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
shlq $0x20, %rax
movq -0x80(%rbp), %rcx
movl 0x3(%rcx), %ecx
orq %rcx, %rax
cmpq -0x28(%rbp), %rax
jl 0x714cd
movq -0x20(%rbp), %rdi
movq -0x80(%rbp), %rax
movzbl (%rax), %eax
movq -0x80(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x80(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x20, %rsi
movq -0x80(%rbp), %rax
movl 0x3(%rax), %eax
orq %rax, %rsi
movq -0x40(%rbp), %rcx
xorl %edx, %edx
callq 0x55fd0
movl $0x0, -0x84(%rbp)
jmp 0x71623
jmp 0x714cf
movl $0x2, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
movq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x7, %edx
callq 0x2a2c0
movq -0x80(%rbp), %rdi
addq $0x7, %rdi
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movq -0x80(%rbp), %rdi
addq $0x7, %rdi
movl -0x34(%rbp), %eax
addq %rax, %rdi
movq -0x90(%rbp), %rax
movl 0x7c0(%rax), %eax
subl $0x7, %eax
subl -0x34(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movq -0x80(%rbp), %rdi
movq -0x90(%rbp), %rax
movl 0x7bc(%rax), %eax
addq %rax, %rdi
addq $-0x4, %rdi
movl $0xff, %esi
movl $0x4, %edx
callq 0x2a2c0
movl $0x0, -0x84(%rbp)
cmpl $0x4, -0x54(%rbp)
jne 0x715f9
movq -0x90(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x90(%rbp), %rsi
addq $0x750, %rsi # imm = 0x750
movq -0x40(%rbp), %rdx
movq -0x80(%rbp), %r8
movl -0x54(%rbp), %ebx
movl -0x58(%rbp), %r11d
leaq -0x70(%rbp), %r10
movq -0x90(%rbp), %rax
movq 0x600(%rax), %rax
movl 0x80(%rax), %eax
xorl %ecx, %ecx
movl $0x1, %r9d
xorl %r14d, %r14d
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl %eax, 0x30(%rsp)
callq 0x2f040
movsbl %al, %eax
cmpl $0x0, %eax
je 0x715f9
movl $0x1, -0x84(%rbp)
movl $0x6, -0x68(%rbp)
movb $0x1, -0x60(%rbp)
movq -0x20(%rbp), %rdi
addq $0x2e8, %rdi # imm = 0x2E8
leaq -0x70(%rbp), %rsi
callq 0xda910
movl -0x84(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x71666
movq -0x90(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x70(%rbp), %rsi
movl $0x6, %edx
movl $0x3, %ecx
xorl %eax, %eax
movl %eax, %r9d
xorl %eax, %eax
movq %r9, %r8
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x2d6e0
movl -0x84(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_apply_redo_index_new_page:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 0C0h
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov [rbp+var_34], ecx
mov rdi, [rbp+var_30]
call uint5korr_0
mov [rbp+var_40], rax
mov rdi, [rbp+var_30]
add rdi, 5
call uint5korr_0
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax+0Ah]
mov [rbp+var_4C], eax
mov rax, [rbp+var_30]
mov al, [rax+0Bh]
mov [rbp+var_4D], al
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_90], rax
jmp short $+2
loc_71260:
mov rax, [rbp+var_90]
mov ecx, [rax+170h]
or ecx, 1B1h
mov [rax+170h], ecx
mov rax, [rbp+var_30]
add rax, 0Ch
mov [rbp+var_30], rax
mov eax, [rbp+var_34]
sub eax, 0Ch
mov [rbp+var_34], eax
mov rax, [rbp+var_40]
add rax, 1
mov rcx, [rbp+var_90]
mov ecx, [rcx+7BCh]
imul rax, rcx
mov [rbp+var_78], rax
mov rax, [rbp+var_28]
mov rcx, [rbp+var_90]
sub rax, [rcx+180h]
cmp rax, 0
jl loc_71348
cmp [rbp+var_48], 0
jz short loc_71317
mov rax, 0FFFFFFFFFFh
cmp [rbp+var_48], rax
jz short loc_71303
mov rcx, [rbp+var_48]
mov rax, [rbp+var_90]
mov eax, [rax+7BCh]
imul rcx, rax
mov rax, [rbp+var_90]
mov [rax+120h], rcx
jmp short loc_71315
loc_71303:
mov rax, [rbp+var_90]
mov qword ptr [rax+120h], 0FFFFFFFFFFFFFFFFh
loc_71315:
jmp short $+2
loc_71317:
cmp [rbp+var_4D], 0
jz short loc_71346
mov rdx, [rbp+var_78]
mov rax, [rbp+var_90]
mov eax, [rax+7BCh]
sub rdx, rax
mov rax, [rbp+var_90]
mov rax, [rax+118h]
mov ecx, [rbp+var_4C]
mov [rax+rcx*8], rdx
loc_71346:
jmp short $+2
loc_71348:
mov rax, [rbp+var_78]
mov rcx, [rbp+var_90]
cmp rax, [rcx+38h]
jbe short loc_71395
mov rcx, [rbp+var_78]
mov rax, [rbp+var_90]
mov [rax+38h], rcx
mov rax, [rbp+var_20]
mov rax, [rax+380h]
mov [rbp+var_80], rax
mov rax, [rbp+var_20]
mov byte ptr [rax+685h], 1
mov [rbp+var_54], 4
mov [rbp+var_58], 2
jmp loc_714DD
loc_71395:
mov rax, [rbp+var_90]
mov rdi, [rax+600h]
mov rsi, [rbp+var_90]
add rsi, 750h
mov rdx, [rbp+var_40]
lea rax, [rbp+var_70]
xor ecx, ecx
xor r8d, r8d
mov r9d, 1
mov [rsp+0D0h+var_D0], 4
mov [rsp+0D0h+var_C8], rax
call pagecache_read
mov [rbp+var_80], rax
cmp rax, 0
jnz short loc_71445
call _my_thread_var
cmp dword ptr [rax], 0AFh
jz short loc_71433
call _my_thread_var
cmp dword ptr [rax], 0B0h
jz short loc_71433
call _my_thread_var
cmp dword ptr [rax], 0C0h
jz short loc_71433
mov [rbp+var_84], 1
mov rax, [rbp+var_20]
mov [rbp+var_98], rax
call _my_thread_var
mov rdi, [rbp+var_98]
mov esi, [rax]
call _ma_set_fatal_error
jmp loc_71623
loc_71433:
mov rdi, [rbp+var_70]
call pagecache_block_link_to_buffer
mov [rbp+var_80], rax
jmp loc_714CF
loc_71445:
mov rax, [rbp+var_80]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_80]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_80]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
shl rax, 20h
mov rcx, [rbp+var_80]
mov ecx, [rcx+3]
or rax, rcx
cmp rax, [rbp+var_28]
jl short loc_714CD
mov rdi, [rbp+var_20]
mov rax, [rbp+var_80]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_80]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_80]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov esi, eax
shl rsi, 20h
mov rax, [rbp+var_80]
mov eax, [rax+3]
or rsi, rax
mov rcx, [rbp+var_40]
xor edx, edx
call check_skipped_lsn
mov [rbp+var_84], 0
jmp loc_71623
loc_714CD:
jmp short $+2
loc_714CF:
mov [rbp+var_54], 2
mov [rbp+var_58], 0
loc_714DD:
mov rdi, [rbp+var_80]
xor esi, esi
mov edx, 7
call _memset
mov rdi, [rbp+var_80]
add rdi, 7
mov rsi, [rbp+var_30]
mov eax, [rbp+var_34]
mov edx, eax
call _memcpy
mov rdi, [rbp+var_80]
add rdi, 7
mov eax, [rbp+var_34]
add rdi, rax
mov rax, [rbp+var_90]
mov eax, [rax+7C0h]
sub eax, 7
sub eax, [rbp+var_34]
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
mov rdi, [rbp+var_80]
mov rax, [rbp+var_90]
mov eax, [rax+7BCh]
add rdi, rax
add rdi, 0FFFFFFFFFFFFFFFCh
mov esi, 0FFh
mov edx, 4
call _memset
mov [rbp+var_84], 0
cmp [rbp+var_54], 4
jnz loc_715F9
mov rax, [rbp+var_90]
mov rdi, [rax+600h]
mov rsi, [rbp+var_90]
add rsi, 750h
mov rdx, [rbp+var_40]
mov r8, [rbp+var_80]
mov ebx, [rbp+var_54]
mov r11d, [rbp+var_58]
lea r10, [rbp+var_70]
mov rax, [rbp+var_90]
mov rax, [rax+600h]
mov eax, [rax+80h]
xor ecx, ecx
mov r9d, 1
xor r14d, r14d
mov [rsp+0D0h+var_D0], ebx
mov dword ptr [rsp+0D0h+var_C8], r11d
mov [rsp+0D0h+var_C0], 0
mov [rsp+0D0h+var_B8], r10
mov [rsp+0D0h+var_B0], 0
mov [rsp+0D0h+var_A8], 0
mov [rsp+0D0h+var_A0], eax
call pagecache_write_part
movsx eax, al
cmp eax, 0
jz short loc_715F9
mov [rbp+var_84], 1
loc_715F9:
mov [rbp+var_68], 6
mov [rbp+var_60], 1
mov rdi, [rbp+var_20]
add rdi, 2E8h
lea rsi, [rbp+var_70]
call insert_dynamic
mov eax, [rbp+var_84]
mov [rbp+var_14], eax
jmp short loc_71666
loc_71623:
mov rax, [rbp+var_90]
mov rdi, [rax+600h]
mov rsi, [rbp+var_70]
mov edx, 6
mov ecx, 3
xor eax, eax
mov r9d, eax
xor eax, eax
mov r8, r9
mov [rsp+0D0h+var_D0], 0
mov dword ptr [rsp+0D0h+var_C8], 0
call pagecache_unlock_by_link
mov eax, [rbp+var_84]
mov [rbp+var_14], eax
loc_71666:
mov eax, [rbp+var_14]
add rsp, 0C0h
pop rbx
pop r14
pop rbp
retn
| long long ma_apply_redo_index_new_page(_QWORD *a1, signed long long a2, long long a3, unsigned int a4)
{
_QWORD *v4; // rdi
const char *v5; // rsi
int *v6; // rax
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
int v10; // r9d
_DWORD *v12; // [rsp+38h] [rbp-98h]
long long v13; // [rsp+40h] [rbp-90h]
unsigned int v14; // [rsp+4Ch] [rbp-84h]
BOOL v15; // [rsp+4Ch] [rbp-84h]
unsigned __int16 *v16; // [rsp+50h] [rbp-80h]
unsigned long long v17; // [rsp+58h] [rbp-78h]
long long v18; // [rsp+60h] [rbp-70h] BYREF
int v19; // [rsp+68h] [rbp-68h]
char v20; // [rsp+70h] [rbp-60h]
unsigned int v21; // [rsp+78h] [rbp-58h]
int v22; // [rsp+7Ch] [rbp-54h]
char v23; // [rsp+83h] [rbp-4Dh]
unsigned int v24; // [rsp+84h] [rbp-4Ch]
long long v25; // [rsp+88h] [rbp-48h]
long long v26; // [rsp+90h] [rbp-40h]
unsigned int v27; // [rsp+9Ch] [rbp-34h]
long long v28; // [rsp+A0h] [rbp-30h]
signed long long v29; // [rsp+A8h] [rbp-28h]
_QWORD *v30; // [rsp+B0h] [rbp-20h]
v30 = a1;
v29 = a2;
v28 = a3;
v27 = a4;
v26 = uint5korr_0(a3);
v25 = uint5korr_0(v28 + 5);
v24 = *(unsigned __int8 *)(v28 + 10);
v23 = *(_BYTE *)(v28 + 11);
v13 = *a1;
*(_DWORD *)(v13 + 368) |= 0x1B1u;
v28 += 12LL;
v27 -= 12;
v17 = *(unsigned int *)(v13 + 1980) * (v26 + 1);
if ( v29 - *(_QWORD *)(v13 + 384) >= 0 )
{
if ( v25 )
{
if ( v25 == 0xFFFFFFFFFFLL )
*(_QWORD *)(v13 + 288) = -1LL;
else
*(_QWORD *)(v13 + 288) = *(unsigned int *)(v13 + 1980) * v25;
}
if ( v23 )
*(_QWORD *)(*(_QWORD *)(v13 + 280) + 8LL * v24) = v17 - *(unsigned int *)(v13 + 1980);
}
if ( v17 <= *(_QWORD *)(v13 + 56) )
{
v4 = *(_QWORD **)(v13 + 1536);
v5 = (const char *)(v13 + 1872);
v16 = (unsigned __int16 *)pagecache_read(v4, v13 + 1872, v26, 0, 0LL, 1, 4u, (char *)&v18);
if ( v16 )
{
if ( (long long)(*(unsigned int *)((char *)v16 + 3) | ((unsigned long long)((*((unsigned __int8 *)v16 + 2) << 16) | (unsigned int)*v16) << 32)) >= v29 )
{
check_skipped_lsn(
(long long)v30,
*(unsigned int *)((char *)v16 + 3) | ((unsigned long long)((*((unsigned __int8 *)v16 + 2) << 16) | (unsigned int)*v16) << 32),
0,
v26);
v14 = 0;
goto LABEL_22;
}
}
else
{
if ( *(_DWORD *)my_thread_var(v4, v5) != 175
&& *(_DWORD *)my_thread_var(v4, v5) != 176
&& *(_DWORD *)my_thread_var(v4, v5) != 192 )
{
v14 = 1;
v12 = v30;
v6 = (int *)my_thread_var(v4, v5);
ma_set_fatal_error(v12, *v6, v7, v8, v9, v10);
LABEL_22:
pagecache_unlock_by_link(*(_QWORD **)(v13 + 1536), v18, 6, 3, 0LL, 0LL, 0, 0);
return v14;
}
v16 = (unsigned __int16 *)pagecache_block_link_to_buffer(v18);
}
v22 = 2;
v21 = 0;
memset(v16, 0LL, 7LL);
goto LABEL_19;
}
*(_QWORD *)(v13 + 56) = v17;
v16 = (unsigned __int16 *)v30[112];
*((_BYTE *)v30 + 1669) = 1;
v22 = 4;
v21 = 2;
memset(v16, 0LL, 7LL);
LABEL_19:
memcpy((char *)v16 + 7, v28, v27);
memset((char *)v16 + v27 + 7, 0LL, *(_DWORD *)(v13 + 1984) - 7 - v27);
memset((char *)v16 + *(unsigned int *)(v13 + 1980) - 4, 255LL, 4LL);
v15 = 0;
if ( v22 == 4 )
v15 = pagecache_write_part(
*(_QWORD **)(v13 + 1536),
v13 + 1872,
v26,
0,
(long long)v16,
1u,
4u,
v21,
0,
(char *)&v18,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(v13 + 1536) + 128LL)) != 0;
v19 = 6;
v20 = 1;
insert_dynamic(v30 + 93, &v18);
return v15;
}
| _ma_apply_redo_index_new_page:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0xc0
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV dword ptr [RBP + -0x34],ECX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00171680
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x5
CALL 0x00171680
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX + 0xa]
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV AL,byte ptr [RAX + 0xb]
MOV byte ptr [RBP + -0x4d],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x00171260
LAB_00171260:
MOV RAX,qword ptr [RBP + -0x90]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x1b1
MOV dword ptr [RAX + 0x170],ECX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0xc
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [RBP + -0x34]
SUB EAX,0xc
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV RCX,qword ptr [RBP + -0x90]
MOV ECX,dword ptr [RCX + 0x7bc]
IMUL RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x90]
SUB RAX,qword ptr [RCX + 0x180]
CMP RAX,0x0
JL 0x00171348
CMP qword ptr [RBP + -0x48],0x0
JZ 0x00171317
MOV RAX,0xffffffffff
CMP qword ptr [RBP + -0x48],RAX
JZ 0x00171303
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x90]
MOV EAX,dword ptr [RAX + 0x7bc]
IMUL RCX,RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RAX + 0x120],RCX
JMP 0x00171315
LAB_00171303:
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RAX + 0x120],-0x1
LAB_00171315:
JMP 0x00171317
LAB_00171317:
CMP byte ptr [RBP + -0x4d],0x0
JZ 0x00171346
MOV RDX,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x90]
MOV EAX,dword ptr [RAX + 0x7bc]
SUB RDX,RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RAX + 0x118]
MOV ECX,dword ptr [RBP + -0x4c]
MOV qword ptr [RAX + RCX*0x8],RDX
LAB_00171346:
JMP 0x00171348
LAB_00171348:
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x90]
CMP RAX,qword ptr [RCX + 0x38]
JBE 0x00171395
MOV RCX,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x380]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x685],0x1
MOV dword ptr [RBP + -0x54],0x4
MOV dword ptr [RBP + -0x58],0x2
JMP 0x001714dd
LAB_00171395:
MOV RAX,qword ptr [RBP + -0x90]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x90]
ADD RSI,0x750
MOV RDX,qword ptr [RBP + -0x40]
LEA RAX,[RBP + -0x70]
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x1
MOV dword ptr [RSP],0x4
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0012d940
MOV qword ptr [RBP + -0x80],RAX
CMP RAX,0x0
JNZ 0x00171445
CALL 0x001f6090
CMP dword ptr [RAX],0xaf
JZ 0x00171433
CALL 0x001f6090
CMP dword ptr [RAX],0xb0
JZ 0x00171433
CALL 0x001f6090
CMP dword ptr [RAX],0xc0
JZ 0x00171433
MOV dword ptr [RBP + -0x84],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x98],RAX
CALL 0x001f6090
MOV RDI,qword ptr [RBP + -0x98]
MOV ESI,dword ptr [RAX]
CALL 0x00133880
JMP 0x00171623
LAB_00171433:
MOV RDI,qword ptr [RBP + -0x70]
CALL 0x00130490
MOV qword ptr [RBP + -0x80],RAX
JMP 0x001714cf
LAB_00171445:
MOV RAX,qword ptr [RBP + -0x80]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x80]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x80]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
SHL RAX,0x20
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x3]
OR RAX,RCX
CMP RAX,qword ptr [RBP + -0x28]
JL 0x001714cd
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x80]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x80]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x80]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV ESI,EAX
SHL RSI,0x20
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x3]
OR RSI,RAX
MOV RCX,qword ptr [RBP + -0x40]
XOR EDX,EDX
CALL 0x00155fd0
MOV dword ptr [RBP + -0x84],0x0
JMP 0x00171623
LAB_001714cd:
JMP 0x001714cf
LAB_001714cf:
MOV dword ptr [RBP + -0x54],0x2
MOV dword ptr [RBP + -0x58],0x0
LAB_001714dd:
MOV RDI,qword ptr [RBP + -0x80]
XOR ESI,ESI
MOV EDX,0x7
CALL 0x0012a2c0
MOV RDI,qword ptr [RBP + -0x80]
ADD RDI,0x7
MOV RSI,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x34]
MOV EDX,EAX
CALL 0x0012a090
MOV RDI,qword ptr [RBP + -0x80]
ADD RDI,0x7
MOV EAX,dword ptr [RBP + -0x34]
ADD RDI,RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV EAX,dword ptr [RAX + 0x7c0]
SUB EAX,0x7
SUB EAX,dword ptr [RBP + -0x34]
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV RDI,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RBP + -0x90]
MOV EAX,dword ptr [RAX + 0x7bc]
ADD RDI,RAX
ADD RDI,-0x4
MOV ESI,0xff
MOV EDX,0x4
CALL 0x0012a2c0
MOV dword ptr [RBP + -0x84],0x0
CMP dword ptr [RBP + -0x54],0x4
JNZ 0x001715f9
MOV RAX,qword ptr [RBP + -0x90]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x90]
ADD RSI,0x750
MOV RDX,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x80]
MOV EBX,dword ptr [RBP + -0x54]
MOV R11D,dword ptr [RBP + -0x58]
LEA R10,[RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RAX + 0x600]
MOV EAX,dword ptr [RAX + 0x80]
XOR ECX,ECX
MOV R9D,0x1
XOR R14D,R14D
MOV dword ptr [RSP],EBX
MOV dword ptr [RSP + 0x8],R11D
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],R10
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x28],0x0
MOV dword ptr [RSP + 0x30],EAX
CALL 0x0012f040
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001715f9
MOV dword ptr [RBP + -0x84],0x1
LAB_001715f9:
MOV dword ptr [RBP + -0x68],0x6
MOV byte ptr [RBP + -0x60],0x1
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x2e8
LEA RSI,[RBP + -0x70]
CALL 0x001da910
MOV EAX,dword ptr [RBP + -0x84]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00171666
LAB_00171623:
MOV RAX,qword ptr [RBP + -0x90]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x70]
MOV EDX,0x6
MOV ECX,0x3
XOR EAX,EAX
MOV R9D,EAX
XOR EAX,EAX
MOV R8,R9
MOV dword ptr [RSP],0x0
MOV dword ptr [RSP + 0x8],0x0
CALL 0x0012d6e0
MOV EAX,dword ptr [RBP + -0x84]
MOV dword ptr [RBP + -0x14],EAX
LAB_00171666:
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0xc0
POP RBX
POP R14
POP RBP
RET
|
int4 _ma_apply_redo_index_new_page(long *param_1,long param_2,long param_3,int param_4)
{
long lVar1;
long *plVar2;
char cVar3;
ulong uVar4;
int *piVar5;
int4 *puVar6;
int8 *puVar7;
int4 local_8c;
int3 *local_88;
int8 local_78;
int4 local_70;
int1 local_68;
int4 local_60;
int local_5c;
char local_55;
uint local_54;
long local_50;
long local_48;
uint local_3c;
void *local_38;
long local_30;
long *local_28;
local_3c = param_4;
local_38 = (void *)param_3;
local_30 = param_2;
local_28 = param_1;
local_48 = uint5korr(param_3);
local_50 = uint5korr((long)local_38 + 5);
local_54 = (uint)*(byte *)((long)local_38 + 10);
local_55 = *(char *)((long)local_38 + 0xb);
lVar1 = *local_28;
*(uint *)(lVar1 + 0x170) = *(uint *)(lVar1 + 0x170) | 0x1b1;
local_38 = (void *)((long)local_38 + 0xc);
local_3c = local_3c - 0xc;
uVar4 = (local_48 + 1) * (ulong)*(uint *)(lVar1 + 0x7bc);
if (-1 < local_30 - *(long *)(lVar1 + 0x180)) {
if (local_50 != 0) {
if (local_50 == 0xffffffffff) {
*(int8 *)(lVar1 + 0x120) = 0xffffffffffffffff;
}
else {
*(ulong *)(lVar1 + 0x120) = local_50 * (ulong)*(uint *)(lVar1 + 0x7bc);
}
}
if (local_55 != '\0') {
*(ulong *)(*(long *)(lVar1 + 0x118) + (ulong)local_54 * 8) = uVar4 - *(uint *)(lVar1 + 0x7bc);
}
}
if (*(ulong *)(lVar1 + 0x38) < uVar4) {
*(ulong *)(lVar1 + 0x38) = uVar4;
local_88 = (int3 *)local_28[0x70];
*(int1 *)((long)local_28 + 0x685) = 1;
local_5c = 4;
local_60 = 2;
}
else {
puVar7 = &local_78;
local_88 = (int3 *)
pagecache_read(*(int8 *)(lVar1 + 0x600),lVar1 + 0x750,local_48,0,0,1,4,puVar7);
if (local_88 == (int3 *)0x0) {
piVar5 = (int *)_my_thread_var();
if (((*piVar5 != 0xaf) && (piVar5 = (int *)_my_thread_var(), *piVar5 != 0xb0)) &&
(piVar5 = (int *)_my_thread_var(), plVar2 = local_28, *piVar5 != 0xc0)) {
local_8c = 1;
puVar6 = (int4 *)_my_thread_var();
_ma_set_fatal_error(plVar2,*puVar6);
LAB_00171623:
pagecache_unlock_by_link
(*(int8 *)(lVar1 + 0x600),local_78,6,3,0,0,0,
(ulong)puVar7 & 0xffffffff00000000);
return local_8c;
}
local_88 = (int3 *)pagecache_block_link_to_buffer(local_78);
}
else if (local_30 <= (long)(ulong)CONCAT34(*local_88,*(int4 *)((long)local_88 + 3))) {
check_skipped_lsn(local_28,(ulong)CONCAT34(*local_88,*(int4 *)((long)local_88 + 3)),0,
local_48);
local_8c = 0;
goto LAB_00171623;
}
local_5c = 2;
local_60 = 0;
}
memset(local_88,0,7);
memcpy((void *)((long)local_88 + 7),local_38,(ulong)local_3c);
memset((void *)((long)local_88 + (ulong)local_3c + 7),0,
(ulong)((*(int *)(lVar1 + 0x7c0) + -7) - local_3c));
memset((void *)((long)local_88 + ((ulong)*(uint *)(lVar1 + 0x7bc) - 4)),0xff,4);
local_8c = 0;
if ((local_5c == 4) &&
(cVar3 = pagecache_write_part
(*(int8 *)(lVar1 + 0x600),lVar1 + 0x750,local_48,0,local_88,1,4,
local_60,0,&local_78,0,0,*(int4 *)(*(long *)(lVar1 + 0x600) + 0x80)),
cVar3 != '\0')) {
local_8c = 1;
}
local_70 = 6;
local_68 = 1;
insert_dynamic(local_28 + 0x5d,&local_78);
return local_8c;
}
| |
39,324 | inline_mysql_file_pread(char const*, unsigned int, int, unsigned char*, unsigned long, unsigned long long, unsigned long) | eloqsql/include/mysql/psi/mysql_file.h | static inline size_t
inline_mysql_file_pread(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, uchar *buffer, size_t count, my_off_t offset, myf flags)
{
size_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
size_t bytes_read;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
result= my_pread(file, buffer, count, offset, flags);
if (flags & (MY_NABP | MY_FNABP))
bytes_read= (result == 0) ? count : 0;
else
bytes_read= (result != MY_FILE_ERROR) ? result : 0;
PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
return result;
}
#endif
result= my_pread(file, buffer, count, offset, flags);
return result;
} | O0 | c | inline_mysql_file_pread(char const*, unsigned int, int, unsigned char*, unsigned long, unsigned long long, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0xc7bf04(%rip), %rax # 0x1b88ec0
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x6, %edx
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%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 0xf0d0cf
leaq 0xc7beba(%rip), %rax # 0x1b88ec0
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0x13250b0
movq %rax, -0x38(%rbp)
movq 0x10(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xf0d07a
cmpq $0x0, -0x38(%rbp)
jne 0xf0d05f
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0xf0d06a
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0xf0d06a
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0xf0d0a7
cmpq $-0x1, -0x38(%rbp)
je 0xf0d08e
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0xf0d099
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0xf0d099
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0xc7be12(%rip), %rax # 0x1b88ec0
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xf0d0f3
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0x13250b0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
| inline_mysql_file_pread_6:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_88]
mov edx, 6
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 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 loc_F0D0CF
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov r8, [rbp+arg_0]
call my_pread
mov [rbp+var_38], rax
mov rax, [rbp+arg_0]
and rax, 6
cmp rax, 0
jz short loc_F0D07A
cmp [rbp+var_38], 0
jnz short loc_F0D05F
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
jmp short loc_F0D06A
loc_F0D05F:
xor eax, eax
mov [rbp+var_98], rax
jmp short $+2
loc_F0D06A:
mov rax, [rbp+var_98]
mov [rbp+var_90], rax
jmp short loc_F0D0A7
loc_F0D07A:
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_F0D08E
mov rax, [rbp+var_38]
mov [rbp+var_A0], rax
jmp short loc_F0D099
loc_F0D08E:
xor eax, eax
mov [rbp+var_A0], rax
jmp short $+2
loc_F0D099:
mov rax, [rbp+var_A0]
mov [rbp+var_90], rax
loc_F0D0A7:
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_90]
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_F0D0F3
loc_F0D0CF:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov r8, [rbp+arg_0]
call my_pread
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_F0D0F3:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
| long long inline_mysql_file_pread_6(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
long long a5,
long long a6,
long long a7)
{
long long v8; // [rsp+0h] [rbp-A0h]
long long v9; // [rsp+8h] [rbp-98h]
_BYTE v10[72]; // [rsp+18h] [rbp-88h] BYREF
long long v11; // [rsp+60h] [rbp-40h]
long long v12; // [rsp+68h] [rbp-38h]
long long v13; // [rsp+70h] [rbp-30h]
long long v14; // [rsp+78h] [rbp-28h]
long long v15; // [rsp+80h] [rbp-20h]
unsigned int v16; // [rsp+88h] [rbp-18h]
unsigned int v17; // [rsp+8Ch] [rbp-14h]
long long v18; // [rsp+90h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v13 = a6;
v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v10, a3, 6LL);
if ( v11 )
{
((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v11, v14, v18, v17);
v12 = my_pread(v16, v15, v14, v13, a7);
if ( (a7 & 6) != 0 )
{
if ( v12 )
v9 = 0LL;
else
v9 = v14;
((void ( *)(long long, long long))PSI_server[67])(v11, v9);
}
else
{
if ( v12 == -1 )
v8 = 0LL;
else
v8 = v12;
((void ( *)(long long, long long))PSI_server[67])(v11, v8);
}
return v12;
}
else
{
return my_pread(v16, v15, v14, v13, a7);
}
}
| check_valid_arguments_processor:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00f12530
XOR AL,0xff
AND AL,0x1
ADD RSP,0x10
POP RBP
RET
|
/* Item_func_dayofyear::check_valid_arguments_processor(void*) */
byte Item_func_dayofyear::check_valid_arguments_processor(void *param_1)
{
byte bVar1;
bVar1 = Item_func::has_date_args((Item_func *)param_1);
return (bVar1 ^ 0xff) & 1;
}
| |
39,325 | ma_bitmap_delete_all | eloqsql/storage/maria/ma_bitmap.c | void _ma_bitmap_delete_all(MARIA_SHARE *share)
{
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
DBUG_ENTER("_ma_bitmap_delete_all");
if (bitmap->map) /* Not in create */
{
bzero(bitmap->map, bitmap->block_size);
bitmap->changed= 1;
bitmap->page= 0;
bitmap->used_size= bitmap->full_tail_size= bitmap->full_head_size= 0;
bitmap->total_size= bitmap->max_total_size;
}
DBUG_VOID_RETURN;
} | O3 | c | ma_bitmap_delete_all:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xa18(%rdi), %rdi
testq %rdi, %rdi
je 0x53bed
movl 0xb44(%rbx), %edx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x2a2a0
movb $0x1, 0xa30(%rbx)
movq %r14, 0xa20(%rbx)
movl $0x0, 0xa3c(%rbx)
movq %r14, 0xa34(%rbx)
movl 0xb3c(%rbx), %eax
movl %eax, 0xb38(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
| _ma_bitmap_delete_all:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rdi, [rdi+0A18h]
test rdi, rdi
jz short loc_53BED
mov edx, [rbx+0B44h]
xor r14d, r14d
xor esi, esi
call _memset
mov byte ptr [rbx+0A30h], 1
mov [rbx+0A20h], r14
mov dword ptr [rbx+0A3Ch], 0
mov [rbx+0A34h], r14
mov eax, [rbx+0B3Ch]
mov [rbx+0B38h], eax
loc_53BED:
pop rbx
pop r14
pop rbp
retn
| long long ma_bitmap_delete_all(long long a1)
{
long long v2; // rdi
long long result; // rax
v2 = *(_QWORD *)(a1 + 2584);
if ( v2 )
{
memset(v2, 0LL, *(unsigned int *)(a1 + 2884));
*(_BYTE *)(a1 + 2608) = 1;
*(_QWORD *)(a1 + 2592) = 0LL;
*(_DWORD *)(a1 + 2620) = 0;
*(_QWORD *)(a1 + 2612) = 0LL;
result = *(unsigned int *)(a1 + 2876);
*(_DWORD *)(a1 + 2872) = result;
}
return result;
}
| _ma_bitmap_delete_all:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0xa18]
TEST RDI,RDI
JZ 0x00153bed
MOV EDX,dword ptr [RBX + 0xb44]
XOR R14D,R14D
XOR ESI,ESI
CALL 0x0012a2a0
MOV byte ptr [RBX + 0xa30],0x1
MOV qword ptr [RBX + 0xa20],R14
MOV dword ptr [RBX + 0xa3c],0x0
MOV qword ptr [RBX + 0xa34],R14
MOV EAX,dword ptr [RBX + 0xb3c]
MOV dword ptr [RBX + 0xb38],EAX
LAB_00153bed:
POP RBX
POP R14
POP RBP
RET
|
void _ma_bitmap_delete_all(long param_1)
{
if (*(void **)(param_1 + 0xa18) != (void *)0x0) {
memset(*(void **)(param_1 + 0xa18),0,(ulong)*(uint *)(param_1 + 0xb44));
*(int1 *)(param_1 + 0xa30) = 1;
*(int8 *)(param_1 + 0xa20) = 0;
*(int4 *)(param_1 + 0xa3c) = 0;
*(int8 *)(param_1 + 0xa34) = 0;
*(int4 *)(param_1 + 0xb38) = *(int4 *)(param_1 + 0xb3c);
}
return;
}
| |
39,326 | ma_read_rnd_dynamic_record | eloqsql/storage/maria/ma_dynrec.c | int _ma_read_rnd_dynamic_record(MARIA_HA *info,
uchar *buf,
MARIA_RECORD_POS filepos,
my_bool skip_deleted_blocks)
{
int block_of_record;
#ifdef MARIA_EXTERNAL_LOCKING
int info_read;
#endif
uint left_len,b_type;
uchar *UNINIT_VAR(to);
MARIA_BLOCK_INFO block_info;
MARIA_SHARE *share= info->s;
myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("_ma_read_rnd_dynamic_record");
#ifdef MARIA_EXTERNAL_LOCKING
info_read=0;
#endif
if (info->lock_type == F_UNLCK)
{
#ifndef UNSAFE_LOCKING
#else
info->tmp_lock_type=F_RDLCK;
#endif
}
#ifdef MARIA_EXTERNAL_LOCKING
else
info_read=1; /* memory-keyinfoblock is ok */
#endif
block_of_record= 0; /* First block of record is numbered as zero. */
block_info.second_read= 0;
left_len=1;
do
{
if (filepos >= info->state->data_file_length)
{
#ifdef MARIA_EXTERNAL_LOCKING
if (!info_read)
{ /* Check if changed */
info_read=1;
info->rec_cache.seek_not_done=1;
if (_ma_state_info_read_dsk(share->kfile.file, &share->state))
goto panic;
}
if (filepos >= info->state->data_file_length)
{
my_errno= HA_ERR_END_OF_FILE;
goto err;
}
#else
my_errno= HA_ERR_END_OF_FILE;
goto err;
#endif
}
if (info->opt_flag & READ_CACHE_USED)
{
if (_ma_read_cache(info, &info->rec_cache, block_info.header, filepos,
sizeof(block_info.header),
(!block_of_record && skip_deleted_blocks ?
READING_NEXT : 0) | READING_HEADER))
goto panic;
b_type= _ma_get_block_info(info, &block_info,-1,filepos);
}
else
{
if (info->opt_flag & WRITE_CACHE_USED &&
info->rec_cache.pos_in_file < filepos + MARIA_BLOCK_INFO_HEADER_LENGTH &&
flush_io_cache(&info->rec_cache))
DBUG_RETURN(my_errno);
info->rec_cache.seek_not_done=1;
b_type= _ma_get_block_info(info, &block_info, info->dfile.file, filepos);
}
if (b_type & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR |
BLOCK_FATAL_ERROR))
{
if ((b_type & (BLOCK_DELETED | BLOCK_SYNC_ERROR))
&& skip_deleted_blocks)
{
filepos=block_info.filepos+block_info.block_len;
block_info.second_read=0;
continue; /* Search after next_record */
}
if (b_type & (BLOCK_DELETED | BLOCK_SYNC_ERROR))
{
my_errno= HA_ERR_RECORD_DELETED;
info->cur_row.lastpos= block_info.filepos;
info->cur_row.nextpos= block_info.filepos+block_info.block_len;
}
goto err;
}
if (block_of_record == 0) /* First block */
{
info->cur_row.total_length= block_info.rec_len;
if (block_info.rec_len > (uint) share->base.max_pack_length)
goto panic;
info->cur_row.lastpos= filepos;
if (share->base.blobs)
{
if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size,
block_info.rec_len +
share->base.extra_rec_buff_size, flag))
goto err;
}
to= info->rec_buff;
left_len=block_info.rec_len;
}
if (left_len < block_info.data_len)
goto panic; /* Wrong linked record */
/* copy information that is already read */
{
uint offset=(uint) (block_info.filepos - filepos);
uint tmp_length= (sizeof(block_info.header) - offset);
filepos=block_info.filepos;
if (tmp_length > block_info.data_len)
tmp_length= block_info.data_len;
if (tmp_length)
{
memcpy(to, block_info.header+offset, tmp_length);
block_info.data_len-=tmp_length;
left_len-=tmp_length;
to+=tmp_length;
filepos+=tmp_length;
}
}
/* read rest of record from file */
if (block_info.data_len)
{
if (info->opt_flag & READ_CACHE_USED)
{
if (_ma_read_cache(info, &info->rec_cache, to,filepos,
block_info.data_len,
(!block_of_record && skip_deleted_blocks) ?
READING_NEXT : 0))
goto panic;
}
else
{
if (info->opt_flag & WRITE_CACHE_USED &&
info->rec_cache.pos_in_file <
block_info.filepos + block_info.data_len &&
flush_io_cache(&info->rec_cache))
goto err;
/* VOID(my_seek(info->dfile.file, filepos, MY_SEEK_SET, MYF(0))); */
if (mysql_file_read(info->dfile.file, to, block_info.data_len, MYF(MY_NABP)))
{
if (my_errno == HA_ERR_FILE_TOO_SHORT)
{
/* Unexpected end of file */
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
}
goto err;
}
}
}
/*
Increment block-of-record counter. If it was the first block,
remember the position behind the block for the next call.
*/
if (block_of_record++ == 0)
{
info->cur_row.nextpos= block_info.filepos+block_info.block_len;
skip_deleted_blocks=0;
}
left_len-=block_info.data_len;
to+=block_info.data_len;
filepos=block_info.next_filepos;
} while (left_len);
info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED;
fast_ma_writeinfo(info);
if (_ma_rec_unpack(info,buf,info->rec_buff,block_info.rec_len) !=
MY_FILE_ERROR)
DBUG_RETURN(0);
DBUG_RETURN(my_errno); /* Wrong record */
panic:
/* Something is fatal wrong */
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
err:
fast_ma_writeinfo(info);
DBUG_RETURN(my_errno);
} | O3 | c | ma_read_rnd_dynamic_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movl %ecx, %r13d
movq %rdx, %r14
movq %rsi, -0xc8(%rbp)
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rcx
xorl %eax, %eax
cmpb $0x0, 0x7d9(%rcx)
setne %al
shll $0x10, %eax
orq $0x10, %rax
movq %rax, -0xd8(%rbp)
leaq -0x88(%rbp), %rax
movl $0x0, 0x50(%rax)
leaq 0x4b8(%rdi), %rax
movq %rax, -0x98(%rbp)
leaq 0x3a0(%rdi), %rax
movq %rax, -0xb8(%rbp)
leaq 0x460(%rdi), %rax
movq %rax, -0xd0(%rbp)
movl $0x1, %r12d
xorl %r15d, %r15d
movq %rcx, -0xc0(%rbp)
movq %rdi, -0xe0(%rbp)
movq 0x20(%rbx), %rax
cmpq 0x28(%rax), %r14
jae 0x49e59
movl 0x61c(%rbx), %eax
testb $0x2, %al
movl %r15d, -0x8c(%rbp)
jne 0x49b2d
testb $0x10, %al
je 0x49b1b
leaq 0x14(%r14), %rax
movq -0x98(%rbp), %rcx
cmpq %rax, (%rcx)
jae 0x49b1b
movq -0x98(%rbp), %rdi
movl $0x1, %esi
callq 0x9535d
testl %eax, %eax
jne 0x49f04
movl $0x1, 0x598(%rbx)
movl 0x480(%rbx), %edx
jmp 0x49b6f
testl %r15d, %r15d
sete %al
testb %r13b, %r13b
setne %cl
andb %al, %cl
movzbl %cl, %r9d
orl $0x2, %r9d
movl $0x14, %r8d
movq %rbx, %rdi
movq -0x98(%rbp), %rsi
leaq -0x88(%rbp), %rdx
movq %r14, %rcx
callq 0x6fb14
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
testb %al, %al
jne 0x49ee1
movq %rbx, %rdi
leaq -0x88(%rbp), %rsi
movq %r14, %rcx
callq 0x48398
cmpl $0x4, %eax
jae 0x49bff
cmpl $0x0, -0x8c(%rbp)
jne 0x49c3f
movq -0x70(%rbp), %rcx
movq %rcx, 0x110(%rbx)
movq -0xc0(%rbp), %rax
movl 0x3b0(%rax), %eax
cmpq %rax, %rcx
ja 0x49ee1
movq %rcx, %rdx
movq %r14, 0x98(%rbx)
movq -0xc0(%rbp), %rax
cmpl $0x0, 0x3f0(%rax)
je 0x49c2b
movl 0x424(%rax), %eax
addq %rax, %rdx
movq -0xb8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rcx
callq 0x6b10b
testb %al, %al
jne 0x49eee
movq -0x70(%rbp), %r12
jmp 0x49c2e
testb $0x14, %al
movl -0x8c(%rbp), %r15d
je 0x49ead
testb %r13b, %r13b
je 0x49ead
movq -0x60(%rbp), %r14
addq -0x50(%rbp), %r14
movl $0x0, -0x38(%rbp)
jmp 0x49de8
movq %rdx, %r12
movq -0xb8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
movq %r12, -0xa8(%rbp)
movl %r12d, %eax
movq -0x68(%rbp), %r15
cmpq %rax, %r15
ja 0x49ee1
movl %r13d, -0xac(%rbp)
movq -0x50(%rbp), %r12
movq %r12, %rax
subq %r14, %rax
movl $0x14, %ecx
subl %eax, %ecx
cmpq %rcx, %r15
movl %r15d, %r13d
cmovael %ecx, %r13d
testl %r13d, %r13d
je 0x49ccf
movl %eax, %eax
leaq (%rax,%rbp), %rsi
addq $-0x88, %rsi
movl %r13d, %r14d
movq -0xa0(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x29080
movq -0x68(%rbp), %r15
subq %r14, %r15
movq %r15, -0x68(%rbp)
movq -0xa8(%rbp), %rax
subl %r13d, %eax
movq %rax, -0xa8(%rbp)
addq %r14, %rbx
movq %rbx, -0xa0(%rbp)
movq -0xe0(%rbp), %rbx
addq %r14, %r12
testq %r15, %r15
movl -0xac(%rbp), %r13d
je 0x49dae
movl 0x61c(%rbx), %eax
testb $0x2, %al
jne 0x49d74
testb $0x10, %al
je 0x49d21
movq -0x50(%rbp), %rax
addq %r15, %rax
movq -0x98(%rbp), %rcx
cmpq %rax, (%rcx)
jae 0x49d21
movq -0x98(%rbp), %rdi
movl $0x1, %esi
callq 0x9535d
testl %eax, %eax
jne 0x49eee
movq -0x68(%rbp), %r15
movl 0x480(%rbx), %r14d
leaq 0x33c2e1(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x128(%rbp), %rdi
movl %r14d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x49df3
movl $0x4, %ecx
movl %r14d, %edi
movq -0xa0(%rbp), %rsi
movq %r15, %rdx
callq 0xa0940
movq %rax, %r14
testq %r14, %r14
je 0x49dae
jmp 0x49ed4
cmpl $0x0, -0x8c(%rbp)
sete %al
testb %r13b, %r13b
setne %cl
andb %al, %cl
movzbl %cl, %r9d
movq %rbx, %rdi
movq -0x98(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0x6fb14
testb %al, %al
jne 0x49ee1
movl -0x8c(%rbp), %r15d
testl %r15d, %r15d
jne 0x49dcc
movq -0x60(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, 0xa0(%rbx)
xorl %r13d, %r13d
incl %r15d
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %r14
movq -0xa8(%rbp), %r12
subl %eax, %r12d
addq %rax, -0xa0(%rbp)
testl %r12d, %r12d
jne 0x49acf
jmp 0x49e69
movq %rax, %r12
leaq 0x33c213(%rip), %rax # 0x386010
movq (%rax), %rax
movq %r12, %rdi
movq %r15, %rsi
leaq 0x9076a(%rip), %rdx # 0xda577
movl $0x783, %ecx # imm = 0x783
callq *0x210(%rax)
movl $0x4, %ecx
movl %r14d, %edi
movq -0xa0(%rbp), %rsi
movq %r15, %rdx
callq 0xa0940
movq %rax, %r14
testq %rax, %rax
movl $0x0, %eax
cmovneq %rax, %r15
leaq 0x33c1cb(%rip), %rax # 0x386010
movq (%rax), %rax
movq %r12, %rdi
movq %r15, %rsi
callq *0x218(%rax)
jmp 0x49d6a
callq 0xa1ac2
movl $0x89, (%rax)
jmp 0x49eee
orb $-0x7e, 0x624(%rbx)
movq (%rbx), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x49e86
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4276e
movq 0x3a0(%rbx), %rdx
movq -0x70(%rbp), %rcx
movq %rbx, %rdi
movq -0xc8(%rbp), %rsi
callq 0x48c93
movq %rax, %rcx
xorl %eax, %eax
cmpq $-0x1, %rcx
jne 0x49f0b
jmp 0x49f04
testb $0x14, %al
je 0x49eee
callq 0xa1ac2
movl $0x86, (%rax)
movq -0x50(%rbp), %rax
movq %rax, 0x98(%rbx)
addq -0x60(%rbp), %rax
movq %rax, 0xa0(%rbx)
jmp 0x49eee
callq 0xa1ac2
cmpl $0xaf, (%rax)
jne 0x49eee
movq %rbx, %rdi
movl $0x7f, %esi
callq 0x3fc54
movq (%rbx), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x49f04
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4276e
callq 0xa1ac2
movl (%rax), %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x49f2c
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29250
| _ma_read_rnd_dynamic_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 108h
mov r13d, ecx
mov r14, rdx
mov [rbp+var_C8], rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rcx, [rdi]
xor eax, eax
cmp byte ptr [rcx+7D9h], 0
setnz al
shl eax, 10h
or rax, 10h
mov [rbp+var_D8], rax
lea rax, [rbp+var_88]
mov dword ptr [rax+50h], 0
lea rax, [rdi+4B8h]
mov [rbp+var_98], rax
lea rax, [rdi+3A0h]
mov [rbp+var_B8], rax
lea rax, [rdi+460h]
mov [rbp+var_D0], rax
mov r12d, 1
xor r15d, r15d
mov [rbp+var_C0], rcx
mov [rbp+var_E0], rdi
loc_49ACF:
mov rax, [rbx+20h]
cmp r14, [rax+28h]
jnb loc_49E59
mov eax, [rbx+61Ch]
test al, 2
mov [rbp+var_8C], r15d
jnz short loc_49B2D
test al, 10h
jz short loc_49B1B
lea rax, [r14+14h]
mov rcx, [rbp+var_98]
cmp [rcx], rax
jnb short loc_49B1B
mov rdi, [rbp+var_98]
mov esi, 1
call my_b_flush_io_cache
test eax, eax
jnz loc_49F04
loc_49B1B:
mov dword ptr [rbx+598h], 1
mov edx, [rbx+480h]
jmp short loc_49B6F
loc_49B2D:
test r15d, r15d
setz al
test r13b, r13b
setnz cl
and cl, al
movzx r9d, cl
or r9d, 2
mov r8d, 14h
mov rdi, rbx
mov rsi, [rbp+var_98]
lea rdx, [rbp+var_88]
mov rcx, r14
call _ma_read_cache
mov edx, 0FFFFFFFFh
test al, al
jnz loc_49EE1
loc_49B6F:
mov rdi, rbx
lea rsi, [rbp+var_88]
mov rcx, r14
call _ma_get_block_info
cmp eax, 4
jnb short loc_49BFF
cmp [rbp+var_8C], 0
jnz loc_49C3F
mov rcx, [rbp+var_70]
mov [rbx+110h], rcx
mov rax, [rbp+var_C0]
mov eax, [rax+3B0h]
cmp rcx, rax
ja loc_49EE1
mov rdx, rcx
mov [rbx+98h], r14
mov rax, [rbp+var_C0]
cmp dword ptr [rax+3F0h], 0
jz short loc_49C2B
mov eax, [rax+424h]
add rdx, rax
mov rdi, [rbp+var_B8]
mov rsi, [rbp+var_D0]
mov rcx, [rbp+var_D8]
call _ma_alloc_buffer
test al, al
jnz loc_49EEE
mov r12, [rbp+var_70]
jmp short loc_49C2E
loc_49BFF:
test al, 14h
mov r15d, [rbp+var_8C]
jz loc_49EAD
test r13b, r13b
jz loc_49EAD
mov r14, [rbp+var_60]
add r14, [rbp+var_50]
mov [rbp+var_38], 0
jmp loc_49DE8
loc_49C2B:
mov r12, rdx
loc_49C2E:
mov rax, [rbp+var_B8]
mov rax, [rax]
mov [rbp+var_A0], rax
loc_49C3F:
mov [rbp+var_A8], r12
mov eax, r12d
mov r15, [rbp+var_68]
cmp r15, rax
ja loc_49EE1
mov [rbp+var_AC], r13d
mov r12, [rbp+var_50]
mov rax, r12
sub rax, r14
mov ecx, 14h
sub ecx, eax
cmp r15, rcx
mov r13d, r15d
cmovnb r13d, ecx
test r13d, r13d
jz short loc_49CCF
mov eax, eax
lea rsi, [rax+rbp]
add rsi, 0FFFFFFFFFFFFFF78h
mov r14d, r13d
mov rbx, [rbp+var_A0]
mov rdi, rbx
mov rdx, r14
call _memcpy
mov r15, [rbp+var_68]
sub r15, r14
mov [rbp+var_68], r15
mov rax, [rbp+var_A8]
sub eax, r13d
mov [rbp+var_A8], rax
add rbx, r14
mov [rbp+var_A0], rbx
mov rbx, [rbp+var_E0]
add r12, r14
loc_49CCF:
test r15, r15
mov r13d, [rbp+var_AC]
jz loc_49DAE
mov eax, [rbx+61Ch]
test al, 2
jnz loc_49D74
test al, 10h
jz short loc_49D21
mov rax, [rbp+var_50]
add rax, r15
mov rcx, [rbp+var_98]
cmp [rcx], rax
jnb short loc_49D21
mov rdi, [rbp+var_98]
mov esi, 1
call my_b_flush_io_cache
test eax, eax
jnz loc_49EEE
mov r15, [rbp+var_68]
loc_49D21:
mov r14d, [rbx+480h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_128]
mov esi, r14d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_49DF3
mov ecx, 4
mov edi, r14d
mov rsi, [rbp+var_A0]
mov rdx, r15
call my_read
mov r14, rax
loc_49D6A:
test r14, r14
jz short loc_49DAE
jmp loc_49ED4
loc_49D74:
cmp [rbp+var_8C], 0
setz al
test r13b, r13b
setnz cl
and cl, al
movzx r9d, cl
mov rdi, rbx
mov rsi, [rbp+var_98]
mov rdx, [rbp+var_A0]
mov rcx, r12
mov r8, r15
call _ma_read_cache
test al, al
jnz loc_49EE1
loc_49DAE:
mov r15d, [rbp+var_8C]
test r15d, r15d
jnz short loc_49DCC
mov rax, [rbp+var_60]
add rax, [rbp+var_50]
mov [rbx+0A0h], rax
xor r13d, r13d
loc_49DCC:
inc r15d
mov rax, [rbp+var_68]
mov r14, [rbp+var_48]
mov r12, [rbp+var_A8]
sub r12d, eax
add [rbp+var_A0], rax
loc_49DE8:
test r12d, r12d
jnz loc_49ACF
jmp short loc_49E69
loc_49DF3:
mov r12, rax
lea rax, PSI_server
mov rax, [rax]
mov rdi, r12
mov rsi, r15
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 783h
call qword ptr [rax+210h]
mov ecx, 4
mov edi, r14d
mov rsi, [rbp+var_A0]
mov rdx, r15
call my_read
mov r14, rax
test rax, rax
mov eax, 0
cmovnz r15, rax
lea rax, PSI_server
mov rax, [rax]
mov rdi, r12
mov rsi, r15
call qword ptr [rax+218h]
jmp loc_49D6A
loc_49E59:
call _my_thread_var
mov dword ptr [rax], 89h
jmp loc_49EEE
loc_49E69:
or byte ptr [rbx+624h], 82h
mov rax, [rbx]
cmp dword ptr [rax+7B8h], 0
jnz short loc_49E86
mov rdi, rbx
xor esi, esi
call _ma_writeinfo
loc_49E86:
mov rdx, [rbx+3A0h]
mov rcx, [rbp+var_70]
mov rdi, rbx
mov rsi, [rbp+var_C8]
call _ma_rec_unpack
mov rcx, rax
xor eax, eax
cmp rcx, 0FFFFFFFFFFFFFFFFh
jnz short loc_49F0B
jmp short loc_49F04
loc_49EAD:
test al, 14h
jz short loc_49EEE
call _my_thread_var
mov dword ptr [rax], 86h
mov rax, [rbp+var_50]
mov [rbx+98h], rax
add rax, [rbp+var_60]
mov [rbx+0A0h], rax
jmp short loc_49EEE
loc_49ED4:
call _my_thread_var
cmp dword ptr [rax], 0AFh
jnz short loc_49EEE
loc_49EE1:
mov rdi, rbx
mov esi, 7Fh
call _ma_set_fatal_error
loc_49EEE:
mov rax, [rbx]
cmp dword ptr [rax+7B8h], 0
jnz short loc_49F04
mov rdi, rbx
xor esi, esi
call _ma_writeinfo
loc_49F04:
call _my_thread_var
mov eax, [rax]
loc_49F0B:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_49F2C
add rsp, 108h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_49F2C:
call ___stack_chk_fail
| long long ma_read_rnd_dynamic_record(
long long a1,
_WORD *a2,
unsigned long long a3,
int a4,
unsigned long long a5,
int a6)
{
long long v8; // rbx
unsigned int *v9; // rcx
long long v10; // r12
int v11; // r15d
int v12; // eax
long long v13; // rdx
char cache; // al
unsigned long long v15; // rcx
unsigned int block_info; // eax
unsigned long long v17; // r15
long long v18; // r12
unsigned int v19; // r13d
long long v20; // rbx
int v21; // eax
unsigned int v22; // r14d
long long v23; // rax
long long v24; // r14
int v25; // r15d
long long v26; // r12
long long v27; // rcx
long long result; // rax
long long v29; // rax
_DWORD *v30; // rax
char v31[72]; // [rsp+8h] [rbp-128h] BYREF
long long v32; // [rsp+50h] [rbp-E0h]
long long v33; // [rsp+58h] [rbp-D8h]
long long v34; // [rsp+60h] [rbp-D0h]
_WORD *v35; // [rsp+68h] [rbp-C8h]
unsigned int *v36; // [rsp+70h] [rbp-C0h]
long long *v37; // [rsp+78h] [rbp-B8h]
int v38; // [rsp+84h] [rbp-ACh]
long long v39; // [rsp+88h] [rbp-A8h]
long long v40; // [rsp+90h] [rbp-A0h]
_QWORD *v41; // [rsp+98h] [rbp-98h]
int v42; // [rsp+A4h] [rbp-8Ch]
unsigned __int8 v43[24]; // [rsp+A8h] [rbp-88h] BYREF
unsigned long long v44; // [rsp+C0h] [rbp-70h]
unsigned long long v45; // [rsp+C8h] [rbp-68h]
long long v46; // [rsp+D0h] [rbp-60h]
long long v47; // [rsp+E0h] [rbp-50h]
unsigned long long v48; // [rsp+E8h] [rbp-48h]
int v49; // [rsp+F8h] [rbp-38h]
unsigned long long v50; // [rsp+100h] [rbp-30h]
v35 = a2;
v8 = a1;
v50 = __readfsqword(0x28u);
v9 = *(unsigned int **)a1;
v33 = ((unsigned __int8)(*(_BYTE *)(*(_QWORD *)a1 + 2009LL) != 0) << 16) | 0x10LL;
v49 = 0;
v41 = (_QWORD *)(a1 + 1208);
v37 = (long long *)(a1 + 928);
v34 = a1 + 1120;
v10 = 1LL;
v11 = 0;
v36 = v9;
v32 = a1;
do
{
if ( a3 >= *(_QWORD *)(*(_QWORD *)(v8 + 32) + 40LL) )
{
*(_DWORD *)my_thread_var(a1) = 137;
goto LABEL_53;
}
v12 = *(_DWORD *)(v8 + 1564);
v42 = v11;
if ( (v12 & 2) != 0 )
{
cache = ma_read_cache(v8, v41, v43, a3, 20LL, (v11 == 0 && (_BYTE)a4 != 0) | 2u);
v13 = 0xFFFFFFFFLL;
if ( cache )
goto LABEL_52;
}
else
{
if ( (v12 & 0x10) != 0 && *v41 < a3 + 20 )
{
a1 = (long long)v41;
if ( (unsigned int)my_b_flush_io_cache(v41, 1LL) )
return *(unsigned int *)my_thread_var(a1);
}
*(_DWORD *)(v8 + 1432) = 1;
v13 = *(unsigned int *)(v8 + 1152);
}
a1 = v8;
block_info = ma_get_block_info(v8, v43, v13, a3, a5, a6);
if ( block_info >= 4 )
{
v11 = v42;
if ( (block_info & 0x14) == 0 || !(_BYTE)a4 )
{
if ( (block_info & 0x14) != 0 )
{
*(_DWORD *)my_thread_var(v8) = 134;
v29 = v47;
*(_QWORD *)(v8 + 152) = v47;
*(_QWORD *)(v8 + 160) = v46 + v29;
}
goto LABEL_53;
}
a3 = v47 + v46;
v49 = 0;
}
else
{
if ( !v42 )
{
v15 = v44;
*(_QWORD *)(v8 + 272) = v44;
if ( v15 > v36[236] )
goto LABEL_52;
v13 = v15;
*(_QWORD *)(v8 + 152) = a3;
if ( v36[252] )
{
a1 = (long long)v37;
if ( (unsigned __int8)ma_alloc_buffer(v37, v34, v36[265] + v15, v33) )
goto LABEL_53;
v10 = v44;
}
else
{
v10 = v15;
}
v40 = *v37;
}
v39 = v10;
v17 = v45;
if ( v45 > (unsigned int)v10 )
goto LABEL_52;
v38 = a4;
v18 = v47;
v19 = v45;
if ( v45 >= (unsigned int)(20 - (v47 - a3)) )
v19 = 20 - (v47 - a3);
if ( v19 )
{
v20 = v40;
a1 = v40;
memcpy(v40, &v43[(unsigned int)(v47 - a3)], v19);
v17 = v45 - v19;
v45 = v17;
v39 = (unsigned int)v39 - v19;
v40 = v19 + v20;
v8 = v32;
v18 += v19;
}
a4 = v38;
if ( v17 )
{
v21 = *(_DWORD *)(v8 + 1564);
if ( (v21 & 2) != 0 )
{
a1 = v8;
if ( (unsigned __int8)ma_read_cache(v8, v41, v40, v18, v17, (v42 == 0) & (unsigned __int8)((_BYTE)v38 != 0)) )
goto LABEL_52;
}
else
{
if ( (v21 & 0x10) != 0 && *v41 < v17 + v47 )
{
a1 = (long long)v41;
if ( (unsigned int)my_b_flush_io_cache(v41, 1LL) )
goto LABEL_53;
v17 = v45;
}
v22 = *(_DWORD *)(v8 + 1152);
v23 = ((long long ( *)(char *, _QWORD, long long))PSI_server[43])(v31, v22, 6LL);
if ( v23 )
{
v26 = v23;
((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])(
v23,
v17,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",
1923LL);
v24 = my_read(v22, v40, v17, 4LL);
if ( v24 )
v17 = 0LL;
a1 = v26;
((void ( *)(long long, unsigned long long))PSI_server[67])(v26, v17);
}
else
{
a1 = v22;
v24 = my_read(v22, v40, v17, 4LL);
}
if ( v24 )
{
v30 = (_DWORD *)my_thread_var(a1);
if ( *v30 == 175 )
{
LABEL_52:
a1 = v8;
ma_set_fatal_error((_DWORD *)v8, 127, v13, v15, a5, a6);
}
LABEL_53:
if ( !*(_DWORD *)(*(_QWORD *)v8 + 1976LL) )
{
a1 = v8;
ma_writeinfo((long long *)v8, 0);
}
return *(unsigned int *)my_thread_var(a1);
}
}
}
v25 = v42;
if ( !v42 )
{
*(_QWORD *)(v8 + 160) = v47 + v46;
a4 = 0;
}
v11 = v25 + 1;
a3 = v48;
v10 = (unsigned int)(v39 - v45);
v40 += v45;
}
}
while ( (_DWORD)v10 );
*(_BYTE *)(v8 + 1572) |= 0x82u;
if ( !*(_DWORD *)(*(_QWORD *)v8 + 1976LL) )
ma_writeinfo((long long *)v8, 0);
a1 = v8;
v27 = ma_rec_unpack((_DWORD *)v8, v35, *(_QWORD *)(v8 + 928), v44, a5, a6);
result = 0LL;
if ( v27 == -1 )
return *(unsigned int *)my_thread_var(a1);
return result;
}
| _ma_read_rnd_dynamic_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x108
MOV R13D,ECX
MOV R14,RDX
MOV qword ptr [RBP + -0xc8],RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RCX,qword ptr [RDI]
XOR EAX,EAX
CMP byte ptr [RCX + 0x7d9],0x0
SETNZ AL
SHL EAX,0x10
OR RAX,0x10
MOV qword ptr [RBP + -0xd8],RAX
LEA RAX,[RBP + -0x88]
MOV dword ptr [RAX + 0x50],0x0
LEA RAX,[RDI + 0x4b8]
MOV qword ptr [RBP + -0x98],RAX
LEA RAX,[RDI + 0x3a0]
MOV qword ptr [RBP + -0xb8],RAX
LEA RAX,[RDI + 0x460]
MOV qword ptr [RBP + -0xd0],RAX
MOV R12D,0x1
XOR R15D,R15D
MOV qword ptr [RBP + -0xc0],RCX
MOV qword ptr [RBP + -0xe0],RDI
LAB_00149acf:
MOV RAX,qword ptr [RBX + 0x20]
CMP R14,qword ptr [RAX + 0x28]
JNC 0x00149e59
MOV EAX,dword ptr [RBX + 0x61c]
TEST AL,0x2
MOV dword ptr [RBP + -0x8c],R15D
JNZ 0x00149b2d
TEST AL,0x10
JZ 0x00149b1b
LEA RAX,[R14 + 0x14]
MOV RCX,qword ptr [RBP + -0x98]
CMP qword ptr [RCX],RAX
JNC 0x00149b1b
MOV RDI,qword ptr [RBP + -0x98]
MOV ESI,0x1
CALL 0x0019535d
TEST EAX,EAX
JNZ 0x00149f04
LAB_00149b1b:
MOV dword ptr [RBX + 0x598],0x1
MOV EDX,dword ptr [RBX + 0x480]
JMP 0x00149b6f
LAB_00149b2d:
TEST R15D,R15D
SETZ AL
TEST R13B,R13B
SETNZ CL
AND CL,AL
MOVZX R9D,CL
OR R9D,0x2
MOV R8D,0x14
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x98]
LEA RDX,[RBP + -0x88]
MOV RCX,R14
CALL 0x0016fb14
MOV EDX,0xffffffff
TEST AL,AL
JNZ 0x00149ee1
LAB_00149b6f:
MOV RDI,RBX
LEA RSI,[RBP + -0x88]
MOV RCX,R14
CALL 0x00148398
CMP EAX,0x4
JNC 0x00149bff
CMP dword ptr [RBP + -0x8c],0x0
JNZ 0x00149c3f
MOV RCX,qword ptr [RBP + -0x70]
MOV qword ptr [RBX + 0x110],RCX
MOV RAX,qword ptr [RBP + -0xc0]
MOV EAX,dword ptr [RAX + 0x3b0]
CMP RCX,RAX
JA 0x00149ee1
MOV RDX,RCX
MOV qword ptr [RBX + 0x98],R14
MOV RAX,qword ptr [RBP + -0xc0]
CMP dword ptr [RAX + 0x3f0],0x0
JZ 0x00149c2b
MOV EAX,dword ptr [RAX + 0x424]
ADD RDX,RAX
MOV RDI,qword ptr [RBP + -0xb8]
MOV RSI,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0xd8]
CALL 0x0016b10b
TEST AL,AL
JNZ 0x00149eee
MOV R12,qword ptr [RBP + -0x70]
JMP 0x00149c2e
LAB_00149bff:
TEST AL,0x14
MOV R15D,dword ptr [RBP + -0x8c]
JZ 0x00149ead
TEST R13B,R13B
JZ 0x00149ead
MOV R14,qword ptr [RBP + -0x60]
ADD R14,qword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x38],0x0
JMP 0x00149de8
LAB_00149c2b:
MOV R12,RDX
LAB_00149c2e:
MOV RAX,qword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xa0],RAX
LAB_00149c3f:
MOV qword ptr [RBP + -0xa8],R12
MOV EAX,R12D
MOV R15,qword ptr [RBP + -0x68]
CMP R15,RAX
JA 0x00149ee1
MOV dword ptr [RBP + -0xac],R13D
MOV R12,qword ptr [RBP + -0x50]
MOV RAX,R12
SUB RAX,R14
MOV ECX,0x14
SUB ECX,EAX
CMP R15,RCX
MOV R13D,R15D
CMOVNC R13D,ECX
TEST R13D,R13D
JZ 0x00149ccf
MOV EAX,EAX
LEA RSI,[RAX + RBP*0x1]
ADD RSI,-0x88
MOV R14D,R13D
MOV RBX,qword ptr [RBP + -0xa0]
MOV RDI,RBX
MOV RDX,R14
CALL 0x00129080
MOV R15,qword ptr [RBP + -0x68]
SUB R15,R14
MOV qword ptr [RBP + -0x68],R15
MOV RAX,qword ptr [RBP + -0xa8]
SUB EAX,R13D
MOV qword ptr [RBP + -0xa8],RAX
ADD RBX,R14
MOV qword ptr [RBP + -0xa0],RBX
MOV RBX,qword ptr [RBP + -0xe0]
ADD R12,R14
LAB_00149ccf:
TEST R15,R15
MOV R13D,dword ptr [RBP + -0xac]
JZ 0x00149dae
MOV EAX,dword ptr [RBX + 0x61c]
TEST AL,0x2
JNZ 0x00149d74
TEST AL,0x10
JZ 0x00149d21
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,R15
MOV RCX,qword ptr [RBP + -0x98]
CMP qword ptr [RCX],RAX
JNC 0x00149d21
MOV RDI,qword ptr [RBP + -0x98]
MOV ESI,0x1
CALL 0x0019535d
TEST EAX,EAX
JNZ 0x00149eee
MOV R15,qword ptr [RBP + -0x68]
LAB_00149d21:
MOV R14D,dword ptr [RBX + 0x480]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x128]
MOV ESI,R14D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00149df3
MOV ECX,0x4
MOV EDI,R14D
MOV RSI,qword ptr [RBP + -0xa0]
MOV RDX,R15
CALL 0x001a0940
MOV R14,RAX
LAB_00149d6a:
TEST R14,R14
JZ 0x00149dae
JMP 0x00149ed4
LAB_00149d74:
CMP dword ptr [RBP + -0x8c],0x0
SETZ AL
TEST R13B,R13B
SETNZ CL
AND CL,AL
MOVZX R9D,CL
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x98]
MOV RDX,qword ptr [RBP + -0xa0]
MOV RCX,R12
MOV R8,R15
CALL 0x0016fb14
TEST AL,AL
JNZ 0x00149ee1
LAB_00149dae:
MOV R15D,dword ptr [RBP + -0x8c]
TEST R15D,R15D
JNZ 0x00149dcc
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBX + 0xa0],RAX
XOR R13D,R13D
LAB_00149dcc:
INC R15D
MOV RAX,qword ptr [RBP + -0x68]
MOV R14,qword ptr [RBP + -0x48]
MOV R12,qword ptr [RBP + -0xa8]
SUB R12D,EAX
ADD qword ptr [RBP + -0xa0],RAX
LAB_00149de8:
TEST R12D,R12D
JNZ 0x00149acf
JMP 0x00149e69
LAB_00149df3:
MOV R12,RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RDI,R12
MOV RSI,R15
LEA RDX,[0x1da577]
MOV ECX,0x783
CALL qword ptr [RAX + 0x210]
MOV ECX,0x4
MOV EDI,R14D
MOV RSI,qword ptr [RBP + -0xa0]
MOV RDX,R15
CALL 0x001a0940
MOV R14,RAX
TEST RAX,RAX
MOV EAX,0x0
CMOVNZ R15,RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [RAX + 0x218]
JMP 0x00149d6a
LAB_00149e59:
CALL 0x001a1ac2
MOV dword ptr [RAX],0x89
JMP 0x00149eee
LAB_00149e69:
OR byte ptr [RBX + 0x624],0x82
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00149e86
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0014276e
LAB_00149e86:
MOV RDX,qword ptr [RBX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x70]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0xc8]
CALL 0x00148c93
MOV RCX,RAX
XOR EAX,EAX
CMP RCX,-0x1
JNZ 0x00149f0b
JMP 0x00149f04
LAB_00149ead:
TEST AL,0x14
JZ 0x00149eee
CALL 0x001a1ac2
MOV dword ptr [RAX],0x86
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBX + 0x98],RAX
ADD RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBX + 0xa0],RAX
JMP 0x00149eee
LAB_00149ed4:
CALL 0x001a1ac2
CMP dword ptr [RAX],0xaf
JNZ 0x00149eee
LAB_00149ee1:
MOV RDI,RBX
MOV ESI,0x7f
CALL 0x0013fc54
LAB_00149eee:
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00149f04
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0014276e
LAB_00149f04:
CALL 0x001a1ac2
MOV EAX,dword ptr [RAX]
LAB_00149f0b:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00149f2c
ADD RSP,0x108
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00149f2c:
CALL 0x00129250
|
int4
_ma_read_rnd_dynamic_record(long *param_1,int8 param_2,ulong param_3,int4 param_4)
{
void *pvVar1;
char cVar2;
int iVar3;
uint uVar4;
uint uVar5;
long lVar6;
int *piVar7;
int4 *puVar8;
uint uVar9;
int4 uVar10;
ulong uVar11;
long lVar12;
long in_FS_OFFSET;
int1 local_130 [72];
long *local_e8;
ulong local_e0;
long *local_d8;
int8 local_d0;
long local_c8;
long *local_c0;
int4 local_b4;
ulong local_b0;
void *local_a8;
ulong *local_a0;
int local_94;
int1 local_90 [24];
ulong local_78;
ulong local_70;
long local_68;
long local_58;
ulong local_50;
int4 local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_c8 = *param_1;
local_e0 = (ulong)(*(char *)(local_c8 + 0x7d9) != '\0') << 0x10 | 0x10;
local_40 = 0;
local_a0 = (ulong *)(param_1 + 0x97);
local_c0 = param_1 + 0x74;
local_d8 = param_1 + 0x8c;
uVar11 = 1;
iVar3 = 0;
local_e8 = param_1;
local_d0 = param_2;
do {
if (*(ulong *)(param_1[4] + 0x28) <= param_3) {
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0x89;
LAB_00149eee:
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
goto LAB_00149f04;
}
local_94 = iVar3;
if ((*(uint *)((long)param_1 + 0x61c) & 2) != 0) {
cVar2 = _ma_read_cache(param_1,local_a0,local_90,param_3,0x14,
((char)param_4 != '\0' && iVar3 == 0) | 2);
uVar10 = 0xffffffff;
if (cVar2 == '\0') goto LAB_00149b6f;
LAB_00149ee1:
_ma_set_fatal_error(param_1,0x7f);
goto LAB_00149eee;
}
if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && (*local_a0 < param_3 + 0x14)) &&
(iVar3 = my_b_flush_io_cache(local_a0,1), iVar3 != 0)) goto LAB_00149f04;
*(int4 *)(param_1 + 0xb3) = 1;
uVar10 = (int4)param_1[0x90];
LAB_00149b6f:
uVar4 = _ma_get_block_info(param_1,local_90,uVar10,param_3);
if (uVar4 < 4) {
if (local_94 == 0) {
param_1[0x22] = local_78;
if (*(uint *)(local_c8 + 0x3b0) < local_78) goto LAB_00149ee1;
param_1[0x13] = param_3;
if ((*(int *)(local_c8 + 0x3f0) != 0) &&
(cVar2 = _ma_alloc_buffer(local_c0,local_d8,local_78 + *(uint *)(local_c8 + 0x424),
local_e0), cVar2 != '\0')) goto LAB_00149eee;
local_a8 = (void *)*local_c0;
uVar11 = local_78;
}
lVar12 = local_58;
pvVar1 = local_a8;
local_b0 = uVar11;
if ((uVar11 & 0xffffffff) < local_70) goto LAB_00149ee1;
uVar5 = (int)local_58 - (int)param_3;
uVar9 = 0x14 - uVar5;
uVar4 = (uint)local_70;
if (uVar9 <= local_70) {
uVar4 = uVar9;
}
local_b4 = param_4;
if (uVar4 != 0) {
uVar11 = (ulong)uVar4;
memcpy(local_a8,local_90 + uVar5,uVar11);
local_70 = local_70 - uVar11;
local_b0 = (ulong)((int)local_b0 - uVar4);
local_a8 = (void *)((long)pvVar1 + uVar11);
lVar12 = lVar12 + uVar11;
param_1 = local_e8;
}
param_4 = local_b4;
if (local_70 != 0) {
if ((*(uint *)((long)param_1 + 0x61c) & 2) == 0) {
if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) == 0) ||
(local_58 + local_70 <= *local_a0)) ||
(iVar3 = my_b_flush_io_cache(local_a0,1), iVar3 == 0)) {
uVar11 = local_70;
uVar10 = (int4)param_1[0x90];
lVar12 = (**(code **)(PSI_server + 0x158))(local_130,uVar10,6);
if (lVar12 == 0) {
lVar6 = my_read(uVar10,local_a8,uVar11,4);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar12,uVar11,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",0x783)
;
lVar6 = my_read(uVar10,local_a8,uVar11,4);
if (lVar6 != 0) {
uVar11 = 0;
}
(**(code **)(PSI_server + 0x218))(lVar12,uVar11);
}
if (lVar6 == 0) goto LAB_00149dae;
piVar7 = (int *)_my_thread_var();
if (*piVar7 == 0xaf) goto LAB_00149ee1;
}
goto LAB_00149eee;
}
cVar2 = _ma_read_cache(param_1,local_a0,local_a8,lVar12,local_70,
(char)local_b4 != '\0' && local_94 == 0);
if (cVar2 != '\0') goto LAB_00149ee1;
}
LAB_00149dae:
if (local_94 == 0) {
param_1[0x14] = local_68 + local_58;
param_4 = 0;
}
uVar11 = (ulong)(uint)((int)local_b0 - (int)local_70);
local_a8 = (void *)((long)local_a8 + local_70);
param_3 = local_50;
iVar3 = local_94 + 1;
}
else {
if (((uVar4 & 0x14) == 0) || ((char)param_4 == '\0')) {
if ((uVar4 & 0x14) != 0) {
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0x86;
param_1[0x13] = local_58;
param_1[0x14] = local_58 + local_68;
}
goto LAB_00149eee;
}
param_3 = local_68 + local_58;
local_40 = 0;
iVar3 = local_94;
}
} while ((int)uVar11 != 0);
*(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 0x82;
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
lVar12 = _ma_rec_unpack(param_1,local_d0,param_1[0x74],local_78);
uVar10 = 0;
if (lVar12 == -1) {
LAB_00149f04:
puVar8 = (int4 *)_my_thread_var();
uVar10 = *puVar8;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar10;
}
| |
39,327 | ggml_transpose | monkey531[P]llama/ggml/src/ggml.c | struct ggml_tensor * ggml_transpose(
struct ggml_context * ctx,
struct ggml_tensor * a) {
struct ggml_tensor * result = ggml_view_tensor(ctx, a);
ggml_format_name(result, "%s (transposed)", a->name);
result->ne[0] = a->ne[1];
result->ne[1] = a->ne[0];
result->nb[0] = a->nb[1];
result->nb[1] = a->nb[0];
result->op = GGML_OP_TRANSPOSE;
result->src[0] = a;
return result;
} | O0 | c | ggml_transpose:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x408e0
movq %rax, (%rsp)
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
addq $0x100, %rdx # imm = 0x100
leaq 0x66577(%rip), %rsi # 0xb4adf
movb $0x0, %al
callq 0x45f40
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x38(%rax)
movq (%rsp), %rax
movl $0x24, 0x50(%rax)
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x98(%rax)
movq (%rsp), %rax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| ggml_transpose:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
call _ggml_view_tensor
mov [rsp+18h+var_18], rax
mov rdi, [rsp+18h+var_18]
mov rdx, [rsp+18h+var_10]
add rdx, 100h
lea rsi, aSTransposed; "%s (transposed)"
mov al, 0
call _ggml_format_name
mov rax, [rsp+18h+var_10]
mov rcx, [rax+18h]
mov rax, [rsp+18h+var_18]
mov [rax+10h], rcx
mov rax, [rsp+18h+var_10]
mov rcx, [rax+10h]
mov rax, [rsp+18h+var_18]
mov [rax+18h], rcx
mov rax, [rsp+18h+var_10]
mov rcx, [rax+38h]
mov rax, [rsp+18h+var_18]
mov [rax+30h], rcx
mov rax, [rsp+18h+var_10]
mov rcx, [rax+30h]
mov rax, [rsp+18h+var_18]
mov [rax+38h], rcx
mov rax, [rsp+18h+var_18]
mov dword ptr [rax+50h], 24h ; '$'
mov rcx, [rsp+18h+var_10]
mov rax, [rsp+18h+var_18]
mov [rax+98h], rcx
mov rax, [rsp+18h+var_18]
add rsp, 18h
retn
| long long ggml_transpose(
long long a1,
_QWORD *a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
_QWORD *v10; // rax
long long v11; // rcx
long long v12; // r8
long long v13; // r9
__m128 v14; // xmm4
__m128 v15; // xmm5
long long v17; // [rsp+0h] [rbp-18h]
v10 = ggml_view_tensor(a1, (long long)a2, a3, a4, a5, a6, a7, a8, a9, a10);
ggml_format_name(
(long long)v10,
(long long)"%s (transposed)",
(long long)(a2 + 32),
v11,
v12,
v13,
a3,
a4,
a5,
a6,
v14,
v15,
a9,
a10,
(char)v10);
*(_QWORD *)(v17 + 16) = a2[3];
*(_QWORD *)(v17 + 24) = a2[2];
*(_QWORD *)(v17 + 48) = a2[7];
*(_QWORD *)(v17 + 56) = a2[6];
*(_DWORD *)(v17 + 80) = 36;
*(_QWORD *)(v17 + 152) = a2;
return v17;
}
| ggml_transpose:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001408e0
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
ADD RDX,0x100
LEA RSI,[0x1b4adf]
MOV AL,0x0
CALL 0x00145f40
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x30],RCX
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x50],0x24
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RSP]
ADD RSP,0x18
RET
|
long ggml_transpose(int8 param_1,long param_2)
{
long lVar1;
lVar1 = ggml_view_tensor(param_1,param_2);
ggml_format_name(lVar1,"%s (transposed)",param_2 + 0x100);
*(int8 *)(lVar1 + 0x10) = *(int8 *)(param_2 + 0x18);
*(int8 *)(lVar1 + 0x18) = *(int8 *)(param_2 + 0x10);
*(int8 *)(lVar1 + 0x30) = *(int8 *)(param_2 + 0x38);
*(int8 *)(lVar1 + 0x38) = *(int8 *)(param_2 + 0x30);
*(int4 *)(lVar1 + 0x50) = 0x24;
*(long *)(lVar1 + 0x98) = param_2;
return lVar1;
}
| |
39,328 | my_vfprintf | eloqsql/strings/my_vsnprintf.c | int my_vfprintf(FILE *stream, const char* format, va_list args)
{
char cvtbuf[1024];
int alloc= 0;
char *p= cvtbuf;
size_t cur_len= sizeof(cvtbuf), actual;
int ret;
/*
We do not know how much buffer we need.
So start with a reasonably-sized stack-allocated buffer, and increase
it exponentially until it is big enough.
*/
for (;;)
{
size_t new_len;
actual= my_vsnprintf(p, cur_len, format, args);
if (actual < cur_len - 1)
break;
/*
Not enough space (or just enough with nothing to spare - but we cannot
distinguish this case from the return value). Allocate a bigger buffer
and try again.
*/
if (alloc)
my_free(p);
else
alloc= 1;
new_len= cur_len*2;
if (new_len < cur_len)
return 0; /* Overflow */
cur_len= new_len;
p= my_malloc(PSI_INSTRUMENT_ME, cur_len, MYF(MY_FAE));
if (!p)
return 0;
}
ret= (int) actual;
if (fputs(p, stream) < 0)
ret= -1;
if (alloc)
my_free(p);
return ret;
} | O3 | c | my_vfprintf:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp # imm = 0x418
movq %rdx, -0x440(%rbp)
movq %rsi, %r12
movq %rdi, -0x438(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movb $0x1, %bl
movl $0x400, %r13d # imm = 0x400
leaq -0x430(%rbp), %r14
leaq 0x2ed384(%rip), %rdi # 0x3ca060
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq -0x440(%rbp), %r8
callq 0xdba2c
movq %rax, %r15
leaq -0x1(%r13), %rax
cmpq %rax, %r15
jb 0xdcd2d
testb $0x1, %bl
jne 0xdcd0a
movq %r14, %rdi
callq 0xacc36
testq %r13, %r13
js 0xdcd5a
addq %r13, %r13
xorl %ebx, %ebx
movl $0x8, %edx
xorl %edi, %edi
movq %r13, %rsi
callq 0xaca09
movq %rax, %r14
testq %rax, %rax
jne 0xdccd5
jmp 0xdcd5c
movq %r14, %rdi
movq -0x438(%rbp), %rsi
callq 0x39320
testl %eax, %eax
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
cmovnsl %r15d, %r12d
testb $0x1, %bl
jne 0xdcd55
movq %r14, %rdi
callq 0xacc36
movl %r12d, %ebx
jmp 0xdcd5c
xorl %ebx, %ebx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xdcd7f
movl %ebx, %eax
addq $0x418, %rsp # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x39290
| my_vfprintf:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 418h
mov [rbp+var_440], rdx
mov r12, rsi
mov [rbp+var_438], rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov bl, 1
mov r13d, 400h
lea r14, [rbp+var_430]
loc_DCCD5:
lea rdi, my_charset_latin1
mov rsi, r14
mov rdx, r13
mov rcx, r12
mov r8, [rbp+var_440]
call my_vsnprintf_ex
mov r15, rax
lea rax, [r13-1]
cmp r15, rax
jb short loc_DCD2D
test bl, 1
jnz short loc_DCD0A
mov rdi, r14
call my_free
loc_DCD0A:
test r13, r13
js short loc_DCD5A
add r13, r13
xor ebx, ebx
mov edx, 8
xor edi, edi
mov rsi, r13
call my_malloc
mov r14, rax
test rax, rax
jnz short loc_DCCD5
jmp short loc_DCD5C
loc_DCD2D:
mov rdi, r14
mov rsi, [rbp+var_438]
call _fputs
test eax, eax
mov r12d, 0FFFFFFFFh
cmovns r12d, r15d
test bl, 1
jnz short loc_DCD55
mov rdi, r14
call my_free
loc_DCD55:
mov ebx, r12d
jmp short loc_DCD5C
loc_DCD5A:
xor ebx, ebx
loc_DCD5C:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_DCD7F
mov eax, ebx
add rsp, 418h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_DCD7F:
call ___stack_chk_fail
| long long my_vfprintf(long long a1, unsigned __int8 *a2, unsigned int *a3)
{
unsigned int v3; // ebx
long long v4; // r13
char *v5; // r14
unsigned long long v6; // r15
unsigned int v7; // r12d
char v10; // [rsp+10h] [rbp-430h] BYREF
unsigned long long v11; // [rsp+410h] [rbp-30h]
v11 = __readfsqword(0x28u);
LOBYTE(v3) = 1;
v4 = 1024LL;
v5 = &v10;
while ( 1 )
{
v6 = my_vsnprintf_ex((long long)my_charset_latin1, (unsigned long long)v5, v4, a2, a3);
if ( v6 < v4 - 1 )
break;
if ( (v3 & 1) == 0 )
my_free((long long)v5);
if ( v4 < 0 )
return 0;
v4 *= 2LL;
v3 = 0;
v5 = (char *)my_malloc(0, v4, 8);
if ( !v5 )
return v3;
}
v7 = -1;
if ( (int)fputs(v5, a1) >= 0 )
v7 = v6;
if ( (v3 & 1) == 0 )
my_free((long long)v5);
return v7;
}
| my_vfprintf:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x418
MOV qword ptr [RBP + -0x440],RDX
MOV R12,RSI
MOV qword ptr [RBP + -0x438],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV BL,0x1
MOV R13D,0x400
LEA R14,[RBP + -0x430]
LAB_001dccd5:
LEA RDI,[0x4ca060]
MOV RSI,R14
MOV RDX,R13
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x440]
CALL 0x001dba2c
MOV R15,RAX
LEA RAX,[R13 + -0x1]
CMP R15,RAX
JC 0x001dcd2d
TEST BL,0x1
JNZ 0x001dcd0a
MOV RDI,R14
CALL 0x001acc36
LAB_001dcd0a:
TEST R13,R13
JS 0x001dcd5a
ADD R13,R13
XOR EBX,EBX
MOV EDX,0x8
XOR EDI,EDI
MOV RSI,R13
CALL 0x001aca09
MOV R14,RAX
TEST RAX,RAX
JNZ 0x001dccd5
JMP 0x001dcd5c
LAB_001dcd2d:
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x438]
CALL 0x00139320
TEST EAX,EAX
MOV R12D,0xffffffff
CMOVNS R12D,R15D
TEST BL,0x1
JNZ 0x001dcd55
MOV RDI,R14
CALL 0x001acc36
LAB_001dcd55:
MOV EBX,R12D
JMP 0x001dcd5c
LAB_001dcd5a:
XOR EBX,EBX
LAB_001dcd5c:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001dcd7f
MOV EAX,EBX
ADD RSP,0x418
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001dcd7f:
CALL 0x00139290
|
ulong my_vfprintf(FILE *param_1,int8 param_2,int8 param_3)
{
int iVar1;
ulong uVar2;
char *__s;
ulong uVar3;
ulong uVar4;
long lVar5;
long in_FS_OFFSET;
char local_438 [1024];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar5 = 0x400;
__s = local_438;
uVar3 = 1;
do {
uVar2 = my_vsnprintf_ex(&my_charset_latin1,__s,lVar5,param_2,param_3);
if (uVar2 < lVar5 - 1U) {
iVar1 = fputs(__s,param_1);
uVar4 = 0xffffffff;
if (-1 < iVar1) {
uVar4 = uVar2 & 0xffffffff;
}
if (uVar3 == 0) {
my_free(__s);
}
break;
}
if ((char)uVar3 == '\0') {
my_free(__s);
}
if (lVar5 < 0) {
uVar4 = 0;
break;
}
lVar5 = lVar5 * 2;
uVar4 = 0;
__s = (char *)my_malloc(0,lVar5,8);
uVar3 = uVar4;
} while (__s != (char *)0x0);
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
| |
39,329 | ggml_flash_attn_ext | ngxson[P]ggml-easy/ggml/src/ggml.c | struct ggml_tensor * ggml_flash_attn_ext(
struct ggml_context * ctx,
struct ggml_tensor * q,
struct ggml_tensor * k,
struct ggml_tensor * v,
struct ggml_tensor * mask,
float scale,
float max_bias,
float logit_softcap) {
GGML_ASSERT(ggml_can_mul_mat(k, q));
// TODO: check if vT can be multiplied by (k*qT)
if (mask) {
GGML_ASSERT(ggml_is_contiguous(mask));
GGML_ASSERT(mask->ne[2] == 1);
GGML_ASSERT(mask->ne[3] == 1);
GGML_ASSERT(mask->ne[1] >= GGML_PAD(q->ne[1], GGML_KQ_MASK_PAD) &&
"the Flash-Attention kernel requires the mask to be padded to GGML_KQ_MASK_PAD and at least n_queries big");
//GGML_ASSERT(ggml_can_repeat_rows(mask, qk));
}
if (max_bias > 0.0f) {
GGML_ASSERT(mask);
}
// permute(0, 2, 1, 3)
int64_t ne[4] = { v->ne[0], q->ne[2], q->ne[1], q->ne[3] };
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne);
float params[] = { scale, max_bias, logit_softcap };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_FLASH_ATTN_EXT;
result->src[0] = q;
result->src[1] = k;
result->src[2] = v;
result->src[3] = mask;
return result;
} | O2 | c | ggml_flash_attn_ext:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movss %xmm2, 0x10(%rsp)
movss %xmm1, 0x8(%rsp)
movss %xmm0, 0xc(%rsp)
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %rdx, %rdi
callq 0x212b0
testb %al, %al
je 0x23f50
testq %rbx, %rbx
je 0x23ea2
movq %rbx, %rdi
callq 0x1e930
testb %al, %al
je 0x23f6c
cmpq $0x1, 0x20(%rbx)
jne 0x23f88
cmpq $0x1, 0x28(%rbx)
jne 0x23fa4
movq 0x18(%r12), %rax
leaq 0x3f(%rax), %rcx
andq $-0x40, %rcx
cmpq %rcx, 0x18(%rbx)
jge 0x23eb9
leaq 0x276f9(%rip), %rdi # 0x4b583
leaq 0x2773d(%rip), %rdx # 0x4b5ce
leaq 0x27ef0(%rip), %rcx # 0x4bd88
movl $0x113d, %esi # imm = 0x113D
jmp 0x23fda
xorps %xmm0, %xmm0
movss 0x8(%rsp), %xmm1
ucomiss %xmm0, %xmm1
ja 0x23fc0
movq 0x18(%r12), %rax
movq 0x10(%r14), %rdx
leaq 0x20(%rsp), %rcx
movq %rdx, (%rcx)
movq 0x20(%r12), %rdx
movq %rdx, 0x8(%rcx)
movq %rax, 0x10(%rcx)
movq 0x28(%r12), %rax
movq %rax, 0x18(%rcx)
pushq $0x4
popq %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x1c230
movq %rax, %r13
leaq 0x14(%rsp), %rsi
movss 0xc(%rsp), %xmm0
movss %xmm0, (%rsi)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%rsi)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x8(%rsi)
pushq $0xc
popq %rdx
movq %rax, %rdi
callq 0x20fbc
movl $0x3f, 0x50(%r13)
movq %r12, 0x98(%r13)
movq %r15, 0xa0(%r13)
movq %r14, 0xa8(%r13)
movq %rbx, 0xb0(%r13)
movq %r13, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2762c(%rip), %rdi # 0x4b583
leaq 0x27670(%rip), %rdx # 0x4b5ce
leaq 0x27dd1(%rip), %rcx # 0x4bd36
movl $0x1135, %esi # imm = 0x1135
jmp 0x23fda
leaq 0x27610(%rip), %rdi # 0x4b583
leaq 0x27654(%rip), %rdx # 0x4b5ce
leaq 0x27dcc(%rip), %rcx # 0x4bd4d
movl $0x1139, %esi # imm = 0x1139
jmp 0x23fda
leaq 0x275f4(%rip), %rdi # 0x4b583
leaq 0x27638(%rip), %rdx # 0x4b5ce
leaq 0x27dc9(%rip), %rcx # 0x4bd66
movl $0x113a, %esi # imm = 0x113A
jmp 0x23fda
leaq 0x275d8(%rip), %rdi # 0x4b583
leaq 0x2761c(%rip), %rdx # 0x4b5ce
leaq 0x27dbe(%rip), %rcx # 0x4bd77
movl $0x113b, %esi # imm = 0x113B
jmp 0x23fda
leaq 0x275bc(%rip), %rdi # 0x4b583
leaq 0x27600(%rip), %rdx # 0x4b5ce
leaq 0x27e55(%rip), %rcx # 0x4be2a
movl $0x1142, %esi # imm = 0x1142
xorl %eax, %eax
callq 0x1e770
| ggml_flash_attn_ext:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 40h
movss [rsp+68h+var_58], xmm2
movss [rsp+68h+var_60], xmm1
movss [rsp+68h+var_5C], xmm0
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov r13, rdi
mov rdi, rdx
call ggml_can_mul_mat
test al, al
jz loc_23F50
test rbx, rbx
jz short loc_23EA2
mov rdi, rbx
call _ggml_is_contiguous_0
test al, al
jz loc_23F6C
cmp qword ptr [rbx+20h], 1
jnz loc_23F88
cmp qword ptr [rbx+28h], 1
jnz loc_23FA4
mov rax, [r12+18h]
lea rcx, [rax+3Fh]
and rcx, 0FFFFFFFFFFFFFFC0h
cmp [rbx+18h], rcx
jge short loc_23EB9
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMaskNe1GgmlPad; "mask->ne[1] >= GGML_PAD(q->ne[1], GGML_"...
mov esi, 113Dh
jmp loc_23FDA
loc_23EA2:
xorps xmm0, xmm0
movss xmm1, [rsp+68h+var_60]
ucomiss xmm1, xmm0
ja loc_23FC0
mov rax, [r12+18h]
loc_23EB9:
mov rdx, [r14+10h]
lea rcx, [rsp+68h+var_48]
mov [rcx], rdx
mov rdx, [r12+20h]
mov [rcx+8], rdx
mov [rcx+10h], rax
mov rax, [r12+28h]
mov [rcx+18h], rax
push 4
pop rdx
mov rdi, r13
xor esi, esi
call _ggml_new_tensor
mov r13, rax
lea rsi, [rsp+68h+var_54]
movss xmm0, [rsp+68h+var_5C]
movss dword ptr [rsi], xmm0
movss xmm0, [rsp+68h+var_60]
movss dword ptr [rsi+4], xmm0
movss xmm0, [rsp+68h+var_58]
movss dword ptr [rsi+8], xmm0
push 0Ch
pop rdx
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r13+50h], 3Fh ; '?'
mov [r13+98h], r12
mov [r13+0A0h], r15
mov [r13+0A8h], r14
mov [r13+0B0h], rbx
mov rax, r13
add rsp, 40h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_23F50:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlCanMulMatK; "ggml_can_mul_mat(k, q)"
mov esi, 1135h
jmp short loc_23FDA
loc_23F6C:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_5; "ggml_is_contiguous(mask)"
mov esi, 1139h
jmp short loc_23FDA
loc_23F88:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMaskNe21; "mask->ne[2] == 1"
mov esi, 113Ah
jmp short loc_23FDA
loc_23FA4:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMaskNe31; "mask->ne[3] == 1"
mov esi, 113Bh
jmp short loc_23FDA
loc_23FC0:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMask; "mask"
mov esi, 1142h
loc_23FDA:
xor eax, eax
call _ggml_abort
| long long ggml_flash_attn_ext(
long long a1,
_QWORD *a2,
_QWORD *a3,
long long a4,
_QWORD *a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
long long v20; // rax
const char *v21; // rcx
int v22; // esi
long long v23; // r13
long long v24; // rcx
long long v25; // r8
long long v26; // r9
__m128 v27; // xmm4
__m128 v28; // xmm5
char v30; // [rsp+0h] [rbp-68h]
__int32 v31; // [rsp+Ch] [rbp-5Ch]
_DWORD v32[3]; // [rsp+14h] [rbp-54h] BYREF
_QWORD v33[9]; // [rsp+20h] [rbp-48h] BYREF
v31 = a6.m128_i32[0];
if ( !ggml_can_mul_mat(a3, a2) )
{
v21 = "ggml_can_mul_mat(k, q)";
v22 = 4405;
goto LABEL_16;
}
if ( !a5 )
{
a6 = 0LL;
a7 = (__m128)a7.m128_u32[0];
if ( a7.m128_f32[0] <= 0.0 )
{
v20 = a2[3];
goto LABEL_10;
}
v21 = "mask";
v22 = 4418;
LABEL_16:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
v22,
(long long)"GGML_ASSERT(%s) failed",
(long long)v21,
v16,
v17,
a6,
a7,
a8,
a9,
v18,
v19,
a12,
a13,
v30);
}
if ( !(unsigned __int8)ggml_is_contiguous_0(a5) )
{
v21 = "ggml_is_contiguous(mask)";
v22 = 4409;
goto LABEL_16;
}
if ( a5[4] != 1LL )
{
v21 = "mask->ne[2] == 1";
v22 = 4410;
goto LABEL_16;
}
if ( a5[5] != 1LL )
{
v21 = "mask->ne[3] == 1";
v22 = 4411;
goto LABEL_16;
}
v20 = a2[3];
if ( a5[3] < (signed long long)((v20 + 63) & 0xFFFFFFFFFFFFFFC0LL) )
{
v21 = "mask->ne[1] >= GGML_PAD(q->ne[1], GGML_KQ_MASK_PAD) && \"the Flash-Attention kernel requires the mask to be pa"
"dded to GGML_KQ_MASK_PAD and at least n_queries big\"";
v22 = 4413;
goto LABEL_16;
}
LABEL_10:
v33[0] = *(_QWORD *)(a4 + 16);
v33[1] = a2[4];
v33[2] = v20;
v33[3] = a2[5];
v23 = ggml_new_tensor(a1, 0LL, 4LL, (long long)v33);
v32[0] = v31;
v32[1] = a7.m128_i32[0];
v32[2] = a8.m128_i32[0];
ggml_set_op_params(v23, (long long)v32, 12LL, (__m128)a8.m128_u32[0], a7, a8, a9, v27, v28, a12, a13, v24, v25, v26);
*(_DWORD *)(v23 + 80) = 63;
*(_QWORD *)(v23 + 152) = a2;
*(_QWORD *)(v23 + 160) = a3;
*(_QWORD *)(v23 + 168) = a4;
*(_QWORD *)(v23 + 176) = a5;
return v23;
}
| ggml_flash_attn_ext:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x40
MOVSS dword ptr [RSP + 0x10],XMM2
MOVSS dword ptr [RSP + 0x8],XMM1
MOVSS dword ptr [RSP + 0xc],XMM0
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
MOV RDI,RDX
CALL 0x001212b0
TEST AL,AL
JZ 0x00123f50
TEST RBX,RBX
JZ 0x00123ea2
MOV RDI,RBX
CALL 0x0011e930
TEST AL,AL
JZ 0x00123f6c
CMP qword ptr [RBX + 0x20],0x1
JNZ 0x00123f88
CMP qword ptr [RBX + 0x28],0x1
JNZ 0x00123fa4
MOV RAX,qword ptr [R12 + 0x18]
LEA RCX,[RAX + 0x3f]
AND RCX,-0x40
CMP qword ptr [RBX + 0x18],RCX
JGE 0x00123eb9
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14bd88]
MOV ESI,0x113d
JMP 0x00123fda
LAB_00123ea2:
XORPS XMM0,XMM0
MOVSS XMM1,dword ptr [RSP + 0x8]
UCOMISS XMM1,XMM0
JA 0x00123fc0
MOV RAX,qword ptr [R12 + 0x18]
LAB_00123eb9:
MOV RDX,qword ptr [R14 + 0x10]
LEA RCX,[RSP + 0x20]
MOV qword ptr [RCX],RDX
MOV RDX,qword ptr [R12 + 0x20]
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RCX + 0x10],RAX
MOV RAX,qword ptr [R12 + 0x28]
MOV qword ptr [RCX + 0x18],RAX
PUSH 0x4
POP RDX
MOV RDI,R13
XOR ESI,ESI
CALL 0x0011c230
MOV R13,RAX
LEA RSI,[RSP + 0x14]
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSI],XMM0
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSI + 0x4],XMM0
MOVSS XMM0,dword ptr [RSP + 0x10]
MOVSS dword ptr [RSI + 0x8],XMM0
PUSH 0xc
POP RDX
MOV RDI,RAX
CALL 0x00120fbc
MOV dword ptr [R13 + 0x50],0x3f
MOV qword ptr [R13 + 0x98],R12
MOV qword ptr [R13 + 0xa0],R15
MOV qword ptr [R13 + 0xa8],R14
MOV qword ptr [R13 + 0xb0],RBX
MOV RAX,R13
ADD RSP,0x40
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00123f50:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14bd36]
MOV ESI,0x1135
JMP 0x00123fda
LAB_00123f6c:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14bd4d]
MOV ESI,0x1139
JMP 0x00123fda
LAB_00123f88:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14bd66]
MOV ESI,0x113a
JMP 0x00123fda
LAB_00123fa4:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14bd77]
MOV ESI,0x113b
JMP 0x00123fda
LAB_00123fc0:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14be2a]
MOV ESI,0x1142
LAB_00123fda:
XOR EAX,EAX
CALL 0x0011e770
|
long ggml_flash_attn_ext(int4 param_1,float param_2,int4 param_3,int8 param_4,
long param_5,int8 param_6,long param_7,long param_8)
{
char cVar1;
long lVar2;
char *pcVar3;
int8 uVar4;
int4 local_54;
float local_50;
int4 local_4c;
int8 local_48;
int8 local_40;
long local_38;
int8 local_30;
cVar1 = ggml_can_mul_mat(param_6);
if (cVar1 == '\0') {
pcVar3 = "ggml_can_mul_mat(k, q)";
uVar4 = 0x1135;
}
else if (param_8 == 0) {
if (param_2 <= 0.0) {
local_38 = *(long *)(param_5 + 0x18);
LAB_00123eb9:
local_48 = *(int8 *)(param_7 + 0x10);
local_40 = *(int8 *)(param_5 + 0x20);
local_30 = *(int8 *)(param_5 + 0x28);
lVar2 = ggml_new_tensor(param_4,0,4);
local_54 = param_1;
local_50 = param_2;
local_4c = param_3;
ggml_set_op_params(lVar2,&local_54,0xc);
*(int4 *)(lVar2 + 0x50) = 0x3f;
*(long *)(lVar2 + 0x98) = param_5;
*(int8 *)(lVar2 + 0xa0) = param_6;
*(long *)(lVar2 + 0xa8) = param_7;
*(long *)(lVar2 + 0xb0) = param_8;
return lVar2;
}
pcVar3 = "mask";
uVar4 = 0x1142;
}
else {
cVar1 = ggml_is_contiguous_0(param_8);
if (cVar1 == '\0') {
pcVar3 = "ggml_is_contiguous(mask)";
uVar4 = 0x1139;
}
else if (*(long *)(param_8 + 0x20) == 1) {
if (*(long *)(param_8 + 0x28) == 1) {
local_38 = *(long *)(param_5 + 0x18);
if ((long)(local_38 + 0x3fU & 0xffffffffffffffc0) <= *(long *)(param_8 + 0x18))
goto LAB_00123eb9;
pcVar3 =
"mask->ne[1] >= GGML_PAD(q->ne[1], GGML_KQ_MASK_PAD) && \"the Flash-Attention kernel requires the mask to be padded to GGML_KQ_MASK_PAD and at least n_queries big\""
;
uVar4 = 0x113d;
}
else {
pcVar3 = "mask->ne[3] == 1";
uVar4 = 0x113b;
}
}
else {
pcVar3 = "mask->ne[2] == 1";
uVar4 = 0x113a;
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",uVar4,
"GGML_ASSERT(%s) failed",pcVar3);
}
| |
39,330 | ggml_flash_attn_ext | ngxson[P]ggml-easy/ggml/src/ggml.c | struct ggml_tensor * ggml_flash_attn_ext(
struct ggml_context * ctx,
struct ggml_tensor * q,
struct ggml_tensor * k,
struct ggml_tensor * v,
struct ggml_tensor * mask,
float scale,
float max_bias,
float logit_softcap) {
GGML_ASSERT(ggml_can_mul_mat(k, q));
// TODO: check if vT can be multiplied by (k*qT)
if (mask) {
GGML_ASSERT(ggml_is_contiguous(mask));
GGML_ASSERT(mask->ne[2] == 1);
GGML_ASSERT(mask->ne[3] == 1);
GGML_ASSERT(mask->ne[1] >= GGML_PAD(q->ne[1], GGML_KQ_MASK_PAD) &&
"the Flash-Attention kernel requires the mask to be padded to GGML_KQ_MASK_PAD and at least n_queries big");
//GGML_ASSERT(ggml_can_repeat_rows(mask, qk));
}
if (max_bias > 0.0f) {
GGML_ASSERT(mask);
}
// permute(0, 2, 1, 3)
int64_t ne[4] = { v->ne[0], q->ne[2], q->ne[1], q->ne[3] };
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne);
float params[] = { scale, max_bias, logit_softcap };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_FLASH_ATTN_EXT;
result->src[0] = q;
result->src[1] = k;
result->src[2] = v;
result->src[3] = mask;
return result;
} | O3 | c | ggml_flash_attn_ext:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x10(%rdx), %rax
cmpq 0x10(%rsi), %rax
jne 0x1e2cb
movq %rdx, %r15
movq %rsi, %r12
movq 0x20(%rsi), %rbp
movq %rbp, %rax
cqto
idivq 0x20(%r15)
testq %rdx, %rdx
jne 0x1e2cb
movq 0x28(%r12), %r13
movq %r13, %rax
cqto
idivq 0x28(%r15)
testq %rdx, %rdx
jne 0x1e2cb
movq %r8, %rbx
movq %rcx, %r14
testq %r8, %r8
movss %xmm2, 0x14(%rsp)
movss %xmm1, 0x10(%rsp)
movss %xmm0, 0xc(%rsp)
je 0x1e238
movq %r14, 0x18(%rsp)
movq %rdi, %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x19721
testb %al, %al
je 0x1e306
cmpq $0x1, 0x20(%rbx)
jne 0x1e322
cmpq $0x1, 0x28(%rbx)
jne 0x1e33e
movq %r14, %rdi
movq 0x18(%r12), %rax
leaq 0x3f(%rax), %rcx
andq $-0x40, %rcx
cmpq %rcx, 0x18(%rbx)
movq 0x18(%rsp), %r14
jge 0x1e249
leaq 0x2c3f3(%rip), %rdi # 0x4a613
leaq 0x2c437(%rip), %rdx # 0x4a65e
leaq 0x2cbea(%rip), %rcx # 0x4ae18
movl $0x113d, %esi # imm = 0x113D
jmp 0x1e374
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
ja 0x1e35a
movq 0x18(%r12), %rax
movq 0x10(%r14), %rdx
leaq 0x20(%rsp), %rcx
movq %rdx, (%rcx)
movq %rbp, 0x8(%rcx)
movq %rax, 0x10(%rcx)
movq %r13, 0x18(%rcx)
xorl %esi, %esi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x19c13
testq %rax, %rax
je 0x1e2ea
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x54(%rax)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x58(%rax)
movss 0x14(%rsp), %xmm0
movss %xmm0, 0x5c(%rax)
movl $0x3f, 0x50(%rax)
movq %r12, 0x98(%rax)
movq %r15, 0xa0(%rax)
movq %r14, 0xa8(%rax)
movq %rbx, 0xb0(%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2c341(%rip), %rdi # 0x4a613
leaq 0x2c385(%rip), %rdx # 0x4a65e
leaq 0x2cae6(%rip), %rcx # 0x4adc6
movl $0x1135, %esi # imm = 0x1135
jmp 0x1e374
leaq 0x2e4eb(%rip), %rdi # 0x4c7dc
leaq 0x2c366(%rip), %rdx # 0x4a65e
leaq 0x2e52d(%rip), %rcx # 0x4c82c
movl $0x70, %esi
jmp 0x1e374
leaq 0x2c306(%rip), %rdi # 0x4a613
leaq 0x2c34a(%rip), %rdx # 0x4a65e
leaq 0x2cac2(%rip), %rcx # 0x4addd
movl $0x1139, %esi # imm = 0x1139
jmp 0x1e374
leaq 0x2c2ea(%rip), %rdi # 0x4a613
leaq 0x2c32e(%rip), %rdx # 0x4a65e
leaq 0x2cabf(%rip), %rcx # 0x4adf6
movl $0x113a, %esi # imm = 0x113A
jmp 0x1e374
leaq 0x2c2ce(%rip), %rdi # 0x4a613
leaq 0x2c312(%rip), %rdx # 0x4a65e
leaq 0x2cab4(%rip), %rcx # 0x4ae07
movl $0x113b, %esi # imm = 0x113B
jmp 0x1e374
leaq 0x2c2b2(%rip), %rdi # 0x4a613
leaq 0x2c2f6(%rip), %rdx # 0x4a65e
leaq 0x2cb4b(%rip), %rcx # 0x4aeba
movl $0x1142, %esi # imm = 0x1142
xorl %eax, %eax
callq 0x17c60
| ggml_flash_attn_ext:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rax, [rdx+10h]
cmp rax, [rsi+10h]
jnz loc_1E2CB
mov r15, rdx
mov r12, rsi
mov rbp, [rsi+20h]
mov rax, rbp
cqo
idiv qword ptr [r15+20h]
test rdx, rdx
jnz loc_1E2CB
mov r13, [r12+28h]
mov rax, r13
cqo
idiv qword ptr [r15+28h]
test rdx, rdx
jnz loc_1E2CB
mov rbx, r8
mov r14, rcx
test r8, r8
movss [rsp+78h+var_64], xmm2
movss [rsp+78h+var_68], xmm1
movss [rsp+78h+var_6C], xmm0
jz short loc_1E238
mov [rsp+78h+var_60], r14
mov r14, rdi
mov rdi, rbx
xor esi, esi
call ggml_is_contiguous_n
test al, al
jz loc_1E306
cmp qword ptr [rbx+20h], 1
jnz loc_1E322
cmp qword ptr [rbx+28h], 1
jnz loc_1E33E
mov rdi, r14
mov rax, [r12+18h]
lea rcx, [rax+3Fh]
and rcx, 0FFFFFFFFFFFFFFC0h
cmp [rbx+18h], rcx
mov r14, [rsp+78h+var_60]
jge short loc_1E249
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMaskNe1GgmlPad; "mask->ne[1] >= GGML_PAD(q->ne[1], GGML_"...
mov esi, 113Dh
jmp loc_1E374
loc_1E238:
xorps xmm0, xmm0
ucomiss xmm1, xmm0
ja loc_1E35A
mov rax, [r12+18h]
loc_1E249:
mov rdx, [r14+10h]
lea rcx, [rsp+78h+var_58]
mov [rcx], rdx
mov [rcx+8], rbp
mov [rcx+10h], rax
mov [rcx+18h], r13
xor esi, esi
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
test rax, rax
jz short loc_1E2EA
movss xmm0, [rsp+78h+var_6C]
movss dword ptr [rax+54h], xmm0
movss xmm0, [rsp+78h+var_68]
movss dword ptr [rax+58h], xmm0
movss xmm0, [rsp+78h+var_64]
movss dword ptr [rax+5Ch], xmm0
mov dword ptr [rax+50h], 3Fh ; '?'
mov [rax+98h], r12
mov [rax+0A0h], r15
mov [rax+0A8h], r14
mov [rax+0B0h], rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1E2CB:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlCanMulMatK; "ggml_can_mul_mat(k, q)"
mov esi, 1135h
jmp loc_1E374
loc_1E2EA:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNull; "tensor != NULL"
mov esi, 70h ; 'p'
jmp short loc_1E374
loc_1E306:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_5; "ggml_is_contiguous(mask)"
mov esi, 1139h
jmp short loc_1E374
loc_1E322:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMaskNe21; "mask->ne[2] == 1"
mov esi, 113Ah
jmp short loc_1E374
loc_1E33E:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMaskNe31; "mask->ne[3] == 1"
mov esi, 113Bh
jmp short loc_1E374
loc_1E35A:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMask; "mask"
mov esi, 1142h
loc_1E374:
xor eax, eax
call _ggml_abort
| long long ggml_flash_attn_ext(
long long a1,
_QWORD *a2,
_QWORD *a3,
long long a4,
long long a5,
int a6,
float a7,
float a8,
float a9)
{
long long v10; // rbp
long long v11; // r13
long long v13; // r14
long long v14; // rax
const char *v15; // rdi
const char *v16; // rcx
int v17; // esi
long long result; // rax
_QWORD v20[11]; // [rsp+20h] [rbp-58h] BYREF
if ( a3[2] != a2[2] || (v10 = a2[4], v10 % a3[4]) || (v11 = a2[5], v11 % a3[5]) )
{
v15 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c";
v16 = "ggml_can_mul_mat(k, q)";
v17 = 4405;
goto LABEL_20;
}
v13 = a4;
if ( !a5 )
{
if ( a8 <= 0.0 )
{
v14 = a2[3];
goto LABEL_12;
}
v15 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c";
v16 = "mask";
v17 = 4418;
LABEL_20:
ggml_abort((_DWORD)v15, v17, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v16, a5, a6);
}
if ( !ggml_is_contiguous_n((unsigned int *)a5, 0) )
{
v15 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c";
v16 = "ggml_is_contiguous(mask)";
v17 = 4409;
goto LABEL_20;
}
if ( *(_QWORD *)(a5 + 32) != 1LL )
{
v15 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c";
v16 = "mask->ne[2] == 1";
v17 = 4410;
goto LABEL_20;
}
if ( *(_QWORD *)(a5 + 40) != 1LL )
{
v15 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c";
v16 = "mask->ne[3] == 1";
v17 = 4411;
goto LABEL_20;
}
v14 = a2[3];
v13 = a4;
if ( *(_QWORD *)(a5 + 24) < (signed long long)((v14 + 63) & 0xFFFFFFFFFFFFFFC0LL) )
{
v15 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c";
v16 = "mask->ne[1] >= GGML_PAD(q->ne[1], GGML_KQ_MASK_PAD) && \"the Flash-Attention kernel requires the mask to be pa"
"dded to GGML_KQ_MASK_PAD and at least n_queries big\"";
v17 = 4413;
goto LABEL_20;
}
LABEL_12:
v20[0] = *(_QWORD *)(v13 + 16);
v20[1] = v10;
v20[2] = v14;
v20[3] = v11;
result = ggml_new_tensor_impl(a1, 0, 4u, v20, 0LL, 0LL);
if ( !result )
{
v15 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-impl.h";
v16 = "tensor != NULL";
v17 = 112;
goto LABEL_20;
}
*(float *)(result + 84) = a7;
*(float *)(result + 88) = a8;
*(float *)(result + 92) = a9;
*(_DWORD *)(result + 80) = 63;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
*(_QWORD *)(result + 168) = v13;
*(_QWORD *)(result + 176) = a5;
return result;
}
| ggml_flash_attn_ext:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr [RDX + 0x10]
CMP RAX,qword ptr [RSI + 0x10]
JNZ 0x0011e2cb
MOV R15,RDX
MOV R12,RSI
MOV RBP,qword ptr [RSI + 0x20]
MOV RAX,RBP
CQO
IDIV qword ptr [R15 + 0x20]
TEST RDX,RDX
JNZ 0x0011e2cb
MOV R13,qword ptr [R12 + 0x28]
MOV RAX,R13
CQO
IDIV qword ptr [R15 + 0x28]
TEST RDX,RDX
JNZ 0x0011e2cb
MOV RBX,R8
MOV R14,RCX
TEST R8,R8
MOVSS dword ptr [RSP + 0x14],XMM2
MOVSS dword ptr [RSP + 0x10],XMM1
MOVSS dword ptr [RSP + 0xc],XMM0
JZ 0x0011e238
MOV qword ptr [RSP + 0x18],R14
MOV R14,RDI
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00119721
TEST AL,AL
JZ 0x0011e306
CMP qword ptr [RBX + 0x20],0x1
JNZ 0x0011e322
CMP qword ptr [RBX + 0x28],0x1
JNZ 0x0011e33e
MOV RDI,R14
MOV RAX,qword ptr [R12 + 0x18]
LEA RCX,[RAX + 0x3f]
AND RCX,-0x40
CMP qword ptr [RBX + 0x18],RCX
MOV R14,qword ptr [RSP + 0x18]
JGE 0x0011e249
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14ae18]
MOV ESI,0x113d
JMP 0x0011e374
LAB_0011e238:
XORPS XMM0,XMM0
UCOMISS XMM1,XMM0
JA 0x0011e35a
MOV RAX,qword ptr [R12 + 0x18]
LAB_0011e249:
MOV RDX,qword ptr [R14 + 0x10]
LEA RCX,[RSP + 0x20]
MOV qword ptr [RCX],RDX
MOV qword ptr [RCX + 0x8],RBP
MOV qword ptr [RCX + 0x10],RAX
MOV qword ptr [RCX + 0x18],R13
XOR ESI,ESI
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00119c13
TEST RAX,RAX
JZ 0x0011e2ea
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RAX + 0x54],XMM0
MOVSS XMM0,dword ptr [RSP + 0x10]
MOVSS dword ptr [RAX + 0x58],XMM0
MOVSS XMM0,dword ptr [RSP + 0x14]
MOVSS dword ptr [RAX + 0x5c],XMM0
MOV dword ptr [RAX + 0x50],0x3f
MOV qword ptr [RAX + 0x98],R12
MOV qword ptr [RAX + 0xa0],R15
MOV qword ptr [RAX + 0xa8],R14
MOV qword ptr [RAX + 0xb0],RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011e2cb:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14adc6]
MOV ESI,0x1135
JMP 0x0011e374
LAB_0011e2ea:
LEA RDI,[0x14c7dc]
LEA RDX,[0x14a65e]
LEA RCX,[0x14c82c]
MOV ESI,0x70
JMP 0x0011e374
LAB_0011e306:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14addd]
MOV ESI,0x1139
JMP 0x0011e374
LAB_0011e322:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14adf6]
MOV ESI,0x113a
JMP 0x0011e374
LAB_0011e33e:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14ae07]
MOV ESI,0x113b
JMP 0x0011e374
LAB_0011e35a:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14aeba]
MOV ESI,0x1142
LAB_0011e374:
XOR EAX,EAX
CALL 0x00117c60
|
void ggml_flash_attn_ext(int4 param_1,float param_2,int4 param_3,int8 param_4,
long param_5,long param_6,long param_7,long param_8)
{
long lVar1;
char cVar2;
long lVar3;
long lVar4;
char *pcVar5;
int8 uVar6;
char *pcVar7;
int8 local_58;
long local_50;
long local_48;
long local_40;
if ((*(long *)(param_6 + 0x10) == *(long *)(param_5 + 0x10)) &&
(lVar4 = *(long *)(param_5 + 0x20), lVar4 % *(long *)(param_6 + 0x20) == 0)) {
lVar1 = *(long *)(param_5 + 0x28);
if (lVar1 % *(long *)(param_6 + 0x28) == 0) {
if (param_8 == 0) {
if (0.0 < param_2) {
pcVar7 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c";
pcVar5 = "mask";
uVar6 = 0x1142;
goto LAB_0011e374;
}
lVar3 = *(long *)(param_5 + 0x18);
}
else {
cVar2 = ggml_is_contiguous_n(param_8,0);
if (cVar2 == '\0') {
pcVar7 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c";
pcVar5 = "ggml_is_contiguous(mask)";
uVar6 = 0x1139;
goto LAB_0011e374;
}
if (*(long *)(param_8 + 0x20) != 1) {
pcVar7 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c";
pcVar5 = "mask->ne[2] == 1";
uVar6 = 0x113a;
goto LAB_0011e374;
}
if (*(long *)(param_8 + 0x28) != 1) {
pcVar7 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c";
pcVar5 = "mask->ne[3] == 1";
uVar6 = 0x113b;
goto LAB_0011e374;
}
lVar3 = *(long *)(param_5 + 0x18);
if (*(long *)(param_8 + 0x18) < (long)(lVar3 + 0x3fU & 0xffffffffffffffc0)) {
pcVar7 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c";
pcVar5 =
"mask->ne[1] >= GGML_PAD(q->ne[1], GGML_KQ_MASK_PAD) && \"the Flash-Attention kernel requires the mask to be padded to GGML_KQ_MASK_PAD and at least n_queries big\""
;
uVar6 = 0x113d;
goto LAB_0011e374;
}
}
local_58 = *(int8 *)(param_7 + 0x10);
local_50 = lVar4;
local_48 = lVar3;
local_40 = lVar1;
lVar4 = ggml_new_tensor_impl(param_4,0,4,&local_58,0,0);
if (lVar4 != 0) {
*(int4 *)(lVar4 + 0x54) = param_1;
*(float *)(lVar4 + 0x58) = param_2;
*(int4 *)(lVar4 + 0x5c) = param_3;
*(int4 *)(lVar4 + 0x50) = 0x3f;
*(long *)(lVar4 + 0x98) = param_5;
*(long *)(lVar4 + 0xa0) = param_6;
*(long *)(lVar4 + 0xa8) = param_7;
*(long *)(lVar4 + 0xb0) = param_8;
return;
}
pcVar7 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-impl.h";
pcVar5 = "tensor != NULL";
uVar6 = 0x70;
goto LAB_0011e374;
}
}
pcVar7 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c";
pcVar5 = "ggml_can_mul_mat(k, q)";
uVar6 = 0x1135;
LAB_0011e374:
/* WARNING: Subroutine does not return */
ggml_abort(pcVar7,uVar6,"GGML_ASSERT(%s) failed",pcVar5);
}
| |
39,331 | my_wc_mb_latin1 | eloqsql/strings/ctype-latin1.c | static
int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc,
uchar *str,
uchar *end __attribute__((unused)))
{
const uchar *pl;
if (str >= end)
return MY_CS_TOOSMALL;
if (wc > 0xFFFF)
return MY_CS_ILUNI;
pl= uni_to_cs[wc >> 8];
str[0]= pl ? pl[wc & 0xFF] : '\0';
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
} | O0 | c | my_wc_mb_latin1:
pushq %rbp
movq %rsp, %rbp
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 0x28dfa
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x28e81
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jbe 0x28e0d
movl $0x0, -0x4(%rbp)
jmp 0x28e81
movq -0x18(%rbp), %rcx
shrq $0x8, %rcx
leaq 0x19cc24(%rip), %rax # 0x1c5a40
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x28e43
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
andq $0xff, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
jmp 0x28e4a
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x28e4a
movl -0x34(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x35(%rbp)
jne 0x28e6e
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_wc_mb_latin1:
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
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_28DFA
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_28E81
loc_28DFA:
cmp [rbp+var_18], 0FFFFh
jbe short loc_28E0D
mov [rbp+var_4], 0
jmp short loc_28E81
loc_28E0D:
mov rcx, [rbp+var_18]
shr rcx, 8
lea rax, uni_to_cs
mov rax, [rax+rcx*8]
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jz short loc_28E43
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
and rcx, 0FFh
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_34], eax
jmp short loc_28E4A
loc_28E43:
xor eax, eax
mov [rbp+var_34], eax
jmp short $+2
loc_28E4A:
mov eax, [rbp+var_34]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov rcx, [rbp+var_20]
xor eax, eax
cmp byte ptr [rcx], 0
mov [rbp+var_35], al
jnz short loc_28E6E
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_35], al
loc_28E6E:
mov dl, [rbp+var_35]
mov eax, 1
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_4], eax
loc_28E81:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_latin1(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
bool v5; // [rsp+1h] [rbp-35h]
char v6; // [rsp+2h] [rbp-34h]
long long v7; // [rsp+6h] [rbp-30h]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 <= 0xFFFF )
{
v7 = (long long)*(&uni_to_cs + (a2 >> 8));
if ( v7 )
v6 = *(_BYTE *)(v7 + (unsigned __int8)a2);
else
v6 = 0;
*a3 = v6;
v5 = 0;
if ( !*a3 )
v5 = a2 != 0;
return !v5;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_latin1:
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
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00128dfa
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00128e81
LAB_00128dfa:
CMP qword ptr [RBP + -0x18],0xffff
JBE 0x00128e0d
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00128e81
LAB_00128e0d:
MOV RCX,qword ptr [RBP + -0x18]
SHR RCX,0x8
LEA RAX,[0x2c5a40]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00128e43
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
AND RCX,0xff
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x00128e4a
LAB_00128e43:
XOR EAX,EAX
MOV dword ptr [RBP + -0x34],EAX
JMP 0x00128e4a
LAB_00128e4a:
MOV EAX,dword ptr [RBP + -0x34]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
CMP byte ptr [RCX],0x0
MOV byte ptr [RBP + -0x35],AL
JNZ 0x00128e6e
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x35],AL
LAB_00128e6e:
MOV DL,byte ptr [RBP + -0x35]
MOV EAX,0x1
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_00128e81:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint my_wc_mb_latin1(int8 param_1,ulong param_2,char *param_3,char *param_4)
{
char cVar1;
uint local_c;
if (param_3 < param_4) {
if (param_2 < 0x10000) {
if (*(long *)(uni_to_cs + (param_2 >> 8) * 8) == 0) {
cVar1 = '\0';
}
else {
cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8) * 8) + (param_2 & 0xff));
}
*param_3 = cVar1;
local_c = (uint)(*param_3 != '\0' || param_2 == 0);
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
39,332 | LefDefParser::lefwLayerDCWidth(int, double*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwLayerDCWidth(int numWidths,
double *widths)
{
int i;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_LAYERDCCURRENT)
return LEFW_BAD_ORDER;
// width is allowed in Layer routing only
if (lefwOldState != LEFW_LAYER_START && lefwOldState != LEFW_LAYER &&
lefwOldState != LEFW_LAYERROUTING_START &&
lefwOldState != LEFW_LAYERROUTING)
return LEFW_BAD_DATA;
if (numWidths <= 0)
return LEFW_BAD_DATA; // width is required
if (lefwWriteEncrypt) {
encPrint(lefwFile, (char*) " WIDTH ");
for (i = 0; i < numWidths; i++) {
encPrint(lefwFile, (char*) "%.11g ", *widths++);
}
encPrint(lefwFile, (char*) ";\n");
} else {
fprintf(lefwFile, " WIDTH ");
for (i = 0; i < numWidths; i++) {
fprintf(lefwFile, "%.11g ", *widths++);
}
fprintf(lefwFile, ";\n");
}
lefwTableLen = numWidths;
lefwLines++;
return LEFW_OK;
} | O0 | cpp | LefDefParser::lefwLayerDCWidth(int, double*):
subq $0x18, %rsp
movl %edi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
leaq 0x1eb0c(%rip), %rax # 0x32e00
cmpq $0x0, (%rax)
jne 0x14307
movl $0x1, 0x14(%rsp)
jmp 0x1449e
leaq 0x1ed42(%rip), %rax # 0x33050
cmpl $0x1e, (%rax)
je 0x14320
movl $0x2, 0x14(%rsp)
jmp 0x1449e
leaq 0x1edb5(%rip), %rax # 0x330dc
cmpl $0x6, (%rax)
je 0x1435d
leaq 0x1eda9(%rip), %rax # 0x330dc
cmpl $0x1c, (%rax)
je 0x1435d
leaq 0x1ed9d(%rip), %rax # 0x330dc
cmpl $0x7, (%rax)
je 0x1435d
leaq 0x1ed91(%rip), %rax # 0x330dc
cmpl $0x1f, (%rax)
je 0x1435d
movl $0x3, 0x14(%rsp)
jmp 0x1449e
cmpl $0x0, 0x10(%rsp)
jg 0x14371
movl $0x3, 0x14(%rsp)
jmp 0x1449e
cmpl $0x0, 0x1ed74(%rip) # 0x330ec
je 0x143f8
leaq 0x1ea7f(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x166a1(%rip), %rsi # 0x2aa2c
movb $0x0, %al
callq 0x289b0
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0x10(%rsp), %eax
jge 0x143de
leaq 0x1ea55(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x8(%rsp)
movsd (%rax), %xmm0
leaq 0x164d0(%rip), %rsi # 0x2a89a
movb $0x1, %al
callq 0x289b0
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x1439a
leaq 0x1ea1b(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x15b65(%rip), %rsi # 0x29f54
movb $0x0, %al
callq 0x289b0
jmp 0x14474
leaq 0x1ea01(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x16623(%rip), %rsi # 0x2aa2c
movb $0x0, %al
callq 0x1100
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0x10(%rsp), %eax
jge 0x1445c
leaq 0x1e9d7(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x8(%rsp)
movsd (%rax), %xmm0
leaq 0x16452(%rip), %rsi # 0x2a89a
movb $0x1, %al
callq 0x1100
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x14418
leaq 0x1e99d(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x15ae7(%rip), %rsi # 0x29f54
movb $0x0, %al
callq 0x1100
movl 0x10(%rsp), %ecx
leaq 0x1ec61(%rip), %rax # 0x330e0
movl %ecx, (%rax)
leaq 0x1ebc4(%rip), %rax # 0x3304c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1ebb8(%rip), %rax # 0x3304c
movl %ecx, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| _ZN12LefDefParser16lefwLayerDCWidthEiPd:
sub rsp, 18h
mov [rsp+18h+var_8], edi
mov [rsp+18h+var_10], rsi
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_14307
mov [rsp+18h+var_4], 1
jmp loc_1449E
loc_14307:
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 1Eh
jz short loc_14320
mov [rsp+18h+var_4], 2
jmp loc_1449E
loc_14320:
lea rax, _ZN12LefDefParser12lefwOldStateE; LefDefParser::lefwOldState
cmp dword ptr [rax], 6
jz short loc_1435D
lea rax, _ZN12LefDefParser12lefwOldStateE; LefDefParser::lefwOldState
cmp dword ptr [rax], 1Ch
jz short loc_1435D
lea rax, _ZN12LefDefParser12lefwOldStateE; LefDefParser::lefwOldState
cmp dword ptr [rax], 7
jz short loc_1435D
lea rax, _ZN12LefDefParser12lefwOldStateE; LefDefParser::lefwOldState
cmp dword ptr [rax], 1Fh
jz short loc_1435D
mov [rsp+18h+var_4], 3
jmp loc_1449E
loc_1435D:
cmp [rsp+18h+var_8], 0
jg short loc_14371
mov [rsp+18h+var_4], 3
jmp loc_1449E
loc_14371:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz short loc_143F8
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, aWidth; " WIDTH "
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
mov [rsp+18h+var_14], 0
loc_1439A:
mov eax, [rsp+18h+var_14]
cmp eax, [rsp+18h+var_8]
jge short loc_143DE
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rax, [rsp+18h+var_10]
mov rcx, rax
add rcx, 8
mov [rsp+18h+var_10], rcx
movsd xmm0, qword ptr [rax]
lea rsi, aMinenclosedare+13h; "%.11g "
mov al, 1
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
mov eax, [rsp+18h+var_14]
add eax, 1
mov [rsp+18h+var_14], eax
jmp short loc_1439A
loc_143DE:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, aDividercharS+11h; ";\n"
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_14474
loc_143F8:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, aWidth; " WIDTH "
mov al, 0
call _fprintf
mov [rsp+18h+var_14], 0
loc_14418:
mov eax, [rsp+18h+var_14]
cmp eax, [rsp+18h+var_8]
jge short loc_1445C
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rax, [rsp+18h+var_10]
mov rcx, rax
add rcx, 8
mov [rsp+18h+var_10], rcx
movsd xmm0, qword ptr [rax]
lea rsi, aMinenclosedare+13h; "%.11g "
mov al, 1
call _fprintf
mov eax, [rsp+18h+var_14]
add eax, 1
mov [rsp+18h+var_14], eax
jmp short loc_14418
loc_1445C:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, aDividercharS+11h; ";\n"
mov al, 0
call _fprintf
loc_14474:
mov ecx, [rsp+18h+var_8]
lea rax, _ZN12LefDefParser12lefwTableLenE; LefDefParser::lefwTableLen
mov [rax], ecx
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
mov [rsp+18h+var_4], 0
loc_1449E:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| long long LefDefParser::lefwLayerDCWidth(LefDefParser *this, double *a2, double *a3, int a4, int a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
double *v10; // rax
int i; // [rsp+4h] [rbp-14h]
int j; // [rsp+4h] [rbp-14h]
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwState == 30 )
{
if ( LefDefParser::lefwOldState == 6
|| LefDefParser::lefwOldState == 28
|| LefDefParser::lefwOldState == 7
|| LefDefParser::lefwOldState == 31 )
{
if ( (int)this > 0 )
{
if ( LefDefParser::lefwWriteEncrypt )
{
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" WIDTH ", (_DWORD)a3, a4, a5, a6);
for ( i = 0; i < (int)this; ++i )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"%.11g ", v6, (_DWORD)++a2, v8, v9);
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n", v6, v7, v8, v9);
}
else
{
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " WIDTH ");
for ( j = 0; j < (int)this; ++j )
{
v10 = a2++;
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "%.11g ", *v10);
}
fprintf(*(_QWORD *)&LefDefParser::lefwFile, ";\n");
}
LefDefParser::lefwTableLen = (int)this;
++LefDefParser::lefwLines;
return 0;
}
else
{
return 3;
}
}
else
{
return 3;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| lefwLayerDCWidth:
SUB RSP,0x18
MOV dword ptr [RSP + 0x10],EDI
MOV qword ptr [RSP + 0x8],RSI
LEA RAX,[0x132e00]
CMP qword ptr [RAX],0x0
JNZ 0x00114307
MOV dword ptr [RSP + 0x14],0x1
JMP 0x0011449e
LAB_00114307:
LEA RAX,[0x133050]
CMP dword ptr [RAX],0x1e
JZ 0x00114320
MOV dword ptr [RSP + 0x14],0x2
JMP 0x0011449e
LAB_00114320:
LEA RAX,[0x1330dc]
CMP dword ptr [RAX],0x6
JZ 0x0011435d
LEA RAX,[0x1330dc]
CMP dword ptr [RAX],0x1c
JZ 0x0011435d
LEA RAX,[0x1330dc]
CMP dword ptr [RAX],0x7
JZ 0x0011435d
LEA RAX,[0x1330dc]
CMP dword ptr [RAX],0x1f
JZ 0x0011435d
MOV dword ptr [RSP + 0x14],0x3
JMP 0x0011449e
LAB_0011435d:
CMP dword ptr [RSP + 0x10],0x0
JG 0x00114371
MOV dword ptr [RSP + 0x14],0x3
JMP 0x0011449e
LAB_00114371:
CMP dword ptr [0x001330ec],0x0
JZ 0x001143f8
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x12aa2c]
MOV AL,0x0
CALL 0x001289b0
MOV dword ptr [RSP + 0x4],0x0
LAB_0011439a:
MOV EAX,dword ptr [RSP + 0x4]
CMP EAX,dword ptr [RSP + 0x10]
JGE 0x001143de
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,RAX
ADD RCX,0x8
MOV qword ptr [RSP + 0x8],RCX
MOVSD XMM0,qword ptr [RAX]
LEA RSI,[0x12a89a]
MOV AL,0x1
CALL 0x001289b0
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x0011439a
LAB_001143de:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x129f54]
MOV AL,0x0
CALL 0x001289b0
JMP 0x00114474
LAB_001143f8:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x12aa2c]
MOV AL,0x0
CALL 0x00101100
MOV dword ptr [RSP + 0x4],0x0
LAB_00114418:
MOV EAX,dword ptr [RSP + 0x4]
CMP EAX,dword ptr [RSP + 0x10]
JGE 0x0011445c
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,RAX
ADD RCX,0x8
MOV qword ptr [RSP + 0x8],RCX
MOVSD XMM0,qword ptr [RAX]
LEA RSI,[0x12a89a]
MOV AL,0x1
CALL 0x00101100
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00114418
LAB_0011445c:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x129f54]
MOV AL,0x0
CALL 0x00101100
LAB_00114474:
MOV ECX,dword ptr [RSP + 0x10]
LEA RAX,[0x1330e0]
MOV dword ptr [RAX],ECX
LEA RAX,[0x13304c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x13304c]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0x14],0x0
LAB_0011449e:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::lefwLayerDCWidth(int, double*) */
int4 LefDefParser::lefwLayerDCWidth(int param_1,double *param_2)
{
int local_14;
double *local_10;
int4 local_4;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if (lefwState == 0x1e) {
if ((((lefwOldState == 6) || (lefwOldState == 0x1c)) || (lefwOldState == 7)) ||
(lefwOldState == 0x1f)) {
if (param_1 < 1) {
local_4 = 3;
}
else {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile," WIDTH ");
local_10 = param_2;
for (local_14 = 0; local_14 < param_1; local_14 = local_14 + 1) {
fprintf(lefwFile,"%.11g ",*local_10);
local_10 = local_10 + 1;
}
fprintf(lefwFile,";\n");
}
else {
encPrint(lefwFile," WIDTH ");
local_10 = param_2;
for (local_14 = 0; local_14 < param_1; local_14 = local_14 + 1) {
encPrint(lefwFile,"%.11g ",*local_10);
local_10 = local_10 + 1;
}
encPrint(lefwFile,";\n");
}
lefwLines = lefwLines + 1;
local_4 = 0;
lefwTableLen = param_1;
}
}
else {
local_4 = 3;
}
}
else {
local_4 = 2;
}
return local_4;
}
| |
39,333 | LefDefParser::lefwLayerDCWidth(int, double*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwLayerDCWidth(int numWidths,
double *widths)
{
int i;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_LAYERDCCURRENT)
return LEFW_BAD_ORDER;
// width is allowed in Layer routing only
if (lefwOldState != LEFW_LAYER_START && lefwOldState != LEFW_LAYER &&
lefwOldState != LEFW_LAYERROUTING_START &&
lefwOldState != LEFW_LAYERROUTING)
return LEFW_BAD_DATA;
if (numWidths <= 0)
return LEFW_BAD_DATA; // width is required
if (lefwWriteEncrypt) {
encPrint(lefwFile, (char*) " WIDTH ");
for (i = 0; i < numWidths; i++) {
encPrint(lefwFile, (char*) "%.11g ", *widths++);
}
encPrint(lefwFile, (char*) ";\n");
} else {
fprintf(lefwFile, " WIDTH ");
for (i = 0; i < numWidths; i++) {
fprintf(lefwFile, "%.11g ", *widths++);
}
fprintf(lefwFile, ";\n");
}
lefwTableLen = numWidths;
lefwLines++;
return LEFW_OK;
} | O3 | cpp | LefDefParser::lefwLayerDCWidth(int, double*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x18d56(%rip), %r12 # 0x24e00
movq (%r12), %rcx
testq %rcx, %rcx
je 0xc154
leaq 0x18f92(%rip), %rdx # 0x25050
movl $0x2, %eax
cmpl $0x1e, (%rdx)
jne 0xc1c7
leaq 0x19009(%rip), %rax # 0x250dc
movl (%rax), %edx
movl $0x3, %eax
cmpl $0x1f, %edx
ja 0xc1c7
movq %rsi, %r14
movl $0x900000c0, %esi # imm = 0x900000C0
btl %edx, %esi
jae 0xc1c7
movl %edi, %ebx
testl %edi, %edi
jle 0xc1c7
cmpb $0x1, 0x18fe7(%rip) # 0x250ec
jne 0xc15b
leaq 0xebda(%rip), %rsi # 0x1ace8
xorl %r13d, %r13d
movq %rcx, %rdi
xorl %eax, %eax
callq 0x18c35
movl %ebx, %ebp
leaq 0xea32(%rip), %r15 # 0x1ab56
movq (%r12), %rdi
movsd (%r14,%r13,8), %xmm0
movq %r15, %rsi
movb $0x1, %al
callq 0x18c35
incq %r13
cmpl %r13d, %ebp
jne 0xc124
movq (%r12), %rdi
leaq 0xe0c5(%rip), %rsi # 0x1a210
xorl %eax, %eax
callq 0x18c35
jmp 0xc1b3
movl $0x1, %eax
jmp 0xc1c7
leaq 0xeb86(%rip), %rdi # 0x1ace8
movl $0xc, %esi
movl $0x1, %edx
callq 0x1110
movl %ebx, %r13d
xorl %ebp, %ebp
leaq 0xe9d9(%rip), %r15 # 0x1ab56
movq (%r12), %rdi
movsd (%r14,%rbp,8), %xmm0
movq %r15, %rsi
movb $0x1, %al
callq 0x10f0
incq %rbp
cmpl %ebp, %r13d
jne 0xc17d
movq (%r12), %rcx
leaq 0xe06c(%rip), %rdi # 0x1a210
movl $0x2, %esi
movl $0x1, %edx
callq 0x1110
leaq 0x18f26(%rip), %rax # 0x250e0
movl %ebx, (%rax)
leaq 0x18e89(%rip), %rax # 0x2504c
incl (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12LefDefParser16lefwLayerDCWidthEiPd:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
lea r12, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rcx, [r12]
test rcx, rcx
jz loc_C154
lea rdx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov eax, 2
cmp dword ptr [rdx], 1Eh
jnz loc_C1C7
lea rax, _ZN12LefDefParser12lefwOldStateE; LefDefParser::lefwOldState
mov edx, [rax]
mov eax, 3
cmp edx, 1Fh
ja loc_C1C7
mov r14, rsi
mov esi, 900000C0h
bt esi, edx
jnb loc_C1C7
mov ebx, edi
test edi, edi
jle loc_C1C7
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_C15B
lea rsi, aWidth; " WIDTH "
xor r13d, r13d
mov rdi, rcx
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
mov ebp, ebx
lea r15, aMinenclosedare+13h; "%.11g "
loc_C124:
mov rdi, [r12]
movsd xmm0, qword ptr [r14+r13*8]
mov rsi, r15
mov al, 1
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
inc r13
cmp ebp, r13d
jnz short loc_C124
mov rdi, [r12]
lea rsi, aDividercharS+11h; ";\n"
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_C1B3
loc_C154:
mov eax, 1
jmp short loc_C1C7
loc_C15B:
lea rdi, aWidth; " WIDTH "
mov esi, 0Ch
mov edx, 1
call _fwrite
mov r13d, ebx
xor ebp, ebp
lea r15, aMinenclosedare+13h; "%.11g "
loc_C17D:
mov rdi, [r12]
movsd xmm0, qword ptr [r14+rbp*8]
mov rsi, r15
mov al, 1
call _fprintf
inc rbp
cmp r13d, ebp
jnz short loc_C17D
mov rcx, [r12]
lea rdi, aDividercharS+11h; ";\n"
mov esi, 2
mov edx, 1
call _fwrite
loc_C1B3:
lea rax, _ZN12LefDefParser12lefwTableLenE; LefDefParser::lefwTableLen
mov [rax], ebx
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
inc dword ptr [rax]
xor eax, eax
loc_C1C7:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::lefwLayerDCWidth(
LefDefParser *this,
long long a2,
double *a3,
long long a4,
int a5,
int a6)
{
long long result; // rax
int v8; // esi
long long v9; // r13
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v14; // rbp
if ( !*(_QWORD *)&LefDefParser::lefwFile )
return 1LL;
result = 2LL;
if ( LefDefParser::lefwState == 30 )
{
result = 3LL;
if ( LefDefParser::lefwOldState <= 0x1F )
{
v8 = -1879048000;
if ( _bittest(&v8, LefDefParser::lefwOldState) )
{
if ( (int)this > 0 )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
{
v9 = 0LL;
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" WIDTH ",
LefDefParser::lefwOldState,
LefDefParser::lefwFile,
a5,
a6);
do
{
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"%.11g ", v10, v11, v12, v13);
++v9;
}
while ( (_DWORD)this != (_DWORD)v9 );
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n", v10, v11, v12, v13);
}
else
{
fwrite(" WIDTH ", 12LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile);
v14 = 0LL;
do
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "%.11g ", *(double *)(a2 + 8 * v14++));
while ( (_DWORD)this != (_DWORD)v14 );
fwrite(";\n", 2LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile);
}
LefDefParser::lefwTableLen = (_DWORD)this;
++LefDefParser::lefwLines;
return 0LL;
}
}
}
}
return result;
}
| lefwLayerDCWidth:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
LEA R12,[0x124e00]
MOV RCX,qword ptr [R12]
TEST RCX,RCX
JZ 0x0010c154
LEA RDX,[0x125050]
MOV EAX,0x2
CMP dword ptr [RDX],0x1e
JNZ 0x0010c1c7
LEA RAX,[0x1250dc]
MOV EDX,dword ptr [RAX]
MOV EAX,0x3
CMP EDX,0x1f
JA 0x0010c1c7
MOV R14,RSI
MOV ESI,0x900000c0
BT ESI,EDX
JNC 0x0010c1c7
MOV EBX,EDI
TEST EDI,EDI
JLE 0x0010c1c7
CMP byte ptr [0x001250ec],0x1
JNZ 0x0010c15b
LEA RSI,[0x11ace8]
XOR R13D,R13D
MOV RDI,RCX
XOR EAX,EAX
CALL 0x00118c35
MOV EBP,EBX
LEA R15,[0x11ab56]
LAB_0010c124:
MOV RDI,qword ptr [R12]
MOVSD XMM0,qword ptr [R14 + R13*0x8]
MOV RSI,R15
MOV AL,0x1
CALL 0x00118c35
INC R13
CMP EBP,R13D
JNZ 0x0010c124
MOV RDI,qword ptr [R12]
LEA RSI,[0x11a210]
XOR EAX,EAX
CALL 0x00118c35
JMP 0x0010c1b3
LAB_0010c154:
MOV EAX,0x1
JMP 0x0010c1c7
LAB_0010c15b:
LEA RDI,[0x11ace8]
MOV ESI,0xc
MOV EDX,0x1
CALL 0x00101110
MOV R13D,EBX
XOR EBP,EBP
LEA R15,[0x11ab56]
LAB_0010c17d:
MOV RDI,qword ptr [R12]
MOVSD XMM0,qword ptr [R14 + RBP*0x8]
MOV RSI,R15
MOV AL,0x1
CALL 0x001010f0
INC RBP
CMP R13D,EBP
JNZ 0x0010c17d
MOV RCX,qword ptr [R12]
LEA RDI,[0x11a210]
MOV ESI,0x2
MOV EDX,0x1
CALL 0x00101110
LAB_0010c1b3:
LEA RAX,[0x1250e0]
MOV dword ptr [RAX],EBX
LEA RAX,[0x12504c]
INC dword ptr [RAX]
XOR EAX,EAX
LAB_0010c1c7:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::lefwLayerDCWidth(int, double*) */
int8 LefDefParser::lefwLayerDCWidth(int param_1,double *param_2)
{
int8 uVar1;
long lVar2;
if (lefwFile == (_IO_FILE *)0x0) {
uVar1 = 1;
}
else {
uVar1 = 2;
if (lefwState == 0x1e) {
uVar1 = 3;
if (((lefwOldState < 0x20) && ((0x900000c0U >> (lefwOldState & 0x1f) & 1) != 0)) &&
(0 < param_1)) {
if (lefwWriteEncrypt == '\x01') {
lVar2 = 0;
encPrint(lefwFile," WIDTH ");
do {
encPrint(lefwFile,"%.11g ",param_2[lVar2]);
lVar2 = lVar2 + 1;
} while (param_1 != (int)lVar2);
encPrint(lefwFile,";\n");
}
else {
fwrite(" WIDTH ",0xc,1,lefwFile);
lVar2 = 0;
do {
fprintf(lefwFile,"%.11g ",param_2[lVar2]);
lVar2 = lVar2 + 1;
} while (param_1 != (int)lVar2);
fwrite(";\n",2,1,lefwFile);
}
lefwLines = lefwLines + 1;
uVar1 = 0;
lefwTableLen = param_1;
}
}
}
return uVar1;
}
| |
39,334 | ft_stroke_border_done | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-stroker.c | static void ft_stroke_border_done(PVG_FT_StrokeBorder border)
{
free(border->points);
free(border->tags);
border->num_points = 0;
border->max_points = 0;
border->start = -1;
border->valid = FALSE;
} | O2 | c | ft_stroke_border_done:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x32b0
movq 0x10(%rbx), %rdi
callq 0x32b0
andq $0x0, (%rbx)
orl $-0x1, 0x1c(%rbx)
movb $0x0, 0x20(%rbx)
popq %rbx
retq
| ft_stroke_border_done:
push rbx
mov rbx, rdi
mov rdi, [rdi+8]
call free
mov rdi, [rbx+10h]
call free
and qword ptr [rbx], 0
or dword ptr [rbx+1Ch], 0FFFFFFFFh
mov byte ptr [rbx+20h], 0
pop rbx
retn
| long long ft_stroke_border_done(long long a1)
{
long long result; // rax
free(*(_QWORD *)(a1 + 8));
result = free(*(_QWORD *)(a1 + 16));
*(_QWORD *)a1 = 0LL;
*(_DWORD *)(a1 + 28) = -1;
*(_BYTE *)(a1 + 32) = 0;
return result;
}
| ft_stroke_border_done:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
CALL 0x001032b0
MOV RDI,qword ptr [RBX + 0x10]
CALL 0x001032b0
AND qword ptr [RBX],0x0
OR dword ptr [RBX + 0x1c],0xffffffff
MOV byte ptr [RBX + 0x20],0x0
POP RBX
RET
|
void ft_stroke_border_done(int8 *param_1)
{
free((void *)param_1[1]);
free((void *)param_1[2]);
*param_1 = 0;
*(int4 *)((long)param_1 + 0x1c) = 0xffffffff;
*(int1 *)(param_1 + 4) = 0;
return;
}
| |
39,335 | aggregate_all_memory(bool, PFS_memory_stat*, PFS_memory_stat*) | eloqsql/storage/perfschema/pfs_instr.cc | void aggregate_all_memory(bool alive,
PFS_memory_stat *from_array,
PFS_memory_stat *to_array)
{
PFS_memory_stat *from;
PFS_memory_stat *from_last;
PFS_memory_stat *to;
from= from_array;
from_last= from_array + memory_class_max;
to= to_array;
if (alive)
{
for ( ; from < from_last ; from++, to++)
{
from->partial_aggregate_to(to);
}
}
else
{
for ( ; from < from_last ; from++, to++)
{
from->full_aggregate_to(to);
from->reset();
}
}
} | O0 | cpp | aggregate_all_memory(bool, PFS_memory_stat*, PFS_memory_stat*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
leaq 0x391e15(%rip), %rcx # 0x3ce3c0
imulq $0x48, (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
testb $0x1, -0x1(%rbp)
je 0x3c5f9
jmp 0x3c5c6
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x3c5f7
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x41280
movq -0x20(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x30(%rbp)
jmp 0x3c5c6
jmp 0x3c637
jmp 0x3c5fb
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x3c635
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x413e0
movq -0x20(%rbp), %rdi
callq 0x37560
movq -0x20(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x30(%rbp)
jmp 0x3c5fb
jmp 0x3c637
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _Z20aggregate_all_memorybP15PFS_memory_statS0_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, dil
and al, 1
mov [rbp+var_1], al
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
lea rcx, memory_class_max
imul rcx, [rcx], 48h ; 'H'
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
test [rbp+var_1], 1
jz short loc_3C5F9
jmp short $+2
loc_3C5C6:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jnb short loc_3C5F7
mov rdi, [rbp+var_20]; this
mov rsi, [rbp+var_30]; PFS_memory_stat *
call _ZN15PFS_memory_stat20partial_aggregate_toEPS_; PFS_memory_stat::partial_aggregate_to(PFS_memory_stat*)
mov rax, [rbp+var_20]
add rax, 48h ; 'H'
mov [rbp+var_20], rax
mov rax, [rbp+var_30]
add rax, 48h ; 'H'
mov [rbp+var_30], rax
jmp short loc_3C5C6
loc_3C5F7:
jmp short loc_3C637
loc_3C5F9:
jmp short $+2
loc_3C5FB:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jnb short loc_3C635
mov rdi, [rbp+var_20]; this
mov rsi, [rbp+var_30]; PFS_memory_stat *
call _ZNK15PFS_memory_stat17full_aggregate_toEPS_; PFS_memory_stat::full_aggregate_to(PFS_memory_stat*)
mov rdi, [rbp+var_20]; this
call _ZN15PFS_memory_stat5resetEv; PFS_memory_stat::reset(void)
mov rax, [rbp+var_20]
add rax, 48h ; 'H'
mov [rbp+var_20], rax
mov rax, [rbp+var_30]
add rax, 48h ; 'H'
mov [rbp+var_30], rax
jmp short loc_3C5FB
loc_3C635:
jmp short $+2
loc_3C637:
add rsp, 30h
pop rbp
retn
| PFS_memory_stat * aggregate_all_memory(char a1, PFS_memory_stat *a2, PFS_memory_stat *a3)
{
PFS_memory_stat *result; // rax
PFS_memory_stat *v5; // [rsp+8h] [rbp-28h]
PFS_memory_stat *v6; // [rsp+10h] [rbp-20h]
v6 = a2;
v5 = (PFS_memory_stat *)((char *)a2 + 72 * memory_class_max);
if ( (a1 & 1) != 0 )
{
while ( 1 )
{
result = v6;
if ( v6 >= v5 )
break;
PFS_memory_stat::partial_aggregate_to(v6, a3);
v6 = (PFS_memory_stat *)((char *)v6 + 72);
a3 = (PFS_memory_stat *)((char *)a3 + 72);
}
}
else
{
while ( 1 )
{
result = v6;
if ( v6 >= v5 )
break;
PFS_memory_stat::full_aggregate_to(v6, a3);
PFS_memory_stat::reset(v6);
v6 = (PFS_memory_stat *)((char *)v6 + 72);
a3 = (PFS_memory_stat *)((char *)a3 + 72);
}
}
return result;
}
| aggregate_all_memory:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,DIL
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x4ce3c0]
IMUL RCX,qword ptr [RCX],0x48
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
TEST byte ptr [RBP + -0x1],0x1
JZ 0x0013c5f9
JMP 0x0013c5c6
LAB_0013c5c6:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x0013c5f7
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00141280
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x48
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x48
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0013c5c6
LAB_0013c5f7:
JMP 0x0013c637
LAB_0013c5f9:
JMP 0x0013c5fb
LAB_0013c5fb:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x0013c635
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x001413e0
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00137560
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x48
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x48
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0013c5fb
LAB_0013c635:
JMP 0x0013c637
LAB_0013c637:
ADD RSP,0x30
POP RBP
RET
|
/* aggregate_all_memory(bool, PFS_memory_stat*, PFS_memory_stat*) */
void aggregate_all_memory(bool param_1,PFS_memory_stat *param_2,PFS_memory_stat *param_3)
{
long lVar1;
PFS_memory_stat *local_38;
PFS_memory_stat *local_28;
lVar1 = memory_class_max * 0x48;
local_38 = param_3;
local_28 = param_2;
if (param_1) {
for (; local_28 < param_2 + lVar1; local_28 = local_28 + 0x48) {
PFS_memory_stat::partial_aggregate_to(local_28,local_38);
local_38 = local_38 + 0x48;
}
}
else {
for (; local_28 < param_2 + lVar1; local_28 = local_28 + 0x48) {
PFS_memory_stat::full_aggregate_to(local_28,local_38);
PFS_memory_stat::reset(local_28);
local_38 = local_38 + 0x48;
}
}
return;
}
| |
39,336 | aggregate_all_memory(bool, PFS_memory_stat*, PFS_memory_stat*) | eloqsql/storage/perfschema/pfs_instr.cc | void aggregate_all_memory(bool alive,
PFS_memory_stat *from_array,
PFS_memory_stat *to_array)
{
PFS_memory_stat *from;
PFS_memory_stat *from_last;
PFS_memory_stat *to;
from= from_array;
from_last= from_array + memory_class_max;
to= to_array;
if (alive)
{
for ( ; from < from_last ; from++, to++)
{
from->partial_aggregate_to(to);
}
}
else
{
for ( ; from < from_last ; from++, to++)
{
from->full_aggregate_to(to);
from->reset();
}
}
} | O3 | cpp | aggregate_all_memory(bool, PFS_memory_stat*, PFS_memory_stat*):
pushq %rbp
movq %rsp, %rbp
leaq 0x3587eb(%rip), %rax # 0x391440
movq (%rax), %rcx
leaq (%rcx,%rcx,8), %rax
leaq (%rsi,%rax,8), %rax
testl %edi, %edi
je 0x38d36
testq %rcx, %rcx
jle 0x38dcd
addq $0x40, %rdx
xorps %xmm0, %xmm0
cmpb $0x1, (%rsi)
jne 0x38d20
movb $0x1, -0x40(%rdx)
movq 0x8(%rsi), %rcx
movq 0x10(%rsi), %rdi
cmpq %rcx, %rdi
cmovbq %rdi, %rcx
testq %rcx, %rcx
je 0x38cbf
movdqu -0x38(%rdx), %xmm1
movq %rcx, %xmm2
pshufd $0x44, %xmm2, %xmm2 # xmm2 = xmm2[0,1,0,1]
paddq %xmm2, %xmm1
movdqu %xmm1, -0x38(%rdx)
movdqu 0x8(%rsi), %xmm1
psubq %xmm2, %xmm1
movdqu %xmm1, 0x8(%rsi)
movq 0x18(%rsi), %rcx
movq 0x20(%rsi), %rdi
cmpq %rcx, %rdi
cmovbq %rdi, %rcx
testq %rcx, %rcx
je 0x38cf9
movdqu -0x28(%rdx), %xmm1
movq %rcx, %xmm2
pshufd $0x44, %xmm2, %xmm2 # xmm2 = xmm2[0,1,0,1]
paddq %xmm2, %xmm1
movdqu %xmm1, -0x28(%rdx)
movdqu 0x18(%rsi), %xmm1
psubq %xmm2, %xmm1
movdqu %xmm1, 0x18(%rsi)
movq 0x28(%rsi), %rcx
addq %rcx, -0x18(%rdx)
movq 0x30(%rsi), %rcx
addq %rcx, -0x10(%rdx)
movq 0x38(%rsi), %rcx
addq %rcx, -0x8(%rdx)
movq 0x40(%rsi), %rcx
addq %rcx, (%rdx)
movups %xmm0, 0x38(%rsi)
movups %xmm0, 0x28(%rsi)
addq $0x48, %rsi
addq $0x48, %rdx
cmpq %rax, %rsi
jb 0x38c78
jmp 0x38dcd
testq %rcx, %rcx
jle 0x38dcd
movl $0x40, %ecx
xorps %xmm0, %xmm0
cmpb $0x1, -0x40(%rsi,%rcx)
jne 0x38da1
movb $0x1, -0x40(%rdx,%rcx)
movq -0x38(%rsi,%rcx), %rdi
addq %rdi, -0x38(%rdx,%rcx)
movq -0x30(%rsi,%rcx), %rdi
addq %rdi, -0x30(%rdx,%rcx)
movq -0x28(%rsi,%rcx), %rdi
addq %rdi, -0x28(%rdx,%rcx)
movq -0x20(%rsi,%rcx), %rdi
addq %rdi, -0x20(%rdx,%rcx)
movq -0x18(%rsi,%rcx), %rdi
addq %rdi, -0x18(%rdx,%rcx)
movq -0x10(%rsi,%rcx), %rdi
addq %rdi, -0x10(%rdx,%rcx)
movq -0x8(%rsi,%rcx), %rdi
addq %rdi, -0x8(%rdx,%rcx)
movq (%rsi,%rcx), %rdi
addq %rdi, (%rdx,%rcx)
leaq (%rsi,%rcx), %rdi
addq $-0x40, %rdi
movb $0x0, (%rdi)
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
addq $0x48, %rcx
addq $0x48, %rdi
cmpq %rax, %rdi
jb 0x38d47
popq %rbp
retq
| _Z20aggregate_all_memorybP15PFS_memory_statS0_:
push rbp
mov rbp, rsp
lea rax, memory_class_max
mov rcx, [rax]
lea rax, [rcx+rcx*8]
lea rax, [rsi+rax*8]
test edi, edi
jz loc_38D36
test rcx, rcx
jle loc_38DCD
add rdx, 40h ; '@'
xorps xmm0, xmm0
loc_38C78:
cmp byte ptr [rsi], 1
jnz loc_38D20
mov byte ptr [rdx-40h], 1
mov rcx, [rsi+8]
mov rdi, [rsi+10h]
cmp rdi, rcx
cmovb rcx, rdi
test rcx, rcx
jz short loc_38CBF
movdqu xmm1, xmmword ptr [rdx-38h]
movq xmm2, rcx
pshufd xmm2, xmm2, 44h ; 'D'
paddq xmm1, xmm2
movdqu xmmword ptr [rdx-38h], xmm1
movdqu xmm1, xmmword ptr [rsi+8]
psubq xmm1, xmm2
movdqu xmmword ptr [rsi+8], xmm1
loc_38CBF:
mov rcx, [rsi+18h]
mov rdi, [rsi+20h]
cmp rdi, rcx
cmovb rcx, rdi
test rcx, rcx
jz short loc_38CF9
movdqu xmm1, xmmword ptr [rdx-28h]
movq xmm2, rcx
pshufd xmm2, xmm2, 44h ; 'D'
paddq xmm1, xmm2
movdqu xmmword ptr [rdx-28h], xmm1
movdqu xmm1, xmmword ptr [rsi+18h]
psubq xmm1, xmm2
movdqu xmmword ptr [rsi+18h], xmm1
loc_38CF9:
mov rcx, [rsi+28h]
add [rdx-18h], rcx
mov rcx, [rsi+30h]
add [rdx-10h], rcx
mov rcx, [rsi+38h]
add [rdx-8], rcx
mov rcx, [rsi+40h]
add [rdx], rcx
movups xmmword ptr [rsi+38h], xmm0
movups xmmword ptr [rsi+28h], xmm0
loc_38D20:
add rsi, 48h ; 'H'
add rdx, 48h ; 'H'
cmp rsi, rax
jb loc_38C78
jmp loc_38DCD
loc_38D36:
test rcx, rcx
jle loc_38DCD
mov ecx, 40h ; '@'
xorps xmm0, xmm0
loc_38D47:
cmp byte ptr [rsi+rcx-40h], 1
jnz short loc_38DA1
mov byte ptr [rdx+rcx-40h], 1
mov rdi, [rsi+rcx-38h]
add [rdx+rcx-38h], rdi
mov rdi, [rsi+rcx-30h]
add [rdx+rcx-30h], rdi
mov rdi, [rsi+rcx-28h]
add [rdx+rcx-28h], rdi
mov rdi, [rsi+rcx-20h]
add [rdx+rcx-20h], rdi
mov rdi, [rsi+rcx-18h]
add [rdx+rcx-18h], rdi
mov rdi, [rsi+rcx-10h]
add [rdx+rcx-10h], rdi
mov rdi, [rsi+rcx-8]
add [rdx+rcx-8], rdi
mov rdi, [rsi+rcx]
add [rdx+rcx], rdi
loc_38DA1:
lea rdi, [rsi+rcx]
add rdi, 0FFFFFFFFFFFFFFC0h
mov byte ptr [rdi], 0
movups xmmword ptr [rdi+8], xmm0
movups xmmword ptr [rdi+18h], xmm0
movups xmmword ptr [rdi+28h], xmm0
movups xmmword ptr [rdi+38h], xmm0
add rcx, 48h ; 'H'
add rdi, 48h ; 'H'
cmp rdi, rax
jb loc_38D47
loc_38DCD:
pop rbp
retn
| unsigned long long aggregate_all_memory(int a1, PFS_memory_stat *a2, PFS_memory_stat *a3)
{
unsigned long long result; // rax
_QWORD *v4; // rdx
unsigned long long v5; // rcx
__m128i v6; // xmm2
unsigned long long v7; // rcx
__m128i v8; // xmm2
long long v9; // rcx
char *v10; // rdi
result = (unsigned long long)a2 + 72 * memory_class_max;
if ( a1 )
{
if ( memory_class_max > 0 )
{
v4 = (_QWORD *)((char *)a3 + 64);
do
{
if ( *(_BYTE *)a2 == 1 )
{
*((_BYTE *)v4 - 64) = 1;
v5 = *((_QWORD *)a2 + 1);
if ( *((_QWORD *)a2 + 2) < v5 )
v5 = *((_QWORD *)a2 + 2);
if ( v5 )
{
v6 = _mm_shuffle_epi32((__m128i)v5, 68);
*(__m128i *)(v4 - 7) = _mm_add_epi64(_mm_loadu_si128((const __m128i *)(v4 - 7)), v6);
*(__m128i *)((char *)a2 + 8) = _mm_sub_epi64(_mm_loadu_si128((const __m128i *)((char *)a2 + 8)), v6);
}
v7 = *((_QWORD *)a2 + 3);
if ( *((_QWORD *)a2 + 4) < v7 )
v7 = *((_QWORD *)a2 + 4);
if ( v7 )
{
v8 = _mm_shuffle_epi32((__m128i)v7, 68);
*(__m128i *)(v4 - 5) = _mm_add_epi64(_mm_loadu_si128((const __m128i *)(v4 - 5)), v8);
*(__m128i *)((char *)a2 + 24) = _mm_sub_epi64(_mm_loadu_si128((const __m128i *)((char *)a2 + 24)), v8);
}
*(v4 - 3) += *((_QWORD *)a2 + 5);
*(v4 - 2) += *((_QWORD *)a2 + 6);
*(v4 - 1) += *((_QWORD *)a2 + 7);
*v4 += *((_QWORD *)a2 + 8);
*(_OWORD *)((char *)a2 + 56) = 0LL;
*(_OWORD *)((char *)a2 + 40) = 0LL;
}
a2 = (PFS_memory_stat *)((char *)a2 + 72);
v4 += 9;
}
while ( (unsigned long long)a2 < result );
}
}
else if ( memory_class_max > 0 )
{
v9 = 64LL;
do
{
if ( *((_BYTE *)a2 + v9 - 64) == 1 )
{
*((_BYTE *)a3 + v9 - 64) = 1;
*(_QWORD *)((char *)a3 + v9 - 56) += *(_QWORD *)((char *)a2 + v9 - 56);
*(_QWORD *)((char *)a3 + v9 - 48) += *(_QWORD *)((char *)a2 + v9 - 48);
*(_QWORD *)((char *)a3 + v9 - 40) += *(_QWORD *)((char *)a2 + v9 - 40);
*(_QWORD *)((char *)a3 + v9 - 32) += *(_QWORD *)((char *)a2 + v9 - 32);
*(_QWORD *)((char *)a3 + v9 - 24) += *(_QWORD *)((char *)a2 + v9 - 24);
*(_QWORD *)((char *)a3 + v9 - 16) += *(_QWORD *)((char *)a2 + v9 - 16);
*(_QWORD *)((char *)a3 + v9 - 8) += *(_QWORD *)((char *)a2 + v9 - 8);
*(_QWORD *)((char *)a3 + v9) += *(_QWORD *)((char *)a2 + v9);
}
v10 = (char *)a2 + v9 - 64;
*v10 = 0;
*(_OWORD *)(v10 + 8) = 0LL;
*(_OWORD *)(v10 + 24) = 0LL;
*(_OWORD *)(v10 + 40) = 0LL;
*(_OWORD *)(v10 + 56) = 0LL;
v9 += 72LL;
}
while ( (unsigned long long)(v10 + 72) < result );
}
return result;
}
| aggregate_all_memory:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x491440]
MOV RCX,qword ptr [RAX]
LEA RAX,[RCX + RCX*0x8]
LEA RAX,[RSI + RAX*0x8]
TEST EDI,EDI
JZ 0x00138d36
TEST RCX,RCX
JLE 0x00138dcd
ADD RDX,0x40
XORPS XMM0,XMM0
LAB_00138c78:
CMP byte ptr [RSI],0x1
JNZ 0x00138d20
MOV byte ptr [RDX + -0x40],0x1
MOV RCX,qword ptr [RSI + 0x8]
MOV RDI,qword ptr [RSI + 0x10]
CMP RDI,RCX
CMOVC RCX,RDI
TEST RCX,RCX
JZ 0x00138cbf
MOVDQU XMM1,xmmword ptr [RDX + -0x38]
MOVQ XMM2,RCX
PSHUFD XMM2,XMM2,0x44
PADDQ XMM1,XMM2
MOVDQU xmmword ptr [RDX + -0x38],XMM1
MOVDQU XMM1,xmmword ptr [RSI + 0x8]
PSUBQ XMM1,XMM2
MOVDQU xmmword ptr [RSI + 0x8],XMM1
LAB_00138cbf:
MOV RCX,qword ptr [RSI + 0x18]
MOV RDI,qword ptr [RSI + 0x20]
CMP RDI,RCX
CMOVC RCX,RDI
TEST RCX,RCX
JZ 0x00138cf9
MOVDQU XMM1,xmmword ptr [RDX + -0x28]
MOVQ XMM2,RCX
PSHUFD XMM2,XMM2,0x44
PADDQ XMM1,XMM2
MOVDQU xmmword ptr [RDX + -0x28],XMM1
MOVDQU XMM1,xmmword ptr [RSI + 0x18]
PSUBQ XMM1,XMM2
MOVDQU xmmword ptr [RSI + 0x18],XMM1
LAB_00138cf9:
MOV RCX,qword ptr [RSI + 0x28]
ADD qword ptr [RDX + -0x18],RCX
MOV RCX,qword ptr [RSI + 0x30]
ADD qword ptr [RDX + -0x10],RCX
MOV RCX,qword ptr [RSI + 0x38]
ADD qword ptr [RDX + -0x8],RCX
MOV RCX,qword ptr [RSI + 0x40]
ADD qword ptr [RDX],RCX
MOVUPS xmmword ptr [RSI + 0x38],XMM0
MOVUPS xmmword ptr [RSI + 0x28],XMM0
LAB_00138d20:
ADD RSI,0x48
ADD RDX,0x48
CMP RSI,RAX
JC 0x00138c78
JMP 0x00138dcd
LAB_00138d36:
TEST RCX,RCX
JLE 0x00138dcd
MOV ECX,0x40
XORPS XMM0,XMM0
LAB_00138d47:
CMP byte ptr [RSI + RCX*0x1 + -0x40],0x1
JNZ 0x00138da1
MOV byte ptr [RDX + RCX*0x1 + -0x40],0x1
MOV RDI,qword ptr [RSI + RCX*0x1 + -0x38]
ADD qword ptr [RDX + RCX*0x1 + -0x38],RDI
MOV RDI,qword ptr [RSI + RCX*0x1 + -0x30]
ADD qword ptr [RDX + RCX*0x1 + -0x30],RDI
MOV RDI,qword ptr [RSI + RCX*0x1 + -0x28]
ADD qword ptr [RDX + RCX*0x1 + -0x28],RDI
MOV RDI,qword ptr [RSI + RCX*0x1 + -0x20]
ADD qword ptr [RDX + RCX*0x1 + -0x20],RDI
MOV RDI,qword ptr [RSI + RCX*0x1 + -0x18]
ADD qword ptr [RDX + RCX*0x1 + -0x18],RDI
MOV RDI,qword ptr [RSI + RCX*0x1 + -0x10]
ADD qword ptr [RDX + RCX*0x1 + -0x10],RDI
MOV RDI,qword ptr [RSI + RCX*0x1 + -0x8]
ADD qword ptr [RDX + RCX*0x1 + -0x8],RDI
MOV RDI,qword ptr [RSI + RCX*0x1]
ADD qword ptr [RDX + RCX*0x1],RDI
LAB_00138da1:
LEA RDI,[RSI + RCX*0x1]
ADD RDI,-0x40
MOV byte ptr [RDI],0x0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOVUPS xmmword ptr [RDI + 0x38],XMM0
ADD RCX,0x48
ADD RDI,0x48
CMP RDI,RAX
JC 0x00138d47
LAB_00138dcd:
POP RBP
RET
|
/* aggregate_all_memory(bool, PFS_memory_stat*, PFS_memory_stat*) */
void aggregate_all_memory(bool param_1,PFS_memory_stat *param_2,PFS_memory_stat *param_3)
{
PFS_memory_stat *pPVar1;
ulong uVar2;
long lVar3;
PFS_memory_stat *pPVar4;
int7 in_register_00000039;
int1 auVar5 [16];
int1 auVar6 [16];
pPVar1 = param_2 + memory_class_max * 0x48;
if ((int)CONCAT71(in_register_00000039,param_1) == 0) {
if (0 < memory_class_max) {
lVar3 = 0x40;
do {
if (param_2[lVar3 + -0x40] == (PFS_memory_stat)0x1) {
param_3[lVar3 + -0x40] = (PFS_memory_stat)0x1;
*(long *)(param_3 + lVar3 + -0x38) =
*(long *)(param_3 + lVar3 + -0x38) + *(long *)(param_2 + lVar3 + -0x38);
*(long *)(param_3 + lVar3 + -0x30) =
*(long *)(param_3 + lVar3 + -0x30) + *(long *)(param_2 + lVar3 + -0x30);
*(long *)(param_3 + lVar3 + -0x28) =
*(long *)(param_3 + lVar3 + -0x28) + *(long *)(param_2 + lVar3 + -0x28);
*(long *)(param_3 + lVar3 + -0x20) =
*(long *)(param_3 + lVar3 + -0x20) + *(long *)(param_2 + lVar3 + -0x20);
*(long *)(param_3 + lVar3 + -0x18) =
*(long *)(param_3 + lVar3 + -0x18) + *(long *)(param_2 + lVar3 + -0x18);
*(long *)(param_3 + lVar3 + -0x10) =
*(long *)(param_3 + lVar3 + -0x10) + *(long *)(param_2 + lVar3 + -0x10);
*(long *)(param_3 + lVar3 + -8) =
*(long *)(param_3 + lVar3 + -8) + *(long *)(param_2 + lVar3 + -8);
*(long *)(param_3 + lVar3) = *(long *)(param_3 + lVar3) + *(long *)(param_2 + lVar3);
}
pPVar4 = param_2 + lVar3;
pPVar4[-0x40] = (PFS_memory_stat)0x0;
*(int8 *)(pPVar4 + -0x38) = 0;
*(int8 *)(pPVar4 + -0x30) = 0;
*(int8 *)(pPVar4 + -0x28) = 0;
*(int8 *)(pPVar4 + -0x20) = 0;
*(int8 *)(pPVar4 + -0x18) = 0;
*(int8 *)(pPVar4 + -0x10) = 0;
*(int8 *)(pPVar4 + -8) = 0;
*(int8 *)pPVar4 = 0;
lVar3 = lVar3 + 0x48;
} while (pPVar4 + 8 < pPVar1);
}
}
else if (0 < memory_class_max) {
pPVar4 = param_3 + 0x40;
do {
if (*param_2 == (PFS_memory_stat)0x1) {
pPVar4[-0x40] = (PFS_memory_stat)0x1;
uVar2 = *(ulong *)(param_2 + 8);
if (*(ulong *)(param_2 + 0x10) < *(ulong *)(param_2 + 8)) {
uVar2 = *(ulong *)(param_2 + 0x10);
}
if (uVar2 != 0) {
auVar5._8_4_ = (int)uVar2;
auVar5._0_8_ = uVar2;
auVar5._12_4_ = (int)(uVar2 >> 0x20);
*(ulong *)(pPVar4 + -0x38) = *(long *)(pPVar4 + -0x38) + uVar2;
*(long *)(pPVar4 + -0x30) = *(long *)(pPVar4 + -0x30) + auVar5._8_8_;
*(ulong *)(param_2 + 8) = *(long *)(param_2 + 8) - uVar2;
*(long *)(param_2 + 0x10) = *(long *)(param_2 + 0x10) - auVar5._8_8_;
}
uVar2 = *(ulong *)(param_2 + 0x18);
if (*(ulong *)(param_2 + 0x20) < *(ulong *)(param_2 + 0x18)) {
uVar2 = *(ulong *)(param_2 + 0x20);
}
if (uVar2 != 0) {
auVar6._8_4_ = (int)uVar2;
auVar6._0_8_ = uVar2;
auVar6._12_4_ = (int)(uVar2 >> 0x20);
*(ulong *)(pPVar4 + -0x28) = *(long *)(pPVar4 + -0x28) + uVar2;
*(long *)(pPVar4 + -0x20) = *(long *)(pPVar4 + -0x20) + auVar6._8_8_;
*(ulong *)(param_2 + 0x18) = *(long *)(param_2 + 0x18) - uVar2;
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) - auVar6._8_8_;
}
*(long *)(pPVar4 + -0x18) = *(long *)(pPVar4 + -0x18) + *(long *)(param_2 + 0x28);
*(long *)(pPVar4 + -0x10) = *(long *)(pPVar4 + -0x10) + *(long *)(param_2 + 0x30);
*(long *)(pPVar4 + -8) = *(long *)(pPVar4 + -8) + *(long *)(param_2 + 0x38);
*(long *)pPVar4 = *(long *)pPVar4 + *(long *)(param_2 + 0x40);
*(int8 *)(param_2 + 0x38) = 0;
*(int8 *)(param_2 + 0x40) = 0;
*(int8 *)(param_2 + 0x28) = 0;
*(int8 *)(param_2 + 0x30) = 0;
}
param_2 = param_2 + 0x48;
pPVar4 = pPVar4 + 0x48;
} while (param_2 < pPVar1);
}
return;
}
| |
39,337 | my_caseup_str_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_caseup_str_utf8mb3(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
int srcres, dstres;
char *dst= src, *dst0= src;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(cs->caseup_multiply == 1);
while (*src &&
(srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_toupper_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
*dst= '\0';
return (size_t) (dst - dst0);
} | O0 | c | my_caseup_str_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x66a1e
jmp 0x66a20
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0x66a4e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rsi
callq 0x67880
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x66a57
jmp 0x66aa6
movq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x679e0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x67a40
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jg 0x66a7f
jmp 0x66aa6
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x66a20
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| my_caseup_str_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_38], rax
jmp short $+2
loc_66A1E:
jmp short $+2
loc_66A20:
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_39], al
jz short loc_66A4E
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
lea rsi, [rbp+var_18]
call my_utf8mb3_uni_no_range
mov [rbp+var_1C], eax
cmp eax, 0
setnle al
mov [rbp+var_39], al
loc_66A4E:
mov al, [rbp+var_39]
test al, 1
jnz short loc_66A57
jmp short loc_66AA6
loc_66A57:
mov rdi, [rbp+var_38]
lea rsi, [rbp+var_18]
call my_toupper_utf8mb3
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call my_uni_utf8mb3_no_range
mov [rbp+var_20], eax
cmp eax, 0
jg short loc_66A7F
jmp short loc_66AA6
loc_66A7F:
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_20]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp loc_66A20
loc_66AA6:
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
sub rax, rcx
add rsp, 40h
pop rbp
retn
| _BYTE * my_caseup_str_utf8mb3(long long a1, _BYTE *a2)
{
bool v3; // [rsp+7h] [rbp-39h]
long long v4; // [rsp+8h] [rbp-38h]
_BYTE *v5; // [rsp+18h] [rbp-28h]
int v6; // [rsp+20h] [rbp-20h]
int v7; // [rsp+24h] [rbp-1Ch]
long long v8; // [rsp+28h] [rbp-18h] BYREF
_BYTE *v9; // [rsp+30h] [rbp-10h]
long long v10; // [rsp+38h] [rbp-8h]
v10 = a1;
v9 = a2;
v5 = a2;
v4 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v3 = 0;
if ( *v9 )
{
v7 = my_utf8mb3_uni_no_range(v10, &v8, v9);
v3 = v7 > 0;
}
if ( !v3 )
break;
my_toupper_utf8mb3(v4, &v8);
v6 = my_uni_utf8mb3_no_range(v10, v8, v5);
if ( v6 <= 0 )
break;
v9 += v7;
v5 += v6;
}
*v5 = 0;
return (_BYTE *)(v5 - a2);
}
| my_caseup_str_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00166a1e
LAB_00166a1e:
JMP 0x00166a20
LAB_00166a20:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x39],AL
JZ 0x00166a4e
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL 0x00167880
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_00166a4e:
MOV AL,byte ptr [RBP + -0x39]
TEST AL,0x1
JNZ 0x00166a57
JMP 0x00166aa6
LAB_00166a57:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x18]
CALL 0x001679e0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00167a40
MOV dword ptr [RBP + -0x20],EAX
CMP EAX,0x0
JG 0x00166a7f
JMP 0x00166aa6
LAB_00166a7f:
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00166a20
LAB_00166aa6:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
ADD RSP,0x40
POP RBP
RET
|
long my_caseup_str_utf8mb3(long param_1,char *param_2)
{
int8 uVar1;
bool bVar2;
int iVar3;
char *local_30;
int local_24;
int8 local_20;
char *local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_2;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (*local_18 != '\0') {
local_24 = my_utf8mb3_uni_no_range(local_10,&local_20,local_18);
bVar2 = 0 < local_24;
}
if (!bVar2) break;
my_toupper_utf8mb3(uVar1,&local_20);
iVar3 = my_uni_utf8mb3_no_range(local_10,local_20,local_30);
if (iVar3 < 1) break;
local_18 = local_18 + local_24;
local_30 = local_30 + iVar3;
}
*local_30 = '\0';
return (long)local_30 - (long)param_2;
}
| |
39,338 | pagecache_fwrite | eloqsql/storage/maria/ma_pagecache.c | static my_bool pagecache_fwrite(PAGECACHE *pagecache,
PAGECACHE_FILE *filedesc,
uchar *buffer,
pgcache_page_no_t pageno,
enum pagecache_page_type type
__attribute__((unused)),
myf flags)
{
int res;
PAGECACHE_IO_HOOK_ARGS args;
DBUG_ENTER("pagecache_fwrite");
DBUG_ASSERT(type != PAGECACHE_READ_UNKNOWN_PAGE);
#ifdef EXTRA_DEBUG_BITMAP
/*
This code is very good when debugging changes in bitmaps or dirty lists
The above define should be defined for all Aria files if you want to
debug either of the above issues.
*/
if (pagecache->extra_debug)
{
char buff[80];
uint len= my_sprintf(buff,
(buff, "fwrite: fd: %d id: %u page: %llu",
filedesc->file,
_ma_file_callback_to_id(filedesc->callback_data),
pageno));
(void) translog_log_debug_info(0, LOGREC_DEBUG_INFO_QUERY,
(uchar*) buff, len);
}
#endif
/* initialize hooks args */
args.page= buffer;
args.pageno= pageno;
args.data= filedesc->callback_data;
/* Todo: Integrate this with write_callback so we have only one callback */
if ((*filedesc->flush_log_callback)(&args))
DBUG_RETURN(1);
DBUG_PRINT("info", ("pre_write_hook:%p data: %p",
filedesc->pre_write_hook,
filedesc->callback_data));
if ((*filedesc->pre_write_hook)(&args))
{
DBUG_PRINT("error", ("write callback problem"));
DBUG_RETURN(1);
}
#if __has_feature(memory_sanitizer) /* FIXME: encryption.aria_tiny etc. fail */
/* FIXME: ENGINE=Aria occasionally writes uninitialized data */
__msan_unpoison(args.page, pagecache->block_size);
#endif
res= (int)my_pwrite(filedesc->file, args.page, pagecache->block_size,
((my_off_t) pageno << pagecache->shift), flags);
(*filedesc->post_write_hook)(res, &args);
DBUG_RETURN(res);
} | O0 | c | pagecache_fwrite:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
jmp 0x3d202
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
leaq -0x60(%rbp), %rdi
callq *0x38(%rax)
cmpb $0x0, %al
je 0x3d235
jmp 0x3d22f
movb $0x1, -0x1(%rbp)
jmp 0x3d2a2
jmp 0x3d237
jmp 0x3d239
movq -0x18(%rbp), %rax
leaq -0x60(%rbp), %rdi
callq *0x28(%rax)
cmpb $0x0, %al
je 0x3d254
jmp 0x3d24a
jmp 0x3d24c
jmp 0x3d24e
movb $0x1, -0x1(%rbp)
jmp 0x3d2a2
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edi
movq -0x60(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x80(%rax), %eax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x190(%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x38(%rbp), %r8
callq 0xfa980
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x3c(%rbp), %edi
leaq -0x60(%rbp), %rsi
callq *%rax
movl -0x3c(%rbp), %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| pagecache_fwrite:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov [rbp+var_38], r9
jmp short $+2
loc_3D202:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_28]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov rax, [rax+40h]
mov [rbp+var_50], rax
mov rax, [rbp+var_18]
lea rdi, [rbp+var_60]
call qword ptr [rax+38h]
cmp al, 0
jz short loc_3D235
jmp short $+2
loc_3D22F:
mov [rbp+var_1], 1
jmp short loc_3D2A2
loc_3D235:
jmp short $+2
loc_3D237:
jmp short $+2
loc_3D239:
mov rax, [rbp+var_18]
lea rdi, [rbp+var_60]
call qword ptr [rax+28h]
cmp al, 0
jz short loc_3D254
jmp short $+2
loc_3D24A:
jmp short $+2
loc_3D24C:
jmp short $+2
loc_3D24E:
mov [rbp+var_1], 1
jmp short loc_3D2A2
loc_3D254:
mov rax, [rbp+var_18]
mov edi, [rax+10h]
mov rsi, [rbp+var_60]
mov rax, [rbp+var_10]
mov eax, [rax+80h]
mov edx, eax
mov rax, [rbp+var_28]
mov rcx, [rbp+var_10]
mov ecx, [rcx+190h]
shl rax, cl
mov rcx, rax
mov r8, [rbp+var_38]
call my_pwrite
mov [rbp+var_3C], eax
mov rax, [rbp+var_18]
mov rax, [rax+30h]
mov edi, [rbp+var_3C]
lea rsi, [rbp+var_60]
call rax
mov eax, [rbp+var_3C]
mov [rbp+var_1], al
loc_3D2A2:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| char pagecache_fwrite(long long a1, long long a2, long long a3, long long a4, int a5, long long a6)
{
_QWORD v7[4]; // [rsp+0h] [rbp-60h] BYREF
unsigned int v8; // [rsp+24h] [rbp-3Ch]
long long v9; // [rsp+28h] [rbp-38h]
int v10; // [rsp+34h] [rbp-2Ch]
long long v11; // [rsp+38h] [rbp-28h]
long long v12; // [rsp+40h] [rbp-20h]
long long v13; // [rsp+48h] [rbp-18h]
long long v14; // [rsp+50h] [rbp-10h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = a4;
v10 = a5;
v9 = a6;
v7[0] = a3;
v7[1] = a4;
v7[2] = *(_QWORD *)(a2 + 64);
if ( (*(unsigned __int8 ( **)(_QWORD *))(a2 + 56))(v7) )
return 1;
if ( (*(unsigned __int8 ( **)(_QWORD *))(v13 + 40))(v7) )
return 1;
v8 = my_pwrite(*(unsigned int *)(v13 + 16), v7[0], *(unsigned int *)(v14 + 128), v11 << *(_DWORD *)(v14 + 400), v9);
(*(void ( **)(_QWORD, _QWORD *))(v13 + 48))(v8, v7);
return v8;
}
| pagecache_fwrite:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
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 dword ptr [RBP + -0x2c],R8D
MOV qword ptr [RBP + -0x38],R9
JMP 0x0013d202
LAB_0013d202:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x60]
CALL qword ptr [RAX + 0x38]
CMP AL,0x0
JZ 0x0013d235
JMP 0x0013d22f
LAB_0013d22f:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013d2a2
LAB_0013d235:
JMP 0x0013d237
LAB_0013d237:
JMP 0x0013d239
LAB_0013d239:
MOV RAX,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x60]
CALL qword ptr [RAX + 0x28]
CMP AL,0x0
JZ 0x0013d254
JMP 0x0013d24a
LAB_0013d24a:
JMP 0x0013d24c
LAB_0013d24c:
JMP 0x0013d24e
LAB_0013d24e:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013d2a2
LAB_0013d254:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,dword ptr [RAX + 0x10]
MOV RSI,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x80]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x190]
SHL RAX,CL
MOV RCX,RAX
MOV R8,qword ptr [RBP + -0x38]
CALL 0x001fa980
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV EDI,dword ptr [RBP + -0x3c]
LEA RSI,[RBP + -0x60]
CALL RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV byte ptr [RBP + -0x1],AL
LAB_0013d2a2:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int1
pagecache_fwrite(long param_1,long param_2,int8 param_3,long param_4,int4 param_5,
int8 param_6)
{
char cVar1;
int8 local_68;
long local_60;
int8 local_58;
int4 local_44;
int8 local_40;
int4 local_34;
long local_30;
int8 local_28;
long local_20;
long local_18;
int1 local_9;
local_58 = *(int8 *)(param_2 + 0x40);
local_68 = param_3;
local_60 = param_4;
local_40 = param_6;
local_34 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
cVar1 = (**(code **)(param_2 + 0x38))(&local_68);
if (cVar1 == '\0') {
cVar1 = (**(code **)(local_20 + 0x28))(&local_68);
if (cVar1 == '\0') {
local_44 = my_pwrite(*(int4 *)(local_20 + 0x10),local_68,
*(int4 *)(local_18 + 0x80),
local_30 << ((byte)*(int4 *)(local_18 + 400) & 0x3f),local_40);
(**(code **)(local_20 + 0x30))(local_44,&local_68);
local_9 = (int1)local_44;
}
else {
local_9 = 1;
}
}
else {
local_9 = 1;
}
return local_9;
}
| |
39,339 | 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>::at<char const (&) [10], 0>(char const (&) [10]) | monkey531[P]llama/common/json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | 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>& 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>::at<char const (&) [10], 0>(char const (&) [10]):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x7dbab
movq %rsi, %r15
movq 0x8(%r14), %rdi
callq 0x81844
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x7dc09
addq $0x20, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x234b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x469c8
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3b0a9(%rip), %rsi # 0xb8c76
leaq 0x8(%rsp), %rdi
callq 0x80e33
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x4687c
xorl %ebp, %ebp
leaq 0x82340(%rip), %rsi # 0xfff38
leaq -0x3a6a7(%rip), %rdx # 0x43558
movq %rbx, %rdi
callq 0x24050
jmp 0x7dc73
pushq $0x20
popq %rdi
callq 0x234b0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x29c20
leaq 0x3b079(%rip), %rsi # 0xb8ca6
leaq 0x3b078(%rip), %rcx # 0xb8cac
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x8143d
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x45128
xorl %ebp, %ebp
leaq 0x82254(%rip), %rsi # 0xffeb8
leaq -0x3a713(%rip), %rdx # 0x43558
movq %rbx, %rdi
callq 0x24050
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x24348
jmp 0x7dc88
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
jmp 0x7dc99
jmp 0x7dca5
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x24348
testb %bpl, %bpl
jne 0x7dca8
jmp 0x7dcb0
movq %rax, %r14
movq %rbx, %rdi
callq 0x236f0
movq %r14, %rdi
callq 0x240e0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_7DBAB
mov r15, rsi
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_7DC09
add rax, 20h ; ' '
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_7DBAB:
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+68h+var_40]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
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
jmp short loc_7DC73
loc_7DC09:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_7DC73:
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7DC88
mov r14, rax
mov bpl, 1
loc_7DC88:
lea rdi, [rsp+68h+var_40]
jmp short loc_7DC99
jmp short loc_7DCA5
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
loc_7DC99:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7DCA8
jmp short loc_7DCB0
loc_7DCA5:
mov r14, rax
loc_7DCA8:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7DCB0:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx
_BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7[0] = 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(&)[22],char const*>(v6, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
(long long)v6);
__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);
}
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8));
if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::string::basic_string<std::allocator<char>>(v7, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v6,
"key '",
v7,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v5,
403,
(long long)v6,
a1);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v2 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0017dbab
MOV R15,RSI
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x00181844
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0017dc09
ADD RAX,0x20
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0017dbab:
PUSH 0x20
POP RDI
CALL 0x001234b0
MOV RBX,RAX
MOV RDI,R14
CALL 0x001469c8
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_0017dbc6:
LEA RSI,[0x1b8c76]
LEA RDI,[RSP + 0x8]
CALL 0x00180e33
MOV BPL,0x1
LAB_0017dbda:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0014687c
XOR EBP,EBP
LEA RSI,[0x1fff38]
LEA RDX,[0x143558]
MOV RDI,RBX
CALL 0x00124050
LAB_0017dc09:
PUSH 0x20
POP RDI
CALL 0x001234b0
MOV RBX,RAX
LAB_0017dc14:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
MOV RSI,R15
CALL 0x00129c20
LAB_0017dc26:
LEA RSI,[0x1b8ca6]
LEA RCX,[0x1b8cac]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x0018143d
MOV BPL,0x1
LAB_0017dc46:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x00145128
XOR EBP,EBP
LEA RSI,[0x1ffeb8]
LEA RDX,[0x143558]
MOV RDI,RBX
CALL 0x00124050
|
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(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,char *param_2)
{
long lVar1;
int8 uVar2;
allocator local_61;
detail local_60 [32];
char *local_40 [4];
if (*param_1 !=
(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>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[0] = (char *)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>
::type_name(param_1);
/* try { // try from 0017dbc6 to 0017dbd6 has its CatchHandler @ 0017dca5 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_60,"cannot use at() with ",local_40);
/* try { // try from 0017dbda to 0017dc06 has its CatchHandler @ 0017dc91 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x130,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(*(int8 *)(param_1 + 8));
if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) {
return lVar1 + 0x20;
}
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 0017dc14 to 0017dc25 has its CatchHandler @ 0017dc8f */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61);
/* try { // try from 0017dc26 to 0017dc42 has its CatchHandler @ 0017dc82 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_60,"key \'",(string *)local_40,"\' not found");
/* try { // try from 0017dc46 to 0017dc72 has its CatchHandler @ 0017dc73 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x193,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
| |
39,340 | 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>::at<char const (&) [10], 0>(char const (&) [10]) | monkey531[P]llama/common/json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O3 | 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>& 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>::at<char const (&) [10], 0>(char const (&) [10]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xa9541
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xa952b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b210
testl %eax, %eax
je 0xa9520
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xa9501
jmp 0xa9523
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xa959f
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1b480
movq %rax, %rbx
movq %r14, %rdi
callq 0x63c50
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x4c723(%rip), %rsi # 0xf5c86
leaq 0x20(%rsp), %rdi
callq 0xaf7c3
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x639f8
xorl %ebp, %ebp
leaq 0x859ba(%rip), %rsi # 0x12ef48
leaq -0x4970f(%rip), %rdx # 0x5fe86
movq %rbx, %rdi
callq 0x1c040
jmp 0xa9618
movl $0x20, %edi
callq 0x1b480
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1b410
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x2695a
leaq 0x4c6e2(%rip), %rsi # 0xf5cb6
leaq 0x4c6e1(%rip), %rcx # 0xf5cbc
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xafda0
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x61fe8
xorl %ebp, %ebp
leaq 0x858bf(%rip), %rsi # 0x12eec8
leaq -0x4978a(%rip), %rdx # 0x5fe86
movq %rbx, %rdi
callq 0x1c040
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa9636
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b930
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa9681
movq 0x10(%rsp), %rsi
jmp 0xa9679
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa968b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b930
jmp 0xa968b
jmp 0xa9688
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa9681
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b930
testb %bpl, %bpl
jne 0xa968b
jmp 0xa9693
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b6c0
movq %r14, %rdi
callq 0x1c0d0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_A9541
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_A952B
loc_A9501:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_A9520
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_A9501
jmp short loc_A9523
loc_A9520:
mov rax, rbx
loc_A9523:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_A952B:
cmp rax, rbx
jz short loc_A959F
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A9541:
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)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
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
jmp short loc_A9618
loc_A959F:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, 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, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_A9618:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A9636
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A9636:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_A9681
mov rsi, [rsp+68h+var_58]
jmp short loc_A9679
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_A968B
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A968B
jmp short loc_A9688
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A9681
mov rsi, [rsp+68h+var_38]
loc_A9679:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A9681:
test bpl, bpl
jnz short loc_A968B
jmp short loc_A9693
loc_A9688:
mov r14, rax
loc_A968B:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A9693:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)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(&)[22],char const*>(v11, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__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);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v11,
"key '",
v9,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001a9541
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001a952b
LAB_001a9501:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011b210
TEST EAX,EAX
JZ 0x001a9520
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001a9501
JMP 0x001a9523
LAB_001a9520:
MOV RAX,RBX
LAB_001a9523:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001a952b:
CMP RAX,RBX
JZ 0x001a959f
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a9541:
MOV EDI,0x20
CALL 0x0011b480
MOV RBX,RAX
MOV RDI,R14
CALL 0x00163c50
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001a955c:
LEA RSI,[0x1f5c86]
LEA RDI,[RSP + 0x20]
CALL 0x001af7c3
MOV BPL,0x1
LAB_001a9570:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x001639f8
XOR EBP,EBP
LEA RSI,[0x22ef48]
LEA RDX,[0x15fe86]
MOV RDI,RBX
CALL 0x0011c040
LAB_001a959f:
MOV EDI,0x20
CALL 0x0011b480
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011b410
LEA RDX,[RAX + R15*0x1]
LAB_001a95c2:
MOV RDI,RSP
MOV RSI,R15
CALL 0x0012695a
LAB_001a95cd:
LEA RSI,[0x1f5cb6]
LEA RCX,[0x1f5cbc]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001afda0
MOV BPL,0x1
LAB_001a95eb:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x00161fe8
XOR EBP,EBP
LEA RSI,[0x22eec8]
LEA RDX,[0x15fe86]
MOV RDI,RBX
CALL 0x0011c040
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(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,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(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>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)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>
::type_name(param_1);
/* try { // try from 001a955c to 001a956c has its CatchHandler @ 001a9688 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001a9570 to 001a959c has its CatchHandler @ 001a9663 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001a95c2 to 001a95cc has its CatchHandler @ 001a9661 */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001a95cd to 001a95e7 has its CatchHandler @ 001a9646 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001a95eb to 001a9617 has its CatchHandler @ 001a9618 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| |
39,341 | testing::internal::DeathTest::Create(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>, char const*, int, testing::internal::DeathTest**) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-death-test.cc | bool DeathTest::Create(const char* statement,
Matcher<const std::string&> matcher, const char* file,
int line, DeathTest** test) {
return GetUnitTestImpl()->death_test_factory()->Create(
statement, std::move(matcher), file, line, test);
} | O1 | cpp | testing::internal::DeathTest::Create(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>, char const*, int, testing::internal::DeathTest**):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x19012
movq 0x4a412(%rip), %rax # 0x597b0
movq 0x2b0(%rax), %rdi
leaq 0x49684(%rip), %rax # 0x58a30
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq 0x8(%r15), %rax
movq %rax, 0x8(%rdx)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rdx)
movq $0x0, 0x8(%r15)
leaq 0x494c5(%rip), %rax # 0x58898
movq %rax, (%rdx)
movq (%rdi), %rax
movq %r12, %rsi
movq %r14, %rcx
movl %ebp, %r8d
movq %rbx, %r9
callq *0x10(%rax)
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x32246
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x32246
movq %rbx, %rdi
callq 0x8990
| _ZN7testing8internal9DeathTest6CreateEPKcNS_7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES3_iPPS1_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov rbx, r8
mov ebp, ecx
mov r14, rdx
mov r15, rsi
mov r12, rdi
call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void)
mov rax, cs:qword_597B0
mov rdi, [rax+2B0h]
lea rax, off_58A30
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
mov rax, [r15+8]
mov [rdx+8], rax
mov rax, [r15+10h]
mov [rdx+10h], rax
mov qword ptr [r15+8], 0
lea rax, off_58898
mov [rdx], rax
mov rax, [rdi]
mov rsi, r12
mov rcx, r14
mov r8d, ebp
mov r9, rbx
call qword ptr [rax+10h]
mov ebx, eax
lea rdi, [rsp+48h+var_40]
call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase()
mov eax, ebx
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase()
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::DeathTest::Create(
testing::UnitTest *a1,
long long a2,
long long a3,
unsigned int a4,
long long a5)
{
long long v9; // rdi
_QWORD v11[8]; // [rsp+8h] [rbp-40h] BYREF
testing::UnitTest::GetInstance(a1);
v9 = *((_QWORD *)qword_597B0 + 86);
v11[0] = &off_58A30;
v11[1] = *(_QWORD *)(a2 + 8);
v11[2] = *(_QWORD *)(a2 + 16);
*(_QWORD *)(a2 + 8) = 0LL;
v11[0] = &off_58898;
LODWORD(a5) = (*(long long ( **)(long long, testing::UnitTest *, _QWORD *, long long, _QWORD, long long))(*(_QWORD *)v9 + 16LL))(
v9,
a1,
v11,
a3,
a4,
a5);
testing::internal::MatcherBase<std::string const&>::~MatcherBase(v11);
return (unsigned int)a5;
}
| Create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,R8
MOV EBP,ECX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
CALL 0x00119012
MOV RAX,qword ptr [0x001597b0]
MOV RDI,qword ptr [RAX + 0x2b0]
LEA RAX,[0x158a30]
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RDX + 0x8],RAX
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RDX + 0x10],RAX
MOV qword ptr [R15 + 0x8],0x0
LEA RAX,[0x158898]
MOV qword ptr [RDX],RAX
MOV RAX,qword ptr [RDI]
LAB_0010f3d9:
MOV RSI,R12
MOV RCX,R14
MOV R8D,EBP
MOV R9,RBX
CALL qword ptr [RAX + 0x10]
LAB_0010f3e8:
MOV EBX,EAX
LEA RDI,[RSP + 0x8]
CALL 0x00132246
MOV EAX,EBX
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::DeathTest::Create(char const*, testing::Matcher<std::__cxx11::string const&>,
char const*, int, testing::internal::DeathTest**) */
int4
testing::internal::DeathTest::Create
(int8 param_1,long param_2,int8 param_3,int4 param_4,int8 param_5)
{
long *plVar1;
int4 uVar2;
int **local_40;
int8 local_38;
int8 local_30;
UnitTest::GetInstance();
plVar1 = *(long **)(UnitTest::GetInstance()::instance._64_8_ + 0x2b0);
local_38 = *(int8 *)(param_2 + 8);
local_30 = *(int8 *)(param_2 + 0x10);
*(int8 *)(param_2 + 8) = 0;
local_40 = &PTR__MatcherBase_00158898;
/* try { // try from 0010f3d9 to 0010f3e7 has its CatchHandler @ 0010f403 */
uVar2 = (**(code **)(*plVar1 + 0x10))(plVar1,param_1,&local_40,param_3,param_4,param_5);
MatcherBase<std::__cxx11::string_const&>::~MatcherBase
((MatcherBase<std::__cxx11::string_const&> *)&local_40);
return uVar2;
}
| |
39,342 | minja::Value::contains(minja::Value const&) const | llama.cpp/common/minja/minja.hpp | bool contains(const Value & value) const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (array_) {
for (const auto& item : *array_) {
if (item.to_bool() && item == value) return true;
}
return false;
} else if (object_) {
if (!value.is_hashable()) throw std::runtime_error("Unashable type: " + value.dump());
return object_->find(value.primitive_) != object_->end();
} else {
throw std::runtime_error("contains can only be called on arrays and objects: " + dump());
}
} | O3 | cpp | minja::Value::contains(minja::Value const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rdi), %rax
movq 0x20(%rdi), %r12
testq %r12, %r12
jne 0x773b0
testq %rax, %rax
jne 0x773b0
cmpb $0x0, 0x40(%r15)
jne 0x773b0
cmpq $0x0, 0x30(%r15)
je 0x77460
testq %rax, %rax
je 0x773e6
movq (%rax), %r14
movq 0x8(%rax), %r15
cmpq %r15, %r14
je 0x773e2
movq %r14, %rdi
callq 0x75bac
testb %al, %al
je 0x773dc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7778c
testb %al, %al
jne 0x77451
addq $0x50, %r14
jmp 0x773bc
xorl %eax, %eax
jmp 0x77453
testq %r12, %r12
je 0x77492
cmpq $0x0, 0x10(%rbx)
jne 0x774ef
cmpq $0x0, 0x20(%rbx)
jne 0x774ef
cmpq $0x0, 0x30(%rbx)
jne 0x774ef
movq (%r12), %r14
cmpq 0x8(%r12), %r14
je 0x77446
addq $0x40, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x72f7c
testb %al, %al
jne 0x77439
addq $0x60, %r14
cmpq 0x8(%r12), %r14
jne 0x7741f
movq %r14, %rax
movq 0x20(%r15), %rcx
movq 0x8(%rcx), %r14
jmp 0x77449
movq %r14, %rax
cmpq %r14, %rax
setne %al
jmp 0x77453
movb $0x1, %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1c460
movq %rax, %r14
leaq 0x54b06(%rip), %rsi # 0xcbf7a
movq %rax, %rdi
callq 0x1c280
movq 0x88b35(%rip), %rsi # 0xfffb8
movq 0x88aee(%rip), %rdx # 0xfff78
movq %r14, %rdi
callq 0x1c7b0
movl $0x10, %edi
callq 0x1c460
movq %rax, %r14
movq %rsp, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x6cb9a
leaq 0x54dc5(%rip), %rsi # 0xcc27d
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x66b64
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1c2c0
xorl %ebp, %ebp
movq 0x88ada(%rip), %rsi # 0xfffb8
movq 0x88a93(%rip), %rdx # 0xfff78
movq %r14, %rdi
callq 0x1c7b0
jmp 0x7754a
movl $0x10, %edi
callq 0x1c460
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x6cb9a
leaq 0x54d57(%rip), %rsi # 0xcc26c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x66b64
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1c2c0
xorl %ebp, %ebp
movq 0x88a7d(%rip), %rsi # 0xfffb8
movq 0x88a36(%rip), %rdx # 0xfff78
movq %r14, %rdi
callq 0x1c7b0
jmp 0x7754e
jmp 0x7758e
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7756c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1c110
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x77587
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
testb %bpl, %bpl
jne 0x775b5
jmp 0x775bd
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x775b5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
jmp 0x775b5
jmp 0x775b2
jmp 0x775b2
movq %rax, %rbx
movq %r14, %rdi
callq 0x1caa0
movq %rbx, %rdi
callq 0x1c7d0
nop
| _ZNK5minja5Value8containsERKS0_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rbx, rsi
mov r15, rdi
mov rax, [rdi+10h]
mov r12, [rdi+20h]
test r12, r12
jnz short loc_773B0
test rax, rax
jnz short loc_773B0
cmp byte ptr [r15+40h], 0
jnz short loc_773B0
cmp qword ptr [r15+30h], 0
jz loc_77460
loc_773B0:
test rax, rax
jz short loc_773E6
mov r14, [rax]
mov r15, [rax+8]
loc_773BC:
cmp r14, r15
jz short loc_773E2
mov rdi, r14; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
test al, al
jz short loc_773DC
mov rdi, r14
mov rsi, rbx
call _ZNK5minja5ValueeqERKS0_; minja::Value::operator==(minja::Value const&)
test al, al
jnz short loc_77451
loc_773DC:
add r14, 50h ; 'P'
jmp short loc_773BC
loc_773E2:
xor eax, eax
jmp short loc_77453
loc_773E6:
test r12, r12
jz loc_77492
cmp qword ptr [rbx+10h], 0
jnz loc_774EF
cmp qword ptr [rbx+20h], 0
jnz loc_774EF
cmp qword ptr [rbx+30h], 0
jnz loc_774EF
mov r14, [r12]
cmp r14, [r12+8]
jz short loc_77446
add rbx, 40h ; '@'
loc_7741F:
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(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&,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&)
test al, al
jnz short loc_77439
add r14, 60h ; '`'
cmp r14, [r12+8]
jnz short loc_7741F
loc_77439:
mov rax, r14
mov rcx, [r15+20h]
mov r14, [rcx+8]
jmp short loc_77449
loc_77446:
mov rax, r14
loc_77449:
cmp rax, r14
setnz al
jmp short loc_77453
loc_77451:
mov al, 1
loc_77453:
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_77460:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
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, r14; void *
call ___cxa_throw
loc_77492:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aContainsCanOnl; "contains can only be called on arrays a"...
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
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, r14; void *
call ___cxa_throw
jmp short loc_7754A
loc_774EF:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
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, r14; void *
call ___cxa_throw
loc_7754A:
jmp short loc_7754E
jmp short loc_7758E
loc_7754E:
mov rbx, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7756C
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7756C:
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_77587
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77587:
test bpl, bpl
jnz short loc_775B5
jmp short loc_775BD
loc_7758E:
mov rbx, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_775B5
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_775B5
jmp short loc_775B2
jmp short $+2
loc_775B2:
mov rbx, rax
loc_775B5:
mov rdi, r14; void *
call ___cxa_free_exception
loc_775BD:
mov rdi, rbx
call __Unwind_Resume
| bool minja::Value::contains(minja::Value *this, const minja::Value *a2, __m128d a3)
{
minja::Value **v3; // rax
unsigned __int8 **v4; // r12
minja::Value *v5; // r14
minja::Value *v6; // r15
unsigned __int8 *v8; // r14
unsigned __int8 *v9; // rax
std::runtime_error *exception; // r14
void *v11; // r14
void *v12; // r14
_BYTE v13[16]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v14[2]; // [rsp+20h] [rbp-48h] BYREF
v3 = (minja::Value **)*((_QWORD *)this + 2);
v4 = (unsigned __int8 **)*((_QWORD *)this + 4);
if ( !v4 && !v3 && !*((_BYTE *)this + 64) && !*((_QWORD *)this + 6) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v3 )
{
v5 = *v3;
v6 = v3[1];
while ( 1 )
{
if ( v5 == v6 )
return 0;
if ( (unsigned __int8)minja::Value::to_bool(v5) && (unsigned __int8)minja::Value::operator==(v5, a2) )
break;
v5 = (minja::Value *)((char *)v5 + 80);
}
return 1;
}
else
{
if ( !v4 )
{
v11 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v13, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>(v14, (long long)"contains can only be called on arrays and objects: ", (long long)v13);
std::runtime_error::runtime_error(v11, v14);
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) )
{
v12 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v13, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>(v14, (long long)"Unashable type: ", (long long)v13);
std::runtime_error::runtime_error(v12, v14);
__cxa_throw(
v12,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v8 = *v4;
if ( *v4 == v4[1] )
{
v9 = *v4;
}
else
{
do
{
if ( (unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v8, (unsigned __int8 *)a2 + 64, a3) )
break;
v8 += 96;
}
while ( v8 != v4[1] );
v9 = v8;
v8 = *(unsigned __int8 **)(*((_QWORD *)this + 4) + 8LL);
}
return v9 != v8;
}
}
| contains:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV R12,qword ptr [RDI + 0x20]
TEST R12,R12
JNZ 0x001773b0
TEST RAX,RAX
JNZ 0x001773b0
CMP byte ptr [R15 + 0x40],0x0
JNZ 0x001773b0
CMP qword ptr [R15 + 0x30],0x0
JZ 0x00177460
LAB_001773b0:
TEST RAX,RAX
JZ 0x001773e6
MOV R14,qword ptr [RAX]
MOV R15,qword ptr [RAX + 0x8]
LAB_001773bc:
CMP R14,R15
JZ 0x001773e2
MOV RDI,R14
CALL 0x00175bac
TEST AL,AL
JZ 0x001773dc
MOV RDI,R14
MOV RSI,RBX
CALL 0x0017778c
TEST AL,AL
JNZ 0x00177451
LAB_001773dc:
ADD R14,0x50
JMP 0x001773bc
LAB_001773e2:
XOR EAX,EAX
JMP 0x00177453
LAB_001773e6:
TEST R12,R12
JZ 0x00177492
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x001774ef
CMP qword ptr [RBX + 0x20],0x0
JNZ 0x001774ef
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x001774ef
MOV R14,qword ptr [R12]
CMP R14,qword ptr [R12 + 0x8]
JZ 0x00177446
ADD RBX,0x40
LAB_0017741f:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00172f7c
TEST AL,AL
JNZ 0x00177439
ADD R14,0x60
CMP R14,qword ptr [R12 + 0x8]
JNZ 0x0017741f
LAB_00177439:
MOV RAX,R14
MOV RCX,qword ptr [R15 + 0x20]
MOV R14,qword ptr [RCX + 0x8]
JMP 0x00177449
LAB_00177446:
MOV RAX,R14
LAB_00177449:
CMP RAX,R14
SETNZ AL
JMP 0x00177453
LAB_00177451:
MOV AL,0x1
LAB_00177453:
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00177460:
MOV EDI,0x10
CALL 0x0011c460
MOV R14,RAX
LAB_0017746d:
LEA RSI,[0x1cbf7a]
MOV RDI,RAX
CALL 0x0011c280
LAB_0017747c:
MOV RSI,qword ptr [0x001fffb8]
MOV RDX,qword ptr [0x001fff78]
MOV RDI,R14
CALL 0x0011c7b0
LAB_00177492:
MOV EDI,0x10
CALL 0x0011c460
MOV R14,RAX
LAB_0017749f:
MOV RDI,RSP
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0016cb9a
LAB_001774b1:
LEA RSI,[0x1cc27d]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00166b64
MOV BPL,0x1
LAB_001774c8:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011c2c0
XOR EBP,EBP
MOV RSI,qword ptr [0x001fffb8]
MOV RDX,qword ptr [0x001fff78]
MOV RDI,R14
CALL 0x0011c7b0
LAB_001774ef:
MOV EDI,0x10
CALL 0x0011c460
MOV R14,RAX
LAB_001774fc:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0016cb9a
LAB_0017750e:
LEA RSI,[0x1cc26c]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00166b64
MOV BPL,0x1
LAB_00177525:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011c2c0
XOR EBP,EBP
MOV RSI,qword ptr [0x001fffb8]
MOV RDX,qword ptr [0x001fff78]
MOV RDI,R14
CALL 0x0011c7b0
|
/* minja::Value::contains(minja::Value const&) const */
bool __thiscall minja::Value::contains(Value *this,Value *param_1)
{
int8 *puVar1;
long *plVar2;
Value *pVVar3;
char cVar4;
runtime_error *prVar5;
Value *this_00;
basic_json *pbVar6;
basic_json *pbVar7;
bool bVar8;
int1 auStack_68 [32];
string local_48 [32];
puVar1 = *(int8 **)(this + 0x10);
plVar2 = *(long **)(this + 0x20);
if ((((plVar2 == (long *)0x0) && (puVar1 == (int8 *)0x0)) && (this[0x40] == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0017746d to 0017747b has its CatchHandler @ 001775b2 */
std::runtime_error::runtime_error(prVar5,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78);
}
if (puVar1 == (int8 *)0x0) {
if (plVar2 == (long *)0x0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0017749f to 001774b0 has its CatchHandler @ 001775b0 */
dump_abi_cxx11_((int)auStack_68,SUB81(this,0));
/* try { // try from 001774b1 to 001774c4 has its CatchHandler @ 0017758e */
std::operator+((char *)local_48,
(string *)"contains can only be called on arrays and objects: ");
/* try { // try from 001774c8 to 001774ec has its CatchHandler @ 0017754e */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78);
}
if (((*(long *)(param_1 + 0x10) != 0) || (*(long *)(param_1 + 0x20) != 0)) ||
(*(long *)(param_1 + 0x30) != 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001774fc to 0017750d has its CatchHandler @ 001775ae */
dump_abi_cxx11_((int)auStack_68,SUB81(param_1,0));
/* try { // try from 0017750e to 00177521 has its CatchHandler @ 0017754c */
std::operator+((char *)local_48,(string *)"Unashable type: ");
/* try { // try from 00177525 to 00177549 has its CatchHandler @ 0017754a */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78);
}
pbVar6 = (basic_json *)*plVar2;
pbVar7 = pbVar6;
if (pbVar6 != (basic_json *)plVar2[1]) {
do {
cVar4 = nlohmann::json_abi_v3_11_3::operator==(pbVar6,(basic_json *)(param_1 + 0x40));
if (cVar4 != '\0') break;
pbVar6 = pbVar6 + 0x60;
} while (pbVar6 != (basic_json *)plVar2[1]);
pbVar7 = *(basic_json **)(*(long *)(this + 0x20) + 8);
}
bVar8 = pbVar6 != pbVar7;
}
else {
pVVar3 = (Value *)puVar1[1];
for (this_00 = (Value *)*puVar1; this_00 != pVVar3; this_00 = this_00 + 0x50) {
cVar4 = to_bool(this_00);
if ((cVar4 != '\0') && (cVar4 = operator==(this_00,param_1), cVar4 != '\0')) {
return true;
}
}
bVar8 = false;
}
return bVar8;
}
| |
39,343 | my_mb_wc_utf8mb4_quick | eloqsql/strings/ctype-utf8.h | static inline int
my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
{
*pwc= c;
return 1;
}
else if (c < 0xc2)
return MY_CS_ILSEQ;
else if (c < 0xe0)
{
if (s + 2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
else if (c < 0xf0)
{
if (s + 3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (s + 4 > e) /* We need 4 characters */
return MY_CS_TOOSMALL4;
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
} | O3 | c | my_mb_wc_utf8mb4_quick:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rdx, %rsi
jae 0xc0693
movzbl (%rsi), %ecx
testb %cl, %cl
js 0xc068c
movl $0x1, %eax
movq %rcx, (%rdi)
jmp 0xc0693
cmpb $-0x3e, %cl
jae 0xc0695
xorl %eax, %eax
popq %rbp
retq
cmpb $-0x21, %cl
ja 0xc06cb
leaq 0x2(%rsi), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rdx, %r8
ja 0xc0693
movzbl 0x1(%rsi), %edx
xorl $0x80, %edx
movl $0x0, %eax
cmpb $0x3f, %dl
ja 0xc0693
andl $0x1f, %ecx
shll $0x6, %ecx
orl %edx, %ecx
movl $0x2, %eax
jmp 0xc0687
cmpb $-0x11, %cl
ja 0xc072d
leaq 0x3(%rsi), %r8
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rdx, %r8
ja 0xc0693
movzbl 0x1(%rsi), %edx
cmpb $-0x41, %dl
jg 0xc0691
movzbl 0x2(%rsi), %esi
cmpb $-0x41, %sil
jg 0xc0691
cmpl $0xe0, %ecx
sete %r8b
cmpb $-0x60, %dl
setb %r9b
movl $0x0, %eax
testb %r9b, %r8b
jne 0xc0693
shll $0xc, %ecx
movzwl %cx, %eax
andl $0x3f, %edx
shll $0x6, %edx
orl %eax, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x3, %eax
movq %rsi, %rcx
jmp 0xc0687
cmpb $-0xc, %cl
ja 0xc0691
leaq 0x4(%rsi), %r8
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rdx, %r8
ja 0xc0693
movzbl 0x1(%rsi), %r8d
cmpb $-0x41, %r8b
jg 0xc0691
movzbl 0x2(%rsi), %edx
cmpb $-0x41, %dl
jg 0xc0691
movzbl 0x3(%rsi), %esi
cmpb $-0x41, %sil
jg 0xc0691
cmpl $0xf0, %ecx
sete %al
cmpb $-0x70, %r8b
setb %r9b
testb %r9b, %al
jne 0xc0691
cmpl $0xf4, %ecx
sete %r9b
cmpb $-0x70, %r8b
setae %r10b
movl $0x0, %eax
testb %r10b, %r9b
jne 0xc0693
andl $0x7, %ecx
shll $0x12, %ecx
andl $0x3f, %r8d
shll $0xc, %r8d
orl %ecx, %r8d
andl $0x3f, %edx
shll $0x6, %edx
orl %r8d, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x4, %eax
jmp 0xc0725
| my_mb_wc_utf8mb4_quick:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rsi, rdx
jnb short loc_C0693
movzx ecx, byte ptr [rsi]
test cl, cl
js short loc_C068C
mov eax, 1
loc_C0687:
mov [rdi], rcx
jmp short loc_C0693
loc_C068C:
cmp cl, 0C2h
jnb short loc_C0695
loc_C0691:
xor eax, eax
loc_C0693:
pop rbp
retn
loc_C0695:
cmp cl, 0DFh
ja short loc_C06CB
lea r8, [rsi+2]
mov eax, 0FFFFFF9Ah
cmp r8, rdx
ja short loc_C0693
movzx edx, byte ptr [rsi+1]
xor edx, 80h
mov eax, 0
cmp dl, 3Fh ; '?'
ja short loc_C0693
and ecx, 1Fh
shl ecx, 6
or ecx, edx
mov eax, 2
jmp short loc_C0687
loc_C06CB:
cmp cl, 0EFh
ja short loc_C072D
lea r8, [rsi+3]
mov eax, 0FFFFFF99h
cmp r8, rdx
ja short loc_C0693
movzx edx, byte ptr [rsi+1]
cmp dl, 0BFh
jg short loc_C0691
movzx esi, byte ptr [rsi+2]
cmp sil, 0BFh
jg short loc_C0691
cmp ecx, 0E0h
setz r8b
cmp dl, 0A0h
setb r9b
mov eax, 0
test r8b, r9b
jnz short loc_C0693
shl ecx, 0Ch
movzx eax, cx
and edx, 3Fh
shl edx, 6
or edx, eax
and esi, 3Fh
or rsi, rdx
mov eax, 3
loc_C0725:
mov rcx, rsi
jmp loc_C0687
loc_C072D:
cmp cl, 0F4h
ja loc_C0691
lea r8, [rsi+4]
mov eax, 0FFFFFF98h
cmp r8, rdx
ja loc_C0693
movzx r8d, byte ptr [rsi+1]
cmp r8b, 0BFh
jg loc_C0691
movzx edx, byte ptr [rsi+2]
cmp dl, 0BFh
jg loc_C0691
movzx esi, byte ptr [rsi+3]
cmp sil, 0BFh
jg loc_C0691
cmp ecx, 0F0h
setz al
cmp r8b, 90h
setb r9b
test al, r9b
jnz loc_C0691
cmp ecx, 0F4h
setz r9b
cmp r8b, 90h
setnb r10b
mov eax, 0
test r9b, r10b
jnz loc_C0693
and ecx, 7
shl ecx, 12h
and r8d, 3Fh
shl r8d, 0Ch
or r8d, ecx
and edx, 3Fh
shl edx, 6
or edx, r8d
and esi, 3Fh
or rsi, rdx
mov eax, 4
jmp loc_C0725
| long long my_mb_wc_utf8mb4_quick(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
unsigned long long v4; // rcx
char v5; // dl
char v6; // si
unsigned long long v7; // rsi
char v8; // r8
char v9; // dl
char v10; // si
result = 4294967195LL;
if ( (unsigned long long)a2 >= a3 )
return result;
v4 = *a2;
if ( (v4 & 0x80u) == 0LL )
{
result = 1LL;
LABEL_4:
*a1 = v4;
return result;
}
if ( (unsigned __int8)v4 < 0xC2u )
return 0LL;
if ( (unsigned __int8)v4 > 0xDFu )
{
if ( (unsigned __int8)v4 > 0xEFu )
{
if ( (unsigned __int8)v4 <= 0xF4u )
{
result = 4294967192LL;
if ( (unsigned long long)(a2 + 4) > a3 )
return result;
v8 = a2[1];
if ( v8 <= -65 )
{
v9 = a2[2];
if ( v9 <= -65 )
{
v10 = a2[3];
if ( v10 <= -65 && ((unsigned __int8)v8 >= 0x90u || (_DWORD)v4 != 240) )
{
result = 0LL;
if ( (unsigned __int8)v8 >= 0x90u && (_DWORD)v4 == 244 )
return result;
v7 = ((v4 & 7) << 18) | ((unsigned __int8)(v8 & 0x3F) << 12) | ((unsigned __int8)(v9 & 0x3F) << 6) | v10 & 0x3F;
result = 4LL;
LABEL_18:
v4 = v7;
goto LABEL_4;
}
}
}
}
}
else
{
result = 4294967193LL;
if ( (unsigned long long)(a2 + 3) > a3 )
return result;
v5 = a2[1];
if ( v5 <= -65 )
{
v6 = a2[2];
if ( v6 <= -65 )
{
result = 0LL;
if ( (unsigned __int8)v5 < 0xA0u && (_DWORD)v4 == 224 )
return result;
v7 = (unsigned __int16)((_WORD)v4 << 12) | ((unsigned __int8)(v5 & 0x3F) << 6) | (unsigned long long)(v6 & 0x3F);
result = 3LL;
goto LABEL_18;
}
}
}
return 0LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a2 + 2) <= a3 )
{
result = 0LL;
if ( (a2[1] ^ 0x80u) <= 0x3F )
{
v4 = a2[1] ^ 0x80 | ((unsigned __int8)(v4 & 0x1F) << 6);
result = 2LL;
goto LABEL_4;
}
}
return result;
}
| my_mb_wc_utf8mb4_quick:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RSI,RDX
JNC 0x001c0693
MOVZX ECX,byte ptr [RSI]
TEST CL,CL
JS 0x001c068c
MOV EAX,0x1
LAB_001c0687:
MOV qword ptr [RDI],RCX
JMP 0x001c0693
LAB_001c068c:
CMP CL,0xc2
JNC 0x001c0695
LAB_001c0691:
XOR EAX,EAX
LAB_001c0693:
POP RBP
RET
LAB_001c0695:
CMP CL,0xdf
JA 0x001c06cb
LEA R8,[RSI + 0x2]
MOV EAX,0xffffff9a
CMP R8,RDX
JA 0x001c0693
MOVZX EDX,byte ptr [RSI + 0x1]
XOR EDX,0x80
MOV EAX,0x0
CMP DL,0x3f
JA 0x001c0693
AND ECX,0x1f
SHL ECX,0x6
OR ECX,EDX
MOV EAX,0x2
JMP 0x001c0687
LAB_001c06cb:
CMP CL,0xef
JA 0x001c072d
LEA R8,[RSI + 0x3]
MOV EAX,0xffffff99
CMP R8,RDX
JA 0x001c0693
MOVZX EDX,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x001c0691
MOVZX ESI,byte ptr [RSI + 0x2]
CMP SIL,0xbf
JG 0x001c0691
CMP ECX,0xe0
SETZ R8B
CMP DL,0xa0
SETC R9B
MOV EAX,0x0
TEST R8B,R9B
JNZ 0x001c0693
SHL ECX,0xc
MOVZX EAX,CX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,EAX
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x3
LAB_001c0725:
MOV RCX,RSI
JMP 0x001c0687
LAB_001c072d:
CMP CL,0xf4
JA 0x001c0691
LEA R8,[RSI + 0x4]
MOV EAX,0xffffff98
CMP R8,RDX
JA 0x001c0693
MOVZX R8D,byte ptr [RSI + 0x1]
CMP R8B,0xbf
JG 0x001c0691
MOVZX EDX,byte ptr [RSI + 0x2]
CMP DL,0xbf
JG 0x001c0691
MOVZX ESI,byte ptr [RSI + 0x3]
CMP SIL,0xbf
JG 0x001c0691
CMP ECX,0xf0
SETZ AL
CMP R8B,0x90
SETC R9B
TEST AL,R9B
JNZ 0x001c0691
CMP ECX,0xf4
SETZ R9B
CMP R8B,0x90
SETNC R10B
MOV EAX,0x0
TEST R9B,R10B
JNZ 0x001c0693
AND ECX,0x7
SHL ECX,0x12
AND R8D,0x3f
SHL R8D,0xc
OR R8D,ECX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,R8D
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x4
JMP 0x001c0725
|
int8 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3)
{
byte bVar1;
byte bVar2;
int8 uVar3;
uint uVar4;
ulong uVar5;
if (param_3 <= param_2) {
return 0xffffff9b;
}
bVar1 = *param_2;
uVar5 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
if (0xc1 < bVar1) {
uVar4 = (uint)bVar1;
if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
return 0xffffff9a;
}
if (0x3f < (byte)(param_2[1] ^ 0x80)) {
return 0;
}
uVar5 = (ulong)((uVar4 & 0x1f) << 6 | param_2[1] ^ 0x80);
uVar3 = 2;
goto LAB_001c0687;
}
if (bVar1 < 0xf0) {
if (param_3 < param_2 + 3) {
return 0xffffff99;
}
bVar2 = param_2[1];
if (((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) {
if (uVar4 == 0xe0 && bVar2 < 0xa0) {
return 0;
}
uVar4 = param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc;
uVar3 = 3;
LAB_001c0725:
uVar5 = (ulong)uVar4;
goto LAB_001c0687;
}
}
else if (bVar1 < 0xf5) {
if (param_3 < param_2 + 4) {
return 0xffffff98;
}
bVar1 = param_2[1];
if (((((char)bVar1 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) &&
(uVar4 != 0xf0 || 0x8f < bVar1)) {
if (uVar4 == 0xf4 && 0x8f < bVar1) {
return 0;
}
uVar4 = param_2[3] & 0x3f |
(param_2[2] & 0x3f) << 6 | (bVar1 & 0x3f) << 0xc | (uVar4 & 7) << 0x12;
uVar3 = 4;
goto LAB_001c0725;
}
}
}
uVar3 = 0;
}
else {
uVar3 = 1;
LAB_001c0687:
*param_1 = uVar5;
}
return uVar3;
}
| |
39,344 | minja::Parser::parseStringConcat() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseStringConcat() {
auto left = parseMathPow();
if (!left) throw std::runtime_error("Expected left side of 'string concat' expression");
static std::regex concat_tok(R"(~(?!\}))");
if (!consumeToken(concat_tok).empty()) {
auto right = parseLogicalAnd();
if (!right) throw std::runtime_error("Expected right side of 'string concat' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::StrConcat);
}
return left;
} | O2 | cpp | minja::Parser::parseStringConcat():
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x63e8a
cmpq $0x0, (%rbx)
je 0x63d1b
leaq 0x99437(%rip), %rax # 0xfd0a0
movb (%rax), %al
testb %al, %al
je 0x63d50
leaq 0x99406(%rip), %rdx # 0xfd080
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x604c0
leaq 0x30(%rsp), %rdi
movq 0x8(%rdi), %r15
callq 0x241b8
testq %r15, %r15
je 0x63d0e
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x61b64
cmpq $0x0, 0x8(%rsp)
je 0x63da5
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x6009c
leaq 0x1c(%rsp), %r8
andl $0x0, (%r8)
leaq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rcx
movq %rbx, %rdx
callq 0x6403b
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x70ea4
leaq 0x28(%rsp), %rdi
callq 0x4f578
leaq 0x38(%rsp), %rdi
callq 0x4f578
leaq 0x10(%rsp), %rdi
callq 0x4f578
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r15
leaq 0x4f111(%rip), %rsi # 0xb2e3e
movq %rax, %rdi
callq 0x23310
movq 0x982b4(%rip), %rsi # 0xfbff0
movq 0x98215(%rip), %rdx # 0xfbf58
movq %r15, %rdi
callq 0x23ef0
jmp 0x63dd5
leaq 0x99349(%rip), %rdi # 0xfd0a0
callq 0x23ff0
testl %eax, %eax
je 0x63c73
leaq 0x99315(%rip), %rdi # 0xfd080
leaq 0x4f0fd(%rip), %rsi # 0xb2e6f
pushq $0x10
popq %rdx
callq 0x460ca
leaq -0x1da91(%rip), %rdi # 0x462f0
leaq 0x992f8(%rip), %rsi # 0xfd080
leaq 0x98b59(%rip), %rdx # 0xfc8e8
callq 0x237b0
leaq 0x99305(%rip), %rdi # 0xfd0a0
callq 0x235d0
jmp 0x63c73
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r15
leaq 0x4f0c0(%rip), %rsi # 0xb2e77
movq %rax, %rdi
callq 0x23310
movq 0x9822a(%rip), %rsi # 0xfbff0
movq 0x9818b(%rip), %rdx # 0xfbf58
movq %r15, %rdi
callq 0x23ef0
movq %rax, %r14
leaq 0x992c1(%rip), %rdi # 0xfd0a0
callq 0x235c0
jmp 0x63e27
jmp 0x63e13
movq %rax, %r14
movq %r15, %rdi
callq 0x23680
jmp 0x63e16
jmp 0x63e24
movq %rax, %r14
movq %r15, %rdi
callq 0x23680
jmp 0x63e27
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x4f578
jmp 0x63e16
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4f578
jmp 0x63e27
jmp 0x63e24
movq %rax, %r14
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x4f578
movq %r14, %rdi
callq 0x23f80
| _ZN5minja6Parser17parseStringConcatEv:
push r15
push r14
push rbx
sub rsp, 50h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser12parseMathPowEv; minja::Parser::parseMathPow(void)
cmp qword ptr [rbx], 0
jz loc_63D1B
lea rax, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; `guard variable for'minja::Parser::parseStringConcat(void)::concat_tok
mov al, [rax]
test al, al
jz loc_63D50
loc_63C73:
lea rdx, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; minja::Parser::parseStringConcat(void)::concat_tok
lea rdi, [rsp+68h+var_38]
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+68h+var_38]; void *
mov r15, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15, r15
jz short loc_63D0E
lea rdi, [rsp+68h+var_60]; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void)
cmp [rsp+68h+var_60], 0
jz loc_63DA5
lea rdi, [rsp+68h+var_38]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea r8, [rsp+68h+var_4C]
and dword ptr [r8], 0
lea rdi, [rsp+68h+var_48]
lea rsi, [rsp+68h+var_38]
lea rcx, [rsp+68h+var_60]
mov rdx, rbx
call _ZSt11make_sharedIN5minja12BinaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEES5_NS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&)
lea rsi, [rsp+68h+var_48]
mov rdi, rbx
call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE
lea rdi, [rsp+68h+var_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+68h+var_30]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+68h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_63D0E:
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
loc_63D1B:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_2; "Expected left side of 'string concat' e"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp loc_63DD5
loc_63D50:
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_63C73
lea rdi, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; minja::Parser::parseStringConcat(void)::concat_tok
lea rsi, asc_B2E6F; "~(?!\\})"
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, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_63C73
loc_63DA5:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_2; "Expected right side of 'string concat' "...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_63DD5:
mov r14, rax
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_63E27
jmp short loc_63E13
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_63E16
jmp short loc_63E24
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_63E27
mov r14, rax
lea rdi, [rsp+68h+var_30]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_63E16
loc_63E13:
mov r14, rax
loc_63E16:
lea rdi, [rsp+68h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_63E27
jmp short $+2
loc_63E24:
mov r14, rax
loc_63E27:
add rbx, 8
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
| minja::Parser * minja::Parser::parseStringConcat(minja::Parser *this, _QWORD *a2)
{
long long v2; // r15
std::runtime_error *exception; // r15
std::runtime_error *v5; // r15
long long v6; // [rsp+8h] [rbp-60h] BYREF
long long v7; // [rsp+10h] [rbp-58h] BYREF
int v8; // [rsp+1Ch] [rbp-4Ch] BYREF
_BYTE v9[8]; // [rsp+20h] [rbp-48h] BYREF
long long v10; // [rsp+28h] [rbp-40h] BYREF
long long v11; // [rsp+30h] [rbp-38h] BYREF
_QWORD v12[6]; // [rsp+38h] [rbp-30h] BYREF
minja::Parser::parseMathPow(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'string concat' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
(long long)"~(?!\\})",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
&v11,
(long long)a2,
(long long)&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
1u);
v2 = v12[0];
std::string::~string(&v11);
if ( v2 )
{
minja::Parser::parseLogicalAnd((minja::Parser *)&v6, a2);
if ( !v6 )
{
v5 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v5, "Expected right side of 'string concat' expression");
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Parser::get_location((minja::Parser *)&v11, a2);
v8 = 0;
std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(
v9,
&v11,
this,
&v6,
&v8);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(this, v9);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7);
}
return this;
}
| parseStringConcat:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R14,RSI
MOV RBX,RDI
CALL 0x00163e8a
CMP qword ptr [RBX],0x0
JZ 0x00163d1b
LEA RAX,[0x1fd0a0]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00163d50
LAB_00163c73:
LEA RDX,[0x1fd080]
LEA RDI,[RSP + 0x30]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x001604c0
LEA RDI,[RSP + 0x30]
MOV R15,qword ptr [RDI + 0x8]
CALL 0x001241b8
TEST R15,R15
JZ 0x00163d0e
LAB_00163c9d:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x00161b64
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00163da5
LAB_00163cb6:
LEA RDI,[RSP + 0x30]
MOV RSI,R14
CALL 0x0016009c
LEA R8,[RSP + 0x1c]
AND dword ptr [R8],0x0
LAB_00163ccc:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x30]
LEA RCX,[RSP + 0x8]
MOV RDX,RBX
CALL 0x0016403b
LAB_00163ce3:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00170ea4
LEA RDI,[RSP + 0x28]
CALL 0x0014f578
LEA RDI,[RSP + 0x38]
CALL 0x0014f578
LEA RDI,[RSP + 0x10]
CALL 0x0014f578
LAB_00163d0e:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
LAB_00163d1b:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R15,RAX
LAB_00163d26:
LEA RSI,[0x1b2e3e]
MOV RDI,RAX
CALL 0x00123310
LAB_00163d35:
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R15
CALL 0x00123ef0
LAB_00163d50:
LEA RDI,[0x1fd0a0]
CALL 0x00123ff0
TEST EAX,EAX
JZ 0x00163c73
LAB_00163d64:
LEA RDI,[0x1fd080]
LEA RSI,[0x1b2e6f]
PUSH 0x10
POP RDX
CALL 0x001460ca
LAB_00163d7a:
LEA RDI,[0x1462f0]
LEA RSI,[0x1fd080]
LEA RDX,[0x1fc8e8]
CALL 0x001237b0
LEA RDI,[0x1fd0a0]
CALL 0x001235d0
JMP 0x00163c73
LAB_00163da5:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R15,RAX
LAB_00163db0:
LEA RSI,[0x1b2e77]
MOV RDI,RAX
CALL 0x00123310
LAB_00163dbf:
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R15
CALL 0x00123ef0
|
/* minja::Parser::parseStringConcat() */
void minja::Parser::parseStringConcat(void)
{
int iVar1;
runtime_error *prVar2;
__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *in_RDI;
long local_60;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [12];
int4 local_4c;
Location local_48 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [8];
string local_38 [8];
long local_30 [3];
parseMathPow();
if (*(long *)in_RDI == 0) {
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00163d26 to 00163d34 has its CatchHandler @ 00163df7 */
std::runtime_error::runtime_error(prVar2,"Expected left side of \'string concat\' expression");
/* try { // try from 00163d35 to 00163d4a has its CatchHandler @ 00163df5 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
if (parseStringConcat()::concat_tok_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseStringConcat()::concat_tok_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 00163d64 to 00163d79 has its CatchHandler @ 00163dd5 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseStringConcat()::concat_tok_abi_cxx11_,"~(?!\\})",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseStringConcat()::concat_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseStringConcat()::concat_tok_abi_cxx11_);
}
}
/* try { // try from 00163c73 to 00163c89 has its CatchHandler @ 00163e24 */
consumeToken(local_38);
std::__cxx11::string::~string(local_38);
if (local_30[0] != 0) {
/* try { // try from 00163c9d to 00163ca9 has its CatchHandler @ 00163e22 */
parseLogicalAnd();
if (local_60 == 0) {
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00163db0 to 00163dbe has its CatchHandler @ 00163de8 */
std::runtime_error::runtime_error
(prVar2,"Expected right side of \'string concat\' expression");
/* try { // try from 00163dbf to 00163dd4 has its CatchHandler @ 00163de6 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
/* try { // try from 00163cb6 to 00163cc2 has its CatchHandler @ 00163e13 */
get_location();
local_4c = 0;
/* try { // try from 00163ccc to 00163ce2 has its CatchHandler @ 00163e04 */
std::
make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>
(local_48,local_38,in_RDI,(Op *)&local_60);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=
(in_RDI,(__shared_ptr *)local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_30);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
}
return;
}
| |
39,345 | new_label_fd | bluesky950520[P]quickjs/quickjs.c | static int new_label_fd(JSFunctionDef *fd, int label)
{
LabelSlot *ls;
if (label < 0) {
if (js_resize_array(fd->ctx, (void *)&fd->label_slots,
sizeof(fd->label_slots[0]),
&fd->label_size, fd->label_count + 1))
return -1;
label = fd->label_count++;
ls = &fd->label_slots[label];
ls->ref_count = 0;
ls->pos = -1;
ls->pos2 = -1;
ls->addr = -1;
ls->first_reloc = NULL;
}
return label;
} | O0 | c | new_label_fd:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jge 0xb12d4
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
addq $0x170, %rsi # imm = 0x170
movq 0x18(%rsp), %rcx
addq $0x178, %rcx # imm = 0x178
movq 0x18(%rsp), %rax
movl 0x17c(%rax), %r8d
addl $0x1, %r8d
movl $0x18, %edx
callq 0x73140
cmpl $0x0, %eax
je 0xb1261
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0xb12dc
movq 0x18(%rsp), %rcx
movl 0x17c(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x17c(%rcx)
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq 0x170(%rax), %rax
movslq 0x14(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
movq 0x8(%rsp), %rax
movl $0xffffffff, 0x4(%rax) # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rax
movl $0xffffffff, 0x8(%rax) # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rax
movl $0xffffffff, 0xc(%rax) # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rax
movq $0x0, 0x10(%rax)
movl 0x14(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| new_label_fd:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_14], esi
cmp [rsp+28h+var_14], 0
jge loc_B12D4
mov rax, [rsp+28h+var_10]
mov rdi, [rax]
mov rsi, [rsp+28h+var_10]
add rsi, 170h
mov rcx, [rsp+28h+var_10]
add rcx, 178h
mov rax, [rsp+28h+var_10]
mov r8d, [rax+17Ch]
add r8d, 1
mov edx, 18h
call js_resize_array
cmp eax, 0
jz short loc_B1261
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp short loc_B12DC
loc_B1261:
mov rcx, [rsp+28h+var_10]
mov eax, [rcx+17Ch]
mov edx, eax
add edx, 1
mov [rcx+17Ch], edx
mov [rsp+28h+var_14], eax
mov rax, [rsp+28h+var_10]
mov rax, [rax+170h]
movsxd rcx, [rsp+28h+var_14]
imul rcx, 18h
add rax, rcx
mov [rsp+28h+var_20], rax
mov rax, [rsp+28h+var_20]
mov dword ptr [rax], 0
mov rax, [rsp+28h+var_20]
mov dword ptr [rax+4], 0FFFFFFFFh
mov rax, [rsp+28h+var_20]
mov dword ptr [rax+8], 0FFFFFFFFh
mov rax, [rsp+28h+var_20]
mov dword ptr [rax+0Ch], 0FFFFFFFFh
mov rax, [rsp+28h+var_20]
mov qword ptr [rax+10h], 0
loc_B12D4:
mov eax, [rsp+28h+var_14]
mov [rsp+28h+var_4], eax
loc_B12DC:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long new_label_fd(long long a1, int a2)
{
signed int v2; // eax
long long v4; // [rsp+8h] [rbp-20h]
unsigned int v5; // [rsp+14h] [rbp-14h]
v5 = a2;
if ( a2 >= 0 )
return v5;
if ( !(unsigned int)js_resize_array(*(_QWORD *)a1, a1 + 368, 0x18u, (_DWORD *)(a1 + 376), *(_DWORD *)(a1 + 380) + 1) )
{
v2 = *(_DWORD *)(a1 + 380);
*(_DWORD *)(a1 + 380) = v2 + 1;
v5 = v2;
v4 = 24LL * v2 + *(_QWORD *)(a1 + 368);
*(_DWORD *)v4 = 0;
*(_DWORD *)(v4 + 4) = -1;
*(_DWORD *)(v4 + 8) = -1;
*(_DWORD *)(v4 + 12) = -1;
*(_QWORD *)(v4 + 16) = 0LL;
return v5;
}
return (unsigned int)-1;
}
| new_label_fd:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
CMP dword ptr [RSP + 0x14],0x0
JGE 0x001b12d4
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x18]
ADD RSI,0x170
MOV RCX,qword ptr [RSP + 0x18]
ADD RCX,0x178
MOV RAX,qword ptr [RSP + 0x18]
MOV R8D,dword ptr [RAX + 0x17c]
ADD R8D,0x1
MOV EDX,0x18
CALL 0x00173140
CMP EAX,0x0
JZ 0x001b1261
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x001b12dc
LAB_001b1261:
MOV RCX,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RCX + 0x17c]
MOV EDX,EAX
ADD EDX,0x1
MOV dword ptr [RCX + 0x17c],EDX
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x170]
MOVSXD RCX,dword ptr [RSP + 0x14]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x4],0xffffffff
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x8],0xffffffff
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0xc],0xffffffff
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x10],0x0
LAB_001b12d4:
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x24],EAX
LAB_001b12dc:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int new_label_fd(int8 *param_1,int param_2)
{
int iVar1;
int4 *puVar2;
int local_14;
local_14 = param_2;
if (param_2 < 0) {
iVar1 = js_resize_array(*param_1,param_1 + 0x2e,0x18,param_1 + 0x2f,
*(int *)((long)param_1 + 0x17c) + 1);
if (iVar1 != 0) {
return -1;
}
local_14 = *(int *)((long)param_1 + 0x17c);
*(int *)((long)param_1 + 0x17c) = local_14 + 1;
puVar2 = (int4 *)(param_1[0x2e] + (long)local_14 * 0x18);
*puVar2 = 0;
puVar2[1] = 0xffffffff;
puVar2[2] = 0xffffffff;
puVar2[3] = 0xffffffff;
*(int8 *)(puVar2 + 4) = 0;
}
return local_14;
}
| |
39,346 | new_label_fd | bluesky950520[P]quickjs/quickjs.c | static int new_label_fd(JSFunctionDef *fd, int label)
{
LabelSlot *ls;
if (label < 0) {
if (js_resize_array(fd->ctx, (void *)&fd->label_slots,
sizeof(fd->label_slots[0]),
&fd->label_size, fd->label_count + 1))
return -1;
label = fd->label_count++;
ls = &fd->label_slots[label];
ls->ref_count = 0;
ls->pos = -1;
ls->pos2 = -1;
ls->addr = -1;
ls->first_reloc = NULL;
}
return label;
} | O2 | c | new_label_fd:
movl %esi, %eax
testl %esi, %esi
js 0x5b883
retq
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x170(%rbx), %rsi
leaq 0x178(%rbx), %rcx
movl 0x17c(%rbx), %r8d
incl %r8d
pushq $0x18
popq %rdx
callq 0x3b0ef
testl %eax, %eax
je 0x5b8b3
pushq $-0x1
popq %rax
jmp 0x5b8df
movslq 0x17c(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x17c(%rbx)
movq 0x170(%rbx), %rcx
imulq $0x18, %rax, %rdx
movaps 0x29eab(%rip), %xmm0 # 0x85780
movups %xmm0, (%rcx,%rdx)
andq $0x0, 0x10(%rcx,%rdx)
popq %rbx
retq
| new_label_fd:
mov eax, esi
test esi, esi
js short loc_5B883
retn
loc_5B883:
push rbx
mov rbx, rdi
mov rdi, [rdi]
lea rsi, [rbx+170h]
lea rcx, [rbx+178h]
mov r8d, [rbx+17Ch]
inc r8d
push 18h
pop rdx
call js_resize_array
test eax, eax
jz short loc_5B8B3
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp short loc_5B8DF
loc_5B8B3:
movsxd rax, dword ptr [rbx+17Ch]
lea ecx, [rax+1]
mov [rbx+17Ch], ecx
mov rcx, [rbx+170h]
imul rdx, rax, 18h
movaps xmm0, cs:xmmword_85780
movups xmmword ptr [rcx+rdx], xmm0
and qword ptr [rcx+rdx+10h], 0
loc_5B8DF:
pop rbx
retn
| long long new_label_fd(long long a1, int a2)
{
long long result; // rax
long long v3; // rcx
long long v4; // rdx
result = (unsigned int)a2;
if ( a2 < 0 )
{
if ( (unsigned int)js_resize_array(*(_QWORD *)a1, a1 + 368, 24LL, (_DWORD *)(a1 + 376), *(_DWORD *)(a1 + 380) + 1) )
{
return -1LL;
}
else
{
result = *(int *)(a1 + 380);
*(_DWORD *)(a1 + 380) = result + 1;
v3 = *(_QWORD *)(a1 + 368);
v4 = 24 * result;
*(_OWORD *)(v3 + v4) = xmmword_85780;
*(_QWORD *)(v3 + v4 + 16) = 0LL;
}
}
return result;
}
| new_label_fd:
MOV EAX,ESI
TEST ESI,ESI
JS 0x0015b883
RET
LAB_0015b883:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
LEA RSI,[RBX + 0x170]
LEA RCX,[RBX + 0x178]
MOV R8D,dword ptr [RBX + 0x17c]
INC R8D
PUSH 0x18
POP RDX
CALL 0x0013b0ef
TEST EAX,EAX
JZ 0x0015b8b3
PUSH -0x1
POP RAX
JMP 0x0015b8df
LAB_0015b8b3:
MOVSXD RAX,dword ptr [RBX + 0x17c]
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBX + 0x17c],ECX
MOV RCX,qword ptr [RBX + 0x170]
IMUL RDX,RAX,0x18
MOVAPS XMM0,xmmword ptr [0x00185780]
MOVUPS xmmword ptr [RCX + RDX*0x1],XMM0
AND qword ptr [RCX + RDX*0x1 + 0x10],0x0
LAB_0015b8df:
POP RBX
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong new_label_fd(int8 *param_1,uint param_2)
{
int8 *puVar1;
long lVar2;
int8 uVar3;
int iVar4;
ulong uVar5;
if (-1 < (int)param_2) {
return (ulong)param_2;
}
iVar4 = js_resize_array(*param_1,param_1 + 0x2e,0x18,param_1 + 0x2f,
*(int *)((long)param_1 + 0x17c) + 1);
if (iVar4 == 0) {
uVar5 = (ulong)*(int *)((long)param_1 + 0x17c);
*(int *)((long)param_1 + 0x17c) = *(int *)((long)param_1 + 0x17c) + 1;
uVar3 = _UNK_00185788;
lVar2 = param_1[0x2e];
puVar1 = (int8 *)(lVar2 + uVar5 * 0x18);
*puVar1 = _DAT_00185780;
puVar1[1] = uVar3;
*(int8 *)(lVar2 + 0x10 + uVar5 * 0x18) = 0;
}
else {
uVar5 = 0xffffffffffffffff;
}
return uVar5;
}
| |
39,347 | js_os_mkdir | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_mkdir(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int mode, ret;
const char *path;
if (argc >= 2) {
if (JS_ToInt32(ctx, &mode, argv[1]))
return JS_EXCEPTION;
} else {
mode = 0777;
}
path = JS_ToCString(ctx, argv[0]);
if (!path)
return JS_EXCEPTION;
#if defined(_WIN32)
(void)mode;
ret = js_get_errno(mkdir(path));
#else
ret = js_get_errno(mkdir(path, mode));
#endif
JS_FreeCString(ctx, path);
return JS_NewInt32(ctx, ret);
} | O0 | c | js_os_mkdir:
subq $0x68, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
cmpl $0x2, 0x1c(%rsp)
jl 0x186fc
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
leaq 0xc(%rsp), %rsi
callq 0x37c60
cmpl $0x0, %eax
je 0x186fa
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0x18796
jmp 0x18704
movl $0x1ff, 0xc(%rsp) # imm = 0x1FF
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x13520
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x18738
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0x18796
movq (%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0xe130
movslq %eax, %rdi
callq 0x12790
movl %eax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq (%rsp), %rsi
callq 0x28b90
movq 0x20(%rsp), %rcx
movl 0x8(%rsp), %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x58(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| js_os_mkdir:
sub rsp, 68h
mov [rsp+68h+var_40], rsi
mov [rsp+68h+var_38], rdx
mov [rsp+68h+var_48], rdi
mov [rsp+68h+var_4C], ecx
mov [rsp+68h+var_58], r8
cmp [rsp+68h+var_4C], 2
jl short loc_186FC
mov rdi, [rsp+68h+var_48]
mov rax, [rsp+68h+var_58]
mov rdx, [rax+10h]
mov rcx, [rax+18h]
lea rsi, [rsp+68h+var_5C]
call JS_ToInt32
cmp eax, 0
jz short loc_186FA
mov dword ptr [rsp+68h+var_30], 0
mov [rsp+68h+var_28], 6
jmp loc_18796
loc_186FA:
jmp short loc_18704
loc_186FC:
mov [rsp+68h+var_5C], 1FFh
loc_18704:
mov rdi, [rsp+68h+var_48]
mov rax, [rsp+68h+var_58]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+68h+var_68], rax
cmp [rsp+68h+var_68], 0
jnz short loc_18738
mov dword ptr [rsp+68h+var_30], 0
mov [rsp+68h+var_28], 6
jmp short loc_18796
loc_18738:
mov rdi, [rsp+68h+var_68]
mov esi, [rsp+68h+var_5C]
call _mkdir
movsxd rdi, eax
call js_get_errno
mov [rsp+68h+var_60], eax
mov rdi, [rsp+68h+var_48]
mov rsi, [rsp+68h+var_68]
call JS_FreeCString
mov rcx, [rsp+68h+var_48]
mov eax, [rsp+68h+var_60]
mov [rsp+68h+var_18], rcx
mov [rsp+68h+var_1C], eax
mov eax, [rsp+68h+var_1C]
mov dword ptr [rsp+68h+var_10], eax
mov [rsp+68h+var_8], 0
mov rcx, [rsp+68h+var_10]
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_30], rcx
mov [rsp+68h+var_28], rax
loc_18796:
mov rax, [rsp+68h+var_30]
mov rdx, [rsp+68h+var_28]
add rsp, 68h
retn
| long long js_os_mkdir(long long a1, long long a2, long long a3, int a4, long long *a5)
{
int v5; // eax
long long v7; // [rsp+0h] [rbp-68h]
int errno; // [rsp+8h] [rbp-60h]
unsigned int v9; // [rsp+Ch] [rbp-5Ch] BYREF
long long *v10; // [rsp+10h] [rbp-58h]
int v11; // [rsp+1Ch] [rbp-4Ch]
long long v12; // [rsp+20h] [rbp-48h]
long long v13; // [rsp+28h] [rbp-40h]
long long v14; // [rsp+30h] [rbp-38h]
long long v15; // [rsp+38h] [rbp-30h]
long long v16; // [rsp+40h] [rbp-28h]
int v17; // [rsp+4Ch] [rbp-1Ch]
long long v18; // [rsp+50h] [rbp-18h]
long long v19; // [rsp+58h] [rbp-10h]
long long v20; // [rsp+60h] [rbp-8h]
v13 = a2;
v14 = a3;
v12 = a1;
v11 = a4;
v10 = a5;
if ( a4 < 2 )
{
v9 = 511;
}
else if ( (unsigned int)JS_ToInt32(v12, &v9, v10[2], v10[3]) )
{
LODWORD(v15) = 0;
v16 = 6LL;
return v15;
}
v7 = JS_ToCString(v12, *v10, v10[1]);
if ( v7 )
{
v5 = mkdir(v7, v9);
errno = js_get_errno(v5);
JS_FreeCString(v12, v7);
v18 = v12;
v17 = errno;
LODWORD(v19) = errno;
v20 = 0LL;
v15 = v19;
v16 = 0LL;
}
else
{
LODWORD(v15) = 0;
v16 = 6LL;
}
return v15;
}
| js_os_mkdir:
SUB RSP,0x68
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
CMP dword ptr [RSP + 0x1c],0x2
JL 0x001186fc
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
LEA RSI,[RSP + 0xc]
CALL 0x00137c60
CMP EAX,0x0
JZ 0x001186fa
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x00118796
LAB_001186fa:
JMP 0x00118704
LAB_001186fc:
MOV dword ptr [RSP + 0xc],0x1ff
LAB_00118704:
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00113520
MOV qword ptr [RSP],RAX
CMP qword ptr [RSP],0x0
JNZ 0x00118738
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x00118796
LAB_00118738:
MOV RDI,qword ptr [RSP]
MOV ESI,dword ptr [RSP + 0xc]
CALL 0x0010e130
MOVSXD RDI,EAX
CALL 0x00112790
MOV dword ptr [RSP + 0x8],EAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP]
CALL 0x00128b90
MOV RCX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x50],RCX
MOV dword ptr [RSP + 0x4c],EAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV dword ptr [RSP + 0x58],EAX
MOV qword ptr [RSP + 0x60],0x0
MOV RCX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x40],RAX
LAB_00118796:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x68
RET
|
int1 [16]
js_os_mkdir(int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5
)
{
int1 auVar1 [16];
int iVar2;
int4 uVar3;
char *__path;
__mode_t local_5c;
int8 *local_58;
int local_4c;
int8 local_48;
int8 local_40;
int8 local_38;
int4 local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
local_58 = param_5;
local_4c = param_4;
local_48 = param_1;
local_40 = param_2;
local_38 = param_3;
if (param_4 < 2) {
local_5c = 0x1ff;
}
else {
iVar2 = JS_ToInt32(param_1,&local_5c,param_5[2],param_5[3]);
if (iVar2 != 0) {
local_30 = 0;
local_28 = 6;
goto LAB_00118796;
}
}
__path = (char *)JS_ToCString(local_48,*local_58,local_58[1]);
if (__path == (char *)0x0) {
local_30 = 0;
local_28 = 6;
}
else {
iVar2 = mkdir(__path,local_5c);
uVar3 = js_get_errno((long)iVar2);
JS_FreeCString(local_48,__path);
uStack_2c = uStack_c;
local_28 = 0;
local_30 = uVar3;
}
LAB_00118796:
auVar1._4_4_ = uStack_2c;
auVar1._0_4_ = local_30;
auVar1._8_8_ = local_28;
return auVar1;
}
| |
39,348 | js_os_mkdir | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_mkdir(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int mode, ret;
const char *path;
if (argc >= 2) {
if (JS_ToInt32(ctx, &mode, argv[1]))
return JS_EXCEPTION;
} else {
mode = 0777;
}
path = JS_ToCString(ctx, argv[0]);
if (!path)
return JS_EXCEPTION;
#if defined(_WIN32)
(void)mode;
ret = js_get_errno(mkdir(path));
#else
ret = js_get_errno(mkdir(path, mode));
#endif
JS_FreeCString(ctx, path);
return JS_NewInt32(ctx, ret);
} | O1 | c | js_os_mkdir:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdi, %rbx
cmpl $0x2, %ecx
jl 0x18a66
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rcx
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x26d9c
testl %eax, %eax
je 0x18a6e
movl $0x6, %edx
xorl %r14d, %r14d
jmp 0x18ac0
movl $0x1ff, 0x4(%rsp) # imm = 0x1FF
movq (%r14), %rdx
movq 0x8(%r14), %rcx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x1ffe3
testq %rax, %rax
je 0x18abb
movq %rax, %r15
movl 0x4(%rsp), %esi
movq %rax, %rdi
callq 0xe130
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x18aa9
callq 0xe0b0
xorl %ebp, %ebp
subl (%rax), %ebp
movq %rbx, %rdi
movq %r15, %rsi
callq 0x202c9
movl %ebp, %r14d
xorl %edx, %edx
jmp 0x18ac0
movl $0x6, %edx
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| js_os_mkdir:
push rbp
push r15
push r14
push rbx
push rax
mov r14, r8
mov rbx, rdi
cmp ecx, 2
jl short loc_18A66
mov rdx, [r14+10h]
mov rcx, [r14+18h]
lea rsi, [rsp+28h+var_24]
mov rdi, rbx
call JS_ToInt32
test eax, eax
jz short loc_18A6E
mov edx, 6
xor r14d, r14d
jmp short loc_18AC0
loc_18A66:
mov [rsp+28h+var_24], 1FFh
loc_18A6E:
mov rdx, [r14]
mov rcx, [r14+8]
xor r14d, r14d
mov rdi, rbx
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_18ABB
mov r15, rax
mov esi, [rsp+28h+var_24]
mov rdi, rax
call _mkdir
mov ebp, eax
cmp eax, 0FFFFFFFFh
jnz short loc_18AA9
call ___errno_location
xor ebp, ebp
sub ebp, [rax]
loc_18AA9:
mov rdi, rbx
mov rsi, r15
call JS_FreeCString
mov r14d, ebp
xor edx, edx
jmp short loc_18AC0
loc_18ABB:
mov edx, 6
loc_18AC0:
mov rax, r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long js_os_mkdir(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v5; // rax
long long v8; // r14
long long v9; // rdx
long long v10; // rcx
long long v11; // rax
long long v12; // r15
long long v13; // rdi
unsigned int v14; // ebp
unsigned int v16[9]; // [rsp+0h] [rbp-24h] BYREF
v16[0] = HIDWORD(v5);
if ( a4 < 2 )
{
v16[0] = 511;
}
else if ( (unsigned int)JS_ToInt32(a1, v16, a5[2], a5[3]) )
{
return 0LL;
}
v9 = *a5;
v10 = a5[1];
v8 = 0LL;
v11 = JS_ToCStringLen2(a1, 0LL, v9, v10, 0LL);
if ( v11 )
{
v12 = v11;
v13 = v11;
v14 = mkdir(v11, v16[0]);
if ( v14 == -1 )
v14 = -*(_DWORD *)__errno_location(v13);
JS_FreeCString(a1, v12);
return v14;
}
return v8;
}
| js_os_mkdir:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,R8
MOV RBX,RDI
CMP ECX,0x2
JL 0x00118a66
MOV RDX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [R14 + 0x18]
LEA RSI,[RSP + 0x4]
MOV RDI,RBX
CALL 0x00126d9c
TEST EAX,EAX
JZ 0x00118a6e
MOV EDX,0x6
XOR R14D,R14D
JMP 0x00118ac0
LAB_00118a66:
MOV dword ptr [RSP + 0x4],0x1ff
LAB_00118a6e:
MOV RDX,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
XOR R14D,R14D
MOV RDI,RBX
XOR ESI,ESI
XOR R8D,R8D
CALL 0x0011ffe3
TEST RAX,RAX
JZ 0x00118abb
MOV R15,RAX
MOV ESI,dword ptr [RSP + 0x4]
MOV RDI,RAX
CALL 0x0010e130
MOV EBP,EAX
CMP EAX,-0x1
JNZ 0x00118aa9
CALL 0x0010e0b0
XOR EBP,EBP
SUB EBP,dword ptr [RAX]
LAB_00118aa9:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001202c9
MOV R14D,EBP
XOR EDX,EDX
JMP 0x00118ac0
LAB_00118abb:
MOV EDX,0x6
LAB_00118ac0:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int js_os_mkdir(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
int iVar1;
int8 in_RAX;
char *__path;
int *piVar2;
int8 uStack_28;
if (param_4 < 2) {
uStack_28 = CONCAT44(0x1ff,(int)in_RAX);
}
else {
uStack_28 = in_RAX;
iVar1 = JS_ToInt32(param_1,(long)&uStack_28 + 4,param_5[2],param_5[3]);
if (iVar1 != 0) {
return 0;
}
}
iVar1 = 0;
__path = (char *)JS_ToCStringLen2(param_1,0,*param_5,param_5[1],0);
if (__path != (char *)0x0) {
iVar1 = mkdir(__path,uStack_28._4_4_);
if (iVar1 == -1) {
piVar2 = __errno_location();
iVar1 = -*piVar2;
}
JS_FreeCString(param_1,__path);
}
return iVar1;
}
| |
39,349 | js_os_mkdir | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_mkdir(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int mode, ret;
const char *path;
if (argc >= 2) {
if (JS_ToInt32(ctx, &mode, argv[1]))
return JS_EXCEPTION;
} else {
mode = 0777;
}
path = JS_ToCString(ctx, argv[0]);
if (!path)
return JS_EXCEPTION;
#if defined(_WIN32)
(void)mode;
ret = js_get_errno(mkdir(path));
#else
ret = js_get_errno(mkdir(path, mode));
#endif
JS_FreeCString(ctx, path);
return JS_NewInt32(ctx, ret);
} | O2 | c | js_os_mkdir:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movq %rdi, %r14
pushq $0x6
popq %rbx
cmpl $0x2, %ecx
jl 0x13662
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x20a5b
testl %eax, %eax
jne 0x136a9
jmp 0x1366a
movl $0x1ff, 0xc(%rsp) # imm = 0x1FF
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x10ef0
testq %rax, %rax
je 0x136a9
movq %rax, %r15
movl 0xc(%rsp), %esi
movq %rax, %rdi
callq 0xe140
movslq %eax, %rdi
callq 0x1082f
movq %rax, %rbx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1a4db
movl %ebx, %eax
xorl %ebx, %ebx
jmp 0x136ab
xorl %eax, %eax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| js_os_mkdir:
push r15
push r14
push rbx
sub rsp, 10h
mov r15, r8
mov r14, rdi
push 6
pop rbx
cmp ecx, 2
jl short loc_13662
mov rdx, [r15+10h]
mov rcx, [r15+18h]
lea rsi, [rsp+28h+var_1C]
mov rdi, r14
call JS_ToInt32
test eax, eax
jnz short loc_136A9
jmp short loc_1366A
loc_13662:
mov [rsp+28h+var_1C], 1FFh
loc_1366A:
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, r14
call JS_ToCString
test rax, rax
jz short loc_136A9
mov r15, rax
mov esi, [rsp+28h+var_1C]
mov rdi, rax
call _mkdir
movsxd rdi, eax
call js_get_errno
mov rbx, rax
mov rdi, r14
mov rsi, r15
call JS_FreeCString
mov eax, ebx
xor ebx, ebx
jmp short loc_136AB
loc_136A9:
xor eax, eax
loc_136AB:
mov rdx, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long js_os_mkdir(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v6; // rax
long long v7; // r15
int v8; // eax
unsigned int errno; // ebx
unsigned int v11[7]; // [rsp+Ch] [rbp-1Ch] BYREF
if ( a4 < 2 )
{
v11[0] = 511;
}
else if ( (unsigned int)JS_ToInt32(a1, v11, a5[2], a5[3]) )
{
return 0LL;
}
v6 = JS_ToCString(a1, *a5, a5[1]);
if ( v6 )
{
v7 = v6;
v8 = mkdir(v6, v11[0]);
errno = js_get_errno(v8);
JS_FreeCString(a1, v7);
return errno;
}
return 0LL;
}
| js_os_mkdir:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R15,R8
MOV R14,RDI
PUSH 0x6
POP RBX
CMP ECX,0x2
JL 0x00113662
MOV RDX,qword ptr [R15 + 0x10]
MOV RCX,qword ptr [R15 + 0x18]
LEA RSI,[RSP + 0xc]
MOV RDI,R14
CALL 0x00120a5b
TEST EAX,EAX
JNZ 0x001136a9
JMP 0x0011366a
LAB_00113662:
MOV dword ptr [RSP + 0xc],0x1ff
LAB_0011366a:
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,R14
CALL 0x00110ef0
TEST RAX,RAX
JZ 0x001136a9
MOV R15,RAX
MOV ESI,dword ptr [RSP + 0xc]
MOV RDI,RAX
CALL 0x0010e140
MOVSXD RDI,EAX
CALL 0x0011082f
MOV RBX,RAX
MOV RDI,R14
MOV RSI,R15
CALL 0x0011a4db
MOV EAX,EBX
XOR EBX,EBX
JMP 0x001136ab
LAB_001136a9:
XOR EAX,EAX
LAB_001136ab:
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
int4
js_os_mkdir(int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5
)
{
int iVar1;
int4 uVar2;
char *__path;
__mode_t local_1c;
if (param_4 < 2) {
local_1c = 0x1ff;
}
else {
iVar1 = JS_ToInt32(param_1,&local_1c,param_5[2],param_5[3]);
if (iVar1 != 0) {
return 0;
}
}
__path = (char *)JS_ToCString(param_1,*param_5,param_5[1]);
if (__path == (char *)0x0) {
return 0;
}
iVar1 = mkdir(__path,local_1c);
uVar2 = js_get_errno((long)iVar1);
JS_FreeCString(param_1,__path);
return uVar2;
}
| |
39,350 | DrawLineStrip | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c | void DrawLineStrip(const Vector2 *points, int pointCount, Color color)
{
if (pointCount < 2) return; // Security check
rlBegin(RL_LINES);
rlColor4ub(color.r, color.g, color.b, color.a);
for (int i = 0; i < pointCount - 1; i++)
{
rlVertex2f(points[i].x, points[i].y);
rlVertex2f(points[i + 1].x, points[i + 1].y);
}
rlEnd();
} | O3 | c | DrawLineStrip:
cmpl $0x2, %esi
jge 0x78a16
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movl %edx, %r15d
shrl $0x18, %r15d
movl %edx, %r12d
shrl $0x10, %r12d
movl %edx, %r13d
shrl $0x8, %r13d
movl $0x1, %edi
callq 0x60fc5
movl $0xff, %eax
andl %eax, %ebp
andl %eax, %r13d
andl %eax, %r12d
movl %ebp, %edi
movl %r13d, %esi
movl %r12d, %edx
movl %r15d, %ecx
callq 0x628b8
decl %ebx
xorl %r15d, %r15d
movss (%r14,%r15,8), %xmm0
movss 0x4(%r14,%r15,8), %xmm1
callq 0x6275f
leaq 0x1(%r15), %r12
movss 0x8(%r14,%r15,8), %xmm0
movss 0xc(%r14,%r15,8), %xmm1
callq 0x6275f
movq %r12, %r15
cmpq %r12, %rbx
jne 0x78a69
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x623c4
| DrawLineStrip:
cmp esi, 2
jge short loc_78A16
retn
loc_78A16:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, edx
mov ebx, esi
mov r14, rdi
mov r15d, edx
shr r15d, 18h
mov r12d, edx
shr r12d, 10h
mov r13d, edx
shr r13d, 8
mov edi, 1
call rlBegin
mov eax, 0FFh
and ebp, eax
and r13d, eax
and r12d, eax
mov edi, ebp
mov esi, r13d
mov edx, r12d
mov ecx, r15d
call rlColor4ub
dec ebx
xor r15d, r15d
loc_78A69:
movss xmm0, dword ptr [r14+r15*8]
movss xmm1, dword ptr [r14+r15*8+4]
call rlVertex2f
lea r12, [r15+1]
movss xmm0, dword ptr [r14+r15*8+8]
movss xmm1, dword ptr [r14+r15*8+0Ch]
call rlVertex2f
mov r15, r12
cmp rbx, r12
jnz short loc_78A69
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rlEnd
| long long DrawLineStrip(long long a1, int a2, unsigned int a3)
{
char v3; // bp
unsigned int v4; // r15d
unsigned int v5; // r12d
unsigned int v6; // r13d
long long v7; // r15
long long result; // rax
if ( a2 >= 2 )
{
v3 = a3;
v4 = HIBYTE(a3);
v5 = HIWORD(a3);
v6 = a3 >> 8;
rlBegin(1);
rlColor4ub(v3, v6, v5, v4);
v7 = 0LL;
do
{
rlVertex2f((__m128)*(unsigned int *)(a1 + 8 * v7), (__m128)*(unsigned int *)(a1 + 8 * v7 + 4));
rlVertex2f((__m128)*(unsigned int *)(a1 + 8 * v7 + 8), (__m128)*(unsigned int *)(a1 + 8 * v7 + 12));
++v7;
}
while ( a2 - 1 != v7 );
return rlEnd();
}
return result;
}
| DrawLineStrip:
CMP ESI,0x2
JGE 0x00178a16
RET
LAB_00178a16:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,EDX
MOV EBX,ESI
MOV R14,RDI
MOV R15D,EDX
SHR R15D,0x18
MOV R12D,EDX
SHR R12D,0x10
MOV R13D,EDX
SHR R13D,0x8
MOV EDI,0x1
CALL 0x00160fc5
MOV EAX,0xff
AND EBP,EAX
AND R13D,EAX
AND R12D,EAX
MOV EDI,EBP
MOV ESI,R13D
MOV EDX,R12D
MOV ECX,R15D
CALL 0x001628b8
DEC EBX
XOR R15D,R15D
LAB_00178a69:
MOVSS XMM0,dword ptr [R14 + R15*0x8]
MOVSS XMM1,dword ptr [R14 + R15*0x8 + 0x4]
CALL 0x0016275f
LEA R12,[R15 + 0x1]
MOVSS XMM0,dword ptr [R14 + R15*0x8 + 0x8]
MOVSS XMM1,dword ptr [R14 + R15*0x8 + 0xc]
CALL 0x0016275f
MOV R15,R12
CMP RBX,R12
JNZ 0x00178a69
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001623c4
|
void DrawLineStrip(long param_1,int param_2,ulong param_3)
{
ulong uVar1;
ulong uVar2;
if (param_2 < 2) {
return;
}
rlBegin(1);
rlColor4ub((uint)param_3 & 0xff,(uint)(param_3 >> 8) & 0xff,(uint)(param_3 >> 0x10) & 0xff,
param_3 >> 0x18 & 0xff);
uVar2 = 0;
do {
rlVertex2f(*(int4 *)(param_1 + uVar2 * 8),*(int4 *)(param_1 + 4 + uVar2 * 8));
uVar1 = uVar2 + 1;
rlVertex2f(*(int4 *)(param_1 + 8 + uVar2 * 8),*(int4 *)(param_1 + 0xc + uVar2 * 8));
uVar2 = uVar1;
} while (param_2 - 1 != uVar1);
rlEnd();
return;
}
| |
39,351 | DirectoryWalker::writeFiles(std::filesystem::__cxx11::path const&) | shubhamoy[P]dir2txt/src/DirectoryWalker.cpp | void DirectoryWalker::writeFiles(const std::filesystem::path& path) {
for (const auto& entry : std::filesystem::directory_iterator(path)) {
if (filter->shouldIgnore(entry.path())) continue;
if (entry.is_directory()) {
writeFiles(entry.path());
} else if (entry.is_regular_file()) {
if (filter->isBinary(entry.path())) {
writer->writeFileSkipped(entry.path(), rootPath, "[BINARY FILE SKIPPED]");
} else {
writer->writeFileContents(entry.path(), rootPath);
}
}
}
} | O3 | cpp | DirectoryWalker::writeFiles(std::filesystem::__cxx11::path const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x38(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x8220
movq (%r14), %rcx
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x26bad
movq 0x273ff(%rip), %rax # 0x4df98
cmpb $0x0, (%rax)
je 0x26bbd
incl 0x8(%rdi)
movq %rcx, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
jmp 0x26bd8
movq %rcx, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
jmp 0x26beb
lock
incl 0x8(%rdi)
movq %rcx, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, %rdi
testq %rcx, %rcx
je 0x26beb
cmpb $0x0, (%rax)
je 0x26be2
incl 0x8(%rdi)
jmp 0x26be6
lock
incl 0x8(%rdi)
callq 0x9930
leaq 0x8(%rbx), %r14
leaq 0x8(%rsp), %r15
leaq 0x18(%rsp), %rbp
cmpq $0x0, 0x10(%rsp)
je 0x26cee
movq %r15, %rdi
callq 0x85f0
movq %rax, %r12
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *0x18(%rax)
testb %al, %al
jne 0x26ce1
movzbl 0x28(%r12), %eax
cmpl $0x3, %eax
je 0x26c34
testl %eax, %eax
jne 0x26c3c
movq %r12, %rdi
callq 0x8140
cmpb $0x2, %al
jne 0x26c50
movq %rbx, %rdi
movq %r12, %rsi
callq 0x26b64
jmp 0x26ce1
movzbl 0x28(%r12), %eax
cmpl $0x3, %eax
je 0x26c5f
testl %eax, %eax
jne 0x26c67
movq %r12, %rdi
callq 0x8140
cmpb $0x1, %al
jne 0x26ce1
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *0x10(%rax)
movq 0x40(%rbx), %r13
testb %al, %al
je 0x26cd1
leaq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rbp, %rdi
leaq 0x10216(%rip), %rsi # 0x36eaa
leaq 0x10224(%rip), %rdx # 0x36ebf
callq 0x9a9e
movq (%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq *0x30(%rax)
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x26ce1
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8380
jmp 0x26ce1
movq (%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq *0x28(%rax)
movq %r15, %rdi
callq 0x8100
jmp 0x26bf9
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x26cfd
callq 0x9930
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x26d34
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8380
jmp 0x26d34
jmp 0x26d31
jmp 0x26d31
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x26d43
callq 0x9930
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x26d52
callq 0x9930
movq %rbx, %rdi
callq 0x85d0
| _ZN15DirectoryWalker10writeFilesERKNSt10filesystem7__cxx114pathE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
lea r14, [rsp+78h+var_40]
mov rdi, r14
xor edx, edx
xor ecx, ecx
call __ZNSt10filesystem7__cxx1118directory_iteratorC2ERKNS0_4pathENS_17directory_optionsEPSt10error_code; std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&,std::filesystem::directory_options,std::error_code *)
mov rcx, [r14]
mov rdi, [r14+8]
test rdi, rdi
jz short loc_26BAD
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_26BBD
inc dword ptr [rdi+8]
mov [rsp+78h+var_70], rcx
mov [rsp+78h+var_68], rdi
jmp short loc_26BD8
loc_26BAD:
mov [rsp+78h+var_70], rcx
mov [rsp+78h+var_68], 0
jmp short loc_26BEB
loc_26BBD:
lock inc dword ptr [rdi+8]
mov [rsp+78h+var_70], rcx
mov [rsp+78h+var_68], rdi
mov rcx, [rsp+78h+var_38]
mov rdi, rcx
test rcx, rcx
jz short loc_26BEB
loc_26BD8:
cmp byte ptr [rax], 0
jz short loc_26BE2
inc dword ptr [rdi+8]
jmp short loc_26BE6
loc_26BE2:
lock inc dword ptr [rdi+8]
loc_26BE6:
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_26BEB:
lea r14, [rbx+8]
lea r15, [rsp+78h+var_70]
lea rbp, [rsp+78h+var_60]
loc_26BF9:
cmp [rsp+78h+var_68], 0
jz loc_26CEE
mov rdi, r15
call __ZNKSt10filesystem7__cxx1118directory_iteratordeEv; std::filesystem::__cxx11::directory_iterator::operator*(void)
mov r12, rax
mov rdi, [rbx+30h]
mov rax, [rdi]
mov rsi, r12; std::filesystem::__cxx11::path *
call qword ptr [rax+18h]
test al, al
jnz loc_26CE1
movzx eax, byte ptr [r12+28h]
cmp eax, 3
jz short loc_26C34
test eax, eax
jnz short loc_26C3C
loc_26C34:
mov rdi, r12; this
call __ZNSt10filesystem6statusERKNS_7__cxx114pathE; std::filesystem::status(std::filesystem::__cxx11::path const&)
loc_26C3C:
cmp al, 2
jnz short loc_26C50
mov rdi, rbx; this
mov rsi, r12; std::filesystem::__cxx11::path *
call _ZN15DirectoryWalker10writeFilesERKNSt10filesystem7__cxx114pathE; DirectoryWalker::writeFiles(std::filesystem::__cxx11::path const&)
jmp loc_26CE1
loc_26C50:
movzx eax, byte ptr [r12+28h]
cmp eax, 3
jz short loc_26C5F
test eax, eax
jnz short loc_26C67
loc_26C5F:
mov rdi, r12; this
call __ZNSt10filesystem6statusERKNS_7__cxx114pathE; std::filesystem::status(std::filesystem::__cxx11::path const&)
loc_26C67:
cmp al, 1
jnz short loc_26CE1
mov rdi, [rbx+30h]
mov rax, [rdi]
mov rsi, r12
call qword ptr [rax+10h]
mov r13, [rbx+40h]
test al, al
jz short loc_26CD1
lea rax, [rsp+78h+var_50]
mov [rsp+78h+var_60], rax
mov rdi, rbp
lea rsi, aBinaryFileSkip; "[BINARY FILE SKIPPED]"
lea rdx, aBinaryFileSkip+15h; ""
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)
mov rax, [r13+0]
mov rdi, r13
mov rsi, r12
mov rdx, r14
mov rcx, rbp
call qword ptr [rax+30h]
mov rdi, [rsp+78h+var_60]; void *
lea rax, [rsp+78h+var_50]
cmp rdi, rax
jz short loc_26CE1
mov rsi, [rsp+78h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_26CE1
loc_26CD1:
mov rax, [r13+0]
mov rdi, r13
mov rsi, r12
mov rdx, r14
call qword ptr [rax+28h]
loc_26CE1:
mov rdi, r15
call __ZNSt10filesystem7__cxx1118directory_iteratorppEv; std::filesystem::__cxx11::directory_iterator::operator++(void)
jmp loc_26BF9
loc_26CEE:
mov rdi, [rsp+78h+var_38]
test rdi, rdi
jz short loc_26CFD
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_26CFD:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_10]; void *
lea rax, [rsp+arg_20]
cmp rdi, rax
jz short loc_26D34
mov rsi, [rsp+arg_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_26D34
jmp short loc_26D31
jmp short $+2
loc_26D31:
mov rbx, rax
loc_26D34:
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_26D43
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_26D43:
mov rdi, [rsp+arg_38]
test rdi, rdi
jz short loc_26D52
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_26D52:
mov rdi, rbx
call __Unwind_Resume
| void * DirectoryWalker::writeFiles(DirectoryWalker *this, const std::filesystem::__cxx11::path *a2)
{
void *result; // rax
long long v4; // rdx
volatile signed __int32 *v5; // rcx
volatile signed __int32 *v6; // rdi
unsigned __int8 *v7; // r12
int v8; // eax
int v9; // eax
char v10; // al
long long v11; // r13
volatile signed __int32 *v12; // [rsp+8h] [rbp-70h] BYREF
volatile signed __int32 *v13; // [rsp+10h] [rbp-68h]
void *v14[2]; // [rsp+18h] [rbp-60h] BYREF
_QWORD v15[2]; // [rsp+28h] [rbp-50h] BYREF
volatile signed __int32 *v16; // [rsp+38h] [rbp-40h] BYREF
volatile signed __int32 *v17; // [rsp+40h] [rbp-38h]
result = (void *)std::filesystem::__cxx11::directory_iterator::directory_iterator(&v16, a2, 0LL, 0LL);
v5 = v16;
v6 = v17;
if ( !v17 )
{
v12 = v16;
v13 = 0LL;
goto LABEL_10;
}
result = &_libc_single_threaded;
if ( _libc_single_threaded )
{
++*((_DWORD *)v17 + 2);
v12 = v5;
v13 = v6;
}
else
{
_InterlockedIncrement(v17 + 2);
v12 = v5;
v13 = v6;
v5 = v17;
v6 = v17;
if ( !v17 )
goto LABEL_10;
}
if ( _libc_single_threaded )
++*((_DWORD *)v6 + 2);
else
_InterlockedIncrement(v6 + 2);
result = (void *)std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
LABEL_10:
while ( v13 )
{
v7 = (unsigned __int8 *)std::filesystem::__cxx11::directory_iterator::operator*(&v12, a2, v4, v5);
a2 = (const std::filesystem::__cxx11::path *)v7;
if ( !(*(unsigned __int8 ( **)(_QWORD, unsigned __int8 *))(**((_QWORD **)this + 6) + 24LL))(
*((_QWORD *)this + 6),
v7) )
{
v8 = v7[40];
if ( v8 == 3 || !v7[40] )
LOBYTE(v8) = std::filesystem::status((std::filesystem *)v7, (const std::filesystem::__cxx11::path *)v7);
if ( (_BYTE)v8 == 2 )
{
a2 = (const std::filesystem::__cxx11::path *)v7;
DirectoryWalker::writeFiles(this, (const std::filesystem::__cxx11::path *)v7);
}
else
{
v9 = v7[40];
if ( v9 == 3 || !v7[40] )
LOBYTE(v9) = std::filesystem::status((std::filesystem *)v7, (const std::filesystem::__cxx11::path *)v7);
if ( (_BYTE)v9 == 1 )
{
v10 = (*(long long ( **)(_QWORD, unsigned __int8 *))(**((_QWORD **)this + 6) + 16LL))(
*((_QWORD *)this + 6),
v7);
v11 = *((_QWORD *)this + 8);
if ( v10 )
{
v14[0] = v15;
std::string::_M_construct<char const*>((long long)v14, "[BINARY FILE SKIPPED]", (long long)"");
a2 = (const std::filesystem::__cxx11::path *)v7;
(*(void ( **)(long long, unsigned __int8 *, char *, void **))(*(_QWORD *)v11 + 48LL))(
v11,
v7,
(char *)this + 8,
v14);
if ( v14[0] != v15 )
{
a2 = (const std::filesystem::__cxx11::path *)(v15[0] + 1LL);
operator delete(v14[0], v15[0] + 1LL);
}
}
else
{
a2 = (const std::filesystem::__cxx11::path *)v7;
(*(void ( **)(_QWORD, unsigned __int8 *, char *))(*(_QWORD *)v11 + 40LL))(
*((_QWORD *)this + 8),
v7,
(char *)this + 8);
}
}
}
}
result = (void *)std::filesystem::__cxx11::directory_iterator::operator++(&v12);
}
if ( v17 )
return (void *)std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
return result;
}
| writeFiles:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
LEA R14,[RSP + 0x38]
MOV RDI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x00108220
MOV RCX,qword ptr [R14]
MOV RDI,qword ptr [R14 + 0x8]
TEST RDI,RDI
JZ 0x00126bad
MOV RAX,qword ptr [0x0014df98]
CMP byte ptr [RAX],0x0
JZ 0x00126bbd
INC dword ptr [RDI + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RDI
JMP 0x00126bd8
LAB_00126bad:
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],0x0
JMP 0x00126beb
LAB_00126bbd:
INC.LOCK dword ptr [RDI + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RDI
MOV RCX,qword ptr [RSP + 0x40]
MOV RDI,RCX
TEST RCX,RCX
JZ 0x00126beb
LAB_00126bd8:
CMP byte ptr [RAX],0x0
JZ 0x00126be2
INC dword ptr [RDI + 0x8]
JMP 0x00126be6
LAB_00126be2:
INC.LOCK dword ptr [RDI + 0x8]
LAB_00126be6:
CALL 0x00109930
LAB_00126beb:
LEA R14,[RBX + 0x8]
LEA R15,[RSP + 0x8]
LEA RBP,[RSP + 0x18]
LAB_00126bf9:
CMP qword ptr [RSP + 0x10],0x0
JZ 0x00126cee
MOV RDI,R15
CALL 0x001085f0
MOV R12,RAX
MOV RDI,qword ptr [RBX + 0x30]
MOV RAX,qword ptr [RDI]
LAB_00126c17:
MOV RSI,R12
CALL qword ptr [RAX + 0x18]
TEST AL,AL
JNZ 0x00126ce1
MOVZX EAX,byte ptr [R12 + 0x28]
CMP EAX,0x3
JZ 0x00126c34
TEST EAX,EAX
JNZ 0x00126c3c
LAB_00126c34:
MOV RDI,R12
CALL 0x00108140
LAB_00126c3c:
CMP AL,0x2
JNZ 0x00126c50
MOV RDI,RBX
MOV RSI,R12
CALL 0x00126b64
JMP 0x00126ce1
LAB_00126c50:
MOVZX EAX,byte ptr [R12 + 0x28]
CMP EAX,0x3
JZ 0x00126c5f
TEST EAX,EAX
JNZ 0x00126c67
LAB_00126c5f:
MOV RDI,R12
CALL 0x00108140
LAB_00126c67:
CMP AL,0x1
JNZ 0x00126ce1
MOV RDI,qword ptr [RBX + 0x30]
MOV RAX,qword ptr [RDI]
MOV RSI,R12
CALL qword ptr [RAX + 0x10]
MOV R13,qword ptr [RBX + 0x40]
TEST AL,AL
JZ 0x00126cd1
LEA RAX,[RSP + 0x28]
MOV qword ptr [RSP + 0x18],RAX
LAB_00126c8a:
MOV RDI,RBP
LEA RSI,[0x136eaa]
LEA RDX,[0x136ebf]
CALL 0x00109a9e
MOV RAX,qword ptr [R13]
LAB_00126ca4:
MOV RDI,R13
MOV RSI,R12
MOV RDX,R14
MOV RCX,RBP
CALL qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RSP + 0x18]
LEA RAX,[RSP + 0x28]
CMP RDI,RAX
JZ 0x00126ce1
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x00108380
JMP 0x00126ce1
LAB_00126cd1:
MOV RAX,qword ptr [R13]
LAB_00126cd5:
MOV RDI,R13
MOV RSI,R12
MOV RDX,R14
CALL qword ptr [RAX + 0x28]
LAB_00126ce1:
MOV RDI,R15
CALL 0x00108100
LAB_00126ce9:
JMP 0x00126bf9
LAB_00126cee:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x00126cfd
CALL 0x00109930
LAB_00126cfd:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* DirectoryWalker::writeFiles(std::filesystem::__cxx11::path const&) */
void __thiscall DirectoryWalker::writeFiles(DirectoryWalker *this,path *param_1)
{
long *plVar1;
int *puVar2;
char cVar3;
path pVar4;
path *ppVar5;
int8 local_70;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
long *local_60 [2];
long local_50 [2];
int8 local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38;
std::filesystem::__cxx11::directory_iterator::directory_iterator
((directory_iterator *)&local_40,param_1,0,0);
puVar2 = PTR___libc_single_threaded_0014df98;
if (local_38 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
local_70 = local_40;
local_68 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
}
else {
if (*PTR___libc_single_threaded_0014df98 == '\0') {
LOCK();
*(int *)(local_38 + 8) = *(int *)(local_38 + 8) + 1;
UNLOCK();
local_70 = local_40;
local_68 = local_38;
if (local_38 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) goto LAB_00126beb;
}
else {
*(int *)(local_38 + 8) = *(int *)(local_38 + 8) + 1;
}
local_70 = local_40;
local_68 = local_38;
if (*puVar2 == '\0') {
LOCK();
*(int *)(local_38 + 8) = *(int *)(local_38 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_38 + 8) = *(int *)(local_38 + 8) + 1;
}
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
LAB_00126beb:
while (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
ppVar5 = (path *)std::filesystem::__cxx11::directory_iterator::operator*
((directory_iterator *)&local_70);
/* try { // try from 00126c17 to 00126c77 has its CatchHandler @ 00126d31 */
cVar3 = (**(code **)(**(long **)(this + 0x30) + 0x18))(*(long **)(this + 0x30),ppVar5);
if (cVar3 == '\0') {
pVar4 = ppVar5[0x28];
if ((pVar4 == (path)0x3) || (pVar4 == (path)0x0)) {
pVar4 = (path)std::filesystem::status(ppVar5);
}
if (pVar4 == (path)0x2) {
writeFiles(this,ppVar5);
}
else {
pVar4 = ppVar5[0x28];
if ((pVar4 == (path)0x3) || (pVar4 == (path)0x0)) {
pVar4 = (path)std::filesystem::status(ppVar5);
}
if (pVar4 == (path)0x1) {
cVar3 = (**(code **)(**(long **)(this + 0x30) + 0x10))(*(long **)(this + 0x30),ppVar5);
plVar1 = *(long **)(this + 0x40);
if (cVar3 == '\0') {
/* try { // try from 00126cd5 to 00126ce0 has its CatchHandler @ 00126d31 */
(**(code **)(*plVar1 + 0x28))(plVar1,ppVar5,this + 8);
}
else {
local_60[0] = local_50;
/* try { // try from 00126c8a to 00126c9f has its CatchHandler @ 00126d2d */
std::__cxx11::string::_M_construct<char_const*>(local_60,"[BINARY FILE SKIPPED]","");
/* try { // try from 00126ca4 to 00126cb2 has its CatchHandler @ 00126d0c */
(**(code **)(*plVar1 + 0x30))(plVar1,ppVar5,this + 8,local_60);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
}
}
}
}
/* try { // try from 00126ce1 to 00126ce8 has its CatchHandler @ 00126d2f */
std::filesystem::__cxx11::directory_iterator::operator++((directory_iterator *)&local_70);
}
if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
return;
}
| |
39,352 | int10_to_str | eloqsql/strings/int2str.c | char *int10_to_str(long int val,char *dst,int radix)
{
char buffer[65];
register char *p;
long int new_val;
unsigned long int uval = (unsigned long int) val;
if (radix < 0) /* -10 */
{
if (val < 0)
{
*dst++ = '-';
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (unsigned long int)0 - uval;
}
}
p = &buffer[sizeof(buffer)-1];
*p = '\0';
new_val= (long) (uval / 10);
*--p = '0'+ (char) (uval - (unsigned long) new_val * 10);
val = new_val;
while (val != 0)
{
new_val=val/10;
*--p = '0' + (char) (val-new_val*10);
val= new_val;
}
while ((*dst++ = *p++) != 0) ;
return dst-1;
} | O0 | c | int10_to_str:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x58(%rbp)
movq %rsi, -0x60(%rbp)
movl %edx, -0x64(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpl $0x0, -0x64(%rbp)
jge 0x14b926
cmpq $0x0, -0x58(%rbp)
jge 0x14b924
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x2d, (%rax)
xorl %eax, %eax
subq -0x80(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x14b926
leaq -0x50(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movb $0x0, (%rax)
movq -0x80(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x78(%rbp)
movq -0x80(%rbp), %rax
imulq $0xa, -0x78(%rbp), %rcx
subq %rcx, %rax
movsbl %al, %eax
addl $0x30, %eax
movb %al, %cl
movq -0x70(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x70(%rbp)
movb %cl, -0x1(%rax)
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x14b9c2
movq -0x58(%rbp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
movq %rax, -0x78(%rbp)
movq -0x58(%rbp), %rax
imulq $0xa, -0x78(%rbp), %rcx
subq %rcx, %rax
movsbl %al, %eax
addl $0x30, %eax
movb %al, %cl
movq -0x70(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x70(%rbp)
movb %cl, -0x1(%rax)
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x14b979
jmp 0x14b9c4
movq -0x70(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x70(%rbp)
movb (%rax), %al
movq -0x60(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x60(%rbp)
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x14b9f0
jmp 0x14b9c4
movq -0x60(%rbp), %rax
decq %rax
movq %rax, -0x88(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x14ba20
movq -0x88(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
nop
| int10_to_str:
push rbp
mov rbp, rsp
sub rsp, 90h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov [rbp+var_64], edx
mov rax, [rbp+var_58]
mov [rbp+var_80], rax
cmp [rbp+var_64], 0
jge short loc_14B926
cmp [rbp+var_58], 0
jge short loc_14B924
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 1
mov [rbp+var_60], rcx
mov byte ptr [rax], 2Dh ; '-'
xor eax, eax
sub rax, [rbp+var_80]
mov [rbp+var_80], rax
loc_14B924:
jmp short $+2
loc_14B926:
lea rax, [rbp+var_50]
add rax, 40h ; '@'
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
mov byte ptr [rax], 0
mov rax, [rbp+var_80]
mov ecx, 0Ah
xor edx, edx
div rcx
mov [rbp+var_78], rax
mov rax, [rbp+var_80]
imul rcx, [rbp+var_78], 0Ah
sub rax, rcx
movsx eax, al
add eax, 30h ; '0'
mov cl, al
mov rax, [rbp+var_70]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_70], rdx
mov [rax-1], cl
mov rax, [rbp+var_78]
mov [rbp+var_58], rax
loc_14B979:
cmp [rbp+var_58], 0
jz short loc_14B9C2
mov rax, [rbp+var_58]
mov ecx, 0Ah
cqo
idiv rcx
mov [rbp+var_78], rax
mov rax, [rbp+var_58]
imul rcx, [rbp+var_78], 0Ah
sub rax, rcx
movsx eax, al
add eax, 30h ; '0'
mov cl, al
mov rax, [rbp+var_70]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_70], rdx
mov [rax-1], cl
mov rax, [rbp+var_78]
mov [rbp+var_58], rax
jmp short loc_14B979
loc_14B9C2:
jmp short $+2
loc_14B9C4:
mov rax, [rbp+var_70]
mov rcx, rax
add rcx, 1
mov [rbp+var_70], rcx
mov al, [rax]
mov rcx, [rbp+var_60]
mov rdx, rcx
add rdx, 1
mov [rbp+var_60], rdx
mov [rcx], al
movsx eax, al
cmp eax, 0
jz short loc_14B9F0
jmp short loc_14B9C4
loc_14B9F0:
mov rax, [rbp+var_60]
dec rax
mov [rbp+var_88], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_14BA20
mov rax, [rbp+var_88]
add rsp, 90h
pop rbp
retn
loc_14BA20:
call ___stack_chk_fail
| _BYTE * int10_to_str(long long a1, _BYTE *a2, int a3)
{
_BYTE *v3; // rax
_BYTE *v4; // rax
_BYTE *v5; // rcx
unsigned long long v7; // [rsp+10h] [rbp-80h]
_BYTE *v8; // [rsp+20h] [rbp-70h]
_BYTE *v9; // [rsp+30h] [rbp-60h]
signed long long i; // [rsp+38h] [rbp-58h]
_BYTE v11[9]; // [rsp+7Fh] [rbp-11h] BYREF
unsigned long long v12; // [rsp+88h] [rbp-8h]
v12 = __readfsqword(0x28u);
v9 = a2;
v7 = a1;
if ( a3 < 0 && a1 < 0 )
{
v9 = a2 + 1;
*a2 = 45;
v7 = -a1;
}
v11[1] = 0;
v8 = v11;
v11[0] = v7 % 0xA + 48;
for ( i = v7 / 0xA; i; i /= 10LL )
{
v3 = v8--;
*(v3 - 1) = i % 10 + 48;
}
do
{
v4 = v8++;
LOBYTE(v4) = *v4;
v5 = v9++;
*v5 = (_BYTE)v4;
}
while ( (_BYTE)v4 );
return v9 - 1;
}
| inline_mysql_file_create_with_symlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV RAX,qword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
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
MOV dword ptr [RBP + -0x2c],R9D
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x80]
XOR EDX,EDX
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 0x0014b99a
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1f0]
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]
MOV EDX,dword ptr [RBP + -0x2c]
MOV ECX,dword ptr [RBP + 0x10]
MOV R8,qword ptr [RBP + 0x18]
CALL 0x001f67e0
MOV dword ptr [RBP + -0x30],EAX
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x200]
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,dword ptr [RBP + -0x30]
CALL RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0014b9ba
LAB_0014b99a:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RBP + -0x2c]
MOV ECX,dword ptr [RBP + 0x10]
MOV R8,qword ptr [RBP + 0x18]
CALL 0x001f67e0
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
LAB_0014b9ba:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_create_with_symlink
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int8 param_5,int4 param_6,int4 param_7,int8 param_8)
{
int1 local_88 [72];
long local_40;
int4 local_38;
int4 local_34;
int8 local_30;
int8 local_28;
int4 local_1c;
int8 local_18;
int4 local_10;
int4 local_c;
local_34 = param_6;
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,0,param_5,&local_40);
if (local_40 == 0) {
local_c = my_create_with_symlink(local_28,local_30,local_34,param_7,param_8);
}
else {
(**(code **)(PSI_server + 0x1f0))(local_40,local_18,local_1c);
local_38 = my_create_with_symlink(local_28,local_30,local_34,param_7,param_8);
(**(code **)(PSI_server + 0x200))(local_40,local_38);
local_c = local_38;
}
return local_c;
}
| |
39,353 | stmt_buffered_fetch | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | static int stmt_buffered_fetch(MYSQL_STMT *stmt, uchar **row)
{
if (!stmt->result_cursor)
{
*row= NULL;
stmt->state= MYSQL_STMT_FETCH_DONE;
return MYSQL_NO_DATA;
}
stmt->state= MYSQL_STMT_USER_FETCHING;
*row= (uchar *)stmt->result_cursor->data;
stmt->result_cursor= stmt->result_cursor->next;
return 0;
} | O0 | c | stmt_buffered_fetch:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xe0(%rax)
jne 0x45ac9
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movl $0x6, 0x50(%rax)
movl $0x64, -0x4(%rbp)
jmp 0x45b0a
movq -0x10(%rbp), %rax
movl $0x5, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xe0(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
| stmt_buffered_fetch:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp qword ptr [rax+0E0h], 0
jnz short loc_45AC9
mov rax, [rbp+var_18]
mov qword ptr [rax], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 6
mov [rbp+var_4], 64h ; 'd'
jmp short loc_45B0A
loc_45AC9:
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 5
mov rax, [rbp+var_10]
mov rax, [rax+0E0h]
mov rcx, [rax+8]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rax, [rax+0E0h]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax+0E0h], rcx
mov [rbp+var_4], 0
loc_45B0A:
mov eax, [rbp+var_4]
pop rbp
retn
| long long stmt_buffered_fetch(long long a1, _QWORD *a2)
{
if ( *(_QWORD *)(a1 + 224) )
{
*(_DWORD *)(a1 + 80) = 5;
*a2 = *(_QWORD *)(*(_QWORD *)(a1 + 224) + 8LL);
*(_QWORD *)(a1 + 224) = **(_QWORD **)(a1 + 224);
return 0;
}
else
{
*a2 = 0LL;
*(_DWORD *)(a1 + 80) = 6;
return 100;
}
}
| stmt_buffered_fetch:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0xe0],0x0
JNZ 0x00145ac9
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x6
MOV dword ptr [RBP + -0x4],0x64
JMP 0x00145b0a
LAB_00145ac9:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x5
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xe0]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xe0]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],RCX
MOV dword ptr [RBP + -0x4],0x0
LAB_00145b0a:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 stmt_buffered_fetch(long param_1,int8 *param_2)
{
int4 local_c;
if (*(long *)(param_1 + 0xe0) == 0) {
*param_2 = 0;
*(int4 *)(param_1 + 0x50) = 6;
local_c = 100;
}
else {
*(int4 *)(param_1 + 0x50) = 5;
*param_2 = *(int8 *)(*(long *)(param_1 + 0xe0) + 8);
*(int8 *)(param_1 + 0xe0) = **(int8 **)(param_1 + 0xe0);
local_c = 0;
}
return local_c;
}
| |
39,354 | CLI::App::~App() | MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/App.hpp | virtual ~App() = default; | O1 | cpp | CLI::App::~App():
pushq %rbx
movq %rdi, %rbx
leaq 0x3c92f(%rip), %rax # 0x49298
movq %rax, (%rdi)
movq 0x318(%rdi), %rdi
testq %rdi, %rdi
je 0xc97d
callq 0x1dc66
leaq 0x2f0(%rbx), %rdi
callq 0xaf62
movq 0x2d0(%rbx), %rdi
leaq 0x2e0(%rbx), %rax
cmpq %rax, %rdi
je 0xc9a7
movq (%rax), %rsi
incq %rsi
callq 0x7430
leaq 0x280(%rbx), %rdi
callq 0x1931e
leaq 0x250(%rbx), %rdi
callq 0x1dcd6
leaq 0x220(%rbx), %rdi
callq 0x1dd26
leaq 0x1f0(%rbx), %rdi
callq 0x1dcd6
leaq 0x1c0(%rbx), %rdi
callq 0x1dd26
movq 0x1a8(%rbx), %rdi
testq %rdi, %rdi
je 0xc9fe
movq 0x1b8(%rbx), %rsi
subq %rdi, %rsi
callq 0x7430
movq 0x190(%rbx), %rdi
testq %rdi, %rdi
je 0xca19
movq 0x1a0(%rbx), %rsi
subq %rdi, %rsi
callq 0x7430
leaq 0x178(%rbx), %rdi
callq 0x19366
movq 0x168(%rbx), %rax
testq %rax, %rax
je 0xca42
leaq 0x158(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x150(%rbx), %rdi
testq %rdi, %rdi
je 0xca53
callq 0x1dc66
movq 0x120(%rbx), %rax
testq %rax, %rax
je 0xca70
leaq 0x110(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xf0(%rbx), %rdi
leaq 0x100(%rbx), %rax
cmpq %rax, %rdi
je 0xca8e
movq (%rax), %rsi
incq %rsi
callq 0x7430
leaq 0xd8(%rbx), %rdi
callq 0x193c2
movq 0xb0(%rbx), %rdi
leaq 0xc0(%rbx), %rax
cmpq %rax, %rdi
je 0xcab8
movq (%rax), %rsi
incq %rsi
callq 0x7430
movq 0xa0(%rbx), %rax
testq %rax, %rax
je 0xcad5
leaq 0x90(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x80(%rbx), %rax
testq %rax, %rax
je 0xcaef
leaq 0x70(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0xcb06
leaq 0x50(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %rax
cmpq %rax, %rdi
je 0xcb1e
movq (%rax), %rsi
incq %rsi
callq 0x7430
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0xcb37
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x7430
popq %rbx
retq
jmp 0xcb41
jmp 0xcb41
jmp 0xcb41
jmp 0xcb41
movq %rax, %rdi
callq 0xc892
nop
| _ZN3CLI3AppD2Ev:
push rbx
mov rbx, rdi
lea rax, off_49298
mov [rdi], rax
mov rdi, [rdi+318h]
test rdi, rdi
jz short loc_C97D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_C97D:
lea rdi, [rbx+2F0h]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rbx+2D0h]; void *
lea rax, [rbx+2E0h]
cmp rdi, rax
jz short loc_C9A7
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C9A7:
lea rdi, [rbx+280h]
call _ZNSt6vectorISt10shared_ptrIN3CLI3AppEESaIS3_EED2Ev; std::vector<std::shared_ptr<CLI::App>>::~vector()
lea rdi, [rbx+250h]
call _ZNSt8_Rb_treeIPN3CLI6OptionES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EED2Ev; std::_Rb_tree<CLI::Option *,CLI::Option *,std::_Identity<CLI::Option *>,std::less<CLI::Option *>,std::allocator<CLI::Option *>>::~_Rb_tree()
lea rdi, [rbx+220h]
call _ZNSt8_Rb_treeIPN3CLI3AppES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EED2Ev; std::_Rb_tree<CLI::App *,CLI::App *,std::_Identity<CLI::App *>,std::less<CLI::App *>,std::allocator<CLI::App *>>::~_Rb_tree()
lea rdi, [rbx+1F0h]
call _ZNSt8_Rb_treeIPN3CLI6OptionES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EED2Ev; std::_Rb_tree<CLI::Option *,CLI::Option *,std::_Identity<CLI::Option *>,std::less<CLI::Option *>,std::allocator<CLI::Option *>>::~_Rb_tree()
lea rdi, [rbx+1C0h]
call _ZNSt8_Rb_treeIPN3CLI3AppES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EED2Ev; std::_Rb_tree<CLI::App *,CLI::App *,std::_Identity<CLI::App *>,std::less<CLI::App *>,std::allocator<CLI::App *>>::~_Rb_tree()
mov rdi, [rbx+1A8h]; void *
test rdi, rdi
jz short loc_C9FE
mov rsi, [rbx+1B8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C9FE:
mov rdi, [rbx+190h]; void *
test rdi, rdi
jz short loc_CA19
mov rsi, [rbx+1A0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CA19:
lea rdi, [rbx+178h]
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EED2Ev; std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector()
mov rax, [rbx+168h]
test rax, rax
jz short loc_CA42
lea rdi, [rbx+158h]
mov rsi, rdi
mov edx, 3
call rax
loc_CA42:
mov rdi, [rbx+150h]
test rdi, rdi
jz short loc_CA53
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_CA53:
mov rax, [rbx+120h]
test rax, rax
jz short loc_CA70
lea rdi, [rbx+110h]
mov rsi, rdi
mov edx, 3
call rax
loc_CA70:
mov rdi, [rbx+0F0h]; void *
lea rax, [rbx+100h]
cmp rdi, rax
jz short loc_CA8E
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CA8E:
lea rdi, [rbx+0D8h]
call _ZNSt6vectorISt10unique_ptrIN3CLI6OptionESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<CLI::Option>>::~vector()
mov rdi, [rbx+0B0h]; void *
lea rax, [rbx+0C0h]
cmp rdi, rax
jz short loc_CAB8
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CAB8:
mov rax, [rbx+0A0h]
test rax, rax
jz short loc_CAD5
lea rdi, [rbx+90h]
mov rsi, rdi
mov edx, 3
call rax
loc_CAD5:
mov rax, [rbx+80h]
test rax, rax
jz short loc_CAEF
lea rdi, [rbx+70h]
mov rsi, rdi
mov edx, 3
call rax
loc_CAEF:
mov rax, [rbx+60h]
test rax, rax
jz short loc_CB06
lea rdi, [rbx+50h]
mov rsi, rdi
mov edx, 3
call rax
loc_CB06:
mov rdi, [rbx+28h]; void *
lea rax, [rbx+38h]
cmp rdi, rax
jz short loc_CB1E
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CB1E:
mov rdi, [rbx+8]; void *
add rbx, 18h
cmp rdi, rbx
jz short loc_CB37
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_CB37:
pop rbx
retn
jmp short loc_CB41
jmp short loc_CB41
jmp short loc_CB41
jmp short $+2
loc_CB41:
mov rdi, rax
call __clang_call_terminate
| void CLI::App::~App(CLI::App *this)
{
char *v2; // rdi
void *v3; // rdi
void *v4; // rdi
void ( *v5)(char *, char *, long long); // rax
void ( *v6)(char *, char *, long long); // rax
char *v7; // rdi
char *v8; // rdi
void ( *v9)(char *, char *, long long); // rax
void ( *v10)(char *, char *, long long); // rax
void ( *v11)(char *, char *, long long); // rax
char *v12; // rdi
_QWORD *v13; // rdi
_QWORD *v14; // rbx
*(_QWORD *)this = off_49298;
if ( *((_QWORD *)this + 99) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
std::vector<std::string>::~vector((_QWORD *)this + 94);
v2 = (char *)*((_QWORD *)this + 90);
if ( v2 != (char *)this + 736 )
operator delete(v2, *((_QWORD *)this + 92) + 1LL);
std::vector<std::shared_ptr<CLI::App>>::~vector((char *)this + 640);
std::_Rb_tree<CLI::Option *,CLI::Option *,std::_Identity<CLI::Option *>,std::less<CLI::Option *>,std::allocator<CLI::Option *>>::~_Rb_tree((char *)this + 592);
std::_Rb_tree<CLI::App *,CLI::App *,std::_Identity<CLI::App *>,std::less<CLI::App *>,std::allocator<CLI::App *>>::~_Rb_tree((char *)this + 544);
std::_Rb_tree<CLI::Option *,CLI::Option *,std::_Identity<CLI::Option *>,std::less<CLI::Option *>,std::allocator<CLI::Option *>>::~_Rb_tree((char *)this + 496);
std::_Rb_tree<CLI::App *,CLI::App *,std::_Identity<CLI::App *>,std::less<CLI::App *>,std::allocator<CLI::App *>>::~_Rb_tree((char *)this + 448);
v3 = (void *)*((_QWORD *)this + 53);
if ( v3 )
operator delete(v3, *((_QWORD *)this + 55) - (_QWORD)v3);
v4 = (void *)*((_QWORD *)this + 50);
if ( v4 )
operator delete(v4, *((_QWORD *)this + 52) - (_QWORD)v4);
std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector((char *)this + 376);
v5 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 45);
if ( v5 )
v5((char *)this + 344, (char *)this + 344, 3LL);
if ( *((_QWORD *)this + 42) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
v6 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 36);
if ( v6 )
v6((char *)this + 272, (char *)this + 272, 3LL);
v7 = (char *)*((_QWORD *)this + 30);
if ( v7 != (char *)this + 256 )
operator delete(v7, *((_QWORD *)this + 32) + 1LL);
std::vector<std::unique_ptr<CLI::Option>>::~vector((char *)this + 216);
v8 = (char *)*((_QWORD *)this + 22);
if ( v8 != (char *)this + 192 )
operator delete(v8, *((_QWORD *)this + 24) + 1LL);
v9 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 20);
if ( v9 )
v9((char *)this + 144, (char *)this + 144, 3LL);
v10 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 16);
if ( v10 )
v10((char *)this + 112, (char *)this + 112, 3LL);
v11 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 12);
if ( v11 )
v11((char *)this + 80, (char *)this + 80, 3LL);
v12 = (char *)*((_QWORD *)this + 5);
if ( v12 != (char *)this + 56 )
operator delete(v12, *((_QWORD *)this + 7) + 1LL);
v13 = (_QWORD *)*((_QWORD *)this + 1);
v14 = (_QWORD *)((char *)this + 24);
if ( v13 != v14 )
operator delete(v13, *v14 + 1LL);
}
| ~App:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x149298]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x318]
TEST RDI,RDI
JZ 0x0010c97d
CALL 0x0011dc66
LAB_0010c97d:
LEA RDI,[RBX + 0x2f0]
CALL 0x0010af62
MOV RDI,qword ptr [RBX + 0x2d0]
LEA RAX,[RBX + 0x2e0]
CMP RDI,RAX
JZ 0x0010c9a7
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_0010c9a7:
LEA RDI,[RBX + 0x280]
CALL 0x0011931e
LEA RDI,[RBX + 0x250]
CALL 0x0011dcd6
LEA RDI,[RBX + 0x220]
CALL 0x0011dd26
LEA RDI,[RBX + 0x1f0]
CALL 0x0011dcd6
LEA RDI,[RBX + 0x1c0]
CALL 0x0011dd26
MOV RDI,qword ptr [RBX + 0x1a8]
TEST RDI,RDI
JZ 0x0010c9fe
MOV RSI,qword ptr [RBX + 0x1b8]
SUB RSI,RDI
CALL 0x00107430
LAB_0010c9fe:
MOV RDI,qword ptr [RBX + 0x190]
TEST RDI,RDI
JZ 0x0010ca19
MOV RSI,qword ptr [RBX + 0x1a0]
SUB RSI,RDI
CALL 0x00107430
LAB_0010ca19:
LEA RDI,[RBX + 0x178]
CALL 0x00119366
MOV RAX,qword ptr [RBX + 0x168]
TEST RAX,RAX
JZ 0x0010ca42
LEA RDI,[RBX + 0x158]
LAB_0010ca38:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0010ca42:
MOV RDI,qword ptr [RBX + 0x150]
TEST RDI,RDI
JZ 0x0010ca53
CALL 0x0011dc66
LAB_0010ca53:
MOV RAX,qword ptr [RBX + 0x120]
TEST RAX,RAX
JZ 0x0010ca70
LEA RDI,[RBX + 0x110]
LAB_0010ca66:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0010ca70:
MOV RDI,qword ptr [RBX + 0xf0]
LEA RAX,[RBX + 0x100]
CMP RDI,RAX
JZ 0x0010ca8e
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_0010ca8e:
LEA RDI,[RBX + 0xd8]
CALL 0x001193c2
MOV RDI,qword ptr [RBX + 0xb0]
LEA RAX,[RBX + 0xc0]
CMP RDI,RAX
JZ 0x0010cab8
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_0010cab8:
MOV RAX,qword ptr [RBX + 0xa0]
TEST RAX,RAX
JZ 0x0010cad5
LEA RDI,[RBX + 0x90]
LAB_0010cacb:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0010cad5:
MOV RAX,qword ptr [RBX + 0x80]
TEST RAX,RAX
JZ 0x0010caef
LEA RDI,[RBX + 0x70]
LAB_0010cae5:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0010caef:
MOV RAX,qword ptr [RBX + 0x60]
TEST RAX,RAX
JZ 0x0010cb06
LEA RDI,[RBX + 0x50]
LAB_0010cafc:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0010cb06:
MOV RDI,qword ptr [RBX + 0x28]
LEA RAX,[RBX + 0x38]
CMP RDI,RAX
JZ 0x0010cb1e
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_0010cb1e:
MOV RDI,qword ptr [RBX + 0x8]
ADD RBX,0x18
CMP RDI,RBX
JZ 0x0010cb37
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x00107430
LAB_0010cb37:
POP RBX
RET
|
/* CLI::App::~App() */
void __thiscall CLI::App::~App(App *this)
{
void *pvVar1;
*(int ***)this = &PTR__App_00149298;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x318) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x318));
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x2f0));
if (*(App **)(this + 0x2d0) != this + 0x2e0) {
operator_delete(*(App **)(this + 0x2d0),*(long *)(this + 0x2e0) + 1);
}
std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>::~vector
((vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>> *)
(this + 0x280));
std::
_Rb_tree<CLI::Option*,CLI::Option*,std::_Identity<CLI::Option*>,std::less<CLI::Option*>,std::allocator<CLI::Option*>>
::~_Rb_tree((_Rb_tree<CLI::Option*,CLI::Option*,std::_Identity<CLI::Option*>,std::less<CLI::Option*>,std::allocator<CLI::Option*>>
*)(this + 0x250));
std::
_Rb_tree<CLI::App*,CLI::App*,std::_Identity<CLI::App*>,std::less<CLI::App*>,std::allocator<CLI::App*>>
::~_Rb_tree((_Rb_tree<CLI::App*,CLI::App*,std::_Identity<CLI::App*>,std::less<CLI::App*>,std::allocator<CLI::App*>>
*)(this + 0x220));
std::
_Rb_tree<CLI::Option*,CLI::Option*,std::_Identity<CLI::Option*>,std::less<CLI::Option*>,std::allocator<CLI::Option*>>
::~_Rb_tree((_Rb_tree<CLI::Option*,CLI::Option*,std::_Identity<CLI::Option*>,std::less<CLI::Option*>,std::allocator<CLI::Option*>>
*)(this + 0x1f0));
std::
_Rb_tree<CLI::App*,CLI::App*,std::_Identity<CLI::App*>,std::less<CLI::App*>,std::allocator<CLI::App*>>
::~_Rb_tree((_Rb_tree<CLI::App*,CLI::App*,std::_Identity<CLI::App*>,std::less<CLI::App*>,std::allocator<CLI::App*>>
*)(this + 0x1c0));
pvVar1 = *(void **)(this + 0x1a8);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x1b8) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 400);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x1a0) - (long)pvVar1);
}
std::
vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
::~vector((vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
*)(this + 0x178));
if (*(code **)(this + 0x168) != (code *)0x0) {
/* try { // try from 0010ca38 to 0010ca41 has its CatchHandler @ 0010cb41 */
(**(code **)(this + 0x168))(this + 0x158,this + 0x158,3);
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x150) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x150));
}
if (*(code **)(this + 0x120) != (code *)0x0) {
/* try { // try from 0010ca66 to 0010ca6f has its CatchHandler @ 0010cb3f */
(**(code **)(this + 0x120))(this + 0x110,this + 0x110,3);
}
if (*(App **)(this + 0xf0) != this + 0x100) {
operator_delete(*(App **)(this + 0xf0),*(long *)(this + 0x100) + 1);
}
std::
vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>
::~vector((vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>
*)(this + 0xd8));
if (*(App **)(this + 0xb0) != this + 0xc0) {
operator_delete(*(App **)(this + 0xb0),*(long *)(this + 0xc0) + 1);
}
if (*(code **)(this + 0xa0) != (code *)0x0) {
/* try { // try from 0010cacb to 0010cad4 has its CatchHandler @ 0010cb3d */
(**(code **)(this + 0xa0))(this + 0x90,this + 0x90,3);
}
if (*(code **)(this + 0x80) != (code *)0x0) {
/* try { // try from 0010cae5 to 0010caee has its CatchHandler @ 0010cb3b */
(**(code **)(this + 0x80))(this + 0x70,this + 0x70,3);
}
if (*(code **)(this + 0x60) != (code *)0x0) {
/* try { // try from 0010cafc to 0010cb05 has its CatchHandler @ 0010cb39 */
(**(code **)(this + 0x60))(this + 0x50,this + 0x50,3);
}
if (*(App **)(this + 0x28) != this + 0x38) {
operator_delete(*(App **)(this + 0x28),*(long *)(this + 0x38) + 1);
}
if (*(App **)(this + 8) != this + 0x18) {
operator_delete(*(App **)(this + 8),*(long *)(this + 0x18) + 1);
return;
}
return;
}
| |
39,355 | allocate_dynamic | eloqsql/mysys/array.c | my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements)
{
DBUG_ENTER("allocate_dynamic");
if (max_elements >= array->max_element)
{
uint size;
uchar *new_ptr;
size= (max_elements + array->alloc_increment)/array->alloc_increment;
size*= array->alloc_increment;
if (array->malloc_flags & MY_INIT_BUFFER_USED)
{
/*
In this senerio, the buffer is statically preallocated,
so we have to create an all-new malloc since we overflowed
*/
if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size *
array->size_of_element,
MYF(array->malloc_flags | MY_WME))))
DBUG_RETURN(0);
memcpy(new_ptr, array->buffer,
array->elements * array->size_of_element);
array->malloc_flags&= ~MY_INIT_BUFFER_USED;
}
else if (!(new_ptr= (uchar*) my_realloc(array->m_psi_key,
array->buffer,size *
array->size_of_element,
MYF(MY_WME | MY_ALLOW_ZERO_PTR |
array->malloc_flags))))
DBUG_RETURN(TRUE);
array->buffer= new_ptr;
array->max_element= size;
}
DBUG_RETURN(FALSE);
} | O0 | c | allocate_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jb 0x6a325
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
addl 0x10(%rcx), %eax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divl 0x10(%rcx)
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
imull -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
andq $0x100, %rax # imm = 0x100
cmpq $0x0, %rax
je 0x6a2ce
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %esi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
orq $0x10, %rdx
callq 0x5f800
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x6a293
jmp 0x6a28a
movb $0x0, -0x1(%rbp)
jmp 0x6a32b
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x25220
movq -0x10(%rbp), %rax
movabsq $0xfffffeff, %rcx # imm = 0xFFFFFEFF
andq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
jmp 0x6a310
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
orq $0x50, %rcx
callq 0x5f9d0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x6a30e
jmp 0x6a308
movb $0x1, -0x1(%rbp)
jmp 0x6a32b
jmp 0x6a310
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x6a327
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| allocate_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov eax, [rbp+var_14]
mov rcx, [rbp+var_10]
cmp eax, [rcx+0Ch]
jb loc_6A325
mov eax, [rbp+var_14]
mov rcx, [rbp+var_10]
add eax, [rcx+10h]
mov rcx, [rbp+var_10]
xor edx, edx
div dword ptr [rcx+10h]
mov [rbp+var_18], eax
mov rax, [rbp+var_10]
mov eax, [rax+10h]
imul eax, [rbp+var_18]
mov [rbp+var_18], eax
mov rax, [rbp+var_10]
mov rax, [rax+20h]
and rax, 100h
cmp rax, 0
jz short loc_6A2CE
mov rax, [rbp+var_10]
mov edi, [rax+18h]
mov eax, [rbp+var_18]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov esi, eax
mov rax, [rbp+var_10]
mov rdx, [rax+20h]
or rdx, 10h
call my_malloc
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_6A293
jmp short $+2
loc_6A28A:
mov [rbp+var_1], 0
jmp loc_6A32B
loc_6A293:
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+8]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
call _memcpy
mov rax, [rbp+var_10]
mov rcx, 0FFFFFEFFh
and rcx, [rax+20h]
mov [rax+20h], rcx
jmp short loc_6A310
loc_6A2CE:
mov rax, [rbp+var_10]
mov edi, [rax+18h]
mov rax, [rbp+var_10]
mov rsi, [rax]
mov eax, [rbp+var_18]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
or rcx, 50h
call my_realloc
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_6A30E
jmp short $+2
loc_6A308:
mov [rbp+var_1], 1
jmp short loc_6A32B
loc_6A30E:
jmp short $+2
loc_6A310:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax], rcx
mov ecx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+0Ch], ecx
loc_6A325:
jmp short $+2
loc_6A327:
mov [rbp+var_1], 0
loc_6A32B:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char allocate_dynamic(long long *a1, unsigned int a2)
{
long long v3; // [rsp+0h] [rbp-20h]
unsigned int v4; // [rsp+8h] [rbp-18h]
if ( a2 < *((_DWORD *)a1 + 3) )
return 0;
v4 = (*((_DWORD *)a1 + 4) + a2) / *((_DWORD *)a1 + 4) * *((_DWORD *)a1 + 4);
if ( (a1[4] & 0x100) == 0 )
{
v3 = my_realloc(*((_DWORD *)a1 + 6), *a1, *((_DWORD *)a1 + 5) * v4, *((_BYTE *)a1 + 32) | 0x50u);
if ( !v3 )
return 1;
goto LABEL_8;
}
v3 = my_malloc(*((_DWORD *)a1 + 6), *((_DWORD *)a1 + 5) * v4, *((_DWORD *)a1 + 8) | 0x10u);
if ( v3 )
{
memcpy(v3, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * *((_DWORD *)a1 + 2)));
a1[4] &= 0xFFFFFEFFuLL;
LABEL_8:
*a1 = v3;
*((_DWORD *)a1 + 3) = v4;
return 0;
}
return 0;
}
| allocate_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0xc]
JC 0x0016a325
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
ADD EAX,dword ptr [RCX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
XOR EDX,EDX
DIV dword ptr [RCX + 0x10]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x10]
IMUL EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
AND RAX,0x100
CMP RAX,0x0
JZ 0x0016a2ce
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x18]
MOV EAX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x20]
OR RDX,0x10
CALL 0x0015f800
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0016a293
JMP 0x0016a28a
LAB_0016a28a:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0016a32b
LAB_0016a293:
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x00125220
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,0xfffffeff
AND RCX,qword ptr [RAX + 0x20]
MOV qword ptr [RAX + 0x20],RCX
JMP 0x0016a310
LAB_0016a2ce:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
OR RCX,0x50
CALL 0x0015f9d0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0016a30e
JMP 0x0016a308
LAB_0016a308:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016a32b
LAB_0016a30e:
JMP 0x0016a310
LAB_0016a310:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],ECX
LAB_0016a325:
JMP 0x0016a327
LAB_0016a327:
MOV byte ptr [RBP + -0x1],0x0
LAB_0016a32b:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 allocate_dynamic(int8 *param_1,uint param_2)
{
int iVar1;
void *local_28;
if (*(uint *)((long)param_1 + 0xc) <= param_2) {
iVar1 = *(int *)(param_1 + 2) * ((param_2 + *(int *)(param_1 + 2)) / *(uint *)(param_1 + 2));
if ((param_1[4] & 0x100) == 0) {
local_28 = (void *)my_realloc(*(int4 *)(param_1 + 3),*param_1,
iVar1 * *(int *)((long)param_1 + 0x14),param_1[4] | 0x50);
if (local_28 == (void *)0x0) {
return 1;
}
}
else {
local_28 = (void *)my_malloc(*(int4 *)(param_1 + 3),
iVar1 * *(int *)((long)param_1 + 0x14),param_1[4] | 0x10);
if (local_28 == (void *)0x0) {
return 0;
}
memcpy(local_28,(void *)*param_1,
(ulong)(uint)(*(int *)(param_1 + 1) * *(int *)((long)param_1 + 0x14)));
param_1[4] = param_1[4] & 0xfffffeff;
}
*param_1 = local_28;
*(int *)((long)param_1 + 0xc) = iVar1;
}
return 0;
}
| |
39,356 | ssz_dump_to_file | corpus-core[P]colibri-stateless/src/util/ssz.c | void ssz_dump_to_file(FILE* f, ssz_ob_t ob, bool include_name, bool write_unit_as_hex) {
ssz_dump_t ctx = {
.buf = {0},
.write_unit_as_hex = write_unit_as_hex,
};
dump(&ctx, ob, include_name ? ob.def->name : NULL, 0);
bytes_write(ctx.buf.data, f, false);
buffer_free(&ctx.buf);
} | O0 | c | ssz_dump_to_file:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %dl, %al
movb %sil, %cl
leaq 0x10(%rbp), %rdx
movq %rdx, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
andb $0x1, %cl
movb %cl, -0x9(%rbp)
andb $0x1, %al
movb %al, -0xa(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x231c0
movb -0xa(%rbp), %al
andb $0x1, %al
movb %al, -0x18(%rbp)
testb $0x1, -0x9(%rbp)
je 0xa1613
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0xa161b
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0xa161b
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rsi
leaq -0x30(%rbp), %rdi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa0d00
movq -0x8(%rbp), %rdx
movl -0x30(%rbp), %edi
movq -0x28(%rbp), %rsi
xorl %ecx, %ecx
callq 0x9e780
leaq -0x30(%rbp), %rdi
callq 0x9e240
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| ssz_dump_to_file:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, dl
mov cl, sil
lea rdx, [rbp+arg_0]
mov [rbp+var_38], rdx
mov [rbp+var_8], rdi
and cl, 1
mov [rbp+var_9], cl
and al, 1
mov [rbp+var_A], al
lea rdi, [rbp+var_30]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov al, [rbp+var_A]
and al, 1
mov [rbp+var_18], al
test [rbp+var_9], 1
jz short loc_A1613
mov rax, [rbp+var_38]
mov rax, [rax+10h]
mov rax, [rax]
mov [rbp+var_40], rax
jmp short loc_A161B
loc_A1613:
xor eax, eax
mov [rbp+var_40], rax
jmp short $+2
loc_A161B:
mov rax, [rbp+var_38]
mov rsi, [rbp+var_40]
lea rdi, [rbp+var_30]
xor edx, edx
mov rcx, [rax]
mov [rsp+60h+var_60], rcx
mov rcx, [rax+8]
mov [rsp+60h+var_58], rcx
mov rax, [rax+10h]
mov [rsp+60h+var_50], rax
call dump
mov rdx, [rbp+var_8]
mov edi, [rbp+var_30]
mov rsi, [rbp+var_28]
xor ecx, ecx
call bytes_write
lea rdi, [rbp+var_30]
call buffer_free
add rsp, 60h
pop rbp
retn
| long long ssz_dump_to_file(
long long a1,
char a2,
char a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14,
long long a15,
unsigned __int16 *a16,
long long *a17)
{
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
unsigned int v22; // [rsp+30h] [rbp-30h] BYREF
long long v23; // [rsp+38h] [rbp-28h]
char v24; // [rsp+48h] [rbp-18h]
char v25; // [rsp+56h] [rbp-Ah]
char v26; // [rsp+57h] [rbp-9h]
long long v27; // [rsp+58h] [rbp-8h]
v27 = a1;
v26 = a2 & 1;
v25 = a3 & 1;
memset(&v22, 0LL, 32LL);
v24 = v25 & 1;
if ( (v26 & 1) != 0 )
dump(&v22, *a17, 0LL, (long long)a16, v17, v18, a4, a5, a6, a7, v19, v20, a10, a11, a15, a16, (long long)a17);
else
dump(&v22, 0LL, 0LL, (long long)a16, v17, v18, a4, a5, a6, a7, v19, v20, a10, a11, a15, a16, (long long)a17);
bytes_write(v22, v23, v27, 0);
return buffer_free((long long)&v22);
}
| ssz_dump_to_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,DL
MOV CL,SIL
LEA RDX,[RBP + 0x10]
MOV qword ptr [RBP + -0x38],RDX
MOV qword ptr [RBP + -0x8],RDI
AND CL,0x1
MOV byte ptr [RBP + -0x9],CL
AND AL,0x1
MOV byte ptr [RBP + -0xa],AL
LEA RDI,[RBP + -0x30]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x001231c0
MOV AL,byte ptr [RBP + -0xa]
AND AL,0x1
MOV byte ptr [RBP + -0x18],AL
TEST byte ptr [RBP + -0x9],0x1
JZ 0x001a1613
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001a161b
LAB_001a1613:
XOR EAX,EAX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001a161b
LAB_001a161b:
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x40]
LEA RDI,[RBP + -0x30]
XOR EDX,EDX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001a0d00
MOV RDX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
XOR ECX,ECX
CALL 0x0019e780
LEA RDI,[RBP + -0x30]
CALL 0x0019e240
ADD RSP,0x60
POP RBP
RET
|
void ssz_dump_to_file(int8 param_1,byte param_2,byte param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 *param_9)
{
int8 local_48;
int4 local_38 [2];
int8 local_30;
byte local_20;
byte local_12;
byte local_11;
int8 local_10;
local_11 = param_2 & 1;
local_12 = param_3 & 1;
local_10 = param_1;
memset(local_38,0,0x20);
local_20 = local_12 & 1;
if ((local_11 & 1) == 0) {
local_48 = 0;
}
else {
local_48 = *param_9;
}
dump(local_38,local_48,0);
bytes_write(local_38[0],local_30,local_10,0,param_5,param_6,param_7,param_8,param_9);
buffer_free(local_38);
return;
}
| |
39,357 | ssz_dump_to_file | corpus-core[P]colibri-stateless/src/util/ssz.c | void ssz_dump_to_file(FILE* f, ssz_ob_t ob, bool include_name, bool write_unit_as_hex) {
ssz_dump_t ctx = {
.buf = {0},
.write_unit_as_hex = write_unit_as_hex,
};
dump(&ctx, ob, include_name ? ob.def->name : NULL, 0);
bytes_write(ctx.buf.data, f, false);
buffer_free(&ctx.buf);
} | O2 | c | ssz_dump_to_file:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x60(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movb %dl, 0x38(%rsp)
testl %esi, %esi
je 0x4cd6a
movq 0x10(%rax), %rcx
movq (%rcx), %rsi
jmp 0x4cd6c
xorl %esi, %esi
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x4c817
movl (%r14), %edi
movq 0x8(%r14), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x4b48e
movq %r14, %rdi
callq 0x4b16d
addq $0x48, %rsp
popq %rbx
popq %r14
retq
| ssz_dump_to_file:
push r14
push rbx
sub rsp, 48h
mov rbx, rdi
lea rax, [rsp+58h+arg_0]
xorps xmm0, xmm0
movaps [rsp+58h+var_28], xmm0
movaps [rsp+58h+var_38], xmm0
mov byte ptr [rsp+58h+var_28+8], dl
test esi, esi
jz short loc_4CD6A
mov rcx, [rax+10h]
mov rsi, [rcx]
jmp short loc_4CD6C
loc_4CD6A:
xor esi, esi
loc_4CD6C:
mov rcx, [rax+10h]
mov [rsp+58h+var_48], rcx
movups xmm0, xmmword ptr [rax]
movups [rsp+58h+var_58], xmm0
lea r14, [rsp+58h+var_38]
mov rdi, r14
xor edx, edx
call dump
mov edi, [r14]
mov rsi, [r14+8]
mov rdx, rbx
xor ecx, ecx
call bytes_write
mov rdi, r14
call buffer_free
add rsp, 48h
pop rbx
pop r14
retn
| long long ssz_dump_to_file(
long long a1,
int a2,
char a3,
long long a4,
long long a5,
long long a6,
unsigned int a7,
unsigned __int16 *a8,
long long *a9)
{
long long v9; // rsi
__int128 v11; // [rsp+20h] [rbp-38h] BYREF
__int128 v12; // [rsp+30h] [rbp-28h]
v12 = 0LL;
v11 = 0LL;
BYTE8(v12) = a3;
if ( a2 )
v9 = *a9;
else
v9 = 0LL;
dump((long long)&v11, v9, 0LL, (long long)a9, a5, a6, a7, a8, (long long)a9);
bytes_write(v11, *((long long *)&v11 + 1), a1, 0);
return buffer_free((long long)&v11);
}
| ssz_dump_to_file:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
LEA RAX,[RSP + 0x60]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV byte ptr [RSP + 0x38],DL
TEST ESI,ESI
JZ 0x0014cd6a
MOV RCX,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RCX]
JMP 0x0014cd6c
LAB_0014cd6a:
XOR ESI,ESI
LAB_0014cd6c:
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RSP],XMM0
LEA R14,[RSP + 0x20]
MOV RDI,R14
XOR EDX,EDX
CALL 0x0014c817
MOV EDI,dword ptr [R14]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDX,RBX
XOR ECX,ECX
CALL 0x0014b48e
MOV RDI,R14
CALL 0x0014b16d
ADD RSP,0x48
POP RBX
POP R14
RET
|
void ssz_dump_to_file(int8 param_1,int param_2,byte param_3,int8 param_4,
int8 param_5,int8 param_6,int4 param_7,int4 param_8,
int8 *param_9)
{
int8 uVar1;
ulong local_38;
int8 uStack_30;
int8 local_28;
ulong uStack_20;
local_28 = 0;
local_38 = 0;
uStack_30 = 0;
uStack_20 = (ulong)param_3;
if (param_2 == 0) {
uVar1 = 0;
}
else {
uVar1 = *param_9;
}
dump(&local_38,uVar1,0);
bytes_write(local_38 & 0xffffffff,uStack_30,param_1,0,param_5,param_6,param_7,param_8,param_9);
buffer_free(&local_38);
return;
}
| |
39,358 | ssz_dump_to_file | corpus-core[P]colibri-stateless/src/util/ssz.c | void ssz_dump_to_file(FILE* f, ssz_ob_t ob, bool include_name, bool write_unit_as_hex) {
ssz_dump_t ctx = {
.buf = {0},
.write_unit_as_hex = write_unit_as_hex,
};
dump(&ctx, ob, include_name ? ob.def->name : NULL, 0);
bytes_write(ctx.buf.data, f, false);
buffer_free(&ctx.buf);
} | O3 | c | ssz_dump_to_file:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x60(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movb %dl, 0x38(%rsp)
testl %esi, %esi
je 0x54f43
movq 0x10(%rax), %rcx
movq (%rcx), %rsi
jmp 0x54f45
xorl %esi, %esi
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x549d9
movl (%r14), %edi
movq 0x8(%r14), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x534f3
movq %r14, %rdi
callq 0x5310b
addq $0x48, %rsp
popq %rbx
popq %r14
retq
| ssz_dump_to_file:
push r14
push rbx
sub rsp, 48h
mov rbx, rdi
lea rax, [rsp+58h+arg_0]
xorps xmm0, xmm0
movaps [rsp+58h+var_28], xmm0
movaps [rsp+58h+var_38], xmm0
mov byte ptr [rsp+58h+var_28+8], dl
test esi, esi
jz short loc_54F43
mov rcx, [rax+10h]
mov rsi, [rcx]
jmp short loc_54F45
loc_54F43:
xor esi, esi
loc_54F45:
mov rcx, [rax+10h]
mov [rsp+58h+var_48], rcx
movups xmm0, xmmword ptr [rax]
movups [rsp+58h+var_58], xmm0
lea r14, [rsp+58h+var_38]
mov rdi, r14
xor edx, edx
call dump
mov edi, [r14]
mov rsi, [r14+8]
mov rdx, rbx
xor ecx, ecx
call bytes_write
mov rdi, r14
call buffer_free
add rsp, 48h
pop rbx
pop r14
retn
| long long ssz_dump_to_file(
long long a1,
int a2,
char a3,
long long a4,
long long a5,
long long a6,
unsigned int a7,
unsigned __int16 *a8,
long long *a9)
{
long long v9; // rsi
__int128 v11; // [rsp+20h] [rbp-38h] BYREF
__int128 v12; // [rsp+30h] [rbp-28h]
v12 = 0LL;
v11 = 0LL;
BYTE8(v12) = a3;
if ( a2 )
v9 = *a9;
else
v9 = 0LL;
dump((long long)&v11, v9, 0LL, (long long)a9, a5, a6, a7, a8, (long long)a9);
bytes_write(v11, *((long long *)&v11 + 1), a1, 0);
return buffer_free((long long)&v11);
}
| ssz_dump_to_file:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
LEA RAX,[RSP + 0x60]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV byte ptr [RSP + 0x38],DL
TEST ESI,ESI
JZ 0x00154f43
MOV RCX,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RCX]
JMP 0x00154f45
LAB_00154f43:
XOR ESI,ESI
LAB_00154f45:
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RSP],XMM0
LEA R14,[RSP + 0x20]
MOV RDI,R14
XOR EDX,EDX
CALL 0x001549d9
MOV EDI,dword ptr [R14]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDX,RBX
XOR ECX,ECX
CALL 0x001534f3
MOV RDI,R14
CALL 0x0015310b
ADD RSP,0x48
POP RBX
POP R14
RET
|
void ssz_dump_to_file(int8 param_1,int param_2,byte param_3,int8 param_4,
int8 param_5,int8 param_6,int4 param_7,int4 param_8,
int8 *param_9)
{
int8 uVar1;
ulong local_38;
int8 uStack_30;
int8 local_28;
ulong uStack_20;
local_28 = 0;
local_38 = 0;
uStack_30 = 0;
uStack_20 = (ulong)param_3;
if (param_2 == 0) {
uVar1 = 0;
}
else {
uVar1 = *param_9;
}
dump(&local_38,uVar1,0);
bytes_write(local_38 & 0xffffffff,uStack_30,param_1,0,param_5,param_6,param_7,param_8,param_9);
buffer_free(&local_38);
return;
}
| |
39,359 | cs(LefDefParser::defrCallbackType_e, int, void*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/defrw/defrw.cpp | int cs(defrCallbackType_e c, int num, defiUserData ud) {
char* name;
checkType(c);
if (ud != userData) dataError();
switch (c) {
case defrComponentStartCbkType : name = address("COMPONENTS"); break;
case defrNetStartCbkType : name = address("NETS"); break;
case defrStartPinsCbkType : name = address("PINS"); break;
case defrViaStartCbkType : name = address("VIAS"); break;
case defrRegionStartCbkType : name = address("REGIONS"); break;
case defrSNetStartCbkType : name = address("SPECIALNETS"); break;
case defrGroupsStartCbkType : name = address("GROUPS"); break;
case defrScanchainsStartCbkType : name = address("SCANCHAINS"); break;
case defrIOTimingsStartCbkType : name = address("IOTIMINGS"); break;
case defrFPCStartCbkType : name = address("FLOORPLANCONSTRAINTS"); break;
case defrTimingDisablesStartCbkType : name = address("TIMING DISABLES"); break;
case defrPartitionsStartCbkType : name = address("PARTITIONS"); break;
case defrPinPropStartCbkType : name = address("PINPROPERTIES"); break;
case defrBlockageStartCbkType : name = address("BLOCKAGES"); break;
case defrSlotStartCbkType : name = address("SLOTS"); break;
case defrFillStartCbkType : name = address("FILLS"); break;
case defrNonDefaultStartCbkType : name = address("NONDEFAULTRULES"); break;
case defrStylesStartCbkType : name = address("STYLES"); break;
default : name = address("BOGUS"); return 1;
}
fprintf(fout, "\n%s %d ;\n", name, num);
numObjs = num;
return 0;
} | O0 | cpp | cs(LefDefParser::defrCallbackType_e, int, void*):
subq $0x28, %rsp
movl %edi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movl 0x20(%rsp), %edi
callq 0x75a0
movq 0x10(%rsp), %rax
cmpq 0x84c52(%rip), %rax # 0x932a8
je 0xe65d
callq 0x7580
movl 0x20(%rsp), %eax
addl $-0xc, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x56, %eax
ja 0xe801
movq (%rsp), %rax
leaq 0x61c4e(%rip), %rcx # 0x702cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x62684(%rip), %rdi # 0x70d12
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x62680(%rip), %rdi # 0x70d24
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x6b245(%rip), %rdi # 0x798ff
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x6abf3(%rip), %rdi # 0x792c3
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x6acfd(%rip), %rdi # 0x793e3
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x62621(%rip), %rdi # 0x70d1d
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x6adb5(%rip), %rdi # 0x794c7
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x6ae00(%rip), %rdi # 0x79528
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x6ae8d(%rip), %rdi # 0x795cb
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x625d5(%rip), %rdi # 0x70d29
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x625d4(%rip), %rdi # 0x70d3e
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x6aed5(%rip), %rdi # 0x79655
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x6b148(%rip), %rdi # 0x798de
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x6b328(%rip), %rdi # 0x79ad1
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x676da(%rip), %rdi # 0x75e96
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x676d0(%rip), %rdi # 0x75e9f
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x6acaf(%rip), %rdi # 0x79491
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x6b471(%rip), %rdi # 0x79c66
callq 0xe620
movq %rax, 0x8(%rsp)
jmp 0xe81c
leaq 0x61f51(%rip), %rdi # 0x70759
callq 0xe620
movq %rax, 0x8(%rsp)
movl $0x1, 0x24(%rsp)
jmp 0xe84c
movq 0x84a7d(%rip), %rdi # 0x932a0
movq 0x8(%rsp), %rdx
movl 0x1c(%rsp), %ecx
leaq 0x6251b(%rip), %rsi # 0x70d4e
movb $0x0, %al
callq 0x7300
movl 0x1c(%rsp), %eax
movl %eax, 0x84a6c(%rip) # 0x932b0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| _Z2csN12LefDefParser18defrCallbackType_eEiPv:
sub rsp, 28h
mov [rsp+28h+var_8], edi
mov [rsp+28h+var_C], esi
mov [rsp+28h+var_18], rdx
mov edi, [rsp+28h+var_8]
call _Z9checkTypeN12LefDefParser18defrCallbackType_eE; checkType(LefDefParser::defrCallbackType_e)
mov rax, [rsp+28h+var_18]
cmp rax, cs:userData
jz short loc_E65D
call _Z9dataErrorv; dataError(void)
loc_E65D:
mov eax, [rsp+28h+var_8]
add eax, 0FFFFFFF4h; switch 87 cases
mov ecx, eax
mov [rsp+28h+var_28], rcx
sub eax, 56h
ja def_E685; jumptable 000000000000E685 default case, cases 13,14,16-38,40-44,46,47,49,50,52-55,57-66,68,69,71,72,74,75,77,78,80,81,83,84,86,87,89,90,92-94,96,97
mov rax, [rsp+28h+var_28]
lea rcx, jpt_E685
movsxd rax, ds:(jpt_E685 - 702CCh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_E687:
lea rdi, aComponents; jumptable 000000000000E685 case 12
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp loc_E81C
loc_E69D:
lea rdi, aSpecialnets+7; jumptable 000000000000E685 case 15
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp loc_E81C
loc_E6B3:
lea rdi, aKCommonscanpin+0Ch; jumptable 000000000000E685 case 39
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp loc_E81C
loc_E6C9:
lea rdi, aKVias+2; jumptable 000000000000E685 case 45
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp loc_E81C
loc_E6DF:
lea rdi, aKRegions+2; jumptable 000000000000E685 case 48
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp loc_E81C
loc_E6F5:
lea rdi, aSpecialnets; jumptable 000000000000E685 case 51
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp loc_E81C
loc_E70B:
lea rdi, aKGroups+2; jumptable 000000000000E685 case 56
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp loc_E81C
loc_E721:
lea rdi, aKScanchains+2; jumptable 000000000000E685 case 67
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp loc_E81C
loc_E737:
lea rdi, aKIotimings+2; jumptable 000000000000E685 case 70
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp loc_E81C
loc_E74D:
lea rdi, aFloorplanconst; jumptable 000000000000E685 case 73
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp loc_E81C
loc_E763:
lea rdi, aTimingDisables; jumptable 000000000000E685 case 76
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp loc_E81C
loc_E779:
lea rdi, aKPartitions+2; jumptable 000000000000E685 case 79
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp loc_E81C
loc_E78F:
lea rdi, aKPinproperties+2; jumptable 000000000000E685 case 82
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp short loc_E81C
loc_E7A2:
lea rdi, aKBlockages+2; jumptable 000000000000E685 case 85
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp short loc_E81C
loc_E7B5:
lea rdi, aSlots+3; jumptable 000000000000E685 case 88
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp short loc_E81C
loc_E7C8:
lea rdi, aFills+3; jumptable 000000000000E685 case 91
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp short loc_E81C
loc_E7DB:
lea rdi, aKNondefaultrul_0+2; jumptable 000000000000E685 case 95
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp short loc_E81C
loc_E7EE:
lea rdi, aKStyles+2; jumptable 000000000000E685 case 98
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
jmp short loc_E81C
def_E685:
lea rdi, aBogus; jumptable 000000000000E685 default case, cases 13,14,16-38,40-44,46,47,49,50,52-55,57-66,68,69,71,72,74,75,77,78,80,81,83,84,86,87,89,90,92-94,96,97
call _Z7addressPKc; address(char const*)
mov [rsp+28h+var_20], rax
mov [rsp+28h+var_4], 1
jmp short loc_E84C
loc_E81C:
mov rdi, cs:fout
mov rdx, [rsp+28h+var_20]
mov ecx, [rsp+28h+var_C]
lea rsi, aSD; "\n%s %d ;\n"
mov al, 0
call _fprintf
mov eax, [rsp+28h+var_C]
mov cs:numObjs, eax
mov [rsp+28h+var_4], 0
loc_E84C:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long cs(unsigned int a1, int a2, LefDefParser::defiSite *a3)
{
const char *v4; // [rsp+8h] [rbp-20h]
const char *v5; // [rsp+8h] [rbp-20h]
const char *v6; // [rsp+8h] [rbp-20h]
const char *v7; // [rsp+8h] [rbp-20h]
const char *v8; // [rsp+8h] [rbp-20h]
const char *v9; // [rsp+8h] [rbp-20h]
const char *v10; // [rsp+8h] [rbp-20h]
const char *v11; // [rsp+8h] [rbp-20h]
const char *v12; // [rsp+8h] [rbp-20h]
const char *v13; // [rsp+8h] [rbp-20h]
const char *v14; // [rsp+8h] [rbp-20h]
const char *v15; // [rsp+8h] [rbp-20h]
const char *v16; // [rsp+8h] [rbp-20h]
const char *v17; // [rsp+8h] [rbp-20h]
const char *v18; // [rsp+8h] [rbp-20h]
const char *v19; // [rsp+8h] [rbp-20h]
const char *v20; // [rsp+8h] [rbp-20h]
const char *v21; // [rsp+8h] [rbp-20h]
unsigned int v23; // [rsp+24h] [rbp-4h]
checkType(a1);
if ( a3 != userData )
dataError();
switch ( a1 )
{
case 0xCu:
v4 = address("COMPONENTS");
fprintf(fout, "\n%s %d ;\n", v4, a2);
goto LABEL_23;
case 0xFu:
v5 = address("NETS");
fprintf(fout, "\n%s %d ;\n", v5, a2);
goto LABEL_23;
case 0x27u:
v6 = address("PINS");
fprintf(fout, "\n%s %d ;\n", v6, a2);
goto LABEL_23;
case 0x2Du:
v7 = address("VIAS");
fprintf(fout, "\n%s %d ;\n", v7, a2);
goto LABEL_23;
case 0x30u:
v8 = address("REGIONS");
fprintf(fout, "\n%s %d ;\n", v8, a2);
goto LABEL_23;
case 0x33u:
v9 = address("SPECIALNETS");
fprintf(fout, "\n%s %d ;\n", v9, a2);
goto LABEL_23;
case 0x38u:
v10 = address("GROUPS");
fprintf(fout, "\n%s %d ;\n", v10, a2);
goto LABEL_23;
case 0x43u:
v11 = address("SCANCHAINS");
fprintf(fout, "\n%s %d ;\n", v11, a2);
goto LABEL_23;
case 0x46u:
v12 = address("IOTIMINGS");
fprintf(fout, "\n%s %d ;\n", v12, a2);
goto LABEL_23;
case 0x49u:
v13 = address("FLOORPLANCONSTRAINTS");
fprintf(fout, "\n%s %d ;\n", v13, a2);
goto LABEL_23;
case 0x4Cu:
v14 = address("TIMING DISABLES");
fprintf(fout, "\n%s %d ;\n", v14, a2);
goto LABEL_23;
case 0x4Fu:
v15 = address("PARTITIONS");
fprintf(fout, "\n%s %d ;\n", v15, a2);
goto LABEL_23;
case 0x52u:
v16 = address("PINPROPERTIES");
fprintf(fout, "\n%s %d ;\n", v16, a2);
goto LABEL_23;
case 0x55u:
v17 = address("BLOCKAGES");
fprintf(fout, "\n%s %d ;\n", v17, a2);
goto LABEL_23;
case 0x58u:
v18 = address("SLOTS");
fprintf(fout, "\n%s %d ;\n", v18, a2);
goto LABEL_23;
case 0x5Bu:
v19 = address("FILLS");
fprintf(fout, "\n%s %d ;\n", v19, a2);
goto LABEL_23;
case 0x5Fu:
v20 = address("NONDEFAULTRULES");
fprintf(fout, "\n%s %d ;\n", v20, a2);
goto LABEL_23;
case 0x62u:
v21 = address("STYLES");
fprintf(fout, "\n%s %d ;\n", v21, a2);
LABEL_23:
numObjs = a2;
v23 = 0;
break;
default:
address("BOGUS");
v23 = 1;
break;
}
return v23;
}
| cs:
SUB RSP,0x28
MOV dword ptr [RSP + 0x20],EDI
MOV dword ptr [RSP + 0x1c],ESI
MOV qword ptr [RSP + 0x10],RDX
MOV EDI,dword ptr [RSP + 0x20]
CALL 0x001075a0
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,qword ptr [0x001932a8]
JZ 0x0010e65d
CALL 0x00107580
LAB_0010e65d:
MOV EAX,dword ptr [RSP + 0x20]
ADD EAX,-0xc
MOV ECX,EAX
MOV qword ptr [RSP],RCX
SUB EAX,0x56
JA 0x0010e801
MOV RAX,qword ptr [RSP]
LEA RCX,[0x1702cc]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_c:
LEA RDI,[0x170d12]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_f:
LEA RDI,[0x170d24]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_27:
LEA RDI,[0x1798ff]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_2d:
LEA RDI,[0x1792c3]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_30:
LEA RDI,[0x1793e3]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_33:
LEA RDI,[0x170d1d]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_38:
LEA RDI,[0x1794c7]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_43:
LEA RDI,[0x179528]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_46:
LEA RDI,[0x1795cb]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_49:
LEA RDI,[0x170d29]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_4c:
LEA RDI,[0x170d3e]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_4f:
LEA RDI,[0x179655]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_52:
LEA RDI,[0x1798de]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_55:
LEA RDI,[0x179ad1]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_58:
LEA RDI,[0x175e96]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_5b:
LEA RDI,[0x175e9f]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_5f:
LEA RDI,[0x179491]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_62:
LEA RDI,[0x179c66]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0010e81c
caseD_d:
LEA RDI,[0x170759]
CALL 0x0010e620
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RSP + 0x24],0x1
JMP 0x0010e84c
LAB_0010e81c:
MOV RDI,qword ptr [0x001932a0]
MOV RDX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x1c]
LEA RSI,[0x170d4e]
MOV AL,0x0
CALL 0x00107300
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [0x001932b0],EAX
MOV dword ptr [RSP + 0x24],0x0
LAB_0010e84c:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
/* cs(LefDefParser::defrCallbackType_e, int, void*) */
int4 cs(int4 param_1,uint param_2,long param_3)
{
int8 local_20;
checkType(param_1);
if (param_3 != userData) {
dataError();
}
switch(param_1) {
case 0xc:
local_20 = address("COMPONENTS");
break;
default:
address("BOGUS");
return 1;
case 0xf:
local_20 = address("NETS");
break;
case 0x27:
local_20 = address("PINS");
break;
case 0x2d:
local_20 = address("VIAS");
break;
case 0x30:
local_20 = address("REGIONS");
break;
case 0x33:
local_20 = address("SPECIALNETS");
break;
case 0x38:
local_20 = address("GROUPS");
break;
case 0x43:
local_20 = address("SCANCHAINS");
break;
case 0x46:
local_20 = address("IOTIMINGS");
break;
case 0x49:
local_20 = address("FLOORPLANCONSTRAINTS");
break;
case 0x4c:
local_20 = address("TIMING DISABLES");
break;
case 0x4f:
local_20 = address("PARTITIONS");
break;
case 0x52:
local_20 = address("PINPROPERTIES");
break;
case 0x55:
local_20 = address("BLOCKAGES");
break;
case 0x58:
local_20 = address("SLOTS");
break;
case 0x5b:
local_20 = address("FILLS");
break;
case 0x5f:
local_20 = address("NONDEFAULTRULES");
break;
case 0x62:
local_20 = address("STYLES");
}
fprintf(fout,"\n%s %d ;\n",local_20,(ulong)param_2);
numObjs = param_2;
return 0;
}
| |
39,360 | get_charsets_dir | eloqsql/mysys/charset.c | char *get_charsets_dir(char *buf)
{
const char *sharedir= SHAREDIR;
char *res;
DBUG_ENTER("get_charsets_dir");
if (charsets_dir != NULL)
strmake(buf, charsets_dir, FN_REFLEN-1);
else
{
if (test_if_hard_path(sharedir) ||
is_prefix(sharedir, DEFAULT_CHARSET_HOME))
strxmov(buf, sharedir, "/", CHARSET_DIR, NullS);
else
strxmov(buf, DEFAULT_CHARSET_HOME, "/", sharedir, "/", CHARSET_DIR,
NullS);
}
res= convert_dirname(buf,buf,NullS);
DBUG_PRINT("info",("charsets dir: '%s'", buf));
DBUG_RETURN(res);
} | O0 | c | get_charsets_dir:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x110566(%rip), %rax # 0x1412599
movq %rax, -0x10(%rbp)
leaq 0x1313a82(%rip), %rax # 0x2615ac0
cmpq $0x0, (%rax)
je 0x130205e
movq -0x8(%rbp), %rdi
leaq 0x1313a71(%rip), %rax # 0x2615ac0
movq (%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x1395640
jmp 0x13020d8
movq -0x10(%rbp), %rdi
callq 0x1320e30
cmpl $0x0, %eax
jne 0x1302081
movq -0x10(%rbp), %rdi
leaq 0x1103b5(%rip), %rsi # 0x141242c
callq 0x1391e30
cmpl $0x0, %eax
je 0x13020a5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x142f53(%rip), %rdx # 0x1444fe3
leaq 0x11051b(%rip), %rcx # 0x14125b2
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x1395720
jmp 0x13020d6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
leaq 0x110378(%rip), %rsi # 0x141242c
leaq 0x142f28(%rip), %r8 # 0x1444fe3
leaq 0x1104f0(%rip), %r9 # 0x14125b2
xorl %eax, %eax
movq %r8, %rdx
movq $0x0, (%rsp)
movb $0x0, %al
callq 0x1395720
jmp 0x13020d8
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1308840
movq %rax, -0x18(%rbp)
jmp 0x13020ef
jmp 0x13020f1
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| get_charsets_dir:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
lea rax, aHomeMonoInstal_2; "/home/mono/install/share"
mov [rbp+var_10], rax
lea rax, charsets_dir
cmp qword ptr [rax], 0
jz short loc_130205E
mov rdi, [rbp+var_8]
lea rax, charsets_dir
mov rsi, [rax]
mov edx, 1FFh
call strmake
jmp short loc_13020D8
loc_130205E:
mov rdi, [rbp+var_10]
call test_if_hard_path
cmp eax, 0
jnz short loc_1302081
mov rdi, [rbp+var_10]
lea rsi, aHomeMonoInstal_0; "/home/mono/install"
call is_prefix
cmp eax, 0
jz short loc_13020A5
loc_1302081:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, word_1444FE3
lea rcx, aCharsets; "charsets/"
xor eax, eax
mov r8d, eax
mov al, 0
call strxmov
jmp short loc_13020D6
loc_13020A5:
mov rdi, [rbp+var_8]
mov rcx, [rbp+var_10]
lea rsi, aHomeMonoInstal_0; "/home/mono/install"
lea r8, word_1444FE3
lea r9, aCharsets; "charsets/"
xor eax, eax
mov rdx, r8
mov [rsp+30h+var_30], 0
mov al, 0
call strxmov
loc_13020D6:
jmp short $+2
loc_13020D8:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
xor eax, eax
mov edx, eax
call convert_dirname
mov [rbp+var_18], rax
jmp short $+2
loc_13020EF:
jmp short $+2
loc_13020F1:
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
| long long get_charsets_dir(long long a1)
{
int v1; // r9d
if ( charsets_dir[0] )
{
strmake(a1, charsets_dir[0], 511LL);
}
else if ( (unsigned int)test_if_hard_path("/home/mono/install/share")
|| (unsigned int)is_prefix("/home/mono/install/share", "/home/mono/install") )
{
strxmov(a1, (unsigned int)"/home/mono/install/share", (unsigned int)&word_1444FE3, (unsigned int)"charsets/", 0, v1);
}
else
{
strxmov(
a1,
(unsigned int)"/home/mono/install",
(unsigned int)&word_1444FE3,
(unsigned int)"/home/mono/install/share",
(unsigned int)&word_1444FE3,
(unsigned int)"charsets/");
}
return convert_dirname(a1, a1, 0LL);
}
| destroy<TrxUndoRsegs>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
XOR EDX,EDX
CALL 0x01302050
ADD RSP,0x10
POP RBP
RET
|
/* void std::allocator_traits<ut_allocator<TrxUndoRsegs, true>
>::destroy<TrxUndoRsegs>(ut_allocator<TrxUndoRsegs, true>&, TrxUndoRsegs*) */
void std::allocator_traits<ut_allocator<TrxUndoRsegs,true>>::destroy<TrxUndoRsegs>
(ut_allocator *param_1,TrxUndoRsegs *param_2)
{
_S_destroy<ut_allocator<TrxUndoRsegs,true>,TrxUndoRsegs>(param_1,param_2,0);
return;
}
| |
39,361 | 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>::at<char const (&) [16], 0>(char const (&) [16]) const | llama.cpp/common/./json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O3 | 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> 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>::at<char const (&) [16], 0>(char const (&) [16]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x92acd
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x92ab7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x261c0
testl %eax, %eax
je 0x92aac
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0x92a8d
jmp 0x92aaf
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0x92b2b
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x25790
movq %rax, %rbx
movq %r14, %rdi
callq 0x63928
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xe21be(%rip), %rsi # 0x174cad
leaq 0x20(%rsp), %rdi
callq 0x7c61b
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x65724
xorl %ebp, %ebp
leaq 0x1477c6(%rip), %rsi # 0x1da2e0
leaq -0xe8bf(%rip), %rdx # 0x84262
movq %rbx, %rdi
callq 0x25c00
jmp 0x92ba4
movl $0x20, %edi
callq 0x25790
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x257c0
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x52736
leaq 0xe2163(%rip), %rsi # 0x174cc3
leaq 0xe2162(%rip), %rcx # 0x174cc9
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x81384
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x7c6a4
xorl %ebp, %ebp
leaq 0x147b4b(%rip), %rsi # 0x1da6e0
leaq -0xe93a(%rip), %rdx # 0x84262
movq %rbx, %rdi
callq 0x25c00
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92bc2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x251b0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x92c0d
movq 0x10(%rsp), %rsi
jmp 0x92c05
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x92c17
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x251b0
jmp 0x92c17
jmp 0x92c14
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92c0d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x251b0
testb %bpl, %bpl
jne 0x92c17
jmp 0x92c1f
movq %rax, %r14
movq %rbx, %rdi
callq 0x26150
movq %r14, %rdi
callq 0x25ca0
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA7_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; void *
push r15; int
push r14; __int64
push r12; int
push rbx; void *
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_92ACD
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_92AB7
loc_92A8D:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_92AAC
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_92A8D
jmp short loc_92AAF
loc_92AAC:
mov rax, rbx
loc_92AAF:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_92AB7:
cmp rax, rbx
jz short loc_92B2B
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_92ACD:
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)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; 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
jmp short loc_92BA4
loc_92B2B:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, 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, aKey; "key '"
lea rcx, aNotFound_0; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_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_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_92BA4:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_92BC2
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_92BC2:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_92C0D
mov rsi, [rsp+68h+var_58]
jmp short loc_92C05
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_92C17
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_92C17
jmp short loc_92C14
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_92C0D
mov rsi, [rsp+68h+var_38]
loc_92C05:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_92C0D:
test bpl, bpl
jnz short loc_92C17
jmp short loc_92C1F
loc_92C14:
mov r14, rax
loc_92C17:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_92C1F:
mov rdi, r14
call __Unwind_Resume
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA7_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)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(&)[22],char const*>(
(long long)v11,
(long long)"cannot use at() with ",
v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
v11);
__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);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v11,
(long long)"key '",
v9,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA7_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x00192acd
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x00192ab7
LAB_00192a8d:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001261c0
TEST EAX,EAX
JZ 0x00192aac
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x00192a8d
JMP 0x00192aaf
LAB_00192aac:
MOV RAX,RBX
LAB_00192aaf:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_00192ab7:
CMP RAX,RBX
JZ 0x00192b2b
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00192acd:
MOV EDI,0x20
CALL 0x00125790
MOV RBX,RAX
MOV RDI,R14
CALL 0x00163928
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_00192ae8:
LEA RSI,[0x274cad]
LEA RDI,[RSP + 0x20]
CALL 0x0017c61b
MOV BPL,0x1
LAB_00192afc:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00165724
XOR EBP,EBP
LEA RSI,[0x2da2e0]
LEA RDX,[0x184262]
MOV RDI,RBX
CALL 0x00125c00
LAB_00192b2b:
MOV EDI,0x20
CALL 0x00125790
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x001257c0
LEA RDX,[RAX + R15*0x1]
LAB_00192b4e:
MOV RDI,RSP
MOV RSI,R15
CALL 0x00152736
LAB_00192b59:
LEA RSI,[0x274cc3]
LEA RCX,[0x274cc9]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00181384
MOV BPL,0x1
LAB_00192b77:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0017c6a4
XOR EBP,EBP
LEA RSI,[0x2da6e0]
LEA RDX,[0x184262]
MOV RDI,RBX
CALL 0x00125c00
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA7_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(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,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(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>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)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>
::type_name(param_1);
/* try { // try from 00192ae8 to 00192af8 has its CatchHandler @ 00192c14 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 00192afc to 00192b28 has its CatchHandler @ 00192bef */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 00192b4e to 00192b58 has its CatchHandler @ 00192bed */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 00192b59 to 00192b73 has its CatchHandler @ 00192bd2 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 00192b77 to 00192ba3 has its CatchHandler @ 00192ba4 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| |
39,362 | translog_write_record | eloqsql/storage/maria/ma_loghandler.c | my_bool translog_write_record(LSN *lsn,
enum translog_record_type type,
TRN *trn, MARIA_HA *tbl_info,
translog_size_t rec_len,
uint part_no,
LEX_CUSTRING *parts_data,
uchar *store_share_id,
void *hook_arg)
{
struct st_translog_parts parts;
LEX_CUSTRING *part;
int rc;
uint short_trid= trn->short_id;
DBUG_ENTER("translog_write_record");
DBUG_PRINT("enter", ("type: %u (%s) ShortTrID: %u rec_len: %lu",
(uint) type, log_record_type_descriptor[type].name,
(uint) short_trid, (ulong) rec_len));
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
DBUG_ASSERT(type != 0);
DBUG_SLOW_ASSERT((uint)type <= max_allowed_translog_type);
if (unlikely(translog_status != TRANSLOG_OK))
{
DBUG_PRINT("error", ("Transaction log is write protected"));
DBUG_RETURN(1);
}
if (tbl_info && type != LOGREC_FILE_ID)
{
MARIA_SHARE *share= tbl_info->s;
DBUG_ASSERT(share->now_transactional);
if (unlikely(share->id == 0))
{
/*
First log write for this MARIA_SHARE; give it a short id.
When the lock manager is enabled and needs a short id, it should be
assigned in the lock manager (because row locks will be taken before
log records are written; for example SELECT FOR UPDATE takes locks but
writes no log record.
*/
if (unlikely(translog_assign_id_to_share(tbl_info, trn)))
DBUG_RETURN(1);
}
fileid_store(store_share_id, share->id);
}
if (unlikely(!(trn->first_undo_lsn & TRANSACTION_LOGGED_LONG_ID)))
{
LSN dummy_lsn;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1];
uchar log_data[6];
DBUG_ASSERT(trn->undo_lsn == LSN_IMPOSSIBLE);
int6store(log_data, trn->trid);
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data);
trn->first_undo_lsn|= TRANSACTION_LOGGED_LONG_ID; /* no recursion */
if (unlikely(translog_write_record(&dummy_lsn, LOGREC_LONG_TRANSACTION_ID,
trn, NULL, sizeof(log_data),
sizeof(log_array)/sizeof(log_array[0]),
log_array, NULL, NULL)))
DBUG_RETURN(1);
}
parts.parts= parts_data;
/* count parts if they are not counted by upper level */
if (part_no == 0)
{
for (part_no= TRANSLOG_INTERNAL_PARTS;
parts_data[part_no].length != 0;
part_no++);
}
parts.elements= part_no;
parts.current= TRANSLOG_INTERNAL_PARTS;
/* clear TRANSLOG_INTERNAL_PARTS */
compile_time_assert(TRANSLOG_INTERNAL_PARTS != 0);
parts_data[0].str= 0;
parts_data[0].length= 0;
/* count length of the record */
if (rec_len == 0)
{
for(part= parts_data + TRANSLOG_INTERNAL_PARTS;\
part < parts_data + part_no;
part++)
{
rec_len+= (translog_size_t) part->length;
}
}
parts.record_length= rec_len;
#ifndef DBUG_OFF
{
uint i;
size_t len= 0;
#ifdef HAVE_valgrind
ha_checksum checksum= 0;
#endif
for (i= TRANSLOG_INTERNAL_PARTS; i < part_no; i++)
{
#ifdef HAVE_valgrind
/* Find unitialized bytes early */
checksum+= my_checksum(checksum, parts_data[i].str,
parts_data[i].length);
#endif
len+= parts_data[i].length;
}
DBUG_ASSERT(len == rec_len);
}
#endif
/*
Start total_record_length from record_length then overhead will
be add
*/
parts.total_record_length= parts.record_length;
DBUG_PRINT("info", ("record length: %lu", (ulong) parts.record_length));
/* process this parts */
if (!(rc= (log_record_type_descriptor[type].prewrite_hook &&
(*log_record_type_descriptor[type].prewrite_hook)(type, trn,
tbl_info,
hook_arg))))
{
switch (log_record_type_descriptor[type].rclass) {
case LOGRECTYPE_VARIABLE_LENGTH:
rc= translog_write_variable_record(lsn, type, tbl_info,
short_trid, &parts, trn, hook_arg);
break;
case LOGRECTYPE_PSEUDOFIXEDLENGTH:
case LOGRECTYPE_FIXEDLENGTH:
rc= translog_write_fixed_record(lsn, type, tbl_info,
short_trid, &parts, trn, hook_arg);
break;
case LOGRECTYPE_NOT_ALLOWED:
default:
DBUG_ASSERT(0);
rc= 1;
}
}
DBUG_PRINT("info", ("LSN: " LSN_FMT, LSN_IN_PARTS(*lsn)));
DBUG_RETURN(rc);
} | O0 | c | translog_write_record:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
movl %r9d, -0x38(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xac(%rax), %eax
movl %eax, -0x60(%rbp)
jmp 0x9144b
jmp 0x9144d
jmp 0x9144f
jmp 0x91451
jmp 0x91453
jmp 0x91455
jmp 0x91457
cmpl $0x1, 0x3f9372(%rip) # 0x48a7d0
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x91488
jmp 0x9147b
jmp 0x9147d
jmp 0x9147f
movb $0x1, -0xf(%rbp)
jmp 0x91807
cmpq $0x0, -0x30(%rbp)
je 0x9151e
cmpl $0x23, -0x1c(%rbp)
je 0x9151e
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x914aa
movq -0x68(%rbp), %rax
movzwl 0x620(%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x91500
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x91840
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x914fe
jmp 0x914f5
movb $0x1, -0xf(%rbp)
jmp 0x91807
jmp 0x91500
jmp 0x91502
movq 0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rax
movw 0x620(%rax), %cx
movq -0x70(%rbp), %rax
movw %cx, (%rax)
jmp 0x9151e
movq -0x28(%rbp), %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq 0xa0(%rcx), %rax
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x91628
jmp 0x9155a
jmp 0x9155c
jmp 0x9155e
leaq -0xe(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
movl %eax, %ecx
movq -0xb8(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
shrq $0x20, %rax
movw %ax, %cx
movq -0xb8(%rbp), %rax
movw %cx, 0x4(%rax)
leaq -0xe(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x6, -0x88(%rbp)
movq -0x28(%rbp), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
orq 0xa0(%rax), %rcx
movq %rcx, 0xa0(%rax)
movq -0x28(%rbp), %rdx
leaq -0xb0(%rbp), %rax
leaq -0x78(%rbp), %rdi
movl $0x24, %esi
xorl %ecx, %ecx
movl $0x6, %r8d
movl $0x3, %r9d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x91400
movsbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x91626
jmp 0x9161d
movb $0x1, -0xf(%rbp)
jmp 0x91807
jmp 0x91628
movq 0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x38(%rbp)
jne 0x91661
movl $0x2, -0x38(%rbp)
movq 0x10(%rbp), %rax
movl -0x38(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x9165f
jmp 0x91654
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x9163d
jmp 0x91661
movl -0x38(%rbp), %eax
movl %eax, -0x44(%rbp)
movl $0x2, -0x48(%rbp)
jmp 0x91670
movq 0x10(%rbp), %rax
movq $0x0, (%rax)
movq 0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
cmpl $0x0, -0x34(%rbp)
jne 0x916ce
movq 0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq 0x10(%rbp), %rcx
movl -0x38(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x916cc
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x58(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x58(%rbp)
jmp 0x91699
jmp 0x916ce
movl -0x34(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x916dc
movl -0x1c(%rbp), %eax
leaq 0x3f90fa(%rip), %rcx # 0x48a7e0
imulq $0x48, %rax, %rax
addq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, 0x8(%rcx)
movb %al, -0xb9(%rbp)
je 0x91733
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0x3f90d8(%rip), %rax # 0x48a7e0
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movl -0x1c(%rbp), %edi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq 0x20(%rbp), %rcx
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0xb9(%rbp)
movb -0xb9(%rbp), %al
movb %al, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movl %ecx, -0x5c(%rbp)
testb $0x1, %al
jne 0x917fb
movl -0x1c(%rbp), %eax
leaq (%rax,%rax,8), %rcx
leaq 0x3f9086(%rip), %rax # 0x48a7e0
movl (%rax,%rcx,8), %eax
movl %eax, -0xc0(%rbp)
testl %eax, %eax
je 0x917ec
jmp 0x9176d
movl -0xc0(%rbp), %eax
subl $0x1, %eax
je 0x9178a
jmp 0x9177a
movl -0xc0(%rbp), %eax
addl $-0x2, %eax
subl $0x2, %eax
jb 0x917bb
jmp 0x917ee
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x30(%rbp), %rdx
movl -0x60(%rbp), %eax
movw %ax, %cx
movq -0x28(%rbp), %r9
movq 0x20(%rbp), %rax
leaq -0x50(%rbp), %r8
movzwl %cx, %ecx
movq %rax, (%rsp)
callq 0x91a90
movsbl %al, %eax
movl %eax, -0x5c(%rbp)
jmp 0x917f9
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x30(%rbp), %rdx
movl -0x60(%rbp), %eax
movw %ax, %cx
movq -0x28(%rbp), %r9
movq 0x20(%rbp), %rax
leaq -0x50(%rbp), %r8
movzwl %cx, %ecx
movq %rax, (%rsp)
callq 0x91d20
movsbl %al, %eax
movl %eax, -0x5c(%rbp)
jmp 0x917f9
jmp 0x917ee
jmp 0x917f0
jmp 0x917f2
movl $0x1, -0x5c(%rbp)
jmp 0x917fb
jmp 0x917fd
jmp 0x917ff
jmp 0x91801
movl -0x5c(%rbp), %eax
movb %al, -0xf(%rbp)
movb -0xf(%rbp), %al
movb %al, -0xc1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x91831
movb -0xc1(%rbp), %al
addq $0xe0, %rsp
popq %rbp
retq
callq 0x2a260
nopw %cs:(%rax,%rax)
| translog_write_record:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_28], rdx
mov [rbp+var_30], rcx
mov [rbp+var_34], r8d
mov [rbp+var_38], r9d
mov rax, [rbp+var_28]
movzx eax, word ptr [rax+0ACh]
mov [rbp+var_60], eax
jmp short $+2
loc_9144B:
jmp short $+2
loc_9144D:
jmp short $+2
loc_9144F:
jmp short $+2
loc_91451:
jmp short $+2
loc_91453:
jmp short $+2
loc_91455:
jmp short $+2
loc_91457:
cmp cs:translog_status, 1
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_91488
jmp short $+2
loc_9147B:
jmp short $+2
loc_9147D:
jmp short $+2
loc_9147F:
mov [rbp+var_F], 1
jmp loc_91807
loc_91488:
cmp [rbp+var_30], 0
jz loc_9151E
cmp [rbp+var_1C], 23h ; '#'
jz loc_9151E
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_68], rax
jmp short $+2
loc_914AA:
mov rax, [rbp+var_68]
movzx eax, word ptr [rax+620h]
cmp eax, 0
setz 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_91500
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_28]
call translog_assign_id_to_share
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_914FE
jmp short $+2
loc_914F5:
mov [rbp+var_F], 1
jmp loc_91807
loc_914FE:
jmp short $+2
loc_91500:
jmp short $+2
loc_91502:
mov rax, [rbp+arg_8]
mov [rbp+var_70], rax
mov rax, [rbp+var_68]
mov cx, [rax+620h]
mov rax, [rbp+var_70]
mov [rax], cx
jmp short $+2
loc_9151E:
mov rcx, [rbp+var_28]
mov rax, 8000000000000000h
and rax, [rcx+0A0h]
cmp rax, 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz loc_91628
jmp short $+2
loc_9155A:
jmp short $+2
loc_9155C:
jmp short $+2
loc_9155E:
lea rax, [rbp+var_E]
mov [rbp+var_B8], rax
mov rax, [rbp+var_28]
mov rax, [rax+78h]
mov ecx, eax
mov rax, [rbp+var_B8]
mov [rax], ecx
mov rax, [rbp+var_28]
mov rax, [rax+78h]
shr rax, 20h
mov cx, ax
mov rax, [rbp+var_B8]
mov [rax+4], cx
lea rax, [rbp+var_E]
mov [rbp+var_90], rax
mov [rbp+var_88], 6
mov rax, [rbp+var_28]
mov rcx, 8000000000000000h
or rcx, [rax+0A0h]
mov [rax+0A0h], rcx
mov rdx, [rbp+var_28]
lea rax, [rbp+var_B0]
lea rdi, [rbp+var_78]
mov esi, 24h ; '$'
xor ecx, ecx
mov r8d, 6
mov r9d, 3
mov [rsp+0E0h+var_E0], rax
mov [rsp+0E0h+var_D8], 0
mov [rsp+0E0h+var_D0], 0
call translog_write_record
movsx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_91626
jmp short $+2
loc_9161D:
mov [rbp+var_F], 1
jmp loc_91807
loc_91626:
jmp short $+2
loc_91628:
mov rax, [rbp+arg_0]
mov [rbp+var_40], rax
cmp [rbp+var_38], 0
jnz short loc_91661
mov [rbp+var_38], 2
loc_9163D:
mov rax, [rbp+arg_0]
mov ecx, [rbp+var_38]
shl rcx, 4
add rax, rcx
cmp qword ptr [rax+8], 0
jz short loc_9165F
jmp short $+2
loc_91654:
mov eax, [rbp+var_38]
add eax, 1
mov [rbp+var_38], eax
jmp short loc_9163D
loc_9165F:
jmp short $+2
loc_91661:
mov eax, [rbp+var_38]
mov [rbp+var_44], eax
mov [rbp+var_48], 2
jmp short $+2
loc_91670:
mov rax, [rbp+arg_0]
mov qword ptr [rax], 0
mov rax, [rbp+arg_0]
mov qword ptr [rax+8], 0
cmp [rbp+var_34], 0
jnz short loc_916CE
mov rax, [rbp+arg_0]
add rax, 20h ; ' '
mov [rbp+var_58], rax
loc_91699:
mov rax, [rbp+var_58]
mov rcx, [rbp+arg_0]
mov edx, [rbp+var_38]
shl rdx, 4
add rcx, rdx
cmp rax, rcx
jnb short loc_916CC
mov rax, [rbp+var_58]
mov rax, [rax+8]
add eax, [rbp+var_34]
mov [rbp+var_34], eax
mov rax, [rbp+var_58]
add rax, 10h
mov [rbp+var_58], rax
jmp short loc_91699
loc_916CC:
jmp short $+2
loc_916CE:
mov eax, [rbp+var_34]
mov [rbp+var_50], eax
mov eax, [rbp+var_50]
mov [rbp+var_4C], eax
jmp short $+2
loc_916DC:
mov eax, [rbp+var_1C]
lea rcx, log_record_type_descriptor
imul rax, 48h ; 'H'
add rcx, rax
xor eax, eax
cmp qword ptr [rcx+8], 0
mov [rbp+var_B9], al
jz short loc_91733
mov eax, [rbp+var_1C]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
mov rax, [rax+8]
mov edi, [rbp+var_1C]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_30]
mov rcx, [rbp+arg_10]
call rax
movsx eax, al
cmp eax, 0
setnz al
mov [rbp+var_B9], al
loc_91733:
mov al, [rbp+var_B9]
mov cl, al
and cl, 1
movzx ecx, cl
mov [rbp+var_5C], ecx
test al, 1
jnz loc_917FB
mov eax, [rbp+var_1C]
lea rcx, [rax+rax*8]
lea rax, log_record_type_descriptor
mov eax, [rax+rcx*8]
mov [rbp+var_C0], eax
test eax, eax
jz loc_917EC
jmp short $+2
loc_9176D:
mov eax, [rbp+var_C0]
sub eax, 1
jz short loc_9178A
jmp short $+2
loc_9177A:
mov eax, [rbp+var_C0]
add eax, 0FFFFFFFEh
sub eax, 2
jb short loc_917BB
jmp short loc_917EE
loc_9178A:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_1C]
mov rdx, [rbp+var_30]
mov eax, [rbp+var_60]
mov cx, ax
mov r9, [rbp+var_28]
mov rax, [rbp+arg_10]
lea r8, [rbp+var_50]
movzx ecx, cx
mov [rsp+0E0h+var_E0], rax
call translog_write_variable_record
movsx eax, al
mov [rbp+var_5C], eax
jmp short loc_917F9
loc_917BB:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_1C]
mov rdx, [rbp+var_30]
mov eax, [rbp+var_60]
mov cx, ax
mov r9, [rbp+var_28]
mov rax, [rbp+arg_10]
lea r8, [rbp+var_50]
movzx ecx, cx
mov [rsp+0E0h+var_E0], rax
call translog_write_fixed_record
movsx eax, al
mov [rbp+var_5C], eax
jmp short loc_917F9
loc_917EC:
jmp short $+2
loc_917EE:
jmp short $+2
loc_917F0:
jmp short $+2
loc_917F2:
mov [rbp+var_5C], 1
loc_917F9:
jmp short $+2
loc_917FB:
jmp short $+2
loc_917FD:
jmp short $+2
loc_917FF:
jmp short $+2
loc_91801:
mov eax, [rbp+var_5C]
mov [rbp+var_F], al
loc_91807:
mov al, [rbp+var_F]
mov [rbp+var_C1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_91831
mov al, [rbp+var_C1]
add rsp, 0E0h
pop rbp
retn
loc_91831:
call ___stack_chk_fail
| char translog_write_record(
long long a1,
unsigned int a2,
long long a3,
long long *a4,
int a5,
unsigned int a6,
_QWORD *a7,
_WORD *a8,
long long a9)
{
int v10; // [rsp+20h] [rbp-C0h]
bool v11; // [rsp+27h] [rbp-B9h]
_BYTE v12[32]; // [rsp+30h] [rbp-B0h] BYREF
int *v13; // [rsp+50h] [rbp-90h]
long long v14; // [rsp+58h] [rbp-88h]
char v15; // [rsp+68h] [rbp-78h] BYREF
_WORD *v16; // [rsp+70h] [rbp-70h]
long long v17; // [rsp+78h] [rbp-68h]
int v18; // [rsp+80h] [rbp-60h]
int v19; // [rsp+84h] [rbp-5Ch]
_QWORD *j; // [rsp+88h] [rbp-58h]
_DWORD v21[4]; // [rsp+90h] [rbp-50h] BYREF
_QWORD *v22; // [rsp+A0h] [rbp-40h]
unsigned int i; // [rsp+A8h] [rbp-38h]
int v24; // [rsp+ACh] [rbp-34h]
long long *v25; // [rsp+B0h] [rbp-30h]
long long v26; // [rsp+B8h] [rbp-28h]
unsigned int v27; // [rsp+C4h] [rbp-1Ch]
long long v28; // [rsp+C8h] [rbp-18h]
int v30; // [rsp+D2h] [rbp-Eh] BYREF
__int16 v31; // [rsp+D6h] [rbp-Ah]
unsigned long long v32; // [rsp+D8h] [rbp-8h]
v32 = __readfsqword(0x28u);
v28 = a1;
v27 = a2;
v26 = a3;
v25 = a4;
v24 = a5;
i = a6;
v18 = *(unsigned __int16 *)(a3 + 172);
if ( translog_status == 1 )
{
if ( v25 && v27 != 35 )
{
v17 = *v25;
if ( !*(_WORD *)(v17 + 1568) && (unsigned int)translog_assign_id_to_share(v25, v26) )
return 1;
v16 = a8;
*a8 = *(_WORD *)(v17 + 1568);
}
if ( *(long long *)(v26 + 160) >= 0 )
{
v30 = *(_QWORD *)(v26 + 120);
v31 = WORD2(*(_QWORD *)(v26 + 120));
v13 = &v30;
v14 = 6LL;
*(_QWORD *)(v26 + 160) |= 0x8000000000000000LL;
if ( (unsigned __int8)translog_write_record((unsigned int)&v15, 36, v26, 0, 6, 3, (long long)v12, 0LL, 0LL) )
return 1;
}
v22 = a7;
if ( !i )
{
for ( i = 2; a7[2 * i + 1]; ++i )
;
}
v21[3] = i;
v21[2] = 2;
*a7 = 0LL;
a7[1] = 0LL;
if ( !v24 )
{
for ( j = a7 + 4; j < &a7[2 * i]; j += 2 )
v24 += j[1];
}
v21[0] = v24;
v21[1] = v24;
v11 = 0;
if ( *(_QWORD *)&log_record_type_descriptor[18 * v27 + 2] )
v11 = (*(char ( **)(_QWORD, long long, long long *, long long))&log_record_type_descriptor[18 * v27 + 2])(
v27,
v26,
v25,
a9) != 0;
v19 = v11;
if ( !v11 )
{
v10 = log_record_type_descriptor[18 * v27];
if ( !v10 )
return 1;
if ( v10 == 1 )
{
return translog_write_variable_record(v28, v27, (_DWORD)v25, (unsigned __int16)v18, (unsigned int)v21, v26, a9);
}
else
{
if ( (unsigned int)(v10 - 2) >= 2 )
return 1;
return translog_write_fixed_record(v28, v27, (_DWORD)v25, (unsigned __int16)v18, (unsigned int)v21, v26, a9);
}
}
return v19;
}
return 1;
}
| translog_write_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV qword ptr [RBP + -0x28],RDX
MOV qword ptr [RBP + -0x30],RCX
MOV dword ptr [RBP + -0x34],R8D
MOV dword ptr [RBP + -0x38],R9D
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,word ptr [RAX + 0xac]
MOV dword ptr [RBP + -0x60],EAX
JMP 0x0019144b
LAB_0019144b:
JMP 0x0019144d
LAB_0019144d:
JMP 0x0019144f
LAB_0019144f:
JMP 0x00191451
LAB_00191451:
JMP 0x00191453
LAB_00191453:
JMP 0x00191455
LAB_00191455:
JMP 0x00191457
LAB_00191457:
CMP dword ptr [0x0058a7d0],0x1
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00191488
JMP 0x0019147b
LAB_0019147b:
JMP 0x0019147d
LAB_0019147d:
JMP 0x0019147f
LAB_0019147f:
MOV byte ptr [RBP + -0xf],0x1
JMP 0x00191807
LAB_00191488:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0019151e
CMP dword ptr [RBP + -0x1c],0x23
JZ 0x0019151e
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
JMP 0x001914aa
LAB_001914aa:
MOV RAX,qword ptr [RBP + -0x68]
MOVZX EAX,word ptr [RAX + 0x620]
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00191500
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00191840
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001914fe
JMP 0x001914f5
LAB_001914f5:
MOV byte ptr [RBP + -0xf],0x1
JMP 0x00191807
LAB_001914fe:
JMP 0x00191500
LAB_00191500:
JMP 0x00191502
LAB_00191502:
MOV RAX,qword ptr [RBP + 0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV CX,word ptr [RAX + 0x620]
MOV RAX,qword ptr [RBP + -0x70]
MOV word ptr [RAX],CX
JMP 0x0019151e
LAB_0019151e:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,-0x8000000000000000
AND RAX,qword ptr [RCX + 0xa0]
CMP RAX,0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00191628
JMP 0x0019155a
LAB_0019155a:
JMP 0x0019155c
LAB_0019155c:
JMP 0x0019155e
LAB_0019155e:
LEA RAX,[RBP + -0xe]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x78]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x78]
SHR RAX,0x20
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xb8]
MOV word ptr [RAX + 0x4],CX
LEA RAX,[RBP + -0xe]
MOV qword ptr [RBP + -0x90],RAX
MOV qword ptr [RBP + -0x88],0x6
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,-0x8000000000000000
OR RCX,qword ptr [RAX + 0xa0]
MOV qword ptr [RAX + 0xa0],RCX
MOV RDX,qword ptr [RBP + -0x28]
LEA RAX,[RBP + -0xb0]
LEA RDI,[RBP + -0x78]
MOV ESI,0x24
XOR ECX,ECX
MOV R8D,0x6
MOV R9D,0x3
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
CALL 0x00191400
MOVSX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00191626
JMP 0x0019161d
LAB_0019161d:
MOV byte ptr [RBP + -0xf],0x1
JMP 0x00191807
LAB_00191626:
JMP 0x00191628
LAB_00191628:
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x40],RAX
CMP dword ptr [RBP + -0x38],0x0
JNZ 0x00191661
MOV dword ptr [RBP + -0x38],0x2
LAB_0019163d:
MOV RAX,qword ptr [RBP + 0x10]
MOV ECX,dword ptr [RBP + -0x38]
SHL RCX,0x4
ADD RAX,RCX
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0019165f
JMP 0x00191654
LAB_00191654:
MOV EAX,dword ptr [RBP + -0x38]
ADD EAX,0x1
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0019163d
LAB_0019165f:
JMP 0x00191661
LAB_00191661:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x44],EAX
MOV dword ptr [RBP + -0x48],0x2
JMP 0x00191670
LAB_00191670:
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX + 0x8],0x0
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x001916ce
MOV RAX,qword ptr [RBP + 0x10]
ADD RAX,0x20
MOV qword ptr [RBP + -0x58],RAX
LAB_00191699:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + 0x10]
MOV EDX,dword ptr [RBP + -0x38]
SHL RDX,0x4
ADD RCX,RDX
CMP RAX,RCX
JNC 0x001916cc
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + 0x8]
ADD EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x10
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00191699
LAB_001916cc:
JMP 0x001916ce
LAB_001916ce:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x50],EAX
MOV EAX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x001916dc
LAB_001916dc:
MOV EAX,dword ptr [RBP + -0x1c]
LEA RCX,[0x58a7e0]
IMUL RAX,RAX,0x48
ADD RCX,RAX
XOR EAX,EAX
CMP qword ptr [RCX + 0x8],0x0
MOV byte ptr [RBP + -0xb9],AL
JZ 0x00191733
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,EAX
LEA RAX,[0x58a7e0]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV EDI,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + 0x20]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0xb9],AL
LAB_00191733:
MOV AL,byte ptr [RBP + -0xb9]
MOV CL,AL
AND CL,0x1
MOVZX ECX,CL
MOV dword ptr [RBP + -0x5c],ECX
TEST AL,0x1
JNZ 0x001917fb
MOV EAX,dword ptr [RBP + -0x1c]
LEA RCX,[RAX + RAX*0x8]
LEA RAX,[0x58a7e0]
MOV EAX,dword ptr [RAX + RCX*0x8]
MOV dword ptr [RBP + -0xc0],EAX
TEST EAX,EAX
JZ 0x001917ec
JMP 0x0019176d
LAB_0019176d:
MOV EAX,dword ptr [RBP + -0xc0]
SUB EAX,0x1
JZ 0x0019178a
JMP 0x0019177a
LAB_0019177a:
MOV EAX,dword ptr [RBP + -0xc0]
ADD EAX,-0x2
SUB EAX,0x2
JC 0x001917bb
JMP 0x001917ee
LAB_0019178a:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x60]
MOV CX,AX
MOV R9,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + 0x20]
LEA R8,[RBP + -0x50]
MOVZX ECX,CX
MOV qword ptr [RSP],RAX
CALL 0x00191a90
MOVSX EAX,AL
MOV dword ptr [RBP + -0x5c],EAX
JMP 0x001917f9
LAB_001917bb:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x60]
MOV CX,AX
MOV R9,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + 0x20]
LEA R8,[RBP + -0x50]
MOVZX ECX,CX
MOV qword ptr [RSP],RAX
CALL 0x00191d20
MOVSX EAX,AL
MOV dword ptr [RBP + -0x5c],EAX
JMP 0x001917f9
LAB_001917ec:
JMP 0x001917ee
LAB_001917ee:
JMP 0x001917f0
LAB_001917f0:
JMP 0x001917f2
LAB_001917f2:
MOV dword ptr [RBP + -0x5c],0x1
LAB_001917f9:
JMP 0x001917fb
LAB_001917fb:
JMP 0x001917fd
LAB_001917fd:
JMP 0x001917ff
LAB_001917ff:
JMP 0x00191801
LAB_00191801:
MOV EAX,dword ptr [RBP + -0x5c]
MOV byte ptr [RBP + -0xf],AL
LAB_00191807:
MOV AL,byte ptr [RBP + -0xf]
MOV byte ptr [RBP + -0xc1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00191831
MOV AL,byte ptr [RBP + -0xc1]
ADD RSP,0xe0
POP RBP
RET
LAB_00191831:
CALL 0x0012a260
|
int8
translog_write_record
(int8 param_1,uint param_2,long param_3,long *param_4,int param_5,uint param_6,
int8 *param_7,int2 *param_8,int8 param_9)
{
char cVar1;
int iVar2;
long in_FS_OFFSET;
bool local_c1;
int1 local_b8 [32];
int4 *local_98;
int8 local_90;
int1 local_80 [8];
int2 *local_78;
long local_70;
uint local_68;
uint local_64;
int8 *local_60;
int local_58;
int local_54;
int4 local_50;
uint local_4c;
int8 *local_48;
uint local_40;
int local_3c;
long *local_38;
long local_30;
uint local_24;
int8 local_20;
int1 local_17;
int4 local_16;
int2 local_12;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_68 = (uint)*(ushort *)(param_3 + 0xac);
local_40 = param_6;
local_3c = param_5;
local_38 = param_4;
local_30 = param_3;
local_24 = param_2;
local_20 = param_1;
if (translog_status != 1) {
local_17 = 1;
goto LAB_00191807;
}
if ((param_4 != (long *)0x0) && (param_2 != 0x23)) {
local_70 = *param_4;
if ((*(short *)(local_70 + 0x620) == 0) &&
(iVar2 = translog_assign_id_to_share(param_4,param_3), iVar2 != 0)) {
local_17 = 1;
goto LAB_00191807;
}
local_78 = param_8;
*param_8 = *(int2 *)(local_70 + 0x620);
}
if ((*(ulong *)(local_30 + 0xa0) & 0x8000000000000000) == 0) {
local_16 = (int4)*(int8 *)(local_30 + 0x78);
local_12 = (int2)((ulong)*(int8 *)(local_30 + 0x78) >> 0x20);
local_98 = &local_16;
local_90 = 6;
*(ulong *)(local_30 + 0xa0) = *(ulong *)(local_30 + 0xa0) | 0x8000000000000000;
cVar1 = translog_write_record(local_80,0x24,local_30,0,6,3,local_b8,0,0);
if (cVar1 != '\0') {
local_17 = 1;
goto LAB_00191807;
}
}
local_48 = param_7;
if (local_40 == 0) {
local_40 = 2;
while (param_7[(ulong)local_40 * 2 + 1] != 0) {
local_40 = local_40 + 1;
}
}
local_4c = local_40;
local_50 = 2;
*param_7 = 0;
param_7[1] = 0;
if (local_3c == 0) {
for (local_60 = param_7 + 4; local_60 < param_7 + (ulong)local_40 * 2; local_60 = local_60 + 2)
{
local_3c = (int)local_60[1] + local_3c;
}
}
local_58 = local_3c;
local_54 = local_3c;
local_c1 = false;
if (*(long *)(log_record_type_descriptor + (ulong)local_24 * 0x48 + 8) != 0) {
cVar1 = (**(code **)(log_record_type_descriptor + (ulong)local_24 * 0x48 + 8))
(local_24,local_30,local_38,param_9);
local_c1 = cVar1 != '\0';
}
local_64 = (uint)local_c1;
if (local_c1 == false) {
iVar2 = *(int *)(log_record_type_descriptor + (ulong)local_24 * 0x48);
if (iVar2 == 0) {
LAB_001917f2:
local_64 = 1;
}
else if (iVar2 == 1) {
cVar1 = translog_write_variable_record
(local_20,local_24,local_38,(short)local_68,&local_58,local_30,param_9);
local_64 = (uint)cVar1;
}
else {
if (1 < iVar2 - 2U) goto LAB_001917f2;
cVar1 = translog_write_fixed_record
(local_20,local_24,local_38,(short)local_68,&local_58,local_30,param_9);
local_64 = (uint)cVar1;
}
}
local_17 = (int1)local_64;
LAB_00191807:
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_17);
}
| |
39,363 | strxmov | eloqsql/strings/strxmov.c | char *strxmov(char *dst,const char *src, ...)
{
va_list pvar;
va_start(pvar,src);
while (src != NullS) {
while ((*dst++ = *src++)) ;
dst--;
src = va_arg(pvar, char *);
}
va_end(pvar);
*dst = 0; /* there might have been no sources! */
return dst;
} | O3 | c | strxmov:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %eax, %r10d
movq %rdi, %rax
leaq -0xd0(%rbp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %r10b, %r10b
je 0x61a84
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %rdi, -0x10(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movabsq $0x3000000010, %rcx # imm = 0x3000000010
movq %rcx, -0x20(%rbp)
testq %rsi, %rsi
je 0x61af2
movq -0x10(%rbp), %rcx
movl -0x20(%rbp), %edx
movq -0x18(%rbp), %rdi
movq %rdi, %r8
movb (%rsi), %r9b
movb %r9b, (%rax)
testb %r9b, %r9b
jne 0x61aea
cmpl $0x28, %edx
ja 0x61ad2
movq %r8, %r9
movl %edx, %r8d
addq %rcx, %r8
addl $0x8, %edx
movl %edx, -0x20(%rbp)
jmp 0x61add
leaq 0x8(%r8), %rdi
movq %rdi, -0x18(%rbp)
movq %rdi, %r9
movq (%r8), %rsi
movq %r9, %r8
testq %rsi, %rsi
jne 0x61ab1
jmp 0x61af2
incq %rax
incq %rsi
jmp 0x61aae
movb $0x0, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nop
| strxmov:
push rbp
mov rbp, rsp
sub rsp, 50h
mov r10d, eax
mov rax, rdi
lea rdi, [rbp+var_D0]
mov [rdi+10h], rdx
mov [rdi+18h], rcx
mov [rdi+20h], r8
mov [rdi+28h], r9
test r10b, r10b
jz short loc_61A84
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_61A84:
mov [rbp+var_10], rdi
lea rcx, [rbp+arg_0]
mov [rbp+var_18], rcx
mov rcx, 3000000010h
mov [rbp+var_20], rcx
test rsi, rsi
jz short loc_61AF2
mov rcx, [rbp+var_10]
mov edx, dword ptr [rbp+var_20]
mov rdi, [rbp+var_18]
loc_61AAE:
mov r8, rdi
loc_61AB1:
mov r9b, [rsi]
mov [rax], r9b
test r9b, r9b
jnz short loc_61AEA
cmp edx, 28h ; '('
ja short loc_61AD2
mov r9, r8
mov r8d, edx
add r8, rcx
add edx, 8
mov dword ptr [rbp+var_20], edx
jmp short loc_61ADD
loc_61AD2:
lea rdi, [r8+8]
mov [rbp+var_18], rdi
mov r9, rdi
loc_61ADD:
mov rsi, [r8]
mov r8, r9
test rsi, rsi
jnz short loc_61AB1
jmp short loc_61AF2
loc_61AEA:
inc rax
inc rsi
jmp short loc_61AAE
loc_61AF2:
mov byte ptr [rax], 0
add rsp, 50h
pop rbp
retn
| char *strxmov(char *a1, char *a2, ...)
{
char *result; // rax
char *reg_save_area; // rcx
unsigned int gp_offset; // edx
char *overflow_arg_area; // rdi
char *v6; // r8
char v7; // r9
char *v8; // r9
va_list va; // [rsp+B0h] [rbp-20h] BYREF
result = a1;
va_start(va, a2);
if ( a2 )
{
reg_save_area = (char *)va[0].reg_save_area;
gp_offset = va[0].gp_offset;
overflow_arg_area = (char *)va[0].overflow_arg_area;
while ( 1 )
{
v6 = overflow_arg_area;
while ( 1 )
{
v7 = *a2;
*result = *a2;
if ( v7 )
break;
if ( gp_offset > 0x28 )
{
overflow_arg_area = v6 + 8;
va[0].overflow_arg_area = v6 + 8;
v8 = v6 + 8;
}
else
{
v8 = v6;
v6 = ®_save_area[gp_offset];
gp_offset += 8;
va[0].gp_offset = gp_offset;
}
a2 = *(char **)v6;
v6 = v8;
if ( !a2 )
goto LABEL_11;
}
++result;
++a2;
}
}
LABEL_11:
*result = 0;
return result;
}
| strxmov:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV R10D,EAX
MOV RAX,RDI
LEA RDI,[RBP + -0xd0]
MOV qword ptr [RDI + 0x10],RDX
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],R8
MOV qword ptr [RDI + 0x28],R9
TEST R10B,R10B
JZ 0x00161a84
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_00161a84:
MOV qword ptr [RBP + -0x10],RDI
LEA RCX,[RBP + 0x10]
MOV qword ptr [RBP + -0x18],RCX
MOV RCX,0x3000000010
MOV qword ptr [RBP + -0x20],RCX
TEST RSI,RSI
JZ 0x00161af2
MOV RCX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x20]
MOV RDI,qword ptr [RBP + -0x18]
LAB_00161aae:
MOV R8,RDI
LAB_00161ab1:
MOV R9B,byte ptr [RSI]
MOV byte ptr [RAX],R9B
TEST R9B,R9B
JNZ 0x00161aea
CMP EDX,0x28
JA 0x00161ad2
MOV R9,R8
MOV R8D,EDX
ADD R8,RCX
ADD EDX,0x8
MOV dword ptr [RBP + -0x20],EDX
JMP 0x00161add
LAB_00161ad2:
LEA RDI,[R8 + 0x8]
MOV qword ptr [RBP + -0x18],RDI
MOV R9,RDI
LAB_00161add:
MOV RSI,qword ptr [R8]
MOV R8,R9
TEST RSI,RSI
JNZ 0x00161ab1
JMP 0x00161af2
LAB_00161aea:
INC RAX
INC RSI
JMP 0x00161aae
LAB_00161af2:
MOV byte ptr [RAX],0x0
ADD RSP,0x50
POP RBP
RET
|
void strxmov(char *param_1,char *param_2)
{
char cVar1;
int8 *puVar2;
int8 *puVar3;
ulong uVar4;
int8 *puVar5;
int8 local_d8 [22];
uint local_28;
puVar2 = (int8 *)&stack0x00000008;
if (param_2 != (char *)0x0) {
local_28 = 0x10;
puVar3 = puVar2;
do {
for (; cVar1 = *param_2, *param_1 = cVar1, cVar1 != '\0'; param_2 = param_2 + 1) {
param_1 = param_1 + 1;
puVar3 = puVar2;
}
if (local_28 < 0x29) {
uVar4 = (ulong)local_28;
local_28 = local_28 + 8;
puVar5 = (int8 *)((long)local_d8 + uVar4);
}
else {
puVar2 = puVar3 + 1;
puVar5 = puVar3;
puVar3 = puVar2;
}
param_2 = (char *)*puVar5;
} while (param_2 != (char *)0x0);
}
*param_1 = '\0';
return;
}
| |
39,364 | 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 0x889a7
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 0x8888e
movl 0xc(%r15), %eax
movb (%rsi,%rax), %r8b
andb %dil, %r8b
andb (%rdx,%rax), %dil
movl $0x1, %eax
cmpb %dil, %r8b
jne 0x889a9
testb %r8b, %r8b
je 0x8888e
testb %r14b, %r14b
jne 0x88964
jmp 0x889a9
movl 0x8(%r15), %r13d
leaq (%rsi,%r13), %rbx
addq %rdx, %r13
movzwl 0x12(%r15), %eax
testb $0x8, %al
jne 0x888ad
testb $0x20, %al
jne 0x888c4
movl %ecx, %esi
jmp 0x88931
cmpb $0x1, 0x1a(%r15)
jne 0x88913
movzbl (%rbx), %eax
incq %rbx
movzbl (%r13), %edx
incq %r13
jmp 0x88923
movzbl 0x1a(%r15), %edi
movq %rbx, %rsi
callq 0x79bbd
movq %rax, %r14
movzbl 0x1a(%r15), %edi
movq %r13, %rsi
callq 0x79bbd
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 0x88931
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 0x88978
movl $0x28002, %eax # imm = 0x28002
btl %r12d, %eax
jae 0x88978
movq (%r15), %rdi
movl %ecx, %edx
movl %esi, %r8d
movq %rbx, %rsi
movq %r13, %rcx
xorl %r9d, %r9d
callq 0x9f72c
testl %eax, %eax
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
jne 0x889b8
addq $0x20, %r15
movq -0x48(%rbp), %rax
cmpq 0x10(%rax), %r15
jb 0x8884b
jmp 0x889a7
movl $0x1, %eax
cmpl %esi, %ecx
jne 0x889a9
movl %ecx, %ecx
xorl %r8d, %r8d
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
cmpq %r8, %rcx
je 0x88964
movb (%rbx,%r8), %r9b
leaq 0x1(%r8), %rdi
cmpb (%r13,%r8), %r9b
movq %rdi, %r8
je 0x8898e
jmp 0x889a9
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x889a9
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_889A7
mov r14d, ecx
mov [rbp+var_40], rdx
mov [rbp+var_38], rsi
mov [rbp+var_2C], ecx
loc_8884B:
movzx r12d, byte ptr [r15+18h]
movzx ecx, word ptr [r15+14h]
mov dil, [r15+19h]
test dil, dil
jz short loc_8888E
mov eax, [r15+0Ch]
mov r8b, [rsi+rax]
and r8b, dil
and dil, [rdx+rax]
mov eax, 1
cmp r8b, dil
jnz loc_889A9
test r8b, r8b
jz short loc_8888E
test r14b, r14b
jnz loc_88964
jmp loc_889A9
loc_8888E:
mov r13d, [r15+8]
lea rbx, [rsi+r13]
add r13, rdx
movzx eax, word ptr [r15+12h]
test al, 8
jnz short loc_888AD
test al, 20h
jnz short loc_888C4
mov esi, ecx
jmp loc_88931
loc_888AD:
cmp byte ptr [r15+1Ah], 1
jnz short loc_88913
movzx eax, byte ptr [rbx]
inc rbx
movzx edx, byte ptr [r13+0]
inc r13
jmp short loc_88923
loc_888C4:
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_88931
loc_88913:
movzx eax, word ptr [rbx]
movzx edx, word ptr [r13+0]
add rbx, 2
add r13, 2
loc_88923:
cmp eax, ecx
cmovnb eax, ecx
cmp edx, ecx
mov esi, ecx
cmovb esi, edx
mov ecx, eax
loc_88931:
cmp r12d, 11h
ja short loc_88978
mov eax, 28002h
bt eax, r12d
jnb short loc_88978
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_889B8
loc_88964:
add r15, 20h ; ' '
mov rax, [rbp+var_48]
cmp r15, [rax+10h]
jb loc_8884B
jmp short loc_889A7
loc_88978:
mov eax, 1
cmp ecx, esi
jnz short loc_889A9
mov ecx, ecx
xor r8d, r8d
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
loc_8898E:
cmp rcx, r8
jz short loc_88964
mov r9b, [rbx+r8]
lea rdi, [r8+1]
cmp r9b, [r13+r8+0]
mov r8, rdi
jz short loc_8898E
jmp short loc_889A9
loc_889A7:
xor eax, eax
loc_889A9:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_889B8:
mov eax, 1
jmp short loc_889A9
| 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 0x001889a7
MOV R14D,ECX
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x38],RSI
MOV dword ptr [RBP + -0x2c],ECX
LAB_0018884b:
MOVZX R12D,byte ptr [R15 + 0x18]
MOVZX ECX,word ptr [R15 + 0x14]
MOV DIL,byte ptr [R15 + 0x19]
TEST DIL,DIL
JZ 0x0018888e
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 0x001889a9
TEST R8B,R8B
JZ 0x0018888e
TEST R14B,R14B
JNZ 0x00188964
JMP 0x001889a9
LAB_0018888e:
MOV R13D,dword ptr [R15 + 0x8]
LEA RBX,[RSI + R13*0x1]
ADD R13,RDX
MOVZX EAX,word ptr [R15 + 0x12]
TEST AL,0x8
JNZ 0x001888ad
TEST AL,0x20
JNZ 0x001888c4
MOV ESI,ECX
JMP 0x00188931
LAB_001888ad:
CMP byte ptr [R15 + 0x1a],0x1
JNZ 0x00188913
MOVZX EAX,byte ptr [RBX]
INC RBX
MOVZX EDX,byte ptr [R13]
INC R13
JMP 0x00188923
LAB_001888c4:
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,RBX
CALL 0x00179bbd
MOV R14,RAX
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,R13
CALL 0x00179bbd
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 0x00188931
LAB_00188913:
MOVZX EAX,word ptr [RBX]
MOVZX EDX,word ptr [R13]
ADD RBX,0x2
ADD R13,0x2
LAB_00188923:
CMP EAX,ECX
CMOVNC EAX,ECX
CMP EDX,ECX
MOV ESI,ECX
CMOVC ESI,EDX
MOV ECX,EAX
LAB_00188931:
CMP R12D,0x11
JA 0x00188978
MOV EAX,0x28002
BT EAX,R12D
JNC 0x00188978
MOV RDI,qword ptr [R15]
MOV EDX,ECX
MOV R8D,ESI
MOV RSI,RBX
MOV RCX,R13
XOR R9D,R9D
CALL 0x0019f72c
TEST EAX,EAX
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
JNZ 0x001889b8
LAB_00188964:
ADD R15,0x20
MOV RAX,qword ptr [RBP + -0x48]
CMP R15,qword ptr [RAX + 0x10]
JC 0x0018884b
JMP 0x001889a7
LAB_00188978:
MOV EAX,0x1
CMP ECX,ESI
JNZ 0x001889a9
MOV ECX,ECX
XOR R8D,R8D
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
LAB_0018898e:
CMP RCX,R8
JZ 0x00188964
MOV R9B,byte ptr [RBX + R8*0x1]
LEA RDI,[R8 + 0x1]
CMP R9B,byte ptr [R13 + R8*0x1]
MOV R8,RDI
JZ 0x0018898e
JMP 0x001889a9
LAB_001889a7:
XOR EAX,EAX
LAB_001889a9:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001889b8:
MOV EAX,0x1
JMP 0x001889a9
|
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_0018888e:
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_0018888e;
if (param_4 == '\0') {
return 1;
}
}
puVar17 = puVar17 + 4;
} while (puVar17 < *(int8 **)(param_1 + 0x10));
}
return 0;
}
| |
39,365 | evmone::baseline::analyze(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>, bool) | corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/baseline_analysis.cpp | CodeAnalysis analyze(bytes_view code, bool eof_enabled)
{
if (eof_enabled && is_eof_container(code))
return analyze_eof1(code);
return analyze_legacy(code);
} | O3 | cpp | evmone::baseline::analyze(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
testl %ecx, %ecx
je 0x4e8d8
movq %r14, %rdi
movq %r15, %rsi
callq 0x412ef
testb %al, %al
je 0x4e8d8
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x41305
movq 0x28(%r12), %rdx
movzwl (%rdx), %r8d
movq %r14, %rsi
subq %r8, %rsi
jb 0x4e9ef
leaq 0x30(%rsp), %rax
movq 0x8(%rax), %rdi
movzwl -0x2(%rdi), %ecx
movq -0x10(%rax), %r9
movzwl -0x2(%r9), %r10d
subq %r8, %rcx
addq %r10, %rcx
cmpq %rcx, %rsi
cmovbq %rsi, %rcx
addq %r15, %r8
movups -0x28(%rax), %xmm0
leaq 0x80(%rsp), %r12
movaps %xmm0, (%r12)
movq -0x18(%rax), %rsi
movq %rsi, 0x10(%r12)
movq %r9, 0x18(%r12)
movq -0x8(%rax), %rsi
movq %rsi, 0x20(%r12)
xorl %esi, %esi
movq %rsi, -0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x18(%rax)
movq %rdx, 0x28(%r12)
movq %rdi, 0x30(%r12)
movq 0x10(%rax), %rdx
movq %rdx, 0x38(%r12)
movq %rsi, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x18(%rax), %rdx
movq %rdx, 0x40(%r12)
movups 0x20(%rax), %xmm1
movups %xmm1, 0x48(%r12)
movq 0x30(%rax), %rdx
movq %rdx, 0x58(%r12)
movups %xmm0, 0x20(%rax)
movq %rsi, 0x30(%rax)
movups 0x38(%rax), %xmm1
movaps %xmm1, 0x60(%r12)
movq 0x48(%rax), %rdx
movq %rdx, 0x70(%r12)
movups %xmm0, 0x38(%rax)
movq %rsi, 0x48(%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %r9
callq 0x4ea2c
movq 0x60(%r12), %rdi
testq %rdi, %rdi
je 0x4e81c
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x21200
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x4e839
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0x21200
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x4e856
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x21200
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x4e873
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x21200
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x4e88a
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x21200
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x4e8a1
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x21200
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x4e8b8
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x21200
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x4e9da
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x21200
jmp 0x4e9da
leaq 0x21(%r14), %r13
movq %r13, %rdi
callq 0x21030
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x21120
testq %r14, %r14
je 0x4e907
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x211a0
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r12,%r14)
movups %xmm0, (%r12,%r14)
xorl %eax, %eax
movb %al, 0x20(%r12,%r14)
leaq 0x80(%rsp), %rdx
movb %al, (%rdx)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rcx
movq %r14, %rsi
callq 0x43b34
testq %r14, %r14
je 0x4e973
movq 0x8(%rsp), %r13
xorl %ebp, %ebp
movsbq (%r15,%rbp), %rax
cmpq $0x60, %rax
jl 0x4e958
addq %rax, %rbp
addq $-0x5f, %rbp
jmp 0x4e95c
cmpb $0x5b, %al
je 0x4e966
incq %rbp
cmpq %r14, %rbp
jb 0x4e944
jmp 0x4e973
movq %rbp, %rdi
movq %r13, %rsi
callq 0x21d03
jmp 0x4e95c
movq %r14, (%rbx)
movq %r12, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movq %r12, 0x18(%rbx)
movups 0x8(%rsp), %xmm0
movups 0x18(%rsp), %xmm1
movups %xmm0, 0x20(%rbx)
movups %xmm1, 0x30(%rbx)
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rbx)
movb $0x0, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x7a(%rbx)
movups %xmm0, 0x8c(%rbx)
movups %xmm0, 0x9c(%rbx)
movups %xmm0, 0xac(%rbx)
movl $0x0, 0xbc(%rbx)
movq %r12, 0xc0(%rbx)
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x325d5(%rip), %rdi # 0x80fcb
leaq 0x325b4(%rip), %rsi # 0x80fb1
movq %r8, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x21330
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x43ad8
jmp 0x4ea24
movq %rax, %rbx
movq %r12, %rdi
callq 0x212a0
movq %rbx, %rdi
callq 0x213b0
| _ZN6evmone8baseline7analyzeESt17basic_string_viewIhN4evmc11byte_traitsIhEEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
test ecx, ecx
jz loc_4E8D8
mov rdi, r14
mov rsi, r15
call _ZN6evmone16is_eof_containerESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::is_eof_container(std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
test al, al
jz loc_4E8D8
lea r12, [rsp+128h+var_120]
mov rdi, r12
mov rsi, r14
mov rdx, r15
call _ZN6evmone22read_valid_eof1_headerESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::read_valid_eof1_header(std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
mov rdx, [r12+28h]
movzx r8d, word ptr [rdx]
mov rsi, r14
sub rsi, r8
jb loc_4E9EF
lea rax, [rsp+128h+var_F8]
mov rdi, [rax+8]
movzx ecx, word ptr [rdi-2]
mov r9, [rax-10h]
movzx r10d, word ptr [r9-2]
sub rcx, r8
add rcx, r10
cmp rsi, rcx
cmovb rcx, rsi
add r8, r15
movups xmm0, xmmword ptr [rax-28h]
lea r12, [rsp+128h+var_A8]
movaps xmmword ptr [r12], xmm0
mov rsi, [rax-18h]
mov [r12+10h], rsi
mov [r12+18h], r9
mov rsi, [rax-8]
mov [r12+20h], rsi
xor esi, esi
mov [rax-8], rsi
xorps xmm0, xmm0
movups xmmword ptr [rax-18h], xmm0
mov [r12+28h], rdx
mov [r12+30h], rdi
mov rdx, [rax+10h]
mov [r12+38h], rdx
mov [rax+10h], rsi
movups xmmword ptr [rax], xmm0
mov rdx, [rax+18h]
mov [r12+40h], rdx
movups xmm1, xmmword ptr [rax+20h]
movups xmmword ptr [r12+48h], xmm1
mov rdx, [rax+30h]
mov [r12+58h], rdx
movups xmmword ptr [rax+20h], xmm0
mov [rax+30h], rsi
movups xmm1, xmmword ptr [rax+38h]
movaps xmmword ptr [r12+60h], xmm1
mov rdx, [rax+48h]
mov [r12+70h], rdx
movups xmmword ptr [rax+38h], xmm0
mov [rax+48h], rsi
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov r9, r12
call _ZN6evmone8baseline12CodeAnalysisC2ESt17basic_string_viewIhN4evmc11byte_traitsIhEEES6_NS_10EOF1HeaderE; evmone::baseline::CodeAnalysis::CodeAnalysis(std::basic_string_view<uchar,evmc::byte_traits<uchar>>,std::basic_string_view<uchar,evmc::byte_traits<uchar>>,evmone::EOF1Header)
mov rdi, [r12+60h]; void *
test rdi, rdi
jz short loc_4E81C
mov rsi, [rsp+128h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E81C:
mov rdi, [rsp+128h+var_60]; void *
test rdi, rdi
jz short loc_4E839
mov rsi, [rsp+128h+var_50]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E839:
mov rdi, [rsp+128h+var_80]; void *
test rdi, rdi
jz short loc_4E856
mov rsi, [rsp+128h+var_70]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E856:
mov rdi, [rsp+128h+var_98]; void *
test rdi, rdi
jz short loc_4E873
mov rsi, [rsp+128h+var_88]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E873:
mov rdi, [rsp+128h+var_C0]; void *
test rdi, rdi
jz short loc_4E88A
mov rsi, [rsp+128h+var_B0]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E88A:
mov rdi, [rsp+128h+var_D8]; void *
test rdi, rdi
jz short loc_4E8A1
mov rsi, [rsp+128h+var_C8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E8A1:
mov rdi, [rsp+128h+var_F8]; void *
test rdi, rdi
jz short loc_4E8B8
mov rsi, [rsp+128h+var_E8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E8B8:
mov rdi, [rsp+128h+var_110]; void *
test rdi, rdi
jz loc_4E9DA
mov rsi, [rsp+128h+var_100]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_4E9DA
loc_4E8D8:
lea r13, [r14+21h]
mov rdi, r13; unsigned __int64
call __Znam; operator new[](ulong)
mov r12, rax
mov rdi, rax
xor esi, esi
mov rdx, r13
call _memset
test r14, r14
jz short loc_4E907
mov rdi, r12
mov rsi, r15
mov rdx, r14
call _memcpy
loc_4E907:
xorps xmm0, xmm0
movups xmmword ptr [r12+r14+10h], xmm0
movups xmmword ptr [r12+r14], xmm0
xor eax, eax
mov [r12+r14+20h], al
lea rdx, [rsp+128h+var_A8]
mov [rdx], al
lea rdi, [rsp+128h+var_120]
lea rcx, [rsp+128h+var_121]
mov rsi, r14
call _ZNSt6vectorIbSaIbEEC2EmRKbRKS0_; std::vector<bool>::vector(ulong,bool const&,std::allocator<bool> const&)
test r14, r14
jz short loc_4E973
mov r13, qword ptr [rsp+128h+var_120]
xor ebp, ebp
loc_4E944:
movsx rax, byte ptr [r15+rbp]
cmp rax, 60h ; '`'
jl short loc_4E958
add rbp, rax
add rbp, 0FFFFFFFFFFFFFFA1h
jmp short loc_4E95C
loc_4E958:
cmp al, 5Bh ; '['
jz short loc_4E966
loc_4E95C:
inc rbp
cmp rbp, r14
jb short loc_4E944
jmp short loc_4E973
loc_4E966:
mov rdi, rbp
mov rsi, r13
call _ZN6evmone8baseline7analyzeESt17basic_string_viewIhN4evmc11byte_traitsIhEEEb_cold_1; evmone::baseline::analyze(std::basic_string_view<uchar,evmc::byte_traits<uchar>>,bool) [clone]
jmp short loc_4E95C
loc_4E973:
mov [rbx], r14
mov [rbx+8], r12
mov [rbx+10h], r14
mov [rbx+18h], r12
movups xmm0, [rsp+128h+var_120]
movups xmm1, xmmword ptr [rsp+128h+var_110]
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+30h], xmm1
mov rax, [rsp+128h+var_100]
mov [rbx+40h], rax
mov byte ptr [rbx+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx+50h], xmm0
movups xmmword ptr [rbx+60h], xmm0
movups xmmword ptr [rbx+70h], xmm0
movups xmmword ptr [rbx+7Ah], xmm0
movups xmmword ptr [rbx+8Ch], xmm0
movups xmmword ptr [rbx+9Ch], xmm0
movups xmmword ptr [rbx+0ACh], xmm0
mov dword ptr [rbx+0BCh], 0
mov [rbx+0C0h], r12
loc_4E9DA:
mov rax, rbx
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4E9EF:
lea rdi, aSPosWhichIsZuS; "%s: __pos (which is %zu) > __size (whic"...
lea rsi, aBasicStringVie; "basic_string_view::substr"
mov rdx, r8
mov rcx, r14
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
mov rbx, rax
lea rdi, [rsp+128h+var_120]; this
call _ZN6evmone10EOF1HeaderD2Ev; evmone::EOF1Header::~EOF1Header()
jmp short loc_4EA24
mov rbx, rax
mov rdi, r12; void *
call __ZdaPv; operator delete[](void *)
loc_4EA24:
mov rdi, rbx
call __Unwind_Resume
| long long evmone::baseline::analyze(long long a1, unsigned long long a2, _BYTE *a3, int a4)
{
unsigned long long v5; // r8
unsigned long long v6; // rcx
long long v7; // r12
long long v8; // r13
unsigned long long i; // rbp
long long v10; // rax
__int128 v11; // xmm1
__int128 v13; // [rsp+8h] [rbp-120h] BYREF
void *v14[2]; // [rsp+18h] [rbp-110h]
long long v15; // [rsp+28h] [rbp-100h]
__int128 v16; // [rsp+30h] [rbp-F8h]
long long v17; // [rsp+40h] [rbp-E8h]
long long v18; // [rsp+48h] [rbp-E0h]
__int128 v19; // [rsp+50h] [rbp-D8h]
long long v20; // [rsp+60h] [rbp-C8h]
__int128 v21; // [rsp+68h] [rbp-C0h]
long long v22; // [rsp+78h] [rbp-B0h]
__int128 v23; // [rsp+80h] [rbp-A8h] BYREF
void *v24; // [rsp+90h] [rbp-98h]
void *v25; // [rsp+98h] [rbp-90h]
long long v26; // [rsp+A0h] [rbp-88h]
__int128 v27; // [rsp+A8h] [rbp-80h]
long long v28; // [rsp+B8h] [rbp-70h]
long long v29; // [rsp+C0h] [rbp-68h]
__int128 v30; // [rsp+C8h] [rbp-60h]
long long v31; // [rsp+D8h] [rbp-50h]
__int128 v32; // [rsp+E0h] [rbp-48h]
long long v33; // [rsp+F0h] [rbp-38h]
if ( a4 && evmone::is_eof_container(a2, a3) )
{
evmone::read_valid_eof1_header((long long)&v13, a2, (long long)a3);
v5 = *(unsigned __int16 *)v16;
if ( a2 < v5 )
std::__throw_out_of_range_fmt(
"%s: __pos (which is %zu) > __size (which is %zu)",
"basic_string_view::substr",
*(unsigned __int16 *)v16,
a2);
v6 = *((unsigned __int16 *)v14[1] - 1) + *(unsigned __int16 *)(*((_QWORD *)&v16 + 1) - 2LL) - v5;
if ( a2 - v5 < v6 )
v6 = a2 - v5;
v23 = v13;
v24 = v14[0];
v25 = v14[1];
v26 = v15;
v15 = 0LL;
*(_OWORD *)v14 = 0LL;
v27 = v16;
v28 = v17;
v17 = 0LL;
v16 = 0LL;
v29 = v18;
v30 = v19;
v31 = v20;
v19 = 0LL;
v20 = 0LL;
v32 = v21;
v33 = v22;
v21 = 0LL;
v22 = 0LL;
evmone::baseline::CodeAnalysis::CodeAnalysis(a1, a2, a3, v6, &a3[v5], &v23);
if ( (_QWORD)v32 )
operator delete((void *)v32, v33 - v32);
if ( (_QWORD)v30 )
operator delete((void *)v30, v31 - v30);
if ( (_QWORD)v27 )
operator delete((void *)v27, v28 - v27);
if ( v24 )
operator delete(v24, v26 - (_QWORD)v24);
if ( (_QWORD)v21 )
operator delete((void *)v21, v22 - v21);
if ( (_QWORD)v19 )
operator delete((void *)v19, v20 - v19);
if ( (_QWORD)v16 )
operator delete((void *)v16, v17 - v16);
if ( v14[0] )
operator delete(v14[0], v15 - (unsigned long long)v14[0]);
}
else
{
v7 = operator new[](a2 + 33);
memset(v7, 0LL, a2 + 33);
if ( a2 )
memcpy(v7);
*(_OWORD *)(v7 + a2 + 16) = 0LL;
*(_OWORD *)(v7 + a2) = 0LL;
*(_BYTE *)(v7 + a2 + 32) = 0;
LOBYTE(v23) = 0;
std::vector<bool>::vector((long long *)&v13, a2, &v23);
if ( a2 )
{
v8 = v13;
for ( i = 0LL; i < a2; ++i )
{
v10 = (char)a3[i];
if ( v10 < 96 )
{
if ( (_BYTE)v10 == 91 )
evmone::baseline::analyze(i, v8);
}
else
{
i = v10 + i - 95;
}
}
}
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 8) = v7;
*(_QWORD *)(a1 + 16) = a2;
*(_QWORD *)(a1 + 24) = v7;
v11 = *(_OWORD *)v14;
*(_OWORD *)(a1 + 32) = v13;
*(_OWORD *)(a1 + 48) = v11;
*(_QWORD *)(a1 + 64) = v15;
*(_BYTE *)(a1 + 72) = 0;
*(_OWORD *)(a1 + 80) = 0LL;
*(_OWORD *)(a1 + 96) = 0LL;
*(_OWORD *)(a1 + 112) = 0LL;
*(_OWORD *)(a1 + 122) = 0LL;
*(_OWORD *)(a1 + 140) = 0LL;
*(_OWORD *)(a1 + 156) = 0LL;
*(_OWORD *)(a1 + 172) = 0LL;
*(_DWORD *)(a1 + 188) = 0;
*(_QWORD *)(a1 + 192) = v7;
}
return a1;
}
| analyze:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
TEST ECX,ECX
JZ 0x0014e8d8
MOV RDI,R14
MOV RSI,R15
CALL 0x001412ef
TEST AL,AL
JZ 0x0014e8d8
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
CALL 0x00141305
MOV RDX,qword ptr [R12 + 0x28]
MOVZX R8D,word ptr [RDX]
MOV RSI,R14
SUB RSI,R8
JC 0x0014e9ef
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + 0x8]
MOVZX ECX,word ptr [RDI + -0x2]
MOV R9,qword ptr [RAX + -0x10]
MOVZX R10D,word ptr [R9 + -0x2]
SUB RCX,R8
ADD RCX,R10
CMP RSI,RCX
CMOVC RCX,RSI
ADD R8,R15
MOVUPS XMM0,xmmword ptr [RAX + -0x28]
LEA R12,[RSP + 0x80]
MOVAPS xmmword ptr [R12],XMM0
MOV RSI,qword ptr [RAX + -0x18]
MOV qword ptr [R12 + 0x10],RSI
MOV qword ptr [R12 + 0x18],R9
MOV RSI,qword ptr [RAX + -0x8]
MOV qword ptr [R12 + 0x20],RSI
XOR ESI,ESI
MOV qword ptr [RAX + -0x8],RSI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x18],XMM0
MOV qword ptr [R12 + 0x28],RDX
MOV qword ptr [R12 + 0x30],RDI
MOV RDX,qword ptr [RAX + 0x10]
MOV qword ptr [R12 + 0x38],RDX
MOV qword ptr [RAX + 0x10],RSI
MOVUPS xmmword ptr [RAX],XMM0
MOV RDX,qword ptr [RAX + 0x18]
MOV qword ptr [R12 + 0x40],RDX
MOVUPS XMM1,xmmword ptr [RAX + 0x20]
MOVUPS xmmword ptr [R12 + 0x48],XMM1
MOV RDX,qword ptr [RAX + 0x30]
MOV qword ptr [R12 + 0x58],RDX
MOVUPS xmmword ptr [RAX + 0x20],XMM0
MOV qword ptr [RAX + 0x30],RSI
MOVUPS XMM1,xmmword ptr [RAX + 0x38]
MOVAPS xmmword ptr [R12 + 0x60],XMM1
MOV RDX,qword ptr [RAX + 0x48]
MOV qword ptr [R12 + 0x70],RDX
MOVUPS xmmword ptr [RAX + 0x38],XMM0
MOV qword ptr [RAX + 0x48],RSI
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV R9,R12
CALL 0x0014ea2c
MOV RDI,qword ptr [R12 + 0x60]
TEST RDI,RDI
JZ 0x0014e81c
MOV RSI,qword ptr [RSP + 0xf0]
SUB RSI,RDI
CALL 0x00121200
LAB_0014e81c:
MOV RDI,qword ptr [RSP + 0xc8]
TEST RDI,RDI
JZ 0x0014e839
MOV RSI,qword ptr [RSP + 0xd8]
SUB RSI,RDI
CALL 0x00121200
LAB_0014e839:
MOV RDI,qword ptr [RSP + 0xa8]
TEST RDI,RDI
JZ 0x0014e856
MOV RSI,qword ptr [RSP + 0xb8]
SUB RSI,RDI
CALL 0x00121200
LAB_0014e856:
MOV RDI,qword ptr [RSP + 0x90]
TEST RDI,RDI
JZ 0x0014e873
MOV RSI,qword ptr [RSP + 0xa0]
SUB RSI,RDI
CALL 0x00121200
LAB_0014e873:
MOV RDI,qword ptr [RSP + 0x68]
TEST RDI,RDI
JZ 0x0014e88a
MOV RSI,qword ptr [RSP + 0x78]
SUB RSI,RDI
CALL 0x00121200
LAB_0014e88a:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x0014e8a1
MOV RSI,qword ptr [RSP + 0x60]
SUB RSI,RDI
CALL 0x00121200
LAB_0014e8a1:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x0014e8b8
MOV RSI,qword ptr [RSP + 0x40]
SUB RSI,RDI
CALL 0x00121200
LAB_0014e8b8:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0014e9da
MOV RSI,qword ptr [RSP + 0x28]
SUB RSI,RDI
CALL 0x00121200
JMP 0x0014e9da
LAB_0014e8d8:
LEA R13,[R14 + 0x21]
MOV RDI,R13
CALL 0x00121030
MOV R12,RAX
MOV RDI,RAX
XOR ESI,ESI
MOV RDX,R13
CALL 0x00121120
TEST R14,R14
JZ 0x0014e907
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x001211a0
LAB_0014e907:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + R14*0x1 + 0x10],XMM0
MOVUPS xmmword ptr [R12 + R14*0x1],XMM0
XOR EAX,EAX
MOV byte ptr [R12 + R14*0x1 + 0x20],AL
LEA RDX,[RSP + 0x80]
MOV byte ptr [RDX],AL
LAB_0014e926:
LEA RDI,[RSP + 0x8]
LEA RCX,[RSP + 0x7]
MOV RSI,R14
CALL 0x00143b34
LAB_0014e938:
TEST R14,R14
JZ 0x0014e973
MOV R13,qword ptr [RSP + 0x8]
XOR EBP,EBP
LAB_0014e944:
MOVSX RAX,byte ptr [R15 + RBP*0x1]
CMP RAX,0x60
JL 0x0014e958
ADD RBP,RAX
ADD RBP,-0x5f
JMP 0x0014e95c
LAB_0014e958:
CMP AL,0x5b
JZ 0x0014e966
LAB_0014e95c:
INC RBP
CMP RBP,R14
JC 0x0014e944
JMP 0x0014e973
LAB_0014e966:
MOV RDI,RBP
MOV RSI,R13
CALL 0x00121d03
JMP 0x0014e95c
LAB_0014e973:
MOV qword ptr [RBX],R14
MOV qword ptr [RBX + 0x8],R12
MOV qword ptr [RBX + 0x10],R14
MOV qword ptr [RBX + 0x18],R12
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
MOVUPS XMM1,xmmword ptr [RSP + 0x18]
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM1
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RBX + 0x40],RAX
MOV byte ptr [RBX + 0x48],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x50],XMM0
MOVUPS xmmword ptr [RBX + 0x60],XMM0
MOVUPS xmmword ptr [RBX + 0x70],XMM0
MOVUPS xmmword ptr [RBX + 0x7a],XMM0
MOVUPS xmmword ptr [RBX + 0x8c],XMM0
MOVUPS xmmword ptr [RBX + 0x9c],XMM0
MOVUPS xmmword ptr [RBX + 0xac],XMM0
MOV dword ptr [RBX + 0xbc],0x0
MOV qword ptr [RBX + 0xc0],R12
LAB_0014e9da:
MOV RAX,RBX
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014e9ef:
LEA RDI,[0x180fcb]
LEA RSI,[0x180fb1]
MOV RDX,R8
MOV RCX,R14
XOR EAX,EAX
CALL 0x00121330
|
/* evmone::baseline::analyze(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>
>, bool) */
CodeAnalysis *
evmone::baseline::analyze(CodeAnalysis *param_1,evmone *param_2,void *param_3,int param_4)
{
evmone eVar1;
char cVar2;
void *pvVar3;
ulong uVar4;
evmone *peVar5;
ulong local_120;
int8 uStack_118;
void *local_110;
long lStack_108;
long local_100;
ushort *local_f8;
long lStack_f0;
long local_e8;
int8 local_e0;
void *local_d8;
int8 uStack_d0;
long local_c8;
int8 local_c0;
int8 uStack_b8;
long local_b0;
ulong local_a8;
int8 uStack_a0;
void *local_98;
long local_90;
long local_88;
ushort *local_80;
long local_78;
long local_70;
int8 local_68;
void *local_60;
int8 uStack_58;
long local_50;
int4 local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
long local_38;
if ((param_4 == 0) || (cVar2 = is_eof_container(param_2), cVar2 == '\0')) {
pvVar3 = operator_new__((ulong)(param_2 + 0x21));
memset(pvVar3,0,(size_t)(param_2 + 0x21));
if (param_2 != (evmone *)0x0) {
memcpy(pvVar3,param_3,(size_t)param_2);
}
*(int8 *)(param_2 + (long)pvVar3 + 0x10) = 0;
*(int8 *)(param_2 + (long)pvVar3 + 0x10 + 8) = 0;
*(int8 *)((long)pvVar3 + (long)param_2) = 0;
*(int8 *)((evmone *)((long)pvVar3 + (long)param_2) + 8) = 0;
param_2[(long)pvVar3 + 0x20] = (evmone)0x0;
local_a8 = local_a8 & 0xffffffffffffff00;
/* try { // try from 0014e926 to 0014e937 has its CatchHandler @ 0014ea19 */
std::vector<bool,std::allocator<bool>>::vector
((ulong)&local_120,(bool *)param_2,(allocator *)&local_a8);
uVar4 = local_120;
if (param_2 != (evmone *)0x0) {
peVar5 = (evmone *)0x0;
do {
eVar1 = *(evmone *)((long)param_3 + (long)peVar5);
if ((long)(char)eVar1 < 0x60) {
if (eVar1 == (evmone)0x5b) {
analyze(peVar5,uVar4);
}
}
else {
peVar5 = peVar5 + (long)(char)eVar1 + -0x5f;
}
peVar5 = peVar5 + 1;
} while (peVar5 < param_2);
}
*(evmone **)param_1 = param_2;
*(void **)(param_1 + 8) = pvVar3;
*(evmone **)(param_1 + 0x10) = param_2;
*(void **)(param_1 + 0x18) = pvVar3;
*(ulong *)(param_1 + 0x20) = local_120;
*(int8 *)(param_1 + 0x28) = uStack_118;
*(void **)(param_1 + 0x30) = local_110;
*(long *)(param_1 + 0x38) = lStack_108;
*(long *)(param_1 + 0x40) = local_100;
param_1[0x48] = (CodeAnalysis)0x0;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x78) = 0;
*(int8 *)(param_1 + 0x7a) = 0;
*(int8 *)(param_1 + 0x82) = 0;
*(int8 *)(param_1 + 0x8c) = 0;
*(int8 *)(param_1 + 0x94) = 0;
*(int8 *)(param_1 + 0x9c) = 0;
*(int8 *)(param_1 + 0xa4) = 0;
*(int8 *)(param_1 + 0xac) = 0;
*(int8 *)(param_1 + 0xb4) = 0;
*(int4 *)(param_1 + 0xbc) = 0;
*(void **)(param_1 + 0xc0) = pvVar3;
}
else {
read_valid_eof1_header(&local_120,param_2,param_3);
peVar5 = (evmone *)(ulong)*local_f8;
if (param_2 < peVar5) {
/* try { // try from 0014e9ef to 0014ea09 has its CatchHandler @ 0014ea0a */
/* WARNING: Subroutine does not return */
std::__throw_out_of_range_fmt
("%s: __pos (which is %zu) > __size (which is %zu)","basic_string_view::substr",
peVar5,param_2);
}
uVar4 = ((ulong)*(ushort *)(lStack_f0 + -2) - (long)peVar5) +
(ulong)*(ushort *)(lStack_108 + -2);
if ((ulong)((long)param_2 - (long)peVar5) < uVar4) {
uVar4 = (long)param_2 - (long)peVar5;
}
local_a8 = local_120;
uStack_a0 = uStack_118;
local_98 = local_110;
local_90 = lStack_108;
local_88 = local_100;
local_100 = 0;
local_110 = (void *)0x0;
lStack_108 = 0;
local_80 = local_f8;
local_78 = lStack_f0;
local_70 = local_e8;
local_e8 = 0;
local_f8 = (ushort *)0x0;
lStack_f0 = 0;
local_68 = local_e0;
local_60 = local_d8;
uStack_58 = uStack_d0;
local_50 = local_c8;
local_d8 = (void *)0x0;
uStack_d0 = 0;
local_c8 = 0;
local_48 = (int4)local_c0;
uStack_44 = local_c0._4_4_;
uStack_40 = (int4)uStack_b8;
uStack_3c = uStack_b8._4_4_;
local_38 = local_b0;
local_c0 = (void *)0x0;
uStack_b8 = 0;
local_b0 = 0;
CodeAnalysis::CodeAnalysis(param_1,param_2,param_3,uVar4,peVar5 + (long)param_3,&local_a8);
pvVar3 = (void *)CONCAT44(uStack_44,local_48);
if (pvVar3 != (void *)0x0) {
operator_delete(pvVar3,local_38 - (long)pvVar3);
}
if (local_60 != (void *)0x0) {
operator_delete(local_60,local_50 - (long)local_60);
}
if (local_80 != (ushort *)0x0) {
operator_delete(local_80,local_70 - (long)local_80);
}
if (local_98 != (void *)0x0) {
operator_delete(local_98,local_88 - (long)local_98);
}
if (local_c0 != (void *)0x0) {
operator_delete(local_c0,local_b0 - (long)local_c0);
}
if (local_d8 != (void *)0x0) {
operator_delete(local_d8,local_c8 - (long)local_d8);
}
if (local_f8 != (ushort *)0x0) {
operator_delete(local_f8,local_e8 - (long)local_f8);
}
if (local_110 != (void *)0x0) {
operator_delete(local_110,local_100 - (long)local_110);
}
}
return param_1;
}
| |
39,366 | bf_tan | bluesky950520[P]quickjs/libbf.c | int bf_tan(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
{
assert(r != a);
if (a->len == 0) {
if (a->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_set_zero(r, a->sign);
return 0;
}
}
/* small argument case: result = x+r(x) with r(x) = x^3/3 +
O(X^5). We assume r(x) < 2^(3*EXP(x) - 1). */
if (a->expn < 0) {
slimb_t e;
e = sat_add(2 * a->expn, a->expn - 1);
if (e < a->expn - bf_max(prec + 2, a->len * LIMB_BITS + 2)) {
bf_set(r, a);
return bf_add_epsilon(r, r, e, a->sign, prec, flags);
}
}
return bf_ziv_rounding(r, a, prec, flags, bf_tan_internal, NULL);
} | O1 | c | bf_tan:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %r13
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0x8bda2
movl %ecx, %ebp
movq %rdx, %r15
testq %r13, %r13
jns 0x8bd7a
leaq -0x1(,%r13,2), %r12
addq %r13, %r12
leaq 0x2(%r15), %rcx
shlq $0x6, %rax
orq $0x2, %rax
cmpq %rax, %rcx
cmovgq %rcx, %rax
subq %rax, %r13
cmpq %r13, %r12
jge 0x8bd71
movq %rbx, %rdi
movq %r14, %rsi
callq 0x84079
movl 0x8(%r14), %ecx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %r8
movl %ebp, %r9d
callq 0x8a036
cmpq %r13, %r12
jl 0x8be55
leaq 0xe3(%rip), %r8 # 0x8be64
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
xorl %r9d, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8a0d8
movabsq $0x7fffffffffffffff, %r15 # imm = 0x7FFFFFFFFFFFFFFF
movabsq $0x7ffffffffffffffe, %rax # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rax, %r13
je 0x8bdef
cmpq %r15, %r13
jne 0x8be23
cmpq $0x0, 0x18(%rbx)
je 0x8bde2
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r15, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
jmp 0x8be53
cmpq $0x0, 0x18(%rbx)
je 0x8be11
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r15, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x1, %eax
jmp 0x8be55
movl 0x8(%r14), %ebp
cmpq $0x0, 0x18(%rbx)
je 0x8be49
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
incq %r15
movq %r15, 0x10(%rbx)
movl %ebp, 0x8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_tan:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov r13, [rsi+10h]
mov rax, [rsi+18h]
test rax, rax
jz loc_8BDA2
mov ebp, ecx
mov r15, rdx
test r13, r13
jns short loc_8BD7A
lea r12, ds:0FFFFFFFFFFFFFFFFh[r13*2]
add r12, r13
lea rcx, [r15+2]
shl rax, 6
or rax, 2
cmp rcx, rax
cmovg rax, rcx
sub r13, rax
cmp r12, r13
jge short loc_8BD71
mov rdi, rbx
mov rsi, r14
call bf_set
mov ecx, [r14+8]
mov rdi, rbx
mov rsi, rbx
mov rdx, r12
mov r8, r15
mov r9d, ebp
call bf_add_epsilon
loc_8BD71:
cmp r12, r13
jl loc_8BE55
loc_8BD7A:
lea r8, bf_tan_internal
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, ebp
xor r9d, r9d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_ziv_rounding
loc_8BDA2:
mov r15, 7FFFFFFFFFFFFFFFh
mov rax, 7FFFFFFFFFFFFFFEh
cmp r13, rax
jz short loc_8BDEF
cmp r13, r15
jnz short loc_8BE23
cmp qword ptr [rbx+18h], 0
jz short loc_8BDE2
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8BDE2:
mov [rbx+10h], r15
mov dword ptr [rbx+8], 0
jmp short loc_8BE53
loc_8BDEF:
cmp qword ptr [rbx+18h], 0
jz short loc_8BE11
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8BE11:
mov [rbx+10h], r15
mov dword ptr [rbx+8], 0
mov eax, 1
jmp short loc_8BE55
loc_8BE23:
mov ebp, [r14+8]
cmp qword ptr [rbx+18h], 0
jz short loc_8BE49
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8BE49:
inc r15
mov [rbx+10h], r15
mov [rbx+8], ebp
loc_8BE53:
xor eax, eax
loc_8BE55:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_tan(__int128 *a1, long long a2, long long a3, unsigned int a4)
{
long long v4; // r13
long long v5; // rax
long long v8; // r12
long long v9; // rax
int v11; // ebp
v4 = *(_QWORD *)(a2 + 16);
v5 = *(_QWORD *)(a2 + 24);
if ( v5 )
{
if ( v4 >= 0 )
return bf_ziv_rounding(
a1,
a2,
a3,
a4,
(void ( *)(_QWORD *, long long, long long, long long))bf_tan_internal,
0LL);
v8 = v4 + 2 * v4 - 1;
v9 = (v5 << 6) | 2;
if ( a3 + 2 > v9 )
v9 = a3 + 2;
if ( v8 >= v4 - v9 )
{
return bf_ziv_rounding(
a1,
a2,
a3,
a4,
(void ( *)(_QWORD *, long long, long long, long long))bf_tan_internal,
0LL);
}
else
{
bf_set(a1, a2);
return bf_add_epsilon(a1, a1, v8, *(_DWORD *)(a2 + 8), a3, a4);
}
}
else if ( v4 == 0x7FFFFFFFFFFFFFFELL )
{
if ( *((_QWORD *)a1 + 3) )
{
*((_QWORD *)a1 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 8LL))(
**(_QWORD **)a1,
*((_QWORD *)a1 + 4),
0LL);
*((_QWORD *)a1 + 3) = 0LL;
}
*((_QWORD *)a1 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
return 1LL;
}
else
{
if ( v4 == 0x7FFFFFFFFFFFFFFFLL )
{
if ( *((_QWORD *)a1 + 3) )
{
*((_QWORD *)a1 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 8LL))(
**(_QWORD **)a1,
*((_QWORD *)a1 + 4),
0LL);
*((_QWORD *)a1 + 3) = 0LL;
}
*((_QWORD *)a1 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
}
else
{
v11 = *(_DWORD *)(a2 + 8);
if ( *((_QWORD *)a1 + 3) )
{
*((_QWORD *)a1 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 8LL))(
**(_QWORD **)a1,
*((_QWORD *)a1 + 4),
0LL);
*((_QWORD *)a1 + 3) = 0LL;
}
*((_QWORD *)a1 + 2) = 0x8000000000000000LL;
*((_DWORD *)a1 + 2) = v11;
}
return 0LL;
}
}
| bf_tan:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV R13,qword ptr [RSI + 0x10]
MOV RAX,qword ptr [RSI + 0x18]
TEST RAX,RAX
JZ 0x0018bda2
MOV EBP,ECX
MOV R15,RDX
TEST R13,R13
JNS 0x0018bd7a
LEA R12,[-0x1 + R13*0x2]
ADD R12,R13
LEA RCX,[R15 + 0x2]
SHL RAX,0x6
OR RAX,0x2
CMP RCX,RAX
CMOVG RAX,RCX
SUB R13,RAX
CMP R12,R13
JGE 0x0018bd71
MOV RDI,RBX
MOV RSI,R14
CALL 0x00184079
MOV ECX,dword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R12
MOV R8,R15
MOV R9D,EBP
CALL 0x0018a036
LAB_0018bd71:
CMP R12,R13
JL 0x0018be55
LAB_0018bd7a:
LEA R8,[0x18be64]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,EBP
XOR R9D,R9D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018a0d8
LAB_0018bda2:
MOV R15,0x7fffffffffffffff
MOV RAX,0x7ffffffffffffffe
CMP R13,RAX
JZ 0x0018bdef
CMP R13,R15
JNZ 0x0018be23
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018bde2
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018bde2:
MOV qword ptr [RBX + 0x10],R15
MOV dword ptr [RBX + 0x8],0x0
JMP 0x0018be53
LAB_0018bdef:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018be11
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018be11:
MOV qword ptr [RBX + 0x10],R15
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,0x1
JMP 0x0018be55
LAB_0018be23:
MOV EBP,dword ptr [R14 + 0x8]
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018be49
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018be49:
INC R15
MOV qword ptr [RBX + 0x10],R15
MOV dword ptr [RBX + 0x8],EBP
LAB_0018be53:
XOR EAX,EAX
LAB_0018be55:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 bf_tan(long *param_1,long param_2,long param_3,int4 param_4)
{
long lVar1;
int4 uVar2;
ulong uVar3;
int8 uVar4;
long lVar5;
lVar5 = *(long *)(param_2 + 0x10);
if (*(long *)(param_2 + 0x18) == 0) {
if (lVar5 == 0x7ffffffffffffffe) {
if (param_1[3] != 0) {
lVar5 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar5;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
uVar4 = 1;
}
else {
if (lVar5 == 0x7fffffffffffffff) {
if (param_1[3] != 0) {
lVar5 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar5;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
}
else {
uVar2 = *(int4 *)(param_2 + 8);
if (param_1[3] != 0) {
lVar5 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar5;
param_1[3] = 0;
}
param_1[2] = -0x8000000000000000;
*(int4 *)(param_1 + 1) = uVar2;
}
uVar4 = 0;
}
return uVar4;
}
if (lVar5 < 0) {
lVar1 = lVar5 * 3 + -1;
uVar3 = *(long *)(param_2 + 0x18) << 6 | 2;
if ((long)uVar3 < (long)(param_3 + 2U)) {
uVar3 = param_3 + 2U;
}
if (lVar1 < (long)(lVar5 - uVar3)) {
bf_set(param_1,param_2);
uVar4 = bf_add_epsilon(param_1,param_1,lVar1,*(int4 *)(param_2 + 8),param_3,param_4);
return uVar4;
}
}
uVar4 = bf_ziv_rounding(param_1,param_2,param_3,param_4,bf_tan_internal,0);
return uVar4;
}
| |
39,367 | bf_tan | bluesky950520[P]quickjs/libbf.c | int bf_tan(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
{
assert(r != a);
if (a->len == 0) {
if (a->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_set_zero(r, a->sign);
return 0;
}
}
/* small argument case: result = x+r(x) with r(x) = x^3/3 +
O(X^5). We assume r(x) < 2^(3*EXP(x) - 1). */
if (a->expn < 0) {
slimb_t e;
e = sat_add(2 * a->expn, a->expn - 1);
if (e < a->expn - bf_max(prec + 2, a->len * LIMB_BITS + 2)) {
bf_set(r, a);
return bf_add_epsilon(r, r, e, a->sign, prec, flags);
}
}
return bf_ziv_rounding(r, a, prec, flags, bf_tan_internal, NULL);
} | O3 | c | bf_tan:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rcx
testq %rcx, %rcx
je 0x8e7f9
movq %rdx, %r15
testq %rax, %rax
jns 0x8e7d7
leaq (%rax,%rax,2), %r12
decq %r12
leaq 0x2(%r15), %rdx
shlq $0x6, %rcx
orq $0x2, %rcx
cmpq %rcx, %rdx
cmovgq %rdx, %rcx
subq %rcx, %rax
cmpq %rax, %r12
jge 0x8e7d7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x86a9a
movl 0x8(%r14), %ecx
movq (%rbx), %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %r8
movl %ebp, %r9d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8caa6
leaq 0xd7(%rip), %r8 # 0x8e8b5
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
xorl %r9d, %r9d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8cb45
movabsq $0x7fffffffffffffff, %r15 # imm = 0x7FFFFFFFFFFFFFFF
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, %rax
je 0x8e846
cmpq %r15, %rax
jne 0x8e87a
cmpq $0x0, 0x18(%rbx)
je 0x8e839
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r15, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
jmp 0x8e8aa
cmpq $0x0, 0x18(%rbx)
je 0x8e868
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r15, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x1, %eax
jmp 0x8e8ac
movl 0x8(%r14), %ebp
cmpq $0x0, 0x18(%rbx)
je 0x8e8a0
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
incq %r15
movq %r15, 0x10(%rbx)
movl %ebp, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| bf_tan:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, ecx
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+10h]
mov rcx, [rsi+18h]
test rcx, rcx
jz short loc_8E7F9
mov r15, rdx
test rax, rax
jns short loc_8E7D7
lea r12, [rax+rax*2]
dec r12
lea rdx, [r15+2]
shl rcx, 6
or rcx, 2
cmp rdx, rcx
cmovg rcx, rdx
sub rax, rcx
cmp r12, rax
jge short loc_8E7D7
mov rdi, rbx
mov rsi, r14
call bf_set
mov ecx, [r14+8]
mov rsi, [rbx]
mov rdi, rbx
mov rdx, r12
mov r8, r15
mov r9d, ebp
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp bf_add_epsilon
loc_8E7D7:
lea r8, bf_tan_internal
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, ebp
xor r9d, r9d
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp bf_ziv_rounding
loc_8E7F9:
mov r15, 7FFFFFFFFFFFFFFFh
mov rcx, 7FFFFFFFFFFFFFFEh
cmp rax, rcx
jz short loc_8E846
cmp rax, r15
jnz short loc_8E87A
cmp qword ptr [rbx+18h], 0
jz short loc_8E839
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8E839:
mov [rbx+10h], r15
mov dword ptr [rbx+8], 0
jmp short loc_8E8AA
loc_8E846:
cmp qword ptr [rbx+18h], 0
jz short loc_8E868
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8E868:
mov [rbx+10h], r15
mov dword ptr [rbx+8], 0
mov eax, 1
jmp short loc_8E8AC
loc_8E87A:
mov ebp, [r14+8]
cmp qword ptr [rbx+18h], 0
jz short loc_8E8A0
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8E8A0:
inc r15
mov [rbx+10h], r15
mov [rbx+8], ebp
loc_8E8AA:
xor eax, eax
loc_8E8AC:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long bf_tan(__int128 *a1, long long a2, long long a3, unsigned int a4)
{
long long v5; // rax
long long v6; // rcx
long long v8; // r12
long long v9; // rcx
int v11; // ebp
v5 = *(_QWORD *)(a2 + 16);
v6 = *(_QWORD *)(a2 + 24);
if ( v6 )
{
if ( v5 >= 0 )
return bf_ziv_rounding(
a1,
a2,
a3,
a4,
(void ( *)(_QWORD *, long long, long long, long long))bf_tan_internal,
0LL);
v8 = 3 * v5 - 1;
v9 = (v6 << 6) | 2;
if ( a3 + 2 > v9 )
v9 = a3 + 2;
if ( v8 >= v5 - v9 )
{
return bf_ziv_rounding(
a1,
a2,
a3,
a4,
(void ( *)(_QWORD *, long long, long long, long long))bf_tan_internal,
0LL);
}
else
{
bf_set(a1, a2);
return bf_add_epsilon(a1, *(_QWORD *)a1, v8, *(_DWORD *)(a2 + 8), a3, a4);
}
}
else if ( v5 == 0x7FFFFFFFFFFFFFFELL )
{
if ( *((_QWORD *)a1 + 3) )
{
*((_QWORD *)a1 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 8LL))(
**(_QWORD **)a1,
*((_QWORD *)a1 + 4),
0LL);
*((_QWORD *)a1 + 3) = 0LL;
}
*((_QWORD *)a1 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
return 1LL;
}
else
{
if ( v5 == 0x7FFFFFFFFFFFFFFFLL )
{
if ( *((_QWORD *)a1 + 3) )
{
*((_QWORD *)a1 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 8LL))(
**(_QWORD **)a1,
*((_QWORD *)a1 + 4),
0LL);
*((_QWORD *)a1 + 3) = 0LL;
}
*((_QWORD *)a1 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
}
else
{
v11 = *(_DWORD *)(a2 + 8);
if ( *((_QWORD *)a1 + 3) )
{
*((_QWORD *)a1 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 8LL))(
**(_QWORD **)a1,
*((_QWORD *)a1 + 4),
0LL);
*((_QWORD *)a1 + 3) = 0LL;
}
*((_QWORD *)a1 + 2) = 0x8000000000000000LL;
*((_DWORD *)a1 + 2) = v11;
}
return 0LL;
}
}
| bf_tan:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,ECX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x10]
MOV RCX,qword ptr [RSI + 0x18]
TEST RCX,RCX
JZ 0x0018e7f9
MOV R15,RDX
TEST RAX,RAX
JNS 0x0018e7d7
LEA R12,[RAX + RAX*0x2]
DEC R12
LEA RDX,[R15 + 0x2]
SHL RCX,0x6
OR RCX,0x2
CMP RDX,RCX
CMOVG RCX,RDX
SUB RAX,RCX
CMP R12,RAX
JGE 0x0018e7d7
MOV RDI,RBX
MOV RSI,R14
CALL 0x00186a9a
MOV ECX,dword ptr [R14 + 0x8]
MOV RSI,qword ptr [RBX]
MOV RDI,RBX
MOV RDX,R12
MOV R8,R15
MOV R9D,EBP
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0018caa6
LAB_0018e7d7:
LEA R8,[0x18e8b5]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,EBP
XOR R9D,R9D
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0018cb45
LAB_0018e7f9:
MOV R15,0x7fffffffffffffff
MOV RCX,0x7ffffffffffffffe
CMP RAX,RCX
JZ 0x0018e846
CMP RAX,R15
JNZ 0x0018e87a
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018e839
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018e839:
MOV qword ptr [RBX + 0x10],R15
MOV dword ptr [RBX + 0x8],0x0
JMP 0x0018e8aa
LAB_0018e846:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018e868
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018e868:
MOV qword ptr [RBX + 0x10],R15
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,0x1
JMP 0x0018e8ac
LAB_0018e87a:
MOV EBP,dword ptr [R14 + 0x8]
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018e8a0
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018e8a0:
INC R15
MOV qword ptr [RBX + 0x10],R15
MOV dword ptr [RBX + 0x8],EBP
LAB_0018e8aa:
XOR EAX,EAX
LAB_0018e8ac:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 bf_tan(long *param_1,long param_2,long param_3,int4 param_4)
{
int4 uVar1;
int8 uVar2;
long lVar3;
ulong uVar4;
long lVar5;
lVar3 = *(long *)(param_2 + 0x10);
if (*(long *)(param_2 + 0x18) == 0) {
if (lVar3 == 0x7ffffffffffffffe) {
if (param_1[3] != 0) {
lVar3 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar3;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
uVar2 = 1;
}
else {
if (lVar3 == 0x7fffffffffffffff) {
if (param_1[3] != 0) {
lVar3 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar3;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
}
else {
uVar1 = *(int4 *)(param_2 + 8);
if (param_1[3] != 0) {
lVar3 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar3;
param_1[3] = 0;
}
param_1[2] = -0x8000000000000000;
*(int4 *)(param_1 + 1) = uVar1;
}
uVar2 = 0;
}
return uVar2;
}
if (lVar3 < 0) {
lVar5 = lVar3 * 3 + -1;
uVar4 = *(long *)(param_2 + 0x18) << 6 | 2;
if ((long)uVar4 < (long)(param_3 + 2U)) {
uVar4 = param_3 + 2U;
}
if (lVar5 < (long)(lVar3 - uVar4)) {
bf_set(param_1,param_2);
uVar2 = bf_add_epsilon(param_1,*param_1,lVar5,*(int4 *)(param_2 + 8),param_3,param_4);
return uVar2;
}
}
uVar2 = bf_ziv_rounding(param_1,param_2,param_3,param_4,bf_tan_internal,0);
return uVar2;
}
| |
39,368 | my_collation_get_by_name | eloqsql/mysys/charset.c | CHARSET_INFO *
my_collation_get_by_name(MY_CHARSET_LOADER *loader,
const char *name, myf flags)
{
uint cs_number;
CHARSET_INFO *cs;
my_pthread_once(&charsets_initialized, init_available_charsets);
cs_number= get_collation_number(name,flags);
my_charset_loader_init_mysys(loader);
cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL;
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
my_error(EE_UNKNOWN_COLLATION, MYF(ME_BELL), name, index_file);
}
return cs;
} | O3 | c | my_collation_get_by_name:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq 0x361a8b(%rip), %rdi # 0x3b0470
leaq -0x7e1(%rip), %rsi # 0x4e20b
callq 0x28350
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e15f
movb $0x0, (%r15)
leaq -0xfc9(%rip), %rcx # 0x4da3e
movq %rcx, 0x80(%r15)
leaq -0xfc8(%rip), %rcx # 0x4da4d
movq %rcx, 0x88(%r15)
leaq -0xfbb(%rip), %rcx # 0x4da68
movq %rcx, 0x90(%r15)
leaq 0xcb0d(%rip), %rcx # 0x5b53e
movq %rcx, 0x98(%r15)
leaq 0x2e2af1(%rip), %rcx # 0x331530
movq (%rcx), %rcx
movq %rcx, 0xa0(%r15)
leaq -0xfca(%rip), %rcx # 0x4da86
movq %rcx, 0xa8(%r15)
testl %eax, %eax
je 0x4ea6d
movq %r15, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0x4e69a
movq %rax, %r15
jmp 0x4ea70
xorl %r15d, %r15d
testq %r15, %r15
setne %al
testb $0x10, %r14b
sete %cl
orb %al, %cl
jne 0x4eaba
leaq -0x230(%rbp), %r14
movq %r14, %rdi
callq 0x4dfcb
movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49
movq %rcx, (%rax)
movw $0x6c, 0x8(%rax)
movl $0x4, %esi
movl $0x1c, %edi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x5907f
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x4eada
movq %r15, %rax
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x28430
| my_collation_get_by_name:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 218h
mov r14, rdx
mov rbx, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, rbx
mov rsi, r14
call get_collation_number
mov byte ptr [r15], 0
lea rcx, my_once_alloc_c
mov [r15+80h], rcx
lea rcx, my_malloc_c
mov [r15+88h], rcx
lea rcx, my_realloc_c
mov [r15+90h], rcx
lea rcx, my_free
mov [r15+98h], rcx
lea rcx, my_charset_error_reporter
mov rcx, [rcx]
mov [r15+0A0h], rcx
lea rcx, add_collation
mov [r15+0A8h], rcx
test eax, eax
jz short loc_4EA6D
mov rdi, r15
mov esi, eax
mov rdx, r14
call get_internal_charset
mov r15, rax
jmp short loc_4EA70
loc_4EA6D:
xor r15d, r15d
loc_4EA70:
test r15, r15
setnz al
test r14b, 10h
setz cl
or cl, al
jnz short loc_4EABA
lea r14, [rbp+var_230]
mov rdi, r14
call get_charsets_dir
mov rcx, 6D782E7865646E49h
mov [rax], rcx
mov word ptr [rax+8], 6Ch ; 'l'
mov esi, 4
mov edi, 1Ch
mov rdx, rbx
mov rcx, r14
xor eax, eax
call my_error
loc_4EABA:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_4EADA
mov rax, r15
add rsp, 218h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4EADA:
call ___stack_chk_fail
| long long my_collation_get_by_name(long long a1, long long a2, long long a3)
{
unsigned int collation_number; // eax
long long internal_charset; // r15
int v6; // r8d
int v7; // r9d
_BYTE v9[528]; // [rsp+0h] [rbp-230h] BYREF
unsigned long long v10; // [rsp+210h] [rbp-20h]
v10 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
collation_number = get_collation_number(a2, a3);
*(_BYTE *)a1 = 0;
*(_QWORD *)(a1 + 128) = my_once_alloc_c;
*(_QWORD *)(a1 + 136) = my_malloc_c;
*(_QWORD *)(a1 + 144) = my_realloc_c;
*(_QWORD *)(a1 + 152) = my_free;
*(_QWORD *)(a1 + 160) = my_charset_error_reporter;
*(_QWORD *)(a1 + 168) = add_collation;
if ( collation_number )
internal_charset = get_internal_charset(a1, collation_number, a3);
else
internal_charset = 0LL;
if ( internal_charset == 0 && (a3 & 0x10) != 0 )
{
strcpy((char *)get_charsets_dir((long long)v9), "Index.xml");
my_error(28, 4, a2, (unsigned int)v9, v6, v7);
}
return internal_charset;
}
| my_collation_get_by_name:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x218
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[0x4b0470]
LEA RSI,[0x14e20b]
CALL 0x00128350
MOV RDI,RBX
MOV RSI,R14
CALL 0x0014e15f
MOV byte ptr [R15],0x0
LEA RCX,[0x14da3e]
MOV qword ptr [R15 + 0x80],RCX
LEA RCX,[0x14da4d]
MOV qword ptr [R15 + 0x88],RCX
LEA RCX,[0x14da68]
MOV qword ptr [R15 + 0x90],RCX
LEA RCX,[0x15b53e]
MOV qword ptr [R15 + 0x98],RCX
LEA RCX,[0x431530]
MOV RCX,qword ptr [RCX]
MOV qword ptr [R15 + 0xa0],RCX
LEA RCX,[0x14da86]
MOV qword ptr [R15 + 0xa8],RCX
TEST EAX,EAX
JZ 0x0014ea6d
MOV RDI,R15
MOV ESI,EAX
MOV RDX,R14
CALL 0x0014e69a
MOV R15,RAX
JMP 0x0014ea70
LAB_0014ea6d:
XOR R15D,R15D
LAB_0014ea70:
TEST R15,R15
SETNZ AL
TEST R14B,0x10
SETZ CL
OR CL,AL
JNZ 0x0014eaba
LEA R14,[RBP + -0x230]
MOV RDI,R14
CALL 0x0014dfcb
MOV RCX,0x6d782e7865646e49
MOV qword ptr [RAX],RCX
MOV word ptr [RAX + 0x8],0x6c
MOV ESI,0x4
MOV EDI,0x1c
MOV RDX,RBX
MOV RCX,R14
XOR EAX,EAX
CALL 0x0015907f
LAB_0014eaba:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0014eada
MOV RAX,R15
ADD RSP,0x218
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014eada:
CALL 0x00128430
|
long my_collation_get_by_name(int1 *param_1,int8 param_2,ulong param_3)
{
int iVar1;
long lVar2;
int8 *puVar3;
long in_FS_OFFSET;
int1 local_238 [528];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
iVar1 = get_collation_number(param_2,param_3);
*param_1 = 0;
*(code **)(param_1 + 0x80) = my_once_alloc_c;
*(code **)(param_1 + 0x88) = my_malloc_c;
*(code **)(param_1 + 0x90) = my_realloc_c;
*(code **)(param_1 + 0x98) = my_free;
*(int **)(param_1 + 0xa0) = my_charset_error_reporter;
*(code **)(param_1 + 0xa8) = add_collation;
if (iVar1 == 0) {
lVar2 = 0;
}
else {
lVar2 = get_internal_charset(param_1,iVar1,param_3);
}
if ((param_3 & 0x10) != 0 && lVar2 == 0) {
puVar3 = (int8 *)get_charsets_dir(local_238);
*puVar3 = 0x6d782e7865646e49;
*(int2 *)(puVar3 + 1) = 0x6c;
my_error(0x1c,4,param_2,local_238);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return lVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
39,369 | hexdump_minimal_header_to_io_cache(st_io_cache*, unsigned long long, unsigned char*) | eloqsql/sql/log_event_client.cc | static bool hexdump_minimal_header_to_io_cache(IO_CACHE *file,
my_off_t offset,
uchar *ptr)
{
DBUG_ASSERT(LOG_EVENT_MINIMAL_HEADER_LEN == 19);
/*
Pretty-print the first LOG_EVENT_MINIMAL_HEADER_LEN (19) bytes of the
common header, which contains the basic information about the log event.
Every event will have at least this much header, but events could contain
more headers (which must be printed by other methods, if desired).
*/
char emit_buf[120]; // Enough for storing one line
size_t emit_buf_written;
if (my_b_printf(file,
"# "
"|Timestamp "
"|Type "
"|Master ID "
"|Size "
"|Master Pos "
"|Flags\n"))
goto err;
emit_buf_written=
my_snprintf(emit_buf, sizeof(emit_buf),
"# %8llx " /* Position */
"|%02x %02x %02x %02x " /* Timestamp */
"|%02x " /* Type */
"|%02x %02x %02x %02x " /* Master ID */
"|%02x %02x %02x %02x " /* Size */
"|%02x %02x %02x %02x " /* Master Pos */
"|%02x %02x\n", /* Flags */
(ulonglong) offset, /* Position */
ptr[0], ptr[1], ptr[2], ptr[3], /* Timestamp */
ptr[4], /* Type */
ptr[5], ptr[6], ptr[7], ptr[8], /* Master ID */
ptr[9], ptr[10], ptr[11], ptr[12], /* Size */
ptr[13], ptr[14], ptr[15], ptr[16], /* Master Pos */
ptr[17], ptr[18]); /* Flags */
DBUG_ASSERT(static_cast<size_t>(emit_buf_written) < sizeof(emit_buf));
if (my_b_write(file, reinterpret_cast<uchar*>(emit_buf), emit_buf_written) ||
my_b_write(file, (uchar*)"#\n", 2))
goto err;
return 0;
err:
return 1;
} | O0 | cpp | hexdump_minimal_header_to_io_cache(st_io_cache*, unsigned long long, unsigned char*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp # imm = 0x168
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
jmp 0x52a38
movq -0xc0(%rbp), %rdi
leaq 0xc1ba9(%rip), %rsi # 0x1145ef
movb $0x0, %al
callq 0xafb80
cmpb $0x0, %al
je 0x52a56
jmp 0x52c57
leaq -0xb0(%rbp), %rdi
movq -0xc8(%rbp), %rcx
movq -0xd0(%rbp), %rax
movzbl (%rax), %r8d
movq -0xd0(%rbp), %rax
movzbl 0x1(%rax), %r9d
movq -0xd0(%rbp), %rax
movzbl 0x2(%rax), %eax
movq -0xd0(%rbp), %rdx
movzbl 0x3(%rdx), %edx
movl %edx, -0xfc(%rbp)
movq -0xd0(%rbp), %rdx
movzbl 0x4(%rdx), %edx
movl %edx, -0xf8(%rbp)
movq -0xd0(%rbp), %rdx
movzbl 0x5(%rdx), %edx
movl %edx, -0xf4(%rbp)
movq -0xd0(%rbp), %rdx
movzbl 0x6(%rdx), %edx
movl %edx, -0xf0(%rbp)
movq -0xd0(%rbp), %rdx
movzbl 0x7(%rdx), %edx
movl %edx, -0xec(%rbp)
movq -0xd0(%rbp), %rdx
movzbl 0x8(%rdx), %edx
movl %edx, -0xe8(%rbp)
movq -0xd0(%rbp), %rdx
movzbl 0x9(%rdx), %edx
movl %edx, -0xe4(%rbp)
movq -0xd0(%rbp), %rdx
movzbl 0xa(%rdx), %edx
movl %edx, -0xe0(%rbp)
movq -0xd0(%rbp), %rdx
movzbl 0xb(%rdx), %r13d
movq -0xd0(%rbp), %rdx
movzbl 0xc(%rdx), %r12d
movq -0xd0(%rbp), %rdx
movzbl 0xd(%rdx), %r15d
movq -0xd0(%rbp), %rdx
movzbl 0xe(%rdx), %r14d
movq -0xd0(%rbp), %rdx
movzbl 0xf(%rdx), %ebx
movq -0xd0(%rbp), %rdx
movzbl 0x10(%rdx), %r11d
movq -0xd0(%rbp), %rdx
movzbl 0x11(%rdx), %r10d
movq -0xd0(%rbp), %rdx
movzbl 0x12(%rdx), %edx
movl %edx, -0xdc(%rbp)
movl $0x78, %esi
leaq 0xc1abf(%rip), %rdx # 0x11463d
movl %eax, (%rsp)
movl -0xfc(%rbp), %eax
movl %eax, 0x8(%rsp)
movl -0xf8(%rbp), %eax
movl %eax, 0x10(%rsp)
movl -0xf4(%rbp), %eax
movl %eax, 0x18(%rsp)
movl -0xf0(%rbp), %eax
movl %eax, 0x20(%rsp)
movl -0xec(%rbp), %eax
movl %eax, 0x28(%rsp)
movl -0xe8(%rbp), %eax
movl %eax, 0x30(%rsp)
movl -0xe4(%rbp), %eax
movl %eax, 0x38(%rsp)
movl -0xe0(%rbp), %eax
movl %eax, 0x40(%rsp)
movl -0xdc(%rbp), %eax
movl %r13d, 0x48(%rsp)
movl %r12d, 0x50(%rsp)
movl %r15d, 0x58(%rsp)
movl %r14d, 0x60(%rsp)
movl %ebx, 0x68(%rsp)
movl %r11d, 0x70(%rsp)
movl %r10d, 0x78(%rsp)
movl %eax, 0x80(%rsp)
movb $0x0, %al
callq 0x10bfb0
movq %rax, -0xd8(%rbp)
jmp 0x52c10
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
callq 0x53060
cmpl $0x0, %eax
jne 0x52c4c
movq -0xc0(%rbp), %rdi
leaq 0xc1a71(%rip), %rsi # 0x1146ae
movl $0x2, %edx
callq 0x53060
cmpl $0x0, %eax
je 0x52c4e
jmp 0x52c57
movb $0x0, -0xb1(%rbp)
jmp 0x52c5e
movb $0x1, -0xb1(%rbp)
movb -0xb1(%rbp), %al
movb %al, -0xfd(%rbp)
movq %fs:0x28, %rax
movq -0x30(%rbp), %rcx
cmpq %rcx, %rax
jne 0x52c96
movb -0xfd(%rbp), %al
andb $0x1, %al
addq $0x168, %rsp # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3b340
nopl (%rax,%rax)
| _ZL34hexdump_minimal_header_to_io_cacheP11st_io_cacheyPh:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 168h
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_C0], rdi
mov [rbp+var_C8], rsi
mov [rbp+var_D0], rdx
jmp short $+2
loc_52A38:
mov rdi, [rbp+var_C0]
lea rsi, aTimestampTypeM; "# |Timestamp |Type |Master "...
mov al, 0
call my_b_printf
cmp al, 0
jz short loc_52A56
jmp loc_52C57
loc_52A56:
lea rdi, [rbp+var_B0]
mov rcx, [rbp+var_C8]
mov rax, [rbp+var_D0]
movzx r8d, byte ptr [rax]
mov rax, [rbp+var_D0]
movzx r9d, byte ptr [rax+1]
mov rax, [rbp+var_D0]
movzx eax, byte ptr [rax+2]
mov rdx, [rbp+var_D0]
movzx edx, byte ptr [rdx+3]
mov [rbp+var_FC], edx
mov rdx, [rbp+var_D0]
movzx edx, byte ptr [rdx+4]
mov [rbp+var_F8], edx
mov rdx, [rbp+var_D0]
movzx edx, byte ptr [rdx+5]
mov [rbp+var_F4], edx
mov rdx, [rbp+var_D0]
movzx edx, byte ptr [rdx+6]
mov [rbp+var_F0], edx
mov rdx, [rbp+var_D0]
movzx edx, byte ptr [rdx+7]
mov [rbp+var_EC], edx
mov rdx, [rbp+var_D0]
movzx edx, byte ptr [rdx+8]
mov [rbp+var_E8], edx
mov rdx, [rbp+var_D0]
movzx edx, byte ptr [rdx+9]
mov [rbp+var_E4], edx
mov rdx, [rbp+var_D0]
movzx edx, byte ptr [rdx+0Ah]
mov [rbp+var_E0], edx
mov rdx, [rbp+var_D0]
movzx r13d, byte ptr [rdx+0Bh]
mov rdx, [rbp+var_D0]
movzx r12d, byte ptr [rdx+0Ch]
mov rdx, [rbp+var_D0]
movzx r15d, byte ptr [rdx+0Dh]
mov rdx, [rbp+var_D0]
movzx r14d, byte ptr [rdx+0Eh]
mov rdx, [rbp+var_D0]
movzx ebx, byte ptr [rdx+0Fh]
mov rdx, [rbp+var_D0]
movzx r11d, byte ptr [rdx+10h]
mov rdx, [rbp+var_D0]
movzx r10d, byte ptr [rdx+11h]
mov rdx, [rbp+var_D0]
movzx edx, byte ptr [rdx+12h]
mov [rbp+var_DC], edx
mov esi, 78h ; 'x'
lea rdx, a8llx02x02x02x0; "# %8llx |%02x %02x %02x %02x |%02x |"...
mov [rsp+190h+var_190], eax
mov eax, [rbp+var_FC]
mov [rsp+190h+var_188], eax
mov eax, [rbp+var_F8]
mov [rsp+190h+var_180], eax
mov eax, [rbp+var_F4]
mov [rsp+190h+var_178], eax
mov eax, [rbp+var_F0]
mov [rsp+190h+var_170], eax
mov eax, [rbp+var_EC]
mov [rsp+190h+var_168], eax
mov eax, [rbp+var_E8]
mov [rsp+190h+var_160], eax
mov eax, [rbp+var_E4]
mov [rsp+190h+var_158], eax
mov eax, [rbp+var_E0]
mov [rsp+190h+var_150], eax
mov eax, [rbp+var_DC]
mov [rsp+190h+var_148], r13d
mov [rsp+190h+var_140], r12d
mov [rsp+190h+var_138], r15d
mov [rsp+190h+var_130], r14d
mov [rsp+190h+var_128], ebx
mov [rsp+190h+var_120], r11d
mov [rsp+190h+var_118], r10d
mov [rsp+190h+var_110], eax
mov al, 0
call my_snprintf
mov [rbp+var_D8], rax
jmp short $+2
loc_52C10:
mov rdi, [rbp+var_C0]
lea rsi, [rbp+var_B0]
mov rdx, [rbp+var_D8]
call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong)
cmp eax, 0
jnz short loc_52C4C
mov rdi, [rbp+var_C0]
lea rsi, asc_1146AE; "#\n"
mov edx, 2
call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong)
cmp eax, 0
jz short loc_52C4E
loc_52C4C:
jmp short loc_52C57
loc_52C4E:
mov [rbp+var_B1], 0
jmp short loc_52C5E
loc_52C57:
mov [rbp+var_B1], 1
loc_52C5E:
mov al, [rbp+var_B1]
mov [rbp+var_FD], al
mov rax, fs:28h
mov rcx, [rbp+var_30]
cmp rax, rcx
jnz short loc_52C96
mov al, [rbp+var_FD]
and al, 1
add rsp, 168h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_52C96:
call ___stack_chk_fail
| bool hexdump_minimal_header_to_io_cache(long long a1, int a2, unsigned __int8 *a3, int a4, int a5, int a6)
{
long long v7; // [rsp+B8h] [rbp-D8h]
bool v9; // [rsp+DFh] [rbp-B1h]
_BYTE v10[128]; // [rsp+E0h] [rbp-B0h] BYREF
unsigned long long v11; // [rsp+160h] [rbp-30h]
v11 = __readfsqword(0x28u);
v9 = 1;
if ( !(unsigned __int8)my_b_printf(
a1,
(unsigned int)"# |Timestamp |Type |Master ID |Size |Master Pos |Flags\n",
(_DWORD)a3,
a4,
a5,
a6) )
{
v7 = my_snprintf(
(unsigned int)v10,
120,
(unsigned int)"# %8llx |%02x %02x %02x %02x |%02x |%02x %02x %02x %02x |%02x %02x %02x %02x |%02x %02x %02x"
" %02x |%02x %02x\n",
a2,
*a3,
a3[1]);
if ( !(unsigned int)my_b_write(a1, v10, v7) && !(unsigned int)my_b_write(a1, "#\n", 2LL) )
return 0;
}
return v9;
}
| hexdump_minimal_header_to_io_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x168
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0xc0],RDI
MOV qword ptr [RBP + -0xc8],RSI
MOV qword ptr [RBP + -0xd0],RDX
JMP 0x00152a38
LAB_00152a38:
MOV RDI,qword ptr [RBP + -0xc0]
LEA RSI,[0x2145ef]
MOV AL,0x0
CALL 0x001afb80
CMP AL,0x0
JZ 0x00152a56
JMP 0x00152c57
LAB_00152a56:
LEA RDI,[RBP + -0xb0]
MOV RCX,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0xd0]
MOVZX R8D,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0xd0]
MOVZX R9D,byte ptr [RAX + 0x1]
MOV RAX,qword ptr [RBP + -0xd0]
MOVZX EAX,byte ptr [RAX + 0x2]
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX EDX,byte ptr [RDX + 0x3]
MOV dword ptr [RBP + -0xfc],EDX
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX EDX,byte ptr [RDX + 0x4]
MOV dword ptr [RBP + -0xf8],EDX
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX EDX,byte ptr [RDX + 0x5]
MOV dword ptr [RBP + -0xf4],EDX
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX EDX,byte ptr [RDX + 0x6]
MOV dword ptr [RBP + -0xf0],EDX
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX EDX,byte ptr [RDX + 0x7]
MOV dword ptr [RBP + -0xec],EDX
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX EDX,byte ptr [RDX + 0x8]
MOV dword ptr [RBP + -0xe8],EDX
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX EDX,byte ptr [RDX + 0x9]
MOV dword ptr [RBP + -0xe4],EDX
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX EDX,byte ptr [RDX + 0xa]
MOV dword ptr [RBP + -0xe0],EDX
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX R13D,byte ptr [RDX + 0xb]
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX R12D,byte ptr [RDX + 0xc]
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX R15D,byte ptr [RDX + 0xd]
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX R14D,byte ptr [RDX + 0xe]
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX EBX,byte ptr [RDX + 0xf]
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX R11D,byte ptr [RDX + 0x10]
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX R10D,byte ptr [RDX + 0x11]
MOV RDX,qword ptr [RBP + -0xd0]
MOVZX EDX,byte ptr [RDX + 0x12]
MOV dword ptr [RBP + -0xdc],EDX
MOV ESI,0x78
LEA RDX,[0x21463d]
MOV dword ptr [RSP],EAX
MOV EAX,dword ptr [RBP + -0xfc]
MOV dword ptr [RSP + 0x8],EAX
MOV EAX,dword ptr [RBP + -0xf8]
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RBP + -0xf4]
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RBP + -0xf0]
MOV dword ptr [RSP + 0x20],EAX
MOV EAX,dword ptr [RBP + -0xec]
MOV dword ptr [RSP + 0x28],EAX
MOV EAX,dword ptr [RBP + -0xe8]
MOV dword ptr [RSP + 0x30],EAX
MOV EAX,dword ptr [RBP + -0xe4]
MOV dword ptr [RSP + 0x38],EAX
MOV EAX,dword ptr [RBP + -0xe0]
MOV dword ptr [RSP + 0x40],EAX
MOV EAX,dword ptr [RBP + -0xdc]
MOV dword ptr [RSP + 0x48],R13D
MOV dword ptr [RSP + 0x50],R12D
MOV dword ptr [RSP + 0x58],R15D
MOV dword ptr [RSP + 0x60],R14D
MOV dword ptr [RSP + 0x68],EBX
MOV dword ptr [RSP + 0x70],R11D
MOV dword ptr [RSP + 0x78],R10D
MOV dword ptr [RSP + 0x80],EAX
MOV AL,0x0
CALL 0x0020bfb0
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x00152c10
LAB_00152c10:
MOV RDI,qword ptr [RBP + -0xc0]
LEA RSI,[RBP + -0xb0]
MOV RDX,qword ptr [RBP + -0xd8]
CALL 0x00153060
CMP EAX,0x0
JNZ 0x00152c4c
MOV RDI,qword ptr [RBP + -0xc0]
LEA RSI,[0x2146ae]
MOV EDX,0x2
CALL 0x00153060
CMP EAX,0x0
JZ 0x00152c4e
LAB_00152c4c:
JMP 0x00152c57
LAB_00152c4e:
MOV byte ptr [RBP + -0xb1],0x0
JMP 0x00152c5e
LAB_00152c57:
MOV byte ptr [RBP + -0xb1],0x1
LAB_00152c5e:
MOV AL,byte ptr [RBP + -0xb1]
MOV byte ptr [RBP + -0xfd],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x30]
CMP RAX,RCX
JNZ 0x00152c96
MOV AL,byte ptr [RBP + -0xfd]
AND AL,0x1
ADD RSP,0x168
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00152c96:
CALL 0x0013b340
|
/* hexdump_minimal_header_to_io_cache(st_io_cache*, unsigned long long, unsigned char*) */
int8 hexdump_minimal_header_to_io_cache(st_io_cache *param_1,ulonglong param_2,uchar *param_3)
{
char cVar1;
int iVar2;
ulong uVar3;
long in_FS_OFFSET;
int1 local_b9;
uchar local_b8 [128];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
cVar1 = my_b_printf(param_1,
"# |Timestamp |Type |Master ID |Size |Master Pos |Flags\n"
);
if (cVar1 == '\0') {
uVar3 = my_snprintf(local_b8,0x78,
"# %8llx |%02x %02x %02x %02x |%02x |%02x %02x %02x %02x |%02x %02x %02x %02x |%02x %02x %02x %02x |%02x %02x\n"
,param_2,*param_3,param_3[1],param_3[2],param_3[3],param_3[4],param_3[5],
param_3[6],param_3[7],param_3[8],param_3[9],param_3[10],param_3[0xb],
param_3[0xc],param_3[0xd],param_3[0xe],param_3[0xf],param_3[0x10],
param_3[0x11],param_3[0x12]);
iVar2 = my_b_write(param_1,local_b8,uVar3);
if ((iVar2 == 0) && (iVar2 = my_b_write(param_1,"#\n",2), iVar2 == 0)) {
local_b9 = 0;
goto LAB_00152c5e;
}
}
local_b9 = 1;
LAB_00152c5e:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_b9);
}
| |
39,370 | ma_write_clr | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_write_clr(MARIA_HA *info, LSN undo_lsn,
enum translog_record_type undo_type,
my_bool store_checksum, ha_checksum checksum,
LSN *res_lsn, void *extra_msg)
{
uchar log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE + CLR_TYPE_STORE_SIZE +
HA_CHECKSUM_STORE_SIZE+ KEY_NR_STORE_SIZE + PAGE_STORE_SIZE];
uchar *log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1];
struct st_msg_to_write_hook_for_clr_end msg;
my_bool res;
DBUG_ENTER("_ma_write_clr");
/* undo_lsn must be first for compression to work */
lsn_store(log_data, undo_lsn);
clr_type_store(log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE, undo_type);
log_pos= log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE + CLR_TYPE_STORE_SIZE;
/* Extra_msg is handled in write_hook_for_clr_end() */
msg.undone_record_type= undo_type;
msg.previous_undo_lsn= undo_lsn;
msg.extra_msg= extra_msg;
msg.checksum_delta= 0;
if (store_checksum)
{
msg.checksum_delta= checksum;
ha_checksum_store(log_pos, checksum);
log_pos+= HA_CHECKSUM_STORE_SIZE;
}
else if (undo_type == LOGREC_UNDO_KEY_INSERT_WITH_ROOT ||
undo_type == LOGREC_UNDO_KEY_DELETE_WITH_ROOT)
{
/* Key root changed. Store new key root */
struct st_msg_to_write_hook_for_undo_key *undo_msg= extra_msg;
pgcache_page_no_t page;
key_nr_store(log_pos, undo_msg->keynr);
page= (undo_msg->value == HA_OFFSET_ERROR ? IMPOSSIBLE_PAGE_NO :
undo_msg->value / info->s->block_size);
page_store(log_pos + KEY_NR_STORE_SIZE, page);
log_pos+= KEY_NR_STORE_SIZE + PAGE_STORE_SIZE;
}
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data);
/*
We need intern_lock mutex for calling _ma_state_info_write in the trigger.
We do it here to have the same sequence of mutexes locking everywhere
(first intern_lock then transactional log buffer lock)
*/
if (undo_type == LOGREC_UNDO_BULK_INSERT)
mysql_mutex_lock(&info->s->intern_lock);
res= translog_write_record(res_lsn, LOGREC_CLR_END,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS + 0].length,
TRANSLOG_INTERNAL_PARTS + 1, log_array,
log_data + LSN_STORE_SIZE, &msg);
if (undo_type == LOGREC_UNDO_BULK_INSERT)
mysql_mutex_unlock(&info->s->intern_lock);
DBUG_RETURN(res);
} | O0 | c | ma_write_clr:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movb %cl, %al
movq 0x10(%rbp), %rcx
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movl %edx, -0x34(%rbp)
movb %al, -0x35(%rbp)
movl %r8d, -0x3c(%rbp)
movq %r9, -0x48(%rbp)
jmp 0x43fa6
movq -0x30(%rbp), %rax
sarq $0x20, %rax
movb %al, -0x20(%rbp)
movq -0x30(%rbp), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, -0x1f(%rbp)
movq -0x30(%rbp), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, -0x1e(%rbp)
jmp 0x43fcf
leaq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0xa8(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0xa8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x43ff9
movl -0x34(%rbp), %eax
movb %al, -0x17(%rbp)
leaq -0x20(%rbp), %rax
addq $0x7, %rax
addq $0x2, %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x90(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x98(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x0, -0x8c(%rbp)
cmpb $0x0, -0x35(%rbp)
je 0x44073
movl -0x3c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0x3c(%rbp), %ecx
movq -0xb0(%rbp), %rax
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x50(%rbp)
jmp 0x44139
cmpl $0x16, -0x34(%rbp)
je 0x44083
cmpl $0x18, -0x34(%rbp)
jne 0x44137
movq 0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movl 0x10(%rax), %eax
movb %al, %cl
movq -0x50(%rbp), %rax
movb %cl, (%rax)
movq -0xb8(%rbp), %rax
cmpq $-0x1, 0x8(%rax)
jne 0x440c1
movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF
movq %rax, -0xd0(%rbp)
jmp 0x440e5
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rax
movl %eax, %ecx
movq -0xc8(%rbp), %rax
movl %ecx, (%rax)
movq -0xc0(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0xc8(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x50(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x50(%rbp)
jmp 0x44139
leaq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
leaq -0x20(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x58(%rbp)
cmpl $0x27, -0x34(%rbp)
jne 0x44177
movq -0x28(%rbp), %rax
movq (%rax), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
leaq 0x10e170(%rip), %rsi # 0x1522dd
movl $0x86, %edx
callq 0x44220
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x28(%rbp), %rcx
movq -0x58(%rbp), %rax
movl %eax, %r8d
leaq -0x80(%rbp), %r11
leaq -0x20(%rbp), %r10
addq $0x7, %r10
movl $0x10, %esi
movl $0x3, %r9d
leaq -0x98(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x31e20
movb %al, -0x99(%rbp)
cmpl $0x27, -0x34(%rbp)
jne 0x441de
movq -0x28(%rbp), %rax
movq (%rax), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x44290
jmp 0x441e0
movb -0x99(%rbp), %al
movb %al, -0xd1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4420d
movb -0xd1(%rbp), %al
addq $0xf0, %rsp
popq %rbp
retq
callq 0x2a250
nopw %cs:(%rax,%rax)
| _ma_write_clr:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov al, cl
mov rcx, [rbp+arg_0]
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_34], edx
mov [rbp+var_35], al
mov [rbp+var_3C], r8d
mov [rbp+var_48], r9
jmp short $+2
loc_43FA6:
mov rax, [rbp+var_30]
sar rax, 20h
mov [rbp+var_20], al
mov rax, [rbp+var_30]
sar rax, 20h
shr eax, 8
mov [rbp+var_1F], al
mov rax, [rbp+var_30]
sar rax, 20h
shr eax, 10h
mov [rbp+var_1E], al
jmp short $+2
loc_43FCF:
lea rax, [rbp+var_20]
add rax, 3
mov [rbp+var_A8], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_A8]
mov [rax], ecx
jmp short $+2
loc_43FF9:
mov eax, [rbp+var_34]
mov [rbp+var_17], al
lea rax, [rbp+var_20]
add rax, 7
add rax, 2
add rax, 1
mov [rbp+var_50], rax
mov eax, [rbp+var_34]
mov [rbp+var_90], eax
mov rax, [rbp+var_30]
mov [rbp+var_98], rax
mov rax, [rbp+arg_0]
mov [rbp+var_88], rax
mov [rbp+var_8C], 0
cmp [rbp+var_35], 0
jz short loc_44073
mov eax, [rbp+var_3C]
mov [rbp+var_8C], eax
mov rax, [rbp+var_50]
mov [rbp+var_B0], rax
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_B0]
mov [rax], ecx
mov rax, [rbp+var_50]
add rax, 4
mov [rbp+var_50], rax
jmp loc_44139
loc_44073:
cmp [rbp+var_34], 16h
jz short loc_44083
cmp [rbp+var_34], 18h
jnz loc_44137
loc_44083:
mov rax, [rbp+arg_0]
mov [rbp+var_B8], rax
mov rax, [rbp+var_B8]
mov eax, [rax+10h]
mov cl, al
mov rax, [rbp+var_50]
mov [rax], cl
mov rax, [rbp+var_B8]
cmp qword ptr [rax+8], 0FFFFFFFFFFFFFFFFh
jnz short loc_440C1
mov rax, 0FFFFFFFFFFh
mov [rbp+var_D0], rax
jmp short loc_440E5
loc_440C1:
mov rax, [rbp+var_B8]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
mov rcx, [rcx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_D0], rax
loc_440E5:
mov rax, [rbp+var_D0]
mov [rbp+var_C0], rax
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_C8], rax
mov rax, [rbp+var_C0]
mov ecx, eax
mov rax, [rbp+var_C8]
mov [rax], ecx
mov rax, [rbp+var_C0]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_C8]
mov [rax+4], cl
mov rax, [rbp+var_50]
add rax, 6
mov [rbp+var_50], rax
loc_44137:
jmp short $+2
loc_44139:
lea rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_50]
lea rcx, [rbp+var_20]
sub rax, rcx
mov eax, eax
mov [rbp+var_58], rax
cmp [rbp+var_34], 27h ; '''
jnz short loc_44177
mov rax, [rbp+var_28]
mov rdi, [rax]
add rdi, 8F0h
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 86h
call inline_mysql_mutex_lock_4
loc_44177:
mov rdi, [rbp+var_48]
mov rax, [rbp+var_28]
mov rdx, [rax+8]
mov rcx, [rbp+var_28]
mov rax, [rbp+var_58]
mov r8d, eax
lea r11, [rbp+var_80]
lea r10, [rbp+var_20]
add r10, 7
mov esi, 10h
mov r9d, 3
lea rax, [rbp+var_98]
mov [rsp+0F0h+var_F0], r11
mov [rsp+0F0h+var_E8], r10
mov [rsp+0F0h+var_E0], rax
call translog_write_record
mov [rbp+var_99], al
cmp [rbp+var_34], 27h ; '''
jnz short loc_441DE
mov rax, [rbp+var_28]
mov rdi, [rax]
add rdi, 8F0h
call inline_mysql_mutex_unlock_4
loc_441DE:
jmp short $+2
loc_441E0:
mov al, [rbp+var_99]
mov [rbp+var_D1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4420D
mov al, [rbp+var_D1]
add rsp, 0F0h
pop rbp
retn
loc_4420D:
call ___stack_chk_fail
| char ma_write_clr(long long *a1, long long a2, int a3, char a4, int a5, long long a6, long long a7)
{
unsigned long long v8; // [rsp+20h] [rbp-D0h]
char *v9; // [rsp+28h] [rbp-C8h]
char v10; // [rsp+57h] [rbp-99h]
long long v11; // [rsp+58h] [rbp-98h] BYREF
int v12; // [rsp+60h] [rbp-90h]
int v13; // [rsp+64h] [rbp-8Ch]
long long v14; // [rsp+68h] [rbp-88h]
_QWORD v15[5]; // [rsp+70h] [rbp-80h] BYREF
long long v16; // [rsp+98h] [rbp-58h]
_DWORD *v17; // [rsp+A0h] [rbp-50h]
long long v18; // [rsp+A8h] [rbp-48h]
int v19; // [rsp+B4h] [rbp-3Ch]
char v20; // [rsp+BBh] [rbp-35h]
int v21; // [rsp+BCh] [rbp-34h]
long long v22; // [rsp+C0h] [rbp-30h]
long long *v23; // [rsp+C8h] [rbp-28h]
__int16 v24; // [rsp+D0h] [rbp-20h] BYREF
char v25; // [rsp+D2h] [rbp-1Eh]
int v26; // [rsp+D3h] [rbp-1Dh]
__int16 v27; // [rsp+D7h] [rbp-19h] BYREF
char v28; // [rsp+D9h] [rbp-17h]
_BYTE v29[22]; // [rsp+DAh] [rbp-16h] BYREF
*(_QWORD *)&v29[14] = __readfsqword(0x28u);
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4;
v19 = a5;
v18 = a6;
v24 = WORD2(a2);
v25 = BYTE6(a2);
v26 = a2;
v28 = a3;
v17 = v29;
v12 = a3;
v11 = a2;
v14 = a7;
v13 = 0;
if ( a4 )
{
v13 = v19;
*v17++ = v19;
}
else if ( v21 == 22 || v21 == 24 )
{
*(_BYTE *)v17 = *(_DWORD *)(a7 + 16);
if ( *(_QWORD *)(a7 + 8) == -1LL )
v8 = 0xFFFFFFFFFFLL;
else
v8 = *(_QWORD *)(a7 + 8) / (unsigned long long)*(unsigned int *)(*v23 + 1980);
v9 = (char *)v17 + 1;
*(_DWORD *)((char *)v17 + 1) = v8;
v9[4] = BYTE4(v8);
v17 = (_DWORD *)((char *)v17 + 6);
}
v15[4] = &v24;
v16 = (unsigned int)v17 - (unsigned int)&v24;
if ( v21 == 39 )
inline_mysql_mutex_lock_4(
*v23 + 2288,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",
134LL);
v10 = translog_write_record(v18, 0x10u, v23[1], v23, v16, 3u, v15, &v27, (long long)&v11);
if ( v21 == 39 )
inline_mysql_mutex_unlock_4(*v23 + 2288);
return v10;
}
| _ma_write_clr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV AL,CL
MOV RCX,qword ptr [RBP + 0x10]
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x34],EDX
MOV byte ptr [RBP + -0x35],AL
MOV dword ptr [RBP + -0x3c],R8D
MOV qword ptr [RBP + -0x48],R9
JMP 0x00143fa6
LAB_00143fa6:
MOV RAX,qword ptr [RBP + -0x30]
SAR RAX,0x20
MOV byte ptr [RBP + -0x20],AL
MOV RAX,qword ptr [RBP + -0x30]
SAR RAX,0x20
SHR EAX,0x8
MOV byte ptr [RBP + -0x1f],AL
MOV RAX,qword ptr [RBP + -0x30]
SAR RAX,0x20
SHR EAX,0x10
MOV byte ptr [RBP + -0x1e],AL
JMP 0x00143fcf
LAB_00143fcf:
LEA RAX,[RBP + -0x20]
ADD RAX,0x3
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV dword ptr [RAX],ECX
JMP 0x00143ff9
LAB_00143ff9:
MOV EAX,dword ptr [RBP + -0x34]
MOV byte ptr [RBP + -0x17],AL
LEA RAX,[RBP + -0x20]
ADD RAX,0x7
ADD RAX,0x2
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x90],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x88],RAX
MOV dword ptr [RBP + -0x8c],0x0
CMP byte ptr [RBP + -0x35],0x0
JZ 0x00144073
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x8c],EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0xb0],RAX
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0xb0]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x4
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00144139
LAB_00144073:
CMP dword ptr [RBP + -0x34],0x16
JZ 0x00144083
CMP dword ptr [RBP + -0x34],0x18
JNZ 0x00144137
LAB_00144083:
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV EAX,dword ptr [RAX + 0x10]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0xb8]
CMP qword ptr [RAX + 0x8],-0x1
JNZ 0x001440c1
MOV RAX,0xffffffffff
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x001440e5
LAB_001440c1:
MOV RAX,qword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xd0],RAX
LAB_001440e5:
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0xc0],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0xc8],RAX
MOV RAX,qword ptr [RBP + -0xc0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xc8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0xc0]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xc8]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x6
MOV qword ptr [RBP + -0x50],RAX
LAB_00144137:
JMP 0x00144139
LAB_00144139:
LEA RAX,[RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x50]
LEA RCX,[RBP + -0x20]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x58],RAX
CMP dword ptr [RBP + -0x34],0x27
JNZ 0x00144177
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX]
ADD RDI,0x8f0
LEA RSI,[0x2522dd]
MOV EDX,0x86
CALL 0x00144220
LAB_00144177:
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x58]
MOV R8D,EAX
LEA R11,[RBP + -0x80]
LEA R10,[RBP + -0x20]
ADD R10,0x7
MOV ESI,0x10
MOV R9D,0x3
LEA RAX,[RBP + -0x98]
MOV qword ptr [RSP],R11
MOV qword ptr [RSP + 0x8],R10
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00131e20
MOV byte ptr [RBP + -0x99],AL
CMP dword ptr [RBP + -0x34],0x27
JNZ 0x001441de
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX]
ADD RDI,0x8f0
CALL 0x00144290
LAB_001441de:
JMP 0x001441e0
LAB_001441e0:
MOV AL,byte ptr [RBP + -0x99]
MOV byte ptr [RBP + -0xd1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014420d
MOV AL,byte ptr [RBP + -0xd1]
ADD RSP,0xf0
POP RBP
RET
LAB_0014420d:
CALL 0x0012a250
|
int8
_ma_write_clr(long *param_1,int8 param_2,int param_3,char param_4,int4 param_5,
int8 param_6,long param_7)
{
int1 uVar1;
long in_FS_OFFSET;
int1 uStack_d4;
int8 local_a0;
int local_98;
int4 local_94;
long local_90;
int1 local_88 [32];
int1 *local_68;
ulong local_60;
int4 *local_58;
int8 local_50;
int4 local_44;
char local_3d;
int local_3c;
int8 local_38;
long *local_30;
int1 local_28;
int1 local_27;
int1 local_26;
int4 local_25;
int1 auStack_21 [2];
int1 local_1f;
int4 local_1e;
int1 auStack_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_28 = (int1)((ulong)param_2 >> 0x20);
local_27 = (int1)((ulong)param_2 >> 0x28);
local_26 = (int1)((ulong)param_2 >> 0x30);
local_25 = (int4)param_2;
local_1f = (int1)param_3;
local_58 = &local_1e;
local_90 = param_7;
local_94 = 0;
if (param_4 == '\0') {
if ((param_3 == 0x16) || (param_3 == 0x18)) {
local_1e = CONCAT31(local_1e._1_3_,(char)*(int4 *)(param_7 + 0x10));
if (*(long *)(param_7 + 8) == -1) {
uStack_d4 = 0xff;
}
else {
uStack_d4 = (int1)
(*(ulong *)(param_7 + 8) / (ulong)*(uint *)(*param_1 + 0x7bc) >> 0x20);
}
auStack_1a[1] = uStack_d4;
local_58 = (int4 *)(auStack_1a + 2);
}
}
else {
local_58 = (int4 *)auStack_1a;
local_94 = param_5;
local_1e = param_5;
}
local_68 = &local_28;
local_60 = (ulong)(uint)((int)local_58 - (int)&local_28);
local_a0 = param_2;
local_98 = param_3;
local_50 = param_6;
local_44 = param_5;
local_3d = param_4;
local_3c = param_3;
local_38 = param_2;
local_30 = param_1;
if (param_3 == 0x27) {
inline_mysql_mutex_lock
(*param_1 + 0x8f0,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",0x86);
}
uVar1 = translog_write_record
(local_50,0x10,local_30[1],local_30,local_60 & 0xffffffff,3,local_88,auStack_21,
&local_a0);
if (local_3c == 0x27) {
inline_mysql_mutex_unlock(*local_30 + 0x8f0);
}
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),uVar1);
}
| |
39,371 | ma_update_block_record | eloqsql/storage/maria/ma_blockrec.c | my_bool _ma_update_block_record(MARIA_HA *info, MARIA_RECORD_POS record_pos,
const uchar *orig_rec, const uchar *new_rec)
{
return _ma_update_block_record2(info, record_pos, orig_rec, new_rec,
LSN_ERROR);
} | O3 | c | ma_update_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %r8
movq %rdx, -0x58(%rbp)
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x140(%rdi), %rdx
movq (%rdi), %r15
movl 0x7bc(%r15), %r14d
movl 0xb0(%rdi), %eax
movl 0x170(%rdi), %ecx
movq %rcx, -0x68(%rbp)
movl %eax, 0x170(%rdi)
movq %r8, -0x60(%rbp)
movq %r8, %rsi
movq %rdx, -0x38(%rbp)
callq 0x4bfab
movq %r13, %r12
shrq $0x8, %r12
movq %rbx, %rdi
movl $0x1, %esi
callq 0x55649
movq 0x600(%r15), %rdi
leaq 0x470(%rbx), %rsi
movq %r15, -0x78(%rbp)
movl 0x7d4(%r15), %r9d
leaq -0xd8(%rbp), %r15
movq %r12, -0x70(%rbp)
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
pushq %r15
pushq $0x4
callq 0x3c546
addq $0x10, %rsp
movq %rax, %r12
movl $0x6, 0x8(%r15)
testq %rax, %rax
setne 0x10(%r15)
leaq 0x2e8(%rbx), %rdi
movq %r15, %rsi
callq 0x92e56
testq %r12, %r12
je 0x4cafb
leaq 0x80(%rbx), %rcx
movzwl 0xa(%r12), %esi
movl %esi, -0x2c(%rbp)
movzbl %r13b, %r13d
addq %r12, %r14
leal (,%r13,4), %eax
subq %rax, %r14
leaq -0x8(%r14), %r15
movzwl -0x6(%r14), %eax
addl %esi, %eax
cmpq %rax, 0x1d0(%rbx)
jbe 0x4cb0c
movq %rsi, -0x50(%rbp)
movq %r15, -0x80(%rbp)
movq %r12, -0x48(%rbp)
movq %rcx, %r12
movq 0xa8(%rbx), %rsi
cmpq $0x0, (%rsi)
je 0x4ca0c
movq %rbx, %rdi
callq 0x4d0f0
testb %al, %al
jne 0x4cb5a
cmpl $0x0, 0x12c(%rbx)
je 0x4ca28
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4d157
testb %al, %al
jne 0x4cb5a
movzwl -0x6(%r14), %r15d
movq -0x50(%rbp), %rax
leal (%r15,%rax), %ecx
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq %r12, %r8
callq 0x54cd8
testb %al, %al
jne 0x4cb5a
cmpl %r15d, 0x1f8(%rbx)
movq -0x50(%rbp), %rcx
ja 0x4ca69
movl %r15d, %eax
cmpq %rax, 0x1d0(%rbx)
ja 0x4ca97
movq 0x8(%rbx), %rax
movq 0x80(%rax), %r8
movq -0x78(%rbp), %rdi
movl 0x3b8(%rdi), %r9d
movq -0x48(%rbp), %rsi
movl %r13d, %edx
movl $0x1, %ecx
callq 0x4bab0
movzwl -0x6(%r14), %r15d
xorl %ecx, %ecx
leaq -0xa8(%rbp), %rax
movq -0x48(%rbp), %rdx
movq %rdx, (%rax)
movl %r13d, 0x1c(%rax)
addl %r15d, %ecx
movl %ecx, 0x20(%rax)
movq -0x80(%rbp), %rcx
movq %rcx, 0x10(%rax)
movzwl (%rcx), %ecx
addq %rcx, %rdx
movq %rdx, 0x8(%rax)
movl %r15d, 0x18(%rax)
subq $0x8, %rsp
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %r12, %r8
movl $0x1, %r9d
pushq -0x68(%rbp)
pushq $0x1
pushq %rax
callq 0x50c2e
addq $0x20, %rsp
testb %al, %al
jne 0x4cb5a
xorl %eax, %eax
jmp 0x4cb8b
callq 0xa2f56
movl (%rax), %esi
movq %rbx, %rdi
callq 0x410e8
jmp 0x4cb5a
movq %rcx, %r14
movq -0x78(%rbp), %rdi
addq $0xa10, %rdi # imm = 0xA10
callq 0x541de
movb %al, -0xab(%rbp)
movl 0x1d0(%rbx), %r8d
subq $0x8, %rsp
leaq -0x3c(%rbp), %rax
leaq -0x40(%rbp), %r10
leaq -0x2c(%rbp), %r9
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %r13d, %ecx
pushq $0x1
pushq %rax
pushq %r10
callq 0x4f01e
addq $0x20, %rsp
testb %al, %al
je 0x4cb9d
cmpl $0x0, 0x644(%rbx)
je 0x4cb70
movq %rbx, %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x55649
movq %rbx, %rdi
xorl %esi, %esi
callq 0x41174
movq 0x8(%rbx), %rax
movq $0x0, 0x90(%rax)
movb $0x1, %al
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, -0xa8(%rbp)
movl %r13d, -0x8c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x88(%rbp)
movq %r15, -0x98(%rbp)
movl -0x40(%rbp), %ecx
addq %rcx, %r12
movq %r12, -0xa0(%rbp)
movl -0x3c(%rbp), %ecx
movl %ecx, -0x90(%rbp)
leaq -0xc0(%rbp), %rcx
movq %rcx, 0x80(%rbx)
movl $0x1, %edx
movl %edx, 0x88(%rbx)
movq -0x70(%rbp), %rsi
movq %rsi, (%rcx)
movl %edx, 0x10(%rcx)
movb $0x3, 0x14(%rcx)
movl %eax, 0xc(%rcx)
movq 0xa8(%rbx), %rsi
cmpq $0x0, (%rsi)
je 0x4cc18
movq %rbx, %rdi
callq 0x4d0f0
testb %al, %al
jne 0x4cb5a
cmpl $0x0, 0x12c(%rbx)
je 0x4cc34
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4d157
testb %al, %al
jne 0x4cb5a
subq $0x8, %rsp
leaq -0xa8(%rbp), %rax
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %r14, %r8
movl $0x1, %r9d
pushq -0x68(%rbp)
pushq $0x1
pushq %rax
callq 0x50c2e
addq $0x20, %rsp
andb $-0x3, 0x624(%rbx)
jmp 0x4cb8b
| _ma_update_block_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r8, rcx
mov [rbp+var_58], rdx
mov r13, rsi
mov rbx, rdi
lea rdx, [rdi+140h]
mov r15, [rdi]
mov r14d, [r15+7BCh]
mov eax, [rdi+0B0h]
mov ecx, [rdi+170h]
mov [rbp+var_68], rcx
mov [rdi+170h], eax
mov [rbp+var_60], r8
mov rsi, r8
mov [rbp+var_38], rdx
call calc_record_size
mov r12, r13
shr r12, 8
mov rdi, rbx
mov esi, 1
call _ma_bitmap_flushable
mov rdi, [r15+600h]
lea rsi, [rbx+470h]
mov [rbp+var_78], r15
mov r9d, [r15+7D4h]
lea r15, [rbp+var_D8]
mov [rbp+var_70], r12
mov rdx, r12
xor ecx, ecx
xor r8d, r8d
push r15
push 4
call pagecache_read
add rsp, 10h
mov r12, rax
mov dword ptr [r15+8], 6
test rax, rax
setnz byte ptr [r15+10h]
lea rdi, [rbx+2E8h]
mov rsi, r15
call insert_dynamic
test r12, r12
jz loc_4CAFB
lea rcx, [rbx+80h]
movzx esi, word ptr [r12+0Ah]
mov [rbp+var_2C], esi
movzx r13d, r13b
add r14, r12
lea eax, ds:0[r13*4]
sub r14, rax
lea r15, [r14-8]
movzx eax, word ptr [r14-6]
add eax, esi
cmp [rbx+1D0h], rax
jbe loc_4CB0C
mov [rbp+var_50], rsi
mov [rbp+var_80], r15
mov [rbp+var_48], r12
mov r12, rcx
mov rsi, [rbx+0A8h]
cmp qword ptr [rsi], 0
jz short loc_4CA0C
mov rdi, rbx
call delete_tails
test al, al
jnz loc_4CB5A
loc_4CA0C:
cmp dword ptr [rbx+12Ch], 0
jz short loc_4CA28
mov rdi, rbx
mov rsi, r12
call free_full_pages
test al, al
jnz loc_4CB5A
loc_4CA28:
movzx r15d, word ptr [r14-6]
mov rax, [rbp+var_50]
lea ecx, [r15+rax]
mov rdi, rbx
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_70]
mov r8, r12
call _ma_bitmap_find_new_place
test al, al
jnz loc_4CB5A
cmp [rbx+1F8h], r15d
mov rcx, [rbp+var_50]
ja short loc_4CA69
mov eax, r15d
cmp [rbx+1D0h], rax
ja short loc_4CA97
loc_4CA69:
mov rax, [rbx+8]
mov r8, [rax+80h]
mov rdi, [rbp+var_78]
mov r9d, [rdi+3B8h]
mov rsi, [rbp+var_48]
mov edx, r13d
mov ecx, 1
call _ma_compact_block_page
movzx r15d, word ptr [r14-6]
xor ecx, ecx
loc_4CA97:
lea rax, [rbp+var_A8]
mov rdx, [rbp+var_48]
mov [rax], rdx
mov [rax+1Ch], r13d
add ecx, r15d
mov [rax+20h], ecx
mov rcx, [rbp+var_80]
mov [rax+10h], rcx
movzx ecx, word ptr [rcx]
add rdx, rcx
mov [rax+8], rdx
mov [rax+18h], r15d
sub rsp, 8
mov rdi, rbx
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_60]
mov rcx, [rbp+var_38]
mov r8, r12
mov r9d, 1
push [rbp+var_68]
push 1
push rax
call write_block_record
add rsp, 20h
test al, al
jnz short loc_4CB5A
xor eax, eax
jmp loc_4CB8B
loc_4CAFB:
call _my_thread_var
mov esi, [rax]
mov rdi, rbx
call _ma_set_fatal_error
jmp short loc_4CB5A
loc_4CB0C:
mov r14, rcx
mov rdi, [rbp+var_78]
add rdi, 0A10h
call _ma_free_size_to_head_pattern
mov [rbp+var_AB], al
mov r8d, [rbx+1D0h]
sub rsp, 8
lea rax, [rbp+var_3C]
lea r10, [rbp+var_40]
lea r9, [rbp+var_2C]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov ecx, r13d
push 1
push rax
push r10
call extend_area_on_page
add rsp, 20h
test al, al
jz short loc_4CB9D
loc_4CB5A:
cmp dword ptr [rbx+644h], 0
jz short loc_4CB70
mov rdi, rbx
mov esi, 0FFFFFFFFh
call _ma_bitmap_flushable
loc_4CB70:
mov rdi, rbx
xor esi, esi
call _ma_unpin_all_pages
mov rax, [rbx+8]
mov qword ptr [rax+90h], 0
mov al, 1
loc_4CB8B:
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4CB9D:
mov [rbp+var_A8], r12
mov [rbp+var_8C], r13d
mov eax, [rbp+var_2C]
mov [rbp+var_88], eax
mov [rbp+var_98], r15
mov ecx, [rbp+var_40]
add r12, rcx
mov [rbp+var_A0], r12
mov ecx, [rbp+var_3C]
mov [rbp+var_90], ecx
lea rcx, [rbp+var_C0]
mov [rbx+80h], rcx
mov edx, 1
mov [rbx+88h], edx
mov rsi, [rbp+var_70]
mov [rcx], rsi
mov [rcx+10h], edx
mov byte ptr [rcx+14h], 3
mov [rcx+0Ch], eax
mov rsi, [rbx+0A8h]
cmp qword ptr [rsi], 0
jz short loc_4CC18
mov rdi, rbx
call delete_tails
test al, al
jnz loc_4CB5A
loc_4CC18:
cmp dword ptr [rbx+12Ch], 0
jz short loc_4CC34
mov rdi, rbx
mov rsi, r14
call free_full_pages
test al, al
jnz loc_4CB5A
loc_4CC34:
sub rsp, 8
lea rax, [rbp+var_A8]
mov rdi, rbx
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_60]
mov rcx, [rbp+var_38]
mov r8, r14
mov r9d, 1
push [rbp+var_68]
push 1
push rax
call write_block_record
add rsp, 20h
and byte ptr [rbx+624h], 0FDh
jmp loc_4CB8B
| char ma_update_block_record(long long *a1, unsigned long long a2, long long a3, long long a4)
{
unsigned __int8 v4; // r13
long long v6; // r15
long long v7; // r14
int v8; // eax
long long v9; // rdi
int v10; // r9d
long long v11; // r12
long long v12; // rsi
long long v13; // r14
unsigned __int16 *v14; // r15
_DWORD *v15; // r12
unsigned int v16; // r15d
int v17; // ecx
char result; // al
int *v19; // rax
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
int v23; // r9d
_DWORD *v24; // r14
int v25; // eax
long long v26; // [rsp+8h] [rbp-D8h] BYREF
int v27; // [rsp+10h] [rbp-D0h]
bool v28; // [rsp+18h] [rbp-C8h]
unsigned long long v29; // [rsp+20h] [rbp-C0h] BYREF
int v30; // [rsp+2Ch] [rbp-B4h]
int v31; // [rsp+30h] [rbp-B0h]
char v32; // [rsp+34h] [rbp-ACh]
char v33; // [rsp+35h] [rbp-ABh]
long long v34; // [rsp+38h] [rbp-A8h] BYREF
long long v35; // [rsp+40h] [rbp-A0h]
unsigned __int16 *v36; // [rsp+48h] [rbp-98h]
unsigned int v37; // [rsp+50h] [rbp-90h]
int v38; // [rsp+54h] [rbp-8Ch]
int v39; // [rsp+58h] [rbp-88h]
unsigned __int16 *v40; // [rsp+60h] [rbp-80h]
long long v41; // [rsp+68h] [rbp-78h]
unsigned long long v42; // [rsp+70h] [rbp-70h]
long long v43; // [rsp+78h] [rbp-68h]
long long v44; // [rsp+80h] [rbp-60h]
long long v45; // [rsp+88h] [rbp-58h]
long long v46; // [rsp+90h] [rbp-50h]
long long v47; // [rsp+98h] [rbp-48h]
unsigned int v48; // [rsp+A0h] [rbp-40h] BYREF
unsigned int v49; // [rsp+A4h] [rbp-3Ch] BYREF
_DWORD *v50; // [rsp+A8h] [rbp-38h]
int v51; // [rsp+B4h] [rbp-2Ch] BYREF
v45 = a3;
v4 = a2;
v6 = *a1;
v7 = *(unsigned int *)(*a1 + 1980);
v8 = *((_DWORD *)a1 + 44);
v43 = *((unsigned int *)a1 + 92);
*((_DWORD *)a1 + 92) = v8;
v44 = a4;
v50 = a1 + 40;
calc_record_size(a1, a4, (long long)(a1 + 40));
ma_bitmap_flushable(a1, 1LL);
v9 = *(_QWORD *)(v6 + 1536);
v41 = v6;
v10 = *(_DWORD *)(v6 + 2004);
v42 = a2 >> 8;
v11 = pagecache_read(v9, (long long)(a1 + 142), a2 >> 8, 0, 0LL, v10, 4u, &v26);
v27 = 6;
v28 = v11 != 0;
insert_dynamic(a1 + 93, &v26);
if ( v11 )
{
v12 = *(unsigned __int16 *)(v11 + 10);
v51 = v12;
v13 = v11 + v7 - 4 * (unsigned int)v4;
v14 = (unsigned __int16 *)(v13 - 8);
if ( a1[58] <= (unsigned long long)((unsigned int)v12 + *(unsigned __int16 *)(v13 - 6)) )
{
v24 = a1 + 16;
v33 = ma_free_size_to_head_pattern(v41 + 2576);
if ( !(unsigned __int8)extend_area_on_page(
(_DWORD)a1,
v11,
(_DWORD)v14,
v4,
*((_DWORD *)a1 + 116),
(unsigned int)&v51,
(long long)&v48,
(long long)&v49,
1) )
{
v34 = v11;
v38 = v4;
v25 = v51;
v39 = v51;
v36 = v14;
v35 = v48 + v11;
v37 = v49;
a1[16] = (long long)&v29;
*((_DWORD *)a1 + 34) = 1;
v29 = v42;
v31 = 1;
v32 = 3;
v30 = v25;
if ( (!*(_QWORD *)a1[21] || !(unsigned __int8)delete_tails(a1))
&& (!*((_DWORD *)a1 + 75) || !(unsigned __int8)free_full_pages(a1, v24)) )
{
result = write_block_record((_DWORD)a1, v45, v44, (_DWORD)v50, (_DWORD)v24, 1, (long long)&v34, 1LL, v43);
*((_BYTE *)a1 + 1572) &= ~2u;
return result;
}
}
}
else
{
v46 = v12;
v40 = (unsigned __int16 *)(v13 - 8);
v47 = v11;
v15 = a1 + 16;
if ( (!*(_QWORD *)a1[21] || !(unsigned __int8)delete_tails(a1))
&& (!*((_DWORD *)a1 + 75) || !(unsigned __int8)free_full_pages(a1, v15)) )
{
v16 = *(unsigned __int16 *)(v13 - 6);
if ( !(unsigned __int8)ma_bitmap_find_new_place(a1, v50, v42, v16 + (unsigned int)v46, v15) )
{
v17 = v46;
if ( *((_DWORD *)a1 + 126) > v16 || a1[58] <= (unsigned long long)v16 )
{
ma_compact_block_page(v41, v47, v4, 1, *(_QWORD *)(a1[1] + 128), *(_DWORD *)(v41 + 952));
v16 = *(unsigned __int16 *)(v13 - 6);
v17 = 0;
}
v34 = v47;
v38 = v4;
v39 = v16 + v17;
v36 = v40;
v35 = *v40 + v47;
v37 = v16;
if ( !(unsigned __int8)write_block_record(
(_DWORD)a1,
v45,
v44,
(_DWORD)v50,
(_DWORD)v15,
1,
(long long)&v34,
1LL,
v43) )
return 0;
}
}
}
}
else
{
v19 = (int *)my_thread_var(a1 + 93);
ma_set_fatal_error(a1, *v19, v20, v21, v22, v23);
}
if ( *((_DWORD *)a1 + 401) )
ma_bitmap_flushable(a1, 0xFFFFFFFFLL);
ma_unpin_all_pages((long long)a1, 0LL);
*(_QWORD *)(a1[1] + 144) = 0LL;
return 1;
}
| _ma_update_block_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R8,RCX
MOV qword ptr [RBP + -0x58],RDX
MOV R13,RSI
MOV RBX,RDI
LEA RDX,[RDI + 0x140]
MOV R15,qword ptr [RDI]
MOV R14D,dword ptr [R15 + 0x7bc]
MOV EAX,dword ptr [RDI + 0xb0]
MOV ECX,dword ptr [RDI + 0x170]
MOV qword ptr [RBP + -0x68],RCX
MOV dword ptr [RDI + 0x170],EAX
MOV qword ptr [RBP + -0x60],R8
MOV RSI,R8
MOV qword ptr [RBP + -0x38],RDX
CALL 0x0014bfab
MOV R12,R13
SHR R12,0x8
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00155649
MOV RDI,qword ptr [R15 + 0x600]
LEA RSI,[RBX + 0x470]
MOV qword ptr [RBP + -0x78],R15
MOV R9D,dword ptr [R15 + 0x7d4]
LEA R15,[RBP + -0xd8]
MOV qword ptr [RBP + -0x70],R12
MOV RDX,R12
XOR ECX,ECX
XOR R8D,R8D
PUSH R15
PUSH 0x4
CALL 0x0013c546
ADD RSP,0x10
MOV R12,RAX
MOV dword ptr [R15 + 0x8],0x6
TEST RAX,RAX
SETNZ byte ptr [R15 + 0x10]
LEA RDI,[RBX + 0x2e8]
MOV RSI,R15
CALL 0x00192e56
TEST R12,R12
JZ 0x0014cafb
LEA RCX,[RBX + 0x80]
MOVZX ESI,word ptr [R12 + 0xa]
MOV dword ptr [RBP + -0x2c],ESI
MOVZX R13D,R13B
ADD R14,R12
LEA EAX,[R13*0x4]
SUB R14,RAX
LEA R15,[R14 + -0x8]
MOVZX EAX,word ptr [R14 + -0x6]
ADD EAX,ESI
CMP qword ptr [RBX + 0x1d0],RAX
JBE 0x0014cb0c
MOV qword ptr [RBP + -0x50],RSI
MOV qword ptr [RBP + -0x80],R15
MOV qword ptr [RBP + -0x48],R12
MOV R12,RCX
MOV RSI,qword ptr [RBX + 0xa8]
CMP qword ptr [RSI],0x0
JZ 0x0014ca0c
MOV RDI,RBX
CALL 0x0014d0f0
TEST AL,AL
JNZ 0x0014cb5a
LAB_0014ca0c:
CMP dword ptr [RBX + 0x12c],0x0
JZ 0x0014ca28
MOV RDI,RBX
MOV RSI,R12
CALL 0x0014d157
TEST AL,AL
JNZ 0x0014cb5a
LAB_0014ca28:
MOVZX R15D,word ptr [R14 + -0x6]
MOV RAX,qword ptr [RBP + -0x50]
LEA ECX,[R15 + RAX*0x1]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x70]
MOV R8,R12
CALL 0x00154cd8
TEST AL,AL
JNZ 0x0014cb5a
CMP dword ptr [RBX + 0x1f8],R15D
MOV RCX,qword ptr [RBP + -0x50]
JA 0x0014ca69
MOV EAX,R15D
CMP qword ptr [RBX + 0x1d0],RAX
JA 0x0014ca97
LAB_0014ca69:
MOV RAX,qword ptr [RBX + 0x8]
MOV R8,qword ptr [RAX + 0x80]
MOV RDI,qword ptr [RBP + -0x78]
MOV R9D,dword ptr [RDI + 0x3b8]
MOV RSI,qword ptr [RBP + -0x48]
MOV EDX,R13D
MOV ECX,0x1
CALL 0x0014bab0
MOVZX R15D,word ptr [R14 + -0x6]
XOR ECX,ECX
LAB_0014ca97:
LEA RAX,[RBP + -0xa8]
MOV RDX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX],RDX
MOV dword ptr [RAX + 0x1c],R13D
ADD ECX,R15D
MOV dword ptr [RAX + 0x20],ECX
MOV RCX,qword ptr [RBP + -0x80]
MOV qword ptr [RAX + 0x10],RCX
MOVZX ECX,word ptr [RCX]
ADD RDX,RCX
MOV qword ptr [RAX + 0x8],RDX
MOV dword ptr [RAX + 0x18],R15D
SUB RSP,0x8
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,R12
MOV R9D,0x1
PUSH qword ptr [RBP + -0x68]
PUSH 0x1
PUSH RAX
CALL 0x00150c2e
ADD RSP,0x20
TEST AL,AL
JNZ 0x0014cb5a
XOR EAX,EAX
JMP 0x0014cb8b
LAB_0014cafb:
CALL 0x001a2f56
MOV ESI,dword ptr [RAX]
MOV RDI,RBX
CALL 0x001410e8
JMP 0x0014cb5a
LAB_0014cb0c:
MOV R14,RCX
MOV RDI,qword ptr [RBP + -0x78]
ADD RDI,0xa10
CALL 0x001541de
MOV byte ptr [RBP + -0xab],AL
MOV R8D,dword ptr [RBX + 0x1d0]
SUB RSP,0x8
LEA RAX,[RBP + -0x3c]
LEA R10,[RBP + -0x40]
LEA R9,[RBP + -0x2c]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV ECX,R13D
PUSH 0x1
PUSH RAX
PUSH R10
CALL 0x0014f01e
ADD RSP,0x20
TEST AL,AL
JZ 0x0014cb9d
LAB_0014cb5a:
CMP dword ptr [RBX + 0x644],0x0
JZ 0x0014cb70
MOV RDI,RBX
MOV ESI,0xffffffff
CALL 0x00155649
LAB_0014cb70:
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00141174
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RAX + 0x90],0x0
MOV AL,0x1
LAB_0014cb8b:
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014cb9d:
MOV qword ptr [RBP + -0xa8],R12
MOV dword ptr [RBP + -0x8c],R13D
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x88],EAX
MOV qword ptr [RBP + -0x98],R15
MOV ECX,dword ptr [RBP + -0x40]
ADD R12,RCX
MOV qword ptr [RBP + -0xa0],R12
MOV ECX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x90],ECX
LEA RCX,[RBP + -0xc0]
MOV qword ptr [RBX + 0x80],RCX
MOV EDX,0x1
MOV dword ptr [RBX + 0x88],EDX
MOV RSI,qword ptr [RBP + -0x70]
MOV qword ptr [RCX],RSI
MOV dword ptr [RCX + 0x10],EDX
MOV byte ptr [RCX + 0x14],0x3
MOV dword ptr [RCX + 0xc],EAX
MOV RSI,qword ptr [RBX + 0xa8]
CMP qword ptr [RSI],0x0
JZ 0x0014cc18
MOV RDI,RBX
CALL 0x0014d0f0
TEST AL,AL
JNZ 0x0014cb5a
LAB_0014cc18:
CMP dword ptr [RBX + 0x12c],0x0
JZ 0x0014cc34
MOV RDI,RBX
MOV RSI,R14
CALL 0x0014d157
TEST AL,AL
JNZ 0x0014cb5a
LAB_0014cc34:
SUB RSP,0x8
LEA RAX,[RBP + -0xa8]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,R14
MOV R9D,0x1
PUSH qword ptr [RBP + -0x68]
PUSH 0x1
PUSH RAX
CALL 0x00150c2e
ADD RSP,0x20
AND byte ptr [RBX + 0x624],0xfd
JMP 0x0014cb8b
|
int8
_ma_update_block_record(long *param_1,ulong param_2,int8 param_3,int8 param_4)
{
ushort *puVar1;
long *plVar2;
ushort uVar3;
uint uVar4;
int iVar5;
char cVar6;
long lVar7;
int4 *puVar8;
int8 uVar9;
int iVar10;
long lVar11;
int1 local_e0 [8];
int4 local_d8;
int1 local_d0;
ulong local_c8;
uint local_bc;
int4 local_b8;
int1 local_b4;
int1 local_b3;
long local_b0;
long local_a8;
ushort *local_a0;
uint local_98;
int local_94;
uint local_90;
ushort *local_88;
long local_80;
ulong local_78;
ulong local_70;
int8 local_68;
int8 local_60;
ulong local_58;
long local_50;
uint local_48;
uint local_44;
long *local_40;
uint local_34;
local_40 = param_1 + 0x28;
lVar7 = *param_1;
uVar4 = *(uint *)(lVar7 + 0x7bc);
local_70 = (ulong)*(uint *)(param_1 + 0x2e);
*(int *)(param_1 + 0x2e) = (int)param_1[0x16];
local_68 = param_4;
local_60 = param_3;
calc_record_size(param_1,param_4);
_ma_bitmap_flushable(param_1,1);
local_80 = lVar7;
local_78 = param_2 >> 8;
lVar7 = pagecache_read(*(int8 *)(lVar7 + 0x600),param_1 + 0x8e,param_2 >> 8,0,0,
*(int4 *)(lVar7 + 0x7d4),4,local_e0);
local_d8 = 6;
local_d0 = lVar7 != 0;
insert_dynamic(param_1 + 0x5d,local_e0);
if (lVar7 == 0) {
puVar8 = (int4 *)_my_thread_var();
_ma_set_fatal_error(param_1,*puVar8);
}
else {
plVar2 = param_1 + 0x10;
uVar3 = *(ushort *)(lVar7 + 10);
local_34 = (uint)uVar3;
param_2 = param_2 & 0xff;
iVar5 = (int)param_2;
lVar11 = ((ulong)uVar4 + lVar7) - (ulong)(uint)(iVar5 * 4);
puVar1 = (ushort *)(lVar11 + -8);
if ((ulong)(*(ushort *)(lVar11 + -6) + local_34) < (ulong)param_1[0x3a]) {
local_88 = puVar1;
local_58 = (ulong)uVar3;
local_50 = lVar7;
if (((*(long *)param_1[0x15] == 0) || (cVar6 = delete_tails(param_1), cVar6 == '\0')) &&
((*(int *)((long)param_1 + 300) == 0 ||
(cVar6 = free_full_pages(param_1,plVar2), cVar6 == '\0')))) {
uVar3 = *(ushort *)(lVar11 + -6);
cVar6 = _ma_bitmap_find_new_place
(param_1,local_40,local_78,(uint)uVar3 + (int)local_58,plVar2);
if (cVar6 == '\0') {
iVar10 = (int)local_58;
if (((uint)uVar3 < *(uint *)(param_1 + 0x3f)) || ((ulong)param_1[0x3a] <= (ulong)uVar3)) {
_ma_compact_block_page
(local_80,local_50,param_2,1,*(int8 *)(param_1[1] + 0x80),
*(int4 *)(local_80 + 0x3b8));
uVar3 = *(ushort *)(lVar11 + -6);
iVar10 = 0;
}
local_98 = (uint)uVar3;
local_b0 = local_50;
local_90 = iVar10 + local_98;
local_a0 = local_88;
local_a8 = local_50 + (ulong)*local_88;
local_94 = iVar5;
cVar6 = write_block_record(param_1,local_60,local_68,local_40,plVar2,1,&local_b0,1,
local_70);
if (cVar6 == '\0') {
return 0;
}
}
}
}
else {
local_b3 = _ma_free_size_to_head_pattern(local_80 + 0xa10);
cVar6 = extend_area_on_page(param_1,lVar7,puVar1,param_2,(int)param_1[0x3a],&local_34,
&local_48,&local_44,1);
if (cVar6 == '\0') {
local_90 = local_34;
local_a8 = lVar7 + (ulong)local_48;
local_98 = local_44;
param_1[0x10] = (long)&local_c8;
*(int4 *)(param_1 + 0x11) = 1;
local_c8 = local_78;
local_b8 = 1;
local_b4 = 3;
local_bc = local_34;
local_b0 = lVar7;
local_a0 = puVar1;
local_94 = iVar5;
if (((*(long *)param_1[0x15] == 0) || (cVar6 = delete_tails(param_1), cVar6 == '\0')) &&
((*(int *)((long)param_1 + 300) == 0 ||
(cVar6 = free_full_pages(param_1,plVar2), cVar6 == '\0')))) {
uVar9 = write_block_record(param_1,local_60,local_68,local_40,plVar2,1,&local_b0,1,
local_70);
*(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) & 0xfd;
return uVar9;
}
}
}
}
if (*(int *)((long)param_1 + 0x644) != 0) {
_ma_bitmap_flushable(param_1,0xffffffff);
}
_ma_unpin_all_pages(param_1,0);
lVar7 = param_1[1];
*(int8 *)(lVar7 + 0x90) = 0;
return CONCAT71((int7)((ulong)lVar7 >> 8),1);
}
| |
39,372 | JS_NewCModule | bluesky950520[P]quickjs/quickjs.c | JSModuleDef *JS_NewCModule(JSContext *ctx, const char *name_str,
JSModuleInitFunc *func)
{
JSModuleDef *m;
JSAtom name;
name = JS_NewAtom(ctx, name_str);
if (name == JS_ATOM_NULL)
return NULL;
m = js_new_module_def(ctx, name);
m->init_func = func;
return m;
} | O1 | c | JS_NewCModule:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0xe240
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1fdc0
testl %eax, %eax
jne 0x30883
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movl %eax, %esi
callq 0xff78
movq %rbx, 0x78(%rax)
jmp 0x3087d
| JS_NewCModule:
push r15
push r14
push rbx
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov rdi, rsi
call _strlen
mov rdi, r14
mov rsi, r15
mov rdx, rax
call JS_NewAtomLen
test eax, eax
jnz short loc_30883
xor eax, eax
loc_3087D:
pop rbx
pop r14
pop r15
retn
loc_30883:
mov rdi, r14
mov esi, eax
call js_new_module_def
mov [rax+78h], rbx
jmp short loc_3087D
| long long JS_NewCModule(long long a1, unsigned __int8 *a2, long long a3)
{
long long v4; // rax
unsigned int v5; // eax
long long result; // rax
v4 = strlen(a2);
v5 = JS_NewAtomLen(a1, a2, v4);
if ( !v5 )
return 0LL;
result = js_new_module_def(a1, v5);
*(_QWORD *)(result + 120) = a3;
return result;
}
| |||
39,373 | JS_NewCModule | bluesky950520[P]quickjs/quickjs.c | JSModuleDef *JS_NewCModule(JSContext *ctx, const char *name_str,
JSModuleInitFunc *func)
{
JSModuleDef *m;
JSAtom name;
name = JS_NewAtom(ctx, name_str);
if (name == JS_ATOM_NULL)
return NULL;
m = js_new_module_def(ctx, name);
m->init_func = func;
return m;
} | O2 | c | JS_NewCModule:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
callq 0x1a471
testl %eax, %eax
je 0x28e6e
movq %r14, %rdi
movl %eax, %esi
callq 0x28e78
movq %rbx, 0x78(%rax)
jmp 0x28e70
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| JS_NewCModule:
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rdi
call JS_NewAtom
test eax, eax
jz short loc_28E6E
mov rdi, r14
mov esi, eax
call js_new_module_def
mov [rax+78h], rbx
jmp short loc_28E70
loc_28E6E:
xor eax, eax
loc_28E70:
add rsp, 8
pop rbx
pop r14
retn
| long long JS_NewCModule(long long a1, unsigned __int8 *a2, long long a3)
{
unsigned int v4; // eax
long long result; // rax
v4 = JS_NewAtom(a1, a2);
if ( !v4 )
return 0LL;
result = js_new_module_def(a1, v4);
*(_QWORD *)(result + 120) = a3;
return result;
}
| JS_NewCModule:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RDI
CALL 0x0011a471
TEST EAX,EAX
JZ 0x00128e6e
MOV RDI,R14
MOV ESI,EAX
CALL 0x00128e78
MOV qword ptr [RAX + 0x78],RBX
JMP 0x00128e70
LAB_00128e6e:
XOR EAX,EAX
LAB_00128e70:
ADD RSP,0x8
POP RBX
POP R14
RET
|
long JS_NewCModule(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
long lVar2;
iVar1 = JS_NewAtom();
if (iVar1 == 0) {
lVar2 = 0;
}
else {
lVar2 = js_new_module_def(param_1,iVar1);
*(int8 *)(lVar2 + 0x78) = param_3;
}
return lVar2;
}
| |
39,374 | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::~serializer() | monkey531[P]llama/common/json.hpp | ~serializer() = default; | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::~serializer():
pushq %rbx
movq %rdi, %rbx
movq 0x260(%rdi), %rdi
leaq 0x270(%rbx), %rax
cmpq %rax, %rdi
je 0x7acfe
movq (%rax), %rsi
incq %rsi
callq 0x186a0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x7ad0d
popq %rbx
jmp 0x2fb64
popq %rbx
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+260h]; void *
lea rax, [rbx+270h]
cmp rdi, rax
jz short loc_7ACFE
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7ACFE:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_7AD0D
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7AD0D:
pop rbx
retn
| void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::~serializer(
_QWORD *a1)
{
_QWORD *v2; // rdi
volatile signed __int32 *v3; // rdi
v2 = (_QWORD *)a1[76];
if ( v2 != a1 + 78 )
operator delete(v2, a1[78] + 1LL);
v3 = (volatile signed __int32 *)a1[1];
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
| ~serializer:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x260]
LEA RAX,[RBX + 0x270]
CMP RDI,RAX
JZ 0x0017acfe
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x001186a0
LAB_0017acfe:
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x0017ad0d
POP RBX
JMP 0x0012fb64
LAB_0017ad0d:
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<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> >::~serializer() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<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>>
::~serializer(serializer<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>>
*this)
{
if (*(serializer<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>>
**)(this + 0x260) != this + 0x270) {
operator_delete(*(serializer<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>>
**)(this + 0x260),*(long *)(this + 0x270) + 1);
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8));
return;
}
return;
}
| |
39,375 | client_game::init_late() | untodesu[P]voxelius/game/client/game.cc | void client_game::init_late(void)
{
toggles::init_late();
if(globals::sound_ctx) {
sound::init_late();
}
language::init_late();
settings::init_late();
client_chat::init_late();
status_lines::init_late();
game_voxels::populate();
game_items::populate();
std::size_t max_texture_count = 0;
// Figure out the total texture count
// NOTE: this is very debug, early and a quite
// conservative limit choice; there must be a better
// way to make this limit way smaller than it currently is
for(const std::shared_ptr<VoxelInfo> &info : voxel_registry::voxels) {
for(const VoxelTexture &vtex : info->textures) {
max_texture_count += vtex.paths.size();
}
}
// UNDONE: asset packs for non-16x16 stuff
voxel_atlas::create(16, 16, max_texture_count);
for(std::shared_ptr<VoxelInfo> &info : voxel_registry::voxels) {
for(VoxelTexture &vtex : info->textures) {
if(auto strip = voxel_atlas::find_or_load(vtex.paths)) {
vtex.cached_offset = strip->offset;
vtex.cached_plane = strip->plane;
continue;
}
spdlog::critical("client_gl: {}: failed to load atlas strips", info->name);
std::terminate();
}
}
voxel_atlas::generate_mipmaps();
for(std::shared_ptr<ItemInfo> &info : item_registry::items) {
info->cached_texture = resource::load<TextureGUI>(info->texture.c_str(), TEXTURE_GUI_LOAD_CLAMP_S | TEXTURE_GUI_LOAD_CLAMP_T);
}
experiments::init_late();
client_splash::init_late();
window_title::update();
} | O0 | cpp | client_game::init_late():
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
callq 0x1387a0
leaq 0x4673e9(%rip), %rax # 0x50e280
cmpq $0x0, (%rax)
je 0xa6ea2
callq 0x133370
callq 0xd7770
callq 0x127a90
callq 0x58120
callq 0x135460
callq 0x14ea30
callq 0x14e7e0
movq $0x0, -0x20(%rbp)
leaq 0x46a7c9(%rip), %rax # 0x511698
movq %rax, -0x28(%rbp)
leaq 0x46a7be(%rip), %rdi # 0x511698
callq 0xa8cd0
movq %rax, -0x30(%rbp)
leaq 0x46a7ae(%rip), %rdi # 0x511698
callq 0xa8d00
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa8d30
testb $0x1, %al
jne 0xa6f09
jmp 0xa6f8d
leaq -0x30(%rbp), %rdi
callq 0xa8d70
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xa8d90
addq $0x28, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0xa8db0
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0xa8de0
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xa8e10
testb $0x1, %al
jne 0xa6f54
jmp 0xa6f7d
leaq -0x50(%rbp), %rdi
callq 0xa8e50
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x63d70
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xa8e70
jmp 0xa6f41
jmp 0xa6f7f
leaq -0x30(%rbp), %rdi
callq 0xa8e90
jmp 0xa6ef3
movq -0x20(%rbp), %rdx
movl $0x10, %esi
movl %esi, %edi
callq 0x1391d0
leaq 0x46a6f4(%rip), %rax # 0x511698
movq %rax, -0x68(%rbp)
leaq 0x46a6e9(%rip), %rdi # 0x511698
callq 0xa8cd0
movq %rax, -0x70(%rbp)
leaq 0x46a6d9(%rip), %rdi # 0x511698
callq 0xa8d00
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xa8d30
testb $0x1, %al
jne 0xa6fde
jmp 0xa710e
leaq -0x70(%rbp), %rdi
callq 0xa8d70
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
callq 0xa8d90
addq $0x28, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0xa8db0
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
callq 0xa8de0
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0xa8e10
testb $0x1, %al
jne 0xa7041
jmp 0xa70fe
leaq -0x90(%rbp), %rdi
callq 0xa8e50
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
callq 0x1397e0
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0xa709e
movq -0xa8(%rbp), %rax
movq (%rax), %rcx
movq -0xa0(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0xa0(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0xa70ed
leaq -0xb8(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x2c8bda(%rip), %rax # 0x36fc8a
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x317c0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x80(%rbp), %rdi
callq 0xa8d90
movq %rax, %rdx
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
callq 0xa8eb0
callq 0x2d420
leaq -0x90(%rbp), %rdi
callq 0xa8e70
jmp 0xa7025
jmp 0xa7100
leaq -0x70(%rbp), %rdi
callq 0xa8e90
jmp 0xa6fc8
callq 0x139750
leaq 0x469a3e(%rip), %rax # 0x510b58
movq %rax, -0xc0(%rbp)
leaq 0x469a30(%rip), %rdi # 0x510b58
callq 0xa8f00
movq %rax, -0xc8(%rbp)
leaq 0x469a1d(%rip), %rdi # 0x510b58
callq 0xa8f30
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xa8f60
testb $0x1, %al
jne 0xa7160
jmp 0xa71db
leaq -0xc8(%rbp), %rdi
callq 0xa8fa0
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
callq 0xa8fc0
movq %rax, %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rsi
leaq -0xe8(%rbp), %rdi
movl $0x3, %edx
callq 0x1359d0
movq -0xd8(%rbp), %rdi
callq 0xa8fc0
movq %rax, %rdi
addq $0x48, %rdi
leaq -0xe8(%rbp), %rsi
callq 0x31110
leaq -0xe8(%rbp), %rdi
callq 0x310f0
leaq -0xc8(%rbp), %rdi
callq 0xa8fe0
jmp 0xa7147
callq 0x8c8d0
callq 0x1341c0
callq 0x13f910
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN11client_game9init_lateEv:
push rbp
mov rbp, rsp
sub rsp, 0F0h
call _ZN7toggles9init_lateEv; toggles::init_late(void)
lea rax, _ZN7globals9sound_ctxE; globals::sound_ctx
cmp qword ptr [rax], 0
jz short loc_A6EA2
call _ZN5sound9init_lateEv; sound::init_late(void)
loc_A6EA2:
call _ZN8language9init_lateEv; language::init_late(void)
call _ZN8settings9init_lateEv; settings::init_late(void)
call _ZN11client_chat9init_lateEv; client_chat::init_late(void)
call _ZN12status_lines9init_lateEv; status_lines::init_late(void)
call _ZN11game_voxels8populateEv; game_voxels::populate(void)
call _ZN10game_items8populateEv; game_items::populate(void)
mov qword ptr [rbp+var_20], 0
lea rax, _ZN14voxel_registry6voxelsE; voxel_registry::voxels
mov [rbp+var_28], rax
lea rdi, _ZN14voxel_registry6voxelsE; voxel_registry::voxels
call _ZNSt6vectorISt10shared_ptrI9VoxelInfoESaIS2_EE5beginEv; std::vector<std::shared_ptr<VoxelInfo>>::begin(void)
mov [rbp+var_30], rax
lea rdi, _ZN14voxel_registry6voxelsE; voxel_registry::voxels
call _ZNSt6vectorISt10shared_ptrI9VoxelInfoESaIS2_EE3endEv; std::vector<std::shared_ptr<VoxelInfo>>::end(void)
mov [rbp+var_38], rax
loc_A6EF3:
lea rdi, [rbp+var_30]
lea rsi, [rbp+var_38]
call _ZN9__gnu_cxxneIPSt10shared_ptrI9VoxelInfoESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>> const&)
test al, 1
jnz short loc_A6F09
jmp loc_A6F8D
loc_A6F09:
lea rdi, [rbp+var_30]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI9VoxelInfoESt6vectorIS3_SaIS3_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>>::operator*(void)
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
call _ZNKSt19__shared_ptr_accessI9VoxelInfoLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
add rax, 28h ; '('
mov [rbp+var_48], rax
mov rdi, [rbp+var_48]
call _ZNSt6vectorI12VoxelTextureSaIS0_EE5beginEv; std::vector<VoxelTexture>::begin(void)
mov [rbp+var_50], rax
mov rdi, [rbp+var_48]
call _ZNSt6vectorI12VoxelTextureSaIS0_EE3endEv; std::vector<VoxelTexture>::end(void)
mov [rbp+var_58], rax
loc_A6F41:
lea rdi, [rbp+var_50]
lea rsi, [rbp+var_58]
call _ZN9__gnu_cxxneIP12VoxelTextureSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<VoxelTexture *,std::vector<VoxelTexture>>(__gnu_cxx::__normal_iterator<VoxelTexture *,std::vector<VoxelTexture>> const&,__gnu_cxx::__normal_iterator<VoxelTexture *,std::vector<VoxelTexture>> const&)
test al, 1
jnz short loc_A6F54
jmp short loc_A6F7D
loc_A6F54:
lea rdi, [rbp+var_50]
call _ZNK9__gnu_cxx17__normal_iteratorIP12VoxelTextureSt6vectorIS1_SaIS1_EEEdeEv; __gnu_cxx::__normal_iterator<VoxelTexture *,std::vector<VoxelTexture>>::operator*(void)
mov [rbp+var_60], rax
mov rdi, [rbp+var_60]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
add rax, qword ptr [rbp+var_20]
mov qword ptr [rbp+var_20], rax
lea rdi, [rbp+var_50]
call _ZN9__gnu_cxx17__normal_iteratorIP12VoxelTextureSt6vectorIS1_SaIS1_EEEppEv; __gnu_cxx::__normal_iterator<VoxelTexture *,std::vector<VoxelTexture>>::operator++(void)
jmp short loc_A6F41
loc_A6F7D:
jmp short $+2
loc_A6F7F:
lea rdi, [rbp+var_30]
call _ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI9VoxelInfoESt6vectorIS3_SaIS3_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>>::operator++(void)
jmp loc_A6EF3
loc_A6F8D:
mov rdx, qword ptr [rbp+var_20]; int
mov esi, offset word_10; int
mov edi, esi; this
call _ZN11voxel_atlas6createEiim; voxel_atlas::create(int,int,ulong)
lea rax, _ZN14voxel_registry6voxelsE; voxel_registry::voxels
mov [rbp+var_68], rax
lea rdi, _ZN14voxel_registry6voxelsE; voxel_registry::voxels
call _ZNSt6vectorISt10shared_ptrI9VoxelInfoESaIS2_EE5beginEv; std::vector<std::shared_ptr<VoxelInfo>>::begin(void)
mov [rbp+var_70], rax
lea rdi, _ZN14voxel_registry6voxelsE; voxel_registry::voxels
call _ZNSt6vectorISt10shared_ptrI9VoxelInfoESaIS2_EE3endEv; std::vector<std::shared_ptr<VoxelInfo>>::end(void)
mov [rbp+var_78], rax
loc_A6FC8:
lea rdi, [rbp+var_70]; this
lea rsi, [rbp+var_78]
call _ZN9__gnu_cxxneIPSt10shared_ptrI9VoxelInfoESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>> const&)
test al, 1
jnz short loc_A6FDE
jmp loc_A710E
loc_A6FDE:
lea rdi, [rbp+var_70]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI9VoxelInfoESt6vectorIS3_SaIS3_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>>::operator*(void)
mov [rbp+var_80], rax
mov rdi, [rbp+var_80]
call _ZNKSt19__shared_ptr_accessI9VoxelInfoLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
add rax, 28h ; '('
mov [rbp+var_88], rax
mov rdi, [rbp+var_88]
call _ZNSt6vectorI12VoxelTextureSaIS0_EE5beginEv; std::vector<VoxelTexture>::begin(void)
mov [rbp+var_90], rax
mov rdi, [rbp+var_88]
call _ZNSt6vectorI12VoxelTextureSaIS0_EE3endEv; std::vector<VoxelTexture>::end(void)
mov [rbp+var_98], rax
loc_A7025:
lea rdi, [rbp+var_90]
lea rsi, [rbp+var_98]
call _ZN9__gnu_cxxneIP12VoxelTextureSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<VoxelTexture *,std::vector<VoxelTexture>>(__gnu_cxx::__normal_iterator<VoxelTexture *,std::vector<VoxelTexture>> const&,__gnu_cxx::__normal_iterator<VoxelTexture *,std::vector<VoxelTexture>> const&)
test al, 1
jnz short loc_A7041
jmp loc_A70FE
loc_A7041:
lea rdi, [rbp+var_90]
call _ZNK9__gnu_cxx17__normal_iteratorIP12VoxelTextureSt6vectorIS1_SaIS1_EEEdeEv; __gnu_cxx::__normal_iterator<VoxelTexture *,std::vector<VoxelTexture>>::operator*(void)
mov [rbp+var_A0], rax
mov rdi, [rbp+var_A0]
call _ZN11voxel_atlas12find_or_loadERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE; voxel_atlas::find_or_load(std::vector<std::string> const&)
mov [rbp+var_A8], rax
cmp [rbp+var_A8], 0
jz short loc_A709E
mov rax, [rbp+var_A8]
mov rcx, [rax]
mov rax, [rbp+var_A0]
mov [rax+18h], rcx
mov rax, [rbp+var_A8]
mov rcx, [rax+8]
mov rax, [rbp+var_A0]
mov [rax+20h], rcx
jmp short loc_A70ED
loc_A709E:
lea rax, [rbp+var_B8]
mov [rbp+var_10], rax
lea rax, aClientGlFailed; "client_gl: {}: failed to load atlas str"...
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _ZN3fmt3v1117basic_string_viewIcEC2EPKc; fmt::v11::basic_string_view<char>::basic_string_view(char const*)
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
mov rdi, [rbp+var_80]
call _ZNKSt19__shared_ptr_accessI9VoxelInfoLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdx, rax
mov rdi, [rbp+var_B8]
mov rsi, [rbp+var_B0]
call _ZN6spdlog8criticalIJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvN3fmt3v1119basic_format_stringIcJDpNS9_13type_identityIT_E4typeEEEEDpOSC_; spdlog::critical<std::string &>(fmt::v11::basic_format_string<char,fmt::v11::type_identity<std::string &>::type>,std::string &&&)
call __ZSt9terminatev; std::terminate(void)
loc_A70ED:
lea rdi, [rbp+var_90]
call _ZN9__gnu_cxx17__normal_iteratorIP12VoxelTextureSt6vectorIS1_SaIS1_EEEppEv; __gnu_cxx::__normal_iterator<VoxelTexture *,std::vector<VoxelTexture>>::operator++(void)
jmp loc_A7025
loc_A70FE:
jmp short $+2
loc_A7100:
lea rdi, [rbp+var_70]
call _ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI9VoxelInfoESt6vectorIS3_SaIS3_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>>::operator++(void)
jmp loc_A6FC8
loc_A710E:
call _ZN11voxel_atlas16generate_mipmapsEv; voxel_atlas::generate_mipmaps(void)
lea rax, _ZN13item_registry5itemsE; item_registry::items
mov [rbp+var_C0], rax
lea rdi, _ZN13item_registry5itemsE; item_registry::items
call _ZNSt6vectorISt10shared_ptrI8ItemInfoESaIS2_EE5beginEv; std::vector<std::shared_ptr<ItemInfo>>::begin(void)
mov [rbp+var_C8], rax
lea rdi, _ZN13item_registry5itemsE; item_registry::items
call _ZNSt6vectorISt10shared_ptrI8ItemInfoESaIS2_EE3endEv; std::vector<std::shared_ptr<ItemInfo>>::end(void)
mov [rbp+var_D0], rax
loc_A7147:
lea rdi, [rbp+var_C8]; this
lea rsi, [rbp+var_D0]
call _ZN9__gnu_cxxneIPSt10shared_ptrI8ItemInfoESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<std::shared_ptr<ItemInfo> *,std::vector<std::shared_ptr<ItemInfo>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<ItemInfo> *,std::vector<std::shared_ptr<ItemInfo>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<ItemInfo> *,std::vector<std::shared_ptr<ItemInfo>>> const&)
test al, 1
jnz short loc_A7160
jmp short loc_A71DB
loc_A7160:
lea rdi, [rbp+var_C8]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI8ItemInfoESt6vectorIS3_SaIS3_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<ItemInfo> *,std::vector<std::shared_ptr<ItemInfo>>>::operator*(void)
mov [rbp+var_D8], rax
mov rdi, [rbp+var_D8]
call _ZNKSt19__shared_ptr_accessI8ItemInfoLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<ItemInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
add rdi, 20h ; ' '
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rsi, rax
lea rdi, [rbp+var_E8]
mov edx, 3
call _ZN8resource4loadI10TextureGUIEESt10shared_ptrIKT_EPKcj; resource::load<TextureGUI>(char const*,uint)
mov rdi, [rbp+var_D8]
call _ZNKSt19__shared_ptr_accessI8ItemInfoLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<ItemInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
add rdi, 48h ; 'H'
lea rsi, [rbp+var_E8]
call _ZNSt10shared_ptrIK10TextureGUIEaSEOS2_; std::shared_ptr<TextureGUI const>::operator=(std::shared_ptr<TextureGUI const>&&)
lea rdi, [rbp+var_E8]; void *
call _ZNSt10shared_ptrIK10TextureGUIED2Ev; std::shared_ptr<TextureGUI const>::~shared_ptr()
lea rdi, [rbp+var_C8]
call _ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI8ItemInfoESt6vectorIS3_SaIS3_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<ItemInfo> *,std::vector<std::shared_ptr<ItemInfo>>>::operator++(void)
jmp loc_A7147
loc_A71DB:
call _ZN11experiments9init_lateEv; experiments::init_late(void)
call _ZN13client_splash9init_lateEv; client_splash::init_late(void)
call _ZN12window_title6updateEv; window_title::update(void)
add rsp, 0F0h
pop rbp
retn
| long long client_game::init_late(client_game *this)
{
unsigned long long v1; // rcx
long long v2; // rax
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
_BYTE v8[16]; // [rsp+8h] [rbp-E8h] BYREF
long long v9; // [rsp+18h] [rbp-D8h]
long long v10; // [rsp+20h] [rbp-D0h] BYREF
_QWORD v11[2]; // [rsp+28h] [rbp-C8h] BYREF
_QWORD v12[2]; // [rsp+38h] [rbp-B8h] BYREF
_QWORD *v13; // [rsp+48h] [rbp-A8h]
long long v14; // [rsp+50h] [rbp-A0h]
long long v15; // [rsp+58h] [rbp-98h] BYREF
long long v16; // [rsp+60h] [rbp-90h] BYREF
long long v17; // [rsp+68h] [rbp-88h]
long long v18; // [rsp+70h] [rbp-80h]
long long v19; // [rsp+78h] [rbp-78h] BYREF
_QWORD v20[2]; // [rsp+80h] [rbp-70h] BYREF
_QWORD *v21; // [rsp+90h] [rbp-60h]
long long v22; // [rsp+98h] [rbp-58h] BYREF
long long v23; // [rsp+A0h] [rbp-50h] BYREF
long long v24; // [rsp+A8h] [rbp-48h]
long long v25; // [rsp+B0h] [rbp-40h]
long long v26; // [rsp+B8h] [rbp-38h] BYREF
_QWORD v27[2]; // [rsp+C0h] [rbp-30h] BYREF
int v28[2]; // [rsp+D0h] [rbp-20h]
const char *v29; // [rsp+D8h] [rbp-18h]
_QWORD *v30; // [rsp+E0h] [rbp-10h]
const char *v31; // [rsp+E8h] [rbp-8h]
toggles::init_late(this);
if ( globals::sound_ctx[0] )
sound::init_late(this);
language::init_late(this);
settings::init_late(this);
client_chat::init_late(this);
status_lines::init_late(this);
game_voxels::populate(this);
game_items::populate(this);
*(_QWORD *)v28 = 0LL;
v27[1] = &voxel_registry::voxels;
v27[0] = std::vector<std::shared_ptr<VoxelInfo>>::begin(&voxel_registry::voxels);
v26 = std::vector<std::shared_ptr<VoxelInfo>>::end(&voxel_registry::voxels);
while ( (__gnu_cxx::operator!=<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>>(v27, &v26) & 1) != 0 )
{
v25 = __gnu_cxx::__normal_iterator<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>>::operator*(v27);
v24 = std::__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v25) + 40;
v23 = std::vector<VoxelTexture>::begin(v24);
v22 = std::vector<VoxelTexture>::end(v24);
while ( (__gnu_cxx::operator!=<VoxelTexture *,std::vector<VoxelTexture>>(&v23, &v22) & 1) != 0 )
{
v21 = (_QWORD *)__gnu_cxx::__normal_iterator<VoxelTexture *,std::vector<VoxelTexture>>::operator*(&v23);
v2 = std::vector<std::string>::size(v21);
*(_QWORD *)v28 += v2;
__gnu_cxx::__normal_iterator<VoxelTexture *,std::vector<VoxelTexture>>::operator++(&v23);
}
__gnu_cxx::__normal_iterator<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>>::operator++(v27);
}
voxel_atlas::create((voxel_atlas *)(unsigned int)&word_10, (int)&word_10, v28[0], v1);
v20[1] = &voxel_registry::voxels;
v20[0] = std::vector<std::shared_ptr<VoxelInfo>>::begin(&voxel_registry::voxels);
v19 = std::vector<std::shared_ptr<VoxelInfo>>::end(&voxel_registry::voxels);
while ( (__gnu_cxx::operator!=<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>>(v20, &v19) & 1) != 0 )
{
v18 = __gnu_cxx::__normal_iterator<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>>::operator*(v20);
v17 = std::__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v18) + 40;
v16 = std::vector<VoxelTexture>::begin(v17);
v15 = std::vector<VoxelTexture>::end(v17);
while ( (__gnu_cxx::operator!=<VoxelTexture *,std::vector<VoxelTexture>>(&v16, &v15) & 1) != 0 )
{
v14 = __gnu_cxx::__normal_iterator<VoxelTexture *,std::vector<VoxelTexture>>::operator*(&v16);
v13 = (_QWORD *)voxel_atlas::find_or_load(v14);
if ( !v13 )
{
v30 = v12;
v29 = "client_gl: {}: failed to load atlas strips";
fmt::v11::basic_string_view<char>::basic_string_view(v12, (long long)"client_gl: {}: failed to load atlas strips");
v31 = v29;
v3 = std::__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v18);
spdlog::critical<std::string &>(v12[0], v12[1], v3);
std::terminate();
}
*(_QWORD *)(v14 + 24) = *v13;
*(_QWORD *)(v14 + 32) = v13[1];
__gnu_cxx::__normal_iterator<VoxelTexture *,std::vector<VoxelTexture>>::operator++(&v16);
}
__gnu_cxx::__normal_iterator<std::shared_ptr<VoxelInfo> *,std::vector<std::shared_ptr<VoxelInfo>>>::operator++(v20);
}
voxel_atlas::generate_mipmaps((voxel_atlas *)v20);
v11[1] = &item_registry::items;
v11[0] = std::vector<std::shared_ptr<ItemInfo>>::begin(&item_registry::items);
v10 = std::vector<std::shared_ptr<ItemInfo>>::end(&item_registry::items);
while ( (__gnu_cxx::operator!=<std::shared_ptr<ItemInfo> *,std::vector<std::shared_ptr<ItemInfo>>>(v11, &v10) & 1) != 0 )
{
v9 = __gnu_cxx::__normal_iterator<std::shared_ptr<ItemInfo> *,std::vector<std::shared_ptr<ItemInfo>>>::operator*(v11);
v4 = std::__shared_ptr_access<ItemInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v9);
v5 = std::string::c_str(v4 + 32);
resource::load<TextureGUI>(v8, v5, 3LL);
v6 = std::__shared_ptr_access<ItemInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v9);
std::shared_ptr<TextureGUI const>::operator=(v6 + 72, (long long)v8);
std::shared_ptr<TextureGUI const>::~shared_ptr(v8);
__gnu_cxx::__normal_iterator<std::shared_ptr<ItemInfo> *,std::vector<std::shared_ptr<ItemInfo>>>::operator++(v11);
}
experiments::init_late((experiments *)v11);
client_splash::init_late((client_splash *)v11);
return window_title::update((window_title *)v11);
}
| init_late:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
CALL 0x002387a0
LEA RAX,[0x60e280]
CMP qword ptr [RAX],0x0
JZ 0x001a6ea2
CALL 0x00233370
LAB_001a6ea2:
CALL 0x001d7770
CALL 0x00227a90
CALL 0x00158120
CALL 0x00235460
CALL 0x0024ea30
CALL 0x0024e7e0
MOV qword ptr [RBP + -0x20],0x0
LEA RAX,[0x611698]
MOV qword ptr [RBP + -0x28],RAX
LEA RDI,[0x611698]
CALL 0x001a8cd0
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[0x611698]
CALL 0x001a8d00
MOV qword ptr [RBP + -0x38],RAX
LAB_001a6ef3:
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x38]
CALL 0x001a8d30
TEST AL,0x1
JNZ 0x001a6f09
JMP 0x001a6f8d
LAB_001a6f09:
LEA RDI,[RBP + -0x30]
CALL 0x001a8d70
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001a8d90
ADD RAX,0x28
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001a8db0
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001a8de0
MOV qword ptr [RBP + -0x58],RAX
LAB_001a6f41:
LEA RDI,[RBP + -0x50]
LEA RSI,[RBP + -0x58]
CALL 0x001a8e10
TEST AL,0x1
JNZ 0x001a6f54
JMP 0x001a6f7d
LAB_001a6f54:
LEA RDI,[RBP + -0x50]
CALL 0x001a8e50
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x00163d70
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[RBP + -0x50]
CALL 0x001a8e70
JMP 0x001a6f41
LAB_001a6f7d:
JMP 0x001a6f7f
LAB_001a6f7f:
LEA RDI,[RBP + -0x30]
CALL 0x001a8e90
JMP 0x001a6ef3
LAB_001a6f8d:
MOV RDX,qword ptr [RBP + -0x20]
MOV ESI,0x10
MOV EDI,ESI
CALL 0x002391d0
LEA RAX,[0x611698]
MOV qword ptr [RBP + -0x68],RAX
LEA RDI,[0x611698]
CALL 0x001a8cd0
MOV qword ptr [RBP + -0x70],RAX
LEA RDI,[0x611698]
CALL 0x001a8d00
MOV qword ptr [RBP + -0x78],RAX
LAB_001a6fc8:
LEA RDI,[RBP + -0x70]
LEA RSI,[RBP + -0x78]
CALL 0x001a8d30
TEST AL,0x1
JNZ 0x001a6fde
JMP 0x001a710e
LAB_001a6fde:
LEA RDI,[RBP + -0x70]
CALL 0x001a8d70
MOV qword ptr [RBP + -0x80],RAX
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x001a8d90
ADD RAX,0x28
MOV qword ptr [RBP + -0x88],RAX
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x001a8db0
MOV qword ptr [RBP + -0x90],RAX
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x001a8de0
MOV qword ptr [RBP + -0x98],RAX
LAB_001a7025:
LEA RDI,[RBP + -0x90]
LEA RSI,[RBP + -0x98]
CALL 0x001a8e10
TEST AL,0x1
JNZ 0x001a7041
JMP 0x001a70fe
LAB_001a7041:
LEA RDI,[RBP + -0x90]
CALL 0x001a8e50
MOV qword ptr [RBP + -0xa0],RAX
MOV RDI,qword ptr [RBP + -0xa0]
CALL 0x002397e0
MOV qword ptr [RBP + -0xa8],RAX
CMP qword ptr [RBP + -0xa8],0x0
JZ 0x001a709e
MOV RAX,qword ptr [RBP + -0xa8]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0xa8]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RAX + 0x20],RCX
JMP 0x001a70ed
LAB_001a709e:
LEA RAX,[RBP + -0xb8]
MOV qword ptr [RBP + -0x10],RAX
LEA RAX,[0x46fc8a]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001317c0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x001a8d90
MOV RDX,RAX
MOV RDI,qword ptr [RBP + -0xb8]
MOV RSI,qword ptr [RBP + -0xb0]
CALL 0x001a8eb0
CALL 0x0012d420
LAB_001a70ed:
LEA RDI,[RBP + -0x90]
CALL 0x001a8e70
JMP 0x001a7025
LAB_001a70fe:
JMP 0x001a7100
LAB_001a7100:
LEA RDI,[RBP + -0x70]
CALL 0x001a8e90
JMP 0x001a6fc8
LAB_001a710e:
CALL 0x00239750
LEA RAX,[0x610b58]
MOV qword ptr [RBP + -0xc0],RAX
LEA RDI,[0x610b58]
CALL 0x001a8f00
MOV qword ptr [RBP + -0xc8],RAX
LEA RDI,[0x610b58]
CALL 0x001a8f30
MOV qword ptr [RBP + -0xd0],RAX
LAB_001a7147:
LEA RDI,[RBP + -0xc8]
LEA RSI,[RBP + -0xd0]
CALL 0x001a8f60
TEST AL,0x1
JNZ 0x001a7160
JMP 0x001a71db
LAB_001a7160:
LEA RDI,[RBP + -0xc8]
CALL 0x001a8fa0
MOV qword ptr [RBP + -0xd8],RAX
MOV RDI,qword ptr [RBP + -0xd8]
CALL 0x001a8fc0
MOV RDI,RAX
ADD RDI,0x20
CALL 0x0012c1c0
MOV RSI,RAX
LEA RDI,[RBP + -0xe8]
MOV EDX,0x3
CALL 0x002359d0
MOV RDI,qword ptr [RBP + -0xd8]
CALL 0x001a8fc0
MOV RDI,RAX
ADD RDI,0x48
LEA RSI,[RBP + -0xe8]
CALL 0x00131110
LEA RDI,[RBP + -0xe8]
CALL 0x001310f0
LEA RDI,[RBP + -0xc8]
CALL 0x001a8fe0
JMP 0x001a7147
LAB_001a71db:
CALL 0x0018c8d0
CALL 0x002341c0
CALL 0x0023f910
ADD RSP,0xf0
POP RBP
RET
|
/* client_game::init_late() */
void client_game::init_late(void)
{
bool bVar1;
int8 uVar2;
char *pcVar3;
long lVar4;
resource local_f0 [16];
__shared_ptr_access<ItemInfo,(__gnu_cxx::_Lock_policy)2,false,false> *local_e0;
int8 local_d8;
int8 local_d0;
int1 *local_c8;
spdlog *local_c0;
int8 local_b8;
int8 *local_b0;
vector *local_a8;
int8 local_a0;
int8 local_98;
vector<VoxelTexture,std::allocator<VoxelTexture>> *local_90;
__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false> *local_88;
int8 local_80;
int8 local_78;
int1 *local_70;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_68;
int8 local_60;
int8 local_58;
vector<VoxelTexture,std::allocator<VoxelTexture>> *local_50;
__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false> *local_48;
int8 local_40;
int8 local_38;
int1 *local_30;
ulong local_28;
char *local_20;
basic_string_view<char> *local_18;
char *local_10;
toggles::init_late();
if (globals::sound_ctx != 0) {
sound::init_late();
}
language::init_late();
settings::init_late();
client_chat::init_late();
status_lines::init_late();
game_voxels::populate();
game_items::populate();
local_28 = 0;
local_30 = voxel_registry::voxels;
local_38 = std::vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>::
begin((vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>> *)
voxel_registry::voxels);
local_40 = std::vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>::end
((vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>
*)voxel_registry::voxels);
while( true ) {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_38,(__normal_iterator *)&local_40);
if (!bVar1) break;
local_48 = (__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false> *)
__gnu_cxx::
__normal_iterator<std::shared_ptr<VoxelInfo>*,std::vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>>
::operator*((__normal_iterator<std::shared_ptr<VoxelInfo>*,std::vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>>
*)&local_38);
lVar4 = std::__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
(local_48);
local_50 = (vector<VoxelTexture,std::allocator<VoxelTexture>> *)(lVar4 + 0x28);
local_58 = std::vector<VoxelTexture,std::allocator<VoxelTexture>>::begin(local_50);
local_60 = std::vector<VoxelTexture,std::allocator<VoxelTexture>>::end(local_50);
while( true ) {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_58,(__normal_iterator *)&local_60);
if (!bVar1) break;
local_68 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
__gnu_cxx::
__normal_iterator<VoxelTexture*,std::vector<VoxelTexture,std::allocator<VoxelTexture>>>
::operator*((__normal_iterator<VoxelTexture*,std::vector<VoxelTexture,std::allocator<VoxelTexture>>>
*)&local_58);
lVar4 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size(local_68)
;
local_28 = lVar4 + local_28;
__gnu_cxx::
__normal_iterator<VoxelTexture*,std::vector<VoxelTexture,std::allocator<VoxelTexture>>>::
operator++((__normal_iterator<VoxelTexture*,std::vector<VoxelTexture,std::allocator<VoxelTexture>>>
*)&local_58);
}
__gnu_cxx::
__normal_iterator<std::shared_ptr<VoxelInfo>*,std::vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>>
::operator++((__normal_iterator<std::shared_ptr<VoxelInfo>*,std::vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>>
*)&local_38);
}
voxel_atlas::create(0x10,0x10,local_28);
local_70 = voxel_registry::voxels;
local_78 = std::vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>::
begin((vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>> *)
voxel_registry::voxels);
local_80 = std::vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>::end
((vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>
*)voxel_registry::voxels);
do {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_78,(__normal_iterator *)&local_80);
if (!bVar1) {
voxel_atlas::generate_mipmaps();
local_c8 = item_registry::items;
local_d0 = std::vector<std::shared_ptr<ItemInfo>,std::allocator<std::shared_ptr<ItemInfo>>>::
begin((vector<std::shared_ptr<ItemInfo>,std::allocator<std::shared_ptr<ItemInfo>>>
*)item_registry::items);
local_d8 = std::vector<std::shared_ptr<ItemInfo>,std::allocator<std::shared_ptr<ItemInfo>>>::
end((vector<std::shared_ptr<ItemInfo>,std::allocator<std::shared_ptr<ItemInfo>>> *)
item_registry::items);
while( true ) {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_d0,(__normal_iterator *)&local_d8)
;
if (!bVar1) break;
local_e0 = (__shared_ptr_access<ItemInfo,(__gnu_cxx::_Lock_policy)2,false,false> *)
__gnu_cxx::
__normal_iterator<std::shared_ptr<ItemInfo>*,std::vector<std::shared_ptr<ItemInfo>,std::allocator<std::shared_ptr<ItemInfo>>>>
::operator*((__normal_iterator<std::shared_ptr<ItemInfo>*,std::vector<std::shared_ptr<ItemInfo>,std::allocator<std::shared_ptr<ItemInfo>>>>
*)&local_d0);
std::__shared_ptr_access<ItemInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
(local_e0);
pcVar3 = (char *)std::__cxx11::string::c_str();
resource::load<TextureGUI>(local_f0,pcVar3,3);
lVar4 = std::__shared_ptr_access<ItemInfo,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(local_e0);
std::shared_ptr<TextureGUI_const>::operator=
((shared_ptr<TextureGUI_const> *)(lVar4 + 0x48),(shared_ptr *)local_f0);
std::shared_ptr<TextureGUI_const>::~shared_ptr((shared_ptr<TextureGUI_const> *)local_f0);
__gnu_cxx::
__normal_iterator<std::shared_ptr<ItemInfo>*,std::vector<std::shared_ptr<ItemInfo>,std::allocator<std::shared_ptr<ItemInfo>>>>
::operator++((__normal_iterator<std::shared_ptr<ItemInfo>*,std::vector<std::shared_ptr<ItemInfo>,std::allocator<std::shared_ptr<ItemInfo>>>>
*)&local_d0);
}
experiments::init_late();
client_splash::init_late();
window_title::update();
return;
}
local_88 = (__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false> *)
__gnu_cxx::
__normal_iterator<std::shared_ptr<VoxelInfo>*,std::vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>>
::operator*((__normal_iterator<std::shared_ptr<VoxelInfo>*,std::vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>>
*)&local_78);
lVar4 = std::__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
(local_88);
local_90 = (vector<VoxelTexture,std::allocator<VoxelTexture>> *)(lVar4 + 0x28);
local_98 = std::vector<VoxelTexture,std::allocator<VoxelTexture>>::begin(local_90);
local_a0 = std::vector<VoxelTexture,std::allocator<VoxelTexture>>::end(local_90);
while( true ) {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_98,(__normal_iterator *)&local_a0);
if (!bVar1) break;
local_a8 = (vector *)
__gnu_cxx::
__normal_iterator<VoxelTexture*,std::vector<VoxelTexture,std::allocator<VoxelTexture>>>
::operator*((__normal_iterator<VoxelTexture*,std::vector<VoxelTexture,std::allocator<VoxelTexture>>>
*)&local_98);
local_b0 = (int8 *)voxel_atlas::find_or_load(local_a8);
if (local_b0 == (int8 *)0x0) {
local_18 = (basic_string_view<char> *)&local_c0;
local_20 = "client_gl: {}: failed to load atlas strips";
fmt::v11::basic_string_view<char>::basic_string_view
(local_18,"client_gl: {}: failed to load atlas strips");
local_10 = local_20;
uVar2 = std::__shared_ptr_access<VoxelInfo,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(local_88);
spdlog::critical<std::__cxx11::string&>(local_c0,local_b8,uVar2);
/* WARNING: Subroutine does not return */
std::terminate();
}
*(int8 *)(local_a8 + 0x18) = *local_b0;
*(int8 *)(local_a8 + 0x20) = local_b0[1];
__gnu_cxx::
__normal_iterator<VoxelTexture*,std::vector<VoxelTexture,std::allocator<VoxelTexture>>>::
operator++((__normal_iterator<VoxelTexture*,std::vector<VoxelTexture,std::allocator<VoxelTexture>>>
*)&local_98);
}
__gnu_cxx::
__normal_iterator<std::shared_ptr<VoxelInfo>*,std::vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>>
::operator++((__normal_iterator<std::shared_ptr<VoxelInfo>*,std::vector<std::shared_ptr<VoxelInfo>,std::allocator<std::shared_ptr<VoxelInfo>>>>
*)&local_78);
} while( true );
}
| |
39,376 | client_game::init_late() | untodesu[P]voxelius/game/client/game.cc | void client_game::init_late(void)
{
toggles::init_late();
if(globals::sound_ctx) {
sound::init_late();
}
language::init_late();
settings::init_late();
client_chat::init_late();
status_lines::init_late();
game_voxels::populate();
game_items::populate();
std::size_t max_texture_count = 0;
// Figure out the total texture count
// NOTE: this is very debug, early and a quite
// conservative limit choice; there must be a better
// way to make this limit way smaller than it currently is
for(const std::shared_ptr<VoxelInfo> &info : voxel_registry::voxels) {
for(const VoxelTexture &vtex : info->textures) {
max_texture_count += vtex.paths.size();
}
}
// UNDONE: asset packs for non-16x16 stuff
voxel_atlas::create(16, 16, max_texture_count);
for(std::shared_ptr<VoxelInfo> &info : voxel_registry::voxels) {
for(VoxelTexture &vtex : info->textures) {
if(auto strip = voxel_atlas::find_or_load(vtex.paths)) {
vtex.cached_offset = strip->offset;
vtex.cached_plane = strip->plane;
continue;
}
spdlog::critical("client_gl: {}: failed to load atlas strips", info->name);
std::terminate();
}
}
voxel_atlas::generate_mipmaps();
for(std::shared_ptr<ItemInfo> &info : item_registry::items) {
info->cached_texture = resource::load<TextureGUI>(info->texture.c_str(), TEXTURE_GUI_LOAD_CLAMP_S | TEXTURE_GUI_LOAD_CLAMP_T);
}
experiments::init_late();
client_splash::init_late();
window_title::update();
} | O2 | cpp | client_game::init_late():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
callq 0x6a5f6
leaq 0x210367(%rip), %rax # 0x2550a8
cmpq $0x0, (%rax)
je 0x44d4c
callq 0x68382
callq 0x4f63b
callq 0x6456f
callq 0x32c3c
callq 0x69216
callq 0x70b10
callq 0x708d0
leaq 0x213747(%rip), %rbx # 0x2584b8
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
xorl %edx, %edx
cmpq %rcx, %rax
je 0x44da9
movq (%rax), %rdi
movq 0x28(%rdi), %rsi
movq 0x30(%rdi), %rdi
cmpq %rdi, %rsi
je 0x44da3
movq 0x8(%rsi), %r8
subq (%rsi), %r8
sarq $0x5, %r8
addq %r8, %rdx
addq $0x28, %rsi
jmp 0x44d8a
addq $0x10, %rax
jmp 0x44d7a
pushq $0x10
popq %rdi
movl %edi, %esi
callq 0x6a9a8
movq (%rbx), %r14
movq 0x8(%rbx), %r15
cmpq %r15, %r14
je 0x44df3
movq (%r14), %rax
movq 0x28(%rax), %rbx
movq 0x30(%rax), %r12
cmpq %r12, %rbx
je 0x44ded
movq %rbx, %rdi
callq 0x6acf3
testq %rax, %rax
je 0x44e60
movups (%rax), %xmm0
movups %xmm0, 0x18(%rbx)
addq $0x28, %rbx
jmp 0x44dca
addq $0x10, %r14
jmp 0x44dba
callq 0x6aca4
leaq 0x212b79(%rip), %rax # 0x257978
movq (%rax), %r15
movq 0x8(%rax), %r12
leaq 0x8(%rsp), %rbx
movq %rsp, %r14
pushq $0x3
popq %rbp
cmpq %r12, %r15
je 0x44e44
movq (%r15), %rax
movq 0x20(%rax), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x69578
movq (%r15), %rdi
addq $0x48, %rdi
movq %r14, %rsi
callq 0x29cd0
movq %rbx, %rdi
callq 0x29c54
addq $0x10, %r15
jmp 0x44e11
callq 0x3e759
callq 0x68be5
callq 0x6c430
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdx
leaq 0x12c728(%rip), %rdi # 0x171592
pushq $0x2a
popq %rsi
callq 0x45c63
callq 0x26200
| _ZN11client_game9init_lateEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
call _ZN7toggles9init_lateEv; toggles::init_late(void)
lea rax, _ZN7globals9sound_ctxE; globals::sound_ctx
cmp qword ptr [rax], 0
jz short loc_44D4C
call _ZN5sound9init_lateEv; sound::init_late(void)
loc_44D4C:
call _ZN8language9init_lateEv; language::init_late(void)
call _ZN8settings9init_lateEv; settings::init_late(void)
call _ZN11client_chat9init_lateEv; client_chat::init_late(void)
call _ZN12status_lines9init_lateEv; status_lines::init_late(void)
call _ZN11game_voxels8populateEv; game_voxels::populate(void)
call _ZN10game_items8populateEv; game_items::populate(void)
lea rbx, _ZN14voxel_registry6voxelsE; voxel_registry::voxels
mov rax, [rbx]
mov rcx, [rbx+8]; unsigned __int64
xor edx, edx; int
loc_44D7A:
cmp rax, rcx
jz short loc_44DA9
mov rdi, [rax]
mov rsi, [rdi+28h]
mov rdi, [rdi+30h]
loc_44D8A:
cmp rsi, rdi
jz short loc_44DA3
mov r8, [rsi+8]
sub r8, [rsi]
sar r8, 5
add rdx, r8
add rsi, 28h ; '('
jmp short loc_44D8A
loc_44DA3:
add rax, 10h
jmp short loc_44D7A
loc_44DA9:
push 10h
pop rdi; this
mov esi, edi; int
call _ZN11voxel_atlas6createEiim; voxel_atlas::create(int,int,ulong)
mov r14, [rbx]
mov r15, [rbx+8]
loc_44DBA:
cmp r14, r15
jz short loc_44DF3
mov rax, [r14]
mov rbx, [rax+28h]
mov r12, [rax+30h]
loc_44DCA:
cmp rbx, r12
jz short loc_44DED
mov rdi, rbx
call _ZN11voxel_atlas12find_or_loadERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE; voxel_atlas::find_or_load(std::vector<std::string> const&)
test rax, rax
jz loc_44E60
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rbx+18h], xmm0
add rbx, 28h ; '('
jmp short loc_44DCA
loc_44DED:
add r14, 10h
jmp short loc_44DBA
loc_44DF3:
call _ZN11voxel_atlas16generate_mipmapsEv; voxel_atlas::generate_mipmaps(void)
lea rax, _ZN13item_registry5itemsE; item_registry::items
mov r15, [rax]
mov r12, [rax+8]
lea rbx, [rsp+38h+var_30]
mov r14, rsp
push 3
pop rbp
loc_44E11:
cmp r15, r12
jz short loc_44E44
mov rax, [r15]
mov rsi, [rax+20h]
mov rdi, r14
mov edx, ebp
call _ZN8resource4loadI10TextureGUIEESt10shared_ptrIKT_EPKcj; resource::load<TextureGUI>(char const*,uint)
mov rdi, [r15]
add rdi, 48h ; 'H'
mov rsi, r14
call _ZNSt12__shared_ptrIK10TextureGUILN9__gnu_cxx12_Lock_policyE2EEaSEOS4_; std::__shared_ptr<TextureGUI const,(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<TextureGUI const,(__gnu_cxx::_Lock_policy)2>&&)
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
add r15, 10h
jmp short loc_44E11
loc_44E44:
call _ZN11experiments9init_lateEv; experiments::init_late(void)
call _ZN13client_splash9init_lateEv; client_splash::init_late(void)
call _ZN12window_title6updateEv; window_title::update(void)
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_44E60:
mov rdx, [r14]
lea rdi, aClientGlFailed; "client_gl: {}: failed to load atlas str"...
push 2Ah ; '*'
pop rsi
call _ZN6spdlog8criticalIJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvN3fmt3v1119basic_format_stringIcJDpNS9_13type_identityIT_E4typeEEEEDpOSC_; spdlog::critical<std::string &>(fmt::v11::basic_format_string<char,fmt::v11::type_identity<std::string &>::type>,std::string &&&)
call __ZSt9terminatev; std::terminate(void)
| long long client_game::init_late(client_game *this)
{
long long v1; // rax
unsigned long long v2; // rcx
long long v3; // rdx
_QWORD *i; // rsi
voxel_atlas *v5; // rdi
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
_QWORD *v10; // r14
_QWORD *v11; // r15
long long v12; // rbx
long long v13; // r12
_OWORD *v14; // rax
int v15; // ecx
int v16; // r8d
int v17; // r9d
long long v18; // r15
long long v19; // r12
__int128 v21; // [rsp+0h] [rbp-38h] BYREF
int v22; // [rsp+10h] [rbp-28h]
int v23; // [rsp+18h] [rbp-20h]
char v24; // [rsp+20h] [rbp-18h]
toggles::init_late(this);
if ( globals::sound_ctx )
sound::init_late(this);
language::init_late(this);
settings::init_late(this);
client_chat::init_late(this);
status_lines::init_late(this);
game_voxels::populate(this);
game_items::populate(this);
v1 = voxel_registry::voxels;
v2 = *((_QWORD *)&voxel_registry::voxels + 1);
v3 = 0LL;
while ( v1 != v2 )
{
for ( i = *(_QWORD **)(*(_QWORD *)v1 + 40LL); i != *(_QWORD **)(*(_QWORD *)v1 + 48LL); i += 5 )
v3 += (long long)(i[1] - *i) >> 5;
v1 += 16LL;
}
v5 = (voxel_atlas *)&word_10;
voxel_atlas::create((voxel_atlas *)&word_10, 16, v3, v2);
v10 = (_QWORD *)voxel_registry::voxels;
v11 = (_QWORD *)*((_QWORD *)&voxel_registry::voxels + 1);
while ( v10 != v11 )
{
v12 = *(_QWORD *)(*v10 + 40LL);
v13 = *(_QWORD *)(*v10 + 48LL);
while ( v12 != v13 )
{
v5 = (voxel_atlas *)v12;
v14 = (_OWORD *)voxel_atlas::find_or_load(v12, 16, v6, v7, v8, v9, v21);
if ( !v14 )
{
spdlog::critical<std::string &>("client_gl: {}: failed to load atlas strips", 42LL, *v10);
std::terminate();
}
*(_OWORD *)(v12 + 24) = *v14;
v12 += 40LL;
}
v10 += 2;
}
voxel_atlas::generate_mipmaps(v5);
v18 = item_registry::items;
v19 = *((_QWORD *)&item_registry::items + 1);
while ( v18 != v19 )
{
resource::load<TextureGUI>(
(unsigned int)&v21,
*(_QWORD *)(*(_QWORD *)v18 + 32LL),
3,
v15,
v16,
v17,
v21,
SBYTE8(v21),
v22,
v23,
v24);
std::__shared_ptr<TextureGUI const,(__gnu_cxx::_Lock_policy)2>::operator=((__int128 *)(*(_QWORD *)v18 + 72LL), &v21);
v5 = (voxel_atlas *)((char *)&v21 + 8);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v21 + 1);
v18 += 16LL;
}
experiments::init_late(v5);
client_splash::init_late(v5);
return window_title::update(v5);
}
| init_late:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
CALL 0x0016a5f6
LEA RAX,[0x3550a8]
CMP qword ptr [RAX],0x0
JZ 0x00144d4c
CALL 0x00168382
LAB_00144d4c:
CALL 0x0014f63b
CALL 0x0016456f
CALL 0x00132c3c
CALL 0x00169216
CALL 0x00170b10
CALL 0x001708d0
LEA RBX,[0x3584b8]
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
XOR EDX,EDX
LAB_00144d7a:
CMP RAX,RCX
JZ 0x00144da9
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RDI + 0x28]
MOV RDI,qword ptr [RDI + 0x30]
LAB_00144d8a:
CMP RSI,RDI
JZ 0x00144da3
MOV R8,qword ptr [RSI + 0x8]
SUB R8,qword ptr [RSI]
SAR R8,0x5
ADD RDX,R8
ADD RSI,0x28
JMP 0x00144d8a
LAB_00144da3:
ADD RAX,0x10
JMP 0x00144d7a
LAB_00144da9:
PUSH 0x10
POP RDI
MOV ESI,EDI
CALL 0x0016a9a8
MOV R14,qword ptr [RBX]
MOV R15,qword ptr [RBX + 0x8]
LAB_00144dba:
CMP R14,R15
JZ 0x00144df3
MOV RAX,qword ptr [R14]
MOV RBX,qword ptr [RAX + 0x28]
MOV R12,qword ptr [RAX + 0x30]
LAB_00144dca:
CMP RBX,R12
JZ 0x00144ded
MOV RDI,RBX
CALL 0x0016acf3
TEST RAX,RAX
JZ 0x00144e60
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RBX + 0x18],XMM0
ADD RBX,0x28
JMP 0x00144dca
LAB_00144ded:
ADD R14,0x10
JMP 0x00144dba
LAB_00144df3:
CALL 0x0016aca4
LEA RAX,[0x357978]
MOV R15,qword ptr [RAX]
MOV R12,qword ptr [RAX + 0x8]
LEA RBX,[RSP + 0x8]
MOV R14,RSP
PUSH 0x3
POP RBP
LAB_00144e11:
CMP R15,R12
JZ 0x00144e44
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RAX + 0x20]
MOV RDI,R14
MOV EDX,EBP
CALL 0x00169578
MOV RDI,qword ptr [R15]
ADD RDI,0x48
MOV RSI,R14
CALL 0x00129cd0
MOV RDI,RBX
CALL 0x00129c54
ADD R15,0x10
JMP 0x00144e11
LAB_00144e44:
CALL 0x0013e759
CALL 0x00168be5
CALL 0x0016c430
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00144e60:
MOV RDX,qword ptr [R14]
LEA RDI,[0x271592]
PUSH 0x2a
POP RSI
CALL 0x00145c63
CALL 0x00126200
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* client_game::init_late() */
void client_game::init_late(void)
{
vector *pvVar1;
int8 uVar2;
long *plVar3;
int8 *puVar4;
ulong uVar5;
vector *pvVar6;
long *plVar7;
resource arStack_38 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_30 [8];
toggles::init_late();
if (globals::sound_ctx != 0) {
sound::init_late();
}
language::init_late();
settings::init_late();
client_chat::init_late();
status_lines::init_late();
game_voxels::populate();
game_items::populate();
uVar5 = 0;
for (plVar3 = voxel_registry::voxels; plVar3 != _DAT_003584c0; plVar3 = plVar3 + 2) {
for (plVar7 = *(long **)(*plVar3 + 0x28); plVar7 != *(long **)(*plVar3 + 0x30);
plVar7 = plVar7 + 5) {
uVar5 = uVar5 + (plVar7[1] - *plVar7 >> 5);
}
}
voxel_atlas::create(0x10,0x10,uVar5);
plVar3 = _DAT_003584c0;
plVar7 = voxel_registry::voxels;
do {
if (plVar7 == plVar3) {
voxel_atlas::generate_mipmaps();
plVar3 = DAT_00357980;
for (plVar7 = item_registry::items; plVar7 != plVar3; plVar7 = plVar7 + 2) {
resource::load<TextureGUI>(arStack_38,*(char **)(*plVar7 + 0x20),3);
std::__shared_ptr<TextureGUI_const,(__gnu_cxx::_Lock_policy)2>::operator=
((__shared_ptr<TextureGUI_const,(__gnu_cxx::_Lock_policy)2> *)(*plVar7 + 0x48),
(__shared_ptr *)arStack_38);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_30);
}
experiments::init_late();
client_splash::init_late();
window_title::update();
return;
}
pvVar1 = *(vector **)(*plVar7 + 0x30);
for (pvVar6 = *(vector **)(*plVar7 + 0x28); pvVar6 != pvVar1; pvVar6 = pvVar6 + 0x28) {
puVar4 = (int8 *)voxel_atlas::find_or_load(pvVar6);
if (puVar4 == (int8 *)0x0) {
spdlog::critical<std::__cxx11::string&>
((spdlog *)"client_gl: {}: failed to load atlas strips",0x2a,*plVar7);
/* WARNING: Subroutine does not return */
std::terminate();
}
uVar2 = puVar4[1];
*(int8 *)(pvVar6 + 0x18) = *puVar4;
*(int8 *)(pvVar6 + 0x20) = uVar2;
}
plVar7 = plVar7 + 2;
} while( true );
}
| |
39,377 | client_game::init_late() | untodesu[P]voxelius/game/client/game.cc | void client_game::init_late(void)
{
toggles::init_late();
if(globals::sound_ctx) {
sound::init_late();
}
language::init_late();
settings::init_late();
client_chat::init_late();
status_lines::init_late();
game_voxels::populate();
game_items::populate();
std::size_t max_texture_count = 0;
// Figure out the total texture count
// NOTE: this is very debug, early and a quite
// conservative limit choice; there must be a better
// way to make this limit way smaller than it currently is
for(const std::shared_ptr<VoxelInfo> &info : voxel_registry::voxels) {
for(const VoxelTexture &vtex : info->textures) {
max_texture_count += vtex.paths.size();
}
}
// UNDONE: asset packs for non-16x16 stuff
voxel_atlas::create(16, 16, max_texture_count);
for(std::shared_ptr<VoxelInfo> &info : voxel_registry::voxels) {
for(VoxelTexture &vtex : info->textures) {
if(auto strip = voxel_atlas::find_or_load(vtex.paths)) {
vtex.cached_offset = strip->offset;
vtex.cached_plane = strip->plane;
continue;
}
spdlog::critical("client_gl: {}: failed to load atlas strips", info->name);
std::terminate();
}
}
voxel_atlas::generate_mipmaps();
for(std::shared_ptr<ItemInfo> &info : item_registry::items) {
info->cached_texture = resource::load<TextureGUI>(info->texture.c_str(), TEXTURE_GUI_LOAD_CLAMP_S | TEXTURE_GUI_LOAD_CLAMP_T);
}
experiments::init_late();
client_splash::init_late();
window_title::update();
} | O3 | cpp | client_game::init_late():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
callq 0x70d8d
leaq 0x2103ae(%rip), %rax # 0x25a050
cmpq $0x0, (%rax)
je 0x49cad
callq 0x6e7aa
callq 0x53f0a
callq 0x6a1ac
callq 0x37b54
callq 0x6f7e4
callq 0x779b0
callq 0x77770
leaq 0x213796(%rip), %rbx # 0x25d468
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
xorl %edx, %edx
cmpq %rcx, %rax
je 0x49d0a
movq (%rax), %rdi
movq 0x28(%rdi), %rsi
movq 0x30(%rdi), %rdi
cmpq %rdi, %rsi
je 0x49d04
movq 0x8(%rsi), %r8
subq (%rsi), %r8
sarq $0x5, %r8
addq %r8, %rdx
addq $0x28, %rsi
jmp 0x49ceb
addq $0x10, %rax
jmp 0x49cdb
movl $0x10, %edi
movl $0x10, %esi
callq 0x71148
movq (%rbx), %r14
movq 0x8(%rbx), %r15
cmpq %r15, %r14
je 0x49d59
movq (%r14), %rax
movq 0x28(%rax), %rbx
movq 0x30(%rax), %r12
cmpq %r12, %rbx
je 0x49d53
movq %rbx, %rdi
callq 0x7158e
testq %rax, %rax
je 0x49ddb
movups (%rax), %xmm0
movups %xmm0, 0x18(%rbx)
addq $0x28, %rbx
jmp 0x49d30
addq $0x10, %r14
jmp 0x49d20
callq 0x7153c
leaq 0x212bc3(%rip), %rax # 0x25c928
movq (%rax), %r14
movq 0x8(%rax), %r15
cmpq %r15, %r14
je 0x49dc0
movq %rsp, %rbx
movq (%r14), %rax
movq 0x20(%rax), %rsi
movq %rbx, %rdi
movl $0x3, %edx
callq 0x6fb80
movq (%r14), %rax
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x50(%rax), %rdi
movups %xmm0, 0x48(%rax)
testq %rdi, %rdi
je 0x49db7
callq 0x2f116
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x49db7
callq 0x2f116
addq $0x10, %r14
cmpq %r15, %r14
jne 0x49d74
callq 0x4328f
callq 0x6f123
callq 0x72cf8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r14), %rdx
leaq 0x14c611(%rip), %rdi # 0x1963f6
movl $0x2a, %esi
callq 0x4ad6a
callq 0x261e0
| _ZN11client_game9init_lateEv:
push r15
push r14
push r12
push rbx
sub rsp, 18h
call _ZN7toggles9init_lateEv; toggles::init_late(void)
lea rax, _ZN7globals9sound_ctxE; globals::sound_ctx
cmp qword ptr [rax], 0
jz short loc_49CAD
call _ZN5sound9init_lateEv; sound::init_late(void)
loc_49CAD:
call _ZN8language9init_lateEv; language::init_late(void)
call _ZN8settings9init_lateEv; settings::init_late(void)
call _ZN11client_chat9init_lateEv; client_chat::init_late(void)
call _ZN12status_lines9init_lateEv; status_lines::init_late(void)
call _ZN11game_voxels8populateEv; game_voxels::populate(void)
call _ZN10game_items8populateEv; game_items::populate(void)
lea rbx, _ZN14voxel_registry6voxelsE; voxel_registry::voxels
mov rax, [rbx]
mov rcx, [rbx+8]; unsigned __int64
xor edx, edx; int
loc_49CDB:
cmp rax, rcx
jz short loc_49D0A
mov rdi, [rax]
mov rsi, [rdi+28h]
mov rdi, [rdi+30h]
loc_49CEB:
cmp rsi, rdi
jz short loc_49D04
mov r8, [rsi+8]
sub r8, [rsi]
sar r8, 5
add rdx, r8
add rsi, 28h ; '('
jmp short loc_49CEB
loc_49D04:
add rax, 10h
jmp short loc_49CDB
loc_49D0A:
mov edi, offset word_10; this
mov esi, 10h; int
call _ZN11voxel_atlas6createEiim; voxel_atlas::create(int,int,ulong)
mov r14, [rbx]
mov r15, [rbx+8]
loc_49D20:
cmp r14, r15
jz short loc_49D59
mov rax, [r14]
mov rbx, [rax+28h]
mov r12, [rax+30h]
loc_49D30:
cmp rbx, r12
jz short loc_49D53
mov rdi, rbx
call _ZN11voxel_atlas12find_or_loadERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE; voxel_atlas::find_or_load(std::vector<std::string> const&)
test rax, rax
jz loc_49DDB
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rbx+18h], xmm0
add rbx, 28h ; '('
jmp short loc_49D30
loc_49D53:
add r14, 10h
jmp short loc_49D20
loc_49D59:
call _ZN11voxel_atlas16generate_mipmapsEv; voxel_atlas::generate_mipmaps(void)
lea rax, _ZN13item_registry5itemsE; item_registry::items
mov r14, [rax]
mov r15, [rax+8]
cmp r14, r15
jz short loc_49DC0
mov rbx, rsp
loc_49D74:
mov rax, [r14]
mov rsi, [rax+20h]
mov rdi, rbx
mov edx, 3
call _ZN8resource4loadI10TextureGUIEESt10shared_ptrIKT_EPKcj; resource::load<TextureGUI>(char const*,uint)
mov rax, [r14]
movaps xmm0, xmmword ptr [rsp+38h+var_38]
xorps xmm1, xmm1
movaps xmmword ptr [rsp+38h+var_38], xmm1
mov rdi, [rax+50h]
movups xmmword ptr [rax+48h], xmm0
test rdi, rdi
jz short loc_49DB7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
mov rdi, [rsp+38h+var_38+8]; this
test rdi, rdi
jz short loc_49DB7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_49DB7:
add r14, 10h
cmp r14, r15
jnz short loc_49D74
loc_49DC0:
call _ZN11experiments9init_lateEv; experiments::init_late(void)
call _ZN13client_splash9init_lateEv; client_splash::init_late(void)
call _ZN12window_title6updateEv; window_title::update(void)
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
loc_49DDB:
mov rdx, [r14]
lea rdi, aClientGlFailed; "client_gl: {}: failed to load atlas str"...
mov esi, 2Ah ; '*'
call _ZN6spdlog8criticalIJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvN3fmt3v1119basic_format_stringIcJDpNS9_13type_identityIT_E4typeEEEEDpOSC_; spdlog::critical<std::string &>(fmt::v11::basic_format_string<char,fmt::v11::type_identity<std::string &>::type>,std::string &&&)
call __ZSt9terminatev; std::terminate(void)
| long long client_game::init_late(client_game *this)
{
long long v1; // rax
unsigned long long v2; // rcx
long long v3; // rdx
_QWORD *i; // rsi
voxel_atlas *v5; // rdi
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
_QWORD *v10; // r14
_QWORD *v11; // r15
long long v12; // rbx
long long v13; // r12
_OWORD *v14; // rax
int v15; // ecx
int v16; // r8d
int v17; // r9d
long long *v18; // r14
long long *v19; // r15
long long v20; // rax
__int128 v21; // xmm0
experiments *v23[2]; // [rsp+0h] [rbp-38h] BYREF
int v24; // [rsp+10h] [rbp-28h]
int v25; // [rsp+18h] [rbp-20h]
long long v26; // [rsp+20h] [rbp-18h]
toggles::init_late(this);
if ( globals::sound_ctx[0] )
sound::init_late(this);
language::init_late(this);
settings::init_late(this);
client_chat::init_late(this);
status_lines::init_late(this);
game_voxels::populate(this);
game_items::populate(this);
v1 = voxel_registry::voxels;
v2 = *((_QWORD *)&voxel_registry::voxels + 1);
v3 = 0LL;
while ( v1 != v2 )
{
for ( i = *(_QWORD **)(*(_QWORD *)v1 + 40LL); i != *(_QWORD **)(*(_QWORD *)v1 + 48LL); i += 5 )
v3 += (long long)(i[1] - *i) >> 5;
v1 += 16LL;
}
v5 = (voxel_atlas *)&word_10;
voxel_atlas::create((voxel_atlas *)&word_10, 16, v3, v2);
v10 = (_QWORD *)voxel_registry::voxels;
v11 = (_QWORD *)*((_QWORD *)&voxel_registry::voxels + 1);
while ( v10 != v11 )
{
v12 = *(_QWORD *)(*v10 + 40LL);
v13 = *(_QWORD *)(*v10 + 48LL);
while ( v12 != v13 )
{
v5 = (voxel_atlas *)v12;
v14 = (_OWORD *)voxel_atlas::find_or_load(v12, 16, v6, v7, v8, v9, v23[0], v23[1], v24, v25, v26);
if ( !v14 )
{
spdlog::critical<std::string &>("client_gl: {}: failed to load atlas strips", 42LL, *v10);
std::terminate();
}
*(_OWORD *)(v12 + 24) = *v14;
v12 += 40LL;
}
v10 += 2;
}
voxel_atlas::generate_mipmaps(v5);
v18 = (long long *)item_registry::items;
v19 = (long long *)*((_QWORD *)&item_registry::items + 1);
if ( (long long *)item_registry::items != v19 )
{
do
{
resource::load<TextureGUI>((unsigned int)v23, *(_QWORD *)(*v18 + 32), 3, v15, v16, v17, v23[0], (long long)v23[1]);
v20 = *v18;
v21 = *(_OWORD *)v23;
*(_OWORD *)v23 = 0LL;
v5 = *(voxel_atlas **)(v20 + 80);
*(_OWORD *)(v20 + 72) = v21;
if ( v5 )
{
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release((volatile signed __int32 *)v5);
v5 = v23[1];
if ( v23[1] )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release((volatile signed __int32 *)v23[1]);
}
v18 += 2;
}
while ( v18 != v19 );
}
experiments::init_late(v5);
client_splash::init_late(v5);
return window_title::update(v5);
}
| init_late:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
CALL 0x00170d8d
LEA RAX,[0x35a050]
CMP qword ptr [RAX],0x0
JZ 0x00149cad
CALL 0x0016e7aa
LAB_00149cad:
CALL 0x00153f0a
CALL 0x0016a1ac
CALL 0x00137b54
CALL 0x0016f7e4
CALL 0x001779b0
CALL 0x00177770
LEA RBX,[0x35d468]
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
XOR EDX,EDX
LAB_00149cdb:
CMP RAX,RCX
JZ 0x00149d0a
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RDI + 0x28]
MOV RDI,qword ptr [RDI + 0x30]
LAB_00149ceb:
CMP RSI,RDI
JZ 0x00149d04
MOV R8,qword ptr [RSI + 0x8]
SUB R8,qword ptr [RSI]
SAR R8,0x5
ADD RDX,R8
ADD RSI,0x28
JMP 0x00149ceb
LAB_00149d04:
ADD RAX,0x10
JMP 0x00149cdb
LAB_00149d0a:
MOV EDI,0x10
MOV ESI,0x10
CALL 0x00171148
MOV R14,qword ptr [RBX]
MOV R15,qword ptr [RBX + 0x8]
LAB_00149d20:
CMP R14,R15
JZ 0x00149d59
MOV RAX,qword ptr [R14]
MOV RBX,qword ptr [RAX + 0x28]
MOV R12,qword ptr [RAX + 0x30]
LAB_00149d30:
CMP RBX,R12
JZ 0x00149d53
MOV RDI,RBX
CALL 0x0017158e
TEST RAX,RAX
JZ 0x00149ddb
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RBX + 0x18],XMM0
ADD RBX,0x28
JMP 0x00149d30
LAB_00149d53:
ADD R14,0x10
JMP 0x00149d20
LAB_00149d59:
CALL 0x0017153c
LEA RAX,[0x35c928]
MOV R14,qword ptr [RAX]
MOV R15,qword ptr [RAX + 0x8]
CMP R14,R15
JZ 0x00149dc0
MOV RBX,RSP
LAB_00149d74:
MOV RAX,qword ptr [R14]
MOV RSI,qword ptr [RAX + 0x20]
MOV RDI,RBX
MOV EDX,0x3
CALL 0x0016fb80
MOV RAX,qword ptr [R14]
MOVAPS XMM0,xmmword ptr [RSP]
XORPS XMM1,XMM1
MOVAPS xmmword ptr [RSP],XMM1
MOV RDI,qword ptr [RAX + 0x50]
MOVUPS xmmword ptr [RAX + 0x48],XMM0
TEST RDI,RDI
JZ 0x00149db7
CALL 0x0012f116
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00149db7
CALL 0x0012f116
LAB_00149db7:
ADD R14,0x10
CMP R14,R15
JNZ 0x00149d74
LAB_00149dc0:
CALL 0x0014328f
CALL 0x0016f123
CALL 0x00172cf8
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00149ddb:
MOV RDX,qword ptr [R14]
LEA RDI,[0x2963f6]
MOV ESI,0x2a
CALL 0x0014ad6a
CALL 0x001261e0
|
/* client_game::init_late() */
void client_game::init_late(void)
{
vector *pvVar1;
long lVar2;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this;
int8 uVar3;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var4;
long *plVar5;
int8 *puVar6;
ulong uVar7;
vector *pvVar8;
long *plVar9;
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30;
toggles::init_late();
if (globals::sound_ctx != 0) {
sound::init_late();
}
language::init_late();
settings::init_late();
client_chat::init_late();
status_lines::init_late();
game_voxels::populate();
game_items::populate();
uVar7 = 0;
for (plVar5 = voxel_registry::voxels; plVar5 != DAT_0035d470; plVar5 = plVar5 + 2) {
for (plVar9 = *(long **)(*plVar5 + 0x28); plVar9 != *(long **)(*plVar5 + 0x30);
plVar9 = plVar9 + 5) {
uVar7 = uVar7 + (plVar9[1] - *plVar9 >> 5);
}
}
voxel_atlas::create(0x10,0x10,uVar7);
plVar5 = DAT_0035d470;
plVar9 = voxel_registry::voxels;
do {
if (plVar9 == plVar5) {
voxel_atlas::generate_mipmaps();
plVar9 = DAT_0035c930;
for (plVar5 = item_registry::items; plVar5 != plVar9; plVar5 = plVar5 + 2) {
resource::load<TextureGUI>((resource *)&local_38,*(char **)(*plVar5 + 0x20),3);
p_Var4 = p_Stack_30;
uVar3 = local_38;
lVar2 = *plVar5;
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
this = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(lVar2 + 0x50);
*(int8 *)(lVar2 + 0x48) = uVar3;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(lVar2 + 0x50) = p_Var4;
if ((this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) &&
(std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this),
p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0)) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30);
}
}
experiments::init_late();
client_splash::init_late();
window_title::update();
return;
}
pvVar1 = *(vector **)(*plVar9 + 0x30);
for (pvVar8 = *(vector **)(*plVar9 + 0x28); pvVar8 != pvVar1; pvVar8 = pvVar8 + 0x28) {
puVar6 = (int8 *)voxel_atlas::find_or_load(pvVar8);
if (puVar6 == (int8 *)0x0) {
spdlog::critical<std::__cxx11::string&>
("client_gl: {}: failed to load atlas strips",0x2a,*plVar9);
/* WARNING: Subroutine does not return */
std::terminate();
}
uVar3 = puVar6[1];
*(int8 *)(pvVar8 + 0x18) = *puVar6;
*(int8 *)(pvVar8 + 0x20) = uVar3;
}
plVar9 = plVar9 + 2;
} while( true );
}
| |
39,378 | void google::protobuf::Arena::CreateInArenaStorage<google::protobuf::MapValueRef, google::protobuf::MapValueRef const&>(google::protobuf::MapValueRef*, google::protobuf::Arena*, google::protobuf::MapValueRef const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/arena.h | static void CreateInArenaStorage(T* ptr, Arena* arena, Args&&... args) {
CreateInArenaStorageInternal(ptr, arena,
typename is_arena_constructable<T>::type(),
std::forward<Args>(args)...);
if (arena != nullptr) {
RegisterDestructorInternal(
ptr, arena,
typename InternalHelper<T>::is_destructor_skippable::type());
}
} | O0 | c | void google::protobuf::Arena::CreateInArenaStorage<google::protobuf::MapValueRef, google::protobuf::MapValueRef const&>(google::protobuf::MapValueRef*, google::protobuf::Arena*, google::protobuf::MapValueRef const&):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x1daeb0
cmpq $0x0, 0x18(%rsp)
je 0x1dae9e
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1d8420
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN6google8protobuf5Arena20CreateInArenaStorageINS0_11MapValueRefEJRKS3_EEEvPT_PS1_DpOT0_:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], rdx
mov rdi, [rsp+28h+var_8]
mov rsi, [rsp+28h+var_10]
mov rdx, [rsp+28h+var_18]
call _ZN6google8protobuf5Arena28CreateInArenaStorageInternalINS0_11MapValueRefEJRKS3_EEEvPT_PS1_St17integral_constantIbLb0EEDpOT0_; google::protobuf::Arena::CreateInArenaStorageInternal<google::protobuf::MapValueRef,google::protobuf::MapValueRef const&>(google::protobuf::MapValueRef *,google::protobuf::Arena*,std::integral_constant<bool,false>,google::protobuf::MapValueRef const&)
cmp [rsp+28h+var_10], 0
jz short loc_1DAE9E
mov rdi, [rsp+28h+var_8]
mov rsi, [rsp+28h+var_10]
call _ZN6google8protobuf5Arena26RegisterDestructorInternalINS0_11MapValueRefEEEvPT_PS1_St17integral_constantIbLb1EE; google::protobuf::Arena::RegisterDestructorInternal<google::protobuf::MapValueRef>(google::protobuf::MapValueRef *,google::protobuf::Arena*,std::integral_constant<bool,true>)
loc_1DAE9E:
add rsp, 28h
retn
| void google::protobuf::Arena::CreateInArenaStorage<google::protobuf::MapValueRef,google::protobuf::MapValueRef const&>(
long long a1,
long long a2,
long long a3)
{
google::protobuf::Arena::CreateInArenaStorageInternal<google::protobuf::MapValueRef,google::protobuf::MapValueRef const&>(
a1,
a2,
a3);
if ( a2 )
google::protobuf::Arena::RegisterDestructorInternal<google::protobuf::MapValueRef>();
}
| _M_bucket_index:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RDI + 0x8]
CALL 0x001dbc60
ADD RSP,0x18
RET
|
/* std::_Hashtable<std::__cxx11::string, std::pair<std::__cxx11::string const,
std::function<std::unique_ptr<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase,
std::default_delete<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase> > ()> >,
std::allocator<std::pair<std::__cxx11::string const,
std::function<std::unique_ptr<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase,
std::default_delete<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase> > ()> > >,
std::__detail::_Select1st, std::equal_to<std::__cxx11::string >, std::hash<std::__cxx11::string
>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash,
std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true>
>::_M_bucket_index(unsigned long) const */
void __thiscall
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::function<std::unique_ptr<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase,std::default_delete<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase>>()>>,std::allocator<std::pair<std::__cxx11::string_const,std::function<std::unique_ptr<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase,std::default_delete<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase>>()>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::_M_bucket_index(_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::function<std::unique_ptr<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase,std::default_delete<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase>>()>>,std::allocator<std::pair<std::__cxx11::string_const,std::function<std::unique_ptr<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase,std::default_delete<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase>>()>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*this,ulong param_1)
{
__detail::
_Hash_code_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::function<std::unique_ptr<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase,std::default_delete<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase>>()>>,std::__detail::_Select1st,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,true>
::_M_bucket_index((_Hash_code_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::function<std::unique_ptr<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase,std::default_delete<aimrt_mujoco_sim::mujoco_sim_module::subscriber::SubscriberBase>>()>>,std::__detail::_Select1st,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,true>
*)this,param_1,*(ulong *)(this + 8));
return;
}
| |
39,379 | google::protobuf::UnknownFieldSet::AddVarint(int, unsigned long) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/unknown_field_set.cc | void UnknownFieldSet::AddVarint(int number, uint64_t value) {
UnknownField field;
field.number_ = number;
field.SetType(UnknownField::TYPE_VARINT);
field.data_.varint_ = value;
fields_.push_back(field);
} | O3 | cpp | google::protobuf::UnknownFieldSet::AddVarint(int, unsigned long):
subq $0x18, %rsp
movl %esi, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x87ca0
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rdi)
jmp 0x87caa
leaq 0x8(%rsp), %rdx
callq 0x885a6
addq $0x18, %rsp
retq
nop
| _ZN6google8protobuf15UnknownFieldSet9AddVarintEim:
sub rsp, 18h
mov dword ptr [rsp+18h+var_10], esi
mov dword ptr [rsp+18h+var_10+4], 0
mov qword ptr [rsp+18h+var_10+8], rdx
mov rsi, [rdi+8]
cmp rsi, [rdi+10h]
jz short loc_87CA0
movups xmm0, [rsp+18h+var_10]
movups xmmword ptr [rsi], xmm0
add qword ptr [rdi+8], 10h
jmp short loc_87CAA
loc_87CA0:
lea rdx, [rsp+18h+var_10]
call _ZNSt6vectorIN6google8protobuf12UnknownFieldESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_; std::vector<google::protobuf::UnknownField>::_M_realloc_insert<google::protobuf::UnknownField const&>(__gnu_cxx::__normal_iterator<google::protobuf::UnknownField*,std::vector<google::protobuf::UnknownField>>,google::protobuf::UnknownField const&)
loc_87CAA:
add rsp, 18h
retn
| long long google::protobuf::UnknownFieldSet::AddVarint(
google::protobuf::UnknownFieldSet *this,
unsigned int a2,
long long a3)
{
_OWORD *v3; // rsi
long long result; // rax
__int128 v5; // [rsp+8h] [rbp-10h] BYREF
*(_QWORD *)&v5 = a2;
*((_QWORD *)&v5 + 1) = a3;
v3 = (_OWORD *)*((_QWORD *)this + 1);
if ( v3 == *((_OWORD **)this + 2) )
return std::vector<google::protobuf::UnknownField>::_M_realloc_insert<google::protobuf::UnknownField const&>(
this,
v3,
&v5);
*v3 = v5;
*((_QWORD *)this + 1) += 16LL;
return result;
}
| AddVarint:
SUB RSP,0x18
MOV dword ptr [RSP + 0x8],ESI
MOV dword ptr [RSP + 0xc],0x0
MOV qword ptr [RSP + 0x10],RDX
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JZ 0x00187ca0
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
MOVUPS xmmword ptr [RSI],XMM0
ADD qword ptr [RDI + 0x8],0x10
JMP 0x00187caa
LAB_00187ca0:
LEA RDX,[RSP + 0x8]
CALL 0x001885a6
LAB_00187caa:
ADD RSP,0x18
RET
|
/* google::protobuf::UnknownFieldSet::AddVarint(int, unsigned long) */
void __thiscall
google::protobuf::UnknownFieldSet::AddVarint(UnknownFieldSet *this,int param_1,ulong param_2)
{
ulong *puVar1;
int local_10 [2];
ulong uStack_8;
local_10[1] = 0;
puVar1 = *(ulong **)(this + 8);
if (puVar1 == *(ulong **)(this + 0x10)) {
local_10[0] = param_1;
uStack_8 = param_2;
std::vector<google::protobuf::UnknownField,std::allocator<google::protobuf::UnknownField>>::
_M_realloc_insert<google::protobuf::UnknownField_const&>
((vector<google::protobuf::UnknownField,std::allocator<google::protobuf::UnknownField>>
*)this,puVar1,local_10);
}
else {
*puVar1 = (ulong)(uint)param_1;
puVar1[1] = param_2;
*(long *)(this + 8) = *(long *)(this + 8) + 0x10;
}
return;
}
| |
39,380 | mysql_local_infile_read | eloqsql/libmariadb/libmariadb/ma_loaddata.c | static
int mysql_local_infile_read(void *ptr, char * buf, unsigned int buf_len)
{
MYSQL_INFILE_INFO *info = (MYSQL_INFILE_INFO *)ptr;
size_t count;
count= ma_read((void *)buf, 1, (size_t)buf_len, info->fp);
if (count == (size_t)-1)
{
info->error_no = errno;
snprintf((char *)info->error_msg, sizeof(info->error_msg),
CER(CR_FILE_READ), info->filename, info->error_no);
}
return((int)count);
} | O3 | c | mysql_local_infile_read:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rbx
movl %edx, %edx
movq (%rdi), %rcx
movl $0x1, %esi
movq %rax, %rdi
callq 0x2a81a
movq %rax, %r14
cmpq $-0x1, %rax
jne 0x255e3
callq 0x13060
movl (%rax), %eax
movl %eax, 0x8(%rbx)
leaq 0x268e8(%rip), %rcx # 0x4bea0
movq 0x28(%rcx), %r8
movq 0x210(%rbx), %r9
addq $0xc, %rbx
movl %eax, (%rsp)
movl $0x201, %esi # imm = 0x201
movl $0x201, %ecx # imm = 0x201
movq %rbx, %rdi
movl $0x1, %edx
xorl %eax, %eax
callq 0x132c0
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| mysql_local_infile_read:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov rax, rsi
mov rbx, rdi
mov edx, edx
mov rcx, [rdi]
mov esi, 1
mov rdi, rax
call ma_read
mov r14, rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_255E3
call ___errno_location
mov eax, [rax]
mov [rbx+8], eax
lea rcx, mariadb_client_errors
mov r8, [rcx+28h]
mov r9, [rbx+210h]
add rbx, 0Ch
mov [rsp+20h+var_20], eax
mov esi, 201h
mov ecx, 201h
mov rdi, rbx
mov edx, 1
xor eax, eax
call ___snprintf_chk
loc_255E3:
mov eax, r14d
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
| long long mysql_local_infile_read(long long a1, long long a2, unsigned int a3)
{
long long v3; // r14
int v4; // eax
v3 = ma_read(a2, 1LL, a3, *(_QWORD *)a1);
if ( v3 == -1 )
{
v4 = *(_DWORD *)__errno_location(a2);
*(_DWORD *)(a1 + 8) = v4;
__snprintf_chk(a1 + 12, 513LL, 1LL, 513LL, mariadb_client_errors[5], *(_QWORD *)(a1 + 528), v4);
}
return (unsigned int)v3;
}
| mysql_local_infile_read:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RAX,RSI
MOV RBX,RDI
MOV EDX,EDX
MOV RCX,qword ptr [RDI]
MOV ESI,0x1
MOV RDI,RAX
CALL 0x0012a81a
MOV R14,RAX
CMP RAX,-0x1
JNZ 0x001255e3
CALL 0x00113060
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBX + 0x8],EAX
LEA RCX,[0x14bea0]
MOV R8,qword ptr [RCX + 0x28]
MOV R9,qword ptr [RBX + 0x210]
ADD RBX,0xc
MOV dword ptr [RSP],EAX
MOV ESI,0x201
MOV ECX,0x201
MOV RDI,RBX
MOV EDX,0x1
XOR EAX,EAX
CALL 0x001132c0
LAB_001255e3:
MOV EAX,R14D
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
|
ulong mysql_local_infile_read(int8 *param_1,int8 param_2,int4 param_3)
{
int iVar1;
ulong uVar2;
int *piVar3;
uVar2 = ma_read(param_2,1,param_3,*param_1);
if (uVar2 == 0xffffffffffffffff) {
piVar3 = __errno_location();
iVar1 = *piVar3;
*(int *)(param_1 + 1) = iVar1;
__snprintf_chk((long)param_1 + 0xc,0x201,1,0x201,mariadb_client_errors._40_8_,param_1[0x42],
iVar1);
}
return uVar2 & 0xffffffff;
}
| |
39,381 | rlp_decode | corpus-core[P]colibri-stateless/src/chains/eth/verifier/rlp.c | INTERNAL rlp_type_t rlp_decode(bytes_t* src, int index, bytes_t* target) {
size_t pos = 0, src_idx = 0;
for (; src_idx < src->len; src_idx++, pos++) {
uint8_t c = src->data[src_idx];
if (c < 0x80) {
if ((int) pos == index)
return check_range(target, src, 1, src->data + src_idx, 1);
}
else if (c < 0xb8) {
if ((int) pos == index)
return check_range(target, src, c - 0x80, src->data + src_idx + 1, RLP_ITEM);
src_idx += c - 0x80;
}
else if (c < 0xc0) {
size_t len, n;
for (len = 0, n = 0; n < (uint8_t) (c - 0xB7); n++)
len |= (*(src->data + src_idx + 1 + n)) << (8 * ((c - 0xb7) - n - 1));
if ((int) pos == index) return check_range(target, src, len, src->data + src_idx + c - 0xb7 + 1, RLP_ITEM);
src_idx += len + c - 0xb7;
}
else if (c < 0xf8) {
size_t len = c - 0xc0;
if ((int) pos == index)
return check_range(target, src, len, src->data + src_idx + 1, RLP_LIST);
src_idx += len;
}
else {
size_t len = 0;
for (size_t i = 0; i < (uint8_t) (c - 0xF7); i++)
len |= (*(src->data + src_idx + 1 + i)) << (8 * ((c - 0xf7) - i - 1));
if ((int) pos == index)
return check_range(target, src, len, src->data + src_idx + c - 0xf7 + 1, RLP_LIST);
src_idx += len + c - 0xf7;
}
}
if (index < 0) return src_idx == src->len ? (rlp_type_t) pos : RLP_OUT_OF_RANGE;
return (src_idx > src->len) ? RLP_OUT_OF_RANGE : RLP_NOT_FOUND;
} | O0 | c | rlp_decode:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
jae 0x365aa
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x31(%rbp)
movzbl -0x31(%rbp), %eax
cmpl $0x80, %eax
jge 0x3630d
movq -0x28(%rbp), %rax
cmpl -0x14(%rbp), %eax
jne 0x36308
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq -0x30(%rbp), %rcx
movl $0x1, %edx
movl $0x1, %r8d
callq 0x36610
movl %eax, -0x4(%rbp)
jmp 0x365f9
jmp 0x3658b
movzbl -0x31(%rbp), %eax
cmpl $0xb8, %eax
jge 0x36370
movq -0x28(%rbp), %rax
cmpl -0x14(%rbp), %eax
jne 0x36358
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movzbl -0x31(%rbp), %eax
subl $0x80, %eax
movslq %eax, %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq -0x30(%rbp), %rcx
addq $0x1, %rcx
movl $0x1, %r8d
callq 0x36610
movl %eax, -0x4(%rbp)
jmp 0x365f9
movzbl -0x31(%rbp), %eax
subl $0x80, %eax
cltq
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x36589
movzbl -0x31(%rbp), %eax
cmpl $0xc0, %eax
jge 0x36453
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movzbl -0x31(%rbp), %ecx
subl $0xb7, %ecx
movzbl %cl, %ecx
cmpq %rcx, %rax
jae 0x363ed
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl 0x1(%rax,%rcx), %eax
movzbl -0x31(%rbp), %ecx
subl $0xb7, %ecx
movslq %ecx, %rcx
subq -0x48(%rbp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
shll %cl, %eax
cltq
orq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x3638f
movq -0x28(%rbp), %rax
cmpl -0x14(%rbp), %eax
jne 0x36435
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq -0x30(%rbp), %rcx
movzbl -0x31(%rbp), %eax
cltq
addq %rax, %rcx
addq $-0xb7, %rcx
addq $0x1, %rcx
movl $0x1, %r8d
callq 0x36610
movl %eax, -0x4(%rbp)
jmp 0x365f9
movq -0x40(%rbp), %rax
movzbl -0x31(%rbp), %ecx
addq %rcx, %rax
subq $0xb7, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x36587
movzbl -0x31(%rbp), %eax
cmpl $0xf8, %eax
jge 0x364b6
movzbl -0x31(%rbp), %eax
subl $0xc0, %eax
cltq
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
cmpl -0x14(%rbp), %eax
jne 0x364a5
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq -0x30(%rbp), %rcx
addq $0x1, %rcx
movl $0x2, %r8d
callq 0x36610
movl %eax, -0x4(%rbp)
jmp 0x365f9
movq -0x50(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x36585
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x60(%rbp), %rax
movzbl -0x31(%rbp), %ecx
subl $0xf7, %ecx
movzbl %cl, %ecx
cmpq %rcx, %rax
jae 0x36524
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x30(%rbp), %rax
movq -0x60(%rbp), %rcx
movzbl 0x1(%rax,%rcx), %eax
movzbl -0x31(%rbp), %ecx
subl $0xf7, %ecx
movslq %ecx, %rcx
subq -0x60(%rbp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
shll %cl, %eax
cltq
orq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x364c6
movq -0x28(%rbp), %rax
cmpl -0x14(%rbp), %eax
jne 0x3656c
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq -0x30(%rbp), %rcx
movzbl -0x31(%rbp), %eax
cltq
addq %rax, %rcx
addq $-0xf7, %rcx
addq $0x1, %rcx
movl $0x2, %r8d
callq 0x36610
movl %eax, -0x4(%rbp)
jmp 0x365f9
movq -0x58(%rbp), %rax
movzbl -0x31(%rbp), %ecx
addq %rcx, %rax
subq $0xf7, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x36587
jmp 0x36589
jmp 0x3658b
jmp 0x3658d
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x362a3
cmpl $0x0, -0x14(%rbp)
jge 0x365da
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
jne 0x365c8
movq -0x28(%rbp), %rax
movl %eax, -0x64(%rbp)
jmp 0x365d2
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x64(%rbp)
jmp 0x365d2
movl -0x64(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x365f9
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
cmoval %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rlp_decode:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], 0
mov [rbp+var_30], 0
loc_362A3:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov ecx, [rcx]
cmp rax, rcx
jnb loc_365AA
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_30]
mov al, [rax+rcx]
mov [rbp+var_31], al
movzx eax, [rbp+var_31]
cmp eax, 80h
jge short loc_3630D
mov rax, [rbp+var_28]
cmp eax, [rbp+var_14]
jnz short loc_36308
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rcx, [rax+8]
add rcx, [rbp+var_30]
mov edx, 1
mov r8d, 1
call check_range
mov [rbp+var_4], eax
jmp loc_365F9
loc_36308:
jmp loc_3658B
loc_3630D:
movzx eax, [rbp+var_31]
cmp eax, 0B8h
jge short loc_36370
mov rax, [rbp+var_28]
cmp eax, [rbp+var_14]
jnz short loc_36358
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
movzx eax, [rbp+var_31]
sub eax, 80h
movsxd rdx, eax
mov rax, [rbp+var_10]
mov rcx, [rax+8]
add rcx, [rbp+var_30]
add rcx, 1
mov r8d, 1
call check_range
mov [rbp+var_4], eax
jmp loc_365F9
loc_36358:
movzx eax, [rbp+var_31]
sub eax, 80h
cdqe
add rax, [rbp+var_30]
mov [rbp+var_30], rax
jmp loc_36589
loc_36370:
movzx eax, [rbp+var_31]
cmp eax, 0C0h
jge loc_36453
mov [rbp+var_40], 0
mov [rbp+var_48], 0
loc_3638F:
mov rax, [rbp+var_48]
movzx ecx, [rbp+var_31]
sub ecx, 0B7h
movzx ecx, cl
cmp rax, rcx
jnb short loc_363ED
mov rax, [rbp+var_10]
mov rax, [rax+8]
add rax, [rbp+var_30]
mov rcx, [rbp+var_48]
movzx eax, byte ptr [rax+rcx+1]
movzx ecx, [rbp+var_31]
sub ecx, 0B7h
movsxd rcx, ecx
sub rcx, [rbp+var_48]
sub rcx, 1
shl rcx, 3
shl eax, cl
cdqe
or rax, [rbp+var_40]
mov [rbp+var_40], rax
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
jmp short loc_3638F
loc_363ED:
mov rax, [rbp+var_28]
cmp eax, [rbp+var_14]
jnz short loc_36435
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_40]
mov rax, [rbp+var_10]
mov rcx, [rax+8]
add rcx, [rbp+var_30]
movzx eax, [rbp+var_31]
cdqe
add rcx, rax
add rcx, 0FFFFFFFFFFFFFF49h
add rcx, 1
mov r8d, 1
call check_range
mov [rbp+var_4], eax
jmp loc_365F9
loc_36435:
mov rax, [rbp+var_40]
movzx ecx, [rbp+var_31]
add rax, rcx
sub rax, 0B7h
add rax, [rbp+var_30]
mov [rbp+var_30], rax
jmp loc_36587
loc_36453:
movzx eax, [rbp+var_31]
cmp eax, 0F8h
jge short loc_364B6
movzx eax, [rbp+var_31]
sub eax, 0C0h
cdqe
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
cmp eax, [rbp+var_14]
jnz short loc_364A5
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_50]
mov rax, [rbp+var_10]
mov rcx, [rax+8]
add rcx, [rbp+var_30]
add rcx, 1
mov r8d, 2
call check_range
mov [rbp+var_4], eax
jmp loc_365F9
loc_364A5:
mov rax, [rbp+var_50]
add rax, [rbp+var_30]
mov [rbp+var_30], rax
jmp loc_36585
loc_364B6:
mov [rbp+var_58], 0
mov [rbp+var_60], 0
loc_364C6:
mov rax, [rbp+var_60]
movzx ecx, [rbp+var_31]
sub ecx, 0F7h
movzx ecx, cl
cmp rax, rcx
jnb short loc_36524
mov rax, [rbp+var_10]
mov rax, [rax+8]
add rax, [rbp+var_30]
mov rcx, [rbp+var_60]
movzx eax, byte ptr [rax+rcx+1]
movzx ecx, [rbp+var_31]
sub ecx, 0F7h
movsxd rcx, ecx
sub rcx, [rbp+var_60]
sub rcx, 1
shl rcx, 3
shl eax, cl
cdqe
or rax, [rbp+var_58]
mov [rbp+var_58], rax
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_364C6
loc_36524:
mov rax, [rbp+var_28]
cmp eax, [rbp+var_14]
jnz short loc_3656C
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_58]
mov rax, [rbp+var_10]
mov rcx, [rax+8]
add rcx, [rbp+var_30]
movzx eax, [rbp+var_31]
cdqe
add rcx, rax
add rcx, 0FFFFFFFFFFFFFF09h
add rcx, 1
mov r8d, 2
call check_range
mov [rbp+var_4], eax
jmp loc_365F9
loc_3656C:
mov rax, [rbp+var_58]
movzx ecx, [rbp+var_31]
add rax, rcx
sub rax, 0F7h
add rax, [rbp+var_30]
mov [rbp+var_30], rax
loc_36585:
jmp short $+2
loc_36587:
jmp short $+2
loc_36589:
jmp short $+2
loc_3658B:
jmp short $+2
loc_3658D:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp loc_362A3
loc_365AA:
cmp [rbp+var_14], 0
jge short loc_365DA
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov ecx, [rcx]
cmp rax, rcx
jnz short loc_365C8
mov rax, [rbp+var_28]
mov [rbp+var_64], eax
jmp short loc_365D2
loc_365C8:
mov eax, 0FFFFFFFFh
mov [rbp+var_64], eax
jmp short $+2
loc_365D2:
mov eax, [rbp+var_64]
mov [rbp+var_4], eax
jmp short loc_365F9
loc_365DA:
mov rdx, [rbp+var_30]
mov rax, [rbp+var_10]
mov eax, [rax]
mov esi, eax
mov eax, 0FFFFFFFEh
mov ecx, 0FFFFFFFFh
cmp rdx, rsi
cmova eax, ecx
mov [rbp+var_4], eax
loc_365F9:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
| long long rlp_decode(unsigned int *a1, int a2, long long a3)
{
unsigned int v3; // eax
unsigned long long j; // [rsp+10h] [rbp-60h]
long long v7; // [rsp+18h] [rbp-58h]
long long v8; // [rsp+20h] [rbp-50h]
unsigned long long k; // [rsp+28h] [rbp-48h]
long long v10; // [rsp+30h] [rbp-40h]
unsigned __int8 v11; // [rsp+3Fh] [rbp-31h]
unsigned long long i; // [rsp+40h] [rbp-30h]
unsigned int v13; // [rsp+48h] [rbp-28h]
v13 = 0;
for ( i = 0LL; i < *a1; ++i )
{
v11 = *(_BYTE *)(*((_QWORD *)a1 + 1) + i);
if ( v11 >= 0x80u )
{
if ( v11 >= 0xB8u )
{
if ( v11 >= 0xC0u )
{
if ( v11 >= 0xF8u )
{
v7 = 0LL;
for ( j = 0LL; j < (unsigned __int8)(v11 + 9); ++j )
v7 |= *(unsigned __int8 *)(i + *((_QWORD *)a1 + 1) + j + 1) << (8 * (v11 + 9 - j - 1));
if ( v13 == a2 )
return (unsigned int)check_range(a3, a1, v7, v11 + i + *((_QWORD *)a1 + 1) - 247 + 1, 2LL);
i += v11 + v7 - 247;
}
else
{
v8 = v11 - 192;
if ( v13 == a2 )
return (unsigned int)check_range(a3, a1, v8, i + *((_QWORD *)a1 + 1) + 1, 2LL);
i += v8;
}
}
else
{
v10 = 0LL;
for ( k = 0LL; k < (unsigned __int8)(v11 + 73); ++k )
v10 |= *(unsigned __int8 *)(i + *((_QWORD *)a1 + 1) + k + 1) << (8 * (v11 + 73 - k - 1));
if ( v13 == a2 )
return (unsigned int)check_range(a3, a1, v10, v11 + i + *((_QWORD *)a1 + 1) - 183 + 1, 1LL);
i += v11 + v10 - 183;
}
}
else
{
if ( v13 == a2 )
return (unsigned int)check_range(a3, a1, v11 - 128, i + *((_QWORD *)a1 + 1) + 1, 1LL);
i += v11 - 128;
}
}
else if ( v13 == a2 )
{
return (unsigned int)check_range(a3, a1, 1LL, i + *((_QWORD *)a1 + 1), 1LL);
}
++v13;
}
if ( a2 >= 0 )
{
v3 = -2;
if ( i > *a1 )
return (unsigned int)-1;
return v3;
}
else if ( i == *a1 )
{
return v13;
}
else
{
return (unsigned int)-1;
}
}
| rlp_decode:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],0x0
MOV qword ptr [RBP + -0x30],0x0
LAB_001362a3:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX]
CMP RAX,RCX
JNC 0x001365aa
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x30]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x31],AL
MOVZX EAX,byte ptr [RBP + -0x31]
CMP EAX,0x80
JGE 0x0013630d
MOV RAX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x14]
JNZ 0x00136308
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,qword ptr [RBP + -0x30]
MOV EDX,0x1
MOV R8D,0x1
CALL 0x00136610
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001365f9
LAB_00136308:
JMP 0x0013658b
LAB_0013630d:
MOVZX EAX,byte ptr [RBP + -0x31]
CMP EAX,0xb8
JGE 0x00136370
MOV RAX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x14]
JNZ 0x00136358
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RBP + -0x31]
SUB EAX,0x80
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,qword ptr [RBP + -0x30]
ADD RCX,0x1
MOV R8D,0x1
CALL 0x00136610
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001365f9
LAB_00136358:
MOVZX EAX,byte ptr [RBP + -0x31]
SUB EAX,0x80
CDQE
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00136589
LAB_00136370:
MOVZX EAX,byte ptr [RBP + -0x31]
CMP EAX,0xc0
JGE 0x00136453
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x48],0x0
LAB_0013638f:
MOV RAX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RBP + -0x31]
SUB ECX,0xb7
MOVZX ECX,CL
CMP RAX,RCX
JNC 0x001363ed
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
MOVZX ECX,byte ptr [RBP + -0x31]
SUB ECX,0xb7
MOVSXD RCX,ECX
SUB RCX,qword ptr [RBP + -0x48]
SUB RCX,0x1
SHL RCX,0x3
SHL EAX,CL
CDQE
OR RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0013638f
LAB_001363ed:
MOV RAX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x14]
JNZ 0x00136435
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RBP + -0x31]
CDQE
ADD RCX,RAX
ADD RCX,-0xb7
ADD RCX,0x1
MOV R8D,0x1
CALL 0x00136610
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001365f9
LAB_00136435:
MOV RAX,qword ptr [RBP + -0x40]
MOVZX ECX,byte ptr [RBP + -0x31]
ADD RAX,RCX
SUB RAX,0xb7
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00136587
LAB_00136453:
MOVZX EAX,byte ptr [RBP + -0x31]
CMP EAX,0xf8
JGE 0x001364b6
MOVZX EAX,byte ptr [RBP + -0x31]
SUB EAX,0xc0
CDQE
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x14]
JNZ 0x001364a5
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,qword ptr [RBP + -0x30]
ADD RCX,0x1
MOV R8D,0x2
CALL 0x00136610
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001365f9
LAB_001364a5:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00136585
LAB_001364b6:
MOV qword ptr [RBP + -0x58],0x0
MOV qword ptr [RBP + -0x60],0x0
LAB_001364c6:
MOV RAX,qword ptr [RBP + -0x60]
MOVZX ECX,byte ptr [RBP + -0x31]
SUB ECX,0xf7
MOVZX ECX,CL
CMP RAX,RCX
JNC 0x00136524
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x60]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
MOVZX ECX,byte ptr [RBP + -0x31]
SUB ECX,0xf7
MOVSXD RCX,ECX
SUB RCX,qword ptr [RBP + -0x60]
SUB RCX,0x1
SHL RCX,0x3
SHL EAX,CL
CDQE
OR RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001364c6
LAB_00136524:
MOV RAX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x14]
JNZ 0x0013656c
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RBP + -0x31]
CDQE
ADD RCX,RAX
ADD RCX,-0xf7
ADD RCX,0x1
MOV R8D,0x2
CALL 0x00136610
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001365f9
LAB_0013656c:
MOV RAX,qword ptr [RBP + -0x58]
MOVZX ECX,byte ptr [RBP + -0x31]
ADD RAX,RCX
SUB RAX,0xf7
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
LAB_00136585:
JMP 0x00136587
LAB_00136587:
JMP 0x00136589
LAB_00136589:
JMP 0x0013658b
LAB_0013658b:
JMP 0x0013658d
LAB_0013658d:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001362a3
LAB_001365aa:
CMP dword ptr [RBP + -0x14],0x0
JGE 0x001365da
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX]
CMP RAX,RCX
JNZ 0x001365c8
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x64],EAX
JMP 0x001365d2
LAB_001365c8:
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x64],EAX
JMP 0x001365d2
LAB_001365d2:
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001365f9
LAB_001365da:
MOV RDX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV ESI,EAX
MOV EAX,0xfffffffe
MOV ECX,0xffffffff
CMP RDX,RSI
CMOVA EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_001365f9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
int rlp_decode(uint *param_1,int param_2,int8 param_3)
{
byte bVar1;
int iVar2;
long lVar3;
int local_6c;
ulong local_68;
ulong local_60;
ulong local_50;
ulong local_48;
ulong local_38;
int local_c;
local_6c = 0;
local_38 = 0;
do {
if (*param_1 <= local_38) {
if (param_2 < 0) {
if (local_38 != *param_1) {
local_6c = -1;
}
local_c = local_6c;
}
else {
local_c = -2;
if (*param_1 < local_38) {
local_c = -1;
}
}
return local_c;
}
bVar1 = *(byte *)(*(long *)(param_1 + 2) + local_38);
if (bVar1 < 0x80) {
if (local_6c == param_2) {
iVar2 = check_range(param_3,param_1,1,*(long *)(param_1 + 2) + local_38,1);
return iVar2;
}
}
else {
if (bVar1 < 0xb8) {
if (local_6c == param_2) {
iVar2 = check_range(param_3,param_1,(long)(int)(bVar1 - 0x80),
*(long *)(param_1 + 2) + local_38 + 1,1);
return iVar2;
}
lVar3 = (long)(int)(bVar1 - 0x80);
}
else if (bVar1 < 0xc0) {
local_48 = 0;
for (local_50 = 0; local_50 < (bVar1 - 0xb7 & 0xff); local_50 = local_50 + 1) {
local_48 = (long)(int)((uint)*(byte *)(*(long *)(param_1 + 2) + local_38 + 1 + local_50)
<< (((bVar1 - (char)local_50) + 'H') * '\b' & 0x1f)) | local_48;
}
if (local_6c == param_2) {
iVar2 = check_range(param_3,param_1,local_48,
*(long *)(param_1 + 2) + local_38 + (long)(int)(uint)bVar1 + -0xb6,1);
return iVar2;
}
lVar3 = local_48 + bVar1 + -0xb7;
}
else if (bVar1 < 0xf8) {
lVar3 = (long)(int)(bVar1 - 0xc0);
if (local_6c == param_2) {
iVar2 = check_range(param_3,param_1,lVar3,*(long *)(param_1 + 2) + local_38 + 1,2);
return iVar2;
}
}
else {
local_60 = 0;
for (local_68 = 0; local_68 < (bVar1 - 0xf7 & 0xff); local_68 = local_68 + 1) {
local_60 = (long)(int)((uint)*(byte *)(*(long *)(param_1 + 2) + local_38 + 1 + local_68)
<< (((bVar1 - (char)local_68) + '\b') * '\b' & 0x1f)) | local_60;
}
if (local_6c == param_2) {
iVar2 = check_range(param_3,param_1,local_60,
*(long *)(param_1 + 2) + local_38 + (long)(int)(uint)bVar1 + -0xf6,2);
return iVar2;
}
lVar3 = local_60 + bVar1 + -0xf7;
}
local_38 = lVar3 + local_38;
}
local_38 = local_38 + 1;
local_6c = local_6c + 1;
} while( true );
}
| |
39,382 | rlp_decode | corpus-core[P]colibri-stateless/src/chains/eth/verifier/rlp.c | INTERNAL rlp_type_t rlp_decode(bytes_t* src, int index, bytes_t* target) {
size_t pos = 0, src_idx = 0;
for (; src_idx < src->len; src_idx++, pos++) {
uint8_t c = src->data[src_idx];
if (c < 0x80) {
if ((int) pos == index)
return check_range(target, src, 1, src->data + src_idx, 1);
}
else if (c < 0xb8) {
if ((int) pos == index)
return check_range(target, src, c - 0x80, src->data + src_idx + 1, RLP_ITEM);
src_idx += c - 0x80;
}
else if (c < 0xc0) {
size_t len, n;
for (len = 0, n = 0; n < (uint8_t) (c - 0xB7); n++)
len |= (*(src->data + src_idx + 1 + n)) << (8 * ((c - 0xb7) - n - 1));
if ((int) pos == index) return check_range(target, src, len, src->data + src_idx + c - 0xb7 + 1, RLP_ITEM);
src_idx += len + c - 0xb7;
}
else if (c < 0xf8) {
size_t len = c - 0xc0;
if ((int) pos == index)
return check_range(target, src, len, src->data + src_idx + 1, RLP_LIST);
src_idx += len;
}
else {
size_t len = 0;
for (size_t i = 0; i < (uint8_t) (c - 0xF7); i++)
len |= (*(src->data + src_idx + 1 + i)) << (8 * ((c - 0xf7) - i - 1));
if ((int) pos == index)
return check_range(target, src, len, src->data + src_idx + c - 0xf7 + 1, RLP_LIST);
src_idx += len + c - 0xf7;
}
}
if (index < 0) return src_idx == src->len ? (rlp_type_t) pos : RLP_OUT_OF_RANGE;
return (src_idx > src->len) ? RLP_OUT_OF_RANGE : RLP_NOT_FOUND;
} | O2 | c | rlp_decode:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rax
movl (%rdi), %edi
xorl %r8d, %r8d
xorl %r11d, %r11d
cmpq %rdi, %r8
jae 0x2df7d
movq 0x8(%rax), %r10
movzbl (%r10,%r8), %ebx
addq %r8, %r10
testb %bl, %bl
js 0x2deae
cmpl %esi, %r11d
jne 0x2df72
jmp 0x2df8e
cmpb $-0x49, %bl
ja 0x2dec7
leal -0x80(%rbx), %ecx
cmpl %esi, %r11d
je 0x2dfaf
addq %rcx, %r8
jmp 0x2df72
cmpb $-0x41, %bl
ja 0x2defe
leal -0xb7(%rbx), %ecx
movzbl %cl, %r14d
leal -0x5c0(,%rbx,8), %ecx
xorl %r9d, %r9d
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x2df13
movzbl 0x1(%r10,%r15), %ebp
shll %cl, %ebp
movslq %ebp, %r12
orq %r12, %r9
incq %r15
addl $-0x8, %ecx
jmp 0x2dee3
cmpb $-0x8, %bl
jae 0x2df2d
leal -0xc0(%rbx), %ecx
cmpl %esi, %r11d
jne 0x2debf
jmp 0x2dfe0
movl %ebx, %ecx
cmpl %esi, %r11d
je 0x2dfce
addq %rcx, %r8
addq %r9, %r8
addq $-0xb7, %r8
jmp 0x2df72
leal -0xf7(%rbx), %r14d
leal -0x7c0(,%rbx,8), %ecx
xorl %r9d, %r9d
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x2df5c
movzbl 0x1(%r10,%r15), %ebp
shll %cl, %ebp
movslq %ebp, %r12
orq %r12, %r9
incq %r15
addl $-0x8, %ecx
jmp 0x2df41
cmpl %esi, %r11d
je 0x2dfeb
addq %rbx, %r8
addq %r9, %r8
addq $-0xf7, %r8
incq %r8
incq %r11
jmp 0x2de87
testl %esi, %esi
js 0x2df9a
xorl %eax, %eax
cmpq %rdi, %r8
seta %al
orl $-0x2, %eax
jmp 0x2dfa6
movabsq $0x1, %rcx
jmp 0x2dfb2
cmpq %rdi, %r8
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmovel %r11d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
incq %r10
movl $0x1, %r8d
movq %rdx, %rdi
movq %rax, %rsi
movq %rcx, %rdx
movq %r10, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e007
addq %r10, %rcx
addq $-0xb6, %rcx
movl $0x1, %r8d
jmp 0x2dffc
incq %r10
movl $0x2, %r8d
jmp 0x2dfb8
leaq (%r10,%rbx), %rcx
addq $-0xf6, %rcx
movl $0x2, %r8d
movq %rdx, %rdi
movq %rax, %rsi
movq %r9, %rdx
jmp 0x2dfc4
| rlp_decode:
push rbp
push r15
push r14
push r12
push rbx
mov rax, rdi
mov edi, [rdi]
xor r8d, r8d
xor r11d, r11d
loc_2DE87:
cmp r8, rdi
jnb loc_2DF7D
mov r10, [rax+8]
movzx ebx, byte ptr [r10+r8]
add r10, r8
test bl, bl
js short loc_2DEAE
cmp r11d, esi
jnz loc_2DF72
jmp loc_2DF8E
loc_2DEAE:
cmp bl, 0B7h
ja short loc_2DEC7
lea ecx, [rbx-80h]
cmp r11d, esi
jz loc_2DFAF
loc_2DEBF:
add r8, rcx
jmp loc_2DF72
loc_2DEC7:
cmp bl, 0BFh
ja short loc_2DEFE
lea ecx, [rbx-0B7h]
movzx r14d, cl
lea ecx, ds:0FFFFFFFFFFFFFA40h[rbx*8]
xor r9d, r9d
xor r15d, r15d
loc_2DEE3:
cmp r14, r15
jz short loc_2DF13
movzx ebp, byte ptr [r10+r15+1]
shl ebp, cl
movsxd r12, ebp
or r9, r12
inc r15
add ecx, 0FFFFFFF8h
jmp short loc_2DEE3
loc_2DEFE:
cmp bl, 0F8h
jnb short loc_2DF2D
lea ecx, [rbx-0C0h]
cmp r11d, esi
jnz short loc_2DEBF
jmp loc_2DFE0
loc_2DF13:
mov ecx, ebx
cmp r11d, esi
jz loc_2DFCE
add r8, rcx
add r8, r9
add r8, 0FFFFFFFFFFFFFF49h
jmp short loc_2DF72
loc_2DF2D:
lea r14d, [rbx-0F7h]
lea ecx, ds:0FFFFFFFFFFFFF840h[rbx*8]
xor r9d, r9d
xor r15d, r15d
loc_2DF41:
cmp r14, r15
jz short loc_2DF5C
movzx ebp, byte ptr [r10+r15+1]
shl ebp, cl
movsxd r12, ebp
or r9, r12
inc r15
add ecx, 0FFFFFFF8h
jmp short loc_2DF41
loc_2DF5C:
cmp r11d, esi
jz loc_2DFEB
add r8, rbx
add r8, r9
add r8, 0FFFFFFFFFFFFFF09h
loc_2DF72:
inc r8
inc r11
jmp loc_2DE87
loc_2DF7D:
test esi, esi
js short loc_2DF9A
xor eax, eax
cmp r8, rdi
setnbe al
or eax, 0FFFFFFFEh
jmp short loc_2DFA6
loc_2DF8E:
mov rcx, 1
jmp short loc_2DFB2
loc_2DF9A:
cmp r8, rdi
mov eax, 0FFFFFFFFh
cmovz eax, r11d
loc_2DFA6:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_2DFAF:
inc r10
loc_2DFB2:
mov r8d, 1
loc_2DFB8:
mov rdi, rdx
mov rsi, rax
mov rdx, rcx
mov rcx, r10
loc_2DFC4:
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp short check_range
loc_2DFCE:
add rcx, r10
add rcx, 0FFFFFFFFFFFFFF4Ah
mov r8d, 1
jmp short loc_2DFFC
loc_2DFE0:
inc r10
mov r8d, 2
jmp short loc_2DFB8
loc_2DFEB:
lea rcx, [r10+rbx]
add rcx, 0FFFFFFFFFFFFFF0Ah
mov r8d, 2
loc_2DFFC:
mov rdi, rdx
mov rsi, rax
mov rdx, r9
jmp short loc_2DFC4
| long long rlp_decode(unsigned int *a1, int a2, long long a3)
{
unsigned long long v4; // rdi
unsigned long long v5; // r8
unsigned int v6; // r11d
long long v7; // r10
long long v8; // rbx
long long v9; // r10
int v10; // ecx
long long v11; // r9
long long j; // r15
int v13; // ecx
long long i; // r15
long long result; // rax
long long v16; // rcx
long long v17; // rdi
unsigned int *v18; // rsi
long long v19; // rdx
long long v20; // rcx
long long v21; // r8
v4 = *a1;
v5 = 0LL;
v6 = 0;
while ( v5 < v4 )
{
v7 = *((_QWORD *)a1 + 1);
v8 = *(unsigned __int8 *)(v7 + v5);
v9 = v5 + v7;
if ( (v8 & 0x80u) != 0LL )
{
if ( (unsigned __int8)v8 <= 0xB7u )
{
v16 = (unsigned int)(v8 - 128);
if ( v6 == a2 )
{
++v9;
goto LABEL_30;
}
goto LABEL_8;
}
if ( (unsigned __int8)v8 > 0xBFu )
{
if ( (unsigned __int8)v8 < 0xF8u )
{
v16 = (unsigned int)(v8 - 192);
if ( v6 == a2 )
{
++v9;
v21 = 2LL;
LABEL_31:
v17 = a3;
v18 = a1;
v19 = v16;
v20 = v9;
return check_range(v17, v18, v19, v20, v21);
}
LABEL_8:
v5 += v16;
goto LABEL_23;
}
v13 = 8 * v8 - 1984;
v11 = 0LL;
for ( i = 0LL; (_DWORD)v8 - 247 != i; ++i )
{
v11 = (*(unsigned __int8 *)(v9 + i + 1) << v13) | (unsigned long long)v11;
v13 -= 8;
}
if ( v6 == a2 )
{
v20 = v9 + v8 - 246;
v21 = 2LL;
LABEL_35:
v17 = a3;
v18 = a1;
v19 = v11;
return check_range(v17, v18, v19, v20, v21);
}
v5 = v11 + v8 + v5 - 247;
}
else
{
v10 = 8 * v8 - 1472;
v11 = 0LL;
for ( j = 0LL; (unsigned __int8)(v8 + 73) != j; ++j )
{
v11 = (*(unsigned __int8 *)(v9 + j + 1) << v10) | (unsigned long long)v11;
v10 -= 8;
}
if ( v6 == a2 )
{
v20 = v9 + (unsigned int)v8 - 182;
v21 = 1LL;
goto LABEL_35;
}
v5 = v11 + (unsigned int)v8 + v5 - 183;
}
}
else if ( v6 == a2 )
{
v16 = 1LL;
LABEL_30:
v21 = 1LL;
goto LABEL_31;
}
LABEL_23:
++v5;
++v6;
}
if ( a2 >= 0 )
return (v5 > v4) | 0xFFFFFFFE;
result = 0xFFFFFFFFLL;
if ( v5 == v4 )
return v6;
return result;
}
| rlp_decode:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RAX,RDI
MOV EDI,dword ptr [RDI]
XOR R8D,R8D
XOR R11D,R11D
LAB_0012de87:
CMP R8,RDI
JNC 0x0012df7d
MOV R10,qword ptr [RAX + 0x8]
MOVZX EBX,byte ptr [R10 + R8*0x1]
ADD R10,R8
TEST BL,BL
JS 0x0012deae
CMP R11D,ESI
JNZ 0x0012df72
JMP 0x0012df8e
LAB_0012deae:
CMP BL,0xb7
JA 0x0012dec7
LEA ECX,[RBX + -0x80]
CMP R11D,ESI
JZ 0x0012dfaf
LAB_0012debf:
ADD R8,RCX
JMP 0x0012df72
LAB_0012dec7:
CMP BL,0xbf
JA 0x0012defe
LEA ECX,[RBX + -0xb7]
MOVZX R14D,CL
LEA ECX,[-0x5c0 + RBX*0x8]
XOR R9D,R9D
XOR R15D,R15D
LAB_0012dee3:
CMP R14,R15
JZ 0x0012df13
MOVZX EBP,byte ptr [R10 + R15*0x1 + 0x1]
SHL EBP,CL
MOVSXD R12,EBP
OR R9,R12
INC R15
ADD ECX,-0x8
JMP 0x0012dee3
LAB_0012defe:
CMP BL,0xf8
JNC 0x0012df2d
LEA ECX,[RBX + -0xc0]
CMP R11D,ESI
JNZ 0x0012debf
JMP 0x0012dfe0
LAB_0012df13:
MOV ECX,EBX
CMP R11D,ESI
JZ 0x0012dfce
ADD R8,RCX
ADD R8,R9
ADD R8,-0xb7
JMP 0x0012df72
LAB_0012df2d:
LEA R14D,[RBX + -0xf7]
LEA ECX,[-0x7c0 + RBX*0x8]
XOR R9D,R9D
XOR R15D,R15D
LAB_0012df41:
CMP R14,R15
JZ 0x0012df5c
MOVZX EBP,byte ptr [R10 + R15*0x1 + 0x1]
SHL EBP,CL
MOVSXD R12,EBP
OR R9,R12
INC R15
ADD ECX,-0x8
JMP 0x0012df41
LAB_0012df5c:
CMP R11D,ESI
JZ 0x0012dfeb
ADD R8,RBX
ADD R8,R9
ADD R8,-0xf7
LAB_0012df72:
INC R8
INC R11
JMP 0x0012de87
LAB_0012df7d:
TEST ESI,ESI
JS 0x0012df9a
XOR EAX,EAX
CMP R8,RDI
SETA AL
OR EAX,0xfffffffe
JMP 0x0012dfa6
LAB_0012df8e:
MOV RCX,0x1
JMP 0x0012dfb2
LAB_0012df9a:
CMP R8,RDI
MOV EAX,0xffffffff
CMOVZ EAX,R11D
LAB_0012dfa6:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0012dfaf:
INC R10
LAB_0012dfb2:
MOV R8D,0x1
LAB_0012dfb8:
MOV RDI,RDX
MOV RSI,RAX
MOV RDX,RCX
MOV RCX,R10
LAB_0012dfc4:
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0012e007
LAB_0012dfce:
ADD RCX,R10
ADD RCX,-0xb6
MOV R8D,0x1
JMP 0x0012dffc
LAB_0012dfe0:
INC R10
MOV R8D,0x2
JMP 0x0012dfb8
LAB_0012dfeb:
LEA RCX,[R10 + RBX*0x1]
ADD RCX,-0xf6
MOV R8D,0x2
LAB_0012dffc:
MOV RDI,RDX
MOV RSI,RAX
MOV RDX,R9
JMP 0x0012dfc4
|
ulong rlp_decode(uint *param_1,uint param_2,int8 param_3)
{
byte bVar1;
ulong uVar2;
ulong uVar3;
byte bVar4;
ulong uVar5;
ulong uVar6;
int8 uVar7;
long lVar8;
uint uVar9;
ulong uVar10;
uVar3 = (ulong)*param_1;
uVar6 = 0;
uVar9 = 0;
do {
if (uVar3 <= uVar6) {
if ((int)param_2 < 0) {
uVar2 = 0xffffffff;
if (uVar6 == uVar3) {
uVar2 = (ulong)uVar9;
}
}
else {
uVar2 = (ulong)(uVar3 < uVar6 | 0xfffffffe);
}
return uVar2;
}
bVar1 = *(byte *)(*(long *)(param_1 + 2) + uVar6);
uVar2 = (ulong)bVar1;
lVar8 = *(long *)(param_1 + 2) + uVar6;
if ((char)bVar1 < '\0') {
if (bVar1 < 0xb8) {
uVar5 = (ulong)(bVar1 - 0x80);
if (uVar9 == param_2) {
lVar8 = lVar8 + 1;
goto LAB_0012dfb2;
}
LAB_0012debf:
uVar6 = uVar6 + uVar5;
}
else if (bVar1 < 0xc0) {
bVar4 = bVar1 * '\b' + 0x40;
uVar5 = 0;
for (uVar10 = 0; (bVar1 - 0xb7 & 0xff) != uVar10; uVar10 = uVar10 + 1) {
uVar5 = uVar5 | (long)(int)((uint)*(byte *)(lVar8 + 1 + uVar10) << (bVar4 & 0x1f));
bVar4 = bVar4 - 8;
}
if (uVar9 == param_2) {
lVar8 = uVar2 + lVar8 + -0xb6;
uVar7 = 1;
goto LAB_0012dfc4;
}
uVar6 = (uVar6 + uVar2 + uVar5) - 0xb7;
}
else {
if (bVar1 < 0xf8) {
uVar5 = (ulong)(bVar1 - 0xc0);
if (uVar9 == param_2) {
lVar8 = lVar8 + 1;
uVar7 = 2;
goto LAB_0012dfc4;
}
goto LAB_0012debf;
}
bVar4 = bVar1 * '\b' + 0x40;
uVar5 = 0;
for (uVar10 = 0; bVar1 - 0xf7 != uVar10; uVar10 = uVar10 + 1) {
uVar5 = uVar5 | (long)(int)((uint)*(byte *)(lVar8 + 1 + uVar10) << (bVar4 & 0x1f));
bVar4 = bVar4 - 8;
}
if (uVar9 == param_2) {
lVar8 = lVar8 + uVar2 + -0xf6;
uVar7 = 2;
goto LAB_0012dfc4;
}
uVar6 = (uVar6 + uVar2 + uVar5) - 0xf7;
}
}
else if (uVar9 == param_2) {
uVar5 = 1;
LAB_0012dfb2:
uVar7 = 1;
LAB_0012dfc4:
uVar3 = check_range(param_3,param_1,uVar5,lVar8,uVar7);
return uVar3;
}
uVar6 = uVar6 + 1;
uVar9 = uVar9 + 1;
} while( true );
}
| |
39,383 | rlp_decode | corpus-core[P]colibri-stateless/src/chains/eth/verifier/rlp.c | INTERNAL rlp_type_t rlp_decode(bytes_t* src, int index, bytes_t* target) {
size_t pos = 0, src_idx = 0;
for (; src_idx < src->len; src_idx++, pos++) {
uint8_t c = src->data[src_idx];
if (c < 0x80) {
if ((int) pos == index)
return check_range(target, src, 1, src->data + src_idx, 1);
}
else if (c < 0xb8) {
if ((int) pos == index)
return check_range(target, src, c - 0x80, src->data + src_idx + 1, RLP_ITEM);
src_idx += c - 0x80;
}
else if (c < 0xc0) {
size_t len, n;
for (len = 0, n = 0; n < (uint8_t) (c - 0xB7); n++)
len |= (*(src->data + src_idx + 1 + n)) << (8 * ((c - 0xb7) - n - 1));
if ((int) pos == index) return check_range(target, src, len, src->data + src_idx + c - 0xb7 + 1, RLP_ITEM);
src_idx += len + c - 0xb7;
}
else if (c < 0xf8) {
size_t len = c - 0xc0;
if ((int) pos == index)
return check_range(target, src, len, src->data + src_idx + 1, RLP_LIST);
src_idx += len;
}
else {
size_t len = 0;
for (size_t i = 0; i < (uint8_t) (c - 0xF7); i++)
len |= (*(src->data + src_idx + 1 + i)) << (8 * ((c - 0xf7) - i - 1));
if ((int) pos == index)
return check_range(target, src, len, src->data + src_idx + c - 0xf7 + 1, RLP_LIST);
src_idx += len + c - 0xf7;
}
}
if (index < 0) return src_idx == src->len ? (rlp_type_t) pos : RLP_OUT_OF_RANGE;
return (src_idx > src->len) ? RLP_OUT_OF_RANGE : RLP_NOT_FOUND;
} | O3 | c | rlp_decode:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl (%rdi), %r9d
testq %r9, %r9
je 0x2f68c
movq 0x8(%rdi), %rax
xorl %r10d, %r10d
xorl %r11d, %r11d
leaq (%rax,%r11), %r8
movzbl (%rax,%r11), %ebx
testb %bl, %bl
js 0x2f5a7
cmpl %esi, %r10d
jne 0x2f67b
jmp 0x2f6b7
cmpb $-0x49, %bl
ja 0x2f5c0
leal -0x80(%rbx), %ecx
cmpl %esi, %r10d
je 0x2f6f3
addq %rcx, %r11
jmp 0x2f67b
cmpb $-0x41, %bl
ja 0x2f5fc
leal -0xb7(%rbx), %ecx
movzbl %cl, %r15d
testl %r15d, %r15d
je 0x2f645
leal -0x5c0(,%rbx,8), %ecx
xorl %r12d, %r12d
xorl %r14d, %r14d
movzbl 0x1(%r8,%r12), %ebp
shll %cl, %ebp
movslq %ebp, %r13
orq %r13, %r14
incq %r12
addl $-0x8, %ecx
cmpq %r12, %r15
jne 0x2f5e1
jmp 0x2f648
cmpb $-0x8, %bl
jae 0x2f611
leal -0xc0(%rbx), %ecx
cmpl %esi, %r10d
jne 0x2f5b8
jmp 0x2f772
movl %ebx, %r15d
addl $0xffffff09, %r15d # imm = 0xFFFFFF09
je 0x2f662
leal -0x7c0(,%rbx,8), %ecx
xorl %r12d, %r12d
xorl %r14d, %r14d
movzbl 0x1(%r8,%r12), %ebp
shll %cl, %ebp
movslq %ebp, %r13
orq %r13, %r14
incq %r12
addl $-0x8, %ecx
cmpq %r12, %r15
jne 0x2f62a
jmp 0x2f665
xorl %r14d, %r14d
movl %ebx, %ecx
cmpl %esi, %r10d
je 0x2f72f
addq %rcx, %r11
addq %r14, %r11
addq $-0xb7, %r11
jmp 0x2f67b
xorl %r14d, %r14d
cmpl %esi, %r10d
je 0x2f7a2
addq %rbx, %r11
addq %r14, %r11
addq $-0xf7, %r11
incq %r11
incq %r10
cmpq %r9, %r11
jb 0x2f58c
jmp 0x2f692
xorl %r11d, %r11d
xorl %r10d, %r10d
testl %esi, %esi
js 0x2f6a6
xorl %eax, %eax
cmpq %r9, %r11
seta %al
orl $-0x2, %eax
jmp 0x2f7de
cmpq %r9, %r11
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmovel %r10d, %eax
jmp 0x2f7de
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x2f7de
movl $0x1, (%rdx)
movq %r8, 0x8(%rdx)
movq 0x8(%rdi), %rcx
cmpq %r8, %rcx
ja 0x2f7de
incq %r8
movl (%rdi), %eax
addq %rax, %rcx
xorl %eax, %eax
cmpq %r8, %rcx
sbbl %eax, %eax
orl $0x1, %eax
jmp 0x2f7de
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x2f7de
incq %r8
movl %ecx, (%rdx)
movq %r8, 0x8(%rdx)
movq 0x8(%rdi), %rdx
cmpq %r8, %rdx
ja 0x2f7de
addq %rcx, %r8
cmpq %rdx, %r8
jb 0x2f7de
movl (%rdi), %eax
addq %rax, %rdx
xorl %eax, %eax
cmpq %r8, %rdx
jmp 0x2f6e9
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x2f7de
addq %r8, %rcx
addq $-0xb6, %rcx
movl %r14d, (%rdx)
movq %rcx, 0x8(%rdx)
movq 0x8(%rdi), %rdx
cmpq %rcx, %rdx
ja 0x2f7de
addq %r14, %rcx
cmpq %rdx, %rcx
jb 0x2f7de
movl (%rdi), %eax
addq %rax, %rdx
xorl %eax, %eax
cmpq %rcx, %rdx
jmp 0x2f6e9
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x2f7de
incq %r8
movl %ecx, (%rdx)
movq %r8, 0x8(%rdx)
movq 0x8(%rdi), %rdx
cmpq %r8, %rdx
ja 0x2f7de
addq %rcx, %r8
cmpq %rdx, %r8
jb 0x2f7de
movl (%rdi), %eax
addq %rax, %rdx
xorl %eax, %eax
cmpq %r8, %rdx
jmp 0x2f7d9
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x2f7de
leaq (%r8,%rbx), %rcx
addq $-0xf6, %rcx
movl %r14d, (%rdx)
movq %rcx, 0x8(%rdx)
movq 0x8(%rdi), %rdx
cmpq %rcx, %rdx
ja 0x2f7de
addq %r14, %rcx
cmpq %rdx, %rcx
jb 0x2f7de
movl (%rdi), %eax
addq %rax, %rdx
xorl %eax, %eax
cmpq %rcx, %rdx
sbbl %eax, %eax
orl $0x2, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| rlp_decode:
push rbp
push r15
push r14
push r13
push r12
push rbx
mov r9d, [rdi]
test r9, r9
jz loc_2F68C
mov rax, [rdi+8]
xor r10d, r10d
xor r11d, r11d
loc_2F58C:
lea r8, [rax+r11]
movzx ebx, byte ptr [rax+r11]
test bl, bl
js short loc_2F5A7
cmp r10d, esi
jnz loc_2F67B
jmp loc_2F6B7
loc_2F5A7:
cmp bl, 0B7h
ja short loc_2F5C0
lea ecx, [rbx-80h]
cmp r10d, esi
jz loc_2F6F3
loc_2F5B8:
add r11, rcx
jmp loc_2F67B
loc_2F5C0:
cmp bl, 0BFh
ja short loc_2F5FC
lea ecx, [rbx-0B7h]
movzx r15d, cl
test r15d, r15d
jz short loc_2F645
lea ecx, ds:0FFFFFFFFFFFFFA40h[rbx*8]
xor r12d, r12d
xor r14d, r14d
loc_2F5E1:
movzx ebp, byte ptr [r8+r12+1]
shl ebp, cl
movsxd r13, ebp
or r14, r13
inc r12
add ecx, 0FFFFFFF8h
cmp r15, r12
jnz short loc_2F5E1
jmp short loc_2F648
loc_2F5FC:
cmp bl, 0F8h
jnb short loc_2F611
lea ecx, [rbx-0C0h]
cmp r10d, esi
jnz short loc_2F5B8
jmp loc_2F772
loc_2F611:
mov r15d, ebx
add r15d, 0FFFFFF09h
jz short loc_2F662
lea ecx, ds:0FFFFFFFFFFFFF840h[rbx*8]
xor r12d, r12d
xor r14d, r14d
loc_2F62A:
movzx ebp, byte ptr [r8+r12+1]
shl ebp, cl
movsxd r13, ebp
or r14, r13
inc r12
add ecx, 0FFFFFFF8h
cmp r15, r12
jnz short loc_2F62A
jmp short loc_2F665
loc_2F645:
xor r14d, r14d
loc_2F648:
mov ecx, ebx
cmp r10d, esi
jz loc_2F72F
add r11, rcx
add r11, r14
add r11, 0FFFFFFFFFFFFFF49h
jmp short loc_2F67B
loc_2F662:
xor r14d, r14d
loc_2F665:
cmp r10d, esi
jz loc_2F7A2
add r11, rbx
add r11, r14
add r11, 0FFFFFFFFFFFFFF09h
loc_2F67B:
inc r11
inc r10
cmp r11, r9
jb loc_2F58C
jmp short loc_2F692
loc_2F68C:
xor r11d, r11d
xor r10d, r10d
loc_2F692:
test esi, esi
js short loc_2F6A6
xor eax, eax
cmp r11, r9
setnbe al
or eax, 0FFFFFFFEh
jmp loc_2F7DE
loc_2F6A6:
cmp r11, r9
mov eax, 0FFFFFFFFh
cmovz eax, r10d
jmp loc_2F7DE
loc_2F6B7:
mov eax, 0FFFFFFFFh
test rdx, rdx
jz loc_2F7DE
mov dword ptr [rdx], 1
mov [rdx+8], r8
mov rcx, [rdi+8]
cmp rcx, r8
ja loc_2F7DE
inc r8
mov eax, [rdi]
add rcx, rax
xor eax, eax
cmp rcx, r8
loc_2F6E9:
sbb eax, eax
or eax, 1
jmp loc_2F7DE
loc_2F6F3:
mov eax, 0FFFFFFFFh
test rdx, rdx
jz loc_2F7DE
inc r8
mov [rdx], ecx
mov [rdx+8], r8
mov rdx, [rdi+8]
cmp rdx, r8
ja loc_2F7DE
add r8, rcx
cmp r8, rdx
jb loc_2F7DE
mov eax, [rdi]
add rdx, rax
xor eax, eax
cmp rdx, r8
jmp short loc_2F6E9
loc_2F72F:
mov eax, 0FFFFFFFFh
test rdx, rdx
jz loc_2F7DE
add rcx, r8
add rcx, 0FFFFFFFFFFFFFF4Ah
mov [rdx], r14d
mov [rdx+8], rcx
mov rdx, [rdi+8]
cmp rdx, rcx
ja loc_2F7DE
add rcx, r14
cmp rcx, rdx
jb short loc_2F7DE
mov eax, [rdi]
add rdx, rax
xor eax, eax
cmp rdx, rcx
jmp loc_2F6E9
loc_2F772:
mov eax, 0FFFFFFFFh
test rdx, rdx
jz short loc_2F7DE
inc r8
mov [rdx], ecx
mov [rdx+8], r8
mov rdx, [rdi+8]
cmp rdx, r8
ja short loc_2F7DE
add r8, rcx
cmp r8, rdx
jb short loc_2F7DE
mov eax, [rdi]
add rdx, rax
xor eax, eax
cmp rdx, r8
jmp short loc_2F7D9
loc_2F7A2:
mov eax, 0FFFFFFFFh
test rdx, rdx
jz short loc_2F7DE
lea rcx, [r8+rbx]
add rcx, 0FFFFFFFFFFFFFF0Ah
mov [rdx], r14d
mov [rdx+8], rcx
mov rdx, [rdi+8]
cmp rdx, rcx
ja short loc_2F7DE
add rcx, r14
cmp rcx, rdx
jb short loc_2F7DE
mov eax, [rdi]
add rdx, rax
xor eax, eax
cmp rdx, rcx
loc_2F7D9:
sbb eax, eax
or eax, 2
loc_2F7DE:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long rlp_decode(unsigned int *a1, int a2, long long a3)
{
unsigned long long v3; // r9
long long v4; // rax
unsigned int v5; // r10d
unsigned long long v6; // r11
unsigned long long v7; // r8
long long v8; // rbx
long long v9; // rcx
int v10; // ecx
long long v11; // r12
unsigned long long v12; // r14
int v13; // ecx
long long v14; // r12
unsigned long long v15; // r14
long long result; // rax
unsigned long long v17; // rcx
bool v18; // cf
unsigned long long v19; // r8
unsigned long long v20; // rdx
unsigned long long v21; // r8
unsigned long long v22; // rcx
unsigned long long v23; // rdx
unsigned long long v24; // rcx
unsigned long long v25; // r8
unsigned long long v26; // rdx
unsigned long long v27; // r8
bool v28; // cf
unsigned long long v29; // rcx
unsigned long long v30; // rdx
unsigned long long v31; // rcx
v3 = *a1;
if ( !*a1 )
{
v6 = 0LL;
v5 = 0;
LABEL_26:
if ( a2 >= 0 )
return (v6 > v3) | 0xFFFFFFFE;
result = 0xFFFFFFFFLL;
if ( v6 == v3 )
return v5;
return result;
}
v4 = *((_QWORD *)a1 + 1);
v5 = 0;
v6 = 0LL;
while ( 1 )
{
v7 = v4 + v6;
v8 = *(unsigned __int8 *)(v4 + v6);
if ( (v8 & 0x80u) == 0LL )
{
if ( v5 == a2 )
{
result = 0xFFFFFFFFLL;
if ( !a3 )
return result;
*(_DWORD *)a3 = 1;
*(_QWORD *)(a3 + 8) = v7;
v17 = *((_QWORD *)a1 + 1);
if ( v17 > v7 )
return result;
v18 = *a1 + v17 < v7 + 1;
return v18 ? -1 : 1;
}
goto LABEL_23;
}
if ( (unsigned __int8)v8 <= 0xB7u )
{
v9 = (unsigned int)(v8 - 128);
if ( v5 == a2 )
{
result = 0xFFFFFFFFLL;
if ( !a3 )
return result;
v19 = v7 + 1;
*(_DWORD *)a3 = v9;
*(_QWORD *)(a3 + 8) = v19;
v20 = *((_QWORD *)a1 + 1);
if ( v20 > v19 )
return result;
v21 = v9 + v19;
if ( v21 < v20 )
return result;
v18 = *a1 + v20 < v21;
return v18 ? -1 : 1;
}
goto LABEL_8;
}
if ( (unsigned __int8)v8 > 0xBFu )
break;
v10 = 8 * v8 - 1472;
v11 = 0LL;
v12 = 0LL;
do
{
v12 |= *(unsigned __int8 *)(v7 + v11++ + 1) << v10;
v10 -= 8;
}
while ( (unsigned __int8)(v8 + 73) != v11 );
if ( v5 == a2 )
{
result = 0xFFFFFFFFLL;
if ( !a3 )
return result;
v22 = v7 + (unsigned int)v8 - 182;
*(_DWORD *)a3 = v12;
*(_QWORD *)(a3 + 8) = v22;
v23 = *((_QWORD *)a1 + 1);
if ( v23 > v22 )
return result;
v24 = v12 + v22;
if ( v24 < v23 )
return result;
v18 = *a1 + v23 < v24;
return v18 ? -1 : 1;
}
v6 = v12 + *(unsigned __int8 *)(v4 + v6) + v6 - 183;
LABEL_23:
++v6;
++v5;
if ( v6 >= v3 )
goto LABEL_26;
}
if ( (unsigned __int8)v8 < 0xF8u )
{
v9 = (unsigned int)(v8 - 192);
if ( v5 == a2 )
{
result = 0xFFFFFFFFLL;
if ( a3 )
{
v25 = v7 + 1;
*(_DWORD *)a3 = v9;
*(_QWORD *)(a3 + 8) = v25;
v26 = *((_QWORD *)a1 + 1);
if ( v26 <= v25 )
{
v27 = v9 + v25;
if ( v27 >= v26 )
{
v28 = *a1 + v26 < v27;
return v28 ? -1 : 2;
}
}
}
return result;
}
LABEL_8:
v6 += v9;
goto LABEL_23;
}
v13 = 8 * v8 - 1984;
v14 = 0LL;
v15 = 0LL;
do
{
v15 |= *(unsigned __int8 *)(v7 + v14++ + 1) << v13;
v13 -= 8;
}
while ( (_DWORD)v8 - 247 != v14 );
if ( v5 != a2 )
{
v6 = v15 + v8 + v6 - 247;
goto LABEL_23;
}
result = 0xFFFFFFFFLL;
if ( a3 )
{
v29 = v7 + v8 - 246;
*(_DWORD *)a3 = v15;
*(_QWORD *)(a3 + 8) = v29;
v30 = *((_QWORD *)a1 + 1);
if ( v30 <= v29 )
{
v31 = v15 + v29;
if ( v31 >= v30 )
{
v28 = *a1 + v30 < v31;
return v28 ? -1 : 2;
}
}
}
return result;
}
| rlp_decode:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R9D,dword ptr [RDI]
TEST R9,R9
JZ 0x0012f68c
MOV RAX,qword ptr [RDI + 0x8]
XOR R10D,R10D
XOR R11D,R11D
LAB_0012f58c:
LEA R8,[RAX + R11*0x1]
MOVZX EBX,byte ptr [RAX + R11*0x1]
TEST BL,BL
JS 0x0012f5a7
CMP R10D,ESI
JNZ 0x0012f67b
JMP 0x0012f6b7
LAB_0012f5a7:
CMP BL,0xb7
JA 0x0012f5c0
LEA ECX,[RBX + -0x80]
CMP R10D,ESI
JZ 0x0012f6f3
LAB_0012f5b8:
ADD R11,RCX
JMP 0x0012f67b
LAB_0012f5c0:
CMP BL,0xbf
JA 0x0012f5fc
LEA ECX,[RBX + -0xb7]
MOVZX R15D,CL
TEST R15D,R15D
JZ 0x0012f645
LEA ECX,[-0x5c0 + RBX*0x8]
XOR R12D,R12D
XOR R14D,R14D
LAB_0012f5e1:
MOVZX EBP,byte ptr [R8 + R12*0x1 + 0x1]
SHL EBP,CL
MOVSXD R13,EBP
OR R14,R13
INC R12
ADD ECX,-0x8
CMP R15,R12
JNZ 0x0012f5e1
JMP 0x0012f648
LAB_0012f5fc:
CMP BL,0xf8
JNC 0x0012f611
LEA ECX,[RBX + -0xc0]
CMP R10D,ESI
JNZ 0x0012f5b8
JMP 0x0012f772
LAB_0012f611:
MOV R15D,EBX
ADD R15D,0xffffff09
JZ 0x0012f662
LEA ECX,[-0x7c0 + RBX*0x8]
XOR R12D,R12D
XOR R14D,R14D
LAB_0012f62a:
MOVZX EBP,byte ptr [R8 + R12*0x1 + 0x1]
SHL EBP,CL
MOVSXD R13,EBP
OR R14,R13
INC R12
ADD ECX,-0x8
CMP R15,R12
JNZ 0x0012f62a
JMP 0x0012f665
LAB_0012f645:
XOR R14D,R14D
LAB_0012f648:
MOV ECX,EBX
CMP R10D,ESI
JZ 0x0012f72f
ADD R11,RCX
ADD R11,R14
ADD R11,-0xb7
JMP 0x0012f67b
LAB_0012f662:
XOR R14D,R14D
LAB_0012f665:
CMP R10D,ESI
JZ 0x0012f7a2
ADD R11,RBX
ADD R11,R14
ADD R11,-0xf7
LAB_0012f67b:
INC R11
INC R10
CMP R11,R9
JC 0x0012f58c
JMP 0x0012f692
LAB_0012f68c:
XOR R11D,R11D
XOR R10D,R10D
LAB_0012f692:
TEST ESI,ESI
JS 0x0012f6a6
XOR EAX,EAX
CMP R11,R9
SETA AL
OR EAX,0xfffffffe
JMP 0x0012f7de
LAB_0012f6a6:
CMP R11,R9
MOV EAX,0xffffffff
CMOVZ EAX,R10D
JMP 0x0012f7de
LAB_0012f6b7:
MOV EAX,0xffffffff
TEST RDX,RDX
JZ 0x0012f7de
MOV dword ptr [RDX],0x1
MOV qword ptr [RDX + 0x8],R8
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,R8
JA 0x0012f7de
INC R8
MOV EAX,dword ptr [RDI]
ADD RCX,RAX
XOR EAX,EAX
CMP RCX,R8
LAB_0012f6e9:
SBB EAX,EAX
OR EAX,0x1
JMP 0x0012f7de
LAB_0012f6f3:
MOV EAX,0xffffffff
TEST RDX,RDX
JZ 0x0012f7de
INC R8
MOV dword ptr [RDX],ECX
MOV qword ptr [RDX + 0x8],R8
MOV RDX,qword ptr [RDI + 0x8]
CMP RDX,R8
JA 0x0012f7de
ADD R8,RCX
CMP R8,RDX
JC 0x0012f7de
MOV EAX,dword ptr [RDI]
ADD RDX,RAX
XOR EAX,EAX
CMP RDX,R8
JMP 0x0012f6e9
LAB_0012f72f:
MOV EAX,0xffffffff
TEST RDX,RDX
JZ 0x0012f7de
ADD RCX,R8
ADD RCX,-0xb6
MOV dword ptr [RDX],R14D
MOV qword ptr [RDX + 0x8],RCX
MOV RDX,qword ptr [RDI + 0x8]
CMP RDX,RCX
JA 0x0012f7de
ADD RCX,R14
CMP RCX,RDX
JC 0x0012f7de
MOV EAX,dword ptr [RDI]
ADD RDX,RAX
XOR EAX,EAX
CMP RDX,RCX
JMP 0x0012f6e9
LAB_0012f772:
MOV EAX,0xffffffff
TEST RDX,RDX
JZ 0x0012f7de
INC R8
MOV dword ptr [RDX],ECX
MOV qword ptr [RDX + 0x8],R8
MOV RDX,qword ptr [RDI + 0x8]
CMP RDX,R8
JA 0x0012f7de
ADD R8,RCX
CMP R8,RDX
JC 0x0012f7de
MOV EAX,dword ptr [RDI]
ADD RDX,RAX
XOR EAX,EAX
CMP RDX,R8
JMP 0x0012f7d9
LAB_0012f7a2:
MOV EAX,0xffffffff
TEST RDX,RDX
JZ 0x0012f7de
LEA RCX,[R8 + RBX*0x1]
ADD RCX,-0xf6
MOV dword ptr [RDX],R14D
MOV qword ptr [RDX + 0x8],RCX
MOV RDX,qword ptr [RDI + 0x8]
CMP RDX,RCX
JA 0x0012f7de
ADD RCX,R14
CMP RCX,RDX
JC 0x0012f7de
MOV EAX,dword ptr [RDI]
ADD RDX,RAX
XOR EAX,EAX
CMP RDX,RCX
LAB_0012f7d9:
SBB EAX,EAX
OR EAX,0x2
LAB_0012f7de:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint rlp_decode(uint *param_1,uint param_2,uint *param_3)
{
byte bVar1;
byte bVar2;
uint uVar3;
ulong uVar4;
ulong uVar5;
uint uVar6;
ulong uVar7;
ulong uVar8;
ulong uVar9;
uint uVar10;
bool bVar11;
uVar5 = (ulong)*param_1;
if (uVar5 == 0) {
uVar7 = 0;
uVar6 = 0;
}
else {
uVar6 = 0;
uVar7 = 0;
do {
uVar4 = *(long *)(param_1 + 2) + uVar7;
bVar1 = *(byte *)(*(long *)(param_1 + 2) + uVar7);
if ((char)bVar1 < '\0') {
if (bVar1 < 0xb8) {
uVar9 = (ulong)(bVar1 - 0x80);
if (uVar6 == param_2) {
if (param_3 == (uint *)0x0) {
return 0xffffffff;
}
uVar4 = uVar4 + 1;
*param_3 = bVar1 - 0x80;
*(ulong *)(param_3 + 2) = uVar4;
uVar5 = *(ulong *)(param_1 + 2);
if (uVar4 < uVar5) {
return 0xffffffff;
}
if (uVar4 + uVar9 < uVar5) {
return 0xffffffff;
}
bVar11 = uVar5 + *param_1 < uVar4 + uVar9;
goto LAB_0012f6e9;
}
LAB_0012f5b8:
uVar7 = uVar7 + uVar9;
}
else {
uVar3 = (uint)bVar1;
if (bVar1 < 0xc0) {
uVar10 = bVar1 - 0xb7 & 0xff;
if (uVar10 == 0) {
uVar9 = 0;
}
else {
bVar1 = bVar1 * '\b' + 0x40;
uVar8 = 0;
uVar9 = 0;
do {
uVar9 = uVar9 | (long)(int)((uint)*(byte *)(uVar4 + 1 + uVar8) << (bVar1 & 0x1f));
uVar8 = uVar8 + 1;
bVar1 = bVar1 - 8;
} while (uVar10 != uVar8);
}
if (uVar6 == param_2) {
if (param_3 == (uint *)0x0) {
return 0xffffffff;
}
uVar7 = (uVar3 + uVar4) - 0xb6;
*param_3 = (uint)uVar9;
*(ulong *)(param_3 + 2) = uVar7;
uVar5 = *(ulong *)(param_1 + 2);
if (uVar7 < uVar5) {
return 0xffffffff;
}
if (uVar7 + uVar9 < uVar5) {
return 0xffffffff;
}
bVar11 = uVar5 + *param_1 < uVar7 + uVar9;
goto LAB_0012f6e9;
}
uVar7 = (uVar7 + uVar3 + uVar9) - 0xb7;
}
else {
if (bVar1 < 0xf8) {
uVar9 = (ulong)(bVar1 - 0xc0);
if (uVar6 == param_2) {
if (param_3 == (uint *)0x0) {
return 0xffffffff;
}
uVar4 = uVar4 + 1;
*param_3 = bVar1 - 0xc0;
*(ulong *)(param_3 + 2) = uVar4;
uVar5 = *(ulong *)(param_1 + 2);
if (uVar4 < uVar5) {
return 0xffffffff;
}
if (uVar4 + uVar9 < uVar5) {
return 0xffffffff;
}
bVar11 = uVar5 + *param_1 < uVar4 + uVar9;
LAB_0012f7d9:
return -(uint)bVar11 | 2;
}
goto LAB_0012f5b8;
}
if (uVar3 - 0xf7 == 0) {
uVar9 = 0;
}
else {
bVar2 = bVar1 * '\b' + 0x40;
uVar8 = 0;
uVar9 = 0;
do {
uVar9 = uVar9 | (long)(int)((uint)*(byte *)(uVar4 + 1 + uVar8) << (bVar2 & 0x1f));
uVar8 = uVar8 + 1;
bVar2 = bVar2 - 8;
} while (uVar3 - 0xf7 != uVar8);
}
if (uVar6 == param_2) {
if (param_3 == (uint *)0x0) {
return 0xffffffff;
}
uVar7 = (uVar4 + bVar1) - 0xf6;
*param_3 = (uint)uVar9;
*(ulong *)(param_3 + 2) = uVar7;
uVar5 = *(ulong *)(param_1 + 2);
if (uVar7 < uVar5) {
return 0xffffffff;
}
if (uVar7 + uVar9 < uVar5) {
return 0xffffffff;
}
bVar11 = uVar5 + *param_1 < uVar7 + uVar9;
goto LAB_0012f7d9;
}
uVar7 = (uVar7 + bVar1 + uVar9) - 0xf7;
}
}
}
else if (uVar6 == param_2) {
if (param_3 == (uint *)0x0) {
return 0xffffffff;
}
*param_3 = 1;
*(ulong *)(param_3 + 2) = uVar4;
if (uVar4 < *(ulong *)(param_1 + 2)) {
return 0xffffffff;
}
bVar11 = *(ulong *)(param_1 + 2) + (ulong)*param_1 < uVar4 + 1;
LAB_0012f6e9:
return -(uint)bVar11 | 1;
}
uVar7 = uVar7 + 1;
uVar6 = uVar6 + 1;
} while (uVar7 < uVar5);
}
if ((int)param_2 < 0) {
uVar3 = 0xffffffff;
if (uVar7 == uVar5) {
uVar3 = uVar6;
}
}
else {
uVar3 = uVar5 < uVar7 | 0xfffffffe;
}
return uVar3;
}
| |
39,384 | mysql_client_plugin_init | eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c | int mysql_client_plugin_init()
{
MYSQL mysql;
struct st_mysql_client_plugin **builtin;
va_list unused;
LINT_INIT_STRUCT(unused);
if (initialized)
return 0;
memset(&mysql, 0, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */
pthread_mutex_init(&LOCK_load_client_plugin, NULL);
ma_init_alloc_root(&mem_root, 128, 128);
memset(&plugin_list, 0, sizeof(plugin_list));
initialized= 1;
pthread_mutex_lock(&LOCK_load_client_plugin);
for (builtin= mysql_client_builtins; *builtin; builtin++)
add_plugin(&mysql, *builtin, 0, 0, unused);
pthread_mutex_unlock(&LOCK_load_client_plugin);
load_env_plugins(&mysql);
return 0;
} | O0 | c | mysql_client_plugin_init:
pushq %rbp
movq %rsp, %rbp
subq $0x540, %rsp # imm = 0x540
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
leaq -0x530(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x14260
cmpb $0x0, 0x32d2e(%rip) # 0x82c20
je 0x4ff03
movl $0x0, -0x504(%rbp)
jmp 0x4ffd4
leaq -0x500(%rbp), %rdi
xorl %esi, %esi
movl $0x4f8, %edx # imm = 0x4F8
callq 0x14260
leaq 0x32d0b(%rip), %rdi # 0x82c28
xorl %eax, %eax
movl %eax, %esi
callq 0x14680
leaq 0x32d23(%rip), %rdi # 0x82c50
movl $0x80, %edx
movq %rdx, %rsi
callq 0x3f0e0
leaq 0x32d4f(%rip), %rdi # 0x82c90
xorl %esi, %esi
movl $0x40, %edx
callq 0x14260
movb $0x1, 0x32ccc(%rip) # 0x82c20
leaq 0x32ccd(%rip), %rdi # 0x82c28
callq 0x14670
leaq 0x2fe39(%rip), %rax # 0x7fda0
movq %rax, -0x510(%rbp)
movq -0x510(%rbp), %rax
cmpq $0x0, (%rax)
je 0x4ffb2
movq -0x510(%rbp), %rax
movq (%rax), %rsi
leaq -0x530(%rbp), %r8
leaq -0x500(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x50010
movq -0x510(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x510(%rbp)
jmp 0x4ff6e
leaq 0x32c6f(%rip), %rdi # 0x82c28
callq 0x14320
leaq -0x500(%rbp), %rdi
callq 0x50240
movl $0x0, -0x504(%rbp)
movl -0x504(%rbp), %eax
movl %eax, -0x534(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x50001
movl -0x534(%rbp), %eax
addq $0x540, %rsp # imm = 0x540
popq %rbp
retq
callq 0x144c0
nopw %cs:(%rax,%rax)
| mysql_client_plugin_init:
push rbp
mov rbp, rsp
sub rsp, 540h
mov rax, fs:28h
mov [rbp+var_8], rax
lea rdi, [rbp+var_530]
xor esi, esi
mov edx, 18h
call _memset
cmp cs:initialized, 0
jz short loc_4FF03
mov [rbp+var_504], 0
jmp loc_4FFD4
loc_4FF03:
lea rdi, [rbp+var_500]
xor esi, esi
mov edx, 4F8h
call _memset
lea rdi, LOCK_load_client_plugin
xor eax, eax
mov esi, eax
call _pthread_mutex_init
lea rdi, mem_root
mov edx, 80h
mov rsi, rdx
call ma_init_alloc_root
lea rdi, plugin_list
xor esi, esi
mov edx, 40h ; '@'
call _memset
mov cs:initialized, 1
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_lock
lea rax, mysql_client_builtins
mov [rbp+var_510], rax
loc_4FF6E:
mov rax, [rbp+var_510]
cmp qword ptr [rax], 0
jz short loc_4FFB2
mov rax, [rbp+var_510]
mov rsi, [rax]
lea r8, [rbp+var_530]
lea rdi, [rbp+var_500]
xor eax, eax
mov edx, eax
xor ecx, ecx
call add_plugin
mov rax, [rbp+var_510]
add rax, 8
mov [rbp+var_510], rax
jmp short loc_4FF6E
loc_4FFB2:
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_unlock
lea rdi, [rbp+var_500]
call load_env_plugins
mov [rbp+var_504], 0
loc_4FFD4:
mov eax, [rbp+var_504]
mov [rbp+var_534], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_50001
mov eax, [rbp+var_534]
add rsp, 540h
pop rbp
retn
loc_50001:
call ___stack_chk_fail
| long long mysql_client_plugin_init()
{
_BYTE v1[32]; // [rsp+10h] [rbp-530h] BYREF
_QWORD *i; // [rsp+30h] [rbp-510h]
_BYTE v4[1272]; // [rsp+40h] [rbp-500h] BYREF
unsigned long long v5; // [rsp+538h] [rbp-8h]
v5 = __readfsqword(0x28u);
memset(v1, 0LL, 24LL);
if ( initialized )
{
return 0;
}
else
{
memset(v4, 0LL, sizeof(v4));
pthread_mutex_init(&LOCK_load_client_plugin, 0LL);
ma_init_alloc_root(mem_root, 128LL, 128LL);
memset(&plugin_list, 0LL, 64LL);
initialized = 1;
pthread_mutex_lock(&LOCK_load_client_plugin);
for ( i = &mysql_client_builtins; *i; ++i )
add_plugin(v4, *i, 0LL, 0LL, v1);
pthread_mutex_unlock(&LOCK_load_client_plugin);
load_env_plugins(v4);
return 0;
}
}
| mysql_client_plugin_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x540
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[RBP + -0x530]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00114260
CMP byte ptr [0x00182c20],0x0
JZ 0x0014ff03
MOV dword ptr [RBP + -0x504],0x0
JMP 0x0014ffd4
LAB_0014ff03:
LEA RDI,[RBP + -0x500]
XOR ESI,ESI
MOV EDX,0x4f8
CALL 0x00114260
LEA RDI,[0x182c28]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00114680
LEA RDI,[0x182c50]
MOV EDX,0x80
MOV RSI,RDX
CALL 0x0013f0e0
LEA RDI,[0x182c90]
XOR ESI,ESI
MOV EDX,0x40
CALL 0x00114260
MOV byte ptr [0x00182c20],0x1
LEA RDI,[0x182c28]
CALL 0x00114670
LEA RAX,[0x17fda0]
MOV qword ptr [RBP + -0x510],RAX
LAB_0014ff6e:
MOV RAX,qword ptr [RBP + -0x510]
CMP qword ptr [RAX],0x0
JZ 0x0014ffb2
MOV RAX,qword ptr [RBP + -0x510]
MOV RSI,qword ptr [RAX]
LEA R8,[RBP + -0x530]
LEA RDI,[RBP + -0x500]
XOR EAX,EAX
MOV EDX,EAX
XOR ECX,ECX
CALL 0x00150010
MOV RAX,qword ptr [RBP + -0x510]
ADD RAX,0x8
MOV qword ptr [RBP + -0x510],RAX
JMP 0x0014ff6e
LAB_0014ffb2:
LEA RDI,[0x182c28]
CALL 0x00114320
LEA RDI,[RBP + -0x500]
CALL 0x00150240
MOV dword ptr [RBP + -0x504],0x0
LAB_0014ffd4:
MOV EAX,dword ptr [RBP + -0x504]
MOV dword ptr [RBP + -0x534],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00150001
MOV EAX,dword ptr [RBP + -0x534]
ADD RSP,0x540
POP RBP
RET
LAB_00150001:
CALL 0x001144c0
|
int4 mysql_client_plugin_init(void)
{
long in_FS_OFFSET;
int1 local_538 [32];
int **local_518;
int4 local_50c;
int1 local_508 [1272];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
memset(local_538,0,0x18);
if (initialized == '\0') {
memset(local_508,0,0x4f8);
pthread_mutex_init((pthread_mutex_t *)LOCK_load_client_plugin,(pthread_mutexattr_t *)0x0);
ma_init_alloc_root(mem_root);
memset(plugin_list,0,0x40);
initialized = '\x01';
pthread_mutex_lock((pthread_mutex_t *)LOCK_load_client_plugin);
for (local_518 = &mysql_client_builtins; *local_518 != (int *)0x0;
local_518 = local_518 + 1) {
add_plugin(local_508,*local_518,0,0,local_538);
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin);
load_env_plugins(local_508);
}
local_50c = 0;
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return 0;
}
| |
39,385 | void sapphire_plugins::shared::setTooltipValues<sapphire_plugins::elastika::ElastikaEditor>(sapphire_plugins::elastika::ElastikaEditor*, unsigned int) | sapphire-plugins/src/shared/editor_interactions.h | inline void setTooltipValues(Editor *e, uint32_t id)
{
auto &par = e->patchCopy.paramMap.at(id);
e->tooltip->title = par->meta.name;
auto oval = par->meta.valueToString(par->value);
if (oval.has_value())
e->tooltip->value = oval.value();
else
e->tooltip->value = "err";
e->repaint();
} | O3 | c | void sapphire_plugins::shared::setTooltipValues<sapphire_plugins::elastika::ElastikaEditor>(sapphire_plugins::elastika::ElastikaEditor*, unsigned int):
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rax
movl %esi, (%rax)
addq $0x110, %rdi # imm = 0x110
movq %rax, %rsi
callq 0xd9e94
testq %rax, %rax
je 0xed478
movq %rax, %r14
movq 0x10(%rax), %rsi
addq $0x10, %rsi
movl $0xf0, %edi
addq 0x14b8(%rbx), %rdi
callq 0x881a0
movq 0x10(%r14), %rsi
movss (%rsi), %xmm0
addq $0x8, %rsi
leaq 0x8(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
callq 0xdbec0
leaq 0x30(%rsp), %r14
movq 0x14b8(%rbx), %rax
leaq 0x110(%rax), %rdi
cmpb $0x1, (%r14)
jne 0xed427
leaq 0x10(%rsp), %rsi
callq 0x881a0
jmp 0xed442
movq 0x118(%rax), %rdx
leaq 0x2ba1b8(%rip), %rcx # 0x3a75ed
movl $0x3, %r8d
xorl %esi, %esi
callq 0x86e20
movq %rbx, %rdi
callq 0x115808
cmpb $0x1, 0x30(%rsp)
jne 0xed470
leaq 0x20(%rsp), %rax
movb $0x0, 0x10(%rax)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xed470
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x86290
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x2b87e6(%rip), %rdi # 0x3a5c65
callq 0x87150
movq %rax, %rbx
cmpb $0x1, 0x30(%rsp)
jne 0xed49b
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x88652
movq %rbx, %rdi
callq 0x871f0
nop
| _ZN16sapphire_plugins6shared16setTooltipValuesINS_8elastika14ElastikaEditorEEEvPT_j:
push r14
push rbx
sub rsp, 38h
mov rbx, rdi
lea rax, [rsp+48h+var_3C]
mov [rax], esi
add rdi, 110h
mov rsi, rax
call _ZNSt10_HashtableIjSt4pairIKjPN16sapphire_plugins6shared12ParamWithLagEESaIS6_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS8_18_Mod_range_hashingENS8_20_Default_ranged_hashENS8_20_Prime_rehash_policyENS8_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<uint,std::pair<uint const,sapphire_plugins::shared::ParamWithLag *>,std::allocator<std::pair<uint const,sapphire_plugins::shared::ParamWithLag *>>,std::__detail::_Select1st,std::equal_to<uint>,std::hash<uint>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(uint const&)
test rax, rax
jz loc_ED478
mov r14, rax
mov rsi, [rax+10h]
add rsi, 10h
mov edi, 0F0h
add rdi, [rbx+14B8h]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov rsi, [r14+10h]
movss xmm0, dword ptr [rsi]
add rsi, 8
lea rdx, [rsp+48h+var_40]
mov dword ptr [rdx], 0
lea rdi, [rsp+48h+var_38]
call _ZNK3sst12basic_blocks6params13ParamMetaData13valueToStringB5cxx11EfRKNS2_12FeatureStateE; sst::basic_blocks::params::ParamMetaData::valueToString(float,sst::basic_blocks::params::ParamMetaData::FeatureState const&)
lea r14, [rsp+48h+var_18]
mov rax, [rbx+14B8h]
lea rdi, [rax+110h]
cmp byte ptr [r14], 1
jnz short loc_ED427
lea rsi, [rsp+48h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp short loc_ED442
loc_ED427:
mov rdx, [rax+118h]
lea rcx, aErr; "err"
mov r8d, 3
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_ED442:
mov rdi, rbx; this
call _ZN4juce9Component7repaintEv; juce::Component::repaint(void)
cmp [rsp+48h+var_18], 1
jnz short loc_ED470
lea rax, [rsp+48h+var_28]
mov byte ptr [rax+10h], 0
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_ED470
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_ED470:
add rsp, 38h
pop rbx
pop r14
retn
loc_ED478:
lea rdi, aMapBaseAt; "_Map_base::at"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
mov rbx, rax
cmp [rsp+48h+var_18], 1
jnz short loc_ED49B
lea rsi, [rsp+48h+var_38]
mov rdi, r14
call _ZN16sapphire_plugins6shared16setTooltipValuesINS_8elastika14ElastikaEditorEEEvPT_j_cold_1; sapphire_plugins::shared::setTooltipValues<sapphire_plugins::elastika::ElastikaEditor>(sapphire_plugins::elastika::ElastikaEditor *,uint) [clone]
loc_ED49B:
mov rdi, rbx
call __Unwind_Resume
| void sapphire_plugins::shared::setTooltipValues<sapphire_plugins::elastika::ElastikaEditor>(
juce::Component *this,
unsigned int a2)
{
long long *v3; // rax
long long *v4; // r14
unsigned int *v5; // rsi
__m128 v6; // xmm0
long long v7; // rax
long long v8; // rdi
int v9; // [rsp+8h] [rbp-40h] BYREF
unsigned int v10; // [rsp+Ch] [rbp-3Ch] BYREF
void *v11[2]; // [rsp+10h] [rbp-38h] BYREF
long long v12; // [rsp+20h] [rbp-28h] BYREF
char v13; // [rsp+30h] [rbp-18h]
v10 = a2;
v3 = std::_Hashtable<unsigned int,std::pair<unsigned int const,sapphire_plugins::shared::ParamWithLag *>,std::allocator<std::pair<unsigned int const,sapphire_plugins::shared::ParamWithLag *>>,std::__detail::_Select1st,std::equal_to<unsigned int>,std::hash<unsigned int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(
(long long *)this + 34,
&v10);
if ( !v3 )
std::__throw_out_of_range("_Map_base::at");
v4 = v3;
std::string::_M_assign(*((_QWORD *)this + 663) + 240LL, v3[2] + 16);
v5 = (unsigned int *)v4[2];
v6 = (__m128)*v5;
v9 = 0;
sst::basic_blocks::params::ParamMetaData::valueToString[abi:cxx11]((long long)v11, (long long)(v5 + 2), &v9, v6);
v7 = *((_QWORD *)this + 663);
v8 = v7 + 272;
if ( v13 == 1 )
std::string::_M_assign(v8, v11);
else
std::string::_M_replace(v8, 0LL, *(_QWORD *)(v7 + 280), "err", 3LL);
juce::Component::repaint(this);
if ( v13 == 1 )
{
v13 = 0;
if ( v11[0] != &v12 )
operator delete(v11[0], v12 + 1);
}
}
| setTooltipValues<sapphire_plugins::elastika::ElastikaEditor>:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
LEA RAX,[RSP + 0xc]
MOV dword ptr [RAX],ESI
ADD RDI,0x110
MOV RSI,RAX
CALL 0x001d9e94
TEST RAX,RAX
JZ 0x001ed478
MOV R14,RAX
MOV RSI,qword ptr [RAX + 0x10]
ADD RSI,0x10
MOV EDI,0xf0
ADD RDI,qword ptr [RBX + 0x14b8]
CALL 0x001881a0
MOV RSI,qword ptr [R14 + 0x10]
MOVSS XMM0,dword ptr [RSI]
ADD RSI,0x8
LEA RDX,[RSP + 0x8]
MOV dword ptr [RDX],0x0
LEA RDI,[RSP + 0x10]
CALL 0x001dbec0
LEA R14,[RSP + 0x30]
MOV RAX,qword ptr [RBX + 0x14b8]
LEA RDI,[RAX + 0x110]
CMP byte ptr [R14],0x1
JNZ 0x001ed427
LAB_001ed41b:
LEA RSI,[RSP + 0x10]
CALL 0x001881a0
JMP 0x001ed442
LAB_001ed427:
MOV RDX,qword ptr [RAX + 0x118]
LEA RCX,[0x4a75ed]
MOV R8D,0x3
XOR ESI,ESI
CALL 0x00186e20
LAB_001ed442:
MOV RDI,RBX
CALL 0x00215808
LAB_001ed44a:
CMP byte ptr [RSP + 0x30],0x1
JNZ 0x001ed470
LEA RAX,[RSP + 0x20]
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001ed470
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00186290
LAB_001ed470:
ADD RSP,0x38
POP RBX
POP R14
RET
LAB_001ed478:
LEA RDI,[0x4a5c65]
CALL 0x00187150
|
/* void
sapphire_plugins::shared::setTooltipValues<sapphire_plugins::elastika::ElastikaEditor>(sapphire_plugins::elastika::ElastikaEditor*,
unsigned int) */
void sapphire_plugins::shared::setTooltipValues<sapphire_plugins::elastika::ElastikaEditor>
(ElastikaEditor *param_1,uint param_2)
{
string *psVar1;
long lVar2;
uint local_3c;
long *local_38 [2];
long local_28 [2];
char local_18;
local_3c = param_2;
lVar2 = std::
_Hashtable<unsigned_int,std::pair<unsigned_int_const,sapphire_plugins::shared::ParamWithLag*>,std::allocator<std::pair<unsigned_int_const,sapphire_plugins::shared::ParamWithLag*>>,std::__detail::_Select1st,std::equal_to<unsigned_int>,std::hash<unsigned_int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::find((_Hashtable<unsigned_int,std::pair<unsigned_int_const,sapphire_plugins::shared::ParamWithLag*>,std::allocator<std::pair<unsigned_int_const,sapphire_plugins::shared::ParamWithLag*>>,std::__detail::_Select1st,std::equal_to<unsigned_int>,std::hash<unsigned_int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)(param_1 + 0x110),&local_3c);
if (lVar2 != 0) {
std::__cxx11::string::_M_assign((string *)(*(long *)(param_1 + 0x14b8) + 0xf0));
sst::basic_blocks::params::ParamMetaData::valueToString_abi_cxx11_
(**(float **)(lVar2 + 0x10),(FeatureState *)local_38);
psVar1 = (string *)(*(long *)(param_1 + 0x14b8) + 0x110);
if (local_18 == '\x01') {
/* try { // try from 001ed41b to 001ed449 has its CatchHandler @ 001ed484 */
std::__cxx11::string::_M_assign(psVar1);
}
else {
std::__cxx11::string::_M_replace
((ulong)psVar1,0,*(char **)(*(long *)(param_1 + 0x14b8) + 0x118),0x4a75ed);
}
juce::Component::repaint((Component *)param_1);
if (local_18 == '\x01') {
local_18 = 0;
if (local_38[0] != local_28) {
operator_delete(local_38[0],local_28[0] + 1);
}
}
return;
}
/* WARNING: Subroutine does not return */
std::__throw_out_of_range("_Map_base::at");
}
| |
39,386 | google::protobuf::SourceCodeInfo_Location::SharedCtor(google::protobuf::Arena*, bool) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | inline void SourceCodeInfo_Location::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.path_){arena}
, /*decltype(_impl_._path_cached_byte_size_)*/{0}
, decltype(_impl_.span_){arena}
, /*decltype(_impl_._span_cached_byte_size_)*/{0}
, decltype(_impl_.leading_detached_comments_){arena}
, decltype(_impl_.leading_comments_){}
, decltype(_impl_.trailing_comments_){}
};
_impl_.leading_comments_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.leading_comments_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.trailing_comments_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.trailing_comments_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
} | O0 | cpp | google::protobuf::SourceCodeInfo_Location::SharedCtor(google::protobuf::Arena*, bool):
subq $0x68, %rsp
movb %dl, %al
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
andb $0x1, %al
movb %al, 0x4f(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
addq $0x10, %rax
movq %rax, 0x20(%rsp)
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
movl $0x0, (%rax)
addq $0x4, %rax
cmpq %rcx, %rax
movq %rax, 0x30(%rsp)
jne 0xdc2c4
movq 0x20(%rsp), %rax
movq %rax, %rdi
addq $0x4, %rdi
movl $0x0, 0x4(%rax)
callq 0xd3ff0
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
movq %rdi, 0x8(%rsp)
movq 0x50(%rsp), %rsi
callq 0x1bc6c0
movq 0x20(%rsp), %rdi
addq $0x18, %rdi
xorl %esi, %esi
callq 0xdc3f0
movq 0x20(%rsp), %rdi
addq $0x20, %rdi
movq %rdi, 0x10(%rsp)
movq 0x50(%rsp), %rsi
callq 0x1bc6c0
jmp 0xdc33c
movq 0x20(%rsp), %rdi
addq $0x30, %rdi
xorl %esi, %esi
callq 0xdc3f0
movq 0x20(%rsp), %rdi
addq $0x38, %rdi
movq 0x50(%rsp), %rsi
callq 0x1cc9f0
jmp 0xdc361
movq 0x20(%rsp), %rdi
addq $0x50, %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x13200
movq 0x20(%rsp), %rdi
addq $0x58, %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x13200
movq 0x18(%rsp), %rdi
addq $0x10, %rdi
addq $0x50, %rdi
callq 0xd4b40
movq 0x18(%rsp), %rdi
addq $0x10, %rdi
addq $0x58, %rdi
callq 0xd4b40
addq $0x68, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0xdc3dc
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
callq 0x1bd290
movq 0x8(%rsp), %rdi
callq 0x1bd290
movq 0x40(%rsp), %rdi
callq 0x13750
| _ZN6google8protobuf23SourceCodeInfo_Location10SharedCtorEPNS0_5ArenaEb:
sub rsp, 68h
mov al, dl
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_18], rsi
and al, 1
mov [rsp+68h+var_19], al
mov rax, [rsp+68h+var_10]
mov [rsp+68h+var_50], rax
add rax, 10h
mov [rsp+68h+var_48], rax
mov [rsp+68h+var_8], rax
mov rax, [rsp+68h+var_8]
mov rcx, rax
add rcx, 4
mov [rsp+68h+var_40], rcx
mov [rsp+68h+var_38], rax
loc_DC2C4:
mov rax, [rsp+68h+var_38]
mov rcx, [rsp+68h+var_40]
mov dword ptr [rax], 0
add rax, 4
cmp rax, rcx
mov [rsp+68h+var_38], rax
jnz short loc_DC2C4
mov rax, [rsp+68h+var_48]
mov rdi, rax
add rdi, 4; this
mov dword ptr [rax+4], 0
call _ZN6google8protobuf8internal10CachedSizeC2Ev; google::protobuf::internal::CachedSize::CachedSize(void)
mov rdi, [rsp+68h+var_48]
add rdi, 8
mov [rsp+68h+var_60], rdi
mov rsi, [rsp+68h+var_18]
call _ZN6google8protobuf13RepeatedFieldIiEC2EPNS0_5ArenaE; google::protobuf::RepeatedField<int>::RepeatedField(google::protobuf::Arena *)
mov rdi, [rsp+68h+var_48]
add rdi, 18h
xor esi, esi
call _ZNSt6atomicIiEC2Ei; std::atomic<int>::atomic(int)
mov rdi, [rsp+68h+var_48]
add rdi, 20h ; ' '
mov [rsp+68h+var_58], rdi
mov rsi, [rsp+68h+var_18]
call _ZN6google8protobuf13RepeatedFieldIiEC2EPNS0_5ArenaE; google::protobuf::RepeatedField<int>::RepeatedField(google::protobuf::Arena *)
jmp short $+2
loc_DC33C:
mov rdi, [rsp+68h+var_48]
add rdi, 30h ; '0'
xor esi, esi
call _ZNSt6atomicIiEC2Ei; std::atomic<int>::atomic(int)
mov rdi, [rsp+68h+var_48]
add rdi, 38h ; '8'
mov rsi, [rsp+68h+var_18]
call _ZN6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<std::string>::RepeatedPtrField(google::protobuf::Arena *)
jmp short $+2
loc_DC361:
mov rdi, [rsp+68h+var_48]
add rdi, 50h ; 'P'
xor esi, esi
mov edx, 8
call _memset
mov rdi, [rsp+68h+var_48]
add rdi, 58h ; 'X'
xor esi, esi
mov edx, 8
call _memset
mov rdi, [rsp+68h+var_50]
add rdi, 10h
add rdi, 50h ; 'P'; this
call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void)
mov rdi, [rsp+68h+var_50]
add rdi, 10h
add rdi, 58h ; 'X'; this
call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void)
add rsp, 68h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
jmp short loc_DC3DC
mov rdi, [rsp+arg_8]
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
call _ZN6google8protobuf13RepeatedFieldIiED2Ev; google::protobuf::RepeatedField<int>::~RepeatedField()
loc_DC3DC:
mov rdi, [rsp+arg_0]
call _ZN6google8protobuf13RepeatedFieldIiED2Ev; google::protobuf::RepeatedField<int>::~RepeatedField()
mov rdi, [rsp+arg_38]
call __Unwind_Resume
| google::protobuf::internal::ArenaStringPtr * google::protobuf::SourceCodeInfo_Location::SharedCtor(
google::protobuf::SourceCodeInfo_Location *this,
google::protobuf::Arena *a2)
{
google::protobuf::SourceCodeInfo_Location *v3; // [rsp+30h] [rbp-38h]
v3 = (google::protobuf::SourceCodeInfo_Location *)((char *)this + 16);
do
{
*(_DWORD *)v3 = 0;
v3 = (google::protobuf::SourceCodeInfo_Location *)((char *)v3 + 4);
}
while ( v3 != (google::protobuf::SourceCodeInfo_Location *)((char *)this + 20) );
*((_DWORD *)this + 5) = 0;
google::protobuf::internal::CachedSize::CachedSize((google::protobuf::SourceCodeInfo_Location *)((char *)this + 20));
google::protobuf::RepeatedField<int>::RepeatedField((char *)this + 24, a2);
std::atomic<int>::atomic((char *)this + 40, 0LL);
google::protobuf::RepeatedField<int>::RepeatedField((char *)this + 48, a2);
std::atomic<int>::atomic((char *)this + 64, 0LL);
google::protobuf::RepeatedPtrField<std::string>::RepeatedPtrField((char *)this + 72, a2);
memset((char *)this + 96, 0LL, 8LL);
memset((char *)this + 104, 0LL, 8LL);
google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::SourceCodeInfo_Location *)((char *)this + 96));
return google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::SourceCodeInfo_Location *)((char *)this + 104));
}
| SharedCtor:
SUB RSP,0x68
MOV AL,DL
MOV qword ptr [RSP + 0x58],RDI
MOV qword ptr [RSP + 0x50],RSI
AND AL,0x1
MOV byte ptr [RSP + 0x4f],AL
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x18],RAX
ADD RAX,0x10
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x30],RAX
LAB_001dc2c4:
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x28]
MOV dword ptr [RAX],0x0
ADD RAX,0x4
CMP RAX,RCX
MOV qword ptr [RSP + 0x30],RAX
JNZ 0x001dc2c4
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,RAX
ADD RDI,0x4
MOV dword ptr [RAX + 0x4],0x0
CALL 0x001d3ff0
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x8
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x002bc6c0
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x18
XOR ESI,ESI
CALL 0x001dc3f0
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x20
MOV qword ptr [RSP + 0x10],RDI
MOV RSI,qword ptr [RSP + 0x50]
LAB_001dc335:
CALL 0x002bc6c0
JMP 0x001dc33c
LAB_001dc33c:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x30
XOR ESI,ESI
CALL 0x001dc3f0
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x38
MOV RSI,qword ptr [RSP + 0x50]
LAB_001dc35a:
CALL 0x002cc9f0
LAB_001dc35f:
JMP 0x001dc361
LAB_001dc361:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x50
XOR ESI,ESI
MOV EDX,0x8
CALL 0x00113200
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x58
XOR ESI,ESI
MOV EDX,0x8
CALL 0x00113200
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x10
ADD RDI,0x50
CALL 0x001d4b40
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x10
ADD RDI,0x58
CALL 0x001d4b40
ADD RSP,0x68
RET
|
/* google::protobuf::SourceCodeInfo_Location::SharedCtor(google::protobuf::Arena*, bool) */
void google::protobuf::SourceCodeInfo_Location::SharedCtor(Arena *param_1,bool param_2)
{
int7 in_register_00000031;
Arena *pAVar1;
Arena *local_38;
pAVar1 = (Arena *)CONCAT71(in_register_00000031,param_2);
local_38 = param_1 + 0x10;
do {
*(int4 *)local_38 = 0;
local_38 = local_38 + 4;
} while (local_38 != param_1 + 0x14);
*(int4 *)(param_1 + 0x14) = 0;
internal::CachedSize::CachedSize((CachedSize *)(param_1 + 0x14));
RepeatedField<int>::RepeatedField((RepeatedField<int> *)(param_1 + 0x18),pAVar1);
std::atomic<int>::atomic((atomic<int> *)(param_1 + 0x28),0);
/* try { // try from 001dc335 to 001dc339 has its CatchHandler @ 001dc3b4 */
RepeatedField<int>::RepeatedField((RepeatedField<int> *)(param_1 + 0x30),pAVar1);
std::atomic<int>::atomic((atomic<int> *)(param_1 + 0x40),0);
/* try { // try from 001dc35a to 001dc35e has its CatchHandler @ 001dc3c4 */
RepeatedPtrField<std::__cxx11::string>::RepeatedPtrField
((RepeatedPtrField<std::__cxx11::string> *)(param_1 + 0x48),pAVar1);
memset(param_1 + 0x60,0,8);
memset(param_1 + 0x68,0,8);
internal::ArenaStringPtr::InitDefault((ArenaStringPtr *)(param_1 + 0x60));
internal::ArenaStringPtr::InitDefault((ArenaStringPtr *)(param_1 + 0x68));
return;
}
| |
39,387 | my_hash_sort_utf16_nopad_bin | eloqsql/strings/ctype-ucs2.c | static void
my_hash_sort_utf16_nopad_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *pos, size_t len,
ulong *nr1, ulong *nr2)
{
const uchar *end= pos + len;
register ulong m1= *nr1, m2= *nr2;
for ( ; pos < end ; pos++)
{
MY_HASH_ADD(m1, m2, (uint)*pos);
}
*nr1= m1;
*nr2= m2;
} | O0 | c | my_hash_sort_utf16_nopad_bin:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x5faae
jmp 0x5fa66
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
jmp 0x5faa0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x5fa5a
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_sort_utf16_nopad_bin:
push rbp
mov rbp, rsp
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_10]
add rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_40], rax
loc_5FA5A:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_30]
jnb short loc_5FAAE
jmp short $+2
loc_5FA66:
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
jmp short $+2
loc_5FAA0:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_5FA5A
loc_5FAAE:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
mov [rax], rcx
pop rbp
retn
| _QWORD * my_hash_sort_utf16_nopad_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5)
{
_QWORD *result; // rax
long long v6; // [rsp+0h] [rbp-40h]
long long v7; // [rsp+8h] [rbp-38h]
unsigned __int8 *v8; // [rsp+30h] [rbp-10h]
v8 = a2;
v7 = *a4;
v6 = *a5;
while ( v8 < &a2[a3] )
{
v7 ^= (v7 << 8) + *v8 * (v6 + (v7 & 0x3F));
v6 += 3LL;
++v8;
}
*a4 = v7;
result = a5;
*a5 = v6;
return result;
}
| my_hash_sort_utf16_nopad_bin:
PUSH RBP
MOV RBP,RSP
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 + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LAB_0015fa5a:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0015faae
JMP 0x0015fa66
LAB_0015fa66:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0015faa0
LAB_0015faa0:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0015fa5a
LAB_0015faae:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
POP RBP
RET
|
void my_hash_sort_utf16_nopad_bin
(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
long local_48;
ulong local_40;
byte *local_18;
local_40 = *param_4;
local_48 = *param_5;
for (local_18 = param_2; local_18 < param_2 + param_3; local_18 = local_18 + 1) {
local_40 = ((local_40 & 0x3f) + local_48) * (ulong)*local_18 + local_40 * 0x100 ^ local_40;
local_48 = local_48 + 3;
}
*param_4 = local_40;
*param_5 = local_48;
return;
}
| |
39,388 | scan_one_character | eloqsql/strings/ctype.c | static size_t
scan_one_character(const char *s, const char *e, my_wc_t *wc)
{
CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci;
if (s >= e)
return 0;
/* Escape sequence: \uXXXX */
if (s[0] == '\\' && s + 2 < e && s[1] == 'u' && my_isxdigit(cs, s[2]))
{
size_t len= 3; /* We have at least one digit */
for (s+= 3; s < e && my_isxdigit(cs, s[0]); s++, len++)
{
}
wc[0]= 0;
return len;
}
else if ((int8) s[0] > 0) /* 7-bit character */
{
wc[0]= 0;
return 1;
}
else /* Non-escaped character */
{
int rc= my_ci_mb_wc(cs, wc, (uchar *) s, (uchar *) e);
if (rc > 0)
return (size_t) rc;
}
return 0;
} | O0 | c | scan_one_character:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x1bab45(%rip), %rax # 0x1f11f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x366c6
movq $0x0, -0x8(%rbp)
jmp 0x367f8
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x36797
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x18(%rbp), %rax
jae 0x36797
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x75, %eax
jne 0x36797
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x36797
movq $0x3, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x35(%rbp)
jae 0x3675d
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x36766
jmp 0x36782
jmp 0x36768
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3672c
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x367f8
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jle 0x367b8
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq $0x1, -0x8(%rbp)
jmp 0x367f8
movq -0x28(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jle 0x367ec
movslq -0x34(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x367f8
jmp 0x367ee
jmp 0x367f0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| scan_one_character:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
lea rax, my_charset_utf8mb3_general_ci
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jb short loc_366C6
mov [rbp+var_8], 0
jmp loc_367F8
loc_366C6:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Ch ; '\'
jnz loc_36797
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_18]
jnb loc_36797
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
cmp eax, 75h ; 'u'
jnz loc_36797
mov rax, [rbp+var_28]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+2]
movzx eax, byte ptr [rax+rcx+1]
and eax, 80h
cmp eax, 0
jz short loc_36797
mov [rbp+var_30], 3
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_10], rax
loc_3672C:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_35], al
jnb short loc_3675D
mov rax, [rbp+var_28]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 80h
cmp eax, 0
setnz al
mov [rbp+var_35], al
loc_3675D:
mov al, [rbp+var_35]
test al, 1
jnz short loc_36766
jmp short loc_36782
loc_36766:
jmp short $+2
loc_36768:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_3672C
loc_36782:
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
jmp short loc_367F8
loc_36797:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jle short loc_367B8
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov [rbp+var_8], 1
jmp short loc_367F8
loc_367B8:
mov rax, [rbp+var_28]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_18]
call rax
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jle short loc_367EC
movsxd rax, [rbp+var_34]
mov [rbp+var_8], rax
jmp short loc_367F8
loc_367EC:
jmp short $+2
loc_367EE:
jmp short $+2
loc_367F0:
mov [rbp+var_8], 0
loc_367F8:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long scan_one_character(char *a1, unsigned long long a2, _QWORD *a3)
{
bool v4; // [rsp+Bh] [rbp-35h]
int v5; // [rsp+Ch] [rbp-34h]
long long v6; // [rsp+10h] [rbp-30h]
unsigned __int8 *i; // [rsp+30h] [rbp-10h]
if ( (unsigned long long)a1 >= a2 )
return 0LL;
if ( *a1 == 92
&& (unsigned long long)(a1 + 2) < a2
&& a1[1] == 117
&& (*(_BYTE *)(*((_QWORD *)&my_charset_utf8mb3_general_ci + 8) + (unsigned __int8)a1[2] + 1LL) & 0x80) != 0 )
{
v6 = 3LL;
for ( i = (unsigned __int8 *)(a1 + 3); ; ++i )
{
v4 = 0;
if ( (unsigned long long)i < a2 )
v4 = (*(_BYTE *)(*((_QWORD *)&my_charset_utf8mb3_general_ci + 8) + *i + 1LL) & 0x80) != 0;
if ( !v4 )
break;
++v6;
}
*a3 = 0LL;
return v6;
}
else if ( *a1 <= 0 )
{
v5 = (*(long long ( **)(void *, _QWORD *, char *, unsigned long long))(*((_QWORD *)&my_charset_utf8mb3_general_ci
+ 23)
+ 40LL))(
&my_charset_utf8mb3_general_ci,
a3,
a1,
a2);
if ( v5 <= 0 )
return 0LL;
else
return v5;
}
else
{
*a3 = 0LL;
return 1LL;
}
}
| scan_one_character:
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
LEA RAX,[0x2f11f0]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JC 0x001366c6
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001367f8
LAB_001366c6:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5c
JNZ 0x00136797
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x00136797
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x75
JNZ 0x00136797
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x2]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x80
CMP EAX,0x0
JZ 0x00136797
MOV qword ptr [RBP + -0x30],0x3
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x10],RAX
LAB_0013672c:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x35],AL
JNC 0x0013675d
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x80
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x35],AL
LAB_0013675d:
MOV AL,byte ptr [RBP + -0x35]
TEST AL,0x1
JNZ 0x00136766
JMP 0x00136782
LAB_00136766:
JMP 0x00136768
LAB_00136768:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0013672c
LAB_00136782:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001367f8
LAB_00136797:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JLE 0x001367b8
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV qword ptr [RBP + -0x8],0x1
JMP 0x001367f8
LAB_001367b8:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x0
JLE 0x001367ec
MOVSXD RAX,dword ptr [RBP + -0x34]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001367f8
LAB_001367ec:
JMP 0x001367ee
LAB_001367ee:
JMP 0x001367f0
LAB_001367f0:
MOV qword ptr [RBP + -0x8],0x0
LAB_001367f8:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long scan_one_character(byte *param_1,byte *param_2,int8 *param_3)
{
int iVar1;
bool bVar2;
long local_38;
byte *local_18;
long local_10;
if (param_1 < param_2) {
if ((((*param_1 == 0x5c) && (param_1 + 2 < param_2)) && (param_1[1] == 0x75)) &&
((*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)param_1[2]) & 0x80) != 0)) {
local_38 = 3;
local_18 = param_1 + 3;
while( true ) {
bVar2 = false;
if (local_18 < param_2) {
bVar2 = (*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)*local_18) & 0x80) !=
0;
}
if (!bVar2) break;
local_18 = local_18 + 1;
local_38 = local_38 + 1;
}
*param_3 = 0;
local_10 = local_38;
}
else if ((char)*param_1 < '\x01') {
iVar1 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28))
(my_charset_utf8mb3_general_ci,param_3,param_1,param_2);
if (iVar1 < 1) {
local_10 = 0;
}
else {
local_10 = (long)iVar1;
}
}
else {
*param_3 = 0;
local_10 = 1;
}
}
else {
local_10 = 0;
}
return local_10;
}
| |
39,389 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) | monkey531[P]llama/common/json.hpp | static diyfp normalize(diyfp x) noexcept
{
JSON_ASSERT(x.f != 0);
while ((x.f >> 63u) == 0)
{
x.f <<= 1u;
x.e--;
}
return x;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp):
pushq %rax
testq %rdi, %rdi
je 0x7bf6f
js 0x7bf68
addq %rdi, %rdi
decl %esi
testq %rdi, %rdi
jns 0x7bf5e
movq %rdi, %rax
movl %esi, %edx
popq %rcx
retq
leaq 0x2f6e1(%rip), %rdi # 0xab657
leaq 0x2de94(%rip), %rdx # 0xa9e11
leaq 0x32338(%rip), %rcx # 0xae2bc
movl $0x42a1, %esi # imm = 0x42A1
xorl %eax, %eax
callq 0x18ad0
movq %rax, %rdi
callq 0x2a807
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_:
push rax
test rdi, rdi
jz short loc_7BF6F
js short loc_7BF68
loc_7BF5E:
add rdi, rdi
dec esi
test rdi, rdi
jns short loc_7BF5E
loc_7BF68:
mov rax, rdi
mov edx, esi
pop rcx
retn
loc_7BF6F:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aXF0; "x.f != 0"
mov esi, 42A1h
xor eax, eax
call _ggml_abort
mov rdi, rax
call __clang_call_terminate
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(long long a1, int a2)
{
void *v3; // rax
if ( !a1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17057LL,
"GGML_ASSERT(%s) failed",
"x.f != 0");
_clang_call_terminate(v3);
}
for ( ; a1 >= 0; --a2 )
a1 *= 2LL;
return a1;
}
| normalize:
PUSH RAX
TEST RDI,RDI
JZ 0x0017bf6f
JS 0x0017bf68
LAB_0017bf5e:
ADD RDI,RDI
DEC ESI
TEST RDI,RDI
JNS 0x0017bf5e
LAB_0017bf68:
MOV RAX,RDI
MOV EDX,ESI
POP RCX
RET
LAB_0017bf6f:
LEA RDI,[0x1ab657]
LEA RDX,[0x1a9e11]
LEA RCX,[0x1ae2bc]
MOV ESI,0x42a1
XOR EAX,EAX
CALL 0x00118ad0
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
*/
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(diyfp *this,int param_2)
{
int1 auVar1 [16];
if (this != (diyfp *)0x0) {
if (-1 < (long)this) {
do {
this = (diyfp *)((long)this * 2);
param_2 = param_2 + -1;
} while (-1 < (long)this);
}
auVar1._8_4_ = param_2;
auVar1._0_8_ = this;
auVar1._12_4_ = 0;
return auVar1;
}
/* try { // try from 0017bf6f to 0017bf8f has its CatchHandler @ 0017bf90 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x42a1,
"GGML_ASSERT(%s) failed","x.f != 0");
}
| |
39,390 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) | monkey531[P]llama/common/json.hpp | static diyfp normalize(diyfp x) noexcept
{
JSON_ASSERT(x.f != 0);
while ((x.f >> 63u) == 0)
{
x.f <<= 1u;
x.e--;
}
return x;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp):
pushq %rax
testq %rdi, %rdi
je 0x7ad23
js 0x7ad1c
addq %rdi, %rdi
decl %esi
testq %rdi, %rdi
jns 0x7ad12
movq %rdi, %rax
movl %esi, %edx
popq %rcx
retq
leaq 0x2e91d(%rip), %rdi # 0xa9647
leaq 0x2d0d0(%rip), %rdx # 0xa7e01
leaq 0x31574(%rip), %rcx # 0xac2ac
movl $0x42a1, %esi # imm = 0x42A1
xorl %eax, %eax
callq 0x18ad0
movq %rax, %rdi
callq 0x29f9b
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_:
push rax
test rdi, rdi
jz short loc_7AD23
js short loc_7AD1C
loc_7AD12:
add rdi, rdi
dec esi
test rdi, rdi
jns short loc_7AD12
loc_7AD1C:
mov rax, rdi
mov edx, esi
pop rcx
retn
loc_7AD23:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aXF0; "x.f != 0"
mov esi, 42A1h
xor eax, eax
call _ggml_abort
mov rdi, rax
call __clang_call_terminate
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(long long a1, int a2)
{
void *v3; // rax
if ( !a1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17057LL,
"GGML_ASSERT(%s) failed",
"x.f != 0");
_clang_call_terminate(v3);
}
for ( ; a1 >= 0; --a2 )
a1 *= 2LL;
return a1;
}
| normalize:
PUSH RAX
TEST RDI,RDI
JZ 0x0017ad23
JS 0x0017ad1c
LAB_0017ad12:
ADD RDI,RDI
DEC ESI
TEST RDI,RDI
JNS 0x0017ad12
LAB_0017ad1c:
MOV RAX,RDI
MOV EDX,ESI
POP RCX
RET
LAB_0017ad23:
LEA RDI,[0x1a9647]
LEA RDX,[0x1a7e01]
LEA RCX,[0x1ac2ac]
MOV ESI,0x42a1
XOR EAX,EAX
CALL 0x00118ad0
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
*/
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(diyfp *this,int param_2)
{
int1 auVar1 [16];
if (this != (diyfp *)0x0) {
if (-1 < (long)this) {
do {
this = (diyfp *)((long)this * 2);
param_2 = param_2 + -1;
} while (-1 < (long)this);
}
auVar1._8_4_ = param_2;
auVar1._0_8_ = this;
auVar1._12_4_ = 0;
return auVar1;
}
/* try { // try from 0017ad23 to 0017ad43 has its CatchHandler @ 0017ad44 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x42a1,
"GGML_ASSERT(%s) failed","x.f != 0");
}
| |
39,391 | MNN::PriorBoxT::PriorBoxT() | mnn-tts/MNN/schema/current/CaffeOp_generated.h | PriorBoxT()
: flip(false),
clip(false),
imageWidth(0),
imageHeight(0),
stepWidth(0),
stepHeight(0),
offset(0.0f) {
} | O0 | c | MNN::PriorBoxT::PriorBoxT():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xb320
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
callq 0xb320
movq 0x8(%rsp), %rdi
addq $0x30, %rdi
callq 0xb320
movq 0x8(%rsp), %rdi
addq $0x48, %rdi
callq 0xb320
movq 0x8(%rsp), %rax
movb $0x0, 0x60(%rax)
movb $0x0, 0x61(%rax)
movl $0x0, 0x64(%rax)
movl $0x0, 0x68(%rax)
movl $0x0, 0x6c(%rax)
movl $0x0, 0x70(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x74(%rax)
addq $0x18, %rsp
retq
nopl (%rax,%rax)
| _ZN3MNN9PriorBoxTC2Ev:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]
mov [rsp+18h+var_10], rdi
call _ZNSt3__16vectorIfNS_9allocatorIfEEEC2B8nn200100Ev; std::vector<float>::vector(void)
mov rdi, [rsp+18h+var_10]
add rdi, 18h
call _ZNSt3__16vectorIfNS_9allocatorIfEEEC2B8nn200100Ev; std::vector<float>::vector(void)
mov rdi, [rsp+18h+var_10]
add rdi, 30h ; '0'
call _ZNSt3__16vectorIfNS_9allocatorIfEEEC2B8nn200100Ev; std::vector<float>::vector(void)
mov rdi, [rsp+18h+var_10]
add rdi, 48h ; 'H'
call _ZNSt3__16vectorIfNS_9allocatorIfEEEC2B8nn200100Ev; std::vector<float>::vector(void)
mov rax, [rsp+18h+var_10]
mov byte ptr [rax+60h], 0
mov byte ptr [rax+61h], 0
mov dword ptr [rax+64h], 0
mov dword ptr [rax+68h], 0
mov dword ptr [rax+6Ch], 0
mov dword ptr [rax+70h], 0
xorps xmm0, xmm0
movss dword ptr [rax+74h], xmm0
add rsp, 18h
retn
| MNN::PriorBoxT * MNN::PriorBoxT::PriorBoxT(MNN::PriorBoxT *this)
{
MNN::PriorBoxT *result; // rax
std::vector<float>::vector[abi:nn200100](this);
std::vector<float>::vector[abi:nn200100]((_QWORD *)this + 3);
std::vector<float>::vector[abi:nn200100]((_QWORD *)this + 6);
std::vector<float>::vector[abi:nn200100]((_QWORD *)this + 9);
result = this;
*((_BYTE *)this + 96) = 0;
*((_BYTE *)this + 97) = 0;
*((_DWORD *)this + 25) = 0;
*((_DWORD *)this + 26) = 0;
*((_DWORD *)this + 27) = 0;
*((_DWORD *)this + 28) = 0;
*((_DWORD *)this + 29) = 0;
return result;
}
| PriorBoxT:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0010b320
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
CALL 0x0010b320
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x30
CALL 0x0010b320
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x48
CALL 0x0010b320
MOV RAX,qword ptr [RSP + 0x8]
MOV byte ptr [RAX + 0x60],0x0
MOV byte ptr [RAX + 0x61],0x0
MOV dword ptr [RAX + 0x64],0x0
MOV dword ptr [RAX + 0x68],0x0
MOV dword ptr [RAX + 0x6c],0x0
MOV dword ptr [RAX + 0x70],0x0
XORPS XMM0,XMM0
MOVSS dword ptr [RAX + 0x74],XMM0
ADD RSP,0x18
RET
|
/* MNN::PriorBoxT::PriorBoxT() */
void __thiscall MNN::PriorBoxT::PriorBoxT(PriorBoxT *this)
{
std::vector<float,std::allocator<float>>::vector_abi_nn200100_
((vector<float,std::allocator<float>> *)this);
std::vector<float,std::allocator<float>>::vector_abi_nn200100_
((vector<float,std::allocator<float>> *)(this + 0x18));
std::vector<float,std::allocator<float>>::vector_abi_nn200100_
((vector<float,std::allocator<float>> *)(this + 0x30));
std::vector<float,std::allocator<float>>::vector_abi_nn200100_
((vector<float,std::allocator<float>> *)(this + 0x48));
this[0x60] = (PriorBoxT)0x0;
this[0x61] = (PriorBoxT)0x0;
*(int4 *)(this + 100) = 0;
*(int4 *)(this + 0x68) = 0;
*(int4 *)(this + 0x6c) = 0;
*(int4 *)(this + 0x70) = 0;
*(int4 *)(this + 0x74) = 0;
return;
}
| |
39,392 | my_mb_wc_filename | eloqsql/strings/ctype-utf8.c | static int
my_mb_wc_filename(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int byte1, byte2;
if (s >= e)
return MY_CS_TOOSMALL;
if (*s < 128 && filename_safe_char[*s])
{
*pwc= *s;
return 1;
}
if (*s != MY_FILENAME_ESCAPE)
return MY_CS_ILSEQ;
if (s + 3 > e)
return MY_CS_TOOSMALL3;
byte1= s[1];
if (byte1 == 0)
return MY_CS_ILSEQ; /* avoid possible out-of-bounds read */
byte2= s[2];
if (byte1 >= 0x30 && byte1 <= 0x7F &&
byte2 >= 0x30 && byte2 <= 0x7F)
{
int code= (byte1 - 0x30) * 80 + byte2 - 0x30;
if (code < 5994 && touni[code])
{
*pwc= touni[code];
return 3;
}
if (byte1 == '@' && byte2 == '@')
{
*pwc= 0;
return 3;
}
}
if (s + 4 > e)
return MY_CS_TOOSMALL4;
if ((byte1= hexlo(byte1)) >= 0 &&
(byte2= hexlo(byte2)) >= 0)
{
int byte3= hexlo(s[3]);
int byte4= hexlo(s[3] ? s[4] : 0);
if (byte3 >=0 && byte4 >=0)
{
*pwc= (byte1 << 12) + (byte2 << 8) + (byte3 << 4) + byte4;
return 5;
}
}
return MY_CS_ILSEQ;
} | O3 | c | my_mb_wc_filename:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x55b5a
movsbq (%rdx), %r8
testq %r8, %r8
js 0x55b58
leaq 0x28251e(%rip), %rdi # 0x2d7f80
movl $0x1, %eax
cmpb $0x0, (%r8,%rdi)
je 0x55a76
movq %r8, (%rsi)
jmp 0x55b5a
cmpb $0x40, %r8b
jne 0x55b58
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0x55b5a
movzbl 0x1(%rdx), %r10d
testl %r10d, %r10d
je 0x55b58
movb 0x2(%rdx), %al
movzbl %al, %r9d
cmpb $0x30, %r10b
setge %al
cmpb $0x30, %r9b
setge %r8b
andb %al, %r8b
cmpb $0x1, %r8b
jne 0x55b11
leal (%r10,%r10,4), %eax
shll $0x4, %eax
addl %r9d, %eax
addl $0xfffff100, %eax # imm = 0xFFFFF100
cmpl $0x1799, %eax # imm = 0x1799
jg 0x55af3
addl $-0x30, %eax
leaq 0x282521(%rip), %r8 # 0x2d8000
movzwl (%r8,%rax,2), %r8d
testq %r8, %r8
je 0x55af3
movl $0x3, %eax
jmp 0x55a6e
movl %r10d, %eax
xorb $0x40, %al
movl %r9d, %r8d
xorb $0x40, %r8b
orb %al, %r8b
jne 0x55b11
movl $0x3, %eax
xorl %r8d, %r8d
jmp 0x55a6e
addq $0x4, %rdx
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %rdx
ja 0x55b5a
movl %r10d, %eax
leaq 0x2853b7(%rip), %r10 # 0x2daee0
movzbl (%rax,%r10), %ecx
testb %cl, %cl
js 0x55b58
movl %r9d, %eax
movzbl (%rax,%r10), %r9d
movl $0x0, %eax
testb %r9b, %r9b
js 0x55b5a
movzbl (%rdi), %edi
xorl %eax, %eax
movzbl (%rdi,%r10), %r8d
testq %rdi, %rdi
je 0x55b5c
movzbl (%rdx), %edx
jmp 0x55b5e
xorl %eax, %eax
popq %rbp
retq
xorl %edx, %edx
testb %r8b, %r8b
js 0x55b5a
movb (%rdx,%r10), %dl
testb %dl, %dl
js 0x55b5a
movzbl %dl, %eax
shll $0xc, %ecx
shll $0x8, %r9d
shll $0x4, %r8d
addq %rcx, %r8
addq %r9, %r8
addq %rax, %r8
movl $0x5, %eax
jmp 0x55a6e
| my_mb_wc_filename:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb loc_55B5A
movsx r8, byte ptr [rdx]
test r8, r8
js loc_55B58
lea rdi, filename_safe_char
mov eax, 1
cmp byte ptr [r8+rdi], 0
jz short loc_55A76
loc_55A6E:
mov [rsi], r8
jmp loc_55B5A
loc_55A76:
cmp r8b, 40h ; '@'
jnz loc_55B58
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja loc_55B5A
movzx r10d, byte ptr [rdx+1]
test r10d, r10d
jz loc_55B58
mov al, [rdx+2]
movzx r9d, al
cmp r10b, 30h ; '0'
setnl al
cmp r9b, 30h ; '0'
setnl r8b
and r8b, al
cmp r8b, 1
jnz short loc_55B11
lea eax, [r10+r10*4]
shl eax, 4
add eax, r9d
add eax, 0FFFFF100h
cmp eax, 1799h
jg short loc_55AF3
add eax, 0FFFFFFD0h
lea r8, touni
movzx r8d, word ptr [r8+rax*2]
test r8, r8
jz short loc_55AF3
mov eax, 3
jmp loc_55A6E
loc_55AF3:
mov eax, r10d
xor al, 40h
mov r8d, r9d
xor r8b, 40h
or r8b, al
jnz short loc_55B11
mov eax, 3
xor r8d, r8d
jmp loc_55A6E
loc_55B11:
add rdx, 4
mov eax, 0FFFFFF98h
cmp rdx, rcx
ja short loc_55B5A
mov eax, r10d
lea r10, hexlo_hex_lo_digit
movzx ecx, byte ptr [rax+r10]
test cl, cl
js short loc_55B58
mov eax, r9d
movzx r9d, byte ptr [rax+r10]
mov eax, 0
test r9b, r9b
js short loc_55B5A
movzx edi, byte ptr [rdi]
xor eax, eax
movzx r8d, byte ptr [rdi+r10]
test rdi, rdi
jz short loc_55B5C
movzx edx, byte ptr [rdx]
jmp short loc_55B5E
loc_55B58:
xor eax, eax
loc_55B5A:
pop rbp
retn
loc_55B5C:
xor edx, edx
loc_55B5E:
test r8b, r8b
js short loc_55B5A
mov dl, [rdx+r10]
test dl, dl
js short loc_55B5A
movzx eax, dl
shl ecx, 0Ch
shl r9d, 8
shl r8d, 4
add r8, rcx
add r8, r9
add r8, rax
mov eax, 5
jmp loc_55A6E
| long long my_mb_wc_filename(long long a1, signed long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
signed long long v5; // r8
unsigned __int8 *v6; // rdi
int v7; // r10d
int v8; // r9d
long long v9; // rax
unsigned __int8 *v10; // rdx
int v11; // ecx
int v12; // r9d
long long v13; // rdi
int v14; // r8d
long long v15; // rdx
char v16; // dl
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
v5 = *a3;
if ( v5 < 0 )
return 0LL;
result = 1LL;
if ( filename_safe_char[v5] )
{
LABEL_4:
*a2 = v5;
return result;
}
if ( (_BYTE)v5 != 64 )
return 0LL;
v6 = (unsigned __int8 *)(a3 + 3);
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) > a4 )
return result;
v7 = (unsigned __int8)a3[1];
if ( !a3[1] )
return 0LL;
v8 = (unsigned __int8)a3[2];
if ( (char)v7 >= 48 && (char)v8 >= 48 )
{
if ( v8 + 80 * v7 - 3840 <= 6041 )
{
v9 = (unsigned int)(v8 + 80 * v7 - 3888);
v5 = touni[v9];
if ( touni[v9] )
{
result = 3LL;
goto LABEL_4;
}
}
if ( !((unsigned __int8)v7 ^ 0x40 | (unsigned __int8)v8 ^ 0x40) )
{
result = 3LL;
v5 = 0LL;
goto LABEL_4;
}
}
v10 = (unsigned __int8 *)(a3 + 4);
result = 4294967192LL;
if ( (unsigned long long)v10 <= a4 )
{
v11 = hexlo_hex_lo_digit[v7];
if ( (v11 & 0x80u) == 0 )
{
v12 = hexlo_hex_lo_digit[v8];
result = 0LL;
if ( (v12 & 0x80u) == 0 )
{
v13 = *v6;
result = 0LL;
v14 = hexlo_hex_lo_digit[v13];
v15 = v13 ? *v10 : 0LL;
if ( (v14 & 0x80u) == 0 )
{
v16 = hexlo_hex_lo_digit[v15];
if ( v16 >= 0 )
{
v5 = (unsigned __int8)v16
+ (unsigned int)(v12 << 8)
+ (unsigned int)(v11 << 12)
+ (unsigned long long)(unsigned int)(16 * v14);
result = 5LL;
goto LABEL_4;
}
}
}
return result;
}
return 0LL;
}
return result;
}
| my_mb_wc_filename:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00155b5a
MOVSX R8,byte ptr [RDX]
TEST R8,R8
JS 0x00155b58
LEA RDI,[0x3d7f80]
MOV EAX,0x1
CMP byte ptr [R8 + RDI*0x1],0x0
JZ 0x00155a76
LAB_00155a6e:
MOV qword ptr [RSI],R8
JMP 0x00155b5a
LAB_00155a76:
CMP R8B,0x40
JNZ 0x00155b58
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x00155b5a
MOVZX R10D,byte ptr [RDX + 0x1]
TEST R10D,R10D
JZ 0x00155b58
MOV AL,byte ptr [RDX + 0x2]
MOVZX R9D,AL
CMP R10B,0x30
SETGE AL
CMP R9B,0x30
SETGE R8B
AND R8B,AL
CMP R8B,0x1
JNZ 0x00155b11
LEA EAX,[R10 + R10*0x4]
SHL EAX,0x4
ADD EAX,R9D
ADD EAX,0xfffff100
CMP EAX,0x1799
JG 0x00155af3
ADD EAX,-0x30
LEA R8,[0x3d8000]
MOVZX R8D,word ptr [R8 + RAX*0x2]
TEST R8,R8
JZ 0x00155af3
MOV EAX,0x3
JMP 0x00155a6e
LAB_00155af3:
MOV EAX,R10D
XOR AL,0x40
MOV R8D,R9D
XOR R8B,0x40
OR R8B,AL
JNZ 0x00155b11
MOV EAX,0x3
XOR R8D,R8D
JMP 0x00155a6e
LAB_00155b11:
ADD RDX,0x4
MOV EAX,0xffffff98
CMP RDX,RCX
JA 0x00155b5a
MOV EAX,R10D
LEA R10,[0x3daee0]
MOVZX ECX,byte ptr [RAX + R10*0x1]
TEST CL,CL
JS 0x00155b58
MOV EAX,R9D
MOVZX R9D,byte ptr [RAX + R10*0x1]
MOV EAX,0x0
TEST R9B,R9B
JS 0x00155b5a
MOVZX EDI,byte ptr [RDI]
XOR EAX,EAX
MOVZX R8D,byte ptr [RDI + R10*0x1]
TEST RDI,RDI
JZ 0x00155b5c
MOVZX EDX,byte ptr [RDX]
JMP 0x00155b5e
LAB_00155b58:
XOR EAX,EAX
LAB_00155b5a:
POP RBP
RET
LAB_00155b5c:
XOR EDX,EDX
LAB_00155b5e:
TEST R8B,R8B
JS 0x00155b5a
MOV DL,byte ptr [RDX + R10*0x1]
TEST DL,DL
JS 0x00155b5a
MOVZX EAX,DL
SHL ECX,0xc
SHL R9D,0x8
SHL R8D,0x4
ADD R8,RCX
ADD R8,R9
ADD R8,RAX
MOV EAX,0x5
JMP 0x00155a6e
|
int8 my_mb_wc_filename(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
int iVar3;
int8 uVar4;
ulong uVar5;
ulong uVar6;
if (param_4 <= param_3) {
return 0xffffff9b;
}
uVar6 = (ulong)(char)*param_3;
if ((long)uVar6 < 0) {
return 0;
}
uVar4 = 1;
if (filename_safe_char[uVar6] != '\0') goto LAB_00155a6e;
if (*param_3 == 0x40) {
if (param_4 < param_3 + 3) {
return 0xffffff99;
}
bVar2 = param_3[1];
if (bVar2 == 0) {
return 0;
}
bVar1 = param_3[2];
if ('/' < (char)bVar1 && '/' < (char)bVar2) {
iVar3 = ((uint)bVar2 + (uint)bVar2 * 4) * 0x10 + (uint)bVar1;
if ((iVar3 + -0xf00 < 0x179a) &&
(uVar6 = (ulong)*(ushort *)(touni + (ulong)(iVar3 - 0xf30) * 2), uVar6 != 0)) {
uVar4 = 3;
goto LAB_00155a6e;
}
if (bVar1 == 0x40 && bVar2 == 0x40) {
uVar4 = 3;
uVar6 = 0;
goto LAB_00155a6e;
}
}
if (param_4 < param_3 + 4) {
return 0xffffff98;
}
if (-1 < (char)hexlo_hex_lo_digit[bVar2]) {
if ((char)hexlo_hex_lo_digit[bVar1] < '\0') {
return 0;
}
uVar6 = (ulong)param_3[3];
if (uVar6 == 0) {
uVar5 = 0;
}
else {
uVar5 = (ulong)param_3[4];
}
if ((char)hexlo_hex_lo_digit[uVar6] < '\0') {
return 0;
}
if ((char)hexlo_hex_lo_digit[uVar5] < '\0') {
return 0;
}
uVar6 = (ulong)(byte)hexlo_hex_lo_digit[uVar6] * 0x10 +
(ulong)(byte)hexlo_hex_lo_digit[bVar2] * 0x1000 +
(ulong)(byte)hexlo_hex_lo_digit[bVar1] * 0x100 +
(ulong)(byte)hexlo_hex_lo_digit[uVar5];
uVar4 = 5;
LAB_00155a6e:
*param_2 = uVar6;
return uVar4;
}
}
return 0;
}
| |
39,393 | js_module_ns_has | bluesky950520[P]quickjs/quickjs.c | static force_inline JSShapeProperty *find_own_property1(JSObject *p,
JSAtom atom)
{
JSShape *sh;
JSShapeProperty *pr, *prop;
intptr_t h;
sh = p->shape;
h = (uintptr_t)atom & sh->prop_hash_mask;
h = prop_hash_end(sh)[-h - 1];
prop = get_shape_prop(sh);
while (h) {
pr = &prop[h - 1];
if (likely(pr->atom == atom)) {
return pr;
}
h = pr->hash_next;
}
return NULL;
} | O1 | c | js_module_ns_has:
movq 0x18(%rsi), %rax
movl 0x20(%rax), %edx
andl %ecx, %edx
notq %rdx
movl (%rax,%rdx,4), %edx
testl %edx, %edx
je 0x475f5
addq $0x40, %rax
movl $0x3ffffff, %esi # imm = 0x3FFFFFF
movl %edx, %edx
leaq (%rax,%rdx,8), %rdx
addq $-0x8, %rdx
cmpl %ecx, 0x4(%rdx)
je 0x475ec
movl (%rdx), %edx
andl %esi, %edx
jne 0x475d5
xorl %edx, %edx
xorl %eax, %eax
testq %rdx, %rdx
setne %al
retq
xorl %eax, %eax
retq
| js_module_ns_has:
mov rax, [rsi+18h]
mov edx, [rax+20h]
and edx, ecx
not rdx
mov edx, [rax+rdx*4]
test edx, edx
jz short loc_475F5
add rax, 40h ; '@'
mov esi, 3FFFFFFh
loc_475D5:
mov edx, edx
lea rdx, [rax+rdx*8]
add rdx, 0FFFFFFFFFFFFFFF8h
cmp [rdx+4], ecx
jz short loc_475EC
mov edx, [rdx]
and edx, esi
jnz short loc_475D5
xor edx, edx
loc_475EC:
xor eax, eax
test rdx, rdx
setnz al
retn
loc_475F5:
xor eax, eax
retn
| _BOOL8 js_module_ns_has(long long a1, long long a2, long long a3, unsigned int a4)
{
long long v4; // rax
unsigned int v5; // edx
long long v6; // rax
_DWORD *v7; // rdx
v4 = *(_QWORD *)(a2 + 24);
v5 = *(_DWORD *)(v4 + 4 * ~(unsigned long long)(a4 & *(_DWORD *)(v4 + 32)));
if ( !v5 )
return 0LL;
v6 = v4 + 64;
while ( 1 )
{
v7 = (_DWORD *)(v6 + 8LL * v5 - 8);
if ( v7[1] == a4 )
break;
v5 = *v7 & 0x3FFFFFF;
if ( !v5 )
{
v7 = 0LL;
return v7 != 0LL;
}
}
return v7 != 0LL;
}
| js_module_ns_has:
MOV RAX,qword ptr [RSI + 0x18]
MOV EDX,dword ptr [RAX + 0x20]
AND EDX,ECX
NOT RDX
MOV EDX,dword ptr [RAX + RDX*0x4]
TEST EDX,EDX
JZ 0x001475f5
ADD RAX,0x40
MOV ESI,0x3ffffff
LAB_001475d5:
MOV EDX,EDX
LEA RDX,[RAX + RDX*0x8]
ADD RDX,-0x8
CMP dword ptr [RDX + 0x4],ECX
JZ 0x001475ec
MOV EDX,dword ptr [RDX]
AND EDX,ESI
JNZ 0x001475d5
XOR EDX,EDX
LAB_001475ec:
XOR EAX,EAX
TEST RDX,RDX
SETNZ AL
RET
LAB_001475f5:
XOR EAX,EAX
RET
|
bool js_module_ns_has(int8 param_1,long param_2,int8 param_3,uint param_4)
{
long lVar1;
long lVar2;
uint uVar3;
uint *puVar4;
lVar2 = *(long *)(param_2 + 0x18);
uVar3 = *(uint *)(lVar2 + ~(ulong)(*(uint *)(lVar2 + 0x20) & param_4) * 4);
if (uVar3 == 0) {
return false;
}
do {
lVar1 = lVar2 + 0x40 + (ulong)uVar3 * 8;
puVar4 = (uint *)(lVar1 + -8);
if (*(uint *)(lVar1 + -4) == param_4) goto LAB_001475ec;
uVar3 = *puVar4 & 0x3ffffff;
} while (uVar3 != 0);
puVar4 = (uint *)0x0;
LAB_001475ec:
return puVar4 != (uint *)0x0;
}
| |
39,394 | PFS_table_io_stat::aggregate(PFS_table_io_stat const*) | eloqsql/storage/perfschema/pfs_stat.h | inline void aggregate(const PFS_table_io_stat *stat)
{
if (stat->m_has_data)
{
m_has_data= true;
m_fetch.aggregate(&stat->m_fetch);
m_insert.aggregate(&stat->m_insert);
m_update.aggregate(&stat->m_update);
m_delete.aggregate(&stat->m_delete);
}
} | O0 | c | PFS_table_io_stat::aggregate(PFS_table_io_stat const*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, (%rax)
je 0x3e298
movq -0x18(%rbp), %rdi
movb $0x1, (%rdi)
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x3e900
movq -0x18(%rbp), %rdi
addq $0x28, %rdi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
callq 0x3e900
movq -0x18(%rbp), %rdi
addq $0x48, %rdi
movq -0x10(%rbp), %rsi
addq $0x48, %rsi
callq 0x3e900
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
movq -0x10(%rbp), %rsi
addq $0x68, %rsi
callq 0x3e900
addq $0x20, %rsp
popq %rbp
retq
nop
| _ZN17PFS_table_io_stat9aggregateEPKS_:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
test byte ptr [rax], 1
jz short loc_3E298
mov rdi, [rbp+var_18]
mov byte ptr [rdi], 1
add rdi, 8; this
mov rsi, [rbp+var_10]
add rsi, 8; PFS_single_stat *
call _ZN15PFS_single_stat9aggregateEPKS_; PFS_single_stat::aggregate(PFS_single_stat const*)
mov rdi, [rbp+var_18]
add rdi, 28h ; '('; this
mov rsi, [rbp+var_10]
add rsi, 28h ; '('; PFS_single_stat *
call _ZN15PFS_single_stat9aggregateEPKS_; PFS_single_stat::aggregate(PFS_single_stat const*)
mov rdi, [rbp+var_18]
add rdi, 48h ; 'H'; this
mov rsi, [rbp+var_10]
add rsi, 48h ; 'H'; PFS_single_stat *
call _ZN15PFS_single_stat9aggregateEPKS_; PFS_single_stat::aggregate(PFS_single_stat const*)
mov rdi, [rbp+var_18]
add rdi, 68h ; 'h'; this
mov rsi, [rbp+var_10]
add rsi, 68h ; 'h'; PFS_single_stat *
call _ZN15PFS_single_stat9aggregateEPKS_; PFS_single_stat::aggregate(PFS_single_stat const*)
loc_3E298:
add rsp, 20h
pop rbp
retn
| const PFS_table_io_stat * PFS_table_io_stat::aggregate(PFS_table_io_stat *this, const PFS_table_io_stat *a2)
{
const PFS_table_io_stat *result; // rax
result = a2;
if ( (*(_BYTE *)a2 & 1) != 0 )
{
*(_BYTE *)this = 1;
PFS_single_stat::aggregate((PFS_table_io_stat *)((char *)this + 8), (const PFS_table_io_stat *)((char *)a2 + 8));
PFS_single_stat::aggregate((PFS_table_io_stat *)((char *)this + 40), (const PFS_table_io_stat *)((char *)a2 + 40));
PFS_single_stat::aggregate((PFS_table_io_stat *)((char *)this + 72), (const PFS_table_io_stat *)((char *)a2 + 72));
return (const PFS_table_io_stat *)PFS_single_stat::aggregate(
(PFS_table_io_stat *)((char *)this + 104),
(const PFS_table_io_stat *)((char *)a2 + 104));
}
return result;
}
| aggregate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
TEST byte ptr [RAX],0x1
JZ 0x0013e298
MOV RDI,qword ptr [RBP + -0x18]
MOV byte ptr [RDI],0x1
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x8
CALL 0x0013e900
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x28
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x28
CALL 0x0013e900
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x48
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x48
CALL 0x0013e900
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x68
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x68
CALL 0x0013e900
LAB_0013e298:
ADD RSP,0x20
POP RBP
RET
|
/* PFS_table_io_stat::aggregate(PFS_table_io_stat const*) */
void __thiscall PFS_table_io_stat::aggregate(PFS_table_io_stat *this,PFS_table_io_stat *param_1)
{
if (((byte)*param_1 & 1) != 0) {
*this = (PFS_table_io_stat)0x1;
PFS_single_stat::aggregate((PFS_single_stat *)(this + 8),(PFS_single_stat *)(param_1 + 8));
PFS_single_stat::aggregate((PFS_single_stat *)(this + 0x28),(PFS_single_stat *)(param_1 + 0x28))
;
PFS_single_stat::aggregate((PFS_single_stat *)(this + 0x48),(PFS_single_stat *)(param_1 + 0x48))
;
PFS_single_stat::aggregate((PFS_single_stat *)(this + 0x68),(PFS_single_stat *)(param_1 + 0x68))
;
}
return;
}
| |
39,395 | minja::Value::operator*(minja::Value const&) const | monkey531[P]llama/common/minja.hpp | Value operator*(const Value& rhs) const {
if (is_string() && rhs.is_number_integer()) {
std::ostringstream out;
for (int64_t i = 0, n = rhs.get<int64_t>(); i < n; ++i) {
out << to_str();
}
return out.str();
}
else if (is_number_integer() && rhs.is_number_integer())
return get<int64_t>() * rhs.get<int64_t>();
else
return get<double>() * rhs.get<double>();
} | O3 | cpp | minja::Value::operator*(minja::Value const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp # imm = 0x1A8
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movb 0x40(%rsi), %al
cmpb $0x3, %al
jne 0x978b5
movb 0x40(%r15), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x9790c
leaq 0x30(%rsp), %rdi
callq 0x1bb80
movq %r15, %rdi
callq 0x869ee
movq %rax, %r15
testq %rax, %rax
jle 0x9785b
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r12
leaq 0x30(%rsp), %r13
movq %r12, %rdi
movq %r14, %rsi
callq 0x97262
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r13, %rdi
callq 0x1b9d0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x97856
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8c0
decq %r15
jne 0x97822
leaq 0x38(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1bda0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8a9c0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x97892
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8c0
movq 0x966cf(%rip), %rsi # 0x12df68
leaq 0x30(%rsp), %rdi
callq 0x1b490
leaq 0xa0(%rsp), %rdi
callq 0x1b2b0
jmp 0x97957
addb $-0x5, %al
cmpb $0x1, %al
ja 0x9790c
movb 0x40(%r15), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x9790c
movq %r14, %rdi
callq 0x869ee
movq %rax, %r14
movq %r15, %rdi
callq 0x869ee
imulq %rax, %r14
leaq 0x40(%rbx), %r15
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x40(%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x60dd6
movq %r15, %rdi
jmp 0x9794d
movq %r14, %rdi
callq 0x86b38
movsd %xmm0, 0x28(%rsp)
movq %r15, %rdi
callq 0x86b38
mulsd 0x28(%rsp), %xmm0
leaq 0x40(%rbx), %r14
xorps %xmm1, %xmm1
movups %xmm1, (%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm1, 0x20(%rbx)
movups %xmm1, 0x30(%rbx)
movups %xmm1, 0x40(%rbx)
movq %r14, %rdi
callq 0x6039e
movq %r14, %rdi
movl $0x1, %esi
callq 0x590b4
movq %rbx, %rax
addq $0x1a8, %rsp # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x97995
jmp 0x979a2
jmp 0x97983
jmp 0x97983
movq %rax, %rbx
jmp 0x979a2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x979a2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8c0
movq 0x965bf(%rip), %rsi # 0x12df68
leaq 0x30(%rsp), %rdi
callq 0x1b490
leaq 0xa0(%rsp), %rdi
callq 0x1b2b0
movq %rbx, %rdi
callq 0x1bf90
| _ZNK5minja5ValuemlERKS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1A8h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov al, [rsi+40h]
cmp al, 3
jnz loc_978B5
mov al, [r15+40h]
add al, 0FBh
cmp al, 1
ja loc_9790C
lea rdi, [rsp+1D8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rdi, r15
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r15, rax
test rax, rax
jle short loc_9785B
lea rbp, [rsp+1D8h+var_1C0]
lea r12, [rsp+1D8h+var_1D0]
lea r13, [rsp+1D8h+var_1A8]
loc_97822:
mov rdi, r12
mov rsi, r14
call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void)
mov rsi, [rsp+1D8h+var_1D0]
mov rdx, [rsp+1D8h+var_1C8]
mov rdi, 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 rdi, [rsp+1D8h+var_1D0]; void *
cmp rdi, rbp
jz short loc_97856
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_97856:
dec r15
jnz short loc_97822
loc_9785B:
lea rsi, [rsp+1D8h+var_1A0]
lea rdi, [rsp+1D8h+var_1D0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rsi, [rsp+1D8h+var_1D0]
mov rdi, rbx
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
lea rax, [rsp+1D8h+var_1C0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_97892
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_97892:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1D8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1D8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp loc_97957
loc_978B5:
add al, 0FBh
cmp al, 1
ja short loc_9790C
mov al, [r15+40h]
add al, 0FBh
cmp al, 1
ja short loc_9790C
mov rdi, r14
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r14, rax
mov rdi, r15
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
imul r14, rax
lea r15, [rbx+40h]
xorpd xmm0, xmm0
movupd xmmword ptr [rbx], xmm0
movupd xmmword ptr [rbx+10h], xmm0
movupd xmmword ptr [rbx+20h], xmm0
movupd xmmword ptr [rbx+30h], xmm0
movupd xmmword ptr [rbx+40h], xmm0
mov rdi, r15
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<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> &,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>::number_integer_t)
mov rdi, r15
jmp short loc_9794D
loc_9790C:
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+1D8h+var_1B0], xmm0
mov rdi, r15
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
mulsd xmm0, [rsp+1D8h+var_1B0]
lea r14, [rbx+40h]
xorps xmm1, xmm1
movups xmmword ptr [rbx], xmm1
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx+20h], xmm1
movups xmmword ptr [rbx+30h], xmm1
movups xmmword ptr [rbx+40h], xmm1
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<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> &,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>::number_float_t)
mov rdi, r14
loc_9794D:
mov esi, 1
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)
loc_97957:
mov rax, rbx
add rsp, 1A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]
cmp rdi, rax
jnz short loc_97995
jmp short loc_979A2
jmp short loc_97983
jmp short $+2
loc_97983:
mov rbx, rax
jmp short loc_979A2
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, rbp
jz short loc_979A2
loc_97995:
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_979A2:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_28]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_98]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| long long minja::Value::operator*(long long a1, long long a2, long long a3)
{
char v5; // al
long long v6; // r15
long long v7; // r14
long long v8; // rax
char *v9; // rdi
double v10; // xmm0_8
void *v12[2]; // [rsp+8h] [rbp-1D0h] BYREF
_QWORD v13[2]; // [rsp+18h] [rbp-1C0h] BYREF
double v14; // [rsp+28h] [rbp-1B0h]
_BYTE v15[8]; // [rsp+30h] [rbp-1A8h] BYREF
_BYTE v16[104]; // [rsp+38h] [rbp-1A0h] BYREF
_BYTE v17[312]; // [rsp+A0h] [rbp-138h] BYREF
v5 = *(_BYTE *)(a2 + 64);
if ( v5 != 3 )
{
if ( (unsigned __int8)(v5 - 5) <= 1u && (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) <= 1u )
{
v7 = minja::Value::get<long>(a2);
v8 = minja::Value::get<long>(a3);
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<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>>(
(unsigned __int8 *)(a1 + 64),
v8 * v7);
v9 = (char *)(a1 + 64);
LABEL_14:
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(v9);
return a1;
}
LABEL_13:
v14 = minja::Value::get<double>(a2);
v10 = minja::Value::get<double>(a3) * v14;
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<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>>(
(unsigned __int8 *)(a1 + 64),
v10);
v9 = (char *)(a1 + 64);
goto LABEL_14;
}
if ( (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) > 1u )
goto LABEL_13;
std::ostringstream::basic_ostringstream(v15);
v6 = minja::Value::get<long>(a3);
if ( v6 > 0 )
{
do
{
minja::Value::to_str[abi:cxx11](v12, a2);
std::__ostream_insert<char,std::char_traits<char>>(v15, v12[0], v12[1]);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
--v6;
}
while ( v6 );
}
std::stringbuf::str(v12, v16);
minja::Value::Value(a1, (long long)v12);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
std::ostringstream::~ostringstream(v15, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v17);
return a1;
}
| operator*:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1a8
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
CMP AL,0x3
JNZ 0x001978b5
MOV AL,byte ptr [R15 + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x0019790c
LEA RDI,[RSP + 0x30]
CALL 0x0011bb80
LAB_00197803:
MOV RDI,R15
CALL 0x001869ee
MOV R15,RAX
TEST RAX,RAX
JLE 0x0019785b
LEA RBP,[RSP + 0x18]
LEA R12,[RSP + 0x8]
LEA R13,[RSP + 0x30]
LAB_00197822:
MOV RDI,R12
MOV RSI,R14
CALL 0x00197262
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00197837:
MOV RDI,R13
CALL 0x0011b9d0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00197856
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8c0
LAB_00197856:
DEC R15
JNZ 0x00197822
LAB_0019785b:
LEA RSI,[RSP + 0x38]
LAB_00197860:
LEA RDI,[RSP + 0x8]
CALL 0x0011bda0
LAB_0019786a:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0018a9c0
LAB_00197877:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00197892
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8c0
LAB_00197892:
MOV RSI,qword ptr [0x0022df68]
LEA RDI,[RSP + 0x30]
CALL 0x0011b490
LEA RDI,[RSP + 0xa0]
CALL 0x0011b2b0
JMP 0x00197957
LAB_001978b5:
ADD AL,0xfb
CMP AL,0x1
JA 0x0019790c
MOV AL,byte ptr [R15 + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x0019790c
MOV RDI,R14
CALL 0x001869ee
MOV R14,RAX
MOV RDI,R15
CALL 0x001869ee
IMUL R14,RAX
LEA R15,[RBX + 0x40]
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RBX],XMM0
MOVUPD xmmword ptr [RBX + 0x10],XMM0
MOVUPD xmmword ptr [RBX + 0x20],XMM0
MOVUPD xmmword ptr [RBX + 0x30],XMM0
MOVUPD xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R15
MOV RSI,R14
CALL 0x00160dd6
MOV RDI,R15
JMP 0x0019794d
LAB_0019790c:
MOV RDI,R14
CALL 0x00186b38
MOVSD qword ptr [RSP + 0x28],XMM0
MOV RDI,R15
CALL 0x00186b38
MULSD XMM0,qword ptr [RSP + 0x28]
LEA R14,[RBX + 0x40]
XORPS XMM1,XMM1
MOVUPS xmmword ptr [RBX],XMM1
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX + 0x20],XMM1
MOVUPS xmmword ptr [RBX + 0x30],XMM1
MOVUPS xmmword ptr [RBX + 0x40],XMM1
MOV RDI,R14
CALL 0x0016039e
MOV RDI,R14
LAB_0019794d:
MOV ESI,0x1
CALL 0x001590b4
LAB_00197957:
MOV RAX,RBX
ADD RSP,0x1a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
Value * __thiscall minja::Value::operator*(Value *this,Value *param_1)
{
long lVar1;
long lVar2;
Value *in_RDX;
double dVar3;
long *local_1d0;
long local_1c8;
long local_1c0 [2];
double local_1b0;
ostringstream local_1a8 [112];
ios_base local_138 [264];
if (param_1[0x40] == (Value)0x3) {
if ((byte)((char)in_RDX[0x40] - 5U) < 2) {
std::__cxx11::ostringstream::ostringstream(local_1a8);
/* try { // try from 00197803 to 0019780a has its CatchHandler @ 00197981 */
lVar1 = get<long>(in_RDX);
if (0 < lVar1) {
do {
/* try { // try from 00197822 to 0019782c has its CatchHandler @ 00197983 */
to_str_abi_cxx11_();
/* try { // try from 00197837 to 0019783e has its CatchHandler @ 00197988 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1d0,local_1c8);
if (local_1d0 != local_1c0) {
operator_delete(local_1d0,local_1c0[0] + 1);
}
lVar1 = lVar1 + -1;
} while (lVar1 != 0);
}
/* try { // try from 00197860 to 00197869 has its CatchHandler @ 0019797f */
std::__cxx11::stringbuf::str();
/* try { // try from 0019786a to 00197876 has its CatchHandler @ 0019796c */
Value(this,(string *)&local_1d0);
if (local_1d0 != local_1c0) {
operator_delete(local_1d0,local_1c0[0] + 1);
}
std::__cxx11::ostringstream::~ostringstream(local_1a8);
std::ios_base::~ios_base(local_138);
return this;
}
}
else if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) {
lVar1 = get<long>(param_1);
lVar2 = get<long>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
construct<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>>
(this + 0x40,lVar1 * lVar2);
goto LAB_0019794d;
}
local_1b0 = get<double>(param_1);
dVar3 = get<double>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::
construct<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>>
(dVar3 * local_1b0,this + 0x40);
LAB_0019794d:
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((bool)((char)this + '@'));
return this;
}
| |
39,396 | skip_trailing_space | eloqsql/strings/strings_def.h | static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
{
const uchar *end= ptr + len;
if (len > 20)
{
const uchar *end_words= (const uchar *)(intptr)
(((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT);
const uchar *start_words= (const uchar *)(intptr)
((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT);
DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT);
if (end_words > ptr)
{
while (end > end_words && end[-1] == 0x20)
end--;
if (end[-1] == 0x20 && start_words < end_words)
while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT)
end -= SIZEOF_INT;
}
}
while (end > ptr && end[-1] == 0x20)
end--;
return (end);
} | O0 | c | skip_trailing_space:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x14, -0x10(%rbp)
jbe 0x7416a
movq -0x18(%rbp), %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x4, %rax
subq $0x1, %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x740cd
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jbe 0x74168
jmp 0x740dd
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x29(%rbp)
jbe 0x740fd
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x74106
jmp 0x74114
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x740dd
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
jne 0x74166
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x74166
jmp 0x7412d
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x2a(%rbp)
jbe 0x7414d
movq -0x18(%rbp), %rax
cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020
sete %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x74156
jmp 0x74164
movq -0x18(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0x7412d
jmp 0x74166
jmp 0x74168
jmp 0x7416a
jmp 0x7416c
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x2b(%rbp)
jbe 0x7418c
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
testb $0x1, %al
jne 0x74195
jmp 0x741a3
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x7416c
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| skip_trailing_space_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
add rax, [rbp+var_10]
mov [rbp+var_18], rax
cmp [rbp+var_10], 14h
jbe loc_7416A
mov rax, [rbp+var_18]
shr rax, 2
shl rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
add rax, 4
sub rax, 1
shr rax, 2
shl rax, 2
mov [rbp+var_28], rax
jmp short $+2
loc_740CD:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_8]
jbe loc_74168
jmp short $+2
loc_740DD:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_20]
mov [rbp+var_29], al
jbe short loc_740FD
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_29], al
loc_740FD:
mov al, [rbp+var_29]
test al, 1
jnz short loc_74106
jmp short loc_74114
loc_74106:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_740DD
loc_74114:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
jnz short loc_74166
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jnb short loc_74166
jmp short $+2
loc_7412D:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_2A], al
jbe short loc_7414D
mov rax, [rbp+var_18]
cmp dword ptr [rax-4], 20202020h
setz al
mov [rbp+var_2A], al
loc_7414D:
mov al, [rbp+var_2A]
test al, 1
jnz short loc_74156
jmp short loc_74164
loc_74156:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_18], rax
jmp short loc_7412D
loc_74164:
jmp short $+2
loc_74166:
jmp short $+2
loc_74168:
jmp short $+2
loc_7416A:
jmp short $+2
loc_7416C:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_8]
mov [rbp+var_2B], al
jbe short loc_7418C
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_2B], al
loc_7418C:
mov al, [rbp+var_2B]
test al, 1
jnz short loc_74195
jmp short loc_741A3
loc_74195:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_7416C
loc_741A3:
mov rax, [rbp+var_18]
pop rbp
retn
| unsigned long long skip_trailing_space_0(unsigned long long a1, unsigned long long a2)
{
bool v3; // [rsp+1h] [rbp-2Bh]
bool v4; // [rsp+2h] [rbp-2Ah]
bool v5; // [rsp+3h] [rbp-29h]
unsigned long long v6; // [rsp+4h] [rbp-28h]
unsigned long long v7; // [rsp+Ch] [rbp-20h]
unsigned long long v8; // [rsp+14h] [rbp-18h]
v8 = a2 + a1;
if ( a2 > 0x14 )
{
v7 = 4 * (v8 >> 2);
v6 = 4 * ((a1 + 3) >> 2);
if ( v7 > a1 )
{
while ( 1 )
{
v5 = 0;
if ( v8 > v7 )
v5 = *(_BYTE *)(v8 - 1) == 32;
if ( !v5 )
break;
--v8;
}
if ( *(_BYTE *)(v8 - 1) == 32 && v6 < v7 )
{
while ( 1 )
{
v4 = 0;
if ( v8 > v6 )
v4 = *(_DWORD *)(v8 - 4) == 538976288;
if ( !v4 )
break;
v8 -= 4LL;
}
}
}
}
while ( 1 )
{
v3 = 0;
if ( v8 > a1 )
v3 = *(_BYTE *)(v8 - 1) == 32;
if ( !v3 )
break;
--v8;
}
return v8;
}
| skip_trailing_space:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x10],0x14
JBE 0x0017416a
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x2
SHL RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x4
SUB RAX,0x1
SHR RAX,0x2
SHL RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001740cd
LAB_001740cd:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x8]
JBE 0x00174168
JMP 0x001740dd
LAB_001740dd:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + -0x29],AL
JBE 0x001740fd
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_001740fd:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x00174106
JMP 0x00174114
LAB_00174106:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001740dd
LAB_00174114:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
JNZ 0x00174166
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00174166
JMP 0x0017412d
LAB_0017412d:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x2a],AL
JBE 0x0017414d
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + -0x4],0x20202020
SETZ AL
MOV byte ptr [RBP + -0x2a],AL
LAB_0017414d:
MOV AL,byte ptr [RBP + -0x2a]
TEST AL,0x1
JNZ 0x00174156
JMP 0x00174164
LAB_00174156:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0017412d
LAB_00174164:
JMP 0x00174166
LAB_00174166:
JMP 0x00174168
LAB_00174168:
JMP 0x0017416a
LAB_0017416a:
JMP 0x0017416c
LAB_0017416c:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RBP + -0x2b],AL
JBE 0x0017418c
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x2b],AL
LAB_0017418c:
MOV AL,byte ptr [RBP + -0x2b]
TEST AL,0x1
JNZ 0x00174195
JMP 0x001741a3
LAB_00174195:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0017416c
LAB_001741a3:
MOV RAX,qword ptr [RBP + -0x18]
POP RBP
RET
|
ulong skip_trailing_space(ulong param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
bool bVar3;
ulong local_20;
local_20 = param_1 + param_2;
if (0x14 < param_2) {
uVar1 = local_20 & 0xfffffffffffffffc;
uVar2 = param_1 + 3 & 0xfffffffffffffffc;
if (param_1 < uVar1) {
while( true ) {
bVar3 = false;
if (uVar1 < local_20) {
bVar3 = *(char *)(local_20 - 1) == ' ';
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
if ((*(char *)(local_20 - 1) == ' ') && (uVar2 < uVar1)) {
while( true ) {
bVar3 = false;
if (uVar2 < local_20) {
bVar3 = *(int *)(local_20 - 4) == 0x20202020;
}
if (!bVar3) break;
local_20 = local_20 - 4;
}
}
}
}
while( true ) {
bVar3 = false;
if (param_1 < local_20) {
bVar3 = *(char *)(local_20 - 1) == ' ';
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
return local_20;
}
| |
39,397 | mj_jacDifPairCount | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_core_constraint.c | static int mj_jacDifPairCount(const mjModel* m, int* chain,
int b1, int b2, int issparse) {
if (!m->nv) {
return 0;
}
if (issparse) {
if (m->body_simple[b1] && m->body_simple[b2]) {
return mj_mergeChainSimple(m, chain, b1, b2);
}
return mj_mergeChain(m, chain, b1, b2);
}
return m->nv;
} | O0 | c | mj_jacDifPairCount:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl %ecx, 0x8(%rsp)
movl %r8d, 0x4(%rsp)
movq 0x18(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x7a073
movl $0x0, 0x24(%rsp)
jmp 0x7a0f4
cmpl $0x0, 0x4(%rsp)
je 0x7a0e8
movq 0x18(%rsp), %rax
movq 0x588(%rax), %rax
movslq 0xc(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x7a0cb
movq 0x18(%rsp), %rax
movq 0x588(%rax), %rax
movslq 0x8(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x7a0cb
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %ecx
callq 0x2cd9c0
movl %eax, 0x24(%rsp)
jmp 0x7a0f4
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %ecx
callq 0x2cd740
movl %eax, 0x24(%rsp)
jmp 0x7a0f4
movq 0x18(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
| mj_jacDifPairCount:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov [rsp+28h+var_1C], edx
mov [rsp+28h+var_20], ecx
mov [rsp+28h+var_24], r8d
mov rax, [rsp+28h+var_10]
cmp dword ptr [rax+4], 0
jnz short loc_7A073
mov [rsp+28h+var_4], 0
jmp loc_7A0F4
loc_7A073:
cmp [rsp+28h+var_24], 0
jz short loc_7A0E8
mov rax, [rsp+28h+var_10]
mov rax, [rax+588h]
movsxd rcx, [rsp+28h+var_1C]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0
jz short loc_7A0CB
mov rax, [rsp+28h+var_10]
mov rax, [rax+588h]
movsxd rcx, [rsp+28h+var_20]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0
jz short loc_7A0CB
mov rdi, [rsp+28h+var_10]
mov rsi, [rsp+28h+var_18]
mov edx, [rsp+28h+var_1C]
mov ecx, [rsp+28h+var_20]
call mj_mergeChainSimple
mov [rsp+28h+var_4], eax
jmp short loc_7A0F4
loc_7A0CB:
mov rdi, [rsp+28h+var_10]
mov rsi, [rsp+28h+var_18]
mov edx, [rsp+28h+var_1C]
mov ecx, [rsp+28h+var_20]
call mj_mergeChain
mov [rsp+28h+var_4], eax
jmp short loc_7A0F4
loc_7A0E8:
mov rax, [rsp+28h+var_10]
mov eax, [rax+4]
mov [rsp+28h+var_4], eax
loc_7A0F4:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long mj_jacDifPairCount(long long a1, long long a2, unsigned int a3, unsigned int a4, int a5)
{
if ( *(_DWORD *)(a1 + 4) )
{
if ( a5 )
{
if ( *(_BYTE *)(*(_QWORD *)(a1 + 1416) + (int)a3) && *(_BYTE *)(*(_QWORD *)(a1 + 1416) + (int)a4) )
return (unsigned int)mj_mergeChainSimple(a1, a2, a3, a4);
else
return (unsigned int)mj_mergeChain(a1, a2, a3, a4);
}
else
{
return *(unsigned int *)(a1 + 4);
}
}
else
{
return 0;
}
}
| mj_jacDifPairCount:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV dword ptr [RSP + 0xc],EDX
MOV dword ptr [RSP + 0x8],ECX
MOV dword ptr [RSP + 0x4],R8D
MOV RAX,qword ptr [RSP + 0x18]
CMP dword ptr [RAX + 0x4],0x0
JNZ 0x0017a073
MOV dword ptr [RSP + 0x24],0x0
JMP 0x0017a0f4
LAB_0017a073:
CMP dword ptr [RSP + 0x4],0x0
JZ 0x0017a0e8
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x588]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x0
JZ 0x0017a0cb
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x588]
MOVSXD RCX,dword ptr [RSP + 0x8]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x0
JZ 0x0017a0cb
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xc]
MOV ECX,dword ptr [RSP + 0x8]
CALL 0x003cd9c0
MOV dword ptr [RSP + 0x24],EAX
JMP 0x0017a0f4
LAB_0017a0cb:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xc]
MOV ECX,dword ptr [RSP + 0x8]
CALL 0x003cd740
MOV dword ptr [RSP + 0x24],EAX
JMP 0x0017a0f4
LAB_0017a0e8:
MOV RAX,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0x24],EAX
LAB_0017a0f4:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 mj_jacDifPairCount(long param_1,int8 param_2,int param_3,int param_4,int param_5)
{
int4 local_4;
if (*(int *)(param_1 + 4) == 0) {
local_4 = 0;
}
else if (param_5 == 0) {
local_4 = *(int4 *)(param_1 + 4);
}
else if ((*(char *)(*(long *)(param_1 + 0x588) + (long)param_3) == '\0') ||
(*(char *)(*(long *)(param_1 + 0x588) + (long)param_4) == '\0')) {
local_4 = mj_mergeChain(param_1,param_2,param_3,param_4);
}
else {
local_4 = mj_mergeChainSimple(param_1,param_2,param_3,param_4);
}
return local_4;
}
| |
39,398 | 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>::boolean_t&) | monkey531[P]llama/common/json.hpp | inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
{
JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j));
}
b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();
} | O2 | 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>::boolean_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x4, (%rdi)
jne 0x638a4
movb 0x8(%r14), %al
movb %al, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23450
movq %rax, %rbx
movq %r14, %rdi
callq 0x42dc8
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4f4f9(%rip), %rsi # 0xb2dbf
leaq 0x10(%rsp), %rdi
callq 0x63927
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x62e2e
xorl %ebp, %ebp
leaq 0x97657(%rip), %rsi # 0xfaf48
leaq -0x23fa0(%rip), %rdx # 0x3f958
movq %rbx, %rdi
callq 0x23ee0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241a8
testb %bpl, %bpl
jne 0x63917
jmp 0x6391f
movq %rax, %r14
movq %rbx, %rdi
callq 0x23680
movq %r14, %rdi
callq 0x23f70
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 4
jnz short loc_638A4
mov al, [r14+8]
mov [rsi], al
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_638A4:
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, aTypeMustBeBool; "type must be boolean, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],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 rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_63917
jmp short loc_6391F
mov r14, rax
loc_63917:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6391F:
mov rdi, r14
call __Unwind_Resume
| unsigned __int8 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>>(
unsigned __int8 *a1,
unsigned __int8 *a2)
{
unsigned __int8 result; // al
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
_BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *a1 != 4 )
{
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(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(
v4,
"type must be boolean, but is ");
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,
(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);
}
result = a1[8];
*a2 = result;
return result;
}
| 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],0x4
JNZ 0x001638a4
MOV AL,byte ptr [R14 + 0x8]
MOV byte ptr [RSI],AL
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001638a4:
PUSH 0x20
POP RDI
CALL 0x00123450
MOV RBX,RAX
MOV RDI,R14
CALL 0x00142dc8
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001638bf:
LEA RSI,[0x1b2dbf]
LEA RDI,[RSP + 0x10]
CALL 0x00163927
MOV BPL,0x1
LAB_001638d3:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00162e2e
XOR EBP,EBP
LEA RSI,[0x1faf48]
LEA RDX,[0x13f958]
MOV RDI,RBX
CALL 0x00123ee0
|
/* 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>::boolean_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,boolean_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == '\x04') {
*param_2 = param_1[8];
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 001638bf to 001638cf has its CatchHandler @ 00163914 */
concat<std::__cxx11::string,char_const(&)[30],char_const*>
(local_38,"type must be boolean, but is ",&local_40);
/* try { // try from 001638d3 to 001638ff has its CatchHandler @ 00163900 */
_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);
}
| |
39,399 | strxmov | eloqsql/strings/strxmov.c | char *strxmov(char *dst,const char *src, ...)
{
va_list pvar;
va_start(pvar,src);
while (src != NullS) {
while ((*dst++ = *src++)) ;
dst--;
src = va_arg(pvar, char *);
}
va_end(pvar);
*dst = 0; /* there might have been no sources! */
return dst;
} | O0 | c | strxmov:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
testb %al, %al
je 0x79dd8
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
cmpq $0x0, -0x10(%rbp)
je 0x79ecc
jmp 0x79e2d
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %al
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %al, (%rcx)
cmpb $0x0, %al
je 0x79e55
jmp 0x79e2d
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xe4(%rbp)
cmpl $0x28, %eax
ja 0x79e9c
movq -0xf0(%rbp), %rcx
movl -0xe4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xf8(%rbp)
jmp 0x79eb9
movq -0xf0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x79e20
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
| strxmov:
push rbp
mov rbp, rsp
sub rsp, 80h
test al, al
jz short loc_79DD8
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_79DD8:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_E0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
loc_79E20:
cmp [rbp+var_10], 0
jz loc_79ECC
jmp short $+2
loc_79E2D:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov al, [rax]
mov rcx, [rbp+var_8]
mov rdx, rcx
add rdx, 1
mov [rbp+var_8], rdx
mov [rcx], al
cmp al, 0
jz short loc_79E55
jmp short loc_79E2D
loc_79E55:
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_8], rax
lea rax, [rbp+var_30]
mov [rbp+var_F0], rax
mov eax, [rbp+var_30]
mov [rbp+var_E4], eax
cmp eax, 28h ; '('
ja short loc_79E9C
mov rcx, [rbp+var_F0]
mov edx, [rbp+var_E4]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_F8], rax
jmp short loc_79EB9
loc_79E9C:
mov rcx, [rbp+var_F0]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_F8], rax
loc_79EB9:
mov rax, [rbp+var_F8]
mov rax, [rax]
mov [rbp+var_10], rax
jmp loc_79E20
loc_79ECC:
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
add rsp, 80h
pop rbp
retn
| _BYTE * strxmov(
_BYTE *a1,
_BYTE *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_BYTE *v15; // rax
_BYTE *v16; // rcx
char *v17; // rax
char v19; // [rsp+18h] [rbp-E0h] BYREF
long long v20; // [rsp+28h] [rbp-D0h]
long long v21; // [rsp+30h] [rbp-C8h]
long long v22; // [rsp+38h] [rbp-C0h]
long long v23; // [rsp+40h] [rbp-B8h]
__m128 v24; // [rsp+48h] [rbp-B0h]
__m128 v25; // [rsp+58h] [rbp-A0h]
__m128 v26; // [rsp+68h] [rbp-90h]
__m128 v27; // [rsp+78h] [rbp-80h]
__m128 v28; // [rsp+88h] [rbp-70h]
__m128 v29; // [rsp+98h] [rbp-60h]
__m128 v30; // [rsp+A8h] [rbp-50h]
__m128 v31; // [rsp+B8h] [rbp-40h]
int v32; // [rsp+C8h] [rbp-30h]
int v33; // [rsp+CCh] [rbp-2Ch]
char *v34; // [rsp+D0h] [rbp-28h]
char *v35; // [rsp+D8h] [rbp-20h]
_BYTE *v36; // [rsp+E8h] [rbp-10h]
_BYTE *v37; // [rsp+F0h] [rbp-8h]
v24 = a7;
v25 = a8;
v26 = a9;
v27 = a10;
v28 = a11;
v29 = a12;
v30 = a13;
v31 = a14;
v23 = a6;
v22 = a5;
v21 = a4;
v20 = a3;
v37 = a1;
v36 = a2;
v35 = &v19;
v34 = &a15;
v33 = 48;
v32 = 16;
while ( v36 )
{
do
{
v15 = v36++;
LOBYTE(v15) = *v15;
v16 = v37++;
*v16 = (_BYTE)v15;
}
while ( (_BYTE)v15 );
--v37;
if ( (unsigned int)v32 > 0x28 )
{
v17 = v34;
v34 += 8;
}
else
{
v17 = &v35[v32];
v32 += 8;
}
v36 = *(_BYTE **)v17;
}
*v37 = 0;
return v37;
}
| strxmov:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
TEST AL,AL
JZ 0x00179dd8
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_00179dd8:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xe0]
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],0x10
LAB_00179e20:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00179ecc
JMP 0x00179e2d
LAB_00179e2d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RCX],AL
CMP AL,0x0
JZ 0x00179e55
JMP 0x00179e2d
LAB_00179e55:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0xf0],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0xe4],EAX
CMP EAX,0x28
JA 0x00179e9c
MOV RCX,qword ptr [RBP + -0xf0]
MOV EDX,dword ptr [RBP + -0xe4]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0xf8],RAX
JMP 0x00179eb9
LAB_00179e9c:
MOV RCX,qword ptr [RBP + -0xf0]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0xf8],RAX
LAB_00179eb9:
MOV RAX,qword ptr [RBP + -0xf8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00179e20
LAB_00179ecc:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x80
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
char * strxmov(char *param_1,char *param_2)
{
char cVar1;
char *pcVar2;
int8 *local_100;
int8 local_e8 [22];
uint local_38;
int8 *local_30;
char *local_18;
char *local_10;
local_30 = (int8 *)&stack0x00000008;
local_38 = 0x10;
local_18 = param_2;
local_10 = param_1;
while (pcVar2 = local_10, local_18 != (char *)0x0) {
do {
local_10 = pcVar2;
cVar1 = *local_18;
*local_10 = cVar1;
local_18 = local_18 + 1;
pcVar2 = local_10 + 1;
} while (cVar1 != '\0');
if (local_38 < 0x29) {
local_100 = (int8 *)((long)local_e8 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_100 = local_30;
local_30 = local_30 + 1;
}
local_18 = (char *)*local_100;
}
*local_10 = '\0';
return local_10;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
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++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
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.