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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
30,500 | ma_get_status | eloqsql/storage/maria/ma_state.c | my_bool _ma_get_status(void* param, my_bool concurrent_insert)
{
MARIA_HA *info=(MARIA_HA*) param;
DBUG_ENTER("_ma_get_status");
DBUG_PRINT("info",("key_file: %ld data_file: %ld concurrent_insert: %d",
(long) info->s->state.state.key_file_length,
(long) info->s->state.state.data_file_length,
concurrent_insert));
#ifndef DBUG_OFF
if (info->state->key_file_length > info->s->state.state.key_file_length ||
info->state->data_file_length > info->s->state.state.data_file_length)
DBUG_PRINT("warning",("old info: key_file: %ld data_file: %ld",
(long) info->state->key_file_length,
(long) info->state->data_file_length));
#endif
info->state_save= info->s->state.state;
info->state= &info->state_save;
info->state->changed= 0;
info->append_insert_at_end= concurrent_insert;
DBUG_RETURN(0);
} | O0 | c | ma_get_status:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x47d2c
movq -0x18(%rbp), %rdi
addq $0x28, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x18, %rsi
movl $0x38, %edx
callq 0x2a0b0
movq -0x18(%rbp), %rcx
addq $0x28, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movb 0x34(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x34(%rax)
movb -0x9(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x681(%rax)
jmp 0x47d7c
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_get_status:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
jmp short $+2
loc_47D2C:
mov rdi, [rbp+var_18]
add rdi, 28h ; '('
mov rax, [rbp+var_18]
mov rsi, [rax]
add rsi, 18h
mov edx, 38h ; '8'
call _memcpy
mov rcx, [rbp+var_18]
add rcx, 28h ; '('
mov rax, [rbp+var_18]
mov [rax+20h], rcx
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov cl, [rax+34h]
and cl, 0FEh
or cl, 0
mov [rax+34h], cl
mov cl, [rbp+var_9]
mov rax, [rbp+var_18]
mov [rax+681h], cl
jmp short $+2
loc_47D7C:
xor eax, eax
add rsp, 20h
pop rbp
retn
| long long ma_get_status(long long a1, char a2)
{
memcpy(a1 + 40, *(_QWORD *)a1 + 24LL, 56LL);
*(_QWORD *)(a1 + 32) = a1 + 40;
*(_BYTE *)(*(_QWORD *)(a1 + 32) + 52LL) &= ~1u;
*(_BYTE *)(a1 + 1665) = a2;
return 0LL;
}
| _ma_get_status:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00147d2c
LAB_00147d2c:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x28
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
ADD RSI,0x18
MOV EDX,0x38
CALL 0x0012a0b0
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x28
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV CL,byte ptr [RAX + 0x34]
AND CL,0xfe
OR CL,0x0
MOV byte ptr [RAX + 0x34],CL
MOV CL,byte ptr [RBP + -0x9]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x681],CL
JMP 0x00147d7c
LAB_00147d7c:
XOR EAX,EAX
ADD RSP,0x20
POP RBP
RET
|
int8 _ma_get_status(long *param_1,int1 param_2)
{
memcpy(param_1 + 5,(void *)(*param_1 + 0x18),0x38);
param_1[4] = (long)(param_1 + 5);
*(byte *)(param_1[4] + 0x34) = *(byte *)(param_1[4] + 0x34) & 0xfe;
*(int1 *)((long)param_1 + 0x681) = param_2;
return 0;
}
| |
30,501 | ma_get_status | eloqsql/storage/maria/ma_state.c | my_bool _ma_get_status(void* param, my_bool concurrent_insert)
{
MARIA_HA *info=(MARIA_HA*) param;
DBUG_ENTER("_ma_get_status");
DBUG_PRINT("info",("key_file: %ld data_file: %ld concurrent_insert: %d",
(long) info->s->state.state.key_file_length,
(long) info->s->state.state.data_file_length,
concurrent_insert));
#ifndef DBUG_OFF
if (info->state->key_file_length > info->s->state.state.key_file_length ||
info->state->data_file_length > info->s->state.state.data_file_length)
DBUG_PRINT("warning",("old info: key_file: %ld data_file: %ld",
(long) info->state->key_file_length,
(long) info->state->data_file_length));
#endif
info->state_save= info->s->state.state;
info->state= &info->state_save;
info->state->changed= 0;
info->append_insert_at_end= concurrent_insert;
DBUG_RETURN(0);
} | O3 | c | ma_get_status:
pushq %rbp
movq %rsp, %rbp
leaq 0x28(%rdi), %rax
movq (%rdi), %rcx
movq 0x48(%rcx), %rdx
movq %rdx, 0x58(%rdi)
movups 0x18(%rcx), %xmm0
movups 0x28(%rcx), %xmm1
movups 0x38(%rcx), %xmm2
movups %xmm0, 0x28(%rdi)
movups %xmm1, 0x38(%rdi)
movups %xmm2, 0x48(%rdi)
movq %rax, 0x20(%rdi)
andb $-0x2, 0x5c(%rdi)
movb %sil, 0x681(%rdi)
xorl %eax, %eax
popq %rbp
retq
| _ma_get_status:
push rbp
mov rbp, rsp
lea rax, [rdi+28h]
mov rcx, [rdi]
mov rdx, [rcx+48h]
mov [rdi+58h], rdx
movups xmm0, xmmword ptr [rcx+18h]
movups xmm1, xmmword ptr [rcx+28h]
movups xmm2, xmmword ptr [rcx+38h]
movups xmmword ptr [rdi+28h], xmm0
movups xmmword ptr [rdi+38h], xmm1
movups xmmword ptr [rdi+48h], xmm2
mov [rdi+20h], rax
and byte ptr [rdi+5Ch], 0FEh
mov [rdi+681h], sil
xor eax, eax
pop rbp
retn
| long long ma_get_status(long long *a1, char a2)
{
long long v2; // rcx
__int128 v3; // xmm1
__int128 v4; // xmm2
v2 = *a1;
a1[11] = *(_QWORD *)(*a1 + 72);
v3 = *(_OWORD *)(v2 + 40);
v4 = *(_OWORD *)(v2 + 56);
*(_OWORD *)(a1 + 5) = *(_OWORD *)(v2 + 24);
*(_OWORD *)(a1 + 7) = v3;
*(_OWORD *)(a1 + 9) = v4;
a1[4] = (long long)(a1 + 5);
*((_BYTE *)a1 + 92) &= ~1u;
*((_BYTE *)a1 + 1665) = a2;
return 0LL;
}
| _ma_get_status:
PUSH RBP
MOV RBP,RSP
LEA RAX,[RDI + 0x28]
MOV RCX,qword ptr [RDI]
MOV RDX,qword ptr [RCX + 0x48]
MOV qword ptr [RDI + 0x58],RDX
MOVUPS XMM0,xmmword ptr [RCX + 0x18]
MOVUPS XMM1,xmmword ptr [RCX + 0x28]
MOVUPS XMM2,xmmword ptr [RCX + 0x38]
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOVUPS xmmword ptr [RDI + 0x38],XMM1
MOVUPS xmmword ptr [RDI + 0x48],XMM2
MOV qword ptr [RDI + 0x20],RAX
AND byte ptr [RDI + 0x5c],0xfe
MOV byte ptr [RDI + 0x681],SIL
XOR EAX,EAX
POP RBP
RET
|
int8 _ma_get_status(long *param_1,int1 param_2)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
lVar1 = *param_1;
param_1[0xb] = *(long *)(lVar1 + 0x48);
lVar2 = *(long *)(lVar1 + 0x20);
lVar3 = *(long *)(lVar1 + 0x28);
lVar4 = *(long *)(lVar1 + 0x30);
lVar5 = *(long *)(lVar1 + 0x38);
lVar6 = *(long *)(lVar1 + 0x40);
param_1[5] = *(long *)(lVar1 + 0x18);
param_1[6] = lVar2;
param_1[7] = lVar3;
param_1[8] = lVar4;
param_1[9] = lVar5;
param_1[10] = lVar6;
param_1[4] = (long)(param_1 + 5);
*(byte *)((long)param_1 + 0x5c) = *(byte *)((long)param_1 + 0x5c) & 0xfe;
*(int1 *)((long)param_1 + 0x681) = param_2;
return 0;
}
| |
30,502 | my_scan_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_scan_mb2(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *end, int sequence_type)
{
const char *str0= str;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int res;
switch (sequence_type)
{
case MY_SEQ_SPACES:
for (res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end);
res > 0 && wc == ' ';
str+= res,
res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end))
{
}
return (size_t) (str - str0);
case MY_SEQ_NONSPACES:
DBUG_ASSERT(0); /* Not implemented */
/* pass through */
default:
return 0;
}
} | O0 | c | my_scan_mb2:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x48(%rbp)
subl $0x2, %eax
je 0x616a9
jmp 0x6169f
movl -0x48(%rbp), %eax
subl $0x3, %eax
je 0x61720
jmp 0x61726
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x38(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x44(%rbp)
movb %al, -0x49(%rbp)
jle 0x616d8
cmpq $0x20, -0x38(%rbp)
sete %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x616e1
jmp 0x6170f
jmp 0x616e3
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x38(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
jmp 0x616c2
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x6172e
jmp 0x61722
jmp 0x61724
jmp 0x61726
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_scan_mb2:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov eax, [rbp+var_24]
mov [rbp+var_48], eax
sub eax, 2
jz short loc_616A9
jmp short $+2
loc_6169F:
mov eax, [rbp+var_48]
sub eax, 3
jz short loc_61720
jmp short loc_61726
loc_616A9:
mov rax, [rbp+var_40]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_38]
call rax
mov [rbp+var_44], eax
loc_616C2:
xor eax, eax
cmp [rbp+var_44], 0
mov [rbp+var_49], al
jle short loc_616D8
cmp [rbp+var_38], 20h ; ' '
setz al
mov [rbp+var_49], al
loc_616D8:
mov al, [rbp+var_49]
test al, 1
jnz short loc_616E1
jmp short loc_6170F
loc_616E1:
jmp short $+2
loc_616E3:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rax, [rbp+var_40]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_38]
call rax
mov [rbp+var_44], eax
jmp short loc_616C2
loc_6170F:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_8], rax
jmp short loc_6172E
loc_61720:
jmp short $+2
loc_61722:
jmp short $+2
loc_61724:
jmp short $+2
loc_61726:
mov [rbp+var_8], 0
loc_6172E:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long my_scan_mb2(long long a1, long long a2, long long a3, int a4)
{
bool v5; // [rsp+7h] [rbp-49h]
int i; // [rsp+Ch] [rbp-44h]
long long ( *v7)(long long, long long *, long long, long long); // [rsp+10h] [rbp-40h]
long long v8; // [rsp+18h] [rbp-38h] BYREF
long long v9; // [rsp+20h] [rbp-30h]
int v10; // [rsp+2Ch] [rbp-24h]
long long v11; // [rsp+30h] [rbp-20h]
long long v12; // [rsp+38h] [rbp-18h]
long long v13; // [rsp+40h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = a2;
v7 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
if ( a4 != 2 )
return 0LL;
for ( i = v7(v13, &v8, v12, v11); ; i = v7(v13, &v8, v12, v11) )
{
v5 = 0;
if ( i > 0 )
v5 = v8 == 32;
if ( !v5 )
break;
v12 += i;
}
return v12 - v9;
}
| my_scan_mb2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x48],EAX
SUB EAX,0x2
JZ 0x001616a9
JMP 0x0016169f
LAB_0016169f:
MOV EAX,dword ptr [RBP + -0x48]
SUB EAX,0x3
JZ 0x00161720
JMP 0x00161726
LAB_001616a9:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x38]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
LAB_001616c2:
XOR EAX,EAX
CMP dword ptr [RBP + -0x44],0x0
MOV byte ptr [RBP + -0x49],AL
JLE 0x001616d8
CMP qword ptr [RBP + -0x38],0x20
SETZ AL
MOV byte ptr [RBP + -0x49],AL
LAB_001616d8:
MOV AL,byte ptr [RBP + -0x49]
TEST AL,0x1
JNZ 0x001616e1
JMP 0x0016170f
LAB_001616e1:
JMP 0x001616e3
LAB_001616e3:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x38]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
JMP 0x001616c2
LAB_0016170f:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0016172e
LAB_00161720:
JMP 0x00161722
LAB_00161722:
JMP 0x00161724
LAB_00161724:
JMP 0x00161726
LAB_00161726:
MOV qword ptr [RBP + -0x8],0x0
LAB_0016172e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long my_scan_mb2(long param_1,long param_2,int8 param_3,int param_4)
{
code *pcVar1;
int local_4c;
long local_40;
long local_38;
int local_2c;
int8 local_28;
long local_20;
long local_18;
long local_10;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
if (param_4 == 2) {
local_38 = param_2;
local_2c = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_4c = (*pcVar1)(param_1,&local_40,param_2,param_3);
while (0 < local_4c && local_40 == 0x20) {
local_20 = local_20 + local_4c;
local_4c = (*pcVar1)(local_18,&local_40,local_20,local_28);
}
local_10 = local_20 - local_38;
}
else {
local_10 = 0;
}
return local_10;
}
| |
30,503 | mp_mul_basecase | bluesky950520[P]quickjs/libbf.c | static void mp_mul_basecase(limb_t *result,
const limb_t *op1, limb_t op1_size,
const limb_t *op2, limb_t op2_size)
{
limb_t i, r;
result[op1_size] = mp_mul1(result, op1, op1_size, op2[0], 0);
for(i=1;i<op2_size;i++) {
r = mp_add_mul1(result + i, op1, op1_size, op2[i]);
result[i + op1_size] = r;
}
} | O2 | c | mp_mul_basecase:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq (%rcx), %rcx
xorl %esi, %esi
xorl %edi, %edi
cmpq %rsi, %r15
je 0x740e2
movq %rcx, %rax
mulq (%r12,%rsi,8)
addq %rdi, %rax
adcq $0x0, %rdx
movq %rax, (%r13,%rsi,8)
incq %rsi
movq %rdx, %rdi
jmp 0x740c2
movq %rdi, (%r13,%r15,8)
addq $0x8, %r13
pushq $0x1
popq %rbp
cmpq %rbx, %rbp
jae 0x74113
movq (%r14,%rbp,8), %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x7bfed
movq %rax, (%r13,%r15,8)
incq %rbp
addq $0x8, %r13
jmp 0x740ee
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mp_mul_basecase:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov r13, rdi
mov rcx, [rcx]
xor esi, esi
xor edi, edi
loc_740C2:
cmp r15, rsi
jz short loc_740E2
mov rax, rcx
mul qword ptr [r12+rsi*8]
add rax, rdi
adc rdx, 0
mov [r13+rsi*8+0], rax
inc rsi
mov rdi, rdx
jmp short loc_740C2
loc_740E2:
mov [r13+r15*8+0], rdi
add r13, 8
push 1
pop rbp
loc_740EE:
cmp rbp, rbx
jnb short loc_74113
mov rcx, [r14+rbp*8]
mov rdi, r13
mov rsi, r12
mov rdx, r15
call mp_add_mul1
mov [r13+r15*8+0], rax
inc rbp
add r13, 8
jmp short loc_740EE
loc_74113:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mp_mul_basecase(long long a1, long long a2, long long a3, unsigned long long *a4, unsigned long long a5)
{
unsigned long long v10; // rcx
long long v11; // rsi
unsigned long long v12; // rdi
unsigned __int128 v13; // rax
long long v14; // r13
unsigned long long i; // rbp
v10 = *a4;
v11 = 0LL;
v12 = 0LL;
while ( a3 != v11 )
{
v13 = v12 + *(unsigned long long *)(a2 + 8 * v11) * (unsigned __int128)v10;
*(_QWORD *)(a1 + 8 * v11++) = v13;
v12 = *((_QWORD *)&v13 + 1);
}
*(_QWORD *)(a1 + 8 * a3) = v12;
v14 = a1 + 8;
for ( i = 1LL; i < a5; ++i )
{
*(_QWORD *)&v13 = mp_add_mul1(v14, a2, a3, a4[i]);
*(_QWORD *)(v14 + 8 * a3) = v13;
v14 += 8LL;
}
return v13;
}
| mp_mul_basecase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
MOV RCX,qword ptr [RCX]
XOR ESI,ESI
XOR EDI,EDI
LAB_001740c2:
CMP R15,RSI
JZ 0x001740e2
MOV RAX,RCX
MUL qword ptr [R12 + RSI*0x8]
ADD RAX,RDI
ADC RDX,0x0
MOV qword ptr [R13 + RSI*0x8],RAX
INC RSI
MOV RDI,RDX
JMP 0x001740c2
LAB_001740e2:
MOV qword ptr [R13 + R15*0x8],RDI
ADD R13,0x8
PUSH 0x1
POP RBP
LAB_001740ee:
CMP RBP,RBX
JNC 0x00174113
MOV RCX,qword ptr [R14 + RBP*0x8]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL 0x0017bfed
MOV qword ptr [R13 + R15*0x8],RAX
INC RBP
ADD R13,0x8
JMP 0x001740ee
LAB_00174113:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void mp_mul_basecase(long param_1,long param_2,long param_3,ulong *param_4,ulong param_5)
{
int1 auVar1 [16];
int1 auVar2 [16];
int1 auVar3 [16];
int8 uVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
uVar6 = *param_4;
uVar5 = 0;
for (lVar7 = 0; auVar3._8_8_ = 0, auVar3._0_8_ = uVar5, param_3 != lVar7; lVar7 = lVar7 + 1) {
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar6;
auVar2._8_8_ = 0;
auVar2._0_8_ = *(ulong *)(param_2 + lVar7 * 8);
auVar3 = auVar1 * auVar2 + auVar3;
uVar5 = auVar3._8_8_;
*(long *)(param_1 + lVar7 * 8) = auVar3._0_8_;
}
*(ulong *)(param_1 + param_3 * 8) = uVar5;
param_1 = param_1 + 8;
for (uVar6 = 1; uVar6 < param_5; uVar6 = uVar6 + 1) {
uVar4 = mp_add_mul1(param_1,param_2,param_3,param_4[uVar6]);
*(int8 *)(param_1 + param_3 * 8) = uVar4;
param_1 = param_1 + 8;
}
return;
}
| |
30,504 | is_small_allocation | seiftnesse[P]memoryallocator/src/custom_alloc_small.c | int is_small_allocation(void *ptr) {
// Ensure pointer is valid and within small pool bounds
if (!ptr) return 0;
// Calculate pointer addresses for bounds checking
uintptr_t ptr_addr = (uintptr_t) ptr;
uintptr_t pool_start = (uintptr_t) small_pool;
uintptr_t pool_end = pool_start + SMALL_POOL_SIZE;
int result = (ptr_addr >= pool_start && ptr_addr < pool_end);
HEAP_LOG("Checking if %p is small allocation: %s\n", ptr, result ? "yes" : "no");
return result;
} | O1 | c | is_small_allocation:
leaq 0x39ee(%rip), %rax # 0x6100
cmpq %rax, %rdi
setae %cl
addq $0x100000, %rax # imm = 0x100000
cmpq %rax, %rdi
setb %al
andb %cl, %al
movzbl %al, %eax
retq
nop
| is_small_allocation:
lea rax, small_pool
cmp rdi, rax
setnb cl
add rax, 100000h
cmp rdi, rax
setb al
and al, cl
movzx eax, al
retn
| long long is_small_allocation(unsigned long long a1)
{
return (a1 >= (unsigned long long)&small_pool) & (unsigned __int8)(a1 < (unsigned long long)&small_pool + 0x100000);
}
| is_small_allocation:
LEA RAX,[0x106100]
CMP RDI,RAX
SETNC CL
ADD RAX,0x100000
CMP RDI,RAX
SETC AL
AND AL,CL
MOVZX EAX,AL
RET
|
bool is_small_allocation(int1 *param_1)
{
return param_1 < memory && (int1 *)0x1060ff < param_1;
}
| |
30,505 | is_small_allocation | seiftnesse[P]memoryallocator/src/custom_alloc_small.c | int is_small_allocation(void *ptr) {
// Ensure pointer is valid and within small pool bounds
if (!ptr) return 0;
// Calculate pointer addresses for bounds checking
uintptr_t ptr_addr = (uintptr_t) ptr;
uintptr_t pool_start = (uintptr_t) small_pool;
uintptr_t pool_end = pool_start + SMALL_POOL_SIZE;
int result = (ptr_addr >= pool_start && ptr_addr < pool_end);
HEAP_LOG("Checking if %p is small allocation: %s\n", ptr, result ? "yes" : "no");
return result;
} | O3 | c | is_small_allocation:
leaq 0x2a86(%rip), %rax # 0x5100
cmpq %rax, %rdi
setae %cl
addq $0x100000, %rax # imm = 0x100000
cmpq %rax, %rdi
setb %al
andb %cl, %al
movzbl %al, %eax
retq
nop
| is_small_allocation:
lea rax, small_pool
cmp rdi, rax
setnb cl
add rax, 100000h
cmp rdi, rax
setb al
and al, cl
movzx eax, al
retn
| long long is_small_allocation(unsigned long long a1)
{
return (a1 >= (unsigned long long)&small_pool) & (unsigned __int8)(a1 < (unsigned long long)&small_pool + 0x100000);
}
| is_small_allocation:
LEA RAX,[0x105100]
CMP RDI,RAX
SETNC CL
ADD RAX,0x100000
CMP RDI,RAX
SETC AL
AND AL,CL
MOVZX EAX,AL
RET
|
bool is_small_allocation(int1 *param_1)
{
return param_1 < memory && (int1 *)0x1050ff < param_1;
}
| |
30,506 | decimal2bin | eloqsql/strings/decimal.c | int decimal2bin(const decimal_t *from, uchar *to, decimal_digits_t precision,
decimal_digits_t frac)
{
dec1 mask=from->sign ? -1 : 0, *buf1=from->buf, *stop1;
int error=E_DEC_OK, intg=precision-frac,
isize1, intg1, intg1x,
intg0=intg/DIG_PER_DEC1,
frac0=frac/DIG_PER_DEC1,
intg0x=intg-intg0*DIG_PER_DEC1,
frac0x=frac-frac0*DIG_PER_DEC1,
frac1=from->frac/DIG_PER_DEC1,
frac1x=from->frac-frac1*DIG_PER_DEC1,
isize0=intg0*sizeof(dec1)+dig2bytes[intg0x],
fsize0=frac0*sizeof(dec1)+dig2bytes[frac0x],
fsize1=frac1*sizeof(dec1)+dig2bytes[frac1x];
decimal_digits_t from_intg;
const int orig_isize0= isize0;
const int orig_fsize0= fsize0;
uchar *orig_to= to;
buf1= remove_leading_zeroes(from, &from_intg);
if (unlikely(from_intg+fsize1==0))
{
mask=0; /* just in case */
intg=1;
buf1=&mask;
}
intg1=from_intg/DIG_PER_DEC1;
intg1x=from_intg-intg1*DIG_PER_DEC1;
isize1=intg1*sizeof(dec1)+dig2bytes[intg1x];
if (intg < from_intg)
{
buf1+=intg1-intg0+(intg1x>0)-(intg0x>0);
intg1=intg0; intg1x=intg0x;
error=E_DEC_OVERFLOW;
}
else if (isize0 > isize1)
{
while (isize0-- > isize1)
*to++= (char)mask;
}
if (fsize0 < fsize1)
{
frac1=frac0; frac1x=frac0x;
error=E_DEC_TRUNCATED;
}
else if (fsize0 > fsize1 && frac1x)
{
if (frac0 == frac1)
{
frac1x=frac0x;
fsize0= fsize1;
}
else
{
frac1++;
frac1x=0;
}
}
/* intg1x part */
if (intg1x)
{
int i=dig2bytes[intg1x];
dec1 x=(*buf1++ % powers10[intg1x]) ^ mask;
switch (i)
{
case 1: mi_int1store(to, x); break;
case 2: mi_int2store(to, x); break;
case 3: mi_int3store(to, x); break;
case 4: mi_int4store(to, x); break;
default: DBUG_ASSERT(0);
}
to+=i;
}
/* intg1+frac1 part */
for (stop1=buf1+intg1+frac1; buf1 < stop1; to+=sizeof(dec1))
{
dec1 x=*buf1++ ^ mask;
DBUG_ASSERT(sizeof(dec1) == 4);
mi_int4store(to, x);
}
/* frac1x part */
if (frac1x)
{
dec1 x;
int i=dig2bytes[frac1x],
lim=(frac1 < frac0 ? DIG_PER_DEC1 : frac0x);
while (frac1x < lim && dig2bytes[frac1x] == i)
frac1x++;
x=(*buf1 / powers10[DIG_PER_DEC1 - frac1x]) ^ mask;
switch (i)
{
case 1: mi_int1store(to, x); break;
case 2: mi_int2store(to, x); break;
case 3: mi_int3store(to, x); break;
case 4: mi_int4store(to, x); break;
default: DBUG_ASSERT(0);
}
to+=i;
}
if (fsize0 > fsize1)
{
uchar *to_end= orig_to + orig_fsize0 + orig_isize0;
while (fsize0-- > fsize1 && to < to_end)
*to++= (uchar)mask;
}
orig_to[0]^= 0x80;
/* Check that we have written the whole decimal and nothing more */
DBUG_ASSERT(to == orig_to + orig_fsize0 + orig_isize0);
return error;
} | O3 | c | decimal2bin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, -0x48(%rbp)
xorl %eax, %eax
cmpb 0xc(%rdi), %al
movl $0x0, %eax
sbbl %eax, %eax
movl %eax, -0x38(%rbp)
movl %eax, -0x34(%rbp)
subl %ecx, %edx
movl %edx, -0x2c(%rbp)
movslq %edx, %r8
imulq $0x38e38e39, %r8, %rdx # imm = 0x38E38E39
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x21, %rdx
addl %eax, %edx
imull $0xe38f, %ecx, %esi # imm = 0xE38F
shrl $0x13, %esi
leal (%rdx,%rdx,8), %eax
subl %eax, %r8d
leal (%rsi,%rsi,8), %eax
subl %eax, %ecx
movslq 0x4(%rdi), %r9
imulq $0x38e38e39, %r9, %r14 # imm = 0x38E38E39
movq %r14, %rax
shrq $0x3f, %rax
sarq $0x21, %r14
addl %eax, %r14d
leal (%r14,%r14,8), %eax
subl %eax, %r9d
movq %rdx, -0x50(%rbp)
leal (,%rdx,4), %edx
movq %r8, -0x70(%rbp)
movslq %r8d, %rax
leaq 0x74a2d(%rip), %r8 # 0xb86b0
addl (%r8,%rax,4), %edx
movl %edx, -0x3c(%rbp)
movq %rsi, -0x60(%rbp)
leal (,%rsi,4), %edx
movl %ecx, -0x30(%rbp)
movslq %ecx, %rax
addl (%r8,%rax,4), %edx
movl %edx, -0x40(%rbp)
leal (,%r14,4), %r13d
movq %r9, -0x68(%rbp)
movslq %r9d, %rax
addl (%r8,%rax,4), %r13d
movl (%rdi), %eax
movq 0x10(%rdi), %rsi
leaq -0x56(%rbp), %rbx
movl %eax, %edi
movq %rbx, %rdx
callq 0x424fb
movq %rax, %r15
movzwl (%rbx), %eax
movl %eax, %r12d
movl %r13d, -0x54(%rbp)
addl %eax, %r13d
je 0x43f7f
movl -0x2c(%rbp), %edx
imull $0xe38f, %eax, %ebx # imm = 0xE38F
shrl $0x13, %ebx
leaq (%rbx,%rbx,8), %rcx
subq %rcx, %r12
cmpl %eax, %edx
movq -0x70(%rbp), %r11
jge 0x43d21
xorl %eax, %eax
testl %r12d, %r12d
setg %al
xorl %ecx, %ecx
testl %r11d, %r11d
setg %cl
addl -0x50(%rbp), %ecx
subl %ecx, %ebx
addl %eax, %ebx
movslq %ebx, %rax
leaq (%r15,%rax,4), %r15
movl $0x2, -0x2c(%rbp)
jmp 0x43d7c
leal (,%rbx,4), %eax
leaq 0x74981(%rip), %rcx # 0xb86b0
movl (%rcx,%r12,4), %r13d
leal (%rax,%r13), %ecx
movl $0x0, -0x2c(%rbp)
movl -0x3c(%rbp), %edx
cmpl %ecx, %edx
jle 0x43d75
notl %r13d
addl %edx, %r13d
subl %eax, %r13d
leaq 0x1(%r13), %rdx
movq -0x48(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x3a3a0
movq -0x48(%rbp), %rax
leaq (%rax,%r13), %rdi
incq %rdi
movq %rax, %r13
movl %r12d, %r11d
movq %rbx, -0x50(%rbp)
jmp 0x43d83
movl %r12d, %r11d
movq %rbx, -0x50(%rbp)
movq -0x48(%rbp), %r13
movq %r13, %rdi
movl -0x30(%rbp), %edx
movl $0x1, %esi
movl -0x40(%rbp), %ebx
movl %ebx, %r8d
movl %edx, %r9d
movq -0x60(%rbp), %rax
movl %eax, %r10d
movl -0x54(%rbp), %r12d
cmpl %r12d, %ebx
jl 0x43dd8
movq -0x68(%rbp), %rcx
testl %ecx, %ecx
je 0x43dc1
cmpl %r12d, %ebx
jle 0x43dc1
cmpl %eax, %r14d
jne 0x43dc9
movl %r12d, %r8d
movl %edx, %r9d
movl %eax, %r10d
jmp 0x43dd5
movl %ebx, %r8d
movl %ecx, %r9d
jmp 0x43dd2
incl %r14d
xorl %r9d, %r9d
movl %ebx, %r8d
movl %r14d, %r10d
movl -0x2c(%rbp), %esi
testl %r11d, %r11d
je 0x43e20
movslq %r11d, %rcx
leaq 0x748c9(%rip), %r14 # 0xb86b0
movslq (%r14,%rcx,4), %r11
movl (%r15), %eax
leaq 0x7488b(%rip), %rbx # 0xb8680
cltd
idivl (%rbx,%rcx,4)
leal -0x1(%r11), %eax
cmpl $0x3, %eax
ja 0x43e54
movl -0x38(%rbp), %ebx
xorl %edx, %ebx
movl $0x8, %ecx
leaq 0x743cd(%rip), %rdx # 0xb81e0
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movl %ebx, %edx
jmp 0x43e4d
leaq 0x74889(%rip), %r14 # 0xb86b0
jmp 0x43e61
movl $0x10, %eax
movl %ebx, %edx
jmp 0x43e44
movb %bl, 0x3(%rdi)
movl %ebx, %edx
shrl $0x8, %edx
movl $0x18, %eax
movl $0x10, %ecx
movb %dl, 0x2(%rdi)
movl %ebx, %edx
shrl %cl, %edx
movl %eax, %ecx
movb %dl, 0x1(%rdi)
shrl %cl, %ebx
movb %bl, (%rdi)
addq $0x4, %r15
addq %r11, %rdi
movl -0x40(%rbp), %ebx
movl -0x30(%rbp), %edx
movslq -0x50(%rbp), %rax
leaq (%r15,%rax,4), %rax
movslq %r10d, %rcx
leaq (%rax,%rcx,4), %rax
cmpq %rax, %r15
jae 0x43e89
movl -0x34(%rbp), %ecx
xorl (%r15), %ecx
addq $0x4, %r15
bswapl %ecx
movl %ecx, (%rdi)
addq $0x4, %rdi
jmp 0x43e70
testl %r9d, %r9d
je 0x43f32
movslq %r9d, %rax
movslq (%r14,%rax,4), %r11
cmpl -0x60(%rbp), %r10d
movl $0x9, %ecx
cmovll %ecx, %edx
cmpl %edx, %r9d
jge 0x43ec2
leaq (%r14,%rax,4), %rax
cmpl %r11d, (%rax)
jne 0x43ec2
incl %r9d
addq $0x4, %rax
cmpl %r9d, %edx
jne 0x43eae
movl %edx, %r9d
movl (%r15), %eax
subl %r9d, %ecx
movslq %ecx, %rcx
leaq 0x747ae(%rip), %r9 # 0xb8680
cltd
idivl (%r9,%rcx,4)
leal -0x1(%r11), %edx
cmpl $0x3, %edx
ja 0x43f2f
xorl -0x34(%rbp), %eax
movl $0x8, %ecx
leaq 0x74301(%rip), %r9 # 0xb81f0
movslq (%r9,%rdx,4), %rdx
addq %r9, %rdx
jmpq *%rdx
movl %eax, %r9d
jmp 0x43f27
movl $0x10, %edx
movl %eax, %r9d
jmp 0x43f1b
movb %al, 0x3(%rdi)
movl %eax, %r9d
shrl $0x8, %r9d
movl $0x18, %edx
movl $0x10, %ecx
movb %r9b, 0x2(%rdi)
movl %eax, %r9d
shrl %cl, %r9d
movl %edx, %ecx
movb %r9b, 0x1(%rdi)
shrl %cl, %eax
movb %al, (%rdi)
addq %r11, %rdi
cmpl %r12d, %r8d
jle 0x43f69
movslq %ebx, %rcx
addq %r13, %rcx
movslq -0x3c(%rbp), %rax
addq %rcx, %rax
cmpq %rax, %rdi
jae 0x43f69
incq %rdi
decl %r8d
movb -0x34(%rbp), %cl
movb %cl, -0x1(%rdi)
cmpl %r12d, %r8d
jle 0x43f69
leaq 0x1(%rdi), %rcx
decl %r8d
cmpq %rax, %rdi
movq %rcx, %rdi
jb 0x43f4f
xorb $-0x80, (%r13)
movl %esi, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x34(%rbp), %r15
movl $0x0, (%r15)
movl $0x1, %edx
movl $0x0, -0x38(%rbp)
jmp 0x43ce2
| decimal2bin:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_48], rsi
xor eax, eax
cmp al, [rdi+0Ch]
mov eax, 0
sbb eax, eax
mov [rbp+var_38], eax
mov [rbp+var_34], eax
sub edx, ecx
mov [rbp+var_2C], edx
movsxd r8, edx
imul rdx, r8, 38E38E39h
mov rax, rdx
shr rax, 3Fh
sar rdx, 21h
add edx, eax
imul esi, ecx, 0E38Fh
shr esi, 13h
lea eax, [rdx+rdx*8]
sub r8d, eax
lea eax, [rsi+rsi*8]
sub ecx, eax
movsxd r9, dword ptr [rdi+4]
imul r14, r9, 38E38E39h
mov rax, r14
shr rax, 3Fh
sar r14, 21h
add r14d, eax
lea eax, [r14+r14*8]
sub r9d, eax
mov [rbp+var_50], rdx
lea edx, ds:0[rdx*4]
mov [rbp+var_70], r8
movsxd rax, r8d
lea r8, _ZL9dig2bytes; dig2bytes
add edx, [r8+rax*4]
mov [rbp+var_3C], edx
mov [rbp+var_60], rsi
lea edx, ds:0[rsi*4]
mov [rbp+var_30], ecx
movsxd rax, ecx
add edx, [r8+rax*4]
mov [rbp+var_40], edx
lea r13d, ds:0[r14*4]
mov [rbp+var_68], r9
movsxd rax, r9d
add r13d, [r8+rax*4]
mov eax, [rdi]
mov rsi, [rdi+10h]
lea rbx, [rbp+var_56]
mov edi, eax
mov rdx, rbx
call _ZL21remove_leading_zeroesPK12st_decimal_tPt; remove_leading_zeroes(st_decimal_t const*,ushort *)
mov r15, rax
movzx eax, word ptr [rbx]
mov r12d, eax
mov [rbp+var_54], r13d
add r13d, eax
jz loc_43F7F
mov edx, [rbp+var_2C]
loc_43CE2:
imul ebx, eax, 0E38Fh
shr ebx, 13h
lea rcx, [rbx+rbx*8]
sub r12, rcx
cmp edx, eax
mov r11, [rbp+var_70]
jge short loc_43D21
xor eax, eax
test r12d, r12d
setnle al
xor ecx, ecx
test r11d, r11d
setnle cl
add ecx, dword ptr [rbp+var_50]
sub ebx, ecx
add ebx, eax
movsxd rax, ebx
lea r15, [r15+rax*4]
mov [rbp+var_2C], 2
jmp short loc_43D7C
loc_43D21:
lea eax, ds:0[rbx*4]
lea rcx, _ZL9dig2bytes; dig2bytes
mov r13d, [rcx+r12*4]
lea ecx, [rax+r13]
mov [rbp+var_2C], 0
mov edx, [rbp+var_3C]
cmp edx, ecx
jle short loc_43D75
not r13d
add r13d, edx
sub r13d, eax
lea rdx, [r13+1]
mov rdi, [rbp+var_48]
mov esi, [rbp+var_38]
call _memset
mov rax, [rbp+var_48]
lea rdi, [rax+r13]
inc rdi
mov r13, rax
mov r11d, r12d
mov [rbp+var_50], rbx
jmp short loc_43D83
loc_43D75:
mov r11d, r12d
mov [rbp+var_50], rbx
loc_43D7C:
mov r13, [rbp+var_48]
mov rdi, r13
loc_43D83:
mov edx, [rbp+var_30]
mov esi, 1
mov ebx, [rbp+var_40]
mov r8d, ebx
mov r9d, edx
mov rax, [rbp+var_60]
mov r10d, eax
mov r12d, [rbp+var_54]
cmp ebx, r12d
jl short loc_43DD8
mov rcx, [rbp+var_68]
test ecx, ecx
jz short loc_43DC1
cmp ebx, r12d
jle short loc_43DC1
cmp r14d, eax
jnz short loc_43DC9
mov r8d, r12d
mov r9d, edx
mov r10d, eax
jmp short loc_43DD5
loc_43DC1:
mov r8d, ebx
mov r9d, ecx
jmp short loc_43DD2
loc_43DC9:
inc r14d
xor r9d, r9d
mov r8d, ebx
loc_43DD2:
mov r10d, r14d
loc_43DD5:
mov esi, [rbp+var_2C]
loc_43DD8:
test r11d, r11d
jz short loc_43E20
movsxd rcx, r11d
lea r14, _ZL9dig2bytes; dig2bytes
movsxd r11, dword ptr [r14+rcx*4]
mov eax, [r15]
lea rbx, _ZL8powers10; powers10
cdq
idiv dword ptr [rbx+rcx*4]
lea eax, [r11-1]; switch 4 cases
cmp eax, 3
ja short def_43E1A; jumptable 0000000000043E1A default case
mov ebx, [rbp+var_38]
xor ebx, edx
mov ecx, 8
lea rdx, jpt_43E1A
movsxd rax, ds:(jpt_43E1A - 0B81E0h)[rdx+rax*4]
add rax, rdx
jmp rax; switch jump
loc_43E1C:
mov edx, ebx; jumptable 0000000000043E1A case 2
jmp short loc_43E4D
loc_43E20:
lea r14, _ZL9dig2bytes; dig2bytes
jmp short loc_43E61
loc_43E29:
mov eax, 10h; jumptable 0000000000043E1A case 3
mov edx, ebx
jmp short loc_43E44
loc_43E32:
mov [rdi+3], bl; jumptable 0000000000043E1A case 4
mov edx, ebx
shr edx, 8
mov eax, 18h
mov ecx, 10h
loc_43E44:
mov [rdi+2], dl
mov edx, ebx
shr edx, cl
mov ecx, eax
loc_43E4D:
mov [rdi+1], dl
shr ebx, cl
loc_43E52:
mov [rdi], bl; jumptable 0000000000043E1A case 1
def_43E1A:
add r15, 4; jumptable 0000000000043E1A default case
add rdi, r11
mov ebx, [rbp+var_40]
mov edx, [rbp+var_30]
loc_43E61:
movsxd rax, dword ptr [rbp+var_50]
lea rax, [r15+rax*4]
movsxd rcx, r10d
lea rax, [rax+rcx*4]
loc_43E70:
cmp r15, rax
jnb short loc_43E89
mov ecx, [rbp+var_34]
xor ecx, [r15]
add r15, 4
bswap ecx
mov [rdi], ecx
add rdi, 4
jmp short loc_43E70
loc_43E89:
test r9d, r9d
jz loc_43F32
movsxd rax, r9d
movsxd r11, dword ptr [r14+rax*4]
cmp r10d, dword ptr [rbp+var_60]
mov ecx, 9
cmovl edx, ecx
cmp r9d, edx
jge short loc_43EC2
lea rax, [r14+rax*4]
loc_43EAE:
cmp [rax], r11d
jnz short loc_43EC2
inc r9d
add rax, 4
cmp edx, r9d
jnz short loc_43EAE
mov r9d, edx
loc_43EC2:
mov eax, [r15]
sub ecx, r9d
movsxd rcx, ecx
lea r9, _ZL8powers10; powers10
cdq
idiv dword ptr [r9+rcx*4]
lea edx, [r11-1]; switch 4 cases
cmp edx, 3
ja short def_43EF6; jumptable 0000000000043EF6 default case
xor eax, [rbp+var_34]
mov ecx, 8
lea r9, jpt_43EF6
movsxd rdx, ds:(jpt_43EF6 - 0B81F0h)[r9+rdx*4]
add rdx, r9
jmp rdx; switch jump
loc_43EF8:
mov r9d, eax; jumptable 0000000000043EF6 case 2
jmp short loc_43F27
loc_43EFD:
mov edx, 10h; jumptable 0000000000043EF6 case 3
mov r9d, eax
jmp short loc_43F1B
loc_43F07:
mov [rdi+3], al; jumptable 0000000000043EF6 case 4
mov r9d, eax
shr r9d, 8
mov edx, 18h
mov ecx, 10h
loc_43F1B:
mov [rdi+2], r9b
mov r9d, eax
shr r9d, cl
mov ecx, edx
loc_43F27:
mov [rdi+1], r9b
shr eax, cl
loc_43F2D:
mov [rdi], al; jumptable 0000000000043EF6 case 1
def_43EF6:
add rdi, r11; jumptable 0000000000043EF6 default case
loc_43F32:
cmp r8d, r12d
jle short loc_43F69
movsxd rcx, ebx
add rcx, r13
movsxd rax, [rbp+var_3C]
add rax, rcx
cmp rdi, rax
jnb short loc_43F69
inc rdi
dec r8d
loc_43F4F:
mov cl, byte ptr [rbp+var_34]
mov [rdi-1], cl
cmp r8d, r12d
jle short loc_43F69
lea rcx, [rdi+1]
dec r8d
cmp rdi, rax
mov rdi, rcx
jb short loc_43F4F
loc_43F69:
xor byte ptr [r13+0], 80h
mov eax, esi
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_43F7F:
lea r15, [rbp+var_34]
mov dword ptr [r15], 0
mov edx, 1
mov [rbp+var_38], 0
jmp loc_43CE2
| long long decimal2bin(long long a1, _BYTE *a2, int a3, int a4)
{
int v4; // r9d
int v5; // r14d
int v6; // r13d
int *v7; // r15
int v8; // edx
long long v9; // rbx
long long v10; // r12
signed int v11; // r11d
int v12; // r13d
unsigned int v13; // r13d
_BYTE *v14; // rdi
_BYTE *v15; // r13
int v16; // edx
unsigned int v17; // esi
int v18; // ebx
int v19; // r8d
signed int v20; // r9d
signed int v21; // r10d
int v22; // r12d
long long v23; // rcx
long long v24; // r11
unsigned int v25; // ebx
char v26; // cl
unsigned int v27; // edx
char v28; // al
unsigned int v29; // edx
unsigned long long v30; // rax
unsigned int v31; // ecx
long long v32; // r11
int *v33; // rax
unsigned int v34; // eax
char v35; // cl
char v36; // dl
_BYTE *v37; // rax
_BYTE *v38; // rdi
int v39; // r8d
int v42; // [rsp+0h] [rbp-70h]
int v43; // [rsp+8h] [rbp-68h]
signed int v44; // [rsp+10h] [rbp-60h]
unsigned __int16 v45; // [rsp+1Ah] [rbp-56h] BYREF
int v46; // [rsp+1Ch] [rbp-54h]
long long v47; // [rsp+20h] [rbp-50h]
_BYTE *v48; // [rsp+28h] [rbp-48h]
int v49; // [rsp+30h] [rbp-40h]
int v50; // [rsp+34h] [rbp-3Ch]
unsigned int v51; // [rsp+38h] [rbp-38h]
unsigned int v52; // [rsp+3Ch] [rbp-34h] BYREF
int v53; // [rsp+40h] [rbp-30h]
int v54; // [rsp+44h] [rbp-2Ch]
v48 = a2;
v51 = -(*(_BYTE *)(a1 + 12) != 0);
v52 = v51;
v54 = a3 - a4;
v4 = *(_DWORD *)(a1 + 4);
v5 = v4 / 9;
v47 = (unsigned int)((a3 - a4) / 9);
v42 = (a3 - a4) % 9;
v50 = dig2bytes[v42] + 4 * v47;
v44 = (unsigned int)(58255 * a4) >> 19;
v53 = a4 - 9 * v44;
v49 = dig2bytes[v53] + 4 * v44;
v43 = v4 % 9;
v6 = dig2bytes[v4 % 9] + 4 * (v4 / 9);
v7 = remove_leading_zeroes(*(_DWORD *)a1, *(int **)(a1 + 16), &v45);
v46 = v6;
if ( v45 + v6 )
{
v8 = v54;
}
else
{
v7 = (int *)&v52;
v52 = 0;
v8 = 1;
v51 = 0;
}
v9 = v45 / 9u;
v10 = v45 - 9 * v9;
v11 = v42;
if ( v8 >= v45 )
{
v12 = dig2bytes[v10];
v54 = 0;
if ( v50 > 4 * (int)v9 + v12 )
{
v13 = v50 + ~v12 - 4 * v9;
memset(v48, v51, v13 + 1LL);
v14 = &v48[v13 + 1];
v15 = v48;
v11 = v10;
v47 = v9;
goto LABEL_9;
}
v11 = v45 % 9u;
v47 = v45 / 9u;
}
else
{
v7 += (int)(((int)v10 > 0) + v9 - (v47 + (v42 > 0)));
v54 = 2;
}
v15 = v48;
v14 = v48;
LABEL_9:
v16 = v53;
v17 = 1;
v18 = v49;
v19 = v49;
v20 = v53;
v21 = v44;
v22 = v46;
if ( v49 < v46 )
goto LABEL_18;
if ( !v43 || v49 <= v46 )
{
v19 = v49;
v20 = v43;
LABEL_16:
v21 = v5;
goto LABEL_17;
}
if ( v5 != v44 )
{
++v5;
v20 = 0;
v19 = v49;
goto LABEL_16;
}
v19 = v46;
v20 = v53;
v21 = v44;
LABEL_17:
v17 = v54;
LABEL_18:
if ( v11 )
{
v23 = v11;
v24 = dig2bytes[v11];
v25 = (*v7 % powers10[v23]) ^ v51;
v26 = 8;
switch ( (int)v24 )
{
case 1:
goto LABEL_26;
case 2:
LOBYTE(v27) = v25;
goto LABEL_25;
case 3:
v28 = 16;
LOBYTE(v29) = v25;
goto LABEL_24;
case 4:
v14[3] = v25;
v29 = v25 >> 8;
v28 = 24;
v26 = 16;
LABEL_24:
v14[2] = v29;
v27 = v25 >> v26;
v26 = v28;
LABEL_25:
v14[1] = v27;
v25 >>= v26;
LABEL_26:
*v14 = v25;
break;
default:
break;
}
++v7;
v14 += v24;
v18 = v49;
v16 = v53;
}
v30 = (unsigned long long)&v7[(int)v47 + v21];
while ( (unsigned long long)v7 < v30 )
{
v31 = *v7++ ^ v52;
*(_DWORD *)v14 = _byteswap_ulong(v31);
v14 += 4;
}
if ( v20 )
{
v32 = dig2bytes[v20];
if ( v21 < v44 )
v16 = 9;
if ( v20 < v16 )
{
v33 = &dig2bytes[v20];
while ( *v33 == (_DWORD)v32 )
{
++v20;
++v33;
if ( v16 == v20 )
{
v20 = v16;
break;
}
}
}
v34 = v52 ^ (*v7 / powers10[9 - v20]);
v35 = 8;
switch ( (int)v32 )
{
case 1:
goto LABEL_45;
case 2:
LOBYTE(v20) = v52 ^ (*v7 / powers10[9 - v20]);
goto LABEL_44;
case 3:
v36 = 16;
LOBYTE(v20) = v52 ^ (*v7 / powers10[9 - v20]);
goto LABEL_43;
case 4:
v14[3] = v34;
v20 = v34 >> 8;
v36 = 24;
v35 = 16;
LABEL_43:
v14[2] = v20;
v20 = v34 >> v35;
v35 = v36;
LABEL_44:
v14[1] = v20;
v34 >>= v35;
LABEL_45:
*v14 = v34;
break;
default:
break;
}
v14 += v32;
}
if ( v19 > v22 )
{
v37 = &v15[v18 + v50];
if ( v14 < v37 )
{
v38 = v14 + 1;
v39 = v19 - 1;
do
{
*(v38 - 1) = v52;
if ( v39 <= v22 )
break;
--v39;
}
while ( v38++ < v37 );
}
}
*v15 ^= 0x80u;
return v17;
}
| decimal2bin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RSI
XOR EAX,EAX
CMP AL,byte ptr [RDI + 0xc]
MOV EAX,0x0
SBB EAX,EAX
MOV dword ptr [RBP + -0x38],EAX
MOV dword ptr [RBP + -0x34],EAX
SUB EDX,ECX
MOV dword ptr [RBP + -0x2c],EDX
MOVSXD R8,EDX
IMUL RDX,R8,0x38e38e39
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x21
ADD EDX,EAX
IMUL ESI,ECX,0xe38f
SHR ESI,0x13
LEA EAX,[RDX + RDX*0x8]
SUB R8D,EAX
LEA EAX,[RSI + RSI*0x8]
SUB ECX,EAX
MOVSXD R9,dword ptr [RDI + 0x4]
IMUL R14,R9,0x38e38e39
MOV RAX,R14
SHR RAX,0x3f
SAR R14,0x21
ADD R14D,EAX
LEA EAX,[R14 + R14*0x8]
SUB R9D,EAX
MOV qword ptr [RBP + -0x50],RDX
LEA EDX,[RDX*0x4]
MOV qword ptr [RBP + -0x70],R8
MOVSXD RAX,R8D
LEA R8,[0x1b86b0]
ADD EDX,dword ptr [R8 + RAX*0x4]
MOV dword ptr [RBP + -0x3c],EDX
MOV qword ptr [RBP + -0x60],RSI
LEA EDX,[RSI*0x4]
MOV dword ptr [RBP + -0x30],ECX
MOVSXD RAX,ECX
ADD EDX,dword ptr [R8 + RAX*0x4]
MOV dword ptr [RBP + -0x40],EDX
LEA R13D,[R14*0x4]
MOV qword ptr [RBP + -0x68],R9
MOVSXD RAX,R9D
ADD R13D,dword ptr [R8 + RAX*0x4]
MOV EAX,dword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x10]
LEA RBX,[RBP + -0x56]
MOV EDI,EAX
MOV RDX,RBX
CALL 0x001424fb
MOV R15,RAX
MOVZX EAX,word ptr [RBX]
MOV R12D,EAX
MOV dword ptr [RBP + -0x54],R13D
ADD R13D,EAX
JZ 0x00143f7f
MOV EDX,dword ptr [RBP + -0x2c]
LAB_00143ce2:
IMUL EBX,EAX,0xe38f
SHR EBX,0x13
LEA RCX,[RBX + RBX*0x8]
SUB R12,RCX
CMP EDX,EAX
MOV R11,qword ptr [RBP + -0x70]
JGE 0x00143d21
XOR EAX,EAX
TEST R12D,R12D
SETG AL
XOR ECX,ECX
TEST R11D,R11D
SETG CL
ADD ECX,dword ptr [RBP + -0x50]
SUB EBX,ECX
ADD EBX,EAX
MOVSXD RAX,EBX
LEA R15,[R15 + RAX*0x4]
MOV dword ptr [RBP + -0x2c],0x2
JMP 0x00143d7c
LAB_00143d21:
LEA EAX,[RBX*0x4]
LEA RCX,[0x1b86b0]
MOV R13D,dword ptr [RCX + R12*0x4]
LEA ECX,[RAX + R13*0x1]
MOV dword ptr [RBP + -0x2c],0x0
MOV EDX,dword ptr [RBP + -0x3c]
CMP EDX,ECX
JLE 0x00143d75
NOT R13D
ADD R13D,EDX
SUB R13D,EAX
LEA RDX,[R13 + 0x1]
MOV RDI,qword ptr [RBP + -0x48]
MOV ESI,dword ptr [RBP + -0x38]
CALL 0x0013a3a0
MOV RAX,qword ptr [RBP + -0x48]
LEA RDI,[RAX + R13*0x1]
INC RDI
MOV R13,RAX
MOV R11D,R12D
MOV qword ptr [RBP + -0x50],RBX
JMP 0x00143d83
LAB_00143d75:
MOV R11D,R12D
MOV qword ptr [RBP + -0x50],RBX
LAB_00143d7c:
MOV R13,qword ptr [RBP + -0x48]
MOV RDI,R13
LAB_00143d83:
MOV EDX,dword ptr [RBP + -0x30]
MOV ESI,0x1
MOV EBX,dword ptr [RBP + -0x40]
MOV R8D,EBX
MOV R9D,EDX
MOV RAX,qword ptr [RBP + -0x60]
MOV R10D,EAX
MOV R12D,dword ptr [RBP + -0x54]
CMP EBX,R12D
JL 0x00143dd8
MOV RCX,qword ptr [RBP + -0x68]
TEST ECX,ECX
JZ 0x00143dc1
CMP EBX,R12D
JLE 0x00143dc1
CMP R14D,EAX
JNZ 0x00143dc9
MOV R8D,R12D
MOV R9D,EDX
MOV R10D,EAX
JMP 0x00143dd5
LAB_00143dc1:
MOV R8D,EBX
MOV R9D,ECX
JMP 0x00143dd2
LAB_00143dc9:
INC R14D
XOR R9D,R9D
MOV R8D,EBX
LAB_00143dd2:
MOV R10D,R14D
LAB_00143dd5:
MOV ESI,dword ptr [RBP + -0x2c]
LAB_00143dd8:
TEST R11D,R11D
JZ 0x00143e20
MOVSXD RCX,R11D
LEA R14,[0x1b86b0]
MOVSXD R11,dword ptr [R14 + RCX*0x4]
MOV EAX,dword ptr [R15]
LEA RBX,[0x1b8680]
CDQ
IDIV dword ptr [RBX + RCX*0x4]
LEA EAX,[R11 + -0x1]
CMP EAX,0x3
JA 0x00143e54
MOV EBX,dword ptr [RBP + -0x38]
XOR EBX,EDX
MOV ECX,0x8
LEA RDX,[0x1b81e0]
MOVSXD RAX,dword ptr [RDX + RAX*0x4]
ADD RAX,RDX
switchD:
JMP RAX
caseD_2:
MOV EDX,EBX
JMP 0x00143e4d
LAB_00143e20:
LEA R14,[0x1b86b0]
JMP 0x00143e61
caseD_3:
MOV EAX,0x10
MOV EDX,EBX
JMP 0x00143e44
caseD_4:
MOV byte ptr [RDI + 0x3],BL
MOV EDX,EBX
SHR EDX,0x8
MOV EAX,0x18
MOV ECX,0x10
LAB_00143e44:
MOV byte ptr [RDI + 0x2],DL
MOV EDX,EBX
SHR EDX,CL
MOV ECX,EAX
LAB_00143e4d:
MOV byte ptr [RDI + 0x1],DL
SHR EBX,CL
caseD_1:
MOV byte ptr [RDI],BL
LAB_00143e54:
ADD R15,0x4
ADD RDI,R11
MOV EBX,dword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x30]
LAB_00143e61:
MOVSXD RAX,dword ptr [RBP + -0x50]
LEA RAX,[R15 + RAX*0x4]
MOVSXD RCX,R10D
LEA RAX,[RAX + RCX*0x4]
LAB_00143e70:
CMP R15,RAX
JNC 0x00143e89
MOV ECX,dword ptr [RBP + -0x34]
XOR ECX,dword ptr [R15]
ADD R15,0x4
BSWAP ECX
MOV dword ptr [RDI],ECX
ADD RDI,0x4
JMP 0x00143e70
LAB_00143e89:
TEST R9D,R9D
JZ 0x00143f32
MOVSXD RAX,R9D
MOVSXD R11,dword ptr [R14 + RAX*0x4]
CMP R10D,dword ptr [RBP + -0x60]
MOV ECX,0x9
CMOVL EDX,ECX
CMP R9D,EDX
JGE 0x00143ec2
LEA RAX,[R14 + RAX*0x4]
LAB_00143eae:
CMP dword ptr [RAX],R11D
JNZ 0x00143ec2
INC R9D
ADD RAX,0x4
CMP EDX,R9D
JNZ 0x00143eae
MOV R9D,EDX
LAB_00143ec2:
MOV EAX,dword ptr [R15]
SUB ECX,R9D
MOVSXD RCX,ECX
LEA R9,[0x1b8680]
CDQ
IDIV dword ptr [R9 + RCX*0x4]
LEA EDX,[R11 + -0x1]
CMP EDX,0x3
JA 0x00143f2f
XOR EAX,dword ptr [RBP + -0x34]
MOV ECX,0x8
LEA R9,[0x1b81f0]
MOVSXD RDX,dword ptr [R9 + RDX*0x4]
ADD RDX,R9
switchD:
JMP RDX
caseD_2:
MOV R9D,EAX
JMP 0x00143f27
caseD_3:
MOV EDX,0x10
MOV R9D,EAX
JMP 0x00143f1b
caseD_4:
MOV byte ptr [RDI + 0x3],AL
MOV R9D,EAX
SHR R9D,0x8
MOV EDX,0x18
MOV ECX,0x10
LAB_00143f1b:
MOV byte ptr [RDI + 0x2],R9B
MOV R9D,EAX
SHR R9D,CL
MOV ECX,EDX
LAB_00143f27:
MOV byte ptr [RDI + 0x1],R9B
SHR EAX,CL
caseD_1:
MOV byte ptr [RDI],AL
LAB_00143f2f:
ADD RDI,R11
LAB_00143f32:
CMP R8D,R12D
JLE 0x00143f69
MOVSXD RCX,EBX
ADD RCX,R13
MOVSXD RAX,dword ptr [RBP + -0x3c]
ADD RAX,RCX
CMP RDI,RAX
JNC 0x00143f69
INC RDI
DEC R8D
LAB_00143f4f:
MOV CL,byte ptr [RBP + -0x34]
MOV byte ptr [RDI + -0x1],CL
CMP R8D,R12D
JLE 0x00143f69
LEA RCX,[RDI + 0x1]
DEC R8D
CMP RDI,RAX
MOV RDI,RCX
JC 0x00143f4f
LAB_00143f69:
XOR byte ptr [R13],0x80
MOV EAX,ESI
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00143f7f:
LEA R15,[RBP + -0x34]
MOV dword ptr [R15],0x0
MOV EDX,0x1
MOV dword ptr [RBP + -0x38],0x0
JMP 0x00143ce2
|
int4 decimal2bin(uint *param_1,uint *param_2,int param_3,int param_4)
{
uint *puVar1;
sbyte sVar2;
uint uVar3;
uint *puVar4;
int *piVar5;
sbyte sVar6;
uint uVar7;
int iVar8;
int iVar9;
uint uVar10;
int iVar11;
uint *puVar12;
int iVar13;
int iVar14;
int iVar15;
int iVar16;
long lVar17;
int iVar18;
ulong uVar19;
ushort local_5e;
uint local_58;
uint local_40;
uint local_3c;
int local_38;
int local_34;
local_40 = -(uint)((char)param_1[3] != '\0');
local_34 = param_3 - param_4;
uVar3 = local_34 / 9;
uVar10 = (uint)(param_4 * 0xe38f) >> 0x13;
iVar13 = local_34 % 9;
local_38 = param_4 + uVar10 * -9;
uVar7 = (int)param_1[1] / 9;
iVar14 = (int)param_1[1] % 9;
iVar8 = uVar3 * 4 + *(int *)(dig2bytes + (long)iVar13 * 4);
iVar9 = uVar10 * 4 + *(int *)(dig2bytes + (long)local_38 * 4);
iVar18 = uVar7 * 4 + *(int *)(dig2bytes + (long)iVar14 * 4);
local_3c = local_40;
puVar4 = (uint *)remove_leading_zeroes((st_decimal_t *)(ulong)*param_1,*(ushort **)(param_1 + 4));
if (iVar18 + (uint)local_5e == 0) {
puVar4 = &local_3c;
local_3c = 0;
local_34 = 1;
local_40 = 0;
}
local_58 = local_5e / 9;
lVar17 = (ulong)(uint)local_5e + (ulong)local_58 * -9;
iVar16 = (int)lVar17;
puVar12 = param_2;
if (local_34 < (int)(uint)local_5e) {
puVar4 = puVar4 + (int)((local_58 - ((0 < iVar13) + uVar3)) + (uint)(0 < iVar16));
local_34 = 2;
iVar16 = iVar13;
local_58 = uVar3;
}
else {
local_34 = 0;
if ((int)(local_58 * 4 + *(uint *)(dig2bytes + lVar17 * 4)) < iVar8) {
uVar19 = (ulong)(~*(uint *)(dig2bytes + lVar17 * 4) + iVar8 + local_58 * -4);
memset(param_2,local_40,uVar19 + 1);
puVar12 = (uint *)((long)param_2 + uVar19 + 1);
}
}
iVar13 = iVar9;
iVar15 = local_38;
iVar11 = 1;
uVar3 = uVar10;
if ((((iVar18 <= iVar9) && (iVar15 = iVar14, iVar11 = local_34, uVar3 = uVar7, iVar14 != 0)) &&
(iVar18 < iVar9)) && (iVar13 = iVar18, iVar15 = local_38, uVar3 = uVar10, uVar7 != uVar10)) {
iVar13 = iVar9;
iVar15 = 0;
uVar3 = uVar7 + 1;
}
if (iVar16 != 0) {
iVar14 = *(int *)(dig2bytes + (long)iVar16 * 4);
if (iVar14 - 1U < 4) {
local_40 = local_40 ^ (int)*puVar4 % (int)(&powers10)[iVar16];
sVar6 = 8;
switch(iVar14) {
case 1:
goto switchD_00143e1a_caseD_1;
case 2:
uVar7 = local_40;
goto LAB_00143e4d;
case 3:
sVar2 = 0x10;
uVar7 = local_40;
break;
case 4:
*(byte *)((long)puVar12 + 3) = (byte)local_40;
sVar2 = 0x18;
sVar6 = 0x10;
uVar7 = local_40 >> 8;
}
*(byte *)((long)puVar12 + 2) = (byte)uVar7;
uVar7 = local_40 >> sVar6;
sVar6 = sVar2;
LAB_00143e4d:
*(byte *)((long)puVar12 + 1) = (byte)uVar7;
local_40 = local_40 >> sVar6;
switchD_00143e1a_caseD_1:
*(byte *)puVar12 = (byte)local_40;
}
puVar4 = puVar4 + 1;
puVar12 = (uint *)((long)puVar12 + (long)iVar14);
}
puVar1 = puVar4 + (long)(int)local_58 + (long)(int)uVar3;
for (; puVar4 < puVar1; puVar4 = puVar4 + 1) {
uVar7 = local_3c ^ *puVar4;
*puVar12 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;
puVar12 = puVar12 + 1;
}
if (iVar15 == 0) goto LAB_00143f32;
iVar14 = *(int *)(dig2bytes + (long)iVar15 * 4);
if ((int)uVar3 < (int)uVar10) {
local_38 = 9;
}
iVar16 = iVar15;
if (iVar15 < local_38) {
piVar5 = (int *)(dig2bytes + (long)iVar15 * 4);
do {
iVar16 = iVar15;
if (*piVar5 != iVar14) break;
iVar15 = iVar15 + 1;
piVar5 = piVar5 + 1;
iVar16 = local_38;
} while (local_38 != iVar15);
}
if (iVar14 - 1U < 4) {
uVar3 = (int)*puVar4 / (int)(&powers10)[9 - iVar16] ^ local_3c;
sVar2 = 8;
sVar6 = 8;
switch(iVar14) {
case 1:
goto switchD_00143ef6_caseD_1;
case 2:
uVar7 = uVar3;
goto LAB_00143f27;
case 3:
sVar2 = 0x10;
uVar7 = uVar3;
break;
case 4:
*(byte *)((long)puVar12 + 3) = (byte)uVar3;
sVar2 = 0x18;
sVar6 = 0x10;
uVar7 = uVar3 >> 8;
}
*(byte *)((long)puVar12 + 2) = (byte)uVar7;
uVar7 = uVar3 >> sVar6;
LAB_00143f27:
*(byte *)((long)puVar12 + 1) = (byte)uVar7;
uVar3 = uVar3 >> sVar2;
switchD_00143ef6_caseD_1:
*(byte *)puVar12 = (byte)uVar3;
}
puVar12 = (uint *)((long)puVar12 + (long)iVar14);
LAB_00143f32:
if (iVar18 < iVar13) {
do {
if ((uint *)((long)param_2 + (long)iVar8 + (long)iVar9) <= puVar12) break;
iVar13 = iVar13 + -1;
*(byte *)puVar12 = (byte)local_3c;
puVar12 = (uint *)((long)puVar12 + 1);
} while (iVar18 < iVar13);
}
*(byte *)param_2 = (byte)*param_2 ^ 0x80;
return iVar11;
}
| |
30,507 | minja::Value::set(minja::Value const&, minja::Value const&) | monkey531[P]llama/common/minja.hpp | void set(const Value& key, const Value& value) {
if (!object_) throw std::runtime_error("Value is not an object: " + dump());
if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump());
(*object_)[key.primitive_] = value;
} | O3 | cpp | minja::Value::set(minja::Value const&, minja::Value const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x93989
cmpq $0x0, 0x10(%rsi)
jne 0x939e6
cmpq $0x0, 0x20(%rsi)
jne 0x939e6
cmpq $0x0, 0x30(%rsi)
jne 0x939e6
movq %rdx, %rbx
addq $0x40, %rsi
callq 0x93b26
movq %rax, %r14
movq 0x10(%rbx), %rax
movq %rax, 0x10(%r14)
leaq 0x18(%r14), %rdi
leaq 0x18(%rbx), %rsi
callq 0x92aae
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r14)
leaq 0x28(%r14), %rdi
leaq 0x28(%rbx), %rsi
callq 0x92aae
movq 0x30(%rbx), %rax
movq %rax, 0x30(%r14)
leaq 0x38(%r14), %rdi
leaq 0x38(%rbx), %rsi
callq 0x92aae
addq $0x40, %rbx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x62724
addq $0x40, %r14
leaq 0x20(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5fea4
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5d774
movq %rbx, %rdi
callq 0x62bf0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x1b460
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8b2b4
leaq 0x60e4c(%rip), %rsi # 0xf47fb
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7db09
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1beb0
xorl %ebp, %ebp
movq 0x9d613(%rip), %rsi # 0x130fe8
movq 0x9d57c(%rip), %rdx # 0x130f58
movq %rbx, %rdi
callq 0x1bfb0
jmp 0x93a41
movl $0x10, %edi
callq 0x1b460
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8b2b4
leaq 0x60e08(%rip), %rsi # 0xf4814
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7db09
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1beb0
xorl %ebp, %ebp
movq 0x9d5b6(%rip), %rsi # 0x130fe8
movq 0x9d51f(%rip), %rdx # 0x130f58
movq %rbx, %rdi
callq 0x1bfb0
jmp 0x93a45
jmp 0x93a85
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93a63
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b910
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93a7e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b910
testb %bpl, %bpl
jne 0x93aaa
jmp 0x93ab2
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93aaa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0x93aaa
jmp 0x93aa7
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b6a0
movq %r14, %rdi
callq 0x1c030
movq %rax, %rdi
callq 0x24da9
| _ZN5minja5Value3setERKS0_S2_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
mov rdi, [rdi+20h]
test rdi, rdi
jz loc_93989
cmp qword ptr [rsi+10h], 0
jnz loc_939E6
cmp qword ptr [rsi+20h], 0
jnz loc_939E6
cmp qword ptr [rsi+30h], 0
jnz loc_939E6
mov rbx, rdx
add rsi, 40h ; '@'
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::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&)
mov r14, rax
mov rax, [rbx+10h]
mov [r14+10h], rax
lea rdi, [r14+18h]
lea rsi, [rbx+18h]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&)
mov rax, [rbx+20h]
mov [r14+20h], rax
lea rdi, [r14+28h]
lea rsi, [rbx+28h]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&)
mov rax, [rbx+30h]
mov [r14+30h], rax
lea rdi, [r14+38h]
lea rsi, [rbx+38h]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&)
add rbx, 40h ; '@'
lea rdi, [rsp+58h+var_38]
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&)
add r14, 40h ; '@'
lea rbx, [rsp+58h+var_38]
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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>::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>)
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_93989:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnOb; "Value is not an object: "
lea rdi, [rsp+58h+var_38]
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+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_93A41
loc_939E6:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+58h+var_38]
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+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_93A41:
jmp short loc_93A45
jmp short loc_93A85
loc_93A45:
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93A63
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_93A63:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93A7E
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_93A7E:
test bpl, bpl
jnz short loc_93AAA
jmp short loc_93AB2
loc_93A85:
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93AAA
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_93AAA
jmp short $+2
loc_93AA7:
mov r14, rax
loc_93AAA:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_93AB2:
mov rdi, r14
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long minja::Value::set(minja::Value *this, const minja::Value *a2, const minja::Value *a3)
{
long long v4; // rdi
long long v6; // r14
void *exception; // rbx
void *v9; // rbx
_BYTE v10[16]; // [rsp+0h] [rbp-58h] BYREF
unsigned __int8 v11[16]; // [rsp+20h] [rbp-38h] BYREF
v4 = *((_QWORD *)this + 4);
if ( !v4 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v11, (long long)"Value is not an object: ", (long long)v10);
std::runtime_error::runtime_error(exception, v11);
__cxa_throw(
exception,
(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) )
{
v9 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v11, (long long)"Unashable type: ", (long long)v10);
std::runtime_error::runtime_error(v9, v11);
__cxa_throw(
v9,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v6 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[](
v4,
(char *)a2 + 64);
*(_QWORD *)(v6 + 16) = *((_QWORD *)a3 + 2);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(
(volatile signed __int32 **)(v6 + 24),
(volatile signed __int32 **)a3 + 3);
*(_QWORD *)(v6 + 32) = *((_QWORD *)a3 + 4);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(
(volatile signed __int32 **)(v6 + 40),
(volatile signed __int32 **)a3 + 5);
*(_QWORD *)(v6 + 48) = *((_QWORD *)a3 + 6);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(
(volatile signed __int32 **)(v6 + 56),
(volatile signed __int32 **)a3 + 7);
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>::basic_json(
v11,
(unsigned __int8 *)a3 + 64);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
v6 + 64,
(long long)v11);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v11);
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v11);
}
| set:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x20]
TEST RDI,RDI
JZ 0x00193989
CMP qword ptr [RSI + 0x10],0x0
JNZ 0x001939e6
CMP qword ptr [RSI + 0x20],0x0
JNZ 0x001939e6
CMP qword ptr [RSI + 0x30],0x0
JNZ 0x001939e6
MOV RBX,RDX
ADD RSI,0x40
CALL 0x00193b26
MOV R14,RAX
MOV RAX,qword ptr [RBX + 0x10]
MOV qword ptr [R14 + 0x10],RAX
LEA RDI,[R14 + 0x18]
LEA RSI,[RBX + 0x18]
CALL 0x00192aae
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [R14 + 0x20],RAX
LEA RDI,[R14 + 0x28]
LEA RSI,[RBX + 0x28]
CALL 0x00192aae
MOV RAX,qword ptr [RBX + 0x30]
MOV qword ptr [R14 + 0x30],RAX
LEA RDI,[R14 + 0x38]
LEA RSI,[RBX + 0x38]
CALL 0x00192aae
ADD RBX,0x40
LAB_0019394d:
LEA RDI,[RSP + 0x20]
MOV RSI,RBX
CALL 0x00162724
LAB_0019395a:
ADD R14,0x40
LEA RBX,[RSP + 0x20]
MOV RDI,R14
MOV RSI,RBX
CALL 0x0015fea4
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0015d774
MOV RDI,RBX
CALL 0x00162bf0
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_00193989:
MOV EDI,0x10
CALL 0x0011b460
MOV RBX,RAX
LAB_00193996:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018b2b4
LAB_001939a8:
LEA RSI,[0x1f47fb]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017db09
MOV BPL,0x1
LAB_001939bf:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011beb0
XOR EBP,EBP
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f58]
MOV RDI,RBX
CALL 0x0011bfb0
LAB_001939e6:
MOV EDI,0x10
CALL 0x0011b460
MOV RBX,RAX
LAB_001939f3:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018b2b4
LAB_00193a05:
LEA RSI,[0x1f4814]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017db09
MOV BPL,0x1
LAB_00193a1c:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011beb0
XOR EBP,EBP
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f58]
MOV RDI,RBX
CALL 0x0011bfb0
|
/* minja::Value::set(minja::Value const&, minja::Value const&) */
void __thiscall minja::Value::set(Value *this,Value *param_1,Value *param_2)
{
long lVar1;
runtime_error *prVar2;
int1 auStack_58 [32];
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>
local_38 [32];
if (*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(this + 0x20) ==
(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)0x0) {
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00193996 to 001939a7 has its CatchHandler @ 00193aa7 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 001939a8 to 001939bb has its CatchHandler @ 00193a85 */
std::operator+((char *)local_38,(string *)"Value is not an object: ");
/* try { // try from 001939bf to 001939e3 has its CatchHandler @ 00193a45 */
std::runtime_error::runtime_error(prVar2,(string *)local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f58);
}
if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) &&
(*(long *)(param_1 + 0x30) == 0)) {
lVar1 = nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::operator[](*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(this + 0x20),(basic_json *)(param_1 + 0x40));
*(int8 *)(lVar1 + 0x10) = *(int8 *)(param_2 + 0x10);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(lVar1 + 0x18),
(__shared_count *)(param_2 + 0x18));
*(int8 *)(lVar1 + 0x20) = *(int8 *)(param_2 + 0x20);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(lVar1 + 0x28),
(__shared_count *)(param_2 + 0x28));
*(int8 *)(lVar1 + 0x30) = *(int8 *)(param_2 + 0x30);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(lVar1 + 0x38),
(__shared_count *)(param_2 + 0x38));
/* try { // try from 0019394d to 00193959 has its CatchHandler @ 00193aba */
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(local_38,(basic_json *)(param_2 + 0x40));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)(lVar1 + 0x40),(data *)local_38);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_38,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_38);
return;
}
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001939f3 to 00193a04 has its CatchHandler @ 00193aa5 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 00193a05 to 00193a18 has its CatchHandler @ 00193a43 */
std::operator+((char *)local_38,(string *)"Unashable type: ");
/* try { // try from 00193a1c to 00193a40 has its CatchHandler @ 00193a41 */
std::runtime_error::runtime_error(prVar2,(string *)local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f58);
}
| |
30,508 | write_hook_for_undo | eloqsql/storage/maria/ma_blockrec.c | my_bool write_hook_for_undo(enum translog_record_type type
__attribute__ ((unused)),
TRN *trn, MARIA_HA *tbl_info
__attribute__ ((unused)),
LSN *lsn, void *hook_arg
__attribute__ ((unused)))
{
DBUG_ASSERT(trn->trid != 0);
trn->undo_lsn= *lsn;
if (unlikely(LSN_WITH_FLAGS_TO_LSN(trn->first_undo_lsn) == 0))
trn->first_undo_lsn=
trn->undo_lsn | LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn);
return 0;
/*
when we implement purging, we will specialize this hook: UNDO_PURGE
records will additionally set trn->undo_purge_lsn
*/
} | O0 | c | write_hook_for_undo:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
jmp 0x5abd9
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rcx
movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF
andq 0xa0(%rcx), %rax
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5ac4d
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rcx
movq -0x10(%rbp), %rdx
movabsq $-0x100000000000000, %rax # imm = 0xFF00000000000000
andq 0xa0(%rdx), %rax
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| write_hook_for_undo:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
jmp short $+2
loc_5ABD9:
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax+98h], rcx
mov rcx, [rbp+var_10]
mov rax, 0FFFFFFFFFFFFFFh
and rax, [rcx+0A0h]
cmp rax, 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_5AC4D
mov rax, [rbp+var_10]
mov rcx, [rax+98h]
mov rdx, [rbp+var_10]
mov rax, 0FF00000000000000h
and rax, [rdx+0A0h]
or rcx, rax
mov rax, [rbp+var_10]
mov [rax+0A0h], rcx
loc_5AC4D:
xor eax, eax
pop rbp
retn
| long long write_hook_for_undo(long long a1, long long a2, long long a3, _QWORD *a4)
{
*(_QWORD *)(a2 + 152) = *a4;
if ( (*(_QWORD *)(a2 + 160) & 0xFFFFFFFFFFFFFFLL) == 0 )
*(_QWORD *)(a2 + 160) = *(_QWORD *)(a2 + 160) & 0xFF00000000000000LL | *(_QWORD *)(a2 + 152);
return 0LL;
}
| write_hook_for_undo:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
JMP 0x0015abd9
LAB_0015abd9:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,0xffffffffffffff
AND RAX,qword ptr [RCX + 0xa0]
CMP RAX,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 0x0015ac4d
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x98]
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,-0x100000000000000
AND RAX,qword ptr [RDX + 0xa0]
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xa0],RCX
LAB_0015ac4d:
XOR EAX,EAX
POP RBP
RET
|
int8
write_hook_for_undo(int8 param_1,long param_2,int8 param_3,int8 *param_4)
{
*(int8 *)(param_2 + 0x98) = *param_4;
if ((*(ulong *)(param_2 + 0xa0) & 0xffffffffffffff) == 0) {
*(ulong *)(param_2 + 0xa0) =
*(ulong *)(param_2 + 0x98) | *(ulong *)(param_2 + 0xa0) & 0xff00000000000000;
}
return 0;
}
| |
30,509 | Binary_string::append(char const*, unsigned long) | eloqsql/sql/sql_string.h | bool append(const char *s, size_t size)
{
if (!size)
return false;
if (realloc_with_extra_if_needed(str_length + size))
return true;
q_append(s, size);
return false;
} | O3 | c | Binary_string::append(char const*, unsigned long):
testq %rdx, %rdx
je 0x27d71
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0x8(%rdi), %esi
movl 0xc(%rdi), %eax
addq %rdx, %rsi
cmpq %rax, %rsi
jae 0x27d74
movq (%r14), %rax
movb $0x0, (%rax,%rsi)
jmp 0x27d84
xorl %eax, %eax
retq
movq %r14, %rdi
callq 0x27da8
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x27d9c
movl 0x8(%r14), %edi
addq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x24290
addl %ebx, 0x8(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN13Binary_string6appendEPKcm:
test rdx, rdx
jz short loc_27D71
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov esi, [rdi+8]
mov eax, [rdi+0Ch]
add rsi, rdx; unsigned __int64
cmp rsi, rax
jnb short loc_27D74
mov rax, [r14]
mov byte ptr [rax+rsi], 0
jmp short loc_27D84
loc_27D71:
xor eax, eax
retn
loc_27D74:
mov rdi, r14; this
call _ZN13Binary_string18realloc_with_extraEm; Binary_string::realloc_with_extra(ulong)
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_27D9C
loc_27D84:
mov edi, [r14+8]
add rdi, [r14]
mov rsi, r15
mov rdx, rbx
call _memcpy
add [r14+8], ebx
xor eax, eax
loc_27D9C:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| char Binary_string::append(Binary_string *this, const char *a2, long long a3)
{
int v3; // ebx
unsigned long long v5; // rsi
char result; // al
char v7; // cl
if ( !a3 )
return 0;
v3 = a3;
v5 = a3 + *((unsigned int *)this + 2);
if ( v5 >= *((unsigned int *)this + 3) )
{
v7 = Binary_string::realloc_with_extra(this, v5);
result = 1;
if ( v7 )
return result;
}
else
{
*(_BYTE *)(*(_QWORD *)this + v5) = 0;
}
memcpy(*(_QWORD *)this + *((unsigned int *)this + 2), a2);
*((_DWORD *)this + 2) += v3;
return 0;
}
| append:
TEST RDX,RDX
JZ 0x00127d71
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV ESI,dword ptr [RDI + 0x8]
MOV EAX,dword ptr [RDI + 0xc]
ADD RSI,RDX
CMP RSI,RAX
JNC 0x00127d74
MOV RAX,qword ptr [R14]
MOV byte ptr [RAX + RSI*0x1],0x0
JMP 0x00127d84
LAB_00127d71:
XOR EAX,EAX
RET
LAB_00127d74:
MOV RDI,R14
CALL 0x00127da8
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x00127d9c
LAB_00127d84:
MOV EDI,dword ptr [R14 + 0x8]
ADD RDI,qword ptr [R14]
MOV RSI,R15
MOV RDX,RBX
CALL 0x00124290
ADD dword ptr [R14 + 0x8],EBX
XOR EAX,EAX
LAB_00127d9c:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* Binary_string::append(char const*, unsigned long) */
int8 __thiscall Binary_string::append(Binary_string *this,char *param_1,ulong param_2)
{
char cVar1;
ulong uVar2;
if (param_2 == 0) {
return 0;
}
uVar2 = *(uint *)(this + 8) + param_2;
if (uVar2 < *(uint *)(this + 0xc)) {
*(int1 *)(*(long *)this + uVar2) = 0;
}
else {
cVar1 = realloc_with_extra(this,uVar2);
if (cVar1 != '\0') {
return 1;
}
}
memcpy((void *)((ulong)*(uint *)(this + 8) + *(long *)this),param_1,param_2);
*(int *)(this + 8) = *(int *)(this + 8) + (int)param_2;
return 0;
}
| |
30,510 | ma_store_length | eloqsql/storage/maria/ma_blockrec.c | uchar *ma_store_length(uchar *to, ulong nr)
{
if (nr < 251)
{
*to=(uchar) nr;
return to+1;
}
if (nr < 65536)
{
if (nr <= 255)
{
to[0]= (uchar) 251;
to[1]= (uchar) nr;
return to+2;
}
to[0]= (uchar) 252;
int2store(to+1, nr);
return to+3;
}
if (nr < 16777216)
{
*to++= (uchar) 253;
int3store(to, nr);
return to+3;
}
*to++= (uchar) 254;
int4store(to, nr);
return to+4;
} | O0 | c | ma_store_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0xfb, -0x18(%rbp)
jae 0x5aa23
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x5ab17
cmpq $0x10000, -0x18(%rbp) # imm = 0x10000
jae 0x5aa8e
cmpq $0xff, -0x18(%rbp)
ja 0x5aa5c
movq -0x10(%rbp), %rax
movb $-0x5, (%rax)
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
jmp 0x5ab17
movq -0x10(%rbp), %rax
movb $-0x4, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, (%rax)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x5ab17
cmpq $0x1000000, -0x18(%rbp) # imm = 0x1000000
jae 0x5aae5
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $-0x3, (%rax)
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x5ab17
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $-0x2, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| ma_store_length:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_18], 0FBh
jnb short loc_5AA23
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_8], rax
jmp loc_5AB17
loc_5AA23:
cmp [rbp+var_18], 10000h
jnb short loc_5AA8E
cmp [rbp+var_18], 0FFh
ja short loc_5AA5C
mov rax, [rbp+var_10]
mov byte ptr [rax], 0FBh
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_8], rax
jmp loc_5AB17
loc_5AA5C:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0FCh
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov cx, ax
mov rax, [rbp+var_20]
mov [rax], cx
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_8], rax
jmp loc_5AB17
loc_5AA8E:
cmp [rbp+var_18], 1000000h
jnb short loc_5AAE5
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 0FDh
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_18]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_18]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_8], rax
jmp short loc_5AB17
loc_5AAE5:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 0FEh
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax], ecx
mov rax, [rbp+var_10]
add rax, 4
mov [rbp+var_8], rax
loc_5AB17:
mov rax, [rbp+var_8]
pop rbp
retn
| long long ma_store_length(long long a1, unsigned long long a2)
{
if ( a2 >= 0xFB )
{
if ( a2 >= 0x10000 )
{
if ( a2 >= 0x1000000 )
{
*(_BYTE *)a1 = -2;
*(_DWORD *)(a1 + 1) = a2;
return a1 + 5;
}
else
{
*(_BYTE *)a1 = -3;
*(_WORD *)(a1 + 1) = a2;
*(_BYTE *)(a1 + 3) = BYTE2(a2);
return a1 + 4;
}
}
else if ( a2 > 0xFF )
{
*(_BYTE *)a1 = -4;
*(_WORD *)(a1 + 1) = a2;
return a1 + 3;
}
else
{
*(_BYTE *)a1 = -5;
*(_BYTE *)(a1 + 1) = a2;
return a1 + 2;
}
}
else
{
*(_BYTE *)a1 = a2;
return a1 + 1;
}
}
| ma_store_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x18],0xfb
JNC 0x0015aa23
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015ab17
LAB_0015aa23:
CMP qword ptr [RBP + -0x18],0x10000
JNC 0x0015aa8e
CMP qword ptr [RBP + -0x18],0xff
JA 0x0015aa5c
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0xfb
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015ab17
LAB_0015aa5c:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0xfc
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x20]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015ab17
LAB_0015aa8e:
CMP qword ptr [RBP + -0x18],0x1000000
JNC 0x0015aae5
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0xfd
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015ab17
LAB_0015aae5:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0xfe
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x4
MOV qword ptr [RBP + -0x8],RAX
LAB_0015ab17:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
int1 * ma_store_length(int1 *param_1,ulong param_2)
{
int1 uVar1;
int1 *local_10;
uVar1 = (int1)param_2;
if (param_2 < 0xfb) {
*param_1 = uVar1;
local_10 = param_1 + 1;
}
else if (param_2 < 0x10000) {
if (param_2 < 0x100) {
*param_1 = 0xfb;
param_1[1] = uVar1;
local_10 = param_1 + 2;
}
else {
*param_1 = 0xfc;
*(short *)(param_1 + 1) = (short)param_2;
local_10 = param_1 + 3;
}
}
else if (param_2 < 0x1000000) {
*param_1 = 0xfd;
param_1[1] = uVar1;
param_1[2] = (char)(param_2 >> 8);
param_1[3] = (char)(param_2 >> 0x10);
local_10 = param_1 + 4;
}
else {
*param_1 = 0xfe;
*(int *)(param_1 + 1) = (int)param_2;
local_10 = param_1 + 5;
}
return local_10;
}
| |
30,511 | instr_word::~instr_word() | msxemulator/build_O3/_deps/pico_sdk-src/tools/pioasm/pio_types.h | instr_word(const yy::location &l, rvalue encoding) : instruction(l), encoding(std::move(encoding)) {} | O3 | c | instr_word::~instr_word():
pushq %rbx
movq %rdi, %rbx
leaq 0x178d5(%rip), %rax # 0x34f00
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x50(%rdi), %rdi
testq %rdi, %rdi
je 0x1d640
callq 0x7c8c
leaq 0x17669(%rip), %rax # 0x34cb0
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x1d65c
callq 0x7c8c
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x1d66b
popq %rbx
jmp 0x7c8c
popq %rbx
retq
nop
| _ZN10instr_wordD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTV10instr_word; `vtable for'instr_word
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+50h]
test rdi, rdi
jz short loc_1D640
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_1D640:
lea rax, _ZTV11instruction; `vtable for'instruction
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_1D65C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_1D65C:
mov rdi, [rbx+30h]
test rdi, rdi
jz short loc_1D66B
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_1D66B:
pop rbx
retn
| void instr_word::~instr_word(instr_word *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
volatile signed __int32 *v4; // rdi
*(_QWORD *)this = &`vtable for'instr_word + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 10);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'instruction + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 8);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
v4 = (volatile signed __int32 *)*((_QWORD *)this + 6);
if ( v4 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4);
}
| ~instr_word:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x134f00]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x50]
TEST RDI,RDI
JZ 0x0011d640
CALL 0x00107c8c
LAB_0011d640:
LEA RAX,[0x134cb0]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x0011d65c
CALL 0x00107c8c
LAB_0011d65c:
MOV RDI,qword ptr [RBX + 0x30]
TEST RDI,RDI
JZ 0x0011d66b
POP RBX
JMP 0x00107c8c
LAB_0011d66b:
POP RBX
RET
|
/* instr_word::~instr_word() */
void __thiscall instr_word::~instr_word(instr_word *this)
{
*(int ***)this = &PTR_pre_validate_00134f10;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x50) !=
(_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 + 0x50));
}
*(int ***)this = &PTR_pre_validate_00134cc0;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x40) !=
(_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 + 0x40));
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x30) !=
(_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 + 0x30));
return;
}
return;
}
| |
30,512 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char*, int) | monkey531[P]llama/common/json.hpp | inline char* append_exponent(char* buf, int e)
{
JSON_ASSERT(e > -1000);
JSON_ASSERT(e < 1000);
if (e < 0)
{
e = -e;
*buf++ = '-';
}
else
{
*buf++ = '+';
}
auto k = static_cast<std::uint32_t>(e);
if (k < 10)
{
// Always print at least two digits in the exponent.
// This is for compatibility with printf("%g").
*buf++ = '0';
*buf++ = static_cast<char>('0' + k);
}
else if (k < 100)
{
*buf++ = static_cast<char>('0' + k / 10);
k %= 10;
*buf++ = static_cast<char>('0' + k);
}
else
{
*buf++ = static_cast<char>('0' + k / 100);
k %= 100;
*buf++ = static_cast<char>('0' + k / 10);
k %= 10;
*buf++ = static_cast<char>('0' + k);
}
return buf;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char*, int):
pushq %rax
cmpl $0xfffffc18, %esi # imm = 0xFFFFFC18
jle 0x8caec
cmpl $0x3e8, %esi # imm = 0x3E8
jge 0x8cb08
movl %esi, %ecx
shrl $0x1f, %ecx
addb %cl, %cl
addb $0x2b, %cl
movl %esi, %eax
negl %eax
cmovsl %esi, %eax
movb %cl, (%rdi)
cmpl $0x9, %eax
ja 0x8ca9a
leaq 0x2(%rdi), %rdx
movb $0x30, 0x1(%rdi)
jmp 0x8cab5
cmpl $0x63, %eax
ja 0x8cab9
movzbl %al, %eax
movb $0xa, %cl
divb %cl
movl %eax, %ecx
movzbl %ah, %eax
orb $0x30, %cl
leaq 0x2(%rdi), %rdx
movb %cl, 0x1(%rdi)
pushq $0x3
jmp 0x8cadf
movw $0x64, %cx
xorl %edx, %edx
divw %cx
addb $0x30, %al
movb %al, 0x1(%rdi)
movzbl %dl, %eax
movb $0xa, %cl
divb %cl
movl %eax, %ecx
movzbl %ah, %eax
orb $0x30, %cl
leaq 0x3(%rdi), %rdx
movb %cl, 0x2(%rdi)
pushq $0x4
popq %rcx
orb $0x30, %al
addq %rcx, %rdi
movb %al, (%rdx)
movq %rdi, %rax
popq %rcx
retq
leaq 0x27939(%rip), %rdi # 0xb442c
leaq 0x21690(%rip), %rdx # 0xae18a
leaq 0x2d1ac(%rip), %rcx # 0xb9cad
movl $0x45ae, %esi # imm = 0x45AE
jmp 0x8cb22
leaq 0x2791d(%rip), %rdi # 0xb442c
leaq 0x21674(%rip), %rdx # 0xae18a
leaq 0x2d19a(%rip), %rcx # 0xb9cb7
movl $0x45af, %esi # imm = 0x45AF
xorl %eax, %eax
callq 0x24f50
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl15append_exponentEPci:
push rax
cmp esi, 0FFFFFC18h
jle loc_8CAEC
cmp esi, 3E8h
jge loc_8CB08
mov ecx, esi
shr ecx, 1Fh
add cl, cl
add cl, 2Bh ; '+'
mov eax, esi
neg eax
cmovs eax, esi
mov [rdi], cl
cmp eax, 9
ja short loc_8CA9A
lea rdx, [rdi+2]
mov byte ptr [rdi+1], 30h ; '0'
jmp short loc_8CAB5
loc_8CA9A:
cmp eax, 63h ; 'c'
ja short loc_8CAB9
movzx eax, al
mov cl, 0Ah
div cl
mov ecx, eax
movzx eax, ah
or cl, 30h
lea rdx, [rdi+2]
mov [rdi+1], cl
loc_8CAB5:
push 3
jmp short loc_8CADF
loc_8CAB9:
mov cx, 64h ; 'd'
xor edx, edx
div cx
add al, 30h ; '0'
mov [rdi+1], al
movzx eax, dl
mov cl, 0Ah
div cl
mov ecx, eax
movzx eax, ah
or cl, 30h
lea rdx, [rdi+3]
mov [rdi+2], cl
push 4
loc_8CADF:
pop rcx
or al, 30h
add rdi, rcx
mov [rdx], al
mov rax, rdi
pop rcx
retn
loc_8CAEC:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000; "e > -1000"
mov esi, 45AEh
jmp short loc_8CB22
loc_8CB08:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000_0; "e < 1000"
mov esi, 45AFh
loc_8CB22:
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2)
{
unsigned int v2; // eax
_BYTE *v3; // rdx
char v4; // cl
char v5; // cl
long long v7; // [rsp-10h] [rbp-10h]
if ( (int)a2 <= -1000 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17838LL,
"GGML_ASSERT(%s) failed",
"e > -1000");
}
else
{
if ( (int)a2 < 1000 )
{
v2 = -(int)a2;
if ( (int)a2 > 0 )
v2 = (unsigned int)a2;
*(_BYTE *)this = 2 * ((int)a2 < 0) + 43;
if ( v2 > 9 )
{
if ( v2 > 0x63 )
{
*((_BYTE *)this + 1) = (unsigned __int16)v2 / 0x64u + 48;
v5 = (unsigned __int16)v2 % 0x64u / 0xA;
LOBYTE(v2) = (unsigned __int16)v2 % 0x64u % 0xA;
v3 = (char *)this + 3;
*((_BYTE *)this + 2) = v5 | 0x30;
v7 = 4LL;
goto LABEL_11;
}
v4 = (unsigned __int8)v2 / 0xAu;
LOBYTE(v2) = (unsigned __int8)v2 % 0xAu;
v3 = (char *)this + 2;
*((_BYTE *)this + 1) = v4 | 0x30;
}
else
{
v3 = (char *)this + 2;
*((_BYTE *)this + 1) = 48;
}
v7 = 3LL;
LABEL_11:
*v3 = v2 | 0x30;
return (long long)this + v7;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17839LL,
"GGML_ASSERT(%s) failed",
"e < 1000");
}
return nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)3>::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>>("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
| append_exponent:
PUSH RAX
CMP ESI,0xfffffc18
JLE 0x0018caec
CMP ESI,0x3e8
JGE 0x0018cb08
MOV ECX,ESI
SHR ECX,0x1f
ADD CL,CL
ADD CL,0x2b
MOV EAX,ESI
NEG EAX
CMOVS EAX,ESI
MOV byte ptr [RDI],CL
CMP EAX,0x9
JA 0x0018ca9a
LEA RDX,[RDI + 0x2]
MOV byte ptr [RDI + 0x1],0x30
JMP 0x0018cab5
LAB_0018ca9a:
CMP EAX,0x63
JA 0x0018cab9
MOVZX EAX,AL
MOV CL,0xa
DIV CL
MOV ECX,EAX
MOVZX EAX,AH
OR CL,0x30
LEA RDX,[RDI + 0x2]
MOV byte ptr [RDI + 0x1],CL
LAB_0018cab5:
PUSH 0x3
JMP 0x0018cadf
LAB_0018cab9:
MOV CX,0x64
XOR EDX,EDX
DIV CX
ADD AL,0x30
MOV byte ptr [RDI + 0x1],AL
MOVZX EAX,DL
MOV CL,0xa
DIV CL
MOV ECX,EAX
MOVZX EAX,AH
OR CL,0x30
LEA RDX,[RDI + 0x3]
MOV byte ptr [RDI + 0x2],CL
PUSH 0x4
LAB_0018cadf:
POP RCX
OR AL,0x30
ADD RDI,RCX
MOV byte ptr [RDX],AL
MOV RAX,RDI
POP RCX
RET
LAB_0018caec:
LEA RDI,[0x1b442c]
LEA RDX,[0x1ae18a]
LEA RCX,[0x1b9cad]
MOV ESI,0x45ae
JMP 0x0018cb22
LAB_0018cb08:
LEA RDI,[0x1b442c]
LEA RDX,[0x1ae18a]
LEA RCX,[0x1b9cb7]
MOV ESI,0x45af
LAB_0018cb22:
XOR EAX,EAX
CALL 0x00124f50
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char*, int) */
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char *param_1,int param_2)
{
byte bVar2;
uint uVar1;
char *pcVar3;
ushort uVar4;
byte *pbVar5;
int8 uVar6;
long lStack_10;
if (param_2 < -999) {
pcVar3 = "e > -1000";
uVar6 = 0x45ae;
LAB_0018cb22:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar3);
}
if (999 < param_2) {
pcVar3 = "e < 1000";
uVar6 = 0x45af;
goto LAB_0018cb22;
}
uVar1 = -param_2;
if (0 < param_2) {
uVar1 = param_2;
}
*param_1 = (char)(param_2 >> 0x1f) * -2 + '+';
if (uVar1 < 10) {
param_1[1] = '0';
}
else {
if (99 < uVar1) {
uVar4 = (ushort)((uVar1 & 0xffff) % 100);
param_1[1] = (char)((uVar1 & 0xffff) / 100) + '0';
bVar2 = (byte)(uVar4 % 10);
pbVar5 = (byte *)(param_1 + 3);
param_1[2] = (byte)(uVar4 / 10) | 0x30;
lStack_10 = 4;
goto LAB_0018cadf;
}
uVar4 = (ushort)uVar1 & 0xff;
uVar1 = (uint)(byte)(uVar4 % 10);
param_1[1] = (byte)(uVar4 / 10) | 0x30;
}
pbVar5 = (byte *)(param_1 + 2);
bVar2 = (byte)uVar1;
lStack_10 = 3;
LAB_0018cadf:
*pbVar5 = bVar2 | 0x30;
return param_1 + lStack_10;
}
| |
30,513 | ma_check_if_zero | eloqsql/storage/maria/ma_locking.c | my_bool _ma_check_if_zero(uchar *pos, size_t length)
{
uchar *end;
for (end= pos+ length; pos != end ; pos++)
if (pos[0] != 0)
return 1;
return 0;
} | O0 | c | ma_check_if_zero:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x43344
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
je 0x43334
movb $0x1, -0x1(%rbp)
jmp 0x43348
jmp 0x43336
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x43318
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax)
| _ma_check_if_zero:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_20], rax
loc_43318:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_20]
jz short loc_43344
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 0
jz short loc_43334
mov [rbp+var_1], 1
jmp short loc_43348
loc_43334:
jmp short $+2
loc_43336:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_43318
loc_43344:
mov [rbp+var_1], 0
loc_43348:
mov al, [rbp+var_1]
pop rbp
retn
| char ma_check_if_zero(_BYTE *a1, long long a2)
{
_BYTE *i; // [rsp+10h] [rbp-10h]
for ( i = a1; i != &a1[a2]; ++i )
{
if ( *i )
return 1;
}
return 0;
}
| _ma_check_if_zero:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
LAB_00143318:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x00143344
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x00143334
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00143348
LAB_00143334:
JMP 0x00143336
LAB_00143336:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00143318
LAB_00143344:
MOV byte ptr [RBP + -0x1],0x0
LAB_00143348:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int1 _ma_check_if_zero(char *param_1,long param_2)
{
char *local_18;
local_18 = param_1;
while( true ) {
if (local_18 == param_1 + param_2) {
return 0;
}
if (*local_18 != '\0') break;
local_18 = local_18 + 1;
}
return 1;
}
| |
30,514 | Cache::Cache(MemoryManager*, Cache::Policy, Cache*) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | Cache::Cache(MemoryManager *manager, Policy policy, Cache *lowerCache) {
this->referenceCounter = 0;
this->memory = manager;
this->policy = policy;
this->lowerCache = lowerCache;
if (!this->isPolicyValid()) {
fprintf(stderr, "Policy invalid!\n");
exit(-1);
}
this->initCache();
this->statistics.numRead = 0;
this->statistics.numWrite = 0;
this->statistics.numHit = 0;
this->statistics.numMiss = 0;
this->statistics.totalCycles = 0;
} | O0 | cpp | Cache::Cache(MemoryManager*, Cache::Policy, Cache*):
subq $0x48, %rsp
leaq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5680
movq 0x18(%rsp), %rdi
leaq 0x7a88(%rip), %rax # 0xbd20
movq %rax, (%rdi)
addq $0x50, %rdi
movq %rdi, 0x8(%rsp)
callq 0x56a0
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdi
movl $0x0, 0x20(%rdi)
movq 0x38(%rsp), %rcx
movq %rcx, 0x28(%rdi)
movq 0x10(%rax), %rcx
movq %rcx, 0x48(%rdi)
movups (%rax), %xmm0
movups %xmm0, 0x38(%rdi)
movq 0x30(%rsp), %rax
movq %rax, 0x30(%rdi)
callq 0x4380
movb %al, 0x23(%rsp)
jmp 0x42e6
movb 0x23(%rsp), %al
testb $0x1, %al
jne 0x4336
jmp 0x42f0
movq 0x7cd1(%rip), %rax # 0xbfc8
movq (%rax), %rdi
leaq 0x3f67(%rip), %rsi # 0x8268
movb $0x0, %al
callq 0x2260
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x21e0
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
callq 0x56b0
movq 0x18(%rsp), %rdi
callq 0x5b30
jmp 0x4370
movq 0x18(%rsp), %rdi
callq 0x44a0
jmp 0x4342
movq 0x18(%rsp), %rax
movl $0x0, 0x8(%rax)
movl $0x0, 0xc(%rax)
movl $0x0, 0x10(%rax)
movl $0x0, 0x14(%rax)
movq $0x0, 0x18(%rax)
addq $0x48, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x22f0
nopw (%rax,%rax)
| _ZN5CacheC2EP13MemoryManagerNS_6PolicyEPS_:
sub rsp, 48h; Alternative name is 'Cache::Cache(MemoryManager *, Cache::Policy, Cache*)'
lea rax, [rsp+48h+arg_0]
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_18], rdx
mov rdi, [rsp+48h+var_8]; this
mov [rsp+48h+var_30], rdi
call _ZN12ICacheAccessC2Ev; ICacheAccess::ICacheAccess(void)
mov rdi, [rsp+48h+var_30]
lea rax, off_BD20
mov [rdi], rax
add rdi, 50h ; 'P'
mov [rsp+48h+var_40], rdi
call _ZNSt6vectorIN5Cache5BlockESaIS1_EEC2Ev; std::vector<Cache::Block>::vector(void)
mov rax, [rsp+48h+var_38]
mov rdi, [rsp+48h+var_30]; this
mov dword ptr [rdi+20h], 0
mov rcx, [rsp+48h+var_10]
mov [rdi+28h], rcx
mov rcx, [rax+10h]
mov [rdi+48h], rcx
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rdi+38h], xmm0
mov rax, [rsp+48h+var_18]
mov [rdi+30h], rax
call _ZN5Cache13isPolicyValidEv; Cache::isPolicyValid(void)
mov [rsp+48h+var_25], al
jmp short $+2
loc_42E6:
mov al, [rsp+48h+var_25]
test al, 1
jnz short loc_4336
jmp short $+2
loc_42F0:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aPolicyInvalid; "Policy invalid!\n"
mov al, 0
call _fprintf
mov edi, 0FFFFFFFFh
call _exit
mov rdi, [rsp+48h+var_40]
mov rcx, rax
mov eax, edx
mov [rsp+48h+var_20], rcx
mov [rsp+48h+var_24], eax
call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector()
mov rdi, [rsp+48h+var_30]; this
call _ZN12ICacheAccessD2Ev; ICacheAccess::~ICacheAccess()
jmp short loc_4370
loc_4336:
mov rdi, [rsp+48h+var_30]; this
call _ZN5Cache9initCacheEv; Cache::initCache(void)
jmp short $+2
loc_4342:
mov rax, [rsp+48h+var_30]
mov dword ptr [rax+8], 0
mov dword ptr [rax+0Ch], 0
mov dword ptr [rax+10h], 0
mov dword ptr [rax+14h], 0
mov qword ptr [rax+18h], 0
add rsp, 48h
retn
loc_4370:
mov rdi, [rsp+48h+var_20]
call __Unwind_Resume
| long long Cache::Cache(
long long a1,
long long a2,
long long a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
__int128 a7,
long long a8)
{
long long result; // rax
ICacheAccess::ICacheAccess((ICacheAccess *)a1);
*(_QWORD *)a1 = &off_BD20;
std::vector<Cache::Block>::vector();
*(_DWORD *)(a1 + 32) = 0;
*(_QWORD *)(a1 + 40) = a2;
*(_QWORD *)(a1 + 72) = a8;
*(_OWORD *)(a1 + 56) = a7;
*(_QWORD *)(a1 + 48) = a3;
if ( (Cache::isPolicyValid((Cache *)a1) & 1) == 0 )
{
fprintf(stderr, "Policy invalid!\n");
exit(0xFFFFFFFFLL);
}
Cache::initCache((Cache *)a1);
result = a1;
*(_DWORD *)(a1 + 8) = 0;
*(_DWORD *)(a1 + 12) = 0;
*(_DWORD *)(a1 + 16) = 0;
*(_DWORD *)(a1 + 20) = 0;
*(_QWORD *)(a1 + 24) = 0LL;
return result;
}
| Cache:
SUB RSP,0x48
LEA RAX,[RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00105680
MOV RDI,qword ptr [RSP + 0x18]
LEA RAX,[0x10bd20]
MOV qword ptr [RDI],RAX
ADD RDI,0x50
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001056a0
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x18]
MOV dword ptr [RDI + 0x20],0x0
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RDI + 0x28],RCX
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RDI + 0x48],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RDI + 0x38],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RDI + 0x30],RAX
LAB_001042db:
CALL 0x00104380
MOV byte ptr [RSP + 0x23],AL
JMP 0x001042e6
LAB_001042e6:
MOV AL,byte ptr [RSP + 0x23]
TEST AL,0x1
JNZ 0x00104336
JMP 0x001042f0
LAB_001042f0:
MOV RAX,qword ptr [0x0010bfc8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x108268]
MOV AL,0x0
CALL 0x00102260
MOV EDI,0xffffffff
CALL 0x001021e0
LAB_00104336:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001044a0
LAB_00104340:
JMP 0x00104342
LAB_00104342:
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0xc],0x0
MOV dword ptr [RAX + 0x10],0x0
MOV dword ptr [RAX + 0x14],0x0
MOV qword ptr [RAX + 0x18],0x0
ADD RSP,0x48
RET
|
/* Cache::Cache(MemoryManager*, Cache::Policy, Cache*) */
void __thiscall Cache::Cache(Cache *this,int8 param_1,int8 param_3)
{
byte bVar1;
int8 in_stack_00000008;
int8 in_stack_00000010;
int8 in_stack_00000018;
ICacheAccess::ICacheAccess((ICacheAccess *)this);
*(int ***)this = &PTR_read_0010bd20;
std::vector<Cache::Block,std::allocator<Cache::Block>>::vector
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50));
*(int4 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = param_1;
*(int8 *)(this + 0x48) = in_stack_00000018;
*(int8 *)(this + 0x38) = in_stack_00000008;
*(int8 *)(this + 0x40) = in_stack_00000010;
*(int8 *)(this + 0x30) = param_3;
/* try { // try from 001042db to 0010433f has its CatchHandler @ 00104312 */
bVar1 = isPolicyValid(this);
if ((bVar1 & 1) == 0) {
fprintf(*(FILE **)PTR_stderr_0010bfc8,"Policy invalid!\n");
/* WARNING: Subroutine does not return */
exit(-1);
}
initCache(this);
*(int4 *)(this + 8) = 0;
*(int4 *)(this + 0xc) = 0;
*(int4 *)(this + 0x10) = 0;
*(int4 *)(this + 0x14) = 0;
*(int8 *)(this + 0x18) = 0;
return;
}
| |
30,515 | Cache::Cache(MemoryManager*, Cache::Policy, Cache*) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | Cache::Cache(MemoryManager *manager, Policy policy, Cache *lowerCache) {
this->referenceCounter = 0;
this->memory = manager;
this->policy = policy;
this->lowerCache = lowerCache;
if (!this->isPolicyValid()) {
fprintf(stderr, "Policy invalid!\n");
exit(-1);
}
this->initCache();
this->statistics.numRead = 0;
this->statistics.numWrite = 0;
this->statistics.numHit = 0;
this->statistics.numMiss = 0;
this->statistics.totalCycles = 0;
} | O1 | cpp | Cache::Cache(MemoryManager*, Cache::Policy, Cache*):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x46be(%rip), %rax # 0x7d50
movq %rax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movq $0x0, 0x60(%rdi)
movl $0x0, 0x20(%rdi)
movq %rsi, 0x28(%rdi)
movaps 0x20(%rsp), %xmm0
movups %xmm0, 0x38(%rdi)
movq 0x30(%rsp), %rax
movq %rax, 0x48(%rdi)
movq %rdx, 0x30(%rdi)
callq 0x370a
testb %al, %al
je 0x36f1
leaq 0x50(%rbx), %r14
movq %rbx, %rdi
callq 0x379e
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x23dd
movq %rax, %rbx
movq %r14, %rdi
callq 0x42ca
movq %rbx, %rdi
callq 0x22d0
nop
| _ZN5CacheC2EP13MemoryManagerNS_6PolicyEPS_:
push r14; Alternative name is 'Cache::Cache(MemoryManager *, Cache::Policy, Cache*)'
push rbx
push rax
mov rbx, rdi
lea rax, off_7D50
mov [rdi], rax
xorps xmm0, xmm0
movups xmmword ptr [rdi+50h], xmm0
mov qword ptr [rdi+60h], 0
mov dword ptr [rdi+20h], 0
mov [rdi+28h], rsi
movaps xmm0, [rsp+18h+arg_0]
movups xmmword ptr [rdi+38h], xmm0
mov rax, [rsp+18h+arg_10]
mov [rdi+48h], rax
mov [rdi+30h], rdx
call _ZN5Cache13isPolicyValidEv; Cache::isPolicyValid(void)
test al, al
jz short loc_36F1
lea r14, [rbx+50h]
mov rdi, rbx; this
call _ZN5Cache9initCacheEv; Cache::initCache(void)
xorps xmm0, xmm0
movups xmmword ptr [rbx+8], xmm0
mov qword ptr [rbx+18h], 0
add rsp, 8
pop rbx
pop r14
retn
loc_36F1:
call _ZN5CacheC2EP13MemoryManagerNS_6PolicyEPS__cold_1; Cache::Cache(MemoryManager *,Cache::Policy,Cache*) [clone]
mov rbx, rax
mov rdi, r14
call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector()
mov rdi, rbx
call __Unwind_Resume
| void Cache::Cache(
Cache *this,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__int128 a7,
long long a8)
{
*(_QWORD *)this = &off_7D50;
*((_OWORD *)this + 5) = 0LL;
*((_QWORD *)this + 12) = 0LL;
*((_DWORD *)this + 8) = 0;
*((_QWORD *)this + 5) = a2;
*(_OWORD *)((char *)this + 56) = a7;
*((_QWORD *)this + 9) = a8;
*((_QWORD *)this + 6) = a3;
if ( !(unsigned __int8)Cache::isPolicyValid(this) )
Cache::Cache(this);
Cache::initCache(this);
*(_OWORD *)((char *)this + 8) = 0LL;
*((_QWORD *)this + 3) = 0LL;
}
| Cache:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0x107d50]
MOV qword ptr [RDI],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOV qword ptr [RDI + 0x60],0x0
MOV dword ptr [RDI + 0x20],0x0
MOV qword ptr [RDI + 0x28],RSI
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RDI + 0x38],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RDI + 0x48],RAX
MOV qword ptr [RDI + 0x30],RDX
CALL 0x0010370a
TEST AL,AL
JZ 0x001036f1
LAB_001036ce:
LEA R14,[RBX + 0x50]
MOV RDI,RBX
CALL 0x0010379e
LAB_001036da:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x8],XMM0
MOV qword ptr [RBX + 0x18],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001036f1:
CALL 0x001023dd
LAB_001036f6:
MOV RBX,RAX
MOV RDI,R14
CALL 0x001042ca
MOV RDI,RBX
CALL 0x001022d0
|
/* Cache::Cache(MemoryManager*, Cache::Policy, Cache*) */
void __thiscall Cache::Cache(Cache *this,int8 param_1,int8 param_3)
{
char cVar1;
int8 uVar2;
vector<Cache::Block,std::allocator<Cache::Block>> *unaff_R14;
int8 in_stack_00000008;
int8 in_stack_00000010;
int8 in_stack_00000018;
*(int ***)this = &PTR_read_00107d50;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(int4 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = param_1;
*(int8 *)(this + 0x38) = in_stack_00000008;
*(int8 *)(this + 0x40) = in_stack_00000010;
*(int8 *)(this + 0x48) = in_stack_00000018;
*(int8 *)(this + 0x30) = param_3;
cVar1 = isPolicyValid(this);
if (cVar1 != '\0') {
/* try { // try from 001036ce to 001036d9 has its CatchHandler @ 001036f6 */
initCache(this);
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
return;
}
uVar2 = Cache();
/* catch() { ... } // from try @ 001036ce with catch @ 001036f6 */
std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector(unaff_R14);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar2);
}
| |
30,516 | Cache::Cache(MemoryManager*, Cache::Policy, Cache*) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | Cache::Cache(MemoryManager *manager, Policy policy, Cache *lowerCache) {
this->referenceCounter = 0;
this->memory = manager;
this->policy = policy;
this->lowerCache = lowerCache;
if (!this->isPolicyValid()) {
fprintf(stderr, "Policy invalid!\n");
exit(-1);
}
this->initCache();
this->statistics.numRead = 0;
this->statistics.numWrite = 0;
this->statistics.numHit = 0;
this->statistics.numMiss = 0;
this->statistics.totalCycles = 0;
} | O3 | cpp | Cache::Cache(MemoryManager*, Cache::Policy, Cache*):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x46fe(%rip), %rax # 0x7d50
movq %rax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movq $0x0, 0x60(%rdi)
movl $0x0, 0x20(%rdi)
movq %rsi, 0x28(%rdi)
movaps 0x20(%rsp), %xmm0
movups %xmm0, 0x38(%rdi)
movq 0x30(%rsp), %rax
movq %rax, 0x48(%rdi)
movq %rdx, 0x30(%rdi)
callq 0x36ca
testb %al, %al
je 0x36b1
leaq 0x50(%rbx), %r14
movq %rbx, %rdi
callq 0x375e
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x23dd
movq %rax, %rbx
movq %r14, %rdi
callq 0x416e
movq %rbx, %rdi
callq 0x22d0
nop
| _ZN5CacheC2EP13MemoryManagerNS_6PolicyEPS_:
push r14; Alternative name is 'Cache::Cache(MemoryManager *, Cache::Policy, Cache*)'
push rbx
push rax
mov rbx, rdi
lea rax, off_7D50
mov [rdi], rax
xorps xmm0, xmm0
movups xmmword ptr [rdi+50h], xmm0
mov qword ptr [rdi+60h], 0
mov dword ptr [rdi+20h], 0
mov [rdi+28h], rsi
movaps xmm0, [rsp+18h+arg_0]
movups xmmword ptr [rdi+38h], xmm0
mov rax, [rsp+18h+arg_10]
mov [rdi+48h], rax
mov [rdi+30h], rdx
call _ZN5Cache13isPolicyValidEv; Cache::isPolicyValid(void)
test al, al
jz short loc_36B1
lea r14, [rbx+50h]
mov rdi, rbx; this
call _ZN5Cache9initCacheEv; Cache::initCache(void)
xorps xmm0, xmm0
movups xmmword ptr [rbx+8], xmm0
mov qword ptr [rbx+18h], 0
add rsp, 8
pop rbx
pop r14
retn
loc_36B1:
call _ZN5CacheC2EP13MemoryManagerNS_6PolicyEPS__cold_1; Cache::Cache(MemoryManager *,Cache::Policy,Cache*) [clone]
mov rbx, rax
mov rdi, r14
call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector()
mov rdi, rbx
call __Unwind_Resume
| void Cache::Cache(
Cache *this,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__int128 a7,
long long a8)
{
*(_QWORD *)this = &off_7D50;
*((_OWORD *)this + 5) = 0LL;
*((_QWORD *)this + 12) = 0LL;
*((_DWORD *)this + 8) = 0;
*((_QWORD *)this + 5) = a2;
*(_OWORD *)((char *)this + 56) = a7;
*((_QWORD *)this + 9) = a8;
*((_QWORD *)this + 6) = a3;
if ( !(unsigned __int8)Cache::isPolicyValid(this) )
Cache::Cache(this);
Cache::initCache(this);
*(_OWORD *)((char *)this + 8) = 0LL;
*((_QWORD *)this + 3) = 0LL;
}
| Cache:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0x107d50]
MOV qword ptr [RDI],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOV qword ptr [RDI + 0x60],0x0
MOV dword ptr [RDI + 0x20],0x0
MOV qword ptr [RDI + 0x28],RSI
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RDI + 0x38],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RDI + 0x48],RAX
MOV qword ptr [RDI + 0x30],RDX
CALL 0x001036ca
TEST AL,AL
JZ 0x001036b1
LAB_0010368e:
LEA R14,[RBX + 0x50]
MOV RDI,RBX
CALL 0x0010375e
LAB_0010369a:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x8],XMM0
MOV qword ptr [RBX + 0x18],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001036b1:
CALL 0x001023dd
LAB_001036b6:
MOV RBX,RAX
MOV RDI,R14
CALL 0x0010416e
MOV RDI,RBX
CALL 0x001022d0
|
/* Cache::Cache(MemoryManager*, Cache::Policy, Cache*) */
void __thiscall Cache::Cache(Cache *this,int8 param_1,int8 param_3)
{
char cVar1;
int8 uVar2;
vector<Cache::Block,std::allocator<Cache::Block>> *unaff_R14;
int8 in_stack_00000008;
int8 in_stack_00000010;
int8 in_stack_00000018;
*(int ***)this = &PTR_read_00107d50;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(int4 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = param_1;
*(int8 *)(this + 0x38) = in_stack_00000008;
*(int8 *)(this + 0x40) = in_stack_00000010;
*(int8 *)(this + 0x48) = in_stack_00000018;
*(int8 *)(this + 0x30) = param_3;
cVar1 = isPolicyValid(this);
if (cVar1 != '\0') {
/* try { // try from 0010368e to 00103699 has its CatchHandler @ 001036b6 */
initCache(this);
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
return;
}
uVar2 = Cache();
/* catch() { ... } // from try @ 0010368e with catch @ 001036b6 */
std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector(unaff_R14);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar2);
}
| |
30,517 | minja::chat_template::try_raw_render(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> const&, bool, 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&) const | llama.cpp/common/minja/chat-template.hpp | std::string try_raw_render(
const nlohmann::ordered_json & messages,
const nlohmann::ordered_json & tools,
bool add_generation_prompt,
const nlohmann::ordered_json & extra_context = nlohmann::ordered_json()) const
{
try {
chat_template_inputs inputs;
inputs.messages = messages;
inputs.tools = tools;
inputs.add_generation_prompt = add_generation_prompt;
inputs.extra_context = extra_context;
// Use fixed date for tests
inputs.now = std::chrono::system_clock::from_time_t(0);
chat_template_options opts;
opts.apply_polyfills = false;
auto prompt = apply(inputs, opts);
// fprintf(stderr, "try_raw_render: %s\n", prompt.c_str());
return prompt;
} catch (const std::exception & e) {
// fprintf(stderr, "try_raw_render error: %s\n", e.what());
return "";
}
} | O3 | cpp | minja::chat_template::try_raw_render(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> const&, bool, 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&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
xorl %r13d, %r13d
leaq 0x48(%rsp), %r14
movb %r13b, (%r14)
movq %r13, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x886ee
movq %r14, %rdi
movl $0x1, %esi
callq 0x886ee
leaq 0x58(%rsp), %r14
movb %r13b, (%r14)
movq %r13, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x886ee
movq %r14, %rdi
movl $0x1, %esi
callq 0x886ee
movb $0x1, 0x10(%r14)
leaq 0x70(%rsp), %r12
movb %r13b, (%r12)
movq %r13, 0x8(%r12)
movq %r12, %rdi
movl $0x1, %esi
callq 0x886ee
movq %r12, %rdi
movl $0x1, %esi
callq 0x886ee
callq 0x21d70
movq %rax, 0x10(%r12)
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x8c93c
leaq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %r15
movq %r15, %rsi
callq 0x8a85a
movq %r15, %rdi
xorl %esi, %esi
callq 0x886ee
movq %r15, %rdi
callq 0x8ce08
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x8c93c
leaq 0x28(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8a85a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x886ee
movq %rbx, %rdi
callq 0x8ce08
movb %bpl, 0x68(%rsp)
leaq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x8c93c
leaq 0x18(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8a85a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x886ee
movq %rbx, %rdi
callq 0x8ce08
leaq 0x48(%rsp), %rdx
movq $0x0, 0x38(%rdx)
movabsq $0x101010101010101, %rax # imm = 0x101010101010101
leaq 0x8d(%rsp), %rcx
movq %rax, 0x1(%rcx)
movw $0x101, 0x9(%rcx) # imm = 0x101
movb $0x0, (%rcx)
movq (%rsp), %r15
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0xb5b6a
movq %r12, %rdi
xorl %esi, %esi
callq 0x886ee
movq %r12, %rdi
callq 0x8ce08
movq %r14, %rdi
xorl %esi, %esi
callq 0x886ee
movq %r14, %rdi
callq 0x8ce08
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x886ee
movq %rbx, %rdi
callq 0x8ce08
movq %r15, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xdd871
movq %rdx, %r14
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xb86ba
cmpl $0x1, %r14d
jne 0xdd8bc
movq %rbx, %rdi
callq 0x210c0
movq (%rsp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
leaq 0x45200(%rip), %rdx # 0x122aa1
movq %rdx, %rsi
callq 0x2c720
callq 0x21ed0
movq (%rsp), %r15
jmp 0xdd85a
movq %rax, %rbx
callq 0x21ed0
movq %rbx, %rdi
callq 0x21c10
movq %rax, %rdi
callq 0x2a927
| _ZNK5minja13chat_template14try_raw_renderERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov [rsp+0C8h+var_B8], r9
mov ebp, r8d
mov rbx, rcx
mov r15, rdx
mov [rsp+0C8h+var_C0], rsi
mov [rsp+0C8h+var_C8], rdi
xor r13d, r13d
lea r14, [rsp+0C8h+var_80]
mov [r14], r13b
mov [r14+8], r13
mov rdi, r14
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)
mov rdi, r14
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)
lea r14, [rsp+0C8h+var_70]
mov [r14], r13b
mov [r14+8], r13
mov rdi, r14
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)
mov rdi, r14
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)
mov byte ptr [r14+10h], 1
lea r12, [rsp+0C8h+var_58]
mov [r12], r13b
mov [r12+8], r13
mov rdi, r12
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)
mov rdi, r12; this
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)
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov [r12+10h], rax
lea rdi, [rsp+0C8h+var_90]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&)
lea rdi, [rsp+0C8h+var_80]
lea r15, [rsp+0C8h+var_90]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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>::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>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0C8h+var_A0]
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&)
lea rbx, [rsp+0C8h+var_A0]
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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>::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>)
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov [rsp+0C8h+var_60], bpl
lea rdi, [rsp+0C8h+var_B0]
mov rsi, [rsp+0C8h+var_B8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&)
lea rbx, [rsp+0C8h+var_B0]
mov rdi, r12
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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>::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>)
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdx, [rsp+0C8h+var_80]
mov qword ptr [rdx+38h], 0
mov rax, 101010101010101h
lea rcx, [rsp+0C8h+var_3B]
mov [rcx+1], rax
mov word ptr [rcx+9], 101h
mov byte ptr [rcx], 0
mov r15, [rsp+0C8h+var_C8]
mov rdi, r15
mov rsi, [rsp+0C8h+var_C0]
call _ZNK5minja13chat_template5applyB5cxx11ERKNS_20chat_template_inputsERKNS_21chat_template_optionsE; minja::chat_template::apply(minja::chat_template_inputs const&,minja::chat_template_options const&)
mov rdi, r12
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rbx, [rsp+0C8h+var_80]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_DD85A:
mov rax, r15
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_DD871:
mov r14, rdx
mov rbx, rax
lea rdi, [rsp+0C8h+var_80]; this
call _ZN5minja20chat_template_inputsD2Ev; minja::chat_template_inputs::~chat_template_inputs()
cmp r14d, 1
jnz short loc_DD8BC
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rdi, [rsp+0C8h+var_C8]
lea rax, [rdi+10h]
mov [rdi], rax
lea rdx, aExampleToolCal+1Dh; ""
mov rsi, rdx
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)
call ___cxa_end_catch
mov r15, [rsp+0C8h+var_C8]
jmp short loc_DD85A
mov rbx, rax
call ___cxa_end_catch
loc_DD8BC:
mov rdi, rbx
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long minja::chat_template::try_raw_render(
long long a1,
long long a2,
unsigned __int8 *a3,
unsigned __int8 *a4,
char a5,
unsigned __int8 *a6)
{
unsigned __int8 v11[16]; // [rsp+18h] [rbp-B0h] BYREF
unsigned __int8 v12[16]; // [rsp+28h] [rbp-A0h] BYREF
unsigned __int8 v13[16]; // [rsp+38h] [rbp-90h] BYREF
char v14[8]; // [rsp+48h] [rbp-80h] BYREF
long long v15; // [rsp+50h] [rbp-78h]
char v16[8]; // [rsp+58h] [rbp-70h] BYREF
long long v17; // [rsp+60h] [rbp-68h]
char v18; // [rsp+68h] [rbp-60h]
char v19[8]; // [rsp+70h] [rbp-58h] BYREF
long long v20; // [rsp+78h] [rbp-50h]
long long v21; // [rsp+80h] [rbp-48h]
char v22; // [rsp+8Dh] [rbp-3Bh] BYREF
long long v23; // [rsp+8Eh] [rbp-3Ah]
__int16 v24; // [rsp+96h] [rbp-32h]
v14[0] = 0;
v15 = 0LL;
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(v14);
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(v14);
v16[0] = 0;
v17 = 0LL;
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(v16);
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(v16);
v18 = 1;
v19[0] = 0;
v20 = 0LL;
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(v19);
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(v19);
v21 = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v19);
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>::basic_json(
v13,
a3);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
(long long)v14,
(long long)v13);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v13);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v13);
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>::basic_json(
v12,
a4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
(long long)v16,
(long long)v12);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v12);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v12);
v18 = a5;
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>::basic_json(
v11,
a6);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
(long long)v19,
(long long)v11);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v11);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v11);
v21 = 0LL;
v23 = 0x101010101010101LL;
v24 = 257;
v22 = 0;
minja::chat_template::apply[abi:cxx11](a1, a2, (long long)v14, (long long)&v22);
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(v19);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19);
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(v16);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v16);
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(v14);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v14);
return a1;
}
| try_raw_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RSP + 0x10],R9
MOV EBP,R8D
MOV RBX,RCX
MOV R15,RDX
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP],RDI
XOR R13D,R13D
LEA R14,[RSP + 0x48]
MOV byte ptr [R14],R13B
MOV qword ptr [R14 + 0x8],R13
MOV RDI,R14
MOV ESI,0x1
CALL 0x001886ee
MOV RDI,R14
MOV ESI,0x1
CALL 0x001886ee
LEA R14,[RSP + 0x58]
MOV byte ptr [R14],R13B
MOV qword ptr [R14 + 0x8],R13
MOV RDI,R14
MOV ESI,0x1
CALL 0x001886ee
MOV RDI,R14
MOV ESI,0x1
CALL 0x001886ee
MOV byte ptr [R14 + 0x10],0x1
LEA R12,[RSP + 0x70]
MOV byte ptr [R12],R13B
MOV qword ptr [R12 + 0x8],R13
MOV RDI,R12
MOV ESI,0x1
CALL 0x001886ee
MOV RDI,R12
MOV ESI,0x1
CALL 0x001886ee
CALL 0x00121d70
MOV qword ptr [R12 + 0x10],RAX
LAB_001dd74c:
LEA RDI,[RSP + 0x38]
MOV RSI,R15
CALL 0x0018c93c
LEA RDI,[RSP + 0x48]
LEA R15,[RSP + 0x38]
MOV RSI,R15
CALL 0x0018a85a
MOV RDI,R15
XOR ESI,ESI
CALL 0x001886ee
MOV RDI,R15
CALL 0x0018ce08
LEA RDI,[RSP + 0x28]
MOV RSI,RBX
CALL 0x0018c93c
LEA RBX,[RSP + 0x28]
MOV RDI,R14
MOV RSI,RBX
CALL 0x0018a85a
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001886ee
MOV RDI,RBX
CALL 0x0018ce08
MOV byte ptr [RSP + 0x68],BPL
LEA RDI,[RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0018c93c
LEA RBX,[RSP + 0x18]
MOV RDI,R12
MOV RSI,RBX
CALL 0x0018a85a
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001886ee
MOV RDI,RBX
CALL 0x0018ce08
LEA RDX,[RSP + 0x48]
MOV qword ptr [RDX + 0x38],0x0
MOV RAX,0x101010101010101
LEA RCX,[RSP + 0x8d]
MOV qword ptr [RCX + 0x1],RAX
MOV word ptr [RCX + 0x9],0x101
MOV byte ptr [RCX],0x0
LAB_001dd80e:
MOV R15,qword ptr [RSP]
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001b5b6a
LAB_001dd81f:
MOV RDI,R12
XOR ESI,ESI
CALL 0x001886ee
MOV RDI,R12
CALL 0x0018ce08
MOV RDI,R14
XOR ESI,ESI
CALL 0x001886ee
MOV RDI,R14
CALL 0x0018ce08
LEA RBX,[RSP + 0x48]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001886ee
MOV RDI,RBX
CALL 0x0018ce08
LAB_001dd85a:
MOV RAX,R15
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::chat_template::try_raw_render(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> const&, bool,
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&) const */
basic_json *
minja::chat_template::try_raw_render
(basic_json *param_1,basic_json *param_2,bool param_3,basic_json *param_4)
{
int7 in_register_00000011;
bool bVar1;
bool bVar2;
basic_json *in_R9;
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>
local_b0 [16];
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>
local_a0 [16];
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>
local_90 [16];
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>
local_80 [8];
int8 local_78;
data local_70 [8];
int8 local_68;
int1 local_60;
data local_58 [8];
int8 local_50;
int8 local_48;
int1 local_3b;
int8 local_3a;
int2 local_32;
local_80[0] = (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>
)0x0;
local_78 = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_80,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_80,0));
local_70[0] = (data)0x0;
local_68 = 0;
bVar1 = SUB81(local_70,0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar1);
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(bVar1);
local_60 = 1;
local_58[0] = (data)0x0;
local_50 = 0;
bVar2 = SUB81(local_58,0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar2);
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(bVar2);
local_48 = std::chrono::_V2::system_clock::now();
/* try { // try from 001dd74c to 001dd7bf has its CatchHandler @ 001dd871 */
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(local_90,(basic_json *)CONCAT71(in_register_00000011,param_3));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(local_80,(data *)local_90);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_90,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_90);
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(local_a0,param_4);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)local_70,(data *)local_a0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_a0,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_a0);
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(local_b0,in_R9);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)local_58,(data *)local_b0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_b0,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_b0);
local_48 = 0;
local_3a = 0x101010101010101;
local_32 = 0x101;
local_3b = 0;
/* try { // try from 001dd80e to 001dd81e has its CatchHandler @ 001dd86f */
apply_abi_cxx11_((chat_template_inputs *)param_1,(chat_template_options *)param_2);
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(bVar2);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_58);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar1);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_70);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_80,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_80);
return param_1;
}
| |
30,518 | testing::internal::ForkingDeathTest::ForkingDeathTest(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>) | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest-death-test.cc | ForkingDeathTest::ForkingDeathTest(const char* a_statement,
Matcher<const std::string&> matcher)
: DeathTestImpl(a_statement, std::move(matcher)), child_pid_(-1) {} | O1 | cpp | testing::internal::ForkingDeathTest::ForkingDeathTest(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x460e2(%rip), %r15 # 0x59990
movq %r15, (%rsp)
movq 0x8(%rdx), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rdx), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x8(%rdx)
leaq 0x45e45(%rip), %r12 # 0x59718
movq %r12, (%rsp)
callq 0x122a0
leaq 0x45875(%rip), %rax # 0x59158
movq %rax, (%rbx)
movq %r14, 0x8(%rbx)
movq %r15, 0x10(%rbx)
movq %rsp, %rdi
movq 0x8(%rdi), %rax
movq %rax, 0x18(%rbx)
movq 0x10(%rdi), %rax
movq %rax, 0x20(%rbx)
movq $0x0, 0x8(%rdi)
movq %r12, 0x10(%rbx)
movb $0x0, 0x28(%rbx)
movaps 0x2e7c8(%rip), %xmm0 # 0x420e0
movups %xmm0, 0x2c(%rbx)
callq 0x351ca
leaq 0x45478(%rip), %rax # 0x58da0
movq %rax, (%rbx)
movl $0xffffffff, 0x3c(%rbx) # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x351ca
movq %rbx, %rdi
callq 0x99a0
nop
| _ZN7testing8internal16ForkingDeathTestC2EPKcNS_7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
lea r15, off_59990
mov [rsp+38h+var_38], r15
mov rax, [rdx+8]
mov [rsp+38h+var_30], rax
mov rax, [rdx+10h]
mov [rsp+38h+var_28], rax
mov qword ptr [rdx+8], 0
lea r12, off_59718
mov [rsp+38h+var_38], r12
call _ZN7testing8internal9DeathTestC2Ev; testing::internal::DeathTest::DeathTest(void)
lea rax, off_59158
mov [rbx], rax
mov [rbx+8], r14
mov [rbx+10h], r15
mov rdi, rsp
mov rax, [rdi+8]
mov [rbx+18h], rax
mov rax, [rdi+10h]
mov [rbx+20h], rax
mov qword ptr [rdi+8], 0
mov [rbx+10h], r12
mov byte ptr [rbx+28h], 0
movaps xmm0, cs:xmmword_420E0
movups xmmword ptr [rbx+2Ch], xmm0
call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase()
lea rax, off_58DA0
mov [rbx], rax
mov dword ptr [rbx+3Ch], 0FFFFFFFFh
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp
call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase()
mov rdi, rbx
call __Unwind_Resume
| void ( ** testing::internal::ForkingDeathTest::ForkingDeathTest(
long long a1,
long long a2,
long long a3))(testing::internal::DeathTestImpl *__hidden this)
{
void ( **result)(testing::internal::DeathTestImpl *__hidden); // rax
long long ( **v4)(); // [rsp+0h] [rbp-38h] BYREF
long long v5; // [rsp+8h] [rbp-30h]
long long v6; // [rsp+10h] [rbp-28h]
v4 = &off_59990;
v5 = *(_QWORD *)(a3 + 8);
v6 = *(_QWORD *)(a3 + 16);
*(_QWORD *)(a3 + 8) = 0LL;
v4 = &off_59718;
testing::internal::DeathTest::DeathTest((testing::internal::DeathTest *)a1);
*(_QWORD *)a1 = &off_59158;
*(_QWORD *)(a1 + 8) = a2;
*(_QWORD *)(a1 + 16) = &off_59990;
*(_QWORD *)(a1 + 24) = v5;
*(_QWORD *)(a1 + 32) = v6;
v5 = 0LL;
*(_QWORD *)(a1 + 16) = &off_59718;
*(_BYTE *)(a1 + 40) = 0;
*(_OWORD *)(a1 + 44) = xmmword_420E0;
testing::internal::MatcherBase<std::string const&>::~MatcherBase(&v4);
result = &off_58DA0;
*(_QWORD *)a1 = &off_58DA0;
*(_DWORD *)(a1 + 60) = -1;
return result;
}
| ForkingDeathTest:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
LEA R15,[0x159990]
MOV qword ptr [RSP],R15
MOV RAX,qword ptr [RDX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RDX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RDX + 0x8],0x0
LEA R12,[0x159718]
MOV qword ptr [RSP],R12
LAB_001138d7:
CALL 0x001122a0
LAB_001138dc:
LEA RAX,[0x159158]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],R14
MOV qword ptr [RBX + 0x10],R15
MOV RDI,RSP
MOV RAX,qword ptr [RDI + 0x8]
MOV qword ptr [RBX + 0x18],RAX
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RBX + 0x10],R12
MOV byte ptr [RBX + 0x28],0x0
MOVAPS XMM0,xmmword ptr [0x001420e0]
MOVUPS xmmword ptr [RBX + 0x2c],XMM0
CALL 0x001351ca
LEA RAX,[0x158da0]
MOV qword ptr [RBX],RAX
MOV dword ptr [RBX + 0x3c],0xffffffff
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* testing::internal::ForkingDeathTest::ForkingDeathTest(char const*,
testing::Matcher<std::__cxx11::string const&>) */
void __thiscall
testing::internal::ForkingDeathTest::ForkingDeathTest
(ForkingDeathTest *this,int8 param_1,long param_3)
{
int8 uVar1;
int **local_38;
int8 local_30;
int8 local_28;
local_30 = *(int8 *)(param_3 + 8);
local_28 = *(int8 *)(param_3 + 0x10);
*(int8 *)(param_3 + 8) = 0;
local_38 = &PTR__MatcherBase_00159718;
/* try { // try from 001138d7 to 001138db has its CatchHandler @ 0011393e */
DeathTest::DeathTest((DeathTest *)this);
*(int ***)this = &PTR__DeathTestImpl_00159158;
*(int8 *)(this + 8) = param_1;
*(int ***)(this + 0x10) = &PTR__MatcherBase_00159990;
*(int8 *)(this + 0x18) = local_30;
*(int8 *)(this + 0x20) = local_28;
local_30 = 0;
*(int ***)(this + 0x10) = &PTR__MatcherBase_00159718;
this[0x28] = (ForkingDeathTest)0x0;
uVar1 = _UNK_001420e8;
*(int8 *)(this + 0x2c) = _DAT_001420e0;
*(int8 *)(this + 0x34) = uVar1;
MatcherBase<std::__cxx11::string_const&>::~MatcherBase
((MatcherBase<std::__cxx11::string_const&> *)&local_38);
*(int ***)this = &PTR__DeathTestImpl_00158da0;
*(int4 *)(this + 0x3c) = 0xffffffff;
return;
}
| |
30,519 | js_get_length64 | bluesky950520[P]quickjs/quickjs.c | static __exception int js_get_length64(JSContext *ctx, int64_t *pres,
JSValue obj)
{
JSValue len_val;
len_val = JS_GetProperty(ctx, obj, JS_ATOM_length);
if (JS_IsException(len_val)) {
*pres = 0;
return -1;
}
return JS_ToLengthFree(ctx, pres, len_val);
} | O0 | c | js_get_length64:
subq $0x48, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movl $0x32, %ecx
callq 0x30070
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x342c7
movq 0x20(%rsp), %rax
movq $0x0, (%rax)
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x342e4
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq 0x84540
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
| js_get_length64:
sub rsp, 48h
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_10], rcx
mov [rsp+48h+var_20], rdi
mov [rsp+48h+var_28], rsi
mov rdi, [rsp+48h+var_20]
mov rsi, [rsp+48h+var_18]
mov rdx, [rsp+48h+var_10]
mov ecx, 32h ; '2'
call JS_GetProperty
mov [rsp+48h+var_48], rax
mov [rsp+48h+var_40], rdx
mov rax, [rsp+48h+var_48]
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_30], rax
mov rdi, [rsp+48h+var_38]
mov rsi, [rsp+48h+var_30]
call JS_IsException_1
cmp eax, 0
jz short loc_342C7
mov rax, [rsp+48h+var_28]
mov qword ptr [rax], 0
mov [rsp+48h+var_4], 0FFFFFFFFh
jmp short loc_342E4
loc_342C7:
mov rdi, [rsp+48h+var_20]
mov rsi, [rsp+48h+var_28]
mov rdx, [rsp+48h+var_38]
mov rcx, [rsp+48h+var_30]
call JS_ToLengthFree
mov [rsp+48h+var_4], eax
loc_342E4:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
| long long js_get_length64(long long a1, _QWORD *a2, int a3, int a4)
{
long long v4; // rdx
long long Property; // [rsp+0h] [rbp-48h]
long long v7; // [rsp+18h] [rbp-30h]
Property = JS_GetProperty(a1, a3, a4, 50);
v7 = v4;
if ( JS_IsException_1(Property, v4) )
{
*a2 = 0LL;
return (unsigned int)-1;
}
else
{
return (unsigned int)JS_ToLengthFree(a1, a2, Property, v7);
}
}
| js_get_length64:
SUB RSP,0x48
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV ECX,0x32
CALL 0x00130070
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x001342c7
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX],0x0
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x001342e4
LAB_001342c7:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
CALL 0x00184540
MOV dword ptr [RSP + 0x44],EAX
LAB_001342e4:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
int4
js_get_length64(int8 param_1,int8 *param_2,int8 param_3,int8 param_4)
{
int iVar1;
int1 auVar2 [16];
int4 local_4;
auVar2 = JS_GetProperty(param_1,param_3,param_4,0x32);
iVar1 = JS_IsException(auVar2._0_8_,auVar2._8_8_);
if (iVar1 == 0) {
local_4 = JS_ToLengthFree(param_1,param_2,auVar2._0_8_,auVar2._8_8_);
}
else {
*param_2 = 0;
local_4 = 0xffffffff;
}
return local_4;
}
| |
30,520 | decrement_share_in_trans | eloqsql/storage/maria/maria_def.h | static inline void decrement_share_in_trans(MARIA_SHARE *share)
{
/* Internal tables doesn't have transactions */
DBUG_ASSERT(!share->internal_table);
if (!--share->in_trans)
free_maria_share(share);
else
mysql_mutex_unlock(&share->intern_lock);
} | O0 | c | decrement_share_in_trans:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x4a0ee
movq -0x8(%rbp), %rcx
movl 0x7ac(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x7ac(%rcx)
cmpl $0x0, %eax
jne 0x4a111
movq -0x8(%rbp), %rdi
callq 0x71fc0
jmp 0x4a121
movq -0x8(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x497b0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| decrement_share_in_trans:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_4A0EE:
mov rcx, [rbp+var_8]
mov eax, [rcx+7ACh]
add eax, 0FFFFFFFFh
mov [rcx+7ACh], eax
cmp eax, 0
jnz short loc_4A111
mov rdi, [rbp+var_8]
call free_maria_share
jmp short loc_4A121
loc_4A111:
mov rdi, [rbp+var_8]
add rdi, 8F0h
call inline_mysql_mutex_unlock_6
loc_4A121:
add rsp, 10h
pop rbp
retn
| long long decrement_share_in_trans(long long a1)
{
int v1; // eax
v1 = *(_DWORD *)(a1 + 1964) - 1;
*(_DWORD *)(a1 + 1964) = v1;
if ( v1 )
return inline_mysql_mutex_unlock_6(a1 + 2288);
else
return free_maria_share(a1);
}
| decrement_share_in_trans:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0014a0ee
LAB_0014a0ee:
MOV RCX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RCX + 0x7ac]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x7ac],EAX
CMP EAX,0x0
JNZ 0x0014a111
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00171fc0
JMP 0x0014a121
LAB_0014a111:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8f0
CALL 0x001497b0
LAB_0014a121:
ADD RSP,0x10
POP RBP
RET
|
void decrement_share_in_trans(long param_1)
{
int iVar1;
iVar1 = *(int *)(param_1 + 0x7ac) + -1;
*(int *)(param_1 + 0x7ac) = iVar1;
if (iVar1 == 0) {
free_maria_share(param_1);
}
else {
inline_mysql_mutex_unlock(param_1 + 0x8f0);
}
return;
}
| |
30,521 | js_string_compare | bluesky950520[P]quickjs/quickjs.c | static int js_string_compare(const JSString *p1, const JSString *p2)
{
int res, len;
len = min_int(p1->len, p2->len);
res = js_string_memcmp(p1, p2, len);
if (res == 0)
res = compare_u32(p1->len, p2->len);
return res;
} | O0 | c | js_string_compare:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %edi
movq 0x8(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %esi
callq 0x50d00
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl (%rsp), %edx
callq 0x5d200
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
jne 0x71b80
movq 0x10(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %edi
movq 0x8(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %esi
callq 0x71da0
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
| js_string_compare:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_8]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov edi, eax
mov rax, [rsp+18h+var_10]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov esi, eax
call min_int_0
mov [rsp+18h+var_18], eax
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
mov edx, [rsp+18h+var_18]
call js_string_memcmp
mov [rsp+18h+var_14], eax
cmp [rsp+18h+var_14], 0
jnz short loc_71B80
mov rax, [rsp+18h+var_8]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov edi, eax
mov rax, [rsp+18h+var_10]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov esi, eax
call compare_u32
mov [rsp+18h+var_14], eax
loc_71B80:
mov eax, [rsp+18h+var_14]
add rsp, 18h
retn
| long long js_string_compare(long long a1, long long a2)
{
unsigned int v3; // [rsp+0h] [rbp-18h]
unsigned int v4; // [rsp+4h] [rbp-14h]
v3 = min_int_0(*(_DWORD *)(a1 + 4) & 0x7FFFFFFF, *(_DWORD *)(a2 + 4) & 0x7FFFFFFF);
v4 = js_string_memcmp(a1, a2, v3);
if ( !v4 )
return (unsigned int)compare_u32(*(_QWORD *)(a1 + 4) & 0x7FFFFFFFLL, *(_DWORD *)(a2 + 4) & 0x7FFFFFFF);
return v4;
}
| js_string_compare:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EDI,EAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV ESI,EAX
CALL 0x00150d00
MOV dword ptr [RSP],EAX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
MOV EDX,dword ptr [RSP]
CALL 0x0015d200
MOV dword ptr [RSP + 0x4],EAX
CMP dword ptr [RSP + 0x4],0x0
JNZ 0x00171b80
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EDI,EAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV ESI,EAX
CALL 0x00171da0
MOV dword ptr [RSP + 0x4],EAX
LAB_00171b80:
MOV EAX,dword ptr [RSP + 0x4]
ADD RSP,0x18
RET
|
int js_string_compare(long param_1,long param_2)
{
int4 uVar1;
int4 local_14;
uVar1 = min_int((uint)*(int8 *)(param_1 + 4) & 0x7fffffff,
(uint)*(int8 *)(param_2 + 4) & 0x7fffffff);
local_14 = js_string_memcmp(param_1,param_2,uVar1);
if (local_14 == 0) {
local_14 = compare_u32((uint)*(int8 *)(param_1 + 4) & 0x7fffffff,
(uint)*(int8 *)(param_2 + 4) & 0x7fffffff);
}
return local_14;
}
| |
30,522 | js_string_compare | bluesky950520[P]quickjs/quickjs.c | static int js_string_compare(const JSString *p1, const JSString *p2)
{
int res, len;
len = min_int(p1->len, p2->len);
res = js_string_memcmp(p1, p2, len);
if (res == 0)
res = compare_u32(p1->len, p2->len);
return res;
} | O1 | c | js_string_compare:
pushq %rbp
pushq %rbx
pushq %rax
movl $0x7fffffff, %ebx # imm = 0x7FFFFFFF
movl 0x4(%rdi), %ebp
andl %ebx, %ebp
andl 0x4(%rsi), %ebx
cmpl %ebx, %ebp
movl %ebx, %edx
cmovll %ebp, %edx
callq 0x3bb93
testl %eax, %eax
jne 0x42f0b
xorl %eax, %eax
cmpl %ebp, %ebx
setb %al
cmpl %ebx, %ebp
sbbl $0x0, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| js_string_compare:
push rbp
push rbx
push rax
mov ebx, 7FFFFFFFh
mov ebp, [rdi+4]
and ebp, ebx
and ebx, [rsi+4]
cmp ebp, ebx
mov edx, ebx
cmovl edx, ebp
call js_string_memcmp
test eax, eax
jnz short loc_42F0B
xor eax, eax
cmp ebx, ebp
setb al
cmp ebp, ebx
sbb eax, 0
loc_42F0B:
add rsp, 8
pop rbx
pop rbp
retn
| unsigned long long js_string_compare(long long a1, long long a2)
{
int v2; // ebp
unsigned int v3; // ebx
int v4; // edx
unsigned long long result; // rax
v2 = *(_DWORD *)(a1 + 4) & 0x7FFFFFFF;
v3 = *(_DWORD *)(a2 + 4) & 0x7FFFFFFF;
v4 = v3;
if ( v2 < (int)v3 )
v4 = *(_DWORD *)(a1 + 4) & 0x7FFFFFFF;
result = js_string_memcmp(a1, a2, v4);
if ( !(_DWORD)result )
return (__PAIR64__(v3 < v2, v2) - v3) >> 32;
return result;
}
| js_string_compare:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBX,0x7fffffff
MOV EBP,dword ptr [RDI + 0x4]
AND EBP,EBX
AND EBX,dword ptr [RSI + 0x4]
CMP EBP,EBX
MOV EDX,EBX
CMOVL EDX,EBP
CALL 0x0013bb93
TEST EAX,EAX
JNZ 0x00142f0b
XOR EAX,EAX
CMP EBX,EBP
SETC AL
CMP EBP,EBX
SBB EAX,0x0
LAB_00142f0b:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
ulong js_string_compare(long param_1,long param_2)
{
uint uVar1;
ulong uVar2;
uint uVar3;
uint uVar4;
uVar4 = *(uint *)(param_1 + 4) & 0x7fffffff;
uVar3 = *(uint *)(param_2 + 4) & 0x7fffffff;
uVar1 = uVar3;
if (uVar4 < uVar3) {
uVar1 = uVar4;
}
uVar2 = js_string_memcmp(param_1,param_2,uVar1);
if ((int)uVar2 == 0) {
uVar2 = (ulong)((uint)(uVar3 < uVar4) - (uint)(uVar4 < uVar3));
}
return uVar2;
}
| |
30,523 | Cost_estimate::add(Cost_estimate const*) | eloqsql/sql/handler.h | void add(const Cost_estimate* cost)
{
if (cost->io_count != 0.0)
{
double io_count_sum= io_count + cost->io_count;
avg_io_cost= (io_count * avg_io_cost +
cost->io_count * cost->avg_io_cost)
/io_count_sum;
io_count= io_count_sum;
}
if (cost->idx_io_count != 0.0)
{
double idx_io_count_sum= idx_io_count + cost->idx_io_count;
idx_avg_io_cost= (idx_io_count * idx_avg_io_cost +
cost->idx_io_count * cost->idx_avg_io_cost)
/idx_io_count_sum;
idx_io_count= idx_io_count_sum;
}
cpu_cost += cost->cpu_cost;
idx_cpu_cost += cost->idx_cpu_cost;
import_cost += cost->import_cost;
} | O0 | c | Cost_estimate::add(Cost_estimate const*):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x76e979
jp 0x76e979
jmp 0x76e9c3
movq -0x28(%rbp), %rax
movsd (%rax), %xmm0
movq -0x10(%rbp), %rcx
addsd (%rcx), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm2
movq -0x10(%rbp), %rcx
movsd (%rcx), %xmm1
movq -0x10(%rbp), %rcx
mulsd 0x8(%rcx), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x8(%rax)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rax
movsd 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x76e9d9
jp 0x76e9d9
jmp 0x76ea28
movq -0x28(%rbp), %rax
movsd 0x10(%rax), %xmm0
movq -0x10(%rbp), %rcx
addsd 0x10(%rcx), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0x10(%rax), %xmm0
movsd 0x18(%rax), %xmm2
movq -0x10(%rbp), %rcx
movsd 0x10(%rcx), %xmm1
movq -0x10(%rbp), %rcx
mulsd 0x18(%rcx), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd -0x20(%rbp), %xmm0
movsd %xmm0, 0x18(%rax)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0x10(%rax)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movsd 0x20(%rcx), %xmm0
addsd 0x20(%rax), %xmm0
movsd %xmm0, 0x20(%rax)
movq -0x10(%rbp), %rcx
movsd 0x28(%rcx), %xmm0
addsd 0x28(%rax), %xmm0
movsd %xmm0, 0x28(%rax)
movq -0x10(%rbp), %rcx
movsd 0x30(%rcx), %xmm0
addsd 0x30(%rax), %xmm0
movsd %xmm0, 0x30(%rax)
popq %rbp
retq
nopw (%rax,%rax)
| _ZN13Cost_estimate3addEPKS_:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_76E979
jp short loc_76E979
jmp short loc_76E9C3
loc_76E979:
mov rax, [rbp+var_28]
movsd xmm0, qword ptr [rax]
mov rcx, [rbp+var_10]
addsd xmm0, qword ptr [rcx]
movsd [rbp+var_18], xmm0
movsd xmm0, qword ptr [rax]
movsd xmm2, qword ptr [rax+8]
mov rcx, [rbp+var_10]
movsd xmm1, qword ptr [rcx]
mov rcx, [rbp+var_10]
mulsd xmm1, qword ptr [rcx+8]
mulsd xmm0, xmm2
addsd xmm0, xmm1
divsd xmm0, [rbp+var_18]
movsd qword ptr [rax+8], xmm0
movsd xmm0, [rbp+var_18]
movsd qword ptr [rax], xmm0
loc_76E9C3:
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax+10h]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_76E9D9
jp short loc_76E9D9
jmp short loc_76EA28
loc_76E9D9:
mov rax, [rbp+var_28]
movsd xmm0, qword ptr [rax+10h]
mov rcx, [rbp+var_10]
addsd xmm0, qword ptr [rcx+10h]
movsd [rbp+var_20], xmm0
movsd xmm0, qword ptr [rax+10h]
movsd xmm2, qword ptr [rax+18h]
mov rcx, [rbp+var_10]
movsd xmm1, qword ptr [rcx+10h]
mov rcx, [rbp+var_10]
mulsd xmm1, qword ptr [rcx+18h]
mulsd xmm0, xmm2
addsd xmm0, xmm1
divsd xmm0, [rbp+var_20]
movsd qword ptr [rax+18h], xmm0
movsd xmm0, [rbp+var_20]
movsd qword ptr [rax+10h], xmm0
loc_76EA28:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_10]
movsd xmm0, qword ptr [rcx+20h]
addsd xmm0, qword ptr [rax+20h]
movsd qword ptr [rax+20h], xmm0
mov rcx, [rbp+var_10]
movsd xmm0, qword ptr [rcx+28h]
addsd xmm0, qword ptr [rax+28h]
movsd qword ptr [rax+28h], xmm0
mov rcx, [rbp+var_10]
movsd xmm0, qword ptr [rcx+30h]
addsd xmm0, qword ptr [rax+30h]
movsd qword ptr [rax+30h], xmm0
pop rbp
retn
| Cost_estimate * Cost_estimate::add(Cost_estimate *this, const Cost_estimate *a2)
{
Cost_estimate *result; // rax
double v3; // [rsp+8h] [rbp-20h]
double v4; // [rsp+10h] [rbp-18h]
if ( *(double *)a2 != 0.0 )
{
v4 = *(double *)this + *(double *)a2;
*((double *)this + 1) = (*(double *)this * *((double *)this + 1) + *(double *)a2 * *((double *)a2 + 1)) / v4;
*(double *)this = v4;
}
if ( *((double *)a2 + 2) != 0.0 )
{
v3 = *((double *)this + 2) + *((double *)a2 + 2);
*((double *)this + 3) = (*((double *)this + 2) * *((double *)this + 3) + *((double *)a2 + 2) * *((double *)a2 + 3))
/ v3;
*((double *)this + 2) = v3;
}
result = this;
*((double *)this + 4) = *((double *)a2 + 4) + *((double *)this + 4);
*((double *)this + 5) = *((double *)a2 + 5) + *((double *)this + 5);
*((double *)this + 6) = *((double *)a2 + 6) + *((double *)this + 6);
return result;
}
| ~Warnings_only_error_handler:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x0076dca0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x10
CALL 0x00533290
ADD RSP,0x10
POP RBP
RET
|
/* Warnings_only_error_handler::~Warnings_only_error_handler() */
void __thiscall
Warnings_only_error_handler::~Warnings_only_error_handler(Warnings_only_error_handler *this)
{
~Warnings_only_error_handler(this);
::operator_delete(this,0x10);
return;
}
| |
30,524 | ma_find_half_pos | eloqsql/storage/maria/ma_write.c | uchar *_ma_find_half_pos(MARIA_KEY *key, MARIA_PAGE *ma_page,
uchar **after_key)
{
uint keys, length, key_ref_length, page_flag, nod_flag;
uchar *page, *end, *lastpos;
MARIA_HA *info= ma_page->info;
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo= key->keyinfo;
DBUG_ENTER("_ma_find_half_pos");
nod_flag= ma_page->node;
key_ref_length= share->keypage_header + nod_flag;
page_flag= ma_page->flag;
length= ma_page->size - key_ref_length;
page= ma_page->buff+ key_ref_length; /* Point to first key */
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
HA_BINARY_PACK_KEY)) && !(page_flag & KEYPAGE_FLAG_HAS_TRANSID))
{
key_ref_length= keyinfo->keylength+nod_flag;
key->data_length= keyinfo->keylength - info->s->rec_reflength;
key->ref_length= info->s->rec_reflength;
key->flag= 0;
keys=length/(key_ref_length*2);
end=page+keys*key_ref_length;
*after_key=end+key_ref_length;
memcpy(key->data, end, key_ref_length);
DBUG_RETURN(end);
}
end=page+length/2-key_ref_length; /* This is aprox. half */
key->data[0]= 0; /* Safety */
do
{
lastpos=page;
if (!(length= (*keyinfo->get_key)(key, page_flag, nod_flag, &page)))
DBUG_RETURN(0);
} while (page < end);
*after_key= page;
DBUG_PRINT("exit",("returns: %p page: %p half: %p",
lastpos, page, end));
DBUG_RETURN(lastpos);
} | O0 | c | ma_find_half_pos:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x60(%rbp), %rax
movl 0x744(%rax), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
subl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x2c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x68(%rbp), %rax
movzwl 0xa2(%rax), %eax
andl $0x2e, %eax
cmpl $0x0, %eax
jne 0x85764
movl -0x30(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x85764
movq -0x68(%rbp), %rax
movzwl 0xaa(%rax), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x68(%rbp), %rax
movzwl 0xaa(%rax), %ecx
movq -0x58(%rbp), %rax
movq (%rax), %rax
subl 0x740(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq (%rax), %rax
movl 0x740(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movl -0x28(%rbp), %eax
movl -0x2c(%rbp), %ecx
shll %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x24(%rbp)
movq -0x40(%rbp), %rax
movl -0x24(%rbp), %ecx
imull -0x2c(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rcx
movl -0x2c(%rbp), %eax
addq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x48(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x857e7
movq -0x40(%rbp), %rax
movl -0x28(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
addq %rcx, %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb $0x0, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x68(%rbp), %rax
movq 0xe0(%rax), %rax
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %esi
movl -0x34(%rbp), %edx
leaq -0x40(%rbp), %rcx
callq *%rax
movl %eax, -0x28(%rbp)
cmpl $0x0, %eax
jne 0x857c4
jmp 0x857ba
movq $0x0, -0x8(%rbp)
jmp 0x857e7
jmp 0x857c6
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0x8578d
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x857dd
jmp 0x857df
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_find_half_pos:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov rax, [rax]
mov [rbp+var_60], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_68], rax
mov rax, [rbp+var_18]
mov eax, [rax+28h]
mov [rbp+var_34], eax
mov rax, [rbp+var_60]
mov eax, [rax+744h]
add eax, [rbp+var_34]
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
mov eax, [rax+2Ch]
mov [rbp+var_30], eax
mov rax, [rbp+var_18]
mov eax, [rax+20h]
sub eax, [rbp+var_2C]
mov [rbp+var_28], eax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov ecx, [rbp+var_2C]
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_68]
movzx eax, word ptr [rax+0A2h]
and eax, 2Eh
cmp eax, 0
jnz loc_85764
mov eax, [rbp+var_30]
and eax, 2
cmp eax, 0
jnz loc_85764
mov rax, [rbp+var_68]
movzx eax, word ptr [rax+0AAh]
add eax, [rbp+var_34]
mov [rbp+var_2C], eax
mov rax, [rbp+var_68]
movzx ecx, word ptr [rax+0AAh]
mov rax, [rbp+var_58]
mov rax, [rax]
sub ecx, [rax+740h]
mov rax, [rbp+var_10]
mov [rax+10h], ecx
mov rax, [rbp+var_58]
mov rax, [rax]
mov ecx, [rax+740h]
mov rax, [rbp+var_10]
mov [rax+14h], ecx
mov rax, [rbp+var_10]
mov dword ptr [rax+18h], 0
mov eax, [rbp+var_28]
mov ecx, [rbp+var_2C]
shl ecx, 1
xor edx, edx
div ecx
mov [rbp+var_24], eax
mov rax, [rbp+var_40]
mov ecx, [rbp+var_24]
imul ecx, [rbp+var_2C]
mov ecx, ecx
add rax, rcx
mov [rbp+var_48], rax
mov rcx, [rbp+var_48]
mov eax, [rbp+var_2C]
add rcx, rax
mov rax, [rbp+var_20]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rsi, [rbp+var_48]
mov eax, [rbp+var_2C]
mov edx, eax
call _memcpy
mov rax, [rbp+var_48]
mov [rbp+var_8], rax
jmp loc_857E7
loc_85764:
mov rax, [rbp+var_40]
mov ecx, [rbp+var_28]
shr ecx, 1
mov ecx, ecx
add rax, rcx
mov ecx, [rbp+var_2C]
mov edx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov byte ptr [rax], 0
loc_8578D:
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
mov rax, [rbp+var_68]
mov rax, [rax+0E0h]
mov rdi, [rbp+var_10]
mov esi, [rbp+var_30]
mov edx, [rbp+var_34]
lea rcx, [rbp+var_40]
call rax
mov [rbp+var_28], eax
cmp eax, 0
jnz short loc_857C4
jmp short $+2
loc_857BA:
mov [rbp+var_8], 0
jmp short loc_857E7
loc_857C4:
jmp short $+2
loc_857C6:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_48]
jb short loc_8578D
mov rcx, [rbp+var_40]
mov rax, [rbp+var_20]
mov [rax], rcx
jmp short $+2
loc_857DD:
jmp short $+2
loc_857DF:
mov rax, [rbp+var_50]
mov [rbp+var_8], rax
loc_857E7:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| unsigned long long ma_find_half_pos(long long a1, long long **a2, unsigned long long *a3)
{
long long v4; // [rsp+8h] [rbp-68h]
long long v5; // [rsp+10h] [rbp-60h]
long long *v6; // [rsp+18h] [rbp-58h]
unsigned long long v7; // [rsp+20h] [rbp-50h]
unsigned long long v8; // [rsp+28h] [rbp-48h]
unsigned long long v9; // [rsp+28h] [rbp-48h]
unsigned long long v10; // [rsp+30h] [rbp-40h] BYREF
unsigned int v11; // [rsp+3Ch] [rbp-34h]
unsigned int v12; // [rsp+40h] [rbp-30h]
unsigned int v13; // [rsp+44h] [rbp-2Ch]
unsigned int v14; // [rsp+48h] [rbp-28h]
unsigned int v15; // [rsp+4Ch] [rbp-24h]
unsigned long long *v16; // [rsp+50h] [rbp-20h]
long long **v17; // [rsp+58h] [rbp-18h]
long long v18; // [rsp+60h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
v6 = *a2;
v5 = **a2;
v4 = *(_QWORD *)(a1 + 8);
v11 = *((_DWORD *)a2 + 10);
v13 = v11 + *(_DWORD *)(v5 + 1860);
v12 = *((_DWORD *)a2 + 11);
v14 = *((_DWORD *)a2 + 8) - v13;
v10 = (unsigned long long)a2[2] + v13;
if ( (*(_WORD *)(v4 + 162) & 0x2E) != 0 || (v12 & 2) != 0 )
{
v9 = (v14 >> 1) + v10 - v13;
**(_BYTE **)v18 = 0;
do
{
v7 = v10;
v14 = (*(long long ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v4 + 224))(v18, v12, v11, &v10);
if ( !v14 )
return 0LL;
}
while ( v10 < v9 );
*v16 = v10;
return v7;
}
else
{
v13 = v11 + *(unsigned __int16 *)(v4 + 170);
*(_DWORD *)(v18 + 16) = *(unsigned __int16 *)(v4 + 170) - *(_DWORD *)(*v6 + 1856);
*(_DWORD *)(v18 + 20) = *(_DWORD *)(*v6 + 1856);
*(_DWORD *)(v18 + 24) = 0;
v15 = v14 / (2 * v13);
v8 = v13 * v15 + v10;
*v16 = v13 + v8;
memcpy(*(_QWORD *)v18, v8, v13);
return v8;
}
}
| _ma_find_half_pos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RAX + 0x744]
ADD EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x2c]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x20]
SUB EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [RBP + -0x2c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOVZX EAX,word ptr [RAX + 0xa2]
AND EAX,0x2e
CMP EAX,0x0
JNZ 0x00185764
MOV EAX,dword ptr [RBP + -0x30]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x00185764
MOV RAX,qword ptr [RBP + -0x68]
MOVZX EAX,word ptr [RAX + 0xaa]
ADD EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x68]
MOVZX ECX,word ptr [RAX + 0xaa]
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX]
SUB ECX,dword ptr [RAX + 0x740]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x740]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],0x0
MOV EAX,dword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x2c]
SHL ECX,0x1
XOR EDX,EDX
DIV ECX
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x24]
IMUL ECX,dword ptr [RBP + -0x2c]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RCX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RBP + -0x2c]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RBP + -0x2c]
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001857e7
LAB_00185764:
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x28]
SHR ECX,0x1
MOV ECX,ECX
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x2c]
MOV EDX,ECX
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV byte ptr [RAX],0x0
LAB_0018578d:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0xe0]
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x30]
MOV EDX,dword ptr [RBP + -0x34]
LEA RCX,[RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x28],EAX
CMP EAX,0x0
JNZ 0x001857c4
JMP 0x001857ba
LAB_001857ba:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001857e7
LAB_001857c4:
JMP 0x001857c6
LAB_001857c6:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x0018578d
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
JMP 0x001857dd
LAB_001857dd:
JMP 0x001857df
LAB_001857df:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x8],RAX
LAB_001857e7:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
void * _ma_find_half_pos(int8 *param_1,int8 *param_2,long *param_3)
{
long *plVar1;
long lVar2;
void *pvVar3;
void *pvVar4;
void *local_48;
int local_3c;
uint local_38;
uint local_34;
uint local_30;
uint local_2c;
long *local_28;
int8 *local_20;
int8 *local_18;
void *local_10;
plVar1 = (long *)*param_2;
lVar2 = param_1[1];
local_3c = *(int *)(param_2 + 5);
local_34 = *(int *)(*plVar1 + 0x744) + local_3c;
local_38 = *(uint *)((long)param_2 + 0x2c);
local_30 = *(int *)(param_2 + 4) - local_34;
local_48 = (void *)(param_2[2] + (ulong)local_34);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if (((*(ushort *)(lVar2 + 0xa2) & 0x2e) == 0) && ((local_38 & 2) == 0)) {
local_34 = (uint)*(ushort *)(lVar2 + 0xaa) + local_3c;
*(uint *)(param_1 + 2) = (uint)*(ushort *)(lVar2 + 0xaa) - *(int *)(*plVar1 + 0x740);
*(int4 *)((long)param_1 + 0x14) = *(int4 *)(*plVar1 + 0x740);
*(int4 *)(param_1 + 3) = 0;
local_2c = local_30 / (local_34 * 2);
pvVar4 = (void *)((long)local_48 + (ulong)(local_2c * local_34));
*param_3 = (long)pvVar4 + (ulong)local_34;
memcpy((void *)*param_1,pvVar4,(ulong)local_34);
local_10 = pvVar4;
}
else {
pvVar4 = (void *)((long)local_48 + ((ulong)(local_30 >> 1) - (ulong)local_34));
*(int1 *)*param_1 = 0;
do {
pvVar3 = local_48;
local_30 = (**(code **)(lVar2 + 0xe0))(local_18,local_38,local_3c,&local_48);
if (local_30 == 0) {
return (void *)0x0;
}
} while (local_48 < pvVar4);
*local_28 = (long)local_48;
local_10 = pvVar3;
}
return local_10;
}
| |
30,525 | ma_find_half_pos | eloqsql/storage/maria/ma_write.c | uchar *_ma_find_half_pos(MARIA_KEY *key, MARIA_PAGE *ma_page,
uchar **after_key)
{
uint keys, length, key_ref_length, page_flag, nod_flag;
uchar *page, *end, *lastpos;
MARIA_HA *info= ma_page->info;
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo= key->keyinfo;
DBUG_ENTER("_ma_find_half_pos");
nod_flag= ma_page->node;
key_ref_length= share->keypage_header + nod_flag;
page_flag= ma_page->flag;
length= ma_page->size - key_ref_length;
page= ma_page->buff+ key_ref_length; /* Point to first key */
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
HA_BINARY_PACK_KEY)) && !(page_flag & KEYPAGE_FLAG_HAS_TRANSID))
{
key_ref_length= keyinfo->keylength+nod_flag;
key->data_length= keyinfo->keylength - info->s->rec_reflength;
key->ref_length= info->s->rec_reflength;
key->flag= 0;
keys=length/(key_ref_length*2);
end=page+keys*key_ref_length;
*after_key=end+key_ref_length;
memcpy(key->data, end, key_ref_length);
DBUG_RETURN(end);
}
end=page+length/2-key_ref_length; /* This is aprox. half */
key->data[0]= 0; /* Safety */
do
{
lastpos=page;
if (!(length= (*keyinfo->get_key)(key, page_flag, nod_flag, &page)))
DBUG_RETURN(0);
} while (page < end);
*after_key= page;
DBUG_PRINT("exit",("returns: %p page: %p half: %p",
lastpos, page, end));
DBUG_RETURN(lastpos);
} | O3 | c | ma_find_half_pos:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r8
movq (%rsi), %rbx
movq (%rbx), %rcx
movq 0x8(%rdi), %r11
movl 0x28(%rsi), %r10d
movl 0x744(%rcx), %edx
addl %r10d, %edx
movl 0x2c(%rsi), %r9d
movl 0x20(%rsi), %eax
subl %edx, %eax
movq 0x10(%rsi), %r14
addq %rdx, %r14
movq %r14, -0x38(%rbp)
testb $0x2e, 0xa2(%r11)
sete %sil
movl %r9d, -0x2c(%rbp)
testb $0x2, %r9b
sete %r9b
andb %sil, %r9b
cmpb $0x1, %r9b
jne 0x668e7
movzwl 0xaa(%r11), %edx
addl %edx, %r10d
subl 0x740(%rcx), %edx
movl %edx, 0x10(%rdi)
movq (%rbx), %rcx
movl 0x740(%rcx), %ecx
movl %ecx, 0x14(%rdi)
movl $0x0, 0x18(%rdi)
leal (%r10,%r10), %ecx
xorl %edx, %edx
divl %ecx
imull %r10d, %eax
addq %rax, %r14
leaq (%r14,%r10), %rax
movq %rax, (%r8)
movq (%rdi), %rdi
movq %r14, %rsi
movq %r10, %rdx
callq 0x29080
movq %r14, %r12
jmp 0x6693d
movq %r8, -0x40(%rbp)
shrl %eax
addq %r14, %rax
subq %rdx, %rax
movq %rax, -0x48(%rbp)
movq (%rdi), %rax
movb $0x0, (%rax)
movq %r14, %r12
movq %rdi, %r15
movl -0x2c(%rbp), %esi
movq %r10, %rbx
movl %r10d, %edx
leaq -0x38(%rbp), %rcx
movq %r11, %r13
callq *0xe0(%r11)
testl %eax, %eax
je 0x6693a
movq -0x38(%rbp), %r14
cmpq -0x48(%rbp), %r14
movq %r15, %rdi
movq %rbx, %r10
movq %r13, %r11
jb 0x668fd
movq -0x40(%rbp), %rax
movq %r14, (%rax)
jmp 0x6693d
xorl %r12d, %r12d
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_find_half_pos:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r8, rdx
mov rbx, [rsi]
mov rcx, [rbx]
mov r11, [rdi+8]
mov r10d, [rsi+28h]
mov edx, [rcx+744h]
add edx, r10d
mov r9d, [rsi+2Ch]
mov eax, [rsi+20h]
sub eax, edx
mov r14, [rsi+10h]
add r14, rdx
mov [rbp+var_38], r14
test byte ptr [r11+0A2h], 2Eh
setz sil
mov [rbp+var_2C], r9d
test r9b, 2
setz r9b
and r9b, sil
cmp r9b, 1
jnz short loc_668E7
movzx edx, word ptr [r11+0AAh]
add r10d, edx
sub edx, [rcx+740h]
mov [rdi+10h], edx
mov rcx, [rbx]
mov ecx, [rcx+740h]
mov [rdi+14h], ecx
mov dword ptr [rdi+18h], 0
lea ecx, [r10+r10]
xor edx, edx
div ecx
imul eax, r10d
add r14, rax
lea rax, [r14+r10]
mov [r8], rax
mov rdi, [rdi]
mov rsi, r14
mov rdx, r10
call _memcpy
mov r12, r14
jmp short loc_6693D
loc_668E7:
mov [rbp+var_40], r8
shr eax, 1
add rax, r14
sub rax, rdx
mov [rbp+var_48], rax
mov rax, [rdi]
mov byte ptr [rax], 0
loc_668FD:
mov r12, r14
mov r15, rdi
mov esi, [rbp+var_2C]
mov rbx, r10
mov edx, r10d
lea rcx, [rbp+var_38]
mov r13, r11
call qword ptr [r11+0E0h]
test eax, eax
jz short loc_6693A
mov r14, [rbp+var_38]
cmp r14, [rbp+var_48]
mov rdi, r15
mov r10, rbx
mov r11, r13
jb short loc_668FD
mov rax, [rbp+var_40]
mov [rax], r14
jmp short loc_6693D
loc_6693A:
xor r12d, r12d
loc_6693D:
mov rax, r12
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_find_half_pos(long long a1, long long **a2, unsigned long long *a3)
{
long long *v4; // rbx
long long v5; // rcx
long long v6; // r11
long long v7; // r10
long long v8; // rdx
unsigned int v9; // r9d
unsigned int v10; // eax
long long v11; // r14
bool v12; // si
int v13; // edx
long long v14; // r10
long long v15; // r14
long long v16; // r12
long long v17; // rbx
long long v18; // r13
unsigned long long v20; // [rsp+8h] [rbp-48h]
unsigned long long *v21; // [rsp+10h] [rbp-40h]
unsigned long long v22; // [rsp+18h] [rbp-38h] BYREF
unsigned int v23; // [rsp+24h] [rbp-2Ch]
v4 = *a2;
v5 = **a2;
v6 = *(_QWORD *)(a1 + 8);
v7 = *((unsigned int *)a2 + 10);
v8 = (unsigned int)(v7 + *(_DWORD *)(v5 + 1860));
v9 = *((_DWORD *)a2 + 11);
v10 = *((_DWORD *)a2 + 8) - v8;
v11 = (long long)a2[2] + v8;
v22 = v11;
v12 = (*(_BYTE *)(v6 + 162) & 0x2E) == 0;
v23 = v9;
if ( v12 && (v9 & 2) == 0 )
{
v13 = *(unsigned __int16 *)(v6 + 170);
v14 = (unsigned int)(v13 + v7);
*(_DWORD *)(a1 + 16) = v13 - *(_DWORD *)(v5 + 1856);
*(_DWORD *)(a1 + 20) = *(_DWORD *)(*v4 + 1856);
*(_DWORD *)(a1 + 24) = 0;
v15 = (unsigned int)v14 * (v10 / (2 * (int)v14)) + v11;
*a3 = v15 + v14;
memcpy(*(_QWORD *)a1, v15, v14);
return v15;
}
else
{
v21 = a3;
v20 = v11 + (v10 >> 1) - v8;
**(_BYTE **)a1 = 0;
while ( 1 )
{
v16 = v11;
v17 = v7;
v18 = v6;
if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v6 + 224))(
a1,
v23,
(unsigned int)v7,
&v22) )
break;
v11 = v22;
v7 = v17;
v6 = v18;
if ( v22 >= v20 )
{
*v21 = v22;
return v16;
}
}
return 0LL;
}
}
| _ma_find_half_pos:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R8,RDX
MOV RBX,qword ptr [RSI]
MOV RCX,qword ptr [RBX]
MOV R11,qword ptr [RDI + 0x8]
MOV R10D,dword ptr [RSI + 0x28]
MOV EDX,dword ptr [RCX + 0x744]
ADD EDX,R10D
MOV R9D,dword ptr [RSI + 0x2c]
MOV EAX,dword ptr [RSI + 0x20]
SUB EAX,EDX
MOV R14,qword ptr [RSI + 0x10]
ADD R14,RDX
MOV qword ptr [RBP + -0x38],R14
TEST byte ptr [R11 + 0xa2],0x2e
SETZ SIL
MOV dword ptr [RBP + -0x2c],R9D
TEST R9B,0x2
SETZ R9B
AND R9B,SIL
CMP R9B,0x1
JNZ 0x001668e7
MOVZX EDX,word ptr [R11 + 0xaa]
ADD R10D,EDX
SUB EDX,dword ptr [RCX + 0x740]
MOV dword ptr [RDI + 0x10],EDX
MOV RCX,qword ptr [RBX]
MOV ECX,dword ptr [RCX + 0x740]
MOV dword ptr [RDI + 0x14],ECX
MOV dword ptr [RDI + 0x18],0x0
LEA ECX,[R10 + R10*0x1]
XOR EDX,EDX
DIV ECX
IMUL EAX,R10D
ADD R14,RAX
LEA RAX,[R14 + R10*0x1]
MOV qword ptr [R8],RAX
MOV RDI,qword ptr [RDI]
MOV RSI,R14
MOV RDX,R10
CALL 0x00129080
MOV R12,R14
JMP 0x0016693d
LAB_001668e7:
MOV qword ptr [RBP + -0x40],R8
SHR EAX,0x1
ADD RAX,R14
SUB RAX,RDX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RDI]
MOV byte ptr [RAX],0x0
LAB_001668fd:
MOV R12,R14
MOV R15,RDI
MOV ESI,dword ptr [RBP + -0x2c]
MOV RBX,R10
MOV EDX,R10D
LEA RCX,[RBP + -0x38]
MOV R13,R11
CALL qword ptr [R11 + 0xe0]
TEST EAX,EAX
JZ 0x0016693a
MOV R14,qword ptr [RBP + -0x38]
CMP R14,qword ptr [RBP + -0x48]
MOV RDI,R15
MOV R10,RBX
MOV R11,R13
JC 0x001668fd
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],R14
JMP 0x0016693d
LAB_0016693a:
XOR R12D,R12D
LAB_0016693d:
MOV RAX,R12
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void * _ma_find_half_pos(int8 *param_1,int8 *param_2,long *param_3)
{
int iVar1;
long *plVar2;
long lVar3;
long lVar4;
int iVar5;
void *pvVar6;
uint uVar7;
uint uVar8;
void *__src;
void *local_40;
uint local_34;
plVar2 = (long *)*param_2;
lVar3 = *plVar2;
lVar4 = param_1[1];
iVar1 = *(int *)(param_2 + 5);
uVar7 = *(int *)(lVar3 + 0x744) + iVar1;
local_34 = *(uint *)((long)param_2 + 0x2c);
iVar5 = *(int *)(param_2 + 4);
local_40 = (void *)(param_2[2] + (ulong)uVar7);
if ((local_34 & 2) == 0 && (*(byte *)(lVar4 + 0xa2) & 0x2e) == 0) {
uVar8 = iVar1 + (uint)*(ushort *)(lVar4 + 0xaa);
*(uint *)(param_1 + 2) = (uint)*(ushort *)(lVar4 + 0xaa) - *(int *)(lVar3 + 0x740);
*(int4 *)((long)param_1 + 0x14) = *(int4 *)(*plVar2 + 0x740);
*(int4 *)(param_1 + 3) = 0;
__src = (void *)((long)local_40 + (ulong)(((iVar5 - uVar7) / (uVar8 * 2)) * uVar8));
*param_3 = (long)__src + (ulong)uVar8;
memcpy((void *)*param_1,__src,(ulong)uVar8);
}
else {
pvVar6 = (void *)((long)local_40 + ((ulong)(iVar5 - uVar7 >> 1) - (ulong)uVar7));
*(int1 *)*param_1 = 0;
do {
__src = local_40;
iVar5 = (**(code **)(lVar4 + 0xe0))(param_1,local_34,iVar1,&local_40);
if (iVar5 == 0) {
return (void *)0x0;
}
} while (local_40 < pvVar6);
*param_3 = (long)local_40;
}
return __src;
}
| |
30,526 | JS_IteratorGetCompleteValue | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_IteratorGetCompleteValue(JSContext *ctx, JSValue obj,
BOOL *pdone)
{
JSValue done_val, value;
BOOL done;
done_val = JS_GetProperty(ctx, obj, JS_ATOM_done);
if (JS_IsException(done_val))
goto fail;
done = JS_ToBoolFree(ctx, done_val);
value = JS_GetProperty(ctx, obj, JS_ATOM_value);
if (JS_IsException(value))
goto fail;
*pdone = done;
return value;
fail:
*pdone = FALSE;
return JS_EXCEPTION;
} | O0 | c | JS_IteratorGetCompleteValue:
subq $0x78, %rsp
movq %rsi, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq %rdi, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movl $0x6a, %ecx
callq 0x28ac0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x6e138
jmp 0x6e1bc
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x2d070
movl %eax, 0x24(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movl $0x41, %ecx
callq 0x28ac0
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x6e19b
jmp 0x6e1bc
movl 0x24(%rsp), %ecx
movq 0x48(%rsp), %rax
movl %ecx, (%rax)
movq 0x28(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x6e1d8
movq 0x48(%rsp), %rax
movl $0x0, (%rax)
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nopw (%rax,%rax)
| JS_IteratorGetCompleteValue:
sub rsp, 78h
mov [rsp+78h+var_20], rsi
mov [rsp+78h+var_18], rdx
mov [rsp+78h+var_28], rdi
mov [rsp+78h+var_30], rcx
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_20]
mov rdx, [rsp+78h+var_18]
mov ecx, 6Ah ; 'j'
call JS_GetProperty
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_60], rdx
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_40], rax
mov rax, [rsp+78h+var_60]
mov [rsp+78h+var_38], rax
mov rdi, [rsp+78h+var_40]
mov rsi, [rsp+78h+var_38]
call JS_IsException_1
cmp eax, 0
jz short loc_6E138
jmp loc_6E1BC
loc_6E138:
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_40]
mov rdx, [rsp+78h+var_38]
call JS_ToBoolFree
mov [rsp+78h+var_54], eax
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_20]
mov rdx, [rsp+78h+var_18]
mov ecx, 41h ; 'A'
call JS_GetProperty
mov [rsp+78h+var_78], rax
mov [rsp+78h+var_70], rdx
mov rax, [rsp+78h+var_78]
mov [rsp+78h+var_50], rax
mov rax, [rsp+78h+var_70]
mov [rsp+78h+var_48], rax
mov rdi, [rsp+78h+var_50]
mov rsi, [rsp+78h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_6E19B
jmp short loc_6E1BC
loc_6E19B:
mov ecx, [rsp+78h+var_54]
mov rax, [rsp+78h+var_30]
mov [rax], ecx
mov rax, [rsp+78h+var_50]
mov [rsp+78h+var_10], rax
mov rax, [rsp+78h+var_48]
mov [rsp+78h+var_8], rax
jmp short loc_6E1D8
loc_6E1BC:
mov rax, [rsp+78h+var_30]
mov dword ptr [rax], 0
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
loc_6E1D8:
mov rax, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
add rsp, 78h
retn
| long long JS_IteratorGetCompleteValue(long long a1, int a2, int a3, _DWORD *a4)
{
long long v4; // rdx
int v5; // edx
long long v7; // [rsp+0h] [rbp-78h]
long long Property; // [rsp+10h] [rbp-68h]
int v9; // [rsp+24h] [rbp-54h]
long long v10; // [rsp+40h] [rbp-38h]
long long v13; // [rsp+68h] [rbp-10h]
Property = JS_GetProperty(a1, a2, a3, 106);
v10 = v4;
if ( JS_IsException_1(Property, v4)
|| (v9 = JS_ToBoolFree(a1, Property, v10), v7 = JS_GetProperty(a1, a2, a3, 65), JS_IsException_1(v7, v5)) )
{
*a4 = 0;
LODWORD(v13) = 0;
}
else
{
*a4 = v9;
return v7;
}
return v13;
}
| JS_IteratorGetCompleteValue:
SUB RSP,0x78
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RCX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
MOV ECX,0x6a
CALL 0x00128ac0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0016e138
JMP 0x0016e1bc
LAB_0016e138:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x0012d070
MOV dword ptr [RSP + 0x24],EAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
MOV ECX,0x41
CALL 0x00128ac0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0016e19b
JMP 0x0016e1bc
LAB_0016e19b:
MOV ECX,dword ptr [RSP + 0x24]
MOV RAX,qword ptr [RSP + 0x48]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x70],RAX
JMP 0x0016e1d8
LAB_0016e1bc:
MOV RAX,qword ptr [RSP + 0x48]
MOV dword ptr [RAX],0x0
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
LAB_0016e1d8:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
int1 [16]
JS_IteratorGetCompleteValue
(int8 param_1,int8 param_2,int8 param_3,int4 *param_4)
{
int iVar1;
int4 uVar2;
int1 auVar3 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
auVar3 = JS_GetProperty(param_1,param_2,param_3,0x6a);
iVar1 = JS_IsException(auVar3._0_8_,auVar3._8_8_);
if (iVar1 == 0) {
uVar2 = JS_ToBoolFree(param_1,auVar3._0_8_,auVar3._8_8_);
auVar3 = JS_GetProperty(param_1,param_2,param_3,0x41);
local_8 = auVar3._8_8_;
iVar1 = JS_IsException(auVar3._0_8_,local_8);
if (iVar1 == 0) {
*param_4 = uVar2;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
goto LAB_0016e1d8;
}
}
*param_4 = 0;
local_10 = 0;
local_8 = 6;
LAB_0016e1d8:
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
| |
30,527 | JS_IteratorGetCompleteValue | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_IteratorGetCompleteValue(JSContext *ctx, JSValue obj,
BOOL *pdone)
{
JSValue done_val, value;
BOOL done;
done_val = JS_GetProperty(ctx, obj, JS_ATOM_done);
if (JS_IsException(done_val))
goto fail;
done = JS_ToBoolFree(ctx, done_val);
value = JS_GetProperty(ctx, obj, JS_ATOM_value);
if (JS_IsException(value))
goto fail;
*pdone = done;
return value;
fail:
*pdone = FALSE;
return JS_EXCEPTION;
} | O1 | c | JS_IteratorGetCompleteValue:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movl $0x6a, %ecx
movq %rsi, %r8
movq %rdx, %r9
pushq $0x0
pushq $0x0
callq 0x2238f
addq $0x10, %rsp
movl $0x6, %r14d
cmpl $0x6, %edx
je 0x411c9
movq %rbp, %rdi
movq %rax, %rsi
callq 0x220f9
movl %eax, %r15d
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl $0x41, %ecx
movq %r13, %r8
movq %r12, %r9
pushq $0x0
pushq $0x0
callq 0x2238f
addq $0x10, %rsp
cmpl $0x6, %edx
jne 0x411d0
xorl %r15d, %r15d
xorl %eax, %eax
jmp 0x411d3
movq %rdx, %r14
movl %r15d, (%rbx)
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_IteratorGetCompleteValue:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r12, rdx
mov r13, rsi
mov rbp, rdi
mov ecx, 6Ah ; 'j'
mov r8, rsi
mov r9, rdx
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r14d, 6
cmp edx, 6
jz short loc_411C9
mov rdi, rbp
mov rsi, rax
call JS_ToBoolFree
mov r15d, eax
mov rdi, rbp
mov rsi, r13
mov rdx, r12
mov ecx, 41h ; 'A'
mov r8, r13
mov r9, r12
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
cmp edx, 6
jnz short loc_411D0
loc_411C9:
xor r15d, r15d
xor eax, eax
jmp short loc_411D3
loc_411D0:
mov r14, rdx
loc_411D3:
mov [rbx], r15d
mov rdx, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long JS_IteratorGetCompleteValue(long long a1, long long a2, long long a3, _DWORD *a4)
{
unsigned long long PropertyInternal2; // rax
long long v7; // rdx
int v8; // r15d
unsigned long long result; // rax
int v10; // edx
PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, 0x6Au, a2, a3, 0LL, 0);
if ( (_DWORD)v7 == 6
|| (v8 = JS_ToBoolFree(a1, PropertyInternal2, v7),
result = JS_GetPropertyInternal2(a1, a2, a3, 0x41u, a2, a3, 0LL, 0),
v10 == 6) )
{
v8 = 0;
result = 0LL;
}
*a4 = v8;
return result;
}
| JS_IteratorGetCompleteValue:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBP,RDI
MOV ECX,0x6a
MOV R8,RSI
MOV R9,RDX
PUSH 0x0
PUSH 0x0
CALL 0x0012238f
ADD RSP,0x10
MOV R14D,0x6
CMP EDX,0x6
JZ 0x001411c9
MOV RDI,RBP
MOV RSI,RAX
CALL 0x001220f9
MOV R15D,EAX
MOV RDI,RBP
MOV RSI,R13
MOV RDX,R12
MOV ECX,0x41
MOV R8,R13
MOV R9,R12
PUSH 0x0
PUSH 0x0
CALL 0x0012238f
ADD RSP,0x10
CMP EDX,0x6
JNZ 0x001411d0
LAB_001411c9:
XOR R15D,R15D
XOR EAX,EAX
JMP 0x001411d3
LAB_001411d0:
MOV R14,RDX
LAB_001411d3:
MOV dword ptr [RBX],R15D
MOV RDX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
JS_IteratorGetCompleteValue
(int8 param_1,int8 param_2,int8 param_3,int4 *param_4)
{
int4 uVar1;
int1 auVar2 [12];
int1 auVar3 [16];
auVar2 = JS_GetPropertyInternal2();
if (auVar2._8_4_ != 6) {
uVar1 = JS_ToBoolFree(param_1,auVar2._0_8_);
auVar3 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x41,param_2,param_3,0,0);
if (auVar3._8_4_ != 6) goto LAB_001411d3;
}
uVar1 = 0;
auVar3 = ZEXT816(6) << 0x40;
LAB_001411d3:
*param_4 = uVar1;
return auVar3;
}
| |
30,528 | serial_cpp::Serial::SerialImpl::getDSR() | ami-iit[P]serial_cpp/src/impl/unix.cc | bool
Serial::SerialImpl::getDSR ()
{
if (is_open_ == false) {
throw PortNotOpenedException ("Serial::getDSR");
}
int status;
if (-1 == ioctl (fd_, TIOCMGET, &status))
{
stringstream ss;
ss << "getDSR failed on a call to ioctl(TIOCMGET): " << errno << " " << strerror(errno);
throw(SerialException(ss.str().c_str()));
}
else
{
return 0 != (status & TIOCM_DSR);
}
} | O2 | cpp | serial_cpp::Serial::SerialImpl::getDSR():
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp # imm = 0x1B0
cmpb $0x0, 0x2c(%rdi)
je 0x6b8e
movl 0x28(%rdi), %edi
leaq 0x4(%rsp), %rdx
movl $0x5415, %esi # imm = 0x5415
xorl %eax, %eax
callq 0x33c0
cmpl $-0x1, %eax
je 0x6bbe
movl 0x4(%rsp), %eax
shrl $0x8, %eax
andl $0x1, %eax
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x3170
movq %rax, %rbx
leaq 0x2ca7(%rip), %rsi # 0x9847
movq %rax, %rdi
callq 0x753e
leaq 0x7161(%rip), %rsi # 0xdd10
leaq 0xa58(%rip), %rdx # 0x760e
movq %rbx, %rdi
callq 0x34a0
leaq 0x28(%rsp), %rdi
callq 0x31d0
leaq 0x38(%rsp), %rdi
leaq 0x2c82(%rip), %rsi # 0x9856
callq 0x32b0
movq %rax, %r14
callq 0x3040
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x34b0
leaq 0x2be1(%rip), %rsi # 0x97d6
movq %rax, %rdi
callq 0x32b0
movq %rax, %r14
movl (%rbx), %edi
callq 0x30d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x32b0
pushq $0x28
popq %rdi
callq 0x3170
movq %rax, %rbx
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3440
movb $0x1, %bpl
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x71a0
xorl %ebp, %ebp
leaq 0x709b(%rip), %rsi # 0xdce0
leaq 0x624(%rip), %rdx # 0x7270
movq %rbx, %rdi
callq 0x34a0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x3140
testb %bpl, %bpl
jne 0x6c6b
jmp 0x6c85
movq %rax, %r14
movq %rbx, %rdi
callq 0x31f0
jmp 0x6c85
movq %rax, %r14
movq %rbx, %rdi
callq 0x31f0
jmp 0x6c8f
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x3210
movq %r14, %rdi
callq 0x34d0
nop
| _ZN10serial_cpp6Serial10SerialImpl6getDSREv:
push rbp
push r14
push rbx
sub rsp, 1B0h
cmp byte ptr [rdi+2Ch], 0
jz short loc_6B8E
mov edi, [rdi+28h]
lea rdx, [rsp+1C8h+var_1C4]
mov esi, 5415h
xor eax, eax
call _ioctl
cmp eax, 0FFFFFFFFh
jz short loc_6BBE
mov eax, [rsp+1C8h+var_1C4]
shr eax, 8
and eax, 1
add rsp, 1B0h
pop rbx
pop r14
pop rbp
retn
loc_6B8E:
push 28h ; '('
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aSerialGetdsr; "Serial::getDSR"
mov rdi, rax; this
call _ZN10serial_cpp22PortNotOpenedExceptionC2EPKc; serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*)
lea rsi, _ZTIN10serial_cpp22PortNotOpenedExceptionE; lptinfo
lea rdx, _ZN10serial_cpp22PortNotOpenedExceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_6BBE:
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rdi, [rsp+1C8h+var_190]
lea rsi, aGetdsrFailedOn; "getDSR failed on a call to ioctl(TIOCMG"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov r14, rax
call ___errno_location
mov rbx, rax
mov esi, [rax]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aSetdtrFailedOn_0+2Bh; " "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov r14, rax
mov edi, [rbx]
call _strerror
mov rdi, r14
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
push 28h ; '('
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, [rsp+1C8h+var_188]
lea rdi, [rsp+1C8h+var_1C0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov bpl, 1
mov rsi, [rsp+1C8h+var_1C0]; char *
mov rdi, rbx; this
call _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*)
xor ebp, ebp
lea rsi, _ZTIN10serial_cpp15SerialExceptionE; lptinfo
lea rdx, _ZN10serial_cpp15SerialExceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+1C8h+var_1C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_6C6B
jmp short loc_6C85
mov r14, rax
loc_6C6B:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_6C85
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_6C8F
mov r14, rax
loc_6C85:
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
loc_6C8F:
mov rdi, r14
call __Unwind_Resume
| long long serial_cpp::Serial::SerialImpl::getDSR(serial_cpp::Serial::SerialImpl *this)
{
serial_cpp::PortNotOpenedException *exception; // rbx
long long v3; // r14
unsigned int *v4; // rbx
long long v5; // rax
long long v6; // r14
long long v7; // rax
serial_cpp::SerialException *v8; // rbx
unsigned int v9; // [rsp+4h] [rbp-1C4h] BYREF
char *v10; // [rsp+8h] [rbp-1C0h] BYREF
_BYTE v11[16]; // [rsp+28h] [rbp-1A0h] BYREF
_BYTE v12[8]; // [rsp+38h] [rbp-190h] BYREF
_BYTE v13[392]; // [rsp+40h] [rbp-188h] BYREF
if ( !*((_BYTE *)this + 44) )
{
exception = (serial_cpp::PortNotOpenedException *)__cxa_allocate_exception(0x28uLL);
serial_cpp::PortNotOpenedException::PortNotOpenedException(exception, "Serial::getDSR");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'serial_cpp::PortNotOpenedException,
serial_cpp::PortNotOpenedException::~PortNotOpenedException);
}
if ( (unsigned int)ioctl(*((unsigned int *)this + 10), 21525LL, &v9) == -1 )
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v11);
v3 = std::operator<<<std::char_traits<char>>(v12, "getDSR failed on a call to ioctl(TIOCMGET): ");
v4 = (unsigned int *)__errno_location();
v5 = std::ostream::operator<<(v3, *v4);
v6 = std::operator<<<std::char_traits<char>>(v5, " ");
v7 = strerror(*v4);
std::operator<<<std::char_traits<char>>(v6, v7);
v8 = (serial_cpp::SerialException *)__cxa_allocate_exception(0x28uLL);
std::stringbuf::str(&v10, v13);
serial_cpp::SerialException::SerialException(v8, v10);
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'serial_cpp::SerialException,
serial_cpp::SerialException::~SerialException);
}
return (v9 >> 8) & 1;
}
| getDSR:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x1b0
CMP byte ptr [RDI + 0x2c],0x0
JZ 0x00106b8e
MOV EDI,dword ptr [RDI + 0x28]
LEA RDX,[RSP + 0x4]
MOV ESI,0x5415
XOR EAX,EAX
CALL 0x001033c0
CMP EAX,-0x1
JZ 0x00106bbe
MOV EAX,dword ptr [RSP + 0x4]
SHR EAX,0x8
AND EAX,0x1
ADD RSP,0x1b0
POP RBX
POP R14
POP RBP
RET
LAB_00106b8e:
PUSH 0x28
POP RDI
CALL 0x00103170
MOV RBX,RAX
LAB_00106b99:
LEA RSI,[0x109847]
MOV RDI,RAX
CALL 0x0010753e
LAB_00106ba8:
LEA RSI,[0x10dd10]
LEA RDX,[0x10760e]
MOV RDI,RBX
CALL 0x001034a0
LAB_00106bbe:
LEA RDI,[RSP + 0x28]
CALL 0x001031d0
LEA RDI,[RSP + 0x38]
LAB_00106bcd:
LEA RSI,[0x109856]
CALL 0x001032b0
MOV R14,RAX
CALL 0x00103040
MOV RBX,RAX
MOV ESI,dword ptr [RAX]
MOV RDI,R14
CALL 0x001034b0
LEA RSI,[0x1097d6]
MOV RDI,RAX
CALL 0x001032b0
MOV R14,RAX
MOV EDI,dword ptr [RBX]
CALL 0x001030d0
MOV RDI,R14
MOV RSI,RAX
CALL 0x001032b0
LAB_00106c12:
PUSH 0x28
POP RDI
CALL 0x00103170
MOV RBX,RAX
LEA RSI,[RSP + 0x40]
LAB_00106c22:
LEA RDI,[RSP + 0x8]
CALL 0x00103440
MOV BPL,0x1
MOV RSI,qword ptr [RSP + 0x8]
LAB_00106c34:
MOV RDI,RBX
CALL 0x001071a0
XOR EBP,EBP
LEA RSI,[0x10dce0]
LEA RDX,[0x107270]
MOV RDI,RBX
CALL 0x001034a0
|
/* serial_cpp::Serial::SerialImpl::getDSR() */
uint __thiscall serial_cpp::Serial::SerialImpl::getDSR(SerialImpl *this)
{
int iVar1;
PortNotOpenedException *this_00;
ostream *poVar2;
int *piVar3;
char *pcVar4;
SerialException *this_01;
uint local_1c4;
char *local_1c0;
stringstream local_1a0 [16];
ostream local_190 [376];
if (this[0x2c] == (SerialImpl)0x0) {
this_00 = (PortNotOpenedException *)__cxa_allocate_exception(0x28);
/* try { // try from 00106b99 to 00106ba7 has its CatchHandler @ 00106c75 */
PortNotOpenedException::PortNotOpenedException(this_00,"Serial::getDSR");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,&PortNotOpenedException::typeinfo,
PortNotOpenedException::~PortNotOpenedException);
}
iVar1 = ioctl(*(int *)(this + 0x28),0x5415,&local_1c4);
if (iVar1 != -1) {
return local_1c4 >> 8 & 1;
}
std::__cxx11::stringstream::stringstream(local_1a0);
/* try { // try from 00106bcd to 00106c11 has its CatchHandler @ 00106c82 */
poVar2 = std::operator<<(local_190,"getDSR failed on a call to ioctl(TIOCMGET): ");
piVar3 = __errno_location();
poVar2 = (ostream *)std::ostream::operator<<(poVar2,*piVar3);
poVar2 = std::operator<<(poVar2," ");
pcVar4 = strerror(*piVar3);
std::operator<<(poVar2,pcVar4);
this_01 = (SerialException *)__cxa_allocate_exception(0x28);
/* try { // try from 00106c22 to 00106c2b has its CatchHandler @ 00106c68 */
std::__cxx11::stringbuf::str();
/* try { // try from 00106c34 to 00106c53 has its CatchHandler @ 00106c54 */
SerialException::SerialException(this_01,local_1c0);
/* WARNING: Subroutine does not return */
__cxa_throw(this_01,&SerialException::typeinfo,SerialException::~SerialException);
}
| |
30,529 | serial_cpp::Serial::SerialImpl::getDSR() | ami-iit[P]serial_cpp/src/impl/unix.cc | bool
Serial::SerialImpl::getDSR ()
{
if (is_open_ == false) {
throw PortNotOpenedException ("Serial::getDSR");
}
int status;
if (-1 == ioctl (fd_, TIOCMGET, &status))
{
stringstream ss;
ss << "getDSR failed on a call to ioctl(TIOCMGET): " << errno << " " << strerror(errno);
throw(SerialException(ss.str().c_str()));
}
else
{
return 0 != (status & TIOCM_DSR);
}
} | O3 | cpp | serial_cpp::Serial::SerialImpl::getDSR():
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp # imm = 0x1B0
cmpb $0x0, 0x2c(%rdi)
je 0x7766
movl 0x28(%rdi), %edi
leaq 0x4(%rsp), %rdx
movl $0x5415, %esi # imm = 0x5415
xorl %eax, %eax
callq 0x33c0
cmpl $-0x1, %eax
je 0x7798
movl 0x4(%rsp), %eax
shrl $0x8, %eax
andl $0x1, %eax
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
movl $0x28, %edi
callq 0x3150
movq %rax, %rbx
leaq 0x40dd(%rip), %rsi # 0xb857
movq %rax, %rdi
callq 0x845a
leaq 0x8577(%rip), %rsi # 0xfd00
leaq 0xe24(%rip), %rdx # 0x85b4
movq %rbx, %rdi
callq 0x34c0
leaq 0x28(%rsp), %rdi
callq 0x31c0
leaq 0x38(%rsp), %r14
leaq 0x40b8(%rip), %rsi # 0xb866
movl $0x2c, %edx
movq %r14, %rdi
callq 0x3330
callq 0x3050
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x34d0
movq %rax, %r14
leaq 0x400f(%rip), %rsi # 0xb7e6
movl $0x1, %edx
movq %rax, %rdi
callq 0x3330
movl (%rbx), %edi
callq 0x30e0
movq %r14, %rdi
movq %rax, %rsi
callq 0x32a0
movl $0x28, %edi
callq 0x3150
movq %rax, %rbx
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3460
movb $0x1, %bpl
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x7e74
xorl %ebp, %ebp
leaq 0x84a5(%rip), %rsi # 0xfcd0
leaq 0x79c(%rip), %rdx # 0x7fce
movq %rbx, %rdi
callq 0x34c0
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7858
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
testb %bpl, %bpl
jne 0x7862
jmp 0x787c
movq %rax, %r14
movq %rbx, %rdi
callq 0x31e0
jmp 0x787c
movq %rax, %r14
movq %rbx, %rdi
callq 0x31e0
jmp 0x789a
movq %rax, %r14
movq 0x871d(%rip), %rsi # 0xffa0
leaq 0x28(%rsp), %rdi
callq 0x3200
leaq 0xa8(%rsp), %rdi
callq 0x30d0
movq %r14, %rdi
callq 0x34f0
| _ZN10serial_cpp6Serial10SerialImpl6getDSREv:
push rbp
push r14
push rbx
sub rsp, 1B0h
cmp byte ptr [rdi+2Ch], 0
jz short loc_7766
mov edi, [rdi+28h]
lea rdx, [rsp+1C8h+var_1C4]
mov esi, 5415h
xor eax, eax
call _ioctl
cmp eax, 0FFFFFFFFh
jz short loc_7798
mov eax, [rsp+1C8h+var_1C4]
shr eax, 8
and eax, 1
add rsp, 1B0h
pop rbx
pop r14
pop rbp
retn
loc_7766:
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aSerialGetdsr; "Serial::getDSR"
mov rdi, rax; this
call _ZN10serial_cpp22PortNotOpenedExceptionC2EPKc; serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*)
lea rsi, _ZTIN10serial_cpp22PortNotOpenedExceptionE; lptinfo
lea rdx, _ZN10serial_cpp22PortNotOpenedExceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_7798:
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea r14, [rsp+1C8h+var_190]
lea rsi, aGetdsrFailedOn; "getDSR failed on a call to ioctl(TIOCMG"...
mov edx, 2Ch ; ','
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)
call ___errno_location
mov rbx, rax
mov esi, [rax]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
mov r14, rax
lea rsi, aSetdtrFailedOn_0+2Bh; " "
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edi, [rbx]
call _strerror
mov rdi, r14
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, [rsp+1C8h+var_188]
lea rdi, [rsp+1C8h+var_1C0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov bpl, 1
mov rsi, [rsp+1C8h+var_1C0]; char *
mov rdi, rbx; this
call _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*)
xor ebp, ebp
lea rsi, _ZTIN10serial_cpp15SerialExceptionE; lptinfo
lea rdx, _ZN10serial_cpp15SerialExceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+1C8h+var_1B0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7858
mov rsi, [rsp+1C8h+var_1B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7858:
test bpl, bpl
jnz short loc_7862
jmp short loc_787C
mov r14, rax
loc_7862:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_787C
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_789A
mov r14, rax
loc_787C:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1C8h+var_120]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_789A:
mov rdi, r14
call __Unwind_Resume
| long long serial_cpp::Serial::SerialImpl::getDSR(serial_cpp::Serial::SerialImpl *this)
{
serial_cpp::PortNotOpenedException *exception; // rbx
unsigned int *v3; // rbx
long long v4; // r14
long long v5; // rax
serial_cpp::SerialException *v6; // rbx
unsigned int v7; // [rsp+4h] [rbp-1C4h] BYREF
char *v8; // [rsp+8h] [rbp-1C0h] BYREF
_BYTE v9[16]; // [rsp+28h] [rbp-1A0h] BYREF
_BYTE v10[8]; // [rsp+38h] [rbp-190h] BYREF
_BYTE v11[104]; // [rsp+40h] [rbp-188h] BYREF
if ( !*((_BYTE *)this + 44) )
{
exception = (serial_cpp::PortNotOpenedException *)__cxa_allocate_exception(0x28uLL);
serial_cpp::PortNotOpenedException::PortNotOpenedException(exception, "Serial::getDSR");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'serial_cpp::PortNotOpenedException,
serial_cpp::PortNotOpenedException::~PortNotOpenedException);
}
if ( (unsigned int)ioctl(*((unsigned int *)this + 10), 21525LL, &v7) == -1 )
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v9);
std::__ostream_insert<char,std::char_traits<char>>(v10, "getDSR failed on a call to ioctl(TIOCMGET): ", 44LL);
v3 = (unsigned int *)__errno_location();
v4 = std::ostream::operator<<(v10, *v3);
std::__ostream_insert<char,std::char_traits<char>>(v4, " ", 1LL);
v5 = strerror(*v3);
std::operator<<<std::char_traits<char>>(v4, v5);
v6 = (serial_cpp::SerialException *)__cxa_allocate_exception(0x28uLL);
std::stringbuf::str(&v8, v11);
serial_cpp::SerialException::SerialException(v6, v8);
__cxa_throw(
v6,
(struct type_info *)&`typeinfo for'serial_cpp::SerialException,
serial_cpp::SerialException::~SerialException);
}
return (v7 >> 8) & 1;
}
| getDSR:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x1b0
CMP byte ptr [RDI + 0x2c],0x0
JZ 0x00107766
MOV EDI,dword ptr [RDI + 0x28]
LEA RDX,[RSP + 0x4]
MOV ESI,0x5415
XOR EAX,EAX
CALL 0x001033c0
CMP EAX,-0x1
JZ 0x00107798
MOV EAX,dword ptr [RSP + 0x4]
SHR EAX,0x8
AND EAX,0x1
ADD RSP,0x1b0
POP RBX
POP R14
POP RBP
RET
LAB_00107766:
MOV EDI,0x28
CALL 0x00103150
MOV RBX,RAX
LAB_00107773:
LEA RSI,[0x10b857]
MOV RDI,RAX
CALL 0x0010845a
LAB_00107782:
LEA RSI,[0x10fd00]
LEA RDX,[0x1085b4]
MOV RDI,RBX
CALL 0x001034c0
LAB_00107798:
LEA RDI,[RSP + 0x28]
CALL 0x001031c0
LEA R14,[RSP + 0x38]
LAB_001077a7:
LEA RSI,[0x10b866]
MOV EDX,0x2c
MOV RDI,R14
CALL 0x00103330
CALL 0x00103050
MOV RBX,RAX
MOV ESI,dword ptr [RAX]
MOV RDI,R14
CALL 0x001034d0
MOV R14,RAX
LEA RSI,[0x10b7e6]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103330
MOV EDI,dword ptr [RBX]
CALL 0x001030e0
MOV RDI,R14
MOV RSI,RAX
CALL 0x001032a0
LAB_001077f6:
MOV EDI,0x28
CALL 0x00103150
MOV RBX,RAX
LEA RSI,[RSP + 0x40]
LAB_00107808:
LEA RDI,[RSP + 0x8]
CALL 0x00103460
MOV BPL,0x1
MOV RSI,qword ptr [RSP + 0x8]
LAB_0010781a:
MOV RDI,RBX
CALL 0x00107e74
XOR EBP,EBP
LEA RSI,[0x10fcd0]
LEA RDX,[0x107fce]
MOV RDI,RBX
CALL 0x001034c0
|
/* serial_cpp::Serial::SerialImpl::getDSR() */
uint __thiscall serial_cpp::Serial::SerialImpl::getDSR(SerialImpl *this)
{
int iVar1;
PortNotOpenedException *this_00;
int *piVar2;
ostream *poVar3;
char *pcVar4;
SerialException *this_01;
uint local_1c4;
char *local_1c0;
stringstream local_1a0 [16];
ostream local_190 [376];
if (this[0x2c] == (SerialImpl)0x0) {
this_00 = (PortNotOpenedException *)__cxa_allocate_exception(0x28);
/* try { // try from 00107773 to 00107781 has its CatchHandler @ 0010786c */
PortNotOpenedException::PortNotOpenedException(this_00,"Serial::getDSR");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,&PortNotOpenedException::typeinfo,
PortNotOpenedException::~PortNotOpenedException);
}
iVar1 = ioctl(*(int *)(this + 0x28),0x5415,&local_1c4);
if (iVar1 != -1) {
return local_1c4 >> 8 & 1;
}
std::__cxx11::stringstream::stringstream(local_1a0);
/* try { // try from 001077a7 to 001077f5 has its CatchHandler @ 00107879 */
std::__ostream_insert<char,std::char_traits<char>>
(local_190,"getDSR failed on a call to ioctl(TIOCMGET): ",0x2c);
piVar2 = __errno_location();
poVar3 = (ostream *)std::ostream::operator<<(local_190,*piVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar3," ",1);
pcVar4 = strerror(*piVar2);
std::operator<<(poVar3,pcVar4);
this_01 = (SerialException *)__cxa_allocate_exception(0x28);
/* try { // try from 00107808 to 00107811 has its CatchHandler @ 0010785f */
std::__cxx11::stringbuf::str();
/* try { // try from 0010781a to 00107839 has its CatchHandler @ 0010783a */
SerialException::SerialException(this_01,local_1c0);
/* WARNING: Subroutine does not return */
__cxa_throw(this_01,&SerialException::typeinfo,SerialException::~SerialException);
}
| |
30,530 | LefDefParser::lefwAddComment(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | void
lefwAddComment(const char *comment)
{
if (comment) {
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) "# %s\n", comment);
else
fprintf(lefwFile, "# %s\n", comment);
}
return;
} | O3 | cpp | LefDefParser::lefwAddComment(char const*):
testq %rdi, %rdi
je 0x18bbf
movq %rdi, %rdx
leaq 0xc25b(%rip), %rax # 0x24e00
movq (%rax), %rdi
cmpb $0x1, 0xc53d(%rip) # 0x250ec
jne 0x18bc0
leaq 0x3998(%rip), %rsi # 0x1c550
xorl %eax, %eax
jmp 0x18c35
retq
leaq 0x3989(%rip), %rsi # 0x1c550
xorl %eax, %eax
jmp 0x10f0
| _ZN12LefDefParser14lefwAddCommentEPKc:
test rdi, rdi
jz short locret_18BBF
mov rdx, rdi
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_18BC0
lea rsi, aS_1; "# %s\n"
xor eax, eax
jmp _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
locret_18BBF:
retn
loc_18BC0:
lea rsi, aS_1; "# %s\n"
xor eax, eax
jmp _fprintf
| double LefDefParser::lefwAddComment(LefDefParser *this, const char *a2, long long a3, int a4, int a5, int a6)
{
double result; // xmm0_8
if ( this )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"# %s\n", (_DWORD)this, a4, a5, a6);
else
return fprintf(*(_QWORD *)&LefDefParser::lefwFile, "# %s\n", (const char *)this);
}
return result;
}
| lefwAddComment:
TEST RDI,RDI
JZ 0x00118bbf
MOV RDX,RDI
LEA RAX,[0x124e00]
MOV RDI,qword ptr [RAX]
CMP byte ptr [0x001250ec],0x1
JNZ 0x00118bc0
LEA RSI,[0x11c550]
XOR EAX,EAX
JMP 0x00118c35
LAB_00118bbf:
RET
LAB_00118bc0:
LEA RSI,[0x11c550]
XOR EAX,EAX
JMP 0x001010f0
|
/* LefDefParser::lefwAddComment(char const*) */
void LefDefParser::lefwAddComment(char *param_1)
{
if (param_1 == (char *)0x0) {
return;
}
if (lefwWriteEncrypt == '\x01') {
encPrint(lefwFile,"# %s\n");
return;
}
fprintf(lefwFile,"# %s\n",param_1);
return;
}
| |
30,531 | list_add | eloqsql/libmariadb/libmariadb/ma_list.c | LIST *list_add(LIST *root, LIST *element)
{
if (root)
{
if (root->prev) /* If add in mid of list */
root->prev->next= element;
element->prev=root->prev;
root->prev=element;
}
else
element->prev=0;
element->next=root;
return(element); /* New root */
} | O3 | c | list_add:
movq %rsi, %rax
testq %rdi, %rdi
je 0x40af9
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x40b02
movq %rax, 0x8(%rcx)
movq (%rdi), %rcx
jmp 0x40b04
movq $0x0, (%rax)
jmp 0x40b0b
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rax, (%rdi)
popq %rbp
movq %rdi, 0x8(%rax)
retq
| list_add:
mov rax, rsi
test rdi, rdi
jz short loc_40AF9
push rbp
mov rbp, rsp
mov rcx, [rdi]
test rcx, rcx
jz short loc_40B02
mov [rcx+8], rax
mov rcx, [rdi]
jmp short loc_40B04
loc_40AF9:
mov qword ptr [rax], 0
jmp short loc_40B0B
loc_40B02:
xor ecx, ecx
loc_40B04:
mov [rax], rcx
mov [rdi], rax
pop rbp
loc_40B0B:
mov [rax+8], rdi
retn
| _QWORD * list_add(long long *a1, _QWORD *a2)
{
_QWORD *result; // rax
long long v3; // rcx
result = a2;
if ( a1 )
{
if ( *a1 )
{
*(_QWORD *)(*a1 + 8) = a2;
v3 = *a1;
}
else
{
v3 = 0LL;
}
*a2 = v3;
*a1 = (long long)a2;
}
else
{
*a2 = 0LL;
}
a2[1] = a1;
return result;
}
| list_add:
MOV RAX,RSI
TEST RDI,RDI
JZ 0x00140af9
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RDI]
TEST RCX,RCX
JZ 0x00140b02
MOV qword ptr [RCX + 0x8],RAX
MOV RCX,qword ptr [RDI]
JMP 0x00140b04
LAB_00140af9:
MOV qword ptr [RAX],0x0
JMP 0x00140b0b
LAB_00140b02:
XOR ECX,ECX
LAB_00140b04:
MOV qword ptr [RAX],RCX
MOV qword ptr [RDI],RAX
POP RBP
LAB_00140b0b:
MOV qword ptr [RAX + 0x8],RDI
RET
|
void list_add(long *param_1,long *param_2)
{
long lVar1;
if (param_1 == (long *)0x0) {
*param_2 = 0;
}
else {
if (*param_1 == 0) {
lVar1 = 0;
}
else {
*(long **)(*param_1 + 8) = param_2;
lVar1 = *param_1;
}
*param_2 = lVar1;
*param_1 = (long)param_2;
}
param_2[1] = (long)param_1;
return;
}
| |
30,532 | LefDefParser::lefwMacroPinIV_Tables(char const*, char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwMacroPinIV_Tables(const char *lowName,
const char *highName)
{
lefwObsoleteNum = LEFW_MACRO_IV_TABLES;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (!lefwIsMacroPin)
return LEFW_BAD_ORDER;
if (versionNum >= 5.4)
return LEFW_OBSOLETE;
if (!lowName || lowName == 0 || *lowName == 0)
return LEFW_BAD_DATA;
if (!highName || highName == 0 || *highName == 0)
return LEFW_BAD_DATA;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) " IV_TABLES %s %s ;\n", lowName, highName);
else
fprintf(lefwFile, " IV_TABLES %s %s ;\n", lowName, highName);
lefwLines++;
lefwState = LEFW_MACRO;
return LEFW_OK;
} | O0 | cpp | LefDefParser::lefwMacroPinIV_Tables(char const*, char const*):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, (%rsp)
movl $0x28, 0x96ea1(%rip) # 0xc4f18
leaq 0x971d2(%rip), %rax # 0xc5250
cmpq $0x0, (%rax)
jne 0x2e091
movl $0x1, 0x14(%rsp)
jmp 0x2e1ab
leaq 0x9740c(%rip), %rax # 0xc54a4
cmpl $0x0, (%rax)
jne 0x2e0aa
movl $0x2, 0x14(%rsp)
jmp 0x2e1ab
leaq 0x9743f(%rip), %rax # 0xc54f0
cmpl $0x0, (%rax)
jne 0x2e0c3
movl $0x2, 0x14(%rsp)
jmp 0x2e1ab
movsd 0x96e45(%rip), %xmm0 # 0xc4f10
movsd 0x74b6d(%rip), %xmm1 # 0xa2c40
ucomisd %xmm1, %xmm0
jb 0x2e0e6
movl $0x7, 0x14(%rsp)
jmp 0x2e1ab
cmpq $0x0, 0x8(%rsp)
je 0x2e103
cmpq $0x0, 0x8(%rsp)
je 0x2e103
movq 0x8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2e110
movl $0x3, 0x14(%rsp)
jmp 0x2e1ab
cmpq $0x0, (%rsp)
je 0x2e12a
cmpq $0x0, (%rsp)
je 0x2e12a
movq (%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2e134
movl $0x3, 0x14(%rsp)
jmp 0x2e1ab
cmpl $0x0, 0x97401(%rip) # 0xc553c
je 0x2e160
leaq 0x9710c(%rip), %rax # 0xc5250
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
movq (%rsp), %rcx
leaq 0x6607f(%rip), %rsi # 0x941d6
movb $0x0, %al
callq 0x8bf50
jmp 0x2e181
leaq 0x970e9(%rip), %rax # 0xc5250
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
movq (%rsp), %rcx
leaq 0x6605c(%rip), %rsi # 0x941d6
movb $0x0, %al
callq 0x2370
leaq 0x97314(%rip), %rax # 0xc549c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x97308(%rip), %rax # 0xc549c
movl %ecx, (%rax)
leaq 0x97303(%rip), %rax # 0xc54a0
movl $0x21, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser21lefwMacroPinIV_TablesEPKcS1_:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
mov [rsp+18h+var_18], rsi
mov cs:_ZN12LefDefParserL15lefwObsoleteNumE, 28h ; '('; LefDefParser::lefwObsoleteNum
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_2E091
mov [rsp+18h+var_4], 1
jmp loc_2E1AB
loc_2E091:
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
cmp dword ptr [rax], 0
jnz short loc_2E0AA
mov [rsp+18h+var_4], 2
jmp loc_2E1AB
loc_2E0AA:
lea rax, _ZN12LefDefParser14lefwIsMacroPinE; LefDefParser::lefwIsMacroPin
cmp dword ptr [rax], 0
jnz short loc_2E0C3
mov [rsp+18h+var_4], 2
jmp loc_2E1AB
loc_2E0C3:
movsd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum
movsd xmm1, cs:qword_A2C40
ucomisd xmm0, xmm1
jb short loc_2E0E6
mov [rsp+18h+var_4], 7
jmp loc_2E1AB
loc_2E0E6:
cmp [rsp+18h+var_10], 0
jz short loc_2E103
cmp [rsp+18h+var_10], 0
jz short loc_2E103
mov rax, [rsp+18h+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_2E110
loc_2E103:
mov [rsp+18h+var_4], 3
jmp loc_2E1AB
loc_2E110:
cmp [rsp+18h+var_18], 0
jz short loc_2E12A
cmp [rsp+18h+var_18], 0
jz short loc_2E12A
mov rax, [rsp+18h+var_18]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_2E134
loc_2E12A:
mov [rsp+18h+var_4], 3
jmp short loc_2E1AB
loc_2E134:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz short loc_2E160
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
mov rcx, [rsp+18h+var_18]
lea rsi, aIvTablesSS; " IV_TABLES %s %s ;\n"
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_2E181
loc_2E160:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
mov rcx, [rsp+18h+var_18]
lea rsi, aIvTablesSS; " IV_TABLES %s %s ;\n"
mov al, 0
call _fprintf
loc_2E181:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov dword ptr [rax], 21h ; '!'
mov [rsp+18h+var_4], 0
loc_2E1AB:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| long long LefDefParser::lefwMacroPinIV_Tables(
LefDefParser *this,
const char *a2,
const char *a3,
long long a4,
int a5,
int a6)
{
LefDefParser::lefwObsoleteNum = 40;
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwDidInit )
{
if ( LefDefParser::lefwIsMacroPin )
{
if ( *(double *)&LefDefParser::versionNum < 5.4 )
{
if ( this && *(_BYTE *)this )
{
if ( a2 && *a2 )
{
if ( LefDefParser::lefwWriteEncrypt )
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" IV_TABLES %s %s ;\n",
(_DWORD)this,
(_DWORD)a2,
a5,
a6);
else
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " IV_TABLES %s %s ;\n", (const char *)this, a2);
++LefDefParser::lefwLines;
LefDefParser::lefwState = 33;
return 0;
}
else
{
return 3;
}
}
else
{
return 3;
}
}
else
{
return 7;
}
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| lefwMacroPinIV_Tables:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP],RSI
MOV dword ptr [0x001c4f18],0x28
LEA RAX,[0x1c5250]
CMP qword ptr [RAX],0x0
JNZ 0x0012e091
MOV dword ptr [RSP + 0x14],0x1
JMP 0x0012e1ab
LAB_0012e091:
LEA RAX,[0x1c54a4]
CMP dword ptr [RAX],0x0
JNZ 0x0012e0aa
MOV dword ptr [RSP + 0x14],0x2
JMP 0x0012e1ab
LAB_0012e0aa:
LEA RAX,[0x1c54f0]
CMP dword ptr [RAX],0x0
JNZ 0x0012e0c3
MOV dword ptr [RSP + 0x14],0x2
JMP 0x0012e1ab
LAB_0012e0c3:
MOVSD XMM0,qword ptr [0x001c4f10]
MOVSD XMM1,qword ptr [0x001a2c40]
UCOMISD XMM0,XMM1
JC 0x0012e0e6
MOV dword ptr [RSP + 0x14],0x7
JMP 0x0012e1ab
LAB_0012e0e6:
CMP qword ptr [RSP + 0x8],0x0
JZ 0x0012e103
CMP qword ptr [RSP + 0x8],0x0
JZ 0x0012e103
MOV RAX,qword ptr [RSP + 0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0012e110
LAB_0012e103:
MOV dword ptr [RSP + 0x14],0x3
JMP 0x0012e1ab
LAB_0012e110:
CMP qword ptr [RSP],0x0
JZ 0x0012e12a
CMP qword ptr [RSP],0x0
JZ 0x0012e12a
MOV RAX,qword ptr [RSP]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0012e134
LAB_0012e12a:
MOV dword ptr [RSP + 0x14],0x3
JMP 0x0012e1ab
LAB_0012e134:
CMP dword ptr [0x001c553c],0x0
JZ 0x0012e160
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP]
LEA RSI,[0x1941d6]
MOV AL,0x0
CALL 0x0018bf50
JMP 0x0012e181
LAB_0012e160:
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP]
LEA RSI,[0x1941d6]
MOV AL,0x0
CALL 0x00102370
LAB_0012e181:
LEA RAX,[0x1c549c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x1c549c]
MOV dword ptr [RAX],ECX
LEA RAX,[0x1c54a0]
MOV dword ptr [RAX],0x21
MOV dword ptr [RSP + 0x14],0x0
LAB_0012e1ab:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::lefwMacroPinIV_Tables(char const*, char const*) */
int4 LefDefParser::lefwMacroPinIV_Tables(char *param_1,char *param_2)
{
int4 local_4;
lefwObsoleteNum = 0x28;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if (lefwDidInit == 0) {
local_4 = 2;
}
else if (lefwIsMacroPin == 0) {
local_4 = 2;
}
else if (versionNum < DAT_001a2c40) {
if (((param_1 == (char *)0x0) || (param_1 == (char *)0x0)) || (*param_1 == '\0')) {
local_4 = 3;
}
else if (((param_2 == (char *)0x0) || (param_2 == (char *)0x0)) || (*param_2 == '\0')) {
local_4 = 3;
}
else {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile," IV_TABLES %s %s ;\n",param_1,param_2);
}
else {
encPrint(lefwFile," IV_TABLES %s %s ;\n",param_1,param_2);
}
lefwLines = lefwLines + 1;
lefwState = 0x21;
local_4 = 0;
}
}
else {
local_4 = 7;
}
return local_4;
}
| |
30,533 | minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&) | llama.cpp/common/minja/minja.hpp | json parseNumber(CharIterator& it, const CharIterator& end) {
auto before = it;
consumeSpaces();
auto start = it;
bool hasDecimal = false;
bool hasExponent = false;
if (it != end && (*it == '-' || *it == '+')) ++it;
while (it != end) {
if (std::isdigit(*it)) {
++it;
} else if (*it == '.') {
if (hasDecimal) throw std::runtime_error("Multiple decimal points");
hasDecimal = true;
++it;
} else if (it != start && (*it == 'e' || *it == 'E')) {
if (hasExponent) throw std::runtime_error("Multiple exponents");
hasExponent = true;
++it;
} else {
break;
}
}
if (start == it) {
it = before;
return json(); // No valid characters found
}
std::string str(start, it);
try {
return json::parse(str);
} catch (json::parse_error& e) {
throw std::runtime_error("Failed to parse number: '" + str + "' (" + std::string(e.what()) + ")");
return json();
}
} | O3 | cpp | minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdx), %r9
movq 0x18(%rsi), %rbp
movq 0x20(%rsi), %r13
movq %r9, %rsi
cmpq %rbp, %r13
je 0xe8d0c
movq %rbx, 0x8(%rsp)
movq %r9, %rbx
movsbl (%r13), %edi
callq 0x20d60
testl %eax, %eax
je 0xe8d01
incq %r13
movq %r13, 0x20(%r12)
cmpq %rbp, %r13
jne 0xe8ce6
movq (%r14), %rsi
movq %rbx, %r9
movq 0x8(%rsp), %rbx
movq (%r15), %rax
cmpq %rsi, %rax
je 0xe8df5
movzbl (%rsi), %ecx
cmpl $0x2d, %ecx
je 0xe8d28
movq %rsi, %rdx
cmpl $0x2b, %ecx
jne 0xe8d32
leaq 0x1(%rsi), %rdx
movq %rdx, (%r14)
movq (%r15), %rax
cmpq %rax, %rdx
je 0xe8d7f
xorl %eax, %eax
xorl %ecx, %ecx
movsbl (%rdx), %edi
leal -0x30(%rdi), %r8d
cmpl $0xa, %r8d
jb 0xe8d74
movzbl %dil, %edi
cmpl $0x2e, %edi
jne 0xe8d5c
testb $0x1, %al
movb $0x1, %al
je 0xe8d74
jmp 0xe8e32
cmpq %rsi, %rdx
je 0xe8d7f
orl $0x20, %edi
cmpl $0x65, %edi
jne 0xe8d7f
testb $0x1, %cl
movb $0x1, %cl
jne 0xe8e50
incq %rdx
movq %rdx, (%r14)
cmpq (%r15), %rdx
jne 0xe8d3b
cmpq %rsi, %rdx
je 0xe8df5
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
leaq 0x10(%rsp), %rdi
callq 0x762d6
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0xd2c86
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0xe8ddc
leaq 0x50(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0xe8e1d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xe8e1d
movq %r9, (%r14)
movb $0x0, (%rbx)
movq $0x0, 0x8(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x88a76
movq %rbx, %rdi
movl $0x1, %esi
callq 0x88a76
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20680
movq %rax, %rbx
leaq 0x3bb6b(%rip), %rsi # 0x1249b1
movq %rax, %rdi
callq 0x20450
jmp 0xe8e6c
movl $0x10, %edi
callq 0x20680
movq %rax, %rbx
leaq 0x3bb65(%rip), %rsi # 0x1249c9
movq %rax, %rdi
callq 0x20450
movq 0x7d14d(%rip), %rsi # 0x165fc0
movq 0x7d106(%rip), %rdx # 0x165f80
movq %rbx, %rdi
callq 0x20ab0
jmp 0xe907e
movq %rdx, %rbx
movq %rax, %r14
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0xe8ea6
leaq 0x50(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
cmpl $0x1, %ebx
jne 0xe9063
movq %r14, %rdi
callq 0x200c0
movq %rax, %r14
movl $0x10, %edi
callq 0x20680
movq %rax, %rbx
leaq 0x3bb0e(%rip), %rsi # 0x1249dc
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x693af
leaq 0x3bb12(%rip), %rdx # 0x1249f6
leaq 0x98(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xb3c65
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x78(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rax, %rsi
callq 0x27f5e
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0xb4a41
leaq 0x3647f(%rip), %rdx # 0x11f3b1
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0xb3c65
movb $0x1, %bpl
leaq 0xd8(%rsp), %rsi
movq %rbx, %rdi
callq 0x204b0
xorl %ebp, %ebp
movq 0x7d05d(%rip), %rsi # 0x165fc0
movq 0x7d016(%rip), %rdx # 0x165f80
movq %rbx, %rdi
callq 0x20ab0
movq %rax, %r14
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe8f9e
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xe8f9e
movq %rax, %r14
movb $0x1, %bpl
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe8fc7
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xe8fc7
movq %rax, %r14
movb $0x1, %bpl
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe8ff0
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xe8ff0
movq %rax, %r14
movb $0x1, %bpl
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe9011
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x20180
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe902c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0xe9056
jmp 0xe905e
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe9056
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xe9056
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f60
callq 0x20db0
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0xe9098
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xe9098
jmp 0xe907e
movq %rax, %rdi
callq 0x2a257
movq %rax, %r14
jmp 0xe9098
jmp 0xe908d
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f60
movq %r14, %rdi
callq 0x20b50
| _ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r15, rcx
mov r14, rdx
mov r12, rsi
mov rbx, rdi
mov r9, [rdx]
mov rbp, [rsi+18h]
mov r13, [rsi+20h]
mov rsi, r9
cmp r13, rbp
jz short loc_E8D0C
mov [rsp+128h+var_120], rbx
mov rbx, r9
loc_E8CE6:
movsx edi, byte ptr [r13+0]
call _isspace
test eax, eax
jz short loc_E8D01
inc r13
mov [r12+20h], r13
cmp r13, rbp
jnz short loc_E8CE6
loc_E8D01:
mov rsi, [r14]
mov r9, rbx
mov rbx, [rsp+128h+var_120]
loc_E8D0C:
mov rax, [r15]
cmp rax, rsi
jz loc_E8DF5
movzx ecx, byte ptr [rsi]
cmp ecx, 2Dh ; '-'
jz short loc_E8D28
mov rdx, rsi
cmp ecx, 2Bh ; '+'
jnz short loc_E8D32
loc_E8D28:
lea rdx, [rsi+1]
mov [r14], rdx
mov rax, [r15]
loc_E8D32:
cmp rdx, rax
jz short loc_E8D7F
xor eax, eax
xor ecx, ecx
loc_E8D3B:
movsx edi, byte ptr [rdx]
lea r8d, [rdi-30h]
cmp r8d, 0Ah
jb short loc_E8D74
movzx edi, dil
cmp edi, 2Eh ; '.'
jnz short loc_E8D5C
test al, 1
mov al, 1
jz short loc_E8D74
jmp loc_E8E32
loc_E8D5C:
cmp rdx, rsi
jz short loc_E8D7F
or edi, 20h
cmp edi, 65h ; 'e'
jnz short loc_E8D7F
test cl, 1
mov cl, 1
jnz loc_E8E50
loc_E8D74:
inc rdx
mov [r14], rdx
cmp rdx, [r15]
jnz short loc_E8D3B
loc_E8D7F:
cmp rdx, rsi
jz short loc_E8DF5
lea r15, [rsp+128h+var_108]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
lea rdi, [rsp+128h+var_118]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
xorps xmm0, xmm0
lea rdx, [rsp+128h+var_D8]
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
lea rsi, [rsp+128h+var_118]
mov rdi, rbx
mov ecx, 1
xor r8d, r8d
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; 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>::parse<std::string&>(std::string&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)>,bool,bool)
mov rax, [rsp+128h+var_C8]
test rax, rax
jz short loc_E8DDC
lea rdi, [rsp+128h+var_D8]
mov rsi, rdi
mov edx, 3
call rax
loc_E8DDC:
mov rdi, [rsp+128h+var_118]; void *
cmp rdi, r15
jz short loc_E8E1D
mov rsi, [rsp+128h+var_108]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E8E1D
loc_E8DF5:
mov [r14], r9
mov byte ptr [rbx], 0
mov qword ptr [rbx+8], 0
mov rdi, rbx
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)
mov rdi, rbx
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_E8E1D:
mov rax, rbx
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_E8E32:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aMultipleDecima; "Multiple decimal points"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_E8E6C
loc_E8E50:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aMultipleExpone; "Multiple exponents"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_E8E6C:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp loc_E907E
mov rbx, rdx
mov r14, rax
mov rax, [rsp+128h+var_C8]
test rax, rax
jz short loc_E8EA6
lea rdi, [rsp+128h+var_D8]
mov rsi, rdi
mov edx, 3
call rax
loc_E8EA6:
cmp ebx, 1
jnz loc_E9063
mov rdi, r14; void *
call ___cxa_begin_catch
mov r14, rax
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aFailedToParseN; "Failed to parse number: '"
lea rdi, [rsp+128h+var_F8]
lea rdx, [rsp+128h+var_118]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
lea rdx, asc_1249F6; "' ("
lea rdi, [rsp+128h+var_90]
lea rsi, [rsp+128h+var_F8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+10h]
lea rdi, [rsp+128h+var_B0]
lea rdx, [rsp+128h+var_121]
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+128h+var_70]
lea rsi, [rsp+128h+var_90]
lea rdx, [rsp+128h+var_B0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rdx, aCompreplyCompg_2+3Ah; ")"
lea rdi, [rsp+128h+var_50]
lea rsi, [rsp+128h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov bpl, 1
lea rsi, [rsp+128h+var_50]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+128h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E8F9E
mov rsi, [rsp+128h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E8F9E
mov r14, rax
mov bpl, 1
loc_E8F9E:
lea rax, [rsp+128h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E8FC7
mov rsi, [rsp+128h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E8FC7
mov r14, rax
mov bpl, 1
loc_E8FC7:
lea rax, [rsp+128h+var_A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E8FF0
mov rsi, [rsp+128h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E8FF0
mov r14, rax
mov bpl, 1
loc_E8FF0:
lea rax, [rsp+128h+var_80]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E9011
mov rsi, [rsp+128h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E9011:
lea rax, [rsp+128h+var_E8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E902C
mov rsi, [rsp+128h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E902C:
test bpl, bpl
jnz short loc_E9056
jmp short loc_E905E
mov r14, rax
lea rax, [rsp+128h+var_E8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E9056
mov rsi, [rsp+128h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E9056
mov r14, rax
loc_E9056:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_E905E:
call ___cxa_end_catch
loc_E9063:
mov rdi, [rsp+128h+var_118]; void *
cmp rdi, r15
jz short loc_E9098
mov rsi, [rsp+128h+var_108]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E9098
jmp short $+2
loc_E907E:
mov rdi, rax
call __clang_call_terminate
mov r14, rax
jmp short loc_E9098
jmp short $+2
loc_E908D:
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
loc_E9098:
mov rdi, r14
call __Unwind_Resume
| long long minja::Parser::parseNumber(long long a1, long long a2, char **a3, char **a4)
{
long long v7; // rbx
char *v8; // r9
char *v9; // rbp
char *v10; // r13
char *v11; // rsi
char *v12; // rbx
char *v13; // rax
int v14; // ecx
char *v15; // rdx
char v16; // al
char v17; // cl
int v18; // edi
bool v19; // zf
std::runtime_error *exception; // rbx
void *v22[2]; // [rsp+10h] [rbp-118h] BYREF
_QWORD v23[2]; // [rsp+20h] [rbp-108h] BYREF
__int128 v24; // [rsp+50h] [rbp-D8h] BYREF
__int128 v25; // [rsp+60h] [rbp-C8h]
v7 = a1;
v8 = *a3;
v9 = *(char **)(a2 + 24);
v10 = *(char **)(a2 + 32);
v11 = *a3;
if ( v10 != v9 )
{
v12 = *a3;
do
{
if ( !(unsigned int)isspace((unsigned int)*v10) )
break;
*(_QWORD *)(a2 + 32) = ++v10;
}
while ( v10 != v9 );
v11 = *a3;
v8 = v12;
v7 = a1;
}
v13 = *a4;
if ( *a4 == v11 )
goto LABEL_25;
v14 = (unsigned __int8)*v11;
if ( v14 == 45 || (v15 = v11, v14 == 43) )
{
v15 = v11 + 1;
*a3 = v11 + 1;
v13 = *a4;
}
if ( v15 != v13 )
{
v16 = 0;
v17 = 0;
do
{
v18 = *v15;
if ( (unsigned int)(v18 - 48) >= 0xA )
{
if ( (unsigned __int8)v18 == 46 )
{
v19 = (v16 & 1) == 0;
v16 = 1;
if ( !v19 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Multiple decimal points");
goto LABEL_28;
}
}
else
{
if ( v15 == v11 || ((unsigned __int8)v18 | 0x20) != 0x65 )
break;
v19 = (v17 & 1) == 0;
v17 = 1;
if ( !v19 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Multiple exponents");
LABEL_28:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
}
*a3 = ++v15;
}
while ( v15 != *a4 );
}
if ( v15 == v11 )
{
LABEL_25:
*a3 = v8;
*(_BYTE *)v7 = 0;
*(_QWORD *)(v7 + 8) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7);
}
else
{
v22[0] = v23;
v22[1] = 0LL;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)v22, v11, (long long)v15);
v25 = 0LL;
v24 = 0LL;
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>::parse<std::string&>(
v7,
(long long *)v22,
(long long)&v24,
1u,
0);
if ( (_QWORD)v25 )
((void ( *)(__int128 *, __int128 *, long long))v25)(&v24, &v24, 3LL);
if ( v22[0] != v23 )
operator delete(v22[0], v23[0] + 1LL);
}
return v7;
}
| parseNumber:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R15,RCX
MOV R14,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R9,qword ptr [RDX]
MOV RBP,qword ptr [RSI + 0x18]
MOV R13,qword ptr [RSI + 0x20]
MOV RSI,R9
CMP R13,RBP
JZ 0x001e8d0c
MOV qword ptr [RSP + 0x8],RBX
MOV RBX,R9
LAB_001e8ce6:
MOVSX EDI,byte ptr [R13]
CALL 0x00120d60
TEST EAX,EAX
JZ 0x001e8d01
INC R13
MOV qword ptr [R12 + 0x20],R13
CMP R13,RBP
JNZ 0x001e8ce6
LAB_001e8d01:
MOV RSI,qword ptr [R14]
MOV R9,RBX
MOV RBX,qword ptr [RSP + 0x8]
LAB_001e8d0c:
MOV RAX,qword ptr [R15]
CMP RAX,RSI
JZ 0x001e8df5
MOVZX ECX,byte ptr [RSI]
CMP ECX,0x2d
JZ 0x001e8d28
MOV RDX,RSI
CMP ECX,0x2b
JNZ 0x001e8d32
LAB_001e8d28:
LEA RDX,[RSI + 0x1]
MOV qword ptr [R14],RDX
MOV RAX,qword ptr [R15]
LAB_001e8d32:
CMP RDX,RAX
JZ 0x001e8d7f
XOR EAX,EAX
XOR ECX,ECX
LAB_001e8d3b:
MOVSX EDI,byte ptr [RDX]
LEA R8D,[RDI + -0x30]
CMP R8D,0xa
JC 0x001e8d74
MOVZX EDI,DIL
CMP EDI,0x2e
JNZ 0x001e8d5c
TEST AL,0x1
MOV AL,0x1
JZ 0x001e8d74
JMP 0x001e8e32
LAB_001e8d5c:
CMP RDX,RSI
JZ 0x001e8d7f
OR EDI,0x20
CMP EDI,0x65
JNZ 0x001e8d7f
TEST CL,0x1
MOV CL,0x1
JNZ 0x001e8e50
LAB_001e8d74:
INC RDX
MOV qword ptr [R14],RDX
CMP RDX,qword ptr [R15]
JNZ 0x001e8d3b
LAB_001e8d7f:
CMP RDX,RSI
JZ 0x001e8df5
LEA R15,[RSP + 0x20]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
LAB_001e8d95:
LEA RDI,[RSP + 0x10]
CALL 0x001762d6
XORPS XMM0,XMM0
LEA RDX,[RSP + 0x50]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
LAB_001e8dae:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
MOV ECX,0x1
XOR R8D,R8D
CALL 0x001d2c86
MOV RAX,qword ptr [RSP + 0x60]
TEST RAX,RAX
JZ 0x001e8ddc
LAB_001e8dcd:
LEA RDI,[RSP + 0x50]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001e8ddc:
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R15
JZ 0x001e8e1d
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00120180
JMP 0x001e8e1d
LAB_001e8df5:
MOV qword ptr [R14],R9
MOV byte ptr [RBX],0x0
MOV qword ptr [RBX + 0x8],0x0
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00188a76
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00188a76
LAB_001e8e1d:
MOV RAX,RBX
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001e8e32:
MOV EDI,0x10
CALL 0x00120680
MOV RBX,RAX
LAB_001e8e3f:
LEA RSI,[0x2249b1]
MOV RDI,RAX
CALL 0x00120450
LAB_001e8e4e:
JMP 0x001e8e6c
LAB_001e8e50:
MOV EDI,0x10
CALL 0x00120680
MOV RBX,RAX
LAB_001e8e5d:
LEA RSI,[0x2249c9]
MOV RDI,RAX
CALL 0x00120450
LAB_001e8e6c:
MOV RSI,qword ptr [0x00265fc0]
MOV RDX,qword ptr [0x00265f80]
MOV RDI,RBX
CALL 0x00120ab0
|
/* minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >&,
__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > const&) */
__normal_iterator *
minja::Parser::parseNumber(__normal_iterator *param_1,__normal_iterator *param_2)
{
byte bVar1;
byte *pbVar2;
char *pcVar3;
bool bVar4;
bool bVar5;
bool bVar6;
int iVar7;
byte *pbVar8;
runtime_error *this;
bool bVar9;
int8 *in_RCX;
long *in_RDX;
byte *pbVar10;
byte *pbVar11;
char *pcVar12;
long *local_118;
int8 local_110;
long local_108 [6];
int8 local_d8;
int8 uStack_d0;
code *local_c8;
int8 uStack_c0;
pbVar2 = (byte *)*in_RDX;
pcVar3 = *(char **)(param_2 + 0x18);
pcVar12 = *(char **)(param_2 + 0x20);
pbVar11 = pbVar2;
if (pcVar12 != pcVar3) {
do {
iVar7 = isspace((int)*pcVar12);
if (iVar7 == 0) break;
pcVar12 = pcVar12 + 1;
*(char **)(param_2 + 0x20) = pcVar12;
} while (pcVar12 != pcVar3);
pbVar11 = (byte *)*in_RDX;
}
pbVar8 = (byte *)*in_RCX;
if (pbVar8 != pbVar11) {
if ((*pbVar11 == 0x2d) || (pbVar10 = pbVar11, *pbVar11 == 0x2b)) {
pbVar10 = pbVar11 + 1;
*in_RDX = (long)pbVar10;
pbVar8 = (byte *)*in_RCX;
}
if (pbVar10 != pbVar8) {
bVar6 = false;
bVar9 = false;
do {
bVar1 = *pbVar10;
bVar4 = bVar6;
bVar5 = bVar9;
if (9 < (int)(char)bVar1 - 0x30U) {
if (bVar1 == 0x2e) {
bVar4 = true;
if (bVar6) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e8e3f to 001e8e4d has its CatchHandler @ 001e908d */
std::runtime_error::runtime_error(this,"Multiple decimal points");
LAB_001e8e6c:
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00265fc0,PTR__runtime_error_00265f80);
}
}
else {
if ((pbVar10 == pbVar11) || ((bVar1 | 0x20) != 0x65)) break;
bVar5 = true;
if (bVar9) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e8e5d to 001e8e6b has its CatchHandler @ 001e908b */
std::runtime_error::runtime_error(this,"Multiple exponents");
goto LAB_001e8e6c;
}
}
}
bVar9 = bVar5;
bVar6 = bVar4;
pbVar10 = pbVar10 + 1;
*in_RDX = (long)pbVar10;
} while (pbVar10 != (byte *)*in_RCX);
}
if (pbVar10 != pbVar11) {
local_110 = 0;
/* try { // try from 001e8d95 to 001e8d9e has its CatchHandler @ 001e9086 */
local_118 = local_108;
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>(&local_118);
local_c8 = (code *)0x0;
uStack_c0 = 0;
local_d8 = 0;
uStack_d0 = 0;
/* try { // try from 001e8dae to 001e8dc2 has its CatchHandler @ 001e8e87 */
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>
::parse<std::__cxx11::string&>
((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,&local_118,&local_d8,1,0);
if (local_c8 != (code *)0x0) {
/* try { // try from 001e8dcd to 001e8ddb has its CatchHandler @ 001e8e82 */
(*local_c8)(&local_d8,&local_d8,3);
}
if (local_118 == local_108) {
return param_1;
}
operator_delete(local_118,local_108[0] + 1);
return param_1;
}
}
*in_RDX = (long)pbVar2;
*param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(param_1,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(param_1,0));
return param_1;
}
| |
30,534 | js_new_std_file | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_new_std_file(JSContext *ctx, FILE *f, BOOL is_popen)
{
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
JSSTDFile *s;
JSValue obj;
obj = JS_NewObjectClass(ctx, ts->std_file_class_id);
if (JS_IsException(obj))
return obj;
s = js_mallocz(ctx, sizeof(*s));
if (!s) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
s->is_popen = is_popen;
s->f = f;
JS_SetOpaque(obj, s);
return obj;
} | O0 | c | js_new_std_file:
subq $0x68, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movl %edx, 0x44(%rsp)
movq 0x50(%rsp), %rdi
callq 0x27f00
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x115d0
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rax
movl 0x78(%rax), %esi
callq 0x2a480
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x10390
cmpl $0x0, %eax
je 0x1274d
movq 0x18(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x127d1
movq 0x50(%rsp), %rdi
movl $0x10, %esi
callq 0x21d30
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x12790
movq 0x50(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x23c90
movl $0x0, 0x58(%rsp)
movq $0x6, 0x60(%rsp)
jmp 0x127d1
movl 0x44(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x48(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
movq 0x28(%rsp), %rdx
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x382f0
movq 0x18(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rdx
addq $0x68, %rsp
retq
| js_new_std_file:
sub rsp, 68h
mov [rsp+68h+var_18], rdi
mov [rsp+68h+var_20], rsi
mov [rsp+68h+var_24], edx
mov rdi, [rsp+68h+var_18]
call JS_GetRuntime
mov [rsp+68h+var_30], rax
mov rdi, [rsp+68h+var_30]
call js_get_thread_state
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_18]
mov rax, [rsp+68h+var_38]
mov esi, [rax+78h]
call JS_NewObjectClass
mov [rsp+68h+var_60], rax
mov [rsp+68h+var_58], rdx
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_50], rax
mov rax, [rsp+68h+var_58]
mov [rsp+68h+var_48], rax
mov rdi, [rsp+68h+var_50]
mov rsi, [rsp+68h+var_48]
call JS_IsException_0
cmp eax, 0
jz short loc_1274D
mov rax, [rsp+68h+var_50]
mov [rsp+68h+var_10], rax
mov rax, [rsp+68h+var_48]
mov [rsp+68h+var_8], rax
jmp loc_127D1
loc_1274D:
mov rdi, [rsp+68h+var_18]
mov esi, 10h
call js_mallocz
mov [rsp+68h+var_40], rax
cmp [rsp+68h+var_40], 0
jnz short loc_12790
mov rdi, [rsp+68h+var_18]
mov rsi, [rsp+68h+var_50]
mov rdx, [rsp+68h+var_48]
call JS_FreeValue
mov dword ptr [rsp+68h+var_10], 0
mov [rsp+68h+var_8], 6
jmp short loc_127D1
loc_12790:
mov ecx, [rsp+68h+var_24]
mov rax, [rsp+68h+var_40]
mov [rax+8], ecx
mov rcx, [rsp+68h+var_20]
mov rax, [rsp+68h+var_40]
mov [rax], rcx
mov rdx, [rsp+68h+var_40]
mov rdi, [rsp+68h+var_50]
mov rsi, [rsp+68h+var_48]
call JS_SetOpaque
mov rax, [rsp+68h+var_50]
mov [rsp+68h+var_10], rax
mov rax, [rsp+68h+var_48]
mov [rsp+68h+var_8], rax
loc_127D1:
mov rax, [rsp+68h+var_10]
mov rdx, [rsp+68h+var_8]
add rsp, 68h
retn
| long long js_new_std_file(long long a1, long long a2, int a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long v7; // rdx
long long v9; // [rsp+8h] [rbp-60h]
long long v10; // [rsp+20h] [rbp-48h]
long long v11; // [rsp+28h] [rbp-40h]
long long thread_state; // [rsp+30h] [rbp-38h]
int Runtime; // [rsp+38h] [rbp-30h]
long long v15; // [rsp+58h] [rbp-10h]
Runtime = JS_GetRuntime(a1);
thread_state = js_get_thread_state(Runtime, a2, v3, v4, v5, v6);
v9 = JS_NewObjectClass(a1, *(unsigned int *)(thread_state + 120));
v10 = v7;
if ( JS_IsException_0(v9, v7) )
return v9;
v11 = js_mallocz(a1, 16LL);
if ( v11 )
{
*(_DWORD *)(v11 + 8) = a3;
*(_QWORD *)v11 = a2;
JS_SetOpaque(v9, v10, v11);
return v9;
}
else
{
JS_FreeValue(a1, v9, v10);
LODWORD(v15) = 0;
}
return v15;
}
| js_new_std_file:
SUB RSP,0x68
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV dword ptr [RSP + 0x44],EDX
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x00127f00
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x001115d0
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x30]
MOV ESI,dword ptr [RAX + 0x78]
CALL 0x0012a480
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00110390
CMP EAX,0x0
JZ 0x0011274d
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001127d1
LAB_0011274d:
MOV RDI,qword ptr [RSP + 0x50]
MOV ESI,0x10
CALL 0x00121d30
MOV qword ptr [RSP + 0x28],RAX
CMP qword ptr [RSP + 0x28],0x0
JNZ 0x00112790
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x00123c90
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x6
JMP 0x001127d1
LAB_00112790:
MOV ECX,dword ptr [RSP + 0x44]
MOV RAX,qword ptr [RSP + 0x28]
MOV dword ptr [RAX + 0x8],ECX
MOV RCX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX],RCX
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001382f0
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x60],RAX
LAB_001127d1:
MOV RAX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
ADD RSP,0x68
RET
|
int1 [16] js_new_std_file(int8 param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
int iVar2;
int8 uVar3;
long lVar4;
int8 *puVar5;
int1 auVar6 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
uVar1 = uStack_c;
uVar3 = JS_GetRuntime(param_1);
lVar4 = js_get_thread_state(uVar3);
auVar6 = JS_NewObjectClass(param_1,*(int4 *)(lVar4 + 0x78));
local_8 = auVar6._8_8_;
uVar3 = auVar6._0_8_;
iVar2 = JS_IsException(uVar3,local_8);
local_10 = auVar6._0_4_;
uStack_c = auVar6._4_4_;
if (iVar2 == 0) {
puVar5 = (int8 *)js_mallocz(param_1,0x10);
if (puVar5 == (int8 *)0x0) {
JS_FreeValue(param_1,uVar3,local_8);
local_10 = 0;
local_8 = 6;
uStack_c = uVar1;
}
else {
*(int4 *)(puVar5 + 1) = param_3;
*puVar5 = param_2;
JS_SetOpaque(uVar3,local_8,puVar5);
}
}
auVar6._4_4_ = uStack_c;
auVar6._0_4_ = local_10;
auVar6._8_8_ = local_8;
return auVar6;
}
| |
30,535 | js_new_std_file | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_new_std_file(JSContext *ctx, FILE *f, BOOL is_popen)
{
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
JSSTDFile *s;
JSValue obj;
obj = JS_NewObjectClass(ctx, ts->std_file_class_id);
if (JS_IsException(obj))
return obj;
s = js_mallocz(ctx, sizeof(*s));
if (!s) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
s->is_popen = is_popen;
s->f = f;
JS_SetOpaque(obj, s);
return obj;
} | O2 | c | js_new_std_file:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
callq 0x1a185
movq %rax, %rdi
callq 0x1028a
movl 0x78(%rax), %esi
movq %r12, %rdi
callq 0x1b297
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x10c81
pushq $0x10
popq %rsi
movq %r12, %rdi
callq 0x17241
testq %rax, %rax
je 0x10ca3
movl %ebp, 0x8(%rax)
movq %r15, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x211dc
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r14, %rcx
andq %rax, %rcx
movl %r14d, %eax
orq %rcx, %rax
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1801e
pushq $0x6
popq %rbx
xorl %r14d, %r14d
xorl %ecx, %ecx
jmp 0x10c91
| js_new_std_file:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, edx
mov r15, rsi
mov r12, rdi
call JS_GetRuntime
mov rdi, rax
call js_get_thread_state
mov esi, [rax+78h]
mov rdi, r12
call JS_NewObjectClass
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jz short loc_10C81
push 10h
pop rsi
mov rdi, r12
call js_mallocz
test rax, rax
jz short loc_10CA3
mov [rax+8], ebp
mov [rax], r15
mov rdi, r14
mov rsi, rbx
mov rdx, rax
call JS_SetOpaque
loc_10C81:
mov rax, 0FFFFFFFF00000000h
mov rcx, r14
and rcx, rax
loc_10C91:
mov eax, r14d
or rax, rcx
mov rdx, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_10CA3:
mov rdi, r12
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
push 6
pop rbx
xor r14d, r14d
xor ecx, ecx
jmp short loc_10C91
| unsigned long long js_new_std_file(long long a1, long long a2, int a3)
{
int Runtime; // eax
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
long long thread_state; // rax
long long v10; // r14
long long v11; // rdx
long long v12; // rbx
long long v13; // rax
unsigned long long v14; // rcx
char v16; // [rsp+0h] [rbp-28h]
Runtime = JS_GetRuntime(a1);
thread_state = js_get_thread_state(Runtime, a2, v5, v6, v7, v8, v16);
v10 = JS_NewObjectClass(a1, *(unsigned int *)(thread_state + 120));
v12 = v11;
if ( (_DWORD)v11 != 6 )
{
v13 = js_mallocz(a1, 16LL);
if ( !v13 )
{
JS_FreeValue(a1, v10, v12);
LODWORD(v10) = 0;
v14 = 0LL;
return v14 | (unsigned int)v10;
}
*(_DWORD *)(v13 + 8) = a3;
*(_QWORD *)v13 = a2;
JS_SetOpaque(v10, v12, v13);
}
v14 = v10 & 0xFFFFFFFF00000000LL;
return v14 | (unsigned int)v10;
}
| js_new_std_file:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,EDX
MOV R15,RSI
MOV R12,RDI
CALL 0x0011a185
MOV RDI,RAX
CALL 0x0011028a
MOV ESI,dword ptr [RAX + 0x78]
MOV RDI,R12
CALL 0x0011b297
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x00110c81
PUSH 0x10
POP RSI
MOV RDI,R12
CALL 0x00117241
TEST RAX,RAX
JZ 0x00110ca3
MOV dword ptr [RAX + 0x8],EBP
MOV qword ptr [RAX],R15
MOV RDI,R14
MOV RSI,RBX
MOV RDX,RAX
CALL 0x001211dc
LAB_00110c81:
MOV RAX,-0x100000000
MOV RCX,R14
AND RCX,RAX
LAB_00110c91:
MOV EAX,R14D
OR RAX,RCX
MOV RDX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00110ca3:
MOV RDI,R12
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011801e
PUSH 0x6
POP RBX
XOR R14D,R14D
XOR ECX,ECX
JMP 0x00110c91
|
int1 [16] js_new_std_file(int8 param_1,int8 param_2,int4 param_3)
{
int8 uVar1;
long lVar2;
int8 *puVar3;
ulong uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
uVar1 = JS_GetRuntime();
lVar2 = js_get_thread_state(uVar1);
auVar5 = JS_NewObjectClass(param_1,*(int4 *)(lVar2 + 0x78));
uVar4 = auVar5._0_8_;
if (auVar5._8_4_ != 6) {
puVar3 = (int8 *)js_mallocz(param_1,0x10);
if (puVar3 == (int8 *)0x0) {
JS_FreeValue(param_1,uVar4,auVar5._8_8_);
auVar5 = ZEXT816(6) << 0x40;
uVar4 = 0;
goto LAB_00110c91;
}
*(int4 *)(puVar3 + 1) = param_3;
*puVar3 = param_2;
JS_SetOpaque(uVar4,auVar5._8_8_,puVar3);
}
uVar4 = uVar4 & 0xffffffff00000000;
LAB_00110c91:
auVar6._0_8_ = auVar5._0_8_ & 0xffffffff | uVar4;
auVar6._8_8_ = auVar5._8_8_;
return auVar6;
}
| |
30,536 | my_casefold_ujis | eloqsql/strings/ctype-ujis.c | static size_t
my_casefold_ujis(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)),
const uchar * const map,
size_t is_upper)
{
const char *srcend= src + srclen, *dst0= dst;
while (src < srcend)
{
size_t mblen= my_ismbchar(cs, src, srcend);
if (mblen)
{
MY_UNICASE_CHARACTER *ch;
ch= (mblen == 2) ?
get_case_info_for_ch(cs, 0, (uchar) src[0], (uchar) src[1]) :
get_case_info_for_ch(cs, 1, (uchar) src[1], (uchar) src[2]);
if (ch)
{
int code= is_upper ? ch->toupper : ch->tolower;
src+= mblen;
if (code > 0xFFFF)
*dst++= (char) (uchar) ((code >> 16) & 0xFF);
if (code > 0xFF)
*dst++= (char) (uchar) ((code >> 8) & 0xFF);
*dst++= (char) (uchar) (code & 0xFF);
}
else
{
if (mblen == 3)
*dst++= *src++;
*dst++= *src++;
*dst++= *src++;
}
}
else
{
*dst++= (char) map[(uchar) *src++];
}
}
return (size_t) (dst - dst0);
} | O3 | c | my_casefold_ujis:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x40(%rbp)
movq %rcx, %rbx
movq %rcx, -0x30(%rbp)
testq %rdx, %rdx
jle 0x55983
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
addq %rsi, %r15
xorl %eax, %eax
testq %r9, %r9
sete %al
shll $0x2, %eax
movq %rax, -0x38(%rbp)
xorl %r14d, %r14d
movq -0x30(%rbp), %rbx
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovll %r14d, %eax
testl %eax, %eax
je 0x558dd
cmpl $0x2, %eax
jne 0x558f3
movzbl (%r12), %ecx
movq 0x78(%r13), %rdx
movq 0x8(%rdx), %rdx
movq (%rdx,%rcx,8), %rcx
testq %rcx, %rcx
je 0x5594d
movzbl 0x1(%r12), %edx
jmp 0x55914
movzbl (%r12), %eax
incq %r12
movq -0x40(%rbp), %rcx
movb (%rcx,%rax), %al
movb %al, (%rbx)
jmp 0x55977
movzbl 0x1(%r12), %ecx
movq 0x78(%r13), %rdx
movq 0x8(%rdx), %rdx
movq 0x800(%rdx,%rcx,8), %rcx
testq %rcx, %rcx
je 0x5593c
movzbl 0x2(%r12), %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,4), %rcx
testq %rcx, %rcx
je 0x5593c
movq -0x38(%rbp), %rdx
movl (%rcx,%rdx), %ecx
cmpl $0x10000, %ecx # imm = 0x10000
jl 0x55965
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, (%rbx)
incq %rbx
jmp 0x5596d
cmpl $0x3, %eax
jne 0x5594d
movb (%r12), %al
incq %r12
movb %al, (%rbx)
incq %rbx
movb (%r12), %al
movb %al, (%rbx)
movb 0x1(%r12), %al
addq $0x2, %r12
movb %al, 0x1(%rbx)
addq $0x2, %rbx
jmp 0x5597a
cmpl $0x100, %ecx # imm = 0x100
jl 0x55972
movb %ch, (%rbx)
incq %rbx
addq %rax, %r12
movb %cl, (%rbx)
incq %rbx
cmpq %r15, %r12
jb 0x55899
subq -0x30(%rbp), %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_casefold_ujis:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], r8
mov rbx, rcx
mov [rbp+var_30], rcx
test rdx, rdx
jle loc_55983
mov r15, rdx
mov r12, rsi
mov r13, rdi
add r15, rsi
xor eax, eax
test r9, r9
setz al
shl eax, 2
mov [rbp+var_38], rax
xor r14d, r14d
mov rbx, [rbp+var_30]
loc_55899:
mov rax, [r13+0B8h]
mov rdi, r13
mov rsi, r12
mov rdx, r15
call qword ptr [rax+0C0h]
cmp eax, 2
cmovl eax, r14d
test eax, eax
jz short loc_558DD
cmp eax, 2
jnz short loc_558F3
movzx ecx, byte ptr [r12]
mov rdx, [r13+78h]
mov rdx, [rdx+8]
mov rcx, [rdx+rcx*8]
test rcx, rcx
jz short loc_5594D
movzx edx, byte ptr [r12+1]
jmp short loc_55914
loc_558DD:
movzx eax, byte ptr [r12]
inc r12
mov rcx, [rbp+var_40]
mov al, [rcx+rax]
mov [rbx], al
jmp loc_55977
loc_558F3:
movzx ecx, byte ptr [r12+1]
mov rdx, [r13+78h]
mov rdx, [rdx+8]
mov rcx, [rdx+rcx*8+800h]
test rcx, rcx
jz short loc_5593C
movzx edx, byte ptr [r12+2]
loc_55914:
lea rdx, [rdx+rdx*2]
lea rcx, [rcx+rdx*4]
test rcx, rcx
jz short loc_5593C
mov rdx, [rbp+var_38]
mov ecx, [rcx+rdx]
cmp ecx, offset stru_10000
jl short loc_55965
mov edx, ecx
shr edx, 10h
mov [rbx], dl
inc rbx
jmp short loc_5596D
loc_5593C:
cmp eax, 3
jnz short loc_5594D
mov al, [r12]
inc r12
mov [rbx], al
inc rbx
loc_5594D:
mov al, [r12]
mov [rbx], al
mov al, [r12+1]
add r12, 2
mov [rbx+1], al
add rbx, 2
jmp short loc_5597A
loc_55965:
cmp ecx, 100h
jl short loc_55972
loc_5596D:
mov [rbx], ch
inc rbx
loc_55972:
add r12, rax
mov [rbx], cl
loc_55977:
inc rbx
loc_5597A:
cmp r12, r15
jb loc_55899
loc_55983:
sub rbx, [rbp+var_30]
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BYTE * my_casefold_ujis(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
long long a6)
{
unsigned __int8 *v6; // rbx
unsigned __int8 *v7; // r12
unsigned long long v8; // r15
long long v9; // rax
long long v10; // rcx
long long v11; // rdx
long long v12; // rax
long long v13; // rcx
int v14; // ecx
unsigned __int8 v15; // al
unsigned __int8 v16; // al
long long v19; // [rsp+8h] [rbp-38h]
v6 = a4;
if ( a3 > 0 )
{
v7 = a2;
v8 = (unsigned long long)&a2[a3];
v19 = 4 * (unsigned int)(a6 == 0);
v6 = a4;
while ( 1 )
{
v9 = (*(long long ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v7,
v8);
if ( (int)v9 < 2 )
v9 = 0LL;
if ( !(_DWORD)v9 )
{
v12 = *v7++;
*v6 = *(_BYTE *)(a5 + v12);
goto LABEL_21;
}
if ( (_DWORD)v9 != 2 )
break;
v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * *v7);
if ( v10 )
{
v11 = v7[1];
LABEL_12:
v13 = v10 + 12 * v11;
if ( v13 )
{
v14 = *(_DWORD *)(v13 + v19);
if ( v14 >= (int)&stru_10000 )
{
*v6++ = BYTE2(v14);
goto LABEL_19;
}
if ( v14 >= 256 )
LABEL_19:
*v6++ = BYTE1(v14);
v7 += v9;
*v6 = v14;
LABEL_21:
++v6;
goto LABEL_22;
}
goto LABEL_15;
}
LABEL_17:
*v6 = *v7;
v16 = v7[1];
v7 += 2;
v6[1] = v16;
v6 += 2;
LABEL_22:
if ( (unsigned long long)v7 >= v8 )
return (_BYTE *)(v6 - a4);
}
v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * v7[1] + 2048);
if ( v10 )
{
v11 = v7[2];
goto LABEL_12;
}
LABEL_15:
if ( (_DWORD)v9 == 3 )
{
v15 = *v7++;
*v6++ = v15;
}
goto LABEL_17;
}
return (_BYTE *)(v6 - a4);
}
| my_casefold_ujis:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],R8
MOV RBX,RCX
MOV qword ptr [RBP + -0x30],RCX
TEST RDX,RDX
JLE 0x00155983
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
ADD R15,RSI
XOR EAX,EAX
TEST R9,R9
SETZ AL
SHL EAX,0x2
MOV qword ptr [RBP + -0x38],RAX
XOR R14D,R14D
MOV RBX,qword ptr [RBP + -0x30]
LAB_00155899:
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVL EAX,R14D
TEST EAX,EAX
JZ 0x001558dd
CMP EAX,0x2
JNZ 0x001558f3
MOVZX ECX,byte ptr [R12]
MOV RDX,qword ptr [R13 + 0x78]
MOV RDX,qword ptr [RDX + 0x8]
MOV RCX,qword ptr [RDX + RCX*0x8]
TEST RCX,RCX
JZ 0x0015594d
MOVZX EDX,byte ptr [R12 + 0x1]
JMP 0x00155914
LAB_001558dd:
MOVZX EAX,byte ptr [R12]
INC R12
MOV RCX,qword ptr [RBP + -0x40]
MOV AL,byte ptr [RCX + RAX*0x1]
MOV byte ptr [RBX],AL
JMP 0x00155977
LAB_001558f3:
MOVZX ECX,byte ptr [R12 + 0x1]
MOV RDX,qword ptr [R13 + 0x78]
MOV RDX,qword ptr [RDX + 0x8]
MOV RCX,qword ptr [RDX + RCX*0x8 + 0x800]
TEST RCX,RCX
JZ 0x0015593c
MOVZX EDX,byte ptr [R12 + 0x2]
LAB_00155914:
LEA RDX,[RDX + RDX*0x2]
LEA RCX,[RCX + RDX*0x4]
TEST RCX,RCX
JZ 0x0015593c
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RCX + RDX*0x1]
CMP ECX,0x10000
JL 0x00155965
MOV EDX,ECX
SHR EDX,0x10
MOV byte ptr [RBX],DL
INC RBX
JMP 0x0015596d
LAB_0015593c:
CMP EAX,0x3
JNZ 0x0015594d
MOV AL,byte ptr [R12]
INC R12
MOV byte ptr [RBX],AL
INC RBX
LAB_0015594d:
MOV AL,byte ptr [R12]
MOV byte ptr [RBX],AL
MOV AL,byte ptr [R12 + 0x1]
ADD R12,0x2
MOV byte ptr [RBX + 0x1],AL
ADD RBX,0x2
JMP 0x0015597a
LAB_00155965:
CMP ECX,0x100
JL 0x00155972
LAB_0015596d:
MOV byte ptr [RBX],CH
INC RBX
LAB_00155972:
ADD R12,RAX
MOV byte ptr [RBX],CL
LAB_00155977:
INC RBX
LAB_0015597a:
CMP R12,R15
JC 0x00155899
LAB_00155983:
SUB RBX,qword ptr [RBP + -0x30]
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casefold_ujis(long param_1,byte *param_2,long param_3,byte *param_4,long param_5,
long param_6)
{
byte *pbVar1;
byte bVar2;
uint uVar3;
int iVar4;
long lVar6;
byte *pbVar7;
byte *pbVar8;
ulong uVar5;
pbVar7 = param_4;
if (0 < param_3) {
pbVar8 = param_2 + param_3;
do {
uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,pbVar8);
uVar5 = (ulong)uVar3;
if ((int)uVar3 < 2) {
uVar5 = 0;
}
iVar4 = (int)uVar5;
if (iVar4 == 0) {
bVar2 = *param_2;
param_2 = param_2 + 1;
*pbVar7 = *(byte *)(param_5 + (ulong)bVar2);
LAB_00155977:
pbVar7 = pbVar7 + 1;
}
else {
if (iVar4 == 2) {
lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*param_2 * 8);
if (lVar6 != 0) {
bVar2 = param_2[1];
LAB_00155914:
lVar6 = lVar6 + (ulong)bVar2 * 0xc;
if (lVar6 == 0) goto LAB_0015593c;
iVar4 = *(int *)(lVar6 + (ulong)(param_6 == 0) * 4);
if (iVar4 < 0x10000) {
if (0xff < iVar4) goto LAB_0015596d;
}
else {
*pbVar7 = (byte)((uint)iVar4 >> 0x10);
pbVar7 = pbVar7 + 1;
LAB_0015596d:
*pbVar7 = (byte)((uint)iVar4 >> 8);
pbVar7 = pbVar7 + 1;
}
param_2 = param_2 + uVar5;
*pbVar7 = (byte)iVar4;
goto LAB_00155977;
}
}
else {
lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + 0x800 + (ulong)param_2[1] * 8
);
if (lVar6 != 0) {
bVar2 = param_2[2];
goto LAB_00155914;
}
LAB_0015593c:
if (iVar4 == 3) {
bVar2 = *param_2;
param_2 = param_2 + 1;
*pbVar7 = bVar2;
pbVar7 = pbVar7 + 1;
}
}
*pbVar7 = *param_2;
pbVar1 = param_2 + 1;
param_2 = param_2 + 2;
pbVar7[1] = *pbVar1;
pbVar7 = pbVar7 + 2;
}
} while (param_2 < pbVar8);
}
return (long)pbVar7 - (long)param_4;
}
| |
30,537 | minja::IfTemplateToken::~IfTemplateToken() | monkey531[P]llama/common/minja.hpp | IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {} | O3 | cpp | minja::IfTemplateToken::~IfTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x833c7(%rip), %rax # 0xdfb50
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x5c79e
callq 0x32e06
leaq 0x82a23(%rip), %rax # 0xdf1c8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x5c7ba
callq 0x32e06
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x186e0
| _ZN5minja15IfTemplateTokenD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_5C79E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5C79E:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_5C7BA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5C7BA:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void minja::IfTemplateToken::~IfTemplateToken(minja::IfTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::IfTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x40uLL);
}
| ~IfTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1dfb50]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x0015c79e
CALL 0x00132e06
LAB_0015c79e:
LEA RAX,[0x1df1c8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0015c7ba
CALL 0x00132e06
LAB_0015c7ba:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x001186e0
|
/* minja::IfTemplateToken::~IfTemplateToken() */
void __thiscall minja::IfTemplateToken::~IfTemplateToken(IfTemplateToken *this)
{
*(int ***)this = &PTR__IfTemplateToken_001dfb60;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_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 + 0x38));
}
*(int ***)this = &PTR__TemplateToken_001df1d8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_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 + 0x18));
}
operator_delete(this,0x40);
return;
}
| |
30,538 | lf_hash_search_using_hash_value | eloqsql/mysys/lf_hash.cc | void *lf_hash_search_using_hash_value(LF_HASH *hash, LF_PINS *pins,
my_hash_value_type hashnr,
const void *key, uint keylen)
{
LF_SLIST **el, *found;
uint bucket;
/* hide OOM errors - if we cannot initialize a bucket, try the previous one */
for (bucket= hashnr % hash->size; ;bucket= my_clear_highest_bit(bucket))
{
el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, bucket);
if (el && (*el || initialize_bucket(hash, el, bucket, pins) == 0))
break;
if (unlikely(bucket == 0))
return 0; /* if there's no bucket==0, the hash is empty */
}
found= l_search(el, hash->charset, my_reverse_bits(hashnr) | 1,
(uchar *)key, keylen, pins);
return found ? found+1 : 0;
} | O3 | cpp | lf_hash_search_using_hash_value:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, -0x2c(%rbp)
movq %rcx, -0x38(%rbp)
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %eax
xorl %edx, %edx
divl 0xc0(%rdi)
movl %edx, %r13d
movq %r14, %rdi
movl %r13d, %esi
callq 0x2f29a
testq %rax, %rax
jne 0x2f965
testl %r13d, %r13d
je 0x2fa19
movl %r13d, %eax
shrl %eax
movl %r13d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
orl %eax, %ecx
andl %ecx, %r13d
jmp 0x2f91e
movq %rax, %r15
cmpq $0x0, (%rax)
jne 0x2f983
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %rbx, %rcx
callq 0x2f5a8
testl %eax, %eax
jne 0x2f92e
movq 0xa8(%r14), %rsi
movl $0xff, %eax
movl %r12d, %ecx
andl %eax, %ecx
leaq 0xb22f5(%rip), %rdx # 0xe1c90
movzbl (%rdx,%rcx), %ecx
shll $0x18, %ecx
movl %r12d, %edi
shrl $0x8, %edi
andl %eax, %edi
movzbl (%rdx,%rdi), %edi
shll $0x10, %edi
orl %ecx, %edi
movl %r12d, %ecx
shrl $0x10, %ecx
andl %eax, %ecx
movzbl (%rdx,%rcx), %eax
shll $0x8, %eax
orl %edi, %eax
shrl $0x18, %r12d
movzbl (%rdx,%r12), %edx
orl %eax, %edx
orl $0x1, %edx
movl -0x2c(%rbp), %r8d
leaq -0x50(%rbp), %r9
movq %r15, %rdi
movq -0x38(%rbp), %rcx
pushq $0x0
pushq %rbx
callq 0x2faba
addq $0x10, %rsp
xorl %ecx, %ecx
movl $0x0, %edx
testl %eax, %eax
je 0x2f9fc
movq -0x48(%rbp), %rdx
movq %rdx, %rax
xchgq %rax, 0x10(%rbx)
xorl %eax, %eax
xchgq %rax, 0x8(%rbx)
xchgq %rcx, (%rbx)
leaq 0x20(%rdx), %rax
testq %rdx, %rdx
cmoveq %rdx, %rax
jmp 0x2fa1b
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| lf_hash_search_using_hash_value:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_2C], r8d
mov [rbp+var_38], rcx
mov r12d, edx
mov rbx, rsi
mov r14, rdi
mov eax, edx
xor edx, edx
div dword ptr [rdi+0C0h]
mov r13d, edx
loc_2F91E:
mov rdi, r14
mov esi, r13d
call lf_dynarray_lvalue
test rax, rax
jnz short loc_2F965
loc_2F92E:
test r13d, r13d
jz loc_2FA19
mov eax, r13d
shr eax, 1
mov ecx, r13d
shr ecx, 2
or ecx, eax
mov eax, ecx
shr eax, 2
or eax, ecx
mov ecx, eax
shr ecx, 4
or ecx, eax
mov eax, ecx
shr eax, 8
or eax, ecx
mov ecx, eax
shr ecx, 10h
or ecx, eax
and r13d, ecx
jmp short loc_2F91E
loc_2F965:
mov r15, rax
cmp qword ptr [rax], 0
jnz short loc_2F983
mov rdi, r14
mov rsi, r15
mov edx, r13d
mov rcx, rbx
call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *)
test eax, eax
jnz short loc_2F92E
loc_2F983:
mov rsi, [r14+0A8h]
mov eax, 0FFh
mov ecx, r12d
and ecx, eax
lea rdx, _my_bits_reverse_table
movzx ecx, byte ptr [rdx+rcx]
shl ecx, 18h
mov edi, r12d
shr edi, 8
and edi, eax
movzx edi, byte ptr [rdx+rdi]
shl edi, 10h
or edi, ecx
mov ecx, r12d
shr ecx, 10h
and ecx, eax
movzx eax, byte ptr [rdx+rcx]
shl eax, 8
or eax, edi
shr r12d, 18h
movzx edx, byte ptr [rdx+r12]
or edx, eax
or edx, 1
mov r8d, [rbp+var_2C]
lea r9, [rbp+var_50]
mov rdi, r15
mov rcx, [rbp+var_38]
push 0
push rbx
call _ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E; l_find(LF_SLIST **,charset_info_st const*,uint,uchar const*,ulong,CURSOR *,LF_PINS *,char (*)(void *,void *))
add rsp, 10h
xor ecx, ecx
mov edx, 0
test eax, eax
jz short loc_2F9FC
mov rdx, [rbp+var_48]
loc_2F9FC:
mov rax, rdx
xchg rax, [rbx+10h]
xor eax, eax
xchg rax, [rbx+8]
xchg rcx, [rbx]
lea rax, [rdx+20h]
test rdx, rdx
cmovz rax, rdx
jmp short loc_2FA1B
loc_2FA19:
xor eax, eax
loc_2FA1B:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long lf_hash_search_using_hash_value(
long long a1,
volatile long long *a2,
unsigned int a3,
long long a4,
int a5)
{
unsigned int i; // r13d
volatile signed long long *v7; // rax
int v8; // r15d
int v9; // eax
long long v10; // rdx
long long result; // rax
char v12; // [rsp+0h] [rbp-50h] BYREF
long long v13; // [rsp+8h] [rbp-48h]
long long v14; // [rsp+18h] [rbp-38h]
int v15; // [rsp+24h] [rbp-2Ch]
v15 = a5;
v14 = a4;
for ( i = a3 % *(_DWORD *)(a1 + 192);
;
i &= (i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2)) >> 4) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2)) >> 4)) >> 8) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2)) >> 4) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2)) >> 4)) >> 8)) >> 16) )
{
v7 = (volatile signed long long *)lf_dynarray_lvalue(a1, i);
if ( v7 )
{
v8 = (int)v7;
if ( *v7 || !(unsigned int)initialize_bucket(a1, v7, i, (long long)a2) )
break;
}
if ( !i )
return 0LL;
}
v9 = l_find(
v8,
*(_QWORD *)(a1 + 168),
(my_bits_reverse_table[(unsigned __int8)a3] << 24) | (my_bits_reverse_table[BYTE1(a3)] << 16) | (my_bits_reverse_table[BYTE2(a3)] << 8) | my_bits_reverse_table[HIBYTE(a3)] | 1u,
v14,
v15,
(unsigned int)&v12,
(long long)a2,
0LL);
v10 = 0LL;
if ( v9 )
v10 = v13;
_InterlockedExchange64(a2 + 2, v10);
_InterlockedExchange64(a2 + 1, 0LL);
_InterlockedExchange64(a2, 0LL);
result = v10 + 32;
if ( !v10 )
return 0LL;
return result;
}
| lf_hash_search_using_hash_value:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV dword ptr [RBP + -0x2c],R8D
MOV qword ptr [RBP + -0x38],RCX
MOV R12D,EDX
MOV RBX,RSI
MOV R14,RDI
MOV EAX,EDX
XOR EDX,EDX
DIV dword ptr [RDI + 0xc0]
MOV R13D,EDX
LAB_0012f91e:
MOV RDI,R14
MOV ESI,R13D
CALL 0x0012f29a
TEST RAX,RAX
JNZ 0x0012f965
LAB_0012f92e:
TEST R13D,R13D
JZ 0x0012fa19
MOV EAX,R13D
SHR EAX,0x1
MOV ECX,R13D
SHR ECX,0x2
OR ECX,EAX
MOV EAX,ECX
SHR EAX,0x2
OR EAX,ECX
MOV ECX,EAX
SHR ECX,0x4
OR ECX,EAX
MOV EAX,ECX
SHR EAX,0x8
OR EAX,ECX
MOV ECX,EAX
SHR ECX,0x10
OR ECX,EAX
AND R13D,ECX
JMP 0x0012f91e
LAB_0012f965:
MOV R15,RAX
CMP qword ptr [RAX],0x0
JNZ 0x0012f983
MOV RDI,R14
MOV RSI,R15
MOV EDX,R13D
MOV RCX,RBX
CALL 0x0012f5a8
TEST EAX,EAX
JNZ 0x0012f92e
LAB_0012f983:
MOV RSI,qword ptr [R14 + 0xa8]
MOV EAX,0xff
MOV ECX,R12D
AND ECX,EAX
LEA RDX,[0x1e1c90]
MOVZX ECX,byte ptr [RDX + RCX*0x1]
SHL ECX,0x18
MOV EDI,R12D
SHR EDI,0x8
AND EDI,EAX
MOVZX EDI,byte ptr [RDX + RDI*0x1]
SHL EDI,0x10
OR EDI,ECX
MOV ECX,R12D
SHR ECX,0x10
AND ECX,EAX
MOVZX EAX,byte ptr [RDX + RCX*0x1]
SHL EAX,0x8
OR EAX,EDI
SHR R12D,0x18
MOVZX EDX,byte ptr [RDX + R12*0x1]
OR EDX,EAX
OR EDX,0x1
MOV R8D,dword ptr [RBP + -0x2c]
LEA R9,[RBP + -0x50]
MOV RDI,R15
MOV RCX,qword ptr [RBP + -0x38]
PUSH 0x0
PUSH RBX
CALL 0x0012faba
ADD RSP,0x10
XOR ECX,ECX
MOV EDX,0x0
TEST EAX,EAX
JZ 0x0012f9fc
MOV RDX,qword ptr [RBP + -0x48]
LAB_0012f9fc:
MOV RAX,RDX
XCHG qword ptr [RBX + 0x10],RAX
XOR EAX,EAX
XCHG qword ptr [RBX + 0x8],RAX
XCHG qword ptr [RBX],RCX
LEA RAX,[RDX + 0x20]
TEST RDX,RDX
CMOVZ RAX,RDX
JMP 0x0012fa1b
LAB_0012fa19:
XOR EAX,EAX
LAB_0012fa1b:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long lf_hash_search_using_hash_value
(st_lf_hash *param_1,LF_PINS *param_2,uint param_3,uchar *param_4,uint param_5)
{
int iVar1;
LF_SLIST **ppLVar2;
uint uVar3;
long lVar4;
uint uVar5;
ulong uVar6;
CURSOR local_58 [8];
long local_50;
uchar *local_40;
uint local_34;
uVar6 = (ulong)param_3 % (ulong)*(uint *)(param_1 + 0xc0);
local_40 = param_4;
local_34 = param_5;
while( true ) {
uVar5 = (uint)uVar6;
ppLVar2 = (LF_SLIST **)lf_dynarray_lvalue(param_1,uVar6);
if ((ppLVar2 != (LF_SLIST **)0x0) &&
((*ppLVar2 != (LF_SLIST *)0x0 ||
(iVar1 = initialize_bucket(param_1,ppLVar2,uVar5,param_2), iVar1 == 0)))) break;
if (uVar5 == 0) {
return 0;
}
uVar3 = (uint)(uVar6 >> 2) | (uint)(uVar6 >> 1);
uVar3 = uVar3 >> 2 | uVar3;
uVar3 = uVar3 >> 4 | uVar3;
uVar3 = uVar3 >> 8 | uVar3;
uVar6 = (ulong)(uVar5 & (uVar3 >> 0x10 | uVar3));
}
iVar1 = l_find(ppLVar2,*(charset_info_st **)(param_1 + 0xa8),
(uint)(byte)_my_bits_reverse_table[param_3 >> 0x18] |
(uint)(byte)_my_bits_reverse_table[param_3 >> 0x10 & 0xff] << 8 |
(uint)(byte)_my_bits_reverse_table[param_3 >> 8 & 0xff] << 0x10 |
(uint)(byte)_my_bits_reverse_table[param_3 & 0xff] << 0x18 | 1,local_40,
(ulong)local_34,local_58,param_2,(_func_char_void_ptr_void_ptr *)0x0);
lVar4 = 0;
if (iVar1 != 0) {
lVar4 = local_50;
}
LOCK();
*(long *)(param_2 + 0x10) = lVar4;
UNLOCK();
LOCK();
*(int8 *)(param_2 + 8) = 0;
UNLOCK();
LOCK();
*(int8 *)param_2 = 0;
UNLOCK();
if (lVar4 != 0) {
return lVar4 + 0x20;
}
return 0;
}
| |
30,539 | transid_store_packed | eloqsql/storage/maria/ma_key.c | uint transid_store_packed(MARIA_HA *info, uchar *to, ulonglong trid)
{
uchar *start;
uint length;
uchar buff[8];
DBUG_ASSERT(trid < (1LL << (MARIA_MAX_PACK_TRANSID_SIZE*8)));
DBUG_ASSERT(trid >= info->s->state.create_trid);
trid= (trid - info->s->state.create_trid) << 1;
/* Mark that key contains transid */
to[-1]|= 1;
if (trid < MARIA_MIN_TRANSID_PACK_OFFSET)
{
to[0]= (uchar) trid;
return 1;
}
start= to;
/* store things in low-byte-first-order in buff */
to= buff;
do
{
*to++= (uchar) trid;
trid= trid>>8;
} while (trid);
length= (uint) (to - buff);
/* Store length prefix */
start[0]= (uchar) (length + MARIA_TRANSID_PACK_OFFSET);
start++;
/* Copy things in high-byte-first order to output buffer */
do
{
*start++= *--to;
} while (to != buff);
return length+1;
} | O0 | c | transid_store_packed:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
jmp 0x333b3
jmp 0x333b5
jmp 0x333b7
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
subq 0xe0(%rcx), %rax
shlq %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movzbl -0x1(%rax), %ecx
orl $0x1, %ecx
movb %cl, -0x1(%rax)
cmpq $0xf3, -0x30(%rbp)
jae 0x33400
movq -0x30(%rbp), %rax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x14(%rbp)
jmp 0x3349d
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
shrq $0x8, %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x33410
movq -0x28(%rbp), %rax
leaq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addl $0xf9, %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rbp)
movb -0x1(%rax), %cl
movq -0x38(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movb %cl, (%rax)
movq -0x28(%rbp), %rax
leaq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x33464
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x40(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x334be
movl -0x40(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| transid_store_packed:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
jmp short $+2
loc_333B3:
jmp short $+2
loc_333B5:
jmp short $+2
loc_333B7:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
sub rax, [rcx+0E0h]
shl rax, 1
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
movzx ecx, byte ptr [rax-1]
or ecx, 1
mov [rax-1], cl
cmp [rbp+var_30], 0F3h
jnb short loc_33400
mov rax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_28]
mov [rax], cl
mov [rbp+var_14], 1
jmp loc_3349D
loc_33400:
mov rax, [rbp+var_28]
mov [rbp+var_38], rax
lea rax, [rbp+var_10]
mov [rbp+var_28], rax
loc_33410:
mov rax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 1
mov [rbp+var_28], rdx
mov [rax], cl
mov rax, [rbp+var_30]
shr rax, 8
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_33410
mov rax, [rbp+var_28]
lea rcx, [rbp+var_10]
sub rax, rcx
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
add eax, 0F9h
mov cl, al
mov rax, [rbp+var_38]
mov [rax], cl
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
loc_33464:
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_28], rcx
mov cl, [rax-1]
mov rax, [rbp+var_38]
mov rdx, rax
add rdx, 1
mov [rbp+var_38], rdx
mov [rax], cl
mov rax, [rbp+var_28]
lea rcx, [rbp+var_10]
cmp rax, rcx
jnz short loc_33464
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_14], eax
loc_3349D:
mov eax, [rbp+var_14]
mov [rbp+var_40], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_334BE
mov eax, [rbp+var_40]
add rsp, 40h
pop rbp
retn
loc_334BE:
call ___stack_chk_fail
| long long transid_store_packed(long long a1, _BYTE *a2, long long a3)
{
char *v3; // rax
char *v4; // rax
char v5; // cl
_BYTE *v6; // rax
unsigned int v8; // [rsp+4h] [rbp-3Ch]
_BYTE *v9; // [rsp+8h] [rbp-38h]
unsigned long long v10; // [rsp+10h] [rbp-30h]
char *v11; // [rsp+18h] [rbp-28h]
char v13; // [rsp+30h] [rbp-10h] BYREF
unsigned long long v14; // [rsp+38h] [rbp-8h]
v14 = __readfsqword(0x28u);
v10 = 2 * (a3 - *(_QWORD *)(*(_QWORD *)a1 + 224LL));
*(a2 - 1) |= 1u;
if ( v10 >= 0xF3 )
{
v11 = &v13;
do
{
v3 = v11++;
*v3 = v10;
v10 >>= 8;
}
while ( v10 );
v8 = (_DWORD)v11 - (unsigned int)&v13;
*a2 = (_BYTE)v11 - (unsigned __int8)&v13 - 7;
v9 = a2 + 1;
do
{
v4 = v11--;
v5 = *(v4 - 1);
v6 = v9++;
*v6 = v5;
}
while ( v11 != &v13 );
return v8 + 1;
}
else
{
*a2 = v10;
return 1;
}
}
| transid_store_packed:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
JMP 0x001333b3
LAB_001333b3:
JMP 0x001333b5
LAB_001333b5:
JMP 0x001333b7
LAB_001333b7:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
SUB RAX,qword ptr [RCX + 0xe0]
SHL RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RAX + -0x1]
OR ECX,0x1
MOV byte ptr [RAX + -0x1],CL
CMP qword ptr [RBP + -0x30],0xf3
JNC 0x00133400
MOV RAX,qword ptr [RBP + -0x30]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x14],0x1
JMP 0x0013349d
LAB_00133400:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
LAB_00133410:
MOV RAX,qword ptr [RBP + -0x30]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00133410
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[RBP + -0x10]
SUB RAX,RCX
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0xf9
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
LAB_00133464:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x28],RCX
MOV CL,byte ptr [RAX + -0x1]
MOV RAX,qword ptr [RBP + -0x38]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x38],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[RBP + -0x10]
CMP RAX,RCX
JNZ 0x00133464
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
LAB_0013349d:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001334be
MOV EAX,dword ptr [RBP + -0x40]
ADD RSP,0x40
POP RBP
RET
LAB_001334be:
CALL 0x0012a270
|
int transid_store_packed(long *param_1,char *param_2,long param_3)
{
char *pcVar1;
long in_FS_OFFSET;
char *local_40;
ulong local_38;
char *local_30;
int local_1c;
char local_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_38 = (param_3 - *(long *)(*param_1 + 0xe0)) * 2;
param_2[-1] = param_2[-1] | 1;
if (local_38 < 0xf3) {
*param_2 = (char)local_38;
local_1c = 1;
}
else {
local_30 = local_18;
do {
pcVar1 = local_30 + 1;
*local_30 = (char)local_38;
local_38 = local_38 >> 8;
local_30 = pcVar1;
} while (local_38 != 0);
local_1c = (int)pcVar1 - (int)local_18;
*param_2 = (char)local_1c + -7;
local_40 = param_2 + 1;
do {
pcVar1 = local_30 + -1;
*local_40 = local_30[-1];
local_40 = local_40 + 1;
local_30 = pcVar1;
} while (pcVar1 != local_18);
local_1c = local_1c + 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_1c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
30,540 | my_delete | eloqsql/mysys/my_delete.c | int my_delete(const char *name, myf MyFlags)
{
int err;
DBUG_ENTER("my_delete");
DBUG_PRINT("my",("name %s MyFlags %lu", name, MyFlags));
#ifdef _WIN32
err = my_win_unlink(name);
#else
if (MyFlags & MY_NOSYMLINKS)
err= unlink_nosymlinks(name);
else
err= unlink(name);
#endif
if ((MyFlags & MY_IGNORE_ENOENT) && errno == ENOENT)
DBUG_RETURN(0);
if (err)
{
my_errno= errno;
if (MyFlags & (MY_FAE+MY_WME))
my_error(EE_DELETE, MYF(ME_BELL), name, errno);
}
else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(name, MyFlags))
err= -1;
DBUG_RETURN(err);
} | O3 | c | my_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
btl $0x9, %r14d
jb 0x58468
movq %rbx, %rdi
callq 0x28170
movl %eax, %r15d
jmp 0x5849d
leaq -0x2c(%rbp), %rsi
movq %rbx, %rdi
callq 0x5b254
testq %rax, %rax
je 0x58497
movl -0x2c(%rbp), %edi
movq %rax, %rsi
xorl %edx, %edx
callq 0x28230
movl %eax, %r15d
movl -0x2c(%rbp), %edi
testl %edi, %edi
js 0x5849d
callq 0x28740
jmp 0x5849d
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
testb $0x20, %r14b
je 0x584ad
callq 0x28050
cmpl $0x2, (%rax)
je 0x584eb
testl %r15d, %r15d
je 0x584e5
callq 0x28050
movq %rax, %r12
movl (%rax), %r13d
callq 0x5be8e
movl %r13d, (%rax)
testb $0x18, %r14b
je 0x58503
movl (%r12), %ecx
movl $0x4, %esi
movl $0x6, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x586b7
jmp 0x58503
testw %r14w, %r14w
js 0x584f0
xorl %r15d, %r15d
jmp 0x58503
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5b9af
xorl %r15d, %r15d
negl %eax
sbbl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
bt r14d, 9
jb short loc_58468
mov rdi, rbx
call _unlink
mov r15d, eax
jmp short loc_5849D
loc_58468:
lea rsi, [rbp+var_2C]
mov rdi, rbx
call my_open_parent_dir_nosymlinks
test rax, rax
jz short loc_58497
mov edi, [rbp+var_2C]
mov rsi, rax
xor edx, edx
call _unlinkat
mov r15d, eax
mov edi, [rbp+var_2C]
test edi, edi
js short loc_5849D
call _close
jmp short loc_5849D
loc_58497:
mov r15d, 0FFFFFFFFh
loc_5849D:
test r14b, 20h
jz short loc_584AD
call ___errno_location
cmp dword ptr [rax], 2
jz short loc_584EB
loc_584AD:
test r15d, r15d
jz short loc_584E5
call ___errno_location
mov r12, rax
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r14b, 18h
jz short loc_58503
mov ecx, [r12]
mov esi, 4
mov edi, 6
mov rdx, rbx
xor eax, eax
call my_error
jmp short loc_58503
loc_584E5:
test r14w, r14w
js short loc_584F0
loc_584EB:
xor r15d, r15d
jmp short loc_58503
loc_584F0:
mov rdi, rbx
mov rsi, r14
call my_sync_dir_by_file
xor r15d, r15d
neg eax
sbb r15d, r15d
loc_58503:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_delete(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rbx
unsigned int v4; // r15d
long long v5; // rax
_DWORD *v6; // r12
int v7; // r13d
int v8; // r8d
int v9; // r9d
unsigned int v11[11]; // [rsp+0h] [rbp-2Ch] BYREF
v11[0] = HIDWORD(v2);
v3 = a1;
if ( (a2 & 0x200) != 0 )
{
v5 = my_open_parent_dir_nosymlinks(a1, v11);
if ( v5 )
{
v4 = unlinkat(v11[0], v5, 0LL);
a1 = v11[0];
if ( (v11[0] & 0x80000000) == 0 )
close(v11[0]);
}
else
{
v4 = -1;
}
}
else
{
v4 = unlink(a1);
}
if ( (a2 & 0x20) != 0 && *(_DWORD *)__errno_location(a1) == 2 )
return 0;
if ( !v4 )
{
if ( (a2 & 0x8000u) != 0LL )
return (unsigned int)-((unsigned int)my_sync_dir_by_file(v3, a2) != 0);
return 0;
}
v6 = (_DWORD *)__errno_location(a1);
v7 = *v6;
*(_DWORD *)my_thread_var(a1) = v7;
if ( (a2 & 0x18) != 0 )
my_error(6, 4, v3, *v6, v8, v9);
return v4;
}
| my_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
BT R14D,0x9
JC 0x00158468
MOV RDI,RBX
CALL 0x00128170
MOV R15D,EAX
JMP 0x0015849d
LAB_00158468:
LEA RSI,[RBP + -0x2c]
MOV RDI,RBX
CALL 0x0015b254
TEST RAX,RAX
JZ 0x00158497
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,RAX
XOR EDX,EDX
CALL 0x00128230
MOV R15D,EAX
MOV EDI,dword ptr [RBP + -0x2c]
TEST EDI,EDI
JS 0x0015849d
CALL 0x00128740
JMP 0x0015849d
LAB_00158497:
MOV R15D,0xffffffff
LAB_0015849d:
TEST R14B,0x20
JZ 0x001584ad
CALL 0x00128050
CMP dword ptr [RAX],0x2
JZ 0x001584eb
LAB_001584ad:
TEST R15D,R15D
JZ 0x001584e5
CALL 0x00128050
MOV R12,RAX
MOV R13D,dword ptr [RAX]
CALL 0x0015be8e
MOV dword ptr [RAX],R13D
TEST R14B,0x18
JZ 0x00158503
MOV ECX,dword ptr [R12]
MOV ESI,0x4
MOV EDI,0x6
MOV RDX,RBX
XOR EAX,EAX
CALL 0x001586b7
JMP 0x00158503
LAB_001584e5:
TEST R14W,R14W
JS 0x001584f0
LAB_001584eb:
XOR R15D,R15D
JMP 0x00158503
LAB_001584f0:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0015b9af
XOR R15D,R15D
NEG EAX
SBB R15D,R15D
LAB_00158503:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_delete(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
int8 in_RAX;
char *__name;
int *piVar3;
int *piVar4;
int local_34;
local_34 = (int)((ulong)in_RAX >> 0x20);
if (((uint)param_2 >> 9 & 1) == 0) {
iVar2 = unlink(param_1);
}
else {
__name = (char *)my_open_parent_dir_nosymlinks(param_1,&local_34);
if (__name == (char *)0x0) {
iVar2 = -1;
}
else {
iVar2 = unlinkat(local_34,__name,0);
if (-1 < local_34) {
close(local_34);
}
}
}
if (((param_2 & 0x20) == 0) || (piVar3 = __errno_location(), *piVar3 != 2)) {
if (iVar2 != 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if ((param_2 & 0x18) == 0) {
return iVar2;
}
my_error(6,4,param_1,*piVar3);
return iVar2;
}
if ((short)param_2 < 0) {
iVar2 = my_sync_dir_by_file(param_1,param_2);
return -(uint)(iVar2 != 0);
}
}
return 0;
}
| |
30,541 | minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&) | monkey531[P]llama/common/minja.hpp | static std::shared_ptr<TemplateNode> parse(const std::string& template_str, const Options & options) {
Parser parser(std::make_shared<std::string>(normalize_newlines(template_str)), options);
auto tokens = parser.tokenize();
TemplateTokenIterator begin = tokens.begin();
auto it = begin;
TemplateTokenIterator end = tokens.end();
return parser.parseTemplate(begin, it, end, /* full= */ true);
} | O0 | cpp | minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&):
subq $0xf8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq 0xe8(%rsp), %rsi
leaq 0x80(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x14e350
movq 0x28(%rsp), %rsi
leaq 0xa0(%rsp), %rdi
callq 0x14e2d0
jmp 0x14c33a
movq 0xe0(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x14e380
jmp 0x14c359
leaq 0xa0(%rsp), %rdi
callq 0x14e4f0
leaq 0x80(%rsp), %rdi
callq 0x62cf8
leaq 0x58(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x14e500
jmp 0x14c387
leaq 0x58(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x151460
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0x48(%rsp), %rsi
callq 0x151490
movq (%rsp), %rdi
movq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
callq 0x1514d0
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x30(%rsp), %rsi
callq 0x151490
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %r8
leaq 0xb0(%rsp), %rsi
leaq 0x40(%rsp), %rcx
movl $0x1, %r9d
callq 0x151500
jmp 0x14c403
leaq 0x58(%rsp), %rdi
callq 0x153990
leaq 0xb0(%rsp), %rdi
callq 0x1539f0
movq 0x20(%rsp), %rax
addq $0xf8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x14c452
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x14e4f0
leaq 0x80(%rsp), %rdi
callq 0x62cf8
jmp 0x14c496
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x14c489
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x153990
leaq 0xb0(%rsp), %rdi
callq 0x1539f0
movq 0x78(%rsp), %rdi
callq 0x61ff0
| _ZN5minja6Parser5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7OptionsE:
sub rsp, 0F8h
mov qword ptr [rsp+0F8h+var_E0], rdi; int
mov rax, rdi
mov qword ptr [rsp+0F8h+var_D8], rax; int
mov qword ptr [rsp+0F8h+var_8], rdi; int
mov [rsp+0F8h+var_10], rsi; void *
mov qword ptr [rsp+0F8h+var_18], rdx; int
mov rsi, [rsp+0F8h+var_10]
lea rdi, [rsp+0F8h+var_78]
mov [rsp+0F8h+var_D0], rdi; void *
call _ZN5minja18normalize_newlinesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::normalize_newlines(std::string const&)
mov rsi, [rsp+0F8h+var_D0]
lea rdi, [rsp+0F8h+var_58]
call _ZSt11make_sharedINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS5_EESt10shared_ptrIT_EDpOT0_; std::make_shared<std::string,std::string>(std::string &&)
jmp short $+2
loc_14C33A:
mov rdx, qword ptr [rsp+0F8h+var_18]
lea rdi, [rsp+0F8h+var_48]
lea rsi, [rsp+0F8h+var_58]
call _ZN5minja6ParserC2ERKSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNS_7OptionsE; minja::Parser::Parser(std::shared_ptr<std::string> const&,minja::Options const&)
jmp short $+2
loc_14C359:
lea rdi, [rsp+0F8h+var_58]
call _ZNSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::shared_ptr<std::string>::~shared_ptr()
lea rdi, [rsp+0F8h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_A0]; this
lea rsi, [rsp+0F8h+var_48]
call _ZN5minja6Parser8tokenizeEv; minja::Parser::tokenize(void)
jmp short $+2
loc_14C387:
lea rdi, [rsp+0F8h+var_A0]
mov qword ptr [rsp+0F8h+var_F8], rdi; int
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EE5beginEv; std::vector<std::unique_ptr<minja::TemplateToken>>::begin(void)
mov qword ptr [rsp+0F8h+var_B0], rax; int
lea rdi, [rsp+0F8h+var_A8]
mov qword ptr [rsp+0F8h+var_F0], rdi; int
lea rsi, [rsp+0F8h+var_B0]
call _ZN9__gnu_cxx17__normal_iteratorIPKSt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS3_EESt6vectorIS6_SaIS6_EEEC2IPS6_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISF_SE_EE7__valueESB_E6__typeEEE
mov rdi, qword ptr [rsp+0F8h+var_F8]
mov rax, qword ptr [rsp+0F8h+var_A8]
mov qword ptr [rsp+0F8h+var_B8], rax; int
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EE3endEv; std::vector<std::unique_ptr<minja::TemplateToken>>::end(void)
mov qword ptr [rsp+0F8h+var_C8], rax; int
lea rdi, [rsp+0F8h+var_C0]
mov qword ptr [rsp+0F8h+var_E8], rdi; int
lea rsi, [rsp+0F8h+var_C8]
call _ZN9__gnu_cxx17__normal_iteratorIPKSt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS3_EESt6vectorIS6_SaIS6_EEEC2IPS6_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISF_SE_EE7__valueESB_E6__typeEEE
mov rdi, qword ptr [rsp+0F8h+var_E0]; int
mov rdx, qword ptr [rsp+0F8h+var_F0]; int
mov r8, qword ptr [rsp+0F8h+var_E8]; int
lea rsi, [rsp+0F8h+var_48]; int
lea rcx, [rsp+0F8h+var_B8]; int
mov r9d, 1; int
call _ZNK5minja6Parser13parseTemplateERKN9__gnu_cxx17__normal_iteratorIPKSt10unique_ptrINS_13TemplateTokenESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEERSD_SF_b; minja::Parser::parseTemplate(__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>>&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,bool)
jmp short $+2
loc_14C403:
lea rdi, [rsp+0F8h+var_A0]
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector()
lea rdi, [rsp+0F8h+var_48]; this
call _ZN5minja6ParserD2Ev; minja::Parser::~Parser()
mov rax, qword ptr [rsp+0F8h+var_D8]
add rsp, 0F8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
jmp short loc_14C452
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
lea rdi, [rsp+arg_98]
call _ZNSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::shared_ptr<std::string>::~shared_ptr()
loc_14C452:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_14C496
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
jmp short loc_14C489
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
lea rdi, [rsp+arg_50]
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector()
loc_14C489:
lea rdi, [rsp+arg_A8]; this
call _ZN5minja6ParserD2Ev; minja::Parser::~Parser()
loc_14C496:
mov rdi, [rsp+arg_70]
call __Unwind_Resume
| long long minja::Parser::parse(long long a1, void *a2, long long a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v11[2]; // [rsp+30h] [rbp-C8h] BYREF
int v12; // [rsp+38h] [rbp-C0h] BYREF
int v13[2]; // [rsp+40h] [rbp-B8h] BYREF
int v14[2]; // [rsp+48h] [rbp-B0h] BYREF
int v15[2]; // [rsp+50h] [rbp-A8h] BYREF
int v16[10]; // [rsp+58h] [rbp-A0h] BYREF
_BYTE v17[32]; // [rsp+80h] [rbp-78h] BYREF
_BYTE v18[16]; // [rsp+A0h] [rbp-58h] BYREF
int v19[12]; // [rsp+B0h] [rbp-48h] BYREF
int v20[2]; // [rsp+E0h] [rbp-18h]
void *v21; // [rsp+E8h] [rbp-10h]
int v22[2]; // [rsp+F0h] [rbp-8h]
*(_QWORD *)v22 = a1;
v21 = a2;
*(_QWORD *)v20 = a3;
minja::normalize_newlines(v17, a2);
std::make_shared<std::string,std::string>((unsigned int)v18, (unsigned int)v17, v3, v4, v5, v6);
minja::Parser::Parser((unsigned int)v19, (unsigned int)v18, v20[0], v7, v8, v9);
std::shared_ptr<std::string>::~shared_ptr(v18);
std::string::~string(v17);
minja::Parser::tokenize((minja::Parser *)v16);
*(_QWORD *)v14 = std::vector<std::unique_ptr<minja::TemplateToken>>::begin(v16, v19);
__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>>::__normal_iterator<std::unique_ptr<minja::TemplateToken>*>(
v15,
v14);
*(_QWORD *)v13 = *(_QWORD *)v15;
*(_QWORD *)v11 = std::vector<std::unique_ptr<minja::TemplateToken>>::end(v16);
__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>>::__normal_iterator<std::unique_ptr<minja::TemplateToken>*>(
&v12,
v11);
minja::Parser::parseTemplate(a1, v19, v15, v13, &v12, 1LL);
std::vector<std::unique_ptr<minja::TemplateToken>>::~vector(v16);
minja::Parser::~Parser((minja::Parser *)v19);
return a1;
}
| |||
30,542 | minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&) | monkey531[P]llama/common/minja.hpp | static std::shared_ptr<TemplateNode> parse(const std::string& template_str, const Options & options) {
Parser parser(std::make_shared<std::string>(normalize_newlines(template_str)), options);
auto tokens = parser.tokenize();
TemplateTokenIterator begin = tokens.begin();
auto it = begin;
TemplateTokenIterator end = tokens.end();
return parser.parseTemplate(begin, it, end, /* full= */ true);
} | O2 | cpp | minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x27120
movq %rsp, %rdi
movq %r15, %rsi
callq 0x7933c
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
movq %r14, %rdx
callq 0x7935a
leaq 0x8(%rsp), %rdi
callq 0x4d966
leaq 0x10(%rsp), %rdi
callq 0x27998
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x79402
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rsi
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x38(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x30(%rsp), %r8
movq %rsi, (%r8)
leaq 0x40(%rsp), %rsi
pushq $0x1
popq %r9
movq %rbx, %rdi
callq 0x7b1a2
leaq 0x10(%rsp), %rdi
callq 0x7c0c2
leaq 0x48(%rsp), %rdi
callq 0x4d966
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7c0c2
jmp 0x7887a
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4d966
jmp 0x788a2
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4d966
jmp 0x78898
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x27998
movq %rbx, %rdi
callq 0x27660
| _ZN5minja6Parser5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7OptionsE:
push r15
push r14
push rbx
sub rsp, 70h
mov r14, rdx
mov rbx, rdi
lea r15, [rsp+88h+var_78]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov rdi, rsp
mov rsi, r15
call _ZSt11make_sharedINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS5_EESt10shared_ptrIT_EDpOT0_; std::make_shared<std::string,std::string>(std::string &&)
lea rdi, [rsp+88h+var_48]
mov rsi, rsp
mov rdx, r14
call _ZN5minja6ParserC2ERKSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNS_7OptionsE; minja::Parser::Parser(std::shared_ptr<std::string> const&,minja::Options const&)
lea rdi, [rsp+88h+var_80]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_78]; this
lea rsi, [rsp+88h+var_48]
call _ZN5minja6Parser8tokenizeEv; minja::Parser::tokenize(void)
mov rax, [rsp+88h+var_78]
mov rsi, [rsp+88h+var_70]
mov rdx, rsp
mov [rdx], rax
lea rcx, [rsp+88h+var_50]
mov [rcx], rax
lea r8, [rsp+88h+var_58]
mov [r8], rsi
lea rsi, [rsp+88h+var_48]
push 1
pop r9
mov rdi, rbx
call _ZNK5minja6Parser13parseTemplateERKN9__gnu_cxx17__normal_iteratorIPKSt10unique_ptrINS_13TemplateTokenESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEERSD_SF_b; minja::Parser::parseTemplate(__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>>&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,bool)
lea rdi, [rsp+88h+var_78]
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector()
lea rdi, [rsp+88h+var_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 70h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_8]
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector()
jmp short loc_7887A
mov rbx, rax
loc_7887A:
lea rdi, [rsp+arg_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_788A2
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_78898
mov rbx, rax
loc_78898:
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_788A2:
mov rdi, rbx
call __Unwind_Resume
| long long minja::Parser::parse(long long a1, long long a2, long long a3)
{
long long v5; // [rsp+0h] [rbp-88h] BYREF
long long v6; // [rsp+8h] [rbp-80h] BYREF
_QWORD v7[4]; // [rsp+10h] [rbp-78h] BYREF
long long v8; // [rsp+30h] [rbp-58h] BYREF
long long v9; // [rsp+38h] [rbp-50h] BYREF
_BYTE v10[8]; // [rsp+40h] [rbp-48h] BYREF
_QWORD v11[8]; // [rsp+48h] [rbp-40h] BYREF
std::string::basic_string(v7, a2);
std::make_shared<std::string,std::string>(&v5, v7);
minja::Parser::Parser(v10, &v5, a3);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v6);
std::string::~string(v7);
minja::Parser::tokenize((minja::Parser *)v7);
v5 = v7[0];
v9 = v7[0];
v8 = v7[1];
((void ( *)(long long, _BYTE *, long long *, long long *, long long *, long long))minja::Parser::parseTemplate)(
a1,
v10,
&v5,
&v9,
&v8,
1LL);
std::vector<std::unique_ptr<minja::TemplateToken>>::~vector(v7);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v11);
return a1;
}
| parse:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV R14,RDX
MOV RBX,RDI
LEA R15,[RSP + 0x10]
MOV RDI,R15
CALL 0x00127120
LAB_001787d8:
MOV RDI,RSP
MOV RSI,R15
CALL 0x0017933c
LAB_001787e3:
LEA RDI,[RSP + 0x40]
MOV RSI,RSP
MOV RDX,R14
CALL 0x0017935a
LEA RDI,[RSP + 0x8]
CALL 0x0014d966
LEA RDI,[RSP + 0x10]
CALL 0x00127998
LAB_00178807:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x40]
CALL 0x00179402
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LEA RCX,[RSP + 0x38]
MOV qword ptr [RCX],RAX
LEA R8,[RSP + 0x30]
MOV qword ptr [R8],RSI
LAB_00178836:
LEA RSI,[RSP + 0x40]
PUSH 0x1
POP R9
MOV RDI,RBX
CALL 0x0017b1a2
LAB_00178847:
LEA RDI,[RSP + 0x10]
CALL 0x0017c0c2
LEA RDI,[RSP + 0x48]
CALL 0x0014d966
MOV RAX,RBX
ADD RSP,0x70
POP RBX
POP R14
POP R15
RET
|
/* minja::Parser::parse(std::__cxx11::string const&, minja::Options const&) */
Parser * __thiscall minja::Parser::parse(Parser *this,string *param_1,Options *param_2)
{
int8 local_88;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_80 [8];
int8 local_78;
int8 local_70;
int8 local_58;
int8 local_50;
Parser local_48 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [40];
std::__cxx11::string::string((string *)&local_78,param_1);
/* try { // try from 001787d8 to 001787e2 has its CatchHandler @ 00178895 */
std::make_shared<std::__cxx11::string,std::__cxx11::string>((string *)&local_88);
/* try { // try from 001787e3 to 001787f2 has its CatchHandler @ 00178886 */
Parser(local_48,(shared_ptr *)&local_88,param_2);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_80);
std::__cxx11::string::~string((string *)&local_78);
/* try { // try from 00178807 to 00178815 has its CatchHandler @ 00178877 */
tokenize();
local_88 = local_78;
local_50 = local_78;
local_58 = local_70;
/* try { // try from 00178836 to 00178846 has its CatchHandler @ 00178868 */
parseTemplate(this,local_48,(__normal_iterator *)&local_88,SUB81(&local_50,0));
std::
vector<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>,std::allocator<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>>>
::~vector((vector<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>,std::allocator<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>>>
*)&local_78);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40);
return this;
}
| |
30,543 | my_end | eloqsql/mysys/my_init.c | void my_end(int infoflag)
{
/*
this code is suboptimal to workaround a bug in
Sun CC: Sun C++ 5.6 2004/06/02 for x86, and should not be
optimized until this compiler is not in use anymore
*/
FILE *info_file= DBUG_FILE;
my_bool print_info= (info_file != stderr);
if (!my_init_done)
return;
/*
We do not use DBUG_ENTER here, as after cleanup DBUG is no longer
operational, so we cannot use DBUG_RETURN.
*/
DBUG_PRINT("info",("Shutting down: infoflag: %d print_info: %d",
infoflag, print_info));
if (!info_file)
{
info_file= stderr;
print_info= 0;
}
if ((infoflag & MY_CHECK_ERROR) || print_info)
{ /* Test if some file is left open */
char ebuff[512];
uint i, open_files, open_streams;
for (open_streams= open_files= i= 0 ; i < my_file_limit ; i++)
{
if (my_file_info[i].type == UNOPEN)
continue;
if (my_file_info[i].type == STREAM_BY_FOPEN ||
my_file_info[i].type == STREAM_BY_FDOPEN)
open_streams++;
else
open_files++;
#ifdef EXTRA_DEBUG
fprintf(stderr, EE(EE_FILE_NOT_CLOSED), my_file_info[i].name, i);
fputc('\n', stderr);
#endif
}
if (open_files || open_streams)
{
my_snprintf(ebuff, sizeof(ebuff), EE(EE_OPEN_WARNING),
open_files, open_streams);
my_message_stderr(EE_OPEN_WARNING, ebuff, ME_BELL);
DBUG_PRINT("error", ("%s", ebuff));
}
#ifdef CHECK_UNLIKELY
end_my_likely(info_file);
#endif
}
free_charsets();
my_error_unregister_all();
my_once_free();
if ((infoflag & MY_GIVE_INFO) || print_info)
{
#ifdef HAVE_GETRUSAGE
struct rusage rus;
#ifdef HAVE_valgrind
/* Purify assumes that rus is uninitialized after getrusage call */
bzero((char*) &rus, sizeof(rus));
#endif
if (!getrusage(RUSAGE_SELF, &rus))
fprintf(info_file,"\n\
User time %.2f, System time %.2f\n\
Maximum resident set size %ld, Integral resident set size %ld\n\
Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n\
Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n\
Voluntary context switches %ld, Involuntary context switches %ld\n",
(rus.ru_utime.tv_sec * SCALE_SEC +
rus.ru_utime.tv_usec / SCALE_USEC) / 100.0,
(rus.ru_stime.tv_sec * SCALE_SEC +
rus.ru_stime.tv_usec / SCALE_USEC) / 100.0,
rus.ru_maxrss, rus.ru_idrss,
rus.ru_minflt, rus.ru_majflt,
rus.ru_nswap, rus.ru_inblock, rus.ru_oublock,
rus.ru_msgsnd, rus.ru_msgrcv, rus.ru_nsignals,
rus.ru_nvcsw, rus.ru_nivcsw);
#endif
#if defined(_MSC_VER)
_CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );
_CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR );
_CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE );
_CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDERR );
_CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE );
_CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR );
_CrtCheckMemory();
#endif
}
my_thread_end();
my_thread_global_end();
if (!(infoflag & MY_DONT_FREE_DBUG))
DBUG_END(); /* Must be done as late as possible */
my_mutex_end();
#if defined(SAFE_MUTEX)
/*
Check on destroying of mutexes. A few may be left that will get cleaned
up by C++ destructors
*/
safe_mutex_end((infoflag & (MY_GIVE_INFO | MY_CHECK_ERROR)) ? stderr :
(FILE *) 0);
#endif /* defined(SAFE_MUTEX) */
#ifdef _WIN32
WSACleanup();
#endif
/* At very last, delete mysys key, it is used everywhere including DBUG */
pthread_key_delete(THR_KEY_mysys);
my_init_done= my_thr_key_mysys_exists= 0;
} | O0 | c | my_end:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp # imm = 0x308
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movl %edi, -0x234(%rbp)
movq 0x1ca77a(%rip), %rax # 0x2bdfd8
movq (%rax), %rax
movq %rax, -0x240(%rbp)
movq -0x240(%rbp), %rax
movq 0x1ca762(%rip), %rcx # 0x2bdfd8
cmpq (%rcx), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x241(%rbp)
leaq 0xb8fe72(%rip), %rax # 0xc83700
cmpb $0x0, (%rax)
jne 0xf3898
jmp 0xf3b91
jmp 0xf389a
jmp 0xf389c
cmpq $0x0, -0x240(%rbp)
jne 0xf38be
movq 0x1ca72b(%rip), %rax # 0x2bdfd8
movq (%rax), %rax
movq %rax, -0x240(%rbp)
movb $0x0, -0x241(%rbp)
movl -0x234(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xf38dc
movsbl -0x241(%rbp), %eax
cmpl $0x0, %eax
je 0xf39fa
movl $0x0, -0x248(%rbp)
movl $0x0, -0x24c(%rbp)
movl $0x0, -0x250(%rbp)
movl -0x248(%rbp), %eax
leaq 0x1cd429(%rip), %rcx # 0x2c0d30
cmpl (%rcx), %eax
jae 0xf399e
leaq 0x1cd422(%rip), %rax # 0x2c0d38
movq (%rax), %rax
movl -0x248(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jne 0xf392e
jmp 0xf398a
leaq 0x1cd403(%rip), %rax # 0x2c0d38
movq (%rax), %rax
movl -0x248(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x3, 0x8(%rax)
je 0xf3968
leaq 0x1cd3e6(%rip), %rax # 0x2c0d38
movq (%rax), %rax
movl -0x248(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x4, 0x8(%rax)
jne 0xf3979
movl -0x250(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x250(%rbp)
jmp 0xf3988
movl -0x24c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24c(%rbp)
jmp 0xf398a
movl -0x248(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x248(%rbp)
jmp 0xf38fa
cmpl $0x0, -0x24c(%rbp)
jne 0xf39b0
cmpl $0x0, -0x250(%rbp)
je 0xf39f8
leaq -0x230(%rbp), %rdi
leaq 0x1cd892(%rip), %rax # 0x2c1250
movq 0x90(%rax), %rdx
movl -0x24c(%rbp), %ecx
movl -0x250(%rbp), %r8d
movl $0x200, %esi # imm = 0x200
movb $0x0, %al
callq 0x14e140
leaq -0x230(%rbp), %rsi
movl $0x13, %edi
movl $0x4, %edx
callq 0xf4c70
jmp 0xf39f6
jmp 0xf39f8
jmp 0xf39fa
callq 0xdc540
callq 0xf0c70
callq 0xf50c0
movl -0x234(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0xf3a27
movsbl -0x241(%rbp), %eax
cmpl $0x0, %eax
je 0xf3b4c
xorl %edi, %edi
leaq -0x2e0(%rbp), %rsi
callq 0x2a880
cmpl $0x0, %eax
jne 0xf3b4a
movq -0x240(%rbp), %rdi
imulq $0x64, -0x2e0(%rbp), %rax
movq %rax, -0x2f0(%rbp)
movq -0x2d8(%rbp), %rax
movl $0x2710, %ecx # imm = 0x2710
cqto
idivq %rcx
movq %rax, %rcx
movq -0x2f0(%rbp), %rax
addq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd 0x66451(%rip), %xmm1 # 0x159ed0
divsd %xmm1, %xmm0
imulq $0x64, -0x2d0(%rbp), %rax
movq %rax, -0x2e8(%rbp)
movq -0x2c8(%rbp), %rax
movl $0x2710, %ecx # imm = 0x2710
cqto
idivq %rcx
movq %rax, %rcx
movq -0x2e8(%rbp), %rax
addq %rcx, %rax
cvtsi2sd %rax, %xmm1
movsd 0x66413(%rip), %xmm2 # 0x159ed0
divsd %xmm2, %xmm1
movq -0x2c0(%rbp), %rdx
movq -0x2b0(%rbp), %rcx
movq -0x2a0(%rbp), %r8
movq -0x298(%rbp), %r9
movq -0x290(%rbp), %r13
movq -0x288(%rbp), %r12
movq -0x280(%rbp), %r15
movq -0x278(%rbp), %r14
movq -0x270(%rbp), %rbx
movq -0x268(%rbp), %r11
movq -0x260(%rbp), %r10
movq -0x258(%rbp), %rax
leaq 0x618b0(%rip), %rsi # 0x1553cc
movq %r13, (%rsp)
movq %r12, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq %rbx, 0x20(%rsp)
movq %r11, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movb $0x2, %al
callq 0x2a170
jmp 0xf3b4c
callq 0xf7450
callq 0xf71c0
movl -0x234(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0xf3b6a
jmp 0xf3b66
jmp 0xf3b68
jmp 0xf3b6a
callq 0xfad50
leaq 0xb9088e(%rip), %rax # 0xc84404
movl (%rax), %edi
callq 0x2a710
leaq 0xb905b8(%rip), %rax # 0xc8413c
movb $0x0, (%rax)
leaq 0xb8fb72(%rip), %rax # 0xc83700
movb $0x0, (%rax)
movq %fs:0x28, %rax
movq -0x30(%rbp), %rcx
cmpq %rcx, %rax
jne 0xf3bb5
addq $0x308, %rsp # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a260
nopw (%rax,%rax)
| my_end:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 308h
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_234], edi
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rbp+var_240], rax
mov rax, [rbp+var_240]
mov rcx, cs:stderr_ptr
cmp rax, [rcx]
setnz al
and al, 1
movzx eax, al
mov [rbp+var_241], al
lea rax, my_init_done
cmp byte ptr [rax], 0
jnz short loc_F3898
jmp loc_F3B91
loc_F3898:
jmp short $+2
loc_F389A:
jmp short $+2
loc_F389C:
cmp [rbp+var_240], 0
jnz short loc_F38BE
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rbp+var_240], rax
mov [rbp+var_241], 0
loc_F38BE:
mov eax, [rbp+var_234]
and eax, 1
cmp eax, 0
jnz short loc_F38DC
movsx eax, [rbp+var_241]
cmp eax, 0
jz loc_F39FA
loc_F38DC:
mov [rbp+var_248], 0
mov [rbp+var_24C], 0
mov [rbp+var_250], 0
loc_F38FA:
mov eax, [rbp+var_248]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb loc_F399E
lea rax, my_file_info
mov rax, [rax]
mov ecx, [rbp+var_248]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 0
jnz short loc_F392E
jmp short loc_F398A
loc_F392E:
lea rax, my_file_info
mov rax, [rax]
mov ecx, [rbp+var_248]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 3
jz short loc_F3968
lea rax, my_file_info
mov rax, [rax]
mov ecx, [rbp+var_248]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 4
jnz short loc_F3979
loc_F3968:
mov eax, [rbp+var_250]
add eax, 1
mov [rbp+var_250], eax
jmp short loc_F3988
loc_F3979:
mov eax, [rbp+var_24C]
add eax, 1
mov [rbp+var_24C], eax
loc_F3988:
jmp short $+2
loc_F398A:
mov eax, [rbp+var_248]
add eax, 1
mov [rbp+var_248], eax
jmp loc_F38FA
loc_F399E:
cmp [rbp+var_24C], 0
jnz short loc_F39B0
cmp [rbp+var_250], 0
jz short loc_F39F8
loc_F39B0:
lea rdi, [rbp+var_230]
lea rax, globerrs
mov rdx, [rax+90h]
mov ecx, [rbp+var_24C]
mov r8d, [rbp+var_250]
mov esi, 200h
mov al, 0
call my_snprintf
lea rsi, [rbp+var_230]
mov edi, 13h
mov edx, 4
call my_message_stderr
jmp short $+2
loc_F39F6:
jmp short $+2
loc_F39F8:
jmp short $+2
loc_F39FA:
call free_charsets
call my_error_unregister_all
call my_once_free
mov eax, [rbp+var_234]
and eax, 2
cmp eax, 0
jnz short loc_F3A27
movsx eax, [rbp+var_241]
cmp eax, 0
jz loc_F3B4C
loc_F3A27:
xor edi, edi
lea rsi, [rbp+var_2E0]
call _getrusage
cmp eax, 0
jnz loc_F3B4A
mov rdi, [rbp+var_240]
imul rax, [rbp+var_2E0], 64h ; 'd'
mov [rbp+var_2F0], rax
mov rax, [rbp+var_2D8]
mov ecx, 2710h
cqo
idiv rcx
mov rcx, rax
mov rax, [rbp+var_2F0]
add rax, rcx
cvtsi2sd xmm0, rax
movsd xmm1, cs:qword_159ED0
divsd xmm0, xmm1
imul rax, [rbp+var_2D0], 64h ; 'd'
mov [rbp+var_2E8], rax
mov rax, [rbp+var_2C8]
mov ecx, 2710h
cqo
idiv rcx
mov rcx, rax
mov rax, [rbp+var_2E8]
add rax, rcx
cvtsi2sd xmm1, rax
movsd xmm2, cs:qword_159ED0
divsd xmm1, xmm2
mov rdx, [rbp+var_2C0]
mov rcx, [rbp+var_2B0]
mov r8, [rbp+var_2A0]
mov r9, [rbp+var_298]
mov r13, [rbp+var_290]
mov r12, [rbp+var_288]
mov r15, [rbp+var_280]
mov r14, [rbp+var_278]
mov rbx, [rbp+var_270]
mov r11, [rbp+var_268]
mov r10, [rbp+var_260]
mov rax, [rbp+var_258]
lea rsi, aUserTime2fSyst; "\nUser time %.2f, System time %.2f\nMax"...
mov [rsp+330h+var_330], r13
mov [rsp+330h+var_328], r12
mov [rsp+330h+var_320], r15
mov [rsp+330h+var_318], r14
mov [rsp+330h+var_310], rbx
mov [rsp+330h+var_308], r11
mov [rsp+330h+var_300], r10
mov [rsp+330h+var_2F8], rax
mov al, 2
call _fprintf
loc_F3B4A:
jmp short $+2
loc_F3B4C:
call my_thread_end
call my_thread_global_end
mov eax, [rbp+var_234]
and eax, 4
cmp eax, 0
jnz short loc_F3B6A
jmp short $+2
loc_F3B66:
jmp short $+2
loc_F3B68:
jmp short $+2
loc_F3B6A:
call my_mutex_end
lea rax, THR_KEY_mysys
mov edi, [rax]
call _pthread_key_delete
lea rax, my_thr_key_mysys_exists
mov byte ptr [rax], 0
lea rax, my_init_done
mov byte ptr [rax], 0
loc_F3B91:
mov rax, fs:28h
mov rcx, [rbp+var_30]
cmp rax, rcx
jnz short loc_F3BB5
add rsp, 308h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_F3BB5:
call ___stack_chk_fail
| unsigned long long my_end(int a1, long long a2, long long a3, long long a4, long long a5, int a6)
{
_QWORD v7[2]; // [rsp+50h] [rbp-2E0h] BYREF
long long v8; // [rsp+60h] [rbp-2D0h]
long long v9; // [rsp+68h] [rbp-2C8h]
long long v10; // [rsp+70h] [rbp-2C0h]
long long v11; // [rsp+80h] [rbp-2B0h]
long long v12; // [rsp+90h] [rbp-2A0h]
long long v13; // [rsp+98h] [rbp-298h]
long long v14; // [rsp+A0h] [rbp-290h]
long long v15; // [rsp+A8h] [rbp-288h]
long long v16; // [rsp+B0h] [rbp-280h]
long long v17; // [rsp+B8h] [rbp-278h]
long long v18; // [rsp+C0h] [rbp-270h]
long long v19; // [rsp+C8h] [rbp-268h]
long long v20; // [rsp+D0h] [rbp-260h]
long long v21; // [rsp+D8h] [rbp-258h]
int v22; // [rsp+E0h] [rbp-250h]
int v23; // [rsp+E4h] [rbp-24Ch]
unsigned int v24; // [rsp+E8h] [rbp-248h]
char v25; // [rsp+EFh] [rbp-241h]
long long v26; // [rsp+F0h] [rbp-240h]
int v27; // [rsp+FCh] [rbp-234h]
_BYTE v28[512]; // [rsp+100h] [rbp-230h] BYREF
unsigned long long v29; // [rsp+300h] [rbp-30h]
v29 = __readfsqword(0x28u);
v27 = a1;
v26 = stderr;
v25 = 0;
if ( my_init_done )
{
if ( !v26 )
{
v26 = stderr;
v25 = 0;
}
if ( (v27 & 1) != 0 )
{
v24 = 0;
v23 = 0;
v22 = 0;
while ( v24 < my_file_limit[0] )
{
if ( *((_DWORD *)my_file_info + 4 * v24 + 2) )
{
if ( *((_DWORD *)my_file_info + 4 * v24 + 2) == 3 || *((_DWORD *)my_file_info + 4 * v24 + 2) == 4 )
++v22;
else
++v23;
}
++v24;
}
if ( v23 || v22 )
{
my_snprintf((unsigned int)v28, 512, (unsigned int)globerrs[18], v23, v22, a6);
my_message_stderr(19LL, v28, 4LL);
}
}
free_charsets();
my_error_unregister_all();
my_once_free();
if ( (v27 & 2) != 0 && !(unsigned int)getrusage(0LL, v7) )
fprintf(
v26,
"\n"
"User time %.2f, System time %.2f\n"
"Maximum resident set size %ld, Integral resident set size %ld\n"
"Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n"
"Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n"
"Voluntary context switches %ld, Involuntary context switches %ld\n",
(double)(int)(v7[1] / 10000LL + 100 * LODWORD(v7[0])) / 100.0,
(double)(int)(v9 / 10000 + 100 * v8) / 100.0,
v10,
v11,
v12,
v13,
v14,
v15,
v16,
v17,
v18,
v19,
v20,
v21);
my_thread_end();
my_thread_global_end();
my_mutex_end();
pthread_key_delete(THR_KEY_mysys);
my_thr_key_mysys_exists = 0;
my_init_done = 0;
}
return __readfsqword(0x28u);
}
| my_end:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x308
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV dword ptr [RBP + -0x234],EDI
MOV RAX,qword ptr [0x003bdfd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x240],RAX
MOV RAX,qword ptr [RBP + -0x240]
MOV RCX,qword ptr [0x003bdfd8]
CMP RAX,qword ptr [RCX]
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x241],AL
LEA RAX,[0xd83700]
CMP byte ptr [RAX],0x0
JNZ 0x001f3898
JMP 0x001f3b91
LAB_001f3898:
JMP 0x001f389a
LAB_001f389a:
JMP 0x001f389c
LAB_001f389c:
CMP qword ptr [RBP + -0x240],0x0
JNZ 0x001f38be
MOV RAX,qword ptr [0x003bdfd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x240],RAX
MOV byte ptr [RBP + -0x241],0x0
LAB_001f38be:
MOV EAX,dword ptr [RBP + -0x234]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001f38dc
MOVSX EAX,byte ptr [RBP + -0x241]
CMP EAX,0x0
JZ 0x001f39fa
LAB_001f38dc:
MOV dword ptr [RBP + -0x248],0x0
MOV dword ptr [RBP + -0x24c],0x0
MOV dword ptr [RBP + -0x250],0x0
LAB_001f38fa:
MOV EAX,dword ptr [RBP + -0x248]
LEA RCX,[0x3c0d30]
CMP EAX,dword ptr [RCX]
JNC 0x001f399e
LEA RAX,[0x3c0d38]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x248]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x0
JNZ 0x001f392e
JMP 0x001f398a
LAB_001f392e:
LEA RAX,[0x3c0d38]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x248]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x3
JZ 0x001f3968
LEA RAX,[0x3c0d38]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x248]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x4
JNZ 0x001f3979
LAB_001f3968:
MOV EAX,dword ptr [RBP + -0x250]
ADD EAX,0x1
MOV dword ptr [RBP + -0x250],EAX
JMP 0x001f3988
LAB_001f3979:
MOV EAX,dword ptr [RBP + -0x24c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24c],EAX
LAB_001f3988:
JMP 0x001f398a
LAB_001f398a:
MOV EAX,dword ptr [RBP + -0x248]
ADD EAX,0x1
MOV dword ptr [RBP + -0x248],EAX
JMP 0x001f38fa
LAB_001f399e:
CMP dword ptr [RBP + -0x24c],0x0
JNZ 0x001f39b0
CMP dword ptr [RBP + -0x250],0x0
JZ 0x001f39f8
LAB_001f39b0:
LEA RDI,[RBP + -0x230]
LEA RAX,[0x3c1250]
MOV RDX,qword ptr [RAX + 0x90]
MOV ECX,dword ptr [RBP + -0x24c]
MOV R8D,dword ptr [RBP + -0x250]
MOV ESI,0x200
MOV AL,0x0
CALL 0x0024e140
LEA RSI,[RBP + -0x230]
MOV EDI,0x13
MOV EDX,0x4
CALL 0x001f4c70
JMP 0x001f39f6
LAB_001f39f6:
JMP 0x001f39f8
LAB_001f39f8:
JMP 0x001f39fa
LAB_001f39fa:
CALL 0x001dc540
CALL 0x001f0c70
CALL 0x001f50c0
MOV EAX,dword ptr [RBP + -0x234]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x001f3a27
MOVSX EAX,byte ptr [RBP + -0x241]
CMP EAX,0x0
JZ 0x001f3b4c
LAB_001f3a27:
XOR EDI,EDI
LEA RSI,[RBP + -0x2e0]
CALL 0x0012a880
CMP EAX,0x0
JNZ 0x001f3b4a
MOV RDI,qword ptr [RBP + -0x240]
IMUL RAX,qword ptr [RBP + -0x2e0],0x64
MOV qword ptr [RBP + -0x2f0],RAX
MOV RAX,qword ptr [RBP + -0x2d8]
MOV ECX,0x2710
CQO
IDIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x2f0]
ADD RAX,RCX
CVTSI2SD XMM0,RAX
MOVSD XMM1,qword ptr [0x00259ed0]
DIVSD XMM0,XMM1
IMUL RAX,qword ptr [RBP + -0x2d0],0x64
MOV qword ptr [RBP + -0x2e8],RAX
MOV RAX,qword ptr [RBP + -0x2c8]
MOV ECX,0x2710
CQO
IDIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x2e8]
ADD RAX,RCX
CVTSI2SD XMM1,RAX
MOVSD XMM2,qword ptr [0x00259ed0]
DIVSD XMM1,XMM2
MOV RDX,qword ptr [RBP + -0x2c0]
MOV RCX,qword ptr [RBP + -0x2b0]
MOV R8,qword ptr [RBP + -0x2a0]
MOV R9,qword ptr [RBP + -0x298]
MOV R13,qword ptr [RBP + -0x290]
MOV R12,qword ptr [RBP + -0x288]
MOV R15,qword ptr [RBP + -0x280]
MOV R14,qword ptr [RBP + -0x278]
MOV RBX,qword ptr [RBP + -0x270]
MOV R11,qword ptr [RBP + -0x268]
MOV R10,qword ptr [RBP + -0x260]
MOV RAX,qword ptr [RBP + -0x258]
LEA RSI,[0x2553cc]
MOV qword ptr [RSP],R13
MOV qword ptr [RSP + 0x8],R12
MOV qword ptr [RSP + 0x10],R15
MOV qword ptr [RSP + 0x18],R14
MOV qword ptr [RSP + 0x20],RBX
MOV qword ptr [RSP + 0x28],R11
MOV qword ptr [RSP + 0x30],R10
MOV qword ptr [RSP + 0x38],RAX
MOV AL,0x2
CALL 0x0012a170
LAB_001f3b4a:
JMP 0x001f3b4c
LAB_001f3b4c:
CALL 0x001f7450
CALL 0x001f71c0
MOV EAX,dword ptr [RBP + -0x234]
AND EAX,0x4
CMP EAX,0x0
JNZ 0x001f3b6a
JMP 0x001f3b66
LAB_001f3b66:
JMP 0x001f3b68
LAB_001f3b68:
JMP 0x001f3b6a
LAB_001f3b6a:
CALL 0x001fad50
LEA RAX,[0xd84404]
MOV EDI,dword ptr [RAX]
CALL 0x0012a710
LEA RAX,[0xd8413c]
MOV byte ptr [RAX],0x0
LEA RAX,[0xd83700]
MOV byte ptr [RAX],0x0
LAB_001f3b91:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x30]
CMP RAX,RCX
JNZ 0x001f3bb5
ADD RSP,0x308
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001f3bb5:
CALL 0x0012a260
|
void my_end(uint param_1)
{
int iVar1;
long in_FS_OFFSET;
bool bVar2;
bool bVar3;
rusage local_2e8;
int local_258;
int local_254;
uint local_250;
bool local_249;
FILE *local_248;
uint local_23c;
int1 local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_248 = *(FILE **)PTR_stderr_003bdfd8;
bVar2 = local_248 != *(FILE **)PTR_stderr_003bdfd8;
local_249 = bVar2;
local_23c = param_1;
if (my_init_done != '\0') {
bVar3 = local_248 == (FILE *)0x0;
if (bVar3) {
local_248 = *(FILE **)PTR_stderr_003bdfd8;
}
bVar3 = !bVar3;
local_249 = bVar3 && bVar2;
if (((param_1 & 1) != 0) || (bVar3 && bVar2)) {
local_254 = 0;
local_258 = 0;
for (local_250 = 0; local_250 < my_file_limit; local_250 = local_250 + 1) {
if (*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) != 0) {
if ((*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) == 3) ||
(*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) == 4)) {
local_258 = local_258 + 1;
}
else {
local_254 = local_254 + 1;
}
}
}
if ((local_254 != 0) || (local_258 != 0)) {
my_snprintf(local_238,0x200,globerrs._144_8_,local_254,local_258);
my_message_stderr(0x13,local_238,4);
}
}
free_charsets();
my_error_unregister_all();
my_once_free();
if ((((local_23c & 2) != 0) || (local_249 != false)) &&
(iVar1 = getrusage(RUSAGE_SELF,&local_2e8), iVar1 == 0)) {
fprintf(local_248,
"\nUser time %.2f, System time %.2f\nMaximum resident set size %ld, Integral resident set size %ld\nNon-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\nBlocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\nVoluntary context switches %ld, Involuntary context switches %ld\n"
,(double)(local_2e8.ru_utime.tv_sec * 100 + local_2e8.ru_utime.tv_usec / 10000) /
DAT_00259ed0,
(double)(local_2e8.ru_stime.tv_sec * 100 + local_2e8.ru_stime.tv_usec / 10000) /
DAT_00259ed0,local_2e8.ru_maxrss,local_2e8.ru_idrss,local_2e8.ru_minflt,
local_2e8.ru_majflt,local_2e8.ru_nswap,local_2e8.ru_inblock,local_2e8.ru_oublock,
local_2e8.ru_msgsnd,local_2e8.ru_msgrcv,local_2e8.ru_nsignals,local_2e8.ru_nvcsw,
local_2e8.ru_nivcsw);
}
my_thread_end();
my_thread_global_end();
my_mutex_end();
pthread_key_delete(THR_KEY_mysys);
my_thr_key_mysys_exists = 0;
my_init_done = '\0';
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
30,544 | recursive_iterate | eloqsql/mysys/lf_dynarray.c | static int recursive_iterate(LF_DYNARRAY *array, void *ptr, int level,
lf_dynarray_func func, void *arg)
{
int res, i;
if (!ptr)
return 0;
if (!level)
return func(ptr, arg);
for (i= 0; i < LF_DYNARRAY_LEVEL_LENGTH; i++)
if ((res= recursive_iterate(array, ((void **)ptr)[i], level-1, func, arg)))
return res;
return 0;
} | O3 | c | recursive_iterate:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xa54ac
movq %rcx, %rbx
movq %rdx, %r13
movl %esi, %r15d
movq %rdi, %r14
testl %esi, %esi
je 0xa54bd
decl %r15d
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
movl %r15d, %esi
movq %r13, %rdx
movq %rbx, %rcx
callq 0xa5461
testl %eax, %eax
jne 0xa54ae
incq %r12
cmpq $0x100, %r12 # imm = 0x100
jne 0xa548a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
nop
| recursive_iterate:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
test rdi, rdi
jz short loc_A54AC
mov rbx, rcx
mov r13, rdx
mov r15d, esi
mov r14, rdi
test esi, esi
jz short loc_A54BD
dec r15d
xor r12d, r12d
loc_A548A:
mov rdi, [r14+r12*8]
mov esi, r15d
mov rdx, r13
mov rcx, rbx
call recursive_iterate
test eax, eax
jnz short loc_A54AE
inc r12
cmp r12, 100h
jnz short loc_A548A
loc_A54AC:
xor eax, eax
loc_A54AE:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A54BD:
mov rdi, r14
mov rsi, rbx
mov rax, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rax
| long long recursive_iterate(long long a1, int a2, long long ( *a3)(long long, long long), long long a4)
{
long long v6; // r12
long long result; // rax
if ( !a1 )
return 0LL;
if ( !a2 )
return a3(a1, a4);
v6 = 0LL;
while ( 1 )
{
result = recursive_iterate(*(_QWORD *)(a1 + 8 * v6), (unsigned int)(a2 - 1), a3, a4);
if ( (_DWORD)result )
break;
if ( ++v6 == 256 )
return 0LL;
}
return result;
}
| recursive_iterate:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x001a54ac
MOV RBX,RCX
MOV R13,RDX
MOV R15D,ESI
MOV R14,RDI
TEST ESI,ESI
JZ 0x001a54bd
DEC R15D
XOR R12D,R12D
LAB_001a548a:
MOV RDI,qword ptr [R14 + R12*0x8]
MOV ESI,R15D
MOV RDX,R13
MOV RCX,RBX
CALL 0x001a5461
TEST EAX,EAX
JNZ 0x001a54ae
INC R12
CMP R12,0x100
JNZ 0x001a548a
LAB_001a54ac:
XOR EAX,EAX
LAB_001a54ae:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a54bd:
MOV RDI,R14
MOV RSI,RBX
MOV RAX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP RAX
|
int8
recursive_iterate(long param_1,int param_2,code *UNRECOVERED_JUMPTABLE,int8 param_4)
{
int8 uVar1;
long lVar2;
if (param_1 != 0) {
if (param_2 == 0) {
/* WARNING: Could not recover jumptable at 0x001a54d4. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar1 = (*UNRECOVERED_JUMPTABLE)(param_1,param_4);
return uVar1;
}
lVar2 = 0;
do {
uVar1 = recursive_iterate(*(int8 *)(param_1 + lVar2 * 8),param_2 + -1,
UNRECOVERED_JUMPTABLE,param_4);
if ((int)uVar1 != 0) {
return uVar1;
}
lVar2 = lVar2 + 1;
} while (lVar2 != 0x100);
}
return 0;
}
| |
30,545 | minja::Context::at(minja::Value const&) | llama.cpp/common/minja/minja.hpp | virtual Value & at(const Value & key) {
if (values_.contains(key)) return values_.at(key);
if (parent_) return parent_->at(key);
throw std::runtime_error("Undefined variable: " + key.dump());
} | O3 | cpp | minja::Context::at(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0xbf71e
testb %al, %al
je 0xbf5e1
movq %r15, %rdi
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xbf96a
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0xbf600
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movl $0x10, %edi
callq 0x21630
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb571c
leaq 0x6211a(%rip), %rsi # 0x121742
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xaefbc
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x21450
xorl %ebp, %ebp
movq 0xa5970(%rip), %rsi # 0x164fc0
movq 0xa5921(%rip), %rdx # 0x164f78
movq %rbx, %rdi
callq 0x21a50
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf67d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21170
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf698
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21170
testb %bpl, %bpl
jne 0xbf6c2
jmp 0xbf6ca
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf6c2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0xbf6c2
movq %rax, %r14
movq %rbx, %rdi
callq 0x21ef0
movq %r14, %rdi
callq 0x21af0
| _ZN5minja7Context2atERKNS_5ValueE:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+18h]
mov rdi, r15; this
call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&)
test al, al
jz short loc_BF5E1
mov rdi, r15; this
mov rsi, r14; minja::Value *
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
loc_BF5E1:
mov rdi, [rbx+68h]
test rdi, rdi
jz short loc_BF600
mov rax, [rdi]
mov rax, [rax+18h]
mov rsi, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp rax
loc_BF600:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUndefinedVaria; "Undefined variable: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BF67D
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BF67D:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BF698
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BF698:
test bpl, bpl
jnz short loc_BF6C2
jmp short loc_BF6CA
mov r14, rax
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BF6C2
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BF6C2
mov r14, rax
loc_BF6C2:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_BF6CA:
mov rdi, r14
call __Unwind_Resume
| long long minja::Context::at(minja::Context *this, const minja::Value *a2)
{
long long v3; // rdi
void *exception; // rbx
_BYTE v5[16]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v6[2]; // [rsp+28h] [rbp-40h] BYREF
if ( (unsigned __int8)minja::Value::contains((minja::Context *)((char *)this + 24), a2) )
return minja::Value::at((minja::Context *)((char *)this + 24), a2);
v3 = *((_QWORD *)this + 13);
if ( !v3 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v5, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>(v6, (long long)"Undefined variable: ", (long long)v5);
std::runtime_error::runtime_error(exception, v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return (*(long long ( **)(long long, const minja::Value *))(*(_QWORD *)v3 + 24LL))(v3, a2);
}
| at:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x18]
MOV RDI,R15
CALL 0x001bf71e
TEST AL,AL
JZ 0x001bf5e1
MOV RDI,R15
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001bf96a
LAB_001bf5e1:
MOV RDI,qword ptr [RBX + 0x68]
TEST RDI,RDI
JZ 0x001bf600
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x18]
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP RAX
LAB_001bf600:
MOV EDI,0x10
CALL 0x00121630
MOV RBX,RAX
LAB_001bf60d:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b571c
LAB_001bf621:
LEA RSI,[0x221742]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x001aefbc
MOV BPL,0x1
LAB_001bf63a:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00121450
XOR EBP,EBP
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,RBX
CALL 0x00121a50
|
/* minja::Context::at(minja::Value const&) */
void __thiscall minja::Context::at(Context *this,Value *param_1)
{
long *plVar1;
char cVar2;
runtime_error *this_00;
int1 local_60 [32];
string local_40 [32];
cVar2 = Value::contains((Value *)(this + 0x18),param_1);
if (cVar2 != '\0') {
Value::at((Value *)(this + 0x18),param_1);
return;
}
plVar1 = *(long **)(this + 0x68);
if (plVar1 != (long *)0x0) {
/* WARNING: Could not recover jumptable at 0x001bf5fe. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*plVar1 + 0x18))(plVar1,param_1);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001bf60d to 001bf620 has its CatchHandler @ 001bf6bf */
Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0));
/* try { // try from 001bf621 to 001bf636 has its CatchHandler @ 001bf69f */
std::operator+((char *)local_40,(string *)"Undefined variable: ");
/* try { // try from 001bf63a to 001bf65e has its CatchHandler @ 001bf65f */
std::runtime_error::runtime_error(this_00,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
| |
30,546 | blst_p2_cneg | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e2.c | void blst_p2_cneg(POINTonE2 *a, int cbit)
{ POINTonE2_cneg(a, is_zero(cbit) ^ 1); } | O1 | c | blst_p2_cneg:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %esi, %r14
movq %r14, %rax
notq %rax
decq %r14
andq %rax, %r14
shrq $0x3f, %r14
xorq $0x1, %r14
addq $0x60, %rdi
leaq 0x3053c(%rip), %r15 # 0x90c40
movq %rdi, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x740c0
addq $0x90, %rbx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x740c0
| blst_p2_cneg:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
movsxd r14, esi
mov rax, r14
not rax
dec r14
and r14, rax
shr r14, 3Fh
xor r14, 1
add rdi, 60h ; '`'
lea r15, BLS12_381_P
mov rsi, rdi
mov rdx, r14
mov rcx, r15
call cneg_mod_384
add rbx, 90h
mov rdi, rbx
mov rsi, rbx
mov rdx, r14
mov rcx, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp cneg_mod_384
| long long blst_p2_cneg(long long a1, int a2)
{
_BOOL8 v2; // r14
v2 = (~(long long)a2 & (a2 - 1LL)) >= 0;
cneg_mod_384(a1 + 96, a1 + 96, v2, &BLS12_381_P);
return cneg_mod_384(a1 + 144, a1 + 144, v2, &BLS12_381_P);
}
| blst_p2_cneg:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVSXD R14,ESI
MOV RAX,R14
NOT RAX
DEC R14
AND R14,RAX
SHR R14,0x3f
XOR R14,0x1
ADD RDI,0x60
LEA R15,[0x190c40]
MOV RSI,RDI
MOV RDX,R14
MOV RCX,R15
CALL 0x001740c0
ADD RBX,0x90
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R14
MOV RCX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001740c0
|
void blst_p2_cneg(long param_1,int param_2)
{
ulong uVar1;
uVar1 = ((long)param_2 - 1U & ~(long)param_2) >> 0x3f ^ 1;
cneg_mod_384(param_1 + 0x60,param_1 + 0x60,uVar1,BLS12_381_P);
cneg_mod_384(param_1 + 0x90,param_1 + 0x90,uVar1,BLS12_381_P);
return;
}
| |
30,547 | llama_model_loader::get_arch_name[abi:cxx11]() const | monkey531[P]llama/src/llama-model-loader.cpp | std::string llama_model_loader::get_arch_name() const {
return arch_name;
} | O3 | cpp | llama_model_loader::get_arch_name[abi:cxx11]() const:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq 0xe8(%rsi), %rax
movq 0xf0(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x65700
movq %rbx, %rax
popq %rbx
retq
nop
| _ZNK18llama_model_loader13get_arch_nameB5cxx11Ev:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
mov rax, [rsi+0E8h]
mov rdx, [rsi+0F0h]
add rdx, rax
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
| _QWORD * llama_model_loader::get_arch_name[abi:cxx11](_QWORD *a1, long long a2)
{
*a1 = a1 + 2;
std::string::_M_construct<char *>(a1, *(_QWORD *)(a2 + 232), *(_QWORD *)(a2 + 232) + *(_QWORD *)(a2 + 240));
return a1;
}
| get_arch_name[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI + 0xe8]
MOV RDX,qword ptr [RSI + 0xf0]
ADD RDX,RAX
MOV RSI,RAX
CALL 0x00165700
MOV RAX,RBX
POP RBX
RET
|
/* llama_model_loader::get_arch_name[abi:cxx11]() const */
void llama_model_loader::get_arch_name_abi_cxx11_(void)
{
long in_RSI;
long *in_RDI;
*in_RDI = (long)(in_RDI + 2);
std::__cxx11::string::_M_construct<char*>
(in_RDI,*(long *)(in_RSI + 0xe8),*(long *)(in_RSI + 0xf0) + *(long *)(in_RSI + 0xe8));
return;
}
| |
30,548 | ma_bitmap_create_missing | eloqsql/storage/maria/ma_bitmap.c | static my_bool _ma_bitmap_create_missing(MARIA_HA *info,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page)
{
MARIA_SHARE *share= info->s;
uint block_size= bitmap->block_size;
pgcache_page_no_t from, to;
my_off_t data_file_length= share->state.state.data_file_length;
DBUG_ENTER("_ma_bitmap_create_missing");
DBUG_PRINT("enter", ("page: %lld", (longlong) page));
/* First (in offset order) bitmap page to create */
if (data_file_length < block_size)
goto err; /* corrupted, should have first bitmap page */
if (page * block_size >= share->base.max_data_file_length)
{
my_errno= HA_ERR_RECORD_FILE_FULL;
goto err;
}
from= (data_file_length / block_size - 1) / bitmap->pages_covered + 1;
from*= bitmap->pages_covered;
/*
page>=from because:
(page + 1) * bs > dfl, and page == k * pc so:
(k * pc + 1) * bs > dfl; k * pc + 1 > dfl / bs; k * pc > dfl / bs - 1
k > (dfl / bs - 1) / pc; k >= (dfl / bs - 1) / pc + 1
k * pc >= ((dfl / bs - 1) / pc + 1) * pc == from.
*/
DBUG_ASSERT(page >= from);
if (share->now_transactional)
{
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE * 2];
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1];
page_store(log_data + FILEID_STORE_SIZE, from);
page_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE, page);
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data);
/*
We don't use info->trn so that this REDO is always executed even though
the UNDO does not reach disk due to crash. This is also consistent with
the fact that the new bitmap pages are not pinned.
*/
if (translog_write_record(&lsn, LOGREC_REDO_BITMAP_NEW_PAGE,
&dummy_transaction_object, info,
(translog_size_t)sizeof(log_data),
TRANSLOG_INTERNAL_PARTS + 1, log_array,
log_data, NULL))
goto err;
/*
No need to flush the log: the bitmap pages we are going to create will
flush it when they go to disk.
*/
}
/*
Last bitmap page. It has special creation: will go to the page cache
only later as we are going to modify it very soon.
*/
bzero(bitmap->map, bitmap->block_size);
bitmap->used_size= bitmap->full_head_size= bitmap->full_tail_size= 0;
bitmap->changed=1;
#ifndef DBUG_OFF
/*
Make a copy of the page to be able to print out bitmap changes during
debugging
*/
memcpy(bitmap->map + bitmap->block_size, bitmap->map, bitmap->block_size);
#endif
/* Last bitmap page to create before 'page' */
DBUG_ASSERT(page >= bitmap->pages_covered);
to= page - bitmap->pages_covered;
/*
In run-time situations, from>=to is always false, i.e. we always create
one bitmap at a time ('page').
*/
if ((from <= to) &&
_ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to,
bitmap->map))
goto err;
share->state.state.data_file_length= (page + 1) * bitmap->block_size;
DBUG_RETURN(FALSE);
err:
DBUG_RETURN(TRUE);
} | O0 | c | ma_bitmap_create_missing:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl 0x134(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x4596a
movq -0x58(%rbp), %rax
movl -0x3c(%rbp), %ecx
cmpq %rcx, %rax
jae 0x4597b
jmp 0x45b69
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
cmpq 0x368(%rcx), %rax
jb 0x459a3
callq 0xf6090
movl $0x87, (%rax)
jmp 0x45b69
movq -0x58(%rbp), %rax
movl -0x3c(%rbp), %ecx
xorl %edx, %edx
divq %rcx
subq $0x1, %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x138(%rax), %rax
imulq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x459de
movq -0x38(%rbp), %rax
cmpb $0x0, 0x7e7(%rax)
je 0x45abb
jmp 0x459f1
leaq -0x14(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x98(%rbp)
movq -0x48(%rbp), %rax
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, (%rax)
movq -0x48(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0x98(%rbp), %rax
movb %cl, 0x4(%rax)
jmp 0x45a25
leaq -0x14(%rbp), %rax
addq $0x2, %rax
addq $0x5, %rax
movq %rax, -0xa0(%rbp)
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0xa0(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0xa0(%rbp), %rax
movb %cl, 0x4(%rax)
leaq -0x14(%rbp), %rax
movq %rax, -0x70(%rbp)
movq $0xc, -0x68(%rbp)
movq -0x20(%rbp), %rcx
leaq -0x90(%rbp), %r10
leaq -0x14(%rbp), %rax
leaq -0x60(%rbp), %rdi
movl $0x28, %esi
leaq 0x432156(%rip), %rdx # 0x477be0
movl $0xc, %r8d
movl $0x3, %r9d
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x53fc0
cmpb $0x0, %al
je 0x45ab9
jmp 0x45b69
jmp 0x45abb
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x134(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movq -0x28(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x28(%rbp), %rax
movb $0x1, 0x20(%rax)
jmp 0x45b01
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq 0x138(%rcx), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
ja 0x45b45
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x28(%rbp), %rax
movq 0x8(%rax), %r8
callq 0x445c0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x45b45
jmp 0x45b69
movq -0x30(%rbp), %rcx
addq $0x1, %rcx
movq -0x28(%rbp), %rax
movl 0x134(%rax), %eax
imulq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x40(%rax)
movb $0x0, -0x15(%rbp)
jmp 0x45b6f
jmp 0x45b6b
movb $0x1, -0x15(%rbp)
movb -0x15(%rbp), %al
movb %al, -0xa1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x45b99
movb -0xa1(%rbp), %al
addq $0xc0, %rsp
popq %rbp
retq
callq 0x2a270
nop
| _ma_bitmap_create_missing:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov eax, [rax+134h]
mov [rbp+var_3C], eax
mov rax, [rbp+var_38]
mov rax, [rax+40h]
mov [rbp+var_58], rax
jmp short $+2
loc_4596A:
mov rax, [rbp+var_58]
mov ecx, [rbp+var_3C]
cmp rax, rcx
jnb short loc_4597B
jmp loc_45B69
loc_4597B:
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rax, rcx
mov rcx, [rbp+var_38]
cmp rax, [rcx+368h]
jb short loc_459A3
call _my_thread_var
mov dword ptr [rax], 87h
jmp loc_45B69
loc_459A3:
mov rax, [rbp+var_58]
mov ecx, [rbp+var_3C]
xor edx, edx
div rcx
sub rax, 1
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov rax, [rax+138h]
imul rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp short $+2
loc_459DE:
mov rax, [rbp+var_38]
cmp byte ptr [rax+7E7h], 0
jz loc_45ABB
jmp short $+2
loc_459F1:
lea rax, [rbp+var_14]
add rax, 2
mov [rbp+var_98], rax
mov rax, [rbp+var_48]
mov ecx, eax
mov rax, [rbp+var_98]
mov [rax], ecx
mov rax, [rbp+var_48]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_98]
mov [rax+4], cl
jmp short $+2
loc_45A25:
lea rax, [rbp+var_14]
add rax, 2
add rax, 5
mov [rbp+var_A0], rax
mov rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_A0]
mov [rax], ecx
mov rax, [rbp+var_30]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_A0]
mov [rax+4], cl
lea rax, [rbp+var_14]
mov [rbp+var_70], rax
mov [rbp+var_68], 0Ch
mov rcx, [rbp+var_20]
lea r10, [rbp+var_90]
lea rax, [rbp+var_14]
lea rdi, [rbp+var_60]
mov esi, 28h ; '('
lea rdx, dummy_transaction_object
mov r8d, 0Ch
mov r9d, 3
xor r11d, r11d
mov [rsp+0C0h+var_C0], r10
mov [rsp+0C0h+var_B8], rax
mov [rsp+0C0h+var_B0], 0
call translog_write_record
cmp al, 0
jz short loc_45AB9
jmp loc_45B69
loc_45AB9:
jmp short $+2
loc_45ABB:
mov rax, [rbp+var_28]
mov rdi, [rax+8]
mov rax, [rbp+var_28]
mov eax, [rax+134h]
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_28]
mov dword ptr [rax+2Ch], 0
mov rax, [rbp+var_28]
mov dword ptr [rax+28h], 0
mov rax, [rbp+var_28]
mov dword ptr [rax+24h], 0
mov rax, [rbp+var_28]
mov byte ptr [rax+20h], 1
jmp short $+2
loc_45B01:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_28]
sub rax, [rcx+138h]
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
cmp rax, [rbp+var_50]
ja short loc_45B45
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_48]
mov rcx, [rbp+var_50]
mov rax, [rbp+var_28]
mov r8, [rax+8]
call _ma_bitmap_create_missing_into_pagecache
movsx eax, al
cmp eax, 0
jz short loc_45B45
jmp short loc_45B69
loc_45B45:
mov rcx, [rbp+var_30]
add rcx, 1
mov rax, [rbp+var_28]
mov eax, [rax+134h]
imul rcx, rax
mov rax, [rbp+var_38]
mov [rax+40h], rcx
mov [rbp+var_15], 0
jmp short loc_45B6F
loc_45B69:
jmp short $+2
loc_45B6B:
mov [rbp+var_15], 1
loc_45B6F:
mov al, [rbp+var_15]
mov [rbp+var_A1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_45B99
mov al, [rbp+var_A1]
add rsp, 0C0h
pop rbp
retn
loc_45B99:
call ___stack_chk_fail
| char ma_bitmap_create_missing(long long *a1, long long a2, long long a3)
{
_BYTE v4[32]; // [rsp+30h] [rbp-90h] BYREF
_BYTE *v5; // [rsp+50h] [rbp-70h]
long long v6; // [rsp+58h] [rbp-68h]
char v7; // [rsp+60h] [rbp-60h] BYREF
unsigned long long v8; // [rsp+68h] [rbp-58h]
unsigned long long v9; // [rsp+70h] [rbp-50h]
unsigned long long v10; // [rsp+78h] [rbp-48h]
unsigned int v11; // [rsp+84h] [rbp-3Ch]
long long v12; // [rsp+88h] [rbp-38h]
long long v13; // [rsp+90h] [rbp-30h]
long long v14; // [rsp+98h] [rbp-28h]
long long *v15; // [rsp+A0h] [rbp-20h]
_BYTE v17[2]; // [rsp+ACh] [rbp-14h] BYREF
int v18; // [rsp+AEh] [rbp-12h]
char v19; // [rsp+B2h] [rbp-Eh]
int v20; // [rsp+B3h] [rbp-Dh]
char v21; // [rsp+B7h] [rbp-9h]
unsigned long long v22; // [rsp+B8h] [rbp-8h]
v22 = __readfsqword(0x28u);
v15 = a1;
v14 = a2;
v13 = a3;
v12 = *a1;
v11 = *(_DWORD *)(a2 + 308);
v8 = *(_QWORD *)(v12 + 64);
if ( v8 < v11 )
return 1;
if ( (unsigned long long)v11 * v13 >= *(_QWORD *)(v12 + 872) )
{
*(_DWORD *)my_thread_var() = 135;
return 1;
}
v10 = ((v8 / v11 - 1) / *(_QWORD *)(v14 + 312) + 1) * *(_QWORD *)(v14 + 312);
if ( *(_BYTE *)(v12 + 2023) )
{
v18 = v10;
v19 = BYTE4(v10);
v20 = v13;
v21 = BYTE4(v13);
v5 = v17;
v6 = 12LL;
if ( (unsigned __int8)translog_write_record(
(unsigned int)&v7,
40,
(unsigned int)&dummy_transaction_object,
(_DWORD)v15,
12,
3,
(long long)v4,
(long long)v17,
0LL) )
return 1;
}
memset(*(_QWORD *)(v14 + 8), 0LL, *(unsigned int *)(v14 + 308));
*(_DWORD *)(v14 + 44) = 0;
*(_DWORD *)(v14 + 40) = 0;
*(_DWORD *)(v14 + 36) = 0;
*(_BYTE *)(v14 + 32) = 1;
v9 = v13 - *(_QWORD *)(v14 + 312);
if ( v10 <= v9 )
{
if ( ma_bitmap_create_missing_into_pagecache(v12, v14, v10, v9, *(_QWORD *)(v14 + 8)) )
return 1;
}
*(_QWORD *)(v12 + 64) = *(unsigned int *)(v14 + 308) * (v13 + 1);
return 0;
}
| _ma_bitmap_create_missing:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x134]
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0014596a
LAB_0014596a:
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RBP + -0x3c]
CMP RAX,RCX
JNC 0x0014597b
JMP 0x00145b69
LAB_0014597b:
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RCX + 0x368]
JC 0x001459a3
CALL 0x001f6090
MOV dword ptr [RAX],0x87
JMP 0x00145b69
LAB_001459a3:
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RBP + -0x3c]
XOR EDX,EDX
DIV RCX
SUB RAX,0x1
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x138]
IMUL RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001459de
LAB_001459de:
MOV RAX,qword ptr [RBP + -0x38]
CMP byte ptr [RAX + 0x7e7],0x0
JZ 0x00145abb
JMP 0x001459f1
LAB_001459f1:
LEA RAX,[RBP + -0x14]
ADD RAX,0x2
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x98]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x48]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x98]
MOV byte ptr [RAX + 0x4],CL
JMP 0x00145a25
LAB_00145a25:
LEA RAX,[RBP + -0x14]
ADD RAX,0x2
ADD RAX,0x5
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xa0]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xa0]
MOV byte ptr [RAX + 0x4],CL
LEA RAX,[RBP + -0x14]
MOV qword ptr [RBP + -0x70],RAX
MOV qword ptr [RBP + -0x68],0xc
MOV RCX,qword ptr [RBP + -0x20]
LEA R10,[RBP + -0x90]
LEA RAX,[RBP + -0x14]
LEA RDI,[RBP + -0x60]
MOV ESI,0x28
LEA RDX,[0x577be0]
MOV R8D,0xc
MOV R9D,0x3
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
CALL 0x00153fc0
CMP AL,0x0
JZ 0x00145ab9
JMP 0x00145b69
LAB_00145ab9:
JMP 0x00145abb
LAB_00145abb:
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x134]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x2c],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x28],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x24],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x20],0x1
JMP 0x00145b01
LAB_00145b01:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr [RCX + 0x138]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x50]
JA 0x00145b45
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RAX + 0x8]
CALL 0x001445c0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00145b45
JMP 0x00145b69
LAB_00145b45:
MOV RCX,qword ptr [RBP + -0x30]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x134]
IMUL RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x40],RCX
MOV byte ptr [RBP + -0x15],0x0
JMP 0x00145b6f
LAB_00145b69:
JMP 0x00145b6b
LAB_00145b6b:
MOV byte ptr [RBP + -0x15],0x1
LAB_00145b6f:
MOV AL,byte ptr [RBP + -0x15]
MOV byte ptr [RBP + -0xa1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00145b99
MOV AL,byte ptr [RBP + -0xa1]
ADD RSP,0xc0
POP RBP
RET
LAB_00145b99:
CALL 0x0012a270
|
int8 _ma_bitmap_create_missing(long *param_1,long param_2,long param_3)
{
char cVar1;
int4 *puVar2;
long in_FS_OFFSET;
int1 local_98 [32];
int1 *local_78;
int8 local_70;
int1 local_68 [8];
ulong local_60;
ulong local_58;
ulong local_50;
uint local_44;
long local_40;
long local_38;
long local_30;
long *local_28;
int1 local_1d;
int1 local_1c [2];
int4 local_1a;
int1 local_16;
int4 local_15;
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_40 = *param_1;
local_44 = *(uint *)(param_2 + 0x134);
local_60 = *(ulong *)(local_40 + 0x40);
local_38 = param_3;
local_30 = param_2;
local_28 = param_1;
if (local_44 <= local_60) {
if (param_3 * (ulong)local_44 < *(ulong *)(local_40 + 0x368)) {
local_50 = *(long *)(param_2 + 0x138) *
((local_60 / local_44 - 1) / *(ulong *)(param_2 + 0x138) + 1);
if (*(char *)(local_40 + 0x7e7) != '\0') {
local_1a = (int4)local_50;
local_16 = (int1)(local_50 >> 0x20);
local_15 = (int4)param_3;
local_11 = (int1)((ulong)param_3 >> 0x20);
local_78 = local_1c;
local_70 = 0xc;
cVar1 = translog_write_record
(local_68,0x28,dummy_transaction_object,param_1,0xc,3,local_98,local_1c,0)
;
if (cVar1 != '\0') goto LAB_00145b69;
}
memset(*(void **)(local_30 + 8),0,(ulong)*(uint *)(local_30 + 0x134));
*(int4 *)(local_30 + 0x2c) = 0;
*(int4 *)(local_30 + 0x28) = 0;
*(int4 *)(local_30 + 0x24) = 0;
*(int1 *)(local_30 + 0x20) = 1;
local_58 = local_38 - *(long *)(local_30 + 0x138);
if ((local_58 < local_50) ||
(cVar1 = _ma_bitmap_create_missing_into_pagecache
(local_40,local_30,local_50,local_58,*(int8 *)(local_30 + 8)),
cVar1 == '\0')) {
*(ulong *)(local_40 + 0x40) = (local_38 + 1) * (ulong)*(uint *)(local_30 + 0x134);
local_1d = 0;
goto LAB_00145b6f;
}
}
else {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x87;
}
}
LAB_00145b69:
local_1d = 1;
LAB_00145b6f:
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_1d);
}
| |
30,549 | mi_enable_indexes | eloqsql/storage/myisam/mi_open.c | int mi_enable_indexes(MI_INFO *info)
{
int error= 0;
MYISAM_SHARE *share= info->s;
if (share->state.state.data_file_length ||
(share->state.state.key_file_length != share->base.keystart))
{
mi_print_error(info->s, HA_ERR_CRASHED);
error= HA_ERR_CRASHED;
}
else
mi_set_all_keys_active(share->state.key_map, share->base.keys);
return error;
} | O0 | c | mi_enable_indexes:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0xb9f1e
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x108(%rcx), %rax
je 0xb9f3f
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0xae570
movl $0x7e, -0xc(%rbp)
jmp 0xb9f86
movq -0x18(%rbp), %rax
cmpl $0x40, 0x180(%rax)
jae 0xb9f6a
movq -0x18(%rbp), %rax
movl 0x180(%rax), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xb9f77
movq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xb9f77
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xc0(%rax)
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| mi_enable_indexes:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
cmp qword ptr [rax+40h], 0
jnz short loc_B9F1E
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov rcx, [rbp+var_18]
cmp rax, [rcx+108h]
jz short loc_B9F3F
loc_B9F1E:
mov rax, [rbp+var_8]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
mov [rbp+var_C], 7Eh ; '~'
jmp short loc_B9F86
loc_B9F3F:
mov rax, [rbp+var_18]
cmp dword ptr [rax+180h], 40h ; '@'
jnb short loc_B9F6A
mov rax, [rbp+var_18]
mov eax, [rax+180h]
mov ecx, eax
mov eax, 1
shl rax, cl
sub rax, 1
mov [rbp+var_20], rax
jmp short loc_B9F77
loc_B9F6A:
mov rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp short $+2
loc_B9F77:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
mov [rax+0C0h], rcx
loc_B9F86:
mov eax, [rbp+var_C]
add rsp, 20h
pop rbp
retn
| long long mi_enable_indexes(long long *a1)
{
long long v2; // [rsp+0h] [rbp-20h]
long long v3; // [rsp+8h] [rbp-18h]
unsigned int v4; // [rsp+14h] [rbp-Ch]
v4 = 0;
v3 = *a1;
if ( !*(_QWORD *)(*a1 + 64) && *(_QWORD *)(v3 + 56) == *(_QWORD *)(v3 + 264) )
{
if ( *(_DWORD *)(v3 + 384) >= 0x40u )
v2 = -1LL;
else
v2 = (1LL << *(_DWORD *)(v3 + 384)) - 1;
*(_QWORD *)(v3 + 192) = v2;
}
else
{
mi_report_error(126, *(_QWORD *)(*a1 + 616));
return 126;
}
return v4;
}
| mi_enable_indexes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x40],0x0
JNZ 0x001b9f1e
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x108]
JZ 0x001b9f3f
LAB_001b9f1e:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001ae570
MOV dword ptr [RBP + -0xc],0x7e
JMP 0x001b9f86
LAB_001b9f3f:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x180],0x40
JNC 0x001b9f6a
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x180]
MOV ECX,EAX
MOV EAX,0x1
SHL RAX,CL
SUB RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001b9f77
LAB_001b9f6a:
MOV RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001b9f77
LAB_001b9f77:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0xc0],RCX
LAB_001b9f86:
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x20
POP RBP
RET
|
int4 mi_enable_indexes(long *param_1)
{
long lVar1;
int8 local_28;
int4 local_14;
local_14 = 0;
lVar1 = *param_1;
if ((*(long *)(lVar1 + 0x40) == 0) && (*(long *)(lVar1 + 0x38) == *(long *)(lVar1 + 0x108))) {
if (*(uint *)(lVar1 + 0x180) < 0x40) {
local_28 = (1L << ((byte)*(int4 *)(lVar1 + 0x180) & 0x3f)) + -1;
}
else {
local_28 = -1;
}
*(long *)(lVar1 + 0xc0) = local_28;
}
else {
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
local_14 = 0x7e;
}
return local_14;
}
| |
30,550 | my_xml_parse | eloqsql/strings/xml.c | int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len)
{
my_xml_attr_rewind(p);
p->beg=str;
p->cur=str;
p->end=str+len;
while ( p->cur < p->end )
{
MY_XML_ATTR a;
if (p->cur[0] == '<')
{
int lex;
int question=0;
int exclam=0;
lex=my_xml_scan(p,&a);
if (MY_XML_COMMENT == lex)
continue;
if (lex == MY_XML_CDATA)
{
a.beg+= 9;
a.end-= 3;
my_xml_value(p, a.beg, (size_t) (a.end-a.beg));
continue;
}
lex=my_xml_scan(p,&a);
if (MY_XML_SLASH == lex)
{
if (MY_XML_IDENT != (lex=my_xml_scan(p,&a)))
{
sprintf(p->errstr,"%s unexpected (ident wanted)",lex2str(lex));
return MY_XML_ERROR;
}
if (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
goto gt;
}
if (MY_XML_EXCLAM == lex)
{
lex=my_xml_scan(p,&a);
exclam=1;
}
else if (MY_XML_QUESTION == lex)
{
lex=my_xml_scan(p,&a);
question=1;
}
if (MY_XML_IDENT == lex)
{
p->current_node_type= MY_XML_NODE_TAG;
if (MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg)))
return MY_XML_ERROR;
}
else
{
sprintf(p->errstr,"%s unexpected (ident or '/' wanted)",
lex2str(lex));
return MY_XML_ERROR;
}
while ((MY_XML_IDENT == (lex=my_xml_scan(p,&a))) ||
((MY_XML_STRING == lex && exclam)))
{
MY_XML_ATTR b;
if (MY_XML_EQ == (lex=my_xml_scan(p,&b)))
{
lex=my_xml_scan(p,&b);
if ( (lex == MY_XML_IDENT) || (lex == MY_XML_STRING) )
{
p->current_node_type= MY_XML_NODE_ATTR;
if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) ||
(MY_XML_OK != my_xml_value(p,b.beg,(size_t) (b.end-b.beg))) ||
(MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))))
return MY_XML_ERROR;
}
else
{
sprintf(p->errstr,"%s unexpected (ident or string wanted)",
lex2str(lex));
return MY_XML_ERROR;
}
}
else if (MY_XML_IDENT == lex)
{
p->current_node_type= MY_XML_NODE_ATTR;
if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) ||
(MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))))
return MY_XML_ERROR;
}
else if ((MY_XML_STRING == lex) && exclam)
{
/*
We are in <!DOCTYPE>, e.g.
<!DOCTYPE name SYSTEM "SystemLiteral">
<!DOCTYPE name PUBLIC "PublidLiteral" "SystemLiteral">
Just skip "SystemLiteral" and "PublicidLiteral"
*/
}
else
break;
}
if (lex == MY_XML_SLASH)
{
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
}
gt:
if (question)
{
if (lex != MY_XML_QUESTION)
{
sprintf(p->errstr,"%s unexpected ('?' wanted)",lex2str(lex));
return MY_XML_ERROR;
}
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
}
if (exclam)
{
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
}
if (lex != MY_XML_GT)
{
sprintf(p->errstr,"%s unexpected ('>' wanted)",lex2str(lex));
return MY_XML_ERROR;
}
}
else
{
a.beg=p->cur;
for ( ; (p->cur < p->end) && (p->cur[0] != '<') ; p->cur++);
a.end=p->cur;
if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION))
my_xml_norm_text(&a);
if (a.beg != a.end)
{
my_xml_value(p,a.beg,(size_t) (a.end-a.beg));
}
}
}
if (p->attr.start[0])
{
sprintf(p->errstr,"unexpected END-OF-INPUT");
return MY_XML_ERROR;
}
return MY_XML_OK;
} | O3 | c | my_xml_parse:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x118(%rdi), %rcx
movq %rcx, 0x120(%rdi)
movq %rsi, 0x128(%rdi)
movq %rsi, 0x130(%rdi)
leaq (%rsi,%rdx), %rax
movq %rax, 0x138(%rdi)
testq %rdx, %rdx
jle 0xb6e7d
leaq -0x40(%rbp), %r15
cmpb $0x3c, (%rsi)
jne 0xb6bbf
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb6f47
cmpl $0x43, %eax
je 0xb6e5f
cmpl $0x44, %eax
jne 0xb6c24
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0xb6e5f
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq $0x9, %rsi
subq %rsi, %rdx
addq $-0x3, %rdx
jmp 0xb6c1a
movq %rsi, -0x40(%rbp)
movq %rsi, %rdx
cmpq %rax, %rsi
jae 0xb6be5
subq %rsi, %rax
movq %rsi, %rdx
cmpb $0x3c, (%rdx)
je 0xb6be5
incq %rdx
movq %rdx, 0x130(%rbx)
decq %rax
jne 0xb6bd1
movq %rdx, -0x38(%rbp)
testb $0x2, (%rbx)
jne 0xb6bfe
movq %r15, %rdi
callq 0xb757f
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
cmpq %rdx, %rsi
je 0xb6e5f
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0xb6e5f
subq %rsi, %rdx
movq %rbx, %rdi
callq *%rax
jmp 0xb6e5f
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb6f47
cmpl $0x2f, %eax
jne 0xb6c76
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb6f47
cmpl $0x49, %eax
jne 0xb6edd
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0xb7245
testl %eax, %eax
jne 0xb6f2f
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb6f47
movl %eax, %r13d
jmp 0xb6e59
movl %eax, %r14d
cmpl $0x21, %eax
sete %r12b
cmpl $0x3f, %eax
je 0xb6c8b
cmpl $0x21, %r14d
jne 0xb6c98
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb6f47
jmp 0xb6c9e
movb $0x1, %r12b
movl %r14d, %eax
cmpl $0x49, %eax
jne 0xb6ec9
movl $0x0, 0x4(%rbx)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0xb7408
testl %eax, %eax
jne 0xb6f2f
movb %r12b, -0x29(%rbp)
movl %r14d, %r12d
xorl $0x21, %r12d
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb6f47
movl %eax, %r13d
xorl $0x53, %eax
orl %r12d, %eax
sete %al
cmpl $0x49, %r13d
je 0xb6cf9
testb %al, %al
je 0xb6de2
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0xb6f47
cmpl $0x49, %eax
je 0xb6d87
movl %eax, %r13d
cmpl $0x3d, %eax
jne 0xb6dc6
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0xb6f47
cmpl $0x53, %eax
je 0xb6d30
cmpl $0x49, %eax
jne 0xb6ef1
movl $0x1, 0x4(%rbx)
movq -0x40(%rbp), %r13
movq -0x38(%rbp), %r15
subq %r13, %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xb7408
testl %eax, %eax
jne 0xb6f2f
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0xb6d7c
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq *%rax
testl %eax, %eax
jne 0xb6f2f
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
jmp 0xb6db8
movl $0x1, 0x4(%rbx)
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r13
subq %r15, %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xb7408
testl %eax, %eax
jne 0xb6f2f
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xb7245
testl %eax, %eax
je 0xb6dd2
jmp 0xb6f2f
cmpl $0x21, %r14d
jne 0xb6dde
cmpl $0x53, %r13d
jne 0xb6dde
movq %rbx, %rdi
leaq -0x40(%rbp), %r15
jmp 0xb6cd7
leaq -0x40(%rbp), %r15
cmpl $0x2f, %r13d
movb -0x29(%rbp), %r12b
jne 0xb6e0e
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xb7245
testl %eax, %eax
jne 0xb6f2f
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb6f47
movl %eax, %r13d
testb %r12b, %r12b
jne 0xb6e3f
cmpl $0x3f, %r13d
jne 0xb6f05
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xb7245
testl %eax, %eax
jne 0xb6f2f
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb6f47
movl %eax, %r13d
cmpl $0x21, %r14d
jne 0xb6e59
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xb7245
testl %eax, %eax
jne 0xb6f2f
cmpl $0x3e, %r13d
jne 0xb6eb4
movq 0x130(%rbx), %rsi
movq 0x138(%rbx), %rax
cmpq %rax, %rsi
jb 0xb6b78
movq 0x118(%rbx), %rcx
cmpb $0x0, (%rcx)
je 0xb6eac
addq $0x8, %rbx
leaq 0xcf0e(%rip), %rcx # 0xc3d9b
movl $0x1, %r14d
movl $0x80, %edx
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x3ae00
jmp 0xb6f35
xorl %r14d, %r14d
jmp 0xb6f35
addq $0x8, %rbx
movl %r13d, %edi
callq 0xb71aa
leaq 0xceb9(%rip), %rcx # 0xc3d80
jmp 0xb6f18
addq $0x8, %rbx
movl %eax, %edi
callq 0xb71aa
leaq 0xce3f(%rip), %rcx # 0xc3d1a
jmp 0xb6f18
addq $0x8, %rbx
movl %eax, %edi
callq 0xb71aa
leaq 0xce0e(%rip), %rcx # 0xc3cfd
jmp 0xb6f18
addq $0x8, %rbx
movl %eax, %edi
callq 0xb71aa
leaq 0xce3b(%rip), %rcx # 0xc3d3e
jmp 0xb6f18
addq $0x8, %rbx
movl %r13d, %edi
callq 0xb71aa
leaq 0xce4d(%rip), %rcx # 0xc3d65
movl $0x80, %edx
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %r8
xorl %eax, %eax
callq 0x3ae00
movl $0x1, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_xml_parse:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov rcx, [rdi+118h]
mov [rdi+120h], rcx
mov [rdi+128h], rsi
mov [rdi+130h], rsi
lea rax, [rsi+rdx]
mov [rdi+138h], rax
test rdx, rdx
jle loc_B6E7D
lea r15, [rbp+var_40]
loc_B6B78:
cmp byte ptr [rsi], 3Ch ; '<'
jnz short loc_B6BBF
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 43h ; 'C'
jz loc_B6E5F
cmp eax, 44h ; 'D'
jnz loc_B6C24
mov rax, [rbx+150h]
test rax, rax
jz loc_B6E5F
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
add rsi, 9
sub rdx, rsi
add rdx, 0FFFFFFFFFFFFFFFDh
jmp short loc_B6C1A
loc_B6BBF:
mov [rbp+var_40], rsi
mov rdx, rsi
cmp rsi, rax
jnb short loc_B6BE5
sub rax, rsi
mov rdx, rsi
loc_B6BD1:
cmp byte ptr [rdx], 3Ch ; '<'
jz short loc_B6BE5
inc rdx
mov [rbx+130h], rdx
dec rax
jnz short loc_B6BD1
loc_B6BE5:
mov [rbp+var_38], rdx
test byte ptr [rbx], 2
jnz short loc_B6BFE
mov rdi, r15
call my_xml_norm_text
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
loc_B6BFE:
cmp rsi, rdx
jz loc_B6E5F
mov rax, [rbx+150h]
test rax, rax
jz loc_B6E5F
sub rdx, rsi
loc_B6C1A:
mov rdi, rbx
call rax
jmp loc_B6E5F
loc_B6C24:
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 2Fh ; '/'
jnz short loc_B6C76
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 49h ; 'I'
jnz loc_B6EDD
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
sub rdx, rsi
mov rdi, rbx
call my_xml_leave
test eax, eax
jnz loc_B6F2F
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
jmp loc_B6E59
loc_B6C76:
mov r14d, eax
cmp eax, 21h ; '!'
setz r12b
cmp eax, 3Fh ; '?'
jz short loc_B6C8B
cmp r14d, 21h ; '!'
jnz short loc_B6C98
loc_B6C8B:
mov rdi, rbx
mov rsi, r15
call my_xml_scan
jmp short loc_B6C9E
loc_B6C98:
mov r12b, 1
mov eax, r14d
loc_B6C9E:
cmp eax, 49h ; 'I'
jnz loc_B6EC9
mov dword ptr [rbx+4], 0
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
sub rdx, rsi
mov rdi, rbx
call my_xml_enter
test eax, eax
jnz loc_B6F2F
mov [rbp+var_29], r12b
mov r12d, r14d
xor r12d, 21h
mov rdi, rbx
loc_B6CD7:
mov rsi, r15
call my_xml_scan
mov r13d, eax
xor eax, 53h
or eax, r12d
setz al
cmp r13d, 49h ; 'I'
jz short loc_B6CF9
test al, al
jz loc_B6DE2
loc_B6CF9:
mov rdi, rbx
lea rsi, [rbp+var_50]
call my_xml_scan
cmp eax, 49h ; 'I'
jz short loc_B6D87
mov r13d, eax
cmp eax, 3Dh ; '='
jnz loc_B6DC6
mov rdi, rbx
lea rsi, [rbp+var_50]
call my_xml_scan
cmp eax, 53h ; 'S'
jz short loc_B6D30
cmp eax, 49h ; 'I'
jnz loc_B6EF1
loc_B6D30:
mov dword ptr [rbx+4], 1
mov r13, [rbp+var_40]
mov r15, [rbp+var_38]
sub r15, r13
mov rdi, rbx
mov rsi, r13
mov rdx, r15
call my_xml_enter
test eax, eax
jnz loc_B6F2F
mov rax, [rbx+150h]
test rax, rax
jz short loc_B6D7C
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_48]
sub rdx, rsi
mov rdi, rbx
call rax
test eax, eax
jnz loc_B6F2F
loc_B6D7C:
mov rdi, rbx
mov rsi, r13
mov rdx, r15
jmp short loc_B6DB8
loc_B6D87:
mov dword ptr [rbx+4], 1
mov r15, [rbp+var_40]
mov r13, [rbp+var_38]
sub r13, r15
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call my_xml_enter
test eax, eax
jnz loc_B6F2F
mov rdi, rbx
mov rsi, r15
mov rdx, r13
loc_B6DB8:
call my_xml_leave
test eax, eax
jz short loc_B6DD2
jmp loc_B6F2F
loc_B6DC6:
cmp r14d, 21h ; '!'
jnz short loc_B6DDE
cmp r13d, 53h ; 'S'
jnz short loc_B6DDE
loc_B6DD2:
mov rdi, rbx
lea r15, [rbp+var_40]
jmp loc_B6CD7
loc_B6DDE:
lea r15, [rbp+var_40]
loc_B6DE2:
cmp r13d, 2Fh ; '/'
mov r12b, [rbp+var_29]
jnz short loc_B6E0E
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_B6F2F
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
loc_B6E0E:
test r12b, r12b
jnz short loc_B6E3F
cmp r13d, 3Fh ; '?'
jnz loc_B6F05
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_B6F2F
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
loc_B6E3F:
cmp r14d, 21h ; '!'
jnz short loc_B6E59
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_B6F2F
loc_B6E59:
cmp r13d, 3Eh ; '>'
jnz short loc_B6EB4
loc_B6E5F:
mov rsi, [rbx+130h]
mov rax, [rbx+138h]
cmp rsi, rax
jb loc_B6B78
mov rcx, [rbx+118h]
loc_B6E7D:
cmp byte ptr [rcx], 0
jz short loc_B6EAC
add rbx, 8
lea rcx, aUnexpectedEndO; "unexpected END-OF-INPUT"
mov r14d, 1
mov edx, 80h
mov rdi, rbx
mov esi, 1
xor eax, eax
call ___sprintf_chk
jmp loc_B6F35
loc_B6EAC:
xor r14d, r14d
jmp loc_B6F35
loc_B6EB4:
add rbx, 8
mov edi, r13d
call lex2str
lea rcx, aSUnexpectedWan; "%s unexpected ('>' wanted)"
jmp short loc_B6F18
loc_B6EC9:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde; "%s unexpected (ident or '/' wanted)"
jmp short loc_B6F18
loc_B6EDD:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde_0; "%s unexpected (ident wanted)"
jmp short loc_B6F18
loc_B6EF1:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde_1; "%s unexpected (ident or string wanted)"
jmp short loc_B6F18
loc_B6F05:
add rbx, 8
mov edi, r13d
call lex2str
lea rcx, aSUnexpectedWan_0; "%s unexpected ('?' wanted)"
loc_B6F18:
mov edx, 80h
mov rdi, rbx
mov esi, 1
mov r8, rax
xor eax, eax
call ___sprintf_chk
loc_B6F2F:
mov r14d, 1
loc_B6F35:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_xml_parse(long long a1, _BYTE *a2, long long a3)
{
_BYTE *v4; // rcx
_BYTE *v5; // rax
int v6; // eax
void ( *v7)(long long, _BYTE *, long long); // rax
long long v8; // rdx
_BYTE *v9; // rdx
long long v10; // rax
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // r13d
unsigned int v14; // r14d
bool v15; // r12
long long i; // rdi
unsigned int v17; // eax
unsigned int v18; // eax
_BYTE *v19; // r13
long long v20; // r15
unsigned int ( *v21)(long long, _QWORD, _QWORD); // rax
long long v22; // rdi
_BYTE *v23; // rsi
long long v24; // rdx
_BYTE *v25; // r15
long long v26; // r13
bool v27; // r12
unsigned int v28; // r14d
long long v29; // rax
long long v30; // rax
long long v31; // rax
long long v32; // rax
long long v33; // rax
_QWORD v35[2]; // [rsp+0h] [rbp-50h] BYREF
_BYTE *v36; // [rsp+10h] [rbp-40h] BYREF
_BYTE *v37; // [rsp+18h] [rbp-38h]
bool v38; // [rsp+27h] [rbp-29h]
v4 = *(_BYTE **)(a1 + 280);
*(_QWORD *)(a1 + 288) = v4;
*(_QWORD *)(a1 + 296) = a2;
*(_QWORD *)(a1 + 304) = a2;
v5 = &a2[a3];
*(_QWORD *)(a1 + 312) = &a2[a3];
if ( a3 <= 0 )
goto LABEL_57;
while ( *a2 != 60 )
{
v36 = a2;
v9 = a2;
if ( a2 < v5 )
{
v10 = v5 - a2;
v9 = a2;
do
{
if ( *v9 == 60 )
break;
*(_QWORD *)(a1 + 304) = ++v9;
--v10;
}
while ( v10 );
}
v37 = v9;
if ( (*(_BYTE *)a1 & 2) == 0 )
{
my_xml_norm_text(&v36);
a2 = v36;
v9 = v37;
}
if ( a2 != v9 )
{
v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336);
if ( v7 )
{
v8 = v9 - a2;
LABEL_16:
v7(a1, a2, v8);
}
}
LABEL_55:
a2 = *(_BYTE **)(a1 + 304);
v5 = *(_BYTE **)(a1 + 312);
if ( a2 >= v5 )
{
v4 = *(_BYTE **)(a1 + 280);
LABEL_57:
if ( *v4 )
{
v28 = 1;
__sprintf_chk(a1 + 8, 1LL, 128LL, "unexpected END-OF-INPUT");
}
else
{
return 0;
}
return v28;
}
}
v6 = my_xml_scan(a1, &v36);
if ( v6 == 67 )
goto LABEL_55;
if ( v6 == 68 )
{
v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336);
if ( !v7 )
goto LABEL_55;
a2 = v36 + 9;
v8 = v37 - (v36 + 9) - 3;
goto LABEL_16;
}
v11 = my_xml_scan(a1, &v36);
if ( v11 == 47 )
{
v12 = my_xml_scan(a1, &v36);
if ( v12 == 73 )
{
if ( !(unsigned int)my_xml_leave(a1, v36, v37 - v36) )
{
v13 = my_xml_scan(a1, &v36);
goto LABEL_54;
}
}
else
{
v31 = lex2str(v12);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident wanted)", v31);
}
return 1;
}
v14 = v11;
v15 = v11 == 33;
if ( v11 == 63 || v11 == 33 )
v11 = my_xml_scan(a1, &v36);
else
v15 = 1;
if ( v11 != 73 )
{
v30 = lex2str(v11);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or '/' wanted)", v30);
return 1;
}
*(_DWORD *)(a1 + 4) = 0;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v38 = v15;
for ( i = a1; ; i = a1 )
{
v13 = my_xml_scan(i, &v36);
if ( v13 != 73 )
{
if ( v14 ^ 0x21 | v13 ^ 0x53 )
break;
}
v17 = my_xml_scan(a1, v35);
if ( v17 == 73 )
{
*(_DWORD *)(a1 + 4) = 1;
v25 = v36;
v26 = v37 - v36;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v22 = a1;
v23 = v25;
v24 = v26;
LABEL_40:
if ( (unsigned int)my_xml_leave(v22, v23, v24) )
return 1;
continue;
}
v13 = v17;
if ( v17 == 61 )
{
v18 = my_xml_scan(a1, v35);
if ( v18 != 83 && v18 != 73 )
{
v32 = lex2str(v18);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or string wanted)", v32);
return 1;
}
*(_DWORD *)(a1 + 4) = 1;
v19 = v36;
v20 = v37 - v36;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v21 = *(unsigned int ( **)(long long, _QWORD, _QWORD))(a1 + 336);
if ( v21 )
{
if ( v21(a1, v35[0], v35[1] - v35[0]) )
return 1;
}
v22 = a1;
v23 = v19;
v24 = v20;
goto LABEL_40;
}
if ( v14 != 33 || v17 != 83 )
break;
}
v27 = v38;
if ( v13 == 47 )
{
if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) )
return 1;
v13 = my_xml_scan(a1, &v36);
}
if ( v27 )
goto LABEL_52;
if ( v13 == 63 )
{
if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) )
return 1;
v13 = my_xml_scan(a1, &v36);
LABEL_52:
if ( v14 != 33 || !(unsigned int)my_xml_leave(a1, 0LL, 0LL) )
{
LABEL_54:
if ( v13 == 62 )
goto LABEL_55;
v29 = lex2str(v13);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('>' wanted)", v29);
}
}
else
{
v33 = lex2str(v13);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('?' wanted)", v33);
}
return 1;
}
| my_xml_parse:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RCX,qword ptr [RDI + 0x118]
MOV qword ptr [RDI + 0x120],RCX
MOV qword ptr [RDI + 0x128],RSI
MOV qword ptr [RDI + 0x130],RSI
LEA RAX,[RSI + RDX*0x1]
MOV qword ptr [RDI + 0x138],RAX
TEST RDX,RDX
JLE 0x001b6e7d
LEA R15,[RBP + -0x40]
LAB_001b6b78:
CMP byte ptr [RSI],0x3c
JNZ 0x001b6bbf
MOV RDI,RBX
MOV RSI,R15
CALL 0x001b6f47
CMP EAX,0x43
JZ 0x001b6e5f
CMP EAX,0x44
JNZ 0x001b6c24
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x001b6e5f
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
ADD RSI,0x9
SUB RDX,RSI
ADD RDX,-0x3
JMP 0x001b6c1a
LAB_001b6bbf:
MOV qword ptr [RBP + -0x40],RSI
MOV RDX,RSI
CMP RSI,RAX
JNC 0x001b6be5
SUB RAX,RSI
MOV RDX,RSI
LAB_001b6bd1:
CMP byte ptr [RDX],0x3c
JZ 0x001b6be5
INC RDX
MOV qword ptr [RBX + 0x130],RDX
DEC RAX
JNZ 0x001b6bd1
LAB_001b6be5:
MOV qword ptr [RBP + -0x38],RDX
TEST byte ptr [RBX],0x2
JNZ 0x001b6bfe
MOV RDI,R15
CALL 0x001b757f
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
LAB_001b6bfe:
CMP RSI,RDX
JZ 0x001b6e5f
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x001b6e5f
SUB RDX,RSI
LAB_001b6c1a:
MOV RDI,RBX
CALL RAX
JMP 0x001b6e5f
LAB_001b6c24:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001b6f47
CMP EAX,0x2f
JNZ 0x001b6c76
MOV RDI,RBX
MOV RSI,R15
CALL 0x001b6f47
CMP EAX,0x49
JNZ 0x001b6edd
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
SUB RDX,RSI
MOV RDI,RBX
CALL 0x001b7245
TEST EAX,EAX
JNZ 0x001b6f2f
MOV RDI,RBX
MOV RSI,R15
CALL 0x001b6f47
MOV R13D,EAX
JMP 0x001b6e59
LAB_001b6c76:
MOV R14D,EAX
CMP EAX,0x21
SETZ R12B
CMP EAX,0x3f
JZ 0x001b6c8b
CMP R14D,0x21
JNZ 0x001b6c98
LAB_001b6c8b:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001b6f47
JMP 0x001b6c9e
LAB_001b6c98:
MOV R12B,0x1
MOV EAX,R14D
LAB_001b6c9e:
CMP EAX,0x49
JNZ 0x001b6ec9
MOV dword ptr [RBX + 0x4],0x0
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
SUB RDX,RSI
MOV RDI,RBX
CALL 0x001b7408
TEST EAX,EAX
JNZ 0x001b6f2f
MOV byte ptr [RBP + -0x29],R12B
MOV R12D,R14D
XOR R12D,0x21
MOV RDI,RBX
LAB_001b6cd7:
MOV RSI,R15
CALL 0x001b6f47
MOV R13D,EAX
XOR EAX,0x53
OR EAX,R12D
SETZ AL
CMP R13D,0x49
JZ 0x001b6cf9
TEST AL,AL
JZ 0x001b6de2
LAB_001b6cf9:
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
CALL 0x001b6f47
CMP EAX,0x49
JZ 0x001b6d87
MOV R13D,EAX
CMP EAX,0x3d
JNZ 0x001b6dc6
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
CALL 0x001b6f47
CMP EAX,0x53
JZ 0x001b6d30
CMP EAX,0x49
JNZ 0x001b6ef1
LAB_001b6d30:
MOV dword ptr [RBX + 0x4],0x1
MOV R13,qword ptr [RBP + -0x40]
MOV R15,qword ptr [RBP + -0x38]
SUB R15,R13
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
CALL 0x001b7408
TEST EAX,EAX
JNZ 0x001b6f2f
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x001b6d7c
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
SUB RDX,RSI
MOV RDI,RBX
CALL RAX
TEST EAX,EAX
JNZ 0x001b6f2f
LAB_001b6d7c:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
JMP 0x001b6db8
LAB_001b6d87:
MOV dword ptr [RBX + 0x4],0x1
MOV R15,qword ptr [RBP + -0x40]
MOV R13,qword ptr [RBP + -0x38]
SUB R13,R15
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x001b7408
TEST EAX,EAX
JNZ 0x001b6f2f
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
LAB_001b6db8:
CALL 0x001b7245
TEST EAX,EAX
JZ 0x001b6dd2
JMP 0x001b6f2f
LAB_001b6dc6:
CMP R14D,0x21
JNZ 0x001b6dde
CMP R13D,0x53
JNZ 0x001b6dde
LAB_001b6dd2:
MOV RDI,RBX
LEA R15,[RBP + -0x40]
JMP 0x001b6cd7
LAB_001b6dde:
LEA R15,[RBP + -0x40]
LAB_001b6de2:
CMP R13D,0x2f
MOV R12B,byte ptr [RBP + -0x29]
JNZ 0x001b6e0e
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001b7245
TEST EAX,EAX
JNZ 0x001b6f2f
MOV RDI,RBX
MOV RSI,R15
CALL 0x001b6f47
MOV R13D,EAX
LAB_001b6e0e:
TEST R12B,R12B
JNZ 0x001b6e3f
CMP R13D,0x3f
JNZ 0x001b6f05
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001b7245
TEST EAX,EAX
JNZ 0x001b6f2f
MOV RDI,RBX
MOV RSI,R15
CALL 0x001b6f47
MOV R13D,EAX
LAB_001b6e3f:
CMP R14D,0x21
JNZ 0x001b6e59
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001b7245
TEST EAX,EAX
JNZ 0x001b6f2f
LAB_001b6e59:
CMP R13D,0x3e
JNZ 0x001b6eb4
LAB_001b6e5f:
MOV RSI,qword ptr [RBX + 0x130]
MOV RAX,qword ptr [RBX + 0x138]
CMP RSI,RAX
JC 0x001b6b78
MOV RCX,qword ptr [RBX + 0x118]
LAB_001b6e7d:
CMP byte ptr [RCX],0x0
JZ 0x001b6eac
ADD RBX,0x8
LEA RCX,[0x1c3d9b]
MOV R14D,0x1
MOV EDX,0x80
MOV RDI,RBX
MOV ESI,0x1
XOR EAX,EAX
CALL 0x0013ae00
JMP 0x001b6f35
LAB_001b6eac:
XOR R14D,R14D
JMP 0x001b6f35
LAB_001b6eb4:
ADD RBX,0x8
MOV EDI,R13D
CALL 0x001b71aa
LEA RCX,[0x1c3d80]
JMP 0x001b6f18
LAB_001b6ec9:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x001b71aa
LEA RCX,[0x1c3d1a]
JMP 0x001b6f18
LAB_001b6edd:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x001b71aa
LEA RCX,[0x1c3cfd]
JMP 0x001b6f18
LAB_001b6ef1:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x001b71aa
LEA RCX,[0x1c3d3e]
JMP 0x001b6f18
LAB_001b6f05:
ADD RBX,0x8
MOV EDI,R13D
CALL 0x001b71aa
LEA RCX,[0x1c3d65]
LAB_001b6f18:
MOV EDX,0x80
MOV RDI,RBX
MOV ESI,0x1
MOV R8,RAX
XOR EAX,EAX
CALL 0x0013ae00
LAB_001b6f2f:
MOV R14D,0x1
LAB_001b6f35:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Type propagation algorithm not settling */
bool my_xml_parse(byte *param_1,char *param_2,long param_3)
{
char cVar1;
int iVar2;
int iVar3;
code *pcVar4;
int8 uVar5;
char *pcVar6;
char *pcVar7;
long lVar8;
bool bVar9;
long local_58;
long local_50;
char *local_48;
char *local_40;
char local_31;
pcVar7 = *(char **)(param_1 + 0x118);
*(char **)(param_1 + 0x120) = pcVar7;
*(char **)(param_1 + 0x128) = param_2;
*(char **)(param_1 + 0x130) = param_2;
pcVar6 = param_2 + param_3;
*(char **)(param_1 + 0x138) = pcVar6;
if (0 < param_3) {
do {
if (*param_2 == '<') {
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x43) {
if (iVar2 == 0x44) {
pcVar4 = *(code **)(param_1 + 0x150);
if (pcVar4 != (code *)0x0) {
pcVar7 = local_40 + (-3 - (long)(local_48 + 9));
pcVar6 = local_48 + 9;
goto LAB_001b6c1a;
}
}
else {
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x2f) {
bVar9 = iVar2 == 0x21;
if ((iVar2 == 0x3f) || (iVar2 == 0x21)) {
iVar3 = my_xml_scan(param_1,&local_48);
}
else {
bVar9 = true;
iVar3 = iVar2;
}
if (iVar3 == 0x49) {
param_1[4] = 0;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
iVar3 = my_xml_enter(param_1,local_48,(long)local_40 - (long)local_48);
local_31 = bVar9;
do {
if (iVar3 != 0) {
return true;
}
LAB_001b6cd7:
iVar3 = my_xml_scan(param_1,&local_48);
if ((iVar3 != 0x49) && (iVar3 != 0x53 || iVar2 != 0x21)) goto LAB_001b6de2;
iVar3 = my_xml_scan(param_1,&local_58);
pcVar6 = local_48;
if (iVar3 == 0x49) {
param_1[4] = 1;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
lVar8 = (long)local_40 - (long)local_48;
iVar3 = my_xml_enter(param_1,local_48,lVar8);
goto joined_r0x001b6da9;
}
if (iVar3 != 0x3d) goto LAB_001b6dc6;
iVar3 = my_xml_scan(param_1,&local_58);
pcVar6 = local_48;
if ((iVar3 != 0x53) && (iVar3 != 0x49)) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (ident or string wanted)";
goto LAB_001b6f18;
}
param_1[4] = 1;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
lVar8 = (long)local_40 - (long)local_48;
iVar3 = my_xml_enter(param_1,local_48,lVar8);
if (iVar3 != 0) {
return true;
}
if (*(code **)(param_1 + 0x150) != (code *)0x0) {
iVar3 = (**(code **)(param_1 + 0x150))(param_1,local_58,local_50 - local_58);
joined_r0x001b6da9:
if (iVar3 != 0) {
return true;
}
}
iVar3 = my_xml_leave(param_1,pcVar6,lVar8);
} while( true );
}
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (ident or \'/\' wanted)";
LAB_001b6f18:
__sprintf_chk(param_1 + 8,1,0x80,pcVar6,uVar5);
return true;
}
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x49) {
uVar5 = lex2str(iVar2);
pcVar6 = "%s unexpected (ident wanted)";
goto LAB_001b6f18;
}
iVar2 = my_xml_leave(param_1,local_48,(long)local_40 - (long)local_48);
if (iVar2 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
LAB_001b6e59:
if (iVar3 != 0x3e) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (\'>\' wanted)";
goto LAB_001b6f18;
}
}
}
}
else {
local_40 = param_2;
if (param_2 < pcVar6) {
lVar8 = (long)pcVar6 - (long)param_2;
do {
if (*local_40 == '<') break;
local_40 = local_40 + 1;
*(char **)(param_1 + 0x130) = local_40;
lVar8 = lVar8 + -1;
} while (lVar8 != 0);
}
local_48 = param_2;
if ((*param_1 & 2) == 0) {
my_xml_norm_text(&local_48);
}
if ((local_48 != local_40) && (pcVar4 = *(code **)(param_1 + 0x150), pcVar4 != (code *)0x0))
{
pcVar7 = local_40 + -(long)local_48;
pcVar6 = local_48;
LAB_001b6c1a:
(*pcVar4)(param_1,pcVar6,pcVar7);
}
}
param_2 = *(char **)(param_1 + 0x130);
pcVar6 = *(char **)(param_1 + 0x138);
} while (param_2 < pcVar6);
pcVar7 = *(char **)(param_1 + 0x118);
}
cVar1 = *pcVar7;
if (cVar1 != '\0') {
__sprintf_chk(param_1 + 8,1,0x80,"unexpected END-OF-INPUT");
}
return cVar1 != '\0';
LAB_001b6dc6:
if ((iVar2 != 0x21) || (iVar3 != 0x53)) {
LAB_001b6de2:
cVar1 = local_31;
if (iVar3 == 0x2f) {
iVar3 = my_xml_leave(param_1,0,0);
if (iVar3 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
}
if (cVar1 == '\0') {
if (iVar3 != 0x3f) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (\'?\' wanted)";
goto LAB_001b6f18;
}
iVar3 = my_xml_leave(param_1,0,0);
if (iVar3 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
}
if ((iVar2 == 0x21) && (iVar2 = my_xml_leave(param_1,0,0), iVar2 != 0)) {
return true;
}
goto LAB_001b6e59;
}
goto LAB_001b6cd7;
}
| |
30,551 | diagnostic_context_add | tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c | void diagnostic_context_add(
DiagnosticContext* context,
DiagnosticSeverity severity,
SourceLocation location,
const char* message,
const char* code) {
assert(context != NULL);
assert(message != NULL);
// Check if we need to resize the array
if (context->diagnostics.count >= context->diagnostics.capacity) {
size_t new_capacity = context->diagnostics.capacity == 0 ? 8 : context->diagnostics.capacity * 2;
size_t new_size = new_capacity * sizeof(Diagnostic);
// Allocate new array
Diagnostic* new_items = arena_alloc(context->arena, new_size);
if (!new_items) return; // Failed to allocate
// Copy old items
if (context->diagnostics.items) {
memcpy(new_items, context->diagnostics.items, context->diagnostics.count * sizeof(Diagnostic));
}
// Update array
context->diagnostics.items = new_items;
context->diagnostics.capacity = new_capacity;
}
// Add diagnostic
Diagnostic* diagnostic = &context->diagnostics.items[context->diagnostics.count++];
diagnostic->severity = severity;
diagnostic->location = location;
diagnostic->message = message;
diagnostic->code = code;
// Update error count
if (severity == DIAGNOSTIC_ERROR || severity == DIAGNOSTIC_FATAL) {
context->error_count++;
}
} | O3 | c | diagnostic_context_add:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3b27
movq %rdx, %r15
testq %rdx, %rdx
je 0x3b46
movq %rcx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
cmpq %rcx, %rax
jae 0x3a82
movq 0x8(%rbx), %r12
jmp 0x3ad7
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x8, %r13d
cmovneq %rax, %r13
movq %r13, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rsi
movq (%rbx), %rdi
callq 0x32d3
testq %rax, %rax
je 0x3b18
movq %rax, %r12
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x3acb
movq 0x10(%rbx), %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdx
movq %r12, %rdi
callq 0x2220
movq %r12, 0x8(%rbx)
movq %r13, 0x18(%rbx)
movq 0x10(%rbx), %rax
leaq 0x40(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x10(%rbx)
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movl %ebp, (%r12,%rax)
movups (%rcx), %xmm0
movups %xmm0, 0x8(%r12,%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x18(%r12,%rax)
movq %r15, 0x20(%r12,%rax)
movq %r14, 0x28(%r12,%rax)
andl $-0x2, %ebp
cmpl $0x2, %ebp
jne 0x3b18
incq 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16231(%rip), %rdi # 0x19d5f
leaq 0x16197(%rip), %rsi # 0x19ccc
leaq 0x16233(%rip), %rcx # 0x19d6f
movl $0x44, %edx
callq 0x2180
leaq 0x16293(%rip), %rdi # 0x19de0
leaq 0x16178(%rip), %rsi # 0x19ccc
leaq 0x16214(%rip), %rcx # 0x19d6f
movl $0x45, %edx
callq 0x2180
| diagnostic_context_add:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test rdi, rdi
jz loc_3B27
mov r15, rdx
test rdx, rdx
jz loc_3B46
mov r14, rcx
mov ebp, esi
mov rbx, rdi
mov rax, [rdi+10h]
mov rcx, [rdi+18h]
cmp rax, rcx
jnb short loc_3A82
mov r12, [rbx+8]
jmp short loc_3AD7
loc_3A82:
lea rax, [rcx+rcx]
test rcx, rcx
mov r13d, 8
cmovnz r13, rax
mov rax, r13
shl rax, 4
lea rsi, [rax+rax*2]
mov rdi, [rbx]
call arena_alloc
test rax, rax
jz short loc_3B18
mov r12, rax
mov rsi, [rbx+8]
test rsi, rsi
jz short loc_3ACB
mov rax, [rbx+10h]
shl rax, 4
lea rdx, [rax+rax*2]
mov rdi, r12
call _memcpy
loc_3ACB:
mov [rbx+8], r12
mov [rbx+18h], r13
mov rax, [rbx+10h]
loc_3AD7:
lea rcx, [rsp+38h+arg_0]
lea rdx, [rax+1]
mov [rbx+10h], rdx
lea rax, [rax+rax*2]
shl rax, 4
mov [r12+rax], ebp
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12+rax+8], xmm0
mov rcx, [rcx+10h]
mov [r12+rax+18h], rcx
mov [r12+rax+20h], r15
mov [r12+rax+28h], r14
and ebp, 0FFFFFFFEh
cmp ebp, 2
jnz short loc_3B18
inc qword ptr [rbx+20h]
loc_3B18:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3B27:
lea rdi, aContextNull; "context != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidDiagnostic; "void diagnostic_context_add(DiagnosticC"...
mov edx, 44h ; 'D'
call ___assert_fail
loc_3B46:
lea rdi, aMessageNull; "message != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidDiagnostic; "void diagnostic_context_add(DiagnosticC"...
mov edx, 45h ; 'E'
call ___assert_fail
| long long diagnostic_context_add(
long long *a1,
int a2,
long long a3,
long long a4,
long long a5,
long long a6,
__int128 a7,
long long a8)
{
unsigned long long v11; // rax
unsigned long long v12; // rcx
long long v13; // r12
long long v14; // r13
long long result; // rax
long long v16; // rsi
if ( !a1 )
__assert_fail(
"context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c",
68LL,
"void diagnostic_context_add(DiagnosticContext *, DiagnosticSeverity, SourceLocation, const char *, const char *)");
if ( !a3 )
__assert_fail(
"message != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c",
69LL,
"void diagnostic_context_add(DiagnosticContext *, DiagnosticSeverity, SourceLocation, const char *, const char *)");
v11 = a1[2];
v12 = a1[3];
if ( v11 < v12 )
{
v13 = a1[1];
LABEL_11:
a1[2] = v11 + 1;
result = 48 * v11;
*(_DWORD *)(v13 + result) = a2;
*(_OWORD *)(v13 + result + 8) = a7;
*(_QWORD *)(v13 + result + 24) = a8;
*(_QWORD *)(v13 + result + 32) = a3;
*(_QWORD *)(v13 + result + 40) = a4;
if ( (a2 & 0xFFFFFFFE) == 2 )
++a1[4];
return result;
}
v14 = 8LL;
if ( v12 )
v14 = 2 * v12;
result = arena_alloc(*a1, 48 * v14);
if ( result )
{
v13 = result;
v16 = a1[1];
if ( v16 )
memcpy(result, v16, 48 * a1[2]);
a1[1] = v13;
a1[3] = v14;
v11 = a1[2];
goto LABEL_11;
}
return result;
}
| diagnostic_context_add:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x00103b27
MOV R15,RDX
TEST RDX,RDX
JZ 0x00103b46
MOV R14,RCX
MOV EBP,ESI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RDI + 0x18]
CMP RAX,RCX
JNC 0x00103a82
MOV R12,qword ptr [RBX + 0x8]
JMP 0x00103ad7
LAB_00103a82:
LEA RAX,[RCX + RCX*0x1]
TEST RCX,RCX
MOV R13D,0x8
CMOVNZ R13,RAX
MOV RAX,R13
SHL RAX,0x4
LEA RSI,[RAX + RAX*0x2]
MOV RDI,qword ptr [RBX]
CALL 0x001032d3
TEST RAX,RAX
JZ 0x00103b18
MOV R12,RAX
MOV RSI,qword ptr [RBX + 0x8]
TEST RSI,RSI
JZ 0x00103acb
MOV RAX,qword ptr [RBX + 0x10]
SHL RAX,0x4
LEA RDX,[RAX + RAX*0x2]
MOV RDI,R12
CALL 0x00102220
LAB_00103acb:
MOV qword ptr [RBX + 0x8],R12
MOV qword ptr [RBX + 0x18],R13
MOV RAX,qword ptr [RBX + 0x10]
LAB_00103ad7:
LEA RCX,[RSP + 0x40]
LEA RDX,[RAX + 0x1]
MOV qword ptr [RBX + 0x10],RDX
LEA RAX,[RAX + RAX*0x2]
SHL RAX,0x4
MOV dword ptr [R12 + RAX*0x1],EBP
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12 + RAX*0x1 + 0x8],XMM0
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [R12 + RAX*0x1 + 0x18],RCX
MOV qword ptr [R12 + RAX*0x1 + 0x20],R15
MOV qword ptr [R12 + RAX*0x1 + 0x28],R14
AND EBP,0xfffffffe
CMP EBP,0x2
JNZ 0x00103b18
INC qword ptr [RBX + 0x20]
LAB_00103b18:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00103b27:
LEA RDI,[0x119d5f]
LEA RSI,[0x119ccc]
LEA RCX,[0x119d6f]
MOV EDX,0x44
CALL 0x00102180
LAB_00103b46:
LEA RDI,[0x119de0]
LEA RSI,[0x119ccc]
LEA RCX,[0x119d6f]
MOV EDX,0x45
CALL 0x00102180
|
void diagnostic_context_add
(int8 *param_1,uint param_2,long param_3,int8 param_4,int8 param_5,
int8 param_6,int8 param_7,int8 param_8,int8 param_9)
{
int8 *puVar1;
ulong uVar2;
void *__dest;
ulong uVar3;
long lVar4;
if (param_1 == (int8 *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c"
,0x44,
"void diagnostic_context_add(DiagnosticContext *, DiagnosticSeverity, SourceLocation, const char *, const char *)"
);
}
if (param_3 != 0) {
uVar3 = param_1[2];
uVar2 = param_1[3];
if (uVar3 < uVar2) {
__dest = (void *)param_1[1];
}
else {
lVar4 = 8;
if (uVar2 != 0) {
lVar4 = uVar2 * 2;
}
__dest = (void *)arena_alloc(*param_1,lVar4 * 0x30);
if (__dest == (void *)0x0) {
return;
}
if ((void *)param_1[1] != (void *)0x0) {
memcpy(__dest,(void *)param_1[1],param_1[2] * 0x30);
}
param_1[1] = __dest;
param_1[3] = lVar4;
uVar3 = param_1[2];
}
param_1[2] = uVar3 + 1;
lVar4 = uVar3 * 0x30;
*(uint *)((long)__dest + lVar4) = param_2;
puVar1 = (int8 *)((long)__dest + lVar4 + 8);
*puVar1 = param_7;
puVar1[1] = param_8;
*(int8 *)((long)__dest + lVar4 + 0x18) = param_9;
*(long *)((long)__dest + lVar4 + 0x20) = param_3;
*(int8 *)((long)__dest + lVar4 + 0x28) = param_4;
if ((param_2 & 0xfffffffe) == 2) {
param_1[4] = param_1[4] + 1;
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("message != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c"
,0x45,
"void diagnostic_context_add(DiagnosticContext *, DiagnosticSeverity, SourceLocation, const char *, const char *)"
);
}
| |
30,552 | chess::operator~(chess::Color::underlying) | Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp | constexpr Color::underlying operator~(Color::underlying color) {
switch (color) {
case Color::underlying::WHITE:
return Color::underlying::BLACK;
case Color::underlying::BLACK:
return Color::underlying::WHITE;
default:
return Color::underlying::NONE;
}
} | O0 | cpp | chess::operator~(chess::Color::underlying):
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x2(%rbp)
movb -0x2(%rbp), %al
movb %al, -0x3(%rbp)
testb %al, %al
je 0xb6df
jmp 0xb6d6
movb -0x3(%rbp), %al
subb $0x1, %al
je 0xb6e5
jmp 0xb6eb
movb $0x1, -0x1(%rbp)
jmp 0xb6ef
movb $0x0, -0x1(%rbp)
jmp 0xb6ef
movb $-0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN5chesscoENS_5Color10underlyingE:
push rbp
mov rbp, rsp
mov al, dil
mov [rbp+var_2], al
mov al, [rbp+var_2]
mov [rbp+var_3], al
test al, al
jz short loc_B6DF
jmp short $+2
loc_B6D6:
mov al, [rbp+var_3]
sub al, 1
jz short loc_B6E5
jmp short loc_B6EB
loc_B6DF:
mov [rbp+var_1], 1
jmp short loc_B6EF
loc_B6E5:
mov [rbp+var_1], 0
jmp short loc_B6EF
loc_B6EB:
mov [rbp+var_1], 0FFh
loc_B6EF:
mov al, [rbp+var_1]
pop rbp
retn
| char chess::operator~(char a1)
{
if ( !a1 )
return 1;
if ( a1 == 1 )
return 0;
return -1;
}
| operator~:
PUSH RBP
MOV RBP,RSP
MOV AL,DIL
MOV byte ptr [RBP + -0x2],AL
MOV AL,byte ptr [RBP + -0x2]
MOV byte ptr [RBP + -0x3],AL
TEST AL,AL
JZ 0x0010b6df
JMP 0x0010b6d6
LAB_0010b6d6:
MOV AL,byte ptr [RBP + -0x3]
SUB AL,0x1
JZ 0x0010b6e5
JMP 0x0010b6eb
LAB_0010b6df:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0010b6ef
LAB_0010b6e5:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0010b6ef
LAB_0010b6eb:
MOV byte ptr [RBP + -0x1],0xff
LAB_0010b6ef:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
/* chess::TEMPNAMEPLACEHOLDERVALUE(chess::Color::underlying) */
int1 __thiscall chess::operator~(char param_1)
{
int1 local_9;
if (param_1 == '\0') {
local_9 = 1;
}
else if (param_1 == '\x01') {
local_9 = 0;
}
else {
local_9 = 0xff;
}
return local_9;
}
| |
30,553 | mi_ft_segiterator_init | eloqsql/storage/myisam/ft_update.c | void _mi_ft_segiterator_init(MI_INFO *info, uint keynr, const uchar *record,
FT_SEG_ITERATOR *ftsi)
{
DBUG_ENTER("_mi_ft_segiterator_init");
ftsi->num=info->s->keyinfo[keynr].keysegs;
ftsi->seg=info->s->keyinfo[keynr].seg;
ftsi->rec=record;
ftsi->pos= 0; /* Avoid warnings from gcc */
ftsi->len= 0; /* Avoid warnings from gcc */
DBUG_VOID_RETURN;
} | O3 | c | mi_ft_segiterator_init:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x218(%rax), %rax
movl %esi, %esi
imulq $0x70, %rsi, %rsi
movzwl 0x8(%rax,%rsi), %eax
movl %eax, (%rcx)
movq (%rdi), %rax
movq 0x218(%rax), %rax
movq 0x28(%rax,%rsi), %rax
movq %rax, 0x8(%rcx)
movq %rdx, 0x10(%rcx)
movq $0x0, 0x18(%rcx)
movl $0x0, 0x4(%rcx)
popq %rbp
retq
| _mi_ft_segiterator_init:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov rax, [rax+218h]
mov esi, esi
imul rsi, 70h ; 'p'
movzx eax, word ptr [rax+rsi+8]
mov [rcx], eax
mov rax, [rdi]
mov rax, [rax+218h]
mov rax, [rax+rsi+28h]
mov [rcx+8], rax
mov [rcx+10h], rdx
mov qword ptr [rcx+18h], 0
mov dword ptr [rcx+4], 0
pop rbp
retn
| long long mi_ft_segiterator_init(long long a1, unsigned int a2, long long a3, long long a4)
{
long long v4; // rsi
long long result; // rax
v4 = 112LL * a2;
*(_DWORD *)a4 = *(unsigned __int16 *)(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + v4 + 8);
result = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + v4 + 40);
*(_QWORD *)(a4 + 8) = result;
*(_QWORD *)(a4 + 16) = a3;
*(_QWORD *)(a4 + 24) = 0LL;
*(_DWORD *)(a4 + 4) = 0;
return result;
}
| _mi_ft_segiterator_init:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x218]
MOV ESI,ESI
IMUL RSI,RSI,0x70
MOVZX EAX,word ptr [RAX + RSI*0x1 + 0x8]
MOV dword ptr [RCX],EAX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x218]
MOV RAX,qword ptr [RAX + RSI*0x1 + 0x28]
MOV qword ptr [RCX + 0x8],RAX
MOV qword ptr [RCX + 0x10],RDX
MOV qword ptr [RCX + 0x18],0x0
MOV dword ptr [RCX + 0x4],0x0
POP RBP
RET
|
void _mi_ft_segiterator_init(long *param_1,uint param_2,int8 param_3,uint *param_4)
{
*param_4 = (uint)*(ushort *)(*(long *)(*param_1 + 0x218) + 8 + (ulong)param_2 * 0x70);
*(int8 *)(param_4 + 2) =
*(int8 *)(*(long *)(*param_1 + 0x218) + 0x28 + (ulong)param_2 * 0x70);
*(int8 *)(param_4 + 4) = param_3;
param_4[6] = 0;
param_4[7] = 0;
param_4[1] = 0;
return;
}
| |
30,554 | ps_fetch_float | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static
void ps_fetch_float(MYSQL_BIND *r_param, const MYSQL_FIELD * field, unsigned char **row)
{
switch(r_param->buffer_type)
{
case MYSQL_TYPE_FLOAT:
{
float *value= (float *)r_param->buffer;
float4get(*value, *row);
r_param->buffer_length= 4;
*r_param->error= 0;
}
break;
default:
{
float value;
memcpy(&value, *row, sizeof(float));
float4get(value, (char *)*row);
convert_from_float(r_param, field, value, sizeof(float));
}
break;
}
(*row)+= 4;
} | O3 | c | ps_fetch_float:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x150, %rsp # imm = 0x150
movq %rdx, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movl 0x60(%rdi), %r12d
cmpl $0x4, %r12d
jne 0x810b6
movq 0x10(%r14), %rax
movq (%rbx), %rcx
movl (%rcx), %ecx
movl %ecx, (%rax)
movq $0x4, 0x40(%r14)
movq 0x18(%r14), %rax
movb $0x0, (%rax)
jmp 0x81367
movq %rsi, %r15
movq (%rbx), %rax
movss (%rax), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
movaps %xmm1, -0x170(%rbp)
jbe 0x810dd
movaps %xmm1, %xmm0
callq 0x5f920
cvtss2sd %xmm0, %xmm0
jmp 0x810f7
movaps 0x6f26c(%rip), %xmm0 # 0xf0350
xorps %xmm1, %xmm0
callq 0x5f920
cvtss2sd %xmm0, %xmm0
xorps 0x6f269(%rip), %xmm0 # 0xf0360
decl %r12d
cmpl $0xc, %r12d
ja 0x811ad
movq 0x10(%r14), %rax
leaq 0x95881(%rip), %rcx # 0x116990
movslq (%rcx,%r12,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
cmpb $0x0, 0x65(%r14)
movaps -0x170(%rbp), %xmm1
cvttss2si %xmm1, %ecx
je 0x8122b
movzwl %cx, %edx
jmp 0x8122e
cmpb $0x0, 0x65(%r14)
movaps -0x170(%rbp), %xmm1
je 0x8133d
cvttss2si %xmm1, %rcx
movq %rcx, %rdx
subss 0x6eeac(%rip), %xmm1 # 0xf0004
cvttss2si %xmm1, %rsi
sarq $0x3f, %rdx
andq %rdx, %rsi
orq %rcx, %rsi
movq %rsi, %xmm2
punpckldq 0x6f1fc(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x6f204(%rip), %xmm2 # 0xf0380
movq %rsi, (%rax)
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1 # xmm1 = xmm1[1],xmm2[1]
addsd %xmm2, %xmm1
jmp 0x8134d
cvttss2si -0x170(%rbp), %ecx
movb %cl, (%rax)
cmpb $0x0, 0x65(%r14)
je 0x81257
movzbl %cl, %eax
jmp 0x8125a
movl 0x68(%r15), %edi
cmpl $0x1f, %edi
movaps -0x170(%rbp), %xmm0
jb 0x81280
movq 0x40(%r14), %rax
movl $0x12b, %esi # imm = 0x12B
cmpq %rsi, %rax
cmovbq %rax, %rsi
cvtss2sd %xmm0, %xmm0
leaq -0x160(%rbp), %rdx
xorl %edi, %edi
xorl %ecx, %ecx
callq 0x83d0d
jmp 0x81292
cmpb $0x0, 0x65(%r14)
movaps -0x170(%rbp), %xmm1
cvttss2si %xmm1, %ecx
cvttss2si %xmm1, %rdx
cmovnel %edx, %ecx
je 0x81317
movl %edx, %edx
xorps %xmm1, %xmm1
cvtsi2sd %rdx, %xmm1
jmp 0x8131f
xorps %xmm0, %xmm0
cvtss2sd -0x170(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x8135f
movswl %cx, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
movw %cx, (%rax)
ucomisd %xmm1, %xmm0
setp %al
setne %cl
orb %al, %cl
movq 0x18(%r14), %rax
movb %cl, (%rax)
movq $0x2, 0x40(%r14)
jmp 0x81367
movsbl %cl, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
ucomisd %xmm1, %xmm0
setp %al
setne %cl
orb %al, %cl
movq 0x18(%r14), %rax
movb %cl, (%rax)
movq $0x1, 0x40(%r14)
jmp 0x81367
cvtss2sd %xmm0, %xmm0
leaq -0x160(%rbp), %rsi
xorl %edx, %edx
callq 0x82730
testb $0x40, 0x64(%r15)
jne 0x8129e
movq %rax, %r15
jmp 0x81303
movq 0x38(%r15), %r15
movq %r15, %rdx
subq %rax, %rdx
setb %cl
cmpq $0x12c, %r15 # imm = 0x12C
setae %sil
orb %cl, %sil
jne 0x81367
testq %rax, %rax
je 0x812ed
leaq -0x160(%rbp), %rsi
leaq (%rax,%rsi), %rcx
decq %rcx
negq %rax
addq %r15, %rsi
decq %rsi
xorl %edi, %edi
movb (%rcx,%rdi), %r8b
movb %r8b, (%rsi,%rdi)
decq %rdi
cmpq %rdi, %rax
jne 0x812dd
leaq -0x160(%rbp), %rdi
movl $0x12c, %ecx # imm = 0x12C
movl $0x30, %esi
callq 0x5fc30
leaq -0x160(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x81e25
jmp 0x81367
cvttps2dq %xmm1, %xmm1
cvtdq2pd %xmm1, %xmm1
movl %ecx, (%rax)
ucomisd %xmm1, %xmm0
setp %al
setne %cl
orb %al, %cl
movq 0x18(%r14), %rax
movb %cl, (%rax)
movq $0x4, 0x40(%r14)
jmp 0x81367
cvttss2si %xmm1, %rcx
movq %rcx, (%rax)
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
ucomisd %xmm1, %xmm0
setp %al
setne %cl
orb %al, %cl
movq 0x18(%r14), %rax
movb %cl, (%rax)
movq $0x8, 0x40(%r14)
addq $0x4, (%rbx)
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x8138a
addq $0x150, %rsp # imm = 0x150
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x5f320
| ps_fetch_float:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 150h
mov rbx, rdx
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
mov r12d, [rdi+60h]
cmp r12d, 4
jnz short loc_810B6
mov rax, [r14+10h]
mov rcx, [rbx]
mov ecx, [rcx]
mov [rax], ecx
mov qword ptr [r14+40h], 4
mov rax, [r14+18h]
mov byte ptr [rax], 0
jmp loc_81367
loc_810B6:
mov r15, rsi
mov rax, [rbx]
movss xmm1, dword ptr [rax]
xorps xmm0, xmm0
ucomiss xmm1, xmm0
movaps [rbp+var_170], xmm1
jbe short loc_810DD
movaps xmm0, xmm1
call _floorf
cvtss2sd xmm0, xmm0
jmp short loc_810F7
loc_810DD:
movaps xmm0, cs:xmmword_F0350
xorps xmm0, xmm1
call _floorf
cvtss2sd xmm0, xmm0
xorps xmm0, cs:xmmword_F0360
loc_810F7:
dec r12d; switch 13 cases
cmp r12d, 0Ch
ja def_81116; jumptable 0000000000081116 default case, cases 4,6,7,9-12
mov rax, [r14+10h]
lea rcx, jpt_81116
movsxd rdx, ds:(jpt_81116 - 116990h)[rcx+r12*4]
add rdx, rcx
jmp rdx; switch jump
loc_81118:
cmp byte ptr [r14+65h], 0; jumptable 0000000000081116 cases 2,13
movaps xmm1, [rbp+var_170]
cvttss2si ecx, xmm1
jz loc_8122B
movzx edx, cx
jmp loc_8122E
loc_81136:
cmp byte ptr [r14+65h], 0; jumptable 0000000000081116 case 8
movaps xmm1, [rbp+var_170]
jz loc_8133D
cvttss2si rcx, xmm1
mov rdx, rcx
subss xmm1, cs:dword_F0004
cvttss2si rsi, xmm1
sar rdx, 3Fh
and rsi, rdx
or rsi, rcx
movq xmm2, rsi
punpckldq xmm2, cs:xmmword_F0370
subpd xmm2, cs:xmmword_F0380
mov [rax], rsi
movapd xmm1, xmm2
unpckhpd xmm1, xmm2
addsd xmm1, xmm2
jmp loc_8134D
loc_81190:
cvttss2si ecx, dword ptr [rbp+var_170]; jumptable 0000000000081116 case 1
mov [rax], cl
cmp byte ptr [r14+65h], 0
jz loc_81257
movzx eax, cl
jmp loc_8125A
def_81116:
mov edi, [r15+68h]; jumptable 0000000000081116 default case, cases 4,6,7,9-12
cmp edi, 1Fh
movaps xmm0, [rbp+var_170]
jb loc_81280
mov rax, [r14+40h]
mov esi, 12Bh
cmp rax, rsi
cmovb rsi, rax
cvtss2sd xmm0, xmm0
lea rdx, [rbp+var_160]
xor edi, edi
xor ecx, ecx
call ma_gcvt
jmp loc_81292
loc_811EA:
cmp byte ptr [r14+65h], 0; jumptable 0000000000081116 case 3
movaps xmm1, [rbp+var_170]
cvttss2si ecx, xmm1
cvttss2si rdx, xmm1
cmovnz ecx, edx
jz loc_81317
mov edx, edx
xorps xmm1, xmm1
cvtsi2sd xmm1, rdx
jmp loc_8131F
loc_81217:
xorps xmm0, xmm0; jumptable 0000000000081116 case 5
cvtss2sd xmm0, dword ptr [rbp+var_170]
movsd qword ptr [rax], xmm0
jmp loc_8135F
loc_8122B:
movsx edx, cx
loc_8122E:
xorps xmm1, xmm1
cvtsi2sd xmm1, edx
mov [rax], cx
ucomisd xmm0, xmm1
setp al
setnz cl
or cl, al
mov rax, [r14+18h]
mov [rax], cl
mov qword ptr [r14+40h], 2
jmp loc_81367
loc_81257:
movsx eax, cl
loc_8125A:
xorps xmm1, xmm1
cvtsi2sd xmm1, eax
ucomisd xmm0, xmm1
setp al
setnz cl
or cl, al
mov rax, [r14+18h]
mov [rax], cl
mov qword ptr [r14+40h], 1
jmp loc_81367
loc_81280:
cvtss2sd xmm0, xmm0
lea rsi, [rbp+var_160]
xor edx, edx
call ma_fcvt
loc_81292:
test byte ptr [r15+64h], 40h
jnz short loc_8129E
mov r15, rax
jmp short loc_81303
loc_8129E:
mov r15, [r15+38h]
mov rdx, r15
sub rdx, rax
setb cl
cmp r15, 12Ch
setnb sil
or sil, cl
jnz loc_81367
test rax, rax
jz short loc_812ED
lea rsi, [rbp+var_160]
lea rcx, [rax+rsi]
dec rcx
neg rax
add rsi, r15
dec rsi
xor edi, edi
loc_812DD:
mov r8b, [rcx+rdi]
mov [rsi+rdi], r8b
dec rdi
cmp rax, rdi
jnz short loc_812DD
loc_812ED:
lea rdi, [rbp+var_160]
mov ecx, 12Ch
mov esi, 30h ; '0'
call ___memset_chk
loc_81303:
lea rsi, [rbp+var_160]
mov rdi, r14
mov rdx, r15
call convert_froma_string
jmp short loc_81367
loc_81317:
cvttps2dq xmm1, xmm1
cvtdq2pd xmm1, xmm1
loc_8131F:
mov [rax], ecx
ucomisd xmm0, xmm1
setp al
setnz cl
or cl, al
mov rax, [r14+18h]
mov [rax], cl
mov qword ptr [r14+40h], 4
jmp short loc_81367
loc_8133D:
cvttss2si rcx, xmm1
mov [rax], rcx
xorps xmm1, xmm1
cvtsi2sd xmm1, rcx
loc_8134D:
ucomisd xmm0, xmm1
setp al
setnz cl
or cl, al
mov rax, [r14+18h]
mov [rax], cl
loc_8135F:
mov qword ptr [r14+40h], 8
loc_81367:
add qword ptr [rbx], 4
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_8138A
add rsp, 150h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_8138A:
call ___stack_chk_fail
| unsigned long long ps_fetch_float(long long a1, long long a2, _DWORD **a3)
{
int v5; // r12d
double v7; // xmm1_8
double v8; // xmm0_8
_BYTE *v9; // rax
int v10; // ecx
int v11; // edx
__m128d v12; // xmm2
double v13; // xmm1_8
int v14; // ecx
int v15; // eax
long long v16; // rdi
long long v17; // rsi
unsigned long long v18; // rax
int v19; // ecx
double v20; // xmm1_8
unsigned long long v21; // r15
unsigned long long v22; // rdx
_BYTE *v23; // rcx
long long v24; // rax
long long v25; // rdi
long long v26; // rcx
__m128 v28; // [rsp+0h] [rbp-170h]
_BYTE v29[312]; // [rsp+10h] [rbp-160h] BYREF
unsigned long long v30; // [rsp+148h] [rbp-28h]
v30 = __readfsqword(0x28u);
v5 = *(_DWORD *)(a1 + 96);
if ( v5 == 4 )
{
**(_DWORD **)(a1 + 16) = **a3;
*(_QWORD *)(a1 + 64) = 4LL;
**(_BYTE **)(a1 + 24) = 0;
}
else
{
*(_QWORD *)&v7 = (unsigned int)**a3;
v28 = (__m128)(unsigned int)**a3;
if ( *(float *)&v7 <= 0.0 )
v8 = -floorf(COERCE_DOUBLE(*(_QWORD *)&v7 ^ 0x8000000080000000LL));
else
v8 = floorf(v7);
v9 = *(_BYTE **)(a1 + 16);
switch ( v5 )
{
case 1:
v14 = (int)v28.m128_f32[0];
*v9 = (int)v28.m128_f32[0];
if ( *(_BYTE *)(a1 + 101) )
v15 = (unsigned __int8)v14;
else
v15 = (char)v14;
**(_BYTE **)(a1 + 24) = v8 != (double)v15;
*(_QWORD *)(a1 + 64) = 1LL;
break;
case 2:
case 13:
v10 = (int)v28.m128_f32[0];
if ( *(_BYTE *)(a1 + 101) )
v11 = (unsigned __int16)v10;
else
v11 = (__int16)v10;
*(_WORD *)v9 = v10;
**(_BYTE **)(a1 + 24) = v8 != (double)v11;
*(_QWORD *)(a1 + 64) = 2LL;
break;
case 3:
v19 = (int)v28.m128_f32[0];
if ( *(_BYTE *)(a1 + 101) )
{
v19 = (int)v28.m128_f32[0];
v20 = (double)(int)v28.m128_f32[0];
}
else
{
*(_QWORD *)&v20 = *(_OWORD *)&_mm_cvtepi32_pd(_mm_cvttps_epi32(v28));
}
*(_DWORD *)v9 = v19;
**(_BYTE **)(a1 + 24) = v8 != v20;
*(_QWORD *)(a1 + 64) = 4LL;
break;
case 5:
*(double *)v9 = v28.m128_f32[0];
goto LABEL_37;
case 8:
if ( *(_BYTE *)(a1 + 101) )
{
v12 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32((__m128i)(unsigned int)(int)v28.m128_f32[0], (__m128i)xmmword_F0370),
(__m128d)xmmword_F0380);
*(_QWORD *)v9 = (unsigned int)(int)v28.m128_f32[0];
v13 = _mm_unpackhi_pd(v12, v12).m128d_f64[0] + v12.m128d_f64[0];
}
else
{
v26 = (unsigned int)(int)v28.m128_f32[0];
*(_QWORD *)v9 = v26;
v13 = (double)(int)v26;
}
**(_BYTE **)(a1 + 24) = v8 != v13;
LABEL_37:
*(_QWORD *)(a1 + 64) = 8LL;
break;
default:
v16 = *(unsigned int *)(a2 + 104);
if ( (unsigned int)v16 < 0x1F )
{
v18 = ma_fcvt(v16, v29, 0LL, v28.m128_f32[0]);
}
else
{
v17 = 299LL;
if ( *(_QWORD *)(a1 + 64) < 0x12BuLL )
v17 = *(_QWORD *)(a1 + 64);
v18 = ma_gcvt(0LL, v17, v29, 0LL, v28.m128_f32[0]);
}
if ( (*(_BYTE *)(a2 + 100) & 0x40) != 0 )
{
v21 = *(_QWORD *)(a2 + 56);
v22 = v21 - v18;
if ( v21 < v18 || v21 >= 0x12C )
break;
if ( v18 )
{
v23 = &v29[v18 - 1];
v24 = -(long long)v18;
v25 = 0LL;
do
{
v29[v21 - 1 + v25] = v23[v25];
--v25;
}
while ( v24 != v25 );
}
__memset_chk(v29, 48LL, v22, 300LL);
}
else
{
v21 = v18;
}
convert_froma_string(a1, v29, v21);
break;
}
}
++*a3;
return __readfsqword(0x28u);
}
| ps_fetch_float:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x150
MOV RBX,RDX
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV R12D,dword ptr [RDI + 0x60]
CMP R12D,0x4
JNZ 0x001810b6
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [RBX]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RAX],ECX
MOV qword ptr [R14 + 0x40],0x4
MOV RAX,qword ptr [R14 + 0x18]
MOV byte ptr [RAX],0x0
JMP 0x00181367
LAB_001810b6:
MOV R15,RSI
MOV RAX,qword ptr [RBX]
MOVSS XMM1,dword ptr [RAX]
XORPS XMM0,XMM0
UCOMISS XMM1,XMM0
MOVAPS xmmword ptr [RBP + -0x170],XMM1
JBE 0x001810dd
MOVAPS XMM0,XMM1
CALL 0x0015f920
CVTSS2SD XMM0,XMM0
JMP 0x001810f7
LAB_001810dd:
MOVAPS XMM0,xmmword ptr [0x001f0350]
XORPS XMM0,XMM1
CALL 0x0015f920
CVTSS2SD XMM0,XMM0
XORPS XMM0,xmmword ptr [0x001f0360]
LAB_001810f7:
DEC R12D
CMP R12D,0xc
JA 0x001811ad
MOV RAX,qword ptr [R14 + 0x10]
LEA RCX,[0x216990]
MOVSXD RDX,dword ptr [RCX + R12*0x4]
ADD RDX,RCX
switchD:
JMP RDX
caseD_2:
CMP byte ptr [R14 + 0x65],0x0
MOVAPS XMM1,xmmword ptr [RBP + -0x170]
CVTTSS2SI ECX,XMM1
JZ 0x0018122b
MOVZX EDX,CX
JMP 0x0018122e
caseD_8:
CMP byte ptr [R14 + 0x65],0x0
MOVAPS XMM1,xmmword ptr [RBP + -0x170]
JZ 0x0018133d
CVTTSS2SI RCX,XMM1
MOV RDX,RCX
SUBSS XMM1,dword ptr [0x001f0004]
CVTTSS2SI RSI,XMM1
SAR RDX,0x3f
AND RSI,RDX
OR RSI,RCX
MOVQ XMM2,RSI
PUNPCKLDQ XMM2,xmmword ptr [0x001f0370]
SUBPD XMM2,xmmword ptr [0x001f0380]
MOV qword ptr [RAX],RSI
MOVAPD XMM1,XMM2
UNPCKHPD XMM1,XMM2
ADDSD XMM1,XMM2
JMP 0x0018134d
caseD_1:
CVTTSS2SI ECX,dword ptr [RBP + -0x170]
MOV byte ptr [RAX],CL
CMP byte ptr [R14 + 0x65],0x0
JZ 0x00181257
MOVZX EAX,CL
JMP 0x0018125a
caseD_4:
MOV EDI,dword ptr [R15 + 0x68]
CMP EDI,0x1f
MOVAPS XMM0,xmmword ptr [RBP + -0x170]
JC 0x00181280
MOV RAX,qword ptr [R14 + 0x40]
MOV ESI,0x12b
CMP RAX,RSI
CMOVC RSI,RAX
CVTSS2SD XMM0,XMM0
LEA RDX,[RBP + -0x160]
XOR EDI,EDI
XOR ECX,ECX
CALL 0x00183d0d
JMP 0x00181292
caseD_3:
CMP byte ptr [R14 + 0x65],0x0
MOVAPS XMM1,xmmword ptr [RBP + -0x170]
CVTTSS2SI ECX,XMM1
CVTTSS2SI RDX,XMM1
CMOVNZ ECX,EDX
JZ 0x00181317
MOV EDX,EDX
XORPS XMM1,XMM1
CVTSI2SD XMM1,RDX
JMP 0x0018131f
caseD_5:
XORPS XMM0,XMM0
CVTSS2SD XMM0,dword ptr [RBP + -0x170]
MOVSD qword ptr [RAX],XMM0
JMP 0x0018135f
LAB_0018122b:
MOVSX EDX,CX
LAB_0018122e:
XORPS XMM1,XMM1
CVTSI2SD XMM1,EDX
MOV word ptr [RAX],CX
UCOMISD XMM0,XMM1
SETP AL
SETNZ CL
OR CL,AL
MOV RAX,qword ptr [R14 + 0x18]
MOV byte ptr [RAX],CL
MOV qword ptr [R14 + 0x40],0x2
JMP 0x00181367
LAB_00181257:
MOVSX EAX,CL
LAB_0018125a:
XORPS XMM1,XMM1
CVTSI2SD XMM1,EAX
UCOMISD XMM0,XMM1
SETP AL
SETNZ CL
OR CL,AL
MOV RAX,qword ptr [R14 + 0x18]
MOV byte ptr [RAX],CL
MOV qword ptr [R14 + 0x40],0x1
JMP 0x00181367
LAB_00181280:
CVTSS2SD XMM0,XMM0
LEA RSI,[RBP + -0x160]
XOR EDX,EDX
CALL 0x00182730
LAB_00181292:
TEST byte ptr [R15 + 0x64],0x40
JNZ 0x0018129e
MOV R15,RAX
JMP 0x00181303
LAB_0018129e:
MOV R15,qword ptr [R15 + 0x38]
MOV RDX,R15
SUB RDX,RAX
SETC CL
CMP R15,0x12c
SETNC SIL
OR SIL,CL
JNZ 0x00181367
TEST RAX,RAX
JZ 0x001812ed
LEA RSI,[RBP + -0x160]
LEA RCX,[RAX + RSI*0x1]
DEC RCX
NEG RAX
ADD RSI,R15
DEC RSI
XOR EDI,EDI
LAB_001812dd:
MOV R8B,byte ptr [RCX + RDI*0x1]
MOV byte ptr [RSI + RDI*0x1],R8B
DEC RDI
CMP RAX,RDI
JNZ 0x001812dd
LAB_001812ed:
LEA RDI,[RBP + -0x160]
MOV ECX,0x12c
MOV ESI,0x30
CALL 0x0015fc30
LAB_00181303:
LEA RSI,[RBP + -0x160]
MOV RDI,R14
MOV RDX,R15
CALL 0x00181e25
JMP 0x00181367
LAB_00181317:
CVTTPS2DQ XMM1,XMM1
CVTDQ2PD XMM1,XMM1
LAB_0018131f:
MOV dword ptr [RAX],ECX
UCOMISD XMM0,XMM1
SETP AL
SETNZ CL
OR CL,AL
MOV RAX,qword ptr [R14 + 0x18]
MOV byte ptr [RAX],CL
MOV qword ptr [R14 + 0x40],0x4
JMP 0x00181367
LAB_0018133d:
CVTTSS2SI RCX,XMM1
MOV qword ptr [RAX],RCX
XORPS XMM1,XMM1
CVTSI2SD XMM1,RCX
LAB_0018134d:
UCOMISD XMM0,XMM1
SETP AL
SETNZ CL
OR CL,AL
MOV RAX,qword ptr [R14 + 0x18]
MOV byte ptr [RAX],CL
LAB_0018135f:
MOV qword ptr [R14 + 0x40],0x8
LAB_00181367:
ADD qword ptr [RBX],0x4
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x0018138a
ADD RSP,0x150
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0018138a:
CALL 0x0015f320
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ps_fetch_float(long param_1,long param_2,long *param_3)
{
double *pdVar1;
ulong uVar2;
ulong uVar3;
char cVar4;
short sVar5;
int iVar6;
uint uVar7;
double dVar8;
long lVar9;
long in_FS_OFFSET;
float fVar10;
double dVar11;
double dVar12;
int1 auVar13 [16];
double dVar14;
int1 local_178 [16];
int1 local_168 [312];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
iVar6 = *(int *)(param_1 + 0x60);
if (iVar6 == 4) {
**(int4 **)(param_1 + 0x10) = *(int4 *)*param_3;
*(int8 *)(param_1 + 0x40) = 4;
**(int1 **)(param_1 + 0x18) = 0;
goto LAB_00181367;
}
fVar10 = *(float *)*param_3;
local_178 = ZEXT416((uint)fVar10);
if (fVar10 <= 0.0) {
fVar10 = floorf((float)(_DAT_001f0350 ^ (uint)fVar10));
dVar11 = (double)CONCAT44((uint)((ulong)(double)fVar10 >> 0x20) ^ _UNK_001f0364,
SUB84((double)fVar10,0) ^ _DAT_001f0360);
}
else {
fVar10 = floorf(fVar10);
dVar11 = (double)fVar10;
}
if (0xc < iVar6 - 1U) {
switchD_00181116_caseD_4:
if (*(uint *)(param_2 + 0x68) < 0x1f) {
uVar3 = ma_fcvt((double)(float)local_178._0_4_,*(uint *)(param_2 + 0x68),local_168,0);
}
else {
uVar3 = 299;
if (*(ulong *)(param_1 + 0x40) < 299) {
uVar3 = *(ulong *)(param_1 + 0x40);
}
uVar3 = ma_gcvt((double)(float)local_178._0_4_,0,uVar3,local_168,0);
}
if ((*(byte *)(param_2 + 100) & 0x40) != 0) {
uVar2 = *(ulong *)(param_2 + 0x38);
if (299 < uVar2 || uVar2 < uVar3) goto LAB_00181367;
if (uVar3 != 0) {
lVar9 = 0;
do {
local_178[lVar9 + uVar2 + 0xf] = local_178[lVar9 + uVar3 + 0xf];
lVar9 = lVar9 + -1;
} while (-lVar9 != uVar3);
}
__memset_chk(local_168,0x30,uVar2 - uVar3,300);
uVar3 = uVar2;
}
convert_froma_string(param_1,local_168,uVar3);
goto LAB_00181367;
}
pdVar1 = *(double **)(param_1 + 0x10);
switch(iVar6) {
case 1:
cVar4 = (char)(int)(float)local_178._0_4_;
*(char *)pdVar1 = cVar4;
if (*(char *)(param_1 + 0x65) == '\0') {
uVar7 = (uint)cVar4;
}
else {
uVar7 = (int)(float)local_178._0_4_ & 0xff;
}
*(bool *)*(int8 *)(param_1 + 0x18) = dVar11 != (double)(int)uVar7;
*(int8 *)(param_1 + 0x40) = 1;
break;
case 2:
case 0xd:
sVar5 = (short)(int)(float)local_178._0_4_;
if (*(char *)(param_1 + 0x65) == '\0') {
uVar7 = (uint)sVar5;
}
else {
uVar7 = (int)(float)local_178._0_4_ & 0xffff;
}
*(short *)pdVar1 = sVar5;
*(bool *)*(int8 *)(param_1 + 0x18) = dVar11 != (double)(int)uVar7;
*(int8 *)(param_1 + 0x40) = 2;
break;
case 3:
iVar6 = (int)(float)local_178._0_4_;
if (*(char *)(param_1 + 0x65) == '\0') {
dVar14 = (double)(int)(float)local_178._0_4_;
}
else {
iVar6 = (int)(long)(float)local_178._0_4_;
dVar14 = (double)((long)(float)local_178._0_4_ & 0xffffffff);
}
*(int *)pdVar1 = iVar6;
*(bool *)*(int8 *)(param_1 + 0x18) = dVar11 != dVar14;
*(int8 *)(param_1 + 0x40) = 4;
break;
default:
goto switchD_00181116_caseD_4;
case 5:
*pdVar1 = (double)(float)local_178._0_4_;
goto LAB_0018135f;
case 8:
if (*(char *)(param_1 + 0x65) == '\0') {
*pdVar1 = (double)(long)(float)local_178._0_4_;
dVar14 = (double)(long)(float)local_178._0_4_;
}
else {
dVar8 = (double)((long)((float)local_178._0_4_ - _DAT_001f0004) &
(long)(float)local_178._0_4_ >> 0x3f | (long)(float)local_178._0_4_);
auVar13._8_4_ = (int)((ulong)dVar8 >> 0x20);
auVar13._0_8_ = dVar8;
auVar13._12_4_ = _UNK_001f0374;
dVar12 = (double)CONCAT44(_DAT_001f0370,SUB84(dVar8,0)) - _DAT_001f0380;
dVar14 = auVar13._8_8_ - _UNK_001f0388;
*pdVar1 = dVar8;
dVar14 = dVar14 + dVar12;
}
*(bool *)*(int8 *)(param_1 + 0x18) = dVar11 != dVar14;
LAB_0018135f:
*(int8 *)(param_1 + 0x40) = 8;
}
LAB_00181367:
*param_3 = *param_3 + 4;
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
30,555 | std::pair<bool, 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::detail::json_sax_dom_callback_parser<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>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool) | llama.cpp/common/./json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O3 | cpp | std::pair<bool, 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::detail::json_sax_dom_callback_parser<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>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
movl 0x38(%rdi), %eax
leaq -0x1(%rax), %rcx
addq $0x3e, %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq 0x30(%rdi), %rax
leaq 0x3f(%r14), %rdx
andq %rcx, %rdx
xorl %edi, %edi
cmpq %r14, %rdx
setbe %dil
movq -0x8(%rax,%rdi,8), %rax
btq %rcx, %rax
jae 0x357f7
leaq 0x8(%rsp), %rdi
callq 0x34800
testb %bpl, %bpl
jne 0x357b4
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0x1c(%rsp)
movb $0x5, 0x7(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x35900
leaq 0x80(%rbx), %rdi
leaq 0x1c(%rsp), %rsi
leaq 0x7(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq *0x98(%rbx)
testb %al, %al
je 0x358e3
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x35801
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x358e3
cmpb $0x2, (%rax)
jne 0x35844
movq 0x8(%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3392c
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x358df
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x358f2
movups 0x8(%rsp), %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
movb $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq (%rbx), %rax
movb (%rax), %cl
movb (%rdi), %dl
movb %dl, (%rax)
movb %cl, (%rdi)
movq 0x8(%rax), %rcx
movq 0x8(%rdi), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x8(%rdi)
callq 0x3488a
movq (%rbx), %r14
jmp 0x358df
movq 0x58(%rbx), %rax
movl 0x60(%rbx), %esi
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
addq $0x3e, %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdi
leaq 0x3f(%r14), %rdx
andq %rcx, %rdx
xorl %r8d, %r8d
cmpq %r14, %rdx
setbe %r8b
movl $0x1, %edx
shlq %cl, %rdx
andq -0x8(%rdi,%r8,8), %rdx
subl $0x1, %esi
movl %esi, 0x60(%rbx)
jae 0x3589a
movl $0x3f, 0x60(%rbx)
addq $-0x8, %rax
movq %rax, 0x58(%rbx)
testq %rdx, %rdx
je 0x358e3
movups 0x8(%rsp), %xmm0
leaq 0x20(%rsp), %rdi
movaps %xmm0, (%rdi)
movb $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x70(%rbx), %rax
movb (%rax), %cl
movb (%rdi), %dl
movb %dl, (%rax)
movb %cl, (%rdi)
movq 0x8(%rax), %rcx
movq 0x8(%rdi), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x8(%rdi)
callq 0x3488a
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x358e8
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
callq 0x3488a
movl %ebx, %eax
movq %r14, %rdx
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x22310
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3488a
movq %rbx, %rdi
callq 0x21b20
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRSB_EESt4pairIbPSF_EOT_b:
push rbp
push r14
push rbx
sub rsp, 40h
mov ebp, edx
mov rbx, rdi
mov r14, 8000000000000000h
mov eax, [rdi+38h]
lea rcx, [rax-1]
add rax, 3Eh ; '>'
test rcx, rcx
cmovns rax, rcx
sar rax, 6
shl rax, 3
add rax, [rdi+30h]
lea rdx, [r14+3Fh]
and rdx, rcx
xor edi, edi
cmp rdx, r14
setbe dil
mov rax, [rax+rdi*8-8]
bt rax, rcx
jnb loc_357F7
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
test bpl, bpl
jnz short loc_357B4
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+58h+var_3C], eax
mov [rsp+58h+var_51], 5
cmp qword ptr [rbx+90h], 0
jz loc_35900
lea rdi, [rbx+80h]
lea rsi, [rsp+58h+var_3C]
lea rdx, [rsp+58h+var_51]
lea rcx, [rsp+58h+var_50]
call qword ptr [rbx+98h]
test al, al
jz loc_358E3
loc_357B4:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_35801
mov rax, [rax-8]
test rax, rax
jz loc_358E3
cmp byte ptr [rax], 2
jnz short loc_35844
mov rdi, [rax+8]
lea rsi, [rsp+58h+var_50]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<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>>::emplace_back<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> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_358DF
loc_357F7:
xor ebx, ebx
xor r14d, r14d
jmp loc_358F2
loc_35801:
movups xmm0, [rsp+58h+var_50]
lea rdi, [rsp+58h+var_28]
movaps xmmword ptr [rdi], xmm0
mov byte ptr [rsp+58h+var_50], 0
mov qword ptr [rsp+58h+var_50+8], 0
mov rax, [rbx]
mov cl, [rax]
mov dl, [rdi]
mov [rax], dl
mov [rdi], cl
mov rcx, [rax+8]
mov rdx, [rdi+8]
mov [rax+8], rdx
mov [rdi+8], rcx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp loc_358DF
loc_35844:
mov rax, [rbx+58h]
mov esi, [rbx+60h]
lea rcx, [rsi-1]
mov rdx, rsi
add rdx, 3Eh ; '>'
test rcx, rcx
cmovns rdx, rcx
sar rdx, 6
lea rdi, [rax+rdx*8]
lea rdx, [r14+3Fh]
and rdx, rcx
xor r8d, r8d
cmp rdx, r14
setbe r8b
mov edx, 1
shl rdx, cl
and rdx, [rdi+r8*8-8]
sub esi, 1
mov [rbx+60h], esi
jnb short loc_3589A
mov dword ptr [rbx+60h], 3Fh ; '?'
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+58h], rax
loc_3589A:
test rdx, rdx
jz short loc_358E3
movups xmm0, [rsp+58h+var_50]
lea rdi, [rsp+58h+var_38]
movaps xmmword ptr [rdi], xmm0
mov byte ptr [rsp+58h+var_50], 0
mov qword ptr [rsp+58h+var_50+8], 0
mov rax, [rbx+70h]
mov cl, [rax]
mov dl, [rdi]
mov [rax], dl
mov [rdi], cl
mov rcx, [rax+8]
mov rdx, [rdi+8]
mov [rax+8], rdx
mov [rdi+8], rcx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_358DF:
mov bl, 1
jmp short loc_358E8
loc_358E3:
xor ebx, ebx
xor r14d, r14d
loc_358E8:
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_358F2:
mov eax, ebx
mov rdx, r14
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_35900:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
mov rbx, rax
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::handle_value<std::string&>(
char **a1,
long long a2,
char a3)
{
unsigned int v4; // ebx
long long v5; // rax
signed long long v6; // rcx
long long v7; // rax
long long v8; // rax
char *v9; // rax
long long v10; // rax
char *v11; // rax
char v12; // cl
long long v13; // rcx
char *v14; // rax
long long v15; // rsi
long long v16; // rdx
long long v17; // rdx
char *v18; // rax
char v19; // cl
long long v20; // rcx
char v22; // [rsp+7h] [rbp-51h] BYREF
__int128 v23; // [rsp+8h] [rbp-50h] BYREF
int v24; // [rsp+1Ch] [rbp-3Ch] BYREF
__int128 v25; // [rsp+20h] [rbp-38h] BYREF
__int128 v26; // [rsp+30h] [rbp-28h] BYREF
v4 = (unsigned int)a1;
v5 = *((unsigned int *)a1 + 14);
v6 = v5 - 1;
v7 = v5 + 62;
if ( v6 >= 0 )
v7 = v6;
v8 = *(_QWORD *)&a1[6][8 * (v7 >> 6) - 8 + 8 * ((v6 & 0x800000000000003FLL) <= 0x8000000000000000LL)];
if ( _bittest64(&v8, v6) )
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(&v23);
if ( a3 )
goto LABEL_7;
v24 = (unsigned long long)(a1[2] - a1[1]) >> 3;
v22 = 5;
if ( !a1[18] )
std::__throw_bad_function_call();
if ( ((unsigned __int8 ( *)(char **, int *, char *, __int128 *))a1[19])(a1 + 16, &v24, &v22, &v23) )
{
LABEL_7:
v9 = a1[2];
if ( a1[1] == v9 )
{
v26 = v23;
LOBYTE(v23) = 0;
*((_QWORD *)&v23 + 1) = 0LL;
v11 = *a1;
v12 = **a1;
*v11 = v26;
LOBYTE(v26) = v12;
v13 = *((_QWORD *)v11 + 1);
*((_QWORD *)v11 + 1) = *((_QWORD *)&v26 + 1);
*((_QWORD *)&v26 + 1) = v13;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26);
goto LABEL_19;
}
v10 = *((_QWORD *)v9 - 1);
if ( v10 )
{
if ( *(_BYTE *)v10 == 2 )
{
std::vector<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>>::emplace_back<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>>(
*(_QWORD *)(v10 + 8),
(long long)&v23);
LABEL_19:
LOBYTE(v4) = 1;
LABEL_21:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v23);
return v4;
}
v14 = a1[11];
v15 = *((unsigned int *)a1 + 24);
v16 = v15 + 62;
if ( v15 - 1 >= 0 )
v16 = v15 - 1;
v17 = *(_QWORD *)&v14[8 * (v16 >> 6) - 8 + 8 * (((v15 - 1) & 0x800000000000003FLL) <= 0x8000000000000000LL)] & (1LL << ((unsigned __int8)v15 - 1));
*((_DWORD *)a1 + 24) = v15 - 1;
if ( !(_DWORD)v15 )
{
*((_DWORD *)a1 + 24) = 63;
a1[11] = v14 - 8;
}
if ( v17 )
{
v25 = v23;
LOBYTE(v23) = 0;
*((_QWORD *)&v23 + 1) = 0LL;
v18 = a1[14];
v19 = *v18;
*v18 = v25;
LOBYTE(v25) = v19;
v20 = *((_QWORD *)v18 + 1);
*((_QWORD *)v18 + 1) = *((_QWORD *)&v25 + 1);
*((_QWORD *)&v25 + 1) = v20;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v25);
goto LABEL_19;
}
}
}
v4 = 0;
goto LABEL_21;
}
return 0;
}
| handle_value<std::__cxx11::string&>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV EBP,EDX
MOV RBX,RDI
MOV R14,-0x8000000000000000
MOV EAX,dword ptr [RDI + 0x38]
LEA RCX,[RAX + -0x1]
ADD RAX,0x3e
TEST RCX,RCX
CMOVNS RAX,RCX
SAR RAX,0x6
SHL RAX,0x3
ADD RAX,qword ptr [RDI + 0x30]
LEA RDX,[R14 + 0x3f]
AND RDX,RCX
XOR EDI,EDI
CMP RDX,R14
SETBE DIL
MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8]
BT RAX,RCX
JNC 0x001357f7
LEA RDI,[RSP + 0x8]
CALL 0x00134800
TEST BPL,BPL
JNZ 0x001357b4
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0x1c],EAX
MOV byte ptr [RSP + 0x7],0x5
CMP qword ptr [RBX + 0x90],0x0
JZ 0x00135900
LEA RDI,[RBX + 0x80]
LAB_00135797:
LEA RSI,[RSP + 0x1c]
LEA RDX,[RSP + 0x7]
LEA RCX,[RSP + 0x8]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JZ 0x001358e3
LAB_001357b4:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x00135801
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x001358e3
CMP byte ptr [RAX],0x2
JNZ 0x00135844
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x8]
CALL 0x0013392c
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x001358df
LAB_001357f7:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x001358f2
LAB_00135801:
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x30]
MOVAPS xmmword ptr [RDI],XMM0
MOV byte ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV RAX,qword ptr [RBX]
MOV CL,byte ptr [RAX]
MOV DL,byte ptr [RDI]
MOV byte ptr [RAX],DL
MOV byte ptr [RDI],CL
MOV RCX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RDI + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RDI + 0x8],RCX
CALL 0x0013488a
MOV R14,qword ptr [RBX]
JMP 0x001358df
LAB_00135844:
MOV RAX,qword ptr [RBX + 0x58]
MOV ESI,dword ptr [RBX + 0x60]
LEA RCX,[RSI + -0x1]
MOV RDX,RSI
ADD RDX,0x3e
TEST RCX,RCX
CMOVNS RDX,RCX
SAR RDX,0x6
LEA RDI,[RAX + RDX*0x8]
LEA RDX,[R14 + 0x3f]
AND RDX,RCX
XOR R8D,R8D
CMP RDX,R14
SETBE R8B
MOV EDX,0x1
SHL RDX,CL
AND RDX,qword ptr [RDI + R8*0x8 + -0x8]
SUB ESI,0x1
MOV dword ptr [RBX + 0x60],ESI
JNC 0x0013589a
MOV dword ptr [RBX + 0x60],0x3f
ADD RAX,-0x8
MOV qword ptr [RBX + 0x58],RAX
LAB_0013589a:
TEST RDX,RDX
JZ 0x001358e3
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x20]
MOVAPS xmmword ptr [RDI],XMM0
MOV byte ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV RAX,qword ptr [RBX + 0x70]
MOV CL,byte ptr [RAX]
MOV DL,byte ptr [RDI]
MOV byte ptr [RAX],DL
MOV byte ptr [RDI],CL
MOV RCX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RDI + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RDI + 0x8],RCX
CALL 0x0013488a
MOV R14,qword ptr [RBX + 0x70]
LAB_001358df:
MOV BL,0x1
JMP 0x001358e8
LAB_001358e3:
XOR EBX,EBX
XOR R14D,R14D
LAB_001358e8:
LEA RDI,[RSP + 0x8]
CALL 0x0013488a
LAB_001358f2:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_00135900:
CALL 0x00122310
|
/* std::pair<bool, 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::detail::json_sax_dom_callback_parser<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> >::handle_value<std::__cxx11::string&>(std::__cxx11::string&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<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>>
::handle_value<std::__cxx11::string&>
(json_sax_dom_callback_parser<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,string *param_1,bool param_2)
{
basic_json bVar1;
uint uVar2;
char *pcVar3;
basic_json *pbVar4;
basic_json bVar5;
int8 uVar6;
char cVar7;
ulong uVar8;
ulong uVar9;
long lVar10;
int1 auVar11 [16];
int1 local_51;
basic_json local_50;
int7 uStack_4f;
int8 uStack_48;
int4 local_3c;
basic_json local_38;
int7 uStack_37;
int8 uStack_30;
basic_json local_28;
int7 uStack_27;
int8 uStack_20;
uVar9 = (ulong)*(uint *)(this + 0x38) - 1;
uVar8 = (ulong)*(uint *)(this + 0x38) + 0x3e;
if (-1 < (long)uVar9) {
uVar8 = uVar9;
}
if ((*(ulong *)(((long)uVar8 >> 6) * 8 + *(long *)(this + 0x30) + -8 +
(ulong)((uVar9 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar9 & 0x3f) &
1) == 0) {
uVar9 = 0;
lVar10 = 0;
goto LAB_001358f2;
}
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
(&local_50);
if (param_2) {
LAB_001357b4:
uVar6 = uStack_48;
bVar5 = local_50;
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_50 = (basic_json)0x0;
uStack_48 = 0;
pbVar4 = *(basic_json **)this;
bVar1 = *pbVar4;
*pbVar4 = bVar5;
_local_28 = CONCAT71(uStack_4f,bVar1);
uStack_20 = *(int8 *)(pbVar4 + 8);
*(int8 *)(pbVar4 + 8) = uVar6;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_28);
lVar10 = *(long *)this;
}
else {
pcVar3 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar3 == (char *)0x0) goto LAB_001358e3;
if (*pcVar3 == '\x02') {
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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>>>
::
emplace_back<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>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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>>>
**)(pcVar3 + 8),&local_50);
lVar10 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
else {
uVar2 = *(uint *)(this + 0x60);
uVar9 = (ulong)uVar2 - 1;
uVar8 = (ulong)uVar2 + 0x3e;
if (-1 < (long)uVar9) {
uVar8 = uVar9;
}
uVar8 = *(ulong *)(*(long *)(this + 0x58) + ((long)uVar8 >> 6) * 8 + -8 +
(ulong)((uVar9 & 0x800000000000003f) < 0x8000000000000001) * 8);
*(uint *)(this + 0x60) = uVar2 - 1;
if (uVar2 == 0) {
*(int4 *)(this + 0x60) = 0x3f;
*(long *)(this + 0x58) = *(long *)(this + 0x58) + -8;
}
if ((1L << ((byte)uVar9 & 0x3f) & uVar8) == 0) goto LAB_001358e3;
local_50 = (basic_json)0x0;
uStack_48 = 0;
pbVar4 = *(basic_json **)(this + 0x70);
bVar1 = *pbVar4;
*pbVar4 = bVar5;
_local_38 = CONCAT71(uStack_4f,bVar1);
uStack_30 = *(int8 *)(pbVar4 + 8);
*(int8 *)(pbVar4 + 8) = uVar6;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_38);
lVar10 = *(long *)(this + 0x70);
}
}
uVar9 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
local_3c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_51 = 5;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
/* try { // try from 00135797 to 00135904 has its CatchHandler @ 00135905 */
cVar7 = (**(code **)(this + 0x98))(this + 0x80,&local_3c,&local_51,&local_50);
if (cVar7 != '\0') goto LAB_001357b4;
LAB_001358e3:
uVar9 = 0;
lVar10 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_50);
LAB_001358f2:
auVar11._0_8_ = uVar9 & 0xffffffff;
auVar11._8_8_ = lVar10;
return auVar11;
}
| |
30,556 | ma_update_blob_record | eloqsql/storage/maria/ma_dynrec.c | my_bool _ma_update_blob_record(MARIA_HA *info, MARIA_RECORD_POS pos,
const uchar *oldrec __attribute__ ((unused)),
const uchar *record)
{
uchar *rec_buff;
int error;
ulong reclength,reclength2,extra;
my_bool buff_alloced;
extra= (ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER)+MARIA_SPLIT_LENGTH+
MARIA_DYN_DELETE_BLOCK_HEADER);
reclength= (info->s->base.pack_reclength+
_ma_calc_total_blob_length(info,record)+ extra);
#ifdef NOT_USED /* We now support big rows */
if (reclength > MARIA_DYN_MAX_ROW_LENGTH)
{
my_errno=HA_ERR_TO_BIG_ROW;
return 1;
}
#endif
alloc_on_stack(*info->stack_end_ptr, rec_buff, buff_alloced, reclength);
if (!rec_buff)
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(1);
}
reclength2= _ma_rec_pack(info, rec_buff+
ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
record);
if (!reclength2)
{
error= 1;
goto err;
}
DBUG_ASSERT(reclength2 <= reclength);
error=update_dynamic_record(info,pos,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
reclength2);
err:
stack_alloc_free(rec_buff, buff_alloced);
return(error != 0);
} | O0 | c | ma_update_blob_record:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq $0x5c, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3cb30
movq %rax, %rcx
movq -0x78(%rbp), %rax
addq %rcx, %rax
addq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movq (%rax), %rax
leaq -0x68(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x68(%rbp), %rax
jbe 0x3ccd7
movq -0x70(%rbp), %rcx
subq -0x68(%rbp), %rcx
movl $0x10000, %eax # imm = 0x10000
cmpq %rcx, %rax
jb 0x3ccb8
movq -0x70(%rbp), %rcx
subq -0x68(%rbp), %rcx
movl $0x8000, %eax # imm = 0x8000
cmpq %rcx, %rax
jae 0x3ccd7
movl $0x1000, %eax # imm = 0x1000
cmpq -0x68(%rbp), %rax
ja 0x3ccd7
movb $0x0, -0x59(%rbp)
movq -0x48(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x38(%rbp)
jmp 0x3ccef
movb $0x1, -0x59(%rbp)
movq -0x48(%rbp), %rsi
xorl %edi, %edi
movl $0x10010, %edx # imm = 0x10010
callq 0xf3830
movq %rax, -0x38(%rbp)
jmp 0x3ccf1
cmpq $0x0, -0x38(%rbp)
jne 0x3cd09
callq 0xf6090
movl $0x80, (%rax)
movb $0x1, -0x9(%rbp)
jmp 0x3cd73
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq $0x18, %rsi
movq -0x30(%rbp), %rdx
callq 0x3ba70
movl %eax, %eax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x3cd34
movl $0x1, -0x3c(%rbp)
jmp 0x3cd57
jmp 0x3cd36
jmp 0x3cd38
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq $0x18, %rdx
movq -0x50(%rbp), %rcx
callq 0x3c240
movsbl %al, %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
movsbl -0x59(%rbp), %esi
callq 0x3cbd0
cmpl $0x0, -0x3c(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
movb %al, -0x79(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x3cd93
movb -0x79(%rbp), %al
movq %rbp, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax,%rax)
| _ma_update_blob_record:
push rbp
mov rbp, rsp
sub rsp, 80h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
mov [rbp+var_30], rcx
mov [rbp+var_58], 5Ch ; '\'
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax+3A0h]
mov [rbp+var_78], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_30]
call _ma_calc_total_blob_length
mov rcx, rax
mov rax, [rbp+var_78]
add rax, rcx
add rax, [rbp+var_58]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov [rbp+var_68], rax
mov rax, [rbp+var_18]
mov rax, [rax+78h]
mov rax, [rax]
lea rcx, [rbp+var_68]
sub rax, rcx
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
cmp rax, [rbp+var_68]
jbe short loc_3CCD7
mov rcx, [rbp+var_70]
sub rcx, [rbp+var_68]
mov eax, 10000h
cmp rax, rcx
jb short loc_3CCB8
mov rcx, [rbp+var_70]
sub rcx, [rbp+var_68]
mov eax, 8000h
cmp rax, rcx
jnb short loc_3CCD7
mov eax, 1000h
cmp rax, [rbp+var_68]
ja short loc_3CCD7
loc_3CCB8:
mov [rbp+var_59], 0
mov rcx, [rbp+var_48]
add rcx, 0Fh
and rcx, 0FFFFFFFFFFFFFFF0h
mov rax, rsp
sub rax, rcx
mov rsp, rax
mov [rbp+var_38], rax
jmp short loc_3CCEF
loc_3CCD7:
mov [rbp+var_59], 1
mov rsi, [rbp+var_48]
xor edi, edi
mov edx, offset stru_10010
call my_malloc
mov [rbp+var_38], rax
loc_3CCEF:
jmp short $+2
loc_3CCF1:
cmp [rbp+var_38], 0
jnz short loc_3CD09
call _my_thread_var
mov dword ptr [rax], 80h
mov [rbp+var_9], 1
jmp short loc_3CD73
loc_3CD09:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_38]
add rsi, 18h
mov rdx, [rbp+var_30]
call _ma_rec_pack
mov eax, eax
mov [rbp+var_50], rax
cmp [rbp+var_50], 0
jnz short loc_3CD34
mov [rbp+var_3C], 1
jmp short loc_3CD57
loc_3CD34:
jmp short $+2
loc_3CD36:
jmp short $+2
loc_3CD38:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_38]
add rdx, 18h
mov rcx, [rbp+var_50]
call update_dynamic_record
movsx eax, al
mov [rbp+var_3C], eax
loc_3CD57:
mov rdi, [rbp+var_38]
movsx esi, [rbp+var_59]
call stack_alloc_free
cmp [rbp+var_3C], 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_9], al
loc_3CD73:
mov al, [rbp+var_9]
mov [rbp+var_79], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_3CD93
mov al, [rbp+var_79]
mov rsp, rbp
pop rbp
retn
loc_3CD93:
call ___stack_chk_fail
| bool ma_update_blob_record(long long a1, long long a2, long long a3, _BYTE *a4)
{
unsigned int v4; // eax
long long v6; // [rsp+0h] [rbp-80h] BYREF
long long v7; // [rsp+8h] [rbp-78h]
unsigned long long v8; // [rsp+10h] [rbp-70h]
unsigned long long v9; // [rsp+18h] [rbp-68h] BYREF
char v10; // [rsp+27h] [rbp-59h]
long long v11; // [rsp+28h] [rbp-58h]
unsigned long long v12; // [rsp+30h] [rbp-50h]
unsigned long long v13; // [rsp+38h] [rbp-48h]
int updated; // [rsp+44h] [rbp-3Ch]
long long v15; // [rsp+48h] [rbp-38h]
_BYTE *v16; // [rsp+50h] [rbp-30h]
long long v17; // [rsp+58h] [rbp-28h]
long long v18; // [rsp+60h] [rbp-20h]
_DWORD *v19; // [rsp+68h] [rbp-18h]
unsigned long long v21; // [rsp+78h] [rbp-8h]
v21 = __readfsqword(0x28u);
v19 = (_DWORD *)a1;
v18 = a2;
v17 = a3;
v16 = a4;
v11 = 92LL;
v7 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
v13 = ma_calc_total_blob_length((_QWORD *)a1, (long long)a4, a3) + v7 + 92;
v9 = v13;
v8 = **(_QWORD **)(a1 + 120) - (_QWORD)&v9;
if ( v8 <= v13 || v8 - v9 <= 0x10000 && (v8 - v9 <= 0x8000 || v9 < 0x1000) )
{
v10 = 1;
v15 = my_malloc(0LL, v13, &stru_10010);
}
else
{
v10 = 0;
v15 = (long long)&v6 - ((v13 + 15) & 0xFFFFFFFFFFFFFFF0LL);
}
if ( v15 )
{
v4 = ma_rec_pack(v19, (_BYTE *)(v15 + 24), v16);
v12 = v4;
if ( v4 )
updated = update_dynamic_record((long long)v19, v18, v15 + 24, v12);
else
updated = 1;
stack_alloc_free(v15, v10);
return updated != 0;
}
else
{
*(_DWORD *)my_thread_var() = 128;
return 1;
}
}
| _ma_update_blob_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x28],RDX
MOV qword ptr [RBP + -0x30],RCX
MOV qword ptr [RBP + -0x58],0x5c
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x0013cb30
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,RCX
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RAX]
LEA RCX,[RBP + -0x68]
SUB RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x68]
JBE 0x0013ccd7
MOV RCX,qword ptr [RBP + -0x70]
SUB RCX,qword ptr [RBP + -0x68]
MOV EAX,0x10000
CMP RAX,RCX
JC 0x0013ccb8
MOV RCX,qword ptr [RBP + -0x70]
SUB RCX,qword ptr [RBP + -0x68]
MOV EAX,0x8000
CMP RAX,RCX
JNC 0x0013ccd7
MOV EAX,0x1000
CMP RAX,qword ptr [RBP + -0x68]
JA 0x0013ccd7
LAB_0013ccb8:
MOV byte ptr [RBP + -0x59],0x0
MOV RCX,qword ptr [RBP + -0x48]
ADD RCX,0xf
AND RCX,-0x10
MOV RAX,RSP
SUB RAX,RCX
MOV RSP,RAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0013ccef
LAB_0013ccd7:
MOV byte ptr [RBP + -0x59],0x1
MOV RSI,qword ptr [RBP + -0x48]
XOR EDI,EDI
MOV EDX,0x10010
CALL 0x001f3830
MOV qword ptr [RBP + -0x38],RAX
LAB_0013ccef:
JMP 0x0013ccf1
LAB_0013ccf1:
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0013cd09
CALL 0x001f6090
MOV dword ptr [RAX],0x80
MOV byte ptr [RBP + -0x9],0x1
JMP 0x0013cd73
LAB_0013cd09:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x38]
ADD RSI,0x18
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x0013ba70
MOV EAX,EAX
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x50],0x0
JNZ 0x0013cd34
MOV dword ptr [RBP + -0x3c],0x1
JMP 0x0013cd57
LAB_0013cd34:
JMP 0x0013cd36
LAB_0013cd36:
JMP 0x0013cd38
LAB_0013cd38:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x38]
ADD RDX,0x18
MOV RCX,qword ptr [RBP + -0x50]
CALL 0x0013c240
MOVSX EAX,AL
MOV dword ptr [RBP + -0x3c],EAX
LAB_0013cd57:
MOV RDI,qword ptr [RBP + -0x38]
MOVSX ESI,byte ptr [RBP + -0x59]
CALL 0x0013cbd0
CMP dword ptr [RBP + -0x3c],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x9],AL
LAB_0013cd73:
MOV AL,byte ptr [RBP + -0x9]
MOV byte ptr [RBP + -0x79],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0013cd93
MOV AL,byte ptr [RBP + -0x79]
MOV RSP,RBP
POP RBP
RET
LAB_0013cd93:
CALL 0x0012a270
|
int8
_ma_update_blob_record(long *param_1,int8 param_2,int8 param_3,int8 param_4)
{
int8 uVar1;
long *plVar2;
char cVar3;
uint uVar4;
long lVar5;
int4 *puVar6;
ulong uVar7;
int1 *puVar8;
int iVar9;
int1 *puVar10;
long in_FS_OFFSET;
int1 auStack_88 [7];
bool local_81;
long local_80;
ulong local_78;
ulong local_70;
char local_61;
long local_60;
ulong local_58;
ulong local_50;
int local_44;
int1 *local_40;
int8 local_38;
int8 local_30;
int8 local_28;
long *local_20;
bool local_11;
long local_10;
puVar8 = auStack_88;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_60 = 0x5c;
local_80 = *(long *)(*param_1 + 0x3a0);
local_38 = param_4;
local_30 = param_3;
local_28 = param_2;
local_20 = param_1;
lVar5 = _ma_calc_total_blob_length(param_1,param_4);
local_70 = local_80 + lVar5 + local_60;
local_78 = *(long *)local_20[0xf] - (long)&local_70;
local_50 = local_70;
if ((local_70 < local_78) &&
((0x10000 < local_78 - local_70 || ((0x8000 < local_78 - local_70 && (0xfff < local_70)))))) {
local_61 = '\0';
puVar8 = auStack_88 + -(local_70 + 0xf & 0xfffffffffffffff0);
local_40 = puVar8;
}
else {
local_61 = '\x01';
local_40 = (int1 *)my_malloc(0,local_70,0x10010);
}
plVar2 = local_20;
uVar1 = local_38;
if (local_40 == (int1 *)0x0) {
*(int8 *)(puVar8 + -8) = 0x13ccfd;
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x80;
local_11 = true;
}
else {
puVar10 = local_40 + 0x18;
*(int8 *)(puVar8 + -8) = 0x13cd1e;
uVar4 = _ma_rec_pack(plVar2,puVar10,uVar1);
plVar2 = local_20;
uVar1 = local_28;
uVar7 = (ulong)uVar4;
local_58 = uVar7;
if (uVar7 == 0) {
local_44 = 1;
}
else {
puVar10 = local_40 + 0x18;
*(int8 *)(puVar8 + -8) = 0x13cd51;
cVar3 = update_dynamic_record(plVar2,uVar1,puVar10,uVar7);
local_44 = (int)cVar3;
}
puVar10 = local_40;
iVar9 = (int)local_61;
*(int8 *)(puVar8 + -8) = 0x13cd64;
stack_alloc_free(puVar10,iVar9);
local_11 = local_44 != 0;
}
local_81 = local_11;
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_11);
}
/* WARNING: Subroutine does not return */
*(int8 *)(puVar8 + -8) = 0x13cd98;
__stack_chk_fail();
}
| |
30,557 | my_fclose | eloqsql/mysys/my_fopen.c | int my_fclose(FILE *fd, myf MyFlags)
{
int err,file;
char *name= NULL;
DBUG_ENTER("my_fclose");
DBUG_PRINT("my",("stream: %p MyFlags: %lu", fd, MyFlags));
file= my_fileno(fd);
if ((uint) file < my_file_limit && my_file_info[file].type != UNOPEN)
{
name= my_file_info[file].name;
my_file_info[file].name= NULL;
my_file_info[file].type= UNOPEN;
}
#ifndef _WIN32
err= fclose(fd);
#else
err= my_win_fclose(fd);
#endif
if(err < 0)
{
my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_BADCLOSE, MYF(ME_BELL), name, errno);
}
else
statistic_decrement(my_stream_opened, &THR_LOCK_open);
if (name)
{
my_free(name);
}
DBUG_RETURN(err);
} | O3 | c | my_fclose:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0x2a7ea
leaq 0x2cf42b(%rip), %rcx # 0x2f9940
cmpl (%rcx), %eax
jae 0x2a54a
leaq 0x2cf428(%rip), %rcx # 0x2f9948
movq (%rcx), %rdx
cltq
shlq $0x4, %rax
cmpl $0x0, 0x8(%rdx,%rax)
je 0x2a54a
addq %rax, %rdx
movq (%rdx), %rbx
movq $0x0, (%rdx)
movq (%rcx), %rcx
movl $0x0, 0x8(%rcx,%rax)
jmp 0x2a54c
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x242f0
movl %eax, %r15d
testl %eax, %eax
js 0x2a567
leaq 0x3510ce(%rip), %rax # 0x37b630
decq (%rax)
jmp 0x2a598
callq 0x24060
movq %rax, %r12
movl (%rax), %r13d
callq 0x2ec32
movl %r13d, (%rax)
testb $0x18, %r14b
je 0x2a598
movl (%r12), %ecx
movl $0x4, %esi
movl $0x4, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2a00f
testq %rbx, %rbx
je 0x2a5a5
movq %rbx, %rdi
callq 0x2d9a2
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_fclose:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov r15, rdi
call my_fileno
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_2A54A
lea rcx, my_file_info
mov rdx, [rcx]
cdqe
shl rax, 4
cmp dword ptr [rdx+rax+8], 0
jz short loc_2A54A
add rdx, rax
mov rbx, [rdx]
mov qword ptr [rdx], 0
mov rcx, [rcx]
mov dword ptr [rcx+rax+8], 0
jmp short loc_2A54C
loc_2A54A:
xor ebx, ebx
loc_2A54C:
mov rdi, r15
call _fclose
mov r15d, eax
test eax, eax
js short loc_2A567
lea rax, my_stream_opened
dec qword ptr [rax]
jmp short loc_2A598
loc_2A567:
call ___errno_location
mov r12, rax
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r14b, 18h
jz short loc_2A598
mov ecx, [r12]
mov esi, 4
mov edi, 4
mov rdx, rbx
xor eax, eax
call my_error
loc_2A598:
test rbx, rbx
jz short loc_2A5A5
mov rdi, rbx
call my_free
loc_2A5A5:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_fclose(long long a1, char a2)
{
unsigned int v2; // eax
long long v3; // rax
long long v4; // rbx
int v5; // r15d
unsigned int *v6; // r12
unsigned int v7; // r13d
v2 = my_fileno(a1);
if ( v2 < my_file_limit && (v3 = 16LL * (int)v2, *(_DWORD *)((char *)my_file_info + v3 + 8)) )
{
v4 = *(_QWORD *)((char *)my_file_info + v3);
*(_QWORD *)((char *)my_file_info + v3) = 0LL;
*(_DWORD *)((char *)my_file_info + v3 + 8) = 0;
}
else
{
v4 = 0LL;
}
v5 = fclose(a1);
if ( v5 < 0 )
{
v6 = (unsigned int *)__errno_location(a1);
v7 = *v6;
*(_DWORD *)my_thread_var(a1) = v7;
if ( (a2 & 0x18) != 0 )
my_error(4u, 4LL, v4, *v6);
}
else
{
--my_stream_opened;
}
if ( v4 )
my_free(v4);
return (unsigned int)v5;
}
| my_fclose:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV R15,RDI
CALL 0x0012a7ea
LEA RCX,[0x3f9940]
CMP EAX,dword ptr [RCX]
JNC 0x0012a54a
LEA RCX,[0x3f9948]
MOV RDX,qword ptr [RCX]
CDQE
SHL RAX,0x4
CMP dword ptr [RDX + RAX*0x1 + 0x8],0x0
JZ 0x0012a54a
ADD RDX,RAX
MOV RBX,qword ptr [RDX]
MOV qword ptr [RDX],0x0
MOV RCX,qword ptr [RCX]
MOV dword ptr [RCX + RAX*0x1 + 0x8],0x0
JMP 0x0012a54c
LAB_0012a54a:
XOR EBX,EBX
LAB_0012a54c:
MOV RDI,R15
CALL 0x001242f0
MOV R15D,EAX
TEST EAX,EAX
JS 0x0012a567
LEA RAX,[0x47b630]
DEC qword ptr [RAX]
JMP 0x0012a598
LAB_0012a567:
CALL 0x00124060
MOV R12,RAX
MOV R13D,dword ptr [RAX]
CALL 0x0012ec32
MOV dword ptr [RAX],R13D
TEST R14B,0x18
JZ 0x0012a598
MOV ECX,dword ptr [R12]
MOV ESI,0x4
MOV EDI,0x4
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0012a00f
LAB_0012a598:
TEST RBX,RBX
JZ 0x0012a5a5
MOV RDI,RBX
CALL 0x0012d9a2
LAB_0012a5a5:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_fclose(FILE *param_1,ulong param_2)
{
int iVar1;
uint uVar2;
int iVar3;
long lVar4;
int *piVar5;
int *piVar6;
long lVar7;
uVar2 = my_fileno();
if (uVar2 < my_file_limit) {
lVar4 = (long)(int)uVar2 * 0x10;
if (*(int *)(my_file_info + lVar4 + 8) != 0) {
lVar7 = *(long *)(my_file_info + lVar4);
*(long *)(my_file_info + lVar4) = 0;
*(int4 *)(my_file_info + lVar4 + 8) = 0;
goto LAB_0012a54c;
}
}
lVar7 = 0;
LAB_0012a54c:
iVar3 = fclose(param_1);
if (iVar3 < 0) {
piVar5 = __errno_location();
iVar1 = *piVar5;
piVar6 = (int *)_my_thread_var();
*piVar6 = iVar1;
if ((param_2 & 0x18) != 0) {
my_error(4,4,lVar7,*piVar5);
}
}
else {
my_stream_opened = my_stream_opened + -1;
}
if (lVar7 != 0) {
my_free(lVar7);
}
return iVar3;
}
| |
30,558 | unpack_filename | eloqsql/mysys/mf_pack.c | size_t unpack_filename(char * to, const char *from)
{
size_t length, n_length, buff_length;
char buff[FN_REFLEN + 1];
DBUG_ENTER("unpack_filename");
length=dirname_part(buff, from, &buff_length);/* copy & convert dirname */
n_length=unpack_dirname(buff,buff);
if (n_length+strlen(from+length) < FN_REFLEN)
{
(void) strmov(buff+n_length,from+length);
length= system_filename(to,buff); /* Fix to usably filename */
}
else
length= system_filename(to,from); /* Fix to usably filename */
DBUG_RETURN(length);
} | O3 | c | unpack_filename:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
leaq -0x230(%rbp), %r12
leaq -0x238(%rbp), %rdx
movq %r12, %rdi
callq 0x977e9
movq %rax, %r15
movq %r12, %rdi
movq %r12, %rsi
callq 0x9e376
movq %rax, %r12
addq %r14, %r15
movq %r15, %rdi
callq 0x29300
addq %r12, %rax
cmpq $0x1ff, %rax # imm = 0x1FF
ja 0x9e598
leaq (%r12,%rbp), %rdi
addq $-0x230, %rdi # imm = 0xFDD0
movq %r15, %rsi
callq 0x29310
leaq -0x230(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
movq %rbx, %rdi
jmp 0x9e5a3
movl $0x1ff, %edx # imm = 0x1FF
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd9fc0
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x9e5ca
subq %rbx, %rax
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x29220
nop
| unpack_filename:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 220h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
lea r12, [rbp+var_230]
lea rdx, [rbp+var_238]
mov rdi, r12
call dirname_part
mov r15, rax
mov rdi, r12
mov rsi, r12
call unpack_dirname
mov r12, rax
add r15, r14
mov rdi, r15
call _strlen
add rax, r12
cmp rax, 1FFh
ja short loc_9E598
lea rdi, [r12+rbp]
add rdi, 0FFFFFFFFFFFFFDD0h
mov rsi, r15
call _strcpy
lea rsi, [rbp+var_230]
mov edx, 1FFh
mov rdi, rbx
jmp short loc_9E5A3
loc_9E598:
mov edx, 1FFh
mov rdi, rbx
mov rsi, r14
loc_9E5A3:
call strmake
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_9E5CA
sub rax, rbx
add rsp, 220h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_9E5CA:
call ___stack_chk_fail
| long long unpack_filename(long long a1, _BYTE *a2)
{
long long v2; // r15
long long v3; // r12
_BYTE *v4; // r15
long long v6; // [rsp+8h] [rbp-238h] BYREF
_BYTE v7[520]; // [rsp+10h] [rbp-230h] BYREF
unsigned long long v8; // [rsp+218h] [rbp-28h]
v8 = __readfsqword(0x28u);
v2 = dirname_part((long long)v7, a2, &v6);
v3 = unpack_dirname((long long)v7, v7);
v4 = &a2[v2];
if ( (unsigned long long)(v3 + strlen(v4)) <= 0x1FF )
{
strcpy(&v7[v3], v4);
a2 = v7;
}
return strmake(a1, a2, 511LL) - a1;
}
| unpack_filename:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x220
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
LEA R12,[RBP + -0x230]
LEA RDX,[RBP + -0x238]
MOV RDI,R12
CALL 0x001977e9
MOV R15,RAX
MOV RDI,R12
MOV RSI,R12
CALL 0x0019e376
MOV R12,RAX
ADD R15,R14
MOV RDI,R15
CALL 0x00129300
ADD RAX,R12
CMP RAX,0x1ff
JA 0x0019e598
LEA RDI,[R12 + RBP*0x1]
ADD RDI,-0x230
MOV RSI,R15
CALL 0x00129310
LEA RSI,[RBP + -0x230]
MOV EDX,0x1ff
MOV RDI,RBX
JMP 0x0019e5a3
LAB_0019e598:
MOV EDX,0x1ff
MOV RDI,RBX
MOV RSI,R14
LAB_0019e5a3:
CALL 0x001d9fc0
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x0019e5ca
SUB RAX,RBX
ADD RSP,0x220
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0019e5ca:
CALL 0x00129220
|
long unpack_filename(long param_1,char *param_2)
{
long lVar1;
long lVar2;
size_t sVar3;
long in_FS_OFFSET;
int1 local_240 [8];
char local_238 [520];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = dirname_part(local_238,param_2,local_240);
lVar2 = unpack_dirname(local_238,local_238);
sVar3 = strlen(param_2 + lVar1);
if (sVar3 + lVar2 < 0x200) {
strcpy(local_238 + lVar2,param_2 + lVar1);
param_2 = local_238;
}
lVar1 = strmake(param_1,param_2,0x1ff);
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar1 - param_1;
}
| |
30,559 | OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::encodeTriBoundaryMask(int, int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/regularPatchBuilder.cpp | inline int
encodeTriBoundaryMask(int eBits, int vBits) {
int upperBits = 0;
int lowerBits = eBits;
if (vBits) {
if (eBits == 0) {
upperBits = 1;
lowerBits = vBits;
} else if ((vBits == 7) &&
((eBits == 1) || (eBits == 2) || (eBits == 4))) {
upperBits = 2;
lowerBits = eBits;
}
}
return (upperBits << 3) | lowerBits;
} | O0 | cpp | OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::encodeTriBoundaryMask(int, int):
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x1aa14b
cmpl $0x0, -0x4(%rbp)
jne 0x1aa122
movl $0x1, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x1aa149
cmpl $0x7, -0x8(%rbp)
jne 0x1aa147
cmpl $0x1, -0x4(%rbp)
je 0x1aa13a
cmpl $0x2, -0x4(%rbp)
je 0x1aa13a
cmpl $0x4, -0x4(%rbp)
jne 0x1aa147
movl $0x2, -0xc(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x1aa149
jmp 0x1aa14b
movl -0xc(%rbp), %eax
shll $0x3, %eax
orl -0x10(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121encodeTriBoundaryMaskEii:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov [rbp+var_C], 0
mov eax, [rbp+var_4]
mov [rbp+var_10], eax
cmp [rbp+var_8], 0
jz short loc_1AA14B
cmp [rbp+var_4], 0
jnz short loc_1AA122
mov [rbp+var_C], 1
mov eax, [rbp+var_8]
mov [rbp+var_10], eax
jmp short loc_1AA149
loc_1AA122:
cmp [rbp+var_8], 7
jnz short loc_1AA147
cmp [rbp+var_4], 1
jz short loc_1AA13A
cmp [rbp+var_4], 2
jz short loc_1AA13A
cmp [rbp+var_4], 4
jnz short loc_1AA147
loc_1AA13A:
mov [rbp+var_C], 2
mov eax, [rbp+var_4]
mov [rbp+var_10], eax
loc_1AA147:
jmp short $+2
loc_1AA149:
jmp short $+2
loc_1AA14B:
mov eax, [rbp+var_C]
shl eax, 3
or eax, [rbp+var_10]
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::encodeTriBoundaryMask(
OpenSubdiv::v3_6_0::Bfr::_anonymous_namespace_ *this,
int a2)
{
int v3; // [rsp+0h] [rbp-10h]
int v4; // [rsp+4h] [rbp-Ch]
v4 = 0;
v3 = (int)this;
if ( a2 )
{
if ( (_DWORD)this )
{
if ( a2 == 7 && ((_DWORD)this == 1 || (_DWORD)this == 2 || (_DWORD)this == 4) )
{
v4 = 2;
v3 = (int)this;
}
}
else
{
v4 = 1;
v3 = a2;
}
}
return v3 | (unsigned int)(8 * v4);
}
| |||
30,560 | OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::encodeTriBoundaryMask(int, int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/regularPatchBuilder.cpp | inline int
encodeTriBoundaryMask(int eBits, int vBits) {
int upperBits = 0;
int lowerBits = eBits;
if (vBits) {
if (eBits == 0) {
upperBits = 1;
lowerBits = vBits;
} else if ((vBits == 7) &&
((eBits == 1) || (eBits == 2) || (eBits == 4))) {
upperBits = 2;
lowerBits = eBits;
}
}
return (upperBits << 3) | lowerBits;
} | O2 | cpp | OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::encodeTriBoundaryMask(int, int):
xorl %eax, %eax
testl %esi, %esi
je 0xa2ac2
testl %edi, %edi
je 0xa2ac6
cmpl $0x7, %esi
jne 0xa2ac2
cmpl $0x4, %edi
ja 0xa2ac2
pushq $0x16
popq %rcx
btl %edi, %ecx
jae 0xa2ac2
pushq $0x10
popq %rax
movl %edi, %esi
jmp 0xa2ac9
pushq $0x8
popq %rax
orl %esi, %eax
retq
| _ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121encodeTriBoundaryMaskEii:
xor eax, eax
test esi, esi
jz short loc_A2AC2
test edi, edi
jz short loc_A2AC6
cmp esi, 7
jnz short loc_A2AC2
cmp edi, 4
ja short loc_A2AC2
push 16h
pop rcx
bt ecx, edi
jnb short loc_A2AC2
push 10h
pop rax
loc_A2AC2:
mov esi, edi
jmp short loc_A2AC9
loc_A2AC6:
push 8
pop rax
loc_A2AC9:
or eax, esi
retn
| long long OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::encodeTriBoundaryMask(
OpenSubdiv::v3_6_0::Bfr::_anonymous_namespace_ *this,
int a2)
{
int v2; // eax
int v3; // ecx
v2 = 0;
if ( a2 )
{
if ( !(_DWORD)this )
{
v2 = 8;
return a2 | (unsigned int)v2;
}
if ( a2 == 7 && (unsigned int)this <= 4 )
{
v3 = 22;
if ( _bittest(&v3, (unsigned int)this) )
v2 = 16;
}
}
a2 = (int)this;
return a2 | (unsigned int)v2;
}
| encodeTriBoundaryMask:
XOR EAX,EAX
TEST ESI,ESI
JZ 0x001a2ac2
TEST EDI,EDI
JZ 0x001a2ac6
CMP ESI,0x7
JNZ 0x001a2ac2
CMP EDI,0x4
JA 0x001a2ac2
PUSH 0x16
POP RCX
BT ECX,EDI
JNC 0x001a2ac2
PUSH 0x10
POP RAX
LAB_001a2ac2:
MOV ESI,EDI
JMP 0x001a2ac9
LAB_001a2ac6:
PUSH 0x8
POP RAX
LAB_001a2ac9:
OR EAX,ESI
RET
|
/* OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::encodeTriBoundaryMask(int, int) */
uint OpenSubdiv::v3_6_0::Bfr::(anonymous_namespace)::encodeTriBoundaryMask(int param_1,int param_2)
{
uint uVar1;
uVar1 = 0;
if (param_2 != 0) {
if (param_1 == 0) {
param_1 = param_2;
uVar1 = 8;
}
else if (((param_2 == 7) && (uVar1 = 0, (uint)param_1 < 5)) &&
((0x16U >> (param_1 & 0x1fU) & 1) != 0)) {
uVar1 = 0x10;
}
}
return uVar1 | param_1;
}
| |
30,561 | ma_decrement_open_count | eloqsql/storage/maria/ma_locking.c | int _ma_decrement_open_count(MARIA_HA *info, my_bool lock_tables)
{
uchar buff[2];
register MARIA_SHARE *share= info->s;
int lock_error=0,write_error=0;
DBUG_ENTER("_ma_decrement_open_count");
if (share->global_changed)
{
uint old_lock=info->lock_type;
share->global_changed=0;
lock_error= (my_disable_locking || ! lock_tables ? 0 :
maria_lock_database(info, F_WRLCK));
/* Its not fatal even if we couldn't get the lock ! */
if (share->state.open_count > 0)
{
CRASH_IF_S3_TABLE(share);
share->state.open_count--;
share->changed= 1; /* We have to update state */
/*
For temporary tables that will just be deleted, we don't have
to decrement state. For transactional tables the state will be
updated in maria_close().
*/
if (!share->temporary && !share->now_transactional)
{
mi_int2store(buff,share->state.open_count);
write_error= (int) my_pwrite(share->kfile.file, buff, sizeof(buff),
sizeof(share->state.header) +
MARIA_FILE_OPEN_COUNT_OFFSET,
MYF(MY_NABP));
}
}
if (!lock_error && !my_disable_locking && lock_tables)
lock_error=maria_lock_database(info,old_lock);
}
DBUG_RETURN(MY_TEST(lock_error || write_error));
} | O3 | c | ma_decrement_open_count:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r13
cmpb $0x0, 0x7df(%r13)
je 0x44020
movl %esi, %r12d
movq %rdi, %rbx
movl 0x664(%rdi), %r14d
movb $0x0, 0x7df(%r13)
leaq 0xbc624c(%rip), %rcx # 0xc0a1e8
xorl %r15d, %r15d
testb %r12b, %r12b
je 0x43fbf
cmpb $0x0, (%rcx)
jne 0x43fbf
movq %rbx, %rdi
movl $0x1, %esi
movq %rcx, %r15
callq 0x43800
movq %r15, %rcx
movl %eax, %r15d
movl 0x16c(%r13), %eax
testl %eax, %eax
je 0x43fef
decl %eax
movl %eax, 0x16c(%r13)
movb $0x1, 0x7de(%r13)
cmpb $0x0, 0x7d9(%r13)
jne 0x43fef
cmpb $0x0, 0x7e7(%r13)
je 0x44031
xorl %r13d, %r13d
testb %r12b, %r12b
je 0x4400f
testl %r15d, %r15d
jne 0x4400f
cmpb $0x0, (%rcx)
jne 0x4400f
movq %rbx, %rdi
movl %r14d, %esi
callq 0x43800
movl %eax, %r15d
testl %r15d, %r15d
setne %al
orb %r13b, %al
movzbl %al, %eax
andl $0x1, %eax
jmp 0x44022
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
rolw $0x8, %ax
leaq -0x2a(%rbp), %rsi
movw %ax, (%rsi)
movl 0x760(%r13), %edi
movl $0x2, %edx
movq %rcx, %r13
movl $0x18, %ecx
movl $0x4, %r8d
callq 0xa1c22
movq %r13, %rcx
testl %eax, %eax
setne %r13b
jmp 0x43ff2
| _ma_decrement_open_count:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, [rdi]
cmp byte ptr [r13+7DFh], 0
jz loc_44020
mov r12d, esi
mov rbx, rdi
mov r14d, [rdi+664h]
mov byte ptr [r13+7DFh], 0
lea rcx, my_disable_locking
xor r15d, r15d
test r12b, r12b
jz short loc_43FBF
cmp byte ptr [rcx], 0
jnz short loc_43FBF
mov rdi, rbx
mov esi, 1
mov r15, rcx
call maria_lock_database
mov rcx, r15
mov r15d, eax
loc_43FBF:
mov eax, [r13+16Ch]
test eax, eax
jz short loc_43FEF
dec eax
mov [r13+16Ch], eax
mov byte ptr [r13+7DEh], 1
cmp byte ptr [r13+7D9h], 0
jnz short loc_43FEF
cmp byte ptr [r13+7E7h], 0
jz short loc_44031
loc_43FEF:
xor r13d, r13d
loc_43FF2:
test r12b, r12b
jz short loc_4400F
test r15d, r15d
jnz short loc_4400F
cmp byte ptr [rcx], 0
jnz short loc_4400F
mov rdi, rbx
mov esi, r14d
call maria_lock_database
mov r15d, eax
loc_4400F:
test r15d, r15d
setnz al
or al, r13b
movzx eax, al
and eax, 1
jmp short loc_44022
loc_44020:
xor eax, eax
loc_44022:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_44031:
rol ax, 8
lea rsi, [rbp+var_2A]
mov [rsi], ax
mov edi, [r13+760h]
mov edx, 2
mov r13, rcx
mov ecx, 18h
mov r8d, 4
call my_pwrite
mov rcx, r13
test eax, eax
setnz r13b
jmp short loc_43FF2
| long long ma_decrement_open_count(_DWORD *a1, char a2)
{
long long v2; // rax
long long v3; // r13
int v4; // r14d
int v5; // r15d
int v6; // eax
int v7; // eax
bool v8; // r13
_WORD v10[21]; // [rsp+0h] [rbp-2Ah] BYREF
v10[0] = HIWORD(v2);
v3 = *(_QWORD *)a1;
if ( !*(_BYTE *)(*(_QWORD *)a1 + 2015LL) )
return 0LL;
v4 = a1[409];
*(_BYTE *)(v3 + 2015) = 0;
v5 = 0;
if ( a2 && !my_disable_locking )
v5 = maria_lock_database((long long)a1, 1);
v6 = *(_DWORD *)(v3 + 364);
if ( !v6
|| (v7 = v6 - 1, *(_DWORD *)(v3 + 364) = v7, *(_BYTE *)(v3 + 2014) = 1, *(_BYTE *)(v3 + 2009))
|| *(_BYTE *)(v3 + 2023) )
{
v8 = 0;
}
else
{
v10[0] = __ROL2__(v7, 8);
v8 = (unsigned int)my_pwrite(*(unsigned int *)(v3 + 1888), v10, 2LL, 24LL, 4LL) != 0;
}
if ( a2 && !v5 && !my_disable_locking )
v5 = maria_lock_database((long long)a1, v4);
return v8 | (unsigned __int8)(v5 != 0);
}
| _ma_decrement_open_count:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,qword ptr [RDI]
CMP byte ptr [R13 + 0x7df],0x0
JZ 0x00144020
MOV R12D,ESI
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0x664]
MOV byte ptr [R13 + 0x7df],0x0
LEA RCX,[0xd0a1e8]
XOR R15D,R15D
TEST R12B,R12B
JZ 0x00143fbf
CMP byte ptr [RCX],0x0
JNZ 0x00143fbf
MOV RDI,RBX
MOV ESI,0x1
MOV R15,RCX
CALL 0x00143800
MOV RCX,R15
MOV R15D,EAX
LAB_00143fbf:
MOV EAX,dword ptr [R13 + 0x16c]
TEST EAX,EAX
JZ 0x00143fef
DEC EAX
MOV dword ptr [R13 + 0x16c],EAX
MOV byte ptr [R13 + 0x7de],0x1
CMP byte ptr [R13 + 0x7d9],0x0
JNZ 0x00143fef
CMP byte ptr [R13 + 0x7e7],0x0
JZ 0x00144031
LAB_00143fef:
XOR R13D,R13D
LAB_00143ff2:
TEST R12B,R12B
JZ 0x0014400f
TEST R15D,R15D
JNZ 0x0014400f
CMP byte ptr [RCX],0x0
JNZ 0x0014400f
MOV RDI,RBX
MOV ESI,R14D
CALL 0x00143800
MOV R15D,EAX
LAB_0014400f:
TEST R15D,R15D
SETNZ AL
OR AL,R13B
MOVZX EAX,AL
AND EAX,0x1
JMP 0x00144022
LAB_00144020:
XOR EAX,EAX
LAB_00144022:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00144031:
ROL AX,0x8
LEA RSI,[RBP + -0x2a]
MOV word ptr [RSI],AX
MOV EDI,dword ptr [R13 + 0x760]
MOV EDX,0x2
MOV R13,RCX
MOV ECX,0x18
MOV R8D,0x4
CALL 0x001a1c22
MOV RCX,R13
TEST EAX,EAX
SETNZ R13B
JMP 0x00143ff2
|
byte _ma_decrement_open_count(long *param_1,char param_2)
{
int4 uVar1;
long lVar2;
ushort uVar3;
int iVar4;
int iVar5;
int8 in_RAX;
int8 in_R9;
bool bVar6;
lVar2 = *param_1;
if (*(char *)(lVar2 + 0x7df) == '\0') {
return 0;
}
uVar1 = *(int4 *)((long)param_1 + 0x664);
*(int1 *)(lVar2 + 0x7df) = 0;
iVar4 = 0;
if ((param_2 != '\0') && (my_disable_locking == '\0')) {
iVar4 = maria_lock_database(param_1,1);
}
if (*(int *)(lVar2 + 0x16c) != 0) {
iVar5 = *(int *)(lVar2 + 0x16c) + -1;
*(int *)(lVar2 + 0x16c) = iVar5;
*(int1 *)(lVar2 + 0x7de) = 1;
if ((*(char *)(lVar2 + 0x7d9) == '\0') && (*(char *)(lVar2 + 0x7e7) == '\0')) {
uVar3 = (ushort)iVar5;
iVar5 = my_pwrite(*(int4 *)(lVar2 + 0x760),&stack0xffffffffffffffce,2,0x18,4,in_R9,
CONCAT26(uVar3 << 8 | uVar3 >> 8,(int6)in_RAX));
bVar6 = iVar5 != 0;
goto LAB_00143ff2;
}
}
bVar6 = false;
LAB_00143ff2:
if (((param_2 != '\0') && (iVar4 == 0)) && (my_disable_locking == '\0')) {
iVar4 = maria_lock_database(param_1,uVar1);
}
return iVar4 != 0 | bVar6;
}
| |
30,562 | free_old_query | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void free_old_query(MYSQL *mysql)
{
if (mysql->fields)
ma_free_root(&mysql->field_alloc,MYF(0));
ma_init_alloc_root(&mysql->field_alloc,8192,0); /* Assume rowlength < 8192 */
mysql->fields=0;
mysql->field_count=0; /* For API */
mysql->info= 0;
return;
} | O0 | c | free_old_query:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2f8(%rax)
je 0x4fd9c
movq -0x8(%rbp), %rdi
addq $0x300, %rdi # imm = 0x300
xorl %esi, %esi
callq 0x56820
movq -0x8(%rbp), %rdi
addq $0x300, %rdi # imm = 0x300
movl $0x2000, %esi # imm = 0x2000
xorl %eax, %eax
movl %eax, %edx
callq 0x564e0
movq -0x8(%rbp), %rax
movq $0x0, 0x2f8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x37c(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x2e0(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| free_old_query:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+2F8h], 0
jz short loc_4FD9C
mov rdi, [rbp+var_8]
add rdi, 300h
xor esi, esi
call ma_free_root
loc_4FD9C:
mov rdi, [rbp+var_8]
add rdi, 300h
mov esi, 2000h
xor eax, eax
mov edx, eax
call ma_init_alloc_root
mov rax, [rbp+var_8]
mov qword ptr [rax+2F8h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+37Ch], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+2E0h], 0
add rsp, 10h
pop rbp
retn
| long long free_old_query(long long a1)
{
long long result; // rax
if ( *(_QWORD *)(a1 + 760) )
ma_free_root(a1 + 768, 0LL);
ma_init_alloc_root(a1 + 768, 0x2000LL, 0LL);
*(_QWORD *)(a1 + 760) = 0LL;
*(_DWORD *)(a1 + 892) = 0;
result = a1;
*(_QWORD *)(a1 + 736) = 0LL;
return result;
}
| free_old_query:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x2f8],0x0
JZ 0x0014fd9c
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x300
XOR ESI,ESI
CALL 0x00156820
LAB_0014fd9c:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x300
MOV ESI,0x2000
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001564e0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2f8],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x37c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2e0],0x0
ADD RSP,0x10
POP RBP
RET
|
void free_old_query(long param_1)
{
if (*(long *)(param_1 + 0x2f8) != 0) {
ma_free_root(param_1 + 0x300,0);
}
ma_init_alloc_root(param_1 + 0x300,0x2000,0);
*(int8 *)(param_1 + 0x2f8) = 0;
*(int4 *)(param_1 + 0x37c) = 0;
*(int8 *)(param_1 + 0x2e0) = 0;
return;
}
| |
30,563 | my_fwrite | eloqsql/mysys/my_fstream.c | size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags)
{
size_t writtenbytes =0;
my_off_t seekptr;
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
uint errors;
#endif
DBUG_ENTER("my_fwrite");
DBUG_PRINT("my",("stream:%p Buffer:%p Count: %u MyFlags: %lu",
stream, Buffer, (uint) Count, MyFlags));
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
errors=0;
#endif
seekptr= ftell(stream);
for (;;)
{
size_t written;
if ((written = (size_t) fwrite((char*) Buffer,sizeof(char),
Count, stream)) != Count)
{
DBUG_PRINT("error",("Write only %d bytes", (int) writtenbytes));
my_errno=errno;
if (written != (size_t) -1)
{
seekptr+=written;
Buffer+=written;
writtenbytes+=written;
Count-=written;
}
#ifdef EINTR
if (errno == EINTR)
{
(void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0));
continue;
}
#endif
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
if (my_thread_var->abort)
MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */
if ((errno == ENOSPC || errno == EDQUOT) &&
(MyFlags & MY_WAIT_IF_FULL))
{
wait_for_free_space("[stream]", errors);
errors++;
(void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0));
continue;
}
#endif
if (ferror(stream) || (MyFlags & (MY_NABP | MY_FNABP)))
{
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
my_error(EE_WRITE, MYF(ME_BELL),
my_filename(my_fileno(stream)), errno);
}
writtenbytes= (size_t) -1; /* Return that we got error */
break;
}
}
if (MyFlags & (MY_NABP | MY_FNABP))
writtenbytes= 0; /* Everything OK */
else
writtenbytes+= written;
break;
}
DBUG_RETURN(writtenbytes);
} | O3 | c | my_fwrite:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x30(%rbp)
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2a9f0
movq %rax, %r13
movl $0x1, %esi
movq %rbx, -0x48(%rbp)
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2a870
cmpq %r12, %rax
jne 0xb1aef
movq $0x0, -0x38(%rbp)
jmp 0xb1b87
movq %rax, %r15
movq $0x0, -0x38(%rbp)
callq 0x2a7a0
movq %rax, -0x40(%rbp)
movq %r14, %rbx
movq -0x40(%rbp), %rax
movl (%rax), %r14d
callq 0xa8dda
movl %r14d, (%rax)
movq %r13, %rsi
cmpq $-0x1, %r15
je 0xb1b2c
addq %r15, %rsi
addq %r15, -0x48(%rbp)
addq %r15, -0x38(%rbp)
subq %r15, %r12
movq -0x40(%rbp), %rax
cmpl $0x4, (%rax)
movq %rbx, %r14
movq %rbx, %rdi
jne 0xb1b6f
movq %rsi, %r13
xorl %edx, %edx
callq 0x2a040
testl %eax, %eax
jne 0xb1b51
movq %r14, %rdi
callq 0x2a9f0
movl $0x1, %esi
movq -0x48(%rbp), %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2a870
movq %rax, %r15
cmpq %r12, %rax
jne 0xb1b03
jmp 0xb1b87
callq 0x2a630
testl %eax, %eax
sete %al
testb $0x6, -0x30(%rbp)
sete %cl
movq %r15, %r12
testb %al, %cl
je 0xb1ba7
addq -0x38(%rbp), %r12
xorl %ebx, %ebx
testb $0x6, -0x30(%rbp)
cmoveq %r12, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $-0x1, %rbx
testb $0x1a, -0x30(%rbp)
je 0xb1b95
movq %r14, %rdi
callq 0x2a950
movl %eax, %edi
callq 0xb15f4
movq -0x40(%rbp), %rcx
movl (%rcx), %ecx
movl $0x4, %esi
movl $0x3, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0xa2fcb
jmp 0xb1b95
| my_fwrite:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_30], rcx
mov r12, rdx
mov rbx, rsi
mov r14, rdi
call _ftello64
mov r13, rax
mov esi, 1
mov [rbp+var_48], rbx
mov rdi, rbx
mov rdx, r12
mov rcx, r14
call _fwrite
cmp rax, r12
jnz short loc_B1AEF
mov [rbp+var_38], 0
jmp loc_B1B87
loc_B1AEF:
mov r15, rax
mov [rbp+var_38], 0
call ___errno_location
mov [rbp+var_40], rax
loc_B1B03:
mov rbx, r14
mov rax, [rbp+var_40]
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
mov rsi, r13
cmp r15, 0FFFFFFFFFFFFFFFFh
jz short loc_B1B2C
add rsi, r15
add [rbp+var_48], r15
add [rbp+var_38], r15
sub r12, r15
loc_B1B2C:
mov rax, [rbp+var_40]
cmp dword ptr [rax], 4
mov r14, rbx
mov rdi, rbx
jnz short loc_B1B6F
mov r13, rsi
xor edx, edx
call _fseeko64
test eax, eax
jnz short loc_B1B51
mov rdi, r14
call _ftello64
loc_B1B51:
mov esi, 1
mov rdi, [rbp+var_48]
mov rdx, r12
mov rcx, r14
call _fwrite
mov r15, rax
cmp rax, r12
jnz short loc_B1B03
jmp short loc_B1B87
loc_B1B6F:
call _ferror
test eax, eax
setz al
test byte ptr [rbp+var_30], 6
setz cl
mov r12, r15
test cl, al
jz short loc_B1BA7
loc_B1B87:
add r12, [rbp+var_38]
xor ebx, ebx
test byte ptr [rbp+var_30], 6
cmovz rbx, r12
loc_B1B95:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B1BA7:
mov rbx, 0FFFFFFFFFFFFFFFFh
test byte ptr [rbp+var_30], 1Ah
jz short loc_B1B95
mov rdi, r14
call _fileno
mov edi, eax
call my_filename
mov rcx, [rbp+var_40]
mov ecx, [rcx]
mov esi, 4
mov edi, 3
mov rdx, rax
xor eax, eax
call my_error
jmp short loc_B1B95
| long long my_fwrite(long long a1, long long a2, long long a3, char a4)
{
long long v6; // r13
long long v7; // rdi
long long v8; // rax
long long v9; // r15
long long v10; // rbx
unsigned int v11; // r14d
long long v12; // rsi
long long v13; // r12
long long v14; // rbx
int v16; // eax
const char *v17; // rax
long long v18; // [rsp+8h] [rbp-48h]
unsigned int *v19; // [rsp+10h] [rbp-40h]
long long v20; // [rsp+18h] [rbp-38h]
v6 = ((long long (*)(void))ftello64)();
v18 = a2;
v7 = a2;
v8 = fwrite(a2, 1LL, a3, a1);
if ( v8 == a3 )
{
v20 = 0LL;
LABEL_12:
v13 = v20 + a3;
v14 = 0LL;
if ( (a4 & 6) == 0 )
return v13;
return v14;
}
v9 = v8;
v20 = 0LL;
v19 = (unsigned int *)__errno_location(a2);
while ( 1 )
{
v10 = a1;
v11 = *v19;
*(_DWORD *)my_thread_var(v7, (_BYTE *)&dword_0 + 1) = v11;
v12 = v6;
if ( v9 != -1 )
{
v12 = v9 + v6;
v18 += v9;
v20 += v9;
a3 -= v9;
}
a1 = v10;
if ( *v19 != 4 )
break;
v6 = v12;
if ( !(unsigned int)fseeko64(v10, v12, 0LL) )
ftello64(v10);
v7 = v18;
v9 = fwrite(v18, 1LL, a3, v10);
if ( v9 == a3 )
goto LABEL_12;
}
a3 = v9;
if ( (unsigned int)ferror(v10) == 0 && (a4 & 6) == 0 )
goto LABEL_12;
v14 = -1LL;
if ( (a4 & 0x1A) != 0 )
{
v16 = fileno(a1);
v17 = my_filename(v16);
my_error(3u, 4LL, v17, *v19);
}
return v14;
}
| my_fwrite:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x30],RCX
MOV R12,RDX
MOV RBX,RSI
MOV R14,RDI
CALL 0x0012a9f0
MOV R13,RAX
MOV ESI,0x1
MOV qword ptr [RBP + -0x48],RBX
MOV RDI,RBX
MOV RDX,R12
MOV RCX,R14
CALL 0x0012a870
CMP RAX,R12
JNZ 0x001b1aef
MOV qword ptr [RBP + -0x38],0x0
JMP 0x001b1b87
LAB_001b1aef:
MOV R15,RAX
MOV qword ptr [RBP + -0x38],0x0
CALL 0x0012a7a0
MOV qword ptr [RBP + -0x40],RAX
LAB_001b1b03:
MOV RBX,R14
MOV RAX,qword ptr [RBP + -0x40]
MOV R14D,dword ptr [RAX]
CALL 0x001a8dda
MOV dword ptr [RAX],R14D
MOV RSI,R13
CMP R15,-0x1
JZ 0x001b1b2c
ADD RSI,R15
ADD qword ptr [RBP + -0x48],R15
ADD qword ptr [RBP + -0x38],R15
SUB R12,R15
LAB_001b1b2c:
MOV RAX,qword ptr [RBP + -0x40]
CMP dword ptr [RAX],0x4
MOV R14,RBX
MOV RDI,RBX
JNZ 0x001b1b6f
MOV R13,RSI
XOR EDX,EDX
CALL 0x0012a040
TEST EAX,EAX
JNZ 0x001b1b51
MOV RDI,R14
CALL 0x0012a9f0
LAB_001b1b51:
MOV ESI,0x1
MOV RDI,qword ptr [RBP + -0x48]
MOV RDX,R12
MOV RCX,R14
CALL 0x0012a870
MOV R15,RAX
CMP RAX,R12
JNZ 0x001b1b03
JMP 0x001b1b87
LAB_001b1b6f:
CALL 0x0012a630
TEST EAX,EAX
SETZ AL
TEST byte ptr [RBP + -0x30],0x6
SETZ CL
MOV R12,R15
TEST CL,AL
JZ 0x001b1ba7
LAB_001b1b87:
ADD R12,qword ptr [RBP + -0x38]
XOR EBX,EBX
TEST byte ptr [RBP + -0x30],0x6
CMOVZ RBX,R12
LAB_001b1b95:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b1ba7:
MOV RBX,-0x1
TEST byte ptr [RBP + -0x30],0x1a
JZ 0x001b1b95
MOV RDI,R14
CALL 0x0012a950
MOV EDI,EAX
CALL 0x001b15f4
MOV RCX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RCX]
MOV ESI,0x4
MOV EDI,0x3
MOV RDX,RAX
XOR EAX,EAX
CALL 0x001a2fcb
JMP 0x001b1b95
|
long my_fwrite(FILE *param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
__off64_t __off;
size_t sVar2;
int *piVar3;
int *piVar4;
int8 uVar5;
long lVar6;
void *local_50;
long local_40;
__off = ftello64(param_1);
sVar2 = fwrite(param_2,1,param_3,param_1);
if (sVar2 == param_3) {
local_40 = 0;
}
else {
local_40 = 0;
piVar3 = __errno_location();
local_50 = param_2;
do {
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if (sVar2 != 0xffffffffffffffff) {
__off = __off + sVar2;
local_50 = (void *)((long)local_50 + sVar2);
local_40 = local_40 + sVar2;
param_3 = param_3 - sVar2;
}
if (*piVar3 != 4) {
iVar1 = ferror(param_1);
param_3 = sVar2;
if ((param_4 & 6) != 0 || iVar1 != 0) {
if ((param_4 & 0x1a) == 0) {
return -1;
}
iVar1 = fileno(param_1);
uVar5 = my_filename(iVar1);
my_error(3,4,uVar5,*piVar3);
return -1;
}
break;
}
iVar1 = fseeko64(param_1,__off,0);
if (iVar1 == 0) {
ftello64(param_1);
}
sVar2 = fwrite(local_50,1,param_3,param_1);
} while (sVar2 != param_3);
}
lVar6 = 0;
if ((param_4 & 6) == 0) {
lVar6 = param_3 + local_40;
}
return lVar6;
}
| |
30,564 | psi_mutex_trylock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_TRYLOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line);
# else
int result= pthread_mutex_trylock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
} | O0 | c | psi_mutex_trylock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1b9966(%rip), %rax # 0x214320
movq (%rax), %rax
movq 0x190(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x260b0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x5aa10
leaq 0x1b9923(%rip), %rax # 0x214320
movq (%rax), %rax
movq 0x198(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| psi_mutex_trylock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+190h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+40h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 1
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call _pthread_mutex_trylock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_5AA10
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_5AA10:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_mutex_trylock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[50])(
v6,
*(_QWORD *)(a1 + 64),
1LL,
a2,
a3);
v4 = pthread_mutex_trylock(v9);
if ( v5 )
((void ( *)(long long, _QWORD))PSI_server[51])(v5, v4);
return v4;
}
| psi_mutex_trylock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x314320]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x190]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x1
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001260b0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0015aa10
LEA RAX,[0x314320]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x198]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_0015aa10:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_trylock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
pthread_mutex_t *local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),1,param_2,param_3);
iVar1 = pthread_mutex_trylock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
| |
30,565 | my_b_seq_read | eloqsql/mysys/mf_iocache.c | static int _my_b_seq_read(IO_CACHE *info, uchar *Buffer, size_t Count)
{
size_t length, diff_length, save_count, max_length;
my_off_t pos_in_file;
save_count=Count;
lock_append_buffer(info);
/* pos_in_file always point on where info->buffer was read */
if ((pos_in_file=info->pos_in_file +
(size_t) (info->read_end - info->buffer)) >= info->end_of_file)
goto read_append_buffer;
/*
With read-append cache we must always do a seek before we read,
because the write could have moved the file pointer astray
*/
if (mysql_file_seek(info->file, pos_in_file, MY_SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR)
{
info->error= -1;
unlock_append_buffer(info);
return (1);
}
info->seek_not_done=0;
diff_length= (size_t) (pos_in_file & (IO_SIZE-1));
/* now the second stage begins - read from file descriptor */
if (Count >= (size_t) (IO_SIZE+(IO_SIZE-diff_length)))
{
/* Fill first intern buffer */
size_t read_length;
length= IO_ROUND_DN(Count) - diff_length;
if ((read_length= mysql_file_read(info->file,Buffer, length,
info->myflags)) == (size_t) -1)
{
info->error= -1;
unlock_append_buffer(info);
return 1;
}
Count-=read_length;
Buffer+=read_length;
pos_in_file+=read_length;
if (read_length != length)
{
/*
We only got part of data; Read the rest of the data from the
write buffer
*/
goto read_append_buffer;
}
diff_length=0;
}
max_length= info->read_length-diff_length;
if (max_length > (info->end_of_file - pos_in_file))
max_length= (size_t) (info->end_of_file - pos_in_file);
if (!max_length)
{
if (Count)
goto read_append_buffer;
length=0; /* Didn't read any more chars */
}
else
{
length= mysql_file_read(info->file,info->buffer, max_length, info->myflags);
if (length == (size_t) -1)
{
info->error= -1;
unlock_append_buffer(info);
return 1;
}
if (length < Count)
{
memcpy(Buffer, info->buffer, length);
Count -= length;
Buffer += length;
/*
added the line below to make
DBUG_ASSERT(pos_in_file==info->end_of_file) pass.
otherwise this does not appear to be needed
*/
pos_in_file += length;
goto read_append_buffer;
}
}
unlock_append_buffer(info);
info->read_pos=info->buffer+Count;
info->read_end=info->buffer+length;
info->pos_in_file=pos_in_file;
memcpy(Buffer,info->buffer,(size_t) Count);
return 0;
read_append_buffer:
/*
Read data from the current write buffer.
Count should never be == 0 here (The code will work even if count is 0)
*/
{
/* First copy the data to Count */
size_t len_in_buff = (size_t) (info->write_pos - info->append_read_pos);
size_t copy_len;
size_t transfer_len;
DBUG_ASSERT(info->append_read_pos <= info->write_pos);
copy_len=MY_MIN(Count, len_in_buff);
memcpy(Buffer, info->append_read_pos, copy_len);
info->append_read_pos += copy_len;
Count -= copy_len;
if (Count)
info->error= (int) (save_count - Count);
/* Fill read buffer with data from write buffer */
memcpy(info->buffer, info->append_read_pos,
(size_t) (transfer_len=len_in_buff - copy_len));
info->read_pos= info->buffer;
info->read_end= info->buffer+transfer_len;
info->append_read_pos=info->write_pos;
info->pos_in_file=pos_in_file+copy_len;
info->end_of_file+=len_in_buff;
}
unlock_append_buffer(info);
return Count ? 1 : 0;
} | O0 | c | my_b_seq_read:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
leaq 0x1d61eb(%rip), %rsi # 0xdd81f6
movl $0x54c, %edx # imm = 0x54C
callq 0xc014e0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq 0x20(%rdx), %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jb 0xc02045
jmp 0xc022ec
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x48(%rbp), %rcx
leaq 0x1d619c(%rip), %rdi # 0xdd81f6
movl $0x557, %esi # imm = 0x557
xorl %r8d, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0xbfff80
cmpq $-0x1, %rax
jne 0xc02099
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0xc01610
movl $0x1, -0x4(%rbp)
jmp 0xc0240e
movq -0x10(%rbp), %rax
movl $0x0, 0xe0(%rax)
movq -0x48(%rbp), %rax
andq $0xfff, %rax # imm = 0xFFF
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl $0x1000, %ecx # imm = 0x1000
subq -0x30(%rbp), %rcx
addq $0x1000, %rcx # imm = 0x1000
cmpq %rcx, %rax
jb 0xc02185
movabsq $0xfffff000, %rax # imm = 0xFFFFF000
andq -0x20(%rbp), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %r9
leaq 0x1d60ea(%rip), %rdi # 0xdd81f6
movl $0x569, %esi # imm = 0x569
callq 0xc02990
movq %rax, -0x50(%rbp)
cmpq $-0x1, %rax
jne 0xc02147
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0xc01610
movl $0x1, -0x4(%rbp)
jmp 0xc0240e
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x50(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x50(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0xc0217d
jmp 0xc022ec
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq -0x48(%rbp), %rcx
cmpq %rcx, %rax
jbe 0xc021bd
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xc021dd
cmpq $0x0, -0x20(%rbp)
je 0xc021d0
jmp 0xc022ec
movq $0x0, -0x28(%rbp)
jmp 0xc0228b
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x40(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %r9
leaq 0x1d5ff1(%rip), %rdi # 0xdd81f6
movl $0x589, %esi # imm = 0x589
callq 0xc02990
movq %rax, -0x28(%rbp)
cmpq $-0x1, -0x28(%rbp)
jne 0xc02241
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0xc01610
movl $0x1, -0x4(%rbp)
jmp 0xc0240e
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xc02289
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x4331a0
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xc022ec
jmp 0xc0228b
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0xc01610
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x4331a0
movl $0x0, -0x4(%rbp)
jmp 0xc0240e
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0xc02305
movq -0x20(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0xc02319
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0xc02321
movq -0x58(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x60(%rbp), %rdx
callq 0x4331a0
movq -0x60(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x38(%rax), %rcx
movq %rcx, 0x38(%rax)
movq -0x60(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xc02378
movq -0x38(%rbp), %rax
subq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe4(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x58(%rbp), %rdx
subq -0x60(%rbp), %rdx
movq %rdx, -0x68(%rbp)
callq 0x4331a0
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq -0x68(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x48(%rbp), %rcx
addq -0x60(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0xc01610
movq -0x20(%rbp), %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _my_b_seq_read:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
lea rsi, aWorkspaceLlm4b_180; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 54Ch
call inline_mysql_mutex_lock_34
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_10]
mov rcx, [rcx+18h]
mov rdx, [rbp+var_10]
mov rdx, [rdx+20h]
sub rcx, rdx
add rax, rcx
mov [rbp+var_48], rax
mov rcx, [rbp+var_10]
cmp rax, [rcx+8]
jb short loc_C02045
jmp loc_C022EC
loc_C02045:
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_48]
lea rdi, aWorkspaceLlm4b_180; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 557h
xor r8d, r8d
xor eax, eax
mov r9d, eax
call inline_mysql_file_seek_9
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_C02099
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call inline_mysql_mutex_unlock_35
mov [rbp+var_4], 1
jmp loc_C0240E
loc_C02099:
mov rax, [rbp+var_10]
mov dword ptr [rax+0E0h], 0
mov rax, [rbp+var_48]
and rax, 0FFFh
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov ecx, 1000h
sub rcx, [rbp+var_30]
add rcx, 1000h
cmp rax, rcx
jb loc_C02185
mov rax, 0FFFFF000h
and rax, [rbp+var_20]
sub rax, [rbp+var_30]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_28]
mov rax, [rbp+var_10]
mov r9, [rax+0F8h]
lea rdi, aWorkspaceLlm4b_180; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 569h
call inline_mysql_file_read_7
mov [rbp+var_50], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_C02147
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call inline_mysql_mutex_unlock_35
mov [rbp+var_4], 1
jmp loc_C0240E
loc_C02147:
mov rcx, [rbp+var_50]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_50]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rax, [rbp+var_50]
add rax, [rbp+var_48]
mov [rbp+var_48], rax
mov rax, [rbp+var_50]
cmp rax, [rbp+var_28]
jz short loc_C0217D
jmp loc_C022EC
loc_C0217D:
mov [rbp+var_30], 0
loc_C02185:
mov rax, [rbp+var_10]
mov rax, [rax+0F0h]
sub rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rcx, [rbp+var_48]
cmp rax, rcx
jbe short loc_C021BD
mov rax, [rbp+var_10]
mov rax, [rax+8]
sub rax, [rbp+var_48]
mov [rbp+var_40], rax
loc_C021BD:
cmp [rbp+var_40], 0
jnz short loc_C021DD
cmp [rbp+var_20], 0
jz short loc_C021D0
jmp loc_C022EC
loc_C021D0:
mov [rbp+var_28], 0
jmp loc_C0228B
loc_C021DD:
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
mov r8, [rbp+var_40]
mov rax, [rbp+var_10]
mov r9, [rax+0F8h]
lea rdi, aWorkspaceLlm4b_180; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 589h
call inline_mysql_file_read_7
mov [rbp+var_28], rax
cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh
jnz short loc_C02241
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call inline_mysql_mutex_unlock_35
mov [rbp+var_4], 1
jmp loc_C0240E
loc_C02241:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jnb short loc_C02289
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+20h]
mov rdx, [rbp+var_28]
call _memcpy
mov rcx, [rbp+var_28]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp short loc_C022EC
loc_C02289:
jmp short $+2
loc_C0228B:
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call inline_mysql_mutex_unlock_35
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
add rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
add rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov rcx, [rbp+var_48]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+20h]
mov rdx, [rbp+var_20]
call _memcpy
mov [rbp+var_4], 0
jmp loc_C0240E
loc_C022EC:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+38h]
sub rax, rcx
mov [rbp+var_58], rax
jmp short $+2
loc_C02305:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_58]
jnb short loc_C02319
mov rax, [rbp+var_20]
mov [rbp+var_70], rax
jmp short loc_C02321
loc_C02319:
mov rax, [rbp+var_58]
mov [rbp+var_70], rax
loc_C02321:
mov rax, [rbp+var_70]
mov [rbp+var_60], rax
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+38h]
mov rdx, [rbp+var_60]
call _memcpy
mov rcx, [rbp+var_60]
mov rax, [rbp+var_10]
add rcx, [rax+38h]
mov [rax+38h], rcx
mov rcx, [rbp+var_60]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz short loc_C02378
mov rax, [rbp+var_38]
sub rax, [rbp+var_20]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+0E4h], ecx
loc_C02378:
mov rax, [rbp+var_10]
mov rdi, [rax+20h]
mov rax, [rbp+var_10]
mov rsi, [rax+38h]
mov rdx, [rbp+var_58]
sub rdx, [rbp+var_60]
mov [rbp+var_68], rdx
call _memcpy
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
add rcx, [rbp+var_68]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+40h]
mov rax, [rbp+var_10]
mov [rax+38h], rcx
mov rcx, [rbp+var_48]
add rcx, [rbp+var_60]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+var_58]
mov rax, [rbp+var_10]
add rcx, [rax+8]
mov [rax+8], rcx
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call inline_mysql_mutex_unlock_35
mov rdx, [rbp+var_20]
xor eax, eax
mov ecx, 1
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_4], eax
loc_C0240E:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
| _BOOL8 my_b_seq_read(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v4; // [rsp+0h] [rbp-70h]
unsigned long long v5; // [rsp+18h] [rbp-58h]
long long v6; // [rsp+20h] [rbp-50h]
unsigned long long v7; // [rsp+28h] [rbp-48h]
unsigned long long v8; // [rsp+30h] [rbp-40h]
int v9; // [rsp+38h] [rbp-38h]
unsigned long long v10; // [rsp+40h] [rbp-30h]
unsigned long long v11; // [rsp+48h] [rbp-28h]
unsigned long long v12; // [rsp+48h] [rbp-28h]
unsigned long long v13; // [rsp+50h] [rbp-20h]
unsigned long long v14; // [rsp+50h] [rbp-20h]
long long v15; // [rsp+58h] [rbp-18h]
v15 = a2;
v13 = a3;
v9 = a3;
inline_mysql_mutex_lock_34(a1 + 80, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x54Cu);
v7 = *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32) + *(_QWORD *)a1;
if ( v7 >= *(_QWORD *)(a1 + 8) )
goto LABEL_18;
if ( inline_mysql_file_seek_9(
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x557u,
*(_DWORD *)(a1 + 212),
v7,
0,
0LL) == -1 )
goto LABEL_14;
*(_DWORD *)(a1 + 224) = 0;
v10 = v7 & 0xFFF;
if ( v13 >= 4096 - v10 + 4096 )
{
v11 = ((unsigned int)v13 & 0xFFFFF000) - v10;
v6 = inline_mysql_file_read_7(
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1385LL,
*(unsigned int *)(a1 + 212),
a2,
v11,
*(_QWORD *)(a1 + 248));
if ( v6 == -1 )
goto LABEL_14;
v13 -= v6;
v15 = a2 + v6;
v7 += v6;
if ( v6 != v11 )
goto LABEL_18;
v10 = 0LL;
}
v8 = *(_QWORD *)(a1 + 240) - v10;
if ( v8 > *(_QWORD *)(a1 + 8) - v7 )
v8 = *(_QWORD *)(a1 + 8) - v7;
if ( v8 )
{
v12 = inline_mysql_file_read_7(
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1417LL,
*(unsigned int *)(a1 + 212),
*(_QWORD *)(a1 + 32),
v8,
*(_QWORD *)(a1 + 248));
if ( v12 == -1LL )
{
LABEL_14:
*(_DWORD *)(a1 + 228) = -1;
inline_mysql_mutex_unlock_35(a1 + 80);
return 1;
}
if ( v12 >= v13 )
{
LABEL_17:
inline_mysql_mutex_unlock_35(a1 + 80);
*(_QWORD *)(a1 + 16) = v13 + *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 24) = v12 + *(_QWORD *)(a1 + 32);
*(_QWORD *)a1 = v7;
memcpy(v15, *(_QWORD *)(a1 + 32), v13);
return 0;
}
memcpy(v15, *(_QWORD *)(a1 + 32), v12);
v13 -= v12;
v15 += v12;
v7 += v12;
}
else if ( !v13 )
{
v12 = 0LL;
goto LABEL_17;
}
LABEL_18:
v5 = *(_QWORD *)(a1 + 64) - *(_QWORD *)(a1 + 56);
if ( v13 >= v5 )
v4 = *(_QWORD *)(a1 + 64) - *(_QWORD *)(a1 + 56);
else
v4 = v13;
memcpy(v15, *(_QWORD *)(a1 + 56), v4);
*(_QWORD *)(a1 + 56) += v4;
v14 = v13 - v4;
if ( v14 )
*(_DWORD *)(a1 + 228) = v9 - v14;
memcpy(*(_QWORD *)(a1 + 32), *(_QWORD *)(a1 + 56), v5 - v4);
*(_QWORD *)(a1 + 16) = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 24) = v5 - v4 + *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 56) = *(_QWORD *)(a1 + 64);
*(_QWORD *)a1 = v4 + v7;
*(_QWORD *)(a1 + 8) += v5;
inline_mysql_mutex_unlock_35(a1 + 80);
return v14 != 0;
}
| compare_columns:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x9
JNZ 0x00c02016
XOR EAX,EAX
MOV dword ptr [RBP + -0x34],EAX
JMP 0x00c0201f
LAB_00c02016:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
LAB_00c0201f:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX],0x9
JNZ 0x00c02035
XOR EAX,EAX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x00c0203e
LAB_00c02035:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x38],EAX
LAB_00c0203e:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x30],EAX
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x00c02093
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x12],0x0
JNZ 0x00c02093
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x00c02067
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + 0x12]
CMP EAX,0x0
JZ 0x00c02073
LAB_00c02067:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00c0219f
LAB_00c02073:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x4]
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4]
SUB RDI,RAX
CALL 0x00c02c80
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00c0219f
LAB_00c02093:
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x00c020af
MOV RAX,qword ptr [RBP + -0x28]
CMP byte ptr [RAX + 0x12],0x0
JNZ 0x00c020af
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00c0219f
LAB_00c020af:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x30]
JNZ 0x00c020d7
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x4]
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4]
SUB RDI,RAX
CALL 0x00c02c80
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00c0219f
LAB_00c020d7:
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x00c020e9
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00c0219f
LAB_00c020e9:
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x00c020fb
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00c0219f
LAB_00c020fb:
CMP dword ptr [RBP + -0x2c],0x3
JNZ 0x00c0210d
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00c0219f
LAB_00c0210d:
CMP dword ptr [RBP + -0x30],0x3
JNZ 0x00c0211f
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00c0219f
LAB_00c0211f:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x4
JZ 0x00c02166
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX],0x4
JZ 0x00c02166
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,word ptr [RCX + 0x8]
CMP EAX,ECX
JZ 0x00c02164
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x8]
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,word ptr [RAX + 0x8]
SUB RDI,RAX
CALL 0x00c02c80
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00c0219f
LAB_00c02164:
JMP 0x00c02166
LAB_00c02166:
CMP dword ptr [RBP + -0x2c],0x4
JNZ 0x00c02175
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00c0219f
LAB_00c02175:
CMP dword ptr [RBP + -0x30],0x4
JNZ 0x00c02184
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00c0219f
LAB_00c02184:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x4]
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4]
SUB RDI,RAX
CALL 0x00c02c80
MOV dword ptr [RBP + -0x4],EAX
LAB_00c0219f:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int compare_columns(int8 *param_1,uchar *param_2,size_t *param_3,uchar *param_4,size_t param_5
)
{
int *piVar1;
int *piVar2;
int local_40;
int local_3c;
int local_c;
piVar1 = (int *)*param_1;
piVar2 = *(int **)param_2;
if (*piVar1 == 9) {
local_3c = 0;
}
else {
local_3c = *piVar1;
}
if (*piVar2 == 9) {
local_40 = 0;
}
else {
local_40 = *piVar2;
}
if ((local_3c == 0) && (*(char *)((long)piVar1 + 0x12) == '\0')) {
if ((local_40 == 0) && (*(char *)((long)piVar2 + 0x12) == '\0')) {
local_c = sign((EVP_PKEY_CTX *)((ulong)(uint)piVar1[1] - (ulong)(uint)piVar2[1]),param_2,
param_3,param_4,param_5);
}
else {
local_c = -1;
}
}
else if ((local_40 == 0) && (*(char *)((long)piVar2 + 0x12) == '\0')) {
local_c = 1;
}
else if (local_3c == local_40) {
local_c = sign((EVP_PKEY_CTX *)((ulong)(uint)piVar1[1] - (ulong)(uint)piVar2[1]),param_2,param_3
,param_4,param_5);
}
else if (local_3c == 0) {
local_c = -1;
}
else if (local_40 == 0) {
local_c = 1;
}
else if (local_3c == 3) {
local_c = -1;
}
else if (local_40 == 3) {
local_c = 1;
}
else if (((*piVar1 == 4) || (*piVar2 == 4)) ||
(param_4 = (uchar *)(ulong)*(ushort *)(piVar2 + 2),
*(ushort *)(piVar1 + 2) == *(ushort *)(piVar2 + 2))) {
if (local_3c == 4) {
local_c = 1;
}
else if (local_40 == 4) {
local_c = -1;
}
else {
local_c = sign((EVP_PKEY_CTX *)((ulong)(uint)piVar1[1] - (ulong)(uint)piVar2[1]),param_2,
param_3,param_4,param_5);
}
}
else {
local_c = sign((EVP_PKEY_CTX *)((ulong)*(ushort *)(piVar1 + 2) - (ulong)*(ushort *)(piVar2 + 2))
,param_2,param_3,param_4,param_5);
}
return local_c;
}
| |
30,566 | cxxopts::exceptions::requested_option_not_present::~requested_option_not_present() | zkingston[P]unknot/build_O1/_deps/cxxopts-src/include/cxxopts.hpp | explicit requested_option_not_present(const std::string& option)
: parsing("Option " + LQUOTE + option + RQUOTE + " not present")
{
} | O1 | cpp | cxxopts::exceptions::requested_option_not_present::~requested_option_not_present():
pushq %rbx
movq %rdi, %rbx
leaq 0x308187(%rip), %rax # 0x333118
movq %rax, (%rdi)
movq 0x8(%rdi), %rdi
leaq 0x18(%rbx), %rax
cmpq %rax, %rdi
je 0x2afac
movq (%rax), %rsi
incq %rsi
callq 0xfa70
movq %rbx, %rdi
callq 0x10260
movl $0x28, %esi
movq %rbx, %rdi
popq %rbx
jmp 0xfa70
| _ZN7cxxopts10exceptions28requested_option_not_presentD0Ev:
push rbx
mov rbx, rdi
lea rax, off_333118
mov [rdi], rax
mov rdi, [rdi+8]; void *
lea rax, [rbx+18h]
cmp rdi, rax
jz short loc_2AFAC
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2AFAC:
mov rdi, rbx; this
call __ZNSt9exceptionD2Ev; std::exception::~exception()
mov esi, 28h ; '('; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void cxxopts::exceptions::requested_option_not_present::~requested_option_not_present(
cxxopts::exceptions::requested_option_not_present *this)
{
char *v2; // rdi
*(_QWORD *)this = off_333118;
v2 = (char *)*((_QWORD *)this + 1);
if ( v2 != (char *)this + 24 )
operator delete(v2, *((_QWORD *)this + 3) + 1LL);
std::exception::~exception(this);
operator delete(this, 0x28uLL);
}
| ~requested_option_not_present:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x433118]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x8]
LEA RAX,[RBX + 0x18]
CMP RDI,RAX
JZ 0x0012afac
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0010fa70
LAB_0012afac:
MOV RDI,RBX
CALL 0x00110260
MOV ESI,0x28
MOV RDI,RBX
POP RBX
JMP 0x0010fa70
|
/* cxxopts::exceptions::requested_option_not_present::~requested_option_not_present() */
void __thiscall
cxxopts::exceptions::requested_option_not_present::~requested_option_not_present
(requested_option_not_present *this)
{
*(int ***)this = &PTR__exception_00433118;
if (*(requested_option_not_present **)(this + 8) != this + 0x18) {
operator_delete(*(requested_option_not_present **)(this + 8),*(long *)(this + 0x18) + 1);
}
std::exception::~exception((exception *)this);
operator_delete(this,0x28);
return;
}
| |
30,567 | lf_pinbox_init | eloqsql/mysys/lf_alloc-pin.c | void lf_pinbox_init(LF_PINBOX *pinbox, uint free_ptr_offset,
lf_pinbox_free_func *free_func, void *free_func_arg)
{
DBUG_ASSERT(free_ptr_offset % sizeof(void *) == 0);
lf_dynarray_init(&pinbox->pinarray, sizeof(LF_PINS));
pinbox->pinstack_top_ver= 0;
pinbox->pins_in_array= 0;
pinbox->free_ptr_offset= free_ptr_offset;
pinbox->free_func= free_func;
pinbox->free_func_arg= free_func_arg;
} | O3 | c | lf_pinbox_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %r12
movl $0x78, %esi
callq 0xa5a3c
xorl %eax, %eax
movl %eax, 0x3c(%r12)
movl %eax, 0x40(%r12)
movl %r15d, 0x38(%r12)
movq %r14, 0x28(%r12)
movq %rbx, 0x30(%r12)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| lf_pinbox_init:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rcx
mov r14, rdx
mov r15d, esi
mov r12, rdi
mov esi, 78h ; 'x'
call lf_dynarray_init
xor eax, eax
mov [r12+3Ch], eax
mov [r12+40h], eax
mov [r12+38h], r15d
mov [r12+28h], r14
mov [r12+30h], rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long lf_pinbox_init(long long a1, int a2, long long a3, long long a4)
{
long long result; // rax
lf_dynarray_init(a1, 120LL);
result = 0LL;
*(_DWORD *)(a1 + 60) = 0;
*(_DWORD *)(a1 + 64) = 0;
*(_DWORD *)(a1 + 56) = a2;
*(_QWORD *)(a1 + 40) = a3;
*(_QWORD *)(a1 + 48) = a4;
return result;
}
| lf_pinbox_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
MOV R15D,ESI
MOV R12,RDI
MOV ESI,0x78
CALL 0x001a5a3c
XOR EAX,EAX
MOV dword ptr [R12 + 0x3c],EAX
MOV dword ptr [R12 + 0x40],EAX
MOV dword ptr [R12 + 0x38],R15D
MOV qword ptr [R12 + 0x28],R14
MOV qword ptr [R12 + 0x30],RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void lf_pinbox_init(long param_1,int4 param_2,int8 param_3,int8 param_4)
{
lf_dynarray_init(param_1,0x78);
*(int4 *)(param_1 + 0x3c) = 0;
*(int4 *)(param_1 + 0x40) = 0;
*(int4 *)(param_1 + 0x38) = param_2;
*(int8 *)(param_1 + 0x28) = param_3;
*(int8 *)(param_1 + 0x30) = param_4;
return;
}
| |
30,568 | gguf_get_val_data | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | const void * gguf_get_val_data(const struct gguf_context * ctx, int key_id) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
GGML_ASSERT(ctx->kv[key_id].type != GGUF_TYPE_ARRAY);
GGML_ASSERT(ctx->kv[key_id].type != GGUF_TYPE_STRING);
return &ctx->kv[key_id].value;
} | O1 | c | gguf_get_val_data:
pushq %rax
testl %esi, %esi
js 0x9de27
cmpl %esi, 0x10(%rdi)
jle 0x9de27
movq 0x18(%rdi), %rax
movl %esi, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movl 0x10(%rax,%rcx), %edx
cmpl $0x8, %edx
je 0x9de2c
cmpl $0x9, %edx
je 0x9de31
addq %rcx, %rax
addq $0x18, %rax
popq %rcx
retq
callq 0x113fb
callq 0x11440
callq 0x11485
| gguf_get_val_data:
push rax
test esi, esi
js short loc_9DE27
cmp [rdi+10h], esi
jle short loc_9DE27
mov rax, [rdi+18h]
mov ecx, esi
lea rcx, [rcx+rcx*2]
shl rcx, 4
mov edx, [rax+rcx+10h]
cmp edx, 8
jz short loc_9DE2C
cmp edx, 9
jz short loc_9DE31
add rax, rcx
add rax, 18h
pop rcx
retn
loc_9DE27:
call gguf_get_val_data_cold_1
loc_9DE2C:
call gguf_get_val_data_cold_2
loc_9DE31:
call gguf_get_val_data_cold_3
| long long gguf_get_val_data(long long a1, int a2)
{
long long v2; // rax
long long v3; // rcx
int v4; // edx
if ( a2 < 0 || *(_DWORD *)(a1 + 16) <= a2 )
gguf_get_val_data_cold_1(a1);
v2 = *(_QWORD *)(a1 + 24);
v3 = 48LL * (unsigned int)a2;
v4 = *(_DWORD *)(v2 + v3 + 16);
if ( v4 == 8 )
gguf_get_val_data_cold_2(a1);
if ( v4 == 9 )
gguf_get_val_data_cold_3(a1);
return v3 + v2 + 24;
}
| |||
30,569 | gguf_get_val_data | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | const void * gguf_get_val_data(const struct gguf_context * ctx, int key_id) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
GGML_ASSERT(ctx->kv[key_id].type != GGUF_TYPE_ARRAY);
GGML_ASSERT(ctx->kv[key_id].type != GGUF_TYPE_STRING);
return &ctx->kv[key_id].value;
} | O2 | c | gguf_get_val_data:
pushq %rax
testl %esi, %esi
js 0x7812b
cmpl %esi, 0x10(%rdi)
jle 0x7812b
movq 0x18(%rdi), %rax
movl %esi, %ecx
imulq $0x30, %rcx, %rcx
movl 0x10(%rax,%rcx), %edx
cmpl $0x8, %edx
je 0x78160
cmpl $0x9, %edx
je 0x78195
addq %rcx, %rax
addq $0x18, %rax
popq %rcx
retq
movq 0x5de16(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x5de67(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x220d3(%rip), %rsi # 0x9a21e
leaq 0x2972c(%rip), %rdx # 0xa187e
leaq 0x2a942(%rip), %r8 # 0xa2a9b
movl $0x4b79, %ecx # imm = 0x4B79
jmp 0x781c8
movq 0x5dde1(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x5de32(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2209e(%rip), %rsi # 0x9a21e
leaq 0x296f7(%rip), %rdx # 0xa187e
leaq 0x2ab6e(%rip), %r8 # 0xa2cfc
movl $0x4b7b, %ecx # imm = 0x4B7B
jmp 0x781c8
movq 0x5ddac(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x5ddfd(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x22069(%rip), %rsi # 0x9a21e
leaq 0x296c2(%rip), %rdx # 0xa187e
leaq 0x2ab11(%rip), %r8 # 0xa2cd4
movl $0x4b7a, %ecx # imm = 0x4B7A
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
| gguf_get_val_data:
push rax
test esi, esi
js short loc_7812B
cmp [rdi+10h], esi
jle short loc_7812B
mov rax, [rdi+18h]
mov ecx, esi
imul rcx, 30h ; '0'
mov edx, [rax+rcx+10h]
cmp edx, 8
jz short loc_78160
cmp edx, 9
jz short loc_78195
add rax, rcx
add rax, 18h
pop rcx
retn
loc_7812B:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"...
mov ecx, 4B79h
jmp short loc_781C8
loc_78160:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aCtxKvKeyIdType_12; "ctx->kv[key_id].type != GGUF_TYPE_STRIN"...
mov ecx, 4B7Bh
jmp short loc_781C8
loc_78195:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aCtxKvKeyIdType_13; "ctx->kv[key_id].type != GGUF_TYPE_ARRAY"
mov ecx, 4B7Ah
loc_781C8:
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
| long long gguf_get_val_data(long long a1, int a2)
{
long long v2; // rax
long long v3; // rcx
int v4; // edx
long long v6; // rdi
if ( a2 < 0 || *(_DWORD *)(a1 + 16) <= a2 )
{
fflush(stdout);
v6 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
19321LL,
"key_id >= 0 && key_id < gguf_get_n_kv(ctx)");
goto LABEL_9;
}
v2 = *(_QWORD *)(a1 + 24);
v3 = 48LL * (unsigned int)a2;
v4 = *(_DWORD *)(v2 + v3 + 16);
if ( v4 == 8 )
{
fflush(stdout);
v6 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
19323LL,
"ctx->kv[key_id].type != GGUF_TYPE_STRING");
goto LABEL_9;
}
if ( v4 == 9 )
{
fflush(stdout);
v6 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
19322LL,
"ctx->kv[key_id].type != GGUF_TYPE_ARRAY");
LABEL_9:
ggml_print_backtrace();
abort(v6);
}
return v3 + v2 + 24;
}
| gguf_get_val_data:
PUSH RAX
TEST ESI,ESI
JS 0x0017812b
CMP dword ptr [RDI + 0x10],ESI
JLE 0x0017812b
MOV RAX,qword ptr [RDI + 0x18]
MOV ECX,ESI
IMUL RCX,RCX,0x30
MOV EDX,dword ptr [RAX + RCX*0x1 + 0x10]
CMP EDX,0x8
JZ 0x00178160
CMP EDX,0x9
JZ 0x00178195
ADD RAX,RCX
ADD RAX,0x18
POP RCX
RET
LAB_0017812b:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a2a9b]
MOV ECX,0x4b79
JMP 0x001781c8
LAB_00178160:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a2cfc]
MOV ECX,0x4b7b
JMP 0x001781c8
LAB_00178195:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a2cd4]
MOV ECX,0x4b7a
LAB_001781c8:
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
long gguf_get_val_data(long param_1,uint param_2)
{
int iVar1;
int8 uVar2;
FILE *__stream;
char *pcVar3;
if (((int)param_2 < 0) || (*(int *)(param_1 + 0x10) <= (int)param_2)) {
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar3 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
uVar2 = 0x4b79;
}
else {
iVar1 = *(int *)(*(long *)(param_1 + 0x18) + 0x10 + (ulong)param_2 * 0x30);
if (iVar1 == 8) {
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar3 = "ctx->kv[key_id].type != GGUF_TYPE_STRING";
uVar2 = 0x4b7b;
}
else {
if (iVar1 != 9) {
return *(long *)(param_1 + 0x18) + (ulong)param_2 * 0x30 + 0x18;
}
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar3 = "ctx->kv[key_id].type != GGUF_TYPE_ARRAY";
uVar2 = 0x4b7a;
}
}
fprintf(__stream,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
uVar2,pcVar3);
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
| |
30,570 | evmone::read_valid_eof1_header(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>) | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/eof.cpp | EOF1Header read_valid_eof1_header(bytes_view container)
{
EOFSectionHeaders section_headers;
auto it = container.begin() + std::size(EOF_MAGIC) + 1; // MAGIC + VERSION
while (*it != TERMINATOR)
{
auto section_id = *it++;
if (section_id == CODE_SECTION)
{
const auto code_section_num = read_uint16_be(it);
it += 2;
for (uint16_t i = 0; i < code_section_num; ++i)
{
const auto section_size = read_uint16_be(it);
it += 2;
section_headers.code_sizes.emplace_back(section_size);
}
}
else if (section_id == CONTAINER_SECTION)
{
const auto code_section_num = read_uint16_be(it);
it += 2;
for (uint16_t i = 0; i < code_section_num; ++i)
{
const auto section_size = read_uint32_be(it);
it += 4;
section_headers.container_sizes.emplace_back(section_size);
}
}
else
{
const auto section_size = read_uint16_be(it);
it += 2;
if (section_id == TYPE_SECTION)
section_headers.type_size = section_size;
else
{
assert(section_id == DATA_SECTION);
section_headers.data_size = section_size;
}
}
}
const auto header_size = eof_header_size(section_headers);
EOF1Header header;
header.version = container[2];
header.type_section_offset = header_size;
header.code_sizes = std::move(section_headers.code_sizes);
auto code_offset = header_size + section_headers.type_size;
for (const auto code_size : header.code_sizes)
{
assert(code_offset <= std::numeric_limits<uint16_t>::max());
header.code_offsets.emplace_back(static_cast<uint16_t>(code_offset));
code_offset += code_size;
}
header.data_size = section_headers.data_size;
header.container_sizes = std::move(section_headers.container_sizes);
auto container_offset = code_offset;
for (const auto container_size : header.container_sizes)
{
header.container_offsets.emplace_back(static_cast<uint16_t>(container_offset));
container_offset += container_size;
}
header.data_offset = static_cast<uint16_t>(container_offset);
return header;
} | O0 | cpp | evmone::read_valid_eof1_header(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>):
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
movq %rdi, -0xf0(%rbp)
movq %rdi, %rax
movq %rax, -0xe8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x72590
leaq -0x18(%rbp), %rdi
callq 0x79860
movq %rax, -0xe0(%rbp)
leaq 0xb6918(%rip), %rdi # 0x128a50
callq 0x797b0
movq %rax, %rcx
movq -0xe0(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
je 0x722ce
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rbp)
movb (%rax), %al
movb %al, -0x59(%rbp)
movzbl -0x59(%rbp), %eax
cmpl $0x2, %eax
jne 0x721f8
movq -0x58(%rbp), %rdi
callq 0x6f960
movw %ax, -0x5c(%rbp)
movq -0x58(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x58(%rbp)
movw $0x0, -0x5e(%rbp)
movzwl -0x5e(%rbp), %eax
movzwl -0x5c(%rbp), %ecx
cmpl %ecx, %eax
jge 0x721f3
movq -0x58(%rbp), %rdi
callq 0x6f960
movw %ax, -0x60(%rbp)
movq -0x58(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x58(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x79880
jmp 0x721d2
jmp 0x721d4
movw -0x5e(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x5e(%rbp)
jmp 0x7219e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x72575
jmp 0x722c9
movzbl -0x59(%rbp), %eax
cmpl $0x3, %eax
jne 0x72265
movq -0x58(%rbp), %rdi
callq 0x6f960
movw %ax, -0x6e(%rbp)
movq -0x58(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x58(%rbp)
movw $0x0, -0x70(%rbp)
movzwl -0x70(%rbp), %eax
movzwl -0x6e(%rbp), %ecx
cmpl %ecx, %eax
jge 0x72263
movq -0x58(%rbp), %rdi
callq 0x79900
movl %eax, -0x74(%rbp)
movq -0x58(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x58(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x74(%rbp), %rsi
callq 0x79970
jmp 0x72253
jmp 0x72255
movw -0x70(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x70(%rbp)
jmp 0x72220
jmp 0x722c7
movq -0x58(%rbp), %rdi
callq 0x6f960
movw %ax, -0x76(%rbp)
movq -0x58(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x58(%rbp)
movzbl -0x59(%rbp), %eax
cmpl $0x1, %eax
jne 0x72291
movw -0x76(%rbp), %ax
movw %ax, -0x50(%rbp)
jmp 0x722c5
movzbl -0x59(%rbp), %eax
cmpl $0xff, %eax
jne 0x7229e
jmp 0x722bd
leaq 0x7391b(%rip), %rdi # 0xe5bc0
leaq 0x7392f(%rip), %rsi # 0xe5bdb
movl $0x362, %edx # imm = 0x362
leaq 0x739a1(%rip), %rcx # 0xe5c59
callq 0x23120
movw -0x76(%rbp), %ax
movw %ax, -0x4e(%rbp)
jmp 0x722c7
jmp 0x722c9
jmp 0x72152
leaq -0x50(%rbp), %rdi
callq 0x725d0
movq -0xf0(%rbp), %rdi
movq %rax, -0x80(%rbp)
movb $0x0, -0x81(%rbp)
callq 0x799f0
leaq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0x694e0
movq -0xf0(%rbp), %rdi
movb (%rax), %al
movb %al, (%rdi)
movq -0x80(%rbp), %rax
movq %rax, 0x8(%rdi)
leaq -0x50(%rbp), %rsi
addq $0x8, %rsi
addq $0x10, %rdi
callq 0x79a60
movq -0xf0(%rbp), %rax
movq -0x80(%rbp), %rcx
movzwl -0x50(%rbp), %edx
addq %rdx, %rcx
movq %rcx, -0x90(%rbp)
addq $0x10, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0x79a90
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
callq 0x79ac0
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x79af0
xorb $-0x1, %al
testb $0x1, %al
jne 0x72388
jmp 0x7244e
leaq -0xa0(%rbp), %rdi
callq 0x79b30
movw (%rax), %ax
movw %ax, -0xaa(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0xf8(%rbp)
callq 0x79b50
movw %ax, %cx
movq -0xf8(%rbp), %rax
movzwl %cx, %ecx
cmpq %rcx, %rax
ja 0x723c5
jmp 0x723e4
leaq 0x738c3(%rip), %rdi # 0xe5c8f
leaq 0x73808(%rip), %rsi # 0xe5bdb
movl $0x371, %edx # imm = 0x371
leaq 0x7387a(%rip), %rcx # 0xe5c59
callq 0x23120
movq -0xf0(%rbp), %rdi
addq $0x28, %rdi
movw -0x90(%rbp), %ax
movw %ax, -0xac(%rbp)
leaq -0xac(%rbp), %rsi
callq 0x79b60
jmp 0x7240b
movzwl -0xaa(%rbp), %eax
addq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x79be0
jmp 0x7236a
movq -0xf0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
callq 0x3e150
jmp 0x72575
movq -0xf0(%rbp), %rdi
movw -0x4e(%rbp), %ax
movw %ax, 0x40(%rdi)
leaq -0x50(%rbp), %rsi
addq $0x20, %rsi
addq $0x48, %rdi
callq 0x79c00
movq -0xf0(%rbp), %rax
movq -0x90(%rbp), %rcx
movq %rcx, -0xb8(%rbp)
addq $0x48, %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x79c30
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x79c60
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x79c90
xorb $-0x1, %al
testb $0x1, %al
jne 0x724cf
jmp 0x7252c
leaq -0xc8(%rbp), %rdi
callq 0x79cd0
movq -0xf0(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0xd4(%rbp)
addq $0x60, %rdi
movw -0xb8(%rbp), %ax
movw %ax, -0xd6(%rbp)
leaq -0xd6(%rbp), %rsi
callq 0x79cf0
jmp 0x7250a
movl -0xd4(%rbp), %eax
addq -0xb8(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x79d70
jmp 0x724b4
movq -0xf0(%rbp), %rax
movq -0xb8(%rbp), %rcx
movzwl %cx, %ecx
movl %ecx, 0x44(%rax)
movb $0x1, -0x81(%rbp)
testb $0x1, -0x81(%rbp)
jne 0x7255c
movq -0xf0(%rbp), %rdi
callq 0x3e150
leaq -0x50(%rbp), %rdi
callq 0x72660
movq -0xe8(%rbp), %rax
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
leaq -0x50(%rbp), %rdi
callq 0x72660
movq -0x68(%rbp), %rdi
callq 0x23320
nopw (%rax,%rax)
| _ZN6evmone22read_valid_eof1_headerESt17basic_string_viewIhN4evmc11byte_traitsIhEEE:
push rbp
mov rbp, rsp
sub rsp, 100h
mov [rbp+var_F0], rdi
mov rax, rdi
mov [rbp+var_E8], rax
mov [rbp+var_8], rdi
mov [rbp+var_18], rsi
mov [rbp+var_10], rdx
lea rdi, [rbp+var_50]; this
call _ZN6evmone12_GLOBAL__N_117EOFSectionHeadersC2Ev; evmone::`anonymous namespace'::EOFSectionHeaders::EOFSectionHeaders(void)
lea rdi, [rbp+var_18]
call _ZNKSt17basic_string_viewIhN4evmc11byte_traitsIhEEE5beginEv; std::basic_string_view<uchar,evmc::byte_traits<uchar>>::begin(void)
mov [rbp+var_E0], rax
lea rdi, _ZN6evmoneL9EOF_MAGICE; evmone::EOF_MAGIC
call _ZSt4sizeISt17basic_string_viewIhN4evmc11byte_traitsIhEEEEDTcldtfp_4sizeEERKT_
mov rcx, rax
mov rax, [rbp+var_E0]
add rax, rcx
add rax, 1
mov [rbp+var_58], rax
loc_72152:
mov rax, [rbp+var_58]
movzx eax, byte ptr [rax]
cmp eax, 0
jz loc_722CE
mov rax, [rbp+var_58]
mov rcx, rax
add rcx, 1
mov [rbp+var_58], rcx
mov al, [rax]
mov [rbp+var_59], al
movzx eax, [rbp+var_59]
cmp eax, 2
jnz short loc_721F8
mov rdi, [rbp+var_58]
call _ZN6evmone14read_uint16_beIPKhEEtT_; evmone::read_uint16_be<uchar const*>(uchar const*)
mov [rbp+var_5C], ax
mov rax, [rbp+var_58]
add rax, 2
mov [rbp+var_58], rax
mov [rbp+var_5E], 0
loc_7219E:
movzx eax, [rbp+var_5E]
movzx ecx, [rbp+var_5C]
cmp eax, ecx
jge short loc_721F3
mov rdi, [rbp+var_58]
call _ZN6evmone14read_uint16_beIPKhEEtT_; evmone::read_uint16_be<uchar const*>(uchar const*)
mov [rbp+var_60], ax
mov rax, [rbp+var_58]
add rax, 2
mov [rbp+var_58], rax
lea rdi, [rbp+var_48]
lea rsi, [rbp+var_60]
call _ZNSt6vectorItSaItEE12emplace_backIJRKtEEERtDpOT_; std::vector<ushort>::emplace_back<ushort const&>(ushort const&)
jmp short $+2
loc_721D2:
jmp short $+2
loc_721D4:
mov ax, [rbp+var_5E]
add ax, 1
mov [rbp+var_5E], ax
jmp short loc_7219E
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
jmp loc_72575
loc_721F3:
jmp loc_722C9
loc_721F8:
movzx eax, [rbp+var_59]
cmp eax, 3
jnz short loc_72265
mov rdi, [rbp+var_58]
call _ZN6evmone14read_uint16_beIPKhEEtT_; evmone::read_uint16_be<uchar const*>(uchar const*)
mov [rbp+var_6E], ax
mov rax, [rbp+var_58]
add rax, 2
mov [rbp+var_58], rax
mov [rbp+var_70], 0
loc_72220:
movzx eax, [rbp+var_70]
movzx ecx, [rbp+var_6E]
cmp eax, ecx
jge short loc_72263
mov rdi, [rbp+var_58]
call _ZN6evmone14read_uint32_beIPKhEEjT_; evmone::read_uint32_be<uchar const*>(uchar const*)
mov [rbp+var_74], eax
mov rax, [rbp+var_58]
add rax, 4
mov [rbp+var_58], rax
lea rdi, [rbp+var_30]
lea rsi, [rbp+var_74]
call _ZNSt6vectorIjSaIjEE12emplace_backIJRKjEEERjDpOT_; std::vector<uint>::emplace_back<uint const&>(uint const&)
jmp short $+2
loc_72253:
jmp short $+2
loc_72255:
mov ax, [rbp+var_70]
add ax, 1
mov [rbp+var_70], ax
jmp short loc_72220
loc_72263:
jmp short loc_722C7
loc_72265:
mov rdi, [rbp+var_58]
call _ZN6evmone14read_uint16_beIPKhEEtT_; evmone::read_uint16_be<uchar const*>(uchar const*)
mov [rbp+var_76], ax
mov rax, [rbp+var_58]
add rax, 2
mov [rbp+var_58], rax
movzx eax, [rbp+var_59]
cmp eax, 1
jnz short loc_72291
mov ax, [rbp+var_76]
mov [rbp+var_50], ax
jmp short loc_722C5
loc_72291:
movzx eax, [rbp+var_59]
cmp eax, 0FFh
jnz short loc_7229E
jmp short loc_722BD
loc_7229E:
lea rdi, aSectionIdDataS; "section_id == DATA_SECTION"
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov edx, 362h
lea rcx, aEof1headerEvmo; "EOF1Header evmone::read_valid_eof1_head"...
call ___assert_fail
loc_722BD:
mov ax, [rbp+var_76]
mov [rbp+var_4E], ax
loc_722C5:
jmp short $+2
loc_722C7:
jmp short $+2
loc_722C9:
jmp loc_72152
loc_722CE:
lea rdi, [rbp+var_50]
call _ZN6evmone12_GLOBAL__N_115eof_header_sizeERKNS0_17EOFSectionHeadersE; evmone::`anonymous namespace'::eof_header_size(evmone::`anonymous namespace'::EOFSectionHeaders const&)
mov rdi, [rbp+var_F0]; this
mov [rbp+var_80], rax
mov [rbp+var_81], 0
call _ZN6evmone10EOF1HeaderC2Ev; evmone::EOF1Header::EOF1Header(void)
lea rdi, [rbp+var_18]
mov esi, 2
call _ZNKSt17basic_string_viewIhN4evmc11byte_traitsIhEEEixEm; std::basic_string_view<uchar,evmc::byte_traits<uchar>>::operator[](ulong)
mov rdi, [rbp+var_F0]
mov al, [rax]
mov [rdi], al
mov rax, [rbp+var_80]
mov [rdi+8], rax
lea rsi, [rbp+var_50]
add rsi, 8
add rdi, 10h
call _ZNSt6vectorItSaItEEaSEOS1_; std::vector<ushort>::operator=(std::vector<ushort>&&)
mov rax, [rbp+var_F0]
mov rcx, [rbp+var_80]
movzx edx, [rbp+var_50]
add rcx, rdx
mov [rbp+var_90], rcx
add rax, 10h
mov [rbp+var_98], rax
mov rdi, [rbp+var_98]
call _ZNSt6vectorItSaItEE5beginEv; std::vector<ushort>::begin(void)
mov [rbp+var_A0], rax
mov rdi, [rbp+var_98]
call _ZNSt6vectorItSaItEE3endEv; std::vector<ushort>::end(void)
mov [rbp+var_A8], rax
loc_7236A:
lea rdi, [rbp+var_A0]
lea rsi, [rbp+var_A8]
call _ZN9__gnu_cxxeqIPtSt6vectorItSaItEEEEbRKNS_17__normal_iteratorIT_T0_EESA_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_72388
jmp loc_7244E
loc_72388:
lea rdi, [rbp+var_A0]
call _ZNK9__gnu_cxx17__normal_iteratorIPtSt6vectorItSaItEEEdeEv; __gnu_cxx::__normal_iterator<ushort *,std::vector<ushort>>::operator*(void)
mov ax, [rax]
mov [rbp+var_AA], ax
mov rax, [rbp+var_90]
mov [rbp+var_F8], rax
call _ZNSt14numeric_limitsItE3maxEv; std::numeric_limits<ushort>::max(void)
mov cx, ax
mov rax, [rbp+var_F8]
movzx ecx, cx
cmp rax, rcx
ja short loc_723C5
jmp short loc_723E4
loc_723C5:
lea rdi, aCodeOffsetStdN; "code_offset <= std::numeric_limits<uint"...
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov edx, 371h
lea rcx, aEof1headerEvmo; "EOF1Header evmone::read_valid_eof1_head"...
call ___assert_fail
loc_723E4:
mov rdi, [rbp+var_F0]
add rdi, 28h ; '('
mov ax, word ptr [rbp+var_90]
mov [rbp+var_AC], ax
lea rsi, [rbp+var_AC]
call _ZNSt6vectorItSaItEE12emplace_backIJtEEERtDpOT_; std::vector<ushort>::emplace_back<ushort>(ushort &&)
jmp short $+2
loc_7240B:
movzx eax, [rbp+var_AA]
add rax, [rbp+var_90]
mov [rbp+var_90], rax
lea rdi, [rbp+var_A0]
call _ZN9__gnu_cxx17__normal_iteratorIPtSt6vectorItSaItEEEppEv; __gnu_cxx::__normal_iterator<ushort *,std::vector<ushort>>::operator++(void)
jmp loc_7236A
mov rdi, [rbp+var_F0]; this
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
call _ZN6evmone10EOF1HeaderD2Ev; evmone::EOF1Header::~EOF1Header()
jmp loc_72575
loc_7244E:
mov rdi, [rbp+var_F0]
mov ax, [rbp+var_4E]
mov [rdi+40h], ax
lea rsi, [rbp+var_50]
add rsi, 20h ; ' '
add rdi, 48h ; 'H'
call _ZNSt6vectorIjSaIjEEaSEOS1_; std::vector<uint>::operator=(std::vector<uint>&&)
mov rax, [rbp+var_F0]
mov rcx, [rbp+var_90]
mov [rbp+var_B8], rcx
add rax, 48h ; 'H'
mov [rbp+var_C0], rax
mov rdi, [rbp+var_C0]
call _ZNSt6vectorIjSaIjEE5beginEv; std::vector<uint>::begin(void)
mov [rbp+var_C8], rax
mov rdi, [rbp+var_C0]
call _ZNSt6vectorIjSaIjEE3endEv; std::vector<uint>::end(void)
mov [rbp+var_D0], rax
loc_724B4:
lea rdi, [rbp+var_C8]
lea rsi, [rbp+var_D0]
call _ZN9__gnu_cxxeqIPjSt6vectorIjSaIjEEEEbRKNS_17__normal_iteratorIT_T0_EESA_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_724CF
jmp short loc_7252C
loc_724CF:
lea rdi, [rbp+var_C8]
call _ZNK9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEdeEv; __gnu_cxx::__normal_iterator<uint *,std::vector<uint>>::operator*(void)
mov rdi, [rbp+var_F0]
mov eax, [rax]
mov [rbp+var_D4], eax
add rdi, 60h ; '`'
mov ax, word ptr [rbp+var_B8]
mov [rbp+var_D6], ax
lea rsi, [rbp+var_D6]
call _ZNSt6vectorIjSaIjEE12emplace_backIJtEEERjDpOT_; std::vector<uint>::emplace_back<ushort>(ushort &&)
jmp short $+2
loc_7250A:
mov eax, [rbp+var_D4]
add rax, [rbp+var_B8]
mov [rbp+var_B8], rax
lea rdi, [rbp+var_C8]
call _ZN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEppEv; __gnu_cxx::__normal_iterator<uint *,std::vector<uint>>::operator++(void)
jmp short loc_724B4
loc_7252C:
mov rax, [rbp+var_F0]
mov rcx, [rbp+var_B8]
movzx ecx, cx
mov [rax+44h], ecx
mov [rbp+var_81], 1
test [rbp+var_81], 1
jnz short loc_7255C
mov rdi, [rbp+var_F0]; this
call _ZN6evmone10EOF1HeaderD2Ev; evmone::EOF1Header::~EOF1Header()
loc_7255C:
lea rdi, [rbp+var_50]; this
call _ZN6evmone12_GLOBAL__N_117EOFSectionHeadersD2Ev; evmone::`anonymous namespace'::EOFSectionHeaders::~EOFSectionHeaders()
mov rax, [rbp+var_E8]
add rsp, 100h
pop rbp
retn
loc_72575:
lea rdi, [rbp+var_50]; this
call _ZN6evmone12_GLOBAL__N_117EOFSectionHeadersD2Ev; evmone::`anonymous namespace'::EOFSectionHeaders::~EOFSectionHeaders()
mov rdi, [rbp+var_68]
call __Unwind_Resume
| long long evmone::read_valid_eof1_header(long long a1, long long a2, long long a3)
{
unsigned __int8 *v3; // rax
unsigned long long v5; // [rsp+8h] [rbp-F8h]
long long v6; // [rsp+20h] [rbp-E0h]
__int16 v7; // [rsp+2Ah] [rbp-D6h] BYREF
unsigned int v8; // [rsp+2Ch] [rbp-D4h]
long long v9; // [rsp+30h] [rbp-D0h] BYREF
_QWORD v10[2]; // [rsp+38h] [rbp-C8h] BYREF
unsigned long long v11; // [rsp+48h] [rbp-B8h]
__int16 v12; // [rsp+54h] [rbp-ACh] BYREF
unsigned __int16 v13; // [rsp+56h] [rbp-AAh]
long long v14; // [rsp+58h] [rbp-A8h] BYREF
_QWORD v15[2]; // [rsp+60h] [rbp-A0h] BYREF
unsigned long long v16; // [rsp+70h] [rbp-90h]
char v17; // [rsp+7Fh] [rbp-81h]
long long v18; // [rsp+80h] [rbp-80h]
unsigned __int16 v19; // [rsp+8Ah] [rbp-76h]
int uint32; // [rsp+8Ch] [rbp-74h] BYREF
unsigned __int16 j; // [rsp+90h] [rbp-70h]
unsigned __int16 v22; // [rsp+92h] [rbp-6Eh]
__int16 v23; // [rsp+A0h] [rbp-60h] BYREF
unsigned __int16 i; // [rsp+A2h] [rbp-5Eh]
unsigned __int16 uint16; // [rsp+A4h] [rbp-5Ch]
unsigned __int8 v26; // [rsp+A7h] [rbp-59h]
unsigned __int8 *v27; // [rsp+A8h] [rbp-58h]
unsigned __int16 v28; // [rsp+B0h] [rbp-50h] BYREF
unsigned __int16 v29; // [rsp+B2h] [rbp-4Eh]
_BYTE v30[24]; // [rsp+B8h] [rbp-48h] BYREF
_BYTE v31[24]; // [rsp+D0h] [rbp-30h] BYREF
_QWORD v32[3]; // [rsp+E8h] [rbp-18h] BYREF
v32[2] = a1;
v32[0] = a2;
v32[1] = a3;
evmone::`anonymous namespace'::EOFSectionHeaders::EOFSectionHeaders((evmone::_anonymous_namespace_::EOFSectionHeaders *)&v28);
v6 = std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>::begin(v32);
v27 = (unsigned __int8 *)(std::size<std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>>(&evmone::EOF_MAGIC)
+ v6
+ 1);
while ( *v27 )
{
v3 = v27++;
v26 = *v3;
if ( v26 == 2 )
{
uint16 = evmone::read_uint16_be<unsigned char const*>(v27);
v27 += 2;
for ( i = 0; i < (int)uint16; ++i )
{
v23 = evmone::read_uint16_be<unsigned char const*>(v27);
v27 += 2;
std::vector<unsigned short>::emplace_back<unsigned short const&>(v30, &v23);
}
}
else if ( v26 == 3 )
{
v22 = evmone::read_uint16_be<unsigned char const*>(v27);
v27 += 2;
for ( j = 0; j < (int)v22; ++j )
{
uint32 = evmone::read_uint32_be<unsigned char const*>(v27);
v27 += 4;
std::vector<unsigned int>::emplace_back<unsigned int const&>(v31, &uint32);
}
}
else
{
v19 = evmone::read_uint16_be<unsigned char const*>(v27);
v27 += 2;
if ( v26 == 1 )
{
v28 = v19;
}
else
{
if ( v26 != 255 )
__assert_fail(
"section_id == DATA_SECTION",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/l"
"ib/evmone/eof.cpp",
866LL,
"EOF1Header evmone::read_valid_eof1_header(bytes_view)");
v29 = v19;
}
}
}
v18 = evmone::`anonymous namespace'::eof_header_size(&v28);
v17 = 0;
evmone::EOF1Header::EOF1Header((evmone::EOF1Header *)a1);
*(_BYTE *)a1 = *(_BYTE *)std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>::operator[](
(long long)v32,
2LL);
*(_QWORD *)(a1 + 8) = v18;
std::vector<unsigned short>::operator=(a1 + 16, v30);
v16 = v28 + v18;
v15[1] = a1 + 16;
v15[0] = std::vector<unsigned short>::begin(a1 + 16);
v14 = std::vector<unsigned short>::end(a1 + 16);
while ( (__gnu_cxx::operator==<unsigned short *,std::vector<unsigned short>>(v15, &v14) & 1) == 0 )
{
v13 = *(_WORD *)__gnu_cxx::__normal_iterator<unsigned short *,std::vector<unsigned short>>::operator*(v15);
v5 = v16;
if ( v5 > (unsigned __int16)std::numeric_limits<unsigned short>::max() )
__assert_fail(
"code_offset <= std::numeric_limits<uint16_t>::max()",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/eof.cpp",
881LL,
"EOF1Header evmone::read_valid_eof1_header(bytes_view)");
v12 = v16;
std::vector<unsigned short>::emplace_back<unsigned short>(a1 + 40, &v12);
v16 += v13;
__gnu_cxx::__normal_iterator<unsigned short *,std::vector<unsigned short>>::operator++(v15);
}
*(_WORD *)(a1 + 64) = v29;
std::vector<unsigned int>::operator=(a1 + 72, v31);
v11 = v16;
v10[1] = a1 + 72;
v10[0] = std::vector<unsigned int>::begin(a1 + 72);
v9 = std::vector<unsigned int>::end(a1 + 72);
while ( (__gnu_cxx::operator==<unsigned int *,std::vector<unsigned int>>(v10, &v9) & 1) == 0 )
{
v8 = *(_DWORD *)__gnu_cxx::__normal_iterator<unsigned int *,std::vector<unsigned int>>::operator*(v10);
v7 = v11;
std::vector<unsigned int>::emplace_back<unsigned short>(a1 + 96, &v7);
v11 += v8;
__gnu_cxx::__normal_iterator<unsigned int *,std::vector<unsigned int>>::operator++(v10);
}
*(_DWORD *)(a1 + 68) = (unsigned __int16)v11;
v17 = 1;
evmone::`anonymous namespace'::EOFSectionHeaders::~EOFSectionHeaders((evmone::_anonymous_namespace_::EOFSectionHeaders *)&v28);
return a1;
}
| read_valid_eof1_header:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
MOV qword ptr [RBP + -0xf0],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xe8],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x10],RDX
LEA RDI,[RBP + -0x50]
CALL 0x00172590
LEA RDI,[RBP + -0x18]
CALL 0x00179860
MOV qword ptr [RBP + -0xe0],RAX
LEA RDI,[0x228a50]
CALL 0x001797b0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0xe0]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RBP + -0x58],RAX
LAB_00172152:
MOV RAX,qword ptr [RBP + -0x58]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001722ce
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x58],RCX
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x59],AL
MOVZX EAX,byte ptr [RBP + -0x59]
CMP EAX,0x2
JNZ 0x001721f8
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0016f960
MOV word ptr [RBP + -0x5c],AX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x2
MOV qword ptr [RBP + -0x58],RAX
MOV word ptr [RBP + -0x5e],0x0
LAB_0017219e:
MOVZX EAX,word ptr [RBP + -0x5e]
MOVZX ECX,word ptr [RBP + -0x5c]
CMP EAX,ECX
JGE 0x001721f3
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0016f960
MOV word ptr [RBP + -0x60],AX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x2
MOV qword ptr [RBP + -0x58],RAX
LEA RDI,[RBP + -0x48]
LAB_001721c7:
LEA RSI,[RBP + -0x60]
CALL 0x00179880
JMP 0x001721d2
LAB_001721d2:
JMP 0x001721d4
LAB_001721d4:
MOV AX,word ptr [RBP + -0x5e]
ADD AX,0x1
MOV word ptr [RBP + -0x5e],AX
JMP 0x0017219e
LAB_001721f3:
JMP 0x001722c9
LAB_001721f8:
MOVZX EAX,byte ptr [RBP + -0x59]
CMP EAX,0x3
JNZ 0x00172265
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0016f960
MOV word ptr [RBP + -0x6e],AX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x2
MOV qword ptr [RBP + -0x58],RAX
MOV word ptr [RBP + -0x70],0x0
LAB_00172220:
MOVZX EAX,word ptr [RBP + -0x70]
MOVZX ECX,word ptr [RBP + -0x6e]
CMP EAX,ECX
JGE 0x00172263
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00179900
MOV dword ptr [RBP + -0x74],EAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x4
MOV qword ptr [RBP + -0x58],RAX
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x74]
CALL 0x00179970
JMP 0x00172253
LAB_00172253:
JMP 0x00172255
LAB_00172255:
MOV AX,word ptr [RBP + -0x70]
ADD AX,0x1
MOV word ptr [RBP + -0x70],AX
JMP 0x00172220
LAB_00172263:
JMP 0x001722c7
LAB_00172265:
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0016f960
MOV word ptr [RBP + -0x76],AX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x2
MOV qword ptr [RBP + -0x58],RAX
MOVZX EAX,byte ptr [RBP + -0x59]
CMP EAX,0x1
JNZ 0x00172291
MOV AX,word ptr [RBP + -0x76]
MOV word ptr [RBP + -0x50],AX
JMP 0x001722c5
LAB_00172291:
MOVZX EAX,byte ptr [RBP + -0x59]
CMP EAX,0xff
JNZ 0x0017229e
JMP 0x001722bd
LAB_0017229e:
LEA RDI,[0x1e5bc0]
LEA RSI,[0x1e5bdb]
MOV EDX,0x362
LEA RCX,[0x1e5c59]
CALL 0x00123120
LAB_001722bd:
MOV AX,word ptr [RBP + -0x76]
MOV word ptr [RBP + -0x4e],AX
LAB_001722c5:
JMP 0x001722c7
LAB_001722c7:
JMP 0x001722c9
LAB_001722c9:
JMP 0x00172152
LAB_001722ce:
LEA RDI,[RBP + -0x50]
CALL 0x001725d0
MOV RDI,qword ptr [RBP + -0xf0]
MOV qword ptr [RBP + -0x80],RAX
MOV byte ptr [RBP + -0x81],0x0
CALL 0x001799f0
LEA RDI,[RBP + -0x18]
MOV ESI,0x2
CALL 0x001694e0
MOV RDI,qword ptr [RBP + -0xf0]
MOV AL,byte ptr [RAX]
MOV byte ptr [RDI],AL
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RDI + 0x8],RAX
LEA RSI,[RBP + -0x50]
ADD RSI,0x8
ADD RDI,0x10
CALL 0x00179a60
MOV RAX,qword ptr [RBP + -0xf0]
MOV RCX,qword ptr [RBP + -0x80]
MOVZX EDX,word ptr [RBP + -0x50]
ADD RCX,RDX
MOV qword ptr [RBP + -0x90],RCX
ADD RAX,0x10
MOV qword ptr [RBP + -0x98],RAX
MOV RDI,qword ptr [RBP + -0x98]
CALL 0x00179a90
MOV qword ptr [RBP + -0xa0],RAX
MOV RDI,qword ptr [RBP + -0x98]
CALL 0x00179ac0
MOV qword ptr [RBP + -0xa8],RAX
LAB_0017236a:
LEA RDI,[RBP + -0xa0]
LEA RSI,[RBP + -0xa8]
CALL 0x00179af0
XOR AL,0xff
TEST AL,0x1
JNZ 0x00172388
JMP 0x0017244e
LAB_00172388:
LEA RDI,[RBP + -0xa0]
CALL 0x00179b30
MOV AX,word ptr [RAX]
MOV word ptr [RBP + -0xaa],AX
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0xf8],RAX
CALL 0x00179b50
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xf8]
MOVZX ECX,CX
CMP RAX,RCX
JA 0x001723c5
JMP 0x001723e4
LAB_001723c5:
LEA RDI,[0x1e5c8f]
LEA RSI,[0x1e5bdb]
MOV EDX,0x371
LEA RCX,[0x1e5c59]
CALL 0x00123120
LAB_001723e4:
MOV RDI,qword ptr [RBP + -0xf0]
ADD RDI,0x28
MOV AX,word ptr [RBP + -0x90]
MOV word ptr [RBP + -0xac],AX
LAB_001723fd:
LEA RSI,[RBP + -0xac]
CALL 0x00179b60
JMP 0x0017240b
LAB_0017240b:
MOVZX EAX,word ptr [RBP + -0xaa]
ADD RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x90],RAX
LEA RDI,[RBP + -0xa0]
CALL 0x00179be0
JMP 0x0017236a
LAB_0017244e:
MOV RDI,qword ptr [RBP + -0xf0]
MOV AX,word ptr [RBP + -0x4e]
MOV word ptr [RDI + 0x40],AX
LEA RSI,[RBP + -0x50]
ADD RSI,0x20
ADD RDI,0x48
CALL 0x00179c00
MOV RAX,qword ptr [RBP + -0xf0]
MOV RCX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0xb8],RCX
ADD RAX,0x48
MOV qword ptr [RBP + -0xc0],RAX
MOV RDI,qword ptr [RBP + -0xc0]
CALL 0x00179c30
MOV qword ptr [RBP + -0xc8],RAX
MOV RDI,qword ptr [RBP + -0xc0]
CALL 0x00179c60
MOV qword ptr [RBP + -0xd0],RAX
LAB_001724b4:
LEA RDI,[RBP + -0xc8]
LEA RSI,[RBP + -0xd0]
CALL 0x00179c90
XOR AL,0xff
TEST AL,0x1
JNZ 0x001724cf
JMP 0x0017252c
LAB_001724cf:
LEA RDI,[RBP + -0xc8]
CALL 0x00179cd0
MOV RDI,qword ptr [RBP + -0xf0]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0xd4],EAX
ADD RDI,0x60
MOV AX,word ptr [RBP + -0xb8]
MOV word ptr [RBP + -0xd6],AX
LEA RSI,[RBP + -0xd6]
CALL 0x00179cf0
LAB_00172508:
JMP 0x0017250a
LAB_0017250a:
MOV EAX,dword ptr [RBP + -0xd4]
ADD RAX,qword ptr [RBP + -0xb8]
MOV qword ptr [RBP + -0xb8],RAX
LEA RDI,[RBP + -0xc8]
CALL 0x00179d70
JMP 0x001724b4
LAB_0017252c:
MOV RAX,qword ptr [RBP + -0xf0]
MOV RCX,qword ptr [RBP + -0xb8]
MOVZX ECX,CX
MOV dword ptr [RAX + 0x44],ECX
MOV byte ptr [RBP + -0x81],0x1
TEST byte ptr [RBP + -0x81],0x1
JNZ 0x0017255c
MOV RDI,qword ptr [RBP + -0xf0]
CALL 0x0013e150
LAB_0017255c:
LEA RDI,[RBP + -0x50]
CALL 0x00172660
MOV RAX,qword ptr [RBP + -0xe8]
ADD RSP,0x100
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00172550) */
/* evmone::read_valid_eof1_header(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned
char> >) */
EOF1Header *
evmone::read_valid_eof1_header(EOF1Header *param_1,int8 param_2,int8 param_3)
{
ulong uVar1;
ushort uVar2;
byte bVar3;
ushort uVar4;
long lVar5;
long lVar6;
EOF1Header *pEVar7;
ushort *puVar8;
uint *puVar9;
uchar *puVar10;
ushort local_de;
uint local_dc;
int8 local_d8;
int8 local_d0;
vector<unsigned_int,std::allocator<unsigned_int>> *local_c8;
ulong local_c0;
ushort local_b4;
ushort local_b2;
int8 local_b0;
int8 local_a8;
vector<unsigned_short,std::allocator<unsigned_short>> *local_a0;
ulong local_98;
int1 local_89;
long local_88;
ushort local_7e;
uint local_7c;
ushort local_78;
ushort local_76;
ushort local_68;
ushort local_66;
ushort local_64;
uchar local_61;
uchar *local_60;
ushort local_58;
ushort local_56;
vector<unsigned_short,std::allocator<unsigned_short>> local_50 [24];
vector<unsigned_int,std::allocator<unsigned_int>> local_38 [24];
int8 local_20;
int8 local_18;
EOF1Header *local_10;
local_20 = param_2;
local_18 = param_3;
local_10 = param_1;
(anonymous_namespace)::EOFSectionHeaders::EOFSectionHeaders((EOFSectionHeaders *)&local_58);
lVar5 = std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>::begin
((basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>> *)&local_20)
;
lVar6 = std::size<std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>>
((basic_string_view *)&EOF_MAGIC);
local_60 = (uchar *)(lVar5 + lVar6 + 1);
uVar4 = local_58;
uVar2 = local_56;
do {
while( true ) {
while( true ) {
local_56 = uVar2;
local_58 = uVar4;
if (*local_60 == '\0') {
local_88 = (anonymous_namespace)::eof_header_size((EOFSectionHeaders *)&local_58);
local_89 = 0;
EOF1Header::EOF1Header(param_1);
pEVar7 = (EOF1Header *)
std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>::
operator[]((basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>> *)
&local_20,2);
*param_1 = *pEVar7;
*(long *)(param_1 + 8) = local_88;
std::vector<unsigned_short,std::allocator<unsigned_short>>::operator=
((vector<unsigned_short,std::allocator<unsigned_short>> *)(param_1 + 0x10),
(vector *)local_50);
local_98 = local_88 + (ulong)local_58;
local_a0 = (vector<unsigned_short,std::allocator<unsigned_short>> *)(param_1 + 0x10);
local_a8 = std::vector<unsigned_short,std::allocator<unsigned_short>>::begin(local_a0);
local_b0 = std::vector<unsigned_short,std::allocator<unsigned_short>>::end(local_a0);
while( true ) {
bVar3 = _ZN9__gnu_cxxeqIPtSt6vectorItSaItEEEEbRKNS_17__normal_iteratorIT_T0_EESA_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_a8,&local_b0);
if (((bVar3 ^ 0xff) & 1) == 0) {
*(ushort *)(param_1 + 0x40) = local_56;
std::vector<unsigned_int,std::allocator<unsigned_int>>::operator=
((vector<unsigned_int,std::allocator<unsigned_int>> *)(param_1 + 0x48),
(vector *)local_38);
local_c0 = local_98;
local_c8 = (vector<unsigned_int,std::allocator<unsigned_int>> *)(param_1 + 0x48);
local_d0 = std::vector<unsigned_int,std::allocator<unsigned_int>>::begin(local_c8);
local_d8 = std::vector<unsigned_int,std::allocator<unsigned_int>>::end(local_c8);
while (bVar3 = _ZN9__gnu_cxxeqIPjSt6vectorIjSaIjEEEEbRKNS_17__normal_iteratorIT_T0_EESA_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_d0,&local_d8), ((bVar3 ^ 0xff) & 1) != 0) {
puVar9 = (uint *)__gnu_cxx::
__normal_iterator<unsigned_int*,std::vector<unsigned_int,std::allocator<unsigned_int>>>
::operator*((__normal_iterator<unsigned_int*,std::vector<unsigned_int,std::allocator<unsigned_int>>>
*)&local_d0);
local_dc = *puVar9;
local_de = (ushort)local_c0;
std::vector<unsigned_int,std::allocator<unsigned_int>>::emplace_back<unsigned_short>
((vector<unsigned_int,std::allocator<unsigned_int>> *)(param_1 + 0x60),
&local_de);
local_c0 = local_dc + local_c0;
__gnu_cxx::
__normal_iterator<unsigned_int*,std::vector<unsigned_int,std::allocator<unsigned_int>>>
::operator++((__normal_iterator<unsigned_int*,std::vector<unsigned_int,std::allocator<unsigned_int>>>
*)&local_d0);
}
*(uint *)(param_1 + 0x44) = (uint)local_c0 & 0xffff;
local_89 = 1;
(anonymous_namespace)::EOFSectionHeaders::~EOFSectionHeaders
((EOFSectionHeaders *)&local_58);
return param_1;
}
puVar8 = (ushort *)
__gnu_cxx::
__normal_iterator<unsigned_short*,std::vector<unsigned_short,std::allocator<unsigned_short>>>
::operator*((__normal_iterator<unsigned_short*,std::vector<unsigned_short,std::allocator<unsigned_short>>>
*)&local_a8);
uVar1 = local_98;
local_b2 = *puVar8;
uVar4 = std::numeric_limits<unsigned_short>::max();
if (uVar4 < uVar1) break;
local_b4 = (ushort)local_98;
/* try { // try from 001723fd to 00172507 has its CatchHandler @ 00172431 */
std::vector<unsigned_short,std::allocator<unsigned_short>>::emplace_back<unsigned_short>
((vector<unsigned_short,std::allocator<unsigned_short>> *)(param_1 + 0x28),
&local_b4);
local_98 = local_b2 + local_98;
__gnu_cxx::
__normal_iterator<unsigned_short*,std::vector<unsigned_short,std::allocator<unsigned_short>>>
::operator++((__normal_iterator<unsigned_short*,std::vector<unsigned_short,std::allocator<unsigned_short>>>
*)&local_a8);
}
/* WARNING: Subroutine does not return */
__assert_fail("code_offset <= std::numeric_limits<uint16_t>::max()",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/eof.cpp"
,0x371,"EOF1Header evmone::read_valid_eof1_header(bytes_view)");
}
puVar10 = local_60 + 1;
local_61 = *local_60;
local_60 = puVar10;
if (local_61 != '\x02') break;
local_64 = read_uint16_be<unsigned_char_const*>(puVar10);
local_60 = local_60 + 2;
for (local_66 = 0; uVar4 = local_58, uVar2 = local_56, local_66 < local_64;
local_66 = local_66 + 1) {
local_68 = read_uint16_be<unsigned_char_const*>(local_60);
local_60 = local_60 + 2;
/* try { // try from 001721c7 to 00172250 has its CatchHandler @ 001721e2 */
std::vector<unsigned_short,std::allocator<unsigned_short>>::
emplace_back<unsigned_short_const&>(local_50,&local_68);
}
}
if (local_61 != '\x03') break;
local_76 = read_uint16_be<unsigned_char_const*>(puVar10);
local_60 = local_60 + 2;
for (local_78 = 0; uVar4 = local_58, uVar2 = local_56, local_78 < local_76;
local_78 = local_78 + 1) {
local_7c = read_uint32_be<unsigned_char_const*>(local_60);
local_60 = local_60 + 4;
std::vector<unsigned_int,std::allocator<unsigned_int>>::emplace_back<unsigned_int_const&>
(local_38,&local_7c);
}
}
local_7e = read_uint16_be<unsigned_char_const*>(puVar10);
local_60 = local_60 + 2;
uVar4 = local_7e;
uVar2 = local_56;
} while ((local_61 == '\x01') || (uVar4 = local_58, uVar2 = local_7e, local_61 == 0xff));
/* WARNING: Subroutine does not return */
__assert_fail("section_id == DATA_SECTION",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/eof.cpp"
,0x362,"EOF1Header evmone::read_valid_eof1_header(bytes_view)");
}
| |
30,571 | ma_bitmap_reset_full_page_bits | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_bitmap_reset_full_page_bits(MARIA_HA *info,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page,
uint page_count)
{
ulonglong bitmap_page;
uint offset, bit_start, bit_count, tmp, byte_offset;
uchar *data;
DBUG_ENTER("_ma_bitmap_reset_full_page_bits");
DBUG_PRINT("enter", ("page: %lu page_count: %u", (ulong) page, page_count));
mysql_mutex_assert_owner(&info->s->bitmap.bitmap_lock);
bitmap_page= page - page % bitmap->pages_covered;
DBUG_ASSERT(page != bitmap_page);
if (bitmap_page != bitmap->page &&
_ma_change_bitmap_page(info, bitmap, bitmap_page))
DBUG_RETURN(1);
/* Find page number from start of bitmap */
offset= (uint) (page - bitmap->page - 1);
/* Clear bits from 'page * 3' -> '(page + page_count) * 3' */
bit_start= offset * 3;
bit_count= page_count * 3;
byte_offset= bit_start/8;
data= bitmap->map + byte_offset;
offset= bit_start & 7;
tmp= (255 << offset); /* Bits to keep */
if (bit_count + offset < 8)
{
/* Only clear bits between 'offset' and 'offset+bit_count-1' */
tmp^= (255 << (offset + bit_count));
}
*data&= ~tmp;
set_if_smaller(bitmap->full_head_size, byte_offset);
set_if_smaller(bitmap->full_tail_size, byte_offset);
if ((int) (bit_count-= (8 - offset)) > 0)
{
uint fill;
data++;
/*
-1 is here to avoid one 'if' statement and to let the following code
handle the last byte
*/
if ((fill= (bit_count - 1) / 8))
{
bzero(data, fill);
data+= fill;
}
bit_count-= fill * 8; /* Bits left to clear */
tmp= (1 << bit_count) - 1;
*data&= ~tmp;
}
set_if_smaller(info->s->state.first_bitmap_with_space, bitmap_page);
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
DBUG_RETURN(0);
} | O0 | c | ma_bitmap_reset_full_page_bits:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
jmp 0x43469
jmp 0x4346b
jmp 0x4346d
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
movq -0x60(%rbp), %rax
subq %rdx, %rax
movq %rax, -0x30(%rbp)
jmp 0x43493
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x434c5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x43190
movsbl %al, %eax
cmpl $0x0, %eax
je 0x434c5
jmp 0x434bc
movb $0x1, -0x1(%rbp)
jmp 0x43633
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq 0x10(%rcx), %rax
subq $0x1, %rax
movl %eax, -0x34(%rbp)
imull $0x3, -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
imull $0x3, -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x38(%rbp), %eax
shrl $0x3, %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x44(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl -0x38(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %ecx
movl $0xff, %eax
shll %cl, %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
addl -0x34(%rbp), %eax
cmpl $0x8, %eax
jae 0x43535
movl -0x34(%rbp), %ecx
addl -0x3c(%rbp), %ecx
movl $0xff, %eax
shll %cl, %eax
xorl -0x40(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %edx
xorl $-0x1, %edx
movq -0x50(%rbp), %rax
movzbl (%rax), %ecx
andl %edx, %ecx
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
cmpl -0x44(%rbp), %eax
jbe 0x4355c
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x28(%rax)
jmp 0x4355e
jmp 0x43560
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
cmpl -0x44(%rbp), %eax
jbe 0x43576
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2c(%rax)
jmp 0x43578
movl $0x8, %ecx
subl -0x34(%rbp), %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
jle 0x435f9
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movl -0x3c(%rbp), %eax
subl $0x1, %eax
shrl $0x3, %eax
movl %eax, -0x54(%rbp)
cmpl $0x0, %eax
je 0x435ca
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movl -0x54(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl -0x54(%rbp), %ecx
shll $0x3, %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %edx
xorl $-0x1, %edx
movq -0x50(%rbp), %rax
movzbl (%rax), %ecx
andl %edx, %ecx
movb %cl, (%rax)
jmp 0x435fb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xd0(%rax), %rax
cmpq -0x30(%rbp), %rax
jbe 0x43621
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0xd0(%rax)
jmp 0x43623
movq -0x18(%rbp), %rax
movb $0x1, 0x20(%rax)
jmp 0x4362d
jmp 0x4362f
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_bitmap_reset_full_page_bits:
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_24], ecx
jmp short $+2
loc_43469:
jmp short $+2
loc_4346B:
jmp short $+2
loc_4346D:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
xor edx, edx
div qword ptr [rcx+138h]
mov rax, [rbp+var_60]
sub rax, rdx
mov [rbp+var_30], rax
jmp short $+2
loc_43493:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
cmp rax, [rcx+10h]
jz short loc_434C5
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
call _ma_change_bitmap_page
movsx eax, al
cmp eax, 0
jz short loc_434C5
jmp short $+2
loc_434BC:
mov [rbp+var_1], 1
jmp loc_43633
loc_434C5:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, [rcx+10h]
sub rax, 1
mov [rbp+var_34], eax
imul eax, [rbp+var_34], 3
mov [rbp+var_38], eax
imul eax, [rbp+var_24], 3
mov [rbp+var_3C], eax
mov eax, [rbp+var_38]
shr eax, 3
mov [rbp+var_44], eax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov ecx, [rbp+var_44]
add rax, rcx
mov [rbp+var_50], rax
mov eax, [rbp+var_38]
and eax, 7
mov [rbp+var_34], eax
mov ecx, [rbp+var_34]
mov eax, 0FFh
shl eax, cl
mov [rbp+var_40], eax
mov eax, [rbp+var_3C]
add eax, [rbp+var_34]
cmp eax, 8
jnb short loc_43535
mov ecx, [rbp+var_34]
add ecx, [rbp+var_3C]
mov eax, 0FFh
shl eax, cl
xor eax, [rbp+var_40]
mov [rbp+var_40], eax
loc_43535:
mov edx, [rbp+var_40]
xor edx, 0FFFFFFFFh
mov rax, [rbp+var_50]
movzx ecx, byte ptr [rax]
and ecx, edx
mov [rax], cl
mov rax, [rbp+var_18]
mov eax, [rax+28h]
cmp eax, [rbp+var_44]
jbe short loc_4355C
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+28h], ecx
loc_4355C:
jmp short $+2
loc_4355E:
jmp short $+2
loc_43560:
mov rax, [rbp+var_18]
mov eax, [rax+2Ch]
cmp eax, [rbp+var_44]
jbe short loc_43576
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+2Ch], ecx
loc_43576:
jmp short $+2
loc_43578:
mov ecx, 8
sub ecx, [rbp+var_34]
mov eax, [rbp+var_3C]
sub eax, ecx
mov [rbp+var_3C], eax
cmp eax, 0
jle short loc_435F9
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
mov eax, [rbp+var_3C]
sub eax, 1
shr eax, 3
mov [rbp+var_54], eax
cmp eax, 0
jz short loc_435CA
mov rdi, [rbp+var_50]
mov eax, [rbp+var_54]
mov edx, eax
xor esi, esi
call _memset
mov ecx, [rbp+var_54]
mov rax, [rbp+var_50]
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
loc_435CA:
mov ecx, [rbp+var_54]
shl ecx, 3
mov eax, [rbp+var_3C]
sub eax, ecx
mov [rbp+var_3C], eax
mov ecx, [rbp+var_3C]
mov eax, 1
shl eax, cl
sub eax, 1
mov [rbp+var_40], eax
mov edx, [rbp+var_40]
xor edx, 0FFFFFFFFh
mov rax, [rbp+var_50]
movzx ecx, byte ptr [rax]
and ecx, edx
mov [rax], cl
loc_435F9:
jmp short $+2
loc_435FB:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+0D0h]
cmp rax, [rbp+var_30]
jbe short loc_43621
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+0D0h], rcx
loc_43621:
jmp short $+2
loc_43623:
mov rax, [rbp+var_18]
mov byte ptr [rax+20h], 1
jmp short $+2
loc_4362D:
jmp short $+2
loc_4362F:
mov [rbp+var_1], 0
loc_43633:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| char ma_bitmap_reset_full_page_bits(long long *a1, long long a2, unsigned long long a3, int a4)
{
unsigned int v5; // [rsp+Ch] [rbp-54h]
_BYTE *v6; // [rsp+10h] [rbp-50h]
_BYTE *v7; // [rsp+10h] [rbp-50h]
unsigned int v8; // [rsp+1Ch] [rbp-44h]
int v9; // [rsp+20h] [rbp-40h]
int v10; // [rsp+24h] [rbp-3Ch]
int v11; // [rsp+24h] [rbp-3Ch]
int v12; // [rsp+2Ch] [rbp-34h]
int v13; // [rsp+2Ch] [rbp-34h]
unsigned long long v14; // [rsp+30h] [rbp-30h]
int v16; // [rsp+40h] [rbp-20h]
v16 = a3;
v14 = a3 - a3 % *(_QWORD *)(a2 + 312);
if ( v14 != *(_QWORD *)(a2 + 16) && ma_change_bitmap_page(a1, a2, v14) )
return 1;
v12 = v16 - *(_DWORD *)(a2 + 16) - 1;
v10 = 3 * a4;
v8 = (unsigned int)(3 * v12) >> 3;
v6 = (_BYTE *)(v8 + *(_QWORD *)(a2 + 8));
v13 = (3 * (_BYTE)v12) & 7;
v9 = 255 << v13;
if ( (unsigned int)(v13 + 3 * a4) < 8 )
v9 ^= 255 << (v10 + v13);
*v6 &= ~(_BYTE)v9;
if ( *(_DWORD *)(a2 + 40) > v8 )
*(_DWORD *)(a2 + 40) = v8;
if ( *(_DWORD *)(a2 + 44) > v8 )
*(_DWORD *)(a2 + 44) = v8;
v11 = v10 - (8 - v13);
if ( v11 > 0 )
{
v7 = v6 + 1;
v5 = (unsigned int)(v11 - 1) >> 3;
if ( v5 )
{
memset(v7, 0LL, v5);
v7 += v5;
}
*v7 &= ~((1 << (v11 - 8 * v5)) - 1);
}
if ( *(_QWORD *)(*a1 + 208) > v14 )
*(_QWORD *)(*a1 + 208) = v14;
*(_BYTE *)(a2 + 32) = 1;
return 0;
}
| _ma_bitmap_reset_full_page_bits:
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 dword ptr [RBP + -0x24],ECX
JMP 0x00143469
LAB_00143469:
JMP 0x0014346b
LAB_0014346b:
JMP 0x0014346d
LAB_0014346d:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
MOV RAX,qword ptr [RBP + -0x60]
SUB RAX,RDX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00143493
LAB_00143493:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x001434c5
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00143190
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001434c5
JMP 0x001434bc
LAB_001434bc:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00143633
LAB_001434c5:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RCX + 0x10]
SUB RAX,0x1
MOV dword ptr [RBP + -0x34],EAX
IMUL EAX,dword ptr [RBP + -0x34],0x3
MOV dword ptr [RBP + -0x38],EAX
IMUL EAX,dword ptr [RBP + -0x24],0x3
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x38]
SHR EAX,0x3
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x38]
AND EAX,0x7
MOV dword ptr [RBP + -0x34],EAX
MOV ECX,dword ptr [RBP + -0x34]
MOV EAX,0xff
SHL EAX,CL
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,dword ptr [RBP + -0x34]
CMP EAX,0x8
JNC 0x00143535
MOV ECX,dword ptr [RBP + -0x34]
ADD ECX,dword ptr [RBP + -0x3c]
MOV EAX,0xff
SHL EAX,CL
XOR EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x40],EAX
LAB_00143535:
MOV EDX,dword ptr [RBP + -0x40]
XOR EDX,0xffffffff
MOV RAX,qword ptr [RBP + -0x50]
MOVZX ECX,byte ptr [RAX]
AND ECX,EDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x0014355c
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x28],ECX
LAB_0014355c:
JMP 0x0014355e
LAB_0014355e:
JMP 0x00143560
LAB_00143560:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x2c]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x00143576
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2c],ECX
LAB_00143576:
JMP 0x00143578
LAB_00143578:
MOV ECX,0x8
SUB ECX,dword ptr [RBP + -0x34]
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JLE 0x001435f9
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x1
SHR EAX,0x3
MOV dword ptr [RBP + -0x54],EAX
CMP EAX,0x0
JZ 0x001435ca
MOV RDI,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x54]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV ECX,dword ptr [RBP + -0x54]
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_001435ca:
MOV ECX,dword ptr [RBP + -0x54]
SHL ECX,0x3
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
MOV ECX,dword ptr [RBP + -0x3c]
MOV EAX,0x1
SHL EAX,CL
SUB EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
MOV EDX,dword ptr [RBP + -0x40]
XOR EDX,0xffffffff
MOV RAX,qword ptr [RBP + -0x50]
MOVZX ECX,byte ptr [RAX]
AND ECX,EDX
MOV byte ptr [RAX],CL
LAB_001435f9:
JMP 0x001435fb
LAB_001435fb:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xd0]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00143621
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0xd0],RCX
LAB_00143621:
JMP 0x00143623
LAB_00143623:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x20],0x1
JMP 0x0014362d
LAB_0014362d:
JMP 0x0014362f
LAB_0014362f:
MOV byte ptr [RBP + -0x1],0x0
LAB_00143633:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int1 _ma_bitmap_reset_full_page_bits(long *param_1,long param_2,ulong param_3,int param_4)
{
char cVar1;
uint uVar2;
uint uVar3;
ulong uVar4;
byte *local_58;
byte local_48;
uVar4 = param_3 - param_3 % *(ulong *)(param_2 + 0x138);
if ((uVar4 != *(ulong *)(param_2 + 0x10)) &&
(cVar1 = _ma_change_bitmap_page(param_1,param_2,uVar4), cVar1 != '\0')) {
return 1;
}
uVar2 = (((int)param_3 - (int)*(int8 *)(param_2 + 0x10)) + -1) * 3;
param_4 = param_4 * 3;
uVar3 = uVar2 >> 3;
local_58 = (byte *)(*(long *)(param_2 + 8) + (ulong)uVar3);
uVar2 = uVar2 & 7;
local_48 = (byte)(0xff << (sbyte)uVar2);
if (param_4 + uVar2 < 8) {
local_48 = (byte)(0xff << ((sbyte)uVar2 + (char)param_4 & 0x1fU)) ^ local_48;
}
*local_58 = *local_58 & (local_48 ^ 0xff);
if (uVar3 < *(uint *)(param_2 + 0x28)) {
*(uint *)(param_2 + 0x28) = uVar3;
}
if (uVar3 < *(uint *)(param_2 + 0x2c)) {
*(uint *)(param_2 + 0x2c) = uVar3;
}
param_4 = param_4 - (8 - uVar2);
if (0 < param_4) {
local_58 = local_58 + 1;
uVar3 = param_4 - 1U >> 3;
if (uVar3 != 0) {
memset(local_58,0,(ulong)uVar3);
local_58 = local_58 + uVar3;
}
*local_58 = *local_58 & ((char)(1 << ((char)param_4 + (char)uVar3 * -8 & 0x1fU)) - 1U ^ 0xff);
}
if (uVar4 < *(ulong *)(*param_1 + 0xd0)) {
*(ulong *)(*param_1 + 0xd0) = uVar4;
}
*(int1 *)(param_2 + 0x20) = 1;
return 0;
}
| |
30,572 | minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value>>) | monkey531[P]llama/common/minja.hpp | static Value array(const std::vector<Value> values = {}) {
auto array = std::make_shared<ArrayType>();
for (const auto& item : values) {
array->push_back(item);
}
return Value(array);
} | O3 | cpp | minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value>>):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r13
movq %rdi, %rbx
movl $0x28, %edi
callq 0x1b8b0
movq %rax, %r14
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0x9bac7(%rip), %rax # 0x12c488
addq $0x10, %rax
movq %rax, (%r14)
leaq 0x10(%r14), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq $0x0, 0x20(%r14)
movq %r14, 0x8(%rsp)
movq %r15, (%rsp)
movq (%r13), %r12
movq 0x8(%r13), %r13
cmpq %r13, %r12
je 0x90a03
movq %r15, %rdi
movq %r12, %rsi
callq 0x90b34
addq $0x50, %r12
jmp 0x909ed
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x90b60
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x90a1f
callq 0x701e6
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x701e6
movq %rbx, %rdi
callq 0x1c030
nop
| _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r13, rsi
mov rbx, rdi
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rax, 100000001h
mov [r14+8], rax
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceISt6vectorIN5minja5ValueESaIS2_EESaIS4_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<std::vector<minja::Value>,std::allocator<std::vector<minja::Value>>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [r14], rax
lea r15, [r14+10h]
xorps xmm0, xmm0
movups xmmword ptr [r14+10h], xmm0
mov qword ptr [r14+20h], 0
mov [rsp+38h+var_30], r14
mov [rsp+38h+var_38], r15
mov r12, [r13+0]
mov r13, [r13+8]
loc_909ED:
cmp r12, r13
jz short loc_90A03
mov rdi, r15
mov rsi, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE9push_backERKS1_; std::vector<minja::Value>::push_back(minja::Value const&)
add r12, 50h ; 'P'
jmp short loc_909ED
loc_90A03:
mov r14, rsp
mov rdi, rbx
mov rsi, r14
call _ZN5minja5ValueC2ERKSt10shared_ptrISt6vectorIS0_SaIS0_EEE; minja::Value::Value(std::shared_ptr<std::vector<minja::Value>> const&)
mov rdi, [r14+8]
test rdi, rdi
jz short loc_90A1F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_90A1F:
mov rax, rbx
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, r14
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, rbx
call __Unwind_Resume
| long long minja::Value::array(long long a1, long long *a2)
{
long long v2; // r14
long long v3; // r12
long long v4; // r13
long long v6; // [rsp+0h] [rbp-38h] BYREF
volatile signed __int32 *v7; // [rsp+8h] [rbp-30h]
v2 = operator new(0x28uLL);
*(_QWORD *)(v2 + 8) = 0x100000001LL;
*(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<std::vector<minja::Value>,std::allocator<std::vector<minja::Value>>,(__gnu_cxx::_Lock_policy)2>
+ 2;
*(_OWORD *)(v2 + 16) = 0LL;
*(_QWORD *)(v2 + 32) = 0LL;
v7 = (volatile signed __int32 *)v2;
v6 = v2 + 16;
v3 = *a2;
v4 = a2[1];
while ( v3 != v4 )
{
std::vector<minja::Value>::push_back(v2 + 16, v3);
v3 += 80LL;
}
minja::Value::Value(a1, &v6);
if ( v7 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7);
return a1;
}
| array:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R13,RSI
MOV RBX,RDI
MOV EDI,0x28
CALL 0x0011b8b0
MOV R14,RAX
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x22c488]
ADD RAX,0x10
MOV qword ptr [R14],RAX
LEA R15,[R14 + 0x10]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x10],XMM0
MOV qword ptr [R14 + 0x20],0x0
MOV qword ptr [RSP + 0x8],R14
MOV qword ptr [RSP],R15
MOV R12,qword ptr [R13]
MOV R13,qword ptr [R13 + 0x8]
LAB_001909ed:
CMP R12,R13
JZ 0x00190a03
LAB_001909f2:
MOV RDI,R15
MOV RSI,R12
CALL 0x00190b34
LAB_001909fd:
ADD R12,0x50
JMP 0x001909ed
LAB_00190a03:
MOV R14,RSP
MOV RDI,RBX
MOV RSI,R14
CALL 0x00190b60
MOV RDI,qword ptr [R14 + 0x8]
TEST RDI,RDI
JZ 0x00190a1f
CALL 0x001701e6
LAB_00190a1f:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value> >) */
Value * __thiscall minja::Value::array(Value *this,int8 *param_2)
{
vector<minja::Value,std::allocator<minja::Value>> *this_00;
Value *pVVar1;
Value *pVVar2;
vector<minja::Value,std::allocator<minja::Value>> *local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
local_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)operator_new(0x28);
*(int8 *)(local_30 + 8) = 0x100000001;
*(int ***)local_30 = &PTR___Sp_counted_ptr_inplace_0022c498;
this_00 = (vector<minja::Value,std::allocator<minja::Value>> *)(local_30 + 0x10);
*(int8 *)(local_30 + 0x10) = 0;
*(int8 *)(local_30 + 0x18) = 0;
*(int8 *)(local_30 + 0x20) = 0;
pVVar1 = (Value *)param_2[1];
local_38 = this_00;
for (pVVar2 = (Value *)*param_2; pVVar2 != pVVar1; pVVar2 = pVVar2 + 0x50) {
/* try { // try from 001909f2 to 001909fc has its CatchHandler @ 00190a30 */
std::vector<minja::Value,std::allocator<minja::Value>>::push_back(this_00,pVVar2);
}
Value(this,(shared_ptr *)&local_38);
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
return this;
}
| |
30,573 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>() const | monkey531[P]llama/common/./minja.hpp | inline json Value::get<json>() const {
if (is_primitive()) return primitive_;
if (is_null()) return json();
if (array_) {
std::vector<json> res;
for (const auto& item : *array_) {
res.push_back(item.get<json>());
}
return res;
}
if (object_) {
json res = json::object();
for (const auto& [key, value] : *object_) {
if (key.is_string()) {
res[key.get<std::string>()] = value.get<json>();
} else if (key.is_primitive()) {
res[key.dump()] = value.get<json>();
} else {
throw std::runtime_error("Invalid key type for conversion to JSON: " + key.dump());
}
}
if (is_callable()) {
res["__callable__"] = true;
}
return res;
}
throw std::runtime_error("get<json> not defined for this value type: " + dump());
} | 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> minja::Value::get<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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rax
movq 0x20(%rsi), %rcx
movq %rax, %rsi
orq %rcx, %rsi
movq 0x30(%r14), %rdx
orq %rdx, %rsi
jne 0x75c18
addq $0x40, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2b1f8
jmp 0x75e6e
testq %rdx, %rdx
sete %dl
movq %rax, %rsi
orq %rcx, %rsi
sete %sil
cmpb $0x0, 0x40(%r14)
sete %dil
andb %sil, %dil
andb %dl, %dil
cmpb $0x1, %dil
jne 0x75c67
movb $0x0, (%rbx)
movq $0x0, 0x8(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x3d970
movq %rbx, %rdi
movl $0x1, %esi
callq 0x3d970
jmp 0x75e6e
testq %rax, %rax
je 0x75cd9
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq (%rax), %r14
movq 0x8(%rax), %r13
cmpq %r13, %r14
je 0x75cc1
leaq 0x20(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x75bd6
movq %r12, %rdi
movq %r15, %rsi
callq 0x3f08e
movq %r15, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r15, %rdi
callq 0x4a5c0
addq $0x50, %r14
cmpq %r13, %r14
jne 0x75c90
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x76830
movq %rsp, %rdi
callq 0x3efba
jmp 0x75e6e
testq %rcx, %rcx
je 0x75ee9
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x2afce
movq 0x20(%r14), %rax
movq (%rax), %r15
movq 0x8(%rax), %r13
cmpq %r13, %r15
je 0x75e10
leaq 0xa8(%rsp), %rbp
leaq 0x50(%rsp), %r12
leaq 0x10(%r15), %rsi
movzbl (%r15), %eax
testl %eax, %eax
je 0x75d8e
cmpl $0x4, %eax
je 0x75d8e
cmpl $0x3, %eax
jne 0x75d84
leaq 0x40(%rsp), %rdi
callq 0x75bd6
leaq 0x88(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3f9aa
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6fb22
movq %rax, %rdi
leaq 0x40(%rsp), %r12
movq %r12, %rsi
callq 0x46ee0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rcx
movq %rcx, %rax
cmpq %rcx, %rdi
jne 0x75ddc
leaq 0x40(%rsp), %r12
jmp 0x75dec
addb $-0x5, %al
cmpb $0x3, %al
ja 0x75e83
movq %rbp, %rdi
callq 0x75bd6
movq %r12, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2bc5e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6fb22
movq %rax, %rdi
movq %rbp, %rsi
callq 0x46ee0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rcx
movq %rcx, %rax
movq %rbp, %r12
cmpq %rcx, %rdi
je 0x75de9
movq (%rax), %rsi
incq %rsi
callq 0x186a0
jmp 0x75dec
movq %rbp, %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r12, %rdi
callq 0x4a5c0
addq $0x60, %r15
cmpq %r13, %r15
leaq 0x50(%rsp), %r12
jne 0x75d17
cmpq $0x0, 0x30(%r14)
je 0x75e6e
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %r14
movaps %xmm0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x3fab4
movq %r14, %rdi
movl $0x1, %esi
callq 0x3d970
leaq 0x472bf(%rip), %rsi # 0xbd103
movq %rbx, %rdi
callq 0x69088
leaq 0x70(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x46ee0
movq %r14, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r14, %rdi
callq 0x4a5c0
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x18360
movq %rax, %r12
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2bc5e
leaq 0x47225(%rip), %rsi # 0xbd0d9
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x30c3b
movb $0x1, %bpl
movq %rsp, %rsi
movq %r12, %rdi
callq 0x18a80
xorl %ebp, %ebp
movq 0x7a118(%rip), %rsi # 0xefff0
movq 0x7a0a1(%rip), %rdx # 0xeff80
movq %r12, %rdi
callq 0x18b30
jmp 0x75f44
movl $0x10, %edi
callq 0x18360
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x3dcdc
leaq 0x471ff(%rip), %rsi # 0xbd110
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x30c3b
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x18a80
xorl %ebp, %ebp
movq 0x7a0bb(%rip), %rsi # 0xefff0
movq 0x7a044(%rip), %rdx # 0xeff80
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x75f62
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x75f7d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186a0
testb %bpl, %bpl
jne 0x75faa
jmp 0x760eb
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x75faa
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x75faa
movq %rax, %r14
movq %rbx, %rdi
callq 0x18500
jmp 0x760eb
movq %rax, %r14
leaq 0x70(%rsp), %r15
jmp 0x76099
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x75fe2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x75ffd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186a0
testb %bpl, %bpl
jne 0x7602f
jmp 0x760b0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7602f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x7602f
jmp 0x760c4
movq %rax, %r14
movq %r12, %rdi
callq 0x18500
jmp 0x760b0
movq %rax, %r14
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x76066
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x76066
movq %rax, %r14
leaq 0x40(%rsp), %r15
jmp 0x76099
movq %rax, %r14
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x76091
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x76091
movq %rax, %r14
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r15, %rdi
callq 0x4a5c0
jmp 0x760b0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3d970
movq %rbx, %rdi
callq 0x4a5c0
jmp 0x760eb
movq %rax, %r14
jmp 0x760e3
movq %rax, %r14
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3d970
movq %rbx, %rdi
callq 0x4a5c0
movq %rsp, %rdi
callq 0x3efba
movq %r14, %rdi
callq 0x18b90
| _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+10h]
mov rcx, [rsi+20h]
mov rsi, rax
or rsi, rcx
mov rdx, [r14+30h]
or rsi, rdx
jnz short loc_75C18
add r14, 40h ; '@'
mov rdi, rbx
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&)
jmp loc_75E6E
loc_75C18:
test rdx, rdx
setz dl
mov rsi, rax
or rsi, rcx
setz sil
cmp byte ptr [r14+40h], 0
setz dil
and dil, sil
and dil, dl
cmp dil, 1
jnz short loc_75C67
mov byte ptr [rbx], 0
mov qword ptr [rbx+8], 0
mov rdi, rbx
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)
mov rdi, rbx
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)
jmp loc_75E6E
loc_75C67:
test rax, rax
jz short loc_75CD9
xorps xmm0, xmm0
movaps [rsp+0E8h+var_E8], xmm0
mov [rsp+0E8h+var_D8], 0
mov r14, [rax]
mov r13, [rax+8]
cmp r14, r13
jz short loc_75CC1
lea r15, [rsp+0E8h+var_C8]
mov r12, rsp
loc_75C90:
mov rdi, r15
mov rsi, r14
call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(void)
mov rdi, r12
mov rsi, r15
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<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>>::emplace_back<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> &&)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add r14, 50h ; 'P'
cmp r14, r13
jnz short loc_75C90
loc_75CC1:
mov rsi, rsp
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS3_ISD_SaISD_EESG_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_
mov rdi, rsp
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<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>>::~vector()
jmp loc_75E6E
loc_75CD9:
test rcx, rcx
jz loc_75EE9
mov rdi, rbx
xor esi, esi
xor edx, edx
xor ecx, ecx
mov r8d, 1
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; 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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)
mov rax, [r14+20h]
mov r15, [rax]
mov r13, [rax+8]
cmp r15, r13
jz loc_75E10
lea rbp, [rsp+0E8h+var_40]
lea r12, [rsp+0E8h+var_98]
loc_75D17:
lea rsi, [r15+10h]
movzx eax, byte ptr [r15]
test eax, eax
jz short loc_75D8E
cmp eax, 4
jz short loc_75D8E
cmp eax, 3
jnz short loc_75D84
lea rdi, [rsp+0E8h+var_A8]
call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(void)
lea r12, [rsp+0E8h+var_60]
mov rdi, r12
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov rdi, rbx
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_; 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>::operator[](std::string)
mov rdi, rax
lea r12, [rsp+0E8h+var_A8]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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>::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>)
mov rdi, [rsp+0E8h+var_60]
lea rcx, [rsp+0E8h+var_50]
mov rax, rcx
cmp rdi, rcx
jnz short loc_75DDC
lea r12, [rsp+0E8h+var_A8]
jmp short loc_75DEC
loc_75D84:
add al, 0FBh
cmp al, 3
ja loc_75E83
loc_75D8E:
mov rdi, rbp
call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(void)
mov rdi, r12
mov rsi, r15
mov edx, 0FFFFFFFFh
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; 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>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov rdi, rbx
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_; 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>::operator[](std::string)
mov rdi, rax
mov rsi, rbp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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>::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>)
mov rdi, [rsp+0E8h+var_98]; void *
lea rcx, [rsp+0E8h+var_88]
mov rax, rcx
mov r12, rbp
cmp rdi, rcx
jz short loc_75DE9
loc_75DDC:
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_75DEC
loc_75DE9:
mov r12, rbp
loc_75DEC:
mov rdi, r12
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add r15, 60h ; '`'
cmp r15, r13
lea r12, [rsp+0E8h+var_98]
jnz loc_75D17
loc_75E10:
cmp qword ptr [r14+30h], 0
jz short loc_75E6E
xorps xmm0, xmm0
lea r14, [rsp+0E8h+var_78]
movaps xmmword ptr [r14], xmm0
mov rdi, r14
mov esi, 1
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE4EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_9boolean_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::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>::boolean_t)
mov rdi, r14
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)
lea rsi, aCallable; "__callable__"
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERSD_PT_; 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>::operator[]<char const>(char const *)
lea r14, [rsp+0E8h+var_78]
mov rdi, rax
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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>::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>)
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_75E6E:
mov rax, rbx
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_75E83:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r12, rax
lea rdi, [rsp+0E8h+var_C8]
mov rsi, r15
mov edx, 0FFFFFFFFh
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; 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>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
lea rsi, aInvalidKeyType; "Invalid key type for conversion to JSON"...
mov rdi, rsp
lea rdx, [rsp+0E8h+var_C8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
mov rdi, r12
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, r12; void *
call ___cxa_throw
jmp short loc_75F44
loc_75EE9:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+0E8h+var_C8]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetJsonNotDefi; "get<json> not defined for this value ty"...
mov rdi, rsp
lea rdx, [rsp+0E8h+var_C8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_75F44:
mov r14, rax
lea rax, [rsp+0E8h+var_D8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_75F62
mov rsi, [rsp+0E8h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_75F62:
lea rax, [rsp+0E8h+var_B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_75F7D
mov rsi, [rsp+0E8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_75F7D:
test bpl, bpl
jnz short loc_75FAA
jmp loc_760EB
mov r14, rax
lea rax, [rsp+0E8h+var_B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_75FAA
mov rsi, [rsp+0E8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_75FAA
mov r14, rax
loc_75FAA:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp loc_760EB
mov r14, rax
lea r15, [rsp+0E8h+var_78]
jmp loc_76099
mov r14, rax
lea rax, [rsp+0E8h+var_D8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_75FE2
mov rsi, [rsp+0E8h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_75FE2:
lea rax, [rsp+0E8h+var_B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_75FFD
mov rsi, [rsp+0E8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_75FFD:
test bpl, bpl
jnz short loc_7602F
jmp loc_760B0
mov r14, rax
lea rax, [rsp+0E8h+var_B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7602F
mov rsi, [rsp+0E8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_7602F
jmp loc_760C4
mov r14, rax
loc_7602F:
mov rdi, r12; void *
call ___cxa_free_exception
jmp short loc_760B0
mov r14, rax
mov rdi, [rsp+0E8h+var_60]; void *
lea rax, [rsp+0E8h+var_50]
cmp rdi, rax
jz short loc_76066
mov rsi, [rsp+0E8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_76066
mov r14, rax
loc_76066:
lea r15, [rsp+0E8h+var_A8]
jmp short loc_76099
mov r14, rax
mov rdi, [rsp+0E8h+var_98]; void *
lea rax, [rsp+0E8h+var_88]
cmp rdi, rax
jz short loc_76091
mov rsi, [rsp+0E8h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_76091
mov r14, rax
loc_76091:
lea r15, [rsp+0E8h+var_40]
loc_76099:
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_760B0
mov r14, rax
loc_760B0:
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_760EB
loc_760C4:
mov r14, rax
jmp short loc_760E3
mov r14, rax
lea rbx, [rsp+0E8h+var_C8]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_760E3:
mov rdi, rsp
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<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>>::~vector()
loc_760EB:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1,
long long a2)
{
unsigned long long v4; // rax
long long v5; // rcx
long long v6; // rdx
long long v7; // r14
long long v8; // r13
long long v9; // rax
_BYTE *v10; // r15
_BYTE *v11; // r13
_BYTE *v12; // rsi
int v13; // eax
long long v14; // rax
char *v15; // r12
void *v16; // rdi
_QWORD *v17; // rax
long long v18; // rax
long long v19; // rax
void *v21; // r12
void *exception; // rbx
__int128 v23; // [rsp+0h] [rbp-E8h] BYREF
long long v24; // [rsp+10h] [rbp-D8h]
void **v25[2]; // [rsp+20h] [rbp-C8h] BYREF
_BYTE v26[16]; // [rsp+40h] [rbp-A8h] BYREF
void *v27[2]; // [rsp+50h] [rbp-98h] BYREF
_QWORD v28[2]; // [rsp+60h] [rbp-88h] BYREF
__int128 v29; // [rsp+70h] [rbp-78h] BYREF
void *v30[2]; // [rsp+88h] [rbp-60h] BYREF
_QWORD v31[2]; // [rsp+98h] [rbp-50h] BYREF
_BYTE v32[64]; // [rsp+A8h] [rbp-40h] BYREF
v4 = *(_QWORD *)(a2 + 16);
v5 = *(_QWORD *)(a2 + 32);
v6 = *(_QWORD *)(a2 + 48);
if ( !(v6 | v5 | v4) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
a1,
a2 + 64);
return a1;
}
if ( v6 == 0 && (v5 | v4) == 0 && *(_BYTE *)(a2 + 64) == 0 )
{
*(_BYTE *)a1 = 0;
*(_QWORD *)(a1 + 8) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
return a1;
}
if ( v4 )
{
v23 = 0LL;
v24 = 0LL;
v7 = *(_QWORD *)v4;
v8 = *(_QWORD *)(v4 + 8);
if ( *(_QWORD *)v4 != v8 )
{
do
{
minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
v25,
v7);
std::vector<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>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(long long)&v23,
(long long)v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v25);
v7 += 80LL;
}
while ( v7 != v8 );
}
((void ( *)(long long, __int128 *))ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS3_ISD_SaISD_EESG_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_)(
a1,
&v23);
std::vector<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>>::~vector((long long)&v23);
return a1;
}
if ( !v5 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)&v23, (long long)"get<json> not defined for this value type: ", (long long)v25);
std::runtime_error::runtime_error(exception, &v23);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
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>::basic_json(
a1,
0LL,
0LL,
0LL,
1LL);
v9 = *(_QWORD *)(a2 + 32);
v10 = *(_BYTE **)v9;
v11 = *(_BYTE **)(v9 + 8);
if ( *(_BYTE **)v9 != v11 )
{
while ( 1 )
{
v12 = v10 + 16;
v13 = (unsigned __int8)*v10;
if ( !*v10 || v13 == 4 )
goto LABEL_17;
if ( v13 != 3 )
break;
minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
v26,
v12);
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v30,
(long long)v10);
v14 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
a1,
(long long *)v30);
v15 = v26;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
v14,
(long long)v26);
v16 = v30[0];
v17 = v31;
if ( v30[0] != v31 )
goto LABEL_18;
v15 = v26;
LABEL_20:
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(v15);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)v15);
v10 += 96;
if ( v10 == v11 )
goto LABEL_21;
}
if ( (unsigned __int8)(v13 - 5) > 3u )
{
v21 = __cxa_allocate_exception(0x10uLL);
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>::dump(
(long long)v25,
(long long)v10,
-1,
32,
0,
0);
std::operator+<char>((long long)&v23, (long long)"Invalid key type for conversion to JSON: ", (long long)v25);
std::runtime_error::runtime_error(v21, &v23);
__cxa_throw(
v21,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
LABEL_17:
minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
v32,
v12);
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>::dump(
(long long)v27,
(long long)v10,
-1,
32,
0,
0);
v18 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
a1,
(long long *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
v18,
(long long)v32);
v16 = v27[0];
v17 = v28;
v15 = v32;
if ( v27[0] == v28 )
{
v15 = v32;
goto LABEL_20;
}
LABEL_18:
operator delete(v16, *v17 + 1LL);
goto LABEL_20;
}
LABEL_21:
if ( *(_QWORD *)(a2 + 48) )
{
v29 = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::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 *)&v29,
1u);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v29);
v19 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
a1,
(long long)"__callable__");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
v19,
(long long)&v29);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v29);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)&v29);
}
return a1;
}
| get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x10]
MOV RCX,qword ptr [RSI + 0x20]
MOV RSI,RAX
OR RSI,RCX
MOV RDX,qword ptr [R14 + 0x30]
OR RSI,RDX
JNZ 0x00175c18
ADD R14,0x40
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012b1f8
JMP 0x00175e6e
LAB_00175c18:
TEST RDX,RDX
SETZ DL
MOV RSI,RAX
OR RSI,RCX
SETZ SIL
CMP byte ptr [R14 + 0x40],0x0
SETZ DIL
AND DIL,SIL
AND DIL,DL
CMP DIL,0x1
JNZ 0x00175c67
MOV byte ptr [RBX],0x0
MOV qword ptr [RBX + 0x8],0x0
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0013d970
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0013d970
JMP 0x00175e6e
LAB_00175c67:
TEST RAX,RAX
JZ 0x00175cd9
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
MOV R14,qword ptr [RAX]
MOV R13,qword ptr [RAX + 0x8]
CMP R14,R13
JZ 0x00175cc1
LEA R15,[RSP + 0x20]
MOV R12,RSP
LAB_00175c90:
MOV RDI,R15
MOV RSI,R14
CALL 0x00175bd6
LAB_00175c9b:
MOV RDI,R12
MOV RSI,R15
CALL 0x0013f08e
MOV RDI,R15
XOR ESI,ESI
CALL 0x0013d970
MOV RDI,R15
CALL 0x0014a5c0
ADD R14,0x50
CMP R14,R13
JNZ 0x00175c90
LAB_00175cc1:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00176830
LAB_00175ccc:
MOV RDI,RSP
CALL 0x0013efba
JMP 0x00175e6e
LAB_00175cd9:
TEST RCX,RCX
JZ 0x00175ee9
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
MOV R8D,0x1
CALL 0x0012afce
MOV RAX,qword ptr [R14 + 0x20]
MOV R15,qword ptr [RAX]
MOV R13,qword ptr [RAX + 0x8]
CMP R15,R13
JZ 0x00175e10
LEA RBP,[RSP + 0xa8]
LEA R12,[RSP + 0x50]
LAB_00175d17:
LEA RSI,[R15 + 0x10]
MOVZX EAX,byte ptr [R15]
TEST EAX,EAX
JZ 0x00175d8e
CMP EAX,0x4
JZ 0x00175d8e
CMP EAX,0x3
JNZ 0x00175d84
LAB_00175d2d:
LEA RDI,[RSP + 0x40]
CALL 0x00175bd6
LAB_00175d37:
LEA R12,[RSP + 0x88]
MOV RDI,R12
MOV RSI,R15
CALL 0x0013f9aa
LAB_00175d4a:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0016fb22
MOV RDI,RAX
LEA R12,[RSP + 0x40]
MOV RSI,R12
CALL 0x00146ee0
MOV RDI,qword ptr [RSP + 0x88]
LEA RCX,[RSP + 0x98]
MOV RAX,RCX
CMP RDI,RCX
JNZ 0x00175ddc
LEA R12,[RSP + 0x40]
JMP 0x00175dec
LAB_00175d84:
ADD AL,0xfb
CMP AL,0x3
JA 0x00175e83
LAB_00175d8e:
MOV RDI,RBP
CALL 0x00175bd6
LAB_00175d96:
MOV RDI,R12
MOV RSI,R15
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012bc5e
LAB_00175db1:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0016fb22
MOV RDI,RAX
MOV RSI,RBP
CALL 0x00146ee0
MOV RDI,qword ptr [RSP + 0x50]
LEA RCX,[RSP + 0x60]
MOV RAX,RCX
MOV R12,RBP
CMP RDI,RCX
JZ 0x00175de9
LAB_00175ddc:
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x001186a0
JMP 0x00175dec
LAB_00175de9:
MOV R12,RBP
LAB_00175dec:
MOV RDI,R12
XOR ESI,ESI
CALL 0x0013d970
MOV RDI,R12
CALL 0x0014a5c0
ADD R15,0x60
CMP R15,R13
LEA R12,[RSP + 0x50]
JNZ 0x00175d17
LAB_00175e10:
CMP qword ptr [R14 + 0x30],0x0
JZ 0x00175e6e
XORPS XMM0,XMM0
LEA R14,[RSP + 0x70]
MOVAPS xmmword ptr [R14],XMM0
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013fab4
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013d970
LAB_00175e3d:
LEA RSI,[0x1bd103]
MOV RDI,RBX
CALL 0x00169088
LAB_00175e4c:
LEA R14,[RSP + 0x70]
MOV RDI,RAX
MOV RSI,R14
CALL 0x00146ee0
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013d970
MOV RDI,R14
CALL 0x0014a5c0
LAB_00175e6e:
MOV RAX,RBX
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00175e83:
MOV EDI,0x10
CALL 0x00118360
MOV R12,RAX
LAB_00175e90:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012bc5e
LAB_00175ead:
LEA RSI,[0x1bd0d9]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x00130c3b
MOV BPL,0x1
LAB_00175ec4:
MOV RSI,RSP
MOV RDI,R12
CALL 0x00118a80
XOR EBP,EBP
MOV RSI,qword ptr [0x001efff0]
MOV RDX,qword ptr [0x001eff80]
MOV RDI,R12
CALL 0x00118b30
LAB_00175ee9:
MOV EDI,0x10
CALL 0x00118360
MOV RBX,RAX
LAB_00175ef6:
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0013dcdc
LAB_00175f0a:
LEA RSI,[0x1bd110]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x00130c3b
MOV BPL,0x1
LAB_00175f21:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00118a80
XOR EBP,EBP
MOV RSI,qword ptr [0x001efff0]
MOV RDX,qword ptr [0x001eff80]
MOV RDI,RBX
CALL 0x00118b30
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >() const */
void minja::Value::
get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(void)
{
char cVar1;
long lVar2;
char *pcVar3;
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>
*pbVar4;
long *plVar5;
basic_json *pbVar6;
runtime_error *prVar7;
long in_RSI;
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>
*in_RDI;
long *plVar8;
data *this;
long lVar9;
char *pcVar10;
int8 local_e8;
int8 uStack_e0;
int8 local_d8;
data local_c8 [32];
data local_a8 [16];
long *local_98 [2];
long local_88 [2];
int8 local_78;
int8 uStack_70;
long *local_60 [2];
long local_50 [2];
data local_40 [16];
plVar5 = *(long **)(in_RSI + 0x10);
lVar9 = *(long *)(in_RSI + 0x20);
if ((plVar5 == (long *)0x0 && lVar9 == 0) && *(long *)(in_RSI + 0x30) == 0) {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(in_RDI,(basic_json *)(in_RSI + 0x40));
}
else if ((*(char *)(in_RSI + 0x40) == '\0' && (plVar5 == (long *)0x0 && lVar9 == 0)) &&
*(long *)(in_RSI + 0x30) == 0) {
*in_RDI = (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>
)0x0;
*(int8 *)(in_RDI + 8) = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(in_RDI,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(in_RDI,0));
}
else if (plVar5 == (long *)0x0) {
if (lVar9 == 0) {
prVar7 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00175ef6 to 00175f09 has its CatchHandler @ 00175fa7 */
dump_abi_cxx11_((int)local_c8,SUB81(in_RSI,0));
/* try { // try from 00175f0a to 00175f1d has its CatchHandler @ 00175f87 */
std::operator+((char *)&local_e8,(string *)"get<json> not defined for this value type: ");
/* try { // try from 00175f21 to 00175f43 has its CatchHandler @ 00175f44 */
std::runtime_error::runtime_error(prVar7,(string *)&local_e8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar7,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80);
}
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();
pcVar10 = (char *)**(int8 **)(in_RSI + 0x20);
pcVar3 = (char *)(*(int8 **)(in_RSI + 0x20))[1];
if (pcVar10 != pcVar3) {
do {
cVar1 = *pcVar10;
if ((cVar1 == '\0') || (cVar1 == '\x04')) {
LAB_00175d8e:
/* try { // try from 00175d8e to 00175d95 has its CatchHandler @ 001760ad */
get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
();
/* try { // try from 00175d96 to 00175db0 has its CatchHandler @ 0017608e */
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>
::dump(local_98,pcVar10,0xffffffff,0x20,0,0);
/* try { // try from 00175db1 to 00175dbb has its CatchHandler @ 0017606d */
pbVar4 = (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>
::operator[]();
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(pbVar4,local_40);
plVar5 = local_88;
plVar8 = local_98[0];
this = local_40;
if (local_98[0] != plVar5) {
LAB_00175ddc:
operator_delete(plVar8,*plVar5 + 1);
}
}
else {
if (cVar1 != '\x03') {
if (3 < (byte)(cVar1 - 5U)) {
prVar7 = (runtime_error *)__cxa_allocate_exception(0x10,pcVar10 + 0x10);
/* try { // try from 00175e90 to 00175eac has its CatchHandler @ 0017602c */
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>
::dump(local_c8,pcVar10,0xffffffff,0x20,0,0);
/* try { // try from 00175ead to 00175ec0 has its CatchHandler @ 00176007 */
std::operator+((char *)&local_e8,(string *)"Invalid key type for conversion to JSON: "
);
/* try { // try from 00175ec4 to 00175ee6 has its CatchHandler @ 00175fc4 */
std::runtime_error::runtime_error(prVar7,(string *)&local_e8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar7,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80);
}
goto LAB_00175d8e;
}
/* try { // try from 00175d2d to 00175d36 has its CatchHandler @ 001760ad */
get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
();
/* try { // try from 00175d37 to 00175d49 has its CatchHandler @ 00176063 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_60,pcVar10);
/* try { // try from 00175d4a to 00175d54 has its CatchHandler @ 00176039 */
pbVar4 = (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>
::operator[]();
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(pbVar4,local_a8);
plVar5 = local_50;
plVar8 = local_60[0];
this = local_a8;
if (local_60[0] != plVar5) goto LAB_00175ddc;
this = local_a8;
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(this,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(this);
pcVar10 = pcVar10 + 0x60;
} while (pcVar10 != pcVar3);
}
if (*(long *)(in_RSI + 0x30) != 0) {
local_78 = 0;
uStack_70 = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::
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>>
(&local_78,1);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_78,0));
/* try { // try from 00175e3d to 00175e4b has its CatchHandler @ 00175fb7 */
pbVar6 = nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]<char_const>(in_RDI,"__callable__");
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)pbVar6,(data *)&local_78);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_78,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_78);
}
}
else {
local_e8 = 0;
uStack_e0 = 0;
local_d8 = 0;
lVar9 = *plVar5;
lVar2 = plVar5[1];
if (lVar9 != lVar2) {
do {
/* try { // try from 00175c90 to 00175c9a has its CatchHandler @ 001760c4 */
get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
();
/* try { // try from 00175c9b to 00175ca5 has its CatchHandler @ 001760c9 */
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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>>>
::
emplace_back<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>>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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>>>
*)&local_e8,(basic_json *)local_c8);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_c8,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_c8);
lVar9 = lVar9 + 0x50;
} while (lVar9 != lVar2);
}
/* try { // try from 00175cc1 to 00175ccb has its CatchHandler @ 00176027 */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS3_ISD_SaISD_EESG_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_
();
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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>>>
::~vector((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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>>>
*)&local_e8);
}
return;
}
| |
30,574 | 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>::set_parents() | monkey531[P]llama/common/json.hpp | void set_parents()
{
#if JSON_DIAGNOSTICS
switch (m_data.m_type)
{
case value_t::array:
{
for (auto& element : *m_data.m_value.array)
{
element.m_parent = this;
}
break;
}
case value_t::object:
{
for (auto& element : *m_data.m_value.object)
{
element.second.m_parent = this;
}
break;
}
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:
break;
}
#endif
} | O0 | 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>::set_parents():
movq %rdi, -0x8(%rsp)
retq
nopw %cs:(%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv:
mov [rsp+var_8], rdi
retn
| 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>::set_parents()
{
;
}
| set_parents:
MOV qword ptr [RSP + -0x8],RDI
RET
|
/* 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>::set_parents() */
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>
::set_parents(void)
{
return;
}
| |
30,575 | ma_crypt_get_index_page_header_space | eloqsql/storage/maria/ma_crypt.c | uint
ma_crypt_get_index_page_header_space(MARIA_SHARE *share)
{
if (share->base.born_transactional)
{
return CRYPT_SCHEME_1_KEY_VERSION_SIZE;
}
else
{
/* if the index is not transactional, we add 7 bytes LSN anyway
to be used for counter block
*/
return LSN_STORE_SIZE + CRYPT_SCHEME_1_KEY_VERSION_SIZE;
}
} | O0 | c | ma_crypt_get_index_page_header_space:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x44c(%rax)
je 0x9e8ce
movl $0x4, -0x4(%rbp)
jmp 0x9e8d5
movl $0xb, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| ma_crypt_get_index_page_header_space:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp byte ptr [rax+44Ch], 0
jz short loc_9E8CE
mov [rbp+var_4], 4
jmp short loc_9E8D5
loc_9E8CE:
mov [rbp+var_4], 0Bh
loc_9E8D5:
mov eax, [rbp+var_4]
pop rbp
retn
| long long ma_crypt_get_index_page_header_space(long long a1)
{
if ( *(_BYTE *)(a1 + 1100) )
return 4;
else
return 11;
}
| ma_crypt_get_index_page_header_space:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x44c],0x0
JZ 0x0019e8ce
MOV dword ptr [RBP + -0x4],0x4
JMP 0x0019e8d5
LAB_0019e8ce:
MOV dword ptr [RBP + -0x4],0xb
LAB_0019e8d5:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 ma_crypt_get_index_page_header_space(long param_1)
{
int4 local_c;
if (*(char *)(param_1 + 0x44c) == '\0') {
local_c = 0xb;
}
else {
local_c = 4;
}
return local_c;
}
| |
30,576 | ggml_threadpool_params_from_cpu_params(cpu_params const&) | monkey531[P]llama/common/common.cpp | struct ggml_threadpool_params ggml_threadpool_params_from_cpu_params(const cpu_params & params) {
struct ggml_threadpool_params tpp;
ggml_threadpool_params_init(&tpp, params.n_threads); // setup the defaults
if (params.mask_valid) {
std::memcpy(&tpp.cpumask, ¶ms.cpumask, GGML_MAX_N_THREADS);
}
tpp.prio = params.priority;
tpp.poll = params.poll;
tpp.strict_cpu = params.strict_cpu;
return tpp;
} | O2 | cpp | ggml_threadpool_params_from_cpu_params(cpu_params const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %esi
callq 0x21630
cmpb $0x1, 0x204(%r14)
jne 0x531f8
leaq 0x4(%r14), %rsi
movl $0x200, %edx # imm = 0x200
movq %rbx, %rdi
callq 0x215c0
movl 0x208(%r14), %eax
movl %eax, 0x204(%rbx)
movl 0x210(%r14), %eax
movl %eax, 0x208(%rbx)
movb 0x20c(%r14), %al
movb %al, 0x20c(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _Z38ggml_threadpool_params_from_cpu_paramsRK10cpu_params:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov esi, [rsi]
call _ggml_threadpool_params_init
cmp byte ptr [r14+204h], 1
jnz short loc_531F8
lea rsi, [r14+4]
mov edx, 200h
mov rdi, rbx
call _memcpy
loc_531F8:
mov eax, [r14+208h]
mov [rbx+204h], eax
mov eax, [r14+210h]
mov [rbx+208h], eax
mov al, [r14+20Ch]
mov [rbx+20Ch], al
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| long long ggml_threadpool_params_from_cpu_params(long long a1, unsigned int *a2)
{
ggml_threadpool_params_init(a1, *a2);
if ( *((_BYTE *)a2 + 516) == 1 )
memcpy(a1, a2 + 1, 512LL);
*(_DWORD *)(a1 + 516) = a2[130];
*(_DWORD *)(a1 + 520) = a2[132];
*(_BYTE *)(a1 + 524) = *((_BYTE *)a2 + 524);
return a1;
}
| ggml_threadpool_params_from_cpu_params:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RSI]
CALL 0x00121630
CMP byte ptr [R14 + 0x204],0x1
JNZ 0x001531f8
LEA RSI,[R14 + 0x4]
MOV EDX,0x200
MOV RDI,RBX
CALL 0x001215c0
LAB_001531f8:
MOV EAX,dword ptr [R14 + 0x208]
MOV dword ptr [RBX + 0x204],EAX
MOV EAX,dword ptr [R14 + 0x210]
MOV dword ptr [RBX + 0x208],EAX
MOV AL,byte ptr [R14 + 0x20c]
MOV byte ptr [RBX + 0x20c],AL
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* ggml_threadpool_params_from_cpu_params(cpu_params const&) */
cpu_params * ggml_threadpool_params_from_cpu_params(cpu_params *param_1)
{
int4 *in_RSI;
ggml_threadpool_params_init(param_1,*in_RSI);
if (*(char *)(in_RSI + 0x81) == '\x01') {
memcpy(param_1,in_RSI + 1,0x200);
}
*(int4 *)(param_1 + 0x204) = in_RSI[0x82];
*(int4 *)(param_1 + 0x208) = in_RSI[0x84];
param_1[0x20c] = *(cpu_params *)(in_RSI + 0x83);
return param_1;
}
| |
30,577 | inheritance_source_by_id | eloqsql/mysys/charset.c | static CHARSET_INFO *inheritance_source_by_id(CHARSET_INFO *cs, uint refid)
{
CHARSET_INFO *refcs;
return refid && refid != cs->number &&
(refcs= all_charsets[refid]) &&
(refcs->state & MY_CS_AVAILABLE) ? refcs : NULL;
} | O0 | c | inheritance_source_by_id:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x2a231
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
je 0x2a231
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x35a218(%rip), %rax # 0x384420
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x2a231
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x200, %eax # imm = 0x200
cmpl $0x0, %eax
je 0x2a231
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x2a239
xorl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0x2a239
movq -0x20(%rbp), %rax
popq %rbp
retq
nop
| inheritance_source_by_id:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
cmp [rbp+var_C], 0
jz short loc_2A231
mov eax, [rbp+var_C]
mov rcx, [rbp+var_8]
cmp eax, [rcx]
jz short loc_2A231
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, all_charsets
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_2A231
mov rax, [rbp+var_18]
mov eax, [rax+0Ch]
and eax, 200h
cmp eax, 0
jz short loc_2A231
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
jmp short loc_2A239
loc_2A231:
xor eax, eax
mov [rbp+var_20], rax
jmp short $+2
loc_2A239:
mov rax, [rbp+var_20]
pop rbp
retn
| long long inheritance_source_by_id(_DWORD *a1, int a2)
{
long long v4; // [rsp+8h] [rbp-18h]
if ( a2 && a2 != *a1 && (v4 = all_charsets[a2]) != 0 && (*(_DWORD *)(v4 + 12) & 0x200) != 0 )
return all_charsets[a2];
else
return 0LL;
}
| inheritance_source_by_id:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
CMP dword ptr [RBP + -0xc],0x0
JZ 0x0012a231
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX]
JZ 0x0012a231
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0x484420]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JZ 0x0012a231
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x200
CMP EAX,0x0
JZ 0x0012a231
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012a239
LAB_0012a231:
XOR EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012a239
LAB_0012a239:
MOV RAX,qword ptr [RBP + -0x20]
POP RBP
RET
|
long inheritance_source_by_id(uint *param_1,uint param_2)
{
long local_28;
if ((((param_2 == 0) || (param_2 == *param_1)) ||
(local_28 = (&all_charsets)[param_2], local_28 == 0)) ||
((*(uint *)(local_28 + 0xc) & 0x200) == 0)) {
local_28 = 0;
}
return local_28;
}
| |
30,578 | lre_case_folding_entry | bluesky950520[P]quickjs/libunicode.c | static int lre_case_folding_entry(uint32_t c, uint32_t idx, uint32_t v, BOOL is_unicode)
{
uint32_t res[LRE_CC_RES_LEN_MAX];
int len;
if (is_unicode) {
len = lre_case_conv_entry(res, c, 2, idx, v);
if (len == 1) {
c = res[0];
} else {
/* handle the few specific multi-character cases (see
unicode_gen.c:dump_case_folding_special_cases()) */
if (c == 0xfb06) {
c = 0xfb05;
} else if (c == 0x01fd3) {
c = 0x390;
} else if (c == 0x01fe3) {
c = 0x3b0;
}
}
} else {
if (likely(c < 128)) {
if (c >= 'a' && c <= 'z')
c = c - 'a' + 'A';
} else {
/* legacy regexp: to upper case if single char >= 128 */
len = lre_case_conv_entry(res, c, FALSE, idx, v);
if (len == 1 && res[0] >= 128)
c = res[0];
}
}
return c;
} | O0 | c | lre_case_folding_entry:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movl %esi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl %ecx, 0x18(%rsp)
cmpl $0x0, 0x18(%rsp)
je 0x1044ae
leaq 0xc(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0x20(%rsp), %ecx
movl 0x1c(%rsp), %r8d
movl $0x2, %edx
callq 0x103ec0
movl %eax, 0x8(%rsp)
cmpl $0x1, 0x8(%rsp)
jne 0x10446c
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x1044ac
cmpl $0xfb06, 0x24(%rsp) # imm = 0xFB06
jne 0x104480
movl $0xfb05, 0x24(%rsp) # imm = 0xFB05
jmp 0x1044aa
cmpl $0x1fd3, 0x24(%rsp) # imm = 0x1FD3
jne 0x104494
movl $0x390, 0x24(%rsp) # imm = 0x390
jmp 0x1044a8
cmpl $0x1fe3, 0x24(%rsp) # imm = 0x1FE3
jne 0x1044a6
movl $0x3b0, 0x24(%rsp) # imm = 0x3B0
jmp 0x1044a8
jmp 0x1044aa
jmp 0x1044ac
jmp 0x104522
cmpl $0x80, 0x24(%rsp)
setb %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x1044e8
cmpl $0x61, 0x24(%rsp)
jb 0x1044e6
cmpl $0x7a, 0x24(%rsp)
ja 0x1044e6
movl 0x24(%rsp), %eax
subl $0x61, %eax
addl $0x41, %eax
movl %eax, 0x24(%rsp)
jmp 0x104520
leaq 0xc(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0x20(%rsp), %ecx
movl 0x1c(%rsp), %r8d
xorl %edx, %edx
callq 0x103ec0
movl %eax, 0x8(%rsp)
cmpl $0x1, 0x8(%rsp)
jne 0x10451e
cmpl $0x80, 0xc(%rsp)
jb 0x10451e
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x104520
jmp 0x104522
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
| lre_case_folding_entry:
sub rsp, 28h
mov [rsp+28h+var_4], edi
mov [rsp+28h+var_8], esi
mov [rsp+28h+var_C], edx
mov [rsp+28h+var_10], ecx
cmp [rsp+28h+var_10], 0
jz short loc_1044AE
lea rdi, [rsp+28h+var_1C]
mov esi, [rsp+28h+var_4]
mov ecx, [rsp+28h+var_8]
mov r8d, [rsp+28h+var_C]
mov edx, 2
call lre_case_conv_entry
mov [rsp+28h+var_20], eax
cmp [rsp+28h+var_20], 1
jnz short loc_10446C
mov eax, [rsp+28h+var_1C]
mov [rsp+28h+var_4], eax
jmp short loc_1044AC
loc_10446C:
cmp [rsp+28h+var_4], 0FB06h
jnz short loc_104480
mov [rsp+28h+var_4], 0FB05h
jmp short loc_1044AA
loc_104480:
cmp [rsp+28h+var_4], 1FD3h
jnz short loc_104494
mov [rsp+28h+var_4], 390h
jmp short loc_1044A8
loc_104494:
cmp [rsp+28h+var_4], 1FE3h
jnz short loc_1044A6
mov [rsp+28h+var_4], 3B0h
loc_1044A6:
jmp short $+2
loc_1044A8:
jmp short $+2
loc_1044AA:
jmp short $+2
loc_1044AC:
jmp short loc_104522
loc_1044AE:
cmp [rsp+28h+var_4], 80h
setb al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_1044E8
cmp [rsp+28h+var_4], 61h ; 'a'
jb short loc_1044E6
cmp [rsp+28h+var_4], 7Ah ; 'z'
ja short loc_1044E6
mov eax, [rsp+28h+var_4]
sub eax, 61h ; 'a'
add eax, 41h ; 'A'
mov [rsp+28h+var_4], eax
loc_1044E6:
jmp short loc_104520
loc_1044E8:
lea rdi, [rsp+28h+var_1C]
mov esi, [rsp+28h+var_4]
mov ecx, [rsp+28h+var_8]
mov r8d, [rsp+28h+var_C]
xor edx, edx
call lre_case_conv_entry
mov [rsp+28h+var_20], eax
cmp [rsp+28h+var_20], 1
jnz short loc_10451E
cmp [rsp+28h+var_1C], 80h
jb short loc_10451E
mov eax, [rsp+28h+var_1C]
mov [rsp+28h+var_4], eax
loc_10451E:
jmp short $+2
loc_104520:
jmp short $+2
loc_104522:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long lre_case_folding_entry(unsigned int a1, int a2, unsigned int a3, int a4)
{
int v5[4]; // [rsp+Ch] [rbp-1Ch] BYREF
unsigned int v6; // [rsp+1Ch] [rbp-Ch]
int v7; // [rsp+20h] [rbp-8h]
unsigned int v8; // [rsp+24h] [rbp-4h]
v8 = a1;
v7 = a2;
v6 = a3;
v5[3] = a4;
if ( a4 )
{
if ( (unsigned int)lre_case_conv_entry(v5, v8, 2, v7, v6) == 1 )
{
return (unsigned int)v5[0];
}
else
{
switch ( v8 )
{
case 0xFB06u:
return 64261;
case 0x1FD3u:
return 912;
case 0x1FE3u:
return 944;
}
}
}
else if ( v8 >= 0x80 )
{
if ( (unsigned int)lre_case_conv_entry(v5, v8, 0, v7, v6) == 1 && v5[0] >= 0x80u )
return (unsigned int)v5[0];
}
else if ( v8 >= 0x61 && v8 <= 0x7A )
{
return v8 - 97 + 65;
}
return v8;
}
| |||
30,579 | lre_case_folding_entry | bluesky950520[P]quickjs/libunicode.c | static int lre_case_folding_entry(uint32_t c, uint32_t idx, uint32_t v, BOOL is_unicode)
{
uint32_t res[LRE_CC_RES_LEN_MAX];
int len;
if (is_unicode) {
len = lre_case_conv_entry(res, c, 2, idx, v);
if (len == 1) {
c = res[0];
} else {
/* handle the few specific multi-character cases (see
unicode_gen.c:dump_case_folding_special_cases()) */
if (c == 0xfb06) {
c = 0xfb05;
} else if (c == 0x01fd3) {
c = 0x390;
} else if (c == 0x01fe3) {
c = 0x3b0;
}
}
} else {
if (likely(c < 128)) {
if (c >= 'a' && c <= 'z')
c = c - 'a' + 'A';
} else {
/* legacy regexp: to upper case if single char >= 128 */
len = lre_case_conv_entry(res, c, FALSE, idx, v);
if (len == 1 && res[0] >= 128)
c = res[0];
}
}
return c;
} | O1 | c | lre_case_folding_entry:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %r8d
movl %esi, %eax
movl %edi, %ebx
testl %ecx, %ecx
je 0x9849d
leaq 0xc(%rsp), %rdi
movl %ebx, %esi
movl $0x2, %edx
movl %eax, %ecx
callq 0x98137
cmpl $0x1, %eax
jne 0x984b0
movl 0xc(%rsp), %ecx
jmp 0x984dc
cmpl $0x7f, %ebx
ja 0x984e6
leal -0x61(%rbx), %eax
leal -0x20(%rbx), %ecx
cmpl $0x1a, %eax
cmovael %ebx, %ecx
jmp 0x984dc
cmpl $0xfb06, %ebx # imm = 0xFB06
je 0x984c7
cmpl $0x1fd3, %ebx # imm = 0x1FD3
jne 0x984ce
movl $0x390, %ecx # imm = 0x390
jmp 0x984dc
movl $0xfb05, %ecx # imm = 0xFB05
jmp 0x984dc
cmpl $0x1fe3, %ebx # imm = 0x1FE3
movl $0x3b0, %ecx # imm = 0x3B0
cmovnel %ebx, %ecx
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0xc(%rsp), %r14
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl %eax, %ecx
callq 0x98137
movl (%r14), %ecx
cmpl $0x7f, %ecx
cmovbel %ebx, %ecx
cmpl $0x1, %eax
jmp 0x984d9
| lre_case_folding_entry:
push r14
push rbx
sub rsp, 18h
mov r8d, edx
mov eax, esi
mov ebx, edi
test ecx, ecx
jz short loc_9849D
lea rdi, [rsp+28h+var_1C]
mov esi, ebx
mov edx, 2
mov ecx, eax
call lre_case_conv_entry
cmp eax, 1
jnz short loc_984B0
mov ecx, [rsp+28h+var_1C]
jmp short loc_984DC
loc_9849D:
cmp ebx, 7Fh
ja short loc_984E6
lea eax, [rbx-61h]
lea ecx, [rbx-20h]
cmp eax, 1Ah
cmovnb ecx, ebx
jmp short loc_984DC
loc_984B0:
cmp ebx, 0FB06h
jz short loc_984C7
cmp ebx, 1FD3h
jnz short loc_984CE
mov ecx, 390h
jmp short loc_984DC
loc_984C7:
mov ecx, 0FB05h
jmp short loc_984DC
loc_984CE:
cmp ebx, 1FE3h
mov ecx, 3B0h
loc_984D9:
cmovnz ecx, ebx
loc_984DC:
mov eax, ecx
add rsp, 18h
pop rbx
pop r14
retn
loc_984E6:
lea r14, [rsp+28h+var_1C]
mov rdi, r14
mov esi, ebx
xor edx, edx
mov ecx, eax
call lre_case_conv_entry
mov ecx, [r14]
cmp ecx, 7Fh
cmovbe ecx, ebx
cmp eax, 1
jmp short loc_984D9
| long long lre_case_folding_entry(unsigned int a1, int a2, unsigned int a3, int a4)
{
unsigned int v4; // ecx
bool v5; // zf
int v7; // eax
_DWORD v8[7]; // [rsp+Ch] [rbp-1Ch] BYREF
if ( a4 )
{
if ( (unsigned int)lre_case_conv_entry(v8, a1, 2, a2, a3) == 1 )
return v8[0];
if ( a1 == 64262 )
return 64261;
if ( a1 == 8147 )
return 912;
v5 = a1 == 8163;
v4 = 944;
goto LABEL_13;
}
if ( a1 > 0x7F )
{
v7 = lre_case_conv_entry(v8, a1, 0, a2, a3);
v4 = v8[0];
if ( v8[0] <= 0x7Fu )
v4 = a1;
v5 = v7 == 1;
LABEL_13:
if ( !v5 )
return a1;
return v4;
}
v4 = a1 - 32;
if ( a1 - 97 >= 0x1A )
return a1;
return v4;
}
| lre_case_folding_entry:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV R8D,EDX
MOV EAX,ESI
MOV EBX,EDI
TEST ECX,ECX
JZ 0x0019849d
LEA RDI,[RSP + 0xc]
MOV ESI,EBX
MOV EDX,0x2
MOV ECX,EAX
CALL 0x00198137
CMP EAX,0x1
JNZ 0x001984b0
MOV ECX,dword ptr [RSP + 0xc]
JMP 0x001984dc
LAB_0019849d:
CMP EBX,0x7f
JA 0x001984e6
LEA EAX,[RBX + -0x61]
LEA ECX,[RBX + -0x20]
CMP EAX,0x1a
CMOVNC ECX,EBX
JMP 0x001984dc
LAB_001984b0:
CMP EBX,0xfb06
JZ 0x001984c7
CMP EBX,0x1fd3
JNZ 0x001984ce
MOV ECX,0x390
JMP 0x001984dc
LAB_001984c7:
MOV ECX,0xfb05
JMP 0x001984dc
LAB_001984ce:
CMP EBX,0x1fe3
MOV ECX,0x3b0
LAB_001984d9:
CMOVNZ ECX,EBX
LAB_001984dc:
MOV EAX,ECX
ADD RSP,0x18
POP RBX
POP R14
RET
LAB_001984e6:
LEA R14,[RSP + 0xc]
MOV RDI,R14
MOV ESI,EBX
XOR EDX,EDX
MOV ECX,EAX
CALL 0x00198137
MOV ECX,dword ptr [R14]
CMP ECX,0x7f
CMOVBE ECX,EBX
CMP EAX,0x1
JMP 0x001984d9
|
uint lre_case_folding_entry(uint param_1,int4 param_2,int4 param_3,int param_4)
{
int iVar1;
bool bVar2;
uint local_1c [3];
if (param_4 == 0) {
if (param_1 < 0x80) {
if (param_1 - 0x61 < 0x1a) {
return param_1 - 0x20;
}
return param_1;
}
iVar1 = lre_case_conv_entry(local_1c,param_1,0,param_2,param_3);
if (local_1c[0] < 0x80) {
local_1c[0] = param_1;
}
bVar2 = iVar1 == 1;
}
else {
iVar1 = lre_case_conv_entry(local_1c,param_1,2,param_2,param_3);
if (iVar1 == 1) {
return local_1c[0];
}
if (param_1 == 0xfb06) {
return 0xfb05;
}
if (param_1 == 0x1fd3) {
return 0x390;
}
bVar2 = param_1 == 0x1fe3;
local_1c[0] = 0x3b0;
}
if (!bVar2) {
local_1c[0] = param_1;
}
return local_1c[0];
}
| |
30,580 | test_bug10736 | eloqsql/tests/mysql_client_test.c | static void test_bug10736()
{
MYSQL_STMT *stmt;
MYSQL_BIND my_bind[1];
char a[21];
int rc;
const char *stmt_text;
int i= 0;
ulong type;
myheader("test_bug10736");
mysql_query(mysql, "drop table if exists t1");
mysql_query(mysql, "create table t1 (id integer not null primary key,"
"name VARCHAR(20) NOT NULL)");
rc= mysql_query(mysql, "insert into t1 (id, name) values "
"(1, 'aaa'), (2, 'bbb'), (3, 'ccc')");
myquery(rc);
stmt= mysql_stmt_init(mysql);
type= (ulong) CURSOR_TYPE_READ_ONLY;
rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (void*) &type);
check_execute(stmt, rc);
stmt_text= "select name from t1 where name=(select name from t1 where id=2)";
rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
check_execute(stmt, rc);
bzero((char*) my_bind, sizeof(my_bind));
my_bind[0].buffer_type= MYSQL_TYPE_STRING;
my_bind[0].buffer= (void*) a;
my_bind[0].buffer_length= sizeof(a);
mysql_stmt_bind_result(stmt, my_bind);
for (i= 0; i < 3; i++)
{
int row_no= 0;
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
while ((rc= mysql_stmt_fetch(stmt)) == 0)
{
if (!opt_silent)
printf("%d: %s\n", row_no, a);
++row_no;
}
DIE_UNLESS(rc == MYSQL_NO_DATA);
}
rc= mysql_stmt_close(stmt);
DIE_UNLESS(rc == 0);
rc= mysql_query(mysql, "drop table t1");
myquery(rc);
} | O3 | c | test_bug10736:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpb $0x1, 0x3b1613(%rip) # 0x41a4c1
jg 0x68f29
movq 0x337109(%rip), %rbx # 0x39ffc0
movq (%rbx), %rdi
leaq 0x76603(%rip), %rdx # 0xdf4c4
movl $0x1, %esi
xorl %eax, %eax
callq 0x39240
movq (%rbx), %rdi
movl 0x3b1836(%rip), %ecx # 0x41a70c
leal 0x1(%rcx), %eax
movl %eax, 0x3b182d(%rip) # 0x41a70c
movl 0x3b1822(%rip), %r8d # 0x41a708
movl 0x3b15ff(%rip), %r9d # 0x41a4ec
leaq 0x77230(%rip), %rax # 0xe0124
movq %rax, (%rsp)
leaq 0x778cd(%rip), %rdx # 0xe07cc
movl $0x1, %esi
xorl %eax, %eax
callq 0x39240
movq (%rbx), %rdi
leaq 0x765e7(%rip), %rdx # 0xdf4fc
movl $0x1, %esi
xorl %eax, %eax
callq 0x39240
movq (%rbx), %rdi
callq 0x394b0
movq 0x3b1598(%rip), %rdi # 0x41a4c8
leaq 0x77f96(%rip), %rsi # 0xe0ecd
callq 0x3b116
movq 0x3b1585(%rip), %rdi # 0x41a4c8
leaq 0x85a97(%rip), %rsi # 0xee9e1
callq 0x3b116
movq 0x3b1572(%rip), %rdi # 0x41a4c8
leaq 0x85ad0(%rip), %rsi # 0xeea2d
callq 0x3b116
testl %eax, %eax
jne 0x690db
movq 0x3b1557(%rip), %rdi # 0x41a4c8
callq 0x9191c
movq %rax, %rbx
leaq -0x58(%rbp), %rdx
movq $0x1, (%rdx)
movq %rax, %rdi
movl $0x1, %esi
callq 0x908de
testb %al, %al
jne 0x690fa
leaq 0x85d26(%rip), %rsi # 0xeecc6
movl $0x3f, %edx
movq %rbx, %rdi
callq 0x3b4a1
testl %eax, %eax
jne 0x6911a
xorps %xmm0, %xmm0
leaq -0xd0(%rbp), %rsi
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, (%rsi)
movl $0xfe, 0x60(%rsi)
leaq -0x50(%rbp), %r14
movq %r14, 0x10(%rsi)
movq $0x15, 0x40(%rsi)
movq %rbx, %rdi
callq 0x91084
leaq 0x75ba2(%rip), %r15 # 0xdeba2
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0x3b510
testl %eax, %eax
jne 0x690bb
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x3b573
testl %eax, %eax
jne 0x69045
cmpb $0x0, 0x3b1498(%rip) # 0x41a4c1
jne 0x69040
movl $0x1, %edi
movq %r15, %rsi
movl %r12d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x39a60
incl %r12d
jmp 0x69016
cmpl $0x64, %eax
jne 0x690a3
incl %r13d
cmpl $0x3, %r13d
jne 0x69003
movq %rbx, %rdi
callq 0x3b639
testb %al, %al
jne 0x6913a
movq 0x3b145e(%rip), %rdi # 0x41a4c8
leaq 0x77ca7(%rip), %rsi # 0xe0d18
callq 0x3b116
testl %eax, %eax
jne 0x69152
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x69171
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x75d02(%rip), %rdi # 0xdedac
leaq 0x75e1d(%rip), %rdx # 0xdeece
movl $0x3703, %esi # imm = 0x3703
callq 0x3bb30
movq %rbx, %rdi
callq 0x3bbbe
leaq 0x75ce2(%rip), %rdi # 0xdedac
leaq 0x81896(%rip), %rdx # 0xea967
movl $0x36fc, %esi # imm = 0x36FC
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x75cc3(%rip), %rdi # 0xdedac
leaq 0x8bfcf(%rip), %rdx # 0xf50bf
movl $0x36e7, %esi # imm = 0x36E7
callq 0x3bb30
movq %rbx, %rdi
callq 0x3bbbe
leaq 0x75ca3(%rip), %rdi # 0xdedac
leaq 0x81857(%rip), %rdx # 0xea967
movl $0x36ed, %esi # imm = 0x36ED
callq 0x3bb30
movq %rbx, %rdi
callq 0x3bbbe
leaq 0x75c83(%rip), %rdi # 0xdedac
leaq 0x81837(%rip), %rdx # 0xea967
movl $0x36f0, %esi # imm = 0x36F0
callq 0x3bb30
leaq 0x75c6b(%rip), %rdi # 0xdedac
leaq 0x8181f(%rip), %rdx # 0xea967
movl $0x3706, %esi # imm = 0x3706
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x75c4c(%rip), %rdi # 0xdedac
leaq 0x8bf58(%rip), %rdx # 0xf50bf
movl $0x3709, %esi # imm = 0x3709
callq 0x3bb30
callq 0x39290
| test_bug10736:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov rax, fs:28h
mov [rbp+var_30], rax
cmp cs:opt_silent, 1
jg short loc_68F29
mov rbx, cs:stdout_ptr
mov rdi, [rbx]
lea rdx, asc_DF4C4; "\n\n###################################"...
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [rbx]
mov ecx, cs:test_count
lea eax, [rcx+1]
mov cs:test_count, eax
mov r8d, cs:iter_count
mov r9d, cs:opt_count
lea rax, aTestBug10736; "test_bug10736"
mov [rsp+0E0h+var_E0], rax
lea rdx, aUOfUUS; "%u of (%u/%u): %s"
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [rbx]
lea rdx, asc_DF4FC; " \n###################################"...
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [rbx]
call _fflush
loc_68F29:
mov rdi, cs:mysql
lea rsi, aDropTableIfExi_2; "drop table if exists t1"
call wrap_mysql_query
mov rdi, cs:mysql
lea rsi, aCreateTableT1I_11; "create table t1 (id integer not null pr"...
call wrap_mysql_query
mov rdi, cs:mysql
lea rsi, aInsertIntoT1Id_2; "insert into t1 (id, name) values (1, 'a"...
call wrap_mysql_query
test eax, eax
jnz loc_690DB
mov rdi, cs:mysql
call mysql_stmt_init
mov rbx, rax
lea rdx, [rbp+var_58]
mov qword ptr [rdx], 1
mov rdi, rax
mov esi, 1
call mysql_stmt_attr_set
test al, al
jnz loc_690FA
lea rsi, aSelectNameFrom_1; "select name from t1 where name=(select "...
mov edx, 3Fh ; '?'
mov rdi, rbx
call wrap_mysql_stmt_prepare
test eax, eax
jnz loc_6911A
xorps xmm0, xmm0
lea rsi, [rbp+var_D0]
movaps xmmword ptr [rsi+60h], xmm0
movaps xmmword ptr [rsi+10h], xmm0
movaps xmmword ptr [rsi+40h], xmm0
movaps xmmword ptr [rsi+50h], xmm0
movaps xmmword ptr [rsi+30h], xmm0
movaps xmmword ptr [rsi+20h], xmm0
movaps xmmword ptr [rsi], xmm0
mov dword ptr [rsi+60h], 0FEh
lea r14, [rbp+var_50]
mov [rsi+10h], r14
mov qword ptr [rsi+40h], 15h
mov rdi, rbx
call mysql_stmt_bind_result
lea r15, aColumnDS+7; "%d: %s\n"
xor r13d, r13d
loc_69003:
mov rdi, rbx
call wrap_mysql_stmt_execute
test eax, eax
jnz loc_690BB
xor r12d, r12d
loc_69016:
mov rdi, rbx
call wrap_mysql_stmt_fetch
test eax, eax
jnz short loc_69045
cmp cs:opt_silent, 0
jnz short loc_69040
mov edi, 1
mov rsi, r15
mov edx, r12d
mov rcx, r14
xor eax, eax
call ___printf_chk
loc_69040:
inc r12d
jmp short loc_69016
loc_69045:
cmp eax, 64h ; 'd'
jnz short loc_690A3
inc r13d
cmp r13d, 3
jnz short loc_69003
mov rdi, rbx
call wrap_mysql_stmt_close
test al, al
jnz loc_6913A
mov rdi, cs:mysql
lea rsi, aDropTableT1_0; "drop table t1"
call wrap_mysql_query
test eax, eax
jnz loc_69152
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_69171
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_690A3:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aRcMysqlNoData; "rc == MYSQL_NO_DATA"
mov esi, 3703h
call die
loc_690BB:
mov rdi, rbx
call print_st_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
mov esi, 36FCh
call die
loc_690DB:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 36E7h
call die
loc_690FA:
mov rdi, rbx
call print_st_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
mov esi, 36EDh
call die
loc_6911A:
mov rdi, rbx
call print_st_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
mov esi, 36F0h
call die
loc_6913A:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
mov esi, 3706h
call die
loc_69152:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 3709h
call die
loc_69171:
call ___stack_chk_fail
| unsigned long long test_bug10736()
{
int v0; // ecx
long long v1; // rbx
long long v2; // rdx
long long v3; // rcx
int i; // r13d
int j; // r12d
int v6; // eax
__int128 v8; // [rsp+10h] [rbp-D0h] BYREF
__int128 v9; // [rsp+20h] [rbp-C0h]
__int128 v10; // [rsp+30h] [rbp-B0h]
__int128 v11; // [rsp+40h] [rbp-A0h]
__int128 v12; // [rsp+50h] [rbp-90h]
__int128 v13; // [rsp+60h] [rbp-80h]
__int128 v14; // [rsp+70h] [rbp-70h]
long long v15; // [rsp+88h] [rbp-58h] BYREF
char v16[32]; // [rsp+90h] [rbp-50h] BYREF
unsigned long long v17; // [rsp+B0h] [rbp-30h]
v17 = __readfsqword(0x28u);
if ( opt_silent <= 1 )
{
__fprintf_chk(stdout, 1LL, "\n\n#####################################\n");
v0 = test_count++;
__fprintf_chk(stdout, 1LL, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_bug10736");
__fprintf_chk(stdout, 1LL, " \n#####################################\n");
fflush(stdout);
}
wrap_mysql_query(mysql, (long long)"drop table if exists t1");
wrap_mysql_query(mysql, (long long)"create table t1 (id integer not null primary key,name VARCHAR(20) NOT NULL)");
if ( (unsigned int)wrap_mysql_query(
mysql,
(long long)"insert into t1 (id, name) values (1, 'aaa'), (2, 'bbb'), (3, 'ccc')") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14055, "r == 0");
}
v1 = mysql_stmt_init(mysql);
v15 = 1LL;
if ( (unsigned __int8)mysql_stmt_attr_set(v1, 1LL, &v15) )
{
print_st_error(v1);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14061, "rc == 0");
}
if ( (unsigned int)wrap_mysql_stmt_prepare(
v1,
(long long)"select name from t1 where name=(select name from t1 where id=2)",
63LL) )
{
print_st_error(v1);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14064, "rc == 0");
}
v14 = 0LL;
v9 = 0LL;
v12 = 0LL;
v13 = 0LL;
v11 = 0LL;
v10 = 0LL;
v8 = 0LL;
LODWORD(v14) = 254;
*(_QWORD *)&v9 = v16;
*(_QWORD *)&v12 = 21LL;
mysql_stmt_bind_result(v1, &v8, v2, v3);
for ( i = 0; i != 3; ++i )
{
if ( (unsigned int)wrap_mysql_stmt_execute(v1) )
{
print_st_error(v1);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14076, "rc == 0");
}
for ( j = 0; ; ++j )
{
v6 = wrap_mysql_stmt_fetch(v1);
if ( v6 )
break;
if ( !opt_silent )
__printf_chk(1LL, "%d: %s\n", j, v16);
}
if ( v6 != 100 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14083, "rc == MYSQL_NO_DATA");
}
if ( wrap_mysql_stmt_close(v1) )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14086, "rc == 0");
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"drop table t1") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14089, "r == 0");
}
return __readfsqword(0x28u);
}
| test_bug10736:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP byte ptr [0x0051a4c1],0x1
JG 0x00168f29
MOV RBX,qword ptr [0x0049ffc0]
MOV RDI,qword ptr [RBX]
LEA RDX,[0x1df4c4]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00139240
MOV RDI,qword ptr [RBX]
MOV ECX,dword ptr [0x0051a70c]
LEA EAX,[RCX + 0x1]
MOV dword ptr [0x0051a70c],EAX
MOV R8D,dword ptr [0x0051a708]
MOV R9D,dword ptr [0x0051a4ec]
LEA RAX,[0x1e0124]
MOV qword ptr [RSP],RAX
LEA RDX,[0x1e07cc]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00139240
MOV RDI,qword ptr [RBX]
LEA RDX,[0x1df4fc]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00139240
MOV RDI,qword ptr [RBX]
CALL 0x001394b0
LAB_00168f29:
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1e0ecd]
CALL 0x0013b116
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1ee9e1]
CALL 0x0013b116
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1eea2d]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x001690db
MOV RDI,qword ptr [0x0051a4c8]
CALL 0x0019191c
MOV RBX,RAX
LEA RDX,[RBP + -0x58]
MOV qword ptr [RDX],0x1
MOV RDI,RAX
MOV ESI,0x1
CALL 0x001908de
TEST AL,AL
JNZ 0x001690fa
LEA RSI,[0x1eecc6]
MOV EDX,0x3f
MOV RDI,RBX
CALL 0x0013b4a1
TEST EAX,EAX
JNZ 0x0016911a
XORPS XMM0,XMM0
LEA RSI,[RBP + -0xd0]
MOVAPS xmmword ptr [RSI + 0x60],XMM0
MOVAPS xmmword ptr [RSI + 0x10],XMM0
MOVAPS xmmword ptr [RSI + 0x40],XMM0
MOVAPS xmmword ptr [RSI + 0x50],XMM0
MOVAPS xmmword ptr [RSI + 0x30],XMM0
MOVAPS xmmword ptr [RSI + 0x20],XMM0
MOVAPS xmmword ptr [RSI],XMM0
MOV dword ptr [RSI + 0x60],0xfe
LEA R14,[RBP + -0x50]
MOV qword ptr [RSI + 0x10],R14
MOV qword ptr [RSI + 0x40],0x15
MOV RDI,RBX
CALL 0x00191084
LEA R15,[0x1deba2]
XOR R13D,R13D
LAB_00169003:
MOV RDI,RBX
CALL 0x0013b510
TEST EAX,EAX
JNZ 0x001690bb
XOR R12D,R12D
LAB_00169016:
MOV RDI,RBX
CALL 0x0013b573
TEST EAX,EAX
JNZ 0x00169045
CMP byte ptr [0x0051a4c1],0x0
JNZ 0x00169040
MOV EDI,0x1
MOV RSI,R15
MOV EDX,R12D
MOV RCX,R14
XOR EAX,EAX
CALL 0x00139a60
LAB_00169040:
INC R12D
JMP 0x00169016
LAB_00169045:
CMP EAX,0x64
JNZ 0x001690a3
INC R13D
CMP R13D,0x3
JNZ 0x00169003
MOV RDI,RBX
CALL 0x0013b639
TEST AL,AL
JNZ 0x0016913a
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1e0d18]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x00169152
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00169171
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001690a3:
LEA RDI,[0x1dedac]
LEA RDX,[0x1deece]
MOV ESI,0x3703
CALL 0x0013bb30
LAB_001690bb:
MOV RDI,RBX
CALL 0x0013bbbe
LEA RDI,[0x1dedac]
LEA RDX,[0x1ea967]
MOV ESI,0x36fc
CALL 0x0013bb30
LAB_001690db:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x36e7
CALL 0x0013bb30
LAB_001690fa:
MOV RDI,RBX
CALL 0x0013bbbe
LEA RDI,[0x1dedac]
LEA RDX,[0x1ea967]
MOV ESI,0x36ed
CALL 0x0013bb30
LAB_0016911a:
MOV RDI,RBX
CALL 0x0013bbbe
LEA RDI,[0x1dedac]
LEA RDX,[0x1ea967]
MOV ESI,0x36f0
CALL 0x0013bb30
LAB_0016913a:
LEA RDI,[0x1dedac]
LEA RDX,[0x1ea967]
MOV ESI,0x3706
CALL 0x0013bb30
LAB_00169152:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x3709
CALL 0x0013bb30
LAB_00169171:
CALL 0x00139290
|
void test_bug10736(void)
{
int *puVar1;
char cVar2;
int iVar3;
int iVar4;
int iVar5;
int8 uVar6;
long in_FS_OFFSET;
int1 local_58 [32];
long local_38;
puVar1 = PTR_stdout_0049ffc0;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (opt_silent < '\x02') {
__fprintf_chk(*(int8 *)PTR_stdout_0049ffc0,1,"\n\n#####################################\n"
);
iVar3 = test_count;
test_count = test_count + 1;
__fprintf_chk(*(int8 *)puVar1,1,"%u of (%u/%u): %s",iVar3,iter_count,opt_count,
"test_bug10736");
__fprintf_chk(*(int8 *)puVar1,1," \n#####################################\n");
fflush(*(FILE **)puVar1);
}
wrap_mysql_query(mysql,"drop table if exists t1");
wrap_mysql_query(mysql,
"create table t1 (id integer not null primary key,name VARCHAR(20) NOT NULL)");
iVar3 = wrap_mysql_query(mysql,
"insert into t1 (id, name) values (1, \'aaa\'), (2, \'bbb\'), (3, \'ccc\')"
);
if (iVar3 != 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x36e7,"r == 0");
}
uVar6 = mysql_stmt_init(mysql);
cVar2 = mysql_stmt_attr_set(uVar6,1);
if (cVar2 != '\0') {
print_st_error(uVar6);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x36ed,"rc == 0");
}
iVar3 = wrap_mysql_stmt_prepare
(uVar6,"select name from t1 where name=(select name from t1 where id=2)",0x3f);
if (iVar3 != 0) {
print_st_error(uVar6);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x36f0,"rc == 0");
}
mysql_stmt_bind_result(uVar6);
iVar3 = 0;
do {
iVar4 = wrap_mysql_stmt_execute(uVar6);
if (iVar4 != 0) {
print_st_error(uVar6);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x36fc,"rc == 0");
}
iVar4 = 0;
while( true ) {
iVar5 = wrap_mysql_stmt_fetch(uVar6);
if (iVar5 != 0) break;
if (opt_silent == '\0') {
__printf_chk(1,"%d: %s\n",iVar4,local_58);
}
iVar4 = iVar4 + 1;
}
if (iVar5 != 100) {
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3703,
"rc == MYSQL_NO_DATA");
}
iVar3 = iVar3 + 1;
} while (iVar3 != 3);
cVar2 = wrap_mysql_stmt_close(uVar6);
if (cVar2 != '\0') {
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3706,"rc == 0");
}
iVar3 = wrap_mysql_query(mysql,"drop table t1");
if (iVar3 == 0) {
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3709,"r == 0");
}
| |
30,581 | evmone::advanced::(anonymous namespace)::op_jump(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&) | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/advanced_instructions.cpp | const Instruction* op_jump(const Instruction*, AdvancedExecutionState& state) noexcept
{
const auto dst = state.stack.pop();
auto pc = -1;
if (std::numeric_limits<int>::max() < dst ||
(pc = find_jumpdest(*state.analysis.advanced, static_cast<int>(dst))) < 0)
return state.exit(EVMC_BAD_JUMP_DESTINATION);
return &state.analysis.advanced->instrs[static_cast<size_t>(pc)];
} | O0 | cpp | evmone::advanced::(anonymous namespace)::op_jump(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x228, %rdi # imm = 0x228
callq 0x611b0
movq (%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
callq 0x950b0
movl %eax, -0x40(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x95070
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x41(%rbp)
jne 0x93bb6
movq -0x18(%rbp), %rax
movq 0x1f8(%rax), %rax
movq %rax, -0x50(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x90510
movq -0x50(%rbp), %rdi
movl %eax, %esi
callq 0x950c0
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
setl %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x93bbf
jmp 0x93bd3
movq -0x18(%rbp), %rdi
movl $0x8, %esi
callq 0x94f80
movq %rax, -0x8(%rbp)
jmp 0x93beb
movq -0x18(%rbp), %rax
movq 0x1f8(%rax), %rdi
movslq -0x3c(%rbp), %rsi
callq 0x951a0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN6evmone8advanced12_GLOBAL__N_17op_jumpEPKNS0_11InstructionERNS0_22AdvancedExecutionStateE:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_18]
add rdi, 228h; this
call _ZN6evmone8StackTop3popEv; evmone::StackTop::pop(void)
mov rcx, [rax]
mov [rbp+var_38], rcx
mov rcx, [rax+8]
mov [rbp+var_30], rcx
mov rcx, [rax+10h]
mov [rbp+var_28], rcx
mov rax, [rax+18h]
mov [rbp+var_20], rax
mov [rbp+var_3C], 0FFFFFFFFh
call _ZNSt14numeric_limitsIiE3maxEv; std::numeric_limits<int>::max(void)
mov [rbp+var_40], eax
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_38]
call _ZN4intxltILj256EivEEbRKT0_RKNS_4uintIXT_EEE; intx::operator<<256u,int,void>(int const&,intx::uint<256u> const&)
mov cl, al
mov al, 1
test cl, 1
mov [rbp+var_41], al
jnz short loc_93BB6
mov rax, [rbp+var_18]
mov rax, [rax+1F8h]
mov [rbp+var_50], rax
lea rdi, [rbp+var_38]
call _ZNK4intx4uintILj256EEcvT_IivEEv; intx::uint<256u>::operator int<int,void>(void)
mov rdi, [rbp+var_50]; this
mov esi, eax; evmone::advanced::AdvancedCodeAnalysis *
call _ZN6evmone8advanced13find_jumpdestERKNS0_20AdvancedCodeAnalysisEi; evmone::advanced::find_jumpdest(evmone::advanced::AdvancedCodeAnalysis const&,int)
mov [rbp+var_3C], eax
cmp eax, 0
setl al
mov [rbp+var_41], al
loc_93BB6:
mov al, [rbp+var_41]
test al, 1
jnz short loc_93BBF
jmp short loc_93BD3
loc_93BBF:
mov rdi, [rbp+var_18]
mov esi, 8
call _ZN6evmone8advanced22AdvancedExecutionState4exitE16evmc_status_code; evmone::advanced::AdvancedExecutionState::exit(evmc_status_code)
mov [rbp+var_8], rax
jmp short loc_93BEB
loc_93BD3:
mov rax, [rbp+var_18]
mov rdi, [rax+1F8h]
movsxd rsi, [rbp+var_3C]
call _ZNKSt6vectorIN6evmone8advanced11InstructionESaIS2_EEixEm; std::vector<evmone::advanced::Instruction>::operator[](ulong)
mov [rbp+var_8], rax
loc_93BEB:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long evmone::advanced::`anonymous namespace'::op_jump(long long a1, long long a2)
{
_QWORD *v2; // rax
unsigned int v3; // eax
int v4; // edx
evmone::advanced *v6; // [rsp+0h] [rbp-50h]
bool v7; // [rsp+Fh] [rbp-41h]
int v8; // [rsp+10h] [rbp-40h] BYREF
int jumpdest; // [rsp+14h] [rbp-3Ch]
_QWORD v10[4]; // [rsp+18h] [rbp-38h] BYREF
long long v11; // [rsp+38h] [rbp-18h]
long long v12; // [rsp+40h] [rbp-10h]
v12 = a1;
v11 = a2;
v2 = (_QWORD *)evmone::StackTop::pop((evmone::StackTop *)(a2 + 552));
v10[0] = *v2;
v10[1] = v2[1];
v10[2] = v2[2];
v10[3] = v2[3];
jumpdest = -1;
v8 = std::numeric_limits<int>::max();
v7 = 1;
if ( (intx::operator<<256u,int,void>(&v8, v10) & 1) == 0 )
{
v6 = *(evmone::advanced **)(v11 + 504);
v3 = intx::uint<256u>::operator int<int,void>((long long)v10);
jumpdest = evmone::advanced::find_jumpdest(v6, (const evmone::advanced::AdvancedCodeAnalysis *)v3, v4);
v7 = jumpdest < 0;
}
if ( v7 )
return evmone::advanced::AdvancedExecutionState::exit(v11, 8LL);
else
return std::vector<evmone::advanced::Instruction>::operator[](*(_QWORD *)(v11 + 504), jumpdest);
}
| op_jump:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x228
CALL 0x001611b0
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x30],RCX
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV dword ptr [RBP + -0x3c],0xffffffff
CALL 0x001950b0
MOV dword ptr [RBP + -0x40],EAX
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x38]
CALL 0x00195070
MOV CL,AL
MOV AL,0x1
TEST CL,0x1
MOV byte ptr [RBP + -0x41],AL
JNZ 0x00193bb6
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x1f8]
MOV qword ptr [RBP + -0x50],RAX
LEA RDI,[RBP + -0x38]
CALL 0x00190510
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,EAX
CALL 0x001950c0
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
SETL AL
MOV byte ptr [RBP + -0x41],AL
LAB_00193bb6:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x00193bbf
JMP 0x00193bd3
LAB_00193bbf:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x8
CALL 0x00194f80
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00193beb
LAB_00193bd3:
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x1f8]
MOVSXD RSI,dword ptr [RBP + -0x3c]
CALL 0x001951a0
MOV qword ptr [RBP + -0x8],RAX
LAB_00193beb:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
/* evmone::advanced::(anonymous namespace)::op_jump(evmone::advanced::Instruction const*,
evmone::advanced::AdvancedExecutionState&) */
int8
evmone::advanced::(anonymous_namespace)::op_jump
(Instruction *param_1,AdvancedExecutionState *param_2)
{
AdvancedCodeAnalysis *pAVar1;
bool bVar2;
int iVar3;
int8 *puVar4;
bool bVar5;
int local_48;
int local_44;
int8 local_40;
int8 local_38;
int8 local_30;
int8 local_28;
AdvancedExecutionState *local_20;
Instruction *local_18;
int8 local_10;
local_20 = param_2;
local_18 = param_1;
puVar4 = (int8 *)StackTop::pop((StackTop *)(param_2 + 0x228));
local_40 = *puVar4;
local_38 = puVar4[1];
local_30 = puVar4[2];
local_28 = puVar4[3];
local_44 = -1;
local_48 = std::numeric_limits<int>::max();
bVar2 = intx::operator<(&local_48,(uint *)&local_40);
bVar5 = true;
if (!bVar2) {
pAVar1 = *(AdvancedCodeAnalysis **)(local_20 + 0x1f8);
iVar3 = intx::uint::operator_cast_to_int((uint *)&local_40);
local_44 = find_jumpdest(pAVar1,iVar3);
bVar5 = local_44 < 0;
}
if (bVar5) {
local_10 = AdvancedExecutionState::exit(local_20,8);
}
else {
local_10 = std::
vector<evmone::advanced::Instruction,std::allocator<evmone::advanced::Instruction>>::
operator[](*(vector<evmone::advanced::Instruction,std::allocator<evmone::advanced::Instruction>>
**)(local_20 + 0x1f8),(long)local_44);
}
return local_10;
}
| |
30,582 | google::protobuf::io::CodedOutputStream::VarintSize32(unsigned int) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.h | inline size_t CodedOutputStream::VarintSize32(uint32_t value) {
// This computes value == 0 ? 1 : floor(log2(value)) / 7 + 1
// Use an explicit multiplication to implement the divide of
// a number in the 1..31 range.
// Explicit OR 0x1 to avoid calling Bits::Log2FloorNonZero(0), which is
// undefined.
uint32_t log2value = Bits::Log2FloorNonZero(value | 0x1);
return static_cast<size_t>((log2value * 9 + 73) / 64);
} | O0 | c | google::protobuf::io::CodedOutputStream::VarintSize32(unsigned int):
pushq %rax
movl %edi, 0x4(%rsp)
movl 0x4(%rsp), %edi
orl $0x1, %edi
callq 0xb1510
movl %eax, (%rsp)
imull $0x9, (%rsp), %eax
addl $0x49, %eax
shrl $0x6, %eax
movl %eax, %eax
popq %rcx
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN6google8protobuf2io17CodedOutputStream12VarintSize32Ej:
push rax
mov [rsp+8+var_4], edi
mov edi, [rsp+8+var_4]
or edi, 1; this
call _ZN6google8protobuf4Bits16Log2FloorNonZeroEj; google::protobuf::Bits::Log2FloorNonZero(uint)
mov [rsp+8+var_8], eax
imul eax, [rsp+8+var_8], 9
add eax, 49h ; 'I'
shr eax, 6
mov eax, eax
pop rcx
retn
| long long google::protobuf::io::CodedOutputStream::VarintSize32(
google::protobuf::io::CodedOutputStream *this,
unsigned int a2)
{
return (9
* (unsigned int)google::protobuf::Bits::Log2FloorNonZero((google::protobuf::Bits *)((unsigned int)this | 1), a2)
+ 73) >> 6;
}
| VarintSize32:
PUSH RAX
MOV dword ptr [RSP + 0x4],EDI
MOV EDI,dword ptr [RSP + 0x4]
OR EDI,0x1
CALL 0x001b1510
MOV dword ptr [RSP],EAX
IMUL EAX,dword ptr [RSP],0x9
ADD EAX,0x49
SHR EAX,0x6
MOV EAX,EAX
POP RCX
RET
|
/* google::protobuf::io::CodedOutputStream::VarintSize32(unsigned int) */
uint google::protobuf::io::CodedOutputStream::VarintSize32(uint param_1)
{
int iVar1;
iVar1 = Bits::Log2FloorNonZero(param_1 | 1);
return iVar1 * 9 + 0x49U >> 6;
}
| |
30,583 | cmp_cols_are_equal(dict_col_t const*, dict_col_t const*, unsigned long) | eloqsql/storage/innobase/rem/rem0cmp.cc | ibool
cmp_cols_are_equal(
/*===============*/
const dict_col_t* col1, /*!< in: column 1 */
const dict_col_t* col2, /*!< in: column 2 */
ibool check_charsets)
/*!< in: whether to check charsets */
{
if (dtype_is_non_binary_string_type(col1->mtype, col1->prtype)
&& dtype_is_non_binary_string_type(col2->mtype, col2->prtype)) {
/* Both are non-binary string types: they can be compared if
and only if the charset-collation is the same */
if (check_charsets) {
return(dtype_get_charset_coll(col1->prtype)
== dtype_get_charset_coll(col2->prtype));
} else {
return(TRUE);
}
}
if (dtype_is_binary_string_type(col1->mtype, col1->prtype)
&& dtype_is_binary_string_type(col2->mtype, col2->prtype)) {
/* Both are binary string types: they can be compared */
return(TRUE);
}
if (col1->mtype != col2->mtype) {
return(FALSE);
}
if (col1->mtype == DATA_INT
&& (col1->prtype & DATA_UNSIGNED)
!= (col2->prtype & DATA_UNSIGNED)) {
/* The storage format of an unsigned integer is different
from a signed integer: in a signed integer we OR
0x8000... to the value of positive integers. */
return(FALSE);
}
return(col1->mtype != DATA_INT || col1->len == col2->len);
} | O3 | cpp | cmp_cols_are_equal(dict_col_t const*, dict_col_t const*, unsigned long):
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq %rax, %rcx
shrq $0x20, %rcx
cmpb $0x6, %cl
jb 0xc09d0e
movzbl %cl, %edi
addl $-0xc, %edi
cmpl $0x1, %edi
ja 0xc09dc3
movzbl %cl, %edi
leaq -0x3(%rdi), %r8
cmpq $0x2, %r8
jb 0xc09d99
cmpl $0x5, %edi
sete %r8b
movl %eax, %r9d
shrl $0xa, %r9d
testb %r8b, %r9b
jne 0xc09d86
movq (%rsi), %r8
movq %r8, %r9
shrq $0x20, %r9
cmpb $0x6, %r9b
jb 0xc09d4c
movzbl %r9b, %r10d
addl $-0xc, %r10d
cmpl $0x1, %r10d
ja 0xc09d86
movzbl %r9b, %r9d
leaq -0x3(%r9), %r10
cmpq $0x2, %r10
jb 0xc09d86
cmpl $0x5, %r9d
sete %r9b
movl %r8d, %r10d
shrl $0xa, %r10d
testb %r9b, %r10b
jne 0xc09d86
testq %rdx, %rdx
je 0xc09e1d
xorl %eax, %r8d
testl $0x7fff0000, %r8d # imm = 0x7FFF0000
jmp 0xc09e11
cmpl $0x5, %edi
setne %dl
btl $0xa, %eax
setae %dil
orb %dl, %dil
jne 0xc09dc3
movq (%rsi), %rdi
movq %rdi, %rdx
shrq $0x20, %rdx
movzbl %dl, %r8d
leaq -0x3(%r8), %r9
movb $0x1, %dl
cmpq $0x2, %r9
jb 0xc09e18
cmpl $0x5, %r8d
sete %r8b
shrl $0xa, %edi
testb %r8b, %dil
jne 0xc09e18
movl $0xff, %edx
andl %edx, %ecx
movq (%rsi), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
andl %edx, %edi
cmpl %edi, %ecx
jne 0xc09e16
cmpl $0x6, %ecx
jne 0xc09de9
movl %esi, %ecx
xorl %eax, %ecx
btl $0x9, %ecx
jb 0xc09e16
movabsq $0xff00000000, %rcx # imm = 0xFF00000000
andq %rax, %rcx
movb $0x1, %dl
movabsq $0x600000000, %rdi # imm = 0x600000000
cmpq %rdi, %rcx
jne 0xc09e18
xorq %rax, %rsi
shrq $0x28, %rsi
testw %si, %si
sete %dl
jmp 0xc09e18
xorl %edx, %edx
movzbl %dl, %eax
popq %rbp
retq
movb $0x1, %dl
jmp 0xc09e18
| _Z18cmp_cols_are_equalPK10dict_col_tS1_m:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov rcx, rax
shr rcx, 20h
cmp cl, 6
jb short loc_C09D0E
movzx edi, cl
add edi, 0FFFFFFF4h
cmp edi, 1
ja loc_C09DC3
loc_C09D0E:
movzx edi, cl
lea r8, [rdi-3]
cmp r8, 2
jb short loc_C09D99
cmp edi, 5
setz r8b
mov r9d, eax
shr r9d, 0Ah
test r9b, r8b
jnz short loc_C09D86
mov r8, [rsi]
mov r9, r8
shr r9, 20h
cmp r9b, 6
jb short loc_C09D4C
movzx r10d, r9b
add r10d, 0FFFFFFF4h
cmp r10d, 1
ja short loc_C09D86
loc_C09D4C:
movzx r9d, r9b
lea r10, [r9-3]
cmp r10, 2
jb short loc_C09D86
cmp r9d, 5
setz r9b
mov r10d, r8d
shr r10d, 0Ah
test r10b, r9b
jnz short loc_C09D86
test rdx, rdx
jz loc_C09E1D
xor r8d, eax
test r8d, 7FFF0000h
jmp loc_C09E11
loc_C09D86:
cmp edi, 5
setnz dl
bt eax, 0Ah
setnb dil
or dil, dl
jnz short loc_C09DC3
loc_C09D99:
mov rdi, [rsi]
mov rdx, rdi
shr rdx, 20h
movzx r8d, dl
lea r9, [r8-3]
mov dl, 1
cmp r9, 2
jb short loc_C09E18
cmp r8d, 5
setz r8b
shr edi, 0Ah
test dil, r8b
jnz short loc_C09E18
loc_C09DC3:
mov edx, 0FFh
and ecx, edx
mov rsi, [rsi]
mov rdi, rsi
shr rdi, 20h
and edi, edx
cmp ecx, edi
jnz short loc_C09E16
cmp ecx, 6
jnz short loc_C09DE9
mov ecx, esi
xor ecx, eax
bt ecx, 9
jb short loc_C09E16
loc_C09DE9:
mov rcx, 0FF00000000h
and rcx, rax
mov dl, 1
mov rdi, 600000000h
cmp rcx, rdi
jnz short loc_C09E18
xor rsi, rax
shr rsi, 28h
test si, si
loc_C09E11:
setz dl
jmp short loc_C09E18
loc_C09E16:
xor edx, edx
loc_C09E18:
movzx eax, dl
pop rbp
retn
loc_C09E1D:
mov dl, 1
jmp short loc_C09E18
| long long cmp_cols_are_equal(const dict_col_t *a1, const dict_col_t *a2, long long a3)
{
long long v3; // rax
long long v4; // rcx
unsigned long long v5; // r8
long long v6; // r9
long long v8; // r8
unsigned __int8 v9; // dl
int v10; // ecx
unsigned long long v11; // rsi
v3 = *(_QWORD *)a1;
v4 = HIDWORD(*(_QWORD *)a1);
if ( (unsigned __int8)v4 >= 6u && (unsigned int)(unsigned __int8)v4 - 12 > 1 )
goto LABEL_14;
if ( (unsigned long long)(unsigned __int8)v4 - 3 >= 2 )
{
if ( (((unsigned __int8)v4 == 5) & (unsigned __int8)((unsigned int)v3 >> 10)) == 0 )
{
v5 = *(_QWORD *)a2;
v6 = HIDWORD(*(_QWORD *)a2);
if ( ((unsigned __int8)v6 < 6u || (unsigned int)(unsigned __int8)v6 - 12 <= 1)
&& (unsigned long long)(unsigned __int8)v6 - 3 >= 2
&& (((unsigned __int8)v6 == 5) & (unsigned __int8)((unsigned int)v5 >> 10)) == 0 )
{
if ( !a3 )
return 1;
return (((unsigned int)v3 ^ (unsigned int)v5) & 0x7FFF0000) == 0;
}
}
if ( (unsigned __int8)v4 != 5 || (v3 & 0x400) == 0 )
goto LABEL_14;
}
v8 = (unsigned __int8)BYTE4(*(_QWORD *)a2);
v9 = 1;
if ( (unsigned long long)(v8 - 3) >= 2
&& (((_DWORD)v8 == 5) & (unsigned __int8)((unsigned int)*(_QWORD *)a2 >> 10)) == 0 )
{
LABEL_14:
v10 = (unsigned __int8)BYTE4(*(_QWORD *)a1);
v11 = *(_QWORD *)a2;
if ( v10 != BYTE4(v11) || v10 == 6 && (((unsigned __int16)v3 ^ (unsigned __int16)v11) & 0x200) != 0 )
return 0;
v9 = 1;
if ( (v3 & 0xFF00000000LL) == 0x600000000LL )
return (unsigned __int16)((unsigned int)((v3 ^ v11) >> 32) >> 8) == 0;
}
return v9;
}
| ~PFS_connection_statement_visitor:
PUSH RBP
MOV RBP,RSP
POP RBP
RET
|
/* PFS_connection_statement_visitor::~PFS_connection_statement_visitor() */
void __thiscall
PFS_connection_statement_visitor::~PFS_connection_statement_visitor
(PFS_connection_statement_visitor *this)
{
return;
}
| |
30,584 | my_lengthsp_utf16le | eloqsql/strings/ctype-ucs2.c | static size_t
my_lengthsp_utf16le(CHARSET_INFO *cs __attribute__((unused)),
const char *ptr, size_t length)
{
const char *end= ptr + length;
while (end > ptr + 1 && uint2korr(end - 2) == ' ')
end-= 2;
return (size_t) (end - ptr);
} | O0 | c | my_lengthsp_utf16le:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rdx
addq $0x1, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x21(%rbp)
jbe 0xadbd3
movq -0x20(%rbp), %rax
movzwl -0x2(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0xadbdc
jmp 0xadbea
movq -0x20(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0xadbac
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nopw (%rax,%rax)
| my_lengthsp_utf16le:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_20], rax
loc_ADBAC:
mov rcx, [rbp+var_20]
mov rdx, [rbp+var_10]
add rdx, 1
xor eax, eax
cmp rcx, rdx
mov [rbp+var_21], al
jbe short loc_ADBD3
mov rax, [rbp+var_20]
movzx eax, word ptr [rax-2]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_21], al
loc_ADBD3:
mov al, [rbp+var_21]
test al, 1
jnz short loc_ADBDC
jmp short loc_ADBEA
loc_ADBDC:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_20], rax
jmp short loc_ADBAC
loc_ADBEA:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
sub rax, rcx
pop rbp
retn
| long long my_lengthsp_utf16le(long long a1, long long a2, long long a3)
{
bool v4; // [rsp+1h] [rbp-21h]
unsigned long long i; // [rsp+2h] [rbp-20h]
for ( i = a3 + a2; ; i -= 2LL )
{
v4 = 0;
if ( i > a2 + 1 )
v4 = *(unsigned __int16 *)(i - 2) == 32;
if ( !v4 )
break;
}
return i - a2;
}
| my_lengthsp_utf16le:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
LAB_001adbac:
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x1
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0x21],AL
JBE 0x001adbd3
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + -0x2]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x21],AL
LAB_001adbd3:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x001adbdc
JMP 0x001adbea
LAB_001adbdc:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x2
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001adbac
LAB_001adbea:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
POP RBP
RET
|
long my_lengthsp_utf16le(int8 param_1,long param_2,long param_3)
{
bool bVar1;
int8 local_28;
local_28 = param_2 + param_3;
while( true ) {
bVar1 = false;
if (param_2 + 1U < local_28) {
bVar1 = *(short *)(local_28 - 2) == 0x20;
}
if (!bVar1) break;
local_28 = local_28 - 2;
}
return local_28 - param_2;
}
| |
30,585 | CLI::App::_parse_subcommand(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&) | MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/App_inl.hpp | CLI11_INLINE bool App::_parse_subcommand(std::vector<std::string> &args) {
if(_count_remaining_positionals(/* required */ true) > 0) {
_parse_positional(args, false);
return true;
}
auto *com = _find_subcommand(args.back(), true, true);
if(com != nullptr) {
args.pop_back();
if(!com->silent_) {
parsed_subcommands_.push_back(com);
}
com->_parse(args);
auto *parent_app = com->parent_;
while(parent_app != this) {
parent_app->_trigger_pre_parse(args.size());
if(!com->silent_) {
parent_app->parsed_subcommands_.push_back(com);
}
parent_app = parent_app->parent_;
}
return true;
}
if(parent_ == nullptr)
throw HorribleError("Subcommand " + args.back() + " missing");
return false;
} | O0 | cpp | CLI::App::_parse_subcommand(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movl $0x1, %esi
callq 0x39ab0
cmpq $0x0, %rax
jbe 0x35523
movq -0x80(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x36eb0
movb $0x1, -0x1(%rbp)
jmp 0x356dd
movq -0x18(%rbp), %rdi
callq 0x18780
movq -0x80(%rbp), %rdi
movq %rax, %rsi
movl $0x1, %ecx
movl %ecx, %edx
callq 0x382f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x355fc
movq -0x18(%rbp), %rdi
callq 0x352d0
movq -0x20(%rbp), %rax
testb $0x1, 0x2a1(%rax)
jne 0x35578
movq -0x80(%rbp), %rdi
addq $0x1a8, %rdi # imm = 0x1A8
leaq -0x20(%rbp), %rsi
callq 0x39bf0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x39c60
movq -0x20(%rbp), %rax
movq 0x2c8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x80(%rbp), %rax
cmpq %rax, -0x28(%rbp)
je 0x355f3
movq -0x28(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdi
callq 0x18430
movq -0x88(%rbp), %rdi
movq %rax, %rsi
callq 0x34550
movq -0x20(%rbp), %rax
testb $0x1, 0x2a1(%rax)
jne 0x355e2
movq -0x28(%rbp), %rdi
addq $0x1a8, %rdi # imm = 0x1A8
leaq -0x20(%rbp), %rsi
callq 0x39bf0
movq -0x28(%rbp), %rax
movq 0x2c8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x35594
movb $0x1, -0x1(%rbp)
jmp 0x356dd
movq -0x80(%rbp), %rax
cmpq $0x0, 0x2c8(%rax)
jne 0x356d9
movb $0x1, -0x75(%rbp)
movl $0x38, %edi
callq 0x92d0
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rdi
callq 0x18780
movq %rax, %rdx
leaq 0x3a4fe(%rip), %rsi # 0x6fb34
leaq -0x68(%rbp), %rdi
callq 0x16540
jmp 0x35641
leaq 0x3a4f8(%rip), %rdx # 0x6fb40
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1e250
jmp 0x35657
movq -0x90(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x37b10
jmp 0x35669
movq -0x90(%rbp), %rdi
movb $0x0, -0x75(%rbp)
leaq 0x6bf15(%rip), %rsi # 0xa1590
leaq 0x256e(%rip), %rdx # 0x37bf0
callq 0x9a30
jmp 0x356f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x356c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x356ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x9b90
leaq -0x68(%rbp), %rdi
callq 0x9b90
testb $0x1, -0x75(%rbp)
jne 0x356cb
jmp 0x356d7
movq -0x90(%rbp), %rdi
callq 0x9470
jmp 0x356eb
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x9a70
nopw %cs:(%rax,%rax)
nop
| _ZN3CLI3App17_parse_subcommandERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]; this
mov [rbp+var_80], rdi
mov esi, 1; bool
call _ZNK3CLI3App28_count_remaining_positionalsEb; CLI::App::_count_remaining_positionals(bool)
cmp rax, 0
jbe short loc_35523
mov rdi, [rbp+var_80]
mov rsi, [rbp+var_18]
xor edx, edx
call _ZN3CLI3App17_parse_positionalERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEb; CLI::App::_parse_positional(std::vector<std::string> &,bool)
mov [rbp+var_1], 1
jmp loc_356DD
loc_35523:
mov rdi, [rbp+var_18]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv; std::vector<std::string>::back(void)
mov rdi, [rbp+var_80]
mov rsi, rax
mov ecx, 1
mov edx, ecx
call _ZNK3CLI3App16_find_subcommandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb; CLI::App::_find_subcommand(std::string const&,bool,bool)
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz loc_355FC
mov rdi, [rbp+var_18]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE8pop_backEv; std::vector<std::string>::pop_back(void)
mov rax, [rbp+var_20]
test byte ptr [rax+2A1h], 1
jnz short loc_35578
mov rdi, [rbp+var_80]
add rdi, 1A8h
lea rsi, [rbp+var_20]
call _ZNSt6vectorIPN3CLI3AppESaIS2_EE9push_backERKS2_; std::vector<CLI::App *>::push_back(CLI::App * const&)
loc_35578:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_18]
call _ZN3CLI3App6_parseERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE; CLI::App::_parse(std::vector<std::string> &)
mov rax, [rbp+var_20]
mov rax, [rax+2C8h]
mov [rbp+var_28], rax
loc_35594:
mov rax, [rbp+var_80]
cmp [rbp+var_28], rax
jz short loc_355F3
mov rax, [rbp+var_28]
mov [rbp+var_88], rax
mov rdi, [rbp+var_18]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
mov rdi, [rbp+var_88]; this
mov rsi, rax; unsigned __int64
call _ZN3CLI3App18_trigger_pre_parseEm; CLI::App::_trigger_pre_parse(ulong)
mov rax, [rbp+var_20]
test byte ptr [rax+2A1h], 1
jnz short loc_355E2
mov rdi, [rbp+var_28]
add rdi, 1A8h
lea rsi, [rbp+var_20]
call _ZNSt6vectorIPN3CLI3AppESaIS2_EE9push_backERKS2_; std::vector<CLI::App *>::push_back(CLI::App * const&)
loc_355E2:
mov rax, [rbp+var_28]
mov rax, [rax+2C8h]
mov [rbp+var_28], rax
jmp short loc_35594
loc_355F3:
mov [rbp+var_1], 1
jmp loc_356DD
loc_355FC:
mov rax, [rbp+var_80]
cmp qword ptr [rax+2C8h], 0
jnz loc_356D9
mov [rbp+var_75], 1
mov edi, 38h ; '8'; thrown_size
call ___cxa_allocate_exception
mov [rbp+var_90], rax
mov rdi, [rbp+var_18]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv; std::vector<std::string>::back(void)
mov rdx, rax
lea rsi, aSubcommand_0; "Subcommand "
lea rdi, [rbp+var_68]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
jmp short $+2
loc_35641:
lea rdx, aMissing; " missing"
lea rdi, [rbp+var_48]
lea rsi, [rbp+var_68]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_35657:
mov rdi, [rbp+var_90]
lea rsi, [rbp+var_48]
call _ZN3CLI13HorribleErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::HorribleError::HorribleError(std::string)
jmp short $+2
loc_35669:
mov rdi, [rbp+var_90]; void *
mov [rbp+var_75], 0
lea rsi, _ZTIN3CLI13HorribleErrorE; lptinfo
lea rdx, _ZN3CLI13HorribleErrorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_356F4
mov rcx, rax
mov eax, edx
mov [rbp+var_70], rcx
mov [rbp+var_74], eax
jmp short loc_356C3
mov rcx, rax
mov eax, edx
mov [rbp+var_70], rcx
mov [rbp+var_74], eax
jmp short loc_356BA
mov rcx, rax
mov eax, edx
mov [rbp+var_70], rcx
mov [rbp+var_74], eax
lea rdi, [rbp+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_356BA:
lea rdi, [rbp+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_356C3:
test [rbp+var_75], 1
jnz short loc_356CB
jmp short loc_356D7
loc_356CB:
mov rdi, [rbp+var_90]; void *
call ___cxa_free_exception
loc_356D7:
jmp short loc_356EB
loc_356D9:
mov [rbp+var_1], 0
loc_356DD:
mov al, [rbp+var_1]
and al, 1
add rsp, 90h
pop rbp
retn
loc_356EB:
mov rdi, [rbp+var_70]
call __Unwind_Resume
loc_356F4:
nop word ptr [rax+rax+00000000h]
xchg ax, ax
| char CLI::App::_parse_subcommand(CLI::App *a1, _QWORD *a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rax
void *exception; // [rsp+0h] [rbp-90h]
_BYTE v7[32]; // [rsp+28h] [rbp-68h] BYREF
_BYTE v8[32]; // [rsp+48h] [rbp-48h] BYREF
CLI::App *i; // [rsp+68h] [rbp-28h]
long long subcommand; // [rsp+70h] [rbp-20h] BYREF
_QWORD *v11; // [rsp+78h] [rbp-18h]
CLI::App *v12; // [rsp+80h] [rbp-10h]
char v13; // [rsp+8Fh] [rbp-1h]
v12 = a1;
v11 = a2;
if ( CLI::App::_count_remaining_positionals(a1, 1) )
{
CLI::App::_parse_positional(a1, v11, 0LL);
v13 = 1;
}
else
{
v2 = std::vector<std::string>::back((long long)v11);
subcommand = CLI::App::_find_subcommand(a1, v2, 1LL);
if ( subcommand )
{
std::vector<std::string>::pop_back((long long)v11);
if ( (*(_BYTE *)(subcommand + 673) & 1) == 0 )
std::vector<CLI::App *>::push_back((char *)a1 + 424, &subcommand);
CLI::App::_parse(subcommand, v11);
for ( i = *(CLI::App **)(subcommand + 712); i != a1; i = (CLI::App *)*((_QWORD *)i + 89) )
{
v3 = std::vector<std::string>::size(v11);
CLI::App::_trigger_pre_parse(i, v3);
if ( (*(_BYTE *)(subcommand + 673) & 1) == 0 )
std::vector<CLI::App *>::push_back((char *)i + 424, &subcommand);
}
v13 = 1;
}
else
{
if ( !*((_QWORD *)a1 + 89) )
{
exception = __cxa_allocate_exception(0x38uLL);
v4 = std::vector<std::string>::back((long long)v11);
std::operator+<char>((long long)v7, (long long)"Subcommand ", v4);
std::operator+<char>((long long)v8, (long long)v7, (long long)" missing");
CLI::HorribleError::HorribleError(exception, v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'CLI::HorribleError,
CLI::HorribleError::~HorribleError);
}
v13 = 0;
}
}
return v13 & 1;
}
| _parse_subcommand:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x80],RDI
MOV ESI,0x1
CALL 0x00139ab0
CMP RAX,0x0
JBE 0x00135523
MOV RDI,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RBP + -0x18]
XOR EDX,EDX
CALL 0x00136eb0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001356dd
LAB_00135523:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00118780
MOV RDI,qword ptr [RBP + -0x80]
MOV RSI,RAX
MOV ECX,0x1
MOV EDX,ECX
CALL 0x001382f0
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001355fc
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001352d0
MOV RAX,qword ptr [RBP + -0x20]
TEST byte ptr [RAX + 0x2a1],0x1
JNZ 0x00135578
MOV RDI,qword ptr [RBP + -0x80]
ADD RDI,0x1a8
LEA RSI,[RBP + -0x20]
CALL 0x00139bf0
LAB_00135578:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00139c60
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x2c8]
MOV qword ptr [RBP + -0x28],RAX
LAB_00135594:
MOV RAX,qword ptr [RBP + -0x80]
CMP qword ptr [RBP + -0x28],RAX
JZ 0x001355f3
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x88],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00118430
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,RAX
CALL 0x00134550
MOV RAX,qword ptr [RBP + -0x20]
TEST byte ptr [RAX + 0x2a1],0x1
JNZ 0x001355e2
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x1a8
LEA RSI,[RBP + -0x20]
CALL 0x00139bf0
LAB_001355e2:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x2c8]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00135594
LAB_001355f3:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001356dd
LAB_001355fc:
MOV RAX,qword ptr [RBP + -0x80]
CMP qword ptr [RAX + 0x2c8],0x0
JNZ 0x001356d9
MOV byte ptr [RBP + -0x75],0x1
MOV EDI,0x38
CALL 0x001092d0
MOV qword ptr [RBP + -0x90],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00118780
MOV RDX,RAX
LAB_0013562f:
LEA RSI,[0x16fb34]
LEA RDI,[RBP + -0x68]
CALL 0x00116540
JMP 0x00135641
LAB_00135641:
LEA RDX,[0x16fb40]
LEA RDI,[RBP + -0x48]
LEA RSI,[RBP + -0x68]
CALL 0x0011e250
JMP 0x00135657
LAB_00135657:
MOV RDI,qword ptr [RBP + -0x90]
LEA RSI,[RBP + -0x48]
CALL 0x00137b10
JMP 0x00135669
LAB_00135669:
MOV RDI,qword ptr [RBP + -0x90]
MOV byte ptr [RBP + -0x75],0x0
LEA RSI,[0x1a1590]
LEA RDX,[0x137bf0]
CALL 0x00109a30
LAB_001356d9:
MOV byte ptr [RBP + -0x1],0x0
LAB_001356dd:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x90
POP RBP
RET
|
/* CLI::App::_parse_subcommand(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string
> >&) */
int1 __thiscall CLI::App::_parse_subcommand(App *this,vector *param_1)
{
App *this_00;
long lVar1;
string *psVar2;
ulong uVar3;
HorribleError *pHVar4;
char local_70 [32];
string local_50 [32];
App *local_30;
App *local_28;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_20;
App *local_18;
int1 local_9;
local_20 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1;
local_18 = this;
lVar1 = _count_remaining_positionals(this,true);
if (lVar1 == 0) {
psVar2 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::back(local_20);
local_28 = (App *)_find_subcommand(this,psVar2,true,true);
if (local_28 == (App *)0x0) {
if (*(long *)(this + 0x2c8) == 0) {
pHVar4 = (HorribleError *)__cxa_allocate_exception(0x38);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::back(local_20);
/* try { // try from 0013562f to 0013563e has its CatchHandler @ 00135689 */
std::operator+(local_70,(string *)"Subcommand ");
/* try { // try from 00135641 to 00135654 has its CatchHandler @ 00135697 */
std::operator+(local_50,local_70);
/* try { // try from 00135657 to 00135686 has its CatchHandler @ 001356a5 */
HorribleError::HorribleError(pHVar4,local_50);
/* WARNING: Subroutine does not return */
__cxa_throw(pHVar4,&HorribleError::typeinfo,HorribleError::~HorribleError);
}
local_9 = 0;
}
else {
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::pop_back(local_20);
if (((byte)local_28[0x2a1] & 1) == 0) {
std::vector<CLI::App*,std::allocator<CLI::App*>>::push_back
((vector<CLI::App*,std::allocator<CLI::App*>> *)(this + 0x1a8),&local_28);
}
_parse(local_28,(vector *)local_20);
for (local_30 = *(App **)(local_28 + 0x2c8); this_00 = local_30, local_30 != this;
local_30 = *(App **)(local_30 + 0x2c8)) {
uVar3 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size
(local_20);
_trigger_pre_parse(this_00,uVar3);
if (((byte)local_28[0x2a1] & 1) == 0) {
std::vector<CLI::App*,std::allocator<CLI::App*>>::push_back
((vector<CLI::App*,std::allocator<CLI::App*>> *)(local_30 + 0x1a8),&local_28);
}
}
local_9 = 1;
}
}
else {
_parse_positional(this,(vector *)local_20,false);
local_9 = 1;
}
return local_9;
}
| |
30,586 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) | monkey531[P]llama/common/./json.hpp | reference operator[](size_type idx)
{
// implicitly convert null value to an empty array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value.array = create<array_t>();
assert_invariant();
}
// operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
// fill up array with null values if given idx is outside range
if (idx >= m_data.m_value.array->size())
{
#if JSON_DIAGNOSTICS
// remember array size & capacity before resizing
const auto old_size = m_data.m_value.array->size();
const auto old_capacity = m_data.m_value.array->capacity();
#endif
m_data.m_value.array->resize(idx + 1);
#if JSON_DIAGNOSTICS
if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity))
{
// capacity has changed: update all parents
set_parents();
}
else
{
// set parent for values added above
set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size));
}
#endif
assert_invariant();
}
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, (%rdi)
jne 0x70c08
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x18690
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x3efdc
cmpb $0x2, (%r14)
jne 0x70c4f
movq 0x8(%r14), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
sarq $0x4, %rax
cmpq %rbx, %rax
ja 0x70c38
leaq 0x1(%rbx), %rsi
callq 0x70eb2
movq %r14, %rdi
movl $0x1, %esi
callq 0x3efdc
movq 0x8(%r14), %rax
shlq $0x4, %rbx
addq (%rax), %rbx
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x18360
movq %rax, %rbx
movq %r14, %rdi
callq 0x3f6d8
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4eefe(%rip), %rsi # 0xbfb71
leaq 0x10(%rsp), %rdi
callq 0x66a8e
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x4b700
xorl %ebp, %ebp
leaq 0x8061a(%rip), %rsi # 0xf12b8
leaq -0x22f03(%rip), %rdx # 0x4dda2
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70cd3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x70cd3
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x70ce0
movq %rbx, %rdi
callq 0x18500
movq %r14, %rdi
callq 0x18b90
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
cmp byte ptr [rdi], 0
jnz short loc_70C08
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
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_70C08:
cmp byte ptr [r14], 2
jnz short loc_70C4F
mov rdi, [r14+8]
mov rax, [rdi+8]
sub rax, [rdi]
sar rax, 4
cmp rax, rbx
ja short loc_70C38
lea rsi, [rbx+1]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; std::vector<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>>::resize(ulong)
mov rdi, r14
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_70C38:
mov rax, [r14+8]
shl rbx, 4
add rbx, [rax]
mov rax, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_70C4F:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_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
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_70CD3
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_70CD3
mov r14, rax
mov bpl, 1
loc_70CD3:
test bpl, bpl
jz short loc_70CE0
mov rdi, rbx; void *
call ___cxa_free_exception
loc_70CE0:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
unsigned long long a2)
{
long long v3; // rax
_QWORD *v4; // rdi
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v7; // [rsp+8h] [rbp-40h] BYREF
_QWORD v8[2]; // [rsp+10h] [rbp-38h] BYREF
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 2;
v3 = operator new(0x18uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v3;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
(long long)v8,
(long long)"cannot use operator[] with a numeric argument with ",
&v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
v8);
__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);
}
v4 = *(_QWORD **)(a1 + 8);
if ( (long long)(v4[1] - *v4) >> 4 <= a2 )
{
std::vector<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>>::resize(
v4,
a2 + 1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
return **(_QWORD **)(a1 + 8) + 16 * a2;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
CMP byte ptr [RDI],0x0
JNZ 0x00170c08
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x00118690
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013efdc
LAB_00170c08:
CMP byte ptr [R14],0x2
JNZ 0x00170c4f
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,qword ptr [RDI]
SAR RAX,0x4
CMP RAX,RBX
JA 0x00170c38
LEA RSI,[RBX + 0x1]
CALL 0x00170eb2
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013efdc
LAB_00170c38:
MOV RAX,qword ptr [R14 + 0x8]
SHL RBX,0x4
ADD RBX,qword ptr [RAX]
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00170c4f:
MOV EDI,0x20
CALL 0x00118360
MOV RBX,RAX
MOV RDI,R14
CALL 0x0013f6d8
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00170c6c:
LEA RSI,[0x1bfb71]
LEA RDI,[RSP + 0x10]
CALL 0x00166a8e
MOV BPL,0x1
LAB_00170c80:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0014b700
XOR EBP,EBP
LEA RSI,[0x1f12b8]
LEA RDX,[0x14dda2]
MOV RDI,RBX
CALL 0x00118b30
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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_00;
int8 *puVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
puVar1 = (int8 *)operator_new(0x18);
*puVar1 = 0;
puVar1[1] = 0;
puVar1[2] = 0;
*(int8 **)(this + 8) = puVar1;
assert_invariant(SUB81(this,0));
}
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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 + 8);
if ((ulong)(*(long *)(this_00 + 8) - *(long *)this_00 >> 4) <= param_1) {
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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>>>
::resize(this_00,param_1 + 1);
assert_invariant(SUB81(this,0));
}
return param_1 * 0x10 + **(long **)(this + 8);
}
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 00170c6c to 00170c7c has its CatchHandler @ 00170ccd */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 00170c80 to 00170cac has its CatchHandler @ 00170cad */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
30,587 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [32], char const*>(char const (&) [32], char const*&&) | monkey531[P]llama/common/./json.hpp | inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
} | O1 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [32], char const*>(char const (&) [32], char const*&&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x1b410
movq %rax, %r12
movq (%r14), %rdi
callq 0x1b410
addq %rax, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1be70
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c240
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x1c240
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0xeb7a8
movq (%r13), %rsi
incq %rsi
callq 0x1b930
movq %r14, %rdi
callq 0x1c0d0
| _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_:
push r15
push r14
push r13
push r12
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r13, [rdi+10h]
mov [rdi], r13
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
mov r12, rax
mov rdi, [r14]
call _strlen
add r12, rax
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r14]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_EB7A8
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EB7A8:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // r12
long long v5; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = strlen(a2);
v5 = strlen(*a3);
std::string::reserve(a1, v5 + v4);
std::string::append(a1, a2);
std::string::append(a1, *a3);
return a1;
}
| concat<std::__cxx11::string,char_const(&)[32],char_const*>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R13,[RDI + 0x10]
MOV qword ptr [RDI],R13
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
CALL 0x0011b410
MOV R12,RAX
MOV RDI,qword ptr [R14]
CALL 0x0011b410
ADD R12,RAX
LAB_001eb763:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0011be70
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011c240
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x0011c240
LAB_001eb784:
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [32], char const*>(char const (&) [32], char const*&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[32],char_const*>
(detail *this,char *param_1,char **param_2)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
strlen(param_1);
strlen(*param_2);
/* try { // try from 001eb763 to 001eb783 has its CatchHandler @ 001eb791 */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::append((char *)this);
return this;
}
| |
30,588 | bf_isqrt | bluesky950520[P]quickjs/libbf.c | limb_t bf_isqrt(limb_t a)
{
limb_t s, r;
int k;
if (a == 0)
return 0;
k = clz(a) & ~1;
s = mp_sqrtrem1(&r, a << k);
s >>= (k >> 1);
return s;
} | O1 | c | bf_isqrt:
testq %rdi, %rdi
je 0x8712a
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rsi
bsrq %rdi, %rbx
xorq $0x3f, %rbx
movl %ebx, %ecx
andb $0x3e, %cl
shlq %cl, %rsi
leaq 0x8(%rsp), %rdi
callq 0x8712d
shrl %ebx
movl %ebx, %ecx
shrq %cl, %rax
addq $0x10, %rsp
popq %rbx
retq
xorl %eax, %eax
retq
| bf_isqrt:
test rdi, rdi
jz short loc_8712A
push rbx
sub rsp, 10h
mov rsi, rdi
bsr rbx, rdi
xor rbx, 3Fh
mov ecx, ebx
and cl, 3Eh
shl rsi, cl
lea rdi, [rsp+18h+var_10]
call mp_sqrtrem1
shr ebx, 1
mov ecx, ebx
shr rax, cl
add rsp, 10h
pop rbx
retn
loc_8712A:
xor eax, eax
retn
| unsigned long long bf_isqrt(unsigned long long a1)
{
unsigned long long v1; // rbx
_BYTE v3[16]; // [rsp+0h] [rbp-10h] BYREF
if ( !a1 )
return 0LL;
_BitScanReverse64(&v1, a1);
return (unsigned long long)mp_sqrtrem1(v3, a1 << ((v1 ^ 0x3F) & 0x3E)) >> (((unsigned int)v1 ^ 0x3F) >> 1);
}
| bf_isqrt:
TEST RDI,RDI
JZ 0x0018712a
PUSH RBX
SUB RSP,0x10
MOV RSI,RDI
BSR RBX,RDI
XOR RBX,0x3f
MOV ECX,EBX
AND CL,0x3e
SHL RSI,CL
LEA RDI,[RSP + 0x8]
CALL 0x0018712d
SHR EBX,0x1
MOV ECX,EBX
SHR RAX,CL
ADD RSP,0x10
POP RBX
RET
LAB_0018712a:
XOR EAX,EAX
RET
|
ulong bf_isqrt(ulong param_1)
{
ulong uVar1;
ulong uVar2;
int1 auStack_10 [8];
if (param_1 != 0) {
uVar1 = 0x3f;
if (param_1 != 0) {
for (; param_1 >> uVar1 == 0; uVar1 = uVar1 - 1) {
}
}
uVar2 = mp_sqrtrem1(auStack_10,param_1 << ((byte)(uVar1 ^ 0x3f) & 0x3e));
return uVar2 >> ((byte)((uint)(uVar1 ^ 0x3f) >> 1) & 0x3f);
}
return 0;
}
| |
30,589 | my_xml_parse | eloqsql/strings/xml.c | int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len)
{
my_xml_attr_rewind(p);
p->beg=str;
p->cur=str;
p->end=str+len;
while ( p->cur < p->end )
{
MY_XML_ATTR a;
if (p->cur[0] == '<')
{
int lex;
int question=0;
int exclam=0;
lex=my_xml_scan(p,&a);
if (MY_XML_COMMENT == lex)
continue;
if (lex == MY_XML_CDATA)
{
a.beg+= 9;
a.end-= 3;
my_xml_value(p, a.beg, (size_t) (a.end-a.beg));
continue;
}
lex=my_xml_scan(p,&a);
if (MY_XML_SLASH == lex)
{
if (MY_XML_IDENT != (lex=my_xml_scan(p,&a)))
{
sprintf(p->errstr,"%s unexpected (ident wanted)",lex2str(lex));
return MY_XML_ERROR;
}
if (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
goto gt;
}
if (MY_XML_EXCLAM == lex)
{
lex=my_xml_scan(p,&a);
exclam=1;
}
else if (MY_XML_QUESTION == lex)
{
lex=my_xml_scan(p,&a);
question=1;
}
if (MY_XML_IDENT == lex)
{
p->current_node_type= MY_XML_NODE_TAG;
if (MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg)))
return MY_XML_ERROR;
}
else
{
sprintf(p->errstr,"%s unexpected (ident or '/' wanted)",
lex2str(lex));
return MY_XML_ERROR;
}
while ((MY_XML_IDENT == (lex=my_xml_scan(p,&a))) ||
((MY_XML_STRING == lex && exclam)))
{
MY_XML_ATTR b;
if (MY_XML_EQ == (lex=my_xml_scan(p,&b)))
{
lex=my_xml_scan(p,&b);
if ( (lex == MY_XML_IDENT) || (lex == MY_XML_STRING) )
{
p->current_node_type= MY_XML_NODE_ATTR;
if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) ||
(MY_XML_OK != my_xml_value(p,b.beg,(size_t) (b.end-b.beg))) ||
(MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))))
return MY_XML_ERROR;
}
else
{
sprintf(p->errstr,"%s unexpected (ident or string wanted)",
lex2str(lex));
return MY_XML_ERROR;
}
}
else if (MY_XML_IDENT == lex)
{
p->current_node_type= MY_XML_NODE_ATTR;
if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) ||
(MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))))
return MY_XML_ERROR;
}
else if ((MY_XML_STRING == lex) && exclam)
{
/*
We are in <!DOCTYPE>, e.g.
<!DOCTYPE name SYSTEM "SystemLiteral">
<!DOCTYPE name PUBLIC "PublidLiteral" "SystemLiteral">
Just skip "SystemLiteral" and "PublicidLiteral"
*/
}
else
break;
}
if (lex == MY_XML_SLASH)
{
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
}
gt:
if (question)
{
if (lex != MY_XML_QUESTION)
{
sprintf(p->errstr,"%s unexpected ('?' wanted)",lex2str(lex));
return MY_XML_ERROR;
}
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
}
if (exclam)
{
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
}
if (lex != MY_XML_GT)
{
sprintf(p->errstr,"%s unexpected ('>' wanted)",lex2str(lex));
return MY_XML_ERROR;
}
}
else
{
a.beg=p->cur;
for ( ; (p->cur < p->end) && (p->cur[0] != '<') ; p->cur++);
a.end=p->cur;
if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION))
my_xml_norm_text(&a);
if (a.beg != a.end)
{
my_xml_value(p,a.beg,(size_t) (a.end-a.beg));
}
}
}
if (p->attr.start[0])
{
sprintf(p->errstr,"unexpected END-OF-INPUT");
return MY_XML_ERROR;
}
return MY_XML_OK;
} | O3 | c | my_xml_parse:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x118(%rdi), %rcx
movq %rcx, 0x120(%rdi)
movq %rsi, 0x128(%rdi)
movq %rsi, 0x130(%rdi)
leaq (%rsi,%rdx), %rax
movq %rax, 0x138(%rdi)
testq %rdx, %rdx
jle 0x5b2f5
leaq -0x40(%rbp), %r15
cmpb $0x3c, (%rsi)
jne 0x5b037
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5b3bf
cmpl $0x43, %eax
je 0x5b2d7
cmpl $0x44, %eax
jne 0x5b09c
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0x5b2d7
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq $0x9, %rsi
subq %rsi, %rdx
addq $-0x3, %rdx
jmp 0x5b092
movq %rsi, -0x40(%rbp)
movq %rsi, %rdx
cmpq %rax, %rsi
jae 0x5b05d
subq %rsi, %rax
movq %rsi, %rdx
cmpb $0x3c, (%rdx)
je 0x5b05d
incq %rdx
movq %rdx, 0x130(%rbx)
decq %rax
jne 0x5b049
movq %rdx, -0x38(%rbp)
testb $0x2, (%rbx)
jne 0x5b076
movq %r15, %rdi
callq 0x5b9f7
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
cmpq %rdx, %rsi
je 0x5b2d7
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0x5b2d7
subq %rsi, %rdx
movq %rbx, %rdi
callq *%rax
jmp 0x5b2d7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5b3bf
cmpl $0x2f, %eax
jne 0x5b0ee
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5b3bf
cmpl $0x49, %eax
jne 0x5b355
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0x5b6bd
testl %eax, %eax
jne 0x5b3a7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5b3bf
movl %eax, %r13d
jmp 0x5b2d1
movl %eax, %r14d
cmpl $0x21, %eax
sete %r12b
cmpl $0x3f, %eax
je 0x5b103
cmpl $0x21, %r14d
jne 0x5b110
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5b3bf
jmp 0x5b116
movb $0x1, %r12b
movl %r14d, %eax
cmpl $0x49, %eax
jne 0x5b341
movl $0x0, 0x4(%rbx)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0x5b880
testl %eax, %eax
jne 0x5b3a7
movb %r12b, -0x29(%rbp)
movl %r14d, %r12d
xorl $0x21, %r12d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5b3bf
movl %eax, %r13d
xorl $0x53, %eax
orl %r12d, %eax
sete %al
cmpl $0x49, %r13d
je 0x5b171
testb %al, %al
je 0x5b25a
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0x5b3bf
cmpl $0x49, %eax
je 0x5b1ff
movl %eax, %r13d
cmpl $0x3d, %eax
jne 0x5b23e
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0x5b3bf
cmpl $0x53, %eax
je 0x5b1a8
cmpl $0x49, %eax
jne 0x5b369
movl $0x1, 0x4(%rbx)
movq -0x40(%rbp), %r13
movq -0x38(%rbp), %r15
subq %r13, %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x5b880
testl %eax, %eax
jne 0x5b3a7
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0x5b1f4
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq *%rax
testl %eax, %eax
jne 0x5b3a7
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
jmp 0x5b230
movl $0x1, 0x4(%rbx)
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r13
subq %r15, %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x5b880
testl %eax, %eax
jne 0x5b3a7
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x5b6bd
testl %eax, %eax
je 0x5b24a
jmp 0x5b3a7
cmpl $0x21, %r14d
jne 0x5b256
cmpl $0x53, %r13d
jne 0x5b256
movq %rbx, %rdi
leaq -0x40(%rbp), %r15
jmp 0x5b14f
leaq -0x40(%rbp), %r15
cmpl $0x2f, %r13d
movb -0x29(%rbp), %r12b
jne 0x5b286
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5b6bd
testl %eax, %eax
jne 0x5b3a7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5b3bf
movl %eax, %r13d
testb %r12b, %r12b
jne 0x5b2b7
cmpl $0x3f, %r13d
jne 0x5b37d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5b6bd
testl %eax, %eax
jne 0x5b3a7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5b3bf
movl %eax, %r13d
cmpl $0x21, %r14d
jne 0x5b2d1
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5b6bd
testl %eax, %eax
jne 0x5b3a7
cmpl $0x3e, %r13d
jne 0x5b32c
movq 0x130(%rbx), %rsi
movq 0x138(%rbx), %rax
cmpq %rax, %rsi
jb 0x5aff0
movq 0x118(%rbx), %rcx
cmpb $0x0, (%rcx)
je 0x5b324
addq $0x8, %rbx
leaq 0x560b(%rip), %rcx # 0x60910
movl $0x1, %r14d
movl $0x80, %edx
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x241f0
jmp 0x5b3ad
xorl %r14d, %r14d
jmp 0x5b3ad
addq $0x8, %rbx
movl %r13d, %edi
callq 0x5b622
leaq 0x55b6(%rip), %rcx # 0x608f5
jmp 0x5b390
addq $0x8, %rbx
movl %eax, %edi
callq 0x5b622
leaq 0x553c(%rip), %rcx # 0x6088f
jmp 0x5b390
addq $0x8, %rbx
movl %eax, %edi
callq 0x5b622
leaq 0x550b(%rip), %rcx # 0x60872
jmp 0x5b390
addq $0x8, %rbx
movl %eax, %edi
callq 0x5b622
leaq 0x5538(%rip), %rcx # 0x608b3
jmp 0x5b390
addq $0x8, %rbx
movl %r13d, %edi
callq 0x5b622
leaq 0x554a(%rip), %rcx # 0x608da
movl $0x80, %edx
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %r8
xorl %eax, %eax
callq 0x241f0
movl $0x1, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_xml_parse:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov rcx, [rdi+118h]
mov [rdi+120h], rcx
mov [rdi+128h], rsi
mov [rdi+130h], rsi
lea rax, [rsi+rdx]
mov [rdi+138h], rax
test rdx, rdx
jle loc_5B2F5
lea r15, [rbp+var_40]
loc_5AFF0:
cmp byte ptr [rsi], 3Ch ; '<'
jnz short loc_5B037
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 43h ; 'C'
jz loc_5B2D7
cmp eax, 44h ; 'D'
jnz loc_5B09C
mov rax, [rbx+150h]
test rax, rax
jz loc_5B2D7
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
add rsi, 9
sub rdx, rsi
add rdx, 0FFFFFFFFFFFFFFFDh
jmp short loc_5B092
loc_5B037:
mov [rbp+var_40], rsi
mov rdx, rsi
cmp rsi, rax
jnb short loc_5B05D
sub rax, rsi
mov rdx, rsi
loc_5B049:
cmp byte ptr [rdx], 3Ch ; '<'
jz short loc_5B05D
inc rdx
mov [rbx+130h], rdx
dec rax
jnz short loc_5B049
loc_5B05D:
mov [rbp+var_38], rdx
test byte ptr [rbx], 2
jnz short loc_5B076
mov rdi, r15
call my_xml_norm_text
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
loc_5B076:
cmp rsi, rdx
jz loc_5B2D7
mov rax, [rbx+150h]
test rax, rax
jz loc_5B2D7
sub rdx, rsi
loc_5B092:
mov rdi, rbx
call rax
jmp loc_5B2D7
loc_5B09C:
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 2Fh ; '/'
jnz short loc_5B0EE
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 49h ; 'I'
jnz loc_5B355
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
sub rdx, rsi
mov rdi, rbx
call my_xml_leave
test eax, eax
jnz loc_5B3A7
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
jmp loc_5B2D1
loc_5B0EE:
mov r14d, eax
cmp eax, 21h ; '!'
setz r12b
cmp eax, 3Fh ; '?'
jz short loc_5B103
cmp r14d, 21h ; '!'
jnz short loc_5B110
loc_5B103:
mov rdi, rbx
mov rsi, r15
call my_xml_scan
jmp short loc_5B116
loc_5B110:
mov r12b, 1
mov eax, r14d
loc_5B116:
cmp eax, 49h ; 'I'
jnz loc_5B341
mov dword ptr [rbx+4], 0
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
sub rdx, rsi
mov rdi, rbx
call my_xml_enter
test eax, eax
jnz loc_5B3A7
mov [rbp+var_29], r12b
mov r12d, r14d
xor r12d, 21h
mov rdi, rbx
loc_5B14F:
mov rsi, r15
call my_xml_scan
mov r13d, eax
xor eax, 53h
or eax, r12d
setz al
cmp r13d, 49h ; 'I'
jz short loc_5B171
test al, al
jz loc_5B25A
loc_5B171:
mov rdi, rbx
lea rsi, [rbp+var_50]
call my_xml_scan
cmp eax, 49h ; 'I'
jz short loc_5B1FF
mov r13d, eax
cmp eax, 3Dh ; '='
jnz loc_5B23E
mov rdi, rbx
lea rsi, [rbp+var_50]
call my_xml_scan
cmp eax, 53h ; 'S'
jz short loc_5B1A8
cmp eax, 49h ; 'I'
jnz loc_5B369
loc_5B1A8:
mov dword ptr [rbx+4], 1
mov r13, [rbp+var_40]
mov r15, [rbp+var_38]
sub r15, r13
mov rdi, rbx
mov rsi, r13
mov rdx, r15
call my_xml_enter
test eax, eax
jnz loc_5B3A7
mov rax, [rbx+150h]
test rax, rax
jz short loc_5B1F4
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_48]
sub rdx, rsi
mov rdi, rbx
call rax
test eax, eax
jnz loc_5B3A7
loc_5B1F4:
mov rdi, rbx
mov rsi, r13
mov rdx, r15
jmp short loc_5B230
loc_5B1FF:
mov dword ptr [rbx+4], 1
mov r15, [rbp+var_40]
mov r13, [rbp+var_38]
sub r13, r15
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call my_xml_enter
test eax, eax
jnz loc_5B3A7
mov rdi, rbx
mov rsi, r15
mov rdx, r13
loc_5B230:
call my_xml_leave
test eax, eax
jz short loc_5B24A
jmp loc_5B3A7
loc_5B23E:
cmp r14d, 21h ; '!'
jnz short loc_5B256
cmp r13d, 53h ; 'S'
jnz short loc_5B256
loc_5B24A:
mov rdi, rbx
lea r15, [rbp+var_40]
jmp loc_5B14F
loc_5B256:
lea r15, [rbp+var_40]
loc_5B25A:
cmp r13d, 2Fh ; '/'
mov r12b, [rbp+var_29]
jnz short loc_5B286
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_5B3A7
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
loc_5B286:
test r12b, r12b
jnz short loc_5B2B7
cmp r13d, 3Fh ; '?'
jnz loc_5B37D
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_5B3A7
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
loc_5B2B7:
cmp r14d, 21h ; '!'
jnz short loc_5B2D1
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_5B3A7
loc_5B2D1:
cmp r13d, 3Eh ; '>'
jnz short loc_5B32C
loc_5B2D7:
mov rsi, [rbx+130h]
mov rax, [rbx+138h]
cmp rsi, rax
jb loc_5AFF0
mov rcx, [rbx+118h]
loc_5B2F5:
cmp byte ptr [rcx], 0
jz short loc_5B324
add rbx, 8
lea rcx, aUnexpectedEndO; "unexpected END-OF-INPUT"
mov r14d, 1
mov edx, 80h
mov rdi, rbx
mov esi, 1
xor eax, eax
call ___sprintf_chk
jmp loc_5B3AD
loc_5B324:
xor r14d, r14d
jmp loc_5B3AD
loc_5B32C:
add rbx, 8
mov edi, r13d
call lex2str
lea rcx, aSUnexpectedWan; "%s unexpected ('>' wanted)"
jmp short loc_5B390
loc_5B341:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde; "%s unexpected (ident or '/' wanted)"
jmp short loc_5B390
loc_5B355:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde_0; "%s unexpected (ident wanted)"
jmp short loc_5B390
loc_5B369:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde_1; "%s unexpected (ident or string wanted)"
jmp short loc_5B390
loc_5B37D:
add rbx, 8
mov edi, r13d
call lex2str
lea rcx, aSUnexpectedWan_0; "%s unexpected ('?' wanted)"
loc_5B390:
mov edx, 80h
mov rdi, rbx
mov esi, 1
mov r8, rax
xor eax, eax
call ___sprintf_chk
loc_5B3A7:
mov r14d, 1
loc_5B3AD:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_xml_parse(long long a1, _BYTE *a2, long long a3)
{
_BYTE *v4; // rcx
_BYTE *v5; // rax
int v6; // eax
void ( *v7)(long long, _BYTE *, long long); // rax
long long v8; // rdx
_BYTE *v9; // rdx
long long v10; // rax
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // r13d
unsigned int v14; // r14d
bool v15; // r12
long long i; // rdi
unsigned int v17; // eax
unsigned int v18; // eax
_BYTE *v19; // r13
long long v20; // r15
unsigned int ( *v21)(long long, _QWORD, _QWORD); // rax
long long v22; // rdi
_BYTE *v23; // rsi
long long v24; // rdx
_BYTE *v25; // r15
long long v26; // r13
bool v27; // r12
unsigned int v28; // r14d
long long v29; // rax
long long v30; // rax
long long v31; // rax
long long v32; // rax
long long v33; // rax
_QWORD v35[2]; // [rsp+0h] [rbp-50h] BYREF
_BYTE *v36; // [rsp+10h] [rbp-40h] BYREF
_BYTE *v37; // [rsp+18h] [rbp-38h]
bool v38; // [rsp+27h] [rbp-29h]
v4 = *(_BYTE **)(a1 + 280);
*(_QWORD *)(a1 + 288) = v4;
*(_QWORD *)(a1 + 296) = a2;
*(_QWORD *)(a1 + 304) = a2;
v5 = &a2[a3];
*(_QWORD *)(a1 + 312) = &a2[a3];
if ( a3 <= 0 )
goto LABEL_57;
while ( *a2 != 60 )
{
v36 = a2;
v9 = a2;
if ( a2 < v5 )
{
v10 = v5 - a2;
v9 = a2;
do
{
if ( *v9 == 60 )
break;
*(_QWORD *)(a1 + 304) = ++v9;
--v10;
}
while ( v10 );
}
v37 = v9;
if ( (*(_BYTE *)a1 & 2) == 0 )
{
my_xml_norm_text(&v36);
a2 = v36;
v9 = v37;
}
if ( a2 != v9 )
{
v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336);
if ( v7 )
{
v8 = v9 - a2;
LABEL_16:
v7(a1, a2, v8);
}
}
LABEL_55:
a2 = *(_BYTE **)(a1 + 304);
v5 = *(_BYTE **)(a1 + 312);
if ( a2 >= v5 )
{
v4 = *(_BYTE **)(a1 + 280);
LABEL_57:
if ( *v4 )
{
v28 = 1;
__sprintf_chk(a1 + 8, 1LL, 128LL, "unexpected END-OF-INPUT");
}
else
{
return 0;
}
return v28;
}
}
v6 = my_xml_scan(a1, &v36);
if ( v6 == 67 )
goto LABEL_55;
if ( v6 == 68 )
{
v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336);
if ( !v7 )
goto LABEL_55;
a2 = v36 + 9;
v8 = v37 - (v36 + 9) - 3;
goto LABEL_16;
}
v11 = my_xml_scan(a1, &v36);
if ( v11 == 47 )
{
v12 = my_xml_scan(a1, &v36);
if ( v12 == 73 )
{
if ( !(unsigned int)my_xml_leave(a1, v36, v37 - v36) )
{
v13 = my_xml_scan(a1, &v36);
goto LABEL_54;
}
}
else
{
v31 = lex2str(v12);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident wanted)", v31);
}
return 1;
}
v14 = v11;
v15 = v11 == 33;
if ( v11 == 63 || v11 == 33 )
v11 = my_xml_scan(a1, &v36);
else
v15 = 1;
if ( v11 != 73 )
{
v30 = lex2str(v11);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or '/' wanted)", v30);
return 1;
}
*(_DWORD *)(a1 + 4) = 0;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v38 = v15;
for ( i = a1; ; i = a1 )
{
v13 = my_xml_scan(i, &v36);
if ( v13 != 73 )
{
if ( v14 ^ 0x21 | v13 ^ 0x53 )
break;
}
v17 = my_xml_scan(a1, v35);
if ( v17 == 73 )
{
*(_DWORD *)(a1 + 4) = 1;
v25 = v36;
v26 = v37 - v36;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v22 = a1;
v23 = v25;
v24 = v26;
LABEL_40:
if ( (unsigned int)my_xml_leave(v22, v23, v24) )
return 1;
continue;
}
v13 = v17;
if ( v17 == 61 )
{
v18 = my_xml_scan(a1, v35);
if ( v18 != 83 && v18 != 73 )
{
v32 = lex2str(v18);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or string wanted)", v32);
return 1;
}
*(_DWORD *)(a1 + 4) = 1;
v19 = v36;
v20 = v37 - v36;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v21 = *(unsigned int ( **)(long long, _QWORD, _QWORD))(a1 + 336);
if ( v21 )
{
if ( v21(a1, v35[0], v35[1] - v35[0]) )
return 1;
}
v22 = a1;
v23 = v19;
v24 = v20;
goto LABEL_40;
}
if ( v14 != 33 || v17 != 83 )
break;
}
v27 = v38;
if ( v13 == 47 )
{
if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) )
return 1;
v13 = my_xml_scan(a1, &v36);
}
if ( v27 )
goto LABEL_52;
if ( v13 == 63 )
{
if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) )
return 1;
v13 = my_xml_scan(a1, &v36);
LABEL_52:
if ( v14 != 33 || !(unsigned int)my_xml_leave(a1, 0LL, 0LL) )
{
LABEL_54:
if ( v13 == 62 )
goto LABEL_55;
v29 = lex2str(v13);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('>' wanted)", v29);
}
}
else
{
v33 = lex2str(v13);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('?' wanted)", v33);
}
return 1;
}
| my_xml_parse:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RCX,qword ptr [RDI + 0x118]
MOV qword ptr [RDI + 0x120],RCX
MOV qword ptr [RDI + 0x128],RSI
MOV qword ptr [RDI + 0x130],RSI
LEA RAX,[RSI + RDX*0x1]
MOV qword ptr [RDI + 0x138],RAX
TEST RDX,RDX
JLE 0x0015b2f5
LEA R15,[RBP + -0x40]
LAB_0015aff0:
CMP byte ptr [RSI],0x3c
JNZ 0x0015b037
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015b3bf
CMP EAX,0x43
JZ 0x0015b2d7
CMP EAX,0x44
JNZ 0x0015b09c
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x0015b2d7
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
ADD RSI,0x9
SUB RDX,RSI
ADD RDX,-0x3
JMP 0x0015b092
LAB_0015b037:
MOV qword ptr [RBP + -0x40],RSI
MOV RDX,RSI
CMP RSI,RAX
JNC 0x0015b05d
SUB RAX,RSI
MOV RDX,RSI
LAB_0015b049:
CMP byte ptr [RDX],0x3c
JZ 0x0015b05d
INC RDX
MOV qword ptr [RBX + 0x130],RDX
DEC RAX
JNZ 0x0015b049
LAB_0015b05d:
MOV qword ptr [RBP + -0x38],RDX
TEST byte ptr [RBX],0x2
JNZ 0x0015b076
MOV RDI,R15
CALL 0x0015b9f7
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
LAB_0015b076:
CMP RSI,RDX
JZ 0x0015b2d7
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x0015b2d7
SUB RDX,RSI
LAB_0015b092:
MOV RDI,RBX
CALL RAX
JMP 0x0015b2d7
LAB_0015b09c:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015b3bf
CMP EAX,0x2f
JNZ 0x0015b0ee
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015b3bf
CMP EAX,0x49
JNZ 0x0015b355
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
SUB RDX,RSI
MOV RDI,RBX
CALL 0x0015b6bd
TEST EAX,EAX
JNZ 0x0015b3a7
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015b3bf
MOV R13D,EAX
JMP 0x0015b2d1
LAB_0015b0ee:
MOV R14D,EAX
CMP EAX,0x21
SETZ R12B
CMP EAX,0x3f
JZ 0x0015b103
CMP R14D,0x21
JNZ 0x0015b110
LAB_0015b103:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015b3bf
JMP 0x0015b116
LAB_0015b110:
MOV R12B,0x1
MOV EAX,R14D
LAB_0015b116:
CMP EAX,0x49
JNZ 0x0015b341
MOV dword ptr [RBX + 0x4],0x0
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
SUB RDX,RSI
MOV RDI,RBX
CALL 0x0015b880
TEST EAX,EAX
JNZ 0x0015b3a7
MOV byte ptr [RBP + -0x29],R12B
MOV R12D,R14D
XOR R12D,0x21
MOV RDI,RBX
LAB_0015b14f:
MOV RSI,R15
CALL 0x0015b3bf
MOV R13D,EAX
XOR EAX,0x53
OR EAX,R12D
SETZ AL
CMP R13D,0x49
JZ 0x0015b171
TEST AL,AL
JZ 0x0015b25a
LAB_0015b171:
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
CALL 0x0015b3bf
CMP EAX,0x49
JZ 0x0015b1ff
MOV R13D,EAX
CMP EAX,0x3d
JNZ 0x0015b23e
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
CALL 0x0015b3bf
CMP EAX,0x53
JZ 0x0015b1a8
CMP EAX,0x49
JNZ 0x0015b369
LAB_0015b1a8:
MOV dword ptr [RBX + 0x4],0x1
MOV R13,qword ptr [RBP + -0x40]
MOV R15,qword ptr [RBP + -0x38]
SUB R15,R13
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
CALL 0x0015b880
TEST EAX,EAX
JNZ 0x0015b3a7
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x0015b1f4
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
SUB RDX,RSI
MOV RDI,RBX
CALL RAX
TEST EAX,EAX
JNZ 0x0015b3a7
LAB_0015b1f4:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
JMP 0x0015b230
LAB_0015b1ff:
MOV dword ptr [RBX + 0x4],0x1
MOV R15,qword ptr [RBP + -0x40]
MOV R13,qword ptr [RBP + -0x38]
SUB R13,R15
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x0015b880
TEST EAX,EAX
JNZ 0x0015b3a7
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
LAB_0015b230:
CALL 0x0015b6bd
TEST EAX,EAX
JZ 0x0015b24a
JMP 0x0015b3a7
LAB_0015b23e:
CMP R14D,0x21
JNZ 0x0015b256
CMP R13D,0x53
JNZ 0x0015b256
LAB_0015b24a:
MOV RDI,RBX
LEA R15,[RBP + -0x40]
JMP 0x0015b14f
LAB_0015b256:
LEA R15,[RBP + -0x40]
LAB_0015b25a:
CMP R13D,0x2f
MOV R12B,byte ptr [RBP + -0x29]
JNZ 0x0015b286
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0015b6bd
TEST EAX,EAX
JNZ 0x0015b3a7
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015b3bf
MOV R13D,EAX
LAB_0015b286:
TEST R12B,R12B
JNZ 0x0015b2b7
CMP R13D,0x3f
JNZ 0x0015b37d
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0015b6bd
TEST EAX,EAX
JNZ 0x0015b3a7
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015b3bf
MOV R13D,EAX
LAB_0015b2b7:
CMP R14D,0x21
JNZ 0x0015b2d1
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0015b6bd
TEST EAX,EAX
JNZ 0x0015b3a7
LAB_0015b2d1:
CMP R13D,0x3e
JNZ 0x0015b32c
LAB_0015b2d7:
MOV RSI,qword ptr [RBX + 0x130]
MOV RAX,qword ptr [RBX + 0x138]
CMP RSI,RAX
JC 0x0015aff0
MOV RCX,qword ptr [RBX + 0x118]
LAB_0015b2f5:
CMP byte ptr [RCX],0x0
JZ 0x0015b324
ADD RBX,0x8
LEA RCX,[0x160910]
MOV R14D,0x1
MOV EDX,0x80
MOV RDI,RBX
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001241f0
JMP 0x0015b3ad
LAB_0015b324:
XOR R14D,R14D
JMP 0x0015b3ad
LAB_0015b32c:
ADD RBX,0x8
MOV EDI,R13D
CALL 0x0015b622
LEA RCX,[0x1608f5]
JMP 0x0015b390
LAB_0015b341:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x0015b622
LEA RCX,[0x16088f]
JMP 0x0015b390
LAB_0015b355:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x0015b622
LEA RCX,[0x160872]
JMP 0x0015b390
LAB_0015b369:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x0015b622
LEA RCX,[0x1608b3]
JMP 0x0015b390
LAB_0015b37d:
ADD RBX,0x8
MOV EDI,R13D
CALL 0x0015b622
LEA RCX,[0x1608da]
LAB_0015b390:
MOV EDX,0x80
MOV RDI,RBX
MOV ESI,0x1
MOV R8,RAX
XOR EAX,EAX
CALL 0x001241f0
LAB_0015b3a7:
MOV R14D,0x1
LAB_0015b3ad:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Type propagation algorithm not settling */
bool my_xml_parse(byte *param_1,char *param_2,long param_3)
{
char cVar1;
int iVar2;
int iVar3;
code *pcVar4;
int8 uVar5;
char *pcVar6;
char *pcVar7;
long lVar8;
bool bVar9;
long local_58;
long local_50;
char *local_48;
char *local_40;
char local_31;
pcVar7 = *(char **)(param_1 + 0x118);
*(char **)(param_1 + 0x120) = pcVar7;
*(char **)(param_1 + 0x128) = param_2;
*(char **)(param_1 + 0x130) = param_2;
pcVar6 = param_2 + param_3;
*(char **)(param_1 + 0x138) = pcVar6;
if (0 < param_3) {
do {
if (*param_2 == '<') {
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x43) {
if (iVar2 == 0x44) {
pcVar4 = *(code **)(param_1 + 0x150);
if (pcVar4 != (code *)0x0) {
pcVar7 = local_40 + (-3 - (long)(local_48 + 9));
pcVar6 = local_48 + 9;
goto LAB_0015b092;
}
}
else {
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x2f) {
bVar9 = iVar2 == 0x21;
if ((iVar2 == 0x3f) || (iVar2 == 0x21)) {
iVar3 = my_xml_scan(param_1,&local_48);
}
else {
bVar9 = true;
iVar3 = iVar2;
}
if (iVar3 == 0x49) {
param_1[4] = 0;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
iVar3 = my_xml_enter(param_1,local_48,(long)local_40 - (long)local_48);
local_31 = bVar9;
do {
if (iVar3 != 0) {
return true;
}
LAB_0015b14f:
iVar3 = my_xml_scan(param_1,&local_48);
if ((iVar3 != 0x49) && (iVar3 != 0x53 || iVar2 != 0x21)) goto LAB_0015b25a;
iVar3 = my_xml_scan(param_1,&local_58);
pcVar6 = local_48;
if (iVar3 == 0x49) {
param_1[4] = 1;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
lVar8 = (long)local_40 - (long)local_48;
iVar3 = my_xml_enter(param_1,local_48,lVar8);
goto joined_r0x0015b221;
}
if (iVar3 != 0x3d) goto LAB_0015b23e;
iVar3 = my_xml_scan(param_1,&local_58);
pcVar6 = local_48;
if ((iVar3 != 0x53) && (iVar3 != 0x49)) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (ident or string wanted)";
goto LAB_0015b390;
}
param_1[4] = 1;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
lVar8 = (long)local_40 - (long)local_48;
iVar3 = my_xml_enter(param_1,local_48,lVar8);
if (iVar3 != 0) {
return true;
}
if (*(code **)(param_1 + 0x150) != (code *)0x0) {
iVar3 = (**(code **)(param_1 + 0x150))(param_1,local_58,local_50 - local_58);
joined_r0x0015b221:
if (iVar3 != 0) {
return true;
}
}
iVar3 = my_xml_leave(param_1,pcVar6,lVar8);
} while( true );
}
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (ident or \'/\' wanted)";
LAB_0015b390:
__sprintf_chk(param_1 + 8,1,0x80,pcVar6,uVar5);
return true;
}
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x49) {
uVar5 = lex2str(iVar2);
pcVar6 = "%s unexpected (ident wanted)";
goto LAB_0015b390;
}
iVar2 = my_xml_leave(param_1,local_48,(long)local_40 - (long)local_48);
if (iVar2 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
LAB_0015b2d1:
if (iVar3 != 0x3e) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (\'>\' wanted)";
goto LAB_0015b390;
}
}
}
}
else {
local_40 = param_2;
if (param_2 < pcVar6) {
lVar8 = (long)pcVar6 - (long)param_2;
do {
if (*local_40 == '<') break;
local_40 = local_40 + 1;
*(char **)(param_1 + 0x130) = local_40;
lVar8 = lVar8 + -1;
} while (lVar8 != 0);
}
local_48 = param_2;
if ((*param_1 & 2) == 0) {
my_xml_norm_text(&local_48);
}
if ((local_48 != local_40) && (pcVar4 = *(code **)(param_1 + 0x150), pcVar4 != (code *)0x0))
{
pcVar7 = local_40 + -(long)local_48;
pcVar6 = local_48;
LAB_0015b092:
(*pcVar4)(param_1,pcVar6,pcVar7);
}
}
param_2 = *(char **)(param_1 + 0x130);
pcVar6 = *(char **)(param_1 + 0x138);
} while (param_2 < pcVar6);
pcVar7 = *(char **)(param_1 + 0x118);
}
cVar1 = *pcVar7;
if (cVar1 != '\0') {
__sprintf_chk(param_1 + 8,1,0x80,"unexpected END-OF-INPUT");
}
return cVar1 != '\0';
LAB_0015b23e:
if ((iVar2 != 0x21) || (iVar3 != 0x53)) {
LAB_0015b25a:
cVar1 = local_31;
if (iVar3 == 0x2f) {
iVar3 = my_xml_leave(param_1,0,0);
if (iVar3 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
}
if (cVar1 == '\0') {
if (iVar3 != 0x3f) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (\'?\' wanted)";
goto LAB_0015b390;
}
iVar3 = my_xml_leave(param_1,0,0);
if (iVar3 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
}
if ((iVar2 == 0x21) && (iVar2 = my_xml_leave(param_1,0,0), iVar2 != 0)) {
return true;
}
goto LAB_0015b2d1;
}
goto LAB_0015b14f;
}
| |
30,590 | my_instr_bin | eloqsql/strings/ctype-bin.c | static
uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)),
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch)
{
register const uchar *str, *search, *end, *search_end;
if (s_length <= b_length)
{
if (!s_length)
{
if (nmatch)
{
match->beg= 0;
match->end= 0;
match->mb_len= 0;
}
return 1; /* Empty string is always found */
}
str= (const uchar*) b;
search= (const uchar*) s;
end= (const uchar*) b+b_length-s_length+1;
search_end= (const uchar*) s + s_length;
skip:
while (str != end)
{
if ( (*str++) == (*search))
{
register const uchar *i,*j;
i= str;
j= search+1;
while (j != search_end)
if ((*i++) != (*j++))
goto skip;
if (nmatch > 0)
{
match[0].beg= 0;
match[0].end= (uint) (str- (const uchar*)b-1);
match[0].mb_len= match[0].end;
if (nmatch > 1)
{
match[1].beg= match[0].end;
match[1].end= (uint)(match[0].end+s_length);
match[1].mb_len= match[1].end-match[1].beg;
}
}
return 2;
}
}
}
return 0;
} | O3 | c | my_instr_bin:
xorl %eax, %eax
cmpq %rdx, %r8
ja 0x5e7be
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movl 0x10(%rbp), %r10d
testq %r8, %r8
je 0x5e789
addq %rsi, %rdx
subq %r8, %rdx
incq %rdx
movq %rsi, %rdi
cmpq %rdx, %rdi
je 0x5e7b8
movq %rdi, %r11
incq %rdi
movb (%r11), %bl
cmpb (%rcx), %bl
jne 0x5e720
movl $0x1, %ebx
cmpq %rbx, %r8
je 0x5e753
movb (%r11,%rbx), %r14b
leaq 0x1(%rbx), %r15
cmpb (%rcx,%rbx), %r14b
movq %r15, %rbx
je 0x5e73b
jmp 0x5e720
movl $0x2, %eax
testl %r10d, %r10d
je 0x5e7b8
movl $0x0, (%r9)
notl %esi
addl %esi, %edi
movl %edi, 0x4(%r9)
movl %edi, 0x8(%r9)
cmpl $0x1, %r10d
je 0x5e7b8
movl %edi, 0xc(%r9)
addl %r8d, %edi
movl $0x14, %ecx
movl $0x10, %edx
jmp 0x5e7a9
testl %r10d, %r10d
je 0x5e7b3
movl $0x0, (%r9)
movl $0x1, %eax
movl $0x8, %ecx
xorl %edi, %edi
movl $0x4, %edx
xorl %r8d, %r8d
movl %edi, (%r9,%rdx)
movl %r8d, (%r9,%rcx)
jmp 0x5e7b8
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_instr_bin:
xor eax, eax
cmp r8, rdx
ja locret_5E7BE
push rbp
mov rbp, rsp
push r15
push r14
push rbx
mov r10d, [rbp+10h]
test r8, r8
jz short loc_5E789
add rdx, rsi
sub rdx, r8
inc rdx
mov rdi, rsi
loc_5E720:
cmp rdi, rdx
jz loc_5E7B8
mov r11, rdi
inc rdi
mov bl, [r11]
cmp bl, [rcx]
jnz short loc_5E720
mov ebx, 1
loc_5E73B:
cmp r8, rbx
jz short loc_5E753
mov r14b, [r11+rbx]
lea r15, [rbx+1]
cmp r14b, [rcx+rbx]
mov rbx, r15
jz short loc_5E73B
jmp short loc_5E720
loc_5E753:
mov eax, 2
test r10d, r10d
jz short loc_5E7B8
mov dword ptr [r9], 0
not esi
add edi, esi
mov [r9+4], edi
mov [r9+8], edi
cmp r10d, 1
jz short loc_5E7B8
mov [r9+0Ch], edi
add edi, r8d
mov ecx, 14h
mov edx, 10h
jmp short loc_5E7A9
loc_5E789:
test r10d, r10d
jz short loc_5E7B3
mov dword ptr [r9], 0
mov eax, 1
mov ecx, 8
xor edi, edi
mov edx, 4
xor r8d, r8d
loc_5E7A9:
mov [r9+rdx], edi
mov [r9+rcx], r8d
jmp short loc_5E7B8
loc_5E7B3:
mov eax, 1
loc_5E7B8:
pop rbx
pop r14
pop r15
pop rbp
locret_5E7BE:
retn
| long long my_instr_bin(
long long a1,
_BYTE *a2,
unsigned long long a3,
_BYTE *a4,
unsigned long long a5,
_DWORD *a6,
int a7)
{
long long result; // rax
long long v8; // rdx
_BYTE *v9; // rdi
_BYTE *v10; // r11
long long v11; // rbx
bool v12; // zf
int v13; // edi
int v14; // edi
long long v15; // rcx
long long v16; // rdx
result = 0LL;
if ( a5 <= a3 )
{
if ( a5 )
{
v8 = (long long)&a2[a3 - a5 + 1];
v9 = a2;
LABEL_4:
while ( v9 != (_BYTE *)v8 )
{
v10 = v9++;
if ( *v10 == *a4 )
{
v11 = 1LL;
while ( a5 != v11 )
{
v12 = v10[v11] == a4[v11];
++v11;
if ( !v12 )
goto LABEL_4;
}
result = 2LL;
if ( a7 )
{
*a6 = 0;
v13 = ~(_DWORD)a2 + (_DWORD)v9;
a6[1] = v13;
a6[2] = v13;
if ( a7 != 1 )
{
a6[3] = v13;
v14 = a5 + v13;
v15 = 5LL;
v16 = 4LL;
goto LABEL_15;
}
}
return result;
}
}
}
else if ( a7 )
{
*a6 = 0;
result = 1LL;
v15 = 2LL;
v14 = 0;
v16 = 1LL;
LODWORD(a5) = 0;
LABEL_15:
a6[v16] = v14;
a6[v15] = a5;
}
else
{
return 1LL;
}
}
return result;
}
| my_instr_bin:
XOR EAX,EAX
CMP R8,RDX
JA 0x0015e7be
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
MOV R10D,dword ptr [RBP + 0x10]
TEST R8,R8
JZ 0x0015e789
ADD RDX,RSI
SUB RDX,R8
INC RDX
MOV RDI,RSI
LAB_0015e720:
CMP RDI,RDX
JZ 0x0015e7b8
MOV R11,RDI
INC RDI
MOV BL,byte ptr [R11]
CMP BL,byte ptr [RCX]
JNZ 0x0015e720
MOV EBX,0x1
LAB_0015e73b:
CMP R8,RBX
JZ 0x0015e753
MOV R14B,byte ptr [R11 + RBX*0x1]
LEA R15,[RBX + 0x1]
CMP R14B,byte ptr [RCX + RBX*0x1]
MOV RBX,R15
JZ 0x0015e73b
JMP 0x0015e720
LAB_0015e753:
MOV EAX,0x2
TEST R10D,R10D
JZ 0x0015e7b8
MOV dword ptr [R9],0x0
NOT ESI
ADD EDI,ESI
MOV dword ptr [R9 + 0x4],EDI
MOV dword ptr [R9 + 0x8],EDI
CMP R10D,0x1
JZ 0x0015e7b8
MOV dword ptr [R9 + 0xc],EDI
ADD EDI,R8D
MOV ECX,0x14
MOV EDX,0x10
JMP 0x0015e7a9
LAB_0015e789:
TEST R10D,R10D
JZ 0x0015e7b3
MOV dword ptr [R9],0x0
MOV EAX,0x1
MOV ECX,0x8
XOR EDI,EDI
MOV EDX,0x4
XOR R8D,R8D
LAB_0015e7a9:
MOV dword ptr [R9 + RDX*0x1],EDI
MOV dword ptr [R9 + RCX*0x1],R8D
JMP 0x0015e7b8
LAB_0015e7b3:
MOV EAX,0x1
LAB_0015e7b8:
POP RBX
POP R14
POP R15
POP RBP
LAB_0015e7be:
RET
|
int8
my_instr_bin(int8 param_1,char *param_2,ulong param_3,char *param_4,ulong param_5,
int4 *param_6,int param_7)
{
char *pcVar1;
char *pcVar2;
int8 uVar3;
long lVar4;
long lVar5;
ulong uVar6;
int iVar7;
char *pcVar8;
char *pcVar9;
uVar3 = 0;
if (param_5 <= param_3) {
if (param_5 == 0) {
if (param_7 == 0) {
uVar3 = 1;
}
else {
*param_6 = 0;
uVar3 = 1;
lVar4 = 8;
iVar7 = 0;
lVar5 = 4;
param_5 = 0;
LAB_0015e7a9:
*(int *)((long)param_6 + lVar5) = iVar7;
*(int *)((long)param_6 + lVar4) = (int)param_5;
}
}
else {
pcVar9 = param_2;
while (pcVar8 = pcVar9, pcVar8 != param_2 + (param_3 - param_5) + 1) {
pcVar9 = pcVar8 + 1;
if (*pcVar8 == *param_4) {
uVar6 = 1;
do {
if (param_5 == uVar6) {
uVar3 = 2;
if (param_7 == 0) {
return 2;
}
*param_6 = 0;
iVar7 = (int)pcVar9 + ~(uint)param_2;
param_6[1] = iVar7;
param_6[2] = iVar7;
if (param_7 == 1) {
return 2;
}
param_6[3] = iVar7;
iVar7 = iVar7 + (int)param_5;
lVar4 = 0x14;
lVar5 = 0x10;
goto LAB_0015e7a9;
}
pcVar1 = pcVar8 + uVar6;
pcVar2 = param_4 + uVar6;
uVar6 = uVar6 + 1;
} while (*pcVar1 == *pcVar2);
}
}
}
}
return uVar3;
}
| |
30,591 | intx::internal::add(unsigned long*, unsigned long const*, unsigned long const*, int) | corpus-core[P]colibri-stateless/build_O3/_deps/intx-src/include/intx/intx.hpp | inline bool add(uint64_t s[], const uint64_t x[], const uint64_t y[], int len) noexcept
{
// OPT: Add MinLen template parameter and unroll first loop iterations.
INTX_REQUIRE(len >= 2);
bool carry = false;
for (int i = 0; i < len; ++i)
std::tie(s[i], carry) = addc(x[i], y[i], carry);
return carry;
} | O3 | cpp | intx::internal::add(unsigned long*, unsigned long const*, unsigned long const*, int):
cmpl $0x2, %ecx
jl 0x3e6ad
movl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
movq (%rsi,%r8,8), %r9
movzbl %al, %eax
btl $0x0, %eax
adcq (%rdx,%r8,8), %r9
setb %al
movq %r9, (%rdi,%r8,8)
incq %r8
cmpq %r8, %rcx
jne 0x3e68e
retq
pushq %rax
leaq 0x435a2(%rip), %rdi # 0x81c57
leaq 0x434f2(%rip), %rsi # 0x81bae
leaq 0x43731(%rip), %rcx # 0x81df4
movl $0x670, %edx # imm = 0x670
callq 0x21130
| _ZN4intx8internal3addEPmPKmS3_i:
cmp ecx, 2
jl short loc_3E6AD
mov ecx, ecx
xor r8d, r8d
xor eax, eax
loc_3E68E:
mov r9, [rsi+r8*8]
movzx eax, al
bt eax, 0
adc r9, [rdx+r8*8]
setb al
mov [rdi+r8*8], r9
inc r8
cmp rcx, r8
jnz short loc_3E68E
retn
loc_3E6AD:
push rax
lea rdi, aLen2; "len >= 2"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolIntxIntern; "bool intx::internal::add(uint64_t *, co"...
mov edx, 670h
call ___assert_fail
| char intx::internal::add(
intx::internal *this,
unsigned long long *a2,
const unsigned long long *a3,
const unsigned long long *a4)
{
long long v4; // r8
char result; // al
unsigned long long v6; // r9
bool v7; // cf
unsigned long long v8; // r9
if ( (int)a4 < 2 )
__assert_fail(
"len >= 2",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/intx-src/include/intx/intx.hpp",
1648LL,
"bool intx::internal::add(uint64_t *, const uint64_t *, const uint64_t *, int)");
v4 = 0LL;
result = 0;
do
{
v6 = a2[v4];
v7 = __CFADD__((result & 1) != 0, v6);
v8 = ((result & 1) != 0) + v6;
result = v7 | __CFADD__(a3[v4], v8);
*((_QWORD *)this + v4) = a3[v4] + v8;
++v4;
}
while ( (unsigned int)a4 != v4 );
return result;
}
| add:
CMP ECX,0x2
JL 0x0013e6ad
MOV ECX,ECX
XOR R8D,R8D
XOR EAX,EAX
LAB_0013e68e:
MOV R9,qword ptr [RSI + R8*0x8]
MOVZX EAX,AL
BT EAX,0x0
ADC R9,qword ptr [RDX + R8*0x8]
SETC AL
MOV qword ptr [RDI + R8*0x8],R9
INC R8
CMP RCX,R8
JNZ 0x0013e68e
RET
LAB_0013e6ad:
PUSH RAX
LEA RDI,[0x181c57]
LEA RSI,[0x181bae]
LEA RCX,[0x181df4]
MOV EDX,0x670
CALL 0x00121130
|
/* intx::internal::add(unsigned long*, unsigned long const*, unsigned long const*, int) */
void intx::internal::add(ulong *param_1,ulong *param_2,ulong *param_3,int param_4)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
bool bVar4;
if (1 < param_4) {
uVar3 = 0;
bVar4 = false;
do {
uVar1 = (ulong)bVar4;
uVar2 = param_2[uVar3] + param_3[uVar3];
bVar4 = CARRY8(param_2[uVar3],param_3[uVar3]) || CARRY8(uVar2,uVar1);
param_1[uVar3] = uVar2 + uVar1;
uVar3 = uVar3 + 1;
} while ((uint)param_4 != uVar3);
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("len >= 2",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/intx-src/include/intx/intx.hpp"
,0x670,
"bool intx::internal::add(uint64_t *, const uint64_t *, const uint64_t *, int)");
}
| |
30,592 | common_chat_verify_template(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) | llama.cpp/common/chat.cpp | bool common_chat_verify_template(const std::string & tmpl, bool use_jinja) {
if (use_jinja) {
try {
common_chat_msg msg;
msg.role = "user";
msg.content = "test";
auto tmpls = common_chat_templates_init(/* model= */ nullptr, tmpl);
common_chat_templates_inputs inputs;
inputs.messages = {msg};
common_chat_templates_apply(tmpls.get(), inputs);
return true;
} catch (const std::exception & e) {
LOG_ERR("%s: failed to apply template: %s\n", __func__, e.what());
return false;
}
}
llama_chat_message chat[] = {{"user", "test"}};
const int res = llama_chat_apply_template(tmpl.c_str(), chat, 1, true, nullptr, 0);
return res >= 0;
} | O3 | cpp | common_chat_verify_template(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2c8, %rsp # imm = 0x2C8
movq %rdi, %rbx
testl %esi, %esi
je 0x95a74
leaq 0x170(%rsp), %rax
movq %rax, -0x10(%rax)
xorl %ecx, %ecx
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
leaq 0x190(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
leaq 0x1e0(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, -0x40(%rax)
movups %xmm0, -0x30(%rax)
movups %xmm0, -0x20(%rax)
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
leaq 0x200(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
leaq 0x220(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
leaq 0x8b71b(%rip), %rcx # 0x120f57
leaq 0x160(%rsp), %rdi
movl $0x4, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21950
leaq 0x180(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x8550c(%rip), %rcx # 0x11ad72
movl $0x4, %r8d
xorl %esi, %esi
callq 0x21950
leaq 0xa0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8c02b(%rip), %rdx # 0x1218b1
leaq 0x90(%rsp), %rdi
movq %rdx, %rsi
callq 0x28f28
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8c00a(%rip), %rdx # 0x1218b1
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x28f28
leaq 0x8(%rsp), %rdi
leaq 0x90(%rsp), %rcx
leaq 0x10(%rsp), %r8
xorl %esi, %esi
movq %rbx, %rdx
callq 0x95bbe
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x958e7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21190
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x95904
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21190
xorl %eax, %eax
leaq 0x38(%rsp), %r14
movq %rax, -0x18(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x28(%r14)
movq %r14, -0x10(%r14)
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movw $0x101, 0x10(%r12) # imm = 0x101
movaps %xmm0, 0x18(%r12)
movups %xmm0, 0x25(%r12)
movb $0x1, 0x35(%r12)
leaq 0x90(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0xb3d64
leaq 0x160(%rsp), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xd4986
leaq 0x90(%rsp), %rdi
callq 0xb34aa
movq 0x8(%rsp), %r15
leaq 0x230(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r15, %rsi
callq 0x961ef
leaq 0x2b0(%rsp), %rdi
callq 0x28914
leaq 0x298(%rsp), %rdi
callq 0x28914
leaq 0x280(%rsp), %rbx
movq %rbx, %rdi
callq 0x28fa2
movq -0x28(%rbx), %rdi
leaq 0x268(%rsp), %rax
cmpq %rax, %rdi
je 0x959f0
movq 0x268(%rsp), %rsi
incq %rsi
callq 0x21190
leaq 0x70(%rsp), %rbx
leaq 0x248(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x95a16
movq 0x248(%rsp), %rsi
incq %rsi
callq 0x21190
movq %rbx, %rdi
callq 0xb3d34
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x95a35
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21190
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x95a4c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21190
leaq 0x10(%rsp), %rdi
callq 0xb3606
testq %r15, %r15
je 0x95a63
movq %r15, %rdi
callq 0x98d3b
leaq 0x160(%rsp), %rdi
callq 0xb34aa
movb $0x1, %al
jmp 0x95aa3
movaps 0xcd7b5(%rip), %xmm0 # 0x163230
leaq 0x160(%rsp), %rsi
movaps %xmm0, (%rsi)
movq (%rbx), %rdi
movl $0x1, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x21880
testl %eax, %eax
setns %al
addq $0x2c8, %rsp # imm = 0x2C8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rdx, %r14
movq %rax, %rbx
jmp 0x95ada
movq %rdx, %r14
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0xb34aa
jmp 0x95ad5
movq %rdx, %r14
movq %rax, %rbx
movq 0x8(%rsp), %r15
leaq 0x10(%rsp), %rdi
callq 0xb3f5c
testq %r15, %r15
je 0x95b3f
movq %r15, %rdi
callq 0x98d3b
jmp 0x95b3f
movq %rdx, %r14
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x95b18
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21190
jmp 0x95b18
movq %rdx, %r14
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x95b3f
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21190
jmp 0x95b3f
jmp 0x95b39
movq %rdx, %r14
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0xb34aa
cmpl $0x1, %r14d
jne 0x95bae
movq %rbx, %rdi
callq 0x210c0
movq %rax, %rbx
leaq 0xd0eec(%rip), %rax # 0x166a50
cmpl $0x0, (%rax)
js 0x95b9a
callq 0x10f8db
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x8b3db(%rip), %rdx # 0x120f5c
leaq 0x8b3f6(%rip), %rcx # 0x120f7e
movq %r14, %rdi
movl $0x4, %esi
movq %rax, %r8
xorl %eax, %eax
callq 0x10f978
callq 0x21eb0
xorl %eax, %eax
jmp 0x95aa3
movq %rax, %rbx
callq 0x21eb0
movq %rbx, %rdi
callq 0x21c20
movq %rax, %rdi
callq 0x28d45
| _Z27common_chat_verify_templateRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb:
push r15
push r14
push r12
push rbx
sub rsp, 2C8h
mov rbx, rdi
test esi, esi
jz loc_95A74
lea rax, [rsp+2E8h+var_178]
mov [rax-10h], rax
xor ecx, ecx
mov [rax-8], rcx
mov [rax], cl
lea rax, [rsp+2E8h+var_158]
mov [rax-10h], rax
mov [rax-8], rcx
mov [rax], cl
lea rax, [rsp+2E8h+var_108]
xorps xmm0, xmm0
movups xmmword ptr [rax-40h], xmm0
movups xmmword ptr [rax-30h], xmm0
movups xmmword ptr [rax-20h], xmm0
mov [rax-10h], rax
mov [rax-8], rcx
mov [rax], cl
lea rax, [rsp+2E8h+var_E8]
mov [rax-10h], rax
mov [rax-8], rcx
mov [rax], cl
lea rax, [rsp+2E8h+var_C8]
mov [rax-10h], rax
mov [rax-8], rcx
mov [rax], cl
lea rcx, aUser; "user"
lea rdi, [rsp+2E8h+var_188]
mov r8d, 4
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
lea rdi, [rsp+2E8h+var_168]
mov rdx, [rdi+8]
lea rcx, aLatest+2; "test"
mov r8d, 4
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
lea r15, [rsp+2E8h+var_248]
mov [r15-10h], r15
lea rdx, aExampleToolCal+1Dh; ""
lea rdi, [rsp+2E8h+var_258]
mov rsi, rdx
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 r12, [rsp+2E8h+var_2C8]
mov [r12-10h], r12
lea rdx, aExampleToolCal+1Dh; ""
lea rdi, [rsp+2E8h+var_2D8]
mov rsi, rdx
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 rdi, [rsp+2E8h+var_2E0]
lea rcx, [rsp+2E8h+var_258]
lea r8, [rsp+2E8h+var_2D8]
xor esi, esi
mov rdx, rbx
call _Z26common_chat_templates_initPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_; common_chat_templates_init(llama_model const*,std::string const&,std::string const&,std::string const&)
mov rdi, [rsp+2E8h+var_2D8]; void *
cmp rdi, r12
jz short loc_958E7
mov rsi, [rsp+2E8h+var_2C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_958E7:
mov rdi, [rsp+2E8h+var_258]; void *
cmp rdi, r15
jz short loc_95904
mov rsi, [rsp+2E8h+var_248]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_95904:
xor eax, eax
lea r14, [rsp+2E8h+var_2B0]
mov [r14-18h], rax
xorps xmm0, xmm0
movaps xmmword ptr [r14-28h], xmm0
mov [r14-10h], r14
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+2E8h+var_290]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov word ptr [r12+10h], 101h
movaps xmmword ptr [r12+18h], xmm0
movups xmmword ptr [r12+25h], xmm0
mov byte ptr [r12+35h], 1
lea rdi, [rsp+2E8h+var_258]; this
lea rsi, [rsp+2E8h+var_188]; common_chat_msg *
call _ZN15common_chat_msgC2ERKS_; common_chat_msg::common_chat_msg(common_chat_msg const&)
lea rdx, [rsp+2E8h+var_188]
lea rdi, [rsp+2E8h+var_2D8]
lea rsi, [rsp+2E8h+var_258]
call _ZNSt6vectorI15common_chat_msgSaIS0_EE13_M_assign_auxIPKS0_EEvT_S6_St20forward_iterator_tag; std::vector<common_chat_msg>::_M_assign_aux<common_chat_msg const*>(common_chat_msg const*,common_chat_msg const*,std::forward_iterator_tag)
lea rdi, [rsp+2E8h+var_258]; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
mov r15, [rsp+2E8h+var_2E0]
lea rdi, [rsp+2E8h+var_B8]
lea rdx, [rsp+2E8h+var_2D8]
mov rsi, r15
call _Z27common_chat_templates_applyPK21common_chat_templatesRK28common_chat_templates_inputs; common_chat_templates_apply(common_chat_templates const*,common_chat_templates_inputs const&)
lea rdi, [rsp+2E8h+var_38]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+2E8h+var_50]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rbx, [rsp+2E8h+var_68]
mov rdi, rbx
call _ZNSt6vectorI22common_grammar_triggerSaIS0_EED2Ev; std::vector<common_grammar_trigger>::~vector()
mov rdi, [rbx-28h]; void *
lea rax, [rsp+2E8h+var_80]
cmp rdi, rax
jz short loc_959F0
mov rsi, [rsp+2E8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_959F0:
lea rbx, [rsp+2E8h+var_278]
lea rax, [rsp+2E8h+var_A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_95A16
mov rsi, [rsp+2E8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_95A16:
mov rdi, rbx
call _ZNSt6vectorI16common_chat_toolSaIS0_EED2Ev; std::vector<common_chat_tool>::~vector()
mov rdi, [rsp+2E8h+var_2A0]; void *
cmp rdi, r12
jz short loc_95A35
mov rsi, [rsp+2E8h+var_290]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_95A35:
mov rdi, [rsp+2E8h+var_2C0]; void *
cmp rdi, r14
jz short loc_95A4C
mov rsi, [rsp+2E8h+var_2B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_95A4C:
lea rdi, [rsp+2E8h+var_2D8]
call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector()
test r15, r15
jz short loc_95A63
mov rdi, r15; void *
call _Z26common_chat_templates_freeP21common_chat_templates; common_chat_templates_free(common_chat_templates *)
loc_95A63:
lea rdi, [rsp+2E8h+var_188]; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
mov al, 1
jmp short loc_95AA3
loc_95A74:
movaps xmm0, xmmword ptr cs:off_163230; "user"
lea rsi, [rsp+2E8h+var_188]
movaps xmmword ptr [rsi], xmm0
mov rdi, [rbx]
mov edx, 1
mov ecx, 1
xor r8d, r8d
xor r9d, r9d
call _llama_chat_apply_template
test eax, eax
setns al
loc_95AA3:
add rsp, 2C8h
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rdx
mov rbx, rax
jmp short loc_95ADA
mov r14, rdx
mov rbx, rax
lea rdi, [rsp+2E8h+var_258]; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
jmp short loc_95AD5
mov r14, rdx
mov rbx, rax
loc_95AD5:
mov r15, [rsp+2E8h+var_2E0]
loc_95ADA:
lea rdi, [rsp+2E8h+var_2D8]; this
call _ZN28common_chat_templates_inputsD2Ev; common_chat_templates_inputs::~common_chat_templates_inputs()
test r15, r15
jz short loc_95B3F
mov rdi, r15; void *
call _Z26common_chat_templates_freeP21common_chat_templates; common_chat_templates_free(common_chat_templates *)
jmp short loc_95B3F
mov r14, rdx
mov rbx, rax
mov rdi, [rsp+2E8h+var_2D8]; void *
cmp rdi, r12
jz short loc_95B18
mov rsi, [rsp+2E8h+var_2C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_95B18
mov r14, rdx
mov rbx, rax
loc_95B18:
mov rdi, [rsp+2E8h+var_258]; void *
cmp rdi, r15
jz short loc_95B3F
mov rsi, [rsp+2E8h+var_248]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_95B3F
jmp short $+2
loc_95B39:
mov r14, rdx
mov rbx, rax
loc_95B3F:
lea rdi, [rsp+2E8h+var_188]; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
cmp r14d, 1
jnz short loc_95BAE
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rbx, rax
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_95B9A
call _Z15common_log_mainv; common_log_main(void)
mov r14, rax
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+10h]
lea rdx, aSFailedToApply; "%s: failed to apply template: %s\n"
lea rcx, aCommonChatVeri; "common_chat_verify_template"
mov rdi, r14
mov esi, 4
mov r8, rax
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_95B9A:
call ___cxa_end_catch
xor eax, eax
jmp loc_95AA3
mov rbx, rax
call ___cxa_end_catch
loc_95BAE:
mov rdi, rbx
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| bool common_chat_verify_template(_QWORD *a1, int a2)
{
void *v2; // r15
void *v4; // [rsp+8h] [rbp-2E0h] BYREF
__int128 v5; // [rsp+10h] [rbp-2D8h] BYREF
long long v6; // [rsp+20h] [rbp-2C8h] BYREF
void *v7; // [rsp+28h] [rbp-2C0h]
long long v8; // [rsp+30h] [rbp-2B8h]
_QWORD v9[2]; // [rsp+38h] [rbp-2B0h] BYREF
void *v10; // [rsp+48h] [rbp-2A0h]
long long v11; // [rsp+50h] [rbp-298h]
_QWORD v12[2]; // [rsp+58h] [rbp-290h] BYREF
__int16 v13; // [rsp+68h] [rbp-280h]
_BYTE v14[32]; // [rsp+70h] [rbp-278h] BYREF
void *v15[2]; // [rsp+90h] [rbp-258h] BYREF
_QWORD v16[24]; // [rsp+A0h] [rbp-248h] BYREF
__int128 v17; // [rsp+160h] [rbp-188h] BYREF
char v18; // [rsp+170h] [rbp-178h] BYREF
char *v19; // [rsp+180h] [rbp-168h] BYREF
long long v20; // [rsp+188h] [rbp-160h]
char v21; // [rsp+190h] [rbp-158h] BYREF
__int128 v22; // [rsp+1A0h] [rbp-148h]
__int128 v23; // [rsp+1B0h] [rbp-138h]
__int128 v24; // [rsp+1C0h] [rbp-128h]
char *v25; // [rsp+1D0h] [rbp-118h]
long long v26; // [rsp+1D8h] [rbp-110h]
char v27; // [rsp+1E0h] [rbp-108h] BYREF
char *v28; // [rsp+1F0h] [rbp-F8h]
long long v29; // [rsp+1F8h] [rbp-F0h]
char v30; // [rsp+200h] [rbp-E8h] BYREF
char *v31; // [rsp+210h] [rbp-D8h]
long long v32; // [rsp+218h] [rbp-D0h]
char v33; // [rsp+220h] [rbp-C8h] BYREF
_BYTE v34[8]; // [rsp+230h] [rbp-B8h] BYREF
long long *v35; // [rsp+238h] [rbp-B0h]
long long v36; // [rsp+248h] [rbp-A0h] BYREF
long long *v37; // [rsp+258h] [rbp-90h]
long long v38; // [rsp+268h] [rbp-80h] BYREF
_BYTE v39[24]; // [rsp+280h] [rbp-68h] BYREF
_BYTE v40[24]; // [rsp+298h] [rbp-50h] BYREF
_BYTE v41[56]; // [rsp+2B0h] [rbp-38h] BYREF
if ( a2 )
{
*(_QWORD *)&v17 = &v18;
*((_QWORD *)&v17 + 1) = 0LL;
v18 = 0;
v19 = &v21;
v20 = 0LL;
v21 = 0;
v22 = 0LL;
v23 = 0LL;
v24 = 0LL;
v25 = &v27;
v26 = 0LL;
v27 = 0;
v28 = &v30;
v29 = 0LL;
v30 = 0;
v31 = &v33;
v32 = 0LL;
v33 = 0;
std::string::_M_replace(&v17, 0LL, 0LL, "user", 4LL);
std::string::_M_replace(&v19, 0LL, v20, "test", 4LL);
v15[0] = v16;
std::string::_M_construct<char const*>((long long)v15, "", (long long)"");
*(_QWORD *)&v5 = &v6;
std::string::_M_construct<char const*>((long long)&v5, "", (long long)"");
common_chat_templates_init(&v4, 0LL, a1, v15, &v5);
if ( (long long *)v5 != &v6 )
operator delete((void *)v5, v6 + 1);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
v6 = 0LL;
v5 = 0LL;
v7 = v9;
v8 = 0LL;
LOBYTE(v9[0]) = 0;
v10 = v12;
v11 = 0LL;
LOBYTE(v12[0]) = 0;
v13 = 257;
memset(v14, 0, 29);
v14[29] = 1;
common_chat_msg::common_chat_msg((common_chat_msg *)v15, (const common_chat_msg *)&v17);
std::vector<common_chat_msg>::_M_assign_aux<common_chat_msg const*>(&v5, v15, &v17);
common_chat_msg::~common_chat_msg((common_chat_msg *)v15);
v2 = v4;
common_chat_templates_apply(v34, v4, &v5);
std::vector<std::string>::~vector((long long)v41);
std::vector<std::string>::~vector((long long)v40);
std::vector<common_grammar_trigger>::~vector((long long)v39);
if ( v37 != &v38 )
operator delete(v37, v38 + 1);
if ( v35 != &v36 )
operator delete(v35, v36 + 1);
std::vector<common_chat_tool>::~vector(v14);
if ( v10 != v12 )
operator delete(v10, v12[0] + 1LL);
if ( v7 != v9 )
operator delete(v7, v9[0] + 1LL);
std::vector<common_chat_msg>::~vector(&v5);
if ( v2 )
common_chat_templates_free(v2);
common_chat_msg::~common_chat_msg((common_chat_msg *)&v17);
return 1;
}
else
{
v17 = *(_OWORD *)&off_163230;
return (int)llama_chat_apply_template(*a1, &v17, 1LL, 1LL, 0LL, 0LL) >= 0;
}
}
| common_chat_verify_template:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x2c8
MOV RBX,RDI
TEST ESI,ESI
JZ 0x00195a74
LEA RAX,[RSP + 0x170]
MOV qword ptr [RAX + -0x10],RAX
XOR ECX,ECX
MOV qword ptr [RAX + -0x8],RCX
MOV byte ptr [RAX],CL
LEA RAX,[RSP + 0x190]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],RCX
MOV byte ptr [RAX],CL
LEA RAX,[RSP + 0x1e0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x40],XMM0
MOVUPS xmmword ptr [RAX + -0x30],XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],RCX
MOV byte ptr [RAX],CL
LEA RAX,[RSP + 0x200]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],RCX
MOV byte ptr [RAX],CL
LEA RAX,[RSP + 0x220]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],RCX
MOV byte ptr [RAX],CL
LAB_00195835:
LEA RCX,[0x220f57]
LEA RDI,[RSP + 0x160]
MOV R8D,0x4
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00121950
LEA RDI,[RSP + 0x180]
MOV RDX,qword ptr [RDI + 0x8]
LEA RCX,[0x21ad72]
MOV R8D,0x4
XOR ESI,ESI
CALL 0x00121950
LEA R15,[RSP + 0xa0]
MOV qword ptr [R15 + -0x10],R15
LAB_0019587f:
LEA RDX,[0x2218b1]
LEA RDI,[RSP + 0x90]
MOV RSI,RDX
CALL 0x00128f28
LEA R12,[RSP + 0x20]
MOV qword ptr [R12 + -0x10],R12
LAB_001958a0:
LEA RDX,[0x2218b1]
LEA RDI,[RSP + 0x10]
MOV RSI,RDX
CALL 0x00128f28
LAB_001958b4:
LEA RDI,[RSP + 0x8]
LEA RCX,[RSP + 0x90]
LEA R8,[RSP + 0x10]
XOR ESI,ESI
MOV RDX,RBX
CALL 0x00195bbe
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R12
JZ 0x001958e7
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00121190
LAB_001958e7:
MOV RDI,qword ptr [RSP + 0x90]
CMP RDI,R15
JZ 0x00195904
MOV RSI,qword ptr [RSP + 0xa0]
INC RSI
CALL 0x00121190
LAB_00195904:
XOR EAX,EAX
LEA R14,[RSP + 0x38]
MOV qword ptr [R14 + -0x18],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x28],XMM0
MOV qword ptr [R14 + -0x10],R14
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],AL
LEA R12,[RSP + 0x58]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
MOV word ptr [R12 + 0x10],0x101
MOVAPS xmmword ptr [R12 + 0x18],XMM0
MOVUPS xmmword ptr [R12 + 0x25],XMM0
MOV byte ptr [R12 + 0x35],0x1
LAB_0019594f:
LEA RDI,[RSP + 0x90]
LEA RSI,[RSP + 0x160]
CALL 0x001b3d64
LEA RDX,[RSP + 0x160]
LAB_0019596c:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x90]
CALL 0x001d4986
LEA RDI,[RSP + 0x90]
CALL 0x001b34aa
MOV R15,qword ptr [RSP + 0x8]
LAB_00195990:
LEA RDI,[RSP + 0x230]
LEA RDX,[RSP + 0x10]
MOV RSI,R15
CALL 0x001961ef
LAB_001959a5:
LEA RDI,[RSP + 0x2b0]
CALL 0x00128914
LEA RDI,[RSP + 0x298]
CALL 0x00128914
LEA RBX,[RSP + 0x280]
MOV RDI,RBX
CALL 0x00128fa2
MOV RDI,qword ptr [RBX + -0x28]
LEA RAX,[RSP + 0x268]
CMP RDI,RAX
JZ 0x001959f0
MOV RSI,qword ptr [RSP + 0x268]
INC RSI
CALL 0x00121190
LAB_001959f0:
LEA RBX,[RSP + 0x70]
LEA RAX,[RSP + 0x248]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00195a16
MOV RSI,qword ptr [RSP + 0x248]
INC RSI
CALL 0x00121190
LAB_00195a16:
MOV RDI,RBX
CALL 0x001b3d34
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R12
JZ 0x00195a35
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x00121190
LAB_00195a35:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R14
JZ 0x00195a4c
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00121190
LAB_00195a4c:
LEA RDI,[RSP + 0x10]
CALL 0x001b3606
TEST R15,R15
JZ 0x00195a63
MOV RDI,R15
CALL 0x00198d3b
LAB_00195a63:
LEA RDI,[RSP + 0x160]
CALL 0x001b34aa
MOV AL,0x1
JMP 0x00195aa3
LAB_00195a74:
MOVAPS XMM0,xmmword ptr [0x00263230]
LEA RSI,[RSP + 0x160]
MOVAPS xmmword ptr [RSI],XMM0
MOV RDI,qword ptr [RBX]
MOV EDX,0x1
MOV ECX,0x1
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00121880
TEST EAX,EAX
SETNS AL
LAB_00195aa3:
ADD RSP,0x2c8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* common_chat_verify_template(std::__cxx11::string const&, bool) */
bool common_chat_verify_template(string *param_1,bool param_2)
{
int iVar1;
int7 in_register_00000031;
bool bVar2;
common_chat_templates_inputs *local_2e0;
long *local_2d8;
int8 uStack_2d0;
long local_2c8;
int1 *local_2c0;
int8 local_2b8;
int1 local_2b0;
int7 uStack_2af;
int1 *local_2a0;
int8 local_298;
int1 local_290;
int7 uStack_28f;
int2 local_280;
int8 local_278;
int5 uStack_270;
int3 uStack_26b;
int5 uStack_268;
int8 uStack_263;
int1 local_25b;
long *local_258 [2];
long local_248 [24];
int8 local_188;
int8 uStack_180;
int1 local_178 [16];
int1 *local_168;
char *local_160;
int1 local_158 [16];
int8 local_148;
int8 uStack_140;
int8 local_138;
int8 uStack_130;
int8 local_128;
int8 uStack_120;
int1 *local_118;
int8 local_110;
int1 local_108 [16];
int1 *local_f8;
int8 local_f0;
int1 local_e8 [16];
int1 *local_d8;
int8 local_d0;
int1 local_c8 [16];
common_chat_templates local_b8 [8];
long *local_b0;
long local_a0 [2];
long *local_90;
long local_80 [3];
vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> local_68 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_50 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_38 [24];
if ((int)CONCAT71(in_register_00000031,param_2) == 0) {
local_188 = (int1 *)CONCAT44(PTR_DAT_00263230._4_4_,PTR_DAT_00263230._0_4_);
uStack_180 = CONCAT44(PTR_s_test_00263238._4_4_,PTR_s_test_00263238._0_4_);
iVar1 = llama_chat_apply_template(*(int8 *)param_1,&local_188,1,1,0,0);
bVar2 = -1 < iVar1;
}
else {
local_188 = local_178;
uStack_180 = 0;
local_178[0] = 0;
local_168 = local_158;
local_160 = (char *)0x0;
local_158[0] = 0;
local_118 = local_108;
local_148 = 0;
uStack_140 = 0;
local_138 = 0;
uStack_130 = 0;
local_128 = 0;
uStack_120 = 0;
local_110 = 0;
local_108[0] = 0;
local_f8 = local_e8;
local_f0 = 0;
local_e8[0] = 0;
local_d8 = local_c8;
local_d0 = 0;
local_c8[0] = 0;
/* try { // try from 00195835 to 00195872 has its CatchHandler @ 00195b39 */
std::__cxx11::string::_M_replace((ulong)&local_188,0,(char *)0x0,0x220f57);
std::__cxx11::string::_M_replace((ulong)&local_168,0,local_160,0x21ad72);
/* try { // try from 0019587f to 00195895 has its CatchHandler @ 00195b37 */
local_258[0] = local_248;
std::__cxx11::string::_M_construct<char_const*>(local_258,"");
/* try { // try from 001958a0 to 001958b3 has its CatchHandler @ 00195b12 */
local_2d8 = &local_2c8;
std::__cxx11::string::_M_construct<char_const*>(&local_2d8);
/* try { // try from 001958b4 to 001958cf has its CatchHandler @ 00195af3 */
common_chat_templates_init((llama_model *)&local_2e0,(string *)0x0,param_1,(string *)local_258);
if (local_2d8 != &local_2c8) {
operator_delete(local_2d8,local_2c8 + 1);
}
if (local_258[0] != local_248) {
operator_delete(local_258[0],local_248[0] + 1);
}
local_2c8 = 0;
local_2d8 = (long *)0x0;
uStack_2d0 = 0;
local_2b8 = 0;
local_2b0 = 0;
local_298 = 0;
local_290 = 0;
local_280 = 0x101;
local_278 = 0;
uStack_270 = 0;
uStack_26b = 0;
uStack_268 = 0;
uStack_263 = 0;
local_25b = 1;
/* try { // try from 0019594f to 00195963 has its CatchHandler @ 00195acf */
local_2c0 = &local_2b0;
local_2a0 = &local_290;
common_chat_msg::common_chat_msg((common_chat_msg *)local_258,(common_chat_msg *)&local_188);
/* try { // try from 0019596c to 0019597d has its CatchHandler @ 00195aba */
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::
_M_assign_aux<common_chat_msg_const*>(&local_2d8,local_258,&local_188);
common_chat_msg::~common_chat_msg((common_chat_msg *)local_258);
/* try { // try from 00195990 to 001959a4 has its CatchHandler @ 00195ab2 */
common_chat_templates_apply(local_b8,local_2e0);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_38);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_50);
std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>::~vector(local_68);
if (local_90 != local_80) {
operator_delete(local_90,local_80[0] + 1);
}
if (local_b0 != local_a0) {
operator_delete(local_b0,local_a0[0] + 1);
}
std::vector<common_chat_tool,std::allocator<common_chat_tool>>::~vector
((vector<common_chat_tool,std::allocator<common_chat_tool>> *)&local_278);
if (local_2a0 != &local_290) {
operator_delete(local_2a0,CONCAT71(uStack_28f,local_290) + 1);
}
if (local_2c0 != &local_2b0) {
operator_delete(local_2c0,CONCAT71(uStack_2af,local_2b0) + 1);
}
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector
((vector<common_chat_msg,std::allocator<common_chat_msg>> *)&local_2d8);
if (local_2e0 != (common_chat_templates_inputs *)0x0) {
common_chat_templates_free((common_chat_templates *)local_2e0);
}
common_chat_msg::~common_chat_msg((common_chat_msg *)&local_188);
bVar2 = true;
}
return bVar2;
}
| |
30,593 | mi_check_index | eloqsql/storage/myisam/mi_search.c | int _mi_check_index(MI_INFO *info, int inx)
{
if (inx == -1) /* Use last index */
inx=info->lastinx;
if (inx < 0)
{
my_errno= HA_ERR_WRONG_INDEX;
return -1;
}
if (!mi_is_key_active(info->s->state.key_map, inx))
{
my_errno= info->s->state.state.records ? HA_ERR_WRONG_INDEX :
HA_ERR_END_OF_FILE;
return -1;
}
if (info->lastinx != inx) /* Index changed */
{
info->lastinx = inx;
info->page_changed=1;
info->update= ((info->update & (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED)) |
HA_STATE_NEXT_FOUND | HA_STATE_PREV_FOUND);
}
if (info->opt_flag & WRITE_CACHE_USED && flush_io_cache(&info->rec_cache))
return(-1);
return(inx);
} | O3 | c | mi_check_index:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
cmpl $-0x1, %esi
jne 0x4031b
movl 0x1d4(%rdi), %ebx
testl %ebx, %ebx
js 0x40381
movq (%rdi), %rax
movq 0xc0(%rax), %rcx
btq %rbx, %rcx
jae 0x4038e
cmpl %ebx, 0x1d4(%rdi)
je 0x40358
movl %ebx, 0x1d4(%rdi)
movb $0x1, 0x33c(%rdi)
movl $0x401, %eax # imm = 0x401
andl 0x1d0(%rdi), %eax
orl $0x30, %eax
movl %eax, 0x1d0(%rdi)
testb $0x10, 0x1c8(%rdi)
je 0x4037d
addq $0x220, %rdi # imm = 0x220
movl $0x1, %esi
callq 0x53489
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x403ac
movl %ebx, %eax
jmp 0x403ac
callq 0x5ecfe
movl $0x7c, (%rax)
jmp 0x403a7
cmpq $0x0, 0x18(%rax)
movl $0x89, %eax
movl $0x7c, %ebx
cmovel %eax, %ebx
callq 0x5ecfe
movl %ebx, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _mi_check_index:
push rbp
mov rbp, rsp
push rbx
push rax
mov ebx, esi
cmp esi, 0FFFFFFFFh
jnz short loc_4031B
mov ebx, [rdi+1D4h]
loc_4031B:
test ebx, ebx
js short loc_40381
mov rax, [rdi]
mov rcx, [rax+0C0h]
bt rcx, rbx
jnb short loc_4038E
cmp [rdi+1D4h], ebx
jz short loc_40358
mov [rdi+1D4h], ebx
mov byte ptr [rdi+33Ch], 1
mov eax, 401h
and eax, [rdi+1D0h]
or eax, 30h
mov [rdi+1D0h], eax
loc_40358:
test byte ptr [rdi+1C8h], 10h
jz short loc_4037D
add rdi, 220h
mov esi, 1
call my_b_flush_io_cache
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_403AC
loc_4037D:
mov eax, ebx
jmp short loc_403AC
loc_40381:
call _my_thread_var
mov dword ptr [rax], 7Ch ; '|'
jmp short loc_403A7
loc_4038E:
cmp qword ptr [rax+18h], 0
mov eax, 89h
mov ebx, 7Ch ; '|'
cmovz ebx, eax
call _my_thread_var
mov [rax], ebx
loc_403A7:
mov eax, 0FFFFFFFFh
loc_403AC:
add rsp, 8
pop rbx
pop rbp
retn
| long long mi_check_index(unsigned int *a1, const char *a2)
{
unsigned long long v2; // rbx
long long v3; // rcx
int v4; // ecx
long long result; // rax
int v6; // ebx
v2 = (unsigned int)a2;
if ( (_DWORD)a2 == -1 )
v2 = a1[117];
if ( (v2 & 0x80000000) != 0LL )
{
*(_DWORD *)my_thread_var(a1, a2) = 124;
return 0xFFFFFFFFLL;
}
v3 = *(_QWORD *)(*(_QWORD *)a1 + 192LL);
if ( !_bittest64(&v3, v2) )
{
v6 = 124;
if ( !*(_QWORD *)(*(_QWORD *)a1 + 24LL) )
v6 = 137;
*(_DWORD *)my_thread_var(a1, a2) = v6;
return 0xFFFFFFFFLL;
}
if ( a1[117] != (_DWORD)v2 )
{
a1[117] = v2;
*((_BYTE *)a1 + 828) = 1;
a1[116] = a1[116] & 0x401 | 0x30;
}
if ( (a1[114] & 0x10) == 0 )
return (unsigned int)v2;
v4 = my_b_flush_io_cache(a1 + 136, 1LL);
result = 0xFFFFFFFFLL;
if ( !v4 )
return (unsigned int)v2;
return result;
}
| _mi_check_index:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV EBX,ESI
CMP ESI,-0x1
JNZ 0x0014031b
MOV EBX,dword ptr [RDI + 0x1d4]
LAB_0014031b:
TEST EBX,EBX
JS 0x00140381
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RAX + 0xc0]
BT RCX,RBX
JNC 0x0014038e
CMP dword ptr [RDI + 0x1d4],EBX
JZ 0x00140358
MOV dword ptr [RDI + 0x1d4],EBX
MOV byte ptr [RDI + 0x33c],0x1
MOV EAX,0x401
AND EAX,dword ptr [RDI + 0x1d0]
OR EAX,0x30
MOV dword ptr [RDI + 0x1d0],EAX
LAB_00140358:
TEST byte ptr [RDI + 0x1c8],0x10
JZ 0x0014037d
ADD RDI,0x220
MOV ESI,0x1
CALL 0x00153489
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x001403ac
LAB_0014037d:
MOV EAX,EBX
JMP 0x001403ac
LAB_00140381:
CALL 0x0015ecfe
MOV dword ptr [RAX],0x7c
JMP 0x001403a7
LAB_0014038e:
CMP qword ptr [RAX + 0x18],0x0
MOV EAX,0x89
MOV EBX,0x7c
CMOVZ EBX,EAX
CALL 0x0015ecfe
MOV dword ptr [RAX],EBX
LAB_001403a7:
MOV EAX,0xffffffff
LAB_001403ac:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
ulong _mi_check_index(long *param_1,uint param_2)
{
int iVar1;
int4 *puVar2;
int4 uVar3;
ulong uVar4;
uVar4 = (ulong)param_2;
if (param_2 == 0xffffffff) {
uVar4 = (ulong)*(uint *)((long)param_1 + 0x1d4);
}
iVar1 = (int)uVar4;
if (iVar1 < 0) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7c;
}
else {
if ((*(ulong *)(*param_1 + 0xc0) >> (uVar4 & 0x3f) & 1) != 0) {
if (*(int *)((long)param_1 + 0x1d4) != iVar1) {
*(int *)((long)param_1 + 0x1d4) = iVar1;
*(int1 *)((long)param_1 + 0x33c) = 1;
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 0x401 | 0x30;
}
if (((*(byte *)(param_1 + 0x39) & 0x10) != 0) &&
(iVar1 = my_b_flush_io_cache(param_1 + 0x44,1), iVar1 != 0)) {
return 0xffffffff;
}
return uVar4;
}
uVar3 = 0x7c;
if (*(long *)(*param_1 + 0x18) == 0) {
uVar3 = 0x89;
}
puVar2 = (int4 *)_my_thread_var();
*puVar2 = uVar3;
}
return 0xffffffff;
}
| |
30,594 | mi_find_half_pos | eloqsql/storage/myisam/mi_write.c | uchar *_mi_find_half_pos(uint nod_flag, MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint *return_key_length,
uchar **after_key)
{
uint keys,length,key_ref_length;
uchar *end,*lastpos;
DBUG_ENTER("_mi_find_half_pos");
key_ref_length=2+nod_flag;
length=mi_getint(page)-key_ref_length;
page+=key_ref_length;
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
HA_BINARY_PACK_KEY)))
{
key_ref_length=keyinfo->keylength+nod_flag;
keys=length/(key_ref_length*2);
*return_key_length=keyinfo->keylength;
end=page+keys*key_ref_length;
*after_key=end+key_ref_length;
memcpy(key,end,key_ref_length);
DBUG_RETURN(end);
}
end=page+length/2-key_ref_length; /* This is aprox. half */
*key='\0';
do
{
lastpos=page;
if (!(length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key)))
DBUG_RETURN(0);
} while (page < end);
*return_key_length=length;
*after_key=page;
DBUG_PRINT("exit",("returns: %p page: %p half: %p",
lastpos, page, end));
DBUG_RETURN(lastpos);
} | O0 | c | mi_find_half_pos:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
andl $0x7fff, %eax # imm = 0x7FFF
subl -0x44(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x44(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x2e, %eax
cmpl $0x0, %eax
jne 0xc9def
movq -0x18(%rbp), %rax
movzwl 0x12(%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %eax
movl -0x44(%rbp), %ecx
shll %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x12(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl -0x3c(%rbp), %ecx
imull -0x44(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rcx
movl -0x44(%rbp), %eax
addq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x44(%rbp), %eax
movl %eax, %edx
callq 0x2a0b0
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xc9e76
movq -0x20(%rbp), %rax
movl -0x40(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
addq %rcx, %rax
movl -0x44(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x28(%rbp), %rcx
leaq -0x20(%rbp), %rdx
callq *%rax
movl %eax, -0x40(%rbp)
cmpl $0x0, %eax
jne 0xc9e4a
jmp 0xc9e40
movq $0x0, -0x8(%rbp)
jmp 0xc9e76
jmp 0xc9e4c
movq -0x20(%rbp), %rax
cmpq -0x50(%rbp), %rax
jb 0xc9e15
movl -0x40(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
jmp 0xc9e6c
jmp 0xc9e6e
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
| _mi_find_half_pos:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov eax, [rbp+var_C]
add eax, 2
mov [rbp+var_44], eax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
and eax, 7FFFh
sub eax, [rbp+var_44]
mov [rbp+var_40], eax
mov ecx, [rbp+var_44]
mov rax, [rbp+var_20]
mov ecx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+0Ah]
and eax, 2Eh
cmp eax, 0
jnz short loc_C9DEF
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+12h]
add eax, [rbp+var_C]
mov [rbp+var_44], eax
mov eax, [rbp+var_40]
mov ecx, [rbp+var_44]
shl ecx, 1
xor edx, edx
div ecx
mov [rbp+var_3C], eax
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+12h]
mov rax, [rbp+var_30]
mov [rax], ecx
mov rax, [rbp+var_20]
mov ecx, [rbp+var_3C]
imul ecx, [rbp+var_44]
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
mov rcx, [rbp+var_50]
mov eax, [rbp+var_44]
add rcx, rax
mov rax, [rbp+var_38]
mov [rax], rcx
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_50]
mov eax, [rbp+var_44]
mov edx, eax
call _memcpy
mov rax, [rbp+var_50]
mov [rbp+var_8], rax
jmp loc_C9E76
loc_C9DEF:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_40]
shr ecx, 1
mov ecx, ecx
add rax, rcx
mov ecx, [rbp+var_44]
mov edx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
loc_C9E15:
mov rax, [rbp+var_20]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov rax, [rax+48h]
mov rdi, [rbp+var_18]
mov esi, [rbp+var_C]
mov rcx, [rbp+var_28]
lea rdx, [rbp+var_20]
call rax
mov [rbp+var_40], eax
cmp eax, 0
jnz short loc_C9E4A
jmp short $+2
loc_C9E40:
mov [rbp+var_8], 0
jmp short loc_C9E76
loc_C9E4A:
jmp short $+2
loc_C9E4C:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_50]
jb short loc_C9E15
mov ecx, [rbp+var_40]
mov rax, [rbp+var_30]
mov [rax], ecx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_38]
mov [rax], rcx
jmp short $+2
loc_C9E6C:
jmp short $+2
loc_C9E6E:
mov rax, [rbp+var_58]
mov [rbp+var_8], rax
loc_C9E76:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
| unsigned __int16 * mi_find_half_pos(
unsigned int a1,
long long a2,
unsigned __int16 *a3,
_BYTE *a4,
_DWORD *a5,
unsigned __int16 **a6)
{
unsigned __int16 *v7; // [rsp+8h] [rbp-58h]
char *v8; // [rsp+10h] [rbp-50h]
unsigned __int16 *v9; // [rsp+10h] [rbp-50h]
unsigned int v10; // [rsp+1Ch] [rbp-44h]
unsigned int v11; // [rsp+20h] [rbp-40h]
int v12; // [rsp+20h] [rbp-40h]
unsigned __int16 *v16; // [rsp+40h] [rbp-20h] BYREF
long long v17; // [rsp+48h] [rbp-18h]
unsigned int v18; // [rsp+54h] [rbp-Ch]
v18 = a1;
v17 = a2;
v16 = a3;
v11 = (_byteswap_ushort(*a3) & 0x7FFF) - (a1 + 2);
v16 = (unsigned __int16 *)((char *)a3 + a1 + 2);
if ( (*(_WORD *)(a2 + 10) & 0x2E) != 0 )
{
v9 = (unsigned __int16 *)((char *)v16 + (v11 >> 1) - a1 - 2);
*a4 = 0;
do
{
v7 = v16;
v12 = (*(long long ( **)(long long, _QWORD, unsigned __int16 **, _BYTE *))(v17 + 72))(v17, v18, &v16, a4);
if ( !v12 )
return 0LL;
}
while ( v16 < v9 );
*a5 = v12;
*a6 = v16;
return v7;
}
else
{
v10 = v18 + *(unsigned __int16 *)(v17 + 18);
*a5 = *(unsigned __int16 *)(v17 + 18);
v8 = (char *)v16 + v10 * (v11 / (2 * v10));
*a6 = (unsigned __int16 *)&v8[v10];
memcpy(a4, v8, v10);
return (unsigned __int16 *)v8;
}
}
| _mi_find_half_pos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x2
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
AND EAX,0x7fff
SUB EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x40],EAX
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x2e
CMP EAX,0x0
JNZ 0x001c9def
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + 0x12]
ADD EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
SHL ECX,0x1
XOR EDX,EDX
DIV ECX
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0x12]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL ECX,dword ptr [RBP + -0x44]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x44]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x44]
MOV EDX,EAX
CALL 0x0012a0b0
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001c9e76
LAB_001c9def:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x40]
SHR ECX,0x1
MOV ECX,ECX
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x44]
MOV EDX,ECX
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
LAB_001c9e15:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x48]
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x28]
LEA RDX,[RBP + -0x20]
CALL RAX
MOV dword ptr [RBP + -0x40],EAX
CMP EAX,0x0
JNZ 0x001c9e4a
JMP 0x001c9e40
LAB_001c9e40:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001c9e76
LAB_001c9e4a:
JMP 0x001c9e4c
LAB_001c9e4c:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x50]
JC 0x001c9e15
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
JMP 0x001c9e6c
LAB_001c9e6c:
JMP 0x001c9e6e
LAB_001c9e6e:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x8],RAX
LAB_001c9e76:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
byte * _mi_find_half_pos(int param_1,long param_2,byte *param_3,int1 *param_4,uint *param_5,
int8 *param_6)
{
byte *pbVar1;
uint uVar2;
uint uVar3;
byte *pbVar4;
byte *local_28;
long local_20;
int local_14;
byte *local_10;
uVar2 = param_1 + 2;
uVar3 = ((uint)param_3[1] | (*param_3 & 0x7f) << 8) - uVar2;
local_28 = param_3 + uVar2;
local_20 = param_2;
local_14 = param_1;
if ((*(ushort *)(param_2 + 10) & 0x2e) == 0) {
uVar2 = (uint)*(ushort *)(param_2 + 0x12) + param_1;
*param_5 = (uint)*(ushort *)(param_2 + 0x12);
pbVar4 = local_28 + (uVar3 / (uVar2 * 2)) * uVar2;
*param_6 = pbVar4 + uVar2;
memcpy(param_4,pbVar4,(ulong)uVar2);
local_10 = pbVar4;
}
else {
pbVar4 = local_28 + ((ulong)(uVar3 >> 1) - (ulong)uVar2);
*param_4 = 0;
do {
pbVar1 = local_28;
uVar2 = (**(code **)(local_20 + 0x48))(local_20,local_14,&local_28,param_4);
if (uVar2 == 0) {
return (byte *)0x0;
}
} while (local_28 < pbVar4);
*param_5 = uVar2;
*param_6 = local_28;
local_10 = pbVar1;
}
return local_10;
}
| |
30,595 | ggml_compute_forward_sqr | monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c | static void ggml_compute_forward_sqr(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_sqr_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O0 | c | ggml_compute_forward_sqr:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
jne 0x137cb
jmp 0x137ba
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x27450
jmp 0x137e5
leaq 0x9e388(%rip), %rdi # 0xb1b5a
movl $0x14ec, %esi # imm = 0x14EC
leaq 0x9e4e9(%rip), %rdx # 0xb1cc7
movb $0x0, %al
callq 0xd030
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| ggml_compute_forward_sqr:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_10]
mov rax, [rax+98h]
mov [rsp+18h+var_18], rax
mov rax, [rsp+18h+var_18]
mov eax, [rax]
test eax, eax
jnz short loc_137CB
jmp short $+2
loc_137BA:
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
call ggml_compute_forward_sqr_f32
jmp short loc_137E5
loc_137CB:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 14ECh
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_137E5:
add rsp, 18h
retn
| double ggml_compute_forward_sqr(long long a1, long long a2)
{
double result; // xmm0_8
if ( **(_DWORD **)(a2 + 152) )
return ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c",
5356LL,
"fatal error");
ggml_compute_forward_sqr_f32(a1, a2);
return result;
}
| ggml_compute_forward_sqr:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JNZ 0x001137cb
JMP 0x001137ba
LAB_001137ba:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00127450
JMP 0x001137e5
LAB_001137cb:
LEA RDI,[0x1b1b5a]
MOV ESI,0x14ec
LEA RDX,[0x1b1cc7]
MOV AL,0x0
CALL 0x0010d030
LAB_001137e5:
ADD RSP,0x18
RET
|
void ggml_compute_forward_sqr(int8 param_1,long param_2)
{
if (**(int **)(param_2 + 0x98) == 0) {
ggml_compute_forward_sqr_f32(param_1,param_2);
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c"
,0x14ec,"fatal error");
}
| |
30,596 | listener::update() | untodesu[P]voxelius/game/client/listener.cc | void listener::update(void)
{
if(session::is_ingame()) {
const auto &velocity = globals::dimension->entities.get<VelocityComponent>(globals::player).value;
const auto &position = camera::position_local;
alListener3f(AL_POSITION, position.x, position.y, position.z);
alListener3f(AL_VELOCITY, velocity.x, velocity.y, velocity.z);
float orientation[6];
orientation[0] = camera::direction.x;
orientation[1] = camera::direction.y;
orientation[2] = camera::direction.z;
orientation[3] = DIR_UP<float>.x;
orientation[4] = DIR_UP<float>.y;
orientation[5] = DIR_UP<float>.z;
alListenerfv(AL_ORIENTATION, orientation);
}
alListenerf(AL_GAIN, cxpr::clamp(sound::volume_master.get_value() * 0.01f, 0.0f, 1.0f));
} | O0 | cpp | listener::update():
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
callq 0x11c270
testb $0x1, %al
jne 0xde146
jmp 0xde241
leaq 0x4300e3(%rip), %rax # 0x50e230
movq (%rax), %rdi
addq $0x158, %rdi # imm = 0x158
leaq 0x4300da(%rip), %rax # 0x50e238
movl (%rax), %esi
callq 0x40080
movq %rax, -0x8(%rbp)
leaq 0x42f794(%rip), %rax # 0x50d904
movq %rax, -0x10(%rbp)
leaq 0x45d08d(%rip), %rax # 0x53b208
movq (%rax), %rax
leaq 0x42f77f(%rip), %rcx # 0x50d904
movss (%rcx), %xmm0
leaq 0x42f774(%rip), %rcx # 0x50d904
movss 0x4(%rcx), %xmm1
leaq 0x42f768(%rip), %rcx # 0x50d904
movss 0x8(%rcx), %xmm2
movl $0x1004, %edi # imm = 0x1004
callq *%rax
leaq 0x45d059(%rip), %rax # 0x53b208
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movss (%rcx), %xmm0
movq -0x8(%rbp), %rcx
movss 0x4(%rcx), %xmm1
movq -0x8(%rbp), %rcx
movss 0x8(%rcx), %xmm2
movl $0x1006, %edi # imm = 0x1006
callq *%rax
leaq 0x42f6d2(%rip), %rax # 0x50d8ac
movss (%rax), %xmm0
movss %xmm0, -0x30(%rbp)
leaq 0x42f6c2(%rip), %rax # 0x50d8ac
movss 0x4(%rax), %xmm0
movss %xmm0, -0x2c(%rbp)
leaq 0x42f6b1(%rip), %rax # 0x50d8ac
movss 0x8(%rax), %xmm0
movss %xmm0, -0x28(%rbp)
movss 0x294247(%rip), %xmm0 # 0x372454
movss %xmm0, -0x24(%rbp)
movss 0x29423e(%rip), %xmm0 # 0x372458
movss %xmm0, -0x20(%rbp)
movss 0x294235(%rip), %xmm0 # 0x37245c
movss %xmm0, -0x1c(%rbp)
leaq 0x45cfed(%rip), %rax # 0x53b220
movq (%rax), %rax
leaq -0x30(%rbp), %rsi
movl $0x100f, %edi # imm = 0x100F
callq *%rax
leaq 0x45cfd0(%rip), %rax # 0x53b218
movq (%rax), %rax
movq %rax, -0x38(%rbp)
leaq 0x43197a(%rip), %rdi # 0x50fbd0
callq 0x40320
movss 0x28c601(%rip), %xmm1 # 0x36a864
mulss %xmm1, %xmm0
xorps %xmm1, %xmm1
movss 0x28bdd2(%rip), %xmm2 # 0x36a044
callq 0xde290
movq -0x38(%rbp), %rax
movl $0x100a, %edi # imm = 0x100A
callq *%rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN8listener6updateEv:
push rbp
mov rbp, rsp
sub rsp, 40h
call _ZN7session9is_ingameEv; session::is_ingame(void)
test al, 1
jnz short loc_DE146
jmp loc_DE241
loc_DE146:
lea rax, _ZN7globals9dimensionE; globals::dimension
mov rdi, [rax]
add rdi, 158h
lea rax, _ZN7globals6playerE; globals::player
mov esi, [rax]
call _ZN4entt14basic_registryINS_6entityESaIS1_EE3getIJ17VelocityComponentEEEDcS1_
mov [rbp+var_8], rax
lea rax, _ZN6camera14position_localE; camera::position_local
mov [rbp+var_10], rax
lea rax, SALAD_alListener3f
mov rax, [rax]
lea rcx, _ZN6camera14position_localE; camera::position_local
movss xmm0, dword ptr [rcx]
lea rcx, _ZN6camera14position_localE; camera::position_local
movss xmm1, dword ptr [rcx+4]
lea rcx, _ZN6camera14position_localE; camera::position_local
movss xmm2, dword ptr [rcx+8]
mov edi, 1004h
call rax
lea rax, SALAD_alListener3f
mov rax, [rax]
mov rcx, [rbp+var_8]
movss xmm0, dword ptr [rcx]
mov rcx, [rbp+var_8]
movss xmm1, dword ptr [rcx+4]
mov rcx, [rbp+var_8]
movss xmm2, dword ptr [rcx+8]
mov edi, 1006h
call rax
lea rax, _ZN6camera9directionE; camera::direction
movss xmm0, dword ptr [rax]
movss [rbp+var_30], xmm0
lea rax, _ZN6camera9directionE; camera::direction
movss xmm0, dword ptr [rax+4]
movss [rbp+var_2C], xmm0
lea rax, _ZN6camera9directionE; camera::direction
movss xmm0, dword ptr [rax+8]
movss [rbp+var_28], xmm0
movss xmm0, cs:_ZL6DIR_UPIfE; DIR_UP<float>
movss [rbp+var_24], xmm0
movss xmm0, cs:dword_372458
movss [rbp+var_20], xmm0
movss xmm0, cs:dword_37245C
movss [rbp+var_1C], xmm0
lea rax, SALAD_alListenerfv
mov rax, [rax]
lea rsi, [rbp+var_30]
mov edi, 100Fh
call rax
loc_DE241:
lea rax, SALAD_alListenerf
mov rax, [rax]
mov [rbp+var_38], rax
lea rdi, _ZN5sound13volume_masterE; sound::volume_master
call _ZNK12ConfigNumberIfE9get_valueEv; ConfigNumber<float>::get_value(void)
movss xmm1, cs:dword_36A864
mulss xmm0, xmm1
xorps xmm1, xmm1
movss xmm2, cs:flt_36A044
call _ZN4cxprL5clampIfEEKT_S1_S1_S1_; cxpr::clamp<float>(float,float,float)
mov rax, [rbp+var_38]
mov edi, 100Ah
call rax
add rsp, 40h
pop rbp
retn
| long long listener::update(listener *this)
{
float value; // xmm0_4
long long ( *v3)(long long); // [rsp+8h] [rbp-38h]
_DWORD v4[8]; // [rsp+10h] [rbp-30h] BYREF
long long *v5; // [rsp+30h] [rbp-10h]
float *v6; // [rsp+38h] [rbp-8h]
if ( (session::is_ingame(this) & 1) != 0 )
{
v6 = (float *)entt::basic_registry<entt::entity,std::allocator<entt::entity>>::get<VelocityComponent>(
globals::dimension + 344LL,
globals::player);
v5 = &camera::position_local;
SALAD_alListener3f(
4100LL,
*(float *)&camera::position_local,
*((float *)&camera::position_local + 1),
*((float *)&camera::position_local + 2));
SALAD_alListener3f(4102LL, *v6, v6[1], v6[2]);
v4[0] = camera::direction;
v4[1] = *(&camera::direction + 1);
v4[2] = *(&camera::direction + 2);
v4[3] = DIR_UP<float>;
v4[4] = 1065353216;
v4[5] = 0;
SALAD_alListenerfv(4111LL, v4);
}
v3 = (long long ( *)(long long))SALAD_alListenerf;
value = ConfigNumber<float>::get_value((long long)&sound::volume_master);
cxpr::clamp<float>(value * 0.0099999998, 0.0, 1.0);
return v3(4106LL);
}
| update:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
CALL 0x0021c270
TEST AL,0x1
JNZ 0x001de146
JMP 0x001de241
LAB_001de146:
LEA RAX,[0x60e230]
MOV RDI,qword ptr [RAX]
ADD RDI,0x158
LEA RAX,[0x60e238]
MOV ESI,dword ptr [RAX]
CALL 0x00140080
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[0x60d904]
MOV qword ptr [RBP + -0x10],RAX
LEA RAX,[0x63b208]
MOV RAX,qword ptr [RAX]
LEA RCX,[0x60d904]
MOVSS XMM0,dword ptr [RCX]
LEA RCX,[0x60d904]
MOVSS XMM1,dword ptr [RCX + 0x4]
LEA RCX,[0x60d904]
MOVSS XMM2,dword ptr [RCX + 0x8]
MOV EDI,0x1004
CALL RAX
LEA RAX,[0x63b208]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RCX]
MOV RCX,qword ptr [RBP + -0x8]
MOVSS XMM1,dword ptr [RCX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
MOVSS XMM2,dword ptr [RCX + 0x8]
MOV EDI,0x1006
CALL RAX
LEA RAX,[0x60d8ac]
MOVSS XMM0,dword ptr [RAX]
MOVSS dword ptr [RBP + -0x30],XMM0
LEA RAX,[0x60d8ac]
MOVSS XMM0,dword ptr [RAX + 0x4]
MOVSS dword ptr [RBP + -0x2c],XMM0
LEA RAX,[0x60d8ac]
MOVSS XMM0,dword ptr [RAX + 0x8]
MOVSS dword ptr [RBP + -0x28],XMM0
MOVSS XMM0,dword ptr [0x00472454]
MOVSS dword ptr [RBP + -0x24],XMM0
MOVSS XMM0,dword ptr [0x00472458]
MOVSS dword ptr [RBP + -0x20],XMM0
MOVSS XMM0,dword ptr [0x0047245c]
MOVSS dword ptr [RBP + -0x1c],XMM0
LEA RAX,[0x63b220]
MOV RAX,qword ptr [RAX]
LEA RSI,[RBP + -0x30]
MOV EDI,0x100f
CALL RAX
LAB_001de241:
LEA RAX,[0x63b218]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
LEA RDI,[0x60fbd0]
CALL 0x00140320
MOVSS XMM1,dword ptr [0x0046a864]
MULSS XMM0,XMM1
XORPS XMM1,XMM1
MOVSS XMM2,dword ptr [0x0046a044]
CALL 0x001de290
MOV RAX,qword ptr [RBP + -0x38]
MOV EDI,0x100a
CALL RAX
ADD RSP,0x40
POP RBP
RET
|
/* listener::update() */
void listener::update(void)
{
code *pcVar1;
ulong uVar2;
float fVar3;
int4 local_38;
int4 local_34;
int4 local_30;
int4 local_2c;
int4 local_28;
int4 local_24;
int4 *local_18;
_func_decltype_auto *local_10;
uVar2 = session::is_ingame();
if ((uVar2 & 1) != 0) {
local_10 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::
get<VelocityComponent>
((basic_registry<entt::entity,std::allocator<entt::entity>> *)
(globals::dimension + 0x158),globals::player);
local_18 = &camera::position_local;
(*SALAD_alListener3f)(camera::position_local,DAT_0060d908,DAT_0060d90c,0x1004);
(*SALAD_alListener3f)
(*(int4 *)local_10,*(int4 *)(local_10 + 4),*(int4 *)(local_10 + 8),
0x1006);
local_38 = camera::direction;
local_34 = DAT_0060d8b0;
local_30 = DAT_0060d8b4;
local_2c = DIR_UP<float>;
local_28 = DAT_00472458;
local_24 = DAT_0047245c;
(*SALAD_alListenerfv)(0x100f,&local_38);
}
pcVar1 = SALAD_alListenerf;
fVar3 = (float)ConfigNumber<float>::get_value((ConfigNumber<float> *)sound::volume_master);
cxpr::clamp<float>(fVar3 * DAT_0046a864,0.0,DAT_0046a044);
(*pcVar1)(0x100a);
return;
}
| |
30,597 | finish_resize_simple_key_cache | eloqsql/mysys/mf_keycache.c | static
void finish_resize_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache)
{
DBUG_ENTER("finish_resize_simple_key_cache");
mysql_mutex_assert_owner(&keycache->cache_lock);
/*
Mark the resize finished. This allows other threads to start a
resize or to request new cache blocks.
*/
keycache->in_resize= 0;
/* Signal waiting threads. */
release_whole_queue(&keycache->resize_queue);
keycache_pthread_mutex_unlock(&keycache->cache_lock);
DBUG_VOID_RETURN;
} | O3 | c | finish_resize_simple_key_cache:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x0, 0x1(%rdi)
addq $0x108, %rdi # imm = 0x108
callq 0x987b5
movq 0x100(%rbx), %rdi
testq %rdi, %rdi
jne 0x99c98
addq $0xc0, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x291c0
leaq 0x2ec371(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x99c83
| finish_resize_simple_key_cache:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov byte ptr [rdi+1], 0
add rdi, 108h
call release_whole_queue
mov rdi, [rbx+100h]
test rdi, rdi
jnz short loc_99C98
loc_99C83:
add rbx, 0C0h
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp _pthread_mutex_unlock
loc_99C98:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_99C83
| long long finish_resize_simple_key_cache(long long a1)
{
long long v2; // rdi
*(_BYTE *)(a1 + 1) = 0;
release_whole_queue((long long *)(a1 + 264));
v2 = *(_QWORD *)(a1 + 256);
if ( v2 )
((void ( *)(long long))PSI_server[44])(v2);
return pthread_mutex_unlock(a1 + 192);
}
| finish_resize_simple_key_cache:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV byte ptr [RDI + 0x1],0x0
ADD RDI,0x108
CALL 0x001987b5
MOV RDI,qword ptr [RBX + 0x100]
TEST RDI,RDI
JNZ 0x00199c98
LAB_00199c83:
ADD RBX,0xc0
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001291c0
LAB_00199c98:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00199c83
|
void finish_resize_simple_key_cache(long param_1)
{
*(int1 *)(param_1 + 1) = 0;
release_whole_queue(param_1 + 0x108);
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0xc0));
return;
}
| |
30,598 | pvio_socket_change_timeout | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | my_bool pvio_socket_change_timeout(MARIADB_PVIO *pvio, enum enum_pvio_timeout type, int timeout)
{
struct timeval tm;
int rc= 0;
struct st_pvio_socket *csock= NULL;
if (!pvio)
return 1;
if (!(csock= (struct st_pvio_socket *)pvio->data))
return 1;
tm.tv_sec= timeout / 1000;
tm.tv_usec= (timeout % 1000) * 1000;
switch(type)
{
case PVIO_WRITE_TIMEOUT:
#ifndef _WIN32
rc= setsockopt(csock->socket, SOL_SOCKET, SO_SNDTIMEO, (const char *)&tm, sizeof(tm));
#else
rc= setsockopt(csock->socket, SOL_SOCKET, SO_SNDTIMEO, (const char *)&timeout, sizeof(int));
#endif
break;
case PVIO_READ_TIMEOUT:
#ifndef _WIN32
rc= setsockopt(csock->socket, SOL_SOCKET, SO_RCVTIMEO, (const char *)&tm, sizeof(tm));
#else
rc= setsockopt(csock->socket, SOL_SOCKET, SO_RCVTIMEO, (const char *)&timeout, sizeof(int));
#endif
break;
default:
break;
}
return rc;
} | O0 | c | pvio_socket_change_timeout:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x5cd41
movb $0x1, -0x1(%rbp)
jmp 0x5ce0e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x5cd5b
movb $0x1, -0x1(%rbp)
jmp 0x5ce0e
movslq -0x18(%rbp), %rax
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
cltq
movq %rax, -0x28(%rbp)
movslq -0x18(%rbp), %rcx
movl %ecx, %eax
imulq $0x10624dd3, %rcx, %rcx # imm = 0x10624DD3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x26, %rcx
addl %edx, %ecx
imull $0x3e8, %ecx, %ecx # imm = 0x3E8
subl %ecx, %eax
imull $0x3e8, %eax, %eax # imm = 0x3E8
cltq
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x3c(%rbp)
subl $0x1, %eax
je 0x5cde2
jmp 0x5cdb4
movl -0x3c(%rbp), %eax
subl $0x2, %eax
jne 0x5ce06
jmp 0x5cdbe
movq -0x38(%rbp), %rax
movl (%rax), %edi
movl $0x1, %esi
movl $0x15, %edx
leaq -0x28(%rbp), %rcx
movl $0x10, %r8d
callq 0x14790
movl %eax, -0x2c(%rbp)
jmp 0x5ce08
movq -0x38(%rbp), %rax
movl (%rax), %edi
movl $0x1, %esi
movl $0x14, %edx
leaq -0x28(%rbp), %rcx
movl $0x10, %r8d
callq 0x14790
movl %eax, -0x2c(%rbp)
jmp 0x5ce08
jmp 0x5ce08
movl -0x2c(%rbp), %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| pvio_socket_change_timeout:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_2C], 0
mov [rbp+var_38], 0
cmp [rbp+var_10], 0
jnz short loc_5CD41
mov [rbp+var_1], 1
jmp loc_5CE0E
loc_5CD41:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jnz short loc_5CD5B
mov [rbp+var_1], 1
jmp loc_5CE0E
loc_5CD5B:
movsxd rax, [rbp+var_18]
imul rax, 10624DD3h
mov rcx, rax
shr rcx, 3Fh
sar rax, 26h
add eax, ecx
cdqe
mov [rbp+var_28], rax
movsxd rcx, [rbp+var_18]
mov eax, ecx
imul rcx, 10624DD3h
mov rdx, rcx
shr rdx, 3Fh
sar rcx, 26h
add ecx, edx
imul ecx, 3E8h
sub eax, ecx
imul eax, 3E8h
cdqe
mov [rbp+var_20], rax
mov eax, [rbp+var_14]
mov [rbp+var_3C], eax
sub eax, 1
jz short loc_5CDE2
jmp short $+2
loc_5CDB4:
mov eax, [rbp+var_3C]
sub eax, 2
jnz short loc_5CE06
jmp short $+2
loc_5CDBE:
mov rax, [rbp+var_38]
mov edi, [rax]
mov esi, 1
mov edx, 15h
lea rcx, [rbp+var_28]
mov r8d, 10h
call _setsockopt
mov [rbp+var_2C], eax
jmp short loc_5CE08
loc_5CDE2:
mov rax, [rbp+var_38]
mov edi, [rax]
mov esi, 1
mov edx, 14h
lea rcx, [rbp+var_28]
mov r8d, 10h
call _setsockopt
mov [rbp+var_2C], eax
jmp short loc_5CE08
loc_5CE06:
jmp short $+2
loc_5CE08:
mov eax, [rbp+var_2C]
mov [rbp+var_1], al
loc_5CE0E:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char pvio_socket_change_timeout(unsigned int **a1, int a2, int a3)
{
unsigned int *v4; // [rsp+8h] [rbp-38h]
char v5; // [rsp+14h] [rbp-2Ch]
_QWORD v6[2]; // [rsp+18h] [rbp-28h] BYREF
int v7; // [rsp+28h] [rbp-18h]
int v8; // [rsp+2Ch] [rbp-14h]
unsigned int **v9; // [rsp+30h] [rbp-10h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = 0;
if ( !a1 )
return 1;
v4 = *v9;
if ( !*v9 )
return 1;
v6[0] = v7 / 1000;
v6[1] = 1000 * (v7 % 1000);
if ( v8 == 1 )
return setsockopt(*v4, 1LL, 20LL, v6, 16LL);
if ( v8 == 2 )
return setsockopt(*v4, 1LL, 21LL, v6, 16LL);
return v5;
}
| pvio_socket_change_timeout:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV dword ptr [RBP + -0x2c],0x0
MOV qword ptr [RBP + -0x38],0x0
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0015cd41
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015ce0e
LAB_0015cd41:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JNZ 0x0015cd5b
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015ce0e
LAB_0015cd5b:
MOVSXD RAX,dword ptr [RBP + -0x18]
IMUL RAX,RAX,0x10624dd3
MOV RCX,RAX
SHR RCX,0x3f
SAR RAX,0x26
ADD EAX,ECX
CDQE
MOV qword ptr [RBP + -0x28],RAX
MOVSXD RCX,dword ptr [RBP + -0x18]
MOV EAX,ECX
IMUL RCX,RCX,0x10624dd3
MOV RDX,RCX
SHR RDX,0x3f
SAR RCX,0x26
ADD ECX,EDX
IMUL ECX,ECX,0x3e8
SUB EAX,ECX
IMUL EAX,EAX,0x3e8
CDQE
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x3c],EAX
SUB EAX,0x1
JZ 0x0015cde2
JMP 0x0015cdb4
LAB_0015cdb4:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x2
JNZ 0x0015ce06
JMP 0x0015cdbe
LAB_0015cdbe:
MOV RAX,qword ptr [RBP + -0x38]
MOV EDI,dword ptr [RAX]
MOV ESI,0x1
MOV EDX,0x15
LEA RCX,[RBP + -0x28]
MOV R8D,0x10
CALL 0x00114790
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0015ce08
LAB_0015cde2:
MOV RAX,qword ptr [RBP + -0x38]
MOV EDI,dword ptr [RAX]
MOV ESI,0x1
MOV EDX,0x14
LEA RCX,[RBP + -0x28]
MOV R8D,0x10
CALL 0x00114790
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0015ce08
LAB_0015ce06:
JMP 0x0015ce08
LAB_0015ce08:
MOV EAX,dword ptr [RBP + -0x2c]
MOV byte ptr [RBP + -0x1],AL
LAB_0015ce0e:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 pvio_socket_change_timeout(int8 *param_1,int param_2,int param_3)
{
int *piVar1;
int iVar2;
int1 local_34;
long local_30;
long local_28;
int local_20;
int local_1c;
int8 *local_18;
int1 local_9;
local_34 = 0;
if (param_1 == (int8 *)0x0) {
local_9 = 1;
}
else {
piVar1 = (int *)*param_1;
if (piVar1 == (int *)0x0) {
local_9 = 1;
}
else {
local_30 = (long)(param_3 / 1000);
local_28 = (long)((param_3 % 1000) * 1000);
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
if (param_2 == 1) {
iVar2 = setsockopt(*piVar1,1,0x14,&local_30,0x10);
local_34 = (int1)iVar2;
}
else if (param_2 == 2) {
iVar2 = setsockopt(*piVar1,1,0x15,&local_30,0x10);
local_34 = (int1)iVar2;
}
local_9 = local_34;
}
}
return local_9;
}
| |
30,599 | mi_test_if_changed | eloqsql/storage/myisam/mi_locking.c | int _mi_test_if_changed(register MI_INFO *info)
{
MYISAM_SHARE *share=info->s;
if (share->state.process != share->last_process ||
share->state.unique != info->last_unique ||
share->state.update_count != info->last_loop)
{ /* Keyfile has changed */
DBUG_PRINT("info",("index file changed"));
if (share->state.process != share->this_process)
(void) flush_key_blocks(share->key_cache, share->kfile,
&share->dirty_part_map, FLUSH_RELEASE);
share->last_process=share->state.process;
info->last_unique= share->state.unique;
info->last_loop= share->state.update_count;
info->update|= HA_STATE_WRITTEN; /* Must use file on next */
info->data_changed= 1; /* For mi_is_changed */
return 1;
}
return (!(info->update & HA_STATE_AKTIV) ||
(info->update & (HA_STATE_WRITTEN | HA_STATE_DELETED |
HA_STATE_KEY_CHANGED)));
} | O0 | c | mi_test_if_changed:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x308(%rcx), %rax
jne 0xb0cca
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x158(%rcx), %rax
jne 0xb0cca
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x168(%rcx), %rax
je 0xb0d70
jmp 0xb0ccc
jmp 0xb0cce
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x300(%rcx), %rax
je 0xb0d0d
movq -0x18(%rbp), %rax
movq 0x278(%rax), %rdi
movq -0x18(%rbp), %rax
movl 0x350(%rax), %esi
movq -0x18(%rbp), %rdx
addq $0x280, %rdx # imm = 0x280
movl $0x1, %ecx
callq 0xe4ce0
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x308(%rax)
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x158(%rax)
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x168(%rax)
movq -0x10(%rbp), %rax
movl 0x1d0(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x1d0(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x1fc(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xb0daa
movq -0x10(%rbp), %rax
movl 0x1d0(%rax), %ecx
andl $0x2, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
je 0xb0d9f
movq -0x10(%rbp), %rax
movl 0x1d0(%rax), %eax
andl $0x8c, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_test_if_changed:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rax, [rax+68h]
mov rcx, [rbp+var_18]
cmp rax, [rcx+308h]
jnz short loc_B0CCA
mov rax, [rbp+var_18]
mov rax, [rax+70h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+158h]
jnz short loc_B0CCA
mov rax, [rbp+var_18]
mov rax, [rax+78h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+168h]
jz loc_B0D70
loc_B0CCA:
jmp short $+2
loc_B0CCC:
jmp short $+2
loc_B0CCE:
mov rax, [rbp+var_18]
mov rax, [rax+68h]
mov rcx, [rbp+var_18]
cmp rax, [rcx+300h]
jz short loc_B0D0D
mov rax, [rbp+var_18]
mov rdi, [rax+278h]
mov rax, [rbp+var_18]
mov esi, [rax+350h]
mov rdx, [rbp+var_18]
add rdx, 280h
mov ecx, 1
call flush_key_blocks
loc_B0D0D:
mov rax, [rbp+var_18]
mov rcx, [rax+68h]
mov rax, [rbp+var_18]
mov [rax+308h], rcx
mov rax, [rbp+var_18]
mov rcx, [rax+70h]
mov rax, [rbp+var_10]
mov [rax+158h], rcx
mov rax, [rbp+var_18]
mov rcx, [rax+78h]
mov rax, [rbp+var_10]
mov [rax+168h], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+1D0h]
or ecx, 4
mov [rax+1D0h], ecx
mov rax, [rbp+var_10]
mov dword ptr [rax+1FCh], 1
mov [rbp+var_4], 1
jmp short loc_B0DAA
loc_B0D70:
mov rax, [rbp+var_10]
mov ecx, [rax+1D0h]
and ecx, 2
mov al, 1
cmp ecx, 0
mov [rbp+var_19], al
jz short loc_B0D9F
mov rax, [rbp+var_10]
mov eax, [rax+1D0h]
and eax, 8Ch
cmp eax, 0
setnz al
mov [rbp+var_19], al
loc_B0D9F:
mov al, [rbp+var_19]
and al, 1
movzx eax, al
mov [rbp+var_4], eax
loc_B0DAA:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| _BOOL8 mi_test_if_changed(long long *a1)
{
bool v2; // [rsp+7h] [rbp-19h]
long long v3; // [rsp+8h] [rbp-18h]
v3 = *a1;
if ( *(_QWORD *)(*a1 + 104) == *(_QWORD *)(*a1 + 776)
&& *(_QWORD *)(v3 + 112) == a1[43]
&& *(_QWORD *)(v3 + 120) == a1[45] )
{
v2 = 1;
if ( (a1[58] & 2) != 0 )
return (a1[58] & 0x8C) != 0;
return v2;
}
else
{
if ( *(_QWORD *)(v3 + 104) != *(_QWORD *)(v3 + 768) )
flush_key_blocks(*(_QWORD *)(v3 + 632), *(unsigned int *)(v3 + 848), v3 + 640, 1LL);
*(_QWORD *)(v3 + 776) = *(_QWORD *)(v3 + 104);
a1[43] = *(_QWORD *)(v3 + 112);
a1[45] = *(_QWORD *)(v3 + 120);
*((_DWORD *)a1 + 116) |= 4u;
*((_DWORD *)a1 + 127) = 1;
return 1;
}
}
| _mi_test_if_changed:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x308]
JNZ 0x001b0cca
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x70]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x158]
JNZ 0x001b0cca
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x78]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x168]
JZ 0x001b0d70
LAB_001b0cca:
JMP 0x001b0ccc
LAB_001b0ccc:
JMP 0x001b0cce
LAB_001b0cce:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x300]
JZ 0x001b0d0d
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x278]
MOV RAX,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RAX + 0x350]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,0x280
MOV ECX,0x1
CALL 0x001e4ce0
LAB_001b0d0d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x308],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x70]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x158],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x168],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x1d0]
OR ECX,0x4
MOV dword ptr [RAX + 0x1d0],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1fc],0x1
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b0daa
LAB_001b0d70:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x1d0]
AND ECX,0x2
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x001b0d9f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1d0]
AND EAX,0x8c
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_001b0d9f:
MOV AL,byte ptr [RBP + -0x19]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
LAB_001b0daa:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
bool _mi_test_if_changed(long *param_1)
{
long lVar1;
bool local_21;
lVar1 = *param_1;
if (((*(long *)(lVar1 + 0x68) == *(long *)(lVar1 + 0x308)) &&
(*(long *)(lVar1 + 0x70) == param_1[0x2b])) && (*(long *)(lVar1 + 0x78) == param_1[0x2d])) {
local_21 = true;
if ((*(uint *)(param_1 + 0x3a) & 2) != 0) {
local_21 = (*(uint *)(param_1 + 0x3a) & 0x8c) != 0;
}
}
else {
if (*(long *)(lVar1 + 0x68) != *(long *)(lVar1 + 0x300)) {
flush_key_blocks(*(int8 *)(lVar1 + 0x278),*(int4 *)(lVar1 + 0x350),lVar1 + 0x280,1
);
}
*(int8 *)(lVar1 + 0x308) = *(int8 *)(lVar1 + 0x68);
param_1[0x2b] = *(long *)(lVar1 + 0x70);
param_1[0x2d] = *(long *)(lVar1 + 0x78);
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) | 4;
*(int4 *)((long)param_1 + 0x1fc) = 1;
local_21 = true;
}
return local_21;
}
|
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.