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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
32,500 | match_pins | eloqsql/mysys/lf_alloc-pin.c | static int match_pins(LF_PINS *el, void *addr)
{
int i;
LF_PINS *el_end= el+LF_DYNARRAY_LEVEL_LENGTH;
for (; el < el_end; el++)
for (i= 0; i < LF_PINBOX_PINS; i++)
if (el->pin[i] == addr)
return 1;
return 0;
} | O3 | c | match_pins:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %ecx, %ecx
movq (%rdi,%rcx,8), %rdx
cmpq %rsi, %rdx
je 0xc5a3e
incq %rcx
cmpq $0x4, %rcx
jne 0xc5a15
leaq 0x78(%rax), %rcx
addq $0x78, %rdi
cmpq $0x7788, %rax # imm = 0x7788
movq %rcx, %rax
jb 0xc5a13
xorl %eax, %eax
jmp 0xc5a43
movl $0x1, %eax
popq %rbp
retq
nopl (%rax)
| match_pins:
push rbp
mov rbp, rsp
xor eax, eax
loc_C5A13:
xor ecx, ecx
loc_C5A15:
mov rdx, [rdi+rcx*8]
cmp rdx, rsi
jz short loc_C5A3E
inc rcx
cmp rcx, 4
jnz short loc_C5A15
lea rcx, [rax+78h]
add rdi, 78h ; 'x'
cmp rax, 7788h
mov rax, rcx
jb short loc_C5A13
xor eax, eax
jmp short loc_C5A43
loc_C5A3E:
mov eax, 1
loc_C5A43:
pop rbp
retn
| long long match_pins(long long a1, long long a2)
{
unsigned long long v2; // rax
long long i; // rcx
bool v4; // cf
v2 = 0LL;
while ( 2 )
{
for ( i = 0LL; i != 4; ++i )
{
if ( *(_QWORD *)(a1 + 8 * i) == a2 )
return 1LL;
}
a1 += 120LL;
v4 = v2 < 0x7788;
v2 += 120LL;
if ( v4 )
continue;
break;
}
return 0LL;
}
| match_pins:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_001c5a13:
XOR ECX,ECX
LAB_001c5a15:
MOV RDX,qword ptr [RDI + RCX*0x8]
CMP RDX,RSI
JZ 0x001c5a3e
INC RCX
CMP RCX,0x4
JNZ 0x001c5a15
LEA RCX,[RAX + 0x78]
ADD RDI,0x78
CMP RAX,0x7788
MOV RAX,RCX
JC 0x001c5a13
XOR EAX,EAX
JMP 0x001c5a43
LAB_001c5a3e:
MOV EAX,0x1
LAB_001c5a43:
POP RBP
RET
|
int8 match_pins(long param_1,long param_2)
{
ulong uVar1;
long lVar2;
bool bVar3;
uVar1 = 0;
do {
lVar2 = 0;
do {
if (*(long *)(param_1 + lVar2 * 8) == param_2) {
return 1;
}
lVar2 = lVar2 + 1;
} while (lVar2 != 4);
param_1 = param_1 + 0x78;
bVar3 = uVar1 < 0x7788;
uVar1 = uVar1 + 0x78;
} while (bVar3);
return 0;
}
| |
32,501 | js_os_utimes | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_utimes(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *path;
int64_t atime, mtime;
int ret;
if (JS_ToInt64(ctx, &atime, argv[1]))
return JS_EXCEPTION;
if (JS_ToInt64(ctx, &mtime, argv[2]))
return JS_EXCEPTION;
path = JS_ToCString(ctx, argv[0]);
if (!path)
return JS_EXCEPTION;
#if defined(_WIN32)
{
struct _utimbuf times;
times.actime = atime / 1000;
times.modtime = mtime / 1000;
ret = js_get_errno(_utime(path, ×));
}
#else
{
struct timeval times[2];
ms_to_timeval(×[0], atime);
ms_to_timeval(×[1], mtime);
ret = js_get_errno(utimes(path, times));
}
#endif
JS_FreeCString(ctx, path);
return JS_NewInt32(ctx, ret);
} | O0 | c | js_os_utimes:
subq $0xa8, %rsp
movq %rsi, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq %rdi, 0x60(%rsp)
movl %ecx, 0x5c(%rsp)
movq %r8, 0x50(%rsp)
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
leaq 0x40(%rsp), %rsi
callq 0x37930
cmpl $0x0, %eax
je 0x19ef9
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
jmp 0x1a00b
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rdx
movq 0x28(%rax), %rcx
leaq 0x38(%rsp), %rsi
callq 0x37930
cmpl $0x0, %eax
je 0x19f33
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
jmp 0x1a00b
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x13520
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x19f6f
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
jmp 0x1a00b
movq 0x40(%rsp), %rsi
leaq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x1be30
leaq 0x20(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x1be30
movq 0x8(%rsp), %rsi
movq 0x48(%rsp), %rdi
callq 0xe4d0
movslq %eax, %rdi
callq 0x12790
movl %eax, 0x34(%rsp)
movq 0x60(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x28b90
movq 0x60(%rsp), %rcx
movl 0x34(%rsp), %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
movl 0x8c(%rsp), %eax
movl %eax, 0x98(%rsp)
movq $0x0, 0xa0(%rsp)
movq 0x98(%rsp), %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rdx
addq $0xa8, %rsp
retq
| js_os_utimes:
sub rsp, 0A8h
mov [rsp+0A8h+var_40], rsi
mov [rsp+0A8h+var_38], rdx
mov [rsp+0A8h+var_48], rdi
mov [rsp+0A8h+var_4C], ecx
mov [rsp+0A8h+var_58], r8
mov rdi, [rsp+0A8h+var_48]
mov rax, [rsp+0A8h+var_58]
mov rdx, [rax+10h]
mov rcx, [rax+18h]
lea rsi, [rsp+0A8h+var_68]
call JS_ToInt64
cmp eax, 0
jz short loc_19EF9
mov dword ptr [rsp+0A8h+var_30], 0
mov [rsp+0A8h+var_28], 6
jmp loc_1A00B
loc_19EF9:
mov rdi, [rsp+0A8h+var_48]
mov rax, [rsp+0A8h+var_58]
mov rdx, [rax+20h]
mov rcx, [rax+28h]
lea rsi, [rsp+0A8h+var_70]
call JS_ToInt64
cmp eax, 0
jz short loc_19F33
mov dword ptr [rsp+0A8h+var_30], 0
mov [rsp+0A8h+var_28], 6
jmp loc_1A00B
loc_19F33:
mov rdi, [rsp+0A8h+var_48]
mov rax, [rsp+0A8h+var_58]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+0A8h+var_60], rax
cmp [rsp+0A8h+var_60], 0
jnz short loc_19F6F
mov dword ptr [rsp+0A8h+var_30], 0
mov [rsp+0A8h+var_28], 6
jmp loc_1A00B
loc_19F6F:
mov rsi, [rsp+0A8h+var_68]
lea rdi, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_A0], rdi
call ms_to_timeval
lea rdi, [rsp+0A8h+var_88]
mov rsi, [rsp+0A8h+var_70]
call ms_to_timeval
mov rsi, [rsp+0A8h+var_A0]
mov rdi, [rsp+0A8h+var_60]
call _utimes
movsxd rdi, eax
call js_get_errno
mov [rsp+0A8h+var_74], eax
mov rdi, [rsp+0A8h+var_48]
mov rsi, [rsp+0A8h+var_60]
call JS_FreeCString
mov rcx, [rsp+0A8h+var_48]
mov eax, [rsp+0A8h+var_74]
mov [rsp+0A8h+var_18], rcx
mov [rsp+0A8h+var_1C], eax
mov eax, [rsp+0A8h+var_1C]
mov dword ptr [rsp+0A8h+var_10], eax
mov [rsp+0A8h+var_8], 0
mov rcx, [rsp+0A8h+var_10]
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_30], rcx
mov [rsp+0A8h+var_28], rax
loc_1A00B:
mov rax, [rsp+0A8h+var_30]
mov rdx, [rsp+0A8h+var_28]
add rsp, 0A8h
retn
| long long js_os_utimes(long long a1, long long a2, long long a3, int a4, long long *a5)
{
int v5; // eax
_BYTE v7[16]; // [rsp+10h] [rbp-98h] BYREF
_BYTE v8[20]; // [rsp+20h] [rbp-88h] BYREF
int errno; // [rsp+34h] [rbp-74h]
long long v10; // [rsp+38h] [rbp-70h] BYREF
long long v11; // [rsp+40h] [rbp-68h] BYREF
long long v12; // [rsp+48h] [rbp-60h]
long long *v13; // [rsp+50h] [rbp-58h]
int v14; // [rsp+5Ch] [rbp-4Ch]
long long v15; // [rsp+60h] [rbp-48h]
long long v16; // [rsp+68h] [rbp-40h]
long long v17; // [rsp+70h] [rbp-38h]
long long v18; // [rsp+78h] [rbp-30h]
long long v19; // [rsp+80h] [rbp-28h]
int v20; // [rsp+8Ch] [rbp-1Ch]
long long v21; // [rsp+90h] [rbp-18h]
long long v22; // [rsp+98h] [rbp-10h]
long long v23; // [rsp+A0h] [rbp-8h]
v16 = a2;
v17 = a3;
v15 = a1;
v14 = a4;
v13 = a5;
if ( (unsigned int)JS_ToInt64(a1, &v11, a5[2], a5[3]) )
{
LODWORD(v18) = 0;
v19 = 6LL;
}
else if ( (unsigned int)JS_ToInt64(v15, &v10, v13[4], v13[5]) )
{
LODWORD(v18) = 0;
v19 = 6LL;
}
else
{
v12 = JS_ToCString(v15, *v13, v13[1]);
if ( v12 )
{
ms_to_timeval(v7, v11);
ms_to_timeval(v8, v10);
v5 = utimes(v12, v7);
errno = js_get_errno(v5);
JS_FreeCString(v15, v12);
v21 = v15;
v20 = errno;
LODWORD(v22) = errno;
v23 = 0LL;
v18 = v22;
v19 = 0LL;
}
else
{
LODWORD(v18) = 0;
v19 = 6LL;
}
}
return v18;
}
| js_os_utimes:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x68],RSI
MOV qword ptr [RSP + 0x70],RDX
MOV qword ptr [RSP + 0x60],RDI
MOV dword ptr [RSP + 0x5c],ECX
MOV qword ptr [RSP + 0x50],R8
MOV RDI,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
LEA RSI,[RSP + 0x40]
CALL 0x00137930
CMP EAX,0x0
JZ 0x00119ef9
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
JMP 0x0011a00b
LAB_00119ef9:
MOV RDI,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RAX + 0x28]
LEA RSI,[RSP + 0x38]
CALL 0x00137930
CMP EAX,0x0
JZ 0x00119f33
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
JMP 0x0011a00b
LAB_00119f33:
MOV RDI,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00113520
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
JNZ 0x00119f6f
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
JMP 0x0011a00b
LAB_00119f6f:
MOV RSI,qword ptr [RSP + 0x40]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0011be30
LEA RDI,[RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x0011be30
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0010e4d0
MOVSXD RDI,EAX
CALL 0x00112790
MOV dword ptr [RSP + 0x34],EAX
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00128b90
MOV RCX,qword ptr [RSP + 0x60]
MOV EAX,dword ptr [RSP + 0x34]
MOV qword ptr [RSP + 0x90],RCX
MOV dword ptr [RSP + 0x8c],EAX
MOV EAX,dword ptr [RSP + 0x8c]
MOV dword ptr [RSP + 0x98],EAX
MOV qword ptr [RSP + 0xa0],0x0
MOV RCX,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x78],RCX
MOV qword ptr [RSP + 0x80],RAX
LAB_0011a00b:
MOV RAX,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
ADD RSP,0xa8
RET
|
int1 [16]
js_os_utimes(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
timeval local_98;
int1 local_88 [20];
int4 local_74;
int8 local_70;
int8 local_68;
char *local_60;
int8 *local_58;
int4 local_4c;
int8 local_48;
int8 local_40;
int8 local_38;
int4 local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
local_58 = param_5;
local_4c = param_4;
local_48 = param_1;
local_40 = param_2;
local_38 = param_3;
iVar2 = JS_ToInt64(param_1,&local_68,param_5[2],param_5[3]);
if (iVar2 == 0) {
iVar2 = JS_ToInt64(local_48,&local_70,local_58[4],local_58[5]);
if (iVar2 == 0) {
local_60 = (char *)JS_ToCString(local_48,*local_58,local_58[1]);
if (local_60 == (char *)0x0) {
local_30 = 0;
local_28 = 6;
}
else {
ms_to_timeval(&local_98,local_68);
ms_to_timeval(local_88,local_70);
iVar2 = utimes(local_60,&local_98);
local_74 = js_get_errno((long)iVar2);
JS_FreeCString(local_48,local_60);
local_30 = local_74;
uStack_2c = uStack_c;
local_28 = 0;
}
}
else {
local_30 = 0;
local_28 = 6;
}
}
else {
local_30 = 0;
local_28 = 6;
}
auVar1._4_4_ = uStack_2c;
auVar1._0_4_ = local_30;
auVar1._8_8_ = local_28;
return auVar1;
}
| |
32,502 | js_os_utimes | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_utimes(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *path;
int64_t atime, mtime;
int ret;
if (JS_ToInt64(ctx, &atime, argv[1]))
return JS_EXCEPTION;
if (JS_ToInt64(ctx, &mtime, argv[2]))
return JS_EXCEPTION;
path = JS_ToCString(ctx, argv[0]);
if (!path)
return JS_EXCEPTION;
#if defined(_WIN32)
{
struct _utimbuf times;
times.actime = atime / 1000;
times.modtime = mtime / 1000;
ret = js_get_errno(_utime(path, ×));
}
#else
{
struct timeval times[2];
ms_to_timeval(×[0], atime);
ms_to_timeval(×[1], mtime);
ret = js_get_errno(utimes(path, times));
}
#endif
JS_FreeCString(ctx, path);
return JS_NewInt32(ctx, ret);
} | O1 | c | js_os_utimes:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %r8, %r14
movq %rdi, %rbx
movq 0x10(%r8), %rdx
movq 0x18(%r8), %rcx
leaq 0x8(%rsp), %rsi
callq 0x26ca0
movl $0x6, %r15d
testl %eax, %eax
jne 0x1909a
movq 0x20(%r14), %rdx
movq 0x28(%r14), %rcx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x26ca0
testl %eax, %eax
je 0x190b0
xorl %r12d, %r12d
movq %r12, %rax
movq %r15, %rdx
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdx
movq 0x8(%r14), %rcx
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x1ffe3
testq %rax, %rax
je 0x1909d
movq %rax, %r14
movq 0x8(%rsp), %rcx
movq %rcx, %rax
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rdi # imm = 0x20C49BA5E353F7CF
mulq %rdi
shrq $0x4, %rdx
leaq 0x10(%rsp), %rsi
movq %rdx, (%rsi)
imulq $0x3e8, %rdx, %rax # imm = 0x3E8
subq %rax, %rcx
movq (%rsp), %r8
movq %r8, %rax
shrq $0x3, %rax
mulq %rdi
imulq $0x3e8, %rcx, %rax # imm = 0x3E8
movq %rax, 0x8(%rsi)
shrq $0x4, %rdx
movq %rdx, 0x10(%rsi)
imulq $0x3e8, %rdx, %rax # imm = 0x3E8
subq %rax, %r8
imulq $0x3e8, %r8, %rax # imm = 0x3E8
movq %rax, 0x18(%rsi)
movq %r14, %rdi
callq 0xe4d0
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x1914c
callq 0xe0b0
xorl %ebp, %ebp
subl (%rax), %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x202c9
movl %ebp, %r12d
xorl %r15d, %r15d
jmp 0x1909d
| js_os_utimes:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 30h
mov r14, r8
mov rbx, rdi
mov rdx, [r8+10h]
mov rcx, [r8+18h]
lea rsi, [rsp+58h+var_50]
call JS_ToInt64
mov r15d, 6
test eax, eax
jnz short loc_1909A
mov rdx, [r14+20h]
mov rcx, [r14+28h]
mov rsi, rsp
mov rdi, rbx
call JS_ToInt64
test eax, eax
jz short loc_190B0
loc_1909A:
xor r12d, r12d
loc_1909D:
mov rax, r12
mov rdx, r15
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_190B0:
mov rdx, [r14]
mov rcx, [r14+8]
xor r12d, r12d
mov rdi, rbx
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_1909D
mov r14, rax
mov rcx, [rsp+58h+var_50]
mov rax, rcx
shr rax, 3
mov rdi, 20C49BA5E353F7CFh
mul rdi
shr rdx, 4
lea rsi, [rsp+58h+var_48]
mov [rsi], rdx
imul rax, rdx, 3E8h
sub rcx, rax
mov r8, [rsp+58h+var_58]
mov rax, r8
shr rax, 3
mul rdi
imul rax, rcx, 3E8h
mov [rsi+8], rax
shr rdx, 4
mov [rsi+10h], rdx
imul rax, rdx, 3E8h
sub r8, rax
imul rax, r8, 3E8h
mov [rsi+18h], rax
mov rdi, r14
call _utimes
mov ebp, eax
cmp eax, 0FFFFFFFFh
jnz short loc_1914C
call ___errno_location
xor ebp, ebp
sub ebp, [rax]
loc_1914C:
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
mov r12d, ebp
xor r15d, r15d
jmp loc_1909D
| long long js_os_utimes(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v7; // r12
long long v9; // rax
long long v10; // r14
long long v11; // rdi
unsigned int v12; // ebp
unsigned long long v13; // [rsp+0h] [rbp-58h] BYREF
_QWORD v14[10]; // [rsp+8h] [rbp-50h] BYREF
if ( (unsigned int)JS_ToInt64(a1, v14, a5[2], a5[3]) || (unsigned int)JS_ToInt64(a1, &v13, a5[4], a5[5]) )
return 0LL;
v7 = 0LL;
v9 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( v9 )
{
v10 = v9;
v14[1] = v14[0] / 0x3E8uLL;
v14[2] = 1000 * (v14[0] % 0x3E8uLL);
v14[3] = v13 / 0x3E8;
v14[4] = 1000 * (v13 % 0x3E8);
v11 = v9;
v12 = utimes(v9);
if ( v12 == -1 )
v12 = -*(_DWORD *)__errno_location(v11);
JS_FreeCString(a1, v10);
return v12;
}
return v7;
}
| js_os_utimes:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R14,R8
MOV RBX,RDI
MOV RDX,qword ptr [R8 + 0x10]
MOV RCX,qword ptr [R8 + 0x18]
LEA RSI,[RSP + 0x8]
CALL 0x00126ca0
MOV R15D,0x6
TEST EAX,EAX
JNZ 0x0011909a
MOV RDX,qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x28]
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00126ca0
TEST EAX,EAX
JZ 0x001190b0
LAB_0011909a:
XOR R12D,R12D
LAB_0011909d:
MOV RAX,R12
MOV RDX,R15
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001190b0:
MOV RDX,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
XOR R12D,R12D
MOV RDI,RBX
XOR ESI,ESI
XOR R8D,R8D
CALL 0x0011ffe3
TEST RAX,RAX
JZ 0x0011909d
MOV R14,RAX
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,RCX
SHR RAX,0x3
MOV RDI,0x20c49ba5e353f7cf
MUL RDI
SHR RDX,0x4
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RDX
IMUL RAX,RDX,0x3e8
SUB RCX,RAX
MOV R8,qword ptr [RSP]
MOV RAX,R8
SHR RAX,0x3
MUL RDI
IMUL RAX,RCX,0x3e8
MOV qword ptr [RSI + 0x8],RAX
SHR RDX,0x4
MOV qword ptr [RSI + 0x10],RDX
IMUL RAX,RDX,0x3e8
SUB R8,RAX
IMUL RAX,R8,0x3e8
MOV qword ptr [RSI + 0x18],RAX
MOV RDI,R14
CALL 0x0010e4d0
MOV EBP,EAX
CMP EAX,-0x1
JNZ 0x0011914c
CALL 0x0010e0b0
XOR EBP,EBP
SUB EBP,dword ptr [RAX]
LAB_0011914c:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001202c9
MOV R12D,EBP
XOR R15D,R15D
JMP 0x0011909d
|
int js_os_utimes(int8 param_1)
{
int iVar1;
char *__file;
int *piVar2;
int8 *in_R8;
ulong local_58;
ulong local_50;
timeval local_48;
ulong local_38;
long local_30;
iVar1 = JS_ToInt64(param_1,&local_50,in_R8[2],in_R8[3]);
if ((iVar1 == 0) && (iVar1 = JS_ToInt64(param_1,&local_58,in_R8[4],in_R8[5]), iVar1 == 0)) {
__file = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0);
if (__file == (char *)0x0) {
return 0;
}
local_48.tv_sec = local_50 / 1000;
local_48.tv_usec = (local_50 % 1000) * 1000;
local_38 = local_58 / 1000;
local_30 = (local_58 % 1000) * 1000;
iVar1 = utimes(__file,&local_48);
if (iVar1 == -1) {
piVar2 = __errno_location();
iVar1 = -*piVar2;
}
JS_FreeCString(param_1,__file);
return iVar1;
}
return 0;
}
| |
32,503 | js_os_utimes | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_utimes(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *path;
int64_t atime, mtime;
int ret;
if (JS_ToInt64(ctx, &atime, argv[1]))
return JS_EXCEPTION;
if (JS_ToInt64(ctx, &mtime, argv[2]))
return JS_EXCEPTION;
path = JS_ToCString(ctx, argv[0]);
if (!path)
return JS_EXCEPTION;
#if defined(_WIN32)
{
struct _utimbuf times;
times.actime = atime / 1000;
times.modtime = mtime / 1000;
ret = js_get_errno(_utime(path, ×));
}
#else
{
struct timeval times[2];
ms_to_timeval(×[0], atime);
ms_to_timeval(×[1], mtime);
ret = js_get_errno(utimes(path, times));
}
#endif
JS_FreeCString(ctx, path);
return JS_NewInt32(ctx, ret);
} | O2 | c | js_os_utimes:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r15
movq %rdi, %rbx
movq 0x10(%r8), %rdx
movq 0x18(%r8), %rcx
leaq 0x8(%rsp), %rsi
callq 0x20982
pushq $0x6
popq %r14
testl %eax, %eax
jne 0x13be4
movq 0x20(%r15), %rdx
movq 0x28(%r15), %rcx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x20982
testl %eax, %eax
je 0x13bf5
xorl %eax, %eax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x10ef0
testq %rax, %rax
je 0x13be4
movq %rax, %r15
movq 0x8(%rsp), %rax
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divq %rcx
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
imulq $0x3e8, %rdx, %rax # imm = 0x3E8
movq %rax, 0x8(%rsi)
movq (%rsp), %rax
xorl %edx, %edx
divq %rcx
xorl %r14d, %r14d
movq %rax, 0x10(%rsi)
imulq $0x3e8, %rdx, %rax # imm = 0x3E8
movq %rax, 0x18(%rsi)
movq %r15, %rdi
callq 0xe4e0
movslq %eax, %rdi
callq 0x1082f
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a4db
movl %r12d, %eax
jmp 0x13be6
| js_os_utimes:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov r15, r8
mov rbx, rdi
mov rdx, [r8+10h]
mov rcx, [r8+18h]
lea rsi, [rsp+58h+var_50]
call JS_ToInt64
push 6
pop r14
test eax, eax
jnz short loc_13BE4
mov rdx, [r15+20h]
mov rcx, [r15+28h]
mov rsi, rsp
mov rdi, rbx
call JS_ToInt64
test eax, eax
jz short loc_13BF5
loc_13BE4:
xor eax, eax
loc_13BE6:
mov rdx, r14
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
loc_13BF5:
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
call JS_ToCString
test rax, rax
jz short loc_13BE4
mov r15, rax
mov rax, [rsp+58h+var_50]
mov ecx, 3E8h
xor edx, edx
div rcx
lea rsi, [rsp+58h+var_48]
mov [rsi], rax
imul rax, rdx, 3E8h
mov [rsi+8], rax
mov rax, [rsp+58h+var_58]
xor edx, edx
div rcx
xor r14d, r14d
mov [rsi+10h], rax
imul rax, rdx, 3E8h
mov [rsi+18h], rax
mov rdi, r15
call _utimes
movsxd rdi, eax
call js_get_errno
mov r12, rax
mov rdi, rbx
mov rsi, r15
call JS_FreeCString
mov eax, r12d
jmp loc_13BE6
| long long js_os_utimes(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
long long v7; // rax
long long v8; // r15
int v9; // eax
unsigned int errno; // r12d
unsigned long long v11; // [rsp+0h] [rbp-58h] BYREF
_QWORD v12[10]; // [rsp+8h] [rbp-50h] BYREF
if ( (unsigned int)JS_ToInt64(a1, v12, a5[2], a5[3]) )
return 0LL;
if ( (unsigned int)JS_ToInt64(a1, &v11, a5[4], a5[5]) )
return 0LL;
v7 = JS_ToCString(a1, *a5, a5[1]);
if ( !v7 )
return 0LL;
v8 = v7;
v12[1] = v12[0] / 0x3E8uLL;
v12[2] = 1000 * (v12[0] % 0x3E8uLL);
v12[3] = v11 / 0x3E8;
v12[4] = 1000 * (v11 % 0x3E8);
v9 = utimes(v7);
errno = js_get_errno(v9);
JS_FreeCString(a1, v8);
return errno;
}
| js_os_utimes:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,R8
MOV RBX,RDI
MOV RDX,qword ptr [R8 + 0x10]
MOV RCX,qword ptr [R8 + 0x18]
LEA RSI,[RSP + 0x8]
CALL 0x00120982
PUSH 0x6
POP R14
TEST EAX,EAX
JNZ 0x00113be4
MOV RDX,qword ptr [R15 + 0x20]
MOV RCX,qword ptr [R15 + 0x28]
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00120982
TEST EAX,EAX
JZ 0x00113bf5
LAB_00113be4:
XOR EAX,EAX
LAB_00113be6:
MOV RDX,R14
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00113bf5:
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,RBX
CALL 0x00110ef0
TEST RAX,RAX
JZ 0x00113be4
MOV R15,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,0x3e8
XOR EDX,EDX
DIV RCX
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RAX
IMUL RAX,RDX,0x3e8
MOV qword ptr [RSI + 0x8],RAX
MOV RAX,qword ptr [RSP]
XOR EDX,EDX
DIV RCX
XOR R14D,R14D
MOV qword ptr [RSI + 0x10],RAX
IMUL RAX,RDX,0x3e8
MOV qword ptr [RSI + 0x18],RAX
MOV RDI,R15
CALL 0x0010e4e0
MOVSXD RDI,EAX
CALL 0x0011082f
MOV R12,RAX
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011a4db
MOV EAX,R12D
JMP 0x00113be6
|
int4 js_os_utimes(int8 param_1)
{
int iVar1;
int4 uVar2;
char *__file;
int8 *in_R8;
ulong local_58;
ulong local_50;
timeval local_48;
ulong local_38;
long local_30;
iVar1 = JS_ToInt64(param_1,&local_50,in_R8[2],in_R8[3]);
if (((iVar1 == 0) && (iVar1 = JS_ToInt64(param_1,&local_58,in_R8[4],in_R8[5]), iVar1 == 0)) &&
(__file = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]), __file != (char *)0x0)) {
local_48.tv_sec = local_50 / 1000;
local_48.tv_usec = (local_50 % 1000) * 1000;
local_38 = local_58 / 1000;
local_30 = (local_58 % 1000) * 1000;
iVar1 = utimes(__file,&local_48);
uVar2 = js_get_errno((long)iVar1);
JS_FreeCString(param_1,__file);
return uVar2;
}
return 0;
}
| |
32,504 | minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const | monkey531[P]llama/common/minja.hpp | Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const {
if (!callable_) throw std::runtime_error("Value is not callable: " + dump());
return (*callable_)(context, args);
} | O0 | cpp | minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const:
subq $0x98, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq 0x88(%rsp), %rdi
movq %rdi, 0x20(%rsp)
addq $0x30, %rdi
callq 0x112f90
testb $0x1, %al
jne 0x13222d
movb $0x1, 0x2b(%rsp)
movl $0x10, %edi
callq 0x5a680
movq 0x20(%rsp), %rsi
movq %rax, 0x8(%rsp)
leaq 0x38(%rsp), %rdi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x112e80
jmp 0x13218b
leaq 0xe2027(%rip), %rsi # 0x2141b9
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0xf7a20
jmp 0x1321a3
movq 0x8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x5a4c0
jmp 0x1321b4
movq 0x8(%rsp), %rdi
movb $0x0, 0x2b(%rsp)
movq 0x172deb(%rip), %rsi # 0x2a4fb0
movq 0x172dac(%rip), %rdx # 0x2a4f78
callq 0x5aae0
jmp 0x13226c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x132218
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x13220e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x5b588
leaq 0x38(%rsp), %rdi
callq 0x5b588
testb $0x1, 0x2b(%rsp)
jne 0x132221
jmp 0x13222b
movq 0x8(%rsp), %rdi
callq 0x5af70
jmp 0x132262
movq 0x20(%rsp), %rdi
addq $0x30, %rdi
callq 0x135d20
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x135d50
movq 0x18(%rsp), %rax
addq $0x98, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x5aba0
nopl (%rax)
| _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE:
sub rsp, 98h
mov [rsp+98h+var_88], rdi
mov rax, rdi
mov [rsp+98h+var_80], rax
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_10], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_20], rcx
mov rdi, [rsp+98h+var_10]
mov [rsp+98h+var_78], rdi
add rdi, 30h ; '0'
call _ZNKSt12__shared_ptrISt8functionIFN5minja5ValueERKSt10shared_ptrINS1_7ContextEERNS1_14ArgumentsValueEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz loc_13222D
mov [rsp+98h+var_6D], 1
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rsi, [rsp+98h+var_78]
mov [rsp+98h+var_90], rax
lea rdi, [rsp+98h+var_60]
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
jmp short $+2
loc_13218B:
lea rsi, aValueIsNotCall; "Value is not callable: "
lea rdi, [rsp+98h+var_40]
lea rdx, [rsp+98h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_1321A3:
mov rdi, [rsp+98h+var_90]
lea rsi, [rsp+98h+var_40]
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
jmp short $+2
loc_1321B4:
mov rdi, [rsp+98h+var_90]; void *
mov [rsp+98h+var_6D], 0
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_13226C
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
jmp short loc_132218
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
jmp short loc_13220E
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_13220E:
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_132218:
test [rsp+arg_23], 1
jnz short loc_132221
jmp short loc_13222B
loc_132221:
mov rdi, [rsp+arg_0]; void *
call ___cxa_free_exception
loc_13222B:
jmp short loc_132262
loc_13222D:
mov rdi, [rsp+98h+var_78]
add rdi, 30h ; '0'
call _ZNKSt19__shared_ptr_accessISt8functionIFN5minja5ValueERKSt10shared_ptrINS1_7ContextEERNS1_14ArgumentsValueEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void)
mov rdi, [rsp+98h+var_88]
mov rsi, rax
mov rdx, [rsp+98h+var_18]
mov rcx, [rsp+98h+var_20]
call _ZNKSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEclES6_S8_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
mov rax, [rsp+98h+var_80]
add rsp, 98h
retn
loc_132262:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
loc_13226C:
nop dword ptr [rax+00h]
| long long minja::Value::call(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
void *exception; // [rsp+8h] [rbp-90h]
_BYTE v7[32]; // [rsp+38h] [rbp-60h] BYREF
_BYTE v8[32]; // [rsp+58h] [rbp-40h] BYREF
long long v9; // [rsp+78h] [rbp-20h]
long long v10; // [rsp+80h] [rbp-18h]
long long v11; // [rsp+88h] [rbp-10h]
long long v12; // [rsp+90h] [rbp-8h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = a4;
if ( !std::__shared_ptr<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)(a2 + 48)) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v7, a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v8, (long long)"Value is not callable: ", (long long)v7);
std::runtime_error::runtime_error(exception, v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4 = std::__shared_ptr_access<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(a2 + 48);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator()(
a1,
v4,
v10,
v9);
return a1;
}
| |||
32,505 | minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const | monkey531[P]llama/common/minja.hpp | Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const {
if (!callable_) throw std::runtime_error("Value is not callable: " + dump());
return (*callable_)(context, args);
} | O3 | cpp | minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq 0x30(%rsi), %rsi
testq %rsi, %rsi
je 0x93367
cmpq $0x0, 0x10(%rsi)
je 0x933c2
movq %rdi, %rbx
callq *0x18(%rsi)
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x1a460
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x86054
leaq 0x5d435(%rip), %rsi # 0xf07c2
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x787e9
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ae40
xorl %ebp, %ebp
movq 0x98c3d(%rip), %rsi # 0x12bff0
movq 0x98ba6(%rip), %rdx # 0x12bf60
movq %rbx, %rdi
callq 0x1af30
callq 0x1a330
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x933e5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8f0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93400
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testb %bpl, %bpl
jne 0x9342a
jmp 0x93432
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9342a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x9342a
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1afd0
| _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rsi
mov rsi, [rsi+30h]
test rsi, rsi
jz short loc_93367
cmp qword ptr [rsi+10h], 0
jz short loc_933C2
mov rbx, rdi
call qword ptr [rsi+18h]
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_93367:
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, aValueIsNotCall; "Value is not callable: "
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_933C2:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_933E5
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_933E5:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93400
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_93400:
test bpl, bpl
jnz short loc_9342A
jmp short loc_93432
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9342A
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9342A
mov r14, rax
loc_9342A:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_93432:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::call(long long a1, long long a2)
{
long long v3; // rsi
void *exception; // rbx
_BYTE v6[16]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v7[16]; // [rsp+20h] [rbp-38h] BYREF
v3 = *(_QWORD *)(a2 + 48);
if ( !v3 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v7, (long long)"Value is not callable: ", (long long)v6);
std::runtime_error::runtime_error(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !*(_QWORD *)(v3 + 16) )
std::__throw_bad_function_call();
(*(void (**)(void))(v3 + 24))();
return a1;
}
| call:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RSI,qword ptr [RSI + 0x30]
TEST RSI,RSI
JZ 0x00193367
CMP qword ptr [RSI + 0x10],0x0
JZ 0x001933c2
MOV RBX,RDI
CALL qword ptr [RSI + 0x18]
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_00193367:
MOV EDI,0x10
CALL 0x0011a460
MOV RBX,RAX
LAB_00193374:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00186054
LAB_00193386:
LEA RSI,[0x1f07c2]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001787e9
MOV BPL,0x1
LAB_0019339d:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011ae40
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,RBX
CALL 0x0011af30
LAB_001933c2:
CALL 0x0011a330
|
/* minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const */
shared_ptr * minja::Value::call(shared_ptr *param_1,ArgumentsValue *param_2)
{
long lVar1;
runtime_error *this;
int1 auStack_58 [32];
string local_38 [32];
lVar1 = *(long *)(param_2 + 0x30);
if (lVar1 == 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00193374 to 00193385 has its CatchHandler @ 00193427 */
dump_abi_cxx11_((int)auStack_58,SUB81(param_2,0));
/* try { // try from 00193386 to 00193399 has its CatchHandler @ 00193407 */
std::operator+((char *)local_38,(string *)"Value is not callable: ");
/* try { // try from 0019339d to 001933c1 has its CatchHandler @ 001933c7 */
std::runtime_error::runtime_error(this,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
if (*(long *)(lVar1 + 0x10) != 0) {
(**(code **)(lVar1 + 0x18))();
return param_1;
}
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
| |
32,506 | ma_tls_version_options | eloqsql/libmariadb/libmariadb/secure/openssl.c | static long ma_tls_version_options(const char *version)
{
long protocol_options,
disable_all_protocols;
protocol_options= disable_all_protocols=
SSL_OP_NO_SSLv2 |
SSL_OP_NO_SSLv3 |
SSL_OP_NO_TLSv1 |
SSL_OP_NO_TLSv1_1 |
SSL_OP_NO_TLSv1_2
#ifdef TLS1_3_VERSION
| SSL_OP_NO_TLSv1_3
#endif
;
if (!version)
return 0;
if (strstr(version, "TLSv1.0"))
protocol_options&= ~SSL_OP_NO_TLSv1;
if (strstr(version, "TLSv1.1"))
protocol_options&= ~SSL_OP_NO_TLSv1_1;
if (strstr(version, "TLSv1.2"))
protocol_options&= ~SSL_OP_NO_TLSv1_2;
#ifdef TLS1_3_VERSION
if (strstr(version, "TLSv1.3"))
protocol_options&= ~SSL_OP_NO_TLSv1_3;
#endif
if (protocol_options != disable_all_protocols)
return protocol_options;
return 0;
} | O0 | c | ma_tls_version_options:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq $0x3e000000, -0x20(%rbp) # imm = 0x3E000000
movq $0x3e000000, -0x18(%rbp) # imm = 0x3E000000
cmpq $0x0, -0x10(%rbp)
jne 0x369a0
movq $0x0, -0x8(%rbp)
jmp 0x36a4c
movq -0x10(%rbp), %rdi
leaq 0x15493(%rip), %rsi # 0x4be3e
callq 0x13100
cmpq $0x0, %rax
je 0x369c4
movq -0x18(%rbp), %rax
andq $-0x4000001, %rax # imm = 0xFBFFFFFF
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x15477(%rip), %rsi # 0x4be46
callq 0x13100
cmpq $0x0, %rax
je 0x369e8
movq -0x18(%rbp), %rax
andq $-0x10000001, %rax # imm = 0xEFFFFFFF
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1545b(%rip), %rsi # 0x4be4e
callq 0x13100
cmpq $0x0, %rax
je 0x36a0c
movq -0x18(%rbp), %rax
andq $-0x8000001, %rax # imm = 0xF7FFFFFF
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1543f(%rip), %rsi # 0x4be56
callq 0x13100
cmpq $0x0, %rax
je 0x36a30
movq -0x18(%rbp), %rax
andq $-0x20000001, %rax # imm = 0xDFFFFFFF
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x36a44
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x36a4c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_tls_version_options:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_20], 3E000000h
mov [rbp+var_18], 3E000000h
cmp [rbp+var_10], 0
jnz short loc_369A0
mov [rbp+var_8], 0
jmp loc_36A4C
loc_369A0:
mov rdi, [rbp+var_10]
lea rsi, aTlsv10; "TLSv1.0"
call _strstr
cmp rax, 0
jz short loc_369C4
mov rax, [rbp+var_18]
and rax, 0FFFFFFFFFBFFFFFFh
mov [rbp+var_18], rax
loc_369C4:
mov rdi, [rbp+var_10]
lea rsi, aTlsv11; "TLSv1.1"
call _strstr
cmp rax, 0
jz short loc_369E8
mov rax, [rbp+var_18]
and rax, 0FFFFFFFFEFFFFFFFh
mov [rbp+var_18], rax
loc_369E8:
mov rdi, [rbp+var_10]
lea rsi, aTlsv12; "TLSv1.2"
call _strstr
cmp rax, 0
jz short loc_36A0C
mov rax, [rbp+var_18]
and rax, 0FFFFFFFFF7FFFFFFh
mov [rbp+var_18], rax
loc_36A0C:
mov rdi, [rbp+var_10]
lea rsi, aTlsv13; "TLSv1.3"
call _strstr
cmp rax, 0
jz short loc_36A30
mov rax, [rbp+var_18]
and rax, 0FFFFFFFFDFFFFFFFh
mov [rbp+var_18], rax
loc_36A30:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jz short loc_36A44
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_36A4C
loc_36A44:
mov [rbp+var_8], 0
loc_36A4C:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long ma_tls_version_options(long long a1)
{
long long v2; // [rsp+8h] [rbp-18h]
v2 = 1040187392LL;
if ( !a1 )
return 0LL;
if ( strstr(a1, "TLSv1.0") )
v2 = 973078528LL;
if ( strstr(a1, "TLSv1.1") )
v2 &= ~0x10000000uLL;
if ( strstr(a1, "TLSv1.2") )
v2 &= ~0x8000000uLL;
if ( strstr(a1, "TLSv1.3") )
v2 &= ~0x20000000uLL;
if ( v2 == 1040187392 )
return 0LL;
else
return v2;
}
| ma_tls_version_options:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x20],0x3e000000
MOV qword ptr [RBP + -0x18],0x3e000000
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x001369a0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00136a4c
LAB_001369a0:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14be3e]
CALL 0x00113100
CMP RAX,0x0
JZ 0x001369c4
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,-0x4000001
MOV qword ptr [RBP + -0x18],RAX
LAB_001369c4:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14be46]
CALL 0x00113100
CMP RAX,0x0
JZ 0x001369e8
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,-0x10000001
MOV qword ptr [RBP + -0x18],RAX
LAB_001369e8:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14be4e]
CALL 0x00113100
CMP RAX,0x0
JZ 0x00136a0c
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,-0x8000001
MOV qword ptr [RBP + -0x18],RAX
LAB_00136a0c:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14be56]
CALL 0x00113100
CMP RAX,0x0
JZ 0x00136a30
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,-0x20000001
MOV qword ptr [RBP + -0x18],RAX
LAB_00136a30:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x00136a44
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00136a4c
LAB_00136a44:
MOV qword ptr [RBP + -0x8],0x0
LAB_00136a4c:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
ulong ma_tls_version_options(char *param_1)
{
char *pcVar1;
ulong local_20;
ulong local_10;
local_20 = 0x3e000000;
if (param_1 == (char *)0x0) {
local_10 = 0;
}
else {
pcVar1 = strstr(param_1,"TLSv1.0");
if (pcVar1 != (char *)0x0) {
local_20 = 0x3a000000;
}
pcVar1 = strstr(param_1,"TLSv1.1");
if (pcVar1 != (char *)0x0) {
local_20 = local_20 & 0xffffffffefffffff;
}
pcVar1 = strstr(param_1,"TLSv1.2");
if (pcVar1 != (char *)0x0) {
local_20 = local_20 & 0xfffffffff7ffffff;
}
pcVar1 = strstr(param_1,"TLSv1.3");
if (pcVar1 != (char *)0x0) {
local_20 = local_20 & 0xffffffffdfffffff;
}
if (local_20 == 0x3e000000) {
local_10 = 0;
}
else {
local_10 = local_20;
}
}
return local_10;
}
| |
32,507 | PFS_user_row::make_row(PFS_user*) | eloqsql/storage/perfschema/table_helper.cc | int PFS_user_row::make_row(PFS_user *pfs)
{
m_username_length= pfs->m_username_length;
if (m_username_length > sizeof(m_username))
return 1;
if (m_username_length > 0)
memcpy(m_username, pfs->m_username, sizeof(m_username));
return 0;
} | O0 | cpp | PFS_user_row::make_row(PFS_user*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rcx
movl 0x978(%rcx), %ecx
movl %ecx, 0x180(%rax)
movl 0x180(%rax), %eax
cmpq $0x180, %rax # imm = 0x180
jbe 0xf41b1f
movl $0x1, -0x4(%rbp)
jmp 0xf41b4c
movq -0x20(%rbp), %rax
cmpl $0x0, 0x180(%rax)
jbe 0xf41b45
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x970(%rax), %rsi
movl $0x180, %edx # imm = 0x180
callq 0x759350
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN12PFS_user_row8make_rowEP8PFS_user:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rcx, [rbp+var_18]
mov ecx, [rcx+978h]
mov [rax+180h], ecx
mov eax, [rax+180h]
cmp rax, 180h
jbe short loc_F41B1F
mov [rbp+var_4], 1
jmp short loc_F41B4C
loc_F41B1F:
mov rax, [rbp+var_20]
cmp dword ptr [rax+180h], 0
jbe short loc_F41B45
mov rdi, [rbp+var_20]
mov rax, [rbp+var_18]
mov rsi, [rax+970h]
mov edx, 180h
call _memcpy
loc_F41B45:
mov [rbp+var_4], 0
loc_F41B4C:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long PFS_user_row::make_row(PFS_user_row *this, PFS_user *a2)
{
*((_DWORD *)this + 96) = *((_DWORD *)a2 + 606);
if ( *((unsigned int *)this + 96) <= 0x180uLL )
{
if ( *((_DWORD *)this + 96) )
memcpy(this, *((_QWORD *)a2 + 302), 384LL);
return 0;
}
else
{
return 1;
}
}
| maria_ftparser_alloc_param:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x368],0x0
JNZ 0x00f41b46
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x748]
MOV ESI,EAX
SHL RSI,0x7
XOR EDI,EDI
MOV EDX,0x30
CALL 0x013c71a0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x368],RCX
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x328
XOR EDI,EDI
MOV EDX,0x10000
XOR EAX,EAX
MOV R8D,EAX
MOV RCX,R8
CALL 0x013bbd90
LAB_00f41b46:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x368]
ADD RSP,0x10
POP RBP
RET
|
long maria_ftparser_alloc_param(long *param_1)
{
long lVar1;
if (param_1[0x6d] == 0) {
lVar1 = my_malloc(0,(ulong)*(uint *)(*param_1 + 0x748) << 7,0x30);
param_1[0x6d] = lVar1;
init_alloc_root(0,param_1 + 0x65,0x10000,0);
}
return param_1[0x6d];
}
| |
32,508 | fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | std::string fs_get_cache_file(const std::string & filename) {
GGML_ASSERT(filename.find(DIRECTORY_SEPARATOR) == std::string::npos);
std::string cache_directory = fs_get_cache_directory();
const bool success = fs_create_directory_with_parents(cache_directory);
if (!success) {
throw std::runtime_error("failed to create cache directory: " + cache_directory);
}
return cache_directory + filename;
} | O1 | cpp | fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2f, %esi
xorl %edx, %edx
callq 0x1bb50
cmpq $-0x1, %rax
jne 0x74649
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x7425b
movq %r15, %rdi
callq 0x74160
testb %al, %al
je 0x7466a
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x7977c
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7463b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8d0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7d5f1(%rip), %rdi # 0xf1c41
leaq 0x7a7c0(%rip), %rdx # 0xeee17
leaq 0x7d7bc(%rip), %rcx # 0xf1e1a
movl $0x378, %esi # imm = 0x378
xorl %eax, %eax
callq 0x1bed0
movl $0x10, %edi
callq 0x1b450
movq %rax, %rbx
leaq 0x7d7d4(%rip), %rsi # 0xf1e52
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x54775
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be50
xorl %ebp, %ebp
movq 0xba94a(%rip), %rsi # 0x12eff0
movq 0xba8b3(%rip), %rdx # 0x12ef60
movq %rbx, %rdi
callq 0x1bf40
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x746db
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8d0
jmp 0x746db
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x746ed
movq %rbx, %rdi
callq 0x1b680
jmp 0x746ed
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x74708
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8d0
movq %r14, %rdi
callq 0x1bfc0
| _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp; int
push r15; int
push r14; int
push rbx; __int64
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
mov esi, 2Fh ; '/'
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_74649
lea r15, [rsp+68h+var_60]
mov rdi, r15; int
call _Z22fs_get_cache_directoryB5cxx11v; fs_get_cache_directory(void)
mov rdi, r15
call _Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_create_directory_with_parents(std::string const&)
test al, al
jz short loc_7466A
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&)
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7463B
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7463B:
mov rax, rbx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_74649:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFilenameFindDi; "filename.find(DIRECTORY_SEPARATOR) == s"...
mov esi, 378h
xor eax, eax
call _ggml_abort
loc_7466A:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aFailedToCreate; "failed to create cache directory: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; 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_746DB
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_746DB
mov r14, rax
mov bpl, 1
loc_746DB:
test bpl, bpl
jz short loc_746ED
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_746ED
mov r14, rax
loc_746ED:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_74708
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_74708:
mov rdi, r14
call __Unwind_Resume
| long long fs_get_cache_file(long long a1, long long a2)
{
void *exception; // rbx
int v4[4]; // [rsp+8h] [rbp-60h] BYREF
long long v5; // [rsp+18h] [rbp-50h] BYREF
_BYTE v6[16]; // [rsp+28h] [rbp-40h] BYREF
if ( std::string::find(a2, 47LL, 0LL) != -1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
888LL,
"GGML_ASSERT(%s) failed",
"filename.find(DIRECTORY_SEPARATOR) == std::string::npos");
LABEL_7:
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v6, (long long)"failed to create cache directory: ", v4);
std::runtime_error::runtime_error(exception, v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
fs_get_cache_directory[abi:cxx11]((long long)v4);
if ( !fs_create_directory_with_parents(v4) )
goto LABEL_7;
std::operator+<char>(a1, v4, a2);
if ( *(long long **)v4 != &v5 )
operator delete(*(void **)v4, v5 + 1);
return a1;
}
| fs_get_cache_file:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV ESI,0x2f
XOR EDX,EDX
CALL 0x0011bb50
CMP RAX,-0x1
JNZ 0x00174649
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x0017425b
LAB_00174604:
MOV RDI,R15
CALL 0x00174160
TEST AL,AL
JZ 0x0017466a
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV RDX,R14
CALL 0x0017977c
LAB_00174620:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0017463b
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8d0
LAB_0017463b:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00174649:
LEA RDI,[0x1f1c41]
LEA RDX,[0x1eee17]
LEA RCX,[0x1f1e1a]
MOV ESI,0x378
XOR EAX,EAX
CALL 0x0011bed0
LAB_0017466a:
MOV EDI,0x10
CALL 0x0011b450
MOV RBX,RAX
LAB_00174677:
LEA RSI,[0x1f1e52]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00154775
MOV BPL,0x1
LAB_00174690:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0011be50
XOR EBP,EBP
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,RBX
CALL 0x0011bf40
|
/* fs_get_cache_file(std::__cxx11::string const&) */
string * fs_get_cache_file(string *param_1)
{
char cVar1;
long lVar2;
runtime_error *this;
char in_SIL;
long *local_60 [2];
long local_50 [2];
string local_40 [32];
lVar2 = std::__cxx11::string::find(in_SIL,0x2f);
if (lVar2 != -1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x378,
"GGML_ASSERT(%s) failed","filename.find(DIRECTORY_SEPARATOR) == std::string::npos");
}
fs_get_cache_directory_abi_cxx11_();
/* try { // try from 00174604 to 0017461f has its CatchHandler @ 001746ea */
cVar1 = fs_create_directory_with_parents((string *)local_60);
if (cVar1 != '\0') {
std::operator+(param_1,(string *)local_60);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00174677 to 0017468c has its CatchHandler @ 001746d5 */
std::operator+((char *)local_40,(string *)"failed to create cache directory: ");
/* try { // try from 00174690 to 001746b4 has its CatchHandler @ 001746b5 */
std::runtime_error::runtime_error(this,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
| |
32,509 | google::protobuf::operator<<(std::ostream&, google::protobuf::uint128 const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/int128.cc | std::ostream& operator<<(std::ostream& o, const uint128& b) {
std::ios_base::fmtflags flags = o.flags();
// Select a divisor which is the largest power of the base < 2^64.
uint128 div;
std::streamsize div_base_log;
switch (flags & std::ios::basefield) {
case std::ios::hex:
div =
static_cast<uint64_t>(uint64_t{0x1000000000000000u}); // 16^15
div_base_log = 15;
break;
case std::ios::oct:
div = static_cast<uint64_t>(
uint64_t{01000000000000000000000u}); // 8^21
div_base_log = 21;
break;
default: // std::ios::dec
div = static_cast<uint64_t>(
uint64_t{10000000000000000000u}); // 10^19
div_base_log = 19;
break;
}
// Now piece together the uint128 representation from three chunks of
// the original value, each less than "div" and therefore representable
// as a uint64.
std::ostringstream os;
std::ios_base::fmtflags copy_mask =
std::ios::basefield | std::ios::showbase | std::ios::uppercase;
os.setf(flags & copy_mask, copy_mask);
uint128 high = b;
uint128 low;
uint128::DivModImpl(high, div, &high, &low);
uint128 mid;
uint128::DivModImpl(high, div, &high, &mid);
if (high.lo_ != 0) {
os << high.lo_;
os << std::noshowbase << std::setfill('0') << std::setw(div_base_log);
os << mid.lo_;
os << std::setw(div_base_log);
} else if (mid.lo_ != 0) {
os << mid.lo_;
os << std::noshowbase << std::setfill('0') << std::setw(div_base_log);
}
os << low.lo_;
std::string rep = os.str();
// Add the requisite padding.
std::streamsize width = o.width(0);
auto repSize = static_cast<std::streamsize>(rep.size());
if (width > repSize) {
if ((flags & std::ios::adjustfield) == std::ios::left) {
rep.append(width - repSize, o.fill());
} else {
rep.insert(static_cast<std::string::size_type>(0), width - repSize,
o.fill());
}
}
// Stream the final representation in a single "<<" call.
return o << rep;
} | O3 | cpp | google::protobuf::operator<<(std::ostream&, google::protobuf::uint128 const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp # imm = 0x1C8
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ebp
movl %ebp, %eax
andl $0x4a, %eax
cmpl $0x8, %eax
je 0x16fbd
cmpl $0x40, %eax
jne 0x16fcf
movl $0x15, %r13d
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
jmp 0x16fdf
movl $0xf, %r13d
movabsq $0x1000000000000000, %r14 # imm = 0x1000000000000000
jmp 0x16fdf
movl $0x13, %r13d
movabsq $-0x7538dcfb76180000, %r14 # imm = 0x8AC7230489E80000
leaq 0x50(%rsp), %r12
movq %r12, %rdi
callq 0xf450
movq (%r12), %rax
movq -0x18(%rax), %rax
movl %ebp, %ecx
andl $0x424a, %ecx # imm = 0x424A
movl $0xffffbdb5, %edx # imm = 0xFFFFBDB5
andl 0x68(%rsp,%rax), %edx
orl %ecx, %edx
movl %edx, 0x68(%rsp,%rax)
movups (%r15), %xmm0
leaq 0x30(%rsp), %r8
movaps %xmm0, (%r8)
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r9
movaps %xmm0, (%r9)
movq (%r8), %rdi
movq 0x8(%r8), %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x16bc8
leaq 0x20(%rsp), %r9
xorps %xmm0, %xmm0
movaps %xmm0, (%r9)
leaq 0x30(%rsp), %r8
movq (%r8), %rdi
movq 0x8(%r8), %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x16bc8
movq 0x30(%rsp), %rsi
testq %rsi, %rsi
je 0x170d3
leaq 0x50(%rsp), %rdi
callq 0xf250
movq 0x50(%rsp), %rax
movq -0x18(%rax), %rcx
andl $0xfffffdff, 0x68(%rsp,%rcx) # imm = 0xFFFFFDFF
movq -0x18(%rax), %rcx
leaq (%rsp,%rcx), %r14
addq $0x50, %r14
cmpb $0x0, 0xe1(%r14)
jne 0x170ac
movq %r14, %rdi
movl $0x20, %esi
callq 0xf340
movb $0x1, 0xe1(%r14)
movq 0x50(%rsp), %rax
movb $0x30, 0xe0(%r14)
movq -0x18(%rax), %rax
movq %r13, 0x60(%rsp,%rax)
movq 0x20(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0xf250
movq 0x50(%rsp), %rax
jmp 0x17130
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x17139
leaq 0x50(%rsp), %rdi
callq 0xf250
movq 0x50(%rsp), %rax
movq -0x18(%rax), %rcx
andl $0xfffffdff, 0x68(%rsp,%rcx) # imm = 0xFFFFFDFF
movq -0x18(%rax), %rcx
leaq (%rsp,%rcx), %r14
addq $0x50, %r14
cmpb $0x0, 0xe1(%r14)
jne 0x17128
movq %r14, %rdi
movl $0x20, %esi
callq 0xf340
movb $0x1, 0xe1(%r14)
movq 0x50(%rsp), %rax
movb $0x30, 0xe0(%r14)
movq -0x18(%rax), %rax
movq %r13, 0x60(%rsp,%rax)
movq 0x40(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0xf250
leaq 0x58(%rsp), %rsi
movq %rsp, %rdi
callq 0xf4e0
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movq 0x10(%rbx,%rcx), %r14
movq $0x0, 0x10(%rbx,%rcx)
movq 0x8(%rsp), %rsi
subq %rsi, %r14
jle 0x1720c
andl $0xb0, %ebp
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
movb 0xe1(%rbx,%rax), %al
cmpl $0x20, %ebp
jne 0x1719f
testb %al, %al
je 0x171ac
movb 0xe0(%r15), %al
jmp 0x171cd
testb %al, %al
je 0x171e0
movb 0xe0(%r15), %al
jmp 0x171fc
movq %r15, %rdi
movl $0x20, %esi
callq 0xf340
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movq 0x8(%rsp), %rsi
movsbl %al, %r8d
movq %rsp, %rdi
xorl %edx, %edx
movq %r14, %rcx
callq 0xf5a0
jmp 0x1720c
movq %r15, %rdi
movl $0x20, %esi
callq 0xf340
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movsbl %al, %ecx
movq %rsp, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xf5e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0xf3a0
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17233
callq 0xf330
movq 0xead26(%rip), %rsi # 0x101f60
leaq 0x50(%rsp), %rdi
callq 0xf1c0
leaq 0xc0(%rsp), %rdi
callq 0xf110
movq %rbx, %rax
addq $0x1c8, %rsp # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x17282
jmp 0x17282
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17285
callq 0xf330
jmp 0x17285
movq %rax, %rbx
movq 0xeacd4(%rip), %rsi # 0x101f60
leaq 0x50(%rsp), %rdi
callq 0xf1c0
leaq 0xc0(%rsp), %rdi
callq 0xf110
movq %rbx, %rdi
callq 0xf570
nop
| _ZN6google8protobuflsERSoRKNS0_7uint128E:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1C8h
mov r15, rsi
mov rbx, rdi
mov rax, [rdi]
mov rax, [rax-18h]
mov ebp, [rdi+rax+18h]
mov eax, ebp
and eax, 4Ah
cmp eax, 8
jz short loc_16FBD
cmp eax, 40h ; '@'
jnz short loc_16FCF
mov r13d, 15h
mov r14, 8000000000000000h
jmp short loc_16FDF
loc_16FBD:
mov r13d, 0Fh
mov r14, 1000000000000000h
jmp short loc_16FDF
loc_16FCF:
mov r13d, 13h
mov r14, 8AC7230489E80000h
loc_16FDF:
lea r12, [rsp+1F8h+var_1A8]
mov rdi, r12
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [r12]
mov rax, [rax-18h]
mov ecx, ebp
and ecx, 424Ah
mov edx, 0FFFFBDB5h
and edx, [rsp+rax+1F8h+var_190]
or edx, ecx
mov [rsp+rax+1F8h+var_190], edx
movups xmm0, xmmword ptr [r15]
lea r8, [rsp+1F8h+var_1C8]
movaps xmmword ptr [r8], xmm0
xorps xmm0, xmm0
lea r9, [rsp+1F8h+var_1B8]
movaps xmmword ptr [r9], xmm0
mov rdi, [r8]
mov rsi, [r8+8]
mov rdx, r14
xor ecx, ecx
call _ZN6google8protobuf7uint12810DivModImplES1_S1_PS1_S2_; google::protobuf::uint128::DivModImpl(google::protobuf::uint128,google::protobuf::uint128,google::protobuf::uint128*,google::protobuf::uint128*)
lea r9, [rsp+1F8h+var_1D8]
xorps xmm0, xmm0
movaps xmmword ptr [r9], xmm0
lea r8, [rsp+1F8h+var_1C8]
mov rdi, [r8]
mov rsi, [r8+8]
mov rdx, r14
xor ecx, ecx
call _ZN6google8protobuf7uint12810DivModImplES1_S1_PS1_S2_; google::protobuf::uint128::DivModImpl(google::protobuf::uint128,google::protobuf::uint128,google::protobuf::uint128*,google::protobuf::uint128*)
mov rsi, [rsp+1F8h+var_1C8]
test rsi, rsi
jz short loc_170D3
lea rdi, [rsp+1F8h+var_1A8]
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rax, [rsp+1F8h+var_1A8]
mov rcx, [rax-18h]
and [rsp+rcx+1F8h+var_190], 0FFFFFDFFh
mov rcx, [rax-18h]
lea r14, [rsp+rcx+1F8h+var_1F8]
add r14, 50h ; 'P'
cmp byte ptr [r14+0E1h], 0
jnz short loc_170AC
mov rdi, r14
mov esi, 20h ; ' '
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
mov byte ptr [r14+0E1h], 1
mov rax, [rsp+1F8h+var_1A8]
loc_170AC:
mov byte ptr [r14+0E0h], 30h ; '0'
mov rax, [rax-18h]
mov [rsp+rax+1F8h+var_198], r13
mov rsi, [rsp+1F8h+var_1D8]
lea rdi, [rsp+1F8h+var_1A8]
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rax, [rsp+1F8h+var_1A8]
jmp short loc_17130
loc_170D3:
mov rsi, [rsp+1F8h+var_1D8]
test rsi, rsi
jz short loc_17139
lea rdi, [rsp+1F8h+var_1A8]
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rax, [rsp+1F8h+var_1A8]
mov rcx, [rax-18h]
and [rsp+rcx+1F8h+var_190], 0FFFFFDFFh
mov rcx, [rax-18h]
lea r14, [rsp+rcx+1F8h+var_1F8]
add r14, 50h ; 'P'
cmp byte ptr [r14+0E1h], 0
jnz short loc_17128
mov rdi, r14
mov esi, 20h ; ' '
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
mov byte ptr [r14+0E1h], 1
mov rax, [rsp+1F8h+var_1A8]
loc_17128:
mov byte ptr [r14+0E0h], 30h ; '0'
loc_17130:
mov rax, [rax-18h]
mov [rsp+rax+1F8h+var_198], r13
loc_17139:
mov rsi, [rsp+1F8h+var_1B8]
lea rdi, [rsp+1F8h+var_1A8]
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, [rsp+1F8h+var_1A0]
mov rdi, rsp
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rax, [rbx]
mov rcx, [rax-18h]
mov r14, [rbx+rcx+10h]
mov qword ptr [rbx+rcx+10h], 0
mov rsi, [rsp+1F8h+var_1F0]
sub r14, rsi
jle loc_1720C
and ebp, 0B0h
mov rax, [rax-18h]
lea r15, [rbx+rax]
mov al, [rbx+rax+0E1h]
cmp ebp, 20h ; ' '
jnz short loc_1719F
test al, al
jz short loc_171AC
mov al, [r15+0E0h]
jmp short loc_171CD
loc_1719F:
test al, al
jz short loc_171E0
mov al, [r15+0E0h]
jmp short loc_171FC
loc_171AC:
mov rdi, r15
mov esi, 20h ; ' '
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
mov [r15+0E0h], al
mov byte ptr [r15+0E1h], 1
mov rsi, [rsp+1F8h+var_1F0]
loc_171CD:
movsx r8d, al
mov rdi, rsp
xor edx, edx
mov rcx, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc; std::string::_M_replace_aux(ulong,ulong,ulong,char)
jmp short loc_1720C
loc_171E0:
mov rdi, r15
mov esi, 20h ; ' '
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
mov [r15+0E0h], al
mov byte ptr [r15+0E1h], 1
loc_171FC:
movsx ecx, al
mov rdi, rsp
xor esi, esi
mov rdx, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6insertEmmc; std::string::insert(ulong,ulong,char)
loc_1720C:
mov rsi, [rsp+1F8h+var_1F8]
mov rdx, [rsp+1F8h+var_1F0]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, rax
lea rax, [rsp+1F8h+var_1E8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_17233
call __ZdlPv; operator delete(void *)
loc_17233:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1F8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1F8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 1C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_17282
jmp short loc_17282
mov rbx, rax
lea rax, [rsp+arg_8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_17285
call __ZdlPv; operator delete(void *)
jmp short loc_17285
loc_17282:
mov rbx, rax
loc_17285:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_48]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_B8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| long long google::protobuf::operator<<(long long *a1, __int128 *a2)
{
int v2; // ebp
long long v3; // r13
unsigned long long v4; // r14
long long v5; // rax
long long v6; // rcx
_BYTE *v7; // r14
long long v8; // rax
long long v9; // rcx
_BYTE *v10; // r14
long long v11; // rax
long long v12; // rcx
long long v13; // r14
long long v14; // rsi
bool v15; // cc
long long v16; // r14
char *v17; // r15
char v18; // al
char v19; // al
char v20; // al
long long v21; // rbx
char *v23; // [rsp+0h] [rbp-1F8h] BYREF
long long v24; // [rsp+8h] [rbp-1F0h]
char v25; // [rsp+10h] [rbp-1E8h] BYREF
__int128 v26; // [rsp+20h] [rbp-1D8h] BYREF
__int128 v27; // [rsp+30h] [rbp-1C8h] BYREF
__int128 v28; // [rsp+40h] [rbp-1B8h] BYREF
long long v29; // [rsp+50h] [rbp-1A8h] BYREF
_BYTE v30[104]; // [rsp+58h] [rbp-1A0h] BYREF
_BYTE v31[312]; // [rsp+C0h] [rbp-138h] BYREF
v2 = *(_DWORD *)((char *)a1 + *(_QWORD *)(*a1 - 24) + 24);
if ( (v2 & 0x4A) == 8 )
{
v3 = 15LL;
v4 = 0x1000000000000000LL;
}
else if ( (v2 & 0x4A) == 0x40 )
{
v3 = 21LL;
v4 = 0x8000000000000000LL;
}
else
{
v3 = 19LL;
v4 = 0x8AC7230489E80000LL;
}
std::ostringstream::basic_ostringstream(&v29);
*(_DWORD *)&v30[*(_QWORD *)(v29 - 24) + 16] = v2 & 0x424A | *(_DWORD *)&v30[*(_QWORD *)(v29 - 24) + 16] & 0xFFFFBDB5;
v27 = *a2;
v28 = 0LL;
google::protobuf::uint128::DivModImpl(
v27,
*((google::protobuf **)&v27 + 1),
v4,
0LL,
(long long)&v27,
(unsigned long long *)&v28);
v26 = 0LL;
google::protobuf::uint128::DivModImpl(
v27,
*((google::protobuf **)&v27 + 1),
v4,
0LL,
(long long)&v27,
(unsigned long long *)&v26);
if ( (_QWORD)v27 )
{
std::ostream::_M_insert<unsigned long>(&v29);
v5 = v29;
*(_DWORD *)&v30[*(_QWORD *)(v29 - 24) + 16] &= ~0x200u;
v6 = *(_QWORD *)(v5 - 24);
v7 = &v30[v6 - 8];
if ( !v31[v6 + 113] )
{
std::ios::widen(&v30[v6 - 8], 32LL);
v7[225] = 1;
v5 = v29;
}
v7[224] = 48;
*(_QWORD *)&v30[*(_QWORD *)(v5 - 24) + 8] = v3;
std::ostream::_M_insert<unsigned long>(&v29);
v8 = v29;
}
else
{
if ( !(_QWORD)v26 )
goto LABEL_15;
std::ostream::_M_insert<unsigned long>(&v29);
v8 = v29;
*(_DWORD *)&v30[*(_QWORD *)(v29 - 24) + 16] &= ~0x200u;
v9 = *(_QWORD *)(v8 - 24);
v10 = &v30[v9 - 8];
if ( !v31[v9 + 113] )
{
std::ios::widen(&v30[v9 - 8], 32LL);
v10[225] = 1;
v8 = v29;
}
v10[224] = 48;
}
*(_QWORD *)&v30[*(_QWORD *)(v8 - 24) + 8] = v3;
LABEL_15:
std::ostream::_M_insert<unsigned long>(&v29);
std::stringbuf::str(&v23, v30);
v11 = *a1;
v12 = *(_QWORD *)(*a1 - 24);
v13 = *(long long *)((char *)a1 + v12 + 16);
*(long long *)((char *)a1 + v12 + 16) = 0LL;
v14 = v24;
v15 = v13 <= v24;
v16 = v13 - v24;
if ( !v15 )
{
v17 = (char *)a1 + *(_QWORD *)(v11 - 24);
v18 = v17[225];
if ( (v2 & 0xB0) == 0x20 )
{
if ( v18 )
{
v19 = v17[224];
}
else
{
v19 = std::ios::widen(v17, 32LL);
v17[224] = v19;
v17[225] = 1;
v14 = v24;
}
std::string::_M_replace_aux(&v23, v14, 0LL, v16, (unsigned int)v19);
}
else
{
if ( v18 )
{
v20 = v17[224];
}
else
{
v20 = std::ios::widen(v17, 32LL);
v17[224] = v20;
v17[225] = 1;
}
std::string::insert(&v23, 0LL, v16, (unsigned int)v20);
}
}
v21 = std::__ostream_insert<char,std::char_traits<char>>(a1, v23, v24);
if ( v23 != &v25 )
operator delete(v23);
std::ostringstream::~ostringstream(&v29, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v31);
return v21;
}
| operator<<:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1c8
MOV R15,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
MOV EBP,dword ptr [RDI + RAX*0x1 + 0x18]
MOV EAX,EBP
AND EAX,0x4a
CMP EAX,0x8
JZ 0x00116fbd
CMP EAX,0x40
JNZ 0x00116fcf
MOV R13D,0x15
MOV R14,-0x8000000000000000
JMP 0x00116fdf
LAB_00116fbd:
MOV R13D,0xf
MOV R14,0x1000000000000000
JMP 0x00116fdf
LAB_00116fcf:
MOV R13D,0x13
MOV R14,-0x7538dcfb76180000
LAB_00116fdf:
LEA R12,[RSP + 0x50]
MOV RDI,R12
CALL 0x0010f450
MOV RAX,qword ptr [R12]
MOV RAX,qword ptr [RAX + -0x18]
MOV ECX,EBP
AND ECX,0x424a
MOV EDX,0xffffbdb5
AND EDX,dword ptr [RSP + RAX*0x1 + 0x68]
OR EDX,ECX
MOV dword ptr [RSP + RAX*0x1 + 0x68],EDX
MOVUPS XMM0,xmmword ptr [R15]
LEA R8,[RSP + 0x30]
MOVAPS xmmword ptr [R8],XMM0
XORPS XMM0,XMM0
LEA R9,[RSP + 0x40]
MOVAPS xmmword ptr [R9],XMM0
MOV RDI,qword ptr [R8]
MOV RSI,qword ptr [R8 + 0x8]
LAB_0011702b:
MOV RDX,R14
XOR ECX,ECX
CALL 0x00116bc8
LEA R9,[RSP + 0x20]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R9],XMM0
LEA R8,[RSP + 0x30]
MOV RDI,qword ptr [R8]
MOV RSI,qword ptr [R8 + 0x8]
LAB_0011704d:
MOV RDX,R14
XOR ECX,ECX
CALL 0x00116bc8
MOV RSI,qword ptr [RSP + 0x30]
TEST RSI,RSI
JZ 0x001170d3
LEA RDI,[RSP + 0x50]
CALL 0x0010f250
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RAX + -0x18]
AND dword ptr [RSP + RCX*0x1 + 0x68],0xfffffdff
MOV RCX,qword ptr [RAX + -0x18]
LEA R14,[RSP + RCX*0x1]
ADD R14,0x50
CMP byte ptr [R14 + 0xe1],0x0
JNZ 0x001170ac
MOV RDI,R14
MOV ESI,0x20
CALL 0x0010f340
MOV byte ptr [R14 + 0xe1],0x1
MOV RAX,qword ptr [RSP + 0x50]
LAB_001170ac:
MOV byte ptr [R14 + 0xe0],0x30
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RSP + RAX*0x1 + 0x60],R13
MOV RSI,qword ptr [RSP + 0x20]
LEA RDI,[RSP + 0x50]
CALL 0x0010f250
MOV RAX,qword ptr [RSP + 0x50]
JMP 0x00117130
LAB_001170d3:
MOV RSI,qword ptr [RSP + 0x20]
TEST RSI,RSI
JZ 0x00117139
LEA RDI,[RSP + 0x50]
CALL 0x0010f250
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RAX + -0x18]
AND dword ptr [RSP + RCX*0x1 + 0x68],0xfffffdff
MOV RCX,qword ptr [RAX + -0x18]
LEA R14,[RSP + RCX*0x1]
ADD R14,0x50
CMP byte ptr [R14 + 0xe1],0x0
JNZ 0x00117128
MOV RDI,R14
MOV ESI,0x20
CALL 0x0010f340
MOV byte ptr [R14 + 0xe1],0x1
MOV RAX,qword ptr [RSP + 0x50]
LAB_00117128:
MOV byte ptr [R14 + 0xe0],0x30
LAB_00117130:
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RSP + RAX*0x1 + 0x60],R13
LAB_00117139:
MOV RSI,qword ptr [RSP + 0x40]
LEA RDI,[RSP + 0x50]
CALL 0x0010f250
LEA RSI,[RSP + 0x58]
LAB_0011714d:
MOV RDI,RSP
CALL 0x0010f4e0
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + -0x18]
MOV R14,qword ptr [RBX + RCX*0x1 + 0x10]
MOV qword ptr [RBX + RCX*0x1 + 0x10],0x0
MOV RSI,qword ptr [RSP + 0x8]
SUB R14,RSI
JLE 0x0011720c
AND EBP,0xb0
MOV RAX,qword ptr [RAX + -0x18]
LEA R15,[RBX + RAX*0x1]
MOV AL,byte ptr [RBX + RAX*0x1 + 0xe1]
CMP EBP,0x20
JNZ 0x0011719f
TEST AL,AL
JZ 0x001171ac
MOV AL,byte ptr [R15 + 0xe0]
JMP 0x001171cd
LAB_0011719f:
TEST AL,AL
JZ 0x001171e0
MOV AL,byte ptr [R15 + 0xe0]
JMP 0x001171fc
LAB_001171ac:
MOV RDI,R15
MOV ESI,0x20
CALL 0x0010f340
MOV byte ptr [R15 + 0xe0],AL
MOV byte ptr [R15 + 0xe1],0x1
MOV RSI,qword ptr [RSP + 0x8]
LAB_001171cd:
MOVSX R8D,AL
MOV RDI,RSP
XOR EDX,EDX
MOV RCX,R14
CALL 0x0010f5a0
JMP 0x0011720c
LAB_001171e0:
MOV RDI,R15
MOV ESI,0x20
CALL 0x0010f340
MOV byte ptr [R15 + 0xe0],AL
MOV byte ptr [R15 + 0xe1],0x1
LAB_001171fc:
MOVSX ECX,AL
MOV RDI,RSP
XOR ESI,ESI
MOV RDX,R14
CALL 0x0010f5e0
LAB_0011720c:
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
MOV RDI,RBX
CALL 0x0010f3a0
LAB_0011721d:
MOV RBX,RAX
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00117233
CALL 0x0010f330
LAB_00117233:
MOV RSI,qword ptr [0x00201f60]
LEA RDI,[RSP + 0x50]
CALL 0x0010f1c0
LEA RDI,[RSP + 0xc0]
CALL 0x0010f110
MOV RAX,RBX
ADD RSP,0x1c8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, google::protobuf::uint128 const&) */
ostream * google::protobuf::operator<<(ostream *param_1,uint128 *param_2)
{
uint *puVar1;
uint uVar2;
long lVar3;
long lVar4;
ostream oVar5;
ostream *poVar6;
char cVar7;
int8 uVar8;
int8 uVar9;
long lVar10;
char *local_1f8;
ulong local_1f0;
char local_1e8 [16];
long local_1d8;
int8 uStack_1d0;
long local_1c8;
int8 uStack_1c0;
int8 local_1b8;
int8 uStack_1b0;
long local_1a8 [2];
int8 uStack_198;
uint auStack_190 [22];
ios_base local_138 [112];
char acStack_c8 [152];
uVar2 = *(uint *)(param_1 + *(long *)(*(long *)param_1 + -0x18) + 0x18);
if ((uVar2 & 0x4a) == 8) {
uVar8 = 0xf;
uVar9 = 0x1000000000000000;
}
else if ((uVar2 & 0x4a) == 0x40) {
uVar8 = 0x15;
uVar9 = 0x8000000000000000;
}
else {
uVar8 = 0x13;
uVar9 = 10000000000000000000;
}
std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8);
*(uint *)((long)auStack_190 + *(long *)(local_1a8[0] + -0x18)) =
*(uint *)((long)auStack_190 + *(long *)(local_1a8[0] + -0x18)) & 0xffffbdb5 | uVar2 & 0x424a;
local_1c8 = *(long *)param_2;
uStack_1c0 = *(int8 *)(param_2 + 8);
local_1b8 = 0;
uStack_1b0 = 0;
/* try { // try from 0011702b to 00117034 has its CatchHandler @ 00117268 */
uint128::DivModImpl(local_1c8,uStack_1c0,uVar9,0);
local_1d8 = 0;
uStack_1d0 = 0;
/* try { // try from 0011704d to 00117147 has its CatchHandler @ 00117282 */
uint128::DivModImpl(local_1c8,uStack_1c0,uVar9,0);
if (local_1c8 == 0) {
if (local_1d8 == 0) goto LAB_00117139;
std::ostream::_M_insert<unsigned_long>((ulong)local_1a8);
puVar1 = (uint *)((long)auStack_190 + *(long *)(local_1a8[0] + -0x18));
*puVar1 = *puVar1 & 0xfffffdff;
lVar3 = *(long *)(local_1a8[0] + -0x18);
if (acStack_c8[lVar3 + 1] == '\0') {
std::ios::widen((char)&local_1f8 + (char)lVar3 + 'P');
acStack_c8[lVar3 + 1] = '\x01';
}
acStack_c8[lVar3] = '0';
}
else {
std::ostream::_M_insert<unsigned_long>((ulong)local_1a8);
puVar1 = (uint *)((long)auStack_190 + *(long *)(local_1a8[0] + -0x18));
*puVar1 = *puVar1 & 0xfffffdff;
lVar3 = *(long *)(local_1a8[0] + -0x18);
if (acStack_c8[lVar3 + 1] == '\0') {
std::ios::widen((char)&local_1f8 + (char)lVar3 + 'P');
acStack_c8[lVar3 + 1] = '\x01';
}
acStack_c8[lVar3] = '0';
*(int8 *)((long)&uStack_198 + *(long *)(local_1a8[0] + -0x18)) = uVar8;
std::ostream::_M_insert<unsigned_long>((ulong)local_1a8);
}
*(int8 *)((long)&uStack_198 + *(long *)(local_1a8[0] + -0x18)) = uVar8;
LAB_00117139:
std::ostream::_M_insert<unsigned_long>((ulong)local_1a8);
/* try { // try from 0011714d to 00117154 has its CatchHandler @ 00117266 */
std::__cxx11::stringbuf::str();
lVar3 = *(long *)param_1;
lVar10 = *(long *)(lVar3 + -0x18);
lVar4 = *(long *)(param_1 + lVar10 + 0x10);
*(int8 *)(param_1 + lVar10 + 0x10) = 0;
lVar10 = lVar4 - local_1f0;
if (lVar10 != 0 && (long)local_1f0 <= lVar4) {
lVar3 = *(long *)(lVar3 + -0x18);
poVar6 = param_1 + lVar3;
cVar7 = (char)lVar10;
if ((uVar2 & 0xb0) == 0x20) {
if (param_1[lVar3 + 0xe1] == (ostream)0x0) {
/* try { // try from 001171ac to 0011721c has its CatchHandler @ 0011726a */
oVar5 = (ostream)std::ios::widen((char)poVar6);
poVar6[0xe0] = oVar5;
poVar6[0xe1] = (ostream)0x1;
}
std::__cxx11::string::_M_replace_aux((ulong)&local_1f8,local_1f0,0,cVar7);
}
else {
if (param_1[lVar3 + 0xe1] == (ostream)0x0) {
oVar5 = (ostream)std::ios::widen((char)poVar6);
poVar6[0xe0] = oVar5;
poVar6[0xe1] = (ostream)0x1;
}
std::__cxx11::string::insert((ulong)&local_1f8,0,cVar7);
}
}
poVar6 = std::__ostream_insert<char,std::char_traits<char>>(param_1,local_1f8,local_1f0);
if (local_1f8 != local_1e8) {
operator_delete(local_1f8);
}
std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8);
std::ios_base::~ios_base(local_138);
return poVar6;
}
| |
32,510 | CLI::Formatter::make_option_desc[abi:cxx11](CLI::Option const*) const | MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/impl/Formatter_inl.hpp | CLI11_INLINE std::string Formatter::make_option_desc(const Option *opt) const { return opt->get_description(); } | O1 | cpp | CLI::Formatter::make_option_desc[abi:cxx11](CLI::Option const*) const:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq 0xc8(%rdx), %rsi
movq 0xd0(%rdx), %rdx
addq %rsi, %rdx
callq 0x178c0
movq %rbx, %rax
popq %rbx
retq
| _ZNK3CLI9Formatter16make_option_descB5cxx11EPKNS_6OptionE:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
mov rsi, [rdx+0C8h]
mov rdx, [rdx+0D0h]
add rdx, rsi
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 * CLI::Formatter::make_option_desc[abi:cxx11](_QWORD *a1, long long a2, long long a3)
{
*a1 = a1 + 2;
std::string::_M_construct<char *>(a1, *(_QWORD *)(a3 + 200), *(_QWORD *)(a3 + 200) + *(_QWORD *)(a3 + 208));
return a1;
}
| make_option_desc[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV RSI,qword ptr [RDX + 0xc8]
MOV RDX,qword ptr [RDX + 0xd0]
ADD RDX,RSI
CALL 0x001178c0
MOV RAX,RBX
POP RBX
RET
|
/* CLI::Formatter::make_option_desc[abi:cxx11](CLI::Option const*) const */
Option * CLI::Formatter::make_option_desc_abi_cxx11_(Option *param_1)
{
long in_RDX;
*(Option **)param_1 = param_1 + 0x10;
std::__cxx11::string::_M_construct<char*>
(param_1,*(long *)(in_RDX + 200),*(long *)(in_RDX + 0xd0) + *(long *)(in_RDX + 200));
return param_1;
}
| |
32,511 | u64toa_radix_d16 | bluesky950520[P]quickjs/tests/test_conv.c | static size_t u64toa_radix_d16(char buf[minimum_length(65)], uint64_t n, unsigned base)
{
if (n < 16) {
buf[0] = digits36[n];
buf[1] = '\0';
return 1;
}
size_t len = (64 - clz64(n) + 3) / 4;
char *end = buf + len;
*end-- = '\0';
while (n >= 16) {
uint32_t quo = n & 15;
n >>= 4;
*end-- = digits36[quo];
}
*end = digits36[n];
return len;
} | O0 | c | u64toa_radix_d16:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
cmpq $0x10, 0x20(%rsp)
jae 0xb767
movq 0x20(%rsp), %rcx
leaq 0x18da(%rip), %rax # 0xd020
movb (%rax,%rcx), %cl
movq 0x28(%rsp), %rax
movb %cl, (%rax)
movq 0x28(%rsp), %rax
movb $0x0, 0x1(%rax)
movq $0x1, 0x30(%rsp)
jmp 0xb817
movq 0x20(%rsp), %rdi
callq 0x4fa0
movl %eax, %ecx
movl $0x40, %eax
subl %ecx, %eax
addl $0x3, %eax
movl $0x4, %ecx
cltd
idivl %ecx
cltq
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
addq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rsp)
movb $0x0, (%rax)
cmpq $0x10, 0x20(%rsp)
jb 0xb7f7
movq 0x20(%rsp), %rax
andq $0xf, %rax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rax
shrq $0x4, %rax
movq %rax, 0x20(%rsp)
movl 0x4(%rsp), %eax
movl %eax, %ecx
leaq 0x1841(%rip), %rax # 0xd020
movb (%rax,%rcx), %cl
movq 0x8(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x8(%rsp)
movb %cl, (%rax)
jmp 0xb7af
movq 0x20(%rsp), %rcx
leaq 0x181d(%rip), %rax # 0xd020
movb (%rax,%rcx), %cl
movq 0x8(%rsp), %rax
movb %cl, (%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| u64toa_radix_d16:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_1C], edx
cmp [rsp+38h+var_18], 10h
jnb short loc_B767
mov rcx, [rsp+38h+var_18]
lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov cl, [rax+rcx]
mov rax, [rsp+38h+var_10]
mov [rax], cl
mov rax, [rsp+38h+var_10]
mov byte ptr [rax+1], 0
mov [rsp+38h+var_8], 1
jmp loc_B817
loc_B767:
mov rdi, [rsp+38h+var_18]
call clz64
mov ecx, eax
mov eax, 40h ; '@'
sub eax, ecx
add eax, 3
mov ecx, 4
cdq
idiv ecx
cdqe
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_10]
add rax, [rsp+38h+var_28]
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_30]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rsp+38h+var_30], rcx
mov byte ptr [rax], 0
loc_B7AF:
cmp [rsp+38h+var_18], 10h
jb short loc_B7F7
mov rax, [rsp+38h+var_18]
and rax, 0Fh
mov [rsp+38h+var_34], eax
mov rax, [rsp+38h+var_18]
shr rax, 4
mov [rsp+38h+var_18], rax
mov eax, [rsp+38h+var_34]
mov ecx, eax
lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov cl, [rax+rcx]
mov rax, [rsp+38h+var_30]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+38h+var_30], rdx
mov [rax], cl
jmp short loc_B7AF
loc_B7F7:
mov rcx, [rsp+38h+var_18]
lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov cl, [rax+rcx]
mov rax, [rsp+38h+var_30]
mov [rax], cl
mov rax, [rsp+38h+var_28]
mov [rsp+38h+var_8], rax
loc_B817:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
| long long u64toa_radix_d16(_BYTE *a1, unsigned long long a2)
{
_BYTE *v2; // rax
int v4; // [rsp+4h] [rbp-34h]
_BYTE *v5; // [rsp+8h] [rbp-30h]
long long v6; // [rsp+10h] [rbp-28h]
unsigned long long v7; // [rsp+20h] [rbp-18h]
v7 = a2;
if ( a2 >= 0x10 )
{
v6 = (int)(64 - clz64(a2) + 3) / 4;
v5 = &a1[v6 - 1];
a1[v6] = 0;
while ( v7 >= 0x10 )
{
v4 = v7 & 0xF;
v7 >>= 4;
v2 = v5--;
*v2 = digits36[v4];
}
*v5 = digits36[v7];
return v6;
}
else
{
*a1 = digits36[a2];
a1[1] = 0;
return 1LL;
}
}
| u64toa_radix_d16:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV dword ptr [RSP + 0x1c],EDX
CMP qword ptr [RSP + 0x20],0x10
JNC 0x0010b767
MOV RCX,qword ptr [RSP + 0x20]
LEA RAX,[0x10d020]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x28]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + 0x28]
MOV byte ptr [RAX + 0x1],0x0
MOV qword ptr [RSP + 0x30],0x1
JMP 0x0010b817
LAB_0010b767:
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00104fa0
MOV ECX,EAX
MOV EAX,0x40
SUB EAX,ECX
ADD EAX,0x3
MOV ECX,0x4
CDQ
IDIV ECX
CDQE
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RSP + 0x8],RCX
MOV byte ptr [RAX],0x0
LAB_0010b7af:
CMP qword ptr [RSP + 0x20],0x10
JC 0x0010b7f7
MOV RAX,qword ptr [RSP + 0x20]
AND RAX,0xf
MOV dword ptr [RSP + 0x4],EAX
MOV RAX,qword ptr [RSP + 0x20]
SHR RAX,0x4
MOV qword ptr [RSP + 0x20],RAX
MOV EAX,dword ptr [RSP + 0x4]
MOV ECX,EAX
LEA RAX,[0x10d020]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x8]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + 0x8],RDX
MOV byte ptr [RAX],CL
JMP 0x0010b7af
LAB_0010b7f7:
MOV RCX,qword ptr [RSP + 0x20]
LEA RAX,[0x10d020]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x8]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RAX
LAB_0010b817:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
int1 [16] u64toa_radix_d16(char *param_1,ulong param_2,char *param_3)
{
uint uVar1;
int iVar2;
int1 auVar3 [16];
char *local_30;
ulong local_18;
long local_8;
if (param_2 < 0x10) {
*param_1 = "?0123456789abcdefghijklmnopqrstuvwxyz"[param_2 + 1];
param_1[1] = '\0';
local_8 = 1;
}
else {
iVar2 = clz64(param_2);
param_3 = (char *)((long)(0x43 - iVar2) % 4 & 0xffffffff);
local_8 = (long)((0x43 - iVar2) / 4);
local_30 = param_1 + local_8 + -1;
param_1[local_8] = '\0';
local_18 = param_2;
while (0xf < local_18) {
uVar1 = (uint)local_18;
local_18 = local_18 >> 4;
param_3 = local_30 + -1;
*local_30 = "?0123456789abcdefghijklmnopqrstuvwxyz"[(ulong)(uVar1 & 0xf) + 1];
local_30 = param_3;
}
*local_30 = "?0123456789abcdefghijklmnopqrstuvwxyz"[local_18 + 1];
}
auVar3._8_8_ = param_3;
auVar3._0_8_ = local_8;
return auVar3;
}
| |
32,512 | w_search | eloqsql/storage/myisam/mi_write.c | static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
uint comp_flag, uchar *key, uint key_length, my_off_t page,
uchar *father_buff, uchar *father_keypos,
my_off_t father_page, my_bool insert_last)
{
int error,flag;
uint nod_flag, search_key_length;
uchar *temp_buff,*keypos;
uchar keybuff[HA_MAX_KEY_BUFF];
my_bool was_last_key;
my_off_t next_page, dupp_key_pos;
DBUG_ENTER("w_search");
DBUG_PRINT("enter",("page: %ld", (long) page));
search_key_length= (comp_flag & SEARCH_FIND) ? key_length : USE_WHOLE_KEY;
if (!(temp_buff= (uchar*) my_alloca((uint) keyinfo->block_length+
HA_MAX_KEY_BUFF*2)))
DBUG_RETURN(-1);
if (!_mi_fetch_keypage(info,keyinfo,page,DFLT_INIT_HITS,temp_buff,0))
goto err;
flag=(*keyinfo->bin_search)(info,keyinfo,temp_buff,key,search_key_length,
comp_flag, &keypos, keybuff, &was_last_key);
nod_flag=mi_test_if_nod(temp_buff);
if (flag == 0)
{
uint tmp_key_length;
/* get position to record with duplicated key */
tmp_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&keypos,keybuff);
if (tmp_key_length)
dupp_key_pos=_mi_dpos(info,0,keybuff+tmp_key_length);
else
dupp_key_pos= HA_OFFSET_ERROR;
if (keyinfo->flag & HA_FULLTEXT)
{
uint off;
int subkeys;
get_key_full_length_rdonly(off, keybuff);
subkeys=ft_sintXkorr(keybuff+off);
comp_flag=SEARCH_SAME;
if (subkeys >= 0)
{
/* normal word, one-level tree structure */
flag=(*keyinfo->bin_search)(info, keyinfo, temp_buff, key,
USE_WHOLE_KEY, comp_flag,
&keypos, keybuff, &was_last_key);
}
else
{
/* popular word. two-level tree. going down */
my_off_t root=dupp_key_pos;
keyinfo=&info->s->ft2_keyinfo;
get_key_full_length_rdonly(off, key);
key+=off;
keypos-=keyinfo->keylength+nod_flag; /* we'll modify key entry 'in vivo' */
error=_mi_ck_real_write_btree(info, keyinfo, key, 0,
&root, comp_flag);
_mi_dpointer(info, keypos+HA_FT_WLEN, root);
subkeys--; /* should there be underflow protection ? */
DBUG_ASSERT(subkeys < 0);
ft_intXstore(keypos, subkeys);
if (!error)
error=_mi_write_keypage(info,keyinfo,page,DFLT_INIT_HITS,temp_buff);
my_afree((uchar*) temp_buff);
DBUG_RETURN(error);
}
}
else /* not HA_FULLTEXT, normal HA_NOSAME key */
{
info->dupp_key_pos= dupp_key_pos;
my_afree((uchar*) temp_buff);
my_errno=HA_ERR_FOUND_DUPP_KEY;
DBUG_RETURN(-1);
}
}
if (flag == MI_FOUND_WRONG_KEY)
DBUG_RETURN(-1);
if (!was_last_key)
insert_last=0;
next_page=_mi_kpos(nod_flag,keypos);
if (next_page == HA_OFFSET_ERROR ||
(error=w_search(info, keyinfo, comp_flag, key, key_length, next_page,
temp_buff, keypos, page, insert_last)) >0)
{
error=_mi_insert(info,keyinfo,key,temp_buff,keypos,keybuff,father_buff,
father_keypos,father_page, insert_last);
if (_mi_write_keypage(info,keyinfo,page,DFLT_INIT_HITS,temp_buff))
goto err;
}
my_afree((uchar*) temp_buff);
DBUG_RETURN(error);
err:
my_afree((uchar*) temp_buff);
DBUG_PRINT("exit",("Error: %d",my_errno));
DBUG_RETURN (-1);
} | O3 | c | w_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4f8, %rsp # imm = 0x4F8
movq %r9, %rbx
movl %r8d, -0x504(%rbp)
movq %rcx, -0x510(%rbp)
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movzwl 0xe(%rsi), %eax
movq %rsp, %r15
addl $0x97f, %eax # imm = 0x97F
andl $-0x10, %eax
subq %rax, %r15
movq %r15, %rsp
movq %r9, %rdx
movl $0x3, %ecx
movq %r15, %r8
xorl %r9d, %r9d
callq 0x83828
testq %rax, %rax
je 0x8815a
movq %rbx, -0x518(%rbp)
testb $0x1, %r12b
movl $0x970, %r8d # imm = 0x970
cmovnel -0x504(%rbp), %r8d
subq $0x8, %rsp
leaq -0x4f1(%rbp), %rbx
leaq -0x4f0(%rbp), %rax
leaq -0x500(%rbp), %r10
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq -0x510(%rbp), %rcx
movl %r12d, -0x508(%rbp)
movl %r12d, %r9d
pushq %rbx
pushq %rax
pushq %r10
callq *0x40(%r13)
addq $0x20, %rsp
cmpb $0x0, (%r15)
movl $0x0, %r12d
jns 0x8802a
movq (%r14), %rcx
movl 0x17c(%rcx), %r12d
testl %eax, %eax
je 0x88105
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF
je 0x8815f
xorl %eax, %eax
cmpb $0x0, -0x4f1(%rbp)
movzbl 0x28(%rbp), %ebx
cmovel %eax, %ebx
movq -0x500(%rbp), %rsi
movl %r12d, %edi
callq 0x841a2
movsbl %bl, %r10d
cmpq $-0x1, %rax
movq %r14, %r12
movq -0x510(%rbp), %r14
je 0x880b5
movq %r12, %rdi
movq %r13, %rsi
movl -0x508(%rbp), %edx
movq %r14, %rcx
movl -0x504(%rbp), %r8d
movq %rax, %r9
pushq %r10
pushq -0x518(%rbp)
pushq -0x500(%rbp)
pushq %r15
movq %r10, %rbx
callq 0x87f50
movq %rbx, %r10
addq $0x20, %rsp
testl %eax, %eax
jle 0x88300
movq -0x500(%rbp), %r8
leaq -0x4f0(%rbp), %r9
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
pushq %r10
pushq 0x20(%rbp)
pushq 0x18(%rbp)
pushq 0x10(%rbp)
callq 0x8841b
addq $0x20, %rsp
movl %eax, %ebx
movq %r12, %rdi
movq %r13, %rsi
movq -0x518(%rbp), %rdx
movl $0x3, %ecx
movq %r15, %r8
callq 0x838d4
testl %eax, %eax
jne 0x8815a
jmp 0x8815f
leaq -0x500(%rbp), %rdx
leaq -0x4f0(%rbp), %rcx
movq %r13, %rdi
movl %r12d, %esi
callq *0x48(%r13)
testl %eax, %eax
je 0x8813a
movl %eax, %eax
leaq (%rax,%rbp), %rdx
addq $-0x4f0, %rdx # imm = 0xFB10
movq %r14, %rdi
xorl %esi, %esi
callq 0x84281
jmp 0x88141
movq $-0x1, %rax
testb $-0x80, 0xa(%r13)
jne 0x88183
movq %rax, 0x1a0(%r14)
callq 0xa1672
movl $0x79, (%rax)
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x88307
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl -0x4f0(%rbp), %ecx
cmpq $0xff, %rcx
je 0x88198
incq %rcx
jmp 0x881aa
movzwl -0x4ef(%rbp), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addq $0x3, %rcx
movzbl -0x4f0(%rbp,%rcx), %edx
shll $0x18, %edx
js 0x881ff
subq $0x8, %rsp
movl $0x4, -0x508(%rbp)
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq -0x510(%rbp), %rcx
movl $0x970, %r8d # imm = 0x970
movl $0x4, %r9d
pushq %rbx
leaq -0x4f0(%rbp), %rax
pushq %rax
leaq -0x500(%rbp), %rax
pushq %rax
callq *0x40(%r13)
addq $0x20, %rsp
jmp 0x88032
movq %r12, %rdi
movzwl -0x4ee(%rbp,%rcx), %esi
rolw $0x8, %si
movzwl %si, %esi
movzbl -0x4ef(%rbp,%rcx), %ecx
shll $0x10, %ecx
orl %esi, %ecx
orl %edx, %ecx
movl %ecx, -0x504(%rbp)
movq %rax, -0x520(%rbp)
movq (%r14), %rax
leaq 0x1a8(%rax), %r12
movq -0x510(%rbp), %rdx
movzbl (%rdx), %ecx
cmpq $0xff, %rcx
je 0x8824f
incq %rcx
jmp 0x8825e
movzwl 0x1(%rdx), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addq $0x3, %rcx
addq %rcx, %rdx
movzwl 0x1ba(%rax), %eax
addl %eax, %edi
subq %rdi, -0x500(%rbp)
leaq -0x520(%rbp), %r13
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movq %r13, %r8
movl $0x4, %r9d
callq 0x87ecf
movl %eax, %ebx
movq -0x500(%rbp), %rsi
addq $0x4, %rsi
movq (%r13), %rdx
movq %r14, %rdi
callq 0x84f47
movl -0x504(%rbp), %edx
decl %edx
movq -0x500(%rbp), %rax
movb %dl, 0x3(%rax)
movq -0x500(%rbp), %rax
movb %dh, 0x2(%rax)
movl %edx, %eax
shrl $0x10, %eax
movq -0x500(%rbp), %rcx
movb %al, 0x1(%rcx)
shrl $0x18, %edx
movq -0x500(%rbp), %rax
movb %dl, (%rax)
testl %ebx, %ebx
jne 0x8815f
movq %r14, %rdi
movq %r12, %rsi
movq -0x518(%rbp), %rdx
movl $0x3, %ecx
movq %r15, %r8
callq 0x838d4
movl %eax, %ebx
jmp 0x8815f
callq 0x29270
| w_search_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 4F8h
mov rbx, r9
mov [rbp+var_504], r8d
mov [rbp+var_510], rcx
mov r12d, edx
mov r13, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
movzx eax, word ptr [rsi+0Eh]
mov r15, rsp
add eax, 97Fh
and eax, 0FFFFFFF0h
sub r15, rax
mov rsp, r15
mov rdx, r9
mov ecx, 3
mov r8, r15
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz loc_8815A
mov [rbp+var_518], rbx
test r12b, 1
mov r8d, 970h
cmovnz r8d, [rbp+var_504]
sub rsp, 8
lea rbx, [rbp+var_4F1]
lea rax, [rbp+var_4F0]
lea r10, [rbp+var_500]
mov rdi, r14
mov rsi, r13
mov rdx, r15
mov rcx, [rbp+var_510]
mov [rbp+var_508], r12d
mov r9d, r12d
push rbx
push rax
push r10
call qword ptr [r13+40h]
add rsp, 20h
cmp byte ptr [r15], 0
mov r12d, 0
jns short loc_8802A
mov rcx, [r14]
mov r12d, [rcx+17Ch]
loc_8802A:
test eax, eax
jz loc_88105
loc_88032:
mov ebx, 0FFFFFFFFh
cmp eax, 7FFFFFFFh
jz loc_8815F
xor eax, eax
cmp [rbp+var_4F1], 0
movzx ebx, [rbp+arg_18]
cmovz ebx, eax
mov rsi, [rbp+var_500]
mov edi, r12d
call _mi_kpos
movsx r10d, bl
cmp rax, 0FFFFFFFFFFFFFFFFh
mov r12, r14
mov r14, [rbp+var_510]
jz short loc_880B5
mov rdi, r12
mov rsi, r13
mov edx, [rbp+var_508]
mov rcx, r14
mov r8d, [rbp+var_504]
mov r9, rax
push r10
push [rbp+var_518]
push [rbp+var_500]
push r15
mov rbx, r10
call w_search_0
mov r10, rbx
add rsp, 20h
test eax, eax
jle loc_88300
loc_880B5:
mov r8, [rbp+var_500]
lea r9, [rbp+var_4F0]
mov rdi, r12
mov rsi, r13
mov rdx, r14
mov rcx, r15
push r10
push [rbp+arg_10]
push [rbp+arg_8]
push [rbp+arg_0]
call _mi_insert
add rsp, 20h
mov ebx, eax
mov rdi, r12
mov rsi, r13
mov rdx, [rbp+var_518]
mov ecx, 3
mov r8, r15
call _mi_write_keypage
test eax, eax
jnz short loc_8815A
jmp short loc_8815F
loc_88105:
lea rdx, [rbp+var_500]
lea rcx, [rbp+var_4F0]
mov rdi, r13
mov esi, r12d
call qword ptr [r13+48h]
test eax, eax
jz short loc_8813A
mov eax, eax
lea rdx, [rax+rbp]
add rdx, 0FFFFFFFFFFFFFB10h
mov rdi, r14
xor esi, esi
call _mi_dpos
jmp short loc_88141
loc_8813A:
mov rax, 0FFFFFFFFFFFFFFFFh
loc_88141:
test byte ptr [r13+0Ah], 80h
jnz short loc_88183
mov [r14+1A0h], rax
call _my_thread_var
mov dword ptr [rax], 79h ; 'y'
loc_8815A:
mov ebx, 0FFFFFFFFh
loc_8815F:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_88307
mov eax, ebx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_88183:
movzx ecx, [rbp+var_4F0]
cmp rcx, 0FFh
jz short loc_88198
inc rcx
jmp short loc_881AA
loc_88198:
movzx ecx, [rbp+var_4EF]
rol cx, 8
movzx ecx, cx
add rcx, 3
loc_881AA:
movzx edx, [rbp+rcx+var_4F0]
shl edx, 18h
js short loc_881FF
sub rsp, 8
mov [rbp+var_508], 4
mov rdi, r14
mov rsi, r13
mov rdx, r15
mov rcx, [rbp+var_510]
mov r8d, 970h
mov r9d, 4
push rbx
lea rax, [rbp+var_4F0]
push rax
lea rax, [rbp+var_500]
push rax
call qword ptr [r13+40h]
add rsp, 20h
jmp loc_88032
loc_881FF:
mov rdi, r12
movzx esi, [rbp+rcx+var_4EF+1]
rol si, 8
movzx esi, si
movzx ecx, byte ptr [rbp+rcx+var_4EF]
shl ecx, 10h
or ecx, esi
or ecx, edx
mov [rbp+var_504], ecx
mov [rbp+var_520], rax
mov rax, [r14]
lea r12, [rax+1A8h]
mov rdx, [rbp+var_510]
movzx ecx, byte ptr [rdx]
cmp rcx, 0FFh
jz short loc_8824F
inc rcx
jmp short loc_8825E
loc_8824F:
movzx ecx, word ptr [rdx+1]
rol cx, 8
movzx ecx, cx
add rcx, 3
loc_8825E:
add rdx, rcx
movzx eax, word ptr [rax+1BAh]
add edi, eax
sub [rbp+var_500], rdi
lea r13, [rbp+var_520]
mov rdi, r14
mov rsi, r12
xor ecx, ecx
mov r8, r13
mov r9d, 4
call _mi_ck_real_write_btree
mov ebx, eax
mov rsi, [rbp+var_500]
add rsi, 4
mov rdx, [r13+0]
mov rdi, r14
call _mi_dpointer
mov edx, [rbp+var_504]
dec edx
mov rax, [rbp+var_500]
mov [rax+3], dl
mov rax, [rbp+var_500]
mov [rax+2], dh
mov eax, edx
shr eax, 10h
mov rcx, [rbp+var_500]
mov [rcx+1], al
shr edx, 18h
mov rax, [rbp+var_500]
mov [rax], dl
test ebx, ebx
jnz loc_8815F
mov rdi, r14
mov rsi, r12
mov rdx, [rbp+var_518]
mov ecx, 3
mov r8, r15
call _mi_write_keypage
loc_88300:
mov ebx, eax
jmp loc_8815F
loc_88307:
call ___stack_chk_fail
| // bad sp value at call has been detected, the output may be wrong!
long long w_search_0(
long long *a1,
long long a2,
unsigned int a3,
unsigned __int8 *a4,
unsigned int a5,
long long a6,
long long a7,
long long a8,
long long a9,
char a10)
{
char *v14; // r15
long long v15; // r8
int v16; // eax
unsigned int v17; // r12d
unsigned int v18; // ebx
unsigned long long v20; // rax
char v21; // r10
long long *v22; // r12
int v23; // r14d
int v24; // eax
long long *v25; // rdi
const char *v26; // rsi
unsigned int v27; // eax
unsigned long long v28; // rax
long long v30; // rcx
unsigned int v31; // edi
long long v32; // r12
long long v33; // rcx
long long v34; // rcx
unsigned int v35; // edx
unsigned long long v36; // [rsp+0h] [rbp-520h] BYREF
unsigned long long v37; // [rsp+8h] [rbp-518h]
unsigned __int8 *v38; // [rsp+10h] [rbp-510h]
int v39; // [rsp+18h] [rbp-508h]
unsigned int v40; // [rsp+1Ch] [rbp-504h]
_BYTE *v41; // [rsp+20h] [rbp-500h] BYREF
char v42; // [rsp+2Fh] [rbp-4F1h] BYREF
unsigned __int8 v43; // [rsp+30h] [rbp-4F0h] BYREF
_WORD v44[607]; // [rsp+31h] [rbp-4EFh]
unsigned long long v45; // [rsp+4F0h] [rbp-30h]
v40 = a5;
v38 = a4;
v45 = __readfsqword(0x28u);
v14 = (char *)&v36 - ((*(unsigned __int16 *)(a2 + 14) + 2431) & 0xFFFFFFF0);
if ( !mi_fetch_keypage(a1, a2, a6) )
return (unsigned int)-1;
v37 = a6;
v15 = 2416LL;
if ( (a3 & 1) != 0 )
v15 = v40;
v39 = a3;
v16 = (*(long long ( **)(long long *, long long, char *, unsigned __int8 *, long long, _QWORD, _BYTE **, unsigned __int8 *, char *))(a2 + 64))(
a1,
a2,
v14,
v38,
v15,
a3,
&v41,
&v43,
&v42);
v17 = 0;
if ( *v14 < 0 )
v17 = *(_DWORD *)(*a1 + 380);
if ( v16 )
{
LABEL_7:
v18 = -1;
if ( v16 != 0x7FFFFFFF )
{
if ( !v42 )
a10 = 0;
v20 = mi_kpos(v17, (long long)v41);
v21 = a10;
v22 = a1;
v23 = (int)v38;
if ( v20 == -1LL
|| (v24 = w_search_0((_DWORD)v22, a2, v39, (_DWORD)v38, v40, v20, (long long)v14, (long long)v41, v37, a10),
v21 = a10,
v24 > 0) )
{
v18 = mi_insert((_DWORD)v22, a2, v23, (_DWORD)v14, (_DWORD)v41, (unsigned int)&v43, a7, a8, a9, v21);
if ( !(unsigned int)mi_write_keypage(v22, a2, v37, 3u, v14) )
return v18;
return (unsigned int)-1;
}
return (unsigned int)v24;
}
return v18;
}
v25 = (long long *)a2;
v26 = (const char *)v17;
v27 = (*(long long ( **)(long long, _QWORD, _BYTE **, unsigned __int8 *))(a2 + 72))(a2, v17, &v41, &v43);
if ( v27 )
{
v25 = a1;
v26 = 0LL;
v28 = mi_dpos(a1, 0, (long long)(&v43 + v27));
}
else
{
v28 = -1LL;
}
if ( *(char *)(a2 + 10) >= 0 )
{
a1[52] = v28;
*(_DWORD *)my_thread_var(v25, v26) = 121;
return (unsigned int)-1;
}
if ( v43 == 255LL )
v30 = (unsigned __int16)__ROL2__(v44[0], 8) + 3LL;
else
v30 = v43 + 1LL;
if ( (*(&v43 + v30) & 0x80) == 0 )
{
v39 = 4;
v16 = (*(long long ( **)(long long *, long long, char *, unsigned __int8 *, long long, long long, _BYTE **, unsigned __int8 *, char *))(a2 + 64))(
a1,
a2,
v14,
v38,
2416LL,
4LL,
&v41,
&v43,
&v42);
goto LABEL_7;
}
v31 = v17;
v40 = (*(&v43 + v30) << 24) | (unsigned __int16)__ROL2__(*(_WORD *)((char *)v44 + v30 + 1), 8) | (*((unsigned __int8 *)v44 + v30) << 16);
v36 = v28;
v32 = *a1 + 424;
v33 = *v38;
if ( v33 == 255 )
v34 = (unsigned __int16)__ROL2__(*(_WORD *)(v38 + 1), 8) + 3LL;
else
v34 = v33 + 1;
v41 += -*(unsigned __int16 *)(*a1 + 442) - v31;
v18 = mi_ck_real_write_btree((long long)a1, v32, (long long)&v38[v34], 0, &v36, 4);
mi_dpointer(a1, (long long)(v41 + 4), v36);
v35 = v40 - 1;
v41[3] = v40 - 1;
v41[2] = BYTE1(v35);
v41[1] = BYTE2(v35);
*v41 = HIBYTE(v35);
if ( !v18 )
return (unsigned int)mi_write_keypage(a1, v32, v37, 3u, v14);
return v18;
}
| w_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x4f8
MOV RBX,R9
MOV dword ptr [RBP + -0x504],R8D
MOV qword ptr [RBP + -0x510],RCX
MOV R12D,EDX
MOV R13,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOVZX EAX,word ptr [RSI + 0xe]
MOV R15,RSP
ADD EAX,0x97f
AND EAX,0xfffffff0
SUB R15,RAX
MOV RSP,R15
MOV RDX,R9
MOV ECX,0x3
MOV R8,R15
XOR R9D,R9D
CALL 0x00183828
TEST RAX,RAX
JZ 0x0018815a
MOV qword ptr [RBP + -0x518],RBX
TEST R12B,0x1
MOV R8D,0x970
CMOVNZ R8D,dword ptr [RBP + -0x504]
SUB RSP,0x8
LEA RBX,[RBP + -0x4f1]
LEA RAX,[RBP + -0x4f0]
LEA R10,[RBP + -0x500]
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x510]
MOV dword ptr [RBP + -0x508],R12D
MOV R9D,R12D
PUSH RBX
PUSH RAX
PUSH R10
CALL qword ptr [R13 + 0x40]
ADD RSP,0x20
CMP byte ptr [R15],0x0
MOV R12D,0x0
JNS 0x0018802a
MOV RCX,qword ptr [R14]
MOV R12D,dword ptr [RCX + 0x17c]
LAB_0018802a:
TEST EAX,EAX
JZ 0x00188105
LAB_00188032:
MOV EBX,0xffffffff
CMP EAX,0x7fffffff
JZ 0x0018815f
XOR EAX,EAX
CMP byte ptr [RBP + -0x4f1],0x0
MOVZX EBX,byte ptr [RBP + 0x28]
CMOVZ EBX,EAX
MOV RSI,qword ptr [RBP + -0x500]
MOV EDI,R12D
CALL 0x001841a2
MOVSX R10D,BL
CMP RAX,-0x1
MOV R12,R14
MOV R14,qword ptr [RBP + -0x510]
JZ 0x001880b5
MOV RDI,R12
MOV RSI,R13
MOV EDX,dword ptr [RBP + -0x508]
MOV RCX,R14
MOV R8D,dword ptr [RBP + -0x504]
MOV R9,RAX
PUSH R10
PUSH qword ptr [RBP + -0x518]
PUSH qword ptr [RBP + -0x500]
PUSH R15
MOV RBX,R10
CALL 0x00187f50
MOV R10,RBX
ADD RSP,0x20
TEST EAX,EAX
JLE 0x00188300
LAB_001880b5:
MOV R8,qword ptr [RBP + -0x500]
LEA R9,[RBP + -0x4f0]
MOV RDI,R12
MOV RSI,R13
MOV RDX,R14
MOV RCX,R15
PUSH R10
PUSH qword ptr [RBP + 0x20]
PUSH qword ptr [RBP + 0x18]
PUSH qword ptr [RBP + 0x10]
CALL 0x0018841b
ADD RSP,0x20
MOV EBX,EAX
MOV RDI,R12
MOV RSI,R13
MOV RDX,qword ptr [RBP + -0x518]
MOV ECX,0x3
MOV R8,R15
CALL 0x001838d4
TEST EAX,EAX
JNZ 0x0018815a
JMP 0x0018815f
LAB_00188105:
LEA RDX,[RBP + -0x500]
LEA RCX,[RBP + -0x4f0]
MOV RDI,R13
MOV ESI,R12D
CALL qword ptr [R13 + 0x48]
TEST EAX,EAX
JZ 0x0018813a
MOV EAX,EAX
LEA RDX,[RAX + RBP*0x1]
ADD RDX,-0x4f0
MOV RDI,R14
XOR ESI,ESI
CALL 0x00184281
JMP 0x00188141
LAB_0018813a:
MOV RAX,-0x1
LAB_00188141:
TEST byte ptr [R13 + 0xa],0x80
JNZ 0x00188183
MOV qword ptr [R14 + 0x1a0],RAX
CALL 0x001a1672
MOV dword ptr [RAX],0x79
LAB_0018815a:
MOV EBX,0xffffffff
LAB_0018815f:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00188307
MOV EAX,EBX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00188183:
MOVZX ECX,byte ptr [RBP + -0x4f0]
CMP RCX,0xff
JZ 0x00188198
INC RCX
JMP 0x001881aa
LAB_00188198:
MOVZX ECX,word ptr [RBP + -0x4ef]
ROL CX,0x8
MOVZX ECX,CX
ADD RCX,0x3
LAB_001881aa:
MOVZX EDX,byte ptr [RBP + RCX*0x1 + -0x4f0]
SHL EDX,0x18
JS 0x001881ff
SUB RSP,0x8
MOV dword ptr [RBP + -0x508],0x4
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x510]
MOV R8D,0x970
MOV R9D,0x4
PUSH RBX
LEA RAX,[RBP + -0x4f0]
PUSH RAX
LEA RAX,[RBP + -0x500]
PUSH RAX
CALL qword ptr [R13 + 0x40]
ADD RSP,0x20
JMP 0x00188032
LAB_001881ff:
MOV RDI,R12
MOVZX ESI,word ptr [RBP + RCX*0x1 + -0x4ee]
ROL SI,0x8
MOVZX ESI,SI
MOVZX ECX,byte ptr [RBP + RCX*0x1 + -0x4ef]
SHL ECX,0x10
OR ECX,ESI
OR ECX,EDX
MOV dword ptr [RBP + -0x504],ECX
MOV qword ptr [RBP + -0x520],RAX
MOV RAX,qword ptr [R14]
LEA R12,[RAX + 0x1a8]
MOV RDX,qword ptr [RBP + -0x510]
MOVZX ECX,byte ptr [RDX]
CMP RCX,0xff
JZ 0x0018824f
INC RCX
JMP 0x0018825e
LAB_0018824f:
MOVZX ECX,word ptr [RDX + 0x1]
ROL CX,0x8
MOVZX ECX,CX
ADD RCX,0x3
LAB_0018825e:
ADD RDX,RCX
MOVZX EAX,word ptr [RAX + 0x1ba]
ADD EDI,EAX
SUB qword ptr [RBP + -0x500],RDI
LEA R13,[RBP + -0x520]
MOV RDI,R14
MOV RSI,R12
XOR ECX,ECX
MOV R8,R13
MOV R9D,0x4
CALL 0x00187ecf
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x500]
ADD RSI,0x4
MOV RDX,qword ptr [R13]
MOV RDI,R14
CALL 0x00184f47
MOV EDX,dword ptr [RBP + -0x504]
DEC EDX
MOV RAX,qword ptr [RBP + -0x500]
MOV byte ptr [RAX + 0x3],DL
MOV RAX,qword ptr [RBP + -0x500]
MOV byte ptr [RAX + 0x2],DH
MOV EAX,EDX
SHR EAX,0x10
MOV RCX,qword ptr [RBP + -0x500]
MOV byte ptr [RCX + 0x1],AL
SHR EDX,0x18
MOV RAX,qword ptr [RBP + -0x500]
MOV byte ptr [RAX],DL
TEST EBX,EBX
JNZ 0x0018815f
MOV RDI,R14
MOV RSI,R12
MOV RDX,qword ptr [RBP + -0x518]
MOV ECX,0x3
MOV R8,R15
CALL 0x001838d4
LAB_00188300:
MOV EBX,EAX
JMP 0x0018815f
LAB_00188307:
CALL 0x00129270
|
int w_search(long *param_1,long param_2,uint param_3,byte *param_4,int param_5,int8 param_6,
int8 param_7,int8 param_8,int8 param_9,char param_10)
{
code *pcVar1;
long lVar2;
int8 uVar3;
int iVar4;
int iVar5;
int iVar6;
uint uVar7;
long lVar8;
int4 *puVar9;
long lVar10;
long lVar11;
byte *pbVar12;
int1 *puVar13;
char *pcVar14;
long in_FS_OFFSET;
long alStack_550 [5];
long local_528;
int8 local_520;
byte *local_518;
uint local_510;
int local_50c;
int1 *local_508;
char local_4f9;
byte local_4f8;
int1 local_4f7 [1215];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0x97f & 0xfffffff0);
pcVar14 = (char *)((long)&local_528 + lVar2);
local_518 = param_4;
local_50c = param_5;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x187fb3;
lVar8 = _mi_fetch_keypage(param_1,param_2,param_6,3,pcVar14,0);
pbVar12 = local_518;
if (lVar8 != 0) {
iVar6 = 0x970;
if ((param_3 & 1) != 0) {
iVar6 = local_50c;
}
local_520 = param_6;
local_510 = param_3;
*(char **)((long)alStack_550 + lVar2 + 0x18) = &local_4f9;
*(byte **)((long)alStack_550 + lVar2 + 0x10) = &local_4f8;
*(int1 ***)((long)alStack_550 + lVar2 + 8) = &local_508;
pcVar1 = *(code **)(param_2 + 0x40);
*(int8 *)((long)alStack_550 + lVar2) = 0x188010;
iVar4 = (*pcVar1)(param_1,param_2,pcVar14,pbVar12,iVar6,param_3);
iVar6 = 0;
if (*pcVar14 < '\0') {
iVar6 = *(int *)(*param_1 + 0x17c);
}
if (iVar4 == 0) {
pcVar1 = *(code **)(param_2 + 0x48);
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x18811d;
uVar7 = (*pcVar1)(param_2,iVar6,&local_508,&local_4f8);
if (uVar7 == 0) {
lVar8 = -1;
}
else {
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x188138;
lVar8 = _mi_dpos(param_1,0,&local_4f8 + uVar7);
}
pbVar12 = local_518;
if ((*(byte *)(param_2 + 10) & 0x80) == 0) {
param_1[0x34] = lVar8;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x188154;
puVar9 = (int4 *)_my_thread_var();
*puVar9 = 0x79;
goto LAB_0018815a;
}
if ((ulong)local_4f8 == 0xff) {
lVar10 = (ulong)(ushort)(local_4f7._0_2_ << 8 | (ushort)local_4f7._0_2_ >> 8) + 3;
}
else {
lVar10 = (ulong)local_4f8 + 1;
}
if ((int)((uint)(&local_4f8)[lVar10] << 0x18) < 0) {
local_50c = CONCAT13((&local_4f8)[lVar10],
CONCAT12(local_4f7[lVar10],
*(ushort *)(local_4f7 + lVar10 + 1) << 8 |
*(ushort *)(local_4f7 + lVar10 + 1) >> 8));
lVar10 = *param_1 + 0x1a8;
if ((ulong)*local_518 == 0xff) {
lVar11 = (ulong)(ushort)(*(ushort *)(local_518 + 1) << 8 | *(ushort *)(local_518 + 1) >> 8
) + 3;
}
else {
lVar11 = (ulong)*local_518 + 1;
}
pbVar12 = local_518 + lVar11;
local_508 = local_508 + -(ulong)(iVar6 + (uint)*(ushort *)(*param_1 + 0x1ba));
local_528 = lVar8;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x18828e;
iVar5 = _mi_ck_real_write_btree(param_1,lVar10,pbVar12,0,&local_528,4);
lVar8 = local_528;
puVar13 = local_508 + 4;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1882a7;
_mi_dpointer(param_1,puVar13,lVar8);
uVar3 = local_520;
iVar6 = local_50c + -1;
local_508[3] = (char)iVar6;
local_508[2] = (char)((uint)iVar6 >> 8);
local_508[1] = (char)((uint)iVar6 >> 0x10);
*local_508 = (char)((uint)iVar6 >> 0x18);
if (iVar5 == 0) {
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x188300;
iVar5 = _mi_write_keypage(param_1,lVar10,uVar3,3,pcVar14);
}
goto LAB_0018815f;
}
local_510 = 4;
*(char **)((long)alStack_550 + lVar2 + 0x18) = &local_4f9;
*(byte **)((long)alStack_550 + lVar2 + 0x10) = &local_4f8;
*(int1 ***)((long)alStack_550 + lVar2 + 8) = &local_508;
pcVar1 = *(code **)(param_2 + 0x40);
*(int8 *)((long)alStack_550 + lVar2) = 0x1881f6;
iVar4 = (*pcVar1)(param_1,param_2,pcVar14,pbVar12,0x970,4);
}
puVar13 = local_508;
iVar5 = -1;
if (iVar4 == 0x7fffffff) goto LAB_0018815f;
if (local_4f9 == '\0') {
param_10 = '\0';
}
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x188061;
lVar8 = _mi_kpos(iVar6,puVar13);
iVar6 = local_50c;
uVar7 = local_510;
pbVar12 = local_518;
if (lVar8 != -1) {
*(ulong *)((long)alStack_550 + lVar2 + 0x20) = (ulong)(uint)(int)param_10;
*(int8 *)((long)alStack_550 + lVar2 + 0x18) = local_520;
*(int1 **)((long)alStack_550 + lVar2 + 0x10) = local_508;
*(char **)((long)alStack_550 + lVar2 + 8) = pcVar14;
*(int8 *)((long)alStack_550 + lVar2) = 0x1880a6;
iVar5 = w_search(param_1,param_2,uVar7,pbVar12,iVar6,lVar8);
if (iVar5 < 1) goto LAB_0018815f;
}
puVar13 = local_508;
*(ulong *)((long)alStack_550 + lVar2 + 0x20) = (ulong)(uint)(int)param_10;
*(int8 *)((long)alStack_550 + lVar2 + 0x18) = param_9;
*(int8 *)((long)alStack_550 + lVar2 + 0x10) = param_8;
*(int8 *)((long)alStack_550 + lVar2 + 8) = param_7;
*(int8 *)((long)alStack_550 + lVar2) = 0x1880df;
iVar5 = _mi_insert(param_1,param_2,pbVar12,pcVar14,puVar13,&local_4f8);
uVar3 = local_520;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1880ff;
iVar6 = _mi_write_keypage(param_1,param_2,uVar3,3,pcVar14);
if (iVar6 == 0) goto LAB_0018815f;
}
LAB_0018815a:
iVar5 = -1;
LAB_0018815f:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)((long)alStack_550 + lVar2 + 0x20) = _mi_enlarge_root;
__stack_chk_fail();
}
return iVar5;
}
| |
32,513 | std::hash<minja::Value>::operator()(minja::Value const&) const | llama.cpp/common/minja/minja.hpp | size_t operator()(const minja::Value & v) const {
if (!v.is_hashable())
throw std::runtime_error("Unsupported type for hashing: " + v.dump());
return std::hash<json>()(v.get<json>());
} | O3 | cpp | std::hash<minja::Value>::operator()(minja::Value const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
cmpq $0x0, 0x10(%rsi)
jne 0xc7ba6
cmpq $0x0, 0x20(%r14)
jne 0xc7ba6
cmpq $0x0, 0x30(%r14)
jne 0xc7ba6
movq %rsp, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc7c8e
movq %rbx, %rdi
callq 0xc81b5
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x84776
movq %r14, %rdi
callq 0x88e90
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x21630
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb571c
leaq 0x59df3(%rip), %rsi # 0x1219c1
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xaefbc
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x21450
xorl %ebp, %ebp
movq 0x9d3ce(%rip), %rsi # 0x164fc0
movq 0x9d37f(%rip), %rdx # 0x164f78
movq %rbx, %rdi
callq 0x21a50
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc7c1f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21170
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc7c3a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21170
testb %bpl, %bpl
jne 0xc7c64
jmp 0xc7c86
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc7c64
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0xc7c64
movq %rax, %r14
movq %rbx, %rdi
callq 0x21ef0
jmp 0xc7c86
movq %rax, %r14
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x84776
movq %rbx, %rdi
callq 0x88e90
movq %r14, %rdi
callq 0x21af0
| _ZNKSt4hashIN5minja5ValueEEclERKS1_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rsi
cmp qword ptr [rsi+10h], 0
jnz short loc_C7BA6
cmp qword ptr [r14+20h], 0
jnz short loc_C7BA6
cmp qword ptr [r14+30h], 0
jnz short loc_C7BA6
mov rbx, rsp
mov rdi, rbx
mov rsi, r14
call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(void)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rbx, rax
mov r14, rsp
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_C7BA6:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+58h+var_38]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnsupportedTyp; "Unsupported type for hashing: "
mov rdi, rsp
lea rdx, [rsp+58h+var_38]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C7C1F
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C7C1F:
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C7C3A
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C7C3A:
test bpl, bpl
jnz short loc_C7C64
jmp short loc_C7C86
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C7C64
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C7C64
mov r14, rax
loc_C7C64:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_C7C86
mov r14, rax
mov rbx, rsp
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_C7C86:
mov rdi, r14
call __Unwind_Resume
| long long std::hash<minja::Value>::operator()(long long a1, _QWORD *a2)
{
long long v2; // rbx
void *exception; // rbx
_QWORD v5[2]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v6[16]; // [rsp+20h] [rbp-38h] BYREF
if ( a2[2] || a2[4] || a2[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>(v5, (long long)"Unsupported type for hashing: ", (long long)v6);
std::runtime_error::runtime_error(exception, v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
v5,
a2);
v2 = nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(v5);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v5);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v5);
return v2;
}
| operator():
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
CMP qword ptr [RSI + 0x10],0x0
JNZ 0x001c7ba6
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x001c7ba6
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x001c7ba6
MOV RBX,RSP
MOV RDI,RBX
MOV RSI,R14
CALL 0x001c7c8e
LAB_001c7b7a:
MOV RDI,RBX
CALL 0x001c81b5
LAB_001c7b82:
MOV RBX,RAX
MOV R14,RSP
MOV RDI,R14
XOR ESI,ESI
CALL 0x00184776
MOV RDI,R14
CALL 0x00188e90
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_001c7ba6:
MOV EDI,0x10
CALL 0x00121630
MOV RBX,RAX
LAB_001c7bb3:
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b571c
LAB_001c7bc7:
LEA RSI,[0x2219c1]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001aefbc
MOV BPL,0x1
LAB_001c7bde:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00121450
XOR EBP,EBP
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,RBX
CALL 0x00121a50
|
/* std::hash<minja::Value>::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
ulong __thiscall std::hash<minja::Value>::operator()(hash<minja::Value> *this,Value *param_1)
{
ulong uVar1;
runtime_error *this_00;
basic_json abStack_58 [32];
int1 local_38 [32];
if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) &&
(*(long *)(param_1 + 0x30) == 0)) {
minja::Value::
get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
();
/* try { // try from 001c7b7a to 001c7b81 has its CatchHandler @ 001c7c6e */
uVar1 = nlohmann::json_abi_v3_11_3::detail::
hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(abStack_58);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(abStack_58,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)abStack_58);
return uVar1;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001c7bb3 to 001c7bc6 has its CatchHandler @ 001c7c61 */
minja::Value::dump_abi_cxx11_((int)local_38,SUB81(param_1,0));
/* try { // try from 001c7bc7 to 001c7bda has its CatchHandler @ 001c7c41 */
operator+((char *)abStack_58,(string *)"Unsupported type for hashing: ");
/* try { // try from 001c7bde to 001c7c00 has its CatchHandler @ 001c7c01 */
std::runtime_error::runtime_error(this_00,(string *)abStack_58);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
| |
32,514 | tree_search_edge | eloqsql/mysys/tree.c | void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents,
TREE_ELEMENT ***last_pos, int child_offs)
{
TREE_ELEMENT *element= tree->root;
*parents= &null_element;
while (element != &null_element)
{
*++parents= element;
element= ELEMENT_CHILD(element, child_offs);
}
*last_pos= parents;
return **last_pos != &null_element ?
ELEMENT_KEY(tree, **last_pos) : NULL;
} | O3 | c | tree_search_edge:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
leaq 0x2e0996(%rip), %r8 # 0x385bc0
movq %r8, (%rsi)
cmpq %r8, %rax
je 0xa5246
movslq %ecx, %rcx
movq %rax, 0x8(%rsi)
addq $0x8, %rsi
movq (%rax,%rcx), %rax
cmpq %r8, %rax
jne 0xa5235
movq %rsi, (%rdx)
movq (%rsi), %rax
cmpq %r8, %rax
je 0xa5261
movl 0x208(%rdi), %ecx
testq %rcx, %rcx
je 0xa5265
addq %rcx, %rax
jmp 0xa5269
xorl %eax, %eax
jmp 0xa5269
movq 0x18(%rax), %rax
popq %rbp
retq
| tree_search_edge:
push rbp
mov rbp, rsp
mov rax, [rdi]
lea r8, null_element
mov [rsi], r8
cmp rax, r8
jz short loc_A5246
movsxd rcx, ecx
loc_A5235:
mov [rsi+8], rax
add rsi, 8
mov rax, [rax+rcx]
cmp rax, r8
jnz short loc_A5235
loc_A5246:
mov [rdx], rsi
mov rax, [rsi]
cmp rax, r8
jz short loc_A5261
mov ecx, [rdi+208h]
test rcx, rcx
jz short loc_A5265
add rax, rcx
jmp short loc_A5269
loc_A5261:
xor eax, eax
jmp short loc_A5269
loc_A5265:
mov rax, [rax+18h]
loc_A5269:
pop rbp
retn
| char * tree_search_edge(char **a1, _QWORD *a2, _QWORD *a3, int a4)
{
char *v4; // rax
_QWORD *v5; // rax
v4 = *a1;
for ( *a2 = &null_element; v4 != (char *)&null_element; v4 = *(char **)&v4[a4] )
{
a2[1] = v4;
++a2;
}
*a3 = a2;
v5 = (_QWORD *)*a2;
if ( (_UNKNOWN *)*a2 == &null_element )
return 0LL;
if ( *((_DWORD *)a1 + 130) )
return (char *)v5 + *((unsigned int *)a1 + 130);
return (char *)v5[3];
}
| tree_search_edge:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
LEA R8,[0x485bc0]
MOV qword ptr [RSI],R8
CMP RAX,R8
JZ 0x001a5246
MOVSXD RCX,ECX
LAB_001a5235:
MOV qword ptr [RSI + 0x8],RAX
ADD RSI,0x8
MOV RAX,qword ptr [RAX + RCX*0x1]
CMP RAX,R8
JNZ 0x001a5235
LAB_001a5246:
MOV qword ptr [RDX],RSI
MOV RAX,qword ptr [RSI]
CMP RAX,R8
JZ 0x001a5261
MOV ECX,dword ptr [RDI + 0x208]
TEST RCX,RCX
JZ 0x001a5265
ADD RAX,RCX
JMP 0x001a5269
LAB_001a5261:
XOR EAX,EAX
JMP 0x001a5269
LAB_001a5265:
MOV RAX,qword ptr [RAX + 0x18]
LAB_001a5269:
POP RBP
RET
|
int1 * tree_search_edge(long *param_1,long *param_2,int8 *param_3,int param_4)
{
int1 *puVar1;
puVar1 = (int1 *)*param_1;
*param_2 = (long)null_element;
if (puVar1 != null_element) {
do {
param_2[1] = (long)puVar1;
param_2 = param_2 + 1;
puVar1 = *(int1 **)(puVar1 + param_4);
} while (puVar1 != null_element);
}
*param_3 = param_2;
puVar1 = (int1 *)*param_2;
if (puVar1 == null_element) {
puVar1 = (int1 *)0x0;
}
else if ((ulong)*(uint *)(param_1 + 0x41) == 0) {
puVar1 = *(int1 **)(puVar1 + 0x18);
}
else {
puVar1 = puVar1 + *(uint *)(param_1 + 0x41);
}
return puVar1;
}
| |
32,515 | bitmap_test_and_clear | eloqsql/mysys/my_bitmap.c | my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit)
{
my_bool res;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(bitmap_bit < map->n_bits);
bitmap_lock(map);
res= bitmap_fast_test_and_clear(map, bitmap_bit);
bitmap_unlock(map);
return res;
} | O3 | c | bitmap_test_and_clear:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x9cfaa
cmpq $0x0, 0x40(%rdi)
jne 0x9cffd
callq 0x29220
movq (%rbx), %rax
movl %r14d, %edx
andb $0x7, %r14b
movl $0x1, %r15d
movl %r14d, %ecx
shll %cl, %r15d
shrl $0x3, %edx
movb (%rax,%rdx), %r14b
movl %r15d, %ecx
notb %cl
andb %r14b, %cl
movb %cl, (%rax,%rdx)
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
je 0x9cfec
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x9d010
movq %rbx, %rdi
callq 0x291e0
andb %r15b, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3f0a0(%rip), %rsi # 0xdc0a4
movl $0x81, %edx
callq 0x2eb8f
jmp 0x9cfaa
leaq 0x2e8ff9(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x9cfe4
| bitmap_test_and_clear:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, esi
mov rbx, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz short loc_9CFAA
cmp qword ptr [rdi+40h], 0
jnz short loc_9CFFD
call _pthread_mutex_lock
loc_9CFAA:
mov rax, [rbx]
mov edx, r14d
and r14b, 7
mov r15d, 1
mov ecx, r14d
shl r15d, cl
shr edx, 3
mov r14b, [rax+rdx]
mov ecx, r15d
not cl
and cl, r14b
mov [rax+rdx], cl
mov rbx, [rbx+10h]
test rbx, rbx
jz short loc_9CFEC
mov rdi, [rbx+40h]
test rdi, rdi
jnz short loc_9D010
loc_9CFE4:
mov rdi, rbx
call _pthread_mutex_unlock
loc_9CFEC:
and r14b, r15b
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_9CFFD:
lea rsi, aWorkspaceLlm4b_40; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 81h
call psi_mutex_lock
jmp short loc_9CFAA
loc_9D010:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_9CFE4
| long long bitmap_test_and_clear(_QWORD *a1, unsigned int a2)
{
unsigned int v2; // r14d
long long v4; // rdi
int v5; // r15d
long long v6; // rdx
long long v7; // rbx
long long v8; // rdi
v2 = a2;
v4 = a1[2];
if ( v4 )
{
if ( *(_QWORD *)(v4 + 64) )
psi_mutex_lock(v4, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c", 0x81u);
else
pthread_mutex_lock(v4);
}
v5 = 1 << (a2 & 7);
v6 = a2 >> 3;
LOBYTE(v2) = *(_BYTE *)(*a1 + v6);
*(_BYTE *)(*a1 + v6) = v2 & ~(_BYTE)v5;
v7 = a1[2];
if ( v7 )
{
v8 = *(_QWORD *)(v7 + 64);
if ( v8 )
((void ( *)(long long))PSI_server[44])(v8);
pthread_mutex_unlock(v7);
}
LOBYTE(v2) = v5 & v2;
return v2;
}
| bitmap_test_and_clear:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,ESI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x0019cfaa
CMP qword ptr [RDI + 0x40],0x0
JNZ 0x0019cffd
CALL 0x00129220
LAB_0019cfaa:
MOV RAX,qword ptr [RBX]
MOV EDX,R14D
AND R14B,0x7
MOV R15D,0x1
MOV ECX,R14D
SHL R15D,CL
SHR EDX,0x3
MOV R14B,byte ptr [RAX + RDX*0x1]
MOV ECX,R15D
NOT CL
AND CL,R14B
MOV byte ptr [RAX + RDX*0x1],CL
MOV RBX,qword ptr [RBX + 0x10]
TEST RBX,RBX
JZ 0x0019cfec
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x0019d010
LAB_0019cfe4:
MOV RDI,RBX
CALL 0x001291e0
LAB_0019cfec:
AND R14B,R15B
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0019cffd:
LEA RSI,[0x1dc0a4]
MOV EDX,0x81
CALL 0x0012eb8f
JMP 0x0019cfaa
LAB_0019d010:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0019cfe4
|
int8 bitmap_test_and_clear(long *param_1,uint param_2)
{
byte bVar1;
pthread_mutex_t *ppVar2;
byte bVar3;
ppVar2 = (pthread_mutex_t *)param_1[2];
if (ppVar2 != (pthread_mutex_t *)0x0) {
if (*(long *)((long)ppVar2 + 0x40) == 0) {
pthread_mutex_lock(ppVar2);
}
else {
psi_mutex_lock(ppVar2,"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c",0x81);
}
}
bVar1 = *(byte *)(*param_1 + (ulong)(param_2 >> 3));
bVar3 = (byte)(1 << (sbyte)((ulong)param_2 & 0xffffffffffffff07));
*(byte *)(*param_1 + (ulong)(param_2 >> 3)) = ~bVar3 & bVar1;
ppVar2 = (pthread_mutex_t *)param_1[2];
if (ppVar2 != (pthread_mutex_t *)0x0) {
if (*(long *)((long)ppVar2 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar2);
}
return CONCAT71((int7)(((ulong)param_2 & 0xffffffffffffff07) >> 8),bVar1 & bVar3);
}
| |
32,516 | 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>::size() const | monkey531[P]llama/common/json.hpp | size_type size() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
{
// null values are empty
return 0;
}
case value_t::array:
{
// delegate call to array_t::size()
return m_data.m_value.array->size();
}
case value_t::object:
{
// delegate call to object_t::size()
return m_data.m_value.object->size();
}
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:
{
// all other types have size 1
return 1;
}
}
} | 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>::size() const:
movzbl (%rdi), %eax
testl %eax, %eax
je 0x614ea
cmpl $0x1, %eax
je 0x614c7
cmpl $0x2, %eax
jne 0x614e5
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x4, %rax
retq
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
retq
movl $0x1, %eax
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv:
movzx eax, byte ptr [rdi]
test eax, eax
jz short locret_614EA
cmp eax, 1
jz short loc_614C7
cmp eax, 2
jnz short loc_614E5
mov rcx, [rdi+8]
mov rax, [rcx+8]
sub rax, [rcx]
sar rax, 4
retn
loc_614C7:
mov rax, [rdi+8]
mov rcx, [rax+8]
sub rcx, [rax]
sar rcx, 4
mov rax, 0AAAAAAAAAAAAAAABh
imul rax, rcx
retn
loc_614E5:
mov eax, 1
locret_614EA:
retn
| 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>::size(
unsigned __int8 *a1)
{
long long result; // rax
result = *a1;
if ( *a1 )
{
if ( (_DWORD)result == 1 )
{
return 0xAAAAAAAAAAAAAAABLL * ((long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4);
}
else if ( (_DWORD)result == 2 )
{
return (long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4;
}
else
{
return 1LL;
}
}
return result;
}
| size:
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x001614ea
CMP EAX,0x1
JZ 0x001614c7
CMP EAX,0x2
JNZ 0x001614e5
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
SAR RAX,0x4
RET
LAB_001614c7:
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,qword ptr [RAX]
SAR RCX,0x4
MOV RAX,-0x5555555555555555
IMUL RAX,RCX
RET
LAB_001614e5:
MOV EAX,0x1
LAB_001614ea:
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>::size() const */
ulong __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>
::size(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)
{
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>
bVar1;
ulong uVar2;
bVar1 = *this;
uVar2 = (ulong)(byte)bVar1;
if (bVar1 != (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) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
return ((*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4) * -0x5555555555555555;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4;
}
uVar2 = 1;
}
return uVar2;
}
| |
32,517 | 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));
} | 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>::operator[](unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb (%rdi), %al
testb %al, %al
jne 0xafbc2
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1b8f0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x6b800
movb (%r14), %al
cmpb $0x2, %al
jne 0xafc0d
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rbx, %rcx
ja 0xafbfa
leaq 0x1(%rbx), %rsi
callq 0xafe80
movq %r14, %rdi
movl $0x1, %esi
callq 0x6b800
movq 0x8(%r14), %rax
movq (%rax), %rax
shlq $0x4, %rbx
addq %rax, %rbx
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
movq %r14, %rdi
callq 0x71c06
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x46357(%rip), %rsi # 0xf5f88
leaq 0x10(%rsp), %rdi
callq 0xa6933
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x719ae
xorl %ebp, %ebp
leaq 0x7f554(%rip), %rsi # 0x12f1b0
leaq -0x41e0b(%rip), %rdx # 0x6de58
movq %rbx, %rdi
callq 0x1bf60
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xafc89
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b910
testb %bpl, %bpl
jne 0xafc93
jmp 0xafc9b
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bff0
nop
| _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
mov al, [rdi]
test al, al
jnz short loc_AFBC2
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)
mov al, [r14]
loc_AFBC2:
cmp al, 2
jnz short loc_AFC0D
mov rdi, [r14+8]
mov rax, [rdi]
mov rcx, [rdi+8]
sub rcx, rax
sar rcx, 4
cmp rcx, rbx
ja short loc_AFBFA
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)
mov rax, [r14+8]
mov rax, [rax]
loc_AFBFA:
shl rbx, 4
add rbx, rax
mov rax, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_AFC0D:
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_AFC89
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AFC89:
test bpl, bpl
jnz short loc_AFC93
jmp short loc_AFC9B
mov r14, rax
loc_AFC93:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_AFC9B:
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)
{
char v3; // al
long long v4; // rax
long long *v5; // rdi
long long v6; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v9; // [rsp+8h] [rbp-40h] BYREF
_QWORD v10[2]; // [rsp+10h] [rbp-38h] BYREF
v3 = *(_BYTE *)a1;
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 2;
v4 = operator new(0x18uLL);
*(_OWORD *)v4 = 0LL;
*(_QWORD *)(v4 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = 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>::assert_invariant((char *)a1);
v3 = *(_BYTE *)a1;
}
if ( v3 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9 = 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)v10,
(long long)"cannot use operator[] with a numeric argument with ",
&v9);
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,
v10);
__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);
}
v5 = *(long long **)(a1 + 8);
v6 = *v5;
if ( (v5[1] - *v5) >> 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(
v5,
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);
v6 = **(_QWORD **)(a1 + 8);
}
return v6 + 16 * a2;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOV AL,byte ptr [RDI]
TEST AL,AL
JNZ 0x001afbc2
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011b8f0
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 0x0016b800
MOV AL,byte ptr [R14]
LAB_001afbc2:
CMP AL,0x2
JNZ 0x001afc0d
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
SUB RCX,RAX
SAR RCX,0x4
CMP RCX,RBX
JA 0x001afbfa
LEA RSI,[RBX + 0x1]
CALL 0x001afe80
MOV RDI,R14
MOV ESI,0x1
CALL 0x0016b800
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX]
LAB_001afbfa:
SHL RBX,0x4
ADD RBX,RAX
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001afc0d:
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
MOV RDI,R14
CALL 0x00171c06
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001afc2a:
LEA RSI,[0x1f5f88]
LEA RDI,[RSP + 0x10]
CALL 0x001a6933
MOV BPL,0x1
LAB_001afc3e:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x001719ae
XOR EBP,EBP
LEA RSI,[0x22f1b0]
LEA RDX,[0x16de58]
MOV RDI,RBX
CALL 0x0011bf60
|
/* 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;
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>
bVar1;
int8 *puVar2;
long lVar3;
int8 uVar4;
char *local_40;
detail local_38 [32];
bVar1 = *this;
if (bVar1 == (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;
puVar2 = (int8 *)operator_new(0x18);
*puVar2 = 0;
puVar2[1] = 0;
puVar2[2] = 0;
*(int8 **)(this + 8) = puVar2;
assert_invariant(SUB81(this,0));
bVar1 = *this;
}
if (bVar1 == (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);
lVar3 = *(long *)this_00;
if ((ulong)(*(long *)(this_00 + 8) - lVar3 >> 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));
lVar3 = **(long **)(this + 8);
}
return param_1 * 0x10 + lVar3;
}
uVar4 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001afc2a to 001afc3a has its CatchHandler @ 001afc90 */
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 001afc3e to 001afc6a has its CatchHandler @ 001afc6b */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
32,518 | lshift | eloqsql/strings/dtoa.c | static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc)
{
int i, k1, n, n1;
Bigint *b1;
ULong *x, *x1, *xe, z;
n= k >> 5;
k1= b->k;
n1= n + b->wds + 1;
for (i= b->maxwds; n1 > i; i<<= 1)
k1++;
b1= Balloc(k1, alloc);
x1= b1->p.x;
for (i= 0; i < n; i++)
*x1++= 0;
x= b->p.x;
xe= x + b->wds;
if (k&= 0x1f)
{
k1= 32 - k;
z= 0;
do
{
*x1++= *x << k | z;
z= *x++ >> k1;
}
while (x < xe);
if ((*x1= z))
++n1;
}
else
do
*x1++= *x++;
while (x < xe);
b1->wds= n1 - 1;
Bfree(b, alloc);
return b1;
} | O3 | c | lshift:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r15d
movq %rdi, %r14
movl %esi, %r12d
shrl $0x5, %r12d
movl 0x8(%rdi), %edi
movl 0xc(%r14), %eax
movl 0x14(%r14), %ebx
addl %r12d, %ebx
cmpl %eax, %ebx
jl 0xdbeed
incl %edi
addl %eax, %eax
jmp 0xdbee3
movq %rdx, -0x38(%rbp)
movq %rdx, %rsi
callq 0xdba90
movq (%rax), %r13
cmpl $0x20, %r15d
jb 0xdbf24
decl %r12d
leaq 0x4(,%r12,4), %rdx
movq %r13, %rdi
xorl %esi, %esi
movq %rax, -0x30(%rbp)
callq 0x2a2c0
movq -0x30(%rbp), %rax
leaq 0x4(%r13,%r12,4), %r13
movq (%r14), %rdx
movslq 0x14(%r14), %rcx
leaq (%rdx,%rcx,4), %rsi
andl $0x1f, %r15d
je 0xdbf70
movl $0x20, %r9d
subl %r15d, %r9d
xorl %edi, %edi
movl (%rdx), %r8d
movl %r15d, %ecx
shll %cl, %r8d
orl %edi, %r8d
movl %r8d, (%r13)
addq $0x4, %r13
movl (%rdx), %edi
addq $0x4, %rdx
movl %r9d, %ecx
shrl %cl, %edi
cmpq %rsi, %rdx
jb 0xdbf40
movl %edi, (%r13)
cmpl $0x1, %edi
sbbl $-0x1, %ebx
jmp 0xdbf83
movl (%rdx), %ecx
addq $0x4, %rdx
movl %ecx, (%r13)
addq $0x4, %r13
cmpq %rsi, %rdx
jb 0xdbf70
movl %ebx, 0x14(%rax)
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rbx
callq 0xdbe89
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| lshift:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15d, esi
mov r14, rdi
mov r12d, esi
shr r12d, 5
mov edi, [rdi+8]
mov eax, [r14+0Ch]
mov ebx, [r14+14h]
add ebx, r12d
loc_DBEE3:
cmp ebx, eax
jl short loc_DBEED
inc edi
add eax, eax
jmp short loc_DBEE3
loc_DBEED:
mov [rbp+var_38], rdx
mov rsi, rdx
call Balloc
mov r13, [rax]
cmp r15d, 20h ; ' '
jb short loc_DBF24
dec r12d
lea rdx, ds:4[r12*4]
mov rdi, r13
xor esi, esi
mov [rbp+var_30], rax
call _memset
mov rax, [rbp+var_30]
lea r13, [r13+r12*4+4]
loc_DBF24:
mov rdx, [r14]
movsxd rcx, dword ptr [r14+14h]
lea rsi, [rdx+rcx*4]
and r15d, 1Fh
jz short loc_DBF70
mov r9d, 20h ; ' '
sub r9d, r15d
xor edi, edi
loc_DBF40:
mov r8d, [rdx]
mov ecx, r15d
shl r8d, cl
or r8d, edi
mov [r13+0], r8d
add r13, 4
mov edi, [rdx]
add rdx, 4
mov ecx, r9d
shr edi, cl
cmp rdx, rsi
jb short loc_DBF40
mov [r13+0], edi
cmp edi, 1
sbb ebx, 0FFFFFFFFh
jmp short loc_DBF83
loc_DBF70:
mov ecx, [rdx]
add rdx, 4
mov [r13+0], ecx
add r13, 4
cmp rdx, rsi
jb short loc_DBF70
loc_DBF83:
mov [rax+14h], ebx
mov rdi, r14
mov rsi, [rbp+var_38]
mov rbx, rax
call Bfree
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long lshift(unsigned long long a1, unsigned int a2, unsigned long long *a3)
{
char v3; // r15
int v5; // edi
int v6; // eax
int v7; // ebx
long long v8; // rax
int *v9; // r13
long long v10; // r12
int *v11; // rdx
unsigned long long v12; // rsi
int v13; // r15d
int v14; // edi
unsigned int v15; // edi
int v16; // ecx
long long v17; // rbx
long long v20; // [rsp+10h] [rbp-30h]
v3 = a2;
v5 = *(_DWORD *)(a1 + 8);
v6 = *(_DWORD *)(a1 + 12);
v7 = (a2 >> 5) + *(_DWORD *)(a1 + 20);
while ( v7 >= v6 )
{
++v5;
v6 *= 2;
}
v8 = Balloc(v5, (long long)a3);
v9 = *(int **)v8;
if ( a2 >= 0x20 )
{
v10 = (a2 >> 5) - 1;
v20 = v8;
memset(*(_QWORD *)v8, 0LL, 4 * v10 + 4);
v8 = v20;
v9 += v10 + 1;
}
v11 = *(int **)a1;
v12 = *(_QWORD *)a1 + 4LL * *(int *)(a1 + 20);
v13 = v3 & 0x1F;
if ( v13 )
{
v14 = 0;
do
{
*v9++ = v14 | (*v11 << v13);
v15 = *v11++;
v14 = v15 >> (32 - v13);
}
while ( (unsigned long long)v11 < v12 );
*v9 = v14;
v7 -= (v14 == 0) - 1;
}
else
{
do
{
v16 = *v11++;
*v9++ = v16;
}
while ( (unsigned long long)v11 < v12 );
}
*(_DWORD *)(v8 + 20) = v7;
v17 = v8;
Bfree(a1, a3);
return v17;
}
| lshift:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15D,ESI
MOV R14,RDI
MOV R12D,ESI
SHR R12D,0x5
MOV EDI,dword ptr [RDI + 0x8]
MOV EAX,dword ptr [R14 + 0xc]
MOV EBX,dword ptr [R14 + 0x14]
ADD EBX,R12D
LAB_001dbee3:
CMP EBX,EAX
JL 0x001dbeed
INC EDI
ADD EAX,EAX
JMP 0x001dbee3
LAB_001dbeed:
MOV qword ptr [RBP + -0x38],RDX
MOV RSI,RDX
CALL 0x001dba90
MOV R13,qword ptr [RAX]
CMP R15D,0x20
JC 0x001dbf24
DEC R12D
LEA RDX,[0x4 + R12*0x4]
MOV RDI,R13
XOR ESI,ESI
MOV qword ptr [RBP + -0x30],RAX
CALL 0x0012a2c0
MOV RAX,qword ptr [RBP + -0x30]
LEA R13,[R13 + R12*0x4 + 0x4]
LAB_001dbf24:
MOV RDX,qword ptr [R14]
MOVSXD RCX,dword ptr [R14 + 0x14]
LEA RSI,[RDX + RCX*0x4]
AND R15D,0x1f
JZ 0x001dbf70
MOV R9D,0x20
SUB R9D,R15D
XOR EDI,EDI
LAB_001dbf40:
MOV R8D,dword ptr [RDX]
MOV ECX,R15D
SHL R8D,CL
OR R8D,EDI
MOV dword ptr [R13],R8D
ADD R13,0x4
MOV EDI,dword ptr [RDX]
ADD RDX,0x4
MOV ECX,R9D
SHR EDI,CL
CMP RDX,RSI
JC 0x001dbf40
MOV dword ptr [R13],EDI
CMP EDI,0x1
SBB EBX,-0x1
JMP 0x001dbf83
LAB_001dbf70:
MOV ECX,dword ptr [RDX]
ADD RDX,0x4
MOV dword ptr [R13],ECX
ADD R13,0x4
CMP RDX,RSI
JC 0x001dbf70
LAB_001dbf83:
MOV dword ptr [RAX + 0x14],EBX
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV RBX,RAX
CALL 0x001dbe89
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 * lshift(int8 *param_1,uint param_2,int8 param_3)
{
uint *puVar1;
sbyte sVar2;
int iVar3;
int8 *puVar4;
uint *puVar5;
int iVar6;
uint uVar7;
ulong uVar8;
uint *__s;
iVar6 = *(int *)((long)param_1 + 0x14) + (param_2 >> 5);
for (iVar3 = *(int *)((long)param_1 + 0xc); iVar3 <= iVar6; iVar3 = iVar3 * 2) {
}
puVar4 = (int8 *)Balloc();
__s = (uint *)*puVar4;
if (0x1f < param_2) {
uVar8 = (ulong)((param_2 >> 5) - 1);
memset(__s,0,uVar8 * 4 + 4);
__s = __s + uVar8 + 1;
}
puVar5 = (uint *)*param_1;
puVar1 = puVar5 + *(int *)((long)param_1 + 0x14);
if ((param_2 & 0x1f) == 0) {
do {
uVar7 = *puVar5;
puVar5 = puVar5 + 1;
*__s = uVar7;
__s = __s + 1;
} while (puVar5 < puVar1);
}
else {
sVar2 = (sbyte)(param_2 & 0x1f);
uVar7 = 0;
do {
*__s = *puVar5 << sVar2 | uVar7;
__s = __s + 1;
uVar7 = *puVar5;
puVar5 = puVar5 + 1;
uVar7 = uVar7 >> (0x20U - sVar2 & 0x1f);
} while (puVar5 < puVar1);
*__s = uVar7;
iVar6 = (iVar6 + 1) - (uint)(uVar7 == 0);
}
*(int *)((long)puVar4 + 0x14) = iVar6;
Bfree(param_1,param_3);
return puVar4;
}
| |
32,519 | gguf_get_val_i16 | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | int16_t gguf_get_val_i16(const struct gguf_context * ctx, int64_t key_id) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
GGML_ASSERT(ctx->kv[key_id].get_ne() == 1);
return ctx->kv[key_id].get_val<int16_t>();
} | O1 | cpp | gguf_get_val_i16:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
js 0x3ee85
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movq 0x10(%r14), %rax
subq %rdi, %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %r15 # imm = 0x2E8BA2E8BA2E8BA3
imulq %r15, %rax
cmpq %rsi, %rax
jle 0x3ee85
movq 0x10(%r14), %rax
subq %rdi, %rax
sarq $0x3, %rax
imulq %r15, %rax
cmpq %rbx, %rax
jbe 0x3ee7b
imulq $0x58, %rbx, %r12
addq %r12, %rdi
callq 0x17610
cmpq $0x1, %rax
jne 0x3eea1
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rax
subq %rdi, %rax
sarq $0x3, %rax
imulq %r15, %rax
cmpq %rbx, %rax
jbe 0x3ee80
addq %r12, %rdi
xorl %esi, %esi
callq 0x18a10
movzwl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x19bb1
callq 0x19bd1
leaq 0x1e161(%rip), %rdi # 0x5cfed
leaq 0xd72e(%rip), %rdx # 0x4c5c1
leaq 0x1e5c9(%rip), %rcx # 0x5d463
movl $0x331, %esi # imm = 0x331
jmp 0x3eebb
leaq 0x1e145(%rip), %rdi # 0x5cfed
leaq 0xd712(%rip), %rdx # 0x4c5c1
leaq 0x1e67c(%rip), %rcx # 0x5d532
movl $0x332, %esi # imm = 0x332
xorl %eax, %eax
callq 0x18ce0
| gguf_get_val_i16:
push r15
push r14
push r12
push rbx
push rax
test rsi, rsi
js loc_3EE85
mov rbx, rsi
mov r14, rdi
mov rdi, [rdi+8]
mov rax, [r14+10h]
sub rax, rdi
sar rax, 3
mov r15, 2E8BA2E8BA2E8BA3h
imul rax, r15
cmp rax, rsi
jle short loc_3EE85
mov rax, [r14+10h]
sub rax, rdi
sar rax, 3
imul rax, r15
cmp rax, rbx
jbe short loc_3EE7B
imul r12, rbx, 58h ; 'X'
add rdi, r12; this
call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void)
cmp rax, 1
jnz short loc_3EEA1
mov rdi, [r14+8]
mov rax, [r14+10h]
sub rax, rdi
sar rax, 3
imul rax, r15
cmp rax, rbx
jbe short loc_3EE80
add rdi, r12
xor esi, esi
call __ZNK7gguf_kv7get_valIsEERKT_m; gguf_kv::get_val<short>(ulong)
movzx eax, word ptr [rax]
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_3EE7B:
call gguf_get_val_i16_cold_1
loc_3EE80:
call gguf_get_val_i16_cold_2
loc_3EE85:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"...
mov esi, 331h
jmp short loc_3EEBB
loc_3EEA1:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCtxKvKeyIdGetN; "ctx->kv[key_id].get_ne() == 1"
mov esi, 332h
loc_3EEBB:
xor eax, eax
call _ggml_abort
| long long gguf_get_val_i16(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long v7; // rdi
long long v8; // rdi
const char *v10; // rcx
int v11; // esi
if ( a2 < 0 || (v7 = *(_QWORD *)(a1 + 8), 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v7) >> 3) <= a2) )
{
v10 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
v11 = 817;
goto LABEL_11;
}
if ( 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v7) >> 3) <= (unsigned long long)a2 )
gguf_get_val_i16_cold_1(v7);
if ( gguf_kv::get_ne((gguf_kv *)(88 * a2 + v7)) != 1 )
{
v10 = "ctx->kv[key_id].get_ne() == 1";
v11 = 818;
LABEL_11:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
v11,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v10,
a5,
a6);
}
v8 = *(_QWORD *)(a1 + 8);
if ( 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v8) >> 3) <= (unsigned long long)a2 )
gguf_get_val_i16_cold_2(v8);
return *(unsigned __int16 *)gguf_kv::get_val<short>(88 * a2 + v8, 0LL);
}
| gguf_get_val_i16:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
TEST RSI,RSI
JS 0x0013ee85
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [R14 + 0x10]
SUB RAX,RDI
SAR RAX,0x3
MOV R15,0x2e8ba2e8ba2e8ba3
IMUL RAX,R15
CMP RAX,RSI
JLE 0x0013ee85
MOV RAX,qword ptr [R14 + 0x10]
SUB RAX,RDI
SAR RAX,0x3
IMUL RAX,R15
CMP RAX,RBX
JBE 0x0013ee7b
IMUL R12,RBX,0x58
ADD RDI,R12
CALL 0x00117610
CMP RAX,0x1
JNZ 0x0013eea1
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [R14 + 0x10]
SUB RAX,RDI
SAR RAX,0x3
IMUL RAX,R15
CMP RAX,RBX
JBE 0x0013ee80
ADD RDI,R12
XOR ESI,ESI
CALL 0x00118a10
MOVZX EAX,word ptr [RAX]
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0013ee7b:
CALL 0x00119bb1
LAB_0013ee80:
CALL 0x00119bd1
LAB_0013ee85:
LEA RDI,[0x15cfed]
LEA RDX,[0x14c5c1]
LEA RCX,[0x15d463]
MOV ESI,0x331
JMP 0x0013eebb
LAB_0013eea1:
LEA RDI,[0x15cfed]
LEA RDX,[0x14c5c1]
LEA RCX,[0x15d532]
MOV ESI,0x332
LAB_0013eebb:
XOR EAX,EAX
CALL 0x00118ce0
|
short gguf_get_val_i16(long param_1,ulong param_2)
{
long lVar1;
ulong uVar2;
long lVar3;
short *psVar4;
char *pcVar5;
int8 uVar6;
if ((-1 < (long)param_2) &&
(lVar3 = *(long *)(param_1 + 8),
lVar1 = (*(long *)(param_1 + 0x10) - lVar3 >> 3) * 0x2e8ba2e8ba2e8ba3,
lVar1 - param_2 != 0 && (long)param_2 <= lVar1)) {
uVar2 = (*(long *)(param_1 + 0x10) - lVar3 >> 3) * 0x2e8ba2e8ba2e8ba3;
if (uVar2 < param_2 || uVar2 - param_2 == 0) {
gguf_get_val_i16_cold_1();
}
else {
lVar3 = gguf_kv::get_ne((gguf_kv *)(lVar3 + param_2 * 0x58));
if (lVar3 != 1) {
pcVar5 = "ctx->kv[key_id].get_ne() == 1";
uVar6 = 0x332;
goto LAB_0013eebb;
}
uVar2 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3;
if (param_2 <= uVar2 && uVar2 - param_2 != 0) {
psVar4 = gguf_kv::get_val<short>((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58),0);
return *psVar4;
}
}
gguf_get_val_i16_cold_2();
}
pcVar5 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
uVar6 = 0x331;
LAB_0013eebb:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
uVar6,"GGML_ASSERT(%s) failed",pcVar5);
}
| |
32,520 | gguf_get_val_i16 | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | int16_t gguf_get_val_i16(const struct gguf_context * ctx, int64_t key_id) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
GGML_ASSERT(ctx->kv[key_id].get_ne() == 1);
return ctx->kv[key_id].get_val<int16_t>();
} | O3 | cpp | gguf_get_val_i16:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
js 0x3e661
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movq 0x10(%r14), %rax
subq %rdi, %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %r15 # imm = 0x2E8BA2E8BA2E8BA3
imulq %r15, %rax
cmpq %rsi, %rax
jle 0x3e661
imulq $0x58, %rbx, %r12
addq %r12, %rdi
callq 0x16610
cmpq $0x1, %rax
jne 0x3e67d
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rax
subq %rdi, %rax
sarq $0x3, %rax
imulq %r15, %rax
cmpq %rbx, %rax
jbe 0x3e65c
addq %r12, %rdi
xorl %esi, %esi
callq 0x17a00
movzwl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x18a28
leaq 0x1ee75(%rip), %rdi # 0x5d4dd
leaq 0xdff6(%rip), %rdx # 0x4c665
leaq 0x1f2dd(%rip), %rcx # 0x5d953
movl $0x331, %esi # imm = 0x331
jmp 0x3e697
leaq 0x1ee59(%rip), %rdi # 0x5d4dd
leaq 0xdfda(%rip), %rdx # 0x4c665
leaq 0x1f390(%rip), %rcx # 0x5da22
movl $0x332, %esi # imm = 0x332
xorl %eax, %eax
callq 0x17cd0
| gguf_get_val_i16:
push r15
push r14
push r12
push rbx
push rax
test rsi, rsi
js short loc_3E661
mov rbx, rsi
mov r14, rdi
mov rdi, [rdi+8]
mov rax, [r14+10h]
sub rax, rdi
sar rax, 3
mov r15, 2E8BA2E8BA2E8BA3h
imul rax, r15
cmp rax, rsi
jle short loc_3E661
imul r12, rbx, 58h ; 'X'
add rdi, r12; this
call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void)
cmp rax, 1
jnz short loc_3E67D
mov rdi, [r14+8]
mov rax, [r14+10h]
sub rax, rdi
sar rax, 3
imul rax, r15
cmp rax, rbx
jbe short loc_3E65C
add rdi, r12
xor esi, esi
call __ZNK7gguf_kv7get_valIsEERKT_m; gguf_kv::get_val<short>(ulong)
movzx eax, word ptr [rax]
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_3E65C:
call gguf_get_val_i16_cold_1
loc_3E661:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"...
mov esi, 331h
jmp short loc_3E697
loc_3E67D:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCtxKvKeyIdGetN; "ctx->kv[key_id].get_ne() == 1"
mov esi, 332h
loc_3E697:
xor eax, eax
call _ggml_abort
| long long gguf_get_val_i16(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long v7; // rdi
long long v8; // rdi
const char *v10; // rcx
int v11; // esi
if ( a2 < 0 || (v7 = *(_QWORD *)(a1 + 8), 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v7) >> 3) <= a2) )
{
v10 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
v11 = 817;
goto LABEL_9;
}
if ( gguf_kv::get_ne((gguf_kv *)(88 * a2 + v7)) != 1 )
{
v10 = "ctx->kv[key_id].get_ne() == 1";
v11 = 818;
LABEL_9:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
v11,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v10,
a5,
a6);
}
v8 = *(_QWORD *)(a1 + 8);
if ( 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v8) >> 3) <= (unsigned long long)a2 )
gguf_get_val_i16_cold_1(v8);
return *(unsigned __int16 *)gguf_kv::get_val<short>(88 * a2 + v8, 0LL);
}
| gguf_get_val_i16:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
TEST RSI,RSI
JS 0x0013e661
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [R14 + 0x10]
SUB RAX,RDI
SAR RAX,0x3
MOV R15,0x2e8ba2e8ba2e8ba3
IMUL RAX,R15
CMP RAX,RSI
JLE 0x0013e661
IMUL R12,RBX,0x58
ADD RDI,R12
CALL 0x00116610
CMP RAX,0x1
JNZ 0x0013e67d
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [R14 + 0x10]
SUB RAX,RDI
SAR RAX,0x3
IMUL RAX,R15
CMP RAX,RBX
JBE 0x0013e65c
ADD RDI,R12
XOR ESI,ESI
CALL 0x00117a00
MOVZX EAX,word ptr [RAX]
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0013e65c:
CALL 0x00118a28
LAB_0013e661:
LEA RDI,[0x15d4dd]
LEA RDX,[0x14c665]
LEA RCX,[0x15d953]
MOV ESI,0x331
JMP 0x0013e697
LAB_0013e67d:
LEA RDI,[0x15d4dd]
LEA RDX,[0x14c665]
LEA RCX,[0x15da22]
MOV ESI,0x332
LAB_0013e697:
XOR EAX,EAX
CALL 0x00117cd0
|
short gguf_get_val_i16(long param_1,ulong param_2)
{
long lVar1;
ulong uVar2;
short *psVar3;
char *pcVar4;
int8 uVar5;
if ((-1 < (long)param_2) &&
(lVar1 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3,
lVar1 - param_2 != 0 && (long)param_2 <= lVar1)) {
lVar1 = gguf_kv::get_ne((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58));
if (lVar1 != 1) {
pcVar4 = "ctx->kv[key_id].get_ne() == 1";
uVar5 = 0x332;
goto LAB_0013e697;
}
uVar2 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3;
if (param_2 <= uVar2 && uVar2 - param_2 != 0) {
psVar3 = gguf_kv::get_val<short>((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58),0);
return *psVar3;
}
gguf_get_val_i16_cold_1();
}
pcVar4 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
uVar5 = 0x331;
LAB_0013e697:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
uVar5,"GGML_ASSERT(%s) failed",pcVar4);
}
| |
32,521 | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool) | monkey531[P]llama/common/sampling.cpp | std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const std::vector<int> & idxs, const llama_tokens & draft, bool grammar_first) {
GGML_ASSERT(idxs.size() == draft.size() + 1 && "idxs.size() must be draft.size() + 1");
std::vector<llama_token> result;
result.reserve(idxs.size());
size_t i = 0;
for (; i < draft.size(); i++) {
const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first);
common_sampler_accept(gsmpl, id, true);
result.push_back(id);
if (draft[i] != id) {
break;
}
}
if (i == draft.size()) {
const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first);
common_sampler_accept(gsmpl, id, true);
result.push_back(id);
}
return result;
} | O3 | cpp | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
movq 0x8(%r8), %rax
subq (%r8), %rax
sarq $0x2, %rsi
sarq $0x2, %rax
incq %rax
cmpq %rax, %rsi
jne 0xd2607
movl %r9d, %ebp
movq %r8, %r13
movq %rcx, %r12
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0xd3544
movq 0x8(%r13), %rax
movzbl %bpl, %ebp
cmpq (%r13), %rax
je 0xd2594
xorl %r15d, %r15d
movq (%r12), %rax
movl (%rax,%r15,4), %edx
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %ecx
callq 0xd2360
movl %eax, 0x8(%rsp)
movq %r14, %rdi
movl %eax, %esi
movl $0x1, %edx
callq 0xd21a7
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xd2561
movl 0x8(%rsp), %edx
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xd2572
movq %rbx, %rdi
leaq 0x8(%rsp), %rdx
callq 0x26caa
movl 0x8(%rsp), %edx
movq (%r13), %rax
movq 0x8(%r13), %rcx
cmpl %edx, (%rax,%r15,4)
jne 0xd259a
incq %r15
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rdx, %r15
jb 0xd251d
jmp 0xd259a
xorl %r15d, %r15d
movq %rax, %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rcx, %r15
jne 0xd25f5
movq (%r12), %rax
movl (%rax,%r15,4), %edx
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %ecx
callq 0xd2360
movl %eax, %ebp
movl %eax, 0xc(%rsp)
movq %r14, %rdi
movl %eax, %esi
movl $0x1, %edx
callq 0xd21a7
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xd25e8
movl %ebp, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xd25f5
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x26caa
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x27a63(%rip), %rdi # 0xfa071
leaq 0x17fe0(%rip), %rdx # 0xea5f5
leaq 0x27be2(%rip), %rcx # 0xfa1fe
movl $0x155, %esi # imm = 0x155
xorl %eax, %eax
callq 0x1bfb0
jmp 0xd262c
jmp 0xd262c
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xd2643
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1b930
movq %r14, %rdi
callq 0x1c0d0
| _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_38], rdx
mov r14, rsi
mov rsi, [rcx+8]
sub rsi, [rcx]
mov rax, [r8+8]
sub rax, [r8]
sar rsi, 2
sar rax, 2
inc rax
cmp rsi, rax
jnz loc_D2607
mov ebp, r9d
mov r13, r8
mov r12, rcx
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
call _ZNSt6vectorIiSaIiEE7reserveEm; std::vector<int>::reserve(ulong)
mov rax, [r13+8]
movzx ebp, bpl
cmp rax, [r13+0]
jz short loc_D2594
xor r15d, r15d
loc_D251D:
mov rax, [r12]
mov edx, [rax+r15*4]
mov rdi, r14
mov rsi, [rsp+48h+var_38]
mov ecx, ebp
call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool)
mov [rsp+48h+var_40], eax
mov rdi, r14
mov esi, eax
mov edx, 1
call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool)
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_D2561
mov edx, [rsp+48h+var_40]
mov [rsi], edx
add rsi, 4
mov [rbx+8], rsi
jmp short loc_D2572
loc_D2561:
mov rdi, rbx
lea rdx, [rsp+48h+var_40]
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
mov edx, [rsp+48h+var_40]
loc_D2572:
mov rax, [r13+0]
mov rcx, [r13+8]
cmp [rax+r15*4], edx
jnz short loc_D259A
inc r15
mov rdx, rcx
sub rdx, rax
sar rdx, 2
cmp r15, rdx
jb short loc_D251D
jmp short loc_D259A
loc_D2594:
xor r15d, r15d
mov rcx, rax
loc_D259A:
sub rcx, rax
sar rcx, 2
cmp r15, rcx
jnz short loc_D25F5
mov rax, [r12]
mov edx, [rax+r15*4]
mov rdi, r14
mov rsi, [rsp+48h+var_38]
mov ecx, ebp
call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool)
mov ebp, eax
mov [rsp+48h+var_3C], eax
mov rdi, r14
mov esi, eax
mov edx, 1
call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool)
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_D25E8
mov [rsi], ebp
add rsi, 4
mov [rbx+8], rsi
jmp short loc_D25F5
loc_D25E8:
lea rdx, [rsp+48h+var_3C]
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_D25F5:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D2607:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIdxsSizeDraftS; "idxs.size() == draft.size() + 1 && \"id"...
mov esi, 155h
xor eax, eax
call _ggml_abort
jmp short loc_D262C
jmp short $+2
loc_D262C:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_D2643
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D2643:
mov rdi, r14
call __Unwind_Resume
| long long * common_sampler_sample_and_accept_n(
long long *a1,
_QWORD *a2,
long long a3,
_QWORD *a4,
long long *a5,
unsigned __int8 a6)
{
long long v6; // rbx
long long v11; // rax
unsigned long long v12; // r15
_DWORD *v13; // rsi
unsigned int v14; // edx
long long v15; // rcx
unsigned int v16; // ebp
unsigned int *v17; // rsi
long long v19; // rax
long long v20; // r14
unsigned int v21; // [rsp+8h] [rbp-40h] BYREF
unsigned int v22; // [rsp+Ch] [rbp-3Ch] BYREF
long long v23; // [rsp+10h] [rbp-38h]
v23 = a3;
if ( (long long)(a4[1] - *a4) >> 2 != ((a5[1] - *a5) >> 2) + 1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
341LL,
"GGML_ASSERT(%s) failed",
"idxs.size() == draft.size() + 1 && \"idxs.size() must be draft.size() + 1\"");
v20 = v19;
if ( *(_QWORD *)v6 )
operator delete(*(void **)v6, *(_QWORD *)(v6 + 16) - *(_QWORD *)v6);
_Unwind_Resume(v20);
}
*(_OWORD *)a1 = 0LL;
a1[2] = 0LL;
std::vector<int>::reserve();
v11 = a5[1];
if ( v11 == *a5 )
{
v12 = 0LL;
v15 = a5[1];
}
else
{
v12 = 0LL;
do
{
v21 = common_sampler_sample(a2, v23, *(_DWORD *)(*a4 + 4 * v12), a6);
common_sampler_accept(a2, v21, 1);
v13 = (_DWORD *)a1[1];
if ( v13 == (_DWORD *)a1[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, (long long)v13, &v21);
v14 = v21;
}
else
{
v14 = v21;
*v13 = v21;
a1[1] = (long long)(v13 + 1);
}
v11 = *a5;
v15 = a5[1];
if ( *(_DWORD *)(*a5 + 4 * v12) != v14 )
break;
++v12;
}
while ( v12 < (v15 - v11) >> 2 );
}
if ( v12 == (v15 - v11) >> 2 )
{
v16 = common_sampler_sample(a2, v23, *(_DWORD *)(*a4 + 4 * v12), a6);
v22 = v16;
common_sampler_accept(a2, v16, 1);
v17 = (unsigned int *)a1[1];
if ( v17 == (unsigned int *)a1[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, (long long)v17, &v22);
}
else
{
*v17 = v16;
a1[1] = (long long)(v17 + 1);
}
}
return a1;
}
| common_sampler_sample_and_accept_n:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDX
MOV R14,RSI
MOV RSI,qword ptr [RCX + 0x8]
SUB RSI,qword ptr [RCX]
MOV RAX,qword ptr [R8 + 0x8]
SUB RAX,qword ptr [R8]
SAR RSI,0x2
SAR RAX,0x2
INC RAX
CMP RSI,RAX
JNZ 0x001d2607
MOV EBP,R9D
MOV R13,R8
MOV R12,RCX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
LAB_001d2507:
CALL 0x001d3544
MOV RAX,qword ptr [R13 + 0x8]
MOVZX EBP,BPL
CMP RAX,qword ptr [R13]
JZ 0x001d2594
XOR R15D,R15D
LAB_001d251d:
MOV RAX,qword ptr [R12]
MOV EDX,dword ptr [RAX + R15*0x4]
LAB_001d2525:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x10]
MOV ECX,EBP
CALL 0x001d2360
MOV dword ptr [RSP + 0x8],EAX
MOV RDI,R14
MOV ESI,EAX
MOV EDX,0x1
CALL 0x001d21a7
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001d2561
MOV EDX,dword ptr [RSP + 0x8]
MOV dword ptr [RSI],EDX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001d2572
LAB_001d2561:
MOV RDI,RBX
LEA RDX,[RSP + 0x8]
CALL 0x00126caa
MOV EDX,dword ptr [RSP + 0x8]
LAB_001d2572:
MOV RAX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
CMP dword ptr [RAX + R15*0x4],EDX
JNZ 0x001d259a
INC R15
MOV RDX,RCX
SUB RDX,RAX
SAR RDX,0x2
CMP R15,RDX
JC 0x001d251d
JMP 0x001d259a
LAB_001d2594:
XOR R15D,R15D
MOV RCX,RAX
LAB_001d259a:
SUB RCX,RAX
SAR RCX,0x2
CMP R15,RCX
JNZ 0x001d25f5
MOV RAX,qword ptr [R12]
MOV EDX,dword ptr [RAX + R15*0x4]
LAB_001d25ae:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x10]
MOV ECX,EBP
CALL 0x001d2360
MOV EBP,EAX
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,R14
MOV ESI,EAX
MOV EDX,0x1
CALL 0x001d21a7
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001d25e8
MOV dword ptr [RSI],EBP
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001d25f5
LAB_001d25e8:
LEA RDX,[RSP + 0xc]
MOV RDI,RBX
CALL 0x00126caa
LAB_001d25f5:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d2607:
LEA RDI,[0x1fa071]
LEA RDX,[0x1ea5f5]
LEA RCX,[0x1fa1fe]
MOV ESI,0x155
XOR EAX,EAX
CALL 0x0011bfb0
|
/* common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int,
std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, bool) */
common_sampler *
common_sampler_sample_and_accept_n
(common_sampler *param_1,llama_context *param_2,vector *param_3,vector *param_4,
bool param_5)
{
int *piVar1;
long *plVar2;
int iVar3;
long lVar4;
long lVar5;
ulong uVar6;
int7 in_register_00000081;
bool in_R9B;
int local_40;
int local_3c;
vector *local_38;
uVar6 = *(long *)(param_4 + 8) - *(long *)param_4 >> 2;
local_38 = param_3;
if (uVar6 == (*(long *)(CONCAT71(in_register_00000081,param_5) + 8) -
*(long *)CONCAT71(in_register_00000081,param_5) >> 2) + 1U) {
plVar2 = (long *)CONCAT71(in_register_00000081,param_5);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 001d2507 to 001d250b has its CatchHandler @ 001d2628 */
std::vector<int,std::allocator<int>>::reserve((vector<int,std::allocator<int>> *)param_1,uVar6);
lVar4 = plVar2[1];
if (lVar4 == *plVar2) {
uVar6 = 0;
lVar5 = lVar4;
}
else {
uVar6 = 0;
do {
/* try { // try from 001d2525 to 001d256d has its CatchHandler @ 001d262c */
local_40 = common_sampler_sample
((common_sampler *)param_2,(llama_context *)local_38,
*(int *)(*(long *)param_4 + uVar6 * 4),in_R9B);
common_sampler_accept((common_sampler *)param_2,local_40,true);
piVar1 = *(int **)(param_1 + 8);
if (piVar1 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,piVar1,&local_40);
}
else {
*piVar1 = local_40;
*(int **)(param_1 + 8) = piVar1 + 1;
}
lVar4 = *plVar2;
lVar5 = plVar2[1];
} while ((*(int *)(lVar4 + uVar6 * 4) == local_40) &&
(uVar6 = uVar6 + 1, uVar6 < (ulong)(lVar5 - lVar4 >> 2)));
}
if (uVar6 == lVar5 - lVar4 >> 2) {
/* try { // try from 001d25ae to 001d25f4 has its CatchHandler @ 001d262a */
iVar3 = common_sampler_sample
((common_sampler *)param_2,(llama_context *)local_38,
*(int *)(*(long *)param_4 + uVar6 * 4),in_R9B);
local_3c = iVar3;
common_sampler_accept((common_sampler *)param_2,iVar3,true);
piVar1 = *(int **)(param_1 + 8);
if (piVar1 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,piVar1,&local_3c);
}
else {
*piVar1 = iVar3;
*(int **)(param_1 + 8) = piVar1 + 1;
}
}
return param_1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",0x155,
"GGML_ASSERT(%s) failed",
"idxs.size() == draft.size() + 1 && \"idxs.size() must be draft.size() + 1\"");
}
| |
32,522 | JS_WriteArrayBuffer | bluesky950520[P]quickjs/quickjs.c | static int JS_WriteArrayBuffer(BCWriterState *s, JSValue obj)
{
JSObject *p = JS_VALUE_GET_OBJ(obj);
JSArrayBuffer *abuf = p->u.array_buffer;
if (abuf->detached) {
JS_ThrowTypeErrorDetachedArrayBuffer(s->ctx);
return -1;
}
bc_put_u8(s, BC_TAG_ARRAY_BUFFER);
bc_put_leb128(s, abuf->byte_length);
bc_put_leb128(s, abuf->max_byte_length);
dbuf_put(&s->dbuf, abuf->data, abuf->byte_length);
return 0;
} | O0 | c | JS_WriteArrayBuffer:
subq $0x48, %rsp
movq %rsi, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq %rdi, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpb $0x0, 0x8(%rax)
je 0x78cc7
movq 0x28(%rsp), %rax
movq (%rax), %rdi
callq 0x58140
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x78d20
movq 0x28(%rsp), %rdi
movl $0xf, %esi
callq 0x77ba0
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rax
movl (%rax), %esi
callq 0x78730
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rax
movl 0x4(%rax), %esi
callq 0x78730
movq 0x28(%rsp), %rdi
addq $0x8, %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rsp), %rax
movslq (%rax), %rdx
callq 0x1e550
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
| JS_WriteArrayBuffer:
sub rsp, 48h
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_10], rdx
mov [rsp+48h+var_20], rdi
mov rax, [rsp+48h+var_18]
mov [rsp+48h+var_28], rax
mov rax, [rsp+48h+var_28]
mov rax, [rax+30h]
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_30]
cmp byte ptr [rax+8], 0
jz short loc_78CC7
mov rax, [rsp+48h+var_20]
mov rdi, [rax]
call JS_ThrowTypeErrorDetachedArrayBuffer
mov [rsp+48h+var_40], rax
mov [rsp+48h+var_38], rdx
mov [rsp+48h+var_4], 0FFFFFFFFh
jmp short loc_78D20
loc_78CC7:
mov rdi, [rsp+48h+var_20]
mov esi, 0Fh
call bc_put_u8
mov rdi, [rsp+48h+var_20]
mov rax, [rsp+48h+var_30]
mov esi, [rax]
call bc_put_leb128
mov rdi, [rsp+48h+var_20]
mov rax, [rsp+48h+var_30]
mov esi, [rax+4]
call bc_put_leb128
mov rdi, [rsp+48h+var_20]
add rdi, 8
mov rax, [rsp+48h+var_30]
mov rsi, [rax+10h]
mov rax, [rsp+48h+var_30]
movsxd rdx, dword ptr [rax]
call dbuf_put
mov [rsp+48h+var_4], 0
loc_78D20:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
| long long JS_WriteArrayBuffer(
long long *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int *v15; // [rsp+18h] [rbp-30h]
v15 = *(int **)(a2 + 48);
if ( *((_BYTE *)v15 + 8) )
{
JS_ThrowTypeErrorDetachedArrayBuffer(*a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6);
return (unsigned int)-1;
}
else
{
bc_put_u8((long long)a1, 15);
bc_put_leb128((long long)a1, *v15);
bc_put_leb128((long long)a1, v15[1]);
dbuf_put(a1 + 1, *((_QWORD *)v15 + 2), *v15);
return 0;
}
}
| JS_WriteArrayBuffer:
SUB RSP,0x48
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x28],RDI
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
CMP byte ptr [RAX + 0x8],0x0
JZ 0x00178cc7
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX]
CALL 0x00158140
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x00178d20
LAB_00178cc7:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0xf
CALL 0x00177ba0
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX]
CALL 0x00178730
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX + 0x4]
CALL 0x00178730
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x8
MOV RAX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RAX]
CALL 0x0011e550
MOV dword ptr [RSP + 0x44],0x0
LAB_00178d20:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
int4 JS_WriteArrayBuffer(int8 *param_1,long param_2)
{
int *piVar1;
int4 local_4;
piVar1 = *(int **)(param_2 + 0x30);
if ((char)piVar1[2] == '\0') {
bc_put_u8(param_1,0xf);
bc_put_leb128(param_1,*piVar1);
bc_put_leb128(param_1,piVar1[1]);
dbuf_put(param_1 + 1,*(int8 *)(piVar1 + 4),(long)*piVar1);
local_4 = 0;
}
else {
JS_ThrowTypeErrorDetachedArrayBuffer(*param_1);
local_4 = 0xffffffff;
}
return local_4;
}
| |
32,523 | JS_WriteArrayBuffer | bluesky950520[P]quickjs/quickjs.c | static int JS_WriteArrayBuffer(BCWriterState *s, JSValue obj)
{
JSObject *p = JS_VALUE_GET_OBJ(obj);
JSArrayBuffer *abuf = p->u.array_buffer;
if (abuf->detached) {
JS_ThrowTypeErrorDetachedArrayBuffer(s->ctx);
return -1;
}
bc_put_u8(s, BC_TAG_ARRAY_BUFFER);
bc_put_leb128(s, abuf->byte_length);
bc_put_leb128(s, abuf->max_byte_length);
dbuf_put(&s->dbuf, abuf->data, abuf->byte_length);
return 0;
} | O1 | c | JS_WriteArrayBuffer:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rsi), %r14
cmpb $0x0, 0x8(%r14)
je 0x456b6
movq (%rbx), %rdi
leaq 0x5cd51(%rip), %rsi # 0xa23f9
xorl %eax, %eax
callq 0x22567
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x456ef
addq $0x8, %rbx
movq %rbx, %rdi
movl $0xf, %esi
callq 0x1b4d0
movl (%r14), %esi
movq %rbx, %rdi
callq 0x45854
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x45854
movq 0x10(%r14), %rsi
movslq (%r14), %rdx
movq %rbx, %rdi
callq 0x1b422
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| JS_WriteArrayBuffer:
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rsi+30h]
cmp byte ptr [r14+8], 0
jz short loc_456B6
mov rdi, [rbx]
lea rsi, aArraybufferIsD; "ArrayBuffer is detached"
xor eax, eax
call JS_ThrowTypeError
mov eax, 0FFFFFFFFh
jmp short loc_456EF
loc_456B6:
add rbx, 8
mov rdi, rbx
mov esi, 0Fh
call dbuf_putc
mov esi, [r14]
mov rdi, rbx
call dbuf_put_leb128
mov esi, [r14+4]
mov rdi, rbx
call dbuf_put_leb128
mov rsi, [r14+10h]
movsxd rdx, dword ptr [r14]
mov rdi, rbx
call dbuf_put
xor eax, eax
loc_456EF:
add rsp, 8
pop rbx
pop r14
retn
| long long JS_WriteArrayBuffer(
long long *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
unsigned int *v15; // r14
v15 = *(unsigned int **)(a2 + 48);
if ( *((_BYTE *)v15 + 8) )
{
JS_ThrowTypeError(*a1, (long long)"ArrayBuffer is detached", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14);
return 0xFFFFFFFFLL;
}
else
{
dbuf_putc(a1 + 1, 15);
dbuf_put_leb128(a1 + 1, *v15);
dbuf_put_leb128(a1 + 1, v15[1]);
dbuf_put(a1 + 1, *((_QWORD *)v15 + 2), (int)*v15);
return 0LL;
}
}
| |||
32,524 | llm_build_copy_mask_state(ggml_context*, ggml_cgraph*, ggml_tensor*, ggml_tensor*, ggml_tensor*, int, int, int, int, int) | monkey531[P]llama/src/llama.cpp | static struct ggml_tensor * llm_build_copy_mask_state(
struct ggml_context * ctx,
struct ggml_cgraph * graph,
struct ggml_tensor * s,
struct ggml_tensor * state_copy,
struct ggml_tensor * state_mask,
int32_t n_state,
int32_t kv_size,
int32_t kv_head,
int32_t n_kv,
int32_t n_seqs) {
struct ggml_tensor * states = ggml_reshape_2d(ctx, s, n_state, kv_size);
// copy states
// NOTE: assuming the copy destinations are ALL contained between kv_head and kv_head + n_kv
// this shrinks the tensors's ne[1] to n_kv
states = ggml_get_rows(ctx, states, state_copy);
// clear states of sequences which are starting at the beginning of this batch
// FIXME: zero-out NANs?
states = ggml_mul(ctx, states, state_mask);
// copy states which won't be changed further (between n_seqs and n_kv)
ggml_build_forward_expand(graph,
ggml_cpy(ctx,
ggml_view_1d(ctx, states, n_state*(n_kv - n_seqs), n_seqs*n_state*ggml_element_size(states)),
ggml_view_1d(ctx, s, n_state*(n_kv - n_seqs), (kv_head + n_seqs)*n_state*ggml_element_size(s))));
// the part of the states that will be used and modified
return ggml_view_2d(ctx, states, n_state, n_seqs, states->nb[1], 0);
} | O1 | cpp | llm_build_copy_mask_state(ggml_context*, ggml_cgraph*, ggml_tensor*, ggml_tensor*, ggml_tensor*, int, int, int, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r12
movq %rcx, %rbp
movq %rdx, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdi, %r14
movslq 0x78(%rsp), %rbx
movl 0x70(%rsp), %r13d
movslq 0x60(%rsp), %rcx
movslq %r9d, %r15
movq %rdx, %rsi
movq %r15, %rdx
callq 0x6be70
movq %r14, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0x66570
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x6ac30
movq %rax, %rbp
subl %ebx, %r13d
imull %r15d, %r13d
movslq %r13d, %r12
movl %ebx, %eax
movq %rbx, 0x10(%rsp)
imull %r15d, %eax
movslq %eax, %r13
movq %rbp, %rdi
callq 0x69460
imulq %rax, %r13
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x6af60
movq %rax, 0x8(%rsp)
movl 0x68(%rsp), %eax
addl %ebx, %eax
imull %r15d, %eax
movslq %eax, %r13
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x69460
imulq %rax, %r13
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x6af60
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0x6a970
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x667a0
movq 0x38(%rbp), %r8
movq %r14, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq 0x10(%rsp), %rcx
xorl %r9d, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6a430
| _ZL25llm_build_copy_mask_stateP12ggml_contextP11ggml_cgraphP11ggml_tensorS4_S4_iiiii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, r8
mov rbp, rcx
mov [rsp+58h+var_40], rdx
mov [rsp+58h+var_38], rsi
mov r14, rdi
movsxd rbx, [rsp+58h+arg_18]
mov r13d, [rsp+58h+arg_10]
movsxd rcx, [rsp+58h+arg_0]
movsxd r15, r9d
mov rsi, rdx
mov rdx, r15
call _ggml_reshape_2d
mov rdi, r14
mov rsi, rax
mov rdx, rbp
call _ggml_get_rows
mov rdi, r14
mov rsi, rax
mov rdx, r12
call _ggml_mul
mov rbp, rax
sub r13d, ebx
imul r13d, r15d
movsxd r12, r13d
mov eax, ebx
mov [rsp+58h+var_48], rbx
imul eax, r15d
movsxd r13, eax
mov rdi, rbp
call _ggml_element_size
imul r13, rax
mov rdi, r14
mov rsi, rbp
mov rdx, r12
mov rcx, r13
call _ggml_view_1d
mov [rsp+58h+var_50], rax
mov eax, [rsp+58h+arg_8]
add eax, ebx
imul eax, r15d
movsxd r13, eax
mov rbx, [rsp+58h+var_40]
mov rdi, rbx
call _ggml_element_size
imul r13, rax
mov rdi, r14
mov rsi, rbx
mov rdx, r12
mov rcx, r13
call _ggml_view_1d
mov rdi, r14
mov rsi, [rsp+58h+var_50]
mov rdx, rax
call _ggml_cpy
mov rdi, [rsp+58h+var_38]
mov rsi, rax
call _ggml_build_forward_expand
mov r8, [rbp+38h]
mov rdi, r14
mov rsi, rbp
mov rdx, r15
mov rcx, [rsp+58h+var_48]
xor r9d, r9d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _ggml_view_2d
| long long llm_build_copy_mask_state(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
int a6,
int a7,
int a8,
int a9,
int a10)
{
long long v12; // r15
long long v13; // rax
long long rows; // rax
long long v15; // rbp
long long v16; // r12
long long v17; // rax
long long v18; // rax
long long v19; // rax
long long v20; // rax
long long v22; // [rsp+8h] [rbp-50h]
v12 = a6;
v13 = ggml_reshape_2d(a1, a3, a6, a7);
rows = ggml_get_rows(a1, v13, a4);
v15 = ggml_mul(a1, rows, a5);
v16 = (int)v12 * (a9 - a10);
v17 = ggml_element_size(v15);
v22 = ggml_view_1d(a1, v15, v16, v17 * (int)v12 * a10);
v18 = ggml_element_size(a3);
v19 = ggml_view_1d(a1, a3, v16, v18 * (int)v12 * (a10 + a8));
v20 = ggml_cpy(a1, v22, v19);
ggml_build_forward_expand(a2, v20);
return ggml_view_2d(a1, v15, v12, a10, *(_QWORD *)(v15 + 56), 0LL);
}
| llm_build_copy_mask_state:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,R8
MOV RBP,RCX
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x20],RSI
MOV R14,RDI
MOVSXD RBX,dword ptr [RSP + 0x78]
MOV R13D,dword ptr [RSP + 0x70]
MOVSXD RCX,dword ptr [RSP + 0x60]
MOVSXD R15,R9D
MOV RSI,RDX
MOV RDX,R15
CALL 0x0016be70
MOV RDI,R14
MOV RSI,RAX
MOV RDX,RBP
CALL 0x00166570
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R12
CALL 0x0016ac30
MOV RBP,RAX
SUB R13D,EBX
IMUL R13D,R15D
MOVSXD R12,R13D
MOV EAX,EBX
MOV qword ptr [RSP + 0x10],RBX
IMUL EAX,R15D
MOVSXD R13,EAX
MOV RDI,RBP
CALL 0x00169460
IMUL R13,RAX
MOV RDI,R14
MOV RSI,RBP
MOV RDX,R12
MOV RCX,R13
CALL 0x0016af60
MOV qword ptr [RSP + 0x8],RAX
MOV EAX,dword ptr [RSP + 0x68]
ADD EAX,EBX
IMUL EAX,R15D
MOVSXD R13,EAX
MOV RBX,qword ptr [RSP + 0x18]
MOV RDI,RBX
CALL 0x00169460
IMUL R13,RAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
MOV RCX,R13
CALL 0x0016af60
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,RAX
CALL 0x0016a970
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,RAX
CALL 0x001667a0
MOV R8,qword ptr [RBP + 0x38]
MOV RDI,R14
MOV RSI,RBP
MOV RDX,R15
MOV RCX,qword ptr [RSP + 0x10]
XOR R9D,R9D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0016a430
|
/* llm_build_copy_mask_state(ggml_context*, ggml_cgraph*, ggml_tensor*, ggml_tensor*, ggml_tensor*,
int, int, int, int, int) */
void llm_build_copy_mask_state
(ggml_context *param_1,ggml_cgraph *param_2,ggml_tensor *param_3,ggml_tensor *param_4
,ggml_tensor *param_5,int param_6,int param_7,int param_8,int param_9,int param_10)
{
int8 uVar1;
long lVar2;
long lVar3;
int8 uVar4;
long lVar5;
uVar1 = ggml_reshape_2d(param_1,param_3,(long)param_6,(long)param_7);
uVar1 = ggml_get_rows(param_1,uVar1,param_4);
lVar2 = ggml_mul(param_1,uVar1,param_5);
lVar5 = (long)((param_9 - param_10) * param_6);
lVar3 = ggml_element_size(lVar2);
uVar1 = ggml_view_1d(param_1,lVar2,lVar5,(param_10 * param_6) * lVar3);
lVar3 = ggml_element_size(param_3);
uVar4 = ggml_view_1d(param_1,param_3,lVar5,((param_8 + param_10) * param_6) * lVar3);
uVar1 = ggml_cpy(param_1,uVar1,uVar4);
ggml_build_forward_expand(param_2,uVar1);
ggml_view_2d(param_1,lVar2,(long)param_6,(long)param_10,*(int8 *)(lVar2 + 0x38),0);
return;
}
| |
32,525 | js_object_toString | bluesky950520[P]quickjs/quickjs.c | static JSValue js_object_toString(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, tag;
int is_array;
JSAtom atom;
JSObject *p;
if (JS_IsNull(this_val)) {
tag = js_new_string8(ctx, "Null");
} else if (JS_IsUndefined(this_val)) {
tag = js_new_string8(ctx, "Undefined");
} else {
obj = JS_ToObject(ctx, this_val);
if (JS_IsException(obj))
return obj;
is_array = JS_IsArray(ctx, obj);
if (is_array < 0) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
if (is_array) {
atom = JS_ATOM_Array;
} else if (JS_IsFunction(ctx, obj)) {
atom = JS_ATOM_Function;
} else {
p = JS_VALUE_GET_OBJ(obj);
switch(p->class_id) {
case JS_CLASS_STRING:
case JS_CLASS_ARGUMENTS:
case JS_CLASS_MAPPED_ARGUMENTS:
case JS_CLASS_ERROR:
case JS_CLASS_BOOLEAN:
case JS_CLASS_NUMBER:
case JS_CLASS_DATE:
case JS_CLASS_REGEXP:
atom = ctx->rt->class_array[p->class_id].class_name;
break;
default:
atom = JS_ATOM_Object;
break;
}
}
tag = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_toStringTag);
JS_FreeValue(ctx, obj);
if (JS_IsException(tag))
return JS_EXCEPTION;
if (!JS_IsString(tag)) {
JS_FreeValue(ctx, tag);
tag = JS_AtomToString(ctx, atom);
}
}
return JS_ConcatString3(ctx, "[object ", tag, "]");
} | O1 | c | js_object_toString:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x3, %edx
je 0x70715
cmpl $0x2, %edx
jne 0x70766
leaq 0x2fc89(%rip), %rsi # 0xa0394
movq %rbx, %rdi
movl $0x4, %edx
jmp 0x70724
leaq 0x2fc7d(%rip), %rsi # 0xa0399
movq %rbx, %rdi
movl $0x9, %edx
callq 0x1f5c9
movq %rax, %r12
movq %rdx, %r13
leaq 0x2fc6d(%rip), %rsi # 0xa03a3
leaq 0x2cf73(%rip), %r8 # 0x9d6b0
movq %rbx, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x412ee
movq %rax, %r15
movq %rdx, %r14
movq %r15, %rax
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x261c9
movq %rax, %r15
movq %rdx, %r14
movq %rax, (%rsp)
cmpl $0x6, %r14d
je 0x70751
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x276be
testl %eax, %eax
js 0x7082c
movl $0x94, %ebp
jne 0x707e1
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x221aa
movl $0x9e, %ebp
testl %eax, %eax
jne 0x707e1
movq (%rsp), %rax
movzwl 0x6(%rax), %eax
movl $0x93, %ebp
cmpl $0x12, %eax
ja 0x707e1
movl $0x40778, %ecx # imm = 0x40778
btl %eax, %ecx
jae 0x707e1
movq 0x18(%rbx), %rcx
movq 0x80(%rcx), %rcx
leaq (%rax,%rax,4), %rax
movl 0x4(%rcx,%rax,8), %ebp
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0xda, %ecx
movq %r15, %r8
movq %r14, %r9
pushq $0x0
pushq $0x0
callq 0x2238f
addq $0x10, %rsp
movq %rax, %r12
movq %rdx, %r13
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ccb2
cmpl $-0x7, %r13d
je 0x7072f
cmpl $0x6, %r13d
jne 0x70849
movl %r13d, %r14d
jmp 0x70841
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ccb2
movl $0x6, %r14d
xorl %r15d, %r15d
jmp 0x70751
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1ccb2
movq %rbx, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0x1fb46
jmp 0x70729
| js_object_toString:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
cmp edx, 3
jz short loc_70715
cmp edx, 2
jnz short loc_70766
lea rsi, aNull_0; "Null"
mov rdi, rbx
mov edx, 4
jmp short loc_70724
loc_70715:
lea rsi, aUndefined; "Undefined"
mov rdi, rbx
mov edx, 9
loc_70724:
call js_new_string8_len
loc_70729:
mov r12, rax
mov r13, rdx
loc_7072F:
lea rsi, aObject_0; "[object "
lea r8, aUninitialized+0Eh; "]"
mov rdi, rbx
mov rdx, r12
mov rcx, r13
call JS_ConcatString3
mov r15, rax
mov r14, rdx
loc_70751:
mov rax, r15
mov rdx, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_70766:
mov rdi, rbx
call JS_ToObject
mov r15, rax
mov r14, rdx
mov [rsp+38h+var_38], rax
cmp r14d, 6
jz short loc_70751
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_IsArray
test eax, eax
js loc_7082C
mov ebp, 94h
jnz short loc_707E1
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_IsFunction
mov ebp, 9Eh
test eax, eax
jnz short loc_707E1
mov rax, [rsp+38h+var_38]
movzx eax, word ptr [rax+6]
mov ebp, 93h
cmp eax, 12h
ja short loc_707E1
mov ecx, offset loc_40778
bt ecx, eax
jnb short loc_707E1
mov rcx, [rbx+18h]
mov rcx, [rcx+80h]
lea rax, [rax+rax*4]
mov ebp, [rcx+rax*8+4]
loc_707E1:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov ecx, 0DAh
mov r8, r15
mov r9, r14
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r12, rax
mov r13, rdx
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call JS_FreeValueRT
cmp r13d, 0FFFFFFF9h
jz loc_7072F
cmp r13d, 6
jnz short loc_70849
mov r14d, r13d
jmp short loc_70841
loc_7082C:
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call JS_FreeValueRT
mov r14d, 6
loc_70841:
xor r15d, r15d
jmp loc_70751
loc_70849:
mov rdi, [rbx+18h]
mov rsi, r12
mov rdx, r13
call JS_FreeValueRT
mov rdi, rbx
mov esi, ebp
mov edx, 1
call __JS_AtomToValue
jmp loc_70729
| _DWORD * js_object_toString(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
const char *v14; // rsi
unsigned int v15; // edx
long long v16; // rax
long long v17; // rdx
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
_DWORD *PropertyInternal2; // r12
long long v22; // r13
_DWORD *v23; // r15
_DWORD *v25; // rax
long long v26; // rdx
long long v27; // r14
int IsArray; // eax
int v29; // ebp
long long v30; // rax
void *v31; // rcx
long long v32; // rdx
_DWORD *v33; // [rsp+0h] [rbp-38h]
if ( (_DWORD)a3 == 3 )
{
v14 = "Undefined";
v15 = 9;
}
else
{
if ( (_DWORD)a3 != 2 )
{
v25 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v23 = v25;
v27 = v26;
v33 = v25;
if ( (_DWORD)v26 == 6 )
return v23;
IsArray = JS_IsArray(a1, (long long)v25, v26);
if ( IsArray < 0 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v23, v27);
}
else
{
v29 = 148;
if ( !IsArray )
{
v29 = 158;
if ( !(unsigned int)JS_IsFunction(a1, (long long)v23, v27) )
{
v30 = *((unsigned __int16 *)v33 + 3);
v29 = 147;
if ( (unsigned int)v30 <= 0x12 )
{
v31 = &loc_40778;
if ( _bittest((const int *)&v31, v30) )
v29 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40 * v30 + 4);
}
}
}
PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(a1, (long long)v23, v27, 0xDAu, (long long)v23, v27, 0LL, 0);
v22 = v32;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v23, v27);
if ( (_DWORD)v22 == -7 )
return JS_ConcatString3(
a1,
(long long)"[object ",
PropertyInternal2,
v22,
(long long)"]",
v18,
a7,
a8,
a9,
a10,
v19,
v20,
a13,
a14);
if ( (_DWORD)v22 != 6 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInternal2, v22);
v16 = _JS_AtomToValue(a1, v29, 1);
goto LABEL_6;
}
}
return 0LL;
}
v14 = "Null";
v15 = 4;
}
v16 = js_new_string8_len(a1, (long long)v14, v15);
LABEL_6:
PropertyInternal2 = (_DWORD *)v16;
v22 = v17;
return JS_ConcatString3(
a1,
(long long)"[object ",
PropertyInternal2,
v22,
(long long)"]",
v18,
a7,
a8,
a9,
a10,
v19,
v20,
a13,
a14);
}
| js_object_toString:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP EDX,0x3
JZ 0x00170715
CMP EDX,0x2
JNZ 0x00170766
LEA RSI,[0x1a0394]
MOV RDI,RBX
MOV EDX,0x4
JMP 0x00170724
LAB_00170715:
LEA RSI,[0x1a0399]
MOV RDI,RBX
MOV EDX,0x9
LAB_00170724:
CALL 0x0011f5c9
LAB_00170729:
MOV R12,RAX
MOV R13,RDX
LAB_0017072f:
LEA RSI,[0x1a03a3]
LEA R8,[0x19d6b0]
MOV RDI,RBX
MOV RDX,R12
MOV RCX,R13
CALL 0x001412ee
MOV R15,RAX
MOV R14,RDX
LAB_00170751:
MOV RAX,R15
MOV RDX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00170766:
MOV RDI,RBX
CALL 0x001261c9
MOV R15,RAX
MOV R14,RDX
MOV qword ptr [RSP],RAX
CMP R14D,0x6
JZ 0x00170751
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x001276be
TEST EAX,EAX
JS 0x0017082c
MOV EBP,0x94
JNZ 0x001707e1
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x001221aa
MOV EBP,0x9e
TEST EAX,EAX
JNZ 0x001707e1
MOV RAX,qword ptr [RSP]
MOVZX EAX,word ptr [RAX + 0x6]
MOV EBP,0x93
CMP EAX,0x12
JA 0x001707e1
MOV ECX,0x40778
BT ECX,EAX
JNC 0x001707e1
MOV RCX,qword ptr [RBX + 0x18]
MOV RCX,qword ptr [RCX + 0x80]
LEA RAX,[RAX + RAX*0x4]
MOV EBP,dword ptr [RCX + RAX*0x8 + 0x4]
LAB_001707e1:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV ECX,0xda
MOV R8,R15
MOV R9,R14
PUSH 0x0
PUSH 0x0
CALL 0x0012238f
ADD RSP,0x10
MOV R12,RAX
MOV R13,RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x0011ccb2
CMP R13D,-0x7
JZ 0x0017072f
CMP R13D,0x6
JNZ 0x00170849
MOV R14D,R13D
JMP 0x00170841
LAB_0017082c:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x0011ccb2
MOV R14D,0x6
LAB_00170841:
XOR R15D,R15D
JMP 0x00170751
LAB_00170849:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R12
MOV RDX,R13
CALL 0x0011ccb2
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,0x1
CALL 0x0011fb46
JMP 0x00170729
|
int1 [16] js_object_toString(long param_1,int8 param_2,int param_3)
{
ushort uVar1;
int iVar2;
long lVar3;
int8 uVar4;
int4 uVar5;
char *pcVar6;
ulong uVar7;
int1 auVar8 [16];
if (param_3 == 3) {
pcVar6 = "Undefined";
uVar4 = 9;
}
else {
if (param_3 != 2) {
auVar8 = JS_ToObject(param_1);
uVar4 = auVar8._8_8_;
lVar3 = auVar8._0_8_;
if (auVar8._8_4_ == 6) {
return auVar8;
}
iVar2 = JS_IsArray(param_1,lVar3,uVar4);
if (iVar2 < 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar3,uVar4);
uVar7 = 6;
LAB_00170841:
auVar8._8_8_ = 0;
auVar8._0_8_ = uVar7;
return auVar8 << 0x40;
}
uVar5 = 0x94;
if (iVar2 == 0) {
iVar2 = JS_IsFunction(param_1,lVar3,uVar4);
uVar5 = 0x9e;
if (iVar2 == 0) {
uVar1 = *(ushort *)(lVar3 + 6);
uVar5 = 0x93;
if ((uVar1 < 0x13) && ((0x40778U >> (uVar1 & 0x1f) & 1) != 0)) {
uVar5 = *(int4 *)
(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 4 + (ulong)uVar1 * 0x28);
}
}
}
auVar8 = JS_GetPropertyInternal2(param_1,lVar3,uVar4,0xda,lVar3,uVar4,0,0);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar3,uVar4);
if (auVar8._8_4_ != -7) {
if (auVar8._8_4_ == 6) {
uVar7 = auVar8._8_8_ & 0xffffffff;
goto LAB_00170841;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar8._0_8_,auVar8._8_8_);
auVar8 = __JS_AtomToValue(param_1,uVar5,1);
}
goto LAB_0017072f;
}
pcVar6 = "Null";
uVar4 = 4;
}
auVar8 = js_new_string8_len(param_1,pcVar6,uVar4);
LAB_0017072f:
auVar8 = JS_ConcatString3(param_1,"[object ",auVar8._0_8_,auVar8._8_8_,"]");
return auVar8;
}
| |
32,526 | js_object_toString | bluesky950520[P]quickjs/quickjs.c | static JSValue js_object_toString(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, tag;
int is_array;
JSAtom atom;
JSObject *p;
if (JS_IsNull(this_val)) {
tag = js_new_string8(ctx, "Null");
} else if (JS_IsUndefined(this_val)) {
tag = js_new_string8(ctx, "Undefined");
} else {
obj = JS_ToObject(ctx, this_val);
if (JS_IsException(obj))
return obj;
is_array = JS_IsArray(ctx, obj);
if (is_array < 0) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
if (is_array) {
atom = JS_ATOM_Array;
} else if (JS_IsFunction(ctx, obj)) {
atom = JS_ATOM_Function;
} else {
p = JS_VALUE_GET_OBJ(obj);
switch(p->class_id) {
case JS_CLASS_STRING:
case JS_CLASS_ARGUMENTS:
case JS_CLASS_MAPPED_ARGUMENTS:
case JS_CLASS_ERROR:
case JS_CLASS_BOOLEAN:
case JS_CLASS_NUMBER:
case JS_CLASS_DATE:
case JS_CLASS_REGEXP:
atom = ctx->rt->class_array[p->class_id].class_name;
break;
default:
atom = JS_ATOM_Object;
break;
}
}
tag = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_toStringTag);
JS_FreeValue(ctx, obj);
if (JS_IsException(tag))
return JS_EXCEPTION;
if (!JS_IsString(tag)) {
JS_FreeValue(ctx, tag);
tag = JS_AtomToString(ctx, atom);
}
}
return JS_ConcatString3(ctx, "[object ", tag, "]");
} | O3 | c | js_object_toString:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x3, %edx
je 0x72caa
cmpl $0x2, %edx
jne 0x72cfb
leaq 0x306ae(%rip), %rsi # 0xa334e
movq %rbx, %rdi
movl $0x4, %edx
jmp 0x72cb9
leaq 0x306a2(%rip), %rsi # 0xa3353
movq %rbx, %rdi
movl $0x9, %edx
callq 0x1fcd9
movq %rax, %r12
movq %rdx, %r13
leaq 0x30692(%rip), %rsi # 0xa335d
leaq 0x2d9ae(%rip), %r8 # 0xa0680
movq %rbx, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x42d9d
movq %rax, %r14
movq %rdx, %r15
movq %r14, %rax
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x268d8
movq %rax, %r14
movq %rdx, %rbp
cmpl $0x6, %ebp
je 0x72d4e
cmpl $-0x1, %ebp
jne 0x72d9e
movzwl 0x6(%r14), %eax
movl $0x94, %r15d
cmpl $0x2, %eax
je 0x72d71
cmpl $0x30, %eax
je 0x72e74
movl $0x9e, %r15d
cmpw $0xd, %ax
je 0x72d71
movzwl %ax, %eax
cmpl $0x30, %eax
jne 0x72d53
movq 0x30(%r14), %rax
movzbl 0x20(%rax), %eax
jmp 0x72d6d
movq %rbp, %r15
jmp 0x72ce6
movq 0x18(%rbx), %rcx
movq 0x80(%rcx), %rcx
leaq (%rax,%rax,4), %rdx
xorl %eax, %eax
cmpq $0x0, 0x18(%rcx,%rdx,8)
setne %al
testl %eax, %eax
je 0x72d9e
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movl $0xda, %ecx
movq %r14, %r8
movq %rbp, %r9
pushq $0x0
pushq $0x0
callq 0x22c0f
addq $0x10, %rsp
movq %rax, %r12
movq %rdx, %r13
leaq 0x18(%rbx), %rdx
jmp 0x72dfc
movzwl 0x6(%r14), %eax
movl $0x93, %r15d
cmpl $0x12, %eax
ja 0x72dcc
movl $0x40778, %ecx # imm = 0x40778
btl %eax, %ecx
jae 0x72dcc
movq 0x18(%rbx), %rcx
movq 0x80(%rcx), %rcx
leaq (%rax,%rax,4), %rax
movl 0x4(%rcx,%rax,8), %r15d
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movl $0xda, %ecx
movq %r14, %r8
movq %rbp, %r9
pushq $0x0
pushq $0x0
callq 0x22c0f
addq $0x10, %rsp
movq %rax, %r12
movq %rdx, %r13
leaq 0x18(%rbx), %rdx
cmpl $-0x9, %ebp
jb 0x72e1e
movq (%rdx), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x72e1e
movq %r14, %rsi
movq %rdx, %r14
movq %rbp, %rdx
callq 0x20d90
movq %r14, %rdx
cmpl $-0x7, %r13d
je 0x72cc4
movl %r15d, %ebp
movl %r13d, %r15d
cmpl $0x6, %r13d
jne 0x72e3c
xorl %r14d, %r14d
jmp 0x72ce6
cmpl $-0x9, %r15d
jb 0x72e60
movq (%rdx), %rdi
movl (%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
cmpl $0x1, %eax
jg 0x72e60
movq %r12, %rsi
movq %r13, %rdx
callq 0x20d90
movq %rbx, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0x20277
jmp 0x72cbe
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x27d0d
testl %eax, %eax
js 0x72e9c
movl $0x94, %r15d
jne 0x72d71
movzwl 0x6(%r14), %eax
jmp 0x72d30
movq 0x18(%rbx), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
movl $0x6, %r15d
cmpl $0x1, %eax
jg 0x72e34
movq %r14, %rsi
movq %rbp, %rdx
callq 0x20d90
jmp 0x72e34
| js_object_toString:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
cmp edx, 3
jz short loc_72CAA
cmp edx, 2
jnz short loc_72CFB
lea rsi, aNull_0; "Null"
mov rdi, rbx
mov edx, 4
jmp short loc_72CB9
loc_72CAA:
lea rsi, aUndefined; "Undefined"
mov rdi, rbx
mov edx, 9
loc_72CB9:
call js_new_string8_len
loc_72CBE:
mov r12, rax
mov r13, rdx
loc_72CC4:
lea rsi, aObject_0; "[object "
lea r8, aUninitialized+0Eh; "]"
mov rdi, rbx
mov rdx, r12
mov rcx, r13
call JS_ConcatString3
mov r14, rax
mov r15, rdx
loc_72CE6:
mov rax, r14
mov rdx, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_72CFB:
mov rdi, rbx
call JS_ToObject
mov r14, rax
mov rbp, rdx
cmp ebp, 6
jz short loc_72D4E
cmp ebp, 0FFFFFFFFh
jnz loc_72D9E
movzx eax, word ptr [r14+6]
mov r15d, 94h
cmp eax, 2
jz short loc_72D71
cmp eax, 30h ; '0'
jz loc_72E74
loc_72D30:
mov r15d, 9Eh
cmp ax, 0Dh
jz short loc_72D71
movzx eax, ax
cmp eax, 30h ; '0'
jnz short loc_72D53
mov rax, [r14+30h]
movzx eax, byte ptr [rax+20h]
jmp short loc_72D6D
loc_72D4E:
mov r15, rbp
jmp short loc_72CE6
loc_72D53:
mov rcx, [rbx+18h]
mov rcx, [rcx+80h]
lea rdx, [rax+rax*4]
xor eax, eax
cmp qword ptr [rcx+rdx*8+18h], 0
setnz al
loc_72D6D:
test eax, eax
jz short loc_72D9E
loc_72D71:
mov rdi, rbx
mov rsi, r14
mov rdx, rbp
mov ecx, 0DAh
mov r8, r14
mov r9, rbp
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r12, rax
mov r13, rdx
lea rdx, [rbx+18h]
jmp short loc_72DFC
loc_72D9E:
movzx eax, word ptr [r14+6]
mov r15d, 93h
cmp eax, 12h
ja short loc_72DCC
mov ecx, offset loc_40778
bt ecx, eax
jnb short loc_72DCC
mov rcx, [rbx+18h]
mov rcx, [rcx+80h]
lea rax, [rax+rax*4]
mov r15d, [rcx+rax*8+4]
loc_72DCC:
mov rdi, rbx
mov rsi, r14
mov rdx, rbp
mov ecx, 0DAh
mov r8, r14
mov r9, rbp
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r12, rax
mov r13, rdx
lea rdx, [rbx+18h]
cmp ebp, 0FFFFFFF7h
jb short loc_72E1E
loc_72DFC:
mov rdi, [rdx]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_72E1E
mov rsi, r14
mov r14, rdx
mov rdx, rbp
call js_free_value_rt
mov rdx, r14
loc_72E1E:
cmp r13d, 0FFFFFFF9h
jz loc_72CC4
mov ebp, r15d
mov r15d, r13d
cmp r13d, 6
jnz short loc_72E3C
loc_72E34:
xor r14d, r14d
jmp loc_72CE6
loc_72E3C:
cmp r15d, 0FFFFFFF7h
jb short loc_72E60
mov rdi, [rdx]
mov eax, [r12]
lea ecx, [rax-1]
mov [r12], ecx
cmp eax, 1
jg short loc_72E60
mov rsi, r12
mov rdx, r13
call js_free_value_rt
loc_72E60:
mov rdi, rbx
mov esi, ebp
mov edx, 1
call __JS_AtomToValue
jmp loc_72CBE
loc_72E74:
mov rdi, rbx
mov rsi, r14
mov rdx, rbp
call js_proxy_isArray
test eax, eax
js short loc_72E9C
mov r15d, 94h
jnz loc_72D71
movzx eax, word ptr [r14+6]
jmp loc_72D30
loc_72E9C:
mov rdi, [rbx+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
mov r15d, 6
cmp eax, 1
jg short loc_72E34
mov rsi, r14
mov rdx, rbp
call js_free_value_rt
jmp loc_72E34
| long long js_object_toString(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
const char *v15; // rsi
int v16; // edx
long long v17; // rax
long long v18; // rdx
long long v19; // r9
__m128 v20; // xmm4
__m128 v21; // xmm5
int *PropertyInternal2; // r12
long long v23; // r13
long long v24; // r14
long long v26; // rax
long long v27; // rdx
long long v28; // rcx
long long v29; // r8
long long v30; // r9
__m128 v31; // xmm4
__m128 v32; // xmm5
long long v33; // rbp
int v34; // eax
int v35; // r15d
int v36; // eax
long long v37; // r8
long long v38; // rdx
long long *v39; // rdx
long long v40; // rax
void *v41; // rcx
long long v42; // rdx
long long v43; // rdi
int v44; // eax
long long v45; // rcx
_QWORD *v46; // rsi
long long *v47; // r14
long long v48; // rdi
int v49; // eax
long long v50; // rcx
int isArray; // eax
long long v52; // r8
long long v53; // r9
long long v54; // rdi
int v55; // eax
long long v56; // rcx
if ( (_DWORD)a3 == 3 )
{
v15 = "Undefined";
v16 = 9;
goto LABEL_5;
}
if ( (_DWORD)a3 != 2 )
{
v26 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v24 = v26;
v33 = v27;
if ( (_DWORD)v27 == 6 )
return v24;
if ( (_DWORD)v27 == -1 )
{
v34 = *(unsigned __int16 *)(v26 + 6);
v35 = 148;
if ( v34 == 2 )
goto LABEL_19;
if ( v34 == 48 )
{
isArray = js_proxy_isArray(a1, v24, v27, a7, a8, a9, a10, v31, v32, a13, a14, v28, v29, v30);
if ( isArray < 0 )
{
v54 = *(_QWORD *)(a1 + 24);
v55 = *(_DWORD *)v24;
v56 = (unsigned int)(*(_DWORD *)v24 - 1);
*(_DWORD *)v24 = v56;
if ( v55 <= 1 )
js_free_value_rt(v54, (_QWORD *)v24, v33, v56, v52, v53);
return 0LL;
}
v35 = 148;
if ( isArray )
goto LABEL_19;
LOWORD(v34) = *(_WORD *)(v24 + 6);
}
v35 = 158;
if ( (_WORD)v34 == 13
|| ((unsigned __int16)v34 != 48
? (v36 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40LL * (unsigned __int16)v34 + 24) != 0LL)
: (v36 = *(unsigned __int8 *)(*(_QWORD *)(v24 + 48) + 32LL)),
v36) )
{
LABEL_19:
PropertyInternal2 = (int *)JS_GetPropertyInternal2(a1, v24, -1, 0xDAu, v24, v33, 0LL, 0);
v23 = v38;
v39 = (long long *)(a1 + 24);
goto LABEL_24;
}
}
v40 = *(unsigned __int16 *)(v24 + 6);
v35 = 147;
if ( (unsigned int)v40 <= 0x12 )
{
v41 = &loc_40778;
if ( _bittest((const int *)&v41, v40) )
v35 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40 * v40 + 4);
}
PropertyInternal2 = (int *)JS_GetPropertyInternal2(a1, v24, v33, 0xDAu, v24, v33, 0LL, 0);
v23 = v42;
v39 = (long long *)(a1 + 24);
if ( (unsigned int)v33 < 0xFFFFFFF7 )
{
LABEL_26:
if ( (_DWORD)v23 == -7 )
return JS_ConcatString3(
a1,
(long long)"[object ",
PropertyInternal2,
v23,
(long long)"]",
v19,
a7,
a8,
a9,
a10,
v20,
v21,
a13,
a14);
if ( (_DWORD)v23 != 6 )
{
if ( (unsigned int)v23 >= 0xFFFFFFF7 )
{
v48 = *v39;
v49 = *PropertyInternal2;
v50 = (unsigned int)(*PropertyInternal2 - 1);
*PropertyInternal2 = v50;
if ( v49 <= 1 )
js_free_value_rt(v48, PropertyInternal2, v23, v50, v37, v19);
}
v17 = _JS_AtomToValue(a1, v35, 1);
goto LABEL_6;
}
return 0LL;
}
LABEL_24:
v43 = *v39;
v44 = *(_DWORD *)v24;
v45 = (unsigned int)(*(_DWORD *)v24 - 1);
*(_DWORD *)v24 = v45;
if ( v44 <= 1 )
{
v46 = (_QWORD *)v24;
v47 = v39;
js_free_value_rt(v43, v46, v33, v45, v37, v19);
v39 = v47;
}
goto LABEL_26;
}
v15 = "Null";
v16 = 4;
LABEL_5:
v17 = js_new_string8_len(a1, (long long)v15, v16);
LABEL_6:
PropertyInternal2 = (int *)v17;
v23 = v18;
return JS_ConcatString3(
a1,
(long long)"[object ",
PropertyInternal2,
v23,
(long long)"]",
v19,
a7,
a8,
a9,
a10,
v20,
v21,
a13,
a14);
}
| js_object_toString:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP EDX,0x3
JZ 0x00172caa
CMP EDX,0x2
JNZ 0x00172cfb
LEA RSI,[0x1a334e]
MOV RDI,RBX
MOV EDX,0x4
JMP 0x00172cb9
LAB_00172caa:
LEA RSI,[0x1a3353]
MOV RDI,RBX
MOV EDX,0x9
LAB_00172cb9:
CALL 0x0011fcd9
LAB_00172cbe:
MOV R12,RAX
MOV R13,RDX
LAB_00172cc4:
LEA RSI,[0x1a335d]
LEA R8,[0x1a0680]
MOV RDI,RBX
MOV RDX,R12
MOV RCX,R13
CALL 0x00142d9d
MOV R14,RAX
MOV R15,RDX
LAB_00172ce6:
MOV RAX,R14
MOV RDX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00172cfb:
MOV RDI,RBX
CALL 0x001268d8
MOV R14,RAX
MOV RBP,RDX
CMP EBP,0x6
JZ 0x00172d4e
CMP EBP,-0x1
JNZ 0x00172d9e
MOVZX EAX,word ptr [R14 + 0x6]
MOV R15D,0x94
CMP EAX,0x2
JZ 0x00172d71
CMP EAX,0x30
JZ 0x00172e74
LAB_00172d30:
MOV R15D,0x9e
CMP AX,0xd
JZ 0x00172d71
MOVZX EAX,AX
CMP EAX,0x30
JNZ 0x00172d53
MOV RAX,qword ptr [R14 + 0x30]
MOVZX EAX,byte ptr [RAX + 0x20]
JMP 0x00172d6d
LAB_00172d4e:
MOV R15,RBP
JMP 0x00172ce6
LAB_00172d53:
MOV RCX,qword ptr [RBX + 0x18]
MOV RCX,qword ptr [RCX + 0x80]
LEA RDX,[RAX + RAX*0x4]
XOR EAX,EAX
CMP qword ptr [RCX + RDX*0x8 + 0x18],0x0
SETNZ AL
LAB_00172d6d:
TEST EAX,EAX
JZ 0x00172d9e
LAB_00172d71:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RBP
MOV ECX,0xda
MOV R8,R14
MOV R9,RBP
PUSH 0x0
PUSH 0x0
CALL 0x00122c0f
ADD RSP,0x10
MOV R12,RAX
MOV R13,RDX
LEA RDX,[RBX + 0x18]
JMP 0x00172dfc
LAB_00172d9e:
MOVZX EAX,word ptr [R14 + 0x6]
MOV R15D,0x93
CMP EAX,0x12
JA 0x00172dcc
MOV ECX,0x40778
BT ECX,EAX
JNC 0x00172dcc
MOV RCX,qword ptr [RBX + 0x18]
MOV RCX,qword ptr [RCX + 0x80]
LEA RAX,[RAX + RAX*0x4]
MOV R15D,dword ptr [RCX + RAX*0x8 + 0x4]
LAB_00172dcc:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RBP
MOV ECX,0xda
MOV R8,R14
MOV R9,RBP
PUSH 0x0
PUSH 0x0
CALL 0x00122c0f
ADD RSP,0x10
MOV R12,RAX
MOV R13,RDX
LEA RDX,[RBX + 0x18]
CMP EBP,-0x9
JC 0x00172e1e
LAB_00172dfc:
MOV RDI,qword ptr [RDX]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x00172e1e
MOV RSI,R14
MOV R14,RDX
MOV RDX,RBP
CALL 0x00120d90
MOV RDX,R14
LAB_00172e1e:
CMP R13D,-0x7
JZ 0x00172cc4
MOV EBP,R15D
MOV R15D,R13D
CMP R13D,0x6
JNZ 0x00172e3c
LAB_00172e34:
XOR R14D,R14D
JMP 0x00172ce6
LAB_00172e3c:
CMP R15D,-0x9
JC 0x00172e60
MOV RDI,qword ptr [RDX]
MOV EAX,dword ptr [R12]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12],ECX
CMP EAX,0x1
JG 0x00172e60
MOV RSI,R12
MOV RDX,R13
CALL 0x00120d90
LAB_00172e60:
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,0x1
CALL 0x00120277
JMP 0x00172cbe
LAB_00172e74:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RBP
CALL 0x00127d0d
TEST EAX,EAX
JS 0x00172e9c
MOV R15D,0x94
JNZ 0x00172d71
MOVZX EAX,word ptr [R14 + 0x6]
JMP 0x00172d30
LAB_00172e9c:
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
MOV R15D,0x6
CMP EAX,0x1
JG 0x00172e34
MOV RSI,R14
MOV RDX,RBP
CALL 0x00120d90
JMP 0x00172e34
|
int1 [16] js_object_toString(long param_1,int8 param_2,int param_3)
{
int8 uVar1;
ushort uVar2;
int iVar3;
int8 uVar4;
uint uVar5;
char *pcVar6;
int *piVar7;
int4 uVar8;
ulong uVar9;
char cVar10;
int1 auVar11 [16];
if (param_3 == 3) {
pcVar6 = "Undefined";
uVar4 = 9;
}
else {
if (param_3 != 2) {
auVar11 = JS_ToObject(param_1);
uVar4 = auVar11._8_8_;
piVar7 = auVar11._0_8_;
uVar5 = auVar11._8_4_;
if (uVar5 == 6) {
return auVar11;
}
if (uVar5 == 0xffffffff) {
uVar2 = *(ushort *)((long)piVar7 + 6);
uVar8 = 0x94;
if (uVar2 != 2) {
if (uVar2 == 0x30) {
iVar3 = js_proxy_isArray(param_1,piVar7,uVar4);
if (iVar3 < 0) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar3 = *piVar7;
*piVar7 = iVar3 + -1;
uVar9 = 6;
if (iVar3 < 2) {
js_free_value_rt(uVar1,piVar7,uVar4);
}
goto LAB_00172e34;
}
uVar8 = 0x94;
if (iVar3 != 0) goto LAB_00172d71;
uVar2 = *(ushort *)((long)piVar7 + 6);
}
uVar8 = 0x9e;
if (uVar2 != 0xd) {
if (uVar2 == 0x30) {
cVar10 = *(char *)(*(long *)(piVar7 + 0xc) + 0x20);
}
else {
cVar10 = *(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x18 +
(ulong)uVar2 * 0x28) != 0;
}
if (cVar10 == '\0') goto LAB_00172d9e;
}
}
LAB_00172d71:
auVar11 = JS_GetPropertyInternal2(param_1,piVar7,uVar4,0xda,piVar7,uVar4,0,0);
LAB_00172dfc:
uVar1 = *(int8 *)(param_1 + 0x18);
iVar3 = *piVar7;
*piVar7 = iVar3 + -1;
if (iVar3 < 2) {
js_free_value_rt(uVar1,piVar7,uVar4);
}
}
else {
LAB_00172d9e:
uVar2 = *(ushort *)((long)piVar7 + 6);
uVar8 = 0x93;
if ((uVar2 < 0x13) && ((0x40778U >> (uVar2 & 0x1f) & 1) != 0)) {
uVar8 = *(int4 *)
(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 4 + (ulong)uVar2 * 0x28);
}
auVar11 = JS_GetPropertyInternal2(param_1,piVar7,uVar4,0xda,piVar7,uVar4,0,0);
if (0xfffffff6 < uVar5) goto LAB_00172dfc;
}
piVar7 = auVar11._0_8_;
uVar5 = auVar11._8_4_;
if (uVar5 != 0xfffffff9) {
uVar9 = auVar11._8_8_ & 0xffffffff;
if (uVar5 == 6) {
LAB_00172e34:
auVar11._8_8_ = 0;
auVar11._0_8_ = uVar9;
return auVar11 << 0x40;
}
if (0xfffffff6 < uVar5) {
uVar4 = *(int8 *)(param_1 + 0x18);
iVar3 = *piVar7;
*piVar7 = iVar3 + -1;
if (iVar3 < 2) {
js_free_value_rt(uVar4,piVar7,auVar11._8_8_);
}
}
auVar11 = __JS_AtomToValue(param_1,uVar8,1);
}
goto LAB_00172cc4;
}
pcVar6 = "Null";
uVar4 = 4;
}
auVar11 = js_new_string8_len(param_1,pcVar6,uVar4);
LAB_00172cc4:
auVar11 = JS_ConcatString3(param_1,"[object ",auVar11._0_8_,auVar11._8_8_,"]");
return auVar11;
}
| |
32,527 | Simulator::printInfo() | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Simulator.cpp | void Simulator::printInfo() {
printf("------------ CPU STATE ------------\n");
printf("PC: 0x%llx\n", this->pc);
for (uint32_t i = 0; i < 32; ++i) {
printf("%s: 0x%.8llx(%lld) ", REGNAME[i], this->reg[i], this->reg[i]);
if (i % 4 == 3)
printf("\n");
}
printf("-----------------------------------\n");
} | O0 | cpp | Simulator::printInfo():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x63ed(%rip), %rdi # 0x29f56
movb $0x0, %al
callq 0x15050
movq (%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x63fc(%rip), %rdi # 0x29f7b
movb $0x0, %al
callq 0x15050
movl $0x0, 0xc(%rsp)
cmpl $0x20, 0xc(%rsp)
jae 0x23bf3
movq (%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, %edx
leaq 0xf68a(%rip), %rcx # 0x33230
movq (%rcx,%rdx,8), %rsi
movl 0xc(%rsp), %ecx
movq 0x10(%rax,%rcx,8), %rdx
movl 0xc(%rsp), %ecx
movq 0x10(%rax,%rcx,8), %rcx
leaq 0x63c4(%rip), %rdi # 0x29f87
movb $0x0, %al
callq 0x15050
movl 0xc(%rsp), %eax
andl $0x3, %eax
cmpl $0x3, %eax
jne 0x23be4
leaq 0x59dd(%rip), %rdi # 0x295ba
movb $0x0, %al
callq 0x15050
jmp 0x23be6
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x23b8e
leaq 0x63a1(%rip), %rdi # 0x29f9b
movb $0x0, %al
callq 0x15050
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN9Simulator9printInfoEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_18], rax
lea rdi, aCpuState; "------------ CPU STATE ------------\n"
mov al, 0
call _printf
mov rax, [rsp+18h+var_18]
mov rsi, [rax+8]
lea rdi, aPc0xLlx; "PC: 0x%llx\n"
mov al, 0
call _printf
mov [rsp+18h+var_C], 0
loc_23B8E:
cmp [rsp+18h+var_C], 20h ; ' '
jnb short loc_23BF3
mov rax, [rsp+18h+var_18]
mov ecx, [rsp+18h+var_C]
mov edx, ecx
lea rcx, _ZN5RISCV7REGNAMEE; RISCV::REGNAME
mov rsi, [rcx+rdx*8]
mov ecx, [rsp+18h+var_C]
mov rdx, [rax+rcx*8+10h]
mov ecx, [rsp+18h+var_C]
mov rcx, [rax+rcx*8+10h]
lea rdi, aS0x8llxLld; "%s: 0x%.8llx(%lld) "
mov al, 0
call _printf
mov eax, [rsp+18h+var_C]
and eax, 3
cmp eax, 3
jnz short loc_23BE4
lea rdi, aMemoryInfo+0Dh; "\n"
mov al, 0
call _printf
loc_23BE4:
jmp short $+2
loc_23BE6:
mov eax, [rsp+18h+var_C]
add eax, 1
mov [rsp+18h+var_C], eax
jmp short loc_23B8E
loc_23BF3:
lea rdi, asc_29F9B; "-----------------------------------\n"
mov al, 0
call _printf
add rsp, 18h
retn
| long long Simulator::printInfo(Simulator *this)
{
unsigned int i; // [rsp+Ch] [rbp-Ch]
printf("------------ CPU STATE ------------\n");
printf("PC: 0x%llx\n", *((_QWORD *)this + 1));
for ( i = 0; i < 0x20; ++i )
{
printf("%s: 0x%.8llx(%lld) ", (&RISCV::REGNAME)[i], *((_QWORD *)this + i + 2), *((_QWORD *)this + i + 2));
if ( (i & 3) == 3 )
printf("\n");
}
return printf("-----------------------------------\n");
}
| printInfo:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
LEA RDI,[0x129f56]
MOV AL,0x0
CALL 0x00115050
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RAX + 0x8]
LEA RDI,[0x129f7b]
MOV AL,0x0
CALL 0x00115050
MOV dword ptr [RSP + 0xc],0x0
LAB_00123b8e:
CMP dword ptr [RSP + 0xc],0x20
JNC 0x00123bf3
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RSP + 0xc]
MOV EDX,ECX
LEA RCX,[0x133230]
MOV RSI,qword ptr [RCX + RDX*0x8]
MOV ECX,dword ptr [RSP + 0xc]
MOV RDX,qword ptr [RAX + RCX*0x8 + 0x10]
MOV ECX,dword ptr [RSP + 0xc]
MOV RCX,qword ptr [RAX + RCX*0x8 + 0x10]
LEA RDI,[0x129f87]
MOV AL,0x0
CALL 0x00115050
MOV EAX,dword ptr [RSP + 0xc]
AND EAX,0x3
CMP EAX,0x3
JNZ 0x00123be4
LEA RDI,[0x1295ba]
MOV AL,0x0
CALL 0x00115050
LAB_00123be4:
JMP 0x00123be6
LAB_00123be6:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00123b8e
LAB_00123bf3:
LEA RDI,[0x129f9b]
MOV AL,0x0
CALL 0x00115050
ADD RSP,0x18
RET
|
/* Simulator::printInfo() */
void __thiscall Simulator::printInfo(Simulator *this)
{
uint local_c;
printf("------------ CPU STATE ------------\n");
printf("PC: 0x%llx\n",*(int8 *)(this + 8));
for (local_c = 0; local_c < 0x20; local_c = local_c + 1) {
printf("%s: 0x%.8llx(%lld) ",*(int8 *)(RISCV::REGNAME + (ulong)local_c * 8),
*(int8 *)(this + (ulong)local_c * 8 + 0x10),
*(int8 *)(this + (ulong)local_c * 8 + 0x10));
if ((local_c & 3) == 3) {
printf("\n");
}
}
printf("-----------------------------------\n");
return;
}
| |
32,528 | Simulator::printInfo() | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Simulator.cpp | void Simulator::printInfo() {
printf("------------ CPU STATE ------------\n");
printf("PC: 0x%llx\n", this->pc);
for (uint32_t i = 0; i < 32; ++i) {
printf("%s: 0x%.8llx(%lld) ", REGNAME[i], this->reg[i], this->reg[i]);
if (i % 4 == 3)
printf("\n");
}
printf("-----------------------------------\n");
} | O2 | cpp | Simulator::printInfo():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x36d2(%rip), %rdi # 0x15f80
callq 0xc300
movq 0x8(%rbx), %rsi
leaq 0x343a(%rip), %rdi # 0x15cf8
xorl %eax, %eax
callq 0xc040
leaq 0x9934(%rip), %r15 # 0x1c200
leaq 0x3431(%rip), %r14 # 0x15d04
pushq $0xa
popq %rbp
xorl %r12d, %r12d
cmpq $0x20, %r12
je 0x1290d
movq (%r15), %rsi
movq 0x10(%rbx,%r12,8), %rcx
movq %r14, %rdi
movq %rcx, %rdx
xorl %eax, %eax
callq 0xc040
movl %r12d, %eax
notl %eax
testb $0x3, %al
jne 0x12904
movl %ebp, %edi
callq 0xc2b0
incq %r12
addq $0x8, %r15
jmp 0x128d9
leaq 0x36dc(%rip), %rdi # 0x15ff0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xc300
nop
| _ZN9Simulator9printInfoEv:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdi
lea rdi, aCpuState_0; "------------ CPU STATE ------------"
call _puts
mov rsi, [rbx+8]
lea rdi, aPc0xLlx; "PC: 0x%llx\n"
xor eax, eax
call _printf
lea r15, _ZN5RISCV7REGNAMEE; RISCV::REGNAME
lea r14, aS0x8llxLld; "%s: 0x%.8llx(%lld) "
push 0Ah
pop rbp
xor r12d, r12d
loc_128D9:
cmp r12, 20h ; ' '
jz short loc_1290D
mov rsi, [r15]
mov rcx, [rbx+r12*8+10h]
mov rdi, r14
mov rdx, rcx
xor eax, eax
call _printf
mov eax, r12d
not eax
test al, 3
jnz short loc_12904
mov edi, ebp
call _putchar
loc_12904:
inc r12
add r15, 8
jmp short loc_128D9
loc_1290D:
lea rdi, asc_15FF0; "-----------------------------------"
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _puts
| long long Simulator::printInfo(Simulator *this)
{
const char **v1; // r15
long long i; // r12
puts("------------ CPU STATE ------------");
printf("PC: 0x%llx\n", *((_QWORD *)this + 1));
v1 = (const char **)&RISCV::REGNAME;
for ( i = 0LL; i != 32; ++i )
{
printf("%s: 0x%.8llx(%lld) ", *v1, *((_QWORD *)this + i + 2), *((_QWORD *)this + i + 2));
if ( (~(_BYTE)i & 3) == 0 )
putchar(10LL);
++v1;
}
return puts("-----------------------------------");
}
| printInfo:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
LEA RDI,[0x115f80]
CALL 0x0010c300
MOV RSI,qword ptr [RBX + 0x8]
LEA RDI,[0x115cf8]
XOR EAX,EAX
CALL 0x0010c040
LEA R15,[0x11c200]
LEA R14,[0x115d04]
PUSH 0xa
POP RBP
XOR R12D,R12D
LAB_001128d9:
CMP R12,0x20
JZ 0x0011290d
MOV RSI,qword ptr [R15]
MOV RCX,qword ptr [RBX + R12*0x8 + 0x10]
MOV RDI,R14
MOV RDX,RCX
XOR EAX,EAX
CALL 0x0010c040
MOV EAX,R12D
NOT EAX
TEST AL,0x3
JNZ 0x00112904
MOV EDI,EBP
CALL 0x0010c2b0
LAB_00112904:
INC R12
ADD R15,0x8
JMP 0x001128d9
LAB_0011290d:
LEA RDI,[0x115ff0]
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0010c300
|
/* Simulator::printInfo() */
void __thiscall Simulator::printInfo(Simulator *this)
{
long lVar1;
int **ppuVar2;
puts("------------ CPU STATE ------------");
printf("PC: 0x%llx\n",*(int8 *)(this + 8));
ppuVar2 = &RISCV::REGNAME;
for (lVar1 = 0; lVar1 != 0x20; lVar1 = lVar1 + 1) {
printf("%s: 0x%.8llx(%lld) ",*ppuVar2,*(int8 *)(this + lVar1 * 8 + 0x10));
if ((~(uint)lVar1 & 3) == 0) {
putchar(10);
}
ppuVar2 = ppuVar2 + 1;
}
puts("-----------------------------------");
return;
}
| |
32,529 | Simulator::printInfo() | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Simulator.cpp | void Simulator::printInfo() {
printf("------------ CPU STATE ------------\n");
printf("PC: 0x%llx\n", this->pc);
for (uint32_t i = 0; i < 32; ++i) {
printf("%s: 0x%.8llx(%lld) ", REGNAME[i], this->reg[i], this->reg[i]);
if (i % 4 == 3)
printf("\n");
}
printf("-----------------------------------\n");
} | O3 | cpp | Simulator::printInfo():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x38a4(%rip), %rdi # 0x15fac
callq 0xb320
movq 0x8(%rbx), %rsi
leaq 0x360c(%rip), %rdi # 0x15d24
xorl %eax, %eax
callq 0xb050
leaq 0x9ada(%rip), %r15 # 0x1c200
leaq 0x3603(%rip), %r14 # 0x15d30
xorl %r12d, %r12d
movq (%r15), %rsi
movq 0x10(%rbx,%r12,8), %rcx
movq %r14, %rdi
movq %rcx, %rdx
xorl %eax, %eax
callq 0xb050
movl %r12d, %eax
notl %eax
testb $0x3, %al
jne 0x12758
movl $0xa, %edi
callq 0xb2d0
incq %r12
addq $0x8, %r15
cmpq $0x20, %r12
jne 0x12730
leaq 0x38b0(%rip), %rdi # 0x1601c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb320
| _ZN9Simulator9printInfoEv:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
lea rdi, aCpuState_0; "------------ CPU STATE ------------"
call _puts
mov rsi, [rbx+8]
lea rdi, aPc0xLlx; "PC: 0x%llx\n"
xor eax, eax
call _printf
lea r15, _ZN5RISCV7REGNAMEE; RISCV::REGNAME
lea r14, aS0x8llxLld; "%s: 0x%.8llx(%lld) "
xor r12d, r12d
loc_12730:
mov rsi, [r15]
mov rcx, [rbx+r12*8+10h]
mov rdi, r14
mov rdx, rcx
xor eax, eax
call _printf
mov eax, r12d
not eax
test al, 3
jnz short loc_12758
mov edi, 0Ah
call _putchar
loc_12758:
inc r12
add r15, 8
cmp r12, 20h ; ' '
jnz short loc_12730
lea rdi, asc_1601C; "-----------------------------------"
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _puts
| long long Simulator::printInfo(Simulator *this)
{
const char **v1; // r15
long long i; // r12
puts("------------ CPU STATE ------------");
printf("PC: 0x%llx\n", *((_QWORD *)this + 1));
v1 = (const char **)&RISCV::REGNAME;
for ( i = 0LL; i != 32; ++i )
{
printf("%s: 0x%.8llx(%lld) ", *v1, *((_QWORD *)this + i + 2), *((_QWORD *)this + i + 2));
if ( (~(_BYTE)i & 3) == 0 )
putchar(10LL);
++v1;
}
return puts("-----------------------------------");
}
| printInfo:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RDI,[0x115fac]
CALL 0x0010b320
MOV RSI,qword ptr [RBX + 0x8]
LEA RDI,[0x115d24]
XOR EAX,EAX
CALL 0x0010b050
LEA R15,[0x11c200]
LEA R14,[0x115d30]
XOR R12D,R12D
LAB_00112730:
MOV RSI,qword ptr [R15]
MOV RCX,qword ptr [RBX + R12*0x8 + 0x10]
MOV RDI,R14
MOV RDX,RCX
XOR EAX,EAX
CALL 0x0010b050
MOV EAX,R12D
NOT EAX
TEST AL,0x3
JNZ 0x00112758
MOV EDI,0xa
CALL 0x0010b2d0
LAB_00112758:
INC R12
ADD R15,0x8
CMP R12,0x20
JNZ 0x00112730
LEA RDI,[0x11601c]
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x0010b320
|
/* Simulator::printInfo() */
void __thiscall Simulator::printInfo(Simulator *this)
{
long lVar1;
int **ppuVar2;
puts("------------ CPU STATE ------------");
printf("PC: 0x%llx\n",*(int8 *)(this + 8));
ppuVar2 = &RISCV::REGNAME;
lVar1 = 0;
do {
printf("%s: 0x%.8llx(%lld) ",*ppuVar2,*(int8 *)(this + lVar1 * 8 + 0x10));
if ((~(uint)lVar1 & 3) == 0) {
putchar(10);
}
lVar1 = lVar1 + 1;
ppuVar2 = ppuVar2 + 1;
} while (lVar1 != 0x20);
puts("-----------------------------------");
return;
}
| |
32,530 | xml_parser_error | eloqsql/storage/maria/libmarias3/src/xml.c | static void xml_parser_error(struct xml_parser* parser, enum xml_parser_offset offset, char const* message) {
int row = 0;
int column = 0;
size_t character = tmp_min(parser->length, parser->position + offset);
size_t position = 0; for (; position < character; ++position) {
column++;
if ('\n' == parser->buffer[position]) {
row++;
column = 0;
}
}
if (NO_CHARACTER != offset) {
fprintf(stderr, "xml_parser_error at %i:%i (is %c): %s\n",
row + 1, column, parser->buffer[character], message
);
} else {
fprintf(stderr, "xml_parser_error at %i:%i: %s\n",
row + 1, column, message
);
}
} | O0 | c | xml_parser_error:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0xc(%rbp), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x178eb
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x178fe
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x17959
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movl $0xa, %eax
cmpl %ecx, %eax
jne 0x17949
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
jmp 0x1794b
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1790e
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl -0xc(%rbp), %eax
je 0x1799a
movq 0xb64e(%rip), %rax # 0x22fb8
movq (%rax), %rdi
movl -0x1c(%rbp), %edx
addl $0x1, %edx
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rsi
movzbl (%rax,%rsi), %r8d
movq -0x18(%rbp), %r9
leaq 0x4e5b(%rip), %rsi # 0x1c7ec
movb $0x0, %al
callq 0xa8a0
jmp 0x179bf
movq 0xb617(%rip), %rax # 0x22fb8
movq (%rax), %rdi
movl -0x1c(%rbp), %edx
addl $0x1, %edx
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %r8
leaq 0x4e5b(%rip), %rsi # 0x1c813
movb $0x0, %al
callq 0xa8a0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| xml_parser_error:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], 0
mov [rbp+var_20], 0
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rcx, [rbp+var_8]
mov rcx, [rcx+8]
movsxd rdx, [rbp+var_C]
add rcx, rdx
cmp rax, rcx
jnb short loc_178EB
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rbp+var_38], rax
jmp short loc_178FE
loc_178EB:
mov rax, [rbp+var_8]
mov rax, [rax+8]
movsxd rcx, [rbp+var_C]
add rax, rcx
mov [rbp+var_38], rax
loc_178FE:
mov rax, [rbp+var_38]
mov [rbp+var_28], rax
mov [rbp+var_30], 0
loc_1790E:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_28]
jnb short loc_17959
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
mov rax, [rbp+var_8]
mov rax, [rax]
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rax+rcx]
mov eax, 0Ah
cmp eax, ecx
jnz short loc_17949
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
mov [rbp+var_20], 0
loc_17949:
jmp short $+2
loc_1794B:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_1790E
loc_17959:
mov eax, 0FFFFFFFFh
cmp eax, [rbp+var_C]
jz short loc_1799A
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov edx, [rbp+var_1C]
add edx, 1
mov ecx, [rbp+var_20]
mov rax, [rbp+var_8]
mov rax, [rax]
mov rsi, [rbp+var_28]
movzx r8d, byte ptr [rax+rsi]
mov r9, [rbp+var_18]
lea rsi, aXmlParserError; "xml_parser_error at %i:%i (is %c): %s\n"
mov al, 0
call _fprintf
jmp short loc_179BF
loc_1799A:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov edx, [rbp+var_1C]
add edx, 1
mov ecx, [rbp+var_20]
mov r8, [rbp+var_18]
lea rsi, aXmlParserError_0; "xml_parser_error at %i:%i: %s\n"
mov al, 0
call _fprintf
loc_179BF:
add rsp, 40h
pop rbp
retn
| long long xml_parser_error(_QWORD *a1, int a2, const char *a3)
{
unsigned long long v4; // [rsp+8h] [rbp-38h]
unsigned long long i; // [rsp+10h] [rbp-30h]
int v6; // [rsp+20h] [rbp-20h]
int v7; // [rsp+24h] [rbp-1Ch]
v7 = 0;
v6 = 0;
if ( a1[2] >= (unsigned long long)(a2 + a1[1]) )
v4 = a2 + a1[1];
else
v4 = a1[2];
for ( i = 0LL; i < v4; ++i )
{
++v6;
if ( *(_BYTE *)(*a1 + i) == 10 )
{
++v7;
v6 = 0;
}
}
if ( a2 == -1 )
return fprintf(stderr, "xml_parser_error at %i:%i: %s\n", v7 + 1, v6, a3);
else
return fprintf(stderr, "xml_parser_error at %i:%i (is %c): %s\n", v7 + 1, v6, *(unsigned __int8 *)(*a1 + v4), a3);
}
| xml_parser_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],0x0
MOV dword ptr [RBP + -0x20],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x8]
MOVSXD RDX,dword ptr [RBP + -0xc]
ADD RCX,RDX
CMP RAX,RCX
JNC 0x001178eb
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001178fe
LAB_001178eb:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001178fe:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x30],0x0
LAB_0011790e:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x00117959
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
MOV EAX,0xa
CMP EAX,ECX
JNZ 0x00117949
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
MOV dword ptr [RBP + -0x20],0x0
LAB_00117949:
JMP 0x0011794b
LAB_0011794b:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0011790e
LAB_00117959:
MOV EAX,0xffffffff
CMP EAX,dword ptr [RBP + -0xc]
JZ 0x0011799a
MOV RAX,qword ptr [0x00122fb8]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RBP + -0x1c]
ADD EDX,0x1
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x28]
MOVZX R8D,byte ptr [RAX + RSI*0x1]
MOV R9,qword ptr [RBP + -0x18]
LEA RSI,[0x11c7ec]
MOV AL,0x0
CALL 0x0010a8a0
JMP 0x001179bf
LAB_0011799a:
MOV RAX,qword ptr [0x00122fb8]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RBP + -0x1c]
ADD EDX,0x1
MOV ECX,dword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x18]
LEA RSI,[0x11c813]
MOV AL,0x0
CALL 0x0010a8a0
LAB_001179bf:
ADD RSP,0x40
POP RBP
RET
|
void xml_parser_error(long *param_1,int param_2,int8 param_3)
{
ulong local_40;
ulong local_38;
uint local_28;
int local_24;
local_24 = 0;
local_28 = 0;
if ((ulong)param_1[2] < (ulong)(param_1[1] + (long)param_2)) {
local_40 = param_1[2];
}
else {
local_40 = param_1[1] + (long)param_2;
}
for (local_38 = 0; local_38 < local_40; local_38 = local_38 + 1) {
local_28 = local_28 + 1;
if (*(char *)(*param_1 + local_38) == '\n') {
local_24 = local_24 + 1;
local_28 = 0;
}
}
if (param_2 == -1) {
fprintf(*(FILE **)PTR_stderr_00122fb8,"xml_parser_error at %i:%i: %s\n",(ulong)(local_24 + 1),
(ulong)local_28,param_3);
}
else {
fprintf(*(FILE **)PTR_stderr_00122fb8,"xml_parser_error at %i:%i (is %c): %s\n",
(ulong)(local_24 + 1),(ulong)local_28,(ulong)*(byte *)(*param_1 + local_40),param_3);
}
return;
}
| |
32,531 | ssz_get | corpus-core[P]colibri-stateless/src/util/ssz_merkle.c | ssz_ob_t ssz_get(ssz_ob_t* ob, const char* name) {
if (ob->def->type != SSZ_TYPE_CONTAINER) return (ssz_ob_t) {0};
for (int i = 0; i < ob->def->def.container.len; i++) {
if (strcmp(ob->def->def.container.elements[i].name, name) == 0) return ssz_get_field(ob, i);
}
log_error("ssz_get: %s not found in %s", name, ob->def->name);
return (ssz_ob_t) {0};
} | O2 | c | ssz_get:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x10(%rsi), %r14
cmpl $0x2, 0x8(%r14)
jne 0x4d20f
movq %rdx, %r15
movq %rsi, (%rsp)
movq %rdi, 0x8(%rsp)
movl 0x18(%r14), %ebp
pushq $0x20
popq %rcx
pushq $0x1
popq %rdx
xorl %esi, %esi
cmpq %rbp, %rsi
je 0x4d21f
movq %rsi, %r13
movq %rcx, %rbx
movq %rdx, %r12
movq 0x10(%r14), %rax
movq %rsi, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rdi
movq %r15, %rsi
callq 0x22400
leaq 0x1(%r13), %rsi
leaq 0x20(%rbx), %rcx
leaq 0x1(%r12), %rdx
testl %eax, %eax
jne 0x4d14e
movq (%rsp), %rax
testq %rax, %rax
je 0x4d22a
cmpq $0x0, 0x8(%rax)
je 0x4d22a
cmpl $0x0, (%rax)
je 0x4d22a
xorl %ecx, %ecx
xorl %r15d, %r15d
movq $0x0, 0x28(%rsp)
movl %ebp, %eax
cmpq %rax, %r15
jae 0x4d22a
movq 0x10(%r14), %rax
movq %rcx, 0x20(%rsp)
movq %rax, 0x18(%rsp)
leaq (%rax,%rcx), %rdi
movq %rdi, %rbp
callq 0x4bc4b
movq %rax, %r14
movq 0x28(%rsp), %rdx
leaq (%rax,%rdx), %rsi
movq (%rsp), %rcx
movl (%rcx), %eax
cmpq %rax, %rsi
ja 0x4d22a
cmpq %r15, %r13
je 0x4d249
incq %r15
movq 0x10(%rcx), %r14
movl 0x18(%r14), %ebp
movq 0x20(%rsp), %rcx
addq $0x20, %rcx
movq %rsi, 0x28(%rsp)
jmp 0x4d1b7
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rdi, %rax
jmp 0x4d23a
xorl %eax, %eax
callq 0x504ab
testl %eax, %eax
jne 0x4d299
xorps %xmm0, %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r13
movq %rdx, %r15
movq %rbp, 0x10(%rsp)
movq %rbp, %rdi
callq 0x4bbf0
testb %al, %al
je 0x4d309
movq (%rsp), %r14
movq %r15, %rdi
addq 0x8(%r14), %rdi
callq 0x4affd
movq %r14, %rcx
movl (%r14), %r14d
subl %eax, %r14d
jae 0x4d35f
xorps %xmm0, %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x4d23a
leaq 0x30(%rsp), %r12
andq $0x0, 0x10(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq (%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rcx
leaq 0x3219a(%rip), %rsi # 0x7f458
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4b737
movq 0x6ecf6(%rip), %rax # 0xbbfc8
movq (%rax), %rdi
movq 0x8(%r12), %r9
leaq 0x2715e(%rip), %rsi # 0x7443f
leaq 0x3218c(%rip), %rdx # 0x7f474
leaq 0x32190(%rip), %rcx # 0x7f47f
movl $0xd1, %r8d
xorl %eax, %eax
callq 0x22140
movq %r12, %rdi
callq 0x4b16d
jmp 0x4d22a
movq (%rsp), %rax
movq %r15, %rdx
addq 0x8(%rax), %rdx
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rcx
cmpl $0x7, 0x8(%rsi,%rcx)
movq 0x8(%rsp), %rax
jne 0x4d34b
testl %r14d, %r14d
je 0x4d3aa
movzbl (%rdx), %edi
cmpl %edi, 0x18(%rsi,%rcx)
jbe 0x4d3aa
shll $0x5, %edi
addq 0x10(%rsi,%rcx), %rdi
decl %r14d
incq %rdx
movl %r14d, (%rax)
andl $0x0, 0x4(%rax)
movq %rdx, 0x8(%rax)
movq %rdi, 0x10(%rax)
jmp 0x4d23a
movl %eax, %edx
addq 0x8(%rcx), %rdx
movq (%rsp), %r15
movq 0x10(%rcx), %rax
movl 0x18(%rax), %ecx
cmpq %rcx, %r12
jae 0x4d314
movq %rdx, %rbp
movq 0x10(%rax), %rdi
addq %rbx, %rdi
callq 0x4bbf0
testb %al, %al
jne 0x4d3b2
movq 0x10(%r15), %rax
movq 0x10(%rax), %rdi
addq %rbx, %rdi
callq 0x4bc4b
movq %r15, %rcx
addq %rax, %r13
addq $0x20, %rbx
incq %r12
movq %rbp, %rdx
jmp 0x4d369
xorps %xmm0, %xmm0
jmp 0x4d232
leaq 0x4(%r13), %rax
movq (%rsp), %rdx
movl (%rdx), %ecx
cmpq %rcx, %rax
ja 0x4d22a
addq 0x8(%rdx), %r13
movq %r13, %rdi
callq 0x4affd
movq (%rsp), %rcx
cmpl (%rcx), %eax
jae 0x4d3e9
addl 0x8(%rcx), %eax
movq %rbp, %rdx
subl %edx, %eax
movl %eax, %r14d
jmp 0x4d314
movq %rbp, %rdx
jmp 0x4d314
| ssz_get:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, [rsi+10h]
cmp dword ptr [r14+8], 2
jnz loc_4D20F
mov r15, rdx
mov [rsp+78h+var_78], rsi
mov [rsp+78h+var_70], rdi
mov ebp, [r14+18h]
push 20h ; ' '
pop rcx
push 1
pop rdx
xor esi, esi
loc_4D14E:
cmp rsi, rbp
jz loc_4D21F
mov r13, rsi
mov rbx, rcx
mov r12, rdx
mov rax, [r14+10h]
mov rcx, rsi
shl rcx, 5
mov rdi, [rax+rcx]
mov rsi, r15
call _strcmp
lea rsi, [r13+1]
lea rcx, [rbx+20h]
lea rdx, [r12+1]
test eax, eax
jnz short loc_4D14E
mov rax, [rsp+78h+var_78]
test rax, rax
jz loc_4D22A
cmp qword ptr [rax+8], 0
jz loc_4D22A
cmp dword ptr [rax], 0
jz loc_4D22A
xor ecx, ecx
xor r15d, r15d
mov [rsp+78h+var_50], 0
loc_4D1B7:
mov eax, ebp
cmp r15, rax
jnb short loc_4D22A
mov rax, [r14+10h]
mov [rsp+78h+var_58], rcx
mov [rsp+78h+var_60], rax
lea rdi, [rax+rcx]
mov rbp, rdi
call ssz_fixed_length
mov r14, rax
mov rdx, [rsp+78h+var_50]
lea rsi, [rax+rdx]
mov rcx, [rsp+78h+var_78]
mov eax, [rcx]
cmp rsi, rax
ja short loc_4D22A
cmp r13, r15
jz short loc_4D249
inc r15
mov r14, [rcx+10h]
mov ebp, [r14+18h]
mov rcx, [rsp+78h+var_58]
add rcx, 20h ; ' '
mov [rsp+78h+var_50], rsi
jmp short loc_4D1B7
loc_4D20F:
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
and qword ptr [rdi+10h], 0
mov rax, rdi
jmp short loc_4D23A
loc_4D21F:
xor eax, eax
call c4_get_log_level
test eax, eax
jnz short loc_4D299
loc_4D22A:
xorps xmm0, xmm0
mov rax, [rsp+78h+var_70]
loc_4D232:
movups xmmword ptr [rax], xmm0
and qword ptr [rax+10h], 0
loc_4D23A:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4D249:
mov r13, rsi
mov r15, rdx
mov [rsp+78h+var_68], rbp
mov rdi, rbp
call ssz_is_dynamic
test al, al
jz loc_4D309
mov r14, [rsp+78h+var_78]
mov rdi, r15
add rdi, [r14+8]
call uint32_from_le
mov rcx, r14
mov r14d, [r14]
sub r14d, eax
jnb loc_4D35F
xorps xmm0, xmm0
mov rax, [rsp+78h+var_70]
movups xmmword ptr [rax], xmm0
mov rcx, [rsp+78h+var_68]
mov [rax+10h], rcx
jmp short loc_4D23A
loc_4D299:
lea r12, [rsp+78h+var_48]
and qword ptr [r12+10h], 0
xorps xmm0, xmm0
movaps xmmword ptr [r12], xmm0
mov rax, [rsp+78h+var_78]
mov rax, [rax+10h]
mov rcx, [rax]
lea rsi, aSszGetSNotFoun; "ssz_get: %s not found in %s"
mov rdi, r12
mov rdx, r15
xor eax, eax
call bprintf
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov r9, [r12+8]
lea rsi, aS0m32mSD0mS; "%s\x1B[0m\x1B[32m %s:%d\x1B[0m %s\n"
lea rdx, a31merror; "\x1B[31mERROR"
lea rcx, aSszGet; "ssz_get"
mov r8d, 0D1h
xor eax, eax
call _fprintf
mov rdi, r12
call buffer_free
jmp loc_4D22A
loc_4D309:
mov rax, [rsp+78h+var_78]
mov rdx, r15
add rdx, [rax+8]
loc_4D314:
mov rsi, [rsp+78h+var_60]
mov rdi, [rsp+78h+var_68]
mov rcx, [rsp+78h+var_58]
cmp dword ptr [rsi+rcx+8], 7
mov rax, [rsp+78h+var_70]
jnz short loc_4D34B
test r14d, r14d
jz short loc_4D3AA
movzx edi, byte ptr [rdx]
cmp [rsi+rcx+18h], edi
jbe short loc_4D3AA
shl edi, 5
add rdi, [rsi+rcx+10h]
dec r14d
inc rdx
loc_4D34B:
mov [rax], r14d
and dword ptr [rax+4], 0
mov [rax+8], rdx
mov [rax+10h], rdi
jmp loc_4D23A
loc_4D35F:
mov edx, eax
add rdx, [rcx+8]
mov r15, [rsp+78h+var_78]
loc_4D369:
mov rax, [rcx+10h]
mov ecx, [rax+18h]
cmp r12, rcx
jnb short loc_4D314
mov rbp, rdx
mov rdi, [rax+10h]
add rdi, rbx
call ssz_is_dynamic
test al, al
jnz short loc_4D3B2
mov rax, [r15+10h]
mov rdi, [rax+10h]
add rdi, rbx
call ssz_fixed_length
mov rcx, r15
add r13, rax
add rbx, 20h ; ' '
inc r12
mov rdx, rbp
jmp short loc_4D369
loc_4D3AA:
xorps xmm0, xmm0
jmp loc_4D232
loc_4D3B2:
lea rax, [r13+4]
mov rdx, [rsp+78h+var_78]
mov ecx, [rdx]
cmp rax, rcx
ja loc_4D22A
add r13, [rdx+8]
mov rdi, r13
call uint32_from_le
mov rcx, [rsp+78h+var_78]
cmp eax, [rcx]
jnb short loc_4D3E9
add eax, [rcx+8]
mov rdx, rbp
sub eax, edx
mov r14d, eax
jmp loc_4D314
loc_4D3E9:
mov rdx, rbp
jmp loc_4D314
| long long ssz_get(long long a1, unsigned int *a2, long long a3)
{
long long v3; // r14
long long v5; // rbp
long long v6; // rcx
long long v7; // rdx
long long v8; // rsi
long long v9; // r13
long long v10; // rbx
unsigned long long v11; // r12
int v12; // eax
long long v13; // rcx
unsigned long long v14; // r15
long long v15; // rbp
long long v16; // rax
unsigned int v17; // r14d
long long result; // rax
long long v19; // r8
long long v20; // r9
__int128 v21; // xmm0
long long v22; // r13
unsigned int v23; // eax
unsigned int *v24; // rcx
unsigned __int8 *j; // rdx
long long v26; // rdi
unsigned int v27; // edi
long long v28; // rax
unsigned __int8 *v29; // rbp
long long v30; // rax
unsigned int v31; // eax
long long v33; // [rsp+8h] [rbp-70h]
long long v34; // [rsp+10h] [rbp-68h]
long long v35; // [rsp+18h] [rbp-60h]
long long v36; // [rsp+20h] [rbp-58h]
long long i; // [rsp+28h] [rbp-50h]
__int128 v38; // [rsp+30h] [rbp-48h] BYREF
long long v39; // [rsp+40h] [rbp-38h]
v3 = *((_QWORD *)a2 + 2);
if ( *(_DWORD *)(v3 + 8) != 2 )
{
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
return a1;
}
v33 = a1;
v5 = *(unsigned int *)(v3 + 24);
v6 = 32LL;
v7 = 1LL;
v8 = 0LL;
do
{
if ( v8 == v5 )
{
if ( (unsigned int)c4_get_log_level(a1, v8, v7, v6) )
{
v39 = 0LL;
v38 = 0LL;
bprintf((unsigned int *)&v38, "ssz_get: %s not found in %s", a3, **((_QWORD **)a2 + 2), v19, v20);
fprintf(
stderr,
"%s\x1B[0m\x1B[32m %s:%d\x1B[0m %s\n",
"\x1B[31mERROR",
"ssz_get",
209,
*((const char **)&v38 + 1));
buffer_free((long long)&v38);
}
goto LABEL_16;
}
v9 = v8;
v10 = v6;
v11 = v7;
a1 = *(_QWORD *)(*(_QWORD *)(v3 + 16) + 32 * v8);
v12 = strcmp(a1, a3);
++v8;
v6 = v10 + 32;
v7 = v11 + 1;
}
while ( v12 );
if ( !a2 || !*((_QWORD *)a2 + 1) || !*a2 )
{
LABEL_16:
v21 = 0LL;
result = v33;
goto LABEL_17;
}
v13 = 0LL;
v14 = 0LL;
for ( i = 0LL; ; i += v16 )
{
if ( v14 >= (unsigned int)v5 )
goto LABEL_16;
v36 = v13;
v35 = *(_QWORD *)(v3 + 16);
v15 = v35 + v13;
v16 = ssz_fixed_length((_DWORD *)(v35 + v13));
v17 = v16;
if ( v16 + i > (unsigned long long)*a2 )
goto LABEL_16;
if ( v9 == v14 )
break;
++v14;
v3 = *((_QWORD *)a2 + 2);
LODWORD(v5) = *(_DWORD *)(v3 + 24);
v13 = v36 + 32;
}
v22 = v16 + i;
v34 = v15;
if ( (unsigned __int8)ssz_is_dynamic(v15) )
{
v23 = uint32_from_le((unsigned int *)(*((_QWORD *)a2 + 1) + i));
v24 = a2;
v17 = *a2 - v23;
if ( *a2 < v23 )
{
result = v33;
*(_OWORD *)v33 = 0LL;
*(_QWORD *)(v33 + 16) = v15;
return result;
}
for ( j = (unsigned __int8 *)(*((_QWORD *)a2 + 1) + v23); ; j = v29 )
{
v28 = *((_QWORD *)v24 + 2);
if ( v11 >= *(unsigned int *)(v28 + 24) )
break;
v29 = j;
if ( (unsigned __int8)ssz_is_dynamic(v10 + *(_QWORD *)(v28 + 16)) )
{
if ( v22 + 4 > (unsigned long long)*a2 )
goto LABEL_16;
v31 = uint32_from_le((unsigned int *)(*((_QWORD *)a2 + 1) + v22));
j = v29;
if ( v31 < *a2 )
v17 = a2[2] + v31 - (_DWORD)v29;
break;
}
v30 = ssz_fixed_length((_DWORD *)(v10 + *(_QWORD *)(*((_QWORD *)a2 + 2) + 16LL)));
v24 = a2;
v22 += v30;
v10 += 32LL;
++v11;
}
}
else
{
j = (unsigned __int8 *)(*((_QWORD *)a2 + 1) + i);
}
v26 = v34;
result = v33;
if ( *(_DWORD *)(v35 + v36 + 8) != 7 )
{
LABEL_26:
*(_DWORD *)v33 = v17;
*(_DWORD *)(v33 + 4) = 0;
*(_QWORD *)(v33 + 8) = j;
*(_QWORD *)(v33 + 16) = v26;
return result;
}
if ( v17 )
{
v27 = *j;
if ( *(_DWORD *)(v35 + v36 + 24) > v27 )
{
v26 = *(_QWORD *)(v35 + v36 + 16) + 32 * v27;
--v17;
++j;
goto LABEL_26;
}
}
v21 = 0LL;
LABEL_17:
*(_OWORD *)result = v21;
*(_QWORD *)(result + 16) = 0LL;
return result;
}
| ssz_get:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,qword ptr [RSI + 0x10]
CMP dword ptr [R14 + 0x8],0x2
JNZ 0x0014d20f
MOV R15,RDX
MOV qword ptr [RSP],RSI
MOV qword ptr [RSP + 0x8],RDI
MOV EBP,dword ptr [R14 + 0x18]
PUSH 0x20
POP RCX
PUSH 0x1
POP RDX
XOR ESI,ESI
LAB_0014d14e:
CMP RSI,RBP
JZ 0x0014d21f
MOV R13,RSI
MOV RBX,RCX
MOV R12,RDX
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,RSI
SHL RCX,0x5
MOV RDI,qword ptr [RAX + RCX*0x1]
MOV RSI,R15
CALL 0x00122400
LEA RSI,[R13 + 0x1]
LEA RCX,[RBX + 0x20]
LEA RDX,[R12 + 0x1]
TEST EAX,EAX
JNZ 0x0014d14e
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x0014d22a
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0014d22a
CMP dword ptr [RAX],0x0
JZ 0x0014d22a
XOR ECX,ECX
XOR R15D,R15D
MOV qword ptr [RSP + 0x28],0x0
LAB_0014d1b7:
MOV EAX,EBP
CMP R15,RAX
JNC 0x0014d22a
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RAX + RCX*0x1]
MOV RBP,RDI
CALL 0x0014bc4b
MOV R14,RAX
MOV RDX,qword ptr [RSP + 0x28]
LEA RSI,[RAX + RDX*0x1]
MOV RCX,qword ptr [RSP]
MOV EAX,dword ptr [RCX]
CMP RSI,RAX
JA 0x0014d22a
CMP R13,R15
JZ 0x0014d249
INC R15
MOV R14,qword ptr [RCX + 0x10]
MOV EBP,dword ptr [R14 + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
ADD RCX,0x20
MOV qword ptr [RSP + 0x28],RSI
JMP 0x0014d1b7
LAB_0014d20f:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
AND qword ptr [RDI + 0x10],0x0
MOV RAX,RDI
JMP 0x0014d23a
LAB_0014d21f:
XOR EAX,EAX
CALL 0x001504ab
TEST EAX,EAX
JNZ 0x0014d299
LAB_0014d22a:
XORPS XMM0,XMM0
MOV RAX,qword ptr [RSP + 0x8]
LAB_0014d232:
MOVUPS xmmword ptr [RAX],XMM0
AND qword ptr [RAX + 0x10],0x0
LAB_0014d23a:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014d249:
MOV R13,RSI
MOV R15,RDX
MOV qword ptr [RSP + 0x10],RBP
MOV RDI,RBP
CALL 0x0014bbf0
TEST AL,AL
JZ 0x0014d309
MOV R14,qword ptr [RSP]
MOV RDI,R15
ADD RDI,qword ptr [R14 + 0x8]
CALL 0x0014affd
MOV RCX,R14
MOV R14D,dword ptr [R14]
SUB R14D,EAX
JNC 0x0014d35f
XORPS XMM0,XMM0
MOV RAX,qword ptr [RSP + 0x8]
MOVUPS xmmword ptr [RAX],XMM0
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x0014d23a
LAB_0014d299:
LEA R12,[RSP + 0x30]
AND qword ptr [R12 + 0x10],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R12],XMM0
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX]
LEA RSI,[0x17f458]
MOV RDI,R12
MOV RDX,R15
XOR EAX,EAX
CALL 0x0014b737
MOV RAX,qword ptr [0x001bbfc8]
MOV RDI,qword ptr [RAX]
MOV R9,qword ptr [R12 + 0x8]
LEA RSI,[0x17443f]
LEA RDX,[0x17f474]
LEA RCX,[0x17f47f]
MOV R8D,0xd1
XOR EAX,EAX
CALL 0x00122140
MOV RDI,R12
CALL 0x0014b16d
JMP 0x0014d22a
LAB_0014d309:
MOV RAX,qword ptr [RSP]
MOV RDX,R15
ADD RDX,qword ptr [RAX + 0x8]
LAB_0014d314:
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x20]
CMP dword ptr [RSI + RCX*0x1 + 0x8],0x7
MOV RAX,qword ptr [RSP + 0x8]
JNZ 0x0014d34b
TEST R14D,R14D
JZ 0x0014d3aa
MOVZX EDI,byte ptr [RDX]
CMP dword ptr [RSI + RCX*0x1 + 0x18],EDI
JBE 0x0014d3aa
SHL EDI,0x5
ADD RDI,qword ptr [RSI + RCX*0x1 + 0x10]
DEC R14D
INC RDX
LAB_0014d34b:
MOV dword ptr [RAX],R14D
AND dword ptr [RAX + 0x4],0x0
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RAX + 0x10],RDI
JMP 0x0014d23a
LAB_0014d35f:
MOV EDX,EAX
ADD RDX,qword ptr [RCX + 0x8]
MOV R15,qword ptr [RSP]
LAB_0014d369:
MOV RAX,qword ptr [RCX + 0x10]
MOV ECX,dword ptr [RAX + 0x18]
CMP R12,RCX
JNC 0x0014d314
MOV RBP,RDX
MOV RDI,qword ptr [RAX + 0x10]
ADD RDI,RBX
CALL 0x0014bbf0
TEST AL,AL
JNZ 0x0014d3b2
MOV RAX,qword ptr [R15 + 0x10]
MOV RDI,qword ptr [RAX + 0x10]
ADD RDI,RBX
CALL 0x0014bc4b
MOV RCX,R15
ADD R13,RAX
ADD RBX,0x20
INC R12
MOV RDX,RBP
JMP 0x0014d369
LAB_0014d3aa:
XORPS XMM0,XMM0
JMP 0x0014d232
LAB_0014d3b2:
LEA RAX,[R13 + 0x4]
MOV RDX,qword ptr [RSP]
MOV ECX,dword ptr [RDX]
CMP RAX,RCX
JA 0x0014d22a
ADD R13,qword ptr [RDX + 0x8]
MOV RDI,R13
CALL 0x0014affd
MOV RCX,qword ptr [RSP]
CMP EAX,dword ptr [RCX]
JNC 0x0014d3e9
ADD EAX,dword ptr [RCX + 0x8]
MOV RDX,RBP
SUB EAX,EDX
MOV R14D,EAX
JMP 0x0014d314
LAB_0014d3e9:
MOV RDX,RBP
JMP 0x0014d314
|
int * ssz_get(int *param_1,uint *param_2,char *param_3)
{
long lVar1;
char cVar2;
int iVar3;
uint uVar4;
long lVar5;
long lVar6;
byte *pbVar7;
long lVar8;
ulong uVar9;
ulong uVar10;
long lVar11;
ulong uVar12;
ulong uVar13;
ulong uVar14;
ulong local_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
lVar11 = *(long *)(param_2 + 4);
if (*(int *)(lVar11 + 8) != 2) {
param_1[0] = 0;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 0;
param_1[4] = 0;
param_1[5] = 0;
return param_1;
}
uVar9 = (ulong)*(uint *)(lVar11 + 0x18);
lVar6 = 0x20;
uVar14 = 1;
uVar13 = 0;
do {
uVar10 = uVar13;
uVar12 = uVar14;
lVar8 = lVar6;
if (uVar10 == uVar9) {
iVar3 = c4_get_log_level();
if (iVar3 != 0) {
local_38 = 0;
local_48 = 0;
uStack_40 = 0;
bprintf(&local_48,"ssz_get: %s not found in %s",param_3,**(int8 **)(param_2 + 4));
fprintf(*(FILE **)PTR_stderr_001bbfc8,"%s\x1b[0m\x1b[32m %s:%d\x1b[0m %s\n",&DAT_0017f474,
"ssz_get",0xd1,uStack_40);
buffer_free(&local_48);
}
goto LAB_0014d232;
}
iVar3 = strcmp(*(char **)(*(long *)(lVar11 + 0x10) + uVar10 * 0x20),param_3);
lVar6 = lVar8 + 0x20;
uVar14 = uVar12 + 1;
uVar13 = uVar10 + 1;
} while (iVar3 != 0);
if (((param_2 != (uint *)0x0) && (*(long *)(param_2 + 2) != 0)) && (*param_2 != 0)) {
lVar6 = 0;
local_50 = 0;
for (uVar14 = 0; uVar14 < uVar9; uVar14 = uVar14 + 1) {
lVar1 = *(long *)(lVar11 + 0x10);
lVar11 = lVar1 + lVar6;
lVar5 = ssz_fixed_length();
iVar3 = (int)lVar5;
uVar13 = lVar5 + local_50;
if (*param_2 < uVar13) break;
if (uVar10 == uVar14) {
cVar2 = ssz_is_dynamic(lVar11);
if (cVar2 == '\0') {
pbVar7 = (byte *)(local_50 + *(long *)(param_2 + 2));
goto LAB_0014d314;
}
uVar4 = uint32_from_le(local_50 + *(long *)(param_2 + 2));
iVar3 = *param_2 - uVar4;
if (*param_2 < uVar4) {
param_1[0] = 0;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 0;
*(long *)(param_1 + 4) = lVar11;
return param_1;
}
pbVar7 = (byte *)((ulong)uVar4 + *(long *)(param_2 + 2));
goto LAB_0014d369;
}
lVar11 = *(long *)(param_2 + 4);
uVar9 = (ulong)*(uint *)(lVar11 + 0x18);
lVar6 = lVar6 + 0x20;
local_50 = uVar13;
}
}
LAB_0014d232:
param_1[0] = 0;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 0;
param_1[4] = 0;
param_1[5] = 0;
return param_1;
LAB_0014d369:
if (*(uint *)(*(long *)(param_2 + 4) + 0x18) <= uVar12) goto LAB_0014d314;
cVar2 = ssz_is_dynamic(*(long *)(*(long *)(param_2 + 4) + 0x10) + lVar8);
if (cVar2 != '\0') {
if ((ulong)*param_2 < uVar13 + 4) goto LAB_0014d232;
uVar4 = uint32_from_le(uVar13 + *(long *)(param_2 + 2));
if (uVar4 < *param_2) {
iVar3 = (uVar4 + param_2[2]) - (int)pbVar7;
}
goto LAB_0014d314;
}
lVar5 = ssz_fixed_length(*(long *)(*(long *)(param_2 + 4) + 0x10) + lVar8);
uVar13 = uVar13 + lVar5;
lVar8 = lVar8 + 0x20;
uVar12 = uVar12 + 1;
goto LAB_0014d369;
LAB_0014d314:
if (*(int *)(lVar1 + 8 + lVar6) == 7) {
if ((iVar3 == 0) || (*(uint *)(lVar1 + 0x18 + lVar6) <= (uint)*pbVar7)) goto LAB_0014d232;
lVar11 = (ulong)*pbVar7 * 0x20 + *(long *)(lVar1 + 0x10 + lVar6);
iVar3 = iVar3 + -1;
pbVar7 = pbVar7 + 1;
}
*param_1 = iVar3;
param_1[1] = 0;
*(byte **)(param_1 + 2) = pbVar7;
*(long *)(param_1 + 4) = lVar11;
return param_1;
}
| |
32,532 | ssz_get | corpus-core[P]colibri-stateless/src/util/ssz_merkle.c | ssz_ob_t ssz_get(ssz_ob_t* ob, const char* name) {
if (ob->def->type != SSZ_TYPE_CONTAINER) return (ssz_ob_t) {0};
for (int i = 0; i < ob->def->def.container.len; i++) {
if (strcmp(ob->def->def.container.elements[i].name, name) == 0) return ssz_get_field(ob, i);
}
log_error("ssz_get: %s not found in %s", name, ob->def->name);
return (ssz_ob_t) {0};
} | O3 | c | ssz_get:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x10(%rsi), %rbx
cmpl $0x2, 0x8(%rbx)
jne 0x552ed
movq %rdx, %r15
movq %rdi, (%rsp)
movq %rsi, 0x30(%rsp)
leaq 0x10(%rsi), %rax
movq %rax, 0x28(%rsp)
movl 0x18(%rbx), %r12d
testq %r12, %r12
je 0x552ca
movq 0x10(%rbx), %r14
negq %r12
movl $0x1, %r13d
movl $0x20, %ebp
movq -0x20(%r14,%rbp), %rdi
movq %r15, %rsi
callq 0x223d0
testl %eax, %eax
je 0x5530d
addq $0x20, %rbp
leaq (%r12,%r13), %rax
incq %rax
incq %r13
cmpq $0x1, %rax
jne 0x552a5
xorl %eax, %eax
callq 0x587f3
testl %eax, %eax
jne 0x55390
xorps %xmm0, %xmm0
movq (%rsp), %rax
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
jmp 0x552fe
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rdi, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%rsp), %rdx
testq %rdx, %rdx
je 0x552d9
cmpq $0x0, 0x8(%rdx)
je 0x552d9
cmpl $0x0, (%rdx)
je 0x552d9
leaq -0x1(%r13), %rax
movq %rax, 0x8(%rsp)
xorl %ecx, %ecx
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%rbx), %rax
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq %rdx, %r14
leaq (%rax,%rcx), %rdi
movq %rdi, 0x20(%rsp)
callq 0x53d08
movq %r12, %rbx
addq %rax, %r12
movl (%r14), %ecx
cmpq %rcx, %r12
ja 0x552d9
cmpq %r15, 0x8(%rsp)
je 0x553a2
movq %r14, %rdx
incq %r15
movq 0x28(%rsp), %rax
movq (%rax), %rbx
movl 0x18(%rbx), %eax
movq 0x10(%rsp), %rcx
addq $0x20, %rcx
cmpq %rax, %r15
jb 0x55334
jmp 0x552d9
movq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x23159
jmp 0x552d9
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x53cc0
testb %al, %al
je 0x553de
movq %rbx, %rdi
addq 0x8(%r14), %rdi
callq 0x52f9d
movl (%r14), %esi
subl %eax, %esi
jae 0x55444
xorps %xmm0, %xmm0
movq (%rsp), %rax
movups %xmm0, (%rax)
movq %r15, 0x10(%rax)
jmp 0x552fe
movq %rbx, %r15
addq 0x8(%r14), %r15
movq (%rsp), %rax
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rdx
movq 0x8(%rsp), %rsi
cmpl $0x7, 0x8(%rdx,%r14)
jne 0x55429
testl %esi, %esi
je 0x55498
movzbl (%r15), %ecx
cmpl %ecx, 0x18(%rdx,%r14)
jbe 0x55498
shll $0x5, %ecx
addq 0x10(%rdx,%r14), %rcx
movq %rcx, 0x20(%rsp)
decl %esi
incq %r15
movl %esi, (%rax)
movl $0x0, 0x4(%rax)
movq %r15, 0x8(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x552fe
movl %eax, %r15d
addq 0x8(%r14), %r15
movq 0x10(%r14), %rax
cmpl 0x18(%rax), %r13d
jae 0x554cf
movq %rsi, 0x8(%rsp)
movq 0x28(%rsp), %rbx
movq 0x10(%rax), %rdi
addq %rbp, %rdi
callq 0x53cc0
testb %al, %al
jne 0x554a0
movq (%rbx), %rax
movq 0x10(%rax), %rdi
addq %rbp, %rdi
callq 0x53d08
addq %rax, %r12
incq %r13
movq (%rbx), %rax
movl 0x18(%rax), %ecx
addq $0x20, %rbp
cmpq %rcx, %r13
jb 0x5545f
jmp 0x553e5
xorps %xmm0, %xmm0
jmp 0x552e0
leaq 0x4(%r12), %rax
movl (%r14), %ecx
cmpq %rcx, %rax
ja 0x552d9
addq 0x8(%r14), %r12
movq %r12, %rdi
callq 0x52f9d
cmpl (%r14), %eax
jae 0x553e5
addl 0x8(%r14), %eax
subl %r15d, %eax
movl %eax, %esi
movq (%rsp), %rax
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rdx
jmp 0x553f8
| ssz_get:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, [rsi+10h]
cmp dword ptr [rbx+8], 2
jnz short loc_552ED
mov r15, rdx
mov [rsp+68h+var_68], rdi
mov [rsp+68h+var_38], rsi
lea rax, [rsi+10h]
mov [rsp+68h+var_40], rax
mov r12d, [rbx+18h]
test r12, r12
jz short loc_552CA
mov r14, [rbx+10h]
neg r12
mov r13d, 1
mov ebp, 20h ; ' '
loc_552A5:
mov rdi, [r14+rbp-20h]
mov rsi, r15
call _strcmp
test eax, eax
jz short loc_5530D
add rbp, 20h ; ' '
lea rax, [r12+r13]
inc rax
inc r13
cmp rax, 1
jnz short loc_552A5
loc_552CA:
xor eax, eax
call c4_get_log_level
test eax, eax
jnz loc_55390
loc_552D9:
xorps xmm0, xmm0
mov rax, [rsp+68h+var_68]
loc_552E0:
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
jmp short loc_552FE
loc_552ED:
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rax, rdi
loc_552FE:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5530D:
mov rdx, [rsp+68h+var_38]
test rdx, rdx
jz short loc_552D9
cmp qword ptr [rdx+8], 0
jz short loc_552D9
cmp dword ptr [rdx], 0
jz short loc_552D9
lea rax, [r13-1]
mov [rsp+68h+var_60], rax
xor ecx, ecx
xor r15d, r15d
xor r12d, r12d
loc_55334:
mov rax, [rbx+10h]
mov [rsp+68h+var_58], rcx
mov [rsp+68h+var_50], rax
mov r14, rdx
lea rdi, [rax+rcx]
mov [rsp+68h+var_48], rdi
call ssz_fixed_length
mov rbx, r12
add r12, rax
mov ecx, [r14]
cmp r12, rcx
ja loc_552D9
cmp [rsp+68h+var_60], r15
jz short loc_553A2
mov rdx, r14
inc r15
mov rax, [rsp+68h+var_40]
mov rbx, [rax]
mov eax, [rbx+18h]
mov rcx, [rsp+68h+var_58]
add rcx, 20h ; ' '
cmp r15, rax
jb short loc_55334
jmp loc_552D9
loc_55390:
mov rdi, [rsp+68h+var_40]
mov rsi, r15
call ssz_get_cold_1
jmp loc_552D9
loc_553A2:
mov [rsp+68h+var_60], rax
mov r15, [rsp+68h+var_48]
mov rdi, r15
call ssz_is_dynamic
test al, al
jz short loc_553DE
mov rdi, rbx
add rdi, [r14+8]
call uint32_from_le
mov esi, [r14]
sub esi, eax
jnb short loc_55444
xorps xmm0, xmm0
mov rax, [rsp+68h+var_68]
movups xmmword ptr [rax], xmm0
mov [rax+10h], r15
jmp loc_552FE
loc_553DE:
mov r15, rbx
add r15, [r14+8]
loc_553E5:
mov rax, [rsp+68h+var_68]
mov r14, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
mov rsi, [rsp+68h+var_60]
loc_553F8:
cmp dword ptr [rdx+r14+8], 7
jnz short loc_55429
test esi, esi
jz loc_55498
movzx ecx, byte ptr [r15]
cmp [rdx+r14+18h], ecx
jbe loc_55498
shl ecx, 5
add rcx, [rdx+r14+10h]
mov [rsp+68h+var_48], rcx
dec esi
inc r15
loc_55429:
mov [rax], esi
mov dword ptr [rax+4], 0
mov [rax+8], r15
mov rcx, [rsp+68h+var_48]
mov [rax+10h], rcx
jmp loc_552FE
loc_55444:
mov r15d, eax
add r15, [r14+8]
mov rax, [r14+10h]
cmp r13d, [rax+18h]
jnb short loc_554CF
mov [rsp+68h+var_60], rsi
mov rbx, [rsp+68h+var_40]
loc_5545F:
mov rdi, [rax+10h]
add rdi, rbp
call ssz_is_dynamic
test al, al
jnz short loc_554A0
mov rax, [rbx]
mov rdi, [rax+10h]
add rdi, rbp
call ssz_fixed_length
add r12, rax
inc r13
mov rax, [rbx]
mov ecx, [rax+18h]
add rbp, 20h ; ' '
cmp r13, rcx
jb short loc_5545F
jmp loc_553E5
loc_55498:
xorps xmm0, xmm0
jmp loc_552E0
loc_554A0:
lea rax, [r12+4]
mov ecx, [r14]
cmp rax, rcx
ja loc_552D9
add r12, [r14+8]
mov rdi, r12
call uint32_from_le
cmp eax, [r14]
jnb loc_553E5
add eax, [r14+8]
sub eax, r15d
mov esi, eax
loc_554CF:
mov rax, [rsp+68h+var_68]
mov r14, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
jmp loc_553F8
| long long ssz_get(long long a1, unsigned int *a2, long long a3)
{
unsigned int *v3; // rbx
long long v5; // r14
long long v6; // r12
unsigned long long v7; // r13
long long v8; // rbp
long long v9; // rax
long long v10; // rdx
long long v11; // rcx
int v12; // r8d
int v13; // r9d
__int128 v14; // xmm0
long long result; // rax
unsigned int *v16; // rdx
long long v17; // rcx
unsigned long long v18; // r15
unsigned long long v19; // r12
unsigned int *v20; // r14
long long v21; // rax
unsigned long long v22; // rbx
unsigned int v23; // eax
unsigned int v24; // esi
unsigned __int8 *v25; // r15
long long v26; // r14
long long v27; // rdx
unsigned int v28; // ecx
unsigned int *v29; // rax
unsigned int v30; // eax
unsigned int v31; // [rsp+8h] [rbp-60h]
long long v32; // [rsp+10h] [rbp-58h]
long long v33; // [rsp+18h] [rbp-50h]
long long v34; // [rsp+20h] [rbp-48h]
unsigned int **v35; // [rsp+28h] [rbp-40h]
v3 = (unsigned int *)*((_QWORD *)a2 + 2);
if ( v3[2] == 2 )
{
v35 = (unsigned int **)(a2 + 4);
if ( v3[6] )
{
v5 = *((_QWORD *)v3 + 2);
v6 = -(long long)v3[6];
v7 = 1LL;
v8 = 32LL;
while ( (unsigned int)strcmp(*(_QWORD *)(v5 + v8 - 32), a3) )
{
v8 += 32LL;
v9 = v6 + v7++ + 1;
if ( v9 == 1 )
goto LABEL_6;
}
v16 = a2;
if ( a2 && *((_QWORD *)a2 + 1) && *a2 )
{
v17 = 0LL;
v18 = 0LL;
v19 = 0LL;
while ( 1 )
{
v32 = v17;
v33 = *((_QWORD *)v3 + 2);
v20 = v16;
v34 = v33 + v17;
v21 = ssz_fixed_length(v33 + v17);
v22 = v19;
v19 += v21;
if ( v19 > *v20 )
goto LABEL_8;
if ( v7 - 1 == v18 )
break;
v16 = v20;
++v18;
v3 = *v35;
v17 = v32 + 32;
if ( v18 >= (*v35)[6] )
goto LABEL_8;
}
v31 = v21;
if ( !(unsigned __int8)ssz_is_dynamic(v34) )
{
v25 = (unsigned __int8 *)(*((_QWORD *)v20 + 1) + v22);
goto LABEL_23;
}
v23 = uint32_from_le((unsigned int *)(*((_QWORD *)v20 + 1) + v22));
v24 = *v20 - v23;
if ( *v20 < v23 )
{
result = a1;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = v34;
return result;
}
v25 = (unsigned __int8 *)(*((_QWORD *)v20 + 1) + v23);
v29 = (unsigned int *)*((_QWORD *)v20 + 2);
if ( (unsigned int)v7 >= v29[6] )
goto LABEL_38;
v31 = v24;
while ( !(unsigned __int8)ssz_is_dynamic(v8 + *((_QWORD *)v29 + 2)) )
{
v19 += ssz_fixed_length(v8 + *((_QWORD *)*v35 + 2));
++v7;
v29 = *v35;
v8 += 32LL;
if ( v7 >= (*v35)[6] )
goto LABEL_23;
}
if ( v19 + 4 <= *v20 )
{
v30 = uint32_from_le((unsigned int *)(*((_QWORD *)v20 + 1) + v19));
if ( v30 < *v20 )
{
v24 = v20[2] + v30 - (_DWORD)v25;
LABEL_38:
result = a1;
v26 = v32;
v27 = v33;
goto LABEL_24;
}
LABEL_23:
result = a1;
v26 = v32;
v27 = v33;
v24 = v31;
LABEL_24:
if ( *(_DWORD *)(v27 + v26 + 8) != 7 )
{
LABEL_28:
*(_DWORD *)result = v24;
*(_DWORD *)(result + 4) = 0;
*(_QWORD *)(result + 8) = v25;
*(_QWORD *)(result + 16) = v34;
return result;
}
if ( v24 )
{
v28 = *v25;
if ( *(_DWORD *)(v27 + v26 + 24) > v28 )
{
v34 = *(_QWORD *)(v27 + v26 + 16) + 32 * v28;
--v24;
++v25;
goto LABEL_28;
}
}
v14 = 0LL;
goto LABEL_9;
}
}
}
else
{
LABEL_6:
if ( (unsigned int)c4_get_log_level() )
ssz_get_cold_1((_QWORD **)v35, a3, v10, v11, v12, v13);
}
LABEL_8:
v14 = 0LL;
result = a1;
LABEL_9:
*(_OWORD *)result = v14;
*(_QWORD *)(result + 16) = 0LL;
return result;
}
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
return a1;
}
| ssz_get:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,qword ptr [RSI + 0x10]
CMP dword ptr [RBX + 0x8],0x2
JNZ 0x001552ed
MOV R15,RDX
MOV qword ptr [RSP],RDI
MOV qword ptr [RSP + 0x30],RSI
LEA RAX,[RSI + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOV R12D,dword ptr [RBX + 0x18]
TEST R12,R12
JZ 0x001552ca
MOV R14,qword ptr [RBX + 0x10]
NEG R12
MOV R13D,0x1
MOV EBP,0x20
LAB_001552a5:
MOV RDI,qword ptr [R14 + RBP*0x1 + -0x20]
MOV RSI,R15
CALL 0x001223d0
TEST EAX,EAX
JZ 0x0015530d
ADD RBP,0x20
LEA RAX,[R12 + R13*0x1]
INC RAX
INC R13
CMP RAX,0x1
JNZ 0x001552a5
LAB_001552ca:
XOR EAX,EAX
CALL 0x001587f3
TEST EAX,EAX
JNZ 0x00155390
LAB_001552d9:
XORPS XMM0,XMM0
MOV RAX,qword ptr [RSP]
LAB_001552e0:
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
JMP 0x001552fe
LAB_001552ed:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,RDI
LAB_001552fe:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015530d:
MOV RDX,qword ptr [RSP + 0x30]
TEST RDX,RDX
JZ 0x001552d9
CMP qword ptr [RDX + 0x8],0x0
JZ 0x001552d9
CMP dword ptr [RDX],0x0
JZ 0x001552d9
LEA RAX,[R13 + -0x1]
MOV qword ptr [RSP + 0x8],RAX
XOR ECX,ECX
XOR R15D,R15D
XOR R12D,R12D
LAB_00155334:
MOV RAX,qword ptr [RBX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x18],RAX
MOV R14,RDX
LEA RDI,[RAX + RCX*0x1]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x00153d08
MOV RBX,R12
ADD R12,RAX
MOV ECX,dword ptr [R14]
CMP R12,RCX
JA 0x001552d9
CMP qword ptr [RSP + 0x8],R15
JZ 0x001553a2
MOV RDX,R14
INC R15
MOV RAX,qword ptr [RSP + 0x28]
MOV RBX,qword ptr [RAX]
MOV EAX,dword ptr [RBX + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
ADD RCX,0x20
CMP R15,RAX
JC 0x00155334
JMP 0x001552d9
LAB_00155390:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,R15
CALL 0x00123159
JMP 0x001552d9
LAB_001553a2:
MOV qword ptr [RSP + 0x8],RAX
MOV R15,qword ptr [RSP + 0x20]
MOV RDI,R15
CALL 0x00153cc0
TEST AL,AL
JZ 0x001553de
MOV RDI,RBX
ADD RDI,qword ptr [R14 + 0x8]
CALL 0x00152f9d
MOV ESI,dword ptr [R14]
SUB ESI,EAX
JNC 0x00155444
XORPS XMM0,XMM0
MOV RAX,qword ptr [RSP]
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],R15
JMP 0x001552fe
LAB_001553de:
MOV R15,RBX
ADD R15,qword ptr [R14 + 0x8]
LAB_001553e5:
MOV RAX,qword ptr [RSP]
MOV R14,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
LAB_001553f8:
CMP dword ptr [RDX + R14*0x1 + 0x8],0x7
JNZ 0x00155429
TEST ESI,ESI
JZ 0x00155498
MOVZX ECX,byte ptr [R15]
CMP dword ptr [RDX + R14*0x1 + 0x18],ECX
JBE 0x00155498
SHL ECX,0x5
ADD RCX,qword ptr [RDX + R14*0x1 + 0x10]
MOV qword ptr [RSP + 0x20],RCX
DEC ESI
INC R15
LAB_00155429:
MOV dword ptr [RAX],ESI
MOV dword ptr [RAX + 0x4],0x0
MOV qword ptr [RAX + 0x8],R15
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001552fe
LAB_00155444:
MOV R15D,EAX
ADD R15,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [R14 + 0x10]
CMP R13D,dword ptr [RAX + 0x18]
JNC 0x001554cf
MOV qword ptr [RSP + 0x8],RSI
MOV RBX,qword ptr [RSP + 0x28]
LAB_0015545f:
MOV RDI,qword ptr [RAX + 0x10]
ADD RDI,RBP
CALL 0x00153cc0
TEST AL,AL
JNZ 0x001554a0
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + 0x10]
ADD RDI,RBP
CALL 0x00153d08
ADD R12,RAX
INC R13
MOV RAX,qword ptr [RBX]
MOV ECX,dword ptr [RAX + 0x18]
ADD RBP,0x20
CMP R13,RCX
JC 0x0015545f
JMP 0x001553e5
LAB_00155498:
XORPS XMM0,XMM0
JMP 0x001552e0
LAB_001554a0:
LEA RAX,[R12 + 0x4]
MOV ECX,dword ptr [R14]
CMP RAX,RCX
JA 0x001552d9
ADD R12,qword ptr [R14 + 0x8]
MOV RDI,R12
CALL 0x00152f9d
CMP EAX,dword ptr [R14]
JNC 0x001553e5
ADD EAX,dword ptr [R14 + 0x8]
SUB EAX,R15D
MOV ESI,EAX
LAB_001554cf:
MOV RAX,qword ptr [RSP]
MOV R14,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
JMP 0x001553f8
|
uint * ssz_get(uint *param_1,uint *param_2,char *param_3)
{
uint *puVar1;
char cVar2;
int iVar3;
uint uVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
uint uVar9;
ulong uVar10;
ulong uVar11;
ulong uVar12;
ulong uVar13;
byte *pbVar14;
bool bVar15;
ulong local_60;
long local_48;
lVar7 = *(long *)(param_2 + 4);
if (*(int *)(lVar7 + 8) != 2) {
param_1[0] = 0;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 0;
param_1[4] = 0;
param_1[5] = 0;
return param_1;
}
puVar1 = param_2 + 4;
uVar9 = *(uint *)(lVar7 + 0x18);
if ((ulong)uVar9 != 0) {
lVar6 = *(long *)(lVar7 + 0x10);
lVar8 = 0x20;
uVar12 = 1;
do {
iVar3 = strcmp(*(char **)(lVar6 + -0x20 + lVar8),param_3);
if (iVar3 == 0) {
if (((param_2 == (uint *)0x0) || (*(long *)(param_2 + 2) == 0)) || (*param_2 == 0))
goto LAB_001552e0;
lVar6 = 0;
uVar13 = 0;
uVar10 = 0;
goto LAB_00155334;
}
lVar8 = lVar8 + 0x20;
bVar15 = uVar12 != uVar9;
uVar12 = uVar12 + 1;
} while (bVar15);
}
iVar3 = c4_get_log_level();
if (iVar3 != 0) {
ssz_get_cold_1(puVar1,param_3);
}
goto LAB_001552e0;
while( true ) {
lVar5 = ssz_fixed_length(*(long *)(*(long *)puVar1 + 0x10) + lVar8);
uVar11 = uVar11 + lVar5;
uVar12 = uVar12 + 1;
lVar5 = *(long *)puVar1;
lVar8 = lVar8 + 0x20;
if (*(uint *)(lVar5 + 0x18) <= uVar12) break;
LAB_0015545f:
cVar2 = ssz_is_dynamic(*(long *)(lVar5 + 0x10) + lVar8);
if (cVar2 != '\0') {
if ((ulong)*param_2 < uVar11 + 4) goto LAB_001552e0;
uVar9 = uint32_from_le(uVar11 + *(long *)(param_2 + 2));
if (uVar9 < *param_2) {
uVar9 = (uVar9 + param_2[2]) - (int)pbVar14;
goto LAB_001553f8;
}
break;
}
}
LAB_001553e5:
uVar9 = (uint)local_60;
LAB_001553f8:
if (*(int *)(lVar7 + 8 + lVar6) == 7) {
if ((uVar9 == 0) || (*(uint *)(lVar7 + 0x18 + lVar6) <= (uint)*pbVar14)) goto LAB_001552e0;
local_48 = (ulong)*pbVar14 * 0x20 + *(long *)(lVar7 + 0x10 + lVar6);
uVar9 = uVar9 - 1;
pbVar14 = pbVar14 + 1;
}
*param_1 = uVar9;
param_1[1] = 0;
*(byte **)(param_1 + 2) = pbVar14;
*(long *)(param_1 + 4) = local_48;
return param_1;
while( true ) {
if (uVar12 - 1 == uVar13) {
cVar2 = ssz_is_dynamic(local_48);
if (cVar2 == '\0') {
pbVar14 = (byte *)(uVar10 + *(long *)(param_2 + 2));
goto LAB_001553e5;
}
uVar4 = uint32_from_le(uVar10 + *(long *)(param_2 + 2));
uVar9 = *param_2 - uVar4;
local_60 = (ulong)uVar9;
if (*param_2 < uVar4) {
param_1[0] = 0;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 0;
*(long *)(param_1 + 4) = local_48;
return param_1;
}
pbVar14 = (byte *)((ulong)uVar4 + *(long *)(param_2 + 2));
lVar5 = *(long *)(param_2 + 4);
if (*(uint *)(lVar5 + 0x18) <= (uint)uVar12) goto LAB_001553f8;
goto LAB_0015545f;
}
uVar13 = uVar13 + 1;
lVar7 = *(long *)puVar1;
lVar6 = lVar6 + 0x20;
uVar10 = uVar11;
if (*(uint *)(lVar7 + 0x18) <= uVar13) break;
LAB_00155334:
lVar7 = *(long *)(lVar7 + 0x10);
local_48 = lVar7 + lVar6;
local_60 = ssz_fixed_length();
uVar11 = uVar10 + local_60;
if (*param_2 < uVar11) break;
}
LAB_001552e0:
param_1[0] = 0;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 0;
param_1[4] = 0;
param_1[5] = 0;
return param_1;
}
| |
32,533 | nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::begin() const | monkey531[P]llama/common/./json.hpp | iteration_proxy_value<IteratorType> begin() const noexcept
{
return iteration_proxy_value<IteratorType>(container->begin());
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::begin() const:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movq %rcx, 0x18(%rsp)
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x94051
cmpl $0x2, %ecx
je 0x94043
cmpl $0x1, %ecx
jne 0x9405c
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x94065
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x94065
movq $0x1, 0x18(%rsp)
jmp 0x94065
movq $0x0, 0x18(%rsp)
movq %rsp, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7884c
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_36detail15iteration_proxyINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE5beginEv:
push rbx
sub rsp, 20h
mov rbx, rdi
mov rax, [rsi]
mov [rsp+28h+var_28], rax
xorps xmm0, xmm0
movups [rsp+28h+var_20], xmm0
mov rcx, 8000000000000000h
mov [rsp+28h+var_10], rcx
movzx ecx, byte ptr [rax]
test ecx, ecx
jz short loc_94051
cmp ecx, 2
jz short loc_94043
cmp ecx, 1
jnz short loc_9405C
mov rax, [rax+8]
mov rax, [rax]
mov qword ptr [rsp+28h+var_20], rax
jmp short loc_94065
loc_94043:
mov rax, [rax+8]
mov rax, [rax]
mov qword ptr [rsp+28h+var_20+8], rax
jmp short loc_94065
loc_94051:
mov [rsp+28h+var_10], 1
jmp short loc_94065
loc_9405C:
mov [rsp+28h+var_10], 0
loc_94065:
mov rsi, rsp
mov rdi, rbx
xor edx, edx
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,ulong)
mov rax, rbx
add rsp, 20h
pop rbx
retn
| long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::begin(
long long a1,
unsigned __int8 **a2)
{
unsigned __int8 *v2; // rax
int v3; // ecx
unsigned __int8 *v5; // [rsp+0h] [rbp-28h] BYREF
__int128 v6; // [rsp+8h] [rbp-20h]
long long v7; // [rsp+18h] [rbp-10h]
v2 = *a2;
v5 = v2;
v6 = 0LL;
v7 = 0x8000000000000000LL;
v3 = *v2;
if ( *v2 )
{
if ( v3 == 2 )
{
*((_QWORD *)&v6 + 1) = **((_QWORD **)v2 + 1);
}
else if ( v3 == 1 )
{
*(_QWORD *)&v6 = **((_QWORD **)v2 + 1);
}
else
{
v7 = 0LL;
}
}
else
{
v7 = 1LL;
}
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value(
a1,
(__int128 *)&v5,
0LL);
return a1;
}
| begin:
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
MOV qword ptr [RSP],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x8],XMM0
MOV RCX,-0x8000000000000000
MOV qword ptr [RSP + 0x18],RCX
MOVZX ECX,byte ptr [RAX]
TEST ECX,ECX
JZ 0x00194051
CMP ECX,0x2
JZ 0x00194043
CMP ECX,0x1
JNZ 0x0019405c
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00194065
LAB_00194043:
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00194065
LAB_00194051:
MOV qword ptr [RSP + 0x18],0x1
JMP 0x00194065
LAB_0019405c:
MOV qword ptr [RSP + 0x18],0x0
LAB_00194065:
MOV RSI,RSP
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0017884c
MOV RAX,RBX
ADD RSP,0x20
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const> >::begin() const */
void nlohmann::json_abi_v3_11_3::detail::
iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::begin(void)
{
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::iteration_proxy_value();
return;
}
| |
32,534 | my_thread_destroy_internal_mutex | eloqsql/mysys/my_thr_init.c | void my_thread_destroy_internal_mutex(void)
{
mysql_mutex_destroy(&THR_LOCK_threads);
mysql_mutex_destroy(&THR_LOCK_malloc);
mysql_cond_destroy(&THR_COND_threads);
} | O3 | c | my_thread_destroy_internal_mutex:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x38c0ac(%rip), %rbx # 0x3d2a28
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x4699a
leaq 0x2d259c(%rip), %rax # 0x318f28
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x38c087(%rip), %rdi # 0x3d2a28
callq 0x263d0
leaq 0x38c0c3(%rip), %rbx # 0x3d2a70
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x469cb
leaq 0x2d256b(%rip), %rax # 0x318f28
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x38c09e(%rip), %rdi # 0x3d2a70
callq 0x263d0
leaq 0x38c0da(%rip), %rax # 0x3d2ab8
movq 0x30(%rax), %rdi
testq %rdi, %rdi
jne 0x469f9
leaq 0x38c0ca(%rip), %rdi # 0x3d2ab8
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x26670
callq 0x2b9b2
jmp 0x469e7
| my_thread_destroy_internal_mutex:
push rbp
mov rbp, rsp
push rbx
push rax
lea rbx, THR_LOCK_threads
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_4699A
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_4699A:
lea rdi, THR_LOCK_threads
call _pthread_mutex_destroy
lea rbx, THR_LOCK_malloc
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_469CB
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_469CB:
lea rdi, THR_LOCK_malloc
call _pthread_mutex_destroy
lea rax, THR_COND_threads
mov rdi, [rax+30h]
test rdi, rdi
jnz short loc_469F9
loc_469E7:
lea rdi, THR_COND_threads
add rsp, 8
pop rbx
pop rbp
jmp _pthread_cond_destroy
loc_469F9:
call my_thread_destroy_internal_mutex_cold_1
jmp short loc_469E7
| long long my_thread_destroy_internal_mutex()
{
long long v0; // rdi
long long v1; // rdi
v0 = THR_LOCK_threads[8];
if ( v0 )
{
((void ( *)(long long))PSI_server[9])(v0);
THR_LOCK_threads[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_threads);
v1 = THR_LOCK_malloc[8];
if ( v1 )
{
((void ( *)(long long))PSI_server[9])(v1);
THR_LOCK_malloc[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_malloc);
if ( THR_COND_threads[6] )
my_thread_destroy_internal_mutex_cold_1();
return pthread_cond_destroy(THR_COND_threads);
}
| my_thread_destroy_internal_mutex:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LEA RBX,[0x4d2a28]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x0014699a
LEA RAX,[0x418f28]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_0014699a:
LEA RDI,[0x4d2a28]
CALL 0x001263d0
LEA RBX,[0x4d2a70]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x001469cb
LEA RAX,[0x418f28]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_001469cb:
LEA RDI,[0x4d2a70]
CALL 0x001263d0
LEA RAX,[0x4d2ab8]
MOV RDI,qword ptr [RAX + 0x30]
TEST RDI,RDI
JNZ 0x001469f9
LAB_001469e7:
LEA RDI,[0x4d2ab8]
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00126670
LAB_001469f9:
CALL 0x0012b9b2
JMP 0x001469e7
|
void my_thread_destroy_internal_mutex(void)
{
if (THR_LOCK_threads._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_threads._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_threads);
if (THR_LOCK_malloc._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_malloc._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_malloc);
if (THR_COND_threads._48_8_ != 0) {
my_thread_destroy_internal_mutex_cold_1();
}
pthread_cond_destroy((pthread_cond_t *)THR_COND_threads);
return;
}
| |
32,535 | minja::Parser::consumeToken(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::SpaceHandling) | llama.cpp/common/minja/minja.hpp | std::string consumeToken(const std::string & token, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
if (std::distance(it, end) >= (int64_t) token.size() && std::string(it, it + token.size()) == token) {
it += token.size();
return token;
}
it = start;
return "";
} | O3 | cpp | minja::Parser::consumeToken(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::SpaceHandling):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x20(%rsi), %r13
movq %rsi, %rdi
movl %ecx, %esi
callq 0xed4fc
movq 0x18(%r15), %rax
movq 0x20(%r15), %rsi
subq %rsi, %rax
movq 0x8(%r14), %rdx
cmpq %rdx, %rax
jl 0xecc5e
addq %rsi, %rdx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x8029a
movq 0x8(%r12), %rdx
cmpq 0x8(%r14), %rdx
jne 0xecc14
movq 0x8(%rsp), %r12
testq %rdx, %rdx
je 0xecc1d
movq (%r14), %rsi
movq %r12, %rdi
callq 0x21c60
testl %eax, %eax
sete %bpl
jmp 0xecc20
movq 0x8(%rsp), %r12
xorl %ebp, %ebp
jmp 0xecc20
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
je 0xecc3a
movq 0x18(%rsp), %rsi
incq %rsi
movq %r12, %rdi
callq 0x21180
testb %bpl, %bpl
je 0xecc5e
movq 0x8(%r14), %rdx
addq %rdx, 0x20(%r15)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x33b24
jmp 0xecc7b
movq %r13, 0x20(%r15)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x40bc9(%rip), %rdx # 0x12d839
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x33c38
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov r13, [rsi+20h]
mov rdi, rsi
mov esi, ecx
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
mov rax, [r15+18h]
mov rsi, [r15+20h]
sub rax, rsi
mov rdx, [r14+8]
cmp rax, rdx
jl loc_ECC5E
add rdx, rsi
lea rax, [rsp+58h+var_40]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
lea r12, [rsp+58h+var_50]
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rdx, [r12+8]
cmp rdx, [r14+8]
jnz short loc_ECC14
mov r12, [rsp+58h+var_50]
test rdx, rdx
jz short loc_ECC1D
mov rsi, [r14]
mov rdi, r12
call _bcmp
test eax, eax
setz bpl
jmp short loc_ECC20
loc_ECC14:
mov r12, [rsp+58h+var_50]
xor ebp, ebp
jmp short loc_ECC20
loc_ECC1D:
mov bpl, 1
loc_ECC20:
lea rax, [rsp+58h+var_40]
cmp r12, rax
jz short loc_ECC3A
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
mov rdi, r12; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_ECC3A:
test bpl, bpl
jz short loc_ECC5E
mov rdx, [r14+8]
add [r15+20h], rdx
lea rax, [rbx+10h]
mov [rbx], rax
mov rsi, [r14]
add rdx, rsi
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
jmp short loc_ECC7B
loc_ECC5E:
mov [r15+20h], r13
lea rax, [rbx+10h]
mov [rbx], rax
lea rdx, aExampleToolCal+1Dh; ""
mov rdi, rbx
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)
loc_ECC7B:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * minja::Parser::consumeToken(_QWORD *a1, long long a2, _BYTE **a3, unsigned int a4)
{
long long v6; // r13
_BYTE *v7; // rsi
_BYTE *v8; // rdx
_QWORD *v9; // r12
bool v10; // bp
_BYTE *v11; // rdx
void *v13; // [rsp+8h] [rbp-50h] BYREF
_BYTE *v14; // [rsp+10h] [rbp-48h]
_QWORD v15[8]; // [rsp+18h] [rbp-40h] BYREF
v6 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, a4);
v7 = *(_BYTE **)(a2 + 32);
v8 = a3[1];
if ( *(_QWORD *)(a2 + 24) - (_QWORD)v7 < (long long)v8 )
goto LABEL_11;
v13 = v15;
v14 = 0LL;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(
(long long)&v13,
v7,
(long long)&v8[(_QWORD)v7]);
if ( v14 == a3[1] )
{
v9 = v13;
v10 = !v14 || (unsigned int)bcmp(v13, *a3) == 0;
}
else
{
v9 = v13;
v10 = 0;
}
if ( v9 != v15 )
operator delete(v9, v15[0] + 1LL);
if ( v10 )
{
v11 = a3[1];
*(_QWORD *)(a2 + 32) += v11;
*a1 = a1 + 2;
std::string::_M_construct<char *>((long long)a1, *a3, (long long)&v11[(_QWORD)*a3]);
}
else
{
LABEL_11:
*(_QWORD *)(a2 + 32) = v6;
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, "", (long long)"");
}
return a1;
}
| consumeToken:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV R13,qword ptr [RSI + 0x20]
MOV RDI,RSI
MOV ESI,ECX
CALL 0x001ed4fc
MOV RAX,qword ptr [R15 + 0x18]
MOV RSI,qword ptr [R15 + 0x20]
SUB RAX,RSI
MOV RDX,qword ptr [R14 + 0x8]
CMP RAX,RDX
JL 0x001ecc5e
ADD RDX,RSI
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x0018029a
MOV RDX,qword ptr [R12 + 0x8]
CMP RDX,qword ptr [R14 + 0x8]
JNZ 0x001ecc14
MOV R12,qword ptr [RSP + 0x8]
TEST RDX,RDX
JZ 0x001ecc1d
MOV RSI,qword ptr [R14]
MOV RDI,R12
CALL 0x00121c60
TEST EAX,EAX
SETZ BPL
JMP 0x001ecc20
LAB_001ecc14:
MOV R12,qword ptr [RSP + 0x8]
XOR EBP,EBP
JMP 0x001ecc20
LAB_001ecc1d:
MOV BPL,0x1
LAB_001ecc20:
LEA RAX,[RSP + 0x18]
CMP R12,RAX
JZ 0x001ecc3a
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
MOV RDI,R12
CALL 0x00121180
LAB_001ecc3a:
TEST BPL,BPL
JZ 0x001ecc5e
MOV RDX,qword ptr [R14 + 0x8]
ADD qword ptr [R15 + 0x20],RDX
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [R14]
ADD RDX,RSI
MOV RDI,RBX
CALL 0x00133b24
JMP 0x001ecc7b
LAB_001ecc5e:
MOV qword ptr [R15 + 0x20],R13
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RDX,[0x22d839]
MOV RDI,RBX
MOV RSI,RDX
CALL 0x00133c38
LAB_001ecc7b:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::Parser::consumeToken(std::__cxx11::string const&, minja::SpaceHandling) */
long * minja::Parser::consumeToken(long *param_1,Parser *param_2,long *param_3,int4 param_4)
{
int8 uVar1;
long lVar2;
long *plVar3;
int iVar4;
bool bVar5;
long *local_50;
size_t local_48;
long local_40 [2];
uVar1 = *(int8 *)(param_2 + 0x20);
consumeSpaces(param_2,param_4);
lVar2 = *(long *)(param_2 + 0x20);
if (param_3[1] <= *(long *)(param_2 + 0x18) - lVar2) {
local_50 = local_40;
local_48 = 0;
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_50,lVar2,param_3[1] + lVar2);
plVar3 = local_50;
if (local_48 == param_3[1]) {
if (local_48 == 0) {
bVar5 = true;
}
else {
iVar4 = bcmp(local_50,(void *)*param_3,local_48);
bVar5 = iVar4 == 0;
}
}
else {
bVar5 = false;
}
if (plVar3 != local_40) {
operator_delete(plVar3,local_40[0] + 1);
}
if (bVar5) {
lVar2 = param_3[1];
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar2;
*param_1 = (long)(param_1 + 2);
std::__cxx11::string::_M_construct<char*>(param_1,*param_3,lVar2 + *param_3);
return param_1;
}
}
*(int8 *)(param_2 + 0x20) = uVar1;
*param_1 = (long)(param_1 + 2);
std::__cxx11::string::_M_construct<char_const*>(param_1,"");
return param_1;
}
| |
32,536 | nglog::ErrnoLogMessage::~ErrnoLogMessage() | ng-log[P]ng-log/src/logging.cc | ErrnoLogMessage::~ErrnoLogMessage() {
// Don't access errno directly because it may have been altered
// while streaming the message.
stream() << ": " << StrError(preserved_errno()) << " [" << preserved_errno()
<< "]";
} | O1 | cpp | nglog::ErrnoLogMessage::~ErrnoLogMessage():
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x7538, %r14d # imm = 0x7538
addq 0x8(%rdi), %r14
leaq 0x1946d(%rip), %rsi # 0x34e60
movl $0x2, %edx
movq %r14, %rdi
callq 0x8720
movq 0x8(%rbx), %rax
movl (%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x1bac3
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x8720
movq %rax, %r14
leaq 0x19135(%rip), %rsi # 0x34b61
movl $0x2, %edx
movq %rax, %rdi
callq 0x8720
movq 0x8(%rbx), %rax
movl (%rax), %esi
movq %r14, %rdi
callq 0x8b90
leaq 0x17b4f(%rip), %rsi # 0x3359d
movl $0x1, %edx
movq %rax, %rdi
callq 0x8720
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ba76
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa9cc
movq %rbx, %rdi
callq 0x1b1b4
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x1ba88
movq %rax, %r14
jmp 0x1baab
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1baab
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa9cc
movq %rbx, %rdi
callq 0x1b1b4
movq %r14, %rdi
callq 0x8bb0
movq %rax, %rdi
callq 0x16adb
| _ZN5nglog15ErrnoLogMessageD2Ev:
push r14; Alternative name is 'nglog::ErrnoLogMessage::~ErrnoLogMessage()'
push rbx
sub rsp, 28h
mov rbx, rdi
mov r14d, 7538h
add r14, [rdi+8]
lea rsi, aRunningDuratio+1Ah; ": "
mov edx, 2
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)
mov rax, [rbx+8]
mov esi, [rax]
lea rdi, [rsp+38h+var_30]
call _ZN5nglog8StrErrorB5cxx11Ei; nglog::StrError(int)
mov rsi, [rsp+38h+var_30]
mov rdx, [rsp+38h+var_28]
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)
mov r14, rax
lea rsi, asc_34B61; " ["
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx+8]
mov esi, [rax]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aTmpTmpSize1+19h; "]"
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)
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1BA76
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_1BA76:
mov rdi, rbx; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
add rsp, 28h
pop rbx
pop r14
retn
jmp short $+2
loc_1BA88:
mov r14, rax
jmp short loc_1BAAB
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1BAAB
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_1BAAB:
mov rdi, rbx; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
mov rdi, r14
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| void nglog::ErrnoLogMessage::~ErrnoLogMessage(nglog::ErrnoLogMessage *this)
{
long long v1; // r14
long long v2; // r14
long long v3; // rax
void *v4[2]; // [rsp+8h] [rbp-30h] BYREF
long long v5; // [rsp+18h] [rbp-20h] BYREF
v1 = *((_QWORD *)this + 1) + 30008LL;
std::__ostream_insert<char,std::char_traits<char>>(v1, ": ", 2LL);
nglog::StrError[abi:cxx11](v4, **((unsigned int **)this + 1));
v2 = std::__ostream_insert<char,std::char_traits<char>>(v1, v4[0], v4[1]);
std::__ostream_insert<char,std::char_traits<char>>(v2, " [", 2LL);
v3 = std::ostream::operator<<(v2, **((unsigned int **)this + 1));
std::__ostream_insert<char,std::char_traits<char>>(v3, "]", 1LL);
if ( v4[0] != &v5 )
operator delete(v4[0]);
nglog::LogMessage::~LogMessage(this);
}
| ~ErrnoLogMessage:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV R14D,0x7538
ADD R14,qword ptr [RDI + 0x8]
LAB_0011b9ec:
LEA RSI,[0x134e60]
MOV EDX,0x2
MOV RDI,R14
CALL 0x00108720
MOV RAX,qword ptr [RBX + 0x8]
MOV ESI,dword ptr [RAX]
LAB_0011ba06:
LEA RDI,[RSP + 0x8]
CALL 0x0011bac3
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0011ba1a:
MOV RDI,R14
CALL 0x00108720
MOV R14,RAX
LEA RSI,[0x134b61]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00108720
MOV RAX,qword ptr [RBX + 0x8]
MOV ESI,dword ptr [RAX]
MOV RDI,R14
CALL 0x00108b90
LEA RSI,[0x13359d]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00108720
LAB_0011ba5b:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011ba76
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0010a9cc
LAB_0011ba76:
MOV RDI,RBX
CALL 0x0011b1b4
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* nglog::ErrnoLogMessage::~ErrnoLogMessage() */
void __thiscall nglog::ErrnoLogMessage::~ErrnoLogMessage(ErrnoLogMessage *this)
{
long lVar1;
ostream *poVar2;
long *local_30;
long local_28;
long local_20 [2];
lVar1 = *(long *)(this + 8);
/* try { // try from 0011b9ec to 0011b9ff has its CatchHandler @ 0011ba88 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(lVar1 + 0x7538),": ",2);
/* try { // try from 0011ba06 to 0011ba0f has its CatchHandler @ 0011ba86 */
StrError_abi_cxx11_((nglog *)&local_30,**(int **)(this + 8));
/* try { // try from 0011ba1a to 0011ba5a has its CatchHandler @ 0011ba8d */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(lVar1 + 0x7538),(char *)local_30,local_28);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," [",2);
poVar2 = (ostream *)std::ostream::operator<<(poVar2,**(int **)(this + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"]",1);
if (local_30 != local_20) {
operator_delete(local_30,local_20[0] + 1);
}
LogMessage::~LogMessage((LogMessage *)this);
return;
}
| |
32,537 | nglog::ErrnoLogMessage::~ErrnoLogMessage() | ng-log[P]ng-log/src/logging.cc | ErrnoLogMessage::~ErrnoLogMessage() {
// Don't access errno directly because it may have been altered
// while streaming the message.
stream() << ": " << StrError(preserved_errno()) << " [" << preserved_errno()
<< "]";
} | O2 | cpp | nglog::ErrnoLogMessage::~ErrnoLogMessage():
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x7538, %edi # imm = 0x7538
addq 0x8(%rbx), %rdi
leaq 0x15502(%rip), %rsi # 0x2ded8
callq 0x8680
movq %rax, %r14
movq 0x8(%rbx), %rax
movl (%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x18a6d
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x85b0
leaq 0x151d7(%rip), %rsi # 0x2dbd9
movq %rax, %rdi
callq 0x8680
movq 0x8(%rbx), %rcx
movl (%rcx), %esi
movq %rax, %rdi
callq 0x8c10
leaq 0x13b93(%rip), %rsi # 0x2c5b2
movq %rax, %rdi
callq 0x8680
leaq 0x8(%rsp), %rdi
callq 0x8d88
movq %rbx, %rdi
callq 0x18352
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x18a43
movq %rax, %r14
jmp 0x18a55
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x8d88
movq %rbx, %rdi
callq 0x18352
movq %r14, %rdi
callq 0x8c30
movq %rax, %rdi
callq 0x142b9
| _ZN5nglog15ErrnoLogMessageD2Ev:
push r14; Alternative name is 'nglog::ErrnoLogMessage::~ErrnoLogMessage()'
push rbx
sub rsp, 28h
mov rbx, rdi
mov edi, 7538h
add rdi, [rbx+8]
lea rsi, aRunningDuratio+1Ah; ": "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov r14, rax
mov rax, [rbx+8]
mov esi, [rax]
lea rdi, [rsp+38h+var_30]
call _ZN5nglog8StrErrorB5cxx11Ei; nglog::StrError(int)
lea rsi, [rsp+38h+var_30]
mov rdi, r14
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, asc_2DBD9; " ["
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rcx, [rbx+8]
mov esi, [rcx]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aTmpTmpSize1+19h; "]"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rdi, [rsp+38h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
add rsp, 28h
pop rbx
pop r14
retn
jmp short $+2
loc_18A43:
mov r14, rax
jmp short loc_18A55
mov r14, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_18A55:
mov rdi, rbx; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
mov rdi, r14
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| void nglog::ErrnoLogMessage::~ErrnoLogMessage(nglog::ErrnoLogMessage *this)
{
long long v1; // r14
long long v2; // rax
long long v3; // rax
long long v4; // rax
_BYTE v5[48]; // [rsp+8h] [rbp-30h] BYREF
v1 = std::operator<<<std::char_traits<char>>(*((_QWORD *)this + 1) + 30008LL, ": ");
nglog::StrError[abi:cxx11](v5, **((unsigned int **)this + 1));
v2 = std::operator<<<char>(v1, v5);
v3 = std::operator<<<std::char_traits<char>>(v2, " [");
v4 = std::ostream::operator<<(v3, **((unsigned int **)this + 1));
std::operator<<<std::char_traits<char>>(v4, "]");
std::string::~string(v5);
nglog::LogMessage::~LogMessage(this);
}
| ~ErrnoLogMessage:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV EDI,0x7538
ADD RDI,qword ptr [RBX + 0x8]
LAB_001189cf:
LEA RSI,[0x12ded8]
CALL 0x00108680
MOV R14,RAX
MOV RAX,qword ptr [RBX + 0x8]
MOV ESI,dword ptr [RAX]
LAB_001189e4:
LEA RDI,[RSP + 0x8]
CALL 0x00118a6d
LAB_001189ee:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x001085b0
LEA RSI,[0x12dbd9]
MOV RDI,RAX
CALL 0x00108680
MOV RCX,qword ptr [RBX + 0x8]
MOV ESI,dword ptr [RCX]
MOV RDI,RAX
CALL 0x00108c10
LEA RSI,[0x12c5b2]
MOV RDI,RAX
CALL 0x00108680
LAB_00118a27:
LEA RDI,[RSP + 0x8]
CALL 0x00108d88
MOV RDI,RBX
CALL 0x00118352
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* nglog::ErrnoLogMessage::~ErrnoLogMessage() */
void __thiscall nglog::ErrnoLogMessage::~ErrnoLogMessage(ErrnoLogMessage *this)
{
ostream *poVar1;
nglog local_30 [32];
/* try { // try from 001189cf to 001189da has its CatchHandler @ 00118a43 */
poVar1 = std::operator<<((ostream *)(*(long *)(this + 8) + 0x7538),": ");
/* try { // try from 001189e4 to 001189ed has its CatchHandler @ 00118a41 */
StrError_abi_cxx11_(local_30,**(int **)(this + 8));
/* try { // try from 001189ee to 00118a26 has its CatchHandler @ 00118a48 */
poVar1 = std::operator<<(poVar1,(string *)local_30);
poVar1 = std::operator<<(poVar1," [");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,**(int **)(this + 8));
std::operator<<(poVar1,"]");
std::__cxx11::string::~string((string *)local_30);
LogMessage::~LogMessage((LogMessage *)this);
return;
}
| |
32,538 | nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...) | ng-log[P]ng-log/src/raw_logging.cc | void RawLog(LogSeverity severity, const char* file, int line,
const char* format, ...) {
if (!(FLAGS_logtostdout || FLAGS_logtostderr ||
severity >= FLAGS_stderrthreshold || FLAGS_alsologtostderr ||
!IsLoggingInitialized())) {
return; // this stderr log message is suppressed
}
// We do not have any any option other that string streams to obtain the
// thread identifier as the corresponding value is not convertible to an
// integer. Use a statically allocated buffer to avoid dynamic memory
// allocations.
StaticStringBuf<kLogBufSize> sbuf;
std::ostream oss(&sbuf);
oss << std::setw(5) << std::this_thread::get_id();
// can't call localtime_r here: it can allocate
char buffer[kLogBufSize];
char* buf = buffer;
size_t size = sizeof(buffer);
// NOTE: this format should match the specification in base/logging.h
DoRawLog(&buf, &size, "%c00000000 00:00:00.000000 %s %s:%d] RAW: ",
GetLogSeverityName(severity)[0], sbuf.data(),
const_basename(const_cast<char*>(file)), line);
// Record the position and size of the buffer after the prefix
const char* msg_start = buf;
const size_t msg_size = size;
va_list ap;
va_start(ap, format);
bool no_chop = VADoRawLog(&buf, &size, format, ap);
va_end(ap);
if (no_chop) {
DoRawLog(&buf, &size, "\n");
} else {
DoRawLog(&buf, &size, "RAW_LOG ERROR: The Message was too long!\n");
}
// We make a raw syscall to write directly to the stderr file descriptor,
// avoiding FILE buffering (to avoid invoking malloc()), and bypassing
// libc (to side-step any libc interception).
// We write just once to avoid races with other invocations of RawLog.
safe_write(fileno(stderr), buffer, strlen(buffer));
if (severity == NGLOG_FATAL) {
std::call_once(crashed, [file, line, msg_start, msg_size] {
crash_reason.filename = file;
crash_reason.line_number = line;
memcpy(crash_buf, msg_start, msg_size); // Don't include prefix
crash_reason.message = crash_buf;
#ifdef HAVE_STACKTRACE
crash_reason.depth =
GetStackTrace(crash_reason.stack, ARRAYSIZE(crash_reason.stack), 1);
#else
crash_reason.depth = 0;
#endif
SetCrashReason(&crash_reason);
});
LogMessage::Fail(); // abort()
}
} | O3 | cpp | nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x19e8, %rsp # imm = 0x19E8
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, 0x28(%rsp)
movl %edi, 0xc(%rsp)
testb %al, %al
je 0x20198
movaps %xmm0, 0x1b0(%rsp)
movaps %xmm1, 0x1c0(%rsp)
movaps %xmm2, 0x1d0(%rsp)
movaps %xmm3, 0x1e0(%rsp)
movaps %xmm4, 0x1f0(%rsp)
movaps %xmm5, 0x200(%rsp)
movaps %xmm6, 0x210(%rsp)
movaps %xmm7, 0x220(%rsp)
movq %r8, 0x1a0(%rsp)
movq %r9, 0x1a8(%rsp)
leaq 0x118d3(%rip), %rax # 0x31a82
cmpb $0x0, (%rax)
je 0x2025c
movq 0x10d79(%rip), %rbx # 0x30f38
addq $0x10, %rbx
leaq 0x270(%rsp), %r14
movq %rbx, -0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, -0x30(%r14)
movups %xmm0, -0x20(%r14)
movups %xmm0, -0x10(%r14)
movq %r14, %rdi
callq 0x7a80
leaq 0x10a08(%rip), %rax # 0x30bf8
movq %rax, -0x38(%r14)
leaq 0x278(%rsp), %r13
leaq 0xe30(%rsp), %rax
movq %r13, -0x18(%r13)
movq %r13, -0x20(%r13)
movq %rax, -0x10(%r13)
movq %r13, -0x38(%r13)
movq %r13, -0x30(%r13)
movq %rax, -0x28(%r13)
leaq 0x70(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x71c0
movq 0x70(%rsp), %rax
movq -0x18(%rax), %rax
movq $0x5, 0x80(%rsp,%rax)
callq 0x7460
testq %rax, %rax
je 0x202a1
leaq 0x70(%rsp), %rdi
movq %rax, %rsi
callq 0x7360
jmp 0x202b7
leaq 0x11817(%rip), %rax # 0x31a7a
cmpb $0x0, (%rax)
jne 0x201b8
leaq 0x11815(%rip), %rax # 0x31a88
movl 0xc(%rsp), %ecx
cmpl %ecx, (%rax)
jle 0x201b8
leaq 0x117f6(%rip), %rax # 0x31a7c
cmpb $0x0, (%rax)
jne 0x201b8
callq 0x21f1c
testb %al, %al
je 0x201b8
jmp 0x20421
leaq 0x45ea(%rip), %rsi # 0x24892
leaq 0x70(%rsp), %rdi
movl $0x24, %edx
callq 0x7600
leaq 0xe30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0xbb8, 0x10(%rsp) # imm = 0xBB8
movl 0xc(%rsp), %edi
callq 0xa594
movsbl (%rax), %ebp
movq 0x260(%rsp), %rax
cmpq 0x258(%rsp), %rax
je 0x20312
movq 0x268(%rsp), %rcx
cmpq %rcx, %rax
je 0x20312
cmpb $0x0, -0x1(%rax)
je 0x20312
cmpq %rcx, %rax
jae 0x20433
movb $0x0, (%rax)
incq 0x260(%rsp)
movq 0x28(%rsp), %rdi
callq 0x21f29
movl %r12d, 0x24(%rsp)
movl %r12d, (%rsp)
leaq 0x4b60(%rip), %rdx # 0x24e8c
leaq 0x18(%rsp), %r14
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %ecx
movq %r13, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x204ab
movq (%r14), %r13
movq (%r12), %rbp
leaq 0x180(%rsp), %rax
leaq 0x30(%rsp), %rcx
movq %rax, 0x10(%rcx)
leaq 0x1a20(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000020, %rax # imm = 0x3000000020
movq %rax, (%rcx)
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x7300
leaq 0x4b26(%rip), %rdx # 0x24eb7
testl %eax, %eax
js 0x203b3
movl %eax, %eax
movq %rbp, %rcx
subq %rax, %rcx
jb 0x203b3
movq %rcx, 0x10(%rsp)
addq %r13, %rax
movq %rax, 0x18(%rsp)
leaq 0x3aa7(%rip), %rdx # 0x23e5a
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x204ab
movq 0x10bcd(%rip), %rax # 0x30f98
movq (%rax), %rdi
callq 0x7570
movl %eax, %r14d
leaq 0xe30(%rsp), %r12
movq %r12, %rdi
callq 0x71f0
movl $0x1, %edi
movl %r14d, %esi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x7080
cmpl $0x3, 0xc(%rsp)
je 0x20448
leaq 0x78(%rsp), %rdi
callq 0x7170
movq %rbx, 0x238(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x77b0
addq $0x19e8, %rsp # imm = 0x19E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x238(%rsp), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x68(%rax)
jmp 0x20312
leaq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, (%rdi)
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rdi)
movq %r13, 0x10(%rdi)
movq %rbp, 0x18(%rdi)
callq 0x20551
callq 0xbc38
movq %rax, %rdi
callq 0x9717
jmp 0x20481
jmp 0x20481
jmp 0x20481
movq %rax, %r14
jmp 0x2048e
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0x7170
movq %rbx, 0x238(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x77b0
movq %r14, %rdi
callq 0x79b0
| _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 19E8h
mov r15, rcx
mov r12d, edx
mov [rsp+1A18h+var_19F0], rsi
mov [rsp+1A18h+var_1A0C], edi
test al, al
jz short loc_20198
movaps [rsp+1A18h+var_1868], xmm0
movaps [rsp+1A18h+var_1858], xmm1
movaps [rsp+1A18h+var_1848], xmm2
movaps [rsp+1A18h+var_1838], xmm3
movaps [rsp+1A18h+var_1828], xmm4
movaps [rsp+1A18h+var_1818], xmm5
movaps [rsp+1A18h+var_1808], xmm6
movaps [rsp+1A18h+var_17F8], xmm7
loc_20198:
mov [rsp+1A18h+var_1878], r8
mov [rsp+1A18h+var_1870], r9
lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout
cmp byte ptr [rax], 0
jz loc_2025C
loc_201B8:
mov rbx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rbx, 10h
lea r14, [rsp+1A18h+var_17A8]
mov [r14-38h], rbx
xorps xmm0, xmm0
movups xmmword ptr [r14-30h], xmm0
movups xmmword ptr [r14-20h], xmm0
movups xmmword ptr [r14-10h], xmm0
mov rdi, r14; this
call __ZNSt6localeC1Ev; std::locale::locale(void)
lea rax, off_30BF8
mov [r14-38h], rax
lea r13, [rsp+1A18h+var_17A0]
lea rax, [rsp+1A18h+var_BE8]
mov [r13-18h], r13
mov [r13-20h], r13
mov [r13-10h], rax
mov [r13-38h], r13
mov [r13-30h], r13
mov [r13-28h], rax
lea rdi, [rsp+1A18h+var_19A8]
lea rsi, [rsp+1A18h+var_17E0]
call __ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::ostream(std::streambuf *)
mov rax, [rsp+1A18h+var_19A8]
mov rax, [rax-18h]
mov [rsp+rax+1A18h+var_1998], 5
call _pthread_self
test rax, rax
jz short loc_202A1
lea rdi, [rsp+1A18h+var_19A8]; this
mov rsi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
jmp short loc_202B7
loc_2025C:
lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr
cmp byte ptr [rax], 0
jnz loc_201B8
lea rax, _ZN3fLI21FLAGS_stderrthresholdE; fLI::FLAGS_stderrthreshold
mov ecx, [rsp+1A18h+var_1A0C]
cmp [rax], ecx
jle loc_201B8
lea rax, _ZN3fLB21FLAGS_alsologtostderrE; fLB::FLAGS_alsologtostderr
cmp byte ptr [rax], 0
jnz loc_201B8
call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void)
test al, al
jz loc_201B8
jmp loc_20421
loc_202A1:
lea rsi, aThreadIdOfANon; "thread::id of a non-executing thread"
lea rdi, [rsp+1A18h+var_19A8]
mov edx, 24h ; '$'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_202B7:
lea rax, [rsp+1A18h+var_BE8]
mov [rsp+1A18h+var_1A00], rax
mov [rsp+1A18h+var_1A08], 0BB8h
mov edi, [rsp+1A18h+var_1A0C]
call _ZN5nglog18GetLogSeverityNameENS_11LogSeverityE; nglog::GetLogSeverityName(nglog::LogSeverity)
movsx ebp, byte ptr [rax]
mov rax, [rsp+1A18h+var_17B8]
cmp rax, [rsp+1A18h+var_17C0]
jz short loc_20312
mov rcx, [rsp+1A18h+var_17B0]
cmp rax, rcx
jz short loc_20312
cmp byte ptr [rax-1], 0
jz short loc_20312
cmp rax, rcx
jnb loc_20433
mov byte ptr [rax], 0
inc [rsp+1A18h+var_17B8]
loc_20312:
mov rdi, [rsp+1A18h+var_19F0]; this
call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*)
mov [rsp+1A18h+var_19F4], r12d
mov [rsp+1A18h+var_1A18], r12d
lea rdx, aC0000000000000; "%c00000000 00:00:00.000000 %s %s:%d] RA"...
lea r14, [rsp+1A18h+var_1A00]
lea r12, [rsp+1A18h+var_1A08]
mov rdi, r14; this
mov rsi, r12; char **
mov ecx, ebp; char *
mov r8, r13
mov r9, rax
xor eax, eax
call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...)
mov r13, [r14]
mov rbp, [r12]
lea rax, [rsp+1A18h+var_1898]
lea rcx, [rsp+1A18h+var_19E8]
mov [rcx+10h], rax
lea rax, [rsp+1A18h+arg_0]
mov [rcx+8], rax
mov rax, 3000000020h
mov [rcx], rax
mov rdi, r13
mov rsi, rbp
mov rdx, r15
call _vsnprintf
lea rdx, aRawLogErrorThe; "RAW_LOG ERROR: The Message was too long"...
test eax, eax
js short loc_203B3
mov eax, eax
mov rcx, rbp
sub rcx, rax; char *
jb short loc_203B3
mov [rsp+1A18h+var_1A08], rcx
add rax, r13
mov [rsp+1A18h+var_1A00], rax
lea rdx, asc_23E59+1; unsigned __int64 *
loc_203B3:
lea rdi, [rsp+1A18h+var_1A00]; this
lea rsi, [rsp+1A18h+var_1A08]; char **
xor eax, eax
call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...)
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fileno
mov r14d, eax
lea r12, [rsp+1A18h+var_BE8]
mov rdi, r12
call _strlen
mov edi, 1
mov esi, r14d
mov rdx, r12
mov rcx, rax
xor eax, eax
call _syscall
cmp [rsp+1A18h+var_1A0C], 3
jz short loc_20448
lea rdi, [rsp+1A18h+var_19A0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov [rsp+1A18h+var_17E0], rbx
lea rdi, [rsp+1A18h+var_17A8]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
loc_20421:
add rsp, 19E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_20433:
lea rdi, [rsp+1A18h+var_17E0]
mov rax, [rdi]
xor esi, esi
call qword ptr [rax+68h]
jmp loc_20312
loc_20448:
lea rdi, [rsp+1A18h+var_19C8]; this
mov rax, [rsp+1A18h+var_19F0]
mov [rdi], rax
mov eax, [rsp+1A18h+var_19F4]
mov [rdi+8], eax
mov [rdi+10h], r13
mov [rdi+18h], rbp
call _ZSt9call_onceIZN5nglog6RawLogENS0_11LogSeverityEPKciS3_zE3$_0JEEvRSt9once_flagOT_DpOT0_; std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>(std::once_flag &,nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0 &&)
call _ZN5nglog10LogMessage4FailEv; nglog::LogMessage::Fail(void)
mov rdi, rax
call __clang_call_terminate
jmp short loc_20481
jmp short loc_20481
jmp short loc_20481
mov r14, rax
jmp short loc_2048E
loc_20481:
mov r14, rax
lea rdi, [rsp+1A18h+var_19A0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_2048E:
mov [rsp+1A18h+var_17E0], rbx
lea rdi, [rsp+1A18h+var_17A8]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdi, r14
call __Unwind_Resume
| void nglog::RawLog(
nglog *a1,
nglog::tools *a2,
int a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
long long v17; // rax
const char *v18; // rsi
unsigned int v19; // ebp
long long v20; // rax
_BYTE *v21; // r13
char *v22; // rbp
unsigned int v23; // eax
const char *v24; // rcx
char *v25; // rdx
unsigned int v26; // r14d
long long v27; // rax
char *v28; // [rsp+10h] [rbp-1A08h] BYREF
_BYTE *v29; // [rsp+18h] [rbp-1A00h] BYREF
int v30; // [rsp+24h] [rbp-19F4h]
nglog::tools *v31; // [rsp+28h] [rbp-19F0h]
_QWORD v32[4]; // [rsp+30h] [rbp-19E8h] BYREF
nglog::tools *v33; // [rsp+50h] [rbp-19C8h] BYREF
int v34; // [rsp+58h] [rbp-19C0h]
_BYTE *v35; // [rsp+60h] [rbp-19B8h]
char *v36; // [rsp+68h] [rbp-19B0h]
long long v37; // [rsp+70h] [rbp-19A8h] BYREF
_BYTE v38[264]; // [rsp+78h] [rbp-19A0h] BYREF
char v39; // [rsp+180h] [rbp-1898h] BYREF
long long v40; // [rsp+1A0h] [rbp-1878h]
long long v41; // [rsp+1A8h] [rbp-1870h]
__m128 v42; // [rsp+1B0h] [rbp-1868h]
__m128 v43; // [rsp+1C0h] [rbp-1858h]
__m128 v44; // [rsp+1D0h] [rbp-1848h]
__m128 v45; // [rsp+1E0h] [rbp-1838h]
__m128 v46; // [rsp+1F0h] [rbp-1828h]
__m128 v47; // [rsp+200h] [rbp-1818h]
__m128 v48; // [rsp+210h] [rbp-1808h]
__m128 v49; // [rsp+220h] [rbp-17F8h]
_QWORD v50[4]; // [rsp+238h] [rbp-17E0h] BYREF
_BYTE *v51; // [rsp+258h] [rbp-17C0h]
_BYTE *v52; // [rsp+260h] [rbp-17B8h]
_BYTE *v53; // [rsp+268h] [rbp-17B0h]
char v54[8]; // [rsp+270h] [rbp-17A8h] BYREF
_BYTE v55[3000]; // [rsp+278h] [rbp-17A0h] BYREF
_BYTE v56[3048]; // [rsp+E30h] [rbp-BE8h] BYREF
v42 = a7;
v43 = a8;
v44 = a9;
v45 = a10;
v46 = a11;
v47 = a12;
v48 = a13;
v49 = a14;
v31 = a2;
v40 = a5;
v41 = a6;
if ( fLB::FLAGS_logtostdout
|| fLB::FLAGS_logtostderr
|| fLI::FLAGS_stderrthreshold <= (int)a1
|| fLB::FLAGS_alsologtostderr
|| !(unsigned __int8)nglog::IsLoggingInitialized(a1) )
{
std::locale::locale((std::locale *)v54);
v50[0] = &off_30BF8;
v52 = v55;
v51 = v55;
v53 = v56;
v50[1] = v55;
v50[2] = v55;
v50[3] = v56;
std::ostream::ostream(&v37, v50);
*(_QWORD *)&v38[*(_QWORD *)(v37 - 24) + 8] = 5LL;
v17 = pthread_self();
if ( v17 )
{
v18 = (const char *)v17;
std::ostream::_M_insert<unsigned long>(&v37);
}
else
{
v18 = "thread::id of a non-executing thread";
std::__ostream_insert<char,std::char_traits<char>>(&v37, "thread::id of a non-executing thread", 36LL);
}
v29 = v56;
v28 = (_BYTE *)&stru_BB8;
v19 = *nglog::GetLogSeverityName((int)a1);
if ( v52 != v51 && v52 != v53 && *(v52 - 1) )
{
if ( v52 >= v53 )
{
v18 = 0LL;
(*(void ( **)(_QWORD *, _QWORD))(v50[0] + 104LL))(v50, 0LL);
}
else
{
*v52++ = 0;
}
}
v20 = nglog::tools::const_basename(v31, v18);
v30 = a3;
nglog::DoRawLog(
(nglog *)&v29,
&v28,
(unsigned long long *)"%c00000000 00:00:00.000000 %s %s:%d] RAW: ",
(const char *)v19,
v55,
v20,
a3);
v21 = v29;
v22 = v28;
v32[2] = &v39;
v32[1] = &a15;
v32[0] = 0x3000000020LL;
v23 = vsnprintf(v29, v28, a4, v32);
v25 = "RAW_LOG ERROR: The Message was too long!\n";
if ( (v23 & 0x80000000) == 0 )
{
v24 = &v22[-v23];
if ( (unsigned long long)v22 >= v23 )
{
v28 = &v22[-v23];
v29 = &v21[v23];
v25 = "\n";
}
}
nglog::DoRawLog((nglog *)&v29, &v28, (unsigned long long *)v25, v24);
v26 = fileno(stderr);
v27 = strlen(v56);
syscall(1LL, v26, v56, v27);
if ( (_DWORD)a1 == 3 )
{
v33 = v31;
v34 = v30;
v35 = v21;
v36 = v22;
std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>();
nglog::LogMessage::Fail((nglog::LogMessage *)&v33);
}
std::ios_base::~ios_base((std::ios_base *)v38);
v50[0] = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((std::locale *)v54);
}
}
| RawLog:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x19e8
MOV R15,RCX
MOV R12D,EDX
MOV qword ptr [RSP + 0x28],RSI
MOV dword ptr [RSP + 0xc],EDI
TEST AL,AL
JZ 0x00120198
MOVAPS xmmword ptr [RSP + 0x1b0],XMM0
MOVAPS xmmword ptr [RSP + 0x1c0],XMM1
MOVAPS xmmword ptr [RSP + 0x1d0],XMM2
MOVAPS xmmword ptr [RSP + 0x1e0],XMM3
MOVAPS xmmword ptr [RSP + 0x1f0],XMM4
MOVAPS xmmword ptr [RSP + 0x200],XMM5
MOVAPS xmmword ptr [RSP + 0x210],XMM6
MOVAPS xmmword ptr [RSP + 0x220],XMM7
LAB_00120198:
MOV qword ptr [RSP + 0x1a0],R8
MOV qword ptr [RSP + 0x1a8],R9
LEA RAX,[0x131a82]
CMP byte ptr [RAX],0x0
JZ 0x0012025c
LAB_001201b8:
MOV RBX,qword ptr [0x00130f38]
ADD RBX,0x10
LEA R14,[RSP + 0x270]
MOV qword ptr [R14 + -0x38],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + -0x30],XMM0
MOVUPS xmmword ptr [R14 + -0x20],XMM0
MOVUPS xmmword ptr [R14 + -0x10],XMM0
MOV RDI,R14
CALL 0x00107a80
LEA RAX,[0x130bf8]
MOV qword ptr [R14 + -0x38],RAX
LEA R13,[RSP + 0x278]
LEA RAX,[RSP + 0xe30]
MOV qword ptr [R13 + -0x18],R13
MOV qword ptr [R13 + -0x20],R13
MOV qword ptr [R13 + -0x10],RAX
MOV qword ptr [R13 + -0x38],R13
MOV qword ptr [R13 + -0x30],R13
MOV qword ptr [R13 + -0x28],RAX
LAB_0012021c:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x238]
CALL 0x001071c0
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RSP + RAX*0x1 + 0x80],0x5
CALL 0x00107460
TEST RAX,RAX
JZ 0x001202a1
LAB_0012024d:
LEA RDI,[RSP + 0x70]
MOV RSI,RAX
CALL 0x00107360
LAB_0012025a:
JMP 0x001202b7
LAB_0012025c:
LEA RAX,[0x131a7a]
CMP byte ptr [RAX],0x0
JNZ 0x001201b8
LEA RAX,[0x131a88]
MOV ECX,dword ptr [RSP + 0xc]
CMP dword ptr [RAX],ECX
JLE 0x001201b8
LEA RAX,[0x131a7c]
CMP byte ptr [RAX],0x0
JNZ 0x001201b8
CALL 0x00121f1c
TEST AL,AL
JZ 0x001201b8
JMP 0x00120421
LAB_001202a1:
LEA RSI,[0x124892]
LEA RDI,[RSP + 0x70]
MOV EDX,0x24
CALL 0x00107600
LAB_001202b7:
LEA RAX,[RSP + 0xe30]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x10],0xbb8
LAB_001202cd:
MOV EDI,dword ptr [RSP + 0xc]
CALL 0x0010a594
MOVSX EBP,byte ptr [RAX]
MOV RAX,qword ptr [RSP + 0x260]
CMP RAX,qword ptr [RSP + 0x258]
JZ 0x00120312
MOV RCX,qword ptr [RSP + 0x268]
CMP RAX,RCX
JZ 0x00120312
CMP byte ptr [RAX + -0x1],0x0
JZ 0x00120312
CMP RAX,RCX
JNC 0x00120433
MOV byte ptr [RAX],0x0
INC qword ptr [RSP + 0x260]
LAB_00120312:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00121f29
MOV dword ptr [RSP + 0x24],R12D
MOV dword ptr [RSP],R12D
LEA RDX,[0x124e8c]
LEA R14,[RSP + 0x18]
LEA R12,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R12
MOV ECX,EBP
MOV R8,R13
MOV R9,RAX
XOR EAX,EAX
CALL 0x001204ab
MOV R13,qword ptr [R14]
MOV RBP,qword ptr [R12]
LEA RAX,[RSP + 0x180]
LEA RCX,[RSP + 0x30]
MOV qword ptr [RCX + 0x10],RAX
LEA RAX,[RSP + 0x1a20]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000020
MOV qword ptr [RCX],RAX
MOV RDI,R13
MOV RSI,RBP
MOV RDX,R15
CALL 0x00107300
LEA RDX,[0x124eb7]
TEST EAX,EAX
JS 0x001203b3
MOV EAX,EAX
MOV RCX,RBP
SUB RCX,RAX
JC 0x001203b3
MOV qword ptr [RSP + 0x10],RCX
ADD RAX,R13
MOV qword ptr [RSP + 0x18],RAX
LEA RDX,[0x123e5a]
LAB_001203b3:
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x10]
XOR EAX,EAX
CALL 0x001204ab
MOV RAX,qword ptr [0x00130f98]
MOV RDI,qword ptr [RAX]
CALL 0x00107570
MOV R14D,EAX
LEA R12,[RSP + 0xe30]
MOV RDI,R12
CALL 0x001071f0
MOV EDI,0x1
MOV ESI,R14D
MOV RDX,R12
MOV RCX,RAX
XOR EAX,EAX
CALL 0x00107080
CMP dword ptr [RSP + 0xc],0x3
JZ 0x00120448
LEA RDI,[RSP + 0x78]
CALL 0x00107170
MOV qword ptr [RSP + 0x238],RBX
LEA RDI,[RSP + 0x270]
CALL 0x001077b0
LAB_00120421:
ADD RSP,0x19e8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00120433:
LEA RDI,[RSP + 0x238]
MOV RAX,qword ptr [RDI]
LAB_0012043e:
XOR ESI,ESI
CALL qword ptr [RAX + 0x68]
JMP 0x00120312
LAB_00120448:
LEA RDI,[RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RDI],RAX
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RDI + 0x8],EAX
MOV qword ptr [RDI + 0x10],R13
MOV qword ptr [RDI + 0x18],RBP
LAB_00120464:
CALL 0x00120551
LAB_00120469:
CALL 0x0010bc38
LAB_0012046e:
MOV RDI,RAX
CALL 0x00109717
|
/* nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...) */
void nglog::RawLog(int4 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int param_9,char *param_10,int4 param_11,char *param_12,int8 param_13,
int8 param_14,...)
{
ulong uVar1;
char in_AL;
char cVar2;
uint uVar3;
pthread_t pVar4;
char *pcVar5;
int8 uVar6;
ulong uVar7;
size_t sVar8;
char *pcVar9;
int **ppuVar10;
__0 *p_Var11;
ulong local_1a08;
char *local_1a00;
int4 local_19f4;
char *local_19f0;
int8 local_19e8;
int1 *local_19e0;
int1 *local_19d8;
char *local_19c8;
int4 local_19c0;
char *local_19b8;
ulong local_19b0;
long local_19a8;
ios_base local_19a0 [8];
int8 auStack_1998 [32];
int1 local_1898 [32];
int8 local_1878;
int8 local_1870;
int4 local_1868;
int8 local_1858;
int8 local_1848;
int8 local_1838;
int8 local_1828;
int8 local_1818;
int8 local_1808;
int8 local_17f8;
int **local_17e0;
char *local_17d8;
char *pcStack_17d0;
char *local_17c8;
char *pcStack_17c0;
char *local_17b8;
char *pcStack_17b0;
locale local_17a8 [8];
char local_17a0 [3000];
char local_be8 [3000];
if (in_AL != '\0') {
local_1868 = param_1;
local_1858 = param_2;
local_1848 = param_3;
local_1838 = param_4;
local_1828 = param_5;
local_1818 = param_6;
local_1808 = param_7;
local_17f8 = param_8;
}
local_19f0 = param_10;
local_1878 = param_13;
local_1870 = param_14;
if ((((fLB::FLAGS_logtostdout != '\0') || (fLB::FLAGS_logtostderr != '\0')) ||
(fLI::FLAGS_stderrthreshold <= param_9)) ||
((fLB::FLAGS_alsologtostderr != '\0' || (cVar2 = IsLoggingInitialized(), cVar2 == '\0')))) {
ppuVar10 = (int **)(PTR_vtable_00130f38 + 0x10);
local_17d8 = (char *)0x0;
pcStack_17d0 = (char *)0x0;
local_17c8 = (char *)0x0;
pcStack_17c0 = (char *)0x0;
local_17b8 = (char *)0x0;
pcStack_17b0 = (char *)0x0;
local_17e0 = ppuVar10;
std::locale::locale(local_17a8);
local_17e0 = &PTR__streambuf_00130bf8;
local_17c8 = local_be8;
/* try { // try from 0012021c to 0012022d has its CatchHandler @ 0012047c */
local_17d8 = local_17a0;
pcStack_17d0 = local_17a0;
pcStack_17c0 = local_17a0;
local_17b8 = local_17a0;
pcStack_17b0 = local_17c8;
std::ostream::ostream((ostream *)&local_19a8,(streambuf *)&local_17e0);
*(int8 *)((long)auStack_1998 + *(long *)(local_19a8 + -0x18)) = 5;
pVar4 = pthread_self();
if (pVar4 == 0) {
/* try { // try from 001202a1 to 001202b6 has its CatchHandler @ 0012047a */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_19a8,"thread::id of a non-executing thread",0x24);
}
else {
/* try { // try from 0012024d to 00120259 has its CatchHandler @ 0012047a */
std::ostream::_M_insert<unsigned_long>((ulong)&local_19a8);
}
local_1a00 = local_be8;
local_1a08 = 3000;
/* try { // try from 001202cd to 0012031b has its CatchHandler @ 00120481 */
pcVar5 = (char *)GetLogSeverityName(param_9);
cVar2 = *pcVar5;
if (((local_17b8 != pcStack_17c0) && (local_17b8 != pcStack_17b0)) && (local_17b8[-1] != '\0'))
{
if (local_17b8 < pcStack_17b0) {
*local_17b8 = '\0';
local_17b8 = local_17b8 + 1;
}
else {
/* try { // try from 0012043e to 00120442 has its CatchHandler @ 0012046e */
(*(code *)local_17e0[0xd])(&local_17e0,0);
}
}
uVar6 = tools::const_basename(local_19f0);
local_19f4 = param_11;
DoRawLog(&local_1a00,&local_1a08,"%c00000000 00:00:00.000000 %s %s:%d] RAW: ",
(ulong)(uint)(int)cVar2,local_17a0,uVar6,param_11);
pcVar5 = local_1a00;
uVar1 = local_1a08;
local_19d8 = local_1898;
local_19e0 = &stack0x00000008;
local_19e8 = 0x3000000020;
uVar3 = vsnprintf(local_1a00,local_1a08,param_12,&local_19e8);
pcVar9 = "RAW_LOG ERROR: The Message was too long!\n";
if (-1 < (int)uVar3) {
uVar7 = (ulong)uVar3;
if (uVar7 <= uVar1) {
local_1a00 = pcVar5 + uVar7;
pcVar9 = "\n";
local_1a08 = uVar1 - uVar7;
}
}
DoRawLog(&local_1a00,&local_1a08,pcVar9);
uVar3 = fileno(*(FILE **)PTR_stderr_00130f98);
sVar8 = strlen(local_be8);
p_Var11 = (__0 *)(ulong)uVar3;
syscall(1,p_Var11,local_be8,sVar8);
if (param_9 == 3) {
local_19c8 = local_19f0;
local_19c0 = local_19f4;
local_19b8 = pcVar5;
local_19b0 = uVar1;
/* try { // try from 00120464 to 00120468 has its CatchHandler @ 00120478 */
std::call_once<nglog::RawLog(nglog::LogSeverity,char_const*,int,char_const*,___)::__0>
((once_flag *)&local_19c8,p_Var11);
/* try { // try from 00120469 to 0012046d has its CatchHandler @ 00120476 */
uVar6 = LogMessage::Fail();
/* catch(type#1 @ 00000000) { ... } // from try @ 0012043e with catch @ 0012046e
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar6);
}
std::ios_base::~ios_base(local_19a0);
local_17e0 = ppuVar10;
std::locale::~locale(local_17a8);
}
return;
}
| |
32,539 | minja::Parser::peekSymbols(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) const | monkey531[P]llama/common/minja.hpp | bool peekSymbols(const std::vector<std::string> & symbols) const {
for (const auto & symbol : symbols) {
if (std::distance(it, end) >= (int64_t) symbol.size() && std::string(it, it + symbol.size()) == symbol) {
return true;
}
}
return false;
} | O2 | cpp | minja::Parser::peekSymbols(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq (%rsi), %rbx
movq 0x8(%rsi), %r12
leaq 0x18(%rsp), %r13
leaq 0x8(%rsp), %r15
cmpq %r12, %rbx
je 0x67015
movq 0x18(%r14), %rax
movq 0x20(%r14), %rsi
subq %rsi, %rax
movq 0x8(%rbx), %rdx
cmpq %rdx, %rax
jl 0x6700f
addq %rsi, %rdx
movq %r13, 0x8(%rsp)
movq %r15, %rdi
callq 0x53f60
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3c1ae
movl %eax, %ebp
movq %r15, %rdi
callq 0x242a8
testb %bpl, %bpl
jne 0x67015
addq $0x20, %rbx
jmp 0x66fcc
cmpq %r12, %rbx
setne %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZNK5minja6Parser11peekSymbolsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rdi
mov rbx, [rsi]
mov r12, [rsi+8]
lea r13, [rsp+58h+var_40]
lea r15, [rsp+58h+var_50]
loc_66FCC:
cmp rbx, r12
jz short loc_67015
mov rax, [r14+18h]
mov rsi, [r14+20h]
sub rax, rsi
mov rdx, [rbx+8]
cmp rax, rdx
jl short loc_6700F
add rdx, rsi
mov [rsp+58h+var_50], r13
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rdi, r15
mov rsi, rbx
call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_
mov ebp, eax
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_67015
loc_6700F:
add rbx, 20h ; ' '
jmp short loc_66FCC
loc_67015:
cmp rbx, r12
setnz al
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| bool minja::Parser::peekSymbols(long long a1, long long a2)
{
_QWORD *v2; // rbx
_QWORD *v3; // r12
_BYTE *v4; // rsi
long long v5; // rdx
bool v6; // bp
_QWORD v8[2]; // [rsp+8h] [rbp-50h] BYREF
char v9; // [rsp+18h] [rbp-40h] BYREF
v2 = *(_QWORD **)a2;
v3 = *(_QWORD **)(a2 + 8);
while ( v2 != v3 )
{
v4 = *(_BYTE **)(a1 + 32);
v5 = v2[1];
if ( *(_QWORD *)(a1 + 24) - (_QWORD)v4 >= v5 )
{
v8[0] = &v9;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(
(long long)v8,
v4,
(long long)&v4[v5]);
v6 = std::operator==<char>(v8, v2);
std::string::~string(v8);
if ( v6 )
break;
}
v2 += 4;
}
return v2 != v3;
}
| peekSymbols:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDI
MOV RBX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
LEA R13,[RSP + 0x18]
LEA R15,[RSP + 0x8]
LAB_00166fcc:
CMP RBX,R12
JZ 0x00167015
MOV RAX,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [R14 + 0x20]
SUB RAX,RSI
MOV RDX,qword ptr [RBX + 0x8]
CMP RAX,RDX
JL 0x0016700f
ADD RDX,RSI
MOV qword ptr [RSP + 0x8],R13
MOV RDI,R15
CALL 0x00153f60
MOV RDI,R15
MOV RSI,RBX
CALL 0x0013c1ae
MOV EBP,EAX
MOV RDI,R15
CALL 0x001242a8
TEST BPL,BPL
JNZ 0x00167015
LAB_0016700f:
ADD RBX,0x20
JMP 0x00166fcc
LAB_00167015:
CMP RBX,R12
SETNZ AL
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::Parser::peekSymbols(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string
> > const&) const */
bool __thiscall minja::Parser::peekSymbols(Parser *this,vector *param_1)
{
string *psVar1;
long lVar2;
char cVar3;
string *psVar4;
int1 *local_50 [2];
int1 local_40 [16];
psVar1 = *(string **)(param_1 + 8);
for (psVar4 = *(string **)param_1; psVar4 != psVar1; psVar4 = psVar4 + 0x20) {
lVar2 = *(long *)(this + 0x20);
if (*(long *)(psVar4 + 8) <= *(long *)(this + 0x18) - lVar2) {
local_50[0] = local_40;
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
((string *)local_50,lVar2,*(long *)(psVar4 + 8) + lVar2);
cVar3 = std::operator==((string *)local_50,psVar4);
std::__cxx11::string::~string((string *)local_50);
if (cVar3 != '\0') break;
}
}
return psVar4 != psVar1;
}
| |
32,540 | ma_pvio_tls_init | eloqsql/libmariadb/libmariadb/ma_tls.c | MARIADB_TLS *ma_pvio_tls_init(MYSQL *mysql)
{
MARIADB_TLS *ctls= NULL;
if (!ma_tls_initialized)
ma_tls_start(mysql->net.last_error, MYSQL_ERRMSG_SIZE);
if (!(ctls= (MARIADB_TLS *)calloc(1, sizeof(MARIADB_TLS))))
{
return NULL;
}
/* register error routine and methods */
ctls->pvio= mysql->net.pvio;
if (!(ctls->ssl= ma_tls_init(mysql)))
{
free(ctls);
ctls= NULL;
}
return ctls;
} | O0 | c | ma_pvio_tls_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
leaq 0x3da55(%rip), %rax # 0x677a0
cmpb $0x0, (%rax)
jne 0x29d65
movq -0x10(%rbp), %rdi
addq $0x97, %rdi
movl $0x200, %esi # imm = 0x200
callq 0x3c350
movl $0x1, %edi
movl $0x18, %esi
callq 0x132c0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x29d88
movq $0x0, -0x8(%rbp)
jmp 0x29dc7
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x3c4d0
movq -0x18(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x29dbf
movq -0x18(%rbp), %rdi
callq 0x13520
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_pvio_tls_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], 0
lea rax, ma_tls_initialized
cmp byte ptr [rax], 0
jnz short loc_29D65
mov rdi, [rbp+var_10]
add rdi, 97h
mov esi, 200h
call ma_tls_start
loc_29D65:
mov edi, 1
mov esi, 18h
call _calloc
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_29D88
mov [rbp+var_8], 0
jmp short loc_29DC7
loc_29D88:
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov [rax+8], rcx
mov rdi, [rbp+var_10]
call ma_tls_init
mov rcx, [rbp+var_18]
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_29DBF
mov rdi, [rbp+var_18]
call _free
mov [rbp+var_18], 0
loc_29DBF:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_29DC7:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long ma_pvio_tls_init(_QWORD *a1)
{
long long v1; // rax
long long v3; // [rsp+8h] [rbp-18h]
if ( !ma_tls_initialized )
ma_tls_start((char *)a1 + 151);
v3 = calloc(1LL, 24LL);
if ( !v3 )
return 0LL;
*(_QWORD *)(v3 + 8) = *a1;
v1 = ma_tls_init(a1);
*(_QWORD *)(v3 + 16) = v1;
if ( !v1 )
{
free(v3);
return 0LL;
}
return v3;
}
| ma_pvio_tls_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],0x0
LEA RAX,[0x1677a0]
CMP byte ptr [RAX],0x0
JNZ 0x00129d65
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x97
MOV ESI,0x200
CALL 0x0013c350
LAB_00129d65:
MOV EDI,0x1
MOV ESI,0x18
CALL 0x001132c0
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x00129d88
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00129dc7
LAB_00129d88:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c4d0
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x00129dbf
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00113520
MOV qword ptr [RBP + -0x18],0x0
LAB_00129dbf:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_00129dc7:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
void * ma_pvio_tls_init(int8 *param_1)
{
long lVar1;
int8 local_20;
int8 local_10;
if (ma_tls_initialized == '\0') {
ma_tls_start((long)param_1 + 0x97,0x200);
}
local_20 = calloc(1,0x18);
if (local_20 == (void *)0x0) {
local_10 = (void *)0x0;
}
else {
*(int8 *)((long)local_20 + 8) = *param_1;
lVar1 = ma_tls_init(param_1);
*(long *)((long)local_20 + 0x10) = lVar1;
if (lVar1 == 0) {
free(local_20);
local_20 = (void *)0x0;
}
local_10 = local_20;
}
return local_10;
}
| |
32,541 | get_footsteps_effect(voxel_surface) | untodesu[P]voxelius/game/client/voxel_sounds.cc | static resource_ptr<SoundEffect> get_footsteps_effect(voxel_surface surface)
{
auto surface_index = static_cast<std::size_t>(surface);
if(surface_index >= NUM_SURFACES) {
// Surface index out of range
return nullptr;
}
const auto &sounds = footsteps_sounds[surface_index];
if(sounds.empty()) {
// No sounds for this surface
return nullptr;
}
auto dist = std::uniform_int_distribution<std::size_t>(0, sounds.size() - 1);
return sounds.at(dist(randomizer));
} | O0 | cpp | get_footsteps_effect(voxel_surface):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x40(%rbp)
movw %si, %ax
movq %rdi, %rcx
movq %rcx, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
movq %rax, -0x18(%rbp)
cmpq $0xa, -0x18(%rbp)
jb 0x13e78c
movq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x598c0
jmp 0x13e80a
leaq 0x3d17ad(%rip), %rax # 0x50ff40
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x13f280
testb $0x1, %al
jne 0x13e7ae
jmp 0x13e7bd
movq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x598c0
jmp 0x13e80a
movq -0x20(%rbp), %rdi
callq 0x13ee90
movq %rax, %rdx
subq $0x1, %rdx
leaq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13f2c0
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rdi
leaq 0x3d1843(%rip), %rsi # 0x510030
callq 0x13f330
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x13f2f0
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x59d90
movq -0x38(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZL20get_footsteps_effect13voxel_surface:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_40], rdi
mov ax, si
mov rcx, rdi
mov [rbp+var_38], rcx
mov [rbp+var_8], rdi
mov [rbp+var_A], ax
movzx eax, [rbp+var_A]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0Ah
jb short loc_13E78C
mov rdi, [rbp+var_40]
xor eax, eax
mov esi, eax
call _ZNSt10shared_ptrIK11SoundEffectEC2EDn; std::shared_ptr<SoundEffect const>::shared_ptr(decltype(nullptr))
jmp short loc_13E80A
loc_13E78C:
lea rax, _ZL16footsteps_sounds; footsteps_sounds
imul rcx, [rbp+var_18], 18h
add rax, rcx
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
call _ZNKSt6vectorISt10shared_ptrIK11SoundEffectESaIS3_EE5emptyEv; std::vector<std::shared_ptr<SoundEffect const>>::empty(void)
test al, 1
jnz short loc_13E7AE
jmp short loc_13E7BD
loc_13E7AE:
mov rdi, [rbp+var_40]
xor eax, eax
mov esi, eax
call _ZNSt10shared_ptrIK11SoundEffectEC2EDn; std::shared_ptr<SoundEffect const>::shared_ptr(decltype(nullptr))
jmp short loc_13E80A
loc_13E7BD:
mov rdi, [rbp+var_20]
call _ZNKSt6vectorISt10shared_ptrIK11SoundEffectESaIS3_EE4sizeEv; std::vector<std::shared_ptr<SoundEffect const>>::size(void)
mov rdx, rax
sub rdx, 1
lea rdi, [rbp+var_30]
xor eax, eax
mov esi, eax
call _ZNSt24uniform_int_distributionImEC2Emm; std::uniform_int_distribution<ulong>::uniform_int_distribution(ulong,ulong)
mov rax, [rbp+var_20]
mov [rbp+var_48], rax
lea rdi, [rbp+var_30]
lea rsi, _ZL10randomizer; randomizer
call _ZNSt24uniform_int_distributionImEclISt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEEEmRT_; std::uniform_int_distribution<ulong>::operator()<std::mersenne_twister_engine<ulong,64ul,312ul,156ul,31ul,13043109905998158313ul,29ul,6148914691236517205ul,17ul,8202884508482404352ul,37ul,18444473444759240704ul,43ul,6364136223846793005ul>>(std::mersenne_twister_engine<ulong,64ul,312ul,156ul,31ul,13043109905998158313ul,29ul,6148914691236517205ul,17ul,8202884508482404352ul,37ul,18444473444759240704ul,43ul,6364136223846793005ul> &)
mov rdi, [rbp+var_48]
mov rsi, rax
call _ZNKSt6vectorISt10shared_ptrIK11SoundEffectESaIS3_EE2atEm; std::vector<std::shared_ptr<SoundEffect const>>::at(ulong)
mov rdi, [rbp+var_40]
mov rsi, rax
call _ZNSt10shared_ptrIK11SoundEffectEC2ERKS2_; std::shared_ptr<SoundEffect const>::shared_ptr(std::shared_ptr<SoundEffect const> const&)
loc_13E80A:
mov rax, [rbp+var_38]
add rsp, 50h
pop rbp
retn
| long long get_footsteps_effect(long long a1, unsigned __int16 a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rax
char *v6; // [rsp+8h] [rbp-48h]
_BYTE v7[16]; // [rsp+20h] [rbp-30h] BYREF
char *v8; // [rsp+30h] [rbp-20h]
long long v9; // [rsp+38h] [rbp-18h]
unsigned __int16 v10; // [rsp+46h] [rbp-Ah]
long long v11; // [rsp+48h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a2;
if ( a2 >= 0xAuLL
|| (v8 = (char *)&footsteps_sounds + 24 * v9, (std::vector<std::shared_ptr<SoundEffect const>>::empty(v8) & 1) != 0) )
{
std::shared_ptr<SoundEffect const>::shared_ptr(a1);
}
else
{
v2 = std::vector<std::shared_ptr<SoundEffect const>>::size(v8);
std::uniform_int_distribution<unsigned long>::uniform_int_distribution(v7, 0LL, v2 - 1);
v6 = v8;
v3 = std::uniform_int_distribution<unsigned long>::operator()<std::mersenne_twister_engine<unsigned long,64ul,312ul,156ul,31ul,13043109905998158313ul,29ul,6148914691236517205ul,17ul,8202884508482404352ul,37ul,18444473444759240704ul,43ul,6364136223846793005ul>>(
v7,
&randomizer);
v4 = std::vector<std::shared_ptr<SoundEffect const>>::at(v6, v3);
std::shared_ptr<SoundEffect const>::shared_ptr(a1, v4);
}
return a1;
}
| __copy_move_backward_a<true,std::_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*>,std::_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*>>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x120
MOV qword ptr [RBP + -0x110],RCX
MOV qword ptr [RBP + -0x120],RDX
MOV qword ptr [RBP + -0x118],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x108],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
LEA RDI,[RBP + -0x80]
CALL 0x00139c80
LEA RDI,[RBP + -0x60]
LEA RSI,[RBP + -0x80]
CALL 0x0013e930
MOV RSI,qword ptr [RBP + -0x120]
LEA RDI,[RBP + -0xc0]
CALL 0x00139c80
LEA RDI,[RBP + -0xa0]
LEA RSI,[RBP + -0xc0]
CALL 0x0013e930
MOV RSI,qword ptr [RBP + -0x110]
LEA RDI,[RBP + -0x100]
CALL 0x00139c80
LEA RDI,[RBP + -0xe0]
LEA RSI,[RBP + -0x100]
CALL 0x0013e930
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x60]
LEA RDX,[RBP + -0xa0]
LEA RCX,[RBP + -0xe0]
CALL 0x0013e8a0
MOV RDI,qword ptr [RBP + -0x118]
MOV RSI,qword ptr [RBP + -0x110]
LEA RDX,[RBP + -0x40]
CALL 0x0013e860
MOV RAX,qword ptr [RBP + -0x108]
ADD RSP,0x120
POP RBP
RET
|
/* std::_Deque_iterator<BotherQueueItem, BotherQueueItem&, BotherQueueItem*>
std::__copy_move_backward_a<true, std::_Deque_iterator<BotherQueueItem, BotherQueueItem&,
BotherQueueItem*>, std::_Deque_iterator<BotherQueueItem, BotherQueueItem&, BotherQueueItem*>
>(std::_Deque_iterator<BotherQueueItem, BotherQueueItem&, BotherQueueItem*>,
std::_Deque_iterator<BotherQueueItem, BotherQueueItem&, BotherQueueItem*>,
std::_Deque_iterator<BotherQueueItem, BotherQueueItem&, BotherQueueItem*>) */
int8
std::
__copy_move_backward_a<true,std::_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*>,std::_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*>>
(int8 param_1,_Deque_iterator *param_2,_Deque_iterator *param_3,
_Deque_iterator *param_4)
{
_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*> local_108 [32];
int1 local_e8 [32];
_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*> local_c8 [32];
int1 local_a8 [32];
_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*> local_88 [32];
int1 local_68 [32];
int1 local_48 [32];
_Deque_iterator *local_28;
_Deque_iterator *local_20;
_Deque_iterator *local_18;
int8 local_10;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*>::_Deque_iterator
(local_88,param_2);
__niter_base<std::_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*>>
(local_68,local_88);
_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*>::_Deque_iterator
(local_c8,param_3);
__niter_base<std::_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*>>
(local_a8,local_c8);
_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*>::_Deque_iterator
(local_108,param_4);
__niter_base<std::_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*>>
(local_e8,local_108);
__copy_move_backward_a1<true,BotherQueueItem,BotherQueueItem&,BotherQueueItem*,BotherQueueItem>
(local_48,local_68,local_a8,local_e8);
__niter_wrap<std::_Deque_iterator<BotherQueueItem,BotherQueueItem&,BotherQueueItem*>>
(param_1,param_4,local_48);
return param_1;
}
| |
32,542 | js_os_getcwd | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_getcwd(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
char buf[PATH_MAX];
int err;
if (!getcwd(buf, sizeof(buf))) {
buf[0] = '\0';
err = errno;
} else {
err = 0;
}
return make_string_error(ctx, buf, err);
} | O0 | c | js_os_getcwd:
subq $0x1048, %rsp # imm = 0x1048
movq %rsi, 0x1028(%rsp)
movq %rdx, 0x1030(%rsp)
movq %rdi, 0x1020(%rsp)
movl %ecx, 0x101c(%rsp)
movq %r8, 0x1010(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x1000, %esi # imm = 0x1000
callq 0xe380
cmpq $0x0, %rax
jne 0x19855
movb $0x0, 0x10(%rsp)
callq 0xe0b0
movl (%rax), %eax
movl %eax, 0xc(%rsp)
jmp 0x1985d
movl $0x0, 0xc(%rsp)
movq 0x1020(%rsp), %rdi
movl 0xc(%rsp), %edx
leaq 0x10(%rsp), %rsi
callq 0x1cef0
movq %rax, 0x1038(%rsp)
movq %rdx, 0x1040(%rsp)
movq 0x1038(%rsp), %rax
movq 0x1040(%rsp), %rdx
addq $0x1048, %rsp # imm = 0x1048
retq
nopl (%rax,%rax)
| js_os_getcwd:
sub rsp, 1048h
mov [rsp+1048h+var_20], rsi
mov [rsp+1048h+var_18], rdx
mov [rsp+1048h+var_28], rdi
mov [rsp+1048h+var_2C], ecx
mov [rsp+1048h+var_38], r8
lea rdi, [rsp+1048h+var_1038]
mov esi, 1000h
call _getcwd
cmp rax, 0
jnz short loc_19855
mov [rsp+1048h+var_1038], 0
call ___errno_location
mov eax, [rax]
mov [rsp+1048h+var_103C], eax
jmp short loc_1985D
loc_19855:
mov [rsp+1048h+var_103C], 0
loc_1985D:
mov rdi, [rsp+1048h+var_28]
mov edx, [rsp+1048h+var_103C]
lea rsi, [rsp+1048h+var_1038]
call make_string_error
mov [rsp+1048h+var_10], rax
mov [rsp+1048h+var_8], rdx
mov rax, [rsp+1048h+var_10]
mov rdx, [rsp+1048h+var_8]
add rsp, 1048h
retn
| long long js_os_getcwd(long long a1, long long a2, long long a3, int a4, long long a5)
{
unsigned int v6; // [rsp+Ch] [rbp-103Ch]
_BYTE v7[4096]; // [rsp+10h] [rbp-1038h] BYREF
long long v8; // [rsp+1010h] [rbp-38h]
int v9; // [rsp+101Ch] [rbp-2Ch]
long long v10; // [rsp+1020h] [rbp-28h]
long long v11; // [rsp+1028h] [rbp-20h]
long long v12; // [rsp+1030h] [rbp-18h]
v11 = a2;
v12 = a3;
v10 = a1;
v9 = a4;
v8 = a5;
if ( getcwd(v7, 4096LL) )
{
v6 = 0;
}
else
{
v7[0] = 0;
v6 = *(_DWORD *)__errno_location();
}
return make_string_error(v10, v7, v6);
}
| js_os_getcwd:
SUB RSP,0x1048
MOV qword ptr [RSP + 0x1028],RSI
MOV qword ptr [RSP + 0x1030],RDX
MOV qword ptr [RSP + 0x1020],RDI
MOV dword ptr [RSP + 0x101c],ECX
MOV qword ptr [RSP + 0x1010],R8
LEA RDI,[RSP + 0x10]
MOV ESI,0x1000
CALL 0x0010e380
CMP RAX,0x0
JNZ 0x00119855
MOV byte ptr [RSP + 0x10],0x0
CALL 0x0010e0b0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0xc],EAX
JMP 0x0011985d
LAB_00119855:
MOV dword ptr [RSP + 0xc],0x0
LAB_0011985d:
MOV RDI,qword ptr [RSP + 0x1020]
MOV EDX,dword ptr [RSP + 0xc]
LEA RSI,[RSP + 0x10]
CALL 0x0011cef0
MOV qword ptr [RSP + 0x1038],RAX
MOV qword ptr [RSP + 0x1040],RDX
MOV RAX,qword ptr [RSP + 0x1038]
MOV RDX,qword ptr [RSP + 0x1040]
ADD RSP,0x1048
RET
|
int1 [16]
js_os_getcwd(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 param_5)
{
int1 auVar1 [16];
char *pcVar2;
int *piVar3;
int local_103c;
char local_1038 [4096];
int8 local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
pcVar2 = getcwd(local_1038,0x1000);
if (pcVar2 == (char *)0x0) {
local_1038[0] = '\0';
piVar3 = __errno_location();
local_103c = *piVar3;
}
else {
local_103c = 0;
}
auVar1 = make_string_error(local_28,local_1038,local_103c);
return auVar1;
}
| |
32,543 | pcmp | eloqsql/strings/ctype-simple.c | static int pcmp(const void * f, const void * s)
{
const uni_idx *F= (const uni_idx*) f;
const uni_idx *S= (const uni_idx*) s;
int res;
if (!(res=((S->nchars)-(F->nchars))))
res=((F->uidx.from)-(S->uidx.to));
return res;
} | O0 | c | pcmp:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x99d75
movq -0x18(%rbp), %rax
movzwl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| pcmp:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax]
mov rcx, [rbp+var_18]
sub eax, [rcx]
mov [rbp+var_24], eax
cmp eax, 0
jnz short loc_99D75
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+8]
mov rcx, [rbp+var_20]
movzx ecx, word ptr [rcx+0Ah]
sub eax, ecx
mov [rbp+var_24], eax
loc_99D75:
mov eax, [rbp+var_24]
pop rbp
retn
| long long pcmp(long long a1, long long a2)
{
unsigned int v3; // [rsp+0h] [rbp-24h]
v3 = *(_DWORD *)a2 - *(_DWORD *)a1;
if ( !v3 )
return *(unsigned __int16 *)(a1 + 8) - (unsigned int)*(unsigned __int16 *)(a2 + 10);
return v3;
}
| pcmp:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
SUB EAX,dword ptr [RCX]
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JNZ 0x00199d75
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,word ptr [RCX + 0xa]
SUB EAX,ECX
MOV dword ptr [RBP + -0x24],EAX
LAB_00199d75:
MOV EAX,dword ptr [RBP + -0x24]
POP RBP
RET
|
int pcmp(int *param_1,int *param_2)
{
int local_2c;
local_2c = *param_2 - *param_1;
if (local_2c == 0) {
local_2c = (uint)*(ushort *)(param_1 + 2) - (uint)*(ushort *)((long)param_2 + 10);
}
return local_2c;
}
| |
32,544 | translog_first_theoretical_lsn | eloqsql/storage/maria/ma_loghandler.c | LSN translog_first_theoretical_lsn()
{
TRANSLOG_ADDRESS addr= translog_get_horizon();
TRANSLOG_PAGE_SIZE_BUFF psize_buff;
uchar *page;
TRANSLOG_VALIDATOR_DATA data;
DBUG_ENTER("translog_first_theoretical_lsn");
DBUG_PRINT("info", ("Horizon: " LSN_FMT, LSN_IN_PARTS(addr)));
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
if (!translog_is_file(1))
DBUG_RETURN(LSN_IMPOSSIBLE);
if (addr == MAKE_LSN(1, TRANSLOG_PAGE_SIZE))
{
/* log has no records yet */
DBUG_RETURN(MAKE_LSN(1, TRANSLOG_PAGE_SIZE +
log_descriptor.page_overhead));
}
addr= MAKE_LSN(1, TRANSLOG_PAGE_SIZE); /* the first page of the file */
data.addr= &addr;
if ((page= translog_get_page(&data, psize_buff.buffer, NULL)) == NULL)
DBUG_RETURN(LSN_ERROR);
DBUG_RETURN(MAKE_LSN(1, TRANSLOG_PAGE_SIZE +
page_overhead[page[TRANSLOG_PAGE_FLAGS]]));
} | O0 | c | translog_first_theoretical_lsn:
pushq %rbp
movq %rsp, %rbp
subq $0x2040, %rsp # imm = 0x2040
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
callq 0x54b90
movq %rax, -0x2018(%rbp)
jmp 0x57426
jmp 0x57428
jmp 0x5742a
movl $0x1, %edi
callq 0x56ed0
cmpb $0x0, %al
jne 0x5744a
jmp 0x5743a
movq $0x0, -0x2010(%rbp)
jmp 0x5750c
movabsq $0x100002000, %rax # imm = 0x100002000
cmpq %rax, -0x2018(%rbp)
jne 0x57486
jmp 0x5745f
movzwl 0x421f7e(%rip), %eax # 0x4793e4
addl $0x2000, %eax # imm = 0x2000
movl %eax, %eax
movabsq $0x100000000, %rcx # imm = 0x100000000
orq %rcx, %rax
movq %rax, -0x2010(%rbp)
jmp 0x5750c
movabsq $0x100002000, %rax # imm = 0x100002000
movq %rax, -0x2018(%rbp)
leaq -0x2018(%rbp), %rax
movq %rax, -0x2030(%rbp)
leaq -0x2008(%rbp), %rsi
leaq -0x2030(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x52160
movq %rax, -0x2020(%rbp)
cmpq $0x0, %rax
jne 0x574d8
jmp 0x574cb
movq $0x1, -0x2010(%rbp)
jmp 0x5750c
jmp 0x574da
movq -0x2020(%rbp), %rax
movzbl 0x6(%rax), %eax
movl %eax, %ecx
leaq 0xc22dc2(%rip), %rax # 0xc7a2b0
movl (%rax,%rcx,4), %eax
addl $0x2000, %eax # imm = 0x2000
movl %eax, %eax
movabsq $0x100000000, %rcx # imm = 0x100000000
orq %rcx, %rax
movq %rax, -0x2010(%rbp)
movq -0x2010(%rbp), %rax
movq %rax, -0x2038(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5753c
movq -0x2038(%rbp), %rax
addq $0x2040, %rsp # imm = 0x2040
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| translog_first_theoretical_lsn:
push rbp
mov rbp, rsp
sub rsp, 2040h
mov rax, fs:28h
mov [rbp+var_8], rax
call translog_get_horizon
mov [rbp+var_2018], rax
jmp short $+2
loc_57426:
jmp short $+2
loc_57428:
jmp short $+2
loc_5742A:
mov edi, 1
call translog_is_file
cmp al, 0
jnz short loc_5744A
jmp short $+2
loc_5743A:
mov [rbp+var_2010], 0
jmp loc_5750C
loc_5744A:
mov rax, 100002000h
cmp [rbp+var_2018], rax
jnz short loc_57486
jmp short $+2
loc_5745F:
movzx eax, cs:word_4793E4
add eax, 2000h
mov eax, eax
mov rcx, 100000000h
or rax, rcx
mov [rbp+var_2010], rax
jmp loc_5750C
loc_57486:
mov rax, 100002000h
mov [rbp+var_2018], rax
lea rax, [rbp+var_2018]
mov [rbp+var_2030], rax
lea rsi, [rbp+var_2008]
lea rdi, [rbp+var_2030]
xor eax, eax
mov edx, eax
call translog_get_page
mov [rbp+var_2020], rax
cmp rax, 0
jnz short loc_574D8
jmp short $+2
loc_574CB:
mov [rbp+var_2010], 1
jmp short loc_5750C
loc_574D8:
jmp short $+2
loc_574DA:
mov rax, [rbp+var_2020]
movzx eax, byte ptr [rax+6]
mov ecx, eax
lea rax, page_overhead
mov eax, [rax+rcx*4]
add eax, 2000h
mov eax, eax
mov rcx, 100000000h
or rax, rcx
mov [rbp+var_2010], rax
loc_5750C:
mov rax, [rbp+var_2010]
mov [rbp+var_2038], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5753C
mov rax, [rbp+var_2038]
add rsp, 2040h
pop rbp
retn
loc_5753C:
call ___stack_chk_fail
| long long translog_first_theoretical_lsn(long long a1, long long a2)
{
long long v2; // rdx
long long v3; // rcx
int v4; // r8d
int v5; // r9d
long long *p_horizon; // [rsp+10h] [rbp-2030h] BYREF
long long page; // [rsp+20h] [rbp-2020h]
long long horizon; // [rsp+28h] [rbp-2018h] BYREF
_BYTE v11[8192]; // [rsp+38h] [rbp-2008h] BYREF
unsigned long long v12; // [rsp+2038h] [rbp-8h]
v12 = __readfsqword(0x28u);
horizon = translog_get_horizon();
if ( !translog_is_file(1u, a2, v2, v3, v4, v5) )
return 0LL;
if ( horizon == 0x100002000LL )
return ((unsigned int)(unsigned __int16)word_4793E4 + 0x2000) | 0x100000000LL;
horizon = 0x100002000LL;
p_horizon = &horizon;
page = translog_get_page(&p_horizon, (long long)v11, 0LL);
if ( page )
return (unsigned int)(page_overhead[*(unsigned __int8 *)(page + 6)] + 0x2000) | 0x100000000LL;
else
return 1LL;
}
| translog_first_theoretical_lsn:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2040
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
CALL 0x00154b90
MOV qword ptr [RBP + -0x2018],RAX
JMP 0x00157426
LAB_00157426:
JMP 0x00157428
LAB_00157428:
JMP 0x0015742a
LAB_0015742a:
MOV EDI,0x1
CALL 0x00156ed0
CMP AL,0x0
JNZ 0x0015744a
JMP 0x0015743a
LAB_0015743a:
MOV qword ptr [RBP + -0x2010],0x0
JMP 0x0015750c
LAB_0015744a:
MOV RAX,0x100002000
CMP qword ptr [RBP + -0x2018],RAX
JNZ 0x00157486
JMP 0x0015745f
LAB_0015745f:
MOVZX EAX,word ptr [0x005793e4]
ADD EAX,0x2000
MOV EAX,EAX
MOV RCX,0x100000000
OR RAX,RCX
MOV qword ptr [RBP + -0x2010],RAX
JMP 0x0015750c
LAB_00157486:
MOV RAX,0x100002000
MOV qword ptr [RBP + -0x2018],RAX
LEA RAX,[RBP + -0x2018]
MOV qword ptr [RBP + -0x2030],RAX
LEA RSI,[RBP + -0x2008]
LEA RDI,[RBP + -0x2030]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00152160
MOV qword ptr [RBP + -0x2020],RAX
CMP RAX,0x0
JNZ 0x001574d8
JMP 0x001574cb
LAB_001574cb:
MOV qword ptr [RBP + -0x2010],0x1
JMP 0x0015750c
LAB_001574d8:
JMP 0x001574da
LAB_001574da:
MOV RAX,qword ptr [RBP + -0x2020]
MOVZX EAX,byte ptr [RAX + 0x6]
MOV ECX,EAX
LEA RAX,[0xd7a2b0]
MOV EAX,dword ptr [RAX + RCX*0x4]
ADD EAX,0x2000
MOV EAX,EAX
MOV RCX,0x100000000
OR RAX,RCX
MOV qword ptr [RBP + -0x2010],RAX
LAB_0015750c:
MOV RAX,qword ptr [RBP + -0x2010]
MOV qword ptr [RBP + -0x2038],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015753c
MOV RAX,qword ptr [RBP + -0x2038]
ADD RSP,0x2040
POP RBP
RET
LAB_0015753c:
CALL 0x0012a270
|
ulong translog_first_theoretical_lsn(void)
{
char cVar1;
long in_FS_OFFSET;
long *local_2038 [2];
long local_2028;
long local_2020;
ulong local_2018;
int1 local_2010 [8192];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2020 = translog_get_horizon();
cVar1 = translog_is_file(1);
if (cVar1 == '\0') {
local_2018 = 0;
}
else if (local_2020 == 0x100002000) {
local_2018 = (ulong)(DAT_005793e4 + 0x2000) | 0x100000000;
}
else {
local_2020 = 0x100002000;
local_2038[0] = &local_2020;
local_2028 = translog_get_page(local_2038,local_2010,0);
if (local_2028 == 0) {
local_2018 = 1;
}
else {
local_2018 = (ulong)(*(int *)(page_overhead + (ulong)*(byte *)(local_2028 + 6) * 4) + 0x2000)
| 0x100000000;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_2018;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
32,545 | init_alloc_root | eloqsql/mysys/my_alloc.c | void init_alloc_root(PSI_memory_key key, MEM_ROOT *mem_root, size_t block_size,
size_t pre_alloc_size __attribute__((unused)),
myf my_flags)
{
DBUG_ENTER("init_alloc_root");
DBUG_PRINT("enter",("root: %p prealloc: %zu", mem_root, pre_alloc_size));
mem_root->free= mem_root->used= mem_root->pre_alloc= 0;
mem_root->min_malloc= 32;
mem_root->block_size= (block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1;
if (my_flags & MY_THREAD_SPECIFIC)
mem_root->block_size|= 1;
mem_root->error_handler= 0;
mem_root->block_num= 4; /* We shift this with >>2 */
mem_root->first_block_usage= 0;
mem_root->m_psi_key= key;
#if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG))
if (pre_alloc_size)
{
size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM));
if ((mem_root->free= mem_root->pre_alloc=
(USED_MEM*) my_malloc(key, size, MYF(my_flags))))
{
mem_root->free->size= size;
mem_root->free->left= pre_alloc_size;
mem_root->free->next= 0;
TRASH_MEM(mem_root->free);
}
}
#endif
DBUG_VOID_RETURN;
} | O3 | c | init_alloc_root:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
xorl %eax, %eax
movq %rax, 0x10(%rsi)
movq $0x20, 0x18(%rsi)
andq $-0x2, %rdx
movl %r8d, %ecx
shrl $0x10, %ecx
andl $0x1, %ecx
addq %rdx, %rcx
addq $-0x28, %rcx
movq %rcx, 0x20(%rsi)
movq %rax, 0x30(%rsi)
movq $0x4, 0x28(%rsi)
movl %edi, 0x38(%rsi)
testq %rbx, %rbx
je 0x2da7c
movq %rsi, %r14
leaq 0x18(%rbx), %r15
movq %r15, %rsi
movq %r8, %rdx
callq 0x2b4d5
movq %rax, 0x10(%r14)
movq %rax, (%r14)
testq %rax, %rax
je 0x2da7c
movq %r15, 0x10(%rax)
movq (%r14), %rax
movq %rbx, 0x8(%rax)
movq (%r14), %rax
movq $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| init_alloc_root:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rcx
xorps xmm0, xmm0
movups xmmword ptr [rsi], xmm0
xor eax, eax
mov [rsi+10h], rax
mov qword ptr [rsi+18h], 20h ; ' '
and rdx, 0FFFFFFFFFFFFFFFEh
mov ecx, r8d
shr ecx, 10h
and ecx, 1
add rcx, rdx
add rcx, 0FFFFFFFFFFFFFFD8h
mov [rsi+20h], rcx
mov [rsi+30h], rax
mov qword ptr [rsi+28h], 4
mov [rsi+38h], edi
test rbx, rbx
jz short loc_2DA7C
mov r14, rsi
lea r15, [rbx+18h]
mov rsi, r15
mov rdx, r8
call my_malloc
mov [r14+10h], rax
mov [r14], rax
test rax, rax
jz short loc_2DA7C
mov [rax+10h], r15
mov rax, [r14]
mov [rax+8], rbx
mov rax, [r14]
mov qword ptr [rax], 0
loc_2DA7C:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long init_alloc_root(unsigned int a1, long long *a2, long long a3, long long a4, unsigned int a5)
{
long long result; // rax
*(_OWORD *)a2 = 0LL;
result = 0LL;
a2[2] = 0LL;
a2[3] = 32LL;
a2[4] = (a3 & 0xFFFFFFFFFFFFFFFELL) + (HIWORD(a5) & 1) - 40;
a2[6] = 0LL;
a2[5] = 4LL;
*((_DWORD *)a2 + 14) = a1;
if ( a4 )
{
result = my_malloc(a1, a4 + 24, a5);
a2[2] = result;
*a2 = result;
if ( result )
{
*(_QWORD *)(result + 16) = a4 + 24;
*(_QWORD *)(*a2 + 8) = a4;
result = *a2;
*(_QWORD *)*a2 = 0LL;
}
}
return result;
}
| init_alloc_root:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI],XMM0
XOR EAX,EAX
MOV qword ptr [RSI + 0x10],RAX
MOV qword ptr [RSI + 0x18],0x20
AND RDX,-0x2
MOV ECX,R8D
SHR ECX,0x10
AND ECX,0x1
ADD RCX,RDX
ADD RCX,-0x28
MOV qword ptr [RSI + 0x20],RCX
MOV qword ptr [RSI + 0x30],RAX
MOV qword ptr [RSI + 0x28],0x4
MOV dword ptr [RSI + 0x38],EDI
TEST RBX,RBX
JZ 0x0012da7c
MOV R14,RSI
LEA R15,[RBX + 0x18]
MOV RSI,R15
MOV RDX,R8
CALL 0x0012b4d5
MOV qword ptr [R14 + 0x10],RAX
MOV qword ptr [R14],RAX
TEST RAX,RAX
JZ 0x0012da7c
MOV qword ptr [RAX + 0x10],R15
MOV RAX,qword ptr [R14]
MOV qword ptr [RAX + 0x8],RBX
MOV RAX,qword ptr [R14]
MOV qword ptr [RAX],0x0
LAB_0012da7c:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void init_alloc_root(int4 param_1,long *param_2,ulong param_3,long param_4,int8 param_5)
{
long lVar1;
*param_2 = 0;
param_2[1] = 0;
param_2[2] = 0;
param_2[3] = 0x20;
param_2[4] = (ulong)((uint)param_5 >> 0x10 & 1) + (param_3 & 0xfffffffffffffffe) + -0x28;
param_2[6] = 0;
param_2[5] = 4;
*(int4 *)(param_2 + 7) = param_1;
if (param_4 != 0) {
lVar1 = my_malloc(param_1,param_4 + 0x18,param_5);
param_2[2] = lVar1;
*param_2 = lVar1;
if (lVar1 != 0) {
*(long *)(lVar1 + 0x10) = param_4 + 0x18;
*(long *)(*param_2 + 8) = param_4;
*(int8 *)*param_2 = 0;
}
}
return;
}
| |
32,546 | my_thread_init_common_mutex | eloqsql/mysys/my_thr_init.c | static void my_thread_init_common_mutex(void)
{
mysql_mutex_init(key_THR_LOCK_open, &THR_LOCK_open, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_lock, &THR_LOCK_lock, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_myisam, &THR_LOCK_myisam, MY_MUTEX_INIT_SLOW);
mysql_mutex_init(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_net, &THR_LOCK_net, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_charset, &THR_LOCK_charset, MY_MUTEX_INIT_FAST);
#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
mysql_mutex_init(key_LOCK_localtime_r, &LOCK_localtime_r, MY_MUTEX_INIT_SLOW);
#endif
} | O0 | c | my_thread_init_common_mutex:
pushq %rbp
movq %rsp, %rbp
leaq 0xb8c9ad(%rip), %rax # 0xc82948
movl (%rax), %edi
leaq 0xb8d38c(%rip), %rsi # 0xc83330
leaq 0xb8d685(%rip), %rdx # 0xc83630
callq 0xf6ca0
leaq 0xb8c97d(%rip), %rax # 0xc82934
movl (%rax), %edi
leaq 0xb8d3b8(%rip), %rsi # 0xc83378
leaq 0xb8d669(%rip), %rdx # 0xc83630
callq 0xf6ca0
leaq 0xb8c96d(%rip), %rax # 0xc82940
movl (%rax), %edi
leaq 0xb8d3e4(%rip), %rsi # 0xc833c0
xorl %eax, %eax
movl %eax, %edx
callq 0xf6ca0
leaq 0xb8c968(%rip), %rax # 0xc82954
movl (%rax), %edi
leaq 0xb8d413(%rip), %rsi # 0xc83408
leaq 0xb8d634(%rip), %rdx # 0xc83630
callq 0xf6ca0
leaq 0xb8c928(%rip), %rax # 0xc82930
movl (%rax), %edi
leaq 0xb8d43f(%rip), %rsi # 0xc83450
leaq 0xb8d618(%rip), %rdx # 0xc83630
callq 0xf6ca0
leaq 0xb8c920(%rip), %rax # 0xc82944
movl (%rax), %edi
leaq 0xb8d46b(%rip), %rsi # 0xc83498
leaq 0xb8d5fc(%rip), %rdx # 0xc83630
callq 0xf6ca0
leaq 0xb8c8ec(%rip), %rax # 0xc8292c
movl (%rax), %edi
leaq 0xb8d497(%rip), %rsi # 0xc834e0
leaq 0xb8d5e0(%rip), %rdx # 0xc83630
callq 0xf6ca0
popq %rbp
retq
nopw (%rax,%rax)
| my_thread_init_common_mutex:
push rbp
mov rbp, rsp
lea rax, key_THR_LOCK_open
mov edi, [rax]
lea rsi, THR_LOCK_open
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_10
lea rax, key_THR_LOCK_lock
mov edi, [rax]
lea rsi, THR_LOCK_lock
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_10
lea rax, key_THR_LOCK_myisam
mov edi, [rax]
lea rsi, THR_LOCK_myisam
xor eax, eax
mov edx, eax
call inline_mysql_mutex_init_10
lea rax, key_THR_LOCK_myisam_mmap
mov edi, [rax]
lea rsi, THR_LOCK_myisam_mmap
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_10
lea rax, key_THR_LOCK_heap
mov edi, [rax]
lea rsi, THR_LOCK_heap
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_10
lea rax, key_THR_LOCK_net
mov edi, [rax]
lea rsi, THR_LOCK_net
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_10
lea rax, key_THR_LOCK_charset
mov edi, [rax]
lea rsi, THR_LOCK_charset
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_10
pop rbp
retn
| long long my_thread_init_common_mutex()
{
inline_mysql_mutex_init_10(key_THR_LOCK_open, &THR_LOCK_open, &my_fast_mutexattr);
inline_mysql_mutex_init_10(key_THR_LOCK_lock, &THR_LOCK_lock, &my_fast_mutexattr);
inline_mysql_mutex_init_10(key_THR_LOCK_myisam, &THR_LOCK_myisam, 0LL);
inline_mysql_mutex_init_10(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, &my_fast_mutexattr);
inline_mysql_mutex_init_10(key_THR_LOCK_heap, &THR_LOCK_heap, &my_fast_mutexattr);
inline_mysql_mutex_init_10(key_THR_LOCK_net, &THR_LOCK_net, &my_fast_mutexattr);
return inline_mysql_mutex_init_10(key_THR_LOCK_charset, &THR_LOCK_charset, &my_fast_mutexattr);
}
| my_thread_init_common_mutex:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0xd82948]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd83330]
LEA RDX,[0xd83630]
CALL 0x001f6ca0
LEA RAX,[0xd82934]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd83378]
LEA RDX,[0xd83630]
CALL 0x001f6ca0
LEA RAX,[0xd82940]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd833c0]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001f6ca0
LEA RAX,[0xd82954]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd83408]
LEA RDX,[0xd83630]
CALL 0x001f6ca0
LEA RAX,[0xd82930]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd83450]
LEA RDX,[0xd83630]
CALL 0x001f6ca0
LEA RAX,[0xd82944]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd83498]
LEA RDX,[0xd83630]
CALL 0x001f6ca0
LEA RAX,[0xd8292c]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd834e0]
LEA RDX,[0xd83630]
CALL 0x001f6ca0
POP RBP
RET
|
void my_thread_init_common_mutex(void)
{
inline_mysql_mutex_init(key_THR_LOCK_open,THR_LOCK_open,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_lock,THR_LOCK_lock,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_myisam,THR_LOCK_myisam,0);
inline_mysql_mutex_init(key_THR_LOCK_myisam_mmap,THR_LOCK_myisam_mmap,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_heap,THR_LOCK_heap,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_net,THR_LOCK_net,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_charset,THR_LOCK_charset,&my_fast_mutexattr);
return;
}
| |
32,547 | my_realloc | eloqsql/mysys/my_malloc.c | void *my_realloc(PSI_memory_key key, void *old_point, size_t size, myf my_flags)
{
my_memory_header *old_mh, *mh;
void *point;
size_t old_size;
my_bool old_flags;
DBUG_ENTER("my_realloc");
DBUG_PRINT("my",("ptr: %p size: %zu flags: %lu", old_point, size, my_flags));
DBUG_ASSERT(size > 0);
if (!old_point && (my_flags & MY_ALLOW_ZERO_PTR))
DBUG_RETURN(my_malloc(key, size, my_flags));
old_mh= USER_TO_HEADER(old_point);
old_size= old_mh->m_size & ~1;
old_flags= old_mh->m_size & 1;
DBUG_ASSERT(old_mh->m_key == key || old_mh->m_key == PSI_NOT_INSTRUMENTED);
DBUG_ASSERT(old_flags == MY_TEST(my_flags & MY_THREAD_SPECIFIC));
size= ALIGN_SIZE(size);
mh= sf_realloc(old_mh, size + HEADER_SIZE, my_flags);
if (mh == NULL)
{
if (size < old_size)
DBUG_RETURN(old_point);
my_errno=errno;
if (my_flags & MY_FREE_ON_ERROR)
{
/* my_free will take care of size accounting */
my_free(old_point);
old_point= 0;
}
if (my_flags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_FATAL), size);
point= NULL;
}
else
{
mh->m_size= size | old_flags;
mh->m_key= PSI_CALL_memory_realloc(key, old_size, size, & mh->m_owner);
update_malloc_size((longlong)size - (longlong)old_size, old_flags);
point= HEADER_TO_USER(mh);
}
DBUG_PRINT("exit",("ptr: %p", point));
DBUG_RETURN(point);
} | O0 | c | my_realloc:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
jmp 0xf3a49
jmp 0xf3a4b
jmp 0xf3a4d
cmpq $0x0, -0x18(%rbp)
jne 0xf3a7d
movq -0x28(%rbp), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0xf3a7d
jmp 0xf3a64
movl -0xc(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xf3860
movq %rax, -0x8(%rbp)
jmp 0xf3bc7
movq -0x18(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
andq $-0x2, %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
andq $0x1, %rax
movb %al, -0x49(%rbp)
jmp 0xf3aaa
jmp 0xf3aac
jmp 0xf3aae
movq -0x20(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x18, %rsi
callq 0x2a0a0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xf3b59
movq -0x20(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0xf3af7
jmp 0xf3aea
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xf3bc7
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x50(%rbp)
callq 0xf60c0
movl -0x50(%rbp), %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
andq $0x80, %rax
cmpq $0x0, %rax
je 0xf3b2c
movq -0x18(%rbp), %rdi
callq 0xf3be0
movq $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0xf3b4f
movq -0x20(%rbp), %rdx
movl $0x5, %edi
movl $0x1004, %esi # imm = 0x1004
movb $0x0, %al
callq 0xefb70
movq $0x0, -0x40(%rbp)
jmp 0xf3bb9
movq -0x20(%rbp), %rcx
movsbq -0x49(%rbp), %rax
orq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
leaq 0x1cc544(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x3e8(%rax), %rax
movl -0xc(%rbp), %edi
movq -0x48(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq *%rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq 0x1cbff1(%rip), %rax # 0x2bfb90
movq -0x20(%rbp), %rdi
subq -0x48(%rbp), %rdi
movsbl -0x49(%rbp), %esi
callq *%rax
movq -0x38(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x40(%rbp)
jmp 0xf3bbb
jmp 0xf3bbd
jmp 0xf3bbf
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_realloc:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
jmp short $+2
loc_F3A49:
jmp short $+2
loc_F3A4B:
jmp short $+2
loc_F3A4D:
cmp [rbp+var_18], 0
jnz short loc_F3A7D
mov rax, [rbp+var_28]
and rax, 40h
cmp rax, 0
jz short loc_F3A7D
jmp short $+2
loc_F3A64:
mov edi, [rbp+var_C]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call my_malloc
mov [rbp+var_8], rax
jmp loc_F3BC7
loc_F3A7D:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFE8h
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax+8]
and rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
mov rax, [rax+8]
and rax, 1
mov [rbp+var_49], al
jmp short $+2
loc_F3AAA:
jmp short $+2
loc_F3AAC:
jmp short $+2
loc_F3AAE:
mov rax, [rbp+var_20]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_20], rax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_20]
add rsi, 18h
call _realloc
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_F3B59
mov rax, [rbp+var_20]
cmp rax, [rbp+var_48]
jnb short loc_F3AF7
jmp short $+2
loc_F3AEA:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp loc_F3BC7
loc_F3AF7:
call ___errno_location
mov eax, [rax]
mov [rbp+var_50], eax
call _my_thread_var
mov ecx, [rbp+var_50]
mov [rax], ecx
mov rax, [rbp+var_28]
and rax, 80h
cmp rax, 0
jz short loc_F3B2C
mov rdi, [rbp+var_18]
call my_free
mov [rbp+var_18], 0
loc_F3B2C:
mov rax, [rbp+var_28]
and rax, 18h
cmp rax, 0
jz short loc_F3B4F
mov rdx, [rbp+var_20]
mov edi, 5
mov esi, 1004h
mov al, 0
call my_error
loc_F3B4F:
mov [rbp+var_40], 0
jmp short loc_F3BB9
loc_F3B59:
mov rcx, [rbp+var_20]
movsx rax, [rbp+var_49]
or rcx, rax
mov rax, [rbp+var_38]
mov [rax+8], rcx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+3E8h]
mov edi, [rbp+var_C]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_38]
call rax
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+10h], ecx
mov rax, cs:update_malloc_size
mov rdi, [rbp+var_20]
sub rdi, [rbp+var_48]
movsx esi, [rbp+var_49]
call rax ; dummy
mov rax, [rbp+var_38]
add rax, 18h
mov [rbp+var_40], rax
loc_F3BB9:
jmp short $+2
loc_F3BBB:
jmp short $+2
loc_F3BBD:
jmp short $+2
loc_F3BBF:
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_F3BC7:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long my_realloc(unsigned int a1, long long a2, const char *a3, char a4)
{
int v5; // [rsp+0h] [rbp-50h]
char v6; // [rsp+7h] [rbp-49h]
unsigned long long v7; // [rsp+8h] [rbp-48h]
long long v9; // [rsp+18h] [rbp-38h]
unsigned long long v11; // [rsp+30h] [rbp-20h]
if ( a2 || (a4 & 0x40) == 0 )
{
v7 = *(_QWORD *)(a2 - 24 + 8) & 0xFFFFFFFFFFFFFFFELL;
v6 = *(_BYTE *)(a2 - 24 + 8) & 1;
v11 = (unsigned long long)(a3 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v9 = realloc(a2 - 24, v11 + 24);
if ( v9 )
{
*(_QWORD *)(v9 + 8) = v6 | v11;
*(_DWORD *)(v9 + 16) = ((long long ( *)(_QWORD, unsigned long long, unsigned long long, long long))PSI_server[125])(
a1,
v7,
v11,
v9);
update_malloc_size(v11 - v7, v6);
return v9 + 24;
}
else
{
if ( v11 < v7 )
return a2;
v5 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a2 - 24, (const char *)(v11 + 24)) = v5;
if ( a4 < 0 )
my_free(a2);
if ( (a4 & 0x18) != 0 )
my_error(5u, 4100LL, v11);
return 0LL;
}
}
return my_malloc(a1, a3, a4);
}
| my_realloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
JMP 0x001f3a49
LAB_001f3a49:
JMP 0x001f3a4b
LAB_001f3a4b:
JMP 0x001f3a4d
LAB_001f3a4d:
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x001f3a7d
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x40
CMP RAX,0x0
JZ 0x001f3a7d
JMP 0x001f3a64
LAB_001f3a64:
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001f3860
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f3bc7
LAB_001f3a7d:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x18
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
AND RAX,-0x2
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
AND RAX,0x1
MOV byte ptr [RBP + -0x49],AL
JMP 0x001f3aaa
LAB_001f3aaa:
JMP 0x001f3aac
LAB_001f3aac:
JMP 0x001f3aae
LAB_001f3aae:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x18
CALL 0x0012a0a0
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x001f3b59
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x001f3af7
JMP 0x001f3aea
LAB_001f3aea:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f3bc7
LAB_001f3af7:
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x50],EAX
CALL 0x001f60c0
MOV ECX,dword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x80
CMP RAX,0x0
JZ 0x001f3b2c
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001f3be0
MOV qword ptr [RBP + -0x18],0x0
LAB_001f3b2c:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x18
CMP RAX,0x0
JZ 0x001f3b4f
MOV RDX,qword ptr [RBP + -0x20]
MOV EDI,0x5
MOV ESI,0x1004
MOV AL,0x0
CALL 0x001efb70
LAB_001f3b4f:
MOV qword ptr [RBP + -0x40],0x0
JMP 0x001f3bb9
LAB_001f3b59:
MOV RCX,qword ptr [RBP + -0x20]
MOVSX RAX,byte ptr [RBP + -0x49]
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3e8]
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x38]
CALL RAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [0x003bfb90]
MOV RDI,qword ptr [RBP + -0x20]
SUB RDI,qword ptr [RBP + -0x48]
MOVSX ESI,byte ptr [RBP + -0x49]
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x18
MOV qword ptr [RBP + -0x40],RAX
LAB_001f3bb9:
JMP 0x001f3bbb
LAB_001f3bbb:
JMP 0x001f3bbd
LAB_001f3bbd:
JMP 0x001f3bbf
LAB_001f3bbf:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_001f3bc7:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long my_realloc(int4 param_1,long param_2,long param_3,ulong param_4)
{
int iVar1;
byte bVar2;
int4 uVar3;
ulong uVar4;
ulong uVar5;
void *pvVar6;
int *piVar7;
long local_48;
long local_10;
if ((param_2 == 0) && ((param_4 & 0x40) != 0)) {
local_10 = my_malloc(param_1,param_3,param_4);
}
else {
uVar4 = *(ulong *)(param_2 + -0x10) & 0xfffffffffffffffe;
bVar2 = (byte)*(int8 *)(param_2 + -0x10) & 1;
uVar5 = param_3 + 7U & 0xfffffffffffffff8;
pvVar6 = realloc((void *)(param_2 + -0x18),uVar5 + 0x18);
if (pvVar6 == (void *)0x0) {
if (uVar5 < uVar4) {
return param_2;
}
piVar7 = __errno_location();
iVar1 = *piVar7;
piVar7 = (int *)_my_thread_var();
*piVar7 = iVar1;
if ((param_4 & 0x80) != 0) {
my_free(param_2);
}
if ((param_4 & 0x18) != 0) {
my_error(5,0x1004,uVar5);
}
local_48 = 0;
}
else {
*(ulong *)((long)pvVar6 + 8) = uVar5 | (long)(char)bVar2;
uVar3 = (**(code **)(PSI_server + 1000))(param_1,uVar4,uVar5,pvVar6);
*(int4 *)((long)pvVar6 + 0x10) = uVar3;
(*(code *)update_malloc_size)(uVar5 - uVar4,bVar2);
local_48 = (long)pvVar6 + 0x18;
}
local_10 = local_48;
}
return local_10;
}
| |
32,548 | my_realloc | eloqsql/mysys/my_malloc.c | void *my_realloc(PSI_memory_key key, void *old_point, size_t size, myf my_flags)
{
my_memory_header *old_mh, *mh;
void *point;
size_t old_size;
my_bool old_flags;
DBUG_ENTER("my_realloc");
DBUG_PRINT("my",("ptr: %p size: %zu flags: %lu", old_point, size, my_flags));
DBUG_ASSERT(size > 0);
if (!old_point && (my_flags & MY_ALLOW_ZERO_PTR))
DBUG_RETURN(my_malloc(key, size, my_flags));
old_mh= USER_TO_HEADER(old_point);
old_size= old_mh->m_size & ~1;
old_flags= old_mh->m_size & 1;
DBUG_ASSERT(old_mh->m_key == key || old_mh->m_key == PSI_NOT_INSTRUMENTED);
DBUG_ASSERT(old_flags == MY_TEST(my_flags & MY_THREAD_SPECIFIC));
size= ALIGN_SIZE(size);
mh= sf_realloc(old_mh, size + HEADER_SIZE, my_flags);
if (mh == NULL)
{
if (size < old_size)
DBUG_RETURN(old_point);
my_errno=errno;
if (my_flags & MY_FREE_ON_ERROR)
{
/* my_free will take care of size accounting */
my_free(old_point);
old_point= 0;
}
if (my_flags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_FATAL), size);
point= NULL;
}
else
{
mh->m_size= size | old_flags;
mh->m_key= PSI_CALL_memory_realloc(key, old_size, size, & mh->m_owner);
update_malloc_size((longlong)size - (longlong)old_size, old_flags);
point= HEADER_TO_USER(mh);
}
DBUG_PRINT("exit",("ptr: %p", point));
DBUG_RETURN(point);
} | O3 | c | my_realloc:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
testq %rsi, %rsi
setne %al
testb $0x40, %cl
sete %dl
orb %al, %dl
je 0x9ff70
movq %rsi, %r15
movl %edi, -0x2c(%rbp)
movq %rcx, -0x38(%rbp)
leaq -0x18(%rsi), %rdi
movq -0x10(%rsi), %r12
movq %r12, %r13
andq $-0x2, %r13
addq $0x7, %rbx
andq $-0x8, %rbx
leaq 0x18(%rbx), %rsi
callq 0x29090
testq %rax, %rax
je 0x9ff89
movq %rax, %r14
andl $0x1, %r12d
movq %r12, %rax
orq %rbx, %rax
movq %rax, 0x8(%r14)
leaq 0x2e60d1(%rip), %rax # 0x386010
movq (%rax), %rax
movl -0x2c(%rbp), %edi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq *0x3e8(%rax)
movl %eax, 0x10(%r14)
subq %r13, %rbx
movq %rbx, %rdi
movl %r12d, %esi
callq *0x2e5b89(%rip) # 0x385af0
addq $0x18, %r14
movq %r14, %r15
jmp 0x9ffcc
movq %rbx, %rsi
movq %rcx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9fdb1
cmpq %r13, %rbx
jb 0x9ffcc
callq 0x297b0
movl (%rax), %r14d
callq 0xa1b22
movl %r14d, (%rax)
movq -0x38(%rbp), %r14
testb %r14b, %r14b
jns 0x9ffaf
movq %r15, %rdi
callq 0x9ffde
xorl %r15d, %r15d
testb $0x18, %r14b
je 0x9ffcc
movl $0x1004, %esi # imm = 0x1004
movl $0x5, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9e1d7
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_realloc:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
test rsi, rsi
setnz al
test cl, 40h
setz dl
or dl, al
jz short loc_9FF70
mov r15, rsi
mov [rbp+var_2C], edi
mov [rbp+var_38], rcx
lea rdi, [rsi-18h]
mov r12, [rsi-10h]
mov r13, r12
and r13, 0FFFFFFFFFFFFFFFEh
add rbx, 7
and rbx, 0FFFFFFFFFFFFFFF8h
lea rsi, [rbx+18h]
call _realloc
test rax, rax
jz short loc_9FF89
mov r14, rax
and r12d, 1
mov rax, r12
or rax, rbx
mov [r14+8], rax
lea rax, PSI_server
mov rax, [rax]
mov edi, [rbp+var_2C]
mov rsi, r13
mov rdx, rbx
mov rcx, r14
call qword ptr [rax+3E8h]
mov [r14+10h], eax
sub rbx, r13
mov rdi, rbx
mov esi, r12d
call cs:update_malloc_size
add r14, 18h
mov r15, r14
jmp short loc_9FFCC
loc_9FF70:
mov rsi, rbx
mov rdx, rcx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp my_malloc
loc_9FF89:
cmp rbx, r13
jb short loc_9FFCC
call ___errno_location
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
mov r14, [rbp+var_38]
test r14b, r14b
jns short loc_9FFAF
mov rdi, r15
call my_free
loc_9FFAF:
xor r15d, r15d
test r14b, 18h
jz short loc_9FFCC
mov esi, 1004h
mov edi, 5
mov rdx, rbx
xor eax, eax
call my_error
loc_9FFCC:
mov rax, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_realloc(unsigned int a1, long long a2, const char *a3, char a4)
{
long long v4; // r15
long long v5; // rdi
long long v6; // r12
unsigned long long v7; // r13
unsigned long long v8; // rbx
long long v9; // rax
long long v10; // r14
int v12; // r14d
if ( a2 == 0 && (a4 & 0x40) != 0 )
return my_malloc(a1, a3, a4);
v4 = a2;
v5 = a2 - 24;
v6 = *(_QWORD *)(a2 - 16);
v7 = v6 & 0xFFFFFFFFFFFFFFFELL;
v8 = (unsigned long long)(a3 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v9 = realloc(a2 - 24, v8 + 24);
if ( v9 )
{
v10 = v9;
*(_QWORD *)(v9 + 8) = v8 | v6 & 1;
*(_DWORD *)(v9 + 16) = ((long long ( *)(_QWORD, unsigned long long, unsigned long long, long long))PSI_server[125])(
a1,
v7,
v8,
v9);
update_malloc_size();
return v10 + 24;
}
else if ( v8 >= v7 )
{
v12 = *(_DWORD *)__errno_location(v5);
*(_DWORD *)my_thread_var(v5, (const char *)(v8 + 24)) = v12;
if ( a4 < 0 )
my_free(a2);
v4 = 0LL;
if ( (a4 & 0x18) != 0 )
my_error(5u, 4100LL, v8);
}
return v4;
}
| my_realloc:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
TEST RSI,RSI
SETNZ AL
TEST CL,0x40
SETZ DL
OR DL,AL
JZ 0x0019ff70
MOV R15,RSI
MOV dword ptr [RBP + -0x2c],EDI
MOV qword ptr [RBP + -0x38],RCX
LEA RDI,[RSI + -0x18]
MOV R12,qword ptr [RSI + -0x10]
MOV R13,R12
AND R13,-0x2
ADD RBX,0x7
AND RBX,-0x8
LEA RSI,[RBX + 0x18]
CALL 0x00129090
TEST RAX,RAX
JZ 0x0019ff89
MOV R14,RAX
AND R12D,0x1
MOV RAX,R12
OR RAX,RBX
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,R13
MOV RDX,RBX
MOV RCX,R14
CALL qword ptr [RAX + 0x3e8]
MOV dword ptr [R14 + 0x10],EAX
SUB RBX,R13
MOV RDI,RBX
MOV ESI,R12D
CALL qword ptr [0x00485af0]
ADD R14,0x18
MOV R15,R14
JMP 0x0019ffcc
LAB_0019ff70:
MOV RSI,RBX
MOV RDX,RCX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0019fdb1
LAB_0019ff89:
CMP RBX,R13
JC 0x0019ffcc
CALL 0x001297b0
MOV R14D,dword ptr [RAX]
CALL 0x001a1b22
MOV dword ptr [RAX],R14D
MOV R14,qword ptr [RBP + -0x38]
TEST R14B,R14B
JNS 0x0019ffaf
MOV RDI,R15
CALL 0x0019ffde
LAB_0019ffaf:
XOR R15D,R15D
TEST R14B,0x18
JZ 0x0019ffcc
MOV ESI,0x1004
MOV EDI,0x5
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0019e1d7
LAB_0019ffcc:
MOV RAX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_realloc(ulong param_1,long param_2,long param_3,ulong param_4)
{
int iVar1;
int4 uVar2;
void *pvVar3;
long lVar4;
int *piVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
if ((param_4 & 0x40) == 0 || param_2 != 0) {
uVar7 = *(ulong *)(param_2 + -0x10);
uVar8 = uVar7 & 0xfffffffffffffffe;
uVar6 = param_3 + 7U & 0xfffffffffffffff8;
pvVar3 = realloc((void *)(param_2 + -0x18),uVar6 + 0x18);
if (pvVar3 == (void *)0x0) {
if (uVar8 <= uVar6) {
piVar5 = __errno_location();
iVar1 = *piVar5;
piVar5 = (int *)_my_thread_var();
*piVar5 = iVar1;
if ((char)param_4 < '\0') {
my_free(param_2);
}
param_2 = 0;
if ((param_4 & 0x18) != 0) {
my_error(5,0x1004,uVar6);
param_2 = 0;
}
}
}
else {
uVar7 = (ulong)((uint)uVar7 & 1);
*(ulong *)((long)pvVar3 + 8) = uVar7 | uVar6;
uVar2 = (**(code **)(PSI_server + 1000))(param_1 & 0xffffffff,uVar8,uVar6,pvVar3);
*(int4 *)((long)pvVar3 + 0x10) = uVar2;
(*(code *)update_malloc_size)(uVar6 - uVar8,uVar7);
param_2 = (long)pvVar3 + 0x18;
}
return param_2;
}
lVar4 = my_malloc(param_1,param_3,param_4);
return lVar4;
}
| |
32,549 | fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | std::string fs_get_cache_file(const std::string & filename) {
GGML_ASSERT(filename.find(DIRECTORY_SEPARATOR) == std::string::npos);
std::string cache_directory = fs_get_cache_directory();
const bool success = fs_create_directory_with_parents(cache_directory);
if (!success) {
throw std::runtime_error("failed to create cache directory: " + cache_directory);
}
return cache_directory + filename;
} | O3 | cpp | fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2f, %esi
xorl %edx, %edx
callq 0x18860
cmpq $-0x1, %rax
jne 0x7db46
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x7d758
movq %r15, %rdi
callq 0x7d65a
testb %al, %al
je 0x7db67
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x82882
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7db38
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x42bbc(%rip), %rdi # 0xc0709
leaq 0x42c01(%rip), %rdx # 0xc0755
leaq 0x42da1(%rip), %rcx # 0xc08fc
movl $0x378, %esi # imm = 0x378
xorl %eax, %eax
callq 0x18ad0
movl $0x10, %edi
callq 0x18360
movq %rax, %rbx
leaq 0x42db9(%rip), %rsi # 0xc0934
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x30bb3
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x18a80
xorl %ebp, %ebp
movq 0x7244d(%rip), %rsi # 0xefff0
movq 0x723d6(%rip), %rdx # 0xeff80
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7dbd0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
testb %bpl, %bpl
jne 0x7dbda
jmp 0x7dbe7
movq %rax, %r14
movq %rbx, %rdi
callq 0x18500
jmp 0x7dbe7
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7dc02
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %r14, %rdi
callq 0x18b90
| _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp; int
push r15; int
push r14; int
push rbx; __int64
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
mov esi, 2Fh ; '/'
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_7DB46
lea r15, [rsp+68h+var_60]
mov rdi, r15; int
call _Z22fs_get_cache_directoryB5cxx11v; fs_get_cache_directory(void)
mov rdi, r15
call _Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_create_directory_with_parents(std::string const&)
test al, al
jz short loc_7DB67
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&)
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7DB38
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7DB38:
mov rax, rbx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_7DB46:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFilenameFindDi; "filename.find(DIRECTORY_SEPARATOR) == s"...
mov esi, 378h
xor eax, eax
call _ggml_abort
loc_7DB67:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aFailedToCreate; "failed to create cache directory: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7DBD0
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7DBD0:
test bpl, bpl
jnz short loc_7DBDA
jmp short loc_7DBE7
mov r14, rax
loc_7DBDA:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_7DBE7
mov r14, rax
loc_7DBE7:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7DC02
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7DC02:
mov rdi, r14
call __Unwind_Resume
| long long fs_get_cache_file(long long a1, long long a2)
{
void *exception; // rbx
int v4[4]; // [rsp+8h] [rbp-60h] BYREF
long long v5; // [rsp+18h] [rbp-50h] BYREF
_BYTE v6[16]; // [rsp+28h] [rbp-40h] BYREF
if ( std::string::find(a2, 47LL, 0LL) != -1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
888LL,
"GGML_ASSERT(%s) failed",
"filename.find(DIRECTORY_SEPARATOR) == std::string::npos");
LABEL_7:
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v6, (long long)"failed to create cache directory: ", v4);
std::runtime_error::runtime_error(exception, v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
fs_get_cache_directory[abi:cxx11]((long long)v4);
if ( !(unsigned __int8)fs_create_directory_with_parents(v4) )
goto LABEL_7;
std::operator+<char>(a1, v4, a2);
if ( *(long long **)v4 != &v5 )
operator delete(*(void **)v4, v5 + 1);
return a1;
}
| fs_get_cache_file:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV ESI,0x2f
XOR EDX,EDX
CALL 0x00118860
CMP RAX,-0x1
JNZ 0x0017db46
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x0017d758
LAB_0017db01:
MOV RDI,R15
CALL 0x0017d65a
TEST AL,AL
JZ 0x0017db67
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV RDX,R14
CALL 0x00182882
LAB_0017db1d:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0017db38
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186a0
LAB_0017db38:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0017db46:
LEA RDI,[0x1c0709]
LEA RDX,[0x1c0755]
LEA RCX,[0x1c08fc]
MOV ESI,0x378
XOR EAX,EAX
CALL 0x00118ad0
LAB_0017db67:
MOV EDI,0x10
CALL 0x00118360
MOV RBX,RAX
LAB_0017db74:
LEA RSI,[0x1c0934]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00130bb3
MOV BPL,0x1
LAB_0017db8d:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00118a80
XOR EBP,EBP
MOV RSI,qword ptr [0x001efff0]
MOV RDX,qword ptr [0x001eff80]
MOV RDI,RBX
CALL 0x00118b30
|
/* fs_get_cache_file(std::__cxx11::string const&) */
string * fs_get_cache_file(string *param_1)
{
char cVar1;
long lVar2;
runtime_error *this;
char in_SIL;
long *local_60 [2];
long local_50 [2];
string local_40 [32];
lVar2 = std::__cxx11::string::find(in_SIL,0x2f);
if (lVar2 != -1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x378,
"GGML_ASSERT(%s) failed","filename.find(DIRECTORY_SEPARATOR) == std::string::npos");
}
fs_get_cache_directory_abi_cxx11_();
/* try { // try from 0017db01 to 0017db1c has its CatchHandler @ 0017dbe4 */
cVar1 = fs_create_directory_with_parents((string *)local_60);
if (cVar1 != '\0') {
std::operator+(param_1,(string *)local_60);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0017db74 to 0017db89 has its CatchHandler @ 0017dbd7 */
std::operator+((char *)local_40,(string *)"failed to create cache directory: ");
/* try { // try from 0017db8d to 0017dbb1 has its CatchHandler @ 0017dbb2 */
std::runtime_error::runtime_error(this,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80);
}
| |
32,550 | arena_alloc_from_block | tsotchke[P]eshkol/src/core/memory/arena.c | static void* arena_alloc_from_block(Arena* arena, Block* block, size_t size, size_t alignment) {
assert(arena != NULL);
assert(block != NULL);
assert(size > 0);
assert(alignment > 0 && (alignment & (alignment - 1)) == 0); // Power of 2
// Calculate aligned address
uintptr_t address = (uintptr_t)block->data + block->used;
uintptr_t aligned = (address + alignment - 1) & ~(alignment - 1);
size_t padding = aligned - address;
// Check if enough space in block
if (block->used + padding + size > block->size) {
return NULL;
}
// Update block usage
block->used += padding + size;
arena->total_used += padding + size;
arena->allocation_count++;
return (void*)aligned;
} | O0 | c | arena_alloc_from_block:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x45a1
jmp 0x45c0
leaq 0x5c2d(%rip), %rdi # 0xa1d5
leaq 0x6f81(%rip), %rsi # 0xb530
movl $0x4f, %edx
leaq 0x710d(%rip), %rcx # 0xb6c8
callq 0x1090
cmpq $0x0, -0x18(%rbp)
je 0x45c9
jmp 0x45e8
leaq 0x7137(%rip), %rdi # 0xb707
leaq 0x6f59(%rip), %rsi # 0xb530
movl $0x50, %edx
leaq 0x70e5(%rip), %rcx # 0xb6c8
callq 0x1090
cmpq $0x0, -0x20(%rbp)
jbe 0x45f1
jmp 0x4610
leaq 0x7149(%rip), %rdi # 0xb741
leaq 0x6f31(%rip), %rsi # 0xb530
movl $0x51, %edx
leaq 0x70bd(%rip), %rcx # 0xb6c8
callq 0x1090
cmpq $0x0, -0x28(%rbp)
jbe 0x462e
movq -0x28(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x462e
jmp 0x464d
leaq 0x6fbd(%rip), %rdi # 0xb5f2
leaq 0x6ef4(%rip), %rsi # 0xb530
movl $0x52, %edx
leaq 0x7080(%rip), %rcx # 0xb6c8
callq 0x1090
movq -0x18(%rbp), %rax
addq $0x18, %rax
movq -0x18(%rbp), %rcx
addq 0x10(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq -0x28(%rbp), %rax
subq $0x1, %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x40(%rbp), %rax
addq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x46b0
movq $0x0, -0x8(%rbp)
jmp 0x46f0
movq -0x40(%rbp), %rcx
addq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rcx
addq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| arena_alloc_from_block:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
cmp [rbp+var_10], 0
jz short loc_45A1
jmp short loc_45C0
loc_45A1:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 4Fh ; 'O'
lea rcx, aVoidArenaAlloc_0; "void *arena_alloc_from_block(Arena *, B"...
call ___assert_fail
loc_45C0:
cmp [rbp+var_18], 0
jz short loc_45C9
jmp short loc_45E8
loc_45C9:
lea rdi, aBlockNull; "block != NULL"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 50h ; 'P'
lea rcx, aVoidArenaAlloc_0; "void *arena_alloc_from_block(Arena *, B"...
call ___assert_fail
loc_45E8:
cmp [rbp+var_20], 0
jbe short loc_45F1
jmp short loc_4610
loc_45F1:
lea rdi, aMinSize0+4; "size > 0"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 51h ; 'Q'
lea rcx, aVoidArenaAlloc_0; "void *arena_alloc_from_block(Arena *, B"...
call ___assert_fail
loc_4610:
cmp [rbp+var_28], 0
jbe short loc_462E
mov rax, [rbp+var_28]
mov rcx, [rbp+var_28]
sub rcx, 1
and rax, rcx
cmp rax, 0
jnz short loc_462E
jmp short loc_464D
loc_462E:
lea rdi, aAlignment0Alig; "alignment > 0 && (alignment & (alignmen"...
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 52h ; 'R'
lea rcx, aVoidArenaAlloc_0; "void *arena_alloc_from_block(Arena *, B"...
call ___assert_fail
loc_464D:
mov rax, [rbp+var_18]
add rax, 18h
mov rcx, [rbp+var_18]
add rax, [rcx+10h]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
add rax, [rbp+var_28]
sub rax, 1
mov rcx, [rbp+var_28]
sub rcx, 1
xor rcx, 0FFFFFFFFFFFFFFFFh
and rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
sub rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
add rax, [rbp+var_40]
add rax, [rbp+var_20]
mov rcx, [rbp+var_18]
cmp rax, [rcx+8]
jbe short loc_46B0
mov [rbp+var_8], 0
jmp short loc_46F0
loc_46B0:
mov rcx, [rbp+var_40]
add rcx, [rbp+var_20]
mov rax, [rbp+var_18]
add rcx, [rax+10h]
mov [rax+10h], rcx
mov rcx, [rbp+var_40]
add rcx, [rbp+var_20]
mov rax, [rbp+var_10]
add rcx, [rax+10h]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+18h]
add rcx, 1
mov [rax+18h], rcx
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_46F0:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long arena_alloc_from_block(long long a1, long long a2, long long a3, long long a4)
{
long long v5; // [rsp+0h] [rbp-40h]
long long v6; // [rsp+10h] [rbp-30h]
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
79LL,
"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)");
if ( !a2 )
__assert_fail(
"block != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
80LL,
"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)");
if ( !a3 )
__assert_fail(
"size > 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
81LL,
"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)");
if ( !a4 || ((a4 - 1) & a4) != 0 )
__assert_fail(
"alignment > 0 && (alignment & (alignment - 1)) == 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
82LL,
"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)");
v6 = *(_QWORD *)(a2 + 16) + a2 + 24;
v5 = (~(a4 - 1) & (a4 + v6 - 1)) - v6;
if ( (unsigned long long)(a3 + v5 + *(_QWORD *)(a2 + 16)) > *(_QWORD *)(a2 + 8) )
return 0LL;
*(_QWORD *)(a2 + 16) += a3 + v5;
*(_QWORD *)(a1 + 16) += a3 + v5;
++*(_QWORD *)(a1 + 24);
return ~(a4 - 1) & (a4 + v6 - 1);
}
| arena_alloc_from_block:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001045a1
JMP 0x001045c0
LAB_001045a1:
LEA RDI,[0x10a1c3]
LEA RSI,[0x10b510]
MOV EDX,0x4f
LEA RCX,[0x10b696]
CALL 0x00101090
LAB_001045c0:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001045c9
JMP 0x001045e8
LAB_001045c9:
LEA RDI,[0x10b6d5]
LEA RSI,[0x10b510]
MOV EDX,0x50
LEA RCX,[0x10b696]
CALL 0x00101090
LAB_001045e8:
CMP qword ptr [RBP + -0x20],0x0
JBE 0x001045f1
JMP 0x00104610
LAB_001045f1:
LEA RDI,[0x10b70f]
LEA RSI,[0x10b510]
MOV EDX,0x51
LEA RCX,[0x10b696]
CALL 0x00101090
LAB_00104610:
CMP qword ptr [RBP + -0x28],0x0
JBE 0x0010462e
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x28]
SUB RCX,0x1
AND RAX,RCX
CMP RAX,0x0
JNZ 0x0010462e
JMP 0x0010464d
LAB_0010462e:
LEA RDI,[0x10b5c0]
LEA RSI,[0x10b510]
MOV EDX,0x52
LEA RCX,[0x10b696]
CALL 0x00101090
LAB_0010464d:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x18
MOV RCX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RCX + 0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x28]
SUB RAX,0x1
MOV RCX,qword ptr [RBP + -0x28]
SUB RCX,0x1
XOR RCX,-0x1
AND RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
ADD RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x8]
JBE 0x001046b0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001046f0
LAB_001046b0:
MOV RCX,qword ptr [RBP + -0x40]
ADD RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
ADD RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x40]
ADD RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,0x1
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_001046f0:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
ulong arena_alloc_from_block(long param_1,long param_2,long param_3,ulong param_4)
{
long lVar1;
ulong local_10;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",
0x4f,"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)");
}
if (param_2 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("block != NULL","/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",
0x50,"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)");
}
if (param_3 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("size > 0","/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",0x51,
"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)");
}
if ((param_4 != 0) && ((param_4 & param_4 - 1) == 0)) {
lVar1 = param_2 + 0x18 + *(long *)(param_2 + 0x10);
local_10 = (lVar1 + param_4) - 1 & (param_4 - 1 ^ 0xffffffffffffffff);
lVar1 = local_10 - lVar1;
if (*(ulong *)(param_2 + 8) < (ulong)(*(long *)(param_2 + 0x10) + lVar1 + param_3)) {
local_10 = 0;
}
else {
*(long *)(param_2 + 0x10) = lVar1 + param_3 + *(long *)(param_2 + 0x10);
*(long *)(param_1 + 0x10) = lVar1 + param_3 + *(long *)(param_1 + 0x10);
*(long *)(param_1 + 0x18) = *(long *)(param_1 + 0x18) + 1;
}
return local_10;
}
/* WARNING: Subroutine does not return */
__assert_fail("alignment > 0 && (alignment & (alignment - 1)) == 0",
"/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",0x52,
"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)");
}
| |
32,551 | arena_alloc_from_block | tsotchke[P]eshkol/src/core/memory/arena.c | static void* arena_alloc_from_block(Arena* arena, Block* block, size_t size, size_t alignment) {
assert(arena != NULL);
assert(block != NULL);
assert(size > 0);
assert(alignment > 0 && (alignment & (alignment - 1)) == 0); // Power of 2
// Calculate aligned address
uintptr_t address = (uintptr_t)block->data + block->used;
uintptr_t aligned = (address + alignment - 1) & ~(alignment - 1);
size_t padding = aligned - address;
// Check if enough space in block
if (block->used + padding + size > block->size) {
return NULL;
}
// Update block usage
block->used += padding + size;
arena->total_used += padding + size;
arena->allocation_count++;
return (void*)aligned;
} | O3 | c | arena_alloc_from_block:
pushq %rax
testq %rsi, %rsi
je 0x3fac
leaq -0x1(%rcx), %rax
testq %rax, %rcx
jne 0x3fcb
movq 0x10(%rsi), %rax
leaq (%rsi,%rax), %r8
leaq (%rsi,%rax), %r9
addq $0x18, %r9
addq %rcx, %r8
addq $0x17, %r8
negq %rcx
andq %r8, %rcx
movq %rcx, %r8
subq %r9, %r8
addq %rdx, %r8
addq %r8, %rax
cmpq 0x8(%rsi), %rax
jbe 0x3f87
xorl %ecx, %ecx
jmp 0x3fa7
movq %rax, 0x10(%rsi)
movdqu 0x10(%rdi), %xmm0
movq %r8, %xmm1
shufpd $0x2, 0x44a2(%rip), %xmm1 # xmm1 = xmm1[0],mem[1]
paddq %xmm0, %xmm1
movdqu %xmm1, 0x10(%rdi)
movq %rcx, %rax
popq %rcx
retq
leaq 0x4674(%rip), %rdi # 0x8627
leaq 0x4496(%rip), %rsi # 0x8450
leaq 0x4627(%rip), %rcx # 0x85e8
movl $0x50, %edx
callq 0x1090
leaq 0x4540(%rip), %rdi # 0x8512
leaq 0x4477(%rip), %rsi # 0x8450
leaq 0x4608(%rip), %rcx # 0x85e8
movl $0x52, %edx
callq 0x1090
| arena_alloc_from_block:
push rax
test rsi, rsi
jz short loc_3FAC
lea rax, [rcx-1]
test rcx, rax
jnz short loc_3FCB
mov rax, [rsi+10h]
lea r8, [rsi+rax]
lea r9, [rsi+rax]
add r9, 18h
add r8, rcx
add r8, 17h
neg rcx
and rcx, r8
mov r8, rcx
sub r8, r9
add r8, rdx
add rax, r8
cmp rax, [rsi+8]
jbe short loc_3F87
xor ecx, ecx
jmp short loc_3FA7
loc_3F87:
mov [rsi+10h], rax
movdqu xmm0, xmmword ptr [rdi+10h]
movq xmm1, r8
shufpd xmm1, cs:xmmword_8440, 2
paddq xmm1, xmm0
movdqu xmmword ptr [rdi+10h], xmm1
loc_3FA7:
mov rax, rcx
pop rcx
retn
loc_3FAC:
lea rdi, aBlockNull; "block != NULL"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidArenaAlloc_0; "void *arena_alloc_from_block(Arena *, B"...
mov edx, 50h ; 'P'
call ___assert_fail
loc_3FCB:
lea rdi, aAlignment0Alig; "alignment > 0 && (alignment & (alignmen"...
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidArenaAlloc_0; "void *arena_alloc_from_block(Arena *, B"...
mov edx, 52h ; 'R'
call ___assert_fail
| long long arena_alloc_from_block(const __m128i *a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // rcx
unsigned long long v6; // r8
unsigned long long v7; // rax
if ( !a2 )
__assert_fail(
"block != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
80LL,
"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)");
if ( ((a4 - 1) & a4) != 0 )
__assert_fail(
"alignment > 0 && (alignment & (alignment - 1)) == 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
82LL,
"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)");
v4 = *(_QWORD *)(a2 + 16);
v5 = (a4 + a2 + v4 + 23) & -a4;
v6 = a3 + v5 - (a2 + v4 + 24);
v7 = a3 + v5 - (a2 + 24);
if ( v7 > *(_QWORD *)(a2 + 8) )
return 0LL;
*(_QWORD *)(a2 + 16) = v7;
a1[1] = _mm_add_epi64((__m128i)_mm_shuffle_pd((__m128d)v6, (__m128d)xmmword_8440, 2), _mm_loadu_si128(a1 + 1));
return v5;
}
| arena_alloc_from_block:
PUSH RAX
TEST RSI,RSI
JZ 0x00103fac
LEA RAX,[RCX + -0x1]
TEST RCX,RAX
JNZ 0x00103fcb
MOV RAX,qword ptr [RSI + 0x10]
LEA R8,[RSI + RAX*0x1]
LEA R9,[RSI + RAX*0x1]
ADD R9,0x18
ADD R8,RCX
ADD R8,0x17
NEG RCX
AND RCX,R8
MOV R8,RCX
SUB R8,R9
ADD R8,RDX
ADD RAX,R8
CMP RAX,qword ptr [RSI + 0x8]
JBE 0x00103f87
XOR ECX,ECX
JMP 0x00103fa7
LAB_00103f87:
MOV qword ptr [RSI + 0x10],RAX
MOVDQU XMM0,xmmword ptr [RDI + 0x10]
MOVQ XMM1,R8
SHUFPD XMM1,xmmword ptr [0x00108440],0x2
PADDQ XMM1,XMM0
MOVDQU xmmword ptr [RDI + 0x10],XMM1
LAB_00103fa7:
MOV RAX,RCX
POP RCX
RET
LAB_00103fac:
LEA RDI,[0x108627]
LEA RSI,[0x108450]
LEA RCX,[0x1085e8]
MOV EDX,0x50
CALL 0x00101090
LAB_00103fcb:
LEA RDI,[0x108512]
LEA RSI,[0x108450]
LEA RCX,[0x1085e8]
MOV EDX,0x52
CALL 0x00101090
|
ulong arena_alloc_from_block(long param_1,long param_2,long param_3,ulong param_4)
{
ulong uVar1;
ulong uVar2;
long lVar3;
if (param_2 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("block != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c"
,0x50,"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)");
}
if ((param_4 & param_4 - 1) == 0) {
lVar3 = *(long *)(param_2 + 0x10);
uVar2 = -param_4 & param_2 + lVar3 + param_4 + 0x17;
param_3 = (uVar2 - (param_2 + lVar3 + 0x18)) + param_3;
uVar1 = lVar3 + param_3;
if (*(ulong *)(param_2 + 8) < uVar1) {
uVar2 = 0;
}
else {
*(ulong *)(param_2 + 0x10) = uVar1;
lVar3 = DAT_00108448 + *(long *)(param_1 + 0x18);
*(long *)(param_1 + 0x10) = param_3 + *(long *)(param_1 + 0x10);
*(long *)(param_1 + 0x18) = lVar3;
}
return uVar2;
}
/* WARNING: Subroutine does not return */
__assert_fail("alignment > 0 && (alignment & (alignment - 1)) == 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
0x52,"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)");
}
| |
32,552 | my_b_write | eloqsql/mysys/mf_iocache.c | int _my_b_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
size_t rest_length;
int res;
/* Always use my_b_flush_io_cache() to flush write_buffer! */
DBUG_ASSERT(Buffer != info->write_buffer);
if (info->pos_in_file + info->buffer_length > info->end_of_file)
{
my_errno=errno=EFBIG;
return info->error = -1;
}
rest_length= (size_t) (info->write_end - info->write_pos);
DBUG_ASSERT(Count >= rest_length);
memcpy(info->write_pos, Buffer, (size_t) rest_length);
Buffer+=rest_length;
Count-=rest_length;
info->write_pos+=rest_length;
if (my_b_flush_io_cache(info, 1))
return 1;
if (Count)
{
my_off_t old_pos_in_file= info->pos_in_file;
res= info->write_function(info, Buffer, Count);
Count-= (size_t) (info->pos_in_file - old_pos_in_file);
Buffer+= info->pos_in_file - old_pos_in_file;
}
else
res= 0;
if (!res && Count)
{
memcpy(info->write_pos, Buffer, Count);
info->write_pos+= Count;
}
return res;
} | O0 | c | my_b_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0xe2e86
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
addq 0xe8(%rcx), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0xe2ed2
callq 0x2a750
movl $0x1b, (%rax)
callq 0xfc1b0
movl $0x1b, (%rax)
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe2fe2
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0xe2eeb
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2a0b0
movq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0xe2b50
cmpl $0x0, %eax
je 0xe2f4a
movl $0x1, -0x4(%rbp)
jmp 0xe2fe2
cmpq $0x0, -0x20(%rbp)
je 0xe2fa3
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
subq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
subq -0x38(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xe2faa
movl $0x0, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xe2fdc
cmpq $0x0, -0x20(%rbp)
je 0xe2fdc
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2a0b0
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _my_b_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_E2E86:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_10]
add rax, [rcx+0E8h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+8]
jbe short loc_E2ED2
call ___errno_location
mov dword ptr [rax], 1Bh
call _my_thread_var
mov dword ptr [rax], 1Bh
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_E2FE2
loc_E2ED2:
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+40h]
sub rax, rcx
mov [rbp+var_28], rax
jmp short $+2
loc_E2EEB:
mov rax, [rbp+var_10]
mov rdi, [rax+40h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call _memcpy
mov rax, [rbp+var_28]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
add rcx, [rax+40h]
mov [rax+40h], rcx
mov rdi, [rbp+var_10]
mov esi, 1
call my_b_flush_io_cache
cmp eax, 0
jz short loc_E2F4A
mov [rbp+var_4], 1
jmp loc_E2FE2
loc_E2F4A:
cmp [rbp+var_20], 0
jz short loc_E2FA3
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rax, [rax+0A8h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call rax
mov [rbp+var_2C], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
sub rcx, [rbp+var_38]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax]
sub rax, [rbp+var_38]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
jmp short loc_E2FAA
loc_E2FA3:
mov [rbp+var_2C], 0
loc_E2FAA:
cmp [rbp+var_2C], 0
jnz short loc_E2FDC
cmp [rbp+var_20], 0
jz short loc_E2FDC
mov rax, [rbp+var_10]
mov rdi, [rax+40h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
add rcx, [rax+40h]
mov [rax+40h], rcx
loc_E2FDC:
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
loc_E2FE2:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long my_b_write(long long a1, const char *a2, long long a3)
{
long long v4; // [rsp+8h] [rbp-38h]
unsigned int v5; // [rsp+14h] [rbp-2Ch]
long long v6; // [rsp+18h] [rbp-28h]
long long v8; // [rsp+20h] [rbp-20h]
const char *v9; // [rsp+28h] [rbp-18h]
if ( *(_QWORD *)(a1 + 232) + *(_QWORD *)a1 <= *(_QWORD *)(a1 + 8) )
{
v6 = *(_QWORD *)(a1 + 72) - *(_QWORD *)(a1 + 64);
memcpy(*(_QWORD *)(a1 + 64), a2, v6);
v9 = &a2[v6];
v8 = a3 - v6;
*(_QWORD *)(a1 + 64) += v6;
if ( (unsigned int)my_b_flush_io_cache(a1, 1) )
{
return 1;
}
else
{
if ( v8 )
{
v4 = *(_QWORD *)a1;
v5 = (*(long long ( **)(long long, const char *, long long))(a1 + 168))(a1, v9, v8);
v8 -= *(_QWORD *)a1 - v4;
v9 += *(_QWORD *)a1 - v4;
}
else
{
v5 = 0;
}
if ( !v5 && v8 )
{
memcpy(*(_QWORD *)(a1 + 64), v9, v8);
*(_QWORD *)(a1 + 64) += v8;
}
return v5;
}
}
else
{
*(_DWORD *)__errno_location() = 27;
*(_DWORD *)my_thread_var(a1, a2) = 27;
*(_DWORD *)(a1 + 228) = -1;
return (unsigned int)-1;
}
}
| _my_b_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
JMP 0x001e2e86
LAB_001e2e86:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RCX + 0xe8]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x8]
JBE 0x001e2ed2
CALL 0x0012a750
MOV dword ptr [RAX],0x1b
CALL 0x001fc1b0
MOV dword ptr [RAX],0x1b
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],0xffffffff
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001e2fe2
LAB_001e2ed2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001e2eeb
LAB_001e2eeb:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0012a0b0
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RAX + 0x40],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x001e2b50
CMP EAX,0x0
JZ 0x001e2f4a
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e2fe2
LAB_001e2f4a:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001e2fa3
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xa8]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL RAX
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
SUB RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
SUB RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001e2faa
LAB_001e2fa3:
MOV dword ptr [RBP + -0x2c],0x0
LAB_001e2faa:
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x001e2fdc
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001e2fdc
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012a0b0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RAX + 0x40],RCX
LAB_001e2fdc:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001e2fe2:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int _my_b_write(long *param_1,void *param_2,long param_3)
{
long lVar1;
int iVar2;
int *piVar3;
int4 *puVar4;
size_t __n;
int local_34;
size_t local_28;
void *local_20;
int local_c;
if ((ulong)param_1[1] < (ulong)(*param_1 + param_1[0x1d])) {
piVar3 = __errno_location();
*piVar3 = 0x1b;
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x1b;
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
local_c = -1;
}
else {
__n = param_1[9] - param_1[8];
memcpy((void *)param_1[8],param_2,__n);
local_20 = (void *)(__n + (long)param_2);
param_3 = param_3 - __n;
param_1[8] = __n + param_1[8];
iVar2 = my_b_flush_io_cache(param_1,1);
if (iVar2 == 0) {
if (param_3 == 0) {
local_34 = 0;
local_28 = 0;
}
else {
lVar1 = *param_1;
local_34 = (*(code *)param_1[0x15])(param_1,local_20,param_3);
local_28 = param_3 - (*param_1 - lVar1);
local_20 = (void *)((*param_1 - lVar1) + (long)local_20);
}
if ((local_34 == 0) && (local_28 != 0)) {
memcpy((void *)param_1[8],local_20,local_28);
param_1[8] = local_28 + param_1[8];
}
local_c = local_34;
}
else {
local_c = 1;
}
}
return local_c;
}
| |
32,553 | nlohmann::json_abi_v3_11_3::detail::lexer<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_number() | llama.cpp/common/json.hpp | token_type scan_number() // lgtm [cpp/use-of-goto]
{
// reset token_buffer to store the number's bytes
reset();
// the type of the parsed number; initially set to unsigned; will be
// changed if minus sign, decimal point or exponent is read
token_type number_type = token_type::value_unsigned;
// state (init): we just found out we need to scan a number
switch (current)
{
case '-':
{
add(current);
goto scan_number_minus;
}
case '0':
{
add(current);
goto scan_number_zero;
}
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
// all other characters are rejected outside scan_number()
default: // LCOV_EXCL_LINE
JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE
}
scan_number_minus:
// state: we just parsed a leading minus sign
number_type = token_type::value_integer;
switch (get())
{
case '0':
{
add(current);
goto scan_number_zero;
}
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
default:
{
error_message = "invalid number; expected digit after '-'";
return token_type::parse_error;
}
}
scan_number_zero:
// state: we just parse a zero (maybe with a leading minus sign)
switch (get())
{
case '.':
{
add(decimal_point_char);
goto scan_number_decimal1;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_any1:
// state: we just parsed a number 0-9 (maybe with a leading minus sign)
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
case '.':
{
add(decimal_point_char);
goto scan_number_decimal1;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_decimal1:
// state: we just parsed a decimal point
number_type = token_type::value_float;
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_decimal2;
}
default:
{
error_message = "invalid number; expected digit after '.'";
return token_type::parse_error;
}
}
scan_number_decimal2:
// we just parsed at least one number after a decimal point
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_decimal2;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_exponent:
// we just parsed an exponent
number_type = token_type::value_float;
switch (get())
{
case '+':
case '-':
{
add(current);
goto scan_number_sign;
}
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
{
error_message =
"invalid number; expected '+', '-', or digit after exponent";
return token_type::parse_error;
}
}
scan_number_sign:
// we just parsed an exponent sign
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
{
error_message = "invalid number; expected digit after exponent sign";
return token_type::parse_error;
}
}
scan_number_any2:
// we just parsed a number after the exponent or exponent sign
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
goto scan_number_done;
}
scan_number_done:
// unget the character after the number (we only read it to know that
// we are done scanning a number)
unget();
char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
errno = 0;
// try to parse integers first and fall back to floats
if (number_type == token_type::value_unsigned)
{
const auto x = std::strtoull(token_buffer.data(), &endptr, 10);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
if (errno == 0)
{
value_unsigned = static_cast<number_unsigned_t>(x);
if (value_unsigned == x)
{
return token_type::value_unsigned;
}
}
}
else if (number_type == token_type::value_integer)
{
const auto x = std::strtoll(token_buffer.data(), &endptr, 10);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
if (errno == 0)
{
value_integer = static_cast<number_integer_t>(x);
if (value_integer == x)
{
return token_type::value_integer;
}
}
}
// this code is reached if we parse a floating-point number or if an
// integer conversion above failed
strtof(value_float, token_buffer.data(), &endptr);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
return token_type::value_float;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_number():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x85984
movl 0x14(%rbx), %eax
leal -0x31(%rax), %ecx
cmpl $0x9, %ecx
jae 0x856fe
leaq 0x50(%rbx), %r14
movl $0x5, %ebp
movsbl %al, %esi
movq %r14, %rdi
callq 0x213e0
leaq 0x50(%rbx), %r14
movq %rbx, %rdi
callq 0x2164e
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jae 0x8560e
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x213e0
jmp 0x855f0
cmpl $0x2e, %eax
je 0x85770
cmpl $0x45, %eax
je 0x857cc
cmpl $0x65, %eax
je 0x857cc
movq %rbx, %rdi
callq 0x85920
movq $0x0, (%rsp)
callq 0x21110
movq %rax, %r14
movl $0x0, (%rax)
movq 0x50(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
movl $0xa, %edx
cmpl $0x5, %ebp
jne 0x85683
callq 0x20df0
movq 0x50(%rbx), %rcx
addq 0x58(%rbx), %rcx
cmpq %rcx, (%r15)
jne 0x858c6
cmpl $0x0, (%r14)
jne 0x8569f
movl $0x5, %ecx
movl $0x80, %edx
jmp 0x856f5
callq 0x20d40
movq 0x50(%rbx), %rcx
addq 0x58(%rbx), %rcx
cmpq %rcx, (%r15)
jne 0x858e2
cmpl $0x0, (%r14)
je 0x856eb
movq 0x50(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x214a0
movsd %xmm0, 0x88(%rbx)
movq 0x50(%rbx), %rax
addq 0x58(%rbx), %rax
movl $0x7, %ecx
cmpq %rax, (%r14)
je 0x85806
leaq 0x9429f(%rip), %rdi # 0x119972
leaq 0x8cbb8(%rip), %rdx # 0x112292
leaq 0x950d3(%rip), %rcx # 0x11a7b4
movl $0x21d6, %esi # imm = 0x21D6
jmp 0x85918
movl $0x6, %ecx
movl $0x78, %edx
movq %rax, (%rbx,%rdx)
jmp 0x85806
cmpl $0x30, %eax
je 0x8573e
cmpl $0x2d, %eax
jne 0x858fe
leaq 0x50(%rbx), %r14
movq %r14, %rdi
movl $0x2d, %esi
callq 0x213e0
movq %rbx, %rdi
callq 0x2164e
leal -0x31(%rax), %ecx
cmpl $0x9, %ecx
jae 0x8589f
movl 0x14(%rbx), %eax
movl $0x6, %ebp
jmp 0x855e1
leaq 0x50(%rbx), %rdi
movl $0x30, %esi
callq 0x213e0
movl $0x5, %ebp
movq %rbx, %rdi
callq 0x2164e
cmpl $0x65, %eax
je 0x857c8
cmpl $0x45, %eax
je 0x857c8
cmpl $0x2e, %eax
jne 0x85629
leaq 0x50(%rbx), %r14
movsbl 0x90(%rbx), %esi
movq %r14, %rdi
callq 0x213e0
movq %rbx, %rdi
callq 0x2164e
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x857bf
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x213e0
movq %rbx, %rdi
callq 0x2164e
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x85793
cmpl $0x65, %eax
je 0x857cc
cmpl $0x45, %eax
jne 0x85853
jmp 0x857cc
leaq 0x94f57(%rip), %rax # 0x11a71d
jmp 0x857fd
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x213e0
movq %rbx, %rdi
callq 0x2164e
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x85813
cmpl $0x2d, %eax
je 0x85873
cmpl $0x2b, %eax
je 0x85873
leaq 0x94f49(%rip), %rax # 0x11a746
movq %rax, 0x70(%rbx)
movl $0xe, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x213e0
movq %rbx, %rdi
callq 0x2164e
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x85853
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x213e0
movq %rbx, %rdi
callq 0x2164e
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x85837
movq %rbx, %rdi
callq 0x85920
movq $0x0, (%rsp)
callq 0x21110
movl $0x0, (%rax)
jmp 0x8569f
movsbl 0x14(%rbx), %esi
leaq 0x50(%rbx), %r14
movq %r14, %rdi
callq 0x213e0
movq %rbx, %rdi
callq 0x2164e
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x85817
leaq 0x94ee7(%rip), %rax # 0x11a781
jmp 0x857fd
cmpl $0x30, %eax
je 0x858b0
leaq 0x94e49(%rip), %rax # 0x11a6f4
jmp 0x857fd
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x213e0
movl $0x6, %ebp
jmp 0x85751
leaq 0x940a5(%rip), %rdi # 0x119972
leaq 0x8c9be(%rip), %rdx # 0x112292
leaq 0x94ed9(%rip), %rcx # 0x11a7b4
movl $0x21b5, %esi # imm = 0x21B5
jmp 0x85918
leaq 0x94089(%rip), %rdi # 0x119972
leaq 0x8c9a2(%rip), %rdx # 0x112292
leaq 0x94ebd(%rip), %rcx # 0x11a7b4
movl $0x21c5, %esi # imm = 0x21C5
jmp 0x85918
leaq 0x9406d(%rip), %rdi # 0x119972
leaq 0x8c986(%rip), %rdx # 0x112292
leaq 0x909bd(%rip), %rcx # 0x1162d0
movl $0x20be, %esi # imm = 0x20BE
xorl %eax, %eax
callq 0x20e80
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(void)
mov eax, [rbx+14h]
lea ecx, [rax-31h]
cmp ecx, 9
jnb loc_856FE
lea r14, [rbx+50h]
mov ebp, 5
loc_855E1:
movsx esi, al
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
lea r14, [rbx+50h]
loc_855F0:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jnb short loc_8560E
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short loc_855F0
loc_8560E:
cmp eax, 2Eh ; '.'
jz loc_85770
cmp eax, 45h ; 'E'
jz loc_857CC
cmp eax, 65h ; 'e'
jz loc_857CC
loc_85629:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
mov [rsp+28h+var_28], 0
call ___errno_location
mov r14, rax
mov dword ptr [rax], 0
mov rdi, [rbx+50h]
mov r15, rsp
mov rsi, r15
mov edx, 0Ah
cmp ebp, 5
jnz short loc_85683
call _strtoull
mov rcx, [rbx+50h]
add rcx, [rbx+58h]
cmp [r15], rcx
jnz loc_858C6
cmp dword ptr [r14], 0
jnz short loc_8569F
mov ecx, 5
mov edx, 80h
jmp short loc_856F5
loc_85683:
call _strtoll
mov rcx, [rbx+50h]
add rcx, [rbx+58h]
cmp [r15], rcx
jnz loc_858E2
cmp dword ptr [r14], 0
jz short loc_856EB
loc_8569F:
mov rdi, [rbx+50h]
mov r14, rsp
mov rsi, r14
call _strtod
movsd qword ptr [rbx+88h], xmm0
mov rax, [rbx+50h]
add rax, [rbx+58h]
mov ecx, 7
cmp [r14], rax
jz loc_85806
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"...
mov esi, 21D6h
jmp loc_85918
loc_856EB:
mov ecx, 6
mov edx, 78h ; 'x'
loc_856F5:
mov [rbx+rdx], rax
jmp loc_85806
loc_856FE:
cmp eax, 30h ; '0'
jz short loc_8573E
cmp eax, 2Dh ; '-'
jnz loc_858FE
lea r14, [rbx+50h]
mov rdi, r14
mov esi, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax-31h]
cmp ecx, 9
jnb loc_8589F
mov eax, [rbx+14h]
mov ebp, 6
jmp loc_855E1
loc_8573E:
lea rdi, [rbx+50h]
mov esi, 30h ; '0'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov ebp, 5
loc_85751:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 65h ; 'e'
jz short loc_857C8
cmp eax, 45h ; 'E'
jz short loc_857C8
cmp eax, 2Eh ; '.'
jnz loc_85629
lea r14, [rbx+50h]
loc_85770:
movsx esi, byte ptr [rbx+90h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 9
ja short loc_857BF
lea r14, [rbx+50h]
loc_85793:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jb short loc_85793
cmp eax, 65h ; 'e'
jz short loc_857CC
cmp eax, 45h ; 'E'
jnz loc_85853
jmp short loc_857CC
loc_857BF:
lea rax, aInvalidNumberE; "invalid number; expected digit after '."...
jmp short loc_857FD
loc_857C8:
lea r14, [rbx+50h]
loc_857CC:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jb short loc_85813
cmp eax, 2Dh ; '-'
jz loc_85873
cmp eax, 2Bh ; '+'
jz short loc_85873
lea rax, aInvalidNumberE_0; "invalid number; expected '+', '-', or d"...
loc_857FD:
mov [rbx+70h], rax
mov ecx, 0Eh
loc_85806:
mov eax, ecx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_85813:
lea r14, [rbx+50h]
loc_85817:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 9
ja short loc_85853
lea r14, [rbx+50h]
loc_85837:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 0Ah
jb short loc_85837
loc_85853:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
mov [rsp+28h+var_28], 0
call ___errno_location
mov dword ptr [rax], 0
jmp loc_8569F
loc_85873:
movsx esi, byte ptr [rbx+14h]
lea r14, [rbx+50h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 0Ah
jb short loc_85817
lea rax, aInvalidNumberE_1; "invalid number; expected digit after ex"...
jmp loc_857FD
loc_8589F:
cmp eax, 30h ; '0'
jz short loc_858B0
lea rax, aInvalidNumberE_2; "invalid number; expected digit after '-"...
jmp loc_857FD
loc_858B0:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov ebp, 6
jmp loc_85751
loc_858C6:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"...
mov esi, 21B5h
jmp short loc_85918
loc_858E2:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"...
mov esi, 21C5h
jmp short loc_85918
loc_858FE:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAdvancedOption+0ABh; "false"
mov esi, 20BEh
loc_85918:
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(
long long a1)
{
long long v1; // rax
int v3; // eax
long long v4; // r14
int v5; // ebp
long long v6; // r14
int v7; // eax
_DWORD *v8; // r14
long long v9; // rdi
long long v10; // rax
unsigned int v11; // ecx
long long v12; // rdx
int v13; // eax
int v14; // eax
int v15; // eax
const char *v16; // rax
int v17; // eax
long long v19; // r14
_QWORD v20[5]; // [rsp+0h] [rbp-28h] BYREF
v20[0] = v1;
nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(a1);
v3 = *(_DWORD *)(a1 + 20);
if ( (unsigned int)(v3 - 49) >= 9 )
{
if ( v3 == 48 )
{
std::string::push_back(a1 + 80, 48LL);
v5 = 5;
}
else
{
if ( v3 != 45 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
8382LL,
"GGML_ASSERT(%s) failed",
"false");
return nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp");
}
v4 = a1 + 80;
std::string::push_back(a1 + 80, 45LL);
v13 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
if ( (unsigned int)(v13 - 49) < 9 )
{
v3 = *(_DWORD *)(a1 + 20);
v5 = 6;
goto LABEL_3;
}
if ( v13 != 48 )
{
v16 = "invalid number; expected digit after '-'";
goto LABEL_40;
}
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
v5 = 6;
}
v14 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
if ( v14 == 101 || v14 == 69 )
{
v6 = a1 + 80;
goto LABEL_36;
}
if ( v14 != 46 )
goto LABEL_9;
v6 = a1 + 80;
LABEL_28:
std::string::push_back(v6, (unsigned int)*(char *)(a1 + 144));
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1)
- 48 > 9 )
{
v16 = "invalid number; expected digit after '.'";
LABEL_40:
*(_QWORD *)(a1 + 112) = v16;
return 14;
}
v6 = a1 + 80;
do
{
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
v15 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
}
while ( (unsigned int)(v15 - 48) < 0xA );
if ( v15 != 101 && v15 != 69 )
{
LABEL_45:
nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
v20[0] = 0LL;
*(_DWORD *)__errno_location(a1) = 0;
goto LABEL_15;
}
LABEL_36:
std::string::push_back(v6, (unsigned int)*(char *)(a1 + 20));
v17 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
if ( (unsigned int)(v17 - 48) < 0xA )
{
v19 = a1 + 80;
}
else
{
if ( v17 != 45 && v17 != 43 )
{
v16 = "invalid number; expected '+', '-', or digit after exponent";
goto LABEL_40;
}
v19 = a1 + 80;
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1)
- 48 >= 0xA )
{
v16 = "invalid number; expected digit after exponent sign";
goto LABEL_40;
}
}
std::string::push_back(v19, (unsigned int)*(char *)(a1 + 20));
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1)
- 48 <= 9 )
{
do
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
while ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1)
- 48 < 0xA );
}
goto LABEL_45;
}
v4 = a1 + 80;
v5 = 5;
LABEL_3:
std::string::push_back(v4, (unsigned int)(char)v3);
v6 = a1 + 80;
while ( 1 )
{
v7 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
if ( (unsigned int)(v7 - 48) >= 0xA )
break;
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
}
if ( v7 == 46 )
goto LABEL_28;
if ( v7 == 69 || v7 == 101 )
goto LABEL_36;
LABEL_9:
nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
v20[0] = 0LL;
v8 = (_DWORD *)__errno_location(a1);
*v8 = 0;
v9 = *(_QWORD *)(a1 + 80);
if ( v5 == 5 )
{
v10 = strtoull(v9, v20, 10LL);
if ( v20[0] != *(_QWORD *)(a1 + 88) + *(_QWORD *)(a1 + 80) )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
8629LL,
"GGML_ASSERT(%s) failed",
"endptr == token_buffer.data() + token_buffer.size()");
return nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp");
}
if ( !*v8 )
{
v11 = 5;
v12 = 128LL;
LABEL_18:
*(_QWORD *)(a1 + v12) = v10;
return v11;
}
}
else
{
v10 = strtoll(v9, v20, 10LL);
if ( v20[0] != *(_QWORD *)(a1 + 88) + *(_QWORD *)(a1 + 80) )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
8645LL,
"GGML_ASSERT(%s) failed",
"endptr == token_buffer.data() + token_buffer.size()");
return nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp");
}
if ( !*v8 )
{
v11 = 6;
v12 = 120LL;
goto LABEL_18;
}
}
LABEL_15:
*(double *)(a1 + 136) = strtod(*(_QWORD *)(a1 + 80), v20);
v11 = 7;
if ( v20[0] == *(_QWORD *)(a1 + 88) + *(_QWORD *)(a1 + 80) )
return v11;
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
8662LL,
"GGML_ASSERT(%s) failed",
"endptr == token_buffer.data() + token_buffer.size()");
return nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp");
}
| scan_number:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00185984
MOV EAX,dword ptr [RBX + 0x14]
LEA ECX,[RAX + -0x31]
CMP ECX,0x9
JNC 0x001856fe
LEA R14,[RBX + 0x50]
MOV EBP,0x5
LAB_001855e1:
MOVSX ESI,AL
MOV RDI,R14
CALL 0x001213e0
LEA R14,[RBX + 0x50]
LAB_001855f0:
MOV RDI,RBX
CALL 0x0012164e
LEA ECX,[RAX + -0x30]
CMP ECX,0xa
JNC 0x0018560e
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x001213e0
JMP 0x001855f0
LAB_0018560e:
CMP EAX,0x2e
JZ 0x00185770
CMP EAX,0x45
JZ 0x001857cc
CMP EAX,0x65
JZ 0x001857cc
LAB_00185629:
MOV RDI,RBX
CALL 0x00185920
MOV qword ptr [RSP],0x0
CALL 0x00121110
MOV R14,RAX
MOV dword ptr [RAX],0x0
MOV RDI,qword ptr [RBX + 0x50]
MOV R15,RSP
MOV RSI,R15
MOV EDX,0xa
CMP EBP,0x5
JNZ 0x00185683
CALL 0x00120df0
MOV RCX,qword ptr [RBX + 0x50]
ADD RCX,qword ptr [RBX + 0x58]
CMP qword ptr [R15],RCX
JNZ 0x001858c6
CMP dword ptr [R14],0x0
JNZ 0x0018569f
MOV ECX,0x5
MOV EDX,0x80
JMP 0x001856f5
LAB_00185683:
CALL 0x00120d40
MOV RCX,qword ptr [RBX + 0x50]
ADD RCX,qword ptr [RBX + 0x58]
CMP qword ptr [R15],RCX
JNZ 0x001858e2
CMP dword ptr [R14],0x0
JZ 0x001856eb
LAB_0018569f:
MOV RDI,qword ptr [RBX + 0x50]
MOV R14,RSP
MOV RSI,R14
CALL 0x001214a0
MOVSD qword ptr [RBX + 0x88],XMM0
MOV RAX,qword ptr [RBX + 0x50]
ADD RAX,qword ptr [RBX + 0x58]
MOV ECX,0x7
CMP qword ptr [R14],RAX
JZ 0x00185806
LEA RDI,[0x219972]
LEA RDX,[0x212292]
LEA RCX,[0x21a7b4]
MOV ESI,0x21d6
JMP 0x00185918
LAB_001856eb:
MOV ECX,0x6
MOV EDX,0x78
LAB_001856f5:
MOV qword ptr [RBX + RDX*0x1],RAX
JMP 0x00185806
LAB_001856fe:
CMP EAX,0x30
JZ 0x0018573e
CMP EAX,0x2d
JNZ 0x001858fe
LEA R14,[RBX + 0x50]
MOV RDI,R14
MOV ESI,0x2d
CALL 0x001213e0
MOV RDI,RBX
CALL 0x0012164e
LEA ECX,[RAX + -0x31]
CMP ECX,0x9
JNC 0x0018589f
MOV EAX,dword ptr [RBX + 0x14]
MOV EBP,0x6
JMP 0x001855e1
LAB_0018573e:
LEA RDI,[RBX + 0x50]
MOV ESI,0x30
CALL 0x001213e0
MOV EBP,0x5
LAB_00185751:
MOV RDI,RBX
CALL 0x0012164e
CMP EAX,0x65
JZ 0x001857c8
CMP EAX,0x45
JZ 0x001857c8
CMP EAX,0x2e
JNZ 0x00185629
LEA R14,[RBX + 0x50]
LAB_00185770:
MOVSX ESI,byte ptr [RBX + 0x90]
MOV RDI,R14
CALL 0x001213e0
MOV RDI,RBX
CALL 0x0012164e
ADD EAX,-0x30
CMP EAX,0x9
JA 0x001857bf
LEA R14,[RBX + 0x50]
LAB_00185793:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x001213e0
MOV RDI,RBX
CALL 0x0012164e
LEA ECX,[RAX + -0x30]
CMP ECX,0xa
JC 0x00185793
CMP EAX,0x65
JZ 0x001857cc
CMP EAX,0x45
JNZ 0x00185853
JMP 0x001857cc
LAB_001857bf:
LEA RAX,[0x21a71d]
JMP 0x001857fd
LAB_001857c8:
LEA R14,[RBX + 0x50]
LAB_001857cc:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x001213e0
MOV RDI,RBX
CALL 0x0012164e
LEA ECX,[RAX + -0x30]
CMP ECX,0xa
JC 0x00185813
CMP EAX,0x2d
JZ 0x00185873
CMP EAX,0x2b
JZ 0x00185873
LEA RAX,[0x21a746]
LAB_001857fd:
MOV qword ptr [RBX + 0x70],RAX
MOV ECX,0xe
LAB_00185806:
MOV EAX,ECX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00185813:
LEA R14,[RBX + 0x50]
LAB_00185817:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x001213e0
MOV RDI,RBX
CALL 0x0012164e
ADD EAX,-0x30
CMP EAX,0x9
JA 0x00185853
LEA R14,[RBX + 0x50]
LAB_00185837:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x001213e0
MOV RDI,RBX
CALL 0x0012164e
ADD EAX,-0x30
CMP EAX,0xa
JC 0x00185837
LAB_00185853:
MOV RDI,RBX
CALL 0x00185920
MOV qword ptr [RSP],0x0
CALL 0x00121110
MOV dword ptr [RAX],0x0
JMP 0x0018569f
LAB_00185873:
MOVSX ESI,byte ptr [RBX + 0x14]
LEA R14,[RBX + 0x50]
MOV RDI,R14
CALL 0x001213e0
MOV RDI,RBX
CALL 0x0012164e
ADD EAX,-0x30
CMP EAX,0xa
JC 0x00185817
LEA RAX,[0x21a781]
JMP 0x001857fd
LAB_0018589f:
CMP EAX,0x30
JZ 0x001858b0
LEA RAX,[0x21a6f4]
JMP 0x001857fd
LAB_001858b0:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x001213e0
MOV EBP,0x6
JMP 0x00185751
LAB_001858c6:
LEA RDI,[0x219972]
LEA RDX,[0x212292]
LEA RCX,[0x21a7b4]
MOV ESI,0x21b5
JMP 0x00185918
LAB_001858e2:
LEA RDI,[0x219972]
LEA RDX,[0x212292]
LEA RCX,[0x21a7b4]
MOV ESI,0x21c5
JMP 0x00185918
LAB_001858fe:
LEA RDI,[0x219972]
LEA RDX,[0x212292]
LEA RCX,[0x2162d0]
MOV ESI,0x20be
LAB_00185918:
XOR EAX,EAX
CALL 0x00120e80
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_number() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_number(lexer<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
char cVar1;
int iVar2;
int iVar3;
char *in_RAX;
int *piVar4;
ulonglong uVar5;
int8 uVar6;
char *pcVar7;
long lVar8;
double dVar9;
char *local_28;
local_28 = in_RAX;
reset(this);
iVar3 = *(int *)(this + 0x14);
cVar1 = (char)this;
if (iVar3 - 0x31U < 9) {
iVar3 = 5;
LAB_001855e1:
std::__cxx11::string::push_back(cVar1 + 'P');
while (iVar2 = get(this), iVar2 - 0x30U < 10) {
std::__cxx11::string::push_back(cVar1 + 'P');
}
if (iVar2 == 0x2e) {
LAB_00185770:
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (9 < iVar3 - 0x30U) {
pcVar7 = "invalid number; expected digit after \'.\'";
goto LAB_001857fd;
}
do {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
} while (iVar3 - 0x30U < 10);
if ((iVar3 == 0x65) || (iVar3 == 0x45)) goto LAB_001857cc;
goto LAB_00185853;
}
if ((iVar2 == 0x45) || (iVar2 == 0x65)) goto LAB_001857cc;
LAB_00185629:
unget(this);
local_28 = (char *)0x0;
piVar4 = __errno_location();
*piVar4 = 0;
if (iVar3 == 5) {
uVar5 = strtoull(*(char **)(this + 0x50),&local_28,10);
if (local_28 != (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) {
pcVar7 = "endptr == token_buffer.data() + token_buffer.size()";
uVar6 = 0x21b5;
goto LAB_00185918;
}
if (*piVar4 == 0) {
uVar6 = 5;
lVar8 = 0x80;
LAB_001856f5:
*(ulonglong *)(this + lVar8) = uVar5;
return uVar6;
}
}
else {
uVar5 = strtoll(*(char **)(this + 0x50),&local_28,10);
if (local_28 != (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) {
pcVar7 = "endptr == token_buffer.data() + token_buffer.size()";
uVar6 = 0x21c5;
goto LAB_00185918;
}
if (*piVar4 == 0) {
uVar6 = 6;
lVar8 = 0x78;
goto LAB_001856f5;
}
}
}
else {
if (iVar3 == 0x30) {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = 5;
}
else {
if (iVar3 != 0x2d) {
pcVar7 = "false";
uVar6 = 0x20be;
goto LAB_00185918;
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (iVar3 - 0x31U < 9) {
iVar3 = 6;
goto LAB_001855e1;
}
if (iVar3 != 0x30) {
pcVar7 = "invalid number; expected digit after \'-\'";
goto LAB_001857fd;
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = 6;
}
iVar2 = get(this);
if ((iVar2 != 0x65) && (iVar2 != 0x45)) {
if (iVar2 != 0x2e) goto LAB_00185629;
goto LAB_00185770;
}
LAB_001857cc:
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (9 < iVar3 - 0x30U) {
if ((iVar3 != 0x2d) && (iVar3 != 0x2b)) {
pcVar7 = "invalid number; expected \'+\', \'-\', or digit after exponent";
LAB_001857fd:
*(char **)(this + 0x70) = pcVar7;
return 0xe;
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (9 < iVar3 - 0x30U) {
pcVar7 = "invalid number; expected digit after exponent sign";
goto LAB_001857fd;
}
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (iVar3 - 0x30U < 10) {
do {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
} while (iVar3 - 0x30U < 10);
}
LAB_00185853:
unget(this);
local_28 = (char *)0x0;
piVar4 = __errno_location();
*piVar4 = 0;
}
dVar9 = strtod(*(char **)(this + 0x50),&local_28);
*(double *)(this + 0x88) = dVar9;
if (local_28 == (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) {
return 7;
}
pcVar7 = "endptr == token_buffer.data() + token_buffer.size()";
uVar6 = 0x21d6;
LAB_00185918:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar7);
}
| |
32,554 | MainWindow::arrive_stair(Elevetor&) | LeafBlue[P]myElevetor/mainwindow.cpp | void MainWindow::arrive_stair(Elevetor &thisele)
{
thisele.anime->deleteLater();
//停止定时器
thisele.checktime.stop();
//找到对应按钮修改颜色
QPushButton* thisbtn = thisele.btn_map[thisele.endstair];
thisbtn->setProperty("pressedState","false");
thisbtn->style()->unpolish(thisbtn);
thisbtn->style()->polish(thisbtn);
thisbtn->update();
//修改外部按钮的颜色,首先检查同方向的,如果同方向的不需要修改则修改相反方向的
//但这里并不要修改方向,通常我们认为向上运行处理向下请求后,需要根据电梯内部请求处理,而不是立刻就往下开始走,都不知道要去哪。
if(thisele.direct == 1){
QPushButton* outbtn = thisele.outbtn_up->value(thisele.endstair);
bool ispress = outbtn->property("pressedState").toBool();
if(ispress){
outbtn->setProperty("pressedState","false");
outbtn->style()->unpolish(outbtn);
outbtn->style()->polish(outbtn);
outbtn->update();
}else{
outbtn = thisele.outbtn_down->value(thisele.endstair);
outbtn->setProperty("pressedState","false");
outbtn->style()->unpolish(outbtn);
outbtn->style()->polish(outbtn);
outbtn->update();
}
}else{
QPushButton* outbtn = thisele.outbtn_down->value(thisele.endstair);
bool ispress = outbtn->property("pressedState").toBool();
if(ispress){
outbtn->setProperty("pressedState","false");
outbtn->style()->unpolish(outbtn);
outbtn->style()->polish(outbtn);
outbtn->update();
}else{
outbtn = thisele.outbtn_up->value(thisele.endstair);
outbtn->setProperty("pressedState","false");
outbtn->style()->unpolish(outbtn);
outbtn->style()->polish(outbtn);
outbtn->update();
}
}
thisele.status = 4;//开门动画中
thisele.nowstair = thisele.endstair;
//删除对应数组(外部请求数组会先删除再移动到内部,不用刻意删除)
int over_size = thisele.del_stair(thisele.endstair);
if(over_size==0){
//重新设置方向,但并不开始移动,需要等待关门函数处理完毕
thisele.wait_to_action();
}
//电梯停靠1秒后开始执行开门动画
QTimer::singleShot(1000,this,[this,&thisele](){
opendoor(thisele);
});
} | O1 | cpp | MainWindow::arrive_stair(Elevetor&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rsi), %rdi
callq 0x4110
leaq 0x58(%r14), %rdi
callq 0x4310
leaq 0x20(%r14), %rdi
leaq 0x44(%r14), %r12
movq %r12, %rsi
callq 0x7e2c
movq (%rax), %r15
leaq 0x45b6(%rip), %rsi # 0xb2c2
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x7da2
leaq 0x4595(%rip), %rsi # 0xb2b5
movq %r15, %rdi
movq %r13, %rdx
callq 0x4190
leaq 0x8(%rsp), %rdi
callq 0x4170
movq %r15, %rdi
callq 0x4430
movq (%rax), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq *0x68(%rcx)
movq %r15, %rdi
callq 0x4430
movq (%rax), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq *0x60(%rcx)
movq %r15, %rdi
callq 0x4120
cmpl $0x1, 0x48(%r14)
jne 0x6de6
movq 0x28(%r14), %rdi
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %r12, %rsi
callq 0x7eae
movq %rax, %r15
leaq 0x4527(%rip), %rdx # 0xb2b5
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x43a0
movq %r13, %rdi
callq 0x4200
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x4170
testb %bpl, %bpl
je 0x6e5c
leaq 0x4500(%rip), %rsi # 0xb2c2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7da2
leaq 0x44df(%rip), %rsi # 0xb2b5
movq %r15, %rdi
movq %r12, %rdx
callq 0x4190
jmp 0x6ee0
movq 0x30(%r14), %rdi
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %r12, %rsi
callq 0x7eae
movq %rax, %r15
leaq 0x44ad(%rip), %rdx # 0xb2b5
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x43a0
movq %r13, %rdi
callq 0x4200
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x4170
testb %bpl, %bpl
je 0x6e9f
leaq 0x448a(%rip), %rsi # 0xb2c2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7da2
leaq 0x4469(%rip), %rsi # 0xb2b5
movq %r15, %rdi
movq %r12, %rdx
callq 0x4190
jmp 0x6ee0
movq 0x30(%r14), %rdi
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %r12, %rsi
callq 0x7eae
movq %rax, %r15
leaq 0x4444(%rip), %rsi # 0xb2c2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7da2
leaq 0x4423(%rip), %rsi # 0xb2b5
movq %r15, %rdi
movq %r12, %rdx
callq 0x4190
jmp 0x6ee0
movq 0x28(%r14), %rdi
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %r12, %rsi
callq 0x7eae
movq %rax, %r15
leaq 0x4401(%rip), %rsi # 0xb2c2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7da2
leaq 0x43e0(%rip), %rsi # 0xb2b5
movq %r15, %rdi
movq %r12, %rdx
callq 0x4190
leaq 0x8(%rsp), %rdi
callq 0x4170
movq %r15, %rdi
callq 0x4430
movq (%rax), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq *0x68(%rcx)
movq %r15, %rdi
callq 0x4430
movq (%rax), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq *0x60(%rcx)
movq %r15, %rdi
callq 0x4120
movl $0x4, 0x4c(%r14)
movl 0x44(%r14), %esi
movl %esi, 0x40(%r14)
movq %r14, %rdi
callq 0x932e
testl %eax, %eax
jne 0x6f3e
movq %r14, %rdi
callq 0x9420
movl $0x20, %edi
callq 0x4380
movl $0x1, (%rax)
leaq 0xc27(%rip), %rcx # 0x7b7c
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %r14, 0x18(%rax)
movl $0x3e8, %edi # imm = 0x3E8
xorl %esi, %esi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x4540
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6f8e
jmp 0x6f8e
jmp 0x6f8e
jmp 0x6f8e
jmp 0x6f8e
jmp 0x6f8e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x41d0
nop
| _ZN10MainWindow12arrive_stairER8Elevetor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rdi, [rsi+50h]; this
call __ZN7QObject11deleteLaterEv; QObject::deleteLater(void)
lea rdi, [r14+58h]; this
call __ZN6QTimer4stopEv; QTimer::stop(void)
lea rdi, [r14+20h]
lea r12, [r14+44h]
mov rsi, r12
call _ZN4QMapIiP11QPushButtonEixERKi; QMap<int,QPushButton *>::operator[](int const&)
mov r15, [rax]
lea rsi, aFalse; "false"
lea r13, [rsp+58h+var_50]
mov rdi, r13; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r13; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
lea rdi, [rsp+58h+var_50]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov rdi, r15; this
call __ZNK7QWidget5styleEv; QWidget::style(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, r15
call qword ptr [rcx+68h]
mov rdi, r15; this
call __ZNK7QWidget5styleEv; QWidget::style(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, r15
call qword ptr [rcx+60h]
mov rdi, r15; this
call __ZN7QWidget6updateEv; QWidget::update(void)
cmp dword ptr [r14+48h], 1
jnz short loc_6DE6
mov rdi, [r14+28h]
lea rdx, [rsp+58h+var_50]
mov qword ptr [rdx], 0
mov rsi, r12
call _ZNK4QMapIiP11QPushButtonE5valueERKiRKS1_; QMap<int,QPushButton *>::value(int const&,QPushButton * const&)
mov r15, rax
lea rdx, aPressedstate; "pressedState"
lea r13, [rsp+58h+var_50]
mov rdi, r13; this
mov rsi, rax; char *
call __ZNK7QObject8propertyEPKc; QObject::property(char const*)
mov rdi, r13; this
call __ZNK8QVariant6toBoolEv; QVariant::toBool(void)
mov ebp, eax
lea rdi, [rsp+58h+var_50]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
test bpl, bpl
jz loc_6E5C
lea rsi, aFalse; "false"
lea r12, [rsp+58h+var_50]
mov rdi, r12; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r12; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
jmp loc_6EE0
loc_6DE6:
mov rdi, [r14+30h]
lea rdx, [rsp+58h+var_50]
mov qword ptr [rdx], 0
mov rsi, r12
call _ZNK4QMapIiP11QPushButtonE5valueERKiRKS1_; QMap<int,QPushButton *>::value(int const&,QPushButton * const&)
mov r15, rax
lea rdx, aPressedstate; "pressedState"
lea r13, [rsp+58h+var_50]
mov rdi, r13; this
mov rsi, rax; char *
call __ZNK7QObject8propertyEPKc; QObject::property(char const*)
mov rdi, r13; this
call __ZNK8QVariant6toBoolEv; QVariant::toBool(void)
mov ebp, eax
lea rdi, [rsp+58h+var_50]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
test bpl, bpl
jz short loc_6E9F
lea rsi, aFalse; "false"
lea r12, [rsp+58h+var_50]
mov rdi, r12; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r12; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
jmp loc_6EE0
loc_6E5C:
mov rdi, [r14+30h]
lea rdx, [rsp+58h+var_50]
mov qword ptr [rdx], 0
mov rsi, r12
call _ZNK4QMapIiP11QPushButtonE5valueERKiRKS1_; QMap<int,QPushButton *>::value(int const&,QPushButton * const&)
mov r15, rax
lea rsi, aFalse; "false"
lea r12, [rsp+58h+var_50]
mov rdi, r12; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r12; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
jmp short loc_6EE0
loc_6E9F:
mov rdi, [r14+28h]
lea rdx, [rsp+58h+var_50]
mov qword ptr [rdx], 0
mov rsi, r12
call _ZNK4QMapIiP11QPushButtonE5valueERKiRKS1_; QMap<int,QPushButton *>::value(int const&,QPushButton * const&)
mov r15, rax
lea rsi, aFalse; "false"
lea r12, [rsp+58h+var_50]
mov rdi, r12; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r12; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
loc_6EE0:
lea rdi, [rsp+58h+var_50]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov rdi, r15; this
call __ZNK7QWidget5styleEv; QWidget::style(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, r15
call qword ptr [rcx+68h]
mov rdi, r15; this
call __ZNK7QWidget5styleEv; QWidget::style(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, r15
call qword ptr [rcx+60h]
mov rdi, r15; this
call __ZN7QWidget6updateEv; QWidget::update(void)
mov dword ptr [r14+4Ch], 4
mov esi, [r14+44h]; int
mov [r14+40h], esi
mov rdi, r14; this
call _ZN8Elevetor9del_stairEi; Elevetor::del_stair(int)
test eax, eax
jnz short loc_6F3E
mov rdi, r14; this
call _ZN8Elevetor14wait_to_actionEv; Elevetor::wait_to_action(void)
loc_6F3E:
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov dword ptr [rax], 1
lea rcx, _ZN9QtPrivate18QFunctorSlotObjectIZN10MainWindow12arrive_stairER8ElevetorE3$_0Li0ENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QFunctorSlotObject<MainWindow::arrive_stair(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *)
mov [rax+8], rcx
mov [rax+10h], rbx
mov [rax+18h], r14
mov edi, 3E8h
xor esi, esi
mov rdx, rbx
mov rcx, rax
call __ZN6QTimer14singleShotImplEiN2Qt9TimerTypeEPK7QObjectPN9QtPrivate15QSlotObjectBaseE; QTimer::singleShotImpl(int,Qt::TimerType,QObject const*,QtPrivate::QSlotObjectBase *)
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_6F8E
jmp short loc_6F8E
jmp short loc_6F8E
jmp short loc_6F8E
jmp short loc_6F8E
jmp short $+2
loc_6F8E:
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov rdi, rbx
call __Unwind_Resume
| long long MainWindow::arrive_stair(MainWindow *this, QObject **a2)
{
QObject *v4; // r15
long long v5; // rax
long long v6; // rax
QObject *v7; // rdi
char *v8; // r15
char v9; // bp
QObject *v10; // rdi
char v11; // bp
QObject *v12; // rdi
QObject *v13; // rdi
long long v14; // rax
long long v15; // rax
int v16; // esi
long long v17; // rax
_QWORD v19[10]; // [rsp+8h] [rbp-50h] BYREF
QObject::deleteLater(a2[10]);
QTimer::stop((QTimer *)(a2 + 11));
v4 = *(QObject **)QMap<int,QPushButton *>::operator[](a2 + 4, (char *)a2 + 68);
QVariant::QVariant((QVariant *)v19, "false");
QObject::setProperty(v4, "pressedState", (const QVariant *)v19);
QVariant::~QVariant((QVariant *)v19);
v5 = QWidget::style(v4);
(*(void ( **)(long long, QObject *))(*(_QWORD *)v5 + 104LL))(v5, v4);
v6 = QWidget::style(v4);
(*(void ( **)(long long, QObject *))(*(_QWORD *)v6 + 96LL))(v6, v4);
QWidget::update(v4);
if ( *((_DWORD *)a2 + 18) == 1 )
{
v7 = a2[5];
v19[0] = 0LL;
v8 = (char *)QMap<int,QPushButton *>::value(v7, (char *)a2 + 68, v19);
QObject::property((QObject *)v19, v8);
v9 = QVariant::toBool((QVariant *)v19);
QVariant::~QVariant((QVariant *)v19);
if ( !v9 )
{
v12 = a2[6];
v19[0] = 0LL;
v8 = (char *)QMap<int,QPushButton *>::value(v12, (char *)a2 + 68, v19);
}
}
else
{
v10 = a2[6];
v19[0] = 0LL;
v8 = (char *)QMap<int,QPushButton *>::value(v10, (char *)a2 + 68, v19);
QObject::property((QObject *)v19, v8);
v11 = QVariant::toBool((QVariant *)v19);
QVariant::~QVariant((QVariant *)v19);
if ( !v11 )
{
v13 = a2[5];
v19[0] = 0LL;
v8 = (char *)QMap<int,QPushButton *>::value(v13, (char *)a2 + 68, v19);
}
}
QVariant::QVariant((QVariant *)v19, "false");
QObject::setProperty((QObject *)v8, "pressedState", (const QVariant *)v19);
QVariant::~QVariant((QVariant *)v19);
v14 = QWidget::style((QWidget *)v8);
(*(void ( **)(long long, char *))(*(_QWORD *)v14 + 104LL))(v14, v8);
v15 = QWidget::style((QWidget *)v8);
(*(void ( **)(long long, char *))(*(_QWORD *)v15 + 96LL))(v15, v8);
QWidget::update((QWidget *)v8);
*((_DWORD *)a2 + 19) = 4;
v16 = *((_DWORD *)a2 + 17);
*((_DWORD *)a2 + 16) = v16;
if ( !(unsigned int)Elevetor::del_stair((Elevetor *)a2, v16) )
Elevetor::wait_to_action((Elevetor *)a2);
v17 = operator new(0x20uLL);
*(_DWORD *)v17 = 1;
*(_QWORD *)(v17 + 8) = &QtPrivate::QFunctorSlotObject<MainWindow::arrive_stair(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl;
*(_QWORD *)(v17 + 16) = this;
*(_QWORD *)(v17 + 24) = a2;
return QTimer::singleShotImpl(1000LL, 0LL, this, v17);
}
| arrive_stair:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RSI + 0x50]
CALL 0x00104110
LEA RDI,[R14 + 0x58]
CALL 0x00104310
LEA RDI,[R14 + 0x20]
LEA R12,[R14 + 0x44]
MOV RSI,R12
CALL 0x00107e2c
MOV R15,qword ptr [RAX]
LEA RSI,[0x10b2c2]
LEA R13,[RSP + 0x8]
MOV RDI,R13
CALL 0x00107da2
LAB_00106d19:
LEA RSI,[0x10b2b5]
MOV RDI,R15
MOV RDX,R13
CALL 0x00104190
LAB_00106d2b:
LEA RDI,[RSP + 0x8]
CALL 0x00104170
MOV RDI,R15
CALL 0x00104430
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,R15
CALL qword ptr [RCX + 0x68]
MOV RDI,R15
CALL 0x00104430
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,R15
CALL qword ptr [RCX + 0x60]
MOV RDI,R15
CALL 0x00104120
CMP dword ptr [R14 + 0x48],0x1
JNZ 0x00106de6
MOV RDI,qword ptr [R14 + 0x28]
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],0x0
MOV RSI,R12
CALL 0x00107eae
MOV R15,RAX
LEA RDX,[0x10b2b5]
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RSI,RAX
CALL 0x001043a0
LAB_00106d9e:
MOV RDI,R13
CALL 0x00104200
LAB_00106da6:
MOV EBP,EAX
LEA RDI,[RSP + 0x8]
CALL 0x00104170
TEST BPL,BPL
JZ 0x00106e5c
LEA RSI,[0x10b2c2]
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00107da2
LAB_00106dcf:
LEA RSI,[0x10b2b5]
MOV RDI,R15
MOV RDX,R12
CALL 0x00104190
LAB_00106de1:
JMP 0x00106ee0
LAB_00106de6:
MOV RDI,qword ptr [R14 + 0x30]
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],0x0
MOV RSI,R12
CALL 0x00107eae
MOV R15,RAX
LEA RDX,[0x10b2b5]
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RSI,RAX
CALL 0x001043a0
LAB_00106e18:
MOV RDI,R13
CALL 0x00104200
LAB_00106e20:
MOV EBP,EAX
LEA RDI,[RSP + 0x8]
CALL 0x00104170
TEST BPL,BPL
JZ 0x00106e9f
LEA RSI,[0x10b2c2]
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00107da2
LAB_00106e45:
LEA RSI,[0x10b2b5]
MOV RDI,R15
MOV RDX,R12
CALL 0x00104190
LAB_00106e57:
JMP 0x00106ee0
LAB_00106e5c:
MOV RDI,qword ptr [R14 + 0x30]
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],0x0
MOV RSI,R12
CALL 0x00107eae
MOV R15,RAX
LEA RSI,[0x10b2c2]
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00107da2
LAB_00106e8b:
LEA RSI,[0x10b2b5]
MOV RDI,R15
MOV RDX,R12
CALL 0x00104190
LAB_00106e9d:
JMP 0x00106ee0
LAB_00106e9f:
MOV RDI,qword ptr [R14 + 0x28]
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],0x0
MOV RSI,R12
CALL 0x00107eae
MOV R15,RAX
LEA RSI,[0x10b2c2]
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00107da2
LAB_00106ece:
LEA RSI,[0x10b2b5]
MOV RDI,R15
MOV RDX,R12
CALL 0x00104190
LAB_00106ee0:
LEA RDI,[RSP + 0x8]
CALL 0x00104170
MOV RDI,R15
CALL 0x00104430
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,R15
CALL qword ptr [RCX + 0x68]
MOV RDI,R15
CALL 0x00104430
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,R15
CALL qword ptr [RCX + 0x60]
MOV RDI,R15
CALL 0x00104120
MOV dword ptr [R14 + 0x4c],0x4
MOV ESI,dword ptr [R14 + 0x44]
MOV dword ptr [R14 + 0x40],ESI
MOV RDI,R14
CALL 0x0010932e
TEST EAX,EAX
JNZ 0x00106f3e
MOV RDI,R14
CALL 0x00109420
LAB_00106f3e:
MOV EDI,0x20
CALL 0x00104380
MOV dword ptr [RAX],0x1
LEA RCX,[0x107b7c]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],RBX
MOV qword ptr [RAX + 0x18],R14
MOV EDI,0x3e8
XOR ESI,ESI
MOV RDX,RBX
MOV RCX,RAX
CALL 0x00104540
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MainWindow::arrive_stair(Elevetor&) */
void __thiscall MainWindow::arrive_stair(MainWindow *this,Elevetor *param_1)
{
Elevetor *pEVar1;
char cVar2;
int iVar3;
int8 *puVar4;
long *plVar5;
char *pcVar6;
int4 *puVar7;
QPushButton *local_50 [4];
QObject::deleteLater();
QTimer::stop();
pEVar1 = param_1 + 0x44;
puVar4 = (int8 *)
QMap<int,QPushButton*>::operator[]
((QMap<int,QPushButton*> *)(param_1 + 0x20),(int *)pEVar1);
pcVar6 = (char *)*puVar4;
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 00106d19 to 00106d2a has its CatchHandler @ 00106f8e */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
QVariant::~QVariant((QVariant *)local_50);
plVar5 = (long *)QWidget::style();
(**(code **)(*plVar5 + 0x68))(plVar5,pcVar6);
plVar5 = (long *)QWidget::style();
(**(code **)(*plVar5 + 0x60))(plVar5,pcVar6);
QWidget::update();
if (*(int *)(param_1 + 0x48) == 1) {
local_50[0] = (QPushButton *)0x0;
pcVar6 = (char *)QMap<int,QPushButton*>::value
(*(QMap<int,QPushButton*> **)(param_1 + 0x28),(int *)pEVar1,local_50)
;
QObject::property((char *)local_50);
/* try { // try from 00106d9e to 00106da5 has its CatchHandler @ 00106f8c */
cVar2 = QVariant::toBool();
QVariant::~QVariant((QVariant *)local_50);
if (cVar2 == '\0') {
local_50[0] = (QPushButton *)0x0;
pcVar6 = (char *)QMap<int,QPushButton*>::value
(*(QMap<int,QPushButton*> **)(param_1 + 0x30),(int *)pEVar1,
local_50);
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 00106e8b to 00106e9c has its CatchHandler @ 00106f84 */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
}
else {
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 00106dcf to 00106de0 has its CatchHandler @ 00106f88 */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
}
}
else {
local_50[0] = (QPushButton *)0x0;
pcVar6 = (char *)QMap<int,QPushButton*>::value
(*(QMap<int,QPushButton*> **)(param_1 + 0x30),(int *)pEVar1,local_50)
;
QObject::property((char *)local_50);
/* try { // try from 00106e18 to 00106e1f has its CatchHandler @ 00106f8a */
cVar2 = QVariant::toBool();
QVariant::~QVariant((QVariant *)local_50);
if (cVar2 == '\0') {
local_50[0] = (QPushButton *)0x0;
pcVar6 = (char *)QMap<int,QPushButton*>::value
(*(QMap<int,QPushButton*> **)(param_1 + 0x28),(int *)pEVar1,
local_50);
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 00106ece to 00106edf has its CatchHandler @ 00106f82 */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
}
else {
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 00106e45 to 00106e56 has its CatchHandler @ 00106f86 */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
}
}
QVariant::~QVariant((QVariant *)local_50);
plVar5 = (long *)QWidget::style();
(**(code **)(*plVar5 + 0x68))(plVar5,pcVar6);
plVar5 = (long *)QWidget::style();
(**(code **)(*plVar5 + 0x60))(plVar5,pcVar6);
QWidget::update();
*(int4 *)(param_1 + 0x4c) = 4;
*(int4 *)(param_1 + 0x40) = *(int4 *)(param_1 + 0x44);
iVar3 = Elevetor::del_stair((int)param_1);
if (iVar3 == 0) {
Elevetor::wait_to_action(param_1);
}
puVar7 = (int4 *)operator_new(0x20);
*puVar7 = 1;
*(code **)(puVar7 + 2) =
QtPrivate::
QFunctorSlotObject<MainWindow::arrive_stair(Elevetor&)::$_0,0,QtPrivate::List<>,void>::impl;
*(MainWindow **)(puVar7 + 4) = this;
*(Elevetor **)(puVar7 + 6) = param_1;
QTimer::singleShotImpl(1000,0,this,puVar7);
return;
}
| |
32,555 | MainWindow::arrive_stair(Elevetor&) | LeafBlue[P]myElevetor/mainwindow.cpp | void MainWindow::arrive_stair(Elevetor &thisele)
{
thisele.anime->deleteLater();
//停止定时器
thisele.checktime.stop();
//找到对应按钮修改颜色
QPushButton* thisbtn = thisele.btn_map[thisele.endstair];
thisbtn->setProperty("pressedState","false");
thisbtn->style()->unpolish(thisbtn);
thisbtn->style()->polish(thisbtn);
thisbtn->update();
//修改外部按钮的颜色,首先检查同方向的,如果同方向的不需要修改则修改相反方向的
//但这里并不要修改方向,通常我们认为向上运行处理向下请求后,需要根据电梯内部请求处理,而不是立刻就往下开始走,都不知道要去哪。
if(thisele.direct == 1){
QPushButton* outbtn = thisele.outbtn_up->value(thisele.endstair);
bool ispress = outbtn->property("pressedState").toBool();
if(ispress){
outbtn->setProperty("pressedState","false");
outbtn->style()->unpolish(outbtn);
outbtn->style()->polish(outbtn);
outbtn->update();
}else{
outbtn = thisele.outbtn_down->value(thisele.endstair);
outbtn->setProperty("pressedState","false");
outbtn->style()->unpolish(outbtn);
outbtn->style()->polish(outbtn);
outbtn->update();
}
}else{
QPushButton* outbtn = thisele.outbtn_down->value(thisele.endstair);
bool ispress = outbtn->property("pressedState").toBool();
if(ispress){
outbtn->setProperty("pressedState","false");
outbtn->style()->unpolish(outbtn);
outbtn->style()->polish(outbtn);
outbtn->update();
}else{
outbtn = thisele.outbtn_up->value(thisele.endstair);
outbtn->setProperty("pressedState","false");
outbtn->style()->unpolish(outbtn);
outbtn->style()->polish(outbtn);
outbtn->update();
}
}
thisele.status = 4;//开门动画中
thisele.nowstair = thisele.endstair;
//删除对应数组(外部请求数组会先删除再移动到内部,不用刻意删除)
int over_size = thisele.del_stair(thisele.endstair);
if(over_size==0){
//重新设置方向,但并不开始移动,需要等待关门函数处理完毕
thisele.wait_to_action();
}
//电梯停靠1秒后开始执行开门动画
QTimer::singleShot(1000,this,[this,&thisele](){
opendoor(thisele);
});
} | O2 | cpp | MainWindow::arrive_stair(Elevetor&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rsi), %rdi
callq 0x4110
leaq 0x58(%r14), %rdi
callq 0x4310
leaq 0x20(%r14), %rdi
leaq 0x44(%r14), %r12
movq %r12, %rsi
callq 0x7102
movq (%rax), %r15
leaq 0x41b4(%rip), %rsi # 0xa2c2
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x7006
leaq 0x4193(%rip), %rsi # 0xa2b5
movq %r15, %rdi
movq %r13, %rdx
callq 0x4190
leaq 0x8(%rsp), %rdi
callq 0x4170
movq %r15, %rdi
callq 0x4450
movq (%rax), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq *0x68(%rcx)
movq %r15, %rdi
callq 0x4450
movq (%rax), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq *0x60(%rcx)
movq %r15, %rdi
callq 0x4120
cmpl $0x1, 0x48(%r14)
jne 0x61e5
movq 0x28(%r14), %rdi
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
movq %r12, %rsi
callq 0x7152
movq %rax, %r15
leaq 0x4128(%rip), %rdx # 0xa2b5
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x43b0
movq %r13, %rdi
callq 0x4200
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x4170
testb %bpl, %bpl
je 0x6255
leaq 0x4101(%rip), %rsi # 0xa2c2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7006
leaq 0x40e0(%rip), %rsi # 0xa2b5
movq %r15, %rdi
movq %r12, %rdx
callq 0x4190
jmp 0x62d3
movq 0x30(%r14), %rdi
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
movq %r12, %rsi
callq 0x7152
movq %rax, %r15
leaq 0x40b1(%rip), %rdx # 0xa2b5
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x43b0
movq %r13, %rdi
callq 0x4200
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x4170
testb %bpl, %bpl
je 0x6295
leaq 0x408e(%rip), %rsi # 0xa2c2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7006
leaq 0x406d(%rip), %rsi # 0xa2b5
movq %r15, %rdi
movq %r12, %rdx
callq 0x4190
jmp 0x62d3
movq 0x30(%r14), %rdi
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
movq %r12, %rsi
callq 0x7152
movq %rax, %r15
leaq 0x404e(%rip), %rsi # 0xa2c2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7006
leaq 0x402d(%rip), %rsi # 0xa2b5
movq %r15, %rdi
movq %r12, %rdx
callq 0x4190
jmp 0x62d3
movq 0x28(%r14), %rdi
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
movq %r12, %rsi
callq 0x7152
movq %rax, %r15
leaq 0x400e(%rip), %rsi # 0xa2c2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7006
leaq 0x3fed(%rip), %rsi # 0xa2b5
movq %r15, %rdi
movq %r12, %rdx
callq 0x4190
leaq 0x8(%rsp), %rdi
callq 0x4170
movq %r15, %rdi
callq 0x4450
movq (%rax), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq *0x68(%rcx)
movq %r15, %rdi
callq 0x4450
movq (%rax), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq *0x60(%rcx)
movq %r15, %rdi
callq 0x4120
movl $0x4, 0x4c(%r14)
movl 0x44(%r14), %esi
movl %esi, 0x40(%r14)
movq %r14, %rdi
callq 0x84ba
testl %eax, %eax
jne 0x6331
movq %r14, %rdi
callq 0x85ac
pushq $0x20
popq %rdi
callq 0x4390
movl $0x1, (%rax)
leaq 0xa1a(%rip), %rcx # 0x6d60
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %r14, 0x18(%rax)
movl $0x3e8, %edi # imm = 0x3E8
xorl %esi, %esi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x4560
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x637f
jmp 0x637f
jmp 0x637f
jmp 0x637f
jmp 0x637f
jmp 0x637f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x41d0
| _ZN10MainWindow12arrive_stairER8Elevetor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rdi, [rsi+50h]; this
call __ZN7QObject11deleteLaterEv; QObject::deleteLater(void)
lea rdi, [r14+58h]; this
call __ZN6QTimer4stopEv; QTimer::stop(void)
lea rdi, [r14+20h]
lea r12, [r14+44h]
mov rsi, r12
call _ZN4QMapIiP11QPushButtonEixERKi; QMap<int,QPushButton *>::operator[](int const&)
mov r15, [rax]
lea rsi, aFalse; "false"
lea r13, [rsp+58h+var_50]
mov rdi, r13; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r13; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
lea rdi, [rsp+58h+var_50]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov rdi, r15; this
call __ZNK7QWidget5styleEv; QWidget::style(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, r15
call qword ptr [rcx+68h]
mov rdi, r15; this
call __ZNK7QWidget5styleEv; QWidget::style(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, r15
call qword ptr [rcx+60h]
mov rdi, r15; this
call __ZN7QWidget6updateEv; QWidget::update(void)
cmp dword ptr [r14+48h], 1
jnz short loc_61E5
mov rdi, [r14+28h]
lea rdx, [rsp+58h+var_50]
and qword ptr [rdx], 0
mov rsi, r12
call _ZNK4QMapIiP11QPushButtonE5valueERKiRKS1_; QMap<int,QPushButton *>::value(int const&,QPushButton * const&)
mov r15, rax
lea rdx, aPressedstate; "pressedState"
lea r13, [rsp+58h+var_50]
mov rdi, r13; this
mov rsi, rax; char *
call __ZNK7QObject8propertyEPKc; QObject::property(char const*)
mov rdi, r13; this
call __ZNK8QVariant6toBoolEv; QVariant::toBool(void)
mov ebp, eax
lea rdi, [rsp+58h+var_50]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
test bpl, bpl
jz loc_6255
lea rsi, aFalse; "false"
lea r12, [rsp+58h+var_50]
mov rdi, r12; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r12; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
jmp loc_62D3
loc_61E5:
mov rdi, [r14+30h]
lea rdx, [rsp+58h+var_50]
and qword ptr [rdx], 0
mov rsi, r12
call _ZNK4QMapIiP11QPushButtonE5valueERKiRKS1_; QMap<int,QPushButton *>::value(int const&,QPushButton * const&)
mov r15, rax
lea rdx, aPressedstate; "pressedState"
lea r13, [rsp+58h+var_50]
mov rdi, r13; this
mov rsi, rax; char *
call __ZNK7QObject8propertyEPKc; QObject::property(char const*)
mov rdi, r13; this
call __ZNK8QVariant6toBoolEv; QVariant::toBool(void)
mov ebp, eax
lea rdi, [rsp+58h+var_50]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
test bpl, bpl
jz short loc_6295
lea rsi, aFalse; "false"
lea r12, [rsp+58h+var_50]
mov rdi, r12; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r12; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
jmp short loc_62D3
loc_6255:
mov rdi, [r14+30h]
lea rdx, [rsp+58h+var_50]
and qword ptr [rdx], 0
mov rsi, r12
call _ZNK4QMapIiP11QPushButtonE5valueERKiRKS1_; QMap<int,QPushButton *>::value(int const&,QPushButton * const&)
mov r15, rax
lea rsi, aFalse; "false"
lea r12, [rsp+58h+var_50]
mov rdi, r12; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r12; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
jmp short loc_62D3
loc_6295:
mov rdi, [r14+28h]
lea rdx, [rsp+58h+var_50]
and qword ptr [rdx], 0
mov rsi, r12
call _ZNK4QMapIiP11QPushButtonE5valueERKiRKS1_; QMap<int,QPushButton *>::value(int const&,QPushButton * const&)
mov r15, rax
lea rsi, aFalse; "false"
lea r12, [rsp+58h+var_50]
mov rdi, r12; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r12; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
loc_62D3:
lea rdi, [rsp+58h+var_50]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov rdi, r15; this
call __ZNK7QWidget5styleEv; QWidget::style(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, r15
call qword ptr [rcx+68h]
mov rdi, r15; this
call __ZNK7QWidget5styleEv; QWidget::style(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, r15
call qword ptr [rcx+60h]
mov rdi, r15; this
call __ZN7QWidget6updateEv; QWidget::update(void)
mov dword ptr [r14+4Ch], 4
mov esi, [r14+44h]; int
mov [r14+40h], esi
mov rdi, r14; this
call _ZN8Elevetor9del_stairEi; Elevetor::del_stair(int)
test eax, eax
jnz short loc_6331
mov rdi, r14; this
call _ZN8Elevetor14wait_to_actionEv; Elevetor::wait_to_action(void)
loc_6331:
push 20h ; ' '
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov dword ptr [rax], 1
lea rcx, _ZN9QtPrivate18QFunctorSlotObjectIZN10MainWindow12arrive_stairER8ElevetorE3$_0Li0ENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QFunctorSlotObject<MainWindow::arrive_stair(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *)
mov [rax+8], rcx
mov [rax+10h], rbx
mov [rax+18h], r14
mov edi, 3E8h
xor esi, esi
mov rdx, rbx
mov rcx, rax
call __ZN6QTimer14singleShotImplEiN2Qt9TimerTypeEPK7QObjectPN9QtPrivate15QSlotObjectBaseE; QTimer::singleShotImpl(int,Qt::TimerType,QObject const*,QtPrivate::QSlotObjectBase *)
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_637F
jmp short loc_637F
jmp short loc_637F
jmp short loc_637F
jmp short loc_637F
jmp short $+2
loc_637F:
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov rdi, rbx
call __Unwind_Resume
| long long MainWindow::arrive_stair(MainWindow *this, QObject **a2)
{
QObject *v4; // r15
long long v5; // rax
long long v6; // rax
QObject *v7; // rdi
char *v8; // r15
char v9; // bp
QObject *v10; // rdi
char v11; // bp
QObject *v12; // rdi
QObject *v13; // rdi
long long v14; // rax
long long v15; // rax
int v16; // esi
long long v17; // rax
_QWORD v19[10]; // [rsp+8h] [rbp-50h] BYREF
QObject::deleteLater(a2[10]);
QTimer::stop((QTimer *)(a2 + 11));
v4 = *(QObject **)QMap<int,QPushButton *>::operator[](a2 + 4, (char *)a2 + 68);
QVariant::QVariant((QVariant *)v19, "false");
QObject::setProperty(v4, "pressedState", (const QVariant *)v19);
QVariant::~QVariant((QVariant *)v19);
v5 = QWidget::style(v4);
(*(void ( **)(long long, QObject *))(*(_QWORD *)v5 + 104LL))(v5, v4);
v6 = QWidget::style(v4);
(*(void ( **)(long long, QObject *))(*(_QWORD *)v6 + 96LL))(v6, v4);
QWidget::update(v4);
if ( *((_DWORD *)a2 + 18) == 1 )
{
v7 = a2[5];
v19[0] = 0LL;
v8 = (char *)QMap<int,QPushButton *>::value(v7, (char *)a2 + 68, v19);
QObject::property((QObject *)v19, v8);
v9 = QVariant::toBool((QVariant *)v19);
QVariant::~QVariant((QVariant *)v19);
if ( !v9 )
{
v12 = a2[6];
v19[0] = 0LL;
v8 = (char *)QMap<int,QPushButton *>::value(v12, (char *)a2 + 68, v19);
}
}
else
{
v10 = a2[6];
v19[0] = 0LL;
v8 = (char *)QMap<int,QPushButton *>::value(v10, (char *)a2 + 68, v19);
QObject::property((QObject *)v19, v8);
v11 = QVariant::toBool((QVariant *)v19);
QVariant::~QVariant((QVariant *)v19);
if ( !v11 )
{
v13 = a2[5];
v19[0] = 0LL;
v8 = (char *)QMap<int,QPushButton *>::value(v13, (char *)a2 + 68, v19);
}
}
QVariant::QVariant((QVariant *)v19, "false");
QObject::setProperty((QObject *)v8, "pressedState", (const QVariant *)v19);
QVariant::~QVariant((QVariant *)v19);
v14 = QWidget::style((QWidget *)v8);
(*(void ( **)(long long, char *))(*(_QWORD *)v14 + 104LL))(v14, v8);
v15 = QWidget::style((QWidget *)v8);
(*(void ( **)(long long, char *))(*(_QWORD *)v15 + 96LL))(v15, v8);
QWidget::update((QWidget *)v8);
*((_DWORD *)a2 + 19) = 4;
v16 = *((_DWORD *)a2 + 17);
*((_DWORD *)a2 + 16) = v16;
if ( !(unsigned int)Elevetor::del_stair((Elevetor *)a2, v16) )
Elevetor::wait_to_action((Elevetor *)a2);
v17 = operator new(0x20uLL);
*(_DWORD *)v17 = 1;
*(_QWORD *)(v17 + 8) = &QtPrivate::QFunctorSlotObject<MainWindow::arrive_stair(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl;
*(_QWORD *)(v17 + 16) = this;
*(_QWORD *)(v17 + 24) = a2;
return QTimer::singleShotImpl(1000LL, 0LL, this, v17);
}
| arrive_stair:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RSI + 0x50]
CALL 0x00104110
LEA RDI,[R14 + 0x58]
CALL 0x00104310
LEA RDI,[R14 + 0x20]
LEA R12,[R14 + 0x44]
MOV RSI,R12
CALL 0x00107102
MOV R15,qword ptr [RAX]
LEA RSI,[0x10a2c2]
LEA R13,[RSP + 0x8]
MOV RDI,R13
CALL 0x00107006
LAB_0010611b:
LEA RSI,[0x10a2b5]
MOV RDI,R15
MOV RDX,R13
CALL 0x00104190
LAB_0010612d:
LEA RDI,[RSP + 0x8]
CALL 0x00104170
MOV RDI,R15
CALL 0x00104450
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,R15
CALL qword ptr [RCX + 0x68]
MOV RDI,R15
CALL 0x00104450
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,R15
CALL qword ptr [RCX + 0x60]
MOV RDI,R15
CALL 0x00104120
CMP dword ptr [R14 + 0x48],0x1
JNZ 0x001061e5
MOV RDI,qword ptr [R14 + 0x28]
LEA RDX,[RSP + 0x8]
AND qword ptr [RDX],0x0
MOV RSI,R12
CALL 0x00107152
MOV R15,RAX
LEA RDX,[0x10a2b5]
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RSI,RAX
CALL 0x001043b0
LAB_0010619d:
MOV RDI,R13
CALL 0x00104200
LAB_001061a5:
MOV EBP,EAX
LEA RDI,[RSP + 0x8]
CALL 0x00104170
TEST BPL,BPL
JZ 0x00106255
LEA RSI,[0x10a2c2]
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00107006
LAB_001061ce:
LEA RSI,[0x10a2b5]
MOV RDI,R15
MOV RDX,R12
CALL 0x00104190
LAB_001061e0:
JMP 0x001062d3
LAB_001061e5:
MOV RDI,qword ptr [R14 + 0x30]
LEA RDX,[RSP + 0x8]
AND qword ptr [RDX],0x0
MOV RSI,R12
CALL 0x00107152
MOV R15,RAX
LEA RDX,[0x10a2b5]
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RSI,RAX
CALL 0x001043b0
LAB_00106214:
MOV RDI,R13
CALL 0x00104200
LAB_0010621c:
MOV EBP,EAX
LEA RDI,[RSP + 0x8]
CALL 0x00104170
TEST BPL,BPL
JZ 0x00106295
LEA RSI,[0x10a2c2]
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00107006
LAB_00106241:
LEA RSI,[0x10a2b5]
MOV RDI,R15
MOV RDX,R12
CALL 0x00104190
LAB_00106253:
JMP 0x001062d3
LAB_00106255:
MOV RDI,qword ptr [R14 + 0x30]
LEA RDX,[RSP + 0x8]
AND qword ptr [RDX],0x0
MOV RSI,R12
CALL 0x00107152
MOV R15,RAX
LEA RSI,[0x10a2c2]
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00107006
LAB_00106281:
LEA RSI,[0x10a2b5]
MOV RDI,R15
MOV RDX,R12
CALL 0x00104190
LAB_00106293:
JMP 0x001062d3
LAB_00106295:
MOV RDI,qword ptr [R14 + 0x28]
LEA RDX,[RSP + 0x8]
AND qword ptr [RDX],0x0
MOV RSI,R12
CALL 0x00107152
MOV R15,RAX
LEA RSI,[0x10a2c2]
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00107006
LAB_001062c1:
LEA RSI,[0x10a2b5]
MOV RDI,R15
MOV RDX,R12
CALL 0x00104190
LAB_001062d3:
LEA RDI,[RSP + 0x8]
CALL 0x00104170
MOV RDI,R15
CALL 0x00104450
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,R15
CALL qword ptr [RCX + 0x68]
MOV RDI,R15
CALL 0x00104450
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,R15
CALL qword ptr [RCX + 0x60]
MOV RDI,R15
CALL 0x00104120
MOV dword ptr [R14 + 0x4c],0x4
MOV ESI,dword ptr [R14 + 0x44]
MOV dword ptr [R14 + 0x40],ESI
MOV RDI,R14
CALL 0x001084ba
TEST EAX,EAX
JNZ 0x00106331
MOV RDI,R14
CALL 0x001085ac
LAB_00106331:
PUSH 0x20
POP RDI
CALL 0x00104390
MOV dword ptr [RAX],0x1
LEA RCX,[0x106d60]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],RBX
MOV qword ptr [RAX + 0x18],R14
MOV EDI,0x3e8
XOR ESI,ESI
MOV RDX,RBX
MOV RCX,RAX
CALL 0x00104560
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MainWindow::arrive_stair(Elevetor&) */
void __thiscall MainWindow::arrive_stair(MainWindow *this,Elevetor *param_1)
{
Elevetor *pEVar1;
char cVar2;
int iVar3;
int8 *puVar4;
long *plVar5;
char *pcVar6;
int4 *puVar7;
QPushButton *local_50 [4];
QObject::deleteLater();
QTimer::stop();
pEVar1 = param_1 + 0x44;
puVar4 = (int8 *)
QMap<int,QPushButton*>::operator[]
((QMap<int,QPushButton*> *)(param_1 + 0x20),(int *)pEVar1);
pcVar6 = (char *)*puVar4;
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 0010611b to 0010612c has its CatchHandler @ 0010637f */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
QVariant::~QVariant((QVariant *)local_50);
plVar5 = (long *)QWidget::style();
(**(code **)(*plVar5 + 0x68))(plVar5,pcVar6);
plVar5 = (long *)QWidget::style();
(**(code **)(*plVar5 + 0x60))(plVar5,pcVar6);
QWidget::update();
if (*(int *)(param_1 + 0x48) == 1) {
local_50[0] = (QPushButton *)0x0;
pcVar6 = (char *)QMap<int,QPushButton*>::value
(*(QMap<int,QPushButton*> **)(param_1 + 0x28),(int *)pEVar1,local_50)
;
QObject::property((char *)local_50);
/* try { // try from 0010619d to 001061a4 has its CatchHandler @ 0010637d */
cVar2 = QVariant::toBool();
QVariant::~QVariant((QVariant *)local_50);
if (cVar2 == '\0') {
local_50[0] = (QPushButton *)0x0;
pcVar6 = (char *)QMap<int,QPushButton*>::value
(*(QMap<int,QPushButton*> **)(param_1 + 0x30),(int *)pEVar1,
local_50);
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 00106281 to 00106292 has its CatchHandler @ 00106375 */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
}
else {
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 001061ce to 001061df has its CatchHandler @ 00106379 */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
}
}
else {
local_50[0] = (QPushButton *)0x0;
pcVar6 = (char *)QMap<int,QPushButton*>::value
(*(QMap<int,QPushButton*> **)(param_1 + 0x30),(int *)pEVar1,local_50)
;
QObject::property((char *)local_50);
/* try { // try from 00106214 to 0010621b has its CatchHandler @ 0010637b */
cVar2 = QVariant::toBool();
QVariant::~QVariant((QVariant *)local_50);
if (cVar2 == '\0') {
local_50[0] = (QPushButton *)0x0;
pcVar6 = (char *)QMap<int,QPushButton*>::value
(*(QMap<int,QPushButton*> **)(param_1 + 0x28),(int *)pEVar1,
local_50);
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 001062c1 to 001062d2 has its CatchHandler @ 00106373 */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
}
else {
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 00106241 to 00106252 has its CatchHandler @ 00106377 */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
}
}
QVariant::~QVariant((QVariant *)local_50);
plVar5 = (long *)QWidget::style();
(**(code **)(*plVar5 + 0x68))(plVar5,pcVar6);
plVar5 = (long *)QWidget::style();
(**(code **)(*plVar5 + 0x60))(plVar5,pcVar6);
QWidget::update();
*(int4 *)(param_1 + 0x4c) = 4;
*(int4 *)(param_1 + 0x40) = *(int4 *)(param_1 + 0x44);
iVar3 = Elevetor::del_stair((int)param_1);
if (iVar3 == 0) {
Elevetor::wait_to_action(param_1);
}
puVar7 = (int4 *)operator_new(0x20);
*puVar7 = 1;
*(code **)(puVar7 + 2) =
QtPrivate::
QFunctorSlotObject<MainWindow::arrive_stair(Elevetor&)::$_0,0,QtPrivate::List<>,void>::impl;
*(MainWindow **)(puVar7 + 4) = this;
*(Elevetor **)(puVar7 + 6) = param_1;
QTimer::singleShotImpl(1000,0,this,puVar7);
return;
}
| |
32,556 | MainWindow::arrive_stair(Elevetor&) | LeafBlue[P]myElevetor/mainwindow.cpp | void MainWindow::arrive_stair(Elevetor &thisele)
{
thisele.anime->deleteLater();
//停止定时器
thisele.checktime.stop();
//找到对应按钮修改颜色
QPushButton* thisbtn = thisele.btn_map[thisele.endstair];
thisbtn->setProperty("pressedState","false");
thisbtn->style()->unpolish(thisbtn);
thisbtn->style()->polish(thisbtn);
thisbtn->update();
//修改外部按钮的颜色,首先检查同方向的,如果同方向的不需要修改则修改相反方向的
//但这里并不要修改方向,通常我们认为向上运行处理向下请求后,需要根据电梯内部请求处理,而不是立刻就往下开始走,都不知道要去哪。
if(thisele.direct == 1){
QPushButton* outbtn = thisele.outbtn_up->value(thisele.endstair);
bool ispress = outbtn->property("pressedState").toBool();
if(ispress){
outbtn->setProperty("pressedState","false");
outbtn->style()->unpolish(outbtn);
outbtn->style()->polish(outbtn);
outbtn->update();
}else{
outbtn = thisele.outbtn_down->value(thisele.endstair);
outbtn->setProperty("pressedState","false");
outbtn->style()->unpolish(outbtn);
outbtn->style()->polish(outbtn);
outbtn->update();
}
}else{
QPushButton* outbtn = thisele.outbtn_down->value(thisele.endstair);
bool ispress = outbtn->property("pressedState").toBool();
if(ispress){
outbtn->setProperty("pressedState","false");
outbtn->style()->unpolish(outbtn);
outbtn->style()->polish(outbtn);
outbtn->update();
}else{
outbtn = thisele.outbtn_up->value(thisele.endstair);
outbtn->setProperty("pressedState","false");
outbtn->style()->unpolish(outbtn);
outbtn->style()->polish(outbtn);
outbtn->update();
}
}
thisele.status = 4;//开门动画中
thisele.nowstair = thisele.endstair;
//删除对应数组(外部请求数组会先删除再移动到内部,不用刻意删除)
int over_size = thisele.del_stair(thisele.endstair);
if(over_size==0){
//重新设置方向,但并不开始移动,需要等待关门函数处理完毕
thisele.wait_to_action();
}
//电梯停靠1秒后开始执行开门动画
QTimer::singleShot(1000,this,[this,&thisele](){
opendoor(thisele);
});
} | O3 | cpp | MainWindow::arrive_stair(Elevetor&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rsi), %rdi
callq 0x4110
leaq 0x58(%r14), %rdi
callq 0x4310
leaq 0x20(%r14), %rdi
leaq 0x44(%r14), %r12
movq %r12, %rsi
callq 0x7db2
movq (%rax), %r15
leaq 0x35d6(%rip), %rsi # 0xa2c2
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x7d28
leaq 0x35b5(%rip), %rsi # 0xa2b5
movq %r15, %rdi
movq %r13, %rdx
callq 0x4190
leaq 0x8(%rsp), %rdi
callq 0x4170
movq %r15, %rdi
callq 0x4430
movq (%rax), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq *0x68(%rcx)
movq %r15, %rdi
callq 0x4430
movq (%rax), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq *0x60(%rcx)
movq %r15, %rdi
callq 0x4120
cmpl $0x1, 0x48(%r14)
jne 0x6dc6
movq 0x28(%r14), %rdi
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %r12, %rsi
callq 0x7e20
movq %rax, %r15
leaq 0x3547(%rip), %rdx # 0xa2b5
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x43a0
movq %r13, %rdi
callq 0x4200
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x4170
testb %bpl, %bpl
je 0x6e3c
leaq 0x3520(%rip), %rsi # 0xa2c2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7d28
leaq 0x34ff(%rip), %rsi # 0xa2b5
movq %r15, %rdi
movq %r12, %rdx
callq 0x4190
jmp 0x6ec0
movq 0x30(%r14), %rdi
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %r12, %rsi
callq 0x7e20
movq %rax, %r15
leaq 0x34cd(%rip), %rdx # 0xa2b5
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x43a0
movq %r13, %rdi
callq 0x4200
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x4170
testb %bpl, %bpl
je 0x6e7f
leaq 0x34aa(%rip), %rsi # 0xa2c2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7d28
leaq 0x3489(%rip), %rsi # 0xa2b5
movq %r15, %rdi
movq %r12, %rdx
callq 0x4190
jmp 0x6ec0
movq 0x30(%r14), %rdi
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %r12, %rsi
callq 0x7e20
movq %rax, %r15
leaq 0x3464(%rip), %rsi # 0xa2c2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7d28
leaq 0x3443(%rip), %rsi # 0xa2b5
movq %r15, %rdi
movq %r12, %rdx
callq 0x4190
jmp 0x6ec0
movq 0x28(%r14), %rdi
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %r12, %rsi
callq 0x7e20
movq %rax, %r15
leaq 0x3421(%rip), %rsi # 0xa2c2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7d28
leaq 0x3400(%rip), %rsi # 0xa2b5
movq %r15, %rdi
movq %r12, %rdx
callq 0x4190
leaq 0x8(%rsp), %rdi
callq 0x4170
movq %r15, %rdi
callq 0x4430
movq (%rax), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq *0x68(%rcx)
movq %r15, %rdi
callq 0x4430
movq (%rax), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq *0x60(%rcx)
movq %r15, %rdi
callq 0x4120
movl $0x4, 0x4c(%r14)
movl 0x44(%r14), %esi
movl %esi, 0x40(%r14)
movq %r14, %rdi
callq 0x9248
testl %eax, %eax
jne 0x6f1e
movq %r14, %rdi
callq 0x933a
movl $0x20, %edi
callq 0x4380
movl $0x1, (%rax)
leaq 0xbed(%rip), %rcx # 0x7b22
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %r14, 0x18(%rax)
movl $0x3e8, %edi # imm = 0x3E8
xorl %esi, %esi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x4540
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6f6e
jmp 0x6f6e
jmp 0x6f6e
jmp 0x6f6e
jmp 0x6f6e
jmp 0x6f6e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x41d0
nop
| _ZN10MainWindow12arrive_stairER8Elevetor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rdi, [rsi+50h]; this
call __ZN7QObject11deleteLaterEv; QObject::deleteLater(void)
lea rdi, [r14+58h]; this
call __ZN6QTimer4stopEv; QTimer::stop(void)
lea rdi, [r14+20h]
lea r12, [r14+44h]
mov rsi, r12
call _ZN4QMapIiP11QPushButtonEixERKi; QMap<int,QPushButton *>::operator[](int const&)
mov r15, [rax]
lea rsi, aFalse; "false"
lea r13, [rsp+58h+var_50]
mov rdi, r13; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r13; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
lea rdi, [rsp+58h+var_50]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov rdi, r15; this
call __ZNK7QWidget5styleEv; QWidget::style(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, r15
call qword ptr [rcx+68h]
mov rdi, r15; this
call __ZNK7QWidget5styleEv; QWidget::style(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, r15
call qword ptr [rcx+60h]
mov rdi, r15; this
call __ZN7QWidget6updateEv; QWidget::update(void)
cmp dword ptr [r14+48h], 1
jnz short loc_6DC6
mov rdi, [r14+28h]
lea rdx, [rsp+58h+var_50]
mov qword ptr [rdx], 0
mov rsi, r12
call _ZNK4QMapIiP11QPushButtonE5valueERKiRKS1_; QMap<int,QPushButton *>::value(int const&,QPushButton * const&)
mov r15, rax
lea rdx, aPressedstate; "pressedState"
lea r13, [rsp+58h+var_50]
mov rdi, r13; this
mov rsi, rax; char *
call __ZNK7QObject8propertyEPKc; QObject::property(char const*)
mov rdi, r13; this
call __ZNK8QVariant6toBoolEv; QVariant::toBool(void)
mov ebp, eax
lea rdi, [rsp+58h+var_50]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
test bpl, bpl
jz loc_6E3C
lea rsi, aFalse; "false"
lea r12, [rsp+58h+var_50]
mov rdi, r12; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r12; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
jmp loc_6EC0
loc_6DC6:
mov rdi, [r14+30h]
lea rdx, [rsp+58h+var_50]
mov qword ptr [rdx], 0
mov rsi, r12
call _ZNK4QMapIiP11QPushButtonE5valueERKiRKS1_; QMap<int,QPushButton *>::value(int const&,QPushButton * const&)
mov r15, rax
lea rdx, aPressedstate; "pressedState"
lea r13, [rsp+58h+var_50]
mov rdi, r13; this
mov rsi, rax; char *
call __ZNK7QObject8propertyEPKc; QObject::property(char const*)
mov rdi, r13; this
call __ZNK8QVariant6toBoolEv; QVariant::toBool(void)
mov ebp, eax
lea rdi, [rsp+58h+var_50]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
test bpl, bpl
jz short loc_6E7F
lea rsi, aFalse; "false"
lea r12, [rsp+58h+var_50]
mov rdi, r12; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r12; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
jmp loc_6EC0
loc_6E3C:
mov rdi, [r14+30h]
lea rdx, [rsp+58h+var_50]
mov qword ptr [rdx], 0
mov rsi, r12
call _ZNK4QMapIiP11QPushButtonE5valueERKiRKS1_; QMap<int,QPushButton *>::value(int const&,QPushButton * const&)
mov r15, rax
lea rsi, aFalse; "false"
lea r12, [rsp+58h+var_50]
mov rdi, r12; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r12; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
jmp short loc_6EC0
loc_6E7F:
mov rdi, [r14+28h]
lea rdx, [rsp+58h+var_50]
mov qword ptr [rdx], 0
mov rsi, r12
call _ZNK4QMapIiP11QPushButtonE5valueERKiRKS1_; QMap<int,QPushButton *>::value(int const&,QPushButton * const&)
mov r15, rax
lea rsi, aFalse; "false"
lea r12, [rsp+58h+var_50]
mov rdi, r12; this
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
lea rsi, aPressedstate; "pressedState"
mov rdi, r15; this
mov rdx, r12; QVariant *
call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&)
loc_6EC0:
lea rdi, [rsp+58h+var_50]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov rdi, r15; this
call __ZNK7QWidget5styleEv; QWidget::style(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, r15
call qword ptr [rcx+68h]
mov rdi, r15; this
call __ZNK7QWidget5styleEv; QWidget::style(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, r15
call qword ptr [rcx+60h]
mov rdi, r15; this
call __ZN7QWidget6updateEv; QWidget::update(void)
mov dword ptr [r14+4Ch], 4
mov esi, [r14+44h]; int
mov [r14+40h], esi
mov rdi, r14; this
call _ZN8Elevetor9del_stairEi; Elevetor::del_stair(int)
test eax, eax
jnz short loc_6F1E
mov rdi, r14; this
call _ZN8Elevetor14wait_to_actionEv; Elevetor::wait_to_action(void)
loc_6F1E:
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov dword ptr [rax], 1
lea rcx, _ZN9QtPrivate18QFunctorSlotObjectIZN10MainWindow12arrive_stairER8ElevetorE3$_0Li0ENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QFunctorSlotObject<MainWindow::arrive_stair(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *)
mov [rax+8], rcx
mov [rax+10h], rbx
mov [rax+18h], r14
mov edi, 3E8h
xor esi, esi
mov rdx, rbx
mov rcx, rax
call __ZN6QTimer14singleShotImplEiN2Qt9TimerTypeEPK7QObjectPN9QtPrivate15QSlotObjectBaseE; QTimer::singleShotImpl(int,Qt::TimerType,QObject const*,QtPrivate::QSlotObjectBase *)
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_6F6E
jmp short loc_6F6E
jmp short loc_6F6E
jmp short loc_6F6E
jmp short loc_6F6E
jmp short $+2
loc_6F6E:
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov rdi, rbx
call __Unwind_Resume
| long long MainWindow::arrive_stair(MainWindow *this, QObject **a2)
{
QObject *v4; // r15
long long v5; // rax
long long v6; // rax
QObject *v7; // rdi
char *v8; // r15
char v9; // bp
QObject *v10; // rdi
char v11; // bp
QObject *v12; // rdi
QObject *v13; // rdi
long long v14; // rax
long long v15; // rax
int v16; // esi
long long v17; // rax
_QWORD v19[10]; // [rsp+8h] [rbp-50h] BYREF
QObject::deleteLater(a2[10]);
QTimer::stop((QTimer *)(a2 + 11));
v4 = *(QObject **)QMap<int,QPushButton *>::operator[](a2 + 4, (char *)a2 + 68);
QVariant::QVariant((QVariant *)v19, "false");
QObject::setProperty(v4, "pressedState", (const QVariant *)v19);
QVariant::~QVariant((QVariant *)v19);
v5 = QWidget::style(v4);
(*(void ( **)(long long, QObject *))(*(_QWORD *)v5 + 104LL))(v5, v4);
v6 = QWidget::style(v4);
(*(void ( **)(long long, QObject *))(*(_QWORD *)v6 + 96LL))(v6, v4);
QWidget::update(v4);
if ( *((_DWORD *)a2 + 18) == 1 )
{
v7 = a2[5];
v19[0] = 0LL;
v8 = (char *)QMap<int,QPushButton *>::value(v7, (char *)a2 + 68, v19);
QObject::property((QObject *)v19, v8);
v9 = QVariant::toBool((QVariant *)v19);
QVariant::~QVariant((QVariant *)v19);
if ( !v9 )
{
v12 = a2[6];
v19[0] = 0LL;
v8 = (char *)QMap<int,QPushButton *>::value(v12, (char *)a2 + 68, v19);
}
}
else
{
v10 = a2[6];
v19[0] = 0LL;
v8 = (char *)QMap<int,QPushButton *>::value(v10, (char *)a2 + 68, v19);
QObject::property((QObject *)v19, v8);
v11 = QVariant::toBool((QVariant *)v19);
QVariant::~QVariant((QVariant *)v19);
if ( !v11 )
{
v13 = a2[5];
v19[0] = 0LL;
v8 = (char *)QMap<int,QPushButton *>::value(v13, (char *)a2 + 68, v19);
}
}
QVariant::QVariant((QVariant *)v19, "false");
QObject::setProperty((QObject *)v8, "pressedState", (const QVariant *)v19);
QVariant::~QVariant((QVariant *)v19);
v14 = QWidget::style((QWidget *)v8);
(*(void ( **)(long long, char *))(*(_QWORD *)v14 + 104LL))(v14, v8);
v15 = QWidget::style((QWidget *)v8);
(*(void ( **)(long long, char *))(*(_QWORD *)v15 + 96LL))(v15, v8);
QWidget::update((QWidget *)v8);
*((_DWORD *)a2 + 19) = 4;
v16 = *((_DWORD *)a2 + 17);
*((_DWORD *)a2 + 16) = v16;
if ( !(unsigned int)Elevetor::del_stair((Elevetor *)a2, v16) )
Elevetor::wait_to_action((Elevetor *)a2);
v17 = operator new(0x20uLL);
*(_DWORD *)v17 = 1;
*(_QWORD *)(v17 + 8) = &QtPrivate::QFunctorSlotObject<MainWindow::arrive_stair(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl;
*(_QWORD *)(v17 + 16) = this;
*(_QWORD *)(v17 + 24) = a2;
return QTimer::singleShotImpl(1000LL, 0LL, this, v17);
}
| arrive_stair:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RSI + 0x50]
CALL 0x00104110
LEA RDI,[R14 + 0x58]
CALL 0x00104310
LEA RDI,[R14 + 0x20]
LEA R12,[R14 + 0x44]
MOV RSI,R12
CALL 0x00107db2
MOV R15,qword ptr [RAX]
LEA RSI,[0x10a2c2]
LEA R13,[RSP + 0x8]
MOV RDI,R13
CALL 0x00107d28
LAB_00106cf9:
LEA RSI,[0x10a2b5]
MOV RDI,R15
MOV RDX,R13
CALL 0x00104190
LAB_00106d0b:
LEA RDI,[RSP + 0x8]
CALL 0x00104170
MOV RDI,R15
CALL 0x00104430
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,R15
CALL qword ptr [RCX + 0x68]
MOV RDI,R15
CALL 0x00104430
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,R15
CALL qword ptr [RCX + 0x60]
MOV RDI,R15
CALL 0x00104120
CMP dword ptr [R14 + 0x48],0x1
JNZ 0x00106dc6
MOV RDI,qword ptr [R14 + 0x28]
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],0x0
MOV RSI,R12
CALL 0x00107e20
MOV R15,RAX
LEA RDX,[0x10a2b5]
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RSI,RAX
CALL 0x001043a0
LAB_00106d7e:
MOV RDI,R13
CALL 0x00104200
LAB_00106d86:
MOV EBP,EAX
LEA RDI,[RSP + 0x8]
CALL 0x00104170
TEST BPL,BPL
JZ 0x00106e3c
LEA RSI,[0x10a2c2]
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00107d28
LAB_00106daf:
LEA RSI,[0x10a2b5]
MOV RDI,R15
MOV RDX,R12
CALL 0x00104190
LAB_00106dc1:
JMP 0x00106ec0
LAB_00106dc6:
MOV RDI,qword ptr [R14 + 0x30]
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],0x0
MOV RSI,R12
CALL 0x00107e20
MOV R15,RAX
LEA RDX,[0x10a2b5]
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RSI,RAX
CALL 0x001043a0
LAB_00106df8:
MOV RDI,R13
CALL 0x00104200
LAB_00106e00:
MOV EBP,EAX
LEA RDI,[RSP + 0x8]
CALL 0x00104170
TEST BPL,BPL
JZ 0x00106e7f
LEA RSI,[0x10a2c2]
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00107d28
LAB_00106e25:
LEA RSI,[0x10a2b5]
MOV RDI,R15
MOV RDX,R12
CALL 0x00104190
LAB_00106e37:
JMP 0x00106ec0
LAB_00106e3c:
MOV RDI,qword ptr [R14 + 0x30]
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],0x0
MOV RSI,R12
CALL 0x00107e20
MOV R15,RAX
LEA RSI,[0x10a2c2]
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00107d28
LAB_00106e6b:
LEA RSI,[0x10a2b5]
MOV RDI,R15
MOV RDX,R12
CALL 0x00104190
LAB_00106e7d:
JMP 0x00106ec0
LAB_00106e7f:
MOV RDI,qword ptr [R14 + 0x28]
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],0x0
MOV RSI,R12
CALL 0x00107e20
MOV R15,RAX
LEA RSI,[0x10a2c2]
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00107d28
LAB_00106eae:
LEA RSI,[0x10a2b5]
MOV RDI,R15
MOV RDX,R12
CALL 0x00104190
LAB_00106ec0:
LEA RDI,[RSP + 0x8]
CALL 0x00104170
MOV RDI,R15
CALL 0x00104430
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,R15
CALL qword ptr [RCX + 0x68]
MOV RDI,R15
CALL 0x00104430
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,R15
CALL qword ptr [RCX + 0x60]
MOV RDI,R15
CALL 0x00104120
MOV dword ptr [R14 + 0x4c],0x4
MOV ESI,dword ptr [R14 + 0x44]
MOV dword ptr [R14 + 0x40],ESI
MOV RDI,R14
CALL 0x00109248
TEST EAX,EAX
JNZ 0x00106f1e
MOV RDI,R14
CALL 0x0010933a
LAB_00106f1e:
MOV EDI,0x20
CALL 0x00104380
MOV dword ptr [RAX],0x1
LEA RCX,[0x107b22]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],RBX
MOV qword ptr [RAX + 0x18],R14
MOV EDI,0x3e8
XOR ESI,ESI
MOV RDX,RBX
MOV RCX,RAX
CALL 0x00104540
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MainWindow::arrive_stair(Elevetor&) */
void __thiscall MainWindow::arrive_stair(MainWindow *this,Elevetor *param_1)
{
Elevetor *pEVar1;
char cVar2;
int iVar3;
int8 *puVar4;
long *plVar5;
char *pcVar6;
int4 *puVar7;
QPushButton *local_50 [4];
QObject::deleteLater();
QTimer::stop();
pEVar1 = param_1 + 0x44;
puVar4 = (int8 *)
QMap<int,QPushButton*>::operator[]
((QMap<int,QPushButton*> *)(param_1 + 0x20),(int *)pEVar1);
pcVar6 = (char *)*puVar4;
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 00106cf9 to 00106d0a has its CatchHandler @ 00106f6e */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
QVariant::~QVariant((QVariant *)local_50);
plVar5 = (long *)QWidget::style();
(**(code **)(*plVar5 + 0x68))(plVar5,pcVar6);
plVar5 = (long *)QWidget::style();
(**(code **)(*plVar5 + 0x60))(plVar5,pcVar6);
QWidget::update();
if (*(int *)(param_1 + 0x48) == 1) {
local_50[0] = (QPushButton *)0x0;
pcVar6 = (char *)QMap<int,QPushButton*>::value
(*(QMap<int,QPushButton*> **)(param_1 + 0x28),(int *)pEVar1,local_50)
;
QObject::property((char *)local_50);
/* try { // try from 00106d7e to 00106d85 has its CatchHandler @ 00106f6c */
cVar2 = QVariant::toBool();
QVariant::~QVariant((QVariant *)local_50);
if (cVar2 == '\0') {
local_50[0] = (QPushButton *)0x0;
pcVar6 = (char *)QMap<int,QPushButton*>::value
(*(QMap<int,QPushButton*> **)(param_1 + 0x30),(int *)pEVar1,
local_50);
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 00106e6b to 00106e7c has its CatchHandler @ 00106f64 */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
}
else {
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 00106daf to 00106dc0 has its CatchHandler @ 00106f68 */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
}
}
else {
local_50[0] = (QPushButton *)0x0;
pcVar6 = (char *)QMap<int,QPushButton*>::value
(*(QMap<int,QPushButton*> **)(param_1 + 0x30),(int *)pEVar1,local_50)
;
QObject::property((char *)local_50);
/* try { // try from 00106df8 to 00106dff has its CatchHandler @ 00106f6a */
cVar2 = QVariant::toBool();
QVariant::~QVariant((QVariant *)local_50);
if (cVar2 == '\0') {
local_50[0] = (QPushButton *)0x0;
pcVar6 = (char *)QMap<int,QPushButton*>::value
(*(QMap<int,QPushButton*> **)(param_1 + 0x28),(int *)pEVar1,
local_50);
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 00106eae to 00106ebf has its CatchHandler @ 00106f62 */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
}
else {
QVariant::QVariant((QVariant *)local_50,"false");
/* try { // try from 00106e25 to 00106e36 has its CatchHandler @ 00106f66 */
QObject::setProperty(pcVar6,(QVariant *)"pressedState");
}
}
QVariant::~QVariant((QVariant *)local_50);
plVar5 = (long *)QWidget::style();
(**(code **)(*plVar5 + 0x68))(plVar5,pcVar6);
plVar5 = (long *)QWidget::style();
(**(code **)(*plVar5 + 0x60))(plVar5,pcVar6);
QWidget::update();
*(int4 *)(param_1 + 0x4c) = 4;
*(int4 *)(param_1 + 0x40) = *(int4 *)(param_1 + 0x44);
iVar3 = Elevetor::del_stair((int)param_1);
if (iVar3 == 0) {
Elevetor::wait_to_action(param_1);
}
puVar7 = (int4 *)operator_new(0x20);
*puVar7 = 1;
*(code **)(puVar7 + 2) =
QtPrivate::
QFunctorSlotObject<MainWindow::arrive_stair(Elevetor&)::$_0,0,QtPrivate::List<>,void>::impl;
*(MainWindow **)(puVar7 + 4) = this;
*(Elevetor **)(puVar7 + 6) = param_1;
QTimer::singleShotImpl(1000,0,this,puVar7);
return;
}
| |
32,557 | minja::Value::at(unsigned long) | monkey531[P]llama/common/minja.hpp | Value& at(size_t index) {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_array()) return array_->at(index);
if (is_object()) return object_->at(index);
throw std::runtime_error("Value is not an array or object: " + dump());
} | O2 | cpp | minja::Value::at(unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
callq 0x3d906
testb %al, %al
jne 0x4d529
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x4d50d
movq %rbx, %rsi
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x4d72e
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x4d559
leaq 0x8(%rsp), %rsi
callq 0x4d74c
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20390
movq %rax, %rbx
leaq 0x42b07(%rip), %rsi # 0x90042
movq %rax, %rdi
callq 0x20280
movq 0x83a9e(%rip), %rsi # 0xd0fe8
movq 0x83a0f(%rip), %rdx # 0xd0f60
movq %rbx, %rdi
callq 0x20b30
pushq $0x10
popq %rdi
callq 0x20390
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3cf54
leaq 0x4434d(%rip), %rsi # 0x918ca
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x28a89
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x20aa0
xorl %ebp, %ebp
movq 0x83a43(%rip), %rsi # 0xd0fe8
movq 0x839b4(%rip), %rdx # 0xd0f60
movq %rbx, %rdi
callq 0x20b30
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x20d88
jmp 0x4d5c9
movq %rax, %r14
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x20d88
testb %bpl, %bpl
jne 0x4d5df
jmp 0x4d5e7
jmp 0x4d5dc
movq %rax, %r14
movq %rbx, %rdi
callq 0x20510
movq %r14, %rdi
callq 0x20b90
nop
| _ZN5minja5Value2atEm:
push rbp
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r14, rdi
mov [rsp+68h+var_60], rsi
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jnz short loc_4D529
mov rdi, [r14+10h]
test rdi, rdi
jz short loc_4D50D
mov rsi, rbx
add rsp, 50h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE2atEm; std::vector<minja::Value>::at(ulong)
loc_4D50D:
mov rdi, [r14+20h]
test rdi, rdi
jz short loc_4D559
lea rsi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_4D529:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_4D559:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_58]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+68h+var_38]
lea rdx, [rsp+68h+var_58]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+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:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+68h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_4D5C9
mov r14, rax
mov bpl, 1
loc_4D5C9:
lea rdi, [rsp+68h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_4D5DF
jmp short loc_4D5E7
jmp short $+2
loc_4D5DC:
mov r14, rax
loc_4D5DF:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_4D5E7:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::at(minja::Value *this, long long a2)
{
long long v3; // rdi
long long v5; // rdi
std::runtime_error *exception; // rbx
void *v7; // rbx
long long v8; // [rsp+8h] [rbp-60h] BYREF
_BYTE v9[32]; // [rsp+10h] [rbp-58h] BYREF
_BYTE v10[56]; // [rsp+30h] [rbp-38h] BYREF
v8 = a2;
if ( minja::Value::is_null(this) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = *((_QWORD *)this + 2);
if ( v3 )
return std::vector<minja::Value>::at(v3, a2);
v5 = *((_QWORD *)this + 4);
if ( !v5 )
{
v7 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v9, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v10, (long long)"Value is not an array or object: ", (long long)v9);
std::runtime_error::runtime_error(v7, v10);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_(
v5,
&v8);
}
| at:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RSI
CALL 0x0013d906
TEST AL,AL
JNZ 0x0014d529
MOV RDI,qword ptr [R14 + 0x10]
TEST RDI,RDI
JZ 0x0014d50d
MOV RSI,RBX
ADD RSP,0x50
POP RBX
POP R14
POP RBP
JMP 0x0014d72e
LAB_0014d50d:
MOV RDI,qword ptr [R14 + 0x20]
TEST RDI,RDI
JZ 0x0014d559
LEA RSI,[RSP + 0x8]
CALL 0x0014d74c
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_0014d529:
PUSH 0x10
POP RDI
CALL 0x00120390
MOV RBX,RAX
LAB_0014d534:
LEA RSI,[0x190042]
MOV RDI,RAX
CALL 0x00120280
LAB_0014d543:
MOV RSI,qword ptr [0x001d0fe8]
MOV RDX,qword ptr [0x001d0f60]
MOV RDI,RBX
CALL 0x00120b30
LAB_0014d559:
PUSH 0x10
POP RDI
CALL 0x00120390
MOV RBX,RAX
LAB_0014d564:
LEA RDI,[RSP + 0x10]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0013cf54
LAB_0014d576:
LEA RSI,[0x1918ca]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x00128a89
MOV BPL,0x1
LAB_0014d58f:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x00120aa0
XOR EBP,EBP
MOV RSI,qword ptr [0x001d0fe8]
MOV RDX,qword ptr [0x001d0f60]
MOV RDI,RBX
CALL 0x00120b30
|
/* minja::Value::at(unsigned long) */
void __thiscall minja::Value::at(Value *this,ulong param_1)
{
char cVar1;
runtime_error *prVar2;
ulong local_60;
int1 local_58 [32];
string local_38 [32];
local_60 = param_1;
cVar1 = is_null(this);
if (cVar1 != '\0') {
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0014d534 to 0014d542 has its CatchHandler @ 0014d5dc */
std::runtime_error::runtime_error(prVar2,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_001d0fe8,PTR__runtime_error_001d0f60);
}
if (*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10) !=
(vector<minja::Value,std::allocator<minja::Value>> *)0x0) {
std::vector<minja::Value,std::allocator<minja::Value>>::at
(*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10),param_1);
return;
}
if (*(long *)(this + 0x20) != 0) {
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
(*(long *)(this + 0x20),&local_60);
return;
}
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0014d564 to 0014d575 has its CatchHandler @ 0014d5da */
dump_abi_cxx11_((int)local_58,SUB81(this,0));
/* try { // try from 0014d576 to 0014d58b has its CatchHandler @ 0014d5c3 */
std::operator+((char *)local_38,(string *)"Value is not an array or object: ");
/* try { // try from 0014d58f to 0014d5b3 has its CatchHandler @ 0014d5b4 */
std::runtime_error::runtime_error(prVar2,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_001d0fe8,PTR__runtime_error_001d0f60);
}
| |
32,558 | bf_clear_cache | bluesky950520[P]quickjs/libbf.c | void bf_clear_cache(bf_context_t *s)
{
#ifdef USE_FFT_MUL
fft_clear_cache(s);
#endif
bf_const_free(&s->log2_cache);
bf_const_free(&s->pi_cache);
} | O1 | c | bf_clear_cache:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x70(%rdi), %r14
testq %r14, %r14
je 0x849e9
movq %r15, (%rsp)
leaq 0x20b0(%r14), %r15
xorl %r12d, %r12d
movq %r15, %r13
xorl %ebp, %ebp
xorl %ebx, %ebx
movq (%r13,%rbx,8), %rsi
testq %rsi, %rsi
je 0x849a5
movq (%r14), %rax
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq $0x0, (%r13,%rbx,8)
incq %rbx
cmpq $0x14, %rbx
jne 0x84987
leaq 0x1(%rbp), %rax
addq $0xa0, %r13
testq %rbp, %rbp
movq %rax, %rbp
je 0x84985
incq %r12
addq $0x140, %r15 # imm = 0x140
cmpq $0x5, %r12
jne 0x84980
movq (%rsp), %r15
movq (%r15), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq *0x8(%r15)
movq $0x0, 0x70(%r15)
leaq 0x10(%r15), %rbx
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x84a07
movq 0x30(%r15), %rsi
testq %rsi, %rsi
je 0x84a07
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
leaq 0x40(%r15), %rbx
movq 0x40(%r15), %rax
testq %rax, %rax
je 0x84a36
movq 0x60(%r15), %rsi
testq %rsi, %rsi
je 0x84a36
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_clear_cache:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdi
mov r14, [rdi+70h]
test r14, r14
jz short loc_849E9
mov [rsp+38h+var_38], r15
lea r15, [r14+20B0h]
xor r12d, r12d
loc_84980:
mov r13, r15
xor ebp, ebp
loc_84985:
xor ebx, ebx
loc_84987:
mov rsi, [r13+rbx*8+0]
test rsi, rsi
jz short loc_849A5
mov rax, [r14]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov qword ptr [r13+rbx*8+0], 0
loc_849A5:
inc rbx
cmp rbx, 14h
jnz short loc_84987
lea rax, [rbp+1]
add r13, 0A0h
test rbp, rbp
mov rbp, rax
jz short loc_84985
inc r12
add r15, 140h
cmp r12, 5
jnz short loc_84980
mov r15, [rsp+38h+var_38]
mov rdi, [r15]
mov rsi, r14
xor edx, edx
call qword ptr [r15+8]
mov qword ptr [r15+70h], 0
loc_849E9:
lea rbx, [r15+10h]
mov rax, [r15+10h]
test rax, rax
jz short loc_84A07
mov rsi, [r15+30h]
test rsi, rsi
jz short loc_84A07
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_84A07:
xorps xmm0, xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx], xmm0
lea rbx, [r15+40h]
mov rax, [r15+40h]
test rax, rax
jz short loc_84A36
mov rsi, [r15+60h]
test rsi, rsi
jz short loc_84A36
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
xorps xmm0, xmm0
loc_84A36:
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx], xmm0
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_clear_cache(long long a1)
{
long long v1; // r15
_QWORD **v2; // r14
_QWORD **v3; // r15
long long i; // r12
_QWORD **v5; // r13
long long v6; // rbp
long long j; // rbx
_QWORD *v8; // rsi
long long v10; // rax
long long v11; // rsi
__int128 v12; // xmm0
long long result; // rax
long long v14; // rsi
v1 = a1;
v2 = *(_QWORD ***)(a1 + 112);
if ( v2 )
{
v3 = v2 + 1046;
for ( i = 0LL; i != 5; ++i )
{
v5 = v3;
v6 = 0LL;
do
{
for ( j = 0LL; j != 20; ++j )
{
v8 = v5[j];
if ( v8 )
{
((void ( *)(_QWORD, _QWORD *, _QWORD))(*v2)[1])(**v2, v8, 0LL);
v5[j] = 0LL;
}
}
v5 += 20;
}
while ( v6++ == 0 );
v3 += 40;
}
v1 = a1;
(*(void ( **)(_QWORD, _QWORD **, _QWORD))(a1 + 8))(*(_QWORD *)a1, v2, 0LL);
*(_QWORD *)(a1 + 112) = 0LL;
}
v10 = *(_QWORD *)(v1 + 16);
if ( v10 )
{
v11 = *(_QWORD *)(v1 + 48);
if ( v11 )
(*(void ( **)(_QWORD, long long, _QWORD))(v10 + 8))(*(_QWORD *)v10, v11, 0LL);
}
v12 = 0LL;
*(_OWORD *)(v1 + 48) = 0LL;
*(_OWORD *)(v1 + 32) = 0LL;
*(_OWORD *)(v1 + 16) = 0LL;
result = *(_QWORD *)(v1 + 64);
if ( result )
{
v14 = *(_QWORD *)(v1 + 96);
if ( v14 )
{
result = (*(long long ( **)(_QWORD, long long, _QWORD))(result + 8))(*(_QWORD *)result, v14, 0LL);
v12 = 0LL;
}
}
*(_OWORD *)(v1 + 96) = v12;
*(_OWORD *)(v1 + 80) = v12;
*(_OWORD *)(v1 + 64) = v12;
return result;
}
| |||
32,559 | bf_clear_cache | bluesky950520[P]quickjs/libbf.c | void bf_clear_cache(bf_context_t *s)
{
#ifdef USE_FFT_MUL
fft_clear_cache(s);
#endif
bf_const_free(&s->log2_cache);
bf_const_free(&s->pi_cache);
} | O2 | c | bf_clear_cache:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x70(%rdi), %r14
testq %r14, %r14
je 0x6f4cf
movq %rbx, (%rsp)
leaq 0x20b0(%r14), %r15
xorl %r12d, %r12d
cmpq $0x5, %r12
je 0x6f4bb
movq %r15, %r13
xorl %ebp, %ebp
cmpq $0x2, %rbp
je 0x6f4af
xorl %ebx, %ebx
cmpq $0x14, %rbx
je 0x6f4a3
movq (%r13,%rbx,8), %rsi
testq %rsi, %rsi
je 0x6f49e
movq (%r14), %rax
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
andq $0x0, (%r13,%rbx,8)
incq %rbx
jmp 0x6f47d
incq %rbp
addq $0xa0, %r13
jmp 0x6f475
incq %r12
addq $0x140, %r15 # imm = 0x140
jmp 0x6f46a
movq (%rsp), %rbx
movq (%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq *0x8(%rbx)
andq $0x0, 0x70(%rbx)
leaq 0x10(%rbx), %rdi
callq 0x7411f
addq $0x40, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7411f
| bf_clear_cache:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+70h]
test r14, r14
jz short loc_6F4CF
mov [rsp+38h+var_38], rbx
lea r15, [r14+20B0h]
xor r12d, r12d
loc_6F46A:
cmp r12, 5
jz short loc_6F4BB
mov r13, r15
xor ebp, ebp
loc_6F475:
cmp rbp, 2
jz short loc_6F4AF
xor ebx, ebx
loc_6F47D:
cmp rbx, 14h
jz short loc_6F4A3
mov rsi, [r13+rbx*8+0]
test rsi, rsi
jz short loc_6F49E
mov rax, [r14]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
and qword ptr [r13+rbx*8+0], 0
loc_6F49E:
inc rbx
jmp short loc_6F47D
loc_6F4A3:
inc rbp
add r13, 0A0h
jmp short loc_6F475
loc_6F4AF:
inc r12
add r15, 140h
jmp short loc_6F46A
loc_6F4BB:
mov rbx, [rsp+38h+var_38]
mov rdi, [rbx]
mov rsi, r14
xor edx, edx
call qword ptr [rbx+8]
and qword ptr [rbx+70h], 0
loc_6F4CF:
lea rdi, [rbx+10h]
call bf_const_free
add rbx, 40h ; '@'
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_const_free
| long long bf_clear_cache(long long a1)
{
long long v1; // rbx
_QWORD **v2; // r14
_QWORD **v3; // r15
long long i; // r12
_QWORD **v5; // r13
long long j; // rbp
long long k; // rbx
_QWORD *v8; // rsi
v1 = a1;
v2 = *(_QWORD ***)(a1 + 112);
if ( v2 )
{
v3 = v2 + 1046;
for ( i = 0LL; i != 5; ++i )
{
v5 = v3;
for ( j = 0LL; j != 2; ++j )
{
for ( k = 0LL; k != 20; ++k )
{
v8 = v5[k];
if ( v8 )
{
((void ( *)(_QWORD, _QWORD *, _QWORD))(*v2)[1])(**v2, v8, 0LL);
v5[k] = 0LL;
}
}
v5 += 20;
}
v3 += 40;
}
v1 = a1;
(*(void ( **)(_QWORD, _QWORD **, _QWORD))(a1 + 8))(*(_QWORD *)a1, v2, 0LL);
*(_QWORD *)(a1 + 112) = 0LL;
}
bf_const_free(v1 + 16);
return bf_const_free(v1 + 64);
}
| bf_clear_cache:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x70]
TEST R14,R14
JZ 0x0016f4cf
MOV qword ptr [RSP],RBX
LEA R15,[R14 + 0x20b0]
XOR R12D,R12D
LAB_0016f46a:
CMP R12,0x5
JZ 0x0016f4bb
MOV R13,R15
XOR EBP,EBP
LAB_0016f475:
CMP RBP,0x2
JZ 0x0016f4af
XOR EBX,EBX
LAB_0016f47d:
CMP RBX,0x14
JZ 0x0016f4a3
MOV RSI,qword ptr [R13 + RBX*0x8]
TEST RSI,RSI
JZ 0x0016f49e
MOV RAX,qword ptr [R14]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
AND qword ptr [R13 + RBX*0x8],0x0
LAB_0016f49e:
INC RBX
JMP 0x0016f47d
LAB_0016f4a3:
INC RBP
ADD R13,0xa0
JMP 0x0016f475
LAB_0016f4af:
INC R12
ADD R15,0x140
JMP 0x0016f46a
LAB_0016f4bb:
MOV RBX,qword ptr [RSP]
MOV RDI,qword ptr [RBX]
MOV RSI,R14
XOR EDX,EDX
CALL qword ptr [RBX + 0x8]
AND qword ptr [RBX + 0x70],0x0
LAB_0016f4cf:
LEA RDI,[RBX + 0x10]
CALL 0x0017411f
ADD RBX,0x40
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0017411f
|
void bf_clear_cache(int8 *param_1)
{
long *plVar1;
long lVar2;
long lVar3;
long lVar4;
long *plVar5;
long *plVar6;
plVar1 = (long *)param_1[0xe];
if (plVar1 != (long *)0x0) {
plVar6 = plVar1 + 0x416;
for (lVar4 = 0; lVar4 != 5; lVar4 = lVar4 + 1) {
plVar5 = plVar6;
for (lVar3 = 0; lVar3 != 2; lVar3 = lVar3 + 1) {
for (lVar2 = 0; lVar2 != 0x14; lVar2 = lVar2 + 1) {
if (plVar5[lVar2] != 0) {
(*(code *)((int8 *)*plVar1)[1])(*(int8 *)*plVar1,plVar5[lVar2],0);
plVar5[lVar2] = 0;
}
}
plVar5 = plVar5 + 0x14;
}
plVar6 = plVar6 + 0x28;
}
(*(code *)param_1[1])(*param_1,plVar1,0);
param_1[0xe] = 0;
}
bf_const_free(param_1 + 2);
bf_const_free(param_1 + 8);
return;
}
| |
32,560 | OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int, 40u, true>::SetSize(unsigned int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../vtr/stackBuffer.h | inline void
StackBuffer<TYPE,SIZE,POD_TYPE>::SetSize(size_type size)
{
if (!POD_TYPE) {
destruct();
}
if (size == 0) {
deallocate();
} else if (size > _capacity) {
deallocate();
allocate(size);
}
_size = size;
if (!POD_TYPE) {
construct();
}
} | O0 | c | OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int, 40u, true>::SetSize(unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0xccd80
cmpl $0x0, -0xc(%rbp)
jne 0x14e38d
movq -0x18(%rbp), %rdi
callq 0xc95b0
jmp 0x14e3b0
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0xc(%rcx), %eax
jbe 0x14e3ae
movq -0x18(%rbp), %rdi
callq 0xc95b0
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xd4450
jmp 0x14e3b0
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, 0x8(%rdi)
callq 0xd0c10
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPNS0_3Far17PatchTableBuilder16LocalPointHelperELj4ELb0EE7SetSizeEj:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rdi, [rbp+var_8]
mov [rbp+var_18], rdi
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPNS0_3Far17PatchTableBuilder16LocalPointHelperELj4ELb0EE8destructEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::destruct(void)
cmp [rbp+var_C], 0
jnz short loc_14E38D
mov rdi, [rbp+var_18]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPNS0_3Far17PatchTableBuilder16LocalPointHelperELj4ELb0EE10deallocateEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::deallocate(void)
jmp short loc_14E3B0
loc_14E38D:
mov rcx, [rbp+var_18]
mov eax, [rbp+var_C]
cmp eax, [rcx+0Ch]
jbe short loc_14E3AE
mov rdi, [rbp+var_18]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPNS0_3Far17PatchTableBuilder16LocalPointHelperELj4ELb0EE10deallocateEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::deallocate(void)
mov rdi, [rbp+var_18]
mov esi, [rbp+var_C]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPNS0_3Far17PatchTableBuilder16LocalPointHelperELj4ELb0EE8allocateEj; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::allocate(uint)
loc_14E3AE:
jmp short $+2
loc_14E3B0:
mov rdi, [rbp+var_18]
mov eax, [rbp+var_C]
mov [rdi+8], eax
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPNS0_3Far17PatchTableBuilder16LocalPointHelperELj4ELb0EE9constructEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::construct(void)
add rsp, 20h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::SetSize(
long long a1,
unsigned int a2)
{
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::destruct();
if ( a2 )
{
if ( a2 > *(_DWORD *)(a1 + 12) )
{
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::deallocate(a1);
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::allocate(
a1,
a2);
}
}
else
{
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::deallocate(a1);
}
*(_DWORD *)(a1 + 8) = a2;
return OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::construct();
}
| |||
32,561 | OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int, 40u, true>::SetSize(unsigned int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../vtr/stackBuffer.h | inline void
StackBuffer<TYPE,SIZE,POD_TYPE>::SetSize(size_type size)
{
if (!POD_TYPE) {
destruct();
}
if (size == 0) {
deallocate();
} else if (size > _capacity) {
deallocate();
allocate(size);
}
_size = size;
if (!POD_TYPE) {
construct();
}
} | O2 | c | OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int, 40u, true>::SetSize(unsigned int):
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
testl %esi, %esi
je 0x80b61
cmpl %ebx, 0xc(%r14)
jae 0x80b69
movq %r14, %rdi
callq 0x51330
movq %r14, %rdi
movl %ebx, %esi
callq 0x54b90
jmp 0x80b69
movq %r14, %rdi
callq 0x51330
movl %ebx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPNS0_3Far17PatchTableBuilder16LocalPointHelperELj4ELb0EE7SetSizeEj:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
test esi, esi
jz short loc_80B61
cmp [r14+0Ch], ebx
jnb short loc_80B69
mov rdi, r14
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPNS0_3Far17PatchTableBuilder16LocalPointHelperELj4ELb0EE10deallocateEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::deallocate(void)
mov rdi, r14
mov esi, ebx
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPNS0_3Far17PatchTableBuilder16LocalPointHelperELj4ELb0EE8allocateEj; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::allocate(uint)
jmp short loc_80B69
loc_80B61:
mov rdi, r14
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPNS0_3Far17PatchTableBuilder16LocalPointHelperELj4ELb0EE10deallocateEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::deallocate(void)
loc_80B69:
mov [r14+8], ebx
add rsp, 8
pop rbx
pop r14
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::SetSize(
long long a1,
unsigned int a2)
{
long long result; // rax
if ( a2 )
{
if ( *(_DWORD *)(a1 + 12) < a2 )
{
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::deallocate(a1);
result = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::allocate(
a1,
a2);
}
}
else
{
result = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *,4u,false>::deallocate(a1);
}
*(_DWORD *)(a1 + 8) = a2;
return result;
}
| SetSize:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
TEST ESI,ESI
JZ 0x00180b61
CMP dword ptr [R14 + 0xc],EBX
JNC 0x00180b69
MOV RDI,R14
CALL 0x00151330
MOV RDI,R14
MOV ESI,EBX
CALL 0x00154b90
JMP 0x00180b69
LAB_00180b61:
MOV RDI,R14
CALL 0x00151330
LAB_00180b69:
MOV dword ptr [R14 + 0x8],EBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper*,
4u, false>::SetSize(unsigned int) */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::
StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper*,4u,false>::SetSize
(StackBuffer<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper*,4u,false> *this
,uint param_1)
{
if (param_1 == 0) {
deallocate(this);
}
else if (*(uint *)(this + 0xc) < param_1) {
deallocate(this);
allocate(this,param_1);
}
*(uint *)(this + 8) = param_1;
return;
}
| |
32,562 | GetCodepoint | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c | int GetCodepoint(const char *text, int *codepointSize)
{
/*
UTF-8 specs from https://www.ietf.org/rfc/rfc3629.txt
Char. number range | UTF-8 octet sequence
(hexadecimal) | (binary)
--------------------+---------------------------------------------
0000 0000-0000 007F | 0xxxxxxx
0000 0080-0000 07FF | 110xxxxx 10xxxxxx
0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
*/
// NOTE: on decode errors we return as soon as possible
int codepoint = 0x3f; // Codepoint (defaults to '?')
int octet = (unsigned char)(text[0]); // The first UTF8 octet
*codepointSize = 1;
if (octet <= 0x7f)
{
// Only one octet (ASCII range x00-7F)
codepoint = text[0];
}
else if ((octet & 0xe0) == 0xc0)
{
// Two octets
// [0]xC2-DF [1]UTF8-tail(x80-BF)
unsigned char octet1 = text[1];
if ((octet1 == '\0') || ((octet1 >> 6) != 2)) { *codepointSize = 2; return codepoint; } // Unexpected sequence
if ((octet >= 0xc2) && (octet <= 0xdf))
{
codepoint = ((octet & 0x1f) << 6) | (octet1 & 0x3f);
*codepointSize = 2;
}
}
else if ((octet & 0xf0) == 0xe0)
{
// Three octets
unsigned char octet1 = text[1];
unsigned char octet2 = '\0';
if ((octet1 == '\0') || ((octet1 >> 6) != 2)) { *codepointSize = 2; return codepoint; } // Unexpected sequence
octet2 = text[2];
if ((octet2 == '\0') || ((octet2 >> 6) != 2)) { *codepointSize = 3; return codepoint; } // Unexpected sequence
// [0]xE0 [1]xA0-BF [2]UTF8-tail(x80-BF)
// [0]xE1-EC [1]UTF8-tail [2]UTF8-tail(x80-BF)
// [0]xED [1]x80-9F [2]UTF8-tail(x80-BF)
// [0]xEE-EF [1]UTF8-tail [2]UTF8-tail(x80-BF)
if (((octet == 0xe0) && !((octet1 >= 0xa0) && (octet1 <= 0xbf))) ||
((octet == 0xed) && !((octet1 >= 0x80) && (octet1 <= 0x9f)))) { *codepointSize = 2; return codepoint; }
if ((octet >= 0xe0) && (octet <= 0xef))
{
codepoint = ((octet & 0xf) << 12) | ((octet1 & 0x3f) << 6) | (octet2 & 0x3f);
*codepointSize = 3;
}
}
else if ((octet & 0xf8) == 0xf0)
{
// Four octets
if (octet > 0xf4) return codepoint;
unsigned char octet1 = text[1];
unsigned char octet2 = '\0';
unsigned char octet3 = '\0';
if ((octet1 == '\0') || ((octet1 >> 6) != 2)) { *codepointSize = 2; return codepoint; } // Unexpected sequence
octet2 = text[2];
if ((octet2 == '\0') || ((octet2 >> 6) != 2)) { *codepointSize = 3; return codepoint; } // Unexpected sequence
octet3 = text[3];
if ((octet3 == '\0') || ((octet3 >> 6) != 2)) { *codepointSize = 4; return codepoint; } // Unexpected sequence
// [0]xF0 [1]x90-BF [2]UTF8-tail [3]UTF8-tail
// [0]xF1-F3 [1]UTF8-tail [2]UTF8-tail [3]UTF8-tail
// [0]xF4 [1]x80-8F [2]UTF8-tail [3]UTF8-tail
if (((octet == 0xf0) && !((octet1 >= 0x90) && (octet1 <= 0xbf))) ||
((octet == 0xf4) && !((octet1 >= 0x80) && (octet1 <= 0x8f)))) { *codepointSize = 2; return codepoint; } // Unexpected sequence
if (octet >= 0xf0)
{
codepoint = ((octet & 0x7) << 18) | ((octet1 & 0x3f) << 12) | ((octet2 & 0x3f) << 6) | (octet3 & 0x3f);
*codepointSize = 4;
}
}
if (codepoint > 0x10ffff) codepoint = 0x3f; // Codepoints after U+10ffff are invalid
return codepoint;
} | O3 | c | GetCodepoint:
movzbl (%rdi), %ecx
movl $0x1, (%rsi)
testb %cl, %cl
js 0x86214
movsbl (%rdi), %eax
retq
movl %ecx, %eax
andl $-0x20, %eax
cmpl $0xc0, %eax
jne 0x86256
movzbl 0x1(%rdi), %edx
movl %edx, %eax
andl $-0x40, %eax
cmpl $0x80, %eax
jne 0x862e1
leal 0x3e(%rcx), %edi
movl $0x3f, %eax
cmpb $0x1d, %dil
ja 0x86213
andl $0x1f, %ecx
shll $0x6, %ecx
andl $0x3f, %edx
orl %ecx, %edx
movl $0x2, (%rsi)
movl %edx, %eax
retq
movl %ecx, %eax
andl $-0x10, %eax
cmpl $0xe0, %eax
jne 0x862ed
movzbl 0x1(%rdi), %edx
movl %edx, %eax
andl $-0x40, %eax
cmpl $0x80, %eax
jne 0x862e1
movzbl 0x2(%rdi), %edi
movl %edi, %eax
andl $-0x40, %eax
cmpl $0x80, %eax
jne 0x863b8
cmpl $0xe0, %ecx
jne 0x8629a
movl %edx, %eax
andb $-0x20, %al
cmpb $-0x60, %al
jne 0x862e1
cmpl $0xed, %ecx
setne %al
cmpb $-0x60, %dl
setl %r8b
orb %al, %r8b
je 0x862e1
movl %ecx, %r8d
andb $-0x10, %r8b
movl $0x3f, %eax
cmpb $-0x20, %r8b
jne 0x86213
shll $0xc, %ecx
movzwl %cx, %eax
andl $0x3f, %edx
shll $0x6, %edx
orl %eax, %edx
andl $0x3f, %edi
orl %edx, %edi
movl $0x3, (%rsi)
movl %edi, %eax
retq
movl $0x2, (%rsi)
movl $0x3f, %eax
retq
movl %ecx, %eax
andl $-0x8, %eax
cmpl $0xf0, %eax
setne %al
cmpb $-0xb, %cl
setae %dl
orb %al, %dl
movl $0x3f, %eax
jne 0x86213
movzbl 0x1(%rdi), %edx
movl %edx, %r8d
andl $-0x40, %r8d
cmpl $0x80, %r8d
jne 0x863b1
movzbl 0x2(%rdi), %r8d
movl %r8d, %r9d
andl $-0x40, %r9d
cmpl $0x80, %r9d
jne 0x863c3
movzbl 0x3(%rdi), %edi
movl %edi, %r9d
andl $-0x40, %r9d
cmpl $0x80, %r9d
jne 0x863ca
cmpl $0xf0, %ecx
jne 0x86364
leal 0x70(%rdx), %r9d
cmpb $0x2f, %r9b
ja 0x863b1
cmpl $0xf4, %ecx
setne %r9b
cmpb $-0x70, %dl
setl %r10b
orb %r9b, %r10b
je 0x863b1
cmpb $-0x10, %cl
jb 0x86213
andl $0x7, %ecx
shll $0x12, %ecx
andl $0x3f, %edx
shll $0xc, %edx
orl %ecx, %edx
andl $0x3f, %r8d
shll $0x6, %r8d
andl $0x3f, %edi
orl %r8d, %edi
orl %edx, %edi
movl $0x4, (%rsi)
cmpl $0x110000, %edx # imm = 0x110000
cmovbl %edi, %eax
retq
movl $0x2, (%rsi)
retq
movl $0x3, (%rsi)
jmp 0x862e7
movl $0x3, (%rsi)
retq
movl $0x4, (%rsi)
retq
| GetCodepoint:
movzx ecx, byte ptr [rdi]
mov dword ptr [rsi], 1
test cl, cl
js short loc_86214
movsx eax, byte ptr [rdi]
locret_86213:
retn
loc_86214:
mov eax, ecx
and eax, 0FFFFFFE0h
cmp eax, 0C0h
jnz short loc_86256
movzx edx, byte ptr [rdi+1]
mov eax, edx
and eax, 0FFFFFFC0h
cmp eax, 80h
jnz loc_862E1
lea edi, [rcx+3Eh]
mov eax, 3Fh ; '?'
cmp dil, 1Dh
ja short locret_86213
and ecx, 1Fh
shl ecx, 6
and edx, 3Fh
or edx, ecx
mov dword ptr [rsi], 2
mov eax, edx
retn
loc_86256:
mov eax, ecx
and eax, 0FFFFFFF0h
cmp eax, 0E0h
jnz loc_862ED
movzx edx, byte ptr [rdi+1]
mov eax, edx
and eax, 0FFFFFFC0h
cmp eax, 80h
jnz short loc_862E1
movzx edi, byte ptr [rdi+2]
mov eax, edi
and eax, 0FFFFFFC0h
cmp eax, 80h
jnz loc_863B8
cmp ecx, 0E0h
jnz short loc_8629A
mov eax, edx
and al, 0E0h
cmp al, 0A0h
jnz short loc_862E1
loc_8629A:
cmp ecx, 0EDh
setnz al
cmp dl, 0A0h
setl r8b
or r8b, al
jz short loc_862E1
mov r8d, ecx
and r8b, 0F0h
mov eax, 3Fh ; '?'
cmp r8b, 0E0h
jnz locret_86213
shl ecx, 0Ch
movzx eax, cx
and edx, 3Fh
shl edx, 6
or edx, eax
and edi, 3Fh
or edi, edx
mov dword ptr [rsi], 3
mov eax, edi
retn
loc_862E1:
mov dword ptr [rsi], 2
loc_862E7:
mov eax, 3Fh ; '?'
retn
loc_862ED:
mov eax, ecx
and eax, 0FFFFFFF8h
cmp eax, 0F0h
setnz al
cmp cl, 0F5h
setnb dl
or dl, al
mov eax, 3Fh ; '?'
jnz locret_86213
movzx edx, byte ptr [rdi+1]
mov r8d, edx
and r8d, 0FFFFFFC0h
cmp r8d, 80h
jnz loc_863B1
movzx r8d, byte ptr [rdi+2]
mov r9d, r8d
and r9d, 0FFFFFFC0h
cmp r9d, 80h
jnz loc_863C3
movzx edi, byte ptr [rdi+3]
mov r9d, edi
and r9d, 0FFFFFFC0h
cmp r9d, 80h
jnz short loc_863CA
cmp ecx, 0F0h
jnz short loc_86364
lea r9d, [rdx+70h]
cmp r9b, 2Fh ; '/'
ja short loc_863B1
loc_86364:
cmp ecx, 0F4h
setnz r9b
cmp dl, 90h
setl r10b
or r10b, r9b
jz short loc_863B1
cmp cl, 0F0h
jb locret_86213
and ecx, 7
shl ecx, 12h
and edx, 3Fh
shl edx, 0Ch
or edx, ecx
and r8d, 3Fh
shl r8d, 6
and edi, 3Fh
or edi, r8d
or edi, edx
mov dword ptr [rsi], 4
cmp edx, 110000h
cmovb eax, edi
retn
loc_863B1:
mov dword ptr [rsi], 2
retn
loc_863B8:
mov dword ptr [rsi], 3
jmp loc_862E7
loc_863C3:
mov dword ptr [rsi], 3
retn
loc_863CA:
mov dword ptr [rsi], 4
retn
| long long GetCodepoint(char *a1, _DWORD *a2)
{
int v2; // ecx
long long result; // rax
unsigned __int8 v4; // dl
unsigned __int8 v5; // dl
int v6; // edi
unsigned __int8 v7; // dl
unsigned __int8 v8; // r8
int v9; // edi
unsigned int v10; // edx
unsigned int v11; // edi
v2 = (unsigned __int8)*a1;
*a2 = 1;
if ( (v2 & 0x80u) == 0 )
return (unsigned int)*a1;
if ( (v2 & 0xFFFFFFE0) == 0xC0 )
{
v4 = a1[1];
if ( (v4 & 0xC0) == 0x80 )
{
result = 63LL;
if ( (unsigned __int8)(v2 + 62) <= 0x1Du )
{
*a2 = 2;
return ((v2 & 0x1F) << 6) | v4 & 0x3Fu;
}
return result;
}
goto LABEL_16;
}
if ( (v2 & 0xFFFFFFF0) == 0xE0 )
{
v5 = a1[1];
if ( (v5 & 0xC0) != 0x80 )
goto LABEL_16;
v6 = (unsigned __int8)a1[2];
if ( (v6 & 0xFFFFFFC0) != 0x80 )
{
*a2 = 3;
return 63LL;
}
if ( v2 == 224 && (v5 & 0xE0) != 0xA0 || v2 == 237 && (char)v5 >= -96 )
{
LABEL_16:
*a2 = 2;
return 63LL;
}
result = 63LL;
if ( (v2 & 0xF0) == 0xE0 )
{
*a2 = 3;
return (unsigned __int16)((_WORD)v2 << 12) | ((v5 & 0x3F) << 6) | v6 & 0x3Fu;
}
}
else
{
result = 63LL;
if ( (v2 & 0xFFFFFFF8) == 240 && (unsigned __int8)v2 < 0xF5u )
{
v7 = a1[1];
if ( (v7 & 0xC0) != 0x80 )
goto LABEL_29;
v8 = a1[2];
if ( (v8 & 0xC0) != 0x80 )
{
*a2 = 3;
return result;
}
v9 = (unsigned __int8)a1[3];
if ( (v9 & 0xFFFFFFC0) != 0x80 )
{
*a2 = 4;
return result;
}
if ( v2 == 240 && (unsigned __int8)(v7 + 112) > 0x2Fu || v2 == 244 && (char)v7 >= -112 )
{
LABEL_29:
*a2 = 2;
return result;
}
if ( (unsigned __int8)v2 >= 0xF0u )
{
v10 = ((v2 & 7) << 18) | ((v7 & 0x3F) << 12);
v11 = v10 | ((v8 & 0x3F) << 6) | v9 & 0x3F;
*a2 = 4;
if ( v10 < 0x110000 )
return v11;
}
}
}
return result;
}
| GetCodepoint:
MOVZX ECX,byte ptr [RDI]
MOV dword ptr [RSI],0x1
TEST CL,CL
JS 0x00186214
MOVSX EAX,byte ptr [RDI]
LAB_00186213:
RET
LAB_00186214:
MOV EAX,ECX
AND EAX,0xffffffe0
CMP EAX,0xc0
JNZ 0x00186256
MOVZX EDX,byte ptr [RDI + 0x1]
MOV EAX,EDX
AND EAX,0xffffffc0
CMP EAX,0x80
JNZ 0x001862e1
LEA EDI,[RCX + 0x3e]
MOV EAX,0x3f
CMP DIL,0x1d
JA 0x00186213
AND ECX,0x1f
SHL ECX,0x6
AND EDX,0x3f
OR EDX,ECX
MOV dword ptr [RSI],0x2
MOV EAX,EDX
RET
LAB_00186256:
MOV EAX,ECX
AND EAX,0xfffffff0
CMP EAX,0xe0
JNZ 0x001862ed
MOVZX EDX,byte ptr [RDI + 0x1]
MOV EAX,EDX
AND EAX,0xffffffc0
CMP EAX,0x80
JNZ 0x001862e1
MOVZX EDI,byte ptr [RDI + 0x2]
MOV EAX,EDI
AND EAX,0xffffffc0
CMP EAX,0x80
JNZ 0x001863b8
CMP ECX,0xe0
JNZ 0x0018629a
MOV EAX,EDX
AND AL,0xe0
CMP AL,0xa0
JNZ 0x001862e1
LAB_0018629a:
CMP ECX,0xed
SETNZ AL
CMP DL,0xa0
SETL R8B
OR R8B,AL
JZ 0x001862e1
MOV R8D,ECX
AND R8B,0xf0
MOV EAX,0x3f
CMP R8B,0xe0
JNZ 0x00186213
SHL ECX,0xc
MOVZX EAX,CX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,EAX
AND EDI,0x3f
OR EDI,EDX
MOV dword ptr [RSI],0x3
MOV EAX,EDI
RET
LAB_001862e1:
MOV dword ptr [RSI],0x2
LAB_001862e7:
MOV EAX,0x3f
RET
LAB_001862ed:
MOV EAX,ECX
AND EAX,0xfffffff8
CMP EAX,0xf0
SETNZ AL
CMP CL,0xf5
SETNC DL
OR DL,AL
MOV EAX,0x3f
JNZ 0x00186213
MOVZX EDX,byte ptr [RDI + 0x1]
MOV R8D,EDX
AND R8D,0xffffffc0
CMP R8D,0x80
JNZ 0x001863b1
MOVZX R8D,byte ptr [RDI + 0x2]
MOV R9D,R8D
AND R9D,0xffffffc0
CMP R9D,0x80
JNZ 0x001863c3
MOVZX EDI,byte ptr [RDI + 0x3]
MOV R9D,EDI
AND R9D,0xffffffc0
CMP R9D,0x80
JNZ 0x001863ca
CMP ECX,0xf0
JNZ 0x00186364
LEA R9D,[RDX + 0x70]
CMP R9B,0x2f
JA 0x001863b1
LAB_00186364:
CMP ECX,0xf4
SETNZ R9B
CMP DL,0x90
SETL R10B
OR R10B,R9B
JZ 0x001863b1
CMP CL,0xf0
JC 0x00186213
AND ECX,0x7
SHL ECX,0x12
AND EDX,0x3f
SHL EDX,0xc
OR EDX,ECX
AND R8D,0x3f
SHL R8D,0x6
AND EDI,0x3f
OR EDI,R8D
OR EDI,EDX
MOV dword ptr [RSI],0x4
CMP EDX,0x110000
CMOVC EAX,EDI
RET
LAB_001863b1:
MOV dword ptr [RSI],0x2
RET
LAB_001863b8:
MOV dword ptr [RSI],0x3
JMP 0x001862e7
LAB_001863c3:
MOV dword ptr [RSI],0x3
RET
LAB_001863ca:
MOV dword ptr [RSI],0x4
RET
|
uint GetCodepoint(byte *param_1,int4 *param_2)
{
byte bVar1;
byte bVar2;
byte bVar3;
byte bVar4;
uint uVar5;
uint uVar6;
bVar1 = *param_1;
uVar5 = (uint)bVar1;
*param_2 = 1;
if (-1 < (char)bVar1) {
return (int)(char)*param_1;
}
if ((uVar5 & 0xffffffe0) == 0xc0) {
bVar2 = param_1[1];
if ((bVar2 & 0xc0) == 0x80) {
if (0x1d < (byte)(bVar1 + 0x3e)) {
return 0x3f;
}
*param_2 = 2;
return bVar2 & 0x3f | (uVar5 & 0x1f) << 6;
}
}
else {
if ((bVar1 & 0xf0) != 0xe0) {
uVar6 = 0x3f;
if (0xf4 < bVar1 || (bVar1 & 0xf8) != 0xf0) {
return 0x3f;
}
bVar2 = param_1[1];
if ((bVar2 & 0xffffffc0) == 0x80) {
bVar3 = param_1[2];
if ((bVar3 & 0xffffffc0) != 0x80) {
*param_2 = 3;
return uVar6;
}
bVar4 = param_1[3];
if ((bVar4 & 0xffffffc0) != 0x80) {
*param_2 = 4;
return uVar6;
}
if (((bVar1 != 0xf0) || ((byte)(bVar2 + 0x70) < 0x30)) &&
((char)bVar2 < -0x70 || uVar5 != 0xf4)) {
if (bVar1 < 0xf0) {
return 0x3f;
}
uVar6 = (bVar2 & 0x3f) << 0xc | (uVar5 & 7) << 0x12;
*param_2 = 4;
uVar5 = 0x3f;
if (uVar6 < 0x110000) {
uVar5 = bVar4 & 0x3f | (bVar3 & 0x3f) << 6 | uVar6;
}
return uVar5;
}
}
*param_2 = 2;
return uVar6;
}
bVar2 = param_1[1];
if ((bVar2 & 0xffffffc0) == 0x80) {
bVar3 = param_1[2];
if ((bVar3 & 0xc0) != 0x80) {
*param_2 = 3;
return 0x3f;
}
if (((uVar5 != 0xe0) || ((bVar2 & 0xe0) == 0xa0)) && ((char)bVar2 < -0x60 || uVar5 != 0xed)) {
if ((bVar1 & 0xf0) != 0xe0) {
return 0x3f;
}
*param_2 = 3;
return bVar3 & 0x3f | (bVar2 & 0x3f) << 6 | (uVar5 & 0xf) << 0xc;
}
}
}
*param_2 = 2;
return 0x3f;
}
| |
32,563 | google::protobuf::TextFormat::Finder::Finder() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/text_format.h | class PROTOBUF_EXPORT Finder {
public:
virtual ~Finder();
// Try to find an extension of *message by fully-qualified field
// name. Returns nullptr if no extension is known for this name or number.
// The base implementation uses the extensions already known by the message.
virtual const FieldDescriptor* FindExtension(Message* message,
const std::string& name) const;
// Similar to FindExtension, but uses a Descriptor and the extension number
// instead of using a Message and the name when doing the look up.
virtual const FieldDescriptor* FindExtensionByNumber(
const Descriptor* descriptor, int number) const;
// Find the message type for an Any proto.
// Returns nullptr if no message is known for this name.
// The base implementation only accepts prefixes of type.googleprod.com/ or
// type.googleapis.com/, and searches the DescriptorPool of the parent
// message.
virtual const Descriptor* FindAnyType(const Message& message,
const std::string& prefix,
const std::string& name) const;
// Find the message factory for the given extension field. This can be used
// to generalize the Parser to add extension fields to a message in the same
// way as the "input" message for the Parser.
virtual MessageFactory* FindExtensionFactory(
const FieldDescriptor* field) const;
} | O0 | c | google::protobuf::TextFormat::Finder::Finder():
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
leaq 0x1eefbf(%rip), %rcx # 0x27ab00
addq $0x10, %rcx
movq %rcx, (%rax)
retq
nopl (%rax)
| _ZN6google8protobuf10TextFormat6FinderC2Ev:
mov [rsp+var_8], rdi
mov rax, [rsp+var_8]
lea rcx, _ZTVN6google8protobuf10TextFormat6FinderE; `vtable for'google::protobuf::TextFormat::Finder
add rcx, 10h
mov [rax], rcx
retn
| google::protobuf::TextFormat::Finder * google::protobuf::TextFormat::Finder::Finder(
google::protobuf::TextFormat::Finder *this)
{
google::protobuf::TextFormat::Finder *result; // rax
result = this;
*(_QWORD *)this = &`vtable for'google::protobuf::TextFormat::Finder + 2;
return result;
}
| Finder:
MOV qword ptr [RSP + -0x8],RDI
MOV RAX,qword ptr [RSP + -0x8]
LEA RCX,[0x37ab00]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
RET
|
/* google::protobuf::TextFormat::Finder::Finder() */
void __thiscall google::protobuf::TextFormat::Finder::Finder(Finder *this)
{
*(int ***)this = &PTR__Finder_0037ab10;
return;
}
| |
32,564 | llama_grammar_accept_impl(llama_grammar&, int) | monkey531[P]llama/src/llama-grammar.cpp | void llama_grammar_accept_impl(struct llama_grammar & grammar, llama_token token) {
GGML_ASSERT(grammar.vocab != nullptr);
const auto & piece = grammar.vocab->token_to_piece(token);
if (grammar.awaiting_trigger) {
if (std::find(grammar.trigger_tokens.begin(), grammar.trigger_tokens.end(), token) != grammar.trigger_tokens.end()) {
grammar.awaiting_trigger = false;
grammar.trigger_buffer.clear();
llama_grammar_accept_str(grammar, piece);
LLAMA_LOG_DEBUG("Grammar triggered on token %u (`%s`)", token, piece.c_str());
return;
} else {
// TODO: consider a smarter incremental substring search algorithm (store last position to search from).
grammar.trigger_buffer += piece;
for (const auto & word : grammar.trigger_words) {
auto pos = grammar.trigger_buffer.find(word);
if (pos != std::string::npos) {
grammar.awaiting_trigger = false;
auto constrained_str = grammar.trigger_buffer.substr(pos);
grammar.trigger_buffer.clear();
llama_grammar_accept_str(grammar, constrained_str);
LLAMA_LOG_DEBUG("Grammar triggered on word `%s`", word.c_str());
return;
}
}
LLAMA_LOG_DEBUG("Grammar still awaiting trigger after token %d (`%s`) (buffer: `%s`)\n", token, piece.c_str(), grammar.trigger_buffer.c_str());
return;
}
}
if (grammar.vocab->is_eog(token)) {
for (const auto & stack : grammar.stacks) {
if (stack.empty()) {
return;
}
}
GGML_ABORT("fatal error");
}
llama_grammar_accept_str(grammar, piece);
} | O3 | cpp | llama_grammar_accept_impl(llama_grammar&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xa665f
movl %esi, %ebp
callq 0x67d60
movq %rax, %r14
cmpb $0x1, 0x41(%rbx)
jne 0xa651b
movq 0x68(%rbx), %rdi
movq 0x70(%rbx), %rsi
leaq 0x4(%rsp), %rdx
callq 0x65f80
cmpq 0x70(%rbx), %rax
je 0xa6566
xorl %eax, %eax
movb %al, 0x41(%rbx)
movq $0x0, 0x50(%rbx)
movq 0x48(%rbx), %rcx
movb %al, (%rcx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6b0b0
movl 0x4(%rsp), %edx
movq (%r14), %rcx
leaq 0x6f1fb(%rip), %rsi # 0x115705
movl $0x1, %edi
xorl %eax, %eax
callq 0x67d20
jmp 0xa6636
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x68b10
testb %al, %al
je 0xa654d
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
cmpq %rcx, %rax
je 0xa6645
movq (%rax), %rdx
cmpq 0x8(%rax), %rdx
je 0xa6636
addq $0x18, %rax
jmp 0xa6531
movq %rbx, %rdi
movq %r14, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6b0b0
leaq 0x48(%rbx), %r15
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x64f80
movq 0x80(%rbx), %r12
movq 0x88(%rbx), %r13
cmpq %r13, %r12
je 0xa65ab
movq (%r12), %rsi
movq 0x8(%r12), %rcx
movq %r15, %rdi
xorl %edx, %edx
callq 0x6b3a0
cmpq $-0x1, %rax
jne 0xa65ca
addq $0x20, %r12
jmp 0xa6587
movl 0x4(%rsp), %edx
movq (%r14), %rcx
movq (%r15), %r8
leaq 0x6f18d(%rip), %rsi # 0x115749
movl $0x1, %edi
xorl %eax, %eax
callq 0x67d20
jmp 0xa6636
xorl %ebp, %ebp
movb %bpl, 0x41(%rbx)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x68270
movq $0x0, 0x50(%rbx)
movq 0x48(%rbx), %rax
movb %bpl, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6b0b0
movq (%r12), %rdx
leaq 0x6f11b(%rip), %rsi # 0x11572a
movl $0x1, %edi
xorl %eax, %eax
callq 0x67d20
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa6636
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x681a0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6f01d(%rip), %rdi # 0x115669
leaq 0x6a71c(%rip), %rdx # 0x110d6f
movl $0x4b0, %esi # imm = 0x4B0
xorl %eax, %eax
callq 0x6af70
leaq 0x6f003(%rip), %rdi # 0x115669
leaq 0x69d57(%rip), %rdx # 0x1103c4
leaq 0x6f078(%rip), %rcx # 0x1156ec
movl $0x48c, %esi # imm = 0x48C
xorl %eax, %eax
callq 0x6af70
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa669e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x681a0
movq %rbx, %rdi
callq 0x6b5d0
| _Z25llama_grammar_accept_implR13llama_grammari:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov [rsp+58h+var_54], esi
mov rdi, [rdi]
test rdi, rdi
jz loc_A665F
mov ebp, esi
call __ZNK11llama_vocab14token_to_pieceB5cxx11Ei; llama_vocab::token_to_piece(int)
mov r14, rax
cmp byte ptr [rbx+41h], 1
jnz short loc_A651B
mov rdi, [rbx+68h]
mov rsi, [rbx+70h]
lea rdx, [rsp+58h+var_54]
call __ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops16_Iter_equals_valIKiEEET_SB_SB_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>,std::random_access_iterator_tag)
cmp rax, [rbx+70h]
jz loc_A6566
xor eax, eax
mov [rbx+41h], al
mov qword ptr [rbx+50h], 0
mov rcx, [rbx+48h]
mov [rcx], al
mov rdi, rbx; int
mov rsi, r14
call __Z24llama_grammar_accept_strR13llama_grammarRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; llama_grammar_accept_str(llama_grammar &,std::string const&)
mov edx, [rsp+58h+var_54]
mov rcx, [r14]
lea rsi, aGrammarTrigger; "Grammar triggered on token %u (`%s`)"
mov edi, 1
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
jmp loc_A6636
loc_A651B:
mov rdi, [rbx]; this
mov esi, ebp; int
call __ZNK11llama_vocab6is_eogEi; llama_vocab::is_eog(int)
test al, al
jz short loc_A654D
mov rax, [rbx+20h]
mov rcx, [rbx+28h]
loc_A6531:
cmp rax, rcx
jz loc_A6645
mov rdx, [rax]
cmp rdx, [rax+8]
jz loc_A6636
add rax, 18h
jmp short loc_A6531
loc_A654D:
mov rdi, rbx; int
mov rsi, r14
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp __Z24llama_grammar_accept_strR13llama_grammarRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; llama_grammar_accept_str(llama_grammar &,std::string const&)
loc_A6566:
lea r15, [rbx+48h]
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov r12, [rbx+80h]
mov r13, [rbx+88h]
loc_A6587:
cmp r12, r13
jz short loc_A65AB
mov rsi, [r12]
mov rcx, [r12+8]
mov rdi, r15
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_A65CA
add r12, 20h ; ' '
jmp short loc_A6587
loc_A65AB:
mov edx, [rsp+58h+var_54]
mov rcx, [r14]
mov r8, [r15]
lea rsi, aGrammarStillAw; "Grammar still awaiting trigger after to"...
mov edi, 1
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
jmp short loc_A6636
loc_A65CA:
xor ebp, ebp
mov [rbx+41h], bpl
lea r14, [rsp+58h+var_50]
mov rdi, r14
mov rsi, r15
mov rdx, rax
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov qword ptr [rbx+50h], 0
mov rax, [rbx+48h]
mov [rax], bpl
mov rdi, rbx; int
mov rsi, r14
call __Z24llama_grammar_accept_strR13llama_grammarRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; llama_grammar_accept_str(llama_grammar &,std::string const&)
mov rdx, [r12]
lea rsi, aGrammarTrigger_0; "Grammar triggered on word `%s`"
mov edi, 1
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A6636
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A6636:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A6645:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aFatalError; "fatal error"
mov esi, 4B0h
xor eax, eax
call _ggml_abort
loc_A665F:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGrammarVocabNu; "grammar.vocab != nullptr"
mov esi, 48Ch
xor eax, eax
call _ggml_abort
mov rbx, rax
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A669E
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A669E:
mov rdi, rbx
call __Unwind_Resume
| void llama_grammar_accept_impl(long long a1, long long a2)
{
llama_vocab *v3; // rdi
_QWORD *v4; // r14
int v5; // r8d
int v6; // r9d
_QWORD *i; // rax
int v8; // r9d
_QWORD *v9; // r12
_QWORD *v10; // r13
long long v11; // rax
int v12; // ecx
int v13; // r8d
int v14; // r9d
long long v15; // rax
long long v16; // rbx
int v17; // [rsp+4h] [rbp-54h] BYREF
_QWORD *v18; // [rsp+8h] [rbp-50h] BYREF
_QWORD v19[8]; // [rsp+18h] [rbp-40h] BYREF
v17 = a2;
v3 = *(llama_vocab **)a1;
if ( !v3 )
goto LABEL_20;
v4 = (_QWORD *)llama_vocab::token_to_piece[abi:cxx11](v3, a2);
if ( *(_BYTE *)(a1 + 65) != 1 )
{
if ( !(unsigned __int8)llama_vocab::is_eog(*(llama_vocab **)a1, a2) )
{
llama_grammar_accept_str(a1);
return;
}
for ( i = *(_QWORD **)(a1 + 32); i != *(_QWORD **)(a1 + 40); i += 3 )
{
if ( *i == i[1] )
return;
}
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-grammar.cpp", 1200LL, "fatal error");
LABEL_20:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-grammar.cpp",
1164LL,
"GGML_ASSERT(%s) failed",
"grammar.vocab != nullptr");
v16 = v15;
if ( v18 != v19 )
operator delete(v18, v19[0] + 1LL);
_Unwind_Resume(v16);
}
if ( std::__find_if<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>>(
*(_QWORD *)(a1 + 104),
*(_QWORD *)(a1 + 112),
&v17) == *(_QWORD *)(a1 + 112) )
{
std::string::_M_append(a1 + 72, *v4, v4[1]);
v9 = *(_QWORD **)(a1 + 128);
v10 = *(_QWORD **)(a1 + 136);
while ( 1 )
{
if ( v9 == v10 )
{
llama_log_internal(
1,
(unsigned int)"Grammar still awaiting trigger after token %d (`%s`) (buffer: `%s`)\n",
v17,
*v4,
*(_QWORD *)(a1 + 72),
v8);
return;
}
v11 = std::string::find(a1 + 72, *v9, 0LL);
if ( v11 != -1 )
break;
v9 += 4;
}
*(_BYTE *)(a1 + 65) = 0;
std::string::substr(&v18, a1 + 72, v11, -1LL);
*(_QWORD *)(a1 + 80) = 0LL;
**(_BYTE **)(a1 + 72) = 0;
llama_grammar_accept_str(a1);
llama_log_internal(1, (unsigned int)"Grammar triggered on word `%s`", *v9, v12, v13, v14);
if ( v18 != v19 )
operator delete(v18, v19[0] + 1LL);
}
else
{
*(_BYTE *)(a1 + 65) = 0;
*(_QWORD *)(a1 + 80) = 0LL;
**(_BYTE **)(a1 + 72) = 0;
llama_grammar_accept_str(a1);
llama_log_internal(1, (unsigned int)"Grammar triggered on token %u (`%s`)", v17, *v4, v5, v6);
}
}
| llama_grammar_accept_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV dword ptr [RSP + 0x4],ESI
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x001a665f
MOV EBP,ESI
CALL 0x00167d60
MOV R14,RAX
CMP byte ptr [RBX + 0x41],0x1
JNZ 0x001a651b
MOV RDI,qword ptr [RBX + 0x68]
MOV RSI,qword ptr [RBX + 0x70]
LEA RDX,[RSP + 0x4]
CALL 0x00165f80
CMP RAX,qword ptr [RBX + 0x70]
JZ 0x001a6566
XOR EAX,EAX
MOV byte ptr [RBX + 0x41],AL
MOV qword ptr [RBX + 0x50],0x0
MOV RCX,qword ptr [RBX + 0x48]
MOV byte ptr [RCX],AL
MOV RDI,RBX
MOV RSI,R14
CALL 0x0016b0b0
MOV EDX,dword ptr [RSP + 0x4]
MOV RCX,qword ptr [R14]
LEA RSI,[0x215705]
MOV EDI,0x1
XOR EAX,EAX
CALL 0x00167d20
JMP 0x001a6636
LAB_001a651b:
MOV RDI,qword ptr [RBX]
MOV ESI,EBP
CALL 0x00168b10
TEST AL,AL
JZ 0x001a654d
MOV RAX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x28]
LAB_001a6531:
CMP RAX,RCX
JZ 0x001a6645
MOV RDX,qword ptr [RAX]
CMP RDX,qword ptr [RAX + 0x8]
JZ 0x001a6636
ADD RAX,0x18
JMP 0x001a6531
LAB_001a654d:
MOV RDI,RBX
MOV RSI,R14
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0016b0b0
LAB_001a6566:
LEA R15,[RBX + 0x48]
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,R15
CALL 0x00164f80
MOV R12,qword ptr [RBX + 0x80]
MOV R13,qword ptr [RBX + 0x88]
LAB_001a6587:
CMP R12,R13
JZ 0x001a65ab
MOV RSI,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
MOV RDI,R15
XOR EDX,EDX
CALL 0x0016b3a0
CMP RAX,-0x1
JNZ 0x001a65ca
ADD R12,0x20
JMP 0x001a6587
LAB_001a65ab:
MOV EDX,dword ptr [RSP + 0x4]
MOV RCX,qword ptr [R14]
MOV R8,qword ptr [R15]
LEA RSI,[0x215749]
MOV EDI,0x1
XOR EAX,EAX
CALL 0x00167d20
JMP 0x001a6636
LAB_001a65ca:
XOR EBP,EBP
MOV byte ptr [RBX + 0x41],BPL
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
MOV RCX,-0x1
CALL 0x00168270
MOV qword ptr [RBX + 0x50],0x0
MOV RAX,qword ptr [RBX + 0x48]
MOV byte ptr [RAX],BPL
LAB_001a65f9:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0016b0b0
MOV RDX,qword ptr [R12]
LEA RSI,[0x21572a]
MOV EDI,0x1
XOR EAX,EAX
CALL 0x00167d20
LAB_001a661b:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a6636
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001681a0
LAB_001a6636:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a6645:
LEA RDI,[0x215669]
LEA RDX,[0x210d6f]
MOV ESI,0x4b0
XOR EAX,EAX
CALL 0x0016af70
LAB_001a665f:
LEA RDI,[0x215669]
LEA RDX,[0x2103c4]
LEA RCX,[0x2156ec]
MOV ESI,0x48c
XOR EAX,EAX
CALL 0x0016af70
|
/* llama_grammar_accept_impl(llama_grammar&, int) */
void llama_grammar_accept_impl(llama_grammar *param_1,int param_2)
{
llama_grammar *plVar1;
ulong *puVar2;
char cVar3;
string *psVar4;
long lVar5;
long *plVar6;
ulong *puVar7;
int local_54;
long *local_50 [2];
long local_40 [2];
local_54 = param_2;
if (*(llama_vocab **)param_1 == (llama_vocab *)0x0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-grammar.cpp",
0x48c,"GGML_ASSERT(%s) failed","grammar.vocab != nullptr");
}
psVar4 = (string *)llama_vocab::token_to_piece_abi_cxx11_(*(llama_vocab **)param_1,param_2);
if (param_1[0x41] == (llama_grammar)0x1) {
lVar5 = std::
__find_if<__gnu_cxx::__normal_iterator<int*,std::vector<int,std::allocator<int>>>,__gnu_cxx::__ops::_Iter_equals_val<int_const>>
(*(int8 *)(param_1 + 0x68),*(int8 *)(param_1 + 0x70),&local_54);
if (lVar5 == *(long *)(param_1 + 0x70)) {
plVar1 = param_1 + 0x48;
std::__cxx11::string::_M_append((char *)plVar1,*(ulong *)psVar4);
puVar2 = *(ulong **)(param_1 + 0x88);
for (puVar7 = *(ulong **)(param_1 + 0x80); puVar7 != puVar2; puVar7 = puVar7 + 4) {
lVar5 = std::__cxx11::string::find((char *)plVar1,*puVar7,0);
if (lVar5 != -1) {
param_1[0x41] = (llama_grammar)0x0;
std::__cxx11::string::substr((ulong)local_50,(ulong)plVar1);
*(int8 *)(param_1 + 0x50) = 0;
**(int1 **)(param_1 + 0x48) = 0;
/* try { // try from 001a65f9 to 001a661a has its CatchHandler @ 001a6680 */
llama_grammar_accept_str(param_1,(string *)local_50);
llama_log_internal(1,"Grammar triggered on word `%s`",*puVar7);
if (local_50[0] == local_40) {
return;
}
operator_delete(local_50[0],local_40[0] + 1);
return;
}
}
llama_log_internal(1,"Grammar still awaiting trigger after token %d (`%s`) (buffer: `%s`)\n",
local_54,*(int8 *)psVar4,*(int8 *)plVar1);
}
else {
param_1[0x41] = (llama_grammar)0x0;
*(int8 *)(param_1 + 0x50) = 0;
**(int1 **)(param_1 + 0x48) = 0;
llama_grammar_accept_str(param_1,psVar4);
llama_log_internal(1,"Grammar triggered on token %u (`%s`)",local_54,*(int8 *)psVar4);
}
}
else {
cVar3 = llama_vocab::is_eog(*(llama_vocab **)param_1,param_2);
if (cVar3 == '\0') {
llama_grammar_accept_str(param_1,psVar4);
return;
}
plVar6 = *(long **)(param_1 + 0x20);
while( true ) {
if (plVar6 == *(long **)(param_1 + 0x28)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-grammar.cpp"
,0x4b0,"fatal error");
}
if (*plVar6 == plVar6[1]) break;
plVar6 = plVar6 + 3;
}
}
return;
}
| |
32,565 | ma_send_connect_attr | eloqsql/libmariadb/libmariadb/mariadb_lib.c | char *ma_send_connect_attr(MYSQL *mysql, unsigned char *buffer)
{
if (mysql->server_capabilities & CLIENT_CONNECT_ATTRS)
{
buffer= (unsigned char *)mysql_net_store_length((unsigned char *)buffer, (mysql->options.extension) ?
mysql->options.extension->connect_attrs_len : 0);
if (mysql->options.extension &&
ma_hashtbl_inited(&mysql->options.extension->connect_attrs))
{
uint i;
for (i=0; i < mysql->options.extension->connect_attrs.records; i++)
{
size_t len;
uchar *p= ma_hashtbl_element(&mysql->options.extension->connect_attrs, i);
len= strlen((char *)p);
buffer= mysql_net_store_length(buffer, len);
memcpy(buffer, p, len);
buffer+= (len);
p+= (len + 1);
len= strlen((char *)p);
buffer= mysql_net_store_length(buffer, len);
memcpy(buffer, p, len);
buffer+= len;
}
}
}
return (char *)buffer;
} | O3 | c | ma_send_connect_attr:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testb $0x10, 0x372(%rdi)
je 0x1ce58
movq %rdi, %rbx
movq 0x480(%rdi), %rax
testq %rax, %rax
je 0x1cdae
movq 0x78(%rax), %rsi
jmp 0x1cdb0
xorl %esi, %esi
movq %r14, %rdi
callq 0x23647
movq %rax, %r14
movq 0x480(%rbx), %rdi
testq %rdi, %rdi
je 0x1ce58
cmpq $0x0, 0x48(%rdi)
je 0x1ce58
cmpl $0x0, 0x38(%rdi)
je 0x1ce58
xorl %r15d, %r15d
addq $0x30, %rdi
movl %r15d, %esi
callq 0x35951
movq %rax, %r12
movq %rax, %rdi
callq 0x131c0
movq %rax, %r13
movq %r14, %rdi
movq %rax, %rsi
callq 0x23647
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x133a0
addq %r13, %r14
addq %r13, %r12
incq %r12
movq %r12, %rdi
callq 0x131c0
movq %rax, %r13
movq %r14, %rdi
movq %rax, %rsi
callq 0x23647
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x133a0
addq %r13, %r14
incl %r15d
movq 0x480(%rbx), %rdi
cmpl 0x38(%rdi), %r15d
jb 0x1cddf
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ma_send_connect_attr:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
test byte ptr [rdi+372h], 10h
jz loc_1CE58
mov rbx, rdi
mov rax, [rdi+480h]
test rax, rax
jz short loc_1CDAE
mov rsi, [rax+78h]
jmp short loc_1CDB0
loc_1CDAE:
xor esi, esi
loc_1CDB0:
mov rdi, r14
call mysql_net_store_length
mov r14, rax
mov rdi, [rbx+480h]
test rdi, rdi
jz loc_1CE58
cmp qword ptr [rdi+48h], 0
jz loc_1CE58
cmp dword ptr [rdi+38h], 0
jz short loc_1CE58
xor r15d, r15d
loc_1CDDF:
add rdi, 30h ; '0'
mov esi, r15d
call ma_hashtbl_element
mov r12, rax
mov rdi, rax
call _strlen
mov r13, rax
mov rdi, r14
mov rsi, rax
call mysql_net_store_length
mov r14, rax
mov rdi, rax
mov rsi, r12
mov rdx, r13
call _memcpy
add r14, r13
add r12, r13
inc r12
mov rdi, r12
call _strlen
mov r13, rax
mov rdi, r14
mov rsi, rax
call mysql_net_store_length
mov r14, rax
mov rdi, rax
mov rsi, r12
mov rdx, r13
call _memcpy
add r14, r13
inc r15d
mov rdi, [rbx+480h]
cmp r15d, [rdi+38h]
jb short loc_1CDDF
loc_1CE58:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_send_connect_attr(long long a1, long long a2)
{
long long v4; // rax
long long v5; // rsi
long long v6; // rdi
unsigned int v7; // r15d
long long v8; // r12
long long v9; // r13
long long v10; // r14
long long v11; // r14
long long v12; // r12
long long v13; // r13
long long v14; // r14
if ( (*(_BYTE *)(a1 + 882) & 0x10) != 0 )
{
v4 = *(_QWORD *)(a1 + 1152);
if ( v4 )
v5 = *(_QWORD *)(v4 + 120);
else
v5 = 0LL;
a2 = mysql_net_store_length(a2, v5);
v6 = *(_QWORD *)(a1 + 1152);
if ( v6 && *(_QWORD *)(v6 + 72) && *(_DWORD *)(v6 + 56) )
{
v7 = 0;
do
{
v8 = ma_hashtbl_element(v6 + 48, v7);
v9 = strlen(v8);
v10 = mysql_net_store_length(a2, v9);
memcpy(v10, v8, v9);
v11 = v9 + v10;
v12 = v9 + v8 + 1;
v13 = strlen(v12);
v14 = mysql_net_store_length(v11, v13);
memcpy(v14, v12, v13);
a2 = v13 + v14;
++v7;
v6 = *(_QWORD *)(a1 + 1152);
}
while ( v7 < *(_DWORD *)(v6 + 56) );
}
}
return a2;
}
| ma_send_connect_attr:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
TEST byte ptr [RDI + 0x372],0x10
JZ 0x0011ce58
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x480]
TEST RAX,RAX
JZ 0x0011cdae
MOV RSI,qword ptr [RAX + 0x78]
JMP 0x0011cdb0
LAB_0011cdae:
XOR ESI,ESI
LAB_0011cdb0:
MOV RDI,R14
CALL 0x00123647
MOV R14,RAX
MOV RDI,qword ptr [RBX + 0x480]
TEST RDI,RDI
JZ 0x0011ce58
CMP qword ptr [RDI + 0x48],0x0
JZ 0x0011ce58
CMP dword ptr [RDI + 0x38],0x0
JZ 0x0011ce58
XOR R15D,R15D
LAB_0011cddf:
ADD RDI,0x30
MOV ESI,R15D
CALL 0x00135951
MOV R12,RAX
MOV RDI,RAX
CALL 0x001131c0
MOV R13,RAX
MOV RDI,R14
MOV RSI,RAX
CALL 0x00123647
MOV R14,RAX
MOV RDI,RAX
MOV RSI,R12
MOV RDX,R13
CALL 0x001133a0
ADD R14,R13
ADD R12,R13
INC R12
MOV RDI,R12
CALL 0x001131c0
MOV R13,RAX
MOV RDI,R14
MOV RSI,RAX
CALL 0x00123647
MOV R14,RAX
MOV RDI,RAX
MOV RSI,R12
MOV RDX,R13
CALL 0x001133a0
ADD R14,R13
INC R15D
MOV RDI,qword ptr [RBX + 0x480]
CMP R15D,dword ptr [RDI + 0x38]
JC 0x0011cddf
LAB_0011ce58:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long ma_send_connect_attr(long param_1,long param_2)
{
char *__s;
size_t __n;
void *pvVar1;
size_t __n_00;
int8 uVar2;
long lVar3;
uint uVar4;
if ((*(byte *)(param_1 + 0x372) & 0x10) != 0) {
if (*(long *)(param_1 + 0x480) == 0) {
uVar2 = 0;
}
else {
uVar2 = *(int8 *)(*(long *)(param_1 + 0x480) + 0x78);
}
param_2 = mysql_net_store_length(param_2,uVar2);
lVar3 = *(long *)(param_1 + 0x480);
if (((lVar3 != 0) && (*(long *)(lVar3 + 0x48) != 0)) && (*(int *)(lVar3 + 0x38) != 0)) {
uVar4 = 0;
do {
__s = (char *)ma_hashtbl_element(lVar3 + 0x30,uVar4);
__n = strlen(__s);
pvVar1 = (void *)mysql_net_store_length(param_2,__n);
memcpy(pvVar1,__s,__n);
__n_00 = strlen(__s + __n + 1);
pvVar1 = (void *)mysql_net_store_length((long)pvVar1 + __n,__n_00);
memcpy(pvVar1,__s + __n + 1,__n_00);
param_2 = (long)pvVar1 + __n_00;
uVar4 = uVar4 + 1;
lVar3 = *(long *)(param_1 + 0x480);
} while (uVar4 < *(uint *)(lVar3 + 0x38));
}
}
return param_2;
}
| |
32,566 | init_weight_level | eloqsql/strings/ctype-uca.c | static my_bool
init_weight_level(MY_CHARSET_LOADER *loader, MY_COLL_RULES *rules,
MY_UCA_WEIGHT_LEVEL *dst, const MY_UCA_WEIGHT_LEVEL *src)
{
MY_COLL_RULE *r, *rlast;
int ncontractions= 0;
size_t i, npages= (src->maxchar + 1) / 256;
dst->maxchar= src->maxchar;
dst->levelno= src->levelno;
if (check_rules(loader, rules, dst, src))
return TRUE;
/* Allocate memory for pages and their lengths */
if (!(dst->lengths= (uchar *) (loader->once_alloc)(npages)) ||
!(dst->weights= (uint16 **) (loader->once_alloc)(npages *
sizeof(uint16 *))))
return TRUE;
/* Copy pages lengths and page pointers from the default UCA weights */
memcpy(dst->lengths, src->lengths, npages);
memcpy(dst->weights, src->weights, npages * sizeof(uint16 *));
/*
Calculate maximum lengths for the pages which will be overwritten.
Mark pages that will be otherwriten as NULL.
We'll allocate their own memory.
*/
for (r= rules->rule, rlast= rules->rule + rules->nrules; r < rlast; r++)
{
if (!r->curr[1]) /* If not a contraction */
{
uint pagec= (r->curr[0] >> 8);
if (r->base[1]) /* Expansion */
{
/* Reserve space for maximum possible length */
dst->lengths[pagec]= MY_UCA_MAX_WEIGHT_SIZE;
}
else
{
/*
Not an expansion and not a contraction.
The page corresponding to r->curr[0] in "dst"
will need at least the same amount of weights
that r->base[0] has in "src".
*/
uint wsize= my_weight_size_on_page(src, r->base[0] >> 8);
if (dst->lengths[pagec] < wsize)
dst->lengths[pagec]= wsize;
}
dst->weights[pagec]= NULL; /* Mark that we'll overwrite this page */
}
else
ncontractions++;
}
ncontractions += (int)src->contractions.nitems;
if ((my_uca_generate_pages(loader, dst, src, (uint)npages)))
return TRUE;
if (ncontractions)
{
if (my_uca_alloc_contractions(&dst->contractions, loader, ncontractions))
return TRUE;
}
/*
Preparatory step is done at this point.
Now we have memory allocated for the pages that we'll overwrite,
and for contractions, including previous context contractions.
Also, for the pages that we'll overwrite, we have copied default weights.
Now iterate through the rules, overwrite weights for the characters
that appear in the rules, and put all contractions into contraction list.
*/
for (r= rules->rule; r < rlast; r++)
{
if (apply_one_rule(loader, rules, r, dst))
return TRUE;
}
/*
Add built-in contractions (e.g. for Thai)
*/
for (i= 0; i != src->contractions.nitems; i++)
{
MY_CONTRACTION *item= &src->contractions.item[i];
/*
TODO: calculate length from item->ch.
Generally contractions can consist of more than 2 characters.
*/
uint length= 2;
uint16 *weights= my_uca_init_one_contraction(&dst->contractions,
item->ch, length,
item->with_context);
memcpy(weights, item->weight, length * sizeof(uint16));
weights[length]= 0;
}
return FALSE;
} | O0 | c | init_weight_level:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
shrq $0x8, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x86d50
cmpl $0x0, %eax
je 0x85471
movb $0x1, -0x1(%rbp)
jmp 0x85705
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x50(%rbp), %rdi
callq *%rax
movq -0x20(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
je 0x854b3
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x50(%rbp), %rdi
shlq $0x3, %rdi
callq *%rax
movq -0x20(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x854bc
movb $0x1, -0x1(%rbp)
jmp 0x85705
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x50(%rbp), %rdx
callq 0x26280
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x50(%rbp), %rdx
shlq $0x3, %rdx
callq 0x26280
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
imulq $0xa0, 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x855d6
movq -0x30(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x855b8
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
shrq $0x8, %rax
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x85561
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x54(%rbp), %ecx
movb $0x9, (%rax,%rcx)
jmp 0x855a3
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
shrq $0x8, %rax
movl %eax, %esi
callq 0x86e40
movl %eax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x54(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl -0x58(%rbp), %eax
jae 0x855a1
movl -0x58(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x54(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x855a3
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x54(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
jmp 0x855c1
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x855c3
movq -0x30(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x30(%rbp)
jmp 0x85519
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
addl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x50(%rbp), %rax
movl %eax, %ecx
callq 0x86e90
cmpb $0x0, %al
je 0x85608
movb $0x1, -0x1(%rbp)
jmp 0x85705
cmpl $0x0, -0x3c(%rbp)
je 0x85632
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
movslq -0x3c(%rbp), %rdx
callq 0x86f20
cmpb $0x0, %al
je 0x85630
movb $0x1, -0x1(%rbp)
jmp 0x85705
jmp 0x85632
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x8567c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x86fc0
cmpb $0x0, %al
je 0x8566a
movb $0x1, -0x1(%rbp)
jmp 0x85705
jmp 0x8566c
movq -0x30(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x30(%rbp)
jmp 0x8563e
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x85701
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x58, -0x48(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movl $0x2, -0x64(%rbp)
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
movq -0x60(%rbp), %rsi
movl -0x64(%rbp), %edx
movq -0x60(%rbp), %rax
movsbl 0x52(%rax), %ecx
callq 0x871a0
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movq -0x60(%rbp), %rsi
addq $0x30, %rsi
movl -0x64(%rbp), %eax
movl %eax, %edx
shlq %rdx
callq 0x26280
movq -0x70(%rbp), %rax
movl -0x64(%rbp), %ecx
movw $0x0, (%rax,%rcx,2)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x85684
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nop
| init_weight_level:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_3C], 0
mov rax, [rbp+var_28]
mov rax, [rax]
add rax, 1
shr rax, 8
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rax, [rbp+var_28]
mov ecx, [rax+30h]
mov rax, [rbp+var_20]
mov [rax+30h], ecx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
call check_rules
cmp eax, 0
jz short loc_85471
mov [rbp+var_1], 1
jmp loc_85705
loc_85471:
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov rdi, [rbp+var_50]
call rax
mov rcx, [rbp+var_20]
mov [rcx+8], rax
cmp rax, 0
jz short loc_854B3
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov rdi, [rbp+var_50]
shl rdi, 3
call rax
mov rcx, [rbp+var_20]
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_854BC
loc_854B3:
mov [rbp+var_1], 1
jmp loc_85705
loc_854BC:
mov rax, [rbp+var_20]
mov rdi, [rax+8]
mov rax, [rbp+var_28]
mov rsi, [rax+8]
mov rdx, [rbp+var_50]
call _memcpy
mov rax, [rbp+var_20]
mov rdi, [rax+10h]
mov rax, [rbp+var_28]
mov rsi, [rax+10h]
mov rdx, [rbp+var_50]
shl rdx, 3
call _memcpy
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov rcx, [rbp+var_18]
imul rcx, [rcx+10h], 0A0h
add rax, rcx
mov [rbp+var_38], rax
loc_85519:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_855D6
mov rax, [rbp+var_30]
cmp qword ptr [rax+58h], 0
jnz loc_855B8
mov rax, [rbp+var_30]
mov rax, [rax+50h]
shr rax, 8
mov [rbp+var_54], eax
mov rax, [rbp+var_30]
cmp qword ptr [rax+8], 0
jz short loc_85561
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rbp+var_54]
mov byte ptr [rax+rcx], 9
jmp short loc_855A3
loc_85561:
mov rdi, [rbp+var_28]
mov rax, [rbp+var_30]
mov rax, [rax]
shr rax, 8
mov esi, eax
call my_weight_size_on_page
mov [rbp+var_58], eax
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rbp+var_54]
movzx eax, byte ptr [rax+rcx]
cmp eax, [rbp+var_58]
jnb short loc_855A1
mov eax, [rbp+var_58]
mov dl, al
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rbp+var_54]
mov [rax+rcx], dl
loc_855A1:
jmp short $+2
loc_855A3:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov ecx, [rbp+var_54]
mov qword ptr [rax+rcx*8], 0
jmp short loc_855C1
loc_855B8:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
loc_855C1:
jmp short $+2
loc_855C3:
mov rax, [rbp+var_30]
add rax, 0A0h
mov [rbp+var_30], rax
jmp loc_85519
loc_855D6:
mov rax, [rbp+var_28]
mov rax, [rax+18h]
add eax, [rbp+var_3C]
mov [rbp+var_3C], eax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rax, [rbp+var_50]
mov ecx, eax
call my_uca_generate_pages
cmp al, 0
jz short loc_85608
mov [rbp+var_1], 1
jmp loc_85705
loc_85608:
cmp [rbp+var_3C], 0
jz short loc_85632
mov rdi, [rbp+var_20]
add rdi, 18h
mov rsi, [rbp+var_10]
movsxd rdx, [rbp+var_3C]
call my_uca_alloc_contractions
cmp al, 0
jz short loc_85630
mov [rbp+var_1], 1
jmp loc_85705
loc_85630:
jmp short $+2
loc_85632:
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_30], rax
loc_8563E:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb short loc_8567C
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_20]
call apply_one_rule
cmp al, 0
jz short loc_8566A
mov [rbp+var_1], 1
jmp loc_85705
loc_8566A:
jmp short $+2
loc_8566C:
mov rax, [rbp+var_30]
add rax, 0A0h
mov [rbp+var_30], rax
jmp short loc_8563E
loc_8567C:
mov [rbp+var_48], 0
loc_85684:
mov rax, [rbp+var_48]
mov rcx, [rbp+var_28]
cmp rax, [rcx+18h]
jz short loc_85701
mov rax, [rbp+var_28]
mov rax, [rax+20h]
imul rcx, [rbp+var_48], 58h ; 'X'
add rax, rcx
mov [rbp+var_60], rax
mov [rbp+var_64], 2
mov rdi, [rbp+var_20]
add rdi, 18h
mov rsi, [rbp+var_60]
mov edx, [rbp+var_64]
mov rax, [rbp+var_60]
movsx ecx, byte ptr [rax+52h]
call my_uca_init_one_contraction
mov [rbp+var_70], rax
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_60]
add rsi, 30h ; '0'
mov eax, [rbp+var_64]
mov edx, eax
shl rdx, 1
call _memcpy
mov rax, [rbp+var_70]
mov ecx, [rbp+var_64]
mov word ptr [rax+rcx*2], 0
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
jmp short loc_85684
loc_85701:
mov [rbp+var_1], 0
loc_85705:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
| char init_weight_level(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // rax
long long inited; // [rsp+0h] [rbp-70h]
long long v8; // [rsp+10h] [rbp-60h]
unsigned int v9; // [rsp+18h] [rbp-58h]
unsigned int v10; // [rsp+1Ch] [rbp-54h]
unsigned long long v11; // [rsp+20h] [rbp-50h]
long long j; // [rsp+28h] [rbp-48h]
int v13; // [rsp+34h] [rbp-3Ch]
int v14; // [rsp+34h] [rbp-3Ch]
_QWORD *v15; // [rsp+38h] [rbp-38h]
_QWORD *v16; // [rsp+40h] [rbp-30h]
unsigned long long i; // [rsp+40h] [rbp-30h]
v13 = 0;
v11 = (unsigned long long)(*(_QWORD *)a4 + 1LL) >> 8;
*(_QWORD *)a3 = *(_QWORD *)a4;
*(_DWORD *)(a3 + 48) = *(_DWORD *)(a4 + 48);
if ( (unsigned int)check_rules(a1, a2, a3, a4) )
return 1;
v4 = (*(long long ( **)(unsigned long long))(a1 + 128))(v11);
*(_QWORD *)(a3 + 8) = v4;
if ( !v4 )
return 1;
v5 = (*(long long ( **)(unsigned long long))(a1 + 128))(8 * v11);
*(_QWORD *)(a3 + 16) = v5;
if ( !v5 )
return 1;
memcpy(*(_QWORD *)(a3 + 8), *(_QWORD *)(a4 + 8), v11);
memcpy(*(_QWORD *)(a3 + 16), *(_QWORD *)(a4 + 16), 8 * v11);
v16 = *(_QWORD **)(a2 + 32);
v15 = &v16[20 * *(_QWORD *)(a2 + 16)];
while ( v16 < v15 )
{
if ( v16[11] )
{
++v13;
}
else
{
v10 = v16[10] >> 8;
if ( v16[1] )
{
*(_BYTE *)(*(_QWORD *)(a3 + 8) + v10) = 9;
}
else
{
v9 = my_weight_size_on_page(a4, (unsigned int)(*v16 >> 8));
if ( *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + v10) < v9 )
*(_BYTE *)(*(_QWORD *)(a3 + 8) + v10) = v9;
}
*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8LL * v10) = 0LL;
}
v16 += 20;
}
v14 = v13 + *(_QWORD *)(a4 + 24);
if ( (unsigned __int8)my_uca_generate_pages(a1, a3, a4, (unsigned int)v11) )
return 1;
if ( v14 && (unsigned __int8)my_uca_alloc_contractions(a3 + 24, a1, v14) )
return 1;
for ( i = *(_QWORD *)(a2 + 32); i < (unsigned long long)v15; i += 160LL )
{
if ( (unsigned __int8)apply_one_rule(a1, a2, i, a3) )
return 1;
}
for ( j = 0LL; j != *(_QWORD *)(a4 + 24); ++j )
{
v8 = 88 * j + *(_QWORD *)(a4 + 32);
inited = my_uca_init_one_contraction(a3 + 24, v8, 2LL, (unsigned int)*(char *)(v8 + 82));
memcpy(inited, v8 + 48, 4LL);
*(_WORD *)(inited + 4) = 0;
}
return 0;
}
| init_weight_level:
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 qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
ADD RAX,0x1
SHR RAX,0x8
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x30],ECX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
CALL 0x00186d50
CMP EAX,0x0
JZ 0x00185471
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00185705
LAB_00185471:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV RDI,qword ptr [RBP + -0x50]
CALL RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RCX + 0x8],RAX
CMP RAX,0x0
JZ 0x001854b3
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV RDI,qword ptr [RBP + -0x50]
SHL RDI,0x3
CALL RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x001854bc
LAB_001854b3:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00185705
LAB_001854bc:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x00126280
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x50]
SHL RDX,0x3
CALL 0x00126280
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
IMUL RCX,qword ptr [RCX + 0x10],0xa0
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_00185519:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001855d6
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x58],0x0
JNZ 0x001855b8
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
SHR RAX,0x8
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00185561
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x54]
MOV byte ptr [RAX + RCX*0x1],0x9
JMP 0x001855a3
LAB_00185561:
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
SHR RAX,0x8
MOV ESI,EAX
CALL 0x00186e40
MOV dword ptr [RBP + -0x58],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x54]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,dword ptr [RBP + -0x58]
JNC 0x001855a1
MOV EAX,dword ptr [RBP + -0x58]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x54]
MOV byte ptr [RAX + RCX*0x1],DL
LAB_001855a1:
JMP 0x001855a3
LAB_001855a3:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [RBP + -0x54]
MOV qword ptr [RAX + RCX*0x8],0x0
JMP 0x001855c1
LAB_001855b8:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
LAB_001855c1:
JMP 0x001855c3
LAB_001855c3:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0xa0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00185519
LAB_001855d6:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x18]
ADD EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x3c],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,EAX
CALL 0x00186e90
CMP AL,0x0
JZ 0x00185608
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00185705
LAB_00185608:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00185632
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x3c]
CALL 0x00186f20
CMP AL,0x0
JZ 0x00185630
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00185705
LAB_00185630:
JMP 0x00185632
LAB_00185632:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
LAB_0018563e:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0018567c
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x00186fc0
CMP AL,0x0
JZ 0x0018566a
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00185705
LAB_0018566a:
JMP 0x0018566c
LAB_0018566c:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0xa0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0018563e
LAB_0018567c:
MOV qword ptr [RBP + -0x48],0x0
LAB_00185684:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX + 0x18]
JZ 0x00185701
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x20]
IMUL RCX,qword ptr [RBP + -0x48],0x58
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV dword ptr [RBP + -0x64],0x2
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x60]
MOV EDX,dword ptr [RBP + -0x64]
MOV RAX,qword ptr [RBP + -0x60]
MOVSX ECX,byte ptr [RAX + 0x52]
CALL 0x001871a0
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x60]
ADD RSI,0x30
MOV EAX,dword ptr [RBP + -0x64]
MOV EDX,EAX
SHL RDX,0x1
CALL 0x00126280
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,dword ptr [RBP + -0x64]
MOV word ptr [RAX + RCX*0x2],0x0
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00185684
LAB_00185701:
MOV byte ptr [RBP + -0x1],0x0
LAB_00185705:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int1 init_weight_level(long param_1,long param_2,long *param_3,long *param_4)
{
char cVar1;
int iVar2;
uint uVar3;
uint uVar4;
ulong __n;
long lVar5;
ulong *puVar6;
void *__dest;
long local_50;
int local_44;
ulong *local_38;
local_44 = 0;
__n = *param_4 + 1U >> 8;
*param_3 = *param_4;
*(int *)(param_3 + 6) = (int)param_4[6];
iVar2 = check_rules(param_1,param_2,param_3,param_4);
if (iVar2 == 0) {
lVar5 = (**(code **)(param_1 + 0x80))(__n);
param_3[1] = lVar5;
if (lVar5 != 0) {
lVar5 = (**(code **)(param_1 + 0x80))(__n << 3);
param_3[2] = lVar5;
if (lVar5 != 0) {
memcpy((void *)param_3[1],(void *)param_4[1],__n);
memcpy((void *)param_3[2],(void *)param_4[2],__n << 3);
puVar6 = (ulong *)(*(long *)(param_2 + 0x20) + *(long *)(param_2 + 0x10) * 0xa0);
for (local_38 = *(ulong **)(param_2 + 0x20); local_38 < puVar6; local_38 = local_38 + 0x14)
{
if (local_38[0xb] == 0) {
uVar3 = (uint)(local_38[10] >> 8);
if (local_38[1] == 0) {
uVar4 = my_weight_size_on_page(param_4,*local_38 >> 8 & 0xffffffff);
if (*(byte *)(param_3[1] + (ulong)uVar3) < uVar4) {
*(char *)(param_3[1] + (ulong)uVar3) = (char)uVar4;
}
}
else {
*(int1 *)(param_3[1] + (ulong)uVar3) = 9;
}
*(int8 *)(param_3[2] + (ulong)uVar3 * 8) = 0;
}
else {
local_44 = local_44 + 1;
}
}
local_44 = (int)param_4[3] + local_44;
cVar1 = my_uca_generate_pages(param_1,param_3,param_4,__n & 0xffffffff);
if (cVar1 == '\0') {
if ((local_44 != 0) &&
(cVar1 = my_uca_alloc_contractions(param_3 + 3,param_1,(long)local_44), cVar1 != '\0'))
{
return 1;
}
local_38 = *(ulong **)(param_2 + 0x20);
while( true ) {
if (puVar6 <= local_38) {
for (local_50 = 0; local_50 != param_4[3]; local_50 = local_50 + 1) {
lVar5 = param_4[4] + local_50 * 0x58;
__dest = (void *)my_uca_init_one_contraction
(param_3 + 3,lVar5,2,(int)*(char *)(lVar5 + 0x52));
memcpy(__dest,(void *)(lVar5 + 0x30),4);
*(int2 *)((long)__dest + 4) = 0;
}
return 0;
}
cVar1 = apply_one_rule(param_1,param_2,local_38,param_3);
if (cVar1 != '\0') break;
local_38 = local_38 + 0x14;
}
return 1;
}
return 1;
}
}
}
return 1;
}
| |
32,567 | ma_net_real_write | eloqsql/libmariadb/libmariadb/ma_net.c | int ma_net_real_write(NET *net, const char *packet, size_t len)
{
ssize_t length;
char *pos,*end;
if (net->error == 2)
return(-1); /* socket can't be used */
net->reading_or_writing=2;
#ifdef HAVE_COMPRESS
if (net->compress)
{
size_t complen;
uchar *b;
uint header_length=NET_HEADER_SIZE+COMP_HEADER_SIZE;
if (!(b=(uchar*) malloc(len + NET_HEADER_SIZE + COMP_HEADER_SIZE + 1)))
{
net->pvio->set_error(net->pvio->mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
net->error=2;
net->reading_or_writing=0;
return(1);
}
memcpy(b+header_length,packet,len);
if (_mariadb_compress(net, (unsigned char*) b+header_length,&len,&complen))
{
complen=0;
}
int3store(&b[NET_HEADER_SIZE],complen);
int3store(b,len);
b[3]=(uchar) (net->compress_pkt_nr++);
len+= header_length;
packet= (char*) b;
}
#endif /* HAVE_COMPRESS */
pos=(char*) packet; end=pos+len;
while (pos != end)
{
if ((length=ma_pvio_write(net->pvio,(uchar *)pos,(size_t) (end-pos))) <= 0)
{
int save_errno= errno;
char errmsg[100];
net->error=2; /* Close socket */
strerror_r(save_errno, errmsg, 100);
net->pvio->set_error(net->pvio->mysql, CR_ERR_NET_WRITE, SQLSTATE_UNKNOWN, 0,
errmsg, save_errno);
net->reading_or_writing=0;
#ifdef HAVE_COMPRESS
if (net->compress)
free((char*) packet);
#endif
return(1);
}
pos+=length;
}
#ifdef HAVE_COMPRESS
if (net->compress)
free((char*) packet);
#endif
net->reading_or_writing=0;
return(((int) (pos != end)));
} | O0 | c | ma_net_real_write:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x80(%rbp)
movq %rsi, -0x88(%rbp)
movq %rdx, -0x90(%rbp)
movq -0x80(%rbp), %rax
movzbl 0x94(%rax), %eax
cmpl $0x2, %eax
jne 0x60416
movl $0xffffffff, -0x74(%rbp) # imm = 0xFFFFFFFF
jmp 0x60721
movq -0x80(%rbp), %rax
movb $0x2, 0x80(%rax)
movq -0x80(%rbp), %rax
cmpb $0x0, 0x84(%rax)
je 0x605cc
movl $0x7, -0xbc(%rbp)
movq -0x90(%rbp), %rdi
addq $0x4, %rdi
addq $0x3, %rdi
addq $0x1, %rdi
callq 0x145c0
movq %rax, -0xb8(%rbp)
cmpq $0x0, %rax
jne 0x604b1
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq 0x50(%rax), %r8
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rdi
leaq 0x20a22(%rip), %rax # 0x80ea0
movq (%rax), %rdx
movl $0x7d8, %esi # imm = 0x7D8
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq *%r8
movq -0x80(%rbp), %rax
movb $0x2, 0x94(%rax)
movq -0x80(%rbp), %rax
movb $0x0, 0x80(%rax)
movl $0x1, -0x74(%rbp)
jmp 0x60721
movq -0xb8(%rbp), %rdi
movl -0xbc(%rbp), %eax
addq %rax, %rdi
movq -0x88(%rbp), %rsi
movq -0x90(%rbp), %rdx
callq 0x14370
movq -0x80(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movl -0xbc(%rbp), %eax
addq %rax, %rsi
leaq -0x90(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
callq 0x3f910
cmpb $0x0, %al
je 0x6050a
movq $0x0, -0xb0(%rbp)
jmp 0x6050c
movq -0xb0(%rbp), %rax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0xb0(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0xb0(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, 0x6(%rax)
jmp 0x6054f
movq -0x90(%rbp), %rax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, (%rax)
movq -0x90(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x90(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x80(%rbp), %rcx
movl 0x64(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x64(%rcx)
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, 0x3(%rax)
movl -0xbc(%rbp), %eax
addq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
addq -0x90(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
cmpq -0xa8(%rbp), %rax
je 0x606e4
movq -0x80(%rbp), %rax
movq (%rax), %rdi
movq -0xa0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq -0xa0(%rbp), %rax
subq %rax, %rdx
callq 0x3e060
movq %rax, -0x98(%rbp)
cmpq $0x0, %rax
jg 0x606ca
callq 0x14050
movl (%rax), %eax
movl %eax, -0xc0(%rbp)
movq -0x80(%rbp), %rax
movb $0x2, 0x94(%rax)
movl -0xc0(%rbp), %edi
leaq -0x70(%rbp), %rsi
movl $0x64, %edx
callq 0x141e0
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq 0x50(%rax), %r10
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rdi
leaq 0x2081f(%rip), %rax # 0x80ea0
movq (%rax), %rdx
leaq -0x70(%rbp), %r8
movl -0xc0(%rbp), %r9d
movl $0x1396, %esi # imm = 0x1396
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq *%r10
movq -0x80(%rbp), %rax
movb $0x0, 0x80(%rax)
movq -0x80(%rbp), %rax
cmpb $0x0, 0x84(%rax)
je 0x606c1
movq -0x88(%rbp), %rdi
callq 0x14530
movl $0x1, -0x74(%rbp)
jmp 0x60721
movq -0x98(%rbp), %rax
addq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x605ef
movq -0x80(%rbp), %rax
cmpb $0x0, 0x84(%rax)
je 0x606fd
movq -0x88(%rbp), %rdi
callq 0x14530
movq -0x80(%rbp), %rax
movb $0x0, 0x80(%rax)
movq -0xa0(%rbp), %rax
cmpq -0xa8(%rbp), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0xc4(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x6074b
movl -0xc4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
callq 0x144c0
| ma_net_real_write:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_80], rdi
mov [rbp+var_88], rsi
mov [rbp+var_90], rdx
mov rax, [rbp+var_80]
movzx eax, byte ptr [rax+94h]
cmp eax, 2
jnz short loc_60416
mov [rbp+var_74], 0FFFFFFFFh
jmp loc_60721
loc_60416:
mov rax, [rbp+var_80]
mov byte ptr [rax+80h], 2
mov rax, [rbp+var_80]
cmp byte ptr [rax+84h], 0
jz loc_605CC
mov [rbp+var_BC], 7
mov rdi, [rbp+var_90]
add rdi, 4
add rdi, 3
add rdi, 1
call _malloc
mov [rbp+var_B8], rax
cmp rax, 0
jnz short loc_604B1
mov rax, [rbp+var_80]
mov rax, [rax]
mov r8, [rax+50h]
mov rax, [rbp+var_80]
mov rax, [rax]
mov rdi, [rax+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D8h
xor eax, eax
mov ecx, eax
mov al, 0
call r8
mov rax, [rbp+var_80]
mov byte ptr [rax+94h], 2
mov rax, [rbp+var_80]
mov byte ptr [rax+80h], 0
mov [rbp+var_74], 1
jmp loc_60721
loc_604B1:
mov rdi, [rbp+var_B8]
mov eax, [rbp+var_BC]
add rdi, rax
mov rsi, [rbp+var_88]
mov rdx, [rbp+var_90]
call _memcpy
mov rdi, [rbp+var_80]
mov rsi, [rbp+var_B8]
mov eax, [rbp+var_BC]
add rsi, rax
lea rdx, [rbp+var_90]
lea rcx, [rbp+var_B0]
call _mariadb_compress
cmp al, 0
jz short loc_6050A
mov [rbp+var_B0], 0
loc_6050A:
jmp short $+2
loc_6050C:
mov rax, [rbp+var_B0]
mov cl, al
mov rax, [rbp+var_B8]
mov [rax+4], cl
mov rax, [rbp+var_B0]
shr rax, 8
mov cl, al
mov rax, [rbp+var_B8]
mov [rax+5], cl
mov rax, [rbp+var_B0]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_B8]
mov [rax+6], cl
jmp short $+2
loc_6054F:
mov rax, [rbp+var_90]
mov cl, al
mov rax, [rbp+var_B8]
mov [rax], cl
mov rax, [rbp+var_90]
shr rax, 8
mov cl, al
mov rax, [rbp+var_B8]
mov [rax+1], cl
mov rax, [rbp+var_90]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_B8]
mov [rax+2], cl
mov rcx, [rbp+var_80]
mov eax, [rcx+64h]
mov edx, eax
add edx, 1
mov [rcx+64h], edx
mov cl, al
mov rax, [rbp+var_B8]
mov [rax+3], cl
mov eax, [rbp+var_BC]
add rax, [rbp+var_90]
mov [rbp+var_90], rax
mov rax, [rbp+var_B8]
mov [rbp+var_88], rax
loc_605CC:
mov rax, [rbp+var_88]
mov [rbp+var_A0], rax
mov rax, [rbp+var_A0]
add rax, [rbp+var_90]
mov [rbp+var_A8], rax
loc_605EF:
mov rax, [rbp+var_A0]
cmp rax, [rbp+var_A8]
jz loc_606E4
mov rax, [rbp+var_80]
mov rdi, [rax]
mov rsi, [rbp+var_A0]
mov rdx, [rbp+var_A8]
mov rax, [rbp+var_A0]
sub rdx, rax
call ma_pvio_write
mov [rbp+var_98], rax
cmp rax, 0
jg loc_606CA
call ___errno_location
mov eax, [rax]
mov [rbp+var_C0], eax
mov rax, [rbp+var_80]
mov byte ptr [rax+94h], 2
mov edi, [rbp+var_C0]
lea rsi, [rbp+var_70]
mov edx, 64h ; 'd'
call ___xpg_strerror_r
mov rax, [rbp+var_80]
mov rax, [rax]
mov r10, [rax+50h]
mov rax, [rbp+var_80]
mov rax, [rax]
mov rdi, [rax+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea r8, [rbp+var_70]
mov r9d, [rbp+var_C0]
mov esi, 1396h
xor eax, eax
mov ecx, eax
mov al, 0
call r10
mov rax, [rbp+var_80]
mov byte ptr [rax+80h], 0
mov rax, [rbp+var_80]
cmp byte ptr [rax+84h], 0
jz short loc_606C1
mov rdi, [rbp+var_88]
call _free
loc_606C1:
mov [rbp+var_74], 1
jmp short loc_60721
loc_606CA:
mov rax, [rbp+var_98]
add rax, [rbp+var_A0]
mov [rbp+var_A0], rax
jmp loc_605EF
loc_606E4:
mov rax, [rbp+var_80]
cmp byte ptr [rax+84h], 0
jz short loc_606FD
mov rdi, [rbp+var_88]
call _free
loc_606FD:
mov rax, [rbp+var_80]
mov byte ptr [rax+80h], 0
mov rax, [rbp+var_A0]
cmp rax, [rbp+var_A8]
setnz al
and al, 1
movzx eax, al
mov [rbp+var_74], eax
loc_60721:
mov eax, [rbp+var_74]
mov [rbp+var_C4], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_6074B
mov eax, [rbp+var_C4]
add rsp, 0D0h
pop rbp
retn
loc_6074B:
call ___stack_chk_fail
| long long ma_net_real_write(_BYTE *a1, long long a2, long long a3)
{
int v3; // eax
long long v4; // rdi
unsigned int v6; // [rsp+10h] [rbp-C0h]
long long v7; // [rsp+18h] [rbp-B8h]
long long v8; // [rsp+20h] [rbp-B0h] BYREF
long long v9; // [rsp+28h] [rbp-A8h]
long long v10; // [rsp+30h] [rbp-A0h]
long long v11; // [rsp+38h] [rbp-98h]
long long v12; // [rsp+40h] [rbp-90h] BYREF
long long v13; // [rsp+48h] [rbp-88h]
_BYTE *v14; // [rsp+50h] [rbp-80h]
_BYTE v16[104]; // [rsp+60h] [rbp-70h] BYREF
unsigned long long v17; // [rsp+C8h] [rbp-8h]
v17 = __readfsqword(0x28u);
v14 = a1;
v13 = a2;
v12 = a3;
if ( a1[148] == 2 )
{
return (unsigned int)-1;
}
else
{
v14[128] = 2;
if ( v14[132] )
{
v7 = malloc(v12 + 8);
if ( !v7 )
{
(*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)v14 + 80LL))(
*(_QWORD *)(*(_QWORD *)v14 + 64LL),
2008LL,
SQLSTATE_UNKNOWN,
0LL);
v14[148] = 2;
v14[128] = 0;
return 1;
}
memcpy(v7 + 7, v13, v12);
if ( mariadb_compress((long long)v14, v7 + 7, &v12, &v8) )
v8 = 0LL;
*(_WORD *)(v7 + 4) = v8;
*(_BYTE *)(v7 + 6) = BYTE2(v8);
*(_WORD *)v7 = v12;
*(_BYTE *)(v7 + 2) = BYTE2(v12);
v3 = *((_DWORD *)v14 + 25);
*((_DWORD *)v14 + 25) = v3 + 1;
*(_BYTE *)(v7 + 3) = v3;
v12 += 7LL;
v13 = v7;
}
v10 = v13;
v9 = v12 + v13;
while ( v10 != v9 )
{
v4 = *(_QWORD *)v14;
v11 = ma_pvio_write(*(_QWORD **)v14, v10, v9 - v10);
if ( v11 <= 0 )
{
v6 = *(_DWORD *)__errno_location(v4);
v14[148] = 2;
__xpg_strerror_r(v6, v16, 100LL);
(*(void ( **)(_QWORD, long long, char *, _QWORD, _BYTE *, _QWORD))(*(_QWORD *)v14 + 80LL))(
*(_QWORD *)(*(_QWORD *)v14 + 64LL),
5014LL,
SQLSTATE_UNKNOWN,
0LL,
v16,
v6);
v14[128] = 0;
if ( v14[132] )
free(v13);
return 1;
}
v10 += v11;
}
if ( v14[132] )
free(v13);
v14[128] = 0;
return v10 != v9;
}
}
| ma_net_real_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x80],RDI
MOV qword ptr [RBP + -0x88],RSI
MOV qword ptr [RBP + -0x90],RDX
MOV RAX,qword ptr [RBP + -0x80]
MOVZX EAX,byte ptr [RAX + 0x94]
CMP EAX,0x2
JNZ 0x00160416
MOV dword ptr [RBP + -0x74],0xffffffff
JMP 0x00160721
LAB_00160416:
MOV RAX,qword ptr [RBP + -0x80]
MOV byte ptr [RAX + 0x80],0x2
MOV RAX,qword ptr [RBP + -0x80]
CMP byte ptr [RAX + 0x84],0x0
JZ 0x001605cc
MOV dword ptr [RBP + -0xbc],0x7
MOV RDI,qword ptr [RBP + -0x90]
ADD RDI,0x4
ADD RDI,0x3
ADD RDI,0x1
CALL 0x001145c0
MOV qword ptr [RBP + -0xb8],RAX
CMP RAX,0x0
JNZ 0x001604b1
MOV RAX,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RAX]
MOV R8,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x40]
LEA RAX,[0x180ea0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d8
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL R8
MOV RAX,qword ptr [RBP + -0x80]
MOV byte ptr [RAX + 0x94],0x2
MOV RAX,qword ptr [RBP + -0x80]
MOV byte ptr [RAX + 0x80],0x0
MOV dword ptr [RBP + -0x74],0x1
JMP 0x00160721
LAB_001604b1:
MOV RDI,qword ptr [RBP + -0xb8]
MOV EAX,dword ptr [RBP + -0xbc]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x88]
MOV RDX,qword ptr [RBP + -0x90]
CALL 0x00114370
MOV RDI,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RBP + -0xb8]
MOV EAX,dword ptr [RBP + -0xbc]
ADD RSI,RAX
LEA RDX,[RBP + -0x90]
LEA RCX,[RBP + -0xb0]
CALL 0x0013f910
CMP AL,0x0
JZ 0x0016050a
MOV qword ptr [RBP + -0xb0],0x0
LAB_0016050a:
JMP 0x0016050c
LAB_0016050c:
MOV RAX,qword ptr [RBP + -0xb0]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xb8]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0xb0]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xb8]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0xb0]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xb8]
MOV byte ptr [RAX + 0x6],CL
JMP 0x0016054f
LAB_0016054f:
MOV RAX,qword ptr [RBP + -0x90]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xb8]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x90]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xb8]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x90]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xb8]
MOV byte ptr [RAX + 0x2],CL
MOV RCX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RCX + 0x64]
MOV EDX,EAX
ADD EDX,0x1
MOV dword ptr [RCX + 0x64],EDX
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xb8]
MOV byte ptr [RAX + 0x3],CL
MOV EAX,dword ptr [RBP + -0xbc]
ADD RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV qword ptr [RBP + -0x88],RAX
LAB_001605cc:
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0xa0]
ADD RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0xa8],RAX
LAB_001605ef:
MOV RAX,qword ptr [RBP + -0xa0]
CMP RAX,qword ptr [RBP + -0xa8]
JZ 0x001606e4
MOV RAX,qword ptr [RBP + -0x80]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0xa0]
MOV RDX,qword ptr [RBP + -0xa8]
MOV RAX,qword ptr [RBP + -0xa0]
SUB RDX,RAX
CALL 0x0013e060
MOV qword ptr [RBP + -0x98],RAX
CMP RAX,0x0
JG 0x001606ca
CALL 0x00114050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0xc0],EAX
MOV RAX,qword ptr [RBP + -0x80]
MOV byte ptr [RAX + 0x94],0x2
MOV EDI,dword ptr [RBP + -0xc0]
LEA RSI,[RBP + -0x70]
MOV EDX,0x64
CALL 0x001141e0
MOV RAX,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RAX]
MOV R10,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x40]
LEA RAX,[0x180ea0]
MOV RDX,qword ptr [RAX]
LEA R8,[RBP + -0x70]
MOV R9D,dword ptr [RBP + -0xc0]
MOV ESI,0x1396
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL R10
MOV RAX,qword ptr [RBP + -0x80]
MOV byte ptr [RAX + 0x80],0x0
MOV RAX,qword ptr [RBP + -0x80]
CMP byte ptr [RAX + 0x84],0x0
JZ 0x001606c1
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00114530
LAB_001606c1:
MOV dword ptr [RBP + -0x74],0x1
JMP 0x00160721
LAB_001606ca:
MOV RAX,qword ptr [RBP + -0x98]
ADD RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001605ef
LAB_001606e4:
MOV RAX,qword ptr [RBP + -0x80]
CMP byte ptr [RAX + 0x84],0x0
JZ 0x001606fd
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00114530
LAB_001606fd:
MOV RAX,qword ptr [RBP + -0x80]
MOV byte ptr [RAX + 0x80],0x0
MOV RAX,qword ptr [RBP + -0xa0]
CMP RAX,qword ptr [RBP + -0xa8]
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x74],EAX
LAB_00160721:
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RBP + -0xc4],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0016074b
MOV EAX,dword ptr [RBP + -0xc4]
ADD RSP,0xd0
POP RBP
RET
LAB_0016074b:
CALL 0x001144c0
|
uint ma_net_real_write(long *param_1,int1 *param_2,size_t param_3)
{
int iVar1;
char cVar2;
int1 *puVar3;
int *piVar4;
long in_FS_OFFSET;
int8 local_b8;
int1 *local_b0;
int1 *local_a8;
long local_a0;
size_t local_98;
int1 *local_90;
long *local_88;
uint local_7c;
int1 local_78 [104];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_98 = param_3;
local_90 = param_2;
local_88 = param_1;
if (*(char *)((long)param_1 + 0x94) == '\x02') {
local_7c = 0xffffffff;
}
else {
*(int1 *)(param_1 + 0x10) = 2;
if (*(char *)((long)param_1 + 0x84) != '\0') {
puVar3 = (int1 *)malloc(param_3 + 8);
if (puVar3 == (int1 *)0x0) {
(**(code **)(*local_88 + 0x50))(*(int8 *)(*local_88 + 0x40),0x7d8,SQLSTATE_UNKNOWN,0);
*(int1 *)((long)local_88 + 0x94) = 2;
*(int1 *)(local_88 + 0x10) = 0;
local_7c = 1;
goto LAB_00160721;
}
memcpy(puVar3 + 7,local_90,local_98);
cVar2 = _mariadb_compress(local_88,puVar3 + 7,&local_98,&local_b8);
if (cVar2 != '\0') {
local_b8 = 0;
}
puVar3[4] = (char)local_b8;
puVar3[5] = (char)((ulong)local_b8 >> 8);
puVar3[6] = (char)((ulong)local_b8 >> 0x10);
*puVar3 = (char)local_98;
puVar3[1] = (char)(local_98 >> 8);
puVar3[2] = (char)(local_98 >> 0x10);
iVar1 = *(int *)((long)local_88 + 100);
*(int *)((long)local_88 + 100) = iVar1 + 1;
puVar3[3] = (char)iVar1;
local_98 = local_98 + 7;
local_90 = puVar3;
}
local_b0 = local_90 + local_98;
for (local_a8 = local_90; local_a8 != local_b0; local_a8 = local_a8 + local_a0) {
local_a0 = ma_pvio_write(*local_88,local_a8,(long)local_b0 - (long)local_a8);
if (local_a0 < 1) {
piVar4 = __errno_location();
iVar1 = *piVar4;
*(int1 *)((long)local_88 + 0x94) = 2;
__xpg_strerror_r(iVar1,local_78,100);
(**(code **)(*local_88 + 0x50))
(*(int8 *)(*local_88 + 0x40),0x1396,SQLSTATE_UNKNOWN,0,local_78,iVar1);
*(int1 *)(local_88 + 0x10) = 0;
if (*(char *)((long)local_88 + 0x84) != '\0') {
free(local_90);
}
local_7c = 1;
goto LAB_00160721;
}
}
if (*(char *)((long)local_88 + 0x84) != '\0') {
free(local_90);
}
*(int1 *)(local_88 + 0x10) = 0;
local_7c = (uint)(local_a8 != local_b0);
}
LAB_00160721:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_7c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
32,568 | ggml_backend_sched_free | monkey531[P]llama/ggml/src/ggml-backend.cpp | void ggml_backend_sched_free(ggml_backend_sched_t sched) {
if (sched == NULL) {
return;
}
for (int b = 0; b < sched->n_backends; b++) {
for (int c = 0; c < sched->n_copies; c++) {
ggml_backend_event_free(sched->events[b][c]);
}
}
ggml_gallocr_free(sched->galloc);
ggml_free(sched->ctx);
ggml_hash_set_free(&sched->hash_set);
free(sched->splits);
free(sched->hv_tensor_backend_ids);
free(sched->hv_tensor_copies);
free(sched->node_backend_ids);
free(sched->leaf_backend_ids);
free(sched->prev_node_backend_ids);
free(sched->prev_leaf_backend_ids);
free(sched->context_buffer);
free(sched->graph.nodes);
free(sched->graph.leafs);
free(sched);
} | O3 | cpp | ggml_backend_sched_free:
testq %rdi, %rdi
je 0x25daa
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %ecx
testl %ecx, %ecx
jle 0x25cfb
leaq 0x1c0(%rbx), %r14
movl 0x1b8(%rbx), %eax
xorl %r15d, %r15d
testl %eax, %eax
jle 0x25cec
xorl %r12d, %r12d
movq (%r14,%r12,8), %rsi
testq %rsi, %rsi
je 0x25cde
movq (%rsi), %rdi
callq *0x68(%rdi)
movl 0x1b8(%rbx), %eax
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x25cc9
movl 0x4(%rbx), %ecx
incq %r15
movslq %ecx, %rdx
addq $0x20, %r14
cmpq %rdx, %r15
jl 0x25cc2
movq 0x108(%rbx), %rdi
callq 0x17d50
movq 0x418(%rbx), %rdi
callq 0x16270
leaq 0x110(%rbx), %rdi
callq 0x16160
movq 0x1a8(%rbx), %rdi
callq 0x173b0
movq 0x128(%rbx), %rdi
callq 0x173b0
movq 0x130(%rbx), %rdi
callq 0x173b0
movq 0x138(%rbx), %rdi
callq 0x173b0
movq 0x140(%rbx), %rdi
callq 0x173b0
movq 0x148(%rbx), %rdi
callq 0x173b0
movq 0x150(%rbx), %rdi
callq 0x173b0
movq 0x430(%rbx), %rdi
callq 0x173b0
movq 0x168(%rbx), %rdi
callq 0x173b0
movq 0x180(%rbx), %rdi
callq 0x173b0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x173b0
retq
| ggml_backend_sched_free:
test rdi, rdi
jz locret_25DAA
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov ecx, [rdi+4]
test ecx, ecx
jle short loc_25CFB
lea r14, [rbx+1C0h]
mov eax, [rbx+1B8h]
xor r15d, r15d
loc_25CC2:
test eax, eax
jle short loc_25CEC
xor r12d, r12d
loc_25CC9:
mov rsi, [r14+r12*8]
test rsi, rsi
jz short loc_25CDE
mov rdi, [rsi]
call qword ptr [rdi+68h]
mov eax, [rbx+1B8h]
loc_25CDE:
inc r12
movsxd rcx, eax
cmp r12, rcx
jl short loc_25CC9
mov ecx, [rbx+4]
loc_25CEC:
inc r15
movsxd rdx, ecx
add r14, 20h ; ' '
cmp r15, rdx
jl short loc_25CC2
loc_25CFB:
mov rdi, [rbx+108h]
call _ggml_gallocr_free
mov rdi, [rbx+418h]
call _ggml_free
lea rdi, [rbx+110h]
call _ggml_hash_set_free
mov rdi, [rbx+1A8h]
call _free
mov rdi, [rbx+128h]
call _free
mov rdi, [rbx+130h]
call _free
mov rdi, [rbx+138h]
call _free
mov rdi, [rbx+140h]
call _free
mov rdi, [rbx+148h]
call _free
mov rdi, [rbx+150h]
call _free
mov rdi, [rbx+430h]
call _free
mov rdi, [rbx+168h]
call _free
mov rdi, [rbx+180h]
call _free
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _free
locret_25DAA:
retn
| long long ggml_backend_sched_free(long long a1)
{
long long result; // rax
int v2; // ecx
long long v3; // r14
int v4; // eax
long long i; // r15
long long j; // r12
_QWORD *v7; // rsi
if ( a1 )
{
v2 = *(_DWORD *)(a1 + 4);
if ( v2 > 0 )
{
v3 = a1 + 448;
v4 = *(_DWORD *)(a1 + 440);
for ( i = 0LL; i < v2; ++i )
{
if ( v4 > 0 )
{
for ( j = 0LL; j < v4; ++j )
{
v7 = *(_QWORD **)(v3 + 8 * j);
if ( v7 )
{
(*(void ( **)(_QWORD))(*v7 + 104LL))(*v7);
v4 = *(_DWORD *)(a1 + 440);
}
}
v2 = *(_DWORD *)(a1 + 4);
}
v3 += 32LL;
}
}
ggml_gallocr_free(*(_QWORD *)(a1 + 264));
ggml_free(*(_QWORD *)(a1 + 1048));
ggml_hash_set_free(a1 + 272);
free(*(_QWORD *)(a1 + 424));
free(*(_QWORD *)(a1 + 296));
free(*(_QWORD *)(a1 + 304));
free(*(_QWORD *)(a1 + 312));
free(*(_QWORD *)(a1 + 320));
free(*(_QWORD *)(a1 + 328));
free(*(_QWORD *)(a1 + 336));
free(*(_QWORD *)(a1 + 1072));
free(*(_QWORD *)(a1 + 360));
free(*(_QWORD *)(a1 + 384));
return free(a1);
}
return result;
}
| ggml_backend_sched_free:
TEST RDI,RDI
JZ 0x00125daa
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV ECX,dword ptr [RDI + 0x4]
TEST ECX,ECX
JLE 0x00125cfb
LEA R14,[RBX + 0x1c0]
MOV EAX,dword ptr [RBX + 0x1b8]
XOR R15D,R15D
LAB_00125cc2:
TEST EAX,EAX
JLE 0x00125cec
XOR R12D,R12D
LAB_00125cc9:
MOV RSI,qword ptr [R14 + R12*0x8]
TEST RSI,RSI
JZ 0x00125cde
MOV RDI,qword ptr [RSI]
CALL qword ptr [RDI + 0x68]
MOV EAX,dword ptr [RBX + 0x1b8]
LAB_00125cde:
INC R12
MOVSXD RCX,EAX
CMP R12,RCX
JL 0x00125cc9
MOV ECX,dword ptr [RBX + 0x4]
LAB_00125cec:
INC R15
MOVSXD RDX,ECX
ADD R14,0x20
CMP R15,RDX
JL 0x00125cc2
LAB_00125cfb:
MOV RDI,qword ptr [RBX + 0x108]
CALL 0x00117d50
MOV RDI,qword ptr [RBX + 0x418]
CALL 0x00116270
LEA RDI,[RBX + 0x110]
CALL 0x00116160
MOV RDI,qword ptr [RBX + 0x1a8]
CALL 0x001173b0
MOV RDI,qword ptr [RBX + 0x128]
CALL 0x001173b0
MOV RDI,qword ptr [RBX + 0x130]
CALL 0x001173b0
MOV RDI,qword ptr [RBX + 0x138]
CALL 0x001173b0
MOV RDI,qword ptr [RBX + 0x140]
CALL 0x001173b0
MOV RDI,qword ptr [RBX + 0x148]
CALL 0x001173b0
MOV RDI,qword ptr [RBX + 0x150]
CALL 0x001173b0
MOV RDI,qword ptr [RBX + 0x430]
CALL 0x001173b0
MOV RDI,qword ptr [RBX + 0x168]
CALL 0x001173b0
MOV RDI,qword ptr [RBX + 0x180]
CALL 0x001173b0
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x001173b0
LAB_00125daa:
RET
|
void ggml_backend_sched_free(void *param_1)
{
long *plVar1;
int iVar2;
int iVar3;
long lVar4;
long lVar5;
long lVar6;
if (param_1 != (void *)0x0) {
iVar3 = *(int *)((long)param_1 + 4);
if (0 < iVar3) {
lVar5 = (long)param_1 + 0x1c0;
iVar2 = *(int *)((long)param_1 + 0x1b8);
lVar6 = 0;
do {
if (0 < iVar2) {
lVar4 = 0;
do {
plVar1 = *(long **)(lVar5 + lVar4 * 8);
if (plVar1 != (long *)0x0) {
(**(code **)(*plVar1 + 0x68))();
iVar2 = *(int *)((long)param_1 + 0x1b8);
}
lVar4 = lVar4 + 1;
} while (lVar4 < iVar2);
iVar3 = *(int *)((long)param_1 + 4);
}
lVar6 = lVar6 + 1;
lVar5 = lVar5 + 0x20;
} while (lVar6 < iVar3);
}
ggml_gallocr_free(*(int8 *)((long)param_1 + 0x108));
ggml_free(*(int8 *)((long)param_1 + 0x418));
ggml_hash_set_free((long)param_1 + 0x110);
free(*(void **)((long)param_1 + 0x1a8));
free(*(void **)((long)param_1 + 0x128));
free(*(void **)((long)param_1 + 0x130));
free(*(void **)((long)param_1 + 0x138));
free(*(void **)((long)param_1 + 0x140));
free(*(void **)((long)param_1 + 0x148));
free(*(void **)((long)param_1 + 0x150));
free(*(void **)((long)param_1 + 0x430));
free(*(void **)((long)param_1 + 0x168));
free(*(void **)((long)param_1 + 0x180));
free(param_1);
return;
}
return;
}
| |
32,569 | BAIL_OUT | eloqsql/unittest/mytap/tap.c | void
BAIL_OUT(char const *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(tapout, "Bail out! ");
vfprintf(tapout, fmt, ap);
diag("%d tests planned, %d failed, %d was last executed",
g_test.plan, g_test.failed, g_test.last);
emit_endl();
va_end(ap);
exit(255);
} | O3 | c | BAIL_OUT:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq -0xe0(%rbp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x1423
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq -0x30(%rbp), %r14
movq %rdi, 0x10(%r14)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax # imm = 0x3000000008
movq %rax, (%r14)
movq 0x8b89(%rip), %r15 # 0x9fd0
movq (%r15), %rdi
leaq 0x6cc1(%rip), %rdx # 0x8112
movl $0x1, %esi
xorl %eax, %eax
callq 0x1140
movq (%r15), %rdi
movl $0x1, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1050
movl 0x10772(%rip), %esi # 0x11be8
movl 0x10774(%rip), %edx # 0x11bf0
movl 0x1076a(%rip), %ecx # 0x11bec
leaq 0x6c94(%rip), %rdi # 0x811d
xorl %eax, %eax
callq 0x149f
callq 0x1e99
movl $0xff, %edi
callq 0x10d0
| BAIL_OUT:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 0C8h
mov rbx, rdi
lea rdi, [rbp+var_E0]
mov [rdi+8], rsi
mov [rdi+10h], rdx
mov [rdi+18h], rcx
mov [rdi+20h], r8
mov [rdi+28h], r9
test al, al
jz short loc_1423
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_1423:
lea r14, [rbp+var_30]
mov [r14+10h], rdi
lea rax, [rbp+arg_0]
mov [r14+8], rax
mov rax, 3000000008h
mov [r14], rax
mov r15, cs:stdout_ptr
mov rdi, [r15]
lea rdx, aBailOut; "Bail out! "
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [r15]
mov esi, 1
mov rdx, rbx
mov rcx, r14
call ___vfprintf_chk
mov esi, cs:g_test
mov edx, cs:dword_11BF0
mov ecx, cs:dword_11BEC
lea rdi, aDTestsPlannedD; "%d tests planned, %d failed, %d was l"...
xor eax, eax
call diag
call emit_endl
mov edi, 0FFh
call _exit
| void __noreturn BAIL_OUT(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
int v15; // r8d
int v16; // r9d
char v17; // [rsp+0h] [rbp-E0h] BYREF
long long v18; // [rsp+8h] [rbp-D8h]
long long v19; // [rsp+10h] [rbp-D0h]
long long v20; // [rsp+18h] [rbp-C8h]
long long v21; // [rsp+20h] [rbp-C0h]
long long v22; // [rsp+28h] [rbp-B8h]
__m128 v23; // [rsp+30h] [rbp-B0h]
__m128 v24; // [rsp+40h] [rbp-A0h]
__m128 v25; // [rsp+50h] [rbp-90h]
__m128 v26; // [rsp+60h] [rbp-80h]
__m128 v27; // [rsp+70h] [rbp-70h]
__m128 v28; // [rsp+80h] [rbp-60h]
__m128 v29; // [rsp+90h] [rbp-50h]
__m128 v30; // [rsp+A0h] [rbp-40h]
_QWORD v31[6]; // [rsp+B0h] [rbp-30h] BYREF
v23 = a7;
v24 = a8;
v25 = a9;
v26 = a10;
v27 = a11;
v28 = a12;
v29 = a13;
v30 = a14;
v18 = a2;
v19 = a3;
v20 = a4;
v21 = a5;
v22 = a6;
v31[2] = &v17;
v31[1] = &a15;
v31[0] = 0x3000000008LL;
__fprintf_chk(stdout, 1LL, "Bail out! ");
__vfprintf_chk(stdout, 1LL, a1, v31);
diag(
(unsigned int)"%d tests planned, %d failed, %d was last executed",
g_test,
dword_11BF0,
dword_11BEC,
v15,
v16,
v17);
emit_endl();
exit(255LL);
}
| BAIL_OUT:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xc8
MOV RBX,RDI
LEA RDI,[RBP + -0xe0]
MOV qword ptr [RDI + 0x8],RSI
MOV qword ptr [RDI + 0x10],RDX
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],R8
MOV qword ptr [RDI + 0x28],R9
TEST AL,AL
JZ 0x00101423
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_00101423:
LEA R14,[RBP + -0x30]
MOV qword ptr [R14 + 0x10],RDI
LEA RAX,[RBP + 0x10]
MOV qword ptr [R14 + 0x8],RAX
MOV RAX,0x3000000008
MOV qword ptr [R14],RAX
MOV R15,qword ptr [0x00109fd0]
MOV RDI,qword ptr [R15]
LEA RDX,[0x108112]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00101140
MOV RDI,qword ptr [R15]
MOV ESI,0x1
MOV RDX,RBX
MOV RCX,R14
CALL 0x00101050
MOV ESI,dword ptr [0x00111be8]
MOV EDX,dword ptr [0x00111bf0]
MOV ECX,dword ptr [0x00111bec]
LEA RDI,[0x10811d]
XOR EAX,EAX
CALL 0x0010149f
CALL 0x00101e99
MOV EDI,0xff
CALL 0x001010d0
|
void BAIL_OUT(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
int *puVar1;
char in_AL;
int1 local_e8 [8];
int8 local_e0;
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int1 *local_30;
int1 *local_28;
puVar1 = PTR_stdout_00109fd0;
local_28 = local_e8;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_30 = &stack0x00000008;
local_38 = 0x3000000008;
local_e0 = param_10;
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
__fprintf_chk(*(int8 *)PTR_stdout_00109fd0,1,"Bail out! ");
__vfprintf_chk(*(int8 *)puVar1,1,param_9,&local_38);
diag("%d tests planned, %d failed, %d was last executed",g_test,DAT_00111bf0,DAT_00111bec);
emit_endl();
/* WARNING: Subroutine does not return */
exit(0xff);
}
| |
32,570 | my_uni_utf16 | eloqsql/strings/ctype-ucs2.c | int
my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (wc <= 0xFFFF)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (MY_UTF16_SURROGATE(wc))
return MY_CS_ILUNI;
*s++= (uchar) (wc >> 8);
*s= (uchar) (wc & 0xFF);
return 2;
}
if (wc <= 0x10FFFF)
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
*s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8;
*s++= (uchar) (wc >> 10) & 0xFF;
*s++= (uchar) ((wc >> 8) & 3) | 0xDC;
*s= (uchar) wc & 0xFF;
return 4;
}
return MY_CS_ILUNI;
} | O0 | c | my_uni_utf16:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
ja 0x58d5f
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x58d08
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x58e22
movq -0x18(%rbp), %rax
andq $0xf800, %rax # imm = 0xF800
cmpq $0xd800, %rax # imm = 0xD800
jne 0x58d26
movl $0x0, -0x4(%rbp)
jmp 0x58e22
movq -0x18(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x58e22
cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF
ja 0x58e1b
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x28(%rbp), %rax
jbe 0x58d87
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0x58e22
movq -0x18(%rbp), %rax
subq $0x10000, %rax # imm = 0x10000
movq %rax, -0x18(%rbp)
shrq $0x12, %rax
movzbl %al, %eax
orl $0xd8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
shrq $0xa, %rax
movzbl %al, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
shrq $0x8, %rax
andq $0x3, %rax
movzbl %al, %eax
orl $0xdc, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movzbl %al, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x58e22
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| my_uni_utf16:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
cmp [rbp+var_18], 0FFFFh
ja short loc_58D5F
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_58D08
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_58E22
loc_58D08:
mov rax, [rbp+var_18]
and rax, 0F800h
cmp rax, 0D800h
jnz short loc_58D26
mov [rbp+var_4], 0
jmp loc_58E22
loc_58D26:
mov rax, [rbp+var_18]
shr rax, 8
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
and rax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 2
jmp loc_58E22
loc_58D5F:
cmp [rbp+var_18], offset unk_10FFFF
ja loc_58E1B
mov rax, [rbp+var_20]
add rax, 4
cmp rax, [rbp+var_28]
jbe short loc_58D87
mov [rbp+var_4], 0FFFFFF98h
jmp loc_58E22
loc_58D87:
mov rax, [rbp+var_18]
sub rax, offset stru_10000
mov [rbp+var_18], rax
shr rax, 12h
movzx eax, al
or eax, 0D8h
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
shr rax, 0Ah
movzx eax, al
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
shr rax, 8
and rax, 3
movzx eax, al
or eax, 0DCh
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
movzx eax, al
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 4
jmp short loc_58E22
loc_58E1B:
mov [rbp+var_4], 0
loc_58E22:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
if ( a2 > 0xFFFF )
{
if ( a2 > (unsigned long long)&unk_10FFFF )
{
return 0;
}
else if ( (unsigned long long)(a3 + 4) <= a4 )
{
*a3 = ((a2 - (unsigned long long)&stru_10000) >> 18) | 0xD8;
a3[1] = (a2 - (unsigned long long)&stru_10000) >> 10;
a3[2] = ((unsigned __int16)(a2 - (_QWORD)&stru_10000) >> 8) & 3 | 0xDC;
a3[3] = a2 - (_QWORD)&stru_10000;
return 4;
}
else
{
return (unsigned int)-104;
}
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( (a2 & 0xF800) == 0xD800 )
{
return 0;
}
else
{
*a3 = BYTE1(a2);
a3[1] = a2;
return 2;
}
}
else
{
return (unsigned int)-102;
}
}
| my_uni_utf16:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
CMP qword ptr [RBP + -0x18],0xffff
JA 0x00158d5f
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00158d08
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00158e22
LAB_00158d08:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0xf800
CMP RAX,0xd800
JNZ 0x00158d26
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00158e22
LAB_00158d26:
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00158e22
LAB_00158d5f:
CMP qword ptr [RBP + -0x18],0x10ffff
JA 0x00158e1b
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00158d87
MOV dword ptr [RBP + -0x4],0xffffff98
JMP 0x00158e22
LAB_00158d87:
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x10000
MOV qword ptr [RBP + -0x18],RAX
SHR RAX,0x12
MOVZX EAX,AL
OR EAX,0xd8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0xa
MOVZX EAX,AL
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x8
AND RAX,0x3
MOVZX EAX,AL
OR EAX,0xdc
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,AL
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x4
JMP 0x00158e22
LAB_00158e1b:
MOV dword ptr [RBP + -0x4],0x0
LAB_00158e22:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
int4 local_c;
if (param_2 < 0x10000) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if ((param_2 & 0xf800) == 0xd800) {
local_c = 0;
}
else {
*param_3 = (byte)(param_2 >> 8);
param_3[1] = (byte)param_2;
local_c = 2;
}
}
else if (param_2 < 0x110000) {
if (param_4 < param_3 + 4) {
local_c = 0xffffff98;
}
else {
param_2 = param_2 - 0x10000;
*param_3 = (byte)(param_2 >> 0x12) | 0xd8;
param_3[1] = (byte)(param_2 >> 10);
param_3[2] = (byte)(param_2 >> 8) & 3 | 0xdc;
param_3[3] = (byte)param_2;
local_c = 4;
}
}
else {
local_c = 0;
}
return local_c;
}
| |
32,571 | ImPlot3D::SetupBoxRotation(ImPlot3DQuat, bool, int) | zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp | void SetupBoxRotation(ImPlot3DQuat rotation, bool animate, ImPlot3DCond cond) {
ImPlot3DContext& gp = *GImPlot3D;
IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
"SetupBoxRotation() needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!");
ImPlot3DPlot& plot = *gp.CurrentPlot;
if (!plot.Initialized || cond == ImPlot3DCond_Always) {
if (!animate) {
plot.Rotation = rotation;
plot.AnimationTime = 0.0f; // Force any running rotation animation to stop
} else {
plot.RotationAnimationEnd = rotation;
plot.AnimationTime = CalcAnimationTime(plot.Rotation, plot.RotationAnimationEnd);
}
plot.RotationCond = cond;
}
} | O1 | cpp | ImPlot3D::SetupBoxRotation(ImPlot3DQuat, bool, int):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebx
movl %edi, %ebp
movq 0x2e583e(%rip), %r14 # 0x336c98
movq 0x28(%r14), %rax
testq %rax, %rax
je 0x5146c
cmpb $0x1, 0x1e8(%rax)
jne 0x5148a
leaq 0x243b32(%rip), %rdi # 0x294fa5
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
callq 0x2161f4
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movq 0x28(%r14), %r14
cmpl $0x1, %ebx
je 0x5149e
cmpb $0x0, 0x21(%r14)
jne 0x51528
testb %bpl, %bpl
je 0x51510
movaps %xmm0, %xmm2
movlhps %xmm1, %xmm2 # xmm2 = xmm2[0],xmm1[0]
movups %xmm2, 0x1d8(%r14)
movsd 0x64(%r14), %xmm4
movsd 0x6c(%r14), %xmm3
movaps %xmm0, %xmm2
mulps %xmm4, %xmm2
shufps $0x55, %xmm2, %xmm2 # xmm2 = xmm2[1,1,1,1]
mulss %xmm4, %xmm0
addss %xmm2, %xmm0
movaps %xmm3, %xmm2
mulss %xmm1, %xmm2
addss %xmm0, %xmm2
shufps $0x55, %xmm3, %xmm3 # xmm3 = xmm3[1,1,1,1]
shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1]
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
andps 0x242f3f(%rip), %xmm1 # 0x294430
movss 0x23db0f(%rip), %xmm0 # 0x28f008
minss %xmm1, %xmm0
callq 0xfad0
addss %xmm0, %xmm0
divss 0x242ec6(%rip), %xmm0 # 0x2943d4
jmp 0x5151b
movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, 0x64(%r14)
xorps %xmm0, %xmm0
movss %xmm0, 0x1d4(%r14)
movl %ebx, 0x74(%r14)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZN8ImPlot3D16SetupBoxRotationE12ImPlot3DQuatbi:
push rbp
push r14
push rbx
sub rsp, 20h
mov ebx, esi
mov ebp, edi
mov r14, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
mov rax, [r14+28h]
test rax, rax
jz short loc_5146C
cmp byte ptr [rax+1E8h], 1
jnz short loc_5148A
loc_5146C:
lea rdi, aSetupboxrotati; "SetupBoxRotation() needs to be called a"...
movaps [rsp+38h+var_28], xmm1
movaps [rsp+38h+var_38], xmm0
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
movaps xmm0, [rsp+38h+var_38]
movaps xmm1, [rsp+38h+var_28]
loc_5148A:
mov r14, [r14+28h]
cmp ebx, 1
jz short loc_5149E
cmp byte ptr [r14+21h], 0
jnz loc_51528
loc_5149E:
test bpl, bpl
jz short loc_51510
movaps xmm2, xmm0
movlhps xmm2, xmm1
movups xmmword ptr [r14+1D8h], xmm2
movsd xmm4, qword ptr [r14+64h]
movsd xmm3, qword ptr [r14+6Ch]
movaps xmm2, xmm0
mulps xmm2, xmm4
shufps xmm2, xmm2, 55h ; 'U'
mulss xmm0, xmm4
addss xmm0, xmm2
movaps xmm2, xmm3
mulss xmm2, xmm1
addss xmm2, xmm0
shufps xmm3, xmm3, 55h ; 'U'
shufps xmm1, xmm1, 55h ; 'U'
mulss xmm1, xmm3
addss xmm1, xmm2
andps xmm1, cs:xmmword_294430
movss xmm0, cs:flt_28F008
minss xmm0, xmm1
call _acosf
addss xmm0, xmm0
divss xmm0, cs:dword_2943D4
jmp short loc_5151B
loc_51510:
movlhps xmm0, xmm1
movups xmmword ptr [r14+64h], xmm0
xorps xmm0, xmm0
loc_5151B:
movss dword ptr [r14+1D4h], xmm0
mov [r14+74h], ebx
loc_51528:
add rsp, 20h
pop rbx
pop r14
pop rbp
retn
| void ImPlot3D::SetupBoxRotation(char a1, const char *a2, __m128 a3, __m128 a4)
{
ImGui *v4; // r14
long long v5; // rax
long long v6; // r14
__m128 v7; // xmm4
__m128 v8; // xmm2
float v9; // xmm0_4
float v10; // xmm0_4
v4 = ImPlot3D::GImPlot3D;
v5 = *((_QWORD *)ImPlot3D::GImPlot3D + 5);
if ( !v5 || *(_BYTE *)(v5 + 488) == 1 )
ImGui::ErrorLog(
(ImGui *)"SetupBoxRotation() needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!",
a2);
v6 = *((_QWORD *)v4 + 5);
if ( (_DWORD)a2 == 1 || !*(_BYTE *)(v6 + 33) )
{
if ( a1 )
{
*(__m128 *)(v6 + 472) = _mm_movelh_ps(a3, a4);
v7 = (__m128)*(unsigned long long *)(v6 + 100);
v8 = _mm_mul_ps(a3, v7);
v9 = acosf(
fminf(
1.0,
fabs(
(float)(_mm_shuffle_ps(a4, a4, 85).m128_f32[0]
* _mm_shuffle_ps(
(__m128)*(unsigned long long *)(v6 + 108),
(__m128)*(unsigned long long *)(v6 + 108),
85).m128_f32[0])
+ (float)((float)(COERCE_FLOAT(*(_QWORD *)(v6 + 108)) * a4.m128_f32[0])
+ (float)((float)(a3.m128_f32[0] * v7.m128_f32[0]) + _mm_shuffle_ps(v8, v8, 85).m128_f32[0])))));
v10 = (float)(v9 + v9) / 6.283;
}
else
{
*(__m128 *)(v6 + 100) = _mm_movelh_ps(a3, a4);
v10 = 0.0;
}
*(float *)(v6 + 468) = v10;
*(_DWORD *)(v6 + 116) = (_DWORD)a2;
}
}
| SetupBoxRotation:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV EBX,ESI
MOV EBP,EDI
MOV R14,qword ptr [0x00436c98]
MOV RAX,qword ptr [R14 + 0x28]
TEST RAX,RAX
JZ 0x0015146c
CMP byte ptr [RAX + 0x1e8],0x1
JNZ 0x0015148a
LAB_0015146c:
LEA RDI,[0x394fa5]
MOVAPS xmmword ptr [RSP + 0x10],XMM1
MOVAPS xmmword ptr [RSP],XMM0
CALL 0x003161f4
MOVAPS XMM0,xmmword ptr [RSP]
MOVAPS XMM1,xmmword ptr [RSP + 0x10]
LAB_0015148a:
MOV R14,qword ptr [R14 + 0x28]
CMP EBX,0x1
JZ 0x0015149e
CMP byte ptr [R14 + 0x21],0x0
JNZ 0x00151528
LAB_0015149e:
TEST BPL,BPL
JZ 0x00151510
MOVAPS XMM2,XMM0
MOVLHPS XMM2,XMM1
MOVUPS xmmword ptr [R14 + 0x1d8],XMM2
MOVSD XMM4,qword ptr [R14 + 0x64]
MOVSD XMM3,qword ptr [R14 + 0x6c]
MOVAPS XMM2,XMM0
MULPS XMM2,XMM4
SHUFPS XMM2,XMM2,0x55
MULSS XMM0,XMM4
ADDSS XMM0,XMM2
MOVAPS XMM2,XMM3
MULSS XMM2,XMM1
ADDSS XMM2,XMM0
SHUFPS XMM3,XMM3,0x55
SHUFPS XMM1,XMM1,0x55
MULSS XMM1,XMM3
ADDSS XMM1,XMM2
ANDPS XMM1,xmmword ptr [0x00394430]
MOVSS XMM0,dword ptr [0x0038f008]
MINSS XMM0,XMM1
CALL 0x0010fad0
ADDSS XMM0,XMM0
DIVSS XMM0,dword ptr [0x003943d4]
JMP 0x0015151b
LAB_00151510:
MOVLHPS XMM0,XMM1
MOVUPS xmmword ptr [R14 + 0x64],XMM0
XORPS XMM0,XMM0
LAB_0015151b:
MOVSS dword ptr [R14 + 0x1d4],XMM0
MOV dword ptr [R14 + 0x74],EBX
LAB_00151528:
ADD RSP,0x20
POP RBX
POP R14
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* ImPlot3D::SetupBoxRotation(ImPlot3DQuat, bool, int) */
void __thiscall
ImPlot3D::SetupBoxRotation(int8 param_1,int8 param_2,char param_3,int param_4)
{
long lVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
lVar1 = GImPlot3D;
fVar5 = (float)((ulong)param_2 >> 0x20);
fVar3 = (float)param_2;
fVar4 = (float)((ulong)param_1 >> 0x20);
fVar2 = (float)param_1;
if ((*(long *)(GImPlot3D + 0x28) == 0) ||
(*(char *)(*(long *)(GImPlot3D + 0x28) + 0x1e8) == '\x01')) {
ImGui::ErrorLog(
"SetupBoxRotation() needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!"
);
}
lVar1 = *(long *)(lVar1 + 0x28);
if ((param_4 == 1) || (*(char *)(lVar1 + 0x21) == '\0')) {
if (param_3 == '\0') {
*(float *)(lVar1 + 100) = fVar2;
*(float *)(lVar1 + 0x68) = fVar4;
*(float *)(lVar1 + 0x6c) = fVar3;
*(float *)(lVar1 + 0x70) = fVar5;
fVar2 = 0.0;
}
else {
*(float *)(lVar1 + 0x1d8) = fVar2;
*(float *)(lVar1 + 0x1dc) = fVar4;
*(float *)(lVar1 + 0x1e0) = fVar3;
*(float *)(lVar1 + 0x1e4) = fVar5;
fVar4 = (float)((uint)(fVar5 * (float)((ulong)*(int8 *)(lVar1 + 0x6c) >> 0x20) +
(float)*(int8 *)(lVar1 + 0x6c) * fVar3 +
fVar2 * (float)*(int8 *)(lVar1 + 100) +
fVar4 * (float)((ulong)*(int8 *)(lVar1 + 100) >> 0x20)) &
_DAT_00394430);
fVar2 = DAT_0038f008;
if (fVar4 <= DAT_0038f008) {
fVar2 = fVar4;
}
fVar2 = acosf(fVar2);
fVar2 = (fVar2 + fVar2) / _DAT_003943d4;
}
*(float *)(lVar1 + 0x1d4) = fVar2;
*(int *)(lVar1 + 0x74) = param_4;
}
return;
}
| |
32,572 | LefDefParser::lefiLayer::addMinimumcut(int, double) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp | void
lefiLayer::addMinimumcut(int mincut,
double width)
{
if (numMinimumcut_ == minimumcutAllocated_) {
int *nc;
double *nw;
int *hcd;
double *ncd;
int *hm;
char **nud;
int *hc;
double *nl;
double *nd;
int i, lim;
if (minimumcutAllocated_ == 0) {
lim = minimumcutAllocated_ = 2;
nc = (int*) lefMalloc(sizeof(int) * lim);
nw = (double*) lefMalloc(sizeof(double) * lim);
hcd = (int*) lefMalloc(sizeof(int) * lim);
ncd = (double*) lefMalloc(sizeof(double) * lim);
hm = (int*) lefMalloc(sizeof(int) * lim);
nud = (char**) lefMalloc(sizeof(char*) * lim);
hc = (int*) lefMalloc(sizeof(int) * lim);
nl = (double*) lefMalloc(sizeof(double) * lim);
nd = (double*) lefMalloc(sizeof(double) * lim);
} else {
lim = minimumcutAllocated_ * 2;
minimumcutAllocated_ = lim;
nc = (int*) lefMalloc(sizeof(int) * lim);
nw = (double*) lefMalloc(sizeof(double) * lim);
hcd = (int*) lefMalloc(sizeof(int) * lim);
ncd = (double*) lefMalloc(sizeof(double) * lim);
hm = (int*) lefMalloc(sizeof(int) * lim);
nud = (char**) lefMalloc(sizeof(char*) * lim);
hc = (int*) lefMalloc(sizeof(int) * lim);
nl = (double*) lefMalloc(sizeof(double) * lim);
nd = (double*) lefMalloc(sizeof(double) * lim);
lim /= 2;
for (i = 0; i < lim; i++) {
nc[i] = minimumcut_[i];
nw[i] = minimumcutWidth_[i];
hcd[i] = hasMinimumcutWithin_[i];
ncd[i] = minimumcutWithin_[i];
hm[i] = hasMinimumcutConnection_[i];
nud[i] = minimumcutConnection_[i];
hc[i] = hasMinimumcutNumCuts_[i];
nl[i] = minimumcutLength_[i];
nd[i] = minimumcutDistance_[i];
}
lefFree((char*) (minimumcut_));
lefFree((char*) (minimumcutWidth_));
lefFree((char*) (hasMinimumcutWithin_));
lefFree((char*) (minimumcutWithin_));
lefFree((char*) (hasMinimumcutConnection_));
lefFree((char*) (minimumcutConnection_));
lefFree((char*) (hasMinimumcutNumCuts_));
lefFree((char*) (minimumcutLength_));
lefFree((char*) (minimumcutDistance_));
}
minimumcut_ = nc;
minimumcutWidth_ = nw;
hasMinimumcutWithin_ = hcd;
minimumcutWithin_ = ncd;
hasMinimumcutConnection_ = hm;
minimumcutConnection_ = nud;
hasMinimumcutNumCuts_ = hc;
minimumcutLength_ = nl;
minimumcutDistance_ = nd;
}
minimumcut_[numMinimumcut_] = mincut;
minimumcutWidth_[numMinimumcut_] = width;
hasMinimumcutWithin_[numMinimumcut_] = 0;
minimumcutWithin_[numMinimumcut_] = 0;
hasMinimumcutConnection_[numMinimumcut_] = 0;
minimumcutConnection_[numMinimumcut_] = 0;
hasMinimumcutNumCuts_[numMinimumcut_] = 0;
minimumcutLength_[numMinimumcut_] = 0;
minimumcutDistance_[numMinimumcut_] = 0;
numMinimumcut_ += 1;
} | O3 | cpp | LefDefParser::lefiLayer::addMinimumcut(int, double):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl 0x1e8(%rdi), %ebp
cmpl 0x1ec(%rdi), %ebp
jne 0x187b5
movl %esi, 0x24(%rsp)
movsd %xmm0, 0x30(%rsp)
testl %ebp, %ebp
je 0x187e4
movslq %ebp, %r13
leal (,%rbp,2), %eax
movl %eax, 0x1ec(%rbx)
leaq (,%r13,8), %r15
movq %r15, %rdi
callq 0x24985
movq %rax, 0x28(%rsp)
shlq $0x4, %r13
movq %r13, %rdi
callq 0x24985
movq %rax, 0x18(%rsp)
movq %r15, %rdi
callq 0x24985
movq %rax, 0x10(%rsp)
movq %r13, %rdi
callq 0x24985
movq %rax, 0x8(%rsp)
movq %r15, %rdi
callq 0x24985
movq %rax, (%rsp)
movq %r13, %rdi
callq 0x24985
movq %rax, %r14
movq %r15, %rdi
callq 0x24985
movq %rax, %r15
movq %r13, %rdi
callq 0x24985
movq %rax, %r12
movq %r13, %rdi
callq 0x24985
movq (%rsp), %r9
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rax, %r13
testl %ebp, %ebp
jle 0x18741
shlq $0x2, %rbp
xorl %eax, %eax
movq 0x1f0(%rbx), %rcx
movl (%rcx,%rax), %ecx
movl %ecx, (%rdx,%rax)
movq 0x1f8(%rbx), %rcx
movsd (%rcx,%rax,2), %xmm0
movsd %xmm0, (%rsi,%rax,2)
movq 0x200(%rbx), %rcx
movl (%rcx,%rax), %ecx
movl %ecx, (%rdi,%rax)
movq 0x208(%rbx), %rcx
movsd (%rcx,%rax,2), %xmm0
movsd %xmm0, (%r8,%rax,2)
movq 0x210(%rbx), %rcx
movl (%rcx,%rax), %ecx
movl %ecx, (%r9,%rax)
movq 0x218(%rbx), %rcx
movq (%rcx,%rax,2), %rcx
movq %rcx, (%r14,%rax,2)
movq 0x220(%rbx), %rcx
movl (%rcx,%rax), %ecx
movl %ecx, (%r15,%rax)
movq 0x228(%rbx), %rcx
movsd (%rcx,%rax,2), %xmm0
movsd %xmm0, (%r12,%rax,2)
movq 0x230(%rbx), %rcx
movsd (%rcx,%rax,2), %xmm0
movsd %xmm0, (%r13,%rax,2)
addq $0x4, %rax
cmpq %rax, %rbp
jne 0x186a7
movq 0x1f0(%rbx), %rdi
movq %rdx, %rbp
callq 0x26040
movq 0x1f8(%rbx), %rdi
callq 0x26040
movq 0x200(%rbx), %rdi
callq 0x26040
movq 0x208(%rbx), %rdi
callq 0x26040
movq 0x210(%rbx), %rdi
callq 0x26040
movq 0x218(%rbx), %rdi
callq 0x26040
movq 0x220(%rbx), %rdi
callq 0x26040
movq 0x228(%rbx), %rdi
callq 0x26040
movq 0x230(%rbx), %rdi
callq 0x26040
jmp 0x1886a
movq 0x1f0(%rbx), %rcx
movq 0x1f8(%rbx), %rdx
movq 0x200(%rbx), %rdi
movq 0x208(%rbx), %r8
movq 0x210(%rbx), %r9
movq 0x218(%rbx), %r14
jmp 0x188cf
movl $0x2, 0x1ec(%rbx)
movl $0x8, %edi
callq 0x24985
movq %rax, %rbp
movl $0x10, %edi
callq 0x24985
movq %rax, 0x18(%rsp)
movl $0x8, %edi
callq 0x24985
movq %rax, 0x10(%rsp)
movl $0x10, %edi
callq 0x24985
movq %rax, 0x8(%rsp)
movl $0x8, %edi
callq 0x24985
movq %rax, (%rsp)
movl $0x10, %edi
callq 0x24985
movq %rax, %r14
movl $0x8, %edi
callq 0x24985
movq %rax, %r15
movl $0x10, %edi
callq 0x24985
movq %rax, %r12
movl $0x10, %edi
callq 0x24985
movq %rax, %r13
movq %rbp, 0x1f0(%rbx)
movq 0x18(%rsp), %rdx
movq %rdx, 0x1f8(%rbx)
movq 0x10(%rsp), %rdi
movq %rdi, 0x200(%rbx)
movq 0x8(%rsp), %r8
movq %r8, 0x208(%rbx)
movq (%rsp), %r9
movq %r9, 0x210(%rbx)
movq %r14, 0x218(%rbx)
movq %r15, 0x220(%rbx)
movq %r12, 0x228(%rbx)
movq %r13, 0x230(%rbx)
movq %rbp, %rcx
movl 0x1e8(%rbx), %ebp
movsd 0x30(%rsp), %xmm0
movl 0x24(%rsp), %esi
movslq %ebp, %rax
movl %esi, (%rcx,%rax,4)
movslq 0x1e8(%rbx), %rax
movsd %xmm0, (%rdx,%rax,8)
xorl %ecx, %ecx
movl %ecx, (%rdi,%rax,4)
movslq 0x1e8(%rbx), %rax
movq %rcx, (%r8,%rax,8)
movl %ecx, (%r9,%rax,4)
movslq 0x1e8(%rbx), %rax
movq %rcx, (%r14,%rax,8)
movq 0x220(%rbx), %rdx
movl %ecx, (%rdx,%rax,4)
movq 0x228(%rbx), %rax
movslq 0x1e8(%rbx), %rdx
movq %rcx, (%rax,%rdx,8)
movq 0x230(%rbx), %rax
movq %rcx, (%rax,%rdx,8)
leal 0x1(%rdx), %eax
movl %eax, 0x1e8(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN12LefDefParser9lefiLayer13addMinimumcutEid:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov ebp, [rdi+1E8h]
cmp ebp, [rdi+1ECh]
jnz loc_187B5
mov [rsp+68h+var_44], esi
movsd [rsp+68h+var_38], xmm0
test ebp, ebp
jz loc_187E4
movsxd r13, ebp
lea eax, ds:0[rbp*2]
mov [rbx+1ECh], eax
lea r15, ds:0[r13*8]
mov rdi, r15; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_40], rax
shl r13, 4
mov rdi, r13; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_50], rax
mov rdi, r15; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_58], rax
mov rdi, r13; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_60], rax
mov rdi, r15; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_68], rax
mov rdi, r13; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r14, rax
mov rdi, r15; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r15, rax
mov rdi, r13; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r12, rax
mov rdi, r13; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r9, [rsp+68h+var_68]
mov r8, [rsp+68h+var_60]
mov rdi, [rsp+68h+var_58]
mov rsi, [rsp+68h+var_50]; unsigned __int64
mov rdx, [rsp+68h+var_40]
mov r13, rax
test ebp, ebp
jle loc_18741
shl rbp, 2
xor eax, eax
loc_186A7:
mov rcx, [rbx+1F0h]
mov ecx, [rcx+rax]
mov [rdx+rax], ecx
mov rcx, [rbx+1F8h]
movsd xmm0, qword ptr [rcx+rax*2]
movsd qword ptr [rsi+rax*2], xmm0
mov rcx, [rbx+200h]
mov ecx, [rcx+rax]
mov [rdi+rax], ecx
mov rcx, [rbx+208h]
movsd xmm0, qword ptr [rcx+rax*2]
movsd qword ptr [r8+rax*2], xmm0
mov rcx, [rbx+210h]
mov ecx, [rcx+rax]
mov [r9+rax], ecx
mov rcx, [rbx+218h]
mov rcx, [rcx+rax*2]
mov [r14+rax*2], rcx
mov rcx, [rbx+220h]
mov ecx, [rcx+rax]
mov [r15+rax], ecx
mov rcx, [rbx+228h]
movsd xmm0, qword ptr [rcx+rax*2]
movsd qword ptr [r12+rax*2], xmm0
mov rcx, [rbx+230h]
movsd xmm0, qword ptr [rcx+rax*2]
movsd qword ptr [r13+rax*2+0], xmm0
add rax, 4
cmp rbp, rax
jnz loc_186A7
loc_18741:
mov rdi, [rbx+1F0h]; this
mov rbp, rdx
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+1F8h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+200h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+208h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+210h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+218h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+220h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+228h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+230h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
jmp loc_1886A
loc_187B5:
mov rcx, [rbx+1F0h]
mov rdx, [rbx+1F8h]
mov rdi, [rbx+200h]
mov r8, [rbx+208h]
mov r9, [rbx+210h]
mov r14, [rbx+218h]
jmp loc_188CF
loc_187E4:
mov dword ptr [rbx+1ECh], 2
mov edi, offset byte_8; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rbp, rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_50], rax
mov edi, offset byte_8; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_58], rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_60], rax
mov edi, offset byte_8; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_68], rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r14, rax
mov edi, offset byte_8; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r15, rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r12, rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r13, rax
loc_1886A:
mov [rbx+1F0h], rbp
mov rdx, [rsp+68h+var_50]
mov [rbx+1F8h], rdx
mov rdi, [rsp+68h+var_58]
mov [rbx+200h], rdi
mov r8, [rsp+68h+var_60]
mov [rbx+208h], r8
mov r9, [rsp+68h+var_68]
mov [rbx+210h], r9
mov [rbx+218h], r14
mov [rbx+220h], r15
mov [rbx+228h], r12
mov [rbx+230h], r13
mov rcx, rbp
mov ebp, [rbx+1E8h]
movsd xmm0, [rsp+68h+var_38]
mov esi, [rsp+68h+var_44]
loc_188CF:
movsxd rax, ebp
mov [rcx+rax*4], esi
movsxd rax, dword ptr [rbx+1E8h]
movsd qword ptr [rdx+rax*8], xmm0
xor ecx, ecx
mov [rdi+rax*4], ecx
movsxd rax, dword ptr [rbx+1E8h]
mov [r8+rax*8], rcx
mov [r9+rax*4], ecx
movsxd rax, dword ptr [rbx+1E8h]
mov [r14+rax*8], rcx
mov rdx, [rbx+220h]
mov [rdx+rax*4], ecx
mov rax, [rbx+228h]
movsxd rdx, dword ptr [rbx+1E8h]
mov [rax+rdx*8], rcx
mov rax, [rbx+230h]
mov [rax+rdx*8], rcx
lea eax, [rdx+1]
mov [rbx+1E8h], eax
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::lefiLayer::addMinimumcut(
LefDefParser::lefiLayer *this,
unsigned long long a2,
double a3)
{
long long v4; // rbp
LefDefParser *v5; // r13
long long v6; // r14
long long v7; // r15
long long v8; // r12
long long v9; // r13
long long v10; // rbp
long long v11; // rax
long long v12; // rcx
char *v13; // rdx
long long v14; // rdi
long long v15; // r8
long long v16; // r9
long long v17; // rax
long long v18; // rax
long long v19; // rax
long long v20; // rdx
long long result; // rax
long long v22; // [rsp+0h] [rbp-68h]
long long v23; // [rsp+8h] [rbp-60h]
long long v24; // [rsp+10h] [rbp-58h]
char *v25; // [rsp+18h] [rbp-50h]
long long v26; // [rsp+28h] [rbp-40h]
v4 = *((unsigned int *)this + 122);
if ( (_DWORD)v4 == *((_DWORD *)this + 123) )
{
if ( (_DWORD)v4 )
{
*((_DWORD *)this + 123) = 2 * v4;
v26 = LefDefParser::lefMalloc((LefDefParser *)(8LL * (int)v4), a2);
v5 = (LefDefParser *)(16LL * (int)v4);
v25 = (char *)LefDefParser::lefMalloc(v5, a2);
v24 = LefDefParser::lefMalloc((LefDefParser *)(8LL * (int)v4), a2);
v23 = LefDefParser::lefMalloc(v5, a2);
v22 = LefDefParser::lefMalloc((LefDefParser *)(8LL * (int)v4), a2);
v6 = LefDefParser::lefMalloc(v5, a2);
v7 = LefDefParser::lefMalloc((LefDefParser *)(8LL * (int)v4), a2);
v8 = LefDefParser::lefMalloc(v5, a2);
v9 = LefDefParser::lefMalloc(v5, a2);
if ( (int)v4 > 0 )
{
v10 = 4 * v4;
v11 = 0LL;
do
{
*(_DWORD *)(v26 + v11) = *(_DWORD *)(*((_QWORD *)this + 62) + v11);
*(_QWORD *)&v25[2 * v11] = *(_QWORD *)(*((_QWORD *)this + 63) + 2 * v11);
*(_DWORD *)(v24 + v11) = *(_DWORD *)(*((_QWORD *)this + 64) + v11);
*(_QWORD *)(v23 + 2 * v11) = *(_QWORD *)(*((_QWORD *)this + 65) + 2 * v11);
*(_DWORD *)(v22 + v11) = *(_DWORD *)(*((_QWORD *)this + 66) + v11);
*(_QWORD *)(v6 + 2 * v11) = *(_QWORD *)(*((_QWORD *)this + 67) + 2 * v11);
*(_DWORD *)(v7 + v11) = *(_DWORD *)(*((_QWORD *)this + 68) + v11);
*(_QWORD *)(v8 + 2 * v11) = *(_QWORD *)(*((_QWORD *)this + 69) + 2 * v11);
*(_QWORD *)(v9 + 2 * v11) = *(_QWORD *)(*((_QWORD *)this + 70) + 2 * v11);
v11 += 4LL;
}
while ( v10 != v11 );
}
v4 = v26;
LefDefParser::lefFree(*((LefDefParser **)this + 62), v25);
LefDefParser::lefFree(*((LefDefParser **)this + 63), v25);
LefDefParser::lefFree(*((LefDefParser **)this + 64), v25);
LefDefParser::lefFree(*((LefDefParser **)this + 65), v25);
LefDefParser::lefFree(*((LefDefParser **)this + 66), v25);
LefDefParser::lefFree(*((LefDefParser **)this + 67), v25);
LefDefParser::lefFree(*((LefDefParser **)this + 68), v25);
LefDefParser::lefFree(*((LefDefParser **)this + 69), v25);
LefDefParser::lefFree(*((LefDefParser **)this + 70), v25);
}
else
{
*((_DWORD *)this + 123) = 2;
v4 = LefDefParser::lefMalloc((LefDefParser *)&byte_8, a2);
v25 = (char *)LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
v24 = LefDefParser::lefMalloc((LefDefParser *)&byte_8, a2);
v23 = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
v22 = LefDefParser::lefMalloc((LefDefParser *)&byte_8, a2);
v6 = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
v7 = LefDefParser::lefMalloc((LefDefParser *)&byte_8, a2);
v8 = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
v9 = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
}
*((_QWORD *)this + 62) = v4;
v13 = v25;
*((_QWORD *)this + 63) = v25;
v14 = v24;
*((_QWORD *)this + 64) = v24;
v15 = v23;
*((_QWORD *)this + 65) = v23;
v16 = v22;
*((_QWORD *)this + 66) = v22;
*((_QWORD *)this + 67) = v6;
*((_QWORD *)this + 68) = v7;
*((_QWORD *)this + 69) = v8;
*((_QWORD *)this + 70) = v9;
v12 = v4;
LODWORD(v4) = *((_DWORD *)this + 122);
}
else
{
v12 = *((_QWORD *)this + 62);
v13 = (char *)*((_QWORD *)this + 63);
v14 = *((_QWORD *)this + 64);
v15 = *((_QWORD *)this + 65);
v16 = *((_QWORD *)this + 66);
v6 = *((_QWORD *)this + 67);
}
*(_DWORD *)(v12 + 4LL * (int)v4) = a2;
v17 = *((int *)this + 122);
*(double *)&v13[8 * v17] = a3;
*(_DWORD *)(v14 + 4 * v17) = 0;
v18 = *((int *)this + 122);
*(_QWORD *)(v15 + 8 * v18) = 0LL;
*(_DWORD *)(v16 + 4 * v18) = 0;
v19 = *((int *)this + 122);
*(_QWORD *)(v6 + 8 * v19) = 0LL;
*(_DWORD *)(*((_QWORD *)this + 68) + 4 * v19) = 0;
v20 = *((int *)this + 122);
*(_QWORD *)(*((_QWORD *)this + 69) + 8 * v20) = 0LL;
*(_QWORD *)(*((_QWORD *)this + 70) + 8 * v20) = 0LL;
result = (unsigned int)(v20 + 1);
*((_DWORD *)this + 122) = result;
return result;
}
| addMinimumcut:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV EBP,dword ptr [RDI + 0x1e8]
CMP EBP,dword ptr [RDI + 0x1ec]
JNZ 0x001187b5
MOV dword ptr [RSP + 0x24],ESI
MOVSD qword ptr [RSP + 0x30],XMM0
TEST EBP,EBP
JZ 0x001187e4
MOVSXD R13,EBP
LEA EAX,[RBP*0x2]
MOV dword ptr [RBX + 0x1ec],EAX
LEA R15,[R13*0x8]
MOV RDI,R15
CALL 0x00124985
MOV qword ptr [RSP + 0x28],RAX
SHL R13,0x4
MOV RDI,R13
CALL 0x00124985
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,R15
CALL 0x00124985
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,R13
CALL 0x00124985
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,R15
CALL 0x00124985
MOV qword ptr [RSP],RAX
MOV RDI,R13
CALL 0x00124985
MOV R14,RAX
MOV RDI,R15
CALL 0x00124985
MOV R15,RAX
MOV RDI,R13
CALL 0x00124985
MOV R12,RAX
MOV RDI,R13
CALL 0x00124985
MOV R9,qword ptr [RSP]
MOV R8,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x28]
MOV R13,RAX
TEST EBP,EBP
JLE 0x00118741
SHL RBP,0x2
XOR EAX,EAX
LAB_001186a7:
MOV RCX,qword ptr [RBX + 0x1f0]
MOV ECX,dword ptr [RCX + RAX*0x1]
MOV dword ptr [RDX + RAX*0x1],ECX
MOV RCX,qword ptr [RBX + 0x1f8]
MOVSD XMM0,qword ptr [RCX + RAX*0x2]
MOVSD qword ptr [RSI + RAX*0x2],XMM0
MOV RCX,qword ptr [RBX + 0x200]
MOV ECX,dword ptr [RCX + RAX*0x1]
MOV dword ptr [RDI + RAX*0x1],ECX
MOV RCX,qword ptr [RBX + 0x208]
MOVSD XMM0,qword ptr [RCX + RAX*0x2]
MOVSD qword ptr [R8 + RAX*0x2],XMM0
MOV RCX,qword ptr [RBX + 0x210]
MOV ECX,dword ptr [RCX + RAX*0x1]
MOV dword ptr [R9 + RAX*0x1],ECX
MOV RCX,qword ptr [RBX + 0x218]
MOV RCX,qword ptr [RCX + RAX*0x2]
MOV qword ptr [R14 + RAX*0x2],RCX
MOV RCX,qword ptr [RBX + 0x220]
MOV ECX,dword ptr [RCX + RAX*0x1]
MOV dword ptr [R15 + RAX*0x1],ECX
MOV RCX,qword ptr [RBX + 0x228]
MOVSD XMM0,qword ptr [RCX + RAX*0x2]
MOVSD qword ptr [R12 + RAX*0x2],XMM0
MOV RCX,qword ptr [RBX + 0x230]
MOVSD XMM0,qword ptr [RCX + RAX*0x2]
MOVSD qword ptr [R13 + RAX*0x2],XMM0
ADD RAX,0x4
CMP RBP,RAX
JNZ 0x001186a7
LAB_00118741:
MOV RDI,qword ptr [RBX + 0x1f0]
MOV RBP,RDX
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x1f8]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x200]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x208]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x210]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x218]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x220]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x228]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x230]
CALL 0x00126040
JMP 0x0011886a
LAB_001187b5:
MOV RCX,qword ptr [RBX + 0x1f0]
MOV RDX,qword ptr [RBX + 0x1f8]
MOV RDI,qword ptr [RBX + 0x200]
MOV R8,qword ptr [RBX + 0x208]
MOV R9,qword ptr [RBX + 0x210]
MOV R14,qword ptr [RBX + 0x218]
JMP 0x001188cf
LAB_001187e4:
MOV dword ptr [RBX + 0x1ec],0x2
MOV EDI,0x8
CALL 0x00124985
MOV RBP,RAX
MOV EDI,0x10
CALL 0x00124985
MOV qword ptr [RSP + 0x18],RAX
MOV EDI,0x8
CALL 0x00124985
MOV qword ptr [RSP + 0x10],RAX
MOV EDI,0x10
CALL 0x00124985
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,0x8
CALL 0x00124985
MOV qword ptr [RSP],RAX
MOV EDI,0x10
CALL 0x00124985
MOV R14,RAX
MOV EDI,0x8
CALL 0x00124985
MOV R15,RAX
MOV EDI,0x10
CALL 0x00124985
MOV R12,RAX
MOV EDI,0x10
CALL 0x00124985
MOV R13,RAX
LAB_0011886a:
MOV qword ptr [RBX + 0x1f0],RBP
MOV RDX,qword ptr [RSP + 0x18]
MOV qword ptr [RBX + 0x1f8],RDX
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RBX + 0x200],RDI
MOV R8,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x208],R8
MOV R9,qword ptr [RSP]
MOV qword ptr [RBX + 0x210],R9
MOV qword ptr [RBX + 0x218],R14
MOV qword ptr [RBX + 0x220],R15
MOV qword ptr [RBX + 0x228],R12
MOV qword ptr [RBX + 0x230],R13
MOV RCX,RBP
MOV EBP,dword ptr [RBX + 0x1e8]
MOVSD XMM0,qword ptr [RSP + 0x30]
MOV ESI,dword ptr [RSP + 0x24]
LAB_001188cf:
MOVSXD RAX,EBP
MOV dword ptr [RCX + RAX*0x4],ESI
MOVSXD RAX,dword ptr [RBX + 0x1e8]
MOVSD qword ptr [RDX + RAX*0x8],XMM0
XOR ECX,ECX
MOV dword ptr [RDI + RAX*0x4],ECX
MOVSXD RAX,dword ptr [RBX + 0x1e8]
MOV qword ptr [R8 + RAX*0x8],RCX
MOV dword ptr [R9 + RAX*0x4],ECX
MOVSXD RAX,dword ptr [RBX + 0x1e8]
MOV qword ptr [R14 + RAX*0x8],RCX
MOV RDX,qword ptr [RBX + 0x220]
MOV dword ptr [RDX + RAX*0x4],ECX
MOV RAX,qword ptr [RBX + 0x228]
MOVSXD RDX,dword ptr [RBX + 0x1e8]
MOV qword ptr [RAX + RDX*0x8],RCX
MOV RAX,qword ptr [RBX + 0x230]
MOV qword ptr [RAX + RDX*0x8],RCX
LEA EAX,[RDX + 0x1]
MOV dword ptr [RBX + 0x1e8],EAX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::lefiLayer::addMinimumcut(int, double) */
void __thiscall LefDefParser::lefiLayer::addMinimumcut(lefiLayer *this,int param_1,double param_2)
{
LefDefParser *this_00;
int iVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
uint uVar8;
int4 in_register_00000034;
ulong uVar9;
LefDefParser *this_01;
long local_68;
long local_60;
long local_58;
long local_50;
uVar9 = CONCAT44(in_register_00000034,param_1);
uVar8 = *(uint *)(this + 0x1e8);
if (uVar8 == *(uint *)(this + 0x1ec)) {
if (uVar8 == 0) {
*(int4 *)(this + 0x1ec) = 2;
lVar2 = lefMalloc((LefDefParser *)0x8,uVar9);
local_50 = lefMalloc((LefDefParser *)0x10,uVar9);
local_58 = lefMalloc((LefDefParser *)0x8,uVar9);
local_60 = lefMalloc((LefDefParser *)0x10,uVar9);
local_68 = lefMalloc((LefDefParser *)0x8,uVar9);
lVar3 = lefMalloc((LefDefParser *)0x10,uVar9);
lVar4 = lefMalloc((LefDefParser *)0x8,uVar9);
lVar5 = lefMalloc((LefDefParser *)0x10,uVar9);
lVar6 = lefMalloc((LefDefParser *)0x10,uVar9);
}
else {
*(uint *)(this + 0x1ec) = uVar8 * 2;
this_00 = (LefDefParser *)((long)(int)uVar8 * 8);
lVar2 = lefMalloc(this_00,uVar9);
this_01 = (LefDefParser *)((long)(int)uVar8 << 4);
local_50 = lefMalloc(this_01,uVar9);
local_58 = lefMalloc(this_00,uVar9);
local_60 = lefMalloc(this_01,uVar9);
local_68 = lefMalloc(this_00,uVar9);
lVar3 = lefMalloc(this_01,uVar9);
lVar4 = lefMalloc(this_00,uVar9);
lVar5 = lefMalloc(this_01,uVar9);
lVar6 = lefMalloc(this_01,uVar9);
if (0 < (int)uVar8) {
lVar7 = 0;
do {
*(int4 *)(lVar2 + lVar7) = *(int4 *)(*(long *)(this + 0x1f0) + lVar7);
*(int8 *)(local_50 + lVar7 * 2) =
*(int8 *)(*(long *)(this + 0x1f8) + lVar7 * 2);
*(int4 *)(local_58 + lVar7) = *(int4 *)(*(long *)(this + 0x200) + lVar7);
*(int8 *)(local_60 + lVar7 * 2) =
*(int8 *)(*(long *)(this + 0x208) + lVar7 * 2);
*(int4 *)(local_68 + lVar7) = *(int4 *)(*(long *)(this + 0x210) + lVar7);
*(int8 *)(lVar3 + lVar7 * 2) = *(int8 *)(*(long *)(this + 0x218) + lVar7 * 2);
*(int4 *)(lVar4 + lVar7) = *(int4 *)(*(long *)(this + 0x220) + lVar7);
*(int8 *)(lVar5 + lVar7 * 2) = *(int8 *)(*(long *)(this + 0x228) + lVar7 * 2);
*(int8 *)(lVar6 + lVar7 * 2) = *(int8 *)(*(long *)(this + 0x230) + lVar7 * 2);
lVar7 = lVar7 + 4;
} while ((ulong)uVar8 << 2 != lVar7);
}
lefFree(*(void **)(this + 0x1f0));
lefFree(*(void **)(this + 0x1f8));
lefFree(*(void **)(this + 0x200));
lefFree(*(void **)(this + 0x208));
lefFree(*(void **)(this + 0x210));
lefFree(*(void **)(this + 0x218));
lefFree(*(void **)(this + 0x220));
lefFree(*(void **)(this + 0x228));
lefFree(*(void **)(this + 0x230));
}
*(long *)(this + 0x1f0) = lVar2;
*(long *)(this + 0x1f8) = local_50;
*(long *)(this + 0x200) = local_58;
*(long *)(this + 0x208) = local_60;
*(long *)(this + 0x210) = local_68;
*(long *)(this + 0x218) = lVar3;
*(long *)(this + 0x220) = lVar4;
*(long *)(this + 0x228) = lVar5;
*(long *)(this + 0x230) = lVar6;
uVar8 = *(uint *)(this + 0x1e8);
uVar9 = (ulong)(uint)param_1;
}
else {
lVar2 = *(long *)(this + 0x1f0);
local_50 = *(long *)(this + 0x1f8);
local_58 = *(long *)(this + 0x200);
local_60 = *(long *)(this + 0x208);
local_68 = *(long *)(this + 0x210);
lVar3 = *(long *)(this + 0x218);
}
*(int *)(lVar2 + (long)(int)uVar8 * 4) = (int)uVar9;
iVar1 = *(int *)(this + 0x1e8);
*(double *)(local_50 + (long)iVar1 * 8) = param_2;
*(int4 *)(local_58 + (long)iVar1 * 4) = 0;
iVar1 = *(int *)(this + 0x1e8);
*(int8 *)(local_60 + (long)iVar1 * 8) = 0;
*(int4 *)(local_68 + (long)iVar1 * 4) = 0;
iVar1 = *(int *)(this + 0x1e8);
*(int8 *)(lVar3 + (long)iVar1 * 8) = 0;
*(int4 *)(*(long *)(this + 0x220) + (long)iVar1 * 4) = 0;
iVar1 = *(int *)(this + 0x1e8);
*(int8 *)(*(long *)(this + 0x228) + (long)iVar1 * 8) = 0;
*(int8 *)(*(long *)(this + 0x230) + (long)iVar1 * 8) = 0;
*(int *)(this + 0x1e8) = iVar1 + 1;
return;
}
| |
32,573 | ImPlot::ShowLegendContextMenu(ImPlotLegend&, bool) | zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp | bool ShowLegendContextMenu(ImPlotLegend& legend, bool visible) {
const float s = ImGui::GetFrameHeight();
bool ret = false;
if (ImGui::Checkbox("Show",&visible))
ret = true;
if (legend.CanGoInside)
ImGui::CheckboxFlags("Outside",(unsigned int*)&legend.Flags, ImPlotLegendFlags_Outside);
if (ImGui::RadioButton("H", ImHasFlag(legend.Flags, ImPlotLegendFlags_Horizontal)))
legend.Flags |= ImPlotLegendFlags_Horizontal;
ImGui::SameLine();
if (ImGui::RadioButton("V", !ImHasFlag(legend.Flags, ImPlotLegendFlags_Horizontal)))
legend.Flags &= ~ImPlotLegendFlags_Horizontal;
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(2,2));
if (ImGui::Button("NW",ImVec2(1.5f*s,s))) { legend.Location = ImPlotLocation_NorthWest; } ImGui::SameLine();
if (ImGui::Button("N", ImVec2(1.5f*s,s))) { legend.Location = ImPlotLocation_North; } ImGui::SameLine();
if (ImGui::Button("NE",ImVec2(1.5f*s,s))) { legend.Location = ImPlotLocation_NorthEast; }
if (ImGui::Button("W", ImVec2(1.5f*s,s))) { legend.Location = ImPlotLocation_West; } ImGui::SameLine();
if (ImGui::InvisibleButton("C", ImVec2(1.5f*s,s))) { } ImGui::SameLine();
if (ImGui::Button("E", ImVec2(1.5f*s,s))) { legend.Location = ImPlotLocation_East; }
if (ImGui::Button("SW",ImVec2(1.5f*s,s))) { legend.Location = ImPlotLocation_SouthWest; } ImGui::SameLine();
if (ImGui::Button("S", ImVec2(1.5f*s,s))) { legend.Location = ImPlotLocation_South; } ImGui::SameLine();
if (ImGui::Button("SE",ImVec2(1.5f*s,s))) { legend.Location = ImPlotLocation_SouthEast; }
ImGui::PopStyleVar();
return ret;
} | O1 | cpp | ImPlot::ShowLegendContextMenu(ImPlotLegend&, bool):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x1f(%rsp), %r14
movb %sil, (%r14)
callq 0x22c577
movss %xmm0, 0x8(%rsp)
leaq 0x1e0a85(%rip), %rdi # 0x294d30
movq %r14, %rsi
callq 0x258ade
movl %eax, %ebp
cmpb $0x1, 0x42(%rbx)
jne 0xb42cf
leaq 0x1e62bd(%rip), %rdi # 0x29a57f
movq %rbx, %rsi
movl $0x10, %edx
callq 0x25966f
movl (%rbx), %esi
andl $0x20, %esi
shrl $0x5, %esi
leaq 0x1dbc0d(%rip), %rdi # 0x28feeb
callq 0x25967e
testb %al, %al
je 0xb42ea
orb $0x20, (%rbx)
movss 0x1dad12(%rip), %xmm1 # 0x28f004
xorps %xmm0, %xmm0
callq 0x22beb1
xorl %esi, %esi
testb $0x20, (%rbx)
sete %sil
leaq 0x218e14(%rip), %rdi # 0x2cd11e
callq 0x25967e
testb %al, %al
je 0xb4316
andb $-0x21, (%rbx)
movsd 0x1e00f2(%rip), %xmm0 # 0x294410
leaq 0x10(%rsp), %r14
movsd %xmm0, (%r14)
movl $0xe, %edi
movq %r14, %rsi
callq 0x216728
movss 0x8(%rsp), %xmm0
movaps %xmm0, %xmm1
mulss 0x1e0066(%rip), %xmm1 # 0x2943ac
movss %xmm1, 0xc(%rsp)
movss %xmm1, (%r14)
movss %xmm0, 0x4(%r14)
leaq 0x1e09d7(%rip), %rdi # 0x294d35
leaq 0x10(%rsp), %rsi
callq 0x2578d8
testb %al, %al
je 0xb4373
movl $0x5, 0x8(%rbx)
movss 0x1dac89(%rip), %xmm1 # 0x28f004
xorps %xmm0, %xmm0
callq 0x22beb1
leaq 0x10(%rsp), %rsi
movss 0xc(%rsp), %xmm0
movss %xmm0, (%rsi)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%rsi)
leaq 0x1dbbc4(%rip), %rdi # 0x28ff68
callq 0x2578d8
testb %al, %al
je 0xb43b4
movl $0x1, 0x8(%rbx)
movss 0x1dac48(%rip), %xmm1 # 0x28f004
xorps %xmm0, %xmm0
callq 0x22beb1
leaq 0x10(%rsp), %rsi
movss 0xc(%rsp), %xmm0
movss %xmm0, (%rsi)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%rsi)
leaq 0x1e0953(%rip), %rdi # 0x294d38
callq 0x2578d8
testb %al, %al
je 0xb43f5
movl $0x9, 0x8(%rbx)
leaq 0x10(%rsp), %rsi
movss 0xc(%rsp), %xmm0
movss %xmm0, (%rsi)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%rsi)
leaq 0x1fb5e1(%rip), %rdi # 0x2af9f7
callq 0x2578d8
testb %al, %al
je 0xb4426
movl $0x4, 0x8(%rbx)
movss 0x1dabd6(%rip), %xmm1 # 0x28f004
xorps %xmm0, %xmm0
callq 0x22beb1
leaq 0x10(%rsp), %r14
movss 0xc(%rsp), %xmm0
movss %xmm0, (%r14)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%r14)
leaq 0x1dcaa1(%rip), %rdi # 0x290efa
movq %r14, %rsi
xorl %edx, %edx
callq 0x257930
xorps %xmm0, %xmm0
movss 0x1dab96(%rip), %xmm1 # 0x28f004
callq 0x22beb1
movss 0xc(%rsp), %xmm0
movss %xmm0, (%r14)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%r14)
leaq 0x1dc66e(%rip), %rdi # 0x290aff
leaq 0x10(%rsp), %rsi
callq 0x2578d8
testb %al, %al
je 0xb44a6
movl $0x8, 0x8(%rbx)
leaq 0x10(%rsp), %rsi
movss 0xc(%rsp), %xmm0
movss %xmm0, (%rsi)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%rsi)
leaq 0x218c9c(%rip), %rdi # 0x2cd163
callq 0x2578d8
testb %al, %al
je 0xb44d7
movl $0x6, 0x8(%rbx)
movss 0x1dab25(%rip), %xmm1 # 0x28f004
xorps %xmm0, %xmm0
callq 0x22beb1
leaq 0x10(%rsp), %rsi
movss 0xc(%rsp), %xmm0
movss %xmm0, (%rsi)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%rsi)
leaq 0x218952(%rip), %rdi # 0x2cce5a
callq 0x2578d8
testb %al, %al
je 0xb4518
movl $0x2, 0x8(%rbx)
movss 0x1daae4(%rip), %xmm1 # 0x28f004
xorps %xmm0, %xmm0
callq 0x22beb1
leaq 0x10(%rsp), %rsi
movss 0xc(%rsp), %xmm0
movss %xmm0, (%rsi)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%rsi)
leaq 0x1f2e7e(%rip), %rdi # 0x2a73c7
callq 0x2578d8
testb %al, %al
je 0xb4559
movl $0xa, 0x8(%rbx)
movl $0x1, %edi
callq 0x216849
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| _ZN6ImPlot21ShowLegendContextMenuER12ImPlotLegendb:
push rbp
push r14
push rbx
sub rsp, 20h
mov rbx, rdi
lea r14, [rsp+38h+var_19]
mov [r14], sil
call _ZN5ImGui14GetFrameHeightEv; ImGui::GetFrameHeight(void)
movss [rsp+38h+var_30], xmm0
lea rdi, aShow; "Show"
mov rsi, r14; char *
call _ZN5ImGui8CheckboxEPKcPb; ImGui::Checkbox(char const*,bool *)
mov ebp, eax
cmp byte ptr [rbx+42h], 1
jnz short loc_B42CF
lea rdi, aOutside; "Outside"
mov rsi, rbx; char *
mov edx, offset word_10; unsigned int *
call _ZN5ImGui13CheckboxFlagsEPKcPjj; ImGui::CheckboxFlags(char const*,uint *,uint)
loc_B42CF:
mov esi, [rbx]
and esi, 20h
shr esi, 5; char *
lea rdi, aSoh+2; this
call _ZN5ImGui11RadioButtonEPKcb; ImGui::RadioButton(char const*,bool)
test al, al
jz short loc_B42EA
or byte ptr [rbx], 20h
loc_B42EA:
movss xmm1, cs:flt_28F004; float
xorps xmm0, xmm0; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
xor esi, esi
test byte ptr [rbx], 20h
setz sil; char *
lea rdi, aKpdv+3; this
call _ZN5ImGui11RadioButtonEPKcb; ImGui::RadioButton(char const*,bool)
test al, al
jz short loc_B4316
and byte ptr [rbx], 0DFh
loc_B4316:
movsd xmm0, qword ptr cs:xmmword_294410
lea r14, [rsp+38h+var_28]
movsd qword ptr [r14], xmm0
mov edi, 0Eh
mov rsi, r14
call _ZN5ImGui12PushStyleVarEiRK6ImVec2; ImGui::PushStyleVar(int,ImVec2 const&)
movss xmm0, [rsp+38h+var_30]
movaps xmm1, xmm0
mulss xmm1, cs:dword_2943AC
movss [rsp+38h+var_2C], xmm1
movss dword ptr [r14], xmm1
movss dword ptr [r14+4], xmm0
lea rdi, aNw; "NW"
lea rsi, [rsp+38h+var_28]
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, al
jz short loc_B4373
mov dword ptr [rbx+8], 5
loc_B4373:
movss xmm1, cs:flt_28F004; float
xorps xmm0, xmm0; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
lea rsi, [rsp+38h+var_28]
movss xmm0, [rsp+38h+var_2C]
movss dword ptr [rsi], xmm0
movss xmm0, [rsp+38h+var_30]
movss dword ptr [rsi+4], xmm0
lea rdi, aCan+2; this
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, al
jz short loc_B43B4
mov dword ptr [rbx+8], 1
loc_B43B4:
movss xmm1, cs:flt_28F004; float
xorps xmm0, xmm0; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
lea rsi, [rsp+38h+var_28]
movss xmm0, [rsp+38h+var_2C]
movss dword ptr [rsi], xmm0
movss xmm0, [rsp+38h+var_30]
movss dword ptr [rsi+4], xmm0
lea rdi, aNe; "NE"
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, al
jz short loc_B43F5
mov dword ptr [rbx+8], 9
loc_B43F5:
lea rsi, [rsp+38h+var_28]
movss xmm0, [rsp+38h+var_2C]
movss dword ptr [rsi], xmm0
movss xmm0, [rsp+38h+var_30]
movss dword ptr [rsi+4], xmm0
lea rdi, aW+2; this
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, al
jz short loc_B4426
mov dword ptr [rbx+8], 4
loc_B4426:
movss xmm1, cs:flt_28F004; float
xorps xmm0, xmm0; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
lea r14, [rsp+38h+var_28]
movss xmm0, [rsp+38h+var_2C]
movss dword ptr [r14], xmm0
movss xmm0, [rsp+38h+var_30]
movss dword ptr [r14+4], xmm0
lea rdi, aInvalidStringC_5+46h; this
mov rsi, r14
xor edx, edx
call _ZN5ImGui15InvisibleButtonEPKcRK6ImVec2i; ImGui::InvisibleButton(char const*,ImVec2 const&,int)
xorps xmm0, xmm0; float
movss xmm1, cs:flt_28F004; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
movss xmm0, [rsp+38h+var_2C]
movss dword ptr [r14], xmm0
movss xmm0, [rsp+38h+var_30]
movss dword ptr [r14+4], xmm0
lea rdi, aInvalidStringC_27+46h; "E"
lea rsi, [rsp+38h+var_28]
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, al
jz short loc_B44A6
mov dword ptr [rbx+8], 8
loc_B44A6:
lea rsi, [rsp+38h+var_28]
movss xmm0, [rsp+38h+var_2C]
movss dword ptr [rsi], xmm0
movss xmm0, [rsp+38h+var_30]
movss dword ptr [rsi+4], xmm0
lea rdi, aMdsw+2; this
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, al
jz short loc_B44D7
mov dword ptr [rbx+8], 6
loc_B44D7:
movss xmm1, cs:flt_28F004; float
xorps xmm0, xmm0; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
lea rsi, [rsp+38h+var_28]
movss xmm0, [rsp+38h+var_2C]
movss dword ptr [rsi], xmm0
movss xmm0, [rsp+38h+var_30]
movss dword ptr [rsi+4], xmm0
lea rdi, aWmProtocols+0Bh; this
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, al
jz short loc_B4518
mov dword ptr [rbx+8], 2
loc_B4518:
movss xmm1, cs:flt_28F004; float
xorps xmm0, xmm0; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
lea rsi, [rsp+38h+var_28]; int
movss xmm0, [rsp+38h+var_2C]
movss dword ptr [rsi], xmm0
movss xmm0, [rsp+38h+var_30]
movss dword ptr [rsi+4], xmm0
lea rdi, aClose+4; "SE"
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, al
jz short loc_B4559
mov dword ptr [rbx+8], 0Ah
loc_B4559:
mov edi, (offset dword_0+1); this
call _ZN5ImGui11PopStyleVarEi; ImGui::PopStyleVar(int)
mov eax, ebp
add rsp, 20h
pop rbx
pop r14
pop rbp
retn
| long long ImPlot::ShowLegendContextMenu(ImGui *a1, char a2, float a3)
{
bool *v3; // rdx
bool v4; // dl
unsigned int v5; // ecx
unsigned int v6; // ebp
bool v7; // dl
float v9[3]; // [rsp+10h] [rbp-28h] BYREF
char v10[25]; // [rsp+1Fh] [rbp-19h] BYREF
v10[0] = a2;
ImGui::GetFrameHeight(a1);
v6 = ImGui::Checkbox((ImGui *)"Show", v10, v3);
if ( *((_BYTE *)a1 + 66) == 1 )
ImGui::CheckboxFlags((ImGui *)"Outside", (const char *)a1, (unsigned int *)&word_10, v5);
if ( (unsigned __int8)ImGui::RadioButton((ImGui *)"H", (const char *)((*(_DWORD *)a1 & 0x20u) >> 5), v4) )
*(_BYTE *)a1 |= 0x20u;
ImGui::SameLine((ImGui *)"H", 0.0, -1.0);
if ( (unsigned __int8)ImGui::RadioButton((ImGui *)"V", (const char *)((*(_BYTE *)a1 & 0x20) == 0), v7) )
*(_BYTE *)a1 &= ~0x20u;
*(_QWORD *)v9 = 0x4000000040000000LL;
ImGui::PushStyleVar(14LL, v9);
v9[0] = a3 * 1.5;
v9[1] = a3;
if ( (unsigned __int8)ImGui::Button("NW", v9) )
*((_DWORD *)a1 + 2) = 5;
ImGui::SameLine((ImGui *)"NW", 0.0, -1.0);
v9[0] = a3 * 1.5;
v9[1] = a3;
if ( (unsigned __int8)ImGui::Button("N", v9) )
*((_DWORD *)a1 + 2) = 1;
ImGui::SameLine((ImGui *)"N", 0.0, -1.0);
v9[0] = a3 * 1.5;
v9[1] = a3;
if ( (unsigned __int8)ImGui::Button("NE", v9) )
*((_DWORD *)a1 + 2) = 9;
v9[0] = a3 * 1.5;
v9[1] = a3;
if ( (unsigned __int8)ImGui::Button("W", v9) )
*((_DWORD *)a1 + 2) = 4;
ImGui::SameLine((ImGui *)"W", 0.0, -1.0);
v9[0] = a3 * 1.5;
v9[1] = a3;
ImGui::InvisibleButton("C");
ImGui::SameLine((ImGui *)"C", 0.0, -1.0);
v9[0] = a3 * 1.5;
v9[1] = a3;
if ( (unsigned __int8)ImGui::Button("E", v9) )
*((_DWORD *)a1 + 2) = 8;
v9[0] = a3 * 1.5;
v9[1] = a3;
if ( (unsigned __int8)ImGui::Button("SW", v9) )
*((_DWORD *)a1 + 2) = 6;
ImGui::SameLine((ImGui *)"SW", 0.0, -1.0);
v9[0] = a3 * 1.5;
v9[1] = a3;
if ( (unsigned __int8)ImGui::Button("S", v9) )
*((_DWORD *)a1 + 2) = 2;
ImGui::SameLine((ImGui *)"S", 0.0, -1.0);
v9[0] = a3 * 1.5;
v9[1] = a3;
if ( (unsigned __int8)ImGui::Button("SE", v9) )
*((_DWORD *)a1 + 2) = 10;
ImGui::PopStyleVar((ImGui *)((char *)&dword_0 + 1), (int)v9);
return v6;
}
| ShowLegendContextMenu:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
LEA R14,[RSP + 0x1f]
MOV byte ptr [R14],SIL
CALL 0x0032c577
MOVSS dword ptr [RSP + 0x8],XMM0
LEA RDI,[0x394d30]
MOV RSI,R14
CALL 0x00358ade
MOV EBP,EAX
CMP byte ptr [RBX + 0x42],0x1
JNZ 0x001b42cf
LEA RDI,[0x39a57f]
MOV RSI,RBX
MOV EDX,0x10
CALL 0x0035966f
LAB_001b42cf:
MOV ESI,dword ptr [RBX]
AND ESI,0x20
SHR ESI,0x5
LEA RDI,[0x38feeb]
CALL 0x0035967e
TEST AL,AL
JZ 0x001b42ea
OR byte ptr [RBX],0x20
LAB_001b42ea:
MOVSS XMM1,dword ptr [0x0038f004]
XORPS XMM0,XMM0
CALL 0x0032beb1
XOR ESI,ESI
TEST byte ptr [RBX],0x20
SETZ SIL
LEA RDI,[0x3cd11e]
CALL 0x0035967e
TEST AL,AL
JZ 0x001b4316
AND byte ptr [RBX],0xdf
LAB_001b4316:
MOVSD XMM0,qword ptr [0x00394410]
LEA R14,[RSP + 0x10]
MOVSD qword ptr [R14],XMM0
MOV EDI,0xe
MOV RSI,R14
CALL 0x00316728
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVAPS XMM1,XMM0
MULSS XMM1,dword ptr [0x003943ac]
MOVSS dword ptr [RSP + 0xc],XMM1
MOVSS dword ptr [R14],XMM1
MOVSS dword ptr [R14 + 0x4],XMM0
LEA RDI,[0x394d35]
LEA RSI,[RSP + 0x10]
CALL 0x003578d8
TEST AL,AL
JZ 0x001b4373
MOV dword ptr [RBX + 0x8],0x5
LAB_001b4373:
MOVSS XMM1,dword ptr [0x0038f004]
XORPS XMM0,XMM0
CALL 0x0032beb1
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSI],XMM0
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSI + 0x4],XMM0
LEA RDI,[0x38ff68]
CALL 0x003578d8
TEST AL,AL
JZ 0x001b43b4
MOV dword ptr [RBX + 0x8],0x1
LAB_001b43b4:
MOVSS XMM1,dword ptr [0x0038f004]
XORPS XMM0,XMM0
CALL 0x0032beb1
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSI],XMM0
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSI + 0x4],XMM0
LEA RDI,[0x394d38]
CALL 0x003578d8
TEST AL,AL
JZ 0x001b43f5
MOV dword ptr [RBX + 0x8],0x9
LAB_001b43f5:
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSI],XMM0
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSI + 0x4],XMM0
LEA RDI,[0x3af9f7]
CALL 0x003578d8
TEST AL,AL
JZ 0x001b4426
MOV dword ptr [RBX + 0x8],0x4
LAB_001b4426:
MOVSS XMM1,dword ptr [0x0038f004]
XORPS XMM0,XMM0
CALL 0x0032beb1
LEA R14,[RSP + 0x10]
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [R14],XMM0
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [R14 + 0x4],XMM0
LEA RDI,[0x390efa]
MOV RSI,R14
XOR EDX,EDX
CALL 0x00357930
XORPS XMM0,XMM0
MOVSS XMM1,dword ptr [0x0038f004]
CALL 0x0032beb1
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [R14],XMM0
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [R14 + 0x4],XMM0
LEA RDI,[0x390aff]
LEA RSI,[RSP + 0x10]
CALL 0x003578d8
TEST AL,AL
JZ 0x001b44a6
MOV dword ptr [RBX + 0x8],0x8
LAB_001b44a6:
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSI],XMM0
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSI + 0x4],XMM0
LEA RDI,[0x3cd163]
CALL 0x003578d8
TEST AL,AL
JZ 0x001b44d7
MOV dword ptr [RBX + 0x8],0x6
LAB_001b44d7:
MOVSS XMM1,dword ptr [0x0038f004]
XORPS XMM0,XMM0
CALL 0x0032beb1
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSI],XMM0
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSI + 0x4],XMM0
LEA RDI,[0x3cce5a]
CALL 0x003578d8
TEST AL,AL
JZ 0x001b4518
MOV dword ptr [RBX + 0x8],0x2
LAB_001b4518:
MOVSS XMM1,dword ptr [0x0038f004]
XORPS XMM0,XMM0
CALL 0x0032beb1
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSI],XMM0
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSI + 0x4],XMM0
LEA RDI,[0x3a73c7]
CALL 0x003578d8
TEST AL,AL
JZ 0x001b4559
MOV dword ptr [RBX + 0x8],0xa
LAB_001b4559:
MOV EDI,0x1
CALL 0x00316849
MOV EAX,EBP
ADD RSP,0x20
POP RBX
POP R14
POP RBP
RET
|
/* ImPlot::ShowLegendContextMenu(ImPlotLegend&, bool) */
int4 ImPlot::ShowLegendContextMenu(ImPlotLegend *param_1,bool param_2)
{
char cVar1;
int4 uVar2;
float fVar3;
float fVar4;
int8 local_28;
bool local_19;
local_19 = param_2;
fVar3 = (float)ImGui::GetFrameHeight();
uVar2 = ImGui::Checkbox("Show",&local_19);
if (param_1[0x42] == (ImPlotLegend)0x1) {
ImGui::CheckboxFlags("Outside",(uint *)param_1,0x10);
}
cVar1 = ImGui::RadioButton("H",SUB41((*(uint *)param_1 & 0x20) >> 5,0));
if (cVar1 != '\0') {
*param_1 = (ImPlotLegend)((byte)*param_1 | 0x20);
}
ImGui::SameLine(0.0,DAT_0038f004);
cVar1 = ImGui::RadioButton("V",((byte)*param_1 & 0x20) == 0);
if (cVar1 != '\0') {
*param_1 = (ImPlotLegend)((byte)*param_1 & 0xdf);
}
local_28 = DAT_00394410;
ImGui::PushStyleVar(0xe,(ImVec2 *)&local_28);
fVar4 = fVar3 * DAT_003943ac;
local_28 = CONCAT44(fVar3,fVar4);
cVar1 = ImGui::Button("NW",(ImVec2 *)&local_28);
if (cVar1 != '\0') {
*(int4 *)(param_1 + 8) = 5;
}
ImGui::SameLine(0.0,DAT_0038f004);
local_28 = CONCAT44(fVar3,fVar4);
cVar1 = ImGui::Button("N",(ImVec2 *)&local_28);
if (cVar1 != '\0') {
*(int4 *)(param_1 + 8) = 1;
}
ImGui::SameLine(0.0,DAT_0038f004);
local_28 = CONCAT44(fVar3,fVar4);
cVar1 = ImGui::Button("NE",(ImVec2 *)&local_28);
if (cVar1 != '\0') {
*(int4 *)(param_1 + 8) = 9;
}
local_28 = CONCAT44(fVar3,fVar4);
cVar1 = ImGui::Button("W",(ImVec2 *)&local_28);
if (cVar1 != '\0') {
*(int4 *)(param_1 + 8) = 4;
}
ImGui::SameLine(0.0,DAT_0038f004);
local_28 = CONCAT44(fVar3,fVar4);
ImGui::InvisibleButton("C",(ImVec2 *)&local_28,0);
ImGui::SameLine(0.0,DAT_0038f004);
local_28 = CONCAT44(fVar3,fVar4);
cVar1 = ImGui::Button("E",(ImVec2 *)&local_28);
if (cVar1 != '\0') {
*(int4 *)(param_1 + 8) = 8;
}
local_28 = CONCAT44(fVar3,fVar4);
cVar1 = ImGui::Button("SW",(ImVec2 *)&local_28);
if (cVar1 != '\0') {
*(int4 *)(param_1 + 8) = 6;
}
ImGui::SameLine(0.0,DAT_0038f004);
local_28 = CONCAT44(fVar3,fVar4);
cVar1 = ImGui::Button("S",(ImVec2 *)&local_28);
if (cVar1 != '\0') {
*(int4 *)(param_1 + 8) = 2;
}
ImGui::SameLine(0.0,DAT_0038f004);
local_28 = CONCAT44(fVar3,fVar4);
cVar1 = ImGui::Button("SE",(ImVec2 *)&local_28);
if (cVar1 != '\0') {
*(int4 *)(param_1 + 8) = 10;
}
ImGui::PopStyleVar(1);
return uVar2;
}
| |
32,574 | psi_prlock_rdlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_prlock_rdlock(mysql_prlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line);
int result= rw_pr_rdlock(&that->m_prlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
} | O3 | c | psi_prlock_rdlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x35e9e8(%rip), %r15 # 0x38f258
movq (%r15), %rax
movq 0x68(%rdi), %rsi
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *0x1a0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0xaabd3
movl %eax, %r14d
testq %rbx, %rbx
je 0x308a5
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1a8(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| psi_prlock_rdlock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+68h]
lea rdi, [rbp+var_48]
xor edx, edx
call qword ptr [rax+1A0h]
mov rbx, rax
mov rdi, r14
call rw_pr_rdlock
mov r14d, eax
test rbx, rbx
jz short loc_308A5
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1A8h]
loc_308A5:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_prlock_rdlock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[52])(
v6,
*(_QWORD *)(a1 + 104),
0LL,
a2,
a3);
v4 = rw_pr_rdlock(a1);
if ( v3 )
((void ( *)(long long, _QWORD))PSI_server[53])(v3, v4);
return v4;
}
| psi_prlock_rdlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x48f258]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x68]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL qword ptr [RAX + 0x1a0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x001aabd3
MOV R14D,EAX
TEST RBX,RBX
JZ 0x001308a5
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1a8]
LAB_001308a5:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_prlock_rdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x68),0,param_2,param_3);
uVar1 = rw_pr_rdlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
| |
32,575 | minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) | 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)) {} | O2 | cpp | minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&):
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r8d
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %r14
pushq $0x2
popq %rsi
callq 0x62c06
leaq 0x8b2df(%rip), %rax # 0xfdb30
addq $0x10, %rax
movq %rax, (%r14)
andq $0x0, 0x38(%r14)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x30(%r14)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN5minja15IfTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_10ExpressionEE:
push r14
push rbx
push rax
mov rbx, r8
mov r8d, ecx
mov ecx, edx
mov rdx, rsi
mov r14, rdi
push 2
pop rsi
call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling)
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [r14], rax
and qword ptr [r14+38h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r14+30h], xmm0
and qword ptr [rbx], 0
add rsp, 8
pop rbx
pop r14
retn
| long long * minja::IfTemplateToken::IfTemplateToken(long long a1, long long a2, int a3, int a4, __int128 *a5)
{
long long *result; // rax
__int128 v7; // xmm0
minja::TemplateToken::TemplateToken(a1, 2, a2, a3, a4);
result = &`vtable for'minja::IfTemplateToken + 2;
*(_QWORD *)a1 = &`vtable for'minja::IfTemplateToken + 2;
*(_QWORD *)(a1 + 56) = 0LL;
v7 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v7;
*(_QWORD *)a5 = 0LL;
return result;
}
| IfTemplateToken:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R8D,ECX
MOV ECX,EDX
MOV RDX,RSI
MOV R14,RDI
PUSH 0x2
POP RSI
CALL 0x00162c06
LEA RAX,[0x1fdb30]
ADD RAX,0x10
MOV qword ptr [R14],RAX
AND qword ptr [R14 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R14 + 0x30],XMM0
AND qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling,
minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::IfTemplateToken::IfTemplateToken
(IfTemplateToken *this,int8 param_1,int4 param_3,int4 param_4,
int8 *param_5)
{
int8 uVar1;
TemplateToken::TemplateToken((TemplateToken *)this,2,param_1,param_3,param_4);
*(int ***)this = &PTR__IfTemplateToken_001fdb40;
*(int8 *)(this + 0x38) = 0;
uVar1 = param_5[1];
param_5[1] = 0;
*(int8 *)(this + 0x30) = *param_5;
*(int8 *)(this + 0x38) = uVar1;
*param_5 = 0;
return;
}
| |
32,576 | query_int_variable | eloqsql/libmariadb/unittest/libmariadb/my_test.h | my_bool query_int_variable(MYSQL *con, const char *var_name, int *var_value)
{
MYSQL_RES *rs;
MYSQL_ROW row;
char query_buffer[MAX_TEST_QUERY_LENGTH];
my_bool is_null;
sprintf(query_buffer,
"SELECT %s",
(const char *) var_name);
FAIL_IF(mysql_query(con, query_buffer), "Query failed");
FAIL_UNLESS(rs= mysql_store_result(con), "Invaliid result set");
FAIL_UNLESS(row= mysql_fetch_row(rs), "Nothing to fetch");
is_null= row[0] == NULL;
if (!is_null)
*var_value= atoi(row[0]);
mysql_free_result(rs);
return is_null;
} | O0 | c | query_int_variable:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x150(%rbp)
movq %rsi, -0x158(%rbp)
movq %rdx, -0x160(%rbp)
leaq -0x140(%rbp), %rdi
movq -0x158(%rbp), %rdx
leaq 0x50865(%rip), %rsi # 0x65737
movb $0x0, %al
callq 0x140f0
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x38a70
cmpl $0x0, %eax
je 0x14f1e
leaq 0x50698(%rip), %rdi # 0x65590
leaq 0x50842(%rip), %rsi # 0x65741
leaq 0x506b2(%rip), %rdx # 0x655b8
movl $0x1a2, %ecx # imm = 0x1A2
movb $0x0, %al
callq 0x2fc40
movb $0x1, -0x141(%rbp)
jmp 0x15005
jmp 0x14f20
jmp 0x14f22
movq -0x150(%rbp), %rdi
callq 0x3a0c0
movq %rax, -0x168(%rbp)
cmpq $0x0, %rax
jne 0x14f68
leaq 0x5064e(%rip), %rdi # 0x65590
leaq 0x50805(%rip), %rsi # 0x6574e
leaq 0x50668(%rip), %rdx # 0x655b8
movl $0x1a3, %ecx # imm = 0x1A3
movb $0x0, %al
callq 0x2fc40
movb $0x1, -0x141(%rbp)
jmp 0x15005
jmp 0x14f6a
jmp 0x14f6c
movq -0x168(%rbp), %rdi
callq 0x3a400
movq %rax, -0x170(%rbp)
cmpq $0x0, %rax
jne 0x14faf
leaq 0x50604(%rip), %rdi # 0x65590
leaq 0x507cf(%rip), %rsi # 0x65762
leaq 0x5061e(%rip), %rdx # 0x655b8
movl $0x1a4, %ecx # imm = 0x1A4
movb $0x0, %al
callq 0x2fc40
movb $0x1, -0x141(%rbp)
jmp 0x15005
jmp 0x14fb1
movq -0x170(%rbp), %rax
cmpq $0x0, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x171(%rbp)
cmpb $0x0, -0x171(%rbp)
jne 0x14fed
movq -0x170(%rbp), %rax
movq (%rax), %rdi
callq 0x146c0
movl %eax, %ecx
movq -0x160(%rbp), %rax
movl %ecx, (%rax)
movq -0x168(%rbp), %rdi
callq 0x31900
movb -0x171(%rbp), %al
movb %al, -0x141(%rbp)
movb -0x141(%rbp), %al
movb %al, -0x172(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x15032
movb -0x172(%rbp), %al
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
callq 0x144c0
nopw (%rax,%rax)
| query_int_variable:
push rbp
mov rbp, rsp
sub rsp, 180h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_150], rdi
mov [rbp+var_158], rsi
mov [rbp+var_160], rdx
lea rdi, [rbp+var_140]
mov rdx, [rbp+var_158]
lea rsi, aSelectS; "SELECT %s"
mov al, 0
call _sprintf
mov rdi, [rbp+var_150]
lea rsi, [rbp+var_140]
call mysql_query
cmp eax, 0
jz short loc_14F1E
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aQueryFailed; "Query failed"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1A2h
mov al, 0
call diag
mov [rbp+var_141], 1
jmp loc_15005
loc_14F1E:
jmp short $+2
loc_14F20:
jmp short $+2
loc_14F22:
mov rdi, [rbp+var_150]
call mysql_store_result
mov [rbp+var_168], rax
cmp rax, 0
jnz short loc_14F68
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aInvaliidResult; "Invaliid result set"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1A3h
mov al, 0
call diag
mov [rbp+var_141], 1
jmp loc_15005
loc_14F68:
jmp short $+2
loc_14F6A:
jmp short $+2
loc_14F6C:
mov rdi, [rbp+var_168]
call mysql_fetch_row
mov [rbp+var_170], rax
cmp rax, 0
jnz short loc_14FAF
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aNothingToFetch; "Nothing to fetch"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1A4h
mov al, 0
call diag
mov [rbp+var_141], 1
jmp short loc_15005
loc_14FAF:
jmp short $+2
loc_14FB1:
mov rax, [rbp+var_170]
cmp qword ptr [rax], 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_171], al
cmp [rbp+var_171], 0
jnz short loc_14FED
mov rax, [rbp+var_170]
mov rdi, [rax]
call _atoi
mov ecx, eax
mov rax, [rbp+var_160]
mov [rax], ecx
loc_14FED:
mov rdi, [rbp+var_168]
call mysql_free_result
mov al, [rbp+var_171]
mov [rbp+var_141], al
loc_15005:
mov al, [rbp+var_141]
mov [rbp+var_172], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_15032
mov al, [rbp+var_172]
add rsp, 180h
pop rbp
retn
loc_15032:
call ___stack_chk_fail
| char query_int_variable(long long a1, const char *a2, _DWORD *a3)
{
int v3; // r8d
int v4; // r9d
int v5; // r8d
int v6; // r9d
int v7; // r8d
int v8; // r9d
bool v10; // [rsp+Fh] [rbp-171h]
_QWORD *row; // [rsp+10h] [rbp-170h]
long long v12; // [rsp+18h] [rbp-168h]
_BYTE v15[312]; // [rsp+40h] [rbp-140h] BYREF
unsigned long long v16; // [rsp+178h] [rbp-8h]
v16 = __readfsqword(0x28u);
sprintf(v15, "SELECT %s", a2);
if ( (unsigned int)mysql_query(a1, v15) )
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Query failed",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
418,
v3,
v4);
return 1;
}
else
{
v12 = mysql_store_result(a1);
if ( v12 )
{
row = (_QWORD *)mysql_fetch_row(v12);
if ( row )
{
v10 = *row == 0LL;
if ( *row )
*a3 = atoi(*row);
mysql_free_result(v12);
return v10;
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Nothing to fetch",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
420,
v7,
v8);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Invaliid result set",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
419,
v5,
v6);
return 1;
}
}
}
| query_int_variable:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x150],RDI
MOV qword ptr [RBP + -0x158],RSI
MOV qword ptr [RBP + -0x160],RDX
LEA RDI,[RBP + -0x140]
MOV RDX,qword ptr [RBP + -0x158]
LEA RSI,[0x165737]
MOV AL,0x0
CALL 0x001140f0
MOV RDI,qword ptr [RBP + -0x150]
LEA RSI,[RBP + -0x140]
CALL 0x00138a70
CMP EAX,0x0
JZ 0x00114f1e
LEA RDI,[0x165590]
LEA RSI,[0x165741]
LEA RDX,[0x1655b8]
MOV ECX,0x1a2
MOV AL,0x0
CALL 0x0012fc40
MOV byte ptr [RBP + -0x141],0x1
JMP 0x00115005
LAB_00114f1e:
JMP 0x00114f20
LAB_00114f20:
JMP 0x00114f22
LAB_00114f22:
MOV RDI,qword ptr [RBP + -0x150]
CALL 0x0013a0c0
MOV qword ptr [RBP + -0x168],RAX
CMP RAX,0x0
JNZ 0x00114f68
LEA RDI,[0x165590]
LEA RSI,[0x16574e]
LEA RDX,[0x1655b8]
MOV ECX,0x1a3
MOV AL,0x0
CALL 0x0012fc40
MOV byte ptr [RBP + -0x141],0x1
JMP 0x00115005
LAB_00114f68:
JMP 0x00114f6a
LAB_00114f6a:
JMP 0x00114f6c
LAB_00114f6c:
MOV RDI,qword ptr [RBP + -0x168]
CALL 0x0013a400
MOV qword ptr [RBP + -0x170],RAX
CMP RAX,0x0
JNZ 0x00114faf
LEA RDI,[0x165590]
LEA RSI,[0x165762]
LEA RDX,[0x1655b8]
MOV ECX,0x1a4
MOV AL,0x0
CALL 0x0012fc40
MOV byte ptr [RBP + -0x141],0x1
JMP 0x00115005
LAB_00114faf:
JMP 0x00114fb1
LAB_00114fb1:
MOV RAX,qword ptr [RBP + -0x170]
CMP qword ptr [RAX],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x171],AL
CMP byte ptr [RBP + -0x171],0x0
JNZ 0x00114fed
MOV RAX,qword ptr [RBP + -0x170]
MOV RDI,qword ptr [RAX]
CALL 0x001146c0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x160]
MOV dword ptr [RAX],ECX
LAB_00114fed:
MOV RDI,qword ptr [RBP + -0x168]
CALL 0x00131900
MOV AL,byte ptr [RBP + -0x171]
MOV byte ptr [RBP + -0x141],AL
LAB_00115005:
MOV AL,byte ptr [RBP + -0x141]
MOV byte ptr [RBP + -0x172],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00115032
MOV AL,byte ptr [RBP + -0x172]
ADD RSP,0x180
POP RBP
RET
LAB_00115032:
CALL 0x001144c0
|
int8 query_int_variable(int8 param_1,int8 param_2,int *param_3)
{
int iVar1;
long lVar2;
long *plVar3;
long in_FS_OFFSET;
bool local_149;
char local_148 [312];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
sprintf(local_148,"SELECT %s",param_2);
iVar1 = mysql_query(param_1,local_148);
if (iVar1 == 0) {
lVar2 = mysql_store_result(param_1);
if (lVar2 == 0) {
diag("Error: %s (%s: %d)","Invaliid result set",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x1a3
);
local_149 = true;
}
else {
plVar3 = (long *)mysql_fetch_row(lVar2);
if (plVar3 == (long *)0x0) {
diag("Error: %s (%s: %d)","Nothing to fetch",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
0x1a4);
local_149 = true;
}
else {
local_149 = *plVar3 == 0;
if (!local_149) {
iVar1 = atoi((char *)*plVar3);
*param_3 = iVar1;
}
mysql_free_result(lVar2);
}
}
}
else {
diag("Error: %s (%s: %d)","Query failed",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x1a2);
local_149 = true;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_149);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
32,577 | query_int_variable | eloqsql/libmariadb/unittest/libmariadb/my_test.h | my_bool query_int_variable(MYSQL *con, const char *var_name, int *var_value)
{
MYSQL_RES *rs;
MYSQL_ROW row;
char query_buffer[MAX_TEST_QUERY_LENGTH];
my_bool is_null;
sprintf(query_buffer,
"SELECT %s",
(const char *) var_name);
FAIL_IF(mysql_query(con, query_buffer), "Query failed");
FAIL_UNLESS(rs= mysql_store_result(con), "Invaliid result set");
FAIL_UNLESS(row= mysql_fetch_row(rs), "Nothing to fetch");
is_null= row[0] == NULL;
if (!is_null)
*var_value= atoi(row[0]);
mysql_free_result(rs);
return is_null;
} | O3 | c | query_int_variable:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rdx, %rbx
movq %rsi, %r8
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq 0x3160d(%rip), %rcx # 0x46387
leaq -0x150(%rbp), %r15
movl $0x12c, %edx # imm = 0x12C
movq %r15, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x142b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2bbf9
testl %eax, %eax
je 0x14dec
leaq 0x31435(%rip), %rdi # 0x461e0
leaq 0x315df(%rip), %rsi # 0x46391
leaq 0x3144f(%rip), %rdx # 0x46208
movl $0x1a2, %ecx # imm = 0x1A2
xorl %eax, %eax
callq 0x264ef
movb $0x1, %r14b
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x14e64
movl %r14d, %eax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x2caf1
testq %rax, %rax
je 0x14e26
movq %rax, %r15
movq %rax, %rdi
callq 0x2ccf4
testq %rax, %rax
je 0x14e45
movq (%rax), %rdi
testq %rdi, %rdi
sete %r14b
je 0x14e1c
callq 0x14710
movl %eax, (%rbx)
movq %r15, %rdi
callq 0x278a6
jmp 0x14dc8
leaq 0x313b3(%rip), %rdi # 0x461e0
leaq 0x3156a(%rip), %rsi # 0x4639e
leaq 0x313cd(%rip), %rdx # 0x46208
movl $0x1a3, %ecx # imm = 0x1A3
jmp 0x14dbe
leaq 0x31394(%rip), %rdi # 0x461e0
leaq 0x3155f(%rip), %rsi # 0x463b2
leaq 0x313ae(%rip), %rdx # 0x46208
movl $0x1a4, %ecx # imm = 0x1A4
jmp 0x14dbe
callq 0x14520
| query_int_variable:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 138h
mov rbx, rdx
mov r8, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
lea rcx, aSelectS; "SELECT %s"
lea r15, [rbp+var_150]
mov edx, 12Ch
mov rdi, r15
mov esi, 1
xor eax, eax
call ___sprintf_chk
mov rdi, r14
mov rsi, r15
call mysql_query
test eax, eax
jz short loc_14DEC
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aQueryFailed; "Query failed"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1A2h
loc_14DBE:
xor eax, eax
call diag
mov r14b, 1
loc_14DC8:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz loc_14E64
mov eax, r14d
add rsp, 138h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_14DEC:
mov rdi, r14
call mysql_store_result
test rax, rax
jz short loc_14E26
mov r15, rax
mov rdi, rax
call mysql_fetch_row
test rax, rax
jz short loc_14E45
mov rdi, [rax]
test rdi, rdi
setz r14b
jz short loc_14E1C
call _atoi
mov [rbx], eax
loc_14E1C:
mov rdi, r15
call mysql_free_result
jmp short loc_14DC8
loc_14E26:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aInvaliidResult; "Invaliid result set"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1A3h
jmp loc_14DBE
loc_14E45:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aNothingToFetch; "Nothing to fetch"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1A4h
jmp loc_14DBE
loc_14E64:
call ___stack_chk_fail
| long long query_int_variable(long long a1, const char *a2, _DWORD *a3)
{
unsigned int v4; // r14d
int v5; // r8d
int v6; // r9d
const char *v7; // rsi
int v8; // ecx
long long v10; // rax
long long v11; // r15
_QWORD *row; // rax
_BYTE v13[304]; // [rsp+0h] [rbp-150h] BYREF
unsigned long long v14; // [rsp+130h] [rbp-20h]
v4 = a1;
v14 = __readfsqword(0x28u);
__sprintf_chk(v13, 1LL, 300LL, "SELECT %s", a2);
if ( (unsigned int)mysql_query(a1, v13) )
{
v7 = "Query failed";
v8 = 418;
LABEL_3:
diag(
(unsigned int)"Error: %s (%s: %d)",
(_DWORD)v7,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
v8,
v5,
v6);
LOBYTE(v4) = 1;
return v4;
}
v10 = mysql_store_result(a1);
if ( !v10 )
{
v7 = "Invaliid result set";
v8 = 419;
goto LABEL_3;
}
v11 = v10;
row = (_QWORD *)mysql_fetch_row(v10);
if ( !row )
{
v7 = "Nothing to fetch";
v8 = 420;
goto LABEL_3;
}
LOBYTE(v4) = *row == 0LL;
if ( *row )
*a3 = atoi();
mysql_free_result(v11);
return v4;
}
| query_int_variable:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x138
MOV RBX,RDX
MOV R8,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA RCX,[0x146387]
LEA R15,[RBP + -0x150]
MOV EDX,0x12c
MOV RDI,R15
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001142b0
MOV RDI,R14
MOV RSI,R15
CALL 0x0012bbf9
TEST EAX,EAX
JZ 0x00114dec
LEA RDI,[0x1461e0]
LEA RSI,[0x146391]
LEA RDX,[0x146208]
MOV ECX,0x1a2
LAB_00114dbe:
XOR EAX,EAX
CALL 0x001264ef
MOV R14B,0x1
LAB_00114dc8:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00114e64
MOV EAX,R14D
ADD RSP,0x138
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00114dec:
MOV RDI,R14
CALL 0x0012caf1
TEST RAX,RAX
JZ 0x00114e26
MOV R15,RAX
MOV RDI,RAX
CALL 0x0012ccf4
TEST RAX,RAX
JZ 0x00114e45
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
SETZ R14B
JZ 0x00114e1c
CALL 0x00114710
MOV dword ptr [RBX],EAX
LAB_00114e1c:
MOV RDI,R15
CALL 0x001278a6
JMP 0x00114dc8
LAB_00114e26:
LEA RDI,[0x1461e0]
LEA RSI,[0x14639e]
LEA RDX,[0x146208]
MOV ECX,0x1a3
JMP 0x00114dbe
LAB_00114e45:
LEA RDI,[0x1461e0]
LEA RSI,[0x1463b2]
LEA RDX,[0x146208]
MOV ECX,0x1a4
JMP 0x00114dbe
LAB_00114e64:
CALL 0x00114520
|
ulong query_int_variable(int8 param_1,int8 param_2,int *param_3)
{
int iVar1;
long lVar2;
int8 *puVar3;
int8 uVar4;
char *pcVar5;
int7 uVar7;
ulong uVar6;
long in_FS_OFFSET;
int1 local_158 [304];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
__sprintf_chk(local_158,1,300,"SELECT %s",param_2);
iVar1 = mysql_query(param_1,local_158);
uVar7 = (int7)((ulong)param_1 >> 8);
if (iVar1 == 0) {
lVar2 = mysql_store_result(param_1);
if (lVar2 == 0) {
pcVar5 = "Invaliid result set";
uVar4 = 0x1a3;
}
else {
puVar3 = (int8 *)mysql_fetch_row(lVar2);
if (puVar3 != (int8 *)0x0) {
pcVar5 = (char *)*puVar3;
uVar6 = CONCAT71(uVar7,pcVar5 == (char *)0x0);
if (pcVar5 != (char *)0x0) {
iVar1 = atoi(pcVar5);
*param_3 = iVar1;
}
mysql_free_result(lVar2);
goto LAB_00114dc8;
}
pcVar5 = "Nothing to fetch";
uVar4 = 0x1a4;
}
}
else {
pcVar5 = "Query failed";
uVar4 = 0x1a2;
}
diag("Error: %s (%s: %d)",pcVar5,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",uVar4);
uVar6 = CONCAT71(uVar7,1);
LAB_00114dc8:
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return uVar6 & 0xffffffff;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
32,578 | test_bug2248 | eloqsql/tests/mysql_client_test.c | static void test_bug2248()
{
MYSQL_STMT *stmt;
int rc;
const char *query1= "SELECT DATABASE()";
const char *query2= "INSERT INTO test_bug2248 VALUES (10)";
myheader("test_bug2248");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bug2248");
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE test_bug2248 (id int)");
myquery(rc);
stmt= mysql_simple_prepare(mysql, query1);
check_stmt(stmt);
/* This should not hang */
rc= mysql_stmt_fetch(stmt);
check_execute_r(stmt, rc);
/* And this too */
rc= mysql_stmt_store_result(stmt);
check_execute_r(stmt, rc);
mysql_stmt_close(stmt);
stmt= mysql_simple_prepare(mysql, query2);
check_stmt(stmt);
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
/* This too should not hang but should return proper error */
rc= mysql_stmt_fetch(stmt);
DIE_UNLESS(rc == 1);
/* This too should not hang but should not bark */
rc= mysql_stmt_store_result(stmt);
check_execute(stmt, rc);
/* This should return proper error */
rc= mysql_stmt_fetch(stmt);
check_execute_r(stmt, rc);
DIE_UNLESS(rc == 1);
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP TABLE test_bug2248");
myquery(rc);
} | O0 | c | test_bug2248:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0xd51b2(%rip), %rax # 0x137fa1
movq %rax, -0x18(%rbp)
leaq 0xd51b9(%rip), %rax # 0x137fb3
movq %rax, -0x20(%rbp)
jmp 0x62e00
movsbl 0x4076ca(%rip), %eax # 0x46a4d1
cmpl $0x2, %eax
jge 0x62e88
movq 0x24c1c5(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0xcb507(%rip), %rsi # 0x12e324
movb $0x0, %al
callq 0x3a1c0
movq 0x24c1ad(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
movl 0x4078e8(%rip), %edx # 0x46a71c
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x4078dd(%rip) # 0x46a71c
movl 0x4078d3(%rip), %ecx # 0x46a718
movl 0x4076b0(%rip), %r8d # 0x46a4fc
leaq 0xcc7d9(%rip), %rsi # 0x12f62c
leaq 0xd51ce(%rip), %r9 # 0x138028
movb $0x0, %al
callq 0x3a1c0
movq 0x24c170(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0xcb4ea(%rip), %rsi # 0x12e35c
movb $0x0, %al
callq 0x3a1c0
movq 0x24c158(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
callq 0x3a4a0
movq 0x407649(%rip), %rdi # 0x46a4d8
leaq 0xd5142(%rip), %rsi # 0x137fd8
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x62eb3
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x24(%rbp)
jne 0x62ebb
jmp 0x62ed3
leaq 0xcad4a(%rip), %rdi # 0x12dc0c
movl $0x24f8, %esi # imm = 0x24F8
leaq 0xe10a1(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x4075fe(%rip), %rdi # 0x46a4d8
leaq 0xd5119(%rip), %rsi # 0x137ffa
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x62efe
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x28(%rbp)
jne 0x62f06
jmp 0x62f1e
leaq 0xcacff(%rip), %rdi # 0x12dc0c
movl $0x24fb, %esi # imm = 0x24FB
leaq 0xe1056(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x4075b3(%rip), %rdi # 0x46a4d8
movq -0x18(%rbp), %rsi
callq 0x3be90
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x62f42
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpq $0x0, -0x8(%rbp)
je 0x62f4b
jmp 0x62f63
leaq 0xcacba(%rip), %rdi # 0x12dc0c
movl $0x24fe, %esi # imm = 0x24FE
leaq 0xcaa0c(%rip), %rdx # 0x12d96a
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b910
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x62f82
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xc(%rbp)
je 0x62f8a
jmp 0x62fa2
leaq 0xcac7b(%rip), %rdi # 0x12dc0c
movl $0x2502, %esi # imm = 0x2502
leaq 0xccae0(%rip), %rdx # 0x12fa7d
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b980
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x62fc1
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xc(%rbp)
je 0x62fc9
jmp 0x62fe1
leaq 0xcac3c(%rip), %rdi # 0x12dc0c
movl $0x2506, %esi # imm = 0x2506
leaq 0xccaa1(%rip), %rdx # 0x12fa7d
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b9f0
movq 0x4074e7(%rip), %rdi # 0x46a4d8
movq -0x20(%rbp), %rsi
callq 0x3be90
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x6300e
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpq $0x0, -0x8(%rbp)
je 0x63017
jmp 0x6302f
leaq 0xcabee(%rip), %rdi # 0x12dc0c
movl $0x250b, %esi # imm = 0x250B
leaq 0xca940(%rip), %rdx # 0x12d96a
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b8a0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x6304e
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xc(%rbp)
jne 0x63056
jmp 0x6306e
leaq 0xcabaf(%rip), %rdi # 0x12dc0c
movl $0x250e, %esi # imm = 0x250E
leaq 0xd67a3(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b910
movl %eax, -0xc(%rbp)
cmpl $0x1, -0xc(%rbp)
jne 0x63082
jmp 0x6309a
leaq 0xcab83(%rip), %rdi # 0x12dc0c
movl $0x2512, %esi # imm = 0x2512
leaq 0xccdf5(%rip), %rdx # 0x12fe8a
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b980
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x630b9
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xc(%rbp)
jne 0x630c1
jmp 0x630d9
leaq 0xcab44(%rip), %rdi # 0x12dc0c
movl $0x2516, %esi # imm = 0x2516
leaq 0xd6738(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b910
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x630f8
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xc(%rbp)
je 0x63100
jmp 0x63118
leaq 0xcab05(%rip), %rdi # 0x12dc0c
movl $0x251a, %esi # imm = 0x251A
leaq 0xcc96a(%rip), %rdx # 0x12fa7d
callq 0x3c010
cmpl $0x1, -0xc(%rbp)
jne 0x63120
jmp 0x63138
leaq 0xcaae5(%rip), %rdi # 0x12dc0c
movl $0x251b, %esi # imm = 0x251B
leaq 0xccd57(%rip), %rdx # 0x12fe8a
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b9f0
movq 0x407390(%rip), %rdi # 0x46a4d8
leaq 0xd4ece(%rip), %rsi # 0x13801d
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x6316c
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x2c(%rbp)
jne 0x63174
jmp 0x6318c
leaq 0xcaa91(%rip), %rdi # 0x12dc0c
movl $0x2520, %esi # imm = 0x2520
leaq 0xe0de8(%rip), %rdx # 0x143f6f
callq 0x3c010
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| test_bug2248:
push rbp
mov rbp, rsp
sub rsp, 30h
lea rax, aSelectDatabase_0; "SELECT DATABASE()"
mov [rbp+var_18], rax
lea rax, aInsertIntoTest_63; "INSERT INTO test_bug2248 VALUES (10)"
mov [rbp+var_20], rax
jmp short $+2
loc_62E00:
movsx eax, cs:opt_silent
cmp eax, 2
jge short loc_62E88
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E324; "\n\n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov edx, cs:test_count
mov eax, edx
add eax, 1
mov cs:test_count, eax
mov ecx, cs:iter_count
mov r8d, cs:opt_count
lea rsi, aUOfUUS; "%u of (%u/%u): %s"
lea r9, aDropTableTestB_0+0Bh; "test_bug2248"
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E35C; " \n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
loc_62E88:
mov rdi, cs:mysql
lea rsi, aDropTableIfExi_61; "DROP TABLE IF EXISTS test_bug2248"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jz short loc_62EB3
xor eax, eax
mov edi, eax
call print_error
loc_62EB3:
cmp [rbp+var_24], 0
jnz short loc_62EBB
jmp short loc_62ED3
loc_62EBB:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 24F8h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_62ED3:
mov rdi, cs:mysql
lea rsi, aCreateTableTes_67; "CREATE TABLE test_bug2248 (id int)"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_28], eax
cmp [rbp+var_28], 0
jz short loc_62EFE
xor eax, eax
mov edi, eax
call print_error
loc_62EFE:
cmp [rbp+var_28], 0
jnz short loc_62F06
jmp short loc_62F1E
loc_62F06:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 24FBh
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_62F1E:
mov rdi, cs:mysql
mov rsi, [rbp+var_18]
call mysql_simple_prepare
mov [rbp+var_8], rax
cmp [rbp+var_8], 0
jnz short loc_62F42
xor eax, eax
mov edi, eax
call print_error
loc_62F42:
cmp [rbp+var_8], 0
jz short loc_62F4B
jmp short loc_62F63
loc_62F4B:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 24FEh
lea rdx, aStmt0; "stmt != 0"
call die
loc_62F63:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_fetch
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_62F82
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call print_st_error
loc_62F82:
cmp [rbp+var_C], 0
jz short loc_62F8A
jmp short loc_62FA2
loc_62F8A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2502h
lea rdx, aRc0_0; "rc != 0"
call die
loc_62FA2:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_store_result
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_62FC1
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call print_st_error
loc_62FC1:
cmp [rbp+var_C], 0
jz short loc_62FC9
jmp short loc_62FE1
loc_62FC9:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2506h
lea rdx, aRc0_0; "rc != 0"
call die
loc_62FE1:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_close
mov rdi, cs:mysql
mov rsi, [rbp+var_20]
call mysql_simple_prepare
mov [rbp+var_8], rax
cmp [rbp+var_8], 0
jnz short loc_6300E
xor eax, eax
mov edi, eax
call print_error
loc_6300E:
cmp [rbp+var_8], 0
jz short loc_63017
jmp short loc_6302F
loc_63017:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 250Bh
lea rdx, aStmt0; "stmt != 0"
call die
loc_6302F:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_execute
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_6304E
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call print_st_error
loc_6304E:
cmp [rbp+var_C], 0
jnz short loc_63056
jmp short loc_6306E
loc_63056:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 250Eh
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_6306E:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_fetch
mov [rbp+var_C], eax
cmp [rbp+var_C], 1
jnz short loc_63082
jmp short loc_6309A
loc_63082:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2512h
lea rdx, aRc1; "rc == 1"
call die
loc_6309A:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_store_result
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_630B9
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call print_st_error
loc_630B9:
cmp [rbp+var_C], 0
jnz short loc_630C1
jmp short loc_630D9
loc_630C1:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2516h
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_630D9:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_fetch
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_630F8
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call print_st_error
loc_630F8:
cmp [rbp+var_C], 0
jz short loc_63100
jmp short loc_63118
loc_63100:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 251Ah
lea rdx, aRc0_0; "rc != 0"
call die
loc_63118:
cmp [rbp+var_C], 1
jnz short loc_63120
jmp short loc_63138
loc_63120:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 251Bh
lea rdx, aRc1; "rc == 1"
call die
loc_63138:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_close
mov rdi, cs:mysql
lea rsi, aDropTableTestB_0; "DROP TABLE test_bug2248"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jz short loc_6316C
xor eax, eax
mov edi, eax
call print_error
loc_6316C:
cmp [rbp+var_2C], 0
jnz short loc_63174
jmp short loc_6318C
loc_63174:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2520h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_6318C:
add rsp, 30h
pop rbp
retn
| void test_bug2248()
{
int v0; // edx
int v1; // [rsp+24h] [rbp-Ch]
long long v2; // [rsp+28h] [rbp-8h]
long long v3; // [rsp+28h] [rbp-8h]
if ( opt_silent < 2 )
{
fprintf(stdout, "\n\n#####################################\n");
v0 = test_count++;
fprintf(stdout, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_bug2248");
fprintf(stdout, " \n#####################################\n");
fflush(stdout);
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"DROP TABLE IF EXISTS test_bug2248") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9464, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"CREATE TABLE test_bug2248 (id int)") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9467, "r == 0");
}
v2 = mysql_simple_prepare(mysql, (long long)"SELECT DATABASE()");
if ( !v2 )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9470, "stmt != 0");
}
if ( !(unsigned int)wrap_mysql_stmt_fetch(v2) )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9474, "rc != 0");
print_st_error(v2, 0LL);
if ( !(unsigned int)wrap_mysql_stmt_store_result(v2) )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9478, "rc != 0");
print_st_error(v2, 0LL);
wrap_mysql_stmt_close(v2);
v3 = mysql_simple_prepare(mysql, (long long)"INSERT INTO test_bug2248 VALUES (10)");
if ( !v3 )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9483, "stmt != 0");
}
if ( (unsigned int)wrap_mysql_stmt_execute(v3) )
{
print_st_error(v3, 0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9486, "rc == 0");
}
if ( (unsigned int)wrap_mysql_stmt_fetch(v3) != 1 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9490, "rc == 1");
if ( (unsigned int)wrap_mysql_stmt_store_result(v3) )
{
print_st_error(v3, 0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9494, "rc == 0");
}
v1 = wrap_mysql_stmt_fetch(v3);
if ( !v1 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9498, "rc != 0");
print_st_error(v3, 0LL);
if ( v1 != 1 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9499, "rc == 1");
wrap_mysql_stmt_close(v3);
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"DROP TABLE test_bug2248") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9504, "r == 0");
}
}
| test_bug2248:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
LEA RAX,[0x237fa1]
MOV qword ptr [RBP + -0x18],RAX
LEA RAX,[0x237fb3]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00162e00
LAB_00162e00:
MOVSX EAX,byte ptr [0x0056a4d1]
CMP EAX,0x2
JGE 0x00162e88
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e324]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [0x0056a71c]
MOV EAX,EDX
ADD EAX,0x1
MOV dword ptr [0x0056a71c],EAX
MOV ECX,dword ptr [0x0056a718]
MOV R8D,dword ptr [0x0056a4fc]
LEA RSI,[0x22f62c]
LEA R9,[0x238028]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e35c]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
CALL 0x0013a4a0
LAB_00162e88:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x237fd8]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00162eb3
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00162eb3:
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x00162ebb
JMP 0x00162ed3
LAB_00162ebb:
LEA RDI,[0x22dc0c]
MOV ESI,0x24f8
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00162ed3:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x237ffa]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x28],0x0
JZ 0x00162efe
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00162efe:
CMP dword ptr [RBP + -0x28],0x0
JNZ 0x00162f06
JMP 0x00162f1e
LAB_00162f06:
LEA RDI,[0x22dc0c]
MOV ESI,0x24fb
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00162f1e:
MOV RDI,qword ptr [0x0056a4d8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0013be90
MOV qword ptr [RBP + -0x8],RAX
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x00162f42
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00162f42:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x00162f4b
JMP 0x00162f63
LAB_00162f4b:
LEA RDI,[0x22dc0c]
MOV ESI,0x24fe
LEA RDX,[0x22d96a]
CALL 0x0013c010
LAB_00162f63:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b910
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00162f82
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_00162f82:
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00162f8a
JMP 0x00162fa2
LAB_00162f8a:
LEA RDI,[0x22dc0c]
MOV ESI,0x2502
LEA RDX,[0x22fa7d]
CALL 0x0013c010
LAB_00162fa2:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b980
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00162fc1
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_00162fc1:
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00162fc9
JMP 0x00162fe1
LAB_00162fc9:
LEA RDI,[0x22dc0c]
MOV ESI,0x2506
LEA RDX,[0x22fa7d]
CALL 0x0013c010
LAB_00162fe1:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b9f0
MOV RDI,qword ptr [0x0056a4d8]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0013be90
MOV qword ptr [RBP + -0x8],RAX
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x0016300e
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0016300e:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x00163017
JMP 0x0016302f
LAB_00163017:
LEA RDI,[0x22dc0c]
MOV ESI,0x250b
LEA RDX,[0x22d96a]
CALL 0x0013c010
LAB_0016302f:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b8a0
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x0016304e
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_0016304e:
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x00163056
JMP 0x0016306e
LAB_00163056:
LEA RDI,[0x22dc0c]
MOV ESI,0x250e
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_0016306e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b910
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x1
JNZ 0x00163082
JMP 0x0016309a
LAB_00163082:
LEA RDI,[0x22dc0c]
MOV ESI,0x2512
LEA RDX,[0x22fe8a]
CALL 0x0013c010
LAB_0016309a:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b980
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x001630b9
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_001630b9:
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x001630c1
JMP 0x001630d9
LAB_001630c1:
LEA RDI,[0x22dc0c]
MOV ESI,0x2516
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_001630d9:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b910
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x001630f8
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_001630f8:
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00163100
JMP 0x00163118
LAB_00163100:
LEA RDI,[0x22dc0c]
MOV ESI,0x251a
LEA RDX,[0x22fa7d]
CALL 0x0013c010
LAB_00163118:
CMP dword ptr [RBP + -0xc],0x1
JNZ 0x00163120
JMP 0x00163138
LAB_00163120:
LEA RDI,[0x22dc0c]
MOV ESI,0x251b
LEA RDX,[0x22fe8a]
CALL 0x0013c010
LAB_00163138:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b9f0
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x23801d]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0016316c
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0016316c:
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x00163174
JMP 0x0016318c
LAB_00163174:
LEA RDI,[0x22dc0c]
MOV ESI,0x2520
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0016318c:
ADD RSP,0x30
POP RBP
RET
|
void test_bug2248(void)
{
int iVar1;
long lVar2;
ulong uVar3;
if (opt_silent < '\x02') {
fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n");
uVar3 = (ulong)test_count;
test_count = test_count + 1;
fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar3,(ulong)iter_count,
(ulong)opt_count,"test_bug2248");
fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n");
fflush(*(FILE **)PTR_stdout_003aefd8);
}
iVar1 = wrap_mysql_query(mysql,"DROP TABLE IF EXISTS test_bug2248");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x24f8,"r == 0");
}
iVar1 = wrap_mysql_query(mysql,"CREATE TABLE test_bug2248 (id int)");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x24fb,"r == 0");
}
lVar2 = mysql_simple_prepare(mysql,"SELECT DATABASE()");
if (lVar2 == 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x24fe,"stmt != 0");
}
iVar1 = wrap_mysql_stmt_fetch(lVar2);
if (iVar1 == 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2502,"rc != 0");
}
else {
print_st_error(lVar2,0);
}
iVar1 = wrap_mysql_stmt_store_result(lVar2);
if (iVar1 == 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2506,"rc != 0");
}
else {
print_st_error(lVar2,0);
}
wrap_mysql_stmt_close(lVar2);
lVar2 = mysql_simple_prepare(mysql,"INSERT INTO test_bug2248 VALUES (10)");
if (lVar2 == 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x250b,"stmt != 0");
}
iVar1 = wrap_mysql_stmt_execute(lVar2);
if (iVar1 != 0) {
print_st_error(lVar2,0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x250e,"rc == 0");
}
iVar1 = wrap_mysql_stmt_fetch(lVar2);
if (iVar1 != 1) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2512,"rc == 1");
}
iVar1 = wrap_mysql_stmt_store_result(lVar2);
if (iVar1 != 0) {
print_st_error(lVar2,0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2516,"rc == 0");
}
iVar1 = wrap_mysql_stmt_fetch(lVar2);
if (iVar1 == 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x251a,"rc != 0");
}
else {
print_st_error(lVar2,0);
}
if (iVar1 != 1) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x251b,"rc == 1");
}
wrap_mysql_stmt_close(lVar2);
iVar1 = wrap_mysql_query(mysql,"DROP TABLE test_bug2248");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2520,"r == 0");
}
return;
}
| |
32,579 | my_symlink | eloqsql/mysys/my_symlink.c | int my_symlink(const char *content, const char *linkname, myf MyFlags)
{
#ifndef HAVE_READLINK
return 0;
#else
int result;
DBUG_ENTER("my_symlink");
DBUG_PRINT("enter",("content: %s linkname: %s", content, linkname));
result= 0;
if (symlink(content, linkname))
{
result= -1;
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_CANT_SYMLINK, MYF(0), linkname, content, errno);
}
else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(linkname, MyFlags))
result= -1;
DBUG_RETURN(result);
#endif /* HAVE_READLINK */
} | O3 | c | my_symlink:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
callq 0x29050
testl %eax, %eax
je 0xa1c96
callq 0x297b0
movq %rax, %r13
movl (%rax), %r14d
callq 0xa29fe
movl %r14d, (%rax)
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
testb $0x10, %r15b
je 0xa1cb2
movl (%r13), %r8d
movl $0x19, %edi
xorl %esi, %esi
movq %rbx, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x9f0b3
jmp 0xa1cb2
xorl %r14d, %r14d
testw %r15w, %r15w
jns 0xa1cb2
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa251f
xorl %r14d, %r14d
negl %eax
sbbl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_symlink:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov rbx, rsi
mov r12, rdi
call _symlink
test eax, eax
jz short loc_A1C96
call ___errno_location
mov r13, rax
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
mov r14d, 0FFFFFFFFh
test r15b, 10h
jz short loc_A1CB2
mov r8d, [r13+0]
mov edi, 19h
xor esi, esi
mov rdx, rbx
mov rcx, r12
xor eax, eax
call my_error
jmp short loc_A1CB2
loc_A1C96:
xor r14d, r14d
test r15w, r15w
jns short loc_A1CB2
mov rdi, rbx
mov rsi, r15
call my_sync_dir_by_file
xor r14d, r14d
neg eax
sbb r14d, r14d
loc_A1CB2:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_symlink(long long a1, const char *a2, long long a3)
{
unsigned int *v4; // r13
unsigned int v5; // r14d
unsigned int v6; // r14d
if ( (unsigned int)symlink(a1) )
{
v4 = (unsigned int *)__errno_location(a1);
v5 = *v4;
*(_DWORD *)my_thread_var(a1, a2) = v5;
v6 = -1;
if ( (a3 & 0x10) != 0 )
my_error(0x19u, 0LL, a2, a1, *v4);
}
else
{
v6 = 0;
if ( (a3 & 0x8000u) != 0LL )
return (unsigned int)-((unsigned int)my_sync_dir_by_file(a2, a3) != 0);
}
return v6;
}
| my_symlink:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV RBX,RSI
MOV R12,RDI
CALL 0x00129050
TEST EAX,EAX
JZ 0x001a1c96
CALL 0x001297b0
MOV R13,RAX
MOV R14D,dword ptr [RAX]
CALL 0x001a29fe
MOV dword ptr [RAX],R14D
MOV R14D,0xffffffff
TEST R15B,0x10
JZ 0x001a1cb2
MOV R8D,dword ptr [R13]
MOV EDI,0x19
XOR ESI,ESI
MOV RDX,RBX
MOV RCX,R12
XOR EAX,EAX
CALL 0x0019f0b3
JMP 0x001a1cb2
LAB_001a1c96:
XOR R14D,R14D
TEST R15W,R15W
JNS 0x001a1cb2
MOV RDI,RBX
MOV RSI,R15
CALL 0x001a251f
XOR R14D,R14D
NEG EAX
SBB R14D,R14D
LAB_001a1cb2:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_symlink(char *param_1,char *param_2,ulong param_3)
{
int iVar1;
int *piVar2;
int *piVar3;
iVar1 = symlink(param_1,param_2);
if (iVar1 == 0) {
iVar1 = 0;
if ((short)param_3 < 0) {
iVar1 = my_sync_dir_by_file(param_2,param_3);
iVar1 = -(uint)(iVar1 != 0);
}
}
else {
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
iVar1 = -1;
if ((param_3 & 0x10) != 0) {
my_error(0x19,0,param_2,param_1,*piVar2);
}
}
return iVar1;
}
| |
32,580 | PollInputEvents | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | void PollInputEvents(void)
{
#if defined(SUPPORT_GESTURES_SYSTEM)
// NOTE: Gestures update must be called every frame to reset gestures correctly
// because ProcessGestureEvent() is just called on an event, not every frame
UpdateGestures();
#endif
// Reset keys/chars pressed registered
CORE.Input.Keyboard.keyPressedQueueCount = 0;
CORE.Input.Keyboard.charPressedQueueCount = 0;
// Reset last gamepad button/axis registered state
CORE.Input.Gamepad.lastButtonPressed = 0; // GAMEPAD_BUTTON_UNKNOWN
//CORE.Input.Gamepad.axisCount = 0;
// Keyboard/Mouse input polling (automatically managed by GLFW3 through callback)
// Register previous keys states
for (int i = 0; i < MAX_KEYBOARD_KEYS; i++)
{
CORE.Input.Keyboard.previousKeyState[i] = CORE.Input.Keyboard.currentKeyState[i];
CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
}
// Register previous mouse states
for (int i = 0; i < MAX_MOUSE_BUTTONS; i++) CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i];
// Register previous mouse wheel state
CORE.Input.Mouse.previousWheelMove = CORE.Input.Mouse.currentWheelMove;
CORE.Input.Mouse.currentWheelMove = (Vector2){ 0.0f, 0.0f };
// Register previous mouse position
CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition;
// Register previous touch states
for (int i = 0; i < MAX_TOUCH_POINTS; i++) CORE.Input.Touch.previousTouchState[i] = CORE.Input.Touch.currentTouchState[i];
// Reset touch positions
//for (int i = 0; i < MAX_TOUCH_POINTS; i++) CORE.Input.Touch.position[i] = (Vector2){ 0, 0 };
// Map touch position to mouse position for convenience
// WARNING: If the target desktop device supports touch screen, this behaviour should be reviewed!
// TODO: GLFW does not support multi-touch input just yet
// https://www.codeproject.com/Articles/668404/Programming-for-Multi-Touch
// https://docs.microsoft.com/en-us/windows/win32/wintouch/getting-started-with-multi-touch-messages
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
// Check if gamepads are ready
// NOTE: We do it here in case of disconnection
for (int i = 0; i < MAX_GAMEPADS; i++)
{
if (glfwJoystickPresent(i)) CORE.Input.Gamepad.ready[i] = true;
else CORE.Input.Gamepad.ready[i] = false;
}
// Register gamepads buttons events
for (int i = 0; i < MAX_GAMEPADS; i++)
{
if (CORE.Input.Gamepad.ready[i]) // Check if gamepad is available
{
// Register previous gamepad states
for (int k = 0; k < MAX_GAMEPAD_BUTTONS; k++) CORE.Input.Gamepad.previousButtonState[i][k] = CORE.Input.Gamepad.currentButtonState[i][k];
// Get current gamepad state
// NOTE: There is no callback available, so we get it manually
GLFWgamepadstate state = { 0 };
glfwGetGamepadState(i, &state); // This remapps all gamepads so they have their buttons mapped like an xbox controller
const unsigned char *buttons = state.buttons;
for (int k = 0; (buttons != NULL) && (k < MAX_GAMEPAD_BUTTONS); k++)
{
int button = -1; // GamepadButton enum values assigned
switch (k)
{
case GLFW_GAMEPAD_BUTTON_Y: button = GAMEPAD_BUTTON_RIGHT_FACE_UP; break;
case GLFW_GAMEPAD_BUTTON_B: button = GAMEPAD_BUTTON_RIGHT_FACE_RIGHT; break;
case GLFW_GAMEPAD_BUTTON_A: button = GAMEPAD_BUTTON_RIGHT_FACE_DOWN; break;
case GLFW_GAMEPAD_BUTTON_X: button = GAMEPAD_BUTTON_RIGHT_FACE_LEFT; break;
case GLFW_GAMEPAD_BUTTON_LEFT_BUMPER: button = GAMEPAD_BUTTON_LEFT_TRIGGER_1; break;
case GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER: button = GAMEPAD_BUTTON_RIGHT_TRIGGER_1; break;
case GLFW_GAMEPAD_BUTTON_BACK: button = GAMEPAD_BUTTON_MIDDLE_LEFT; break;
case GLFW_GAMEPAD_BUTTON_GUIDE: button = GAMEPAD_BUTTON_MIDDLE; break;
case GLFW_GAMEPAD_BUTTON_START: button = GAMEPAD_BUTTON_MIDDLE_RIGHT; break;
case GLFW_GAMEPAD_BUTTON_DPAD_UP: button = GAMEPAD_BUTTON_LEFT_FACE_UP; break;
case GLFW_GAMEPAD_BUTTON_DPAD_RIGHT: button = GAMEPAD_BUTTON_LEFT_FACE_RIGHT; break;
case GLFW_GAMEPAD_BUTTON_DPAD_DOWN: button = GAMEPAD_BUTTON_LEFT_FACE_DOWN; break;
case GLFW_GAMEPAD_BUTTON_DPAD_LEFT: button = GAMEPAD_BUTTON_LEFT_FACE_LEFT; break;
case GLFW_GAMEPAD_BUTTON_LEFT_THUMB: button = GAMEPAD_BUTTON_LEFT_THUMB; break;
case GLFW_GAMEPAD_BUTTON_RIGHT_THUMB: button = GAMEPAD_BUTTON_RIGHT_THUMB; break;
default: break;
}
if (button != -1) // Check for valid button
{
if (buttons[k] == GLFW_PRESS)
{
CORE.Input.Gamepad.currentButtonState[i][button] = 1;
CORE.Input.Gamepad.lastButtonPressed = button;
}
else CORE.Input.Gamepad.currentButtonState[i][button] = 0;
}
}
// Get current axis state
const float *axes = state.axes;
for (int k = 0; (axes != NULL) && (k < GLFW_GAMEPAD_AXIS_LAST + 1); k++)
{
CORE.Input.Gamepad.axisState[i][k] = axes[k];
}
// Register buttons for 2nd triggers (because GLFW doesn't count these as buttons but rather axis)
CORE.Input.Gamepad.currentButtonState[i][GAMEPAD_BUTTON_LEFT_TRIGGER_2] = (char)(CORE.Input.Gamepad.axisState[i][GAMEPAD_AXIS_LEFT_TRIGGER] > 0.1f);
CORE.Input.Gamepad.currentButtonState[i][GAMEPAD_BUTTON_RIGHT_TRIGGER_2] = (char)(CORE.Input.Gamepad.axisState[i][GAMEPAD_AXIS_RIGHT_TRIGGER] > 0.1f);
CORE.Input.Gamepad.axisCount[i] = GLFW_GAMEPAD_AXIS_LAST + 1;
}
}
CORE.Window.resizedLastFrame = false;
if (CORE.Window.eventWaiting) glfwWaitEvents(); // Wait for in input events before continue (drawing is paused)
else glfwPollEvents(); // Poll input events: keyboard/mouse/window events (callbacks) -> Update keys state
// While window minimized, stop loop execution
while (IsWindowState(FLAG_WINDOW_MINIMIZED) && !IsWindowState(FLAG_WINDOW_ALWAYS_RUN)) glfwWaitEvents();
CORE.Window.shouldClose = glfwWindowShouldClose(platform.handle);
// Reset close status for next frame
glfwSetWindowShouldClose(platform.handle, GLFW_FALSE);
} | O2 | c | PollInputEvents:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
callq 0x5abd5
andl $0x0, 0xc9146(%rip) # 0x1282e4
andl $0x0, 0xc9183(%rip) # 0x128328
andl $0x0, 0xc923c(%rip) # 0x1283e8
movq $-0x200, %rax # imm = 0xFE00
leaq 0xc8a26(%rip), %r15 # 0x127be0
testq %rax, %rax
je 0x5f1dd
movb 0x2c4(%rax,%r15), %cl
movb %cl, 0x4c4(%rax,%r15)
movb $0x0, 0x6c4(%rax,%r15)
incq %rax
jmp 0x5f1ba
pushq $-0x8
popq %rax
testq %rax, %rax
je 0x5f1fa
movb 0x77a(%rax,%r15), %cl
movb %cl, 0x782(%rax,%r15)
incq %rax
jmp 0x5f1e0
movq 0xc9163(%rip), %rax # 0x128364
movq %rax, 0xc9164(%rip) # 0x12836c
andq $0x0, 0xc9154(%rip) # 0x128364
movq 0xc9125(%rip), %rax # 0x12833c
movq %rax, 0xc9126(%rip) # 0x128344
pushq $-0x8
popq %rcx
testq %rcx, %rcx
je 0x5f23b
movb 0x800(%rcx,%r15), %dl
movb %dl, 0x808(%rcx,%r15)
incq %rcx
jmp 0x5f221
movq %rax, 0xc9156(%rip) # 0x128398
xorl %ebx, %ebx
cmpq $0x4, %rbx
je 0x5f261
movl %ebx, %edi
callq 0xa4b66
testl %eax, %eax
setne 0x81c(%rbx,%r15)
incq %rbx
jmp 0x5f244
leaq 0xc9318(%rip), %r12 # 0x128580
leaq 0xc9391(%rip), %r13 # 0x128600
xorl %ebx, %ebx
movq %rsp, %r14
leaq 0x65745(%rip), %rbp # 0xc49c0
cmpq $0x4, %rbx
je 0x5f375
cmpb $0x1, 0x81c(%rbx,%r15)
jne 0x5f365
xorl %eax, %eax
cmpq $0x20, %rax
je 0x5f2aa
movb -0x80(%r12,%rax), %cl
movb %cl, (%r12,%rax)
incq %rax
jmp 0x5f296
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
andq $0x0, 0x20(%rsp)
movl %ebx, %edi
movq %r14, %rsi
callq 0xa55e7
movq %rbx, %rax
shlq $0x5, %rax
leaq (%r15,%rax), %rcx
movq %rbp, %rdx
xorl %esi, %esi
cmpq $0x20, %rsi
je 0x5f30b
cmpq $0xe, %rsi
ja 0x5f302
movl (%rdx), %edi
cmpb $0x1, (%rsp,%rsi)
leaq 0x920(%rdi,%rcx), %r8
jne 0x5f2fe
movb $0x1, (%r8)
movl %edi, 0xc90ec(%rip) # 0x1283e8
jmp 0x5f302
movb $0x0, (%r8)
incq %rsi
addq $0x4, %rdx
jmp 0x5f2d6
xorl %ecx, %ecx
cmpq $0x6, %rcx
je 0x5f325
movss 0x10(%rsp,%rcx,4), %xmm0
movss %xmm0, (%r13,%rcx,4)
incq %rcx
jmp 0x5f30d
movss 0xa30(%rax,%r15), %xmm0
movss 0xa34(%rax,%r15), %xmm1
movss 0x641e7(%rip), %xmm2 # 0xc3528
ucomiss %xmm2, %xmm0
seta 0x92a(%rax,%r15)
ucomiss %xmm2, %xmm1
seta 0x92c(%rax,%r15)
movl $0x6, 0x80c(%r15,%rbx,4)
incq %rbx
addq $0x20, %r12
addq $0x20, %r13
jmp 0x5f27b
movb $0x0, 0xc8873(%rip) # 0x127bef
cmpb $0x0, 0xc886d(%rip) # 0x127bf0
je 0x5f38c
callq 0xa8c4b
jmp 0x5f391
callq 0xa8c2b
movl $0x300, %ebx # imm = 0x300
movl 0xc884c(%rip), %eax # 0x127be8
andl %ebx, %eax
cmpl $0x200, %eax # imm = 0x200
jne 0x5f3ac
callq 0xa8c4b
jmp 0x5f396
movq 0xc9315(%rip), %rdi # 0x1286c8
callq 0xa7ab0
testl %eax, %eax
setne 0xc882d(%rip) # 0x127bee
movq 0xc9300(%rip), %rdi # 0x1286c8
xorl %esi, %esi
callq 0xa7afa
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| PollInputEvents:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
call UpdateGestures
and cs:dword_1282E4, 0
and cs:dword_128328, 0
and cs:dword_1283E8, 0
mov rax, 0FFFFFFFFFFFFFE00h
lea r15, CORE
loc_5F1BA:
test rax, rax
jz short loc_5F1DD
mov cl, [rax+r15+2C4h]
mov [rax+r15+4C4h], cl
mov byte ptr [rax+r15+6C4h], 0
inc rax
jmp short loc_5F1BA
loc_5F1DD:
push 0FFFFFFFFFFFFFFF8h
pop rax
loc_5F1E0:
test rax, rax
jz short loc_5F1FA
mov cl, [rax+r15+77Ah]
mov [rax+r15+782h], cl
inc rax
jmp short loc_5F1E0
loc_5F1FA:
mov rax, cs:qword_128364
mov cs:qword_12836C, rax
and cs:qword_128364, 0
mov rax, cs:qword_12833C
mov cs:qword_128344, rax
push 0FFFFFFFFFFFFFFF8h
pop rcx
loc_5F221:
test rcx, rcx
jz short loc_5F23B
mov dl, [rcx+r15+800h]
mov [rcx+r15+808h], dl
inc rcx
jmp short loc_5F221
loc_5F23B:
mov cs:qword_128398, rax
xor ebx, ebx
loc_5F244:
cmp rbx, 4
jz short loc_5F261
mov edi, ebx
call glfwJoystickPresent
test eax, eax
setnz byte ptr [rbx+r15+81Ch]
inc rbx
jmp short loc_5F244
loc_5F261:
lea r12, unk_128580
lea r13, dword_128600
xor ebx, ebx
mov r14, rsp
lea rbp, unk_C49C0
loc_5F27B:
cmp rbx, 4
jz loc_5F375
cmp byte ptr [rbx+r15+81Ch], 1
jnz loc_5F365
xor eax, eax
loc_5F296:
cmp rax, 20h ; ' '
jz short loc_5F2AA
mov cl, [r12+rax-80h]
mov [r12+rax], cl
inc rax
jmp short loc_5F296
loc_5F2AA:
xorps xmm0, xmm0
movaps [rsp+58h+var_48], xmm0
movaps [rsp+58h+var_58], xmm0
and [rsp+58h+var_38], 0
mov edi, ebx
mov rsi, r14
call glfwGetGamepadState
mov rax, rbx
shl rax, 5
lea rcx, [r15+rax]
mov rdx, rbp
xor esi, esi
loc_5F2D6:
cmp rsi, 20h ; ' '
jz short loc_5F30B
cmp rsi, 0Eh
ja short loc_5F302
mov edi, [rdx]
cmp byte ptr [rsp+rsi+58h+var_58], 1
lea r8, [rdi+rcx+920h]
jnz short loc_5F2FE
mov byte ptr [r8], 1
mov cs:dword_1283E8, edi
jmp short loc_5F302
loc_5F2FE:
mov byte ptr [r8], 0
loc_5F302:
inc rsi
add rdx, 4
jmp short loc_5F2D6
loc_5F30B:
xor ecx, ecx
loc_5F30D:
cmp rcx, 6
jz short loc_5F325
movss xmm0, dword ptr [rsp+rcx*4+58h+var_48]
movss dword ptr [r13+rcx*4+0], xmm0
inc rcx
jmp short loc_5F30D
loc_5F325:
movss xmm0, dword ptr [rax+r15+0A30h]
movss xmm1, dword ptr [rax+r15+0A34h]
movss xmm2, cs:dword_C3528
ucomiss xmm0, xmm2
setnbe byte ptr [rax+r15+92Ah]
ucomiss xmm1, xmm2
setnbe byte ptr [rax+r15+92Ch]
mov dword ptr [r15+rbx*4+80Ch], 6
loc_5F365:
inc rbx
add r12, 20h ; ' '
add r13, 20h ; ' '
jmp loc_5F27B
loc_5F375:
mov cs:byte_127BEF, 0
cmp cs:byte_127BF0, 0
jz short loc_5F38C
call glfwWaitEvents
jmp short loc_5F391
loc_5F38C:
call glfwPollEvents
loc_5F391:
mov ebx, 300h
loc_5F396:
mov eax, cs:dword_127BE8
and eax, ebx
cmp eax, 200h
jnz short loc_5F3AC
call glfwWaitEvents
jmp short loc_5F396
loc_5F3AC:
mov rdi, cs:platform_0
call glfwWindowShouldClose
test eax, eax
setnz cs:byte_127BEE
mov rdi, cs:platform_0
xor esi, esi
call glfwSetWindowShouldClose
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long PollInputEvents(
double a1,
double a2,
double a3,
double a4,
double a5,
double a6,
double a7,
double a8)
{
long long i; // rax
long long j; // rax
long long v10; // rax
long long k; // rcx
long long m; // rbx
char *v13; // r12
int *v14; // r13
long long n; // rbx
long long ii; // rax
long long v17; // rax
unsigned int *v18; // rdx
unsigned long long jj; // rsi
long long v20; // rdi
_BYTE *v21; // r8
long long kk; // rcx
float v23; // xmm1_4
__int128 v25; // [rsp+0h] [rbp-58h] BYREF
__int128 v26; // [rsp+10h] [rbp-48h]
long long v27; // [rsp+20h] [rbp-38h]
UpdateGestures(a1, a2, a3, a4, a5, a6, a7, a8);
dword_1282E4 = 0;
dword_128328 = 0;
dword_1283E8 = 0;
for ( i = -512LL; i; ++i )
{
*((_BYTE *)&CORE[152] + i + 4) = *((_BYTE *)&CORE[88] + i + 4);
*((_BYTE *)&CORE[216] + i + 4) = 0;
}
for ( j = -8LL; j; ++j )
*((_BYTE *)&CORE[240] + j + 2) = *((_BYTE *)&CORE[239] + j + 2);
qword_12836C = qword_128364;
qword_128364 = 0LL;
v10 = qword_12833C;
qword_128344 = qword_12833C;
for ( k = -8LL; k; ++k )
*((_BYTE *)&CORE[257] + k) = *((_BYTE *)&CORE[256] + k);
qword_128398 = v10;
for ( m = 0LL; m != 4; ++m )
*((_BYTE *)&CORE[259] + m + 4) = (unsigned int)glfwJoystickPresent((unsigned int)m) != 0;
v13 = (char *)&unk_128580;
v14 = &dword_128600;
for ( n = 0LL; n != 4; ++n )
{
if ( *((_BYTE *)&CORE[259] + n + 4) == 1 )
{
for ( ii = 0LL; ii != 32; ++ii )
v13[ii] = v13[ii - 128];
v26 = 0LL;
v25 = 0LL;
v27 = 0LL;
((void ( *)(_QWORD, __int128 *))glfwGetGamepadState)((unsigned int)n, &v25);
v17 = 4 * n;
v18 = (unsigned int *)&unk_C49C0;
for ( jj = 0LL; jj != 32; ++jj )
{
if ( jj <= 0xE )
{
v20 = *v18;
v21 = (char *)&CORE[4 * n + 292] + v20;
if ( *((_BYTE *)&v25 + jj) == 1 )
{
*v21 = 1;
dword_1283E8 = v20;
}
else
{
*v21 = 0;
}
}
++v18;
}
for ( kk = 0LL; kk != 6; ++kk )
v14[kk] = *((_DWORD *)&v26 + kk);
v23 = *((float *)&CORE[v17 + 326] + 1);
BYTE2(CORE[v17 + 293]) = *(float *)&CORE[v17 + 326] > 0.1;
BYTE4(CORE[v17 + 293]) = v23 > 0.1;
*((_DWORD *)&CORE[257] + n + 1) = 6;
}
v13 += 32;
v14 += 8;
}
byte_127BEF = 0;
if ( byte_127BF0 )
goto LABEL_34;
glfwPollEvents();
while ( (dword_127BE8 & 0x300) == 0x200 )
LABEL_34:
glfwWaitEvents();
byte_127BEE = (unsigned int)glfwWindowShouldClose(platform_0) != 0;
return glfwSetWindowShouldClose(platform_0, 0LL);
}
| PollInputEvents:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
CALL 0x0015abd5
AND dword ptr [0x002282e4],0x0
AND dword ptr [0x00228328],0x0
AND dword ptr [0x002283e8],0x0
MOV RAX,-0x200
LEA R15,[0x227be0]
LAB_0015f1ba:
TEST RAX,RAX
JZ 0x0015f1dd
MOV CL,byte ptr [RAX + R15*0x1 + 0x2c4]
MOV byte ptr [RAX + R15*0x1 + 0x4c4],CL
MOV byte ptr [RAX + R15*0x1 + 0x6c4],0x0
INC RAX
JMP 0x0015f1ba
LAB_0015f1dd:
PUSH -0x8
POP RAX
LAB_0015f1e0:
TEST RAX,RAX
JZ 0x0015f1fa
MOV CL,byte ptr [RAX + R15*0x1 + 0x77a]
MOV byte ptr [RAX + R15*0x1 + 0x782],CL
INC RAX
JMP 0x0015f1e0
LAB_0015f1fa:
MOV RAX,qword ptr [0x00228364]
MOV qword ptr [0x0022836c],RAX
AND qword ptr [0x00228364],0x0
MOV RAX,qword ptr [0x0022833c]
MOV qword ptr [0x00228344],RAX
PUSH -0x8
POP RCX
LAB_0015f221:
TEST RCX,RCX
JZ 0x0015f23b
MOV DL,byte ptr [RCX + R15*0x1 + 0x800]
MOV byte ptr [RCX + R15*0x1 + 0x808],DL
INC RCX
JMP 0x0015f221
LAB_0015f23b:
MOV qword ptr [0x00228398],RAX
XOR EBX,EBX
LAB_0015f244:
CMP RBX,0x4
JZ 0x0015f261
MOV EDI,EBX
CALL 0x001a4b66
TEST EAX,EAX
SETNZ byte ptr [RBX + R15*0x1 + 0x81c]
INC RBX
JMP 0x0015f244
LAB_0015f261:
LEA R12,[0x228580]
LEA R13,[0x228600]
XOR EBX,EBX
MOV R14,RSP
LEA RBP,[0x1c49c0]
LAB_0015f27b:
CMP RBX,0x4
JZ 0x0015f375
CMP byte ptr [RBX + R15*0x1 + 0x81c],0x1
JNZ 0x0015f365
XOR EAX,EAX
LAB_0015f296:
CMP RAX,0x20
JZ 0x0015f2aa
MOV CL,byte ptr [R12 + RAX*0x1 + -0x80]
MOV byte ptr [R12 + RAX*0x1],CL
INC RAX
JMP 0x0015f296
LAB_0015f2aa:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
AND qword ptr [RSP + 0x20],0x0
MOV EDI,EBX
MOV RSI,R14
CALL 0x001a55e7
MOV RAX,RBX
SHL RAX,0x5
LEA RCX,[R15 + RAX*0x1]
MOV RDX,RBP
XOR ESI,ESI
LAB_0015f2d6:
CMP RSI,0x20
JZ 0x0015f30b
CMP RSI,0xe
JA 0x0015f302
MOV EDI,dword ptr [RDX]
CMP byte ptr [RSP + RSI*0x1],0x1
LEA R8,[RDI + RCX*0x1 + 0x920]
JNZ 0x0015f2fe
MOV byte ptr [R8],0x1
MOV dword ptr [0x002283e8],EDI
JMP 0x0015f302
LAB_0015f2fe:
MOV byte ptr [R8],0x0
LAB_0015f302:
INC RSI
ADD RDX,0x4
JMP 0x0015f2d6
LAB_0015f30b:
XOR ECX,ECX
LAB_0015f30d:
CMP RCX,0x6
JZ 0x0015f325
MOVSS XMM0,dword ptr [RSP + RCX*0x4 + 0x10]
MOVSS dword ptr [R13 + RCX*0x4],XMM0
INC RCX
JMP 0x0015f30d
LAB_0015f325:
MOVSS XMM0,dword ptr [RAX + R15*0x1 + 0xa30]
MOVSS XMM1,dword ptr [RAX + R15*0x1 + 0xa34]
MOVSS XMM2,dword ptr [0x001c3528]
UCOMISS XMM0,XMM2
SETA byte ptr [RAX + R15*0x1 + 0x92a]
UCOMISS XMM1,XMM2
SETA byte ptr [RAX + R15*0x1 + 0x92c]
MOV dword ptr [R15 + RBX*0x4 + 0x80c],0x6
LAB_0015f365:
INC RBX
ADD R12,0x20
ADD R13,0x20
JMP 0x0015f27b
LAB_0015f375:
MOV byte ptr [0x00227bef],0x0
CMP byte ptr [0x00227bf0],0x0
JZ 0x0015f38c
CALL 0x001a8c4b
JMP 0x0015f391
LAB_0015f38c:
CALL 0x001a8c2b
LAB_0015f391:
MOV EBX,0x300
LAB_0015f396:
MOV EAX,dword ptr [0x00227be8]
AND EAX,EBX
CMP EAX,0x200
JNZ 0x0015f3ac
CALL 0x001a8c4b
JMP 0x0015f396
LAB_0015f3ac:
MOV RDI,qword ptr [0x002286c8]
CALL 0x001a7ab0
TEST EAX,EAX
SETNZ byte ptr [0x00227bee]
MOV RDI,qword ptr [0x002286c8]
XOR ESI,ESI
CALL 0x001a7afa
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void PollInputEvents(void)
{
uint uVar1;
float fVar2;
int iVar3;
long lVar4;
long lVar5;
uint *puVar6;
ulong uVar7;
ulong uVar8;
int1 *puVar9;
int4 *puVar10;
char local_58 [16];
int8 local_48;
int8 uStack_40;
int8 local_38;
UpdateGestures();
DAT_002282e4 = 0;
DAT_00228328 = 0;
_DAT_002283e8 = 0;
for (lVar4 = -0x200; lVar4 != 0; lVar4 = lVar4 + 1) {
(&DAT_002280a4)[lVar4] = (&DAT_00227ea4)[lVar4];
*(int1 *)((long)&DAT_002282a4 + lVar4) = 0;
}
for (lVar4 = -8; _DAT_00228398 = DAT_0022833c, lVar4 != 0; lVar4 = lVar4 + 1) {
*(int1 *)(lVar4 + 0x228362) = (&DAT_0022835a)[lVar4];
}
_DAT_0022836c = _DAT_00228364;
_DAT_00228364 = 0;
DAT_00228344 = DAT_0022833c;
for (lVar4 = -8; lVar4 != 0; lVar4 = lVar4 + 1) {
(&DAT_002283e8)[lVar4] = (&DAT_002283e0)[lVar4];
}
for (uVar7 = 0; uVar7 != 4; uVar7 = uVar7 + 1) {
iVar3 = glfwJoystickPresent(uVar7 & 0xffffffff);
(&DAT_002283fc)[uVar7] = iVar3 != 0;
}
puVar9 = &DAT_00228580;
puVar10 = &DAT_00228600;
for (uVar7 = 0; uVar7 != 4; uVar7 = uVar7 + 1) {
if ((&DAT_002283fc)[uVar7] == '\x01') {
for (lVar4 = 0; lVar4 != 0x20; lVar4 = lVar4 + 1) {
puVar9[lVar4] = puVar9[lVar4 + -0x80];
}
local_48 = 0;
uStack_40 = 0;
local_58[0] = '\0';
local_58[1] = '\0';
local_58[2] = '\0';
local_58[3] = '\0';
local_58[4] = '\0';
local_58[5] = '\0';
local_58[6] = '\0';
local_58[7] = '\0';
local_58[8] = '\0';
local_58[9] = '\0';
local_58[10] = '\0';
local_58[0xb] = '\0';
local_58[0xc] = '\0';
local_58[0xd] = '\0';
local_58[0xe] = '\0';
local_58[0xf] = '\0';
local_38 = 0;
glfwGetGamepadState(uVar7 & 0xffffffff);
lVar4 = uVar7 * 0x20;
puVar6 = &DAT_001c49c0;
for (uVar8 = 0; uVar8 != 0x20; uVar8 = uVar8 + 1) {
if (uVar8 < 0xf) {
uVar1 = *puVar6;
if (local_58[uVar8] == '\x01') {
(&DAT_00228500)[(ulong)uVar1 + lVar4] = 1;
_DAT_002283e8 = uVar1;
}
else {
(&DAT_00228500)[(ulong)uVar1 + lVar4] = 0;
}
}
puVar6 = puVar6 + 1;
}
for (lVar5 = 0; fVar2 = DAT_001c3528, lVar5 != 6; lVar5 = lVar5 + 1) {
puVar10[lVar5] = *(int4 *)((long)&local_48 + lVar5 * 4);
}
(&DAT_0022850a)[lVar4] = DAT_001c3528 < *(float *)(&DAT_00228610 + lVar4);
(&DAT_0022850c)[lVar4] = fVar2 < *(float *)(&DAT_00228614 + lVar4);
*(int4 *)(&DAT_002283ec + uVar7 * 4) = 6;
}
puVar9 = puVar9 + 0x20;
puVar10 = puVar10 + 8;
}
DAT_00227bef = 0;
if (DAT_00227bf0 == '\0') {
glfwPollEvents();
}
else {
glfwWaitEvents();
}
while ((_DAT_00227be8 & 0x300) == 0x200) {
glfwWaitEvents();
}
iVar3 = glfwWindowShouldClose(platform_0);
DAT_00227bee = iVar3 != 0;
glfwSetWindowShouldClose(platform_0,0);
return;
}
| |
32,581 | my_b_write_quoted(st_io_cache*, unsigned char const*, unsigned int) | eloqsql/sql/log_event_client.cc | static void
my_b_write_quoted(IO_CACHE *file, const uchar *ptr, uint length)
{
const uchar *s;
my_b_write_byte(file, '\'');
for (s= ptr; length > 0 ; s++, length--)
{
if (*s > 0x1F)
my_b_write_byte(file, *s);
else if (*s == '\'')
my_b_write(file, (uchar*)"\\'", 2);
else if (*s == '\\')
my_b_write(file, (uchar*)"\\\\", 2);
else
{
uchar hex[10];
size_t len= my_snprintf((char*) hex, sizeof(hex), "%s%02x", "\\x", *s);
my_b_write(file, hex, len);
}
}
my_b_write_byte(file, '\'');
} | O0 | cpp | my_b_write_quoted(st_io_cache*, unsigned char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movl %edx, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
movl $0x27, %esi
callq 0x528f0
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x2c(%rbp)
jbe 0x65022
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x1f, %eax
jle 0x64f81
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rax
movzbl (%rax), %esi
callq 0x528f0
jmp 0x65006
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x27, %eax
jne 0x64fa4
movq -0x20(%rbp), %rdi
leaq 0xad720(%rip), %rsi # 0x1126b8
movl $0x2, %edx
callq 0x53060
jmp 0x65004
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x64fc7
movq -0x20(%rbp), %rdi
leaq 0xad6f7(%rip), %rsi # 0x1126b2
movl $0x2, %edx
callq 0x53060
jmp 0x65002
leaq -0x12(%rbp), %rdi
movq -0x38(%rbp), %rax
movzbl (%rax), %r8d
movl $0xa, %esi
leaq 0xaf91e(%rip), %rdx # 0x1148fd
leaq 0xaf91e(%rip), %rcx # 0x114904
movb $0x0, %al
callq 0x10bfb0
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x12(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x53060
jmp 0x65004
jmp 0x65006
jmp 0x65008
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x64f56
movq -0x20(%rbp), %rdi
movl $0x27, %esi
callq 0x528f0
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x65048
addq $0x40, %rsp
popq %rbp
retq
callq 0x3b340
nopl (%rax)
| _ZL17my_b_write_quotedP11st_io_cachePKhj:
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_2C], edx
mov rdi, [rbp+var_20]
mov esi, 27h ; '''
call _ZL15my_b_write_byteP11st_io_cacheh; my_b_write_byte(st_io_cache *,uchar)
mov rax, [rbp+var_28]
mov [rbp+var_38], rax
loc_64F56:
cmp [rbp+var_2C], 0
jbe loc_65022
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
cmp eax, 1Fh
jle short loc_64F81
mov rdi, [rbp+var_20]
mov rax, [rbp+var_38]
movzx esi, byte ptr [rax]
call _ZL15my_b_write_byteP11st_io_cacheh; my_b_write_byte(st_io_cache *,uchar)
jmp loc_65006
loc_64F81:
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
cmp eax, 27h ; '''
jnz short loc_64FA4
mov rdi, [rbp+var_20]
lea rsi, asc_1126B8; "\\'"
mov edx, 2
call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong)
jmp short loc_65004
loc_64FA4:
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
cmp eax, 5Ch ; '\'
jnz short loc_64FC7
mov rdi, [rbp+var_20]
lea rsi, asc_1126B2; "\\\\"
mov edx, 2
call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong)
jmp short loc_65002
loc_64FC7:
lea rdi, [rbp+var_12]
mov rax, [rbp+var_38]
movzx r8d, byte ptr [rax]
mov esi, 0Ah
lea rdx, aS02x; "%s%02x"
lea rcx, asc_114904; "\\x"
mov al, 0
call my_snprintf
mov [rbp+var_40], rax
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_12]
mov rdx, [rbp+var_40]
call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong)
loc_65002:
jmp short $+2
loc_65004:
jmp short $+2
loc_65006:
jmp short $+2
loc_65008:
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
mov eax, [rbp+var_2C]
add eax, 0FFFFFFFFh
mov [rbp+var_2C], eax
jmp loc_64F56
loc_65022:
mov rdi, [rbp+var_20]
mov esi, 27h ; '''
call _ZL15my_b_write_byteP11st_io_cacheh; my_b_write_byte(st_io_cache *,uchar)
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_65048
add rsp, 40h
pop rbp
retn
loc_65048:
call ___stack_chk_fail
| unsigned long long my_b_write_quoted(long long a1, char *a2, int a3)
{
int v3; // r9d
long long v5; // [rsp+0h] [rbp-40h]
_BYTE v8[10]; // [rsp+2Eh] [rbp-12h] BYREF
unsigned long long v9; // [rsp+38h] [rbp-8h]
v9 = __readfsqword(0x28u);
my_b_write_byte(a1, 39);
while ( a3 )
{
if ( (unsigned __int8)*a2 <= 0x1Fu )
{
if ( *a2 == 39 )
{
my_b_write(a1, (long long)"\\'", 2LL);
}
else if ( *a2 == 92 )
{
my_b_write(a1, (long long)"\\\\", 2LL);
}
else
{
v5 = my_snprintf((unsigned int)v8, 10, (unsigned int)"%s%02x", (unsigned int)"\\x", (unsigned __int8)*a2, v3);
my_b_write(a1, (long long)v8, v5);
}
}
else
{
my_b_write_byte(a1, *a2);
}
++a2;
--a3;
}
my_b_write_byte(a1, 39);
return __readfsqword(0x28u);
}
| my_b_write_quoted:
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 dword ptr [RBP + -0x2c],EDX
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,0x27
CALL 0x001528f0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
LAB_00164f56:
CMP dword ptr [RBP + -0x2c],0x0
JBE 0x00165022
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x1f
JLE 0x00164f81
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOVZX ESI,byte ptr [RAX]
CALL 0x001528f0
JMP 0x00165006
LAB_00164f81:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x27
JNZ 0x00164fa4
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x2126b8]
MOV EDX,0x2
CALL 0x00153060
JMP 0x00165004
LAB_00164fa4:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x5c
JNZ 0x00164fc7
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x2126b2]
MOV EDX,0x2
CALL 0x00153060
JMP 0x00165002
LAB_00164fc7:
LEA RDI,[RBP + -0x12]
MOV RAX,qword ptr [RBP + -0x38]
MOVZX R8D,byte ptr [RAX]
MOV ESI,0xa
LEA RDX,[0x2148fd]
LEA RCX,[0x214904]
MOV AL,0x0
CALL 0x0020bfb0
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x12]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x00153060
LAB_00165002:
JMP 0x00165004
LAB_00165004:
JMP 0x00165006
LAB_00165006:
JMP 0x00165008
LAB_00165008:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00164f56
LAB_00165022:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,0x27
CALL 0x001528f0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00165048
ADD RSP,0x40
POP RBP
RET
LAB_00165048:
CALL 0x0013b340
|
/* my_b_write_quoted(st_io_cache*, unsigned char const*, unsigned int) */
void my_b_write_quoted(st_io_cache *param_1,uchar *param_2,uint param_3)
{
ulong uVar1;
long in_FS_OFFSET;
byte *local_40;
uint local_34;
uchar local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
my_b_write_byte(param_1,'\'');
local_40 = param_2;
for (local_34 = param_3; local_34 != 0; local_34 = local_34 - 1) {
if (*local_40 < 0x20) {
if (*local_40 == 0x27) {
my_b_write(param_1,"\\\'",2);
}
else if (*local_40 == 0x5c) {
my_b_write(param_1,"\\\\",2);
}
else {
uVar1 = my_snprintf(local_1a,10,"%s%02x",&DAT_00214904,*local_40);
my_b_write(param_1,local_1a,uVar1);
}
}
else {
my_b_write_byte(param_1,*local_40);
}
local_40 = local_40 + 1;
}
my_b_write_byte(param_1,'\'');
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
| |
32,582 | inline_mysql_cond_init | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_init(
#ifdef HAVE_PSI_COND_INTERFACE
PSI_cond_key key,
#endif
mysql_cond_t *that,
const pthread_condattr_t *attr)
{
#ifdef HAVE_PSI_COND_INTERFACE
that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond);
#else
that->m_psi= NULL;
#endif
return pthread_cond_init(&that->m_cond, attr);
} | O0 | c | inline_mysql_cond_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1a7e56(%rip), %rax # 0x1d08d0
movq (%rax), %rax
movq 0x60(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x25450
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| inline_mysql_cond_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+60h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+30h], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_cond_init
add rsp, 20h
pop rbp
retn
| long long inline_mysql_cond_init(unsigned int a1, long long a2, long long a3)
{
*(_QWORD *)(a2 + 48) = (*((long long ( **)(_QWORD, long long))PSI_server[0] + 12))(a1, a2);
return pthread_cond_init(a2, a3);
}
| inline_mysql_cond_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x2d08d0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x60]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00125450
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3)
{
longlong lVar1;
lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2);
param_2[1].__align = lVar1;
pthread_cond_init(param_2,param_3);
return;
}
| |
32,583 | ma_write_abort_block_record | eloqsql/storage/maria/ma_blockrec.c | my_bool _ma_write_abort_block_record(MARIA_HA *info)
{
my_bool res= 0;
MARIA_BITMAP_BLOCKS *blocks= &info->cur_row.insert_blocks;
MARIA_BITMAP_BLOCK *block, *end;
LSN lsn= LSN_IMPOSSIBLE;
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_write_abort_block_record");
_ma_bitmap_lock(share); /* Lock bitmap from other insert threads */
if (delete_head_or_tail(info,
ma_recordpos_to_page(info->cur_row.lastpos),
ma_recordpos_to_dir_entry(info->cur_row.lastpos), 1,
0))
res= 1;
for (block= blocks->block + 1, end= block + blocks->count - 1; block < end;
block++)
{
if (block->used & BLOCKUSED_USED)
{
if (block->used & BLOCKUSED_TAIL)
{
/*
block->page_count is set to the tail directory entry number in
write_block_record()
*/
if (delete_head_or_tail(info, block->page,
block->page_count & ~TAIL_BIT,
0, 0))
res= 1;
}
else
{
if (free_full_page_range(info, block->page, block->page_count))
res= 1;
}
}
}
_ma_bitmap_unlock(share);
if (share->now_transactional)
{
/*
Write clr to mark end of aborted row insert.
The above delete_head_or_tail() calls will only log redo, not undo.
The undo just before the row insert is stored in row->orig_undo_lsn.
When applying undo's, we can skip all undo records between current
lsn and row->orig_undo_lsn as logically things are as before the
attempted insert.
*/
if (_ma_write_clr(info, info->cur_row.orig_undo_lsn,
LOGREC_UNDO_ROW_INSERT,
share->calc_checksum != 0,
(ha_checksum) 0 - info->cur_row.checksum,
&lsn, (void*) 0))
res= 1;
}
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(res);
} | O3 | c | ma_write_abort_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x70(%rbp)
movq (%rdi), %rdi
movq %rdi, -0x60(%rbp)
callq 0x3ffdf
movq 0x98(%r15), %rsi
movzbl %sil, %edx
shrq $0x8, %rsi
movq %r15, %rdi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x5cc79
testb %al, %al
setne %r14b
movl 0x88(%r15), %eax
cmpq $0x2, %rax
movq %r15, -0x48(%rbp)
jb 0x5cbcd
movq 0x80(%r15), %rbx
leaq (%rax,%rax,2), %rax
leaq (%rbx,%rax,8), %rcx
addq $0x18, %rbx
leaq 0x470(%r15), %rax
movq %rax, -0x68(%rbp)
movq %rcx, -0x58(%rbp)
movzbl 0x14(%rbx), %eax
testb $0x1, %al
je 0x5cb96
movq (%rbx), %r12
movl 0x8(%rbx), %r13d
movzbl %r14b, %r14d
testb $0x4, %al
jne 0x5ca87
movl %r14d, -0x4c(%rbp)
movq (%r15), %r14
leaq (%r12,%r13), %rax
movl 0x7bc(%r14), %ecx
imulq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, 0x40(%r14)
sete %al
movl %r13d, %ecx
subl %eax, %ecx
je 0x5cab1
movq 0x600(%r14), %rdi
movq -0x68(%rbp), %rsi
movq %r12, %rdx
movl $0x4, %r8d
movl $0x1, %r9d
callq 0x33a48
testb %al, %al
setne %al
movl %eax, -0x40(%rbp)
jmp 0x5cab8
andl $0xffff7fff, %r13d # imm = 0xFFFF7FFF
movq %r15, %rdi
movq %r12, %rsi
movl %r13d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x5cc79
testb %al, %al
movl $0x1, %eax
cmovnel %eax, %r14d
jmp 0x5cb92
movl $0x0, -0x40(%rbp)
cmpb $0x0, 0x7e7(%r14)
je 0x5cb38
movw $0x1, -0x39(%rbp)
movl %r12d, -0x37(%rbp)
movq %r12, %rax
shrq $0x20, %rax
movb %al, -0x33(%rbp)
movw %r13w, -0x32(%rbp)
leaq -0x3b(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0xb, -0x88(%rbp)
movq 0x8(%r15), %rdx
subq $0x8, %rsp
leaq -0x78(%rbp), %rdi
movl $0x8, %esi
movq %r15, %rcx
movl $0xb, %r8d
movl $0x3, %r9d
pushq $0x0
pushq %rax
leaq -0xb0(%rbp), %rax
pushq %rax
callq 0x2a8ac
addq $0x20, %rsp
testb %al, %al
movl -0x40(%rbp), %ecx
movzbl %cl, %ecx
movl $0x1, %eax
cmovnel %eax, %ecx
movl %ecx, -0x40(%rbp)
leaq 0xa98(%r14), %r15
cmpq $0x0, 0xad8(%r14)
jne 0x5cba5
movq %r15, %rdi
callq 0x29220
leaq 0xa10(%r14), %rsi
movq -0x48(%rbp), %rdi
movq %r12, %rdx
movl %r13d, %ecx
callq 0x4149e
movl %eax, %r12d
movq 0xad8(%r14), %rdi
testq %rdi, %rdi
jne 0x5cbbb
movq %r15, %rdi
callq 0x291e0
orb -0x40(%rbp), %r12b
movl -0x4c(%rbp), %r14d
je 0x5cb8e
movl $0x1, %r14d
movq -0x48(%rbp), %r15
movq -0x58(%rbp), %rcx
addq $0x18, %rbx
cmpq %rcx, %rbx
jb 0x5ca1d
jmp 0x5cbcd
movq %r15, %rdi
leaq 0x7e025(%rip), %rsi # 0xdabd4
movl $0xa23, %edx # imm = 0xA23
callq 0x2eb8f
jmp 0x5cb51
leaq 0x32944e(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x5cb76
movq -0x60(%rbp), %rbx
movq %rbx, %rdi
callq 0x400e0
xorl %r8d, %r8d
cmpb $0x0, 0x7e7(%rbx)
je 0x5cc36
xorl %ecx, %ecx
cmpq $0x0, 0x6a8(%rbx)
movq 0xb8(%r15), %rsi
setne %cl
subl 0xb0(%r15), %r8d
subq $0x8, %rsp
leaq -0x70(%rbp), %r15
movq -0x48(%rbp), %rdi
movl $0x12, %edx
movq %r15, %r9
pushq $0x0
callq 0x59875
addq $0x10, %rsp
testb %al, %al
movzbl %r14b, %eax
movl $0x1, %r14d
cmovel %eax, %r14d
movq (%r15), %r8
movq -0x48(%rbp), %r15
movq %r15, %rdi
movq %r8, %rsi
callq 0x597f8
movq 0x8(%r15), %rax
movq $0x0, 0x90(%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5cc74
movl %r14d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| _ma_write_abort_block_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_70], 0
mov rdi, [rdi]
mov [rbp+var_60], rdi
call _ma_bitmap_lock
mov rsi, [r15+98h]
movzx edx, sil
shr rsi, 8
mov rdi, r15
mov ecx, 1
xor r8d, r8d
call delete_head_or_tail
test al, al
setnz r14b
mov eax, [r15+88h]
cmp rax, 2
mov [rbp+var_48], r15
jb loc_5CBCD
mov rbx, [r15+80h]
lea rax, [rax+rax*2]
lea rcx, [rbx+rax*8]
add rbx, 18h
lea rax, [r15+470h]
mov [rbp+var_68], rax
mov [rbp+var_58], rcx
loc_5CA1D:
movzx eax, byte ptr [rbx+14h]
test al, 1
jz loc_5CB96
mov r12, [rbx]
mov r13d, [rbx+8]
movzx r14d, r14b
test al, 4
jnz short loc_5CA87
mov [rbp+var_4C], r14d
mov r14, [r15]
lea rax, [r12+r13]
mov ecx, [r14+7BCh]
imul rcx, rax
xor eax, eax
cmp [r14+40h], rcx
setz al
mov ecx, r13d
sub ecx, eax
jz short loc_5CAB1
mov rdi, [r14+600h]
mov rsi, [rbp+var_68]
mov rdx, r12
mov r8d, 4
mov r9d, 1
call pagecache_delete_pages
test al, al
setnz al
mov [rbp+var_40], eax
jmp short loc_5CAB8
loc_5CA87:
and r13d, 0FFFF7FFFh
mov rdi, r15
mov rsi, r12
mov edx, r13d
xor ecx, ecx
xor r8d, r8d
call delete_head_or_tail
test al, al
mov eax, 1
cmovnz r14d, eax
jmp loc_5CB92
loc_5CAB1:
mov [rbp+var_40], 0
loc_5CAB8:
cmp byte ptr [r14+7E7h], 0
jz short loc_5CB38
mov [rbp+var_39], 1
mov [rbp+var_37], r12d
mov rax, r12
shr rax, 20h
mov [rbp+var_33], al
mov [rbp+var_32], r13w
lea rax, [rbp+var_3B]
mov [rbp+var_90], rax
mov [rbp+var_88], 0Bh
mov rdx, [r15+8]
sub rsp, 8
lea rdi, [rbp+var_78]
mov esi, 8
mov rcx, r15
mov r8d, 0Bh
mov r9d, 3
push 0
push rax
lea rax, [rbp+var_B0]
push rax
call translog_write_record
add rsp, 20h
test al, al
mov ecx, [rbp+var_40]
movzx ecx, cl
mov eax, 1
cmovnz ecx, eax
mov [rbp+var_40], ecx
loc_5CB38:
lea r15, [r14+0A98h]
cmp qword ptr [r14+0AD8h], 0
jnz short loc_5CBA5
mov rdi, r15
call _pthread_mutex_lock
loc_5CB51:
lea rsi, [r14+0A10h]
mov rdi, [rbp+var_48]
mov rdx, r12
mov ecx, r13d
call _ma_bitmap_reset_full_page_bits
mov r12d, eax
mov rdi, [r14+0AD8h]
test rdi, rdi
jnz short loc_5CBBB
loc_5CB76:
mov rdi, r15
call _pthread_mutex_unlock
or r12b, byte ptr [rbp+var_40]
mov r14d, [rbp+var_4C]
jz short loc_5CB8E
mov r14d, 1
loc_5CB8E:
mov r15, [rbp+var_48]
loc_5CB92:
mov rcx, [rbp+var_58]
loc_5CB96:
add rbx, 18h
cmp rbx, rcx
jb loc_5CA1D
jmp short loc_5CBCD
loc_5CBA5:
mov rdi, r15
lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0A23h
call psi_mutex_lock
jmp short loc_5CB51
loc_5CBBB:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_5CB76
loc_5CBCD:
mov rbx, [rbp+var_60]
mov rdi, rbx
call _ma_bitmap_unlock
xor r8d, r8d
cmp byte ptr [rbx+7E7h], 0
jz short loc_5CC36
xor ecx, ecx
cmp qword ptr [rbx+6A8h], 0
mov rsi, [r15+0B8h]
setnz cl
sub r8d, [r15+0B0h]
sub rsp, 8
lea r15, [rbp+var_70]
mov rdi, [rbp+var_48]
mov edx, 12h
mov r9, r15
push 0
call _ma_write_clr
add rsp, 10h
test al, al
movzx eax, r14b
mov r14d, 1
cmovz r14d, eax
mov r8, [r15]
mov r15, [rbp+var_48]
loc_5CC36:
mov rdi, r15
mov rsi, r8
call _ma_unpin_all_pages
mov rax, [r15+8]
mov qword ptr [rax+90h], 0
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_5CC74
mov eax, r14d
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5CC74:
call ___stack_chk_fail
| long long ma_write_abort_block_record(long long a1)
{
unsigned int v1; // r14d
long long *v2; // r15
unsigned long long v3; // rax
long long v4; // rbx
unsigned long long v5; // rcx
_QWORD *v6; // rbx
char v7; // al
unsigned long long v8; // r12
long long v9; // r13
long long v10; // r14
int v11; // eax
int v12; // eax
char v13; // al
int v14; // ecx
char v15; // r12
long long v16; // rbx
signed long long v17; // r8
bool v18; // zf
unsigned int v19; // eax
__int128 v21; // [rsp+0h] [rbp-B0h] BYREF
_WORD *v22; // [rsp+20h] [rbp-90h]
long long v23; // [rsp+28h] [rbp-88h]
char v24[8]; // [rsp+38h] [rbp-78h] BYREF
signed long long v25; // [rsp+40h] [rbp-70h] BYREF
long long v26; // [rsp+48h] [rbp-68h]
long long v27; // [rsp+50h] [rbp-60h]
unsigned long long v28; // [rsp+58h] [rbp-58h]
unsigned int v29; // [rsp+64h] [rbp-4Ch]
long long *v30; // [rsp+68h] [rbp-48h]
int v31; // [rsp+70h] [rbp-40h]
_WORD v32[2]; // [rsp+75h] [rbp-3Bh] BYREF
int v33; // [rsp+79h] [rbp-37h]
char v34; // [rsp+7Dh] [rbp-33h]
__int16 v35; // [rsp+7Eh] [rbp-32h]
unsigned long long v36; // [rsp+80h] [rbp-30h]
v2 = (long long *)a1;
v36 = __readfsqword(0x28u);
v25 = 0LL;
v27 = *(_QWORD *)a1;
ma_bitmap_lock(v27);
LOBYTE(v1) = (unsigned __int8)delete_head_or_tail(
v2,
(unsigned long long)v2[19] >> 8,
(unsigned __int8)v2[19],
1LL,
0LL) != 0;
v3 = *(unsigned int *)(a1 + 136);
v30 = (long long *)a1;
if ( v3 >= 2 )
{
v4 = *(_QWORD *)(a1 + 128);
v5 = v4 + 24 * v3;
v6 = (_QWORD *)(v4 + 24);
v26 = a1 + 1136;
v28 = v5;
do
{
v7 = *((_BYTE *)v6 + 20);
if ( (v7 & 1) != 0 )
{
v8 = *v6;
v9 = *((unsigned int *)v6 + 2);
v1 = (unsigned __int8)v1;
if ( (v7 & 4) != 0 )
{
if ( (unsigned __int8)delete_head_or_tail(v2, *v6, (unsigned int)v9 & 0xFFFF7FFF, 0LL, 0LL) )
v1 = 1;
}
else
{
v29 = (unsigned __int8)v1;
v10 = *v2;
v11 = *(_QWORD *)(*v2 + 64) == (v8 + v9) * *(unsigned int *)(*v2 + 1980);
if ( (_DWORD)v9 == v11 )
{
v31 = 0;
}
else
{
LOBYTE(v12) = pagecache_delete_pages(*(_QWORD *)(v10 + 1536), v26, v8, v9 - v11, 4u, 1) != 0;
v31 = v12;
}
if ( *(_BYTE *)(v10 + 2023) )
{
v32[1] = 1;
v33 = v8;
v34 = BYTE4(v8);
v35 = v9;
v22 = v32;
v23 = 11LL;
v13 = translog_write_record((unsigned long long)v24, &byte_8, v2[1], v2, 0xBu, 3, &v21, v32, 0LL);
v14 = (unsigned __int8)v31;
if ( v13 )
v14 = 1;
v31 = v14;
}
if ( *(_QWORD *)(v10 + 2776) )
psi_mutex_lock(
v10 + 2712,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c",
0xA23u);
else
pthread_mutex_lock(v10 + 2712);
v15 = ma_bitmap_reset_full_page_bits(v30, v10 + 2576, v8, (unsigned int)v9);
if ( *(_QWORD *)(v10 + 2776) )
PSI_server[44]();
pthread_mutex_unlock(v10 + 2712);
v1 = v29;
if ( (unsigned __int8)v31 | (unsigned __int8)v15 )
v1 = 1;
v2 = v30;
}
v5 = v28;
}
v6 += 3;
}
while ( (unsigned long long)v6 < v5 );
}
v16 = v27;
ma_bitmap_unlock(v27);
v17 = 0LL;
if ( *(_BYTE *)(v16 + 2023) )
{
v18 = (unsigned __int8)ma_write_clr(
v30,
v2[23],
18,
*(_QWORD *)(v16 + 1704) != 0LL,
-*((_DWORD *)v2 + 44),
(unsigned long long)&v25,
0LL) == 0;
v19 = (unsigned __int8)v1;
v1 = 1;
if ( v18 )
v1 = v19;
v17 = v25;
v2 = v30;
}
ma_unpin_all_pages((long long)v2, v17);
*(_QWORD *)(v2[1] + 144) = 0LL;
return v1;
}
| _ma_write_abort_block_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x70],0x0
MOV RDI,qword ptr [RDI]
MOV qword ptr [RBP + -0x60],RDI
CALL 0x0013ffdf
MOV RSI,qword ptr [R15 + 0x98]
MOVZX EDX,SIL
SHR RSI,0x8
MOV RDI,R15
MOV ECX,0x1
XOR R8D,R8D
CALL 0x0015cc79
TEST AL,AL
SETNZ R14B
MOV EAX,dword ptr [R15 + 0x88]
CMP RAX,0x2
MOV qword ptr [RBP + -0x48],R15
JC 0x0015cbcd
MOV RBX,qword ptr [R15 + 0x80]
LEA RAX,[RAX + RAX*0x2]
LEA RCX,[RBX + RAX*0x8]
ADD RBX,0x18
LEA RAX,[R15 + 0x470]
MOV qword ptr [RBP + -0x68],RAX
MOV qword ptr [RBP + -0x58],RCX
LAB_0015ca1d:
MOVZX EAX,byte ptr [RBX + 0x14]
TEST AL,0x1
JZ 0x0015cb96
MOV R12,qword ptr [RBX]
MOV R13D,dword ptr [RBX + 0x8]
MOVZX R14D,R14B
TEST AL,0x4
JNZ 0x0015ca87
MOV dword ptr [RBP + -0x4c],R14D
MOV R14,qword ptr [R15]
LEA RAX,[R12 + R13*0x1]
MOV ECX,dword ptr [R14 + 0x7bc]
IMUL RCX,RAX
XOR EAX,EAX
CMP qword ptr [R14 + 0x40],RCX
SETZ AL
MOV ECX,R13D
SUB ECX,EAX
JZ 0x0015cab1
MOV RDI,qword ptr [R14 + 0x600]
MOV RSI,qword ptr [RBP + -0x68]
MOV RDX,R12
MOV R8D,0x4
MOV R9D,0x1
CALL 0x00133a48
TEST AL,AL
SETNZ AL
MOV dword ptr [RBP + -0x40],EAX
JMP 0x0015cab8
LAB_0015ca87:
AND R13D,0xffff7fff
MOV RDI,R15
MOV RSI,R12
MOV EDX,R13D
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0015cc79
TEST AL,AL
MOV EAX,0x1
CMOVNZ R14D,EAX
JMP 0x0015cb92
LAB_0015cab1:
MOV dword ptr [RBP + -0x40],0x0
LAB_0015cab8:
CMP byte ptr [R14 + 0x7e7],0x0
JZ 0x0015cb38
MOV word ptr [RBP + -0x39],0x1
MOV dword ptr [RBP + -0x37],R12D
MOV RAX,R12
SHR RAX,0x20
MOV byte ptr [RBP + -0x33],AL
MOV word ptr [RBP + -0x32],R13W
LEA RAX,[RBP + -0x3b]
MOV qword ptr [RBP + -0x90],RAX
MOV qword ptr [RBP + -0x88],0xb
MOV RDX,qword ptr [R15 + 0x8]
SUB RSP,0x8
LEA RDI,[RBP + -0x78]
MOV ESI,0x8
MOV RCX,R15
MOV R8D,0xb
MOV R9D,0x3
PUSH 0x0
PUSH RAX
LEA RAX,[RBP + -0xb0]
PUSH RAX
CALL 0x0012a8ac
ADD RSP,0x20
TEST AL,AL
MOV ECX,dword ptr [RBP + -0x40]
MOVZX ECX,CL
MOV EAX,0x1
CMOVNZ ECX,EAX
MOV dword ptr [RBP + -0x40],ECX
LAB_0015cb38:
LEA R15,[R14 + 0xa98]
CMP qword ptr [R14 + 0xad8],0x0
JNZ 0x0015cba5
MOV RDI,R15
CALL 0x00129220
LAB_0015cb51:
LEA RSI,[R14 + 0xa10]
MOV RDI,qword ptr [RBP + -0x48]
MOV RDX,R12
MOV ECX,R13D
CALL 0x0014149e
MOV R12D,EAX
MOV RDI,qword ptr [R14 + 0xad8]
TEST RDI,RDI
JNZ 0x0015cbbb
LAB_0015cb76:
MOV RDI,R15
CALL 0x001291e0
OR R12B,byte ptr [RBP + -0x40]
MOV R14D,dword ptr [RBP + -0x4c]
JZ 0x0015cb8e
MOV R14D,0x1
LAB_0015cb8e:
MOV R15,qword ptr [RBP + -0x48]
LAB_0015cb92:
MOV RCX,qword ptr [RBP + -0x58]
LAB_0015cb96:
ADD RBX,0x18
CMP RBX,RCX
JC 0x0015ca1d
JMP 0x0015cbcd
LAB_0015cba5:
MOV RDI,R15
LEA RSI,[0x1dabd4]
MOV EDX,0xa23
CALL 0x0012eb8f
JMP 0x0015cb51
LAB_0015cbbb:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0015cb76
LAB_0015cbcd:
MOV RBX,qword ptr [RBP + -0x60]
MOV RDI,RBX
CALL 0x001400e0
XOR R8D,R8D
CMP byte ptr [RBX + 0x7e7],0x0
JZ 0x0015cc36
XOR ECX,ECX
CMP qword ptr [RBX + 0x6a8],0x0
MOV RSI,qword ptr [R15 + 0xb8]
SETNZ CL
SUB R8D,dword ptr [R15 + 0xb0]
SUB RSP,0x8
LEA R15,[RBP + -0x70]
MOV RDI,qword ptr [RBP + -0x48]
MOV EDX,0x12
MOV R9,R15
PUSH 0x0
CALL 0x00159875
ADD RSP,0x10
TEST AL,AL
MOVZX EAX,R14B
MOV R14D,0x1
CMOVZ R14D,EAX
MOV R8,qword ptr [R15]
MOV R15,qword ptr [RBP + -0x48]
LAB_0015cc36:
MOV RDI,R15
MOV RSI,R8
CALL 0x001597f8
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RAX + 0x90],0x0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015cc74
MOV EAX,R14D
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015cc74:
CALL 0x00129270
|
ulong _ma_write_abort_block_record(long *param_1)
{
pthread_mutex_t *__mutex;
uint uVar1;
long lVar2;
long lVar3;
char cVar4;
int8 uVar5;
int iVar6;
long *plVar7;
long *plVar8;
int8 unaff_R14;
ulong uVar9;
ulong uVar10;
long in_FS_OFFSET;
int1 local_b8 [32];
int1 *local_98;
int8 local_90;
int1 local_80 [8];
int8 local_78;
long *local_70;
long local_68;
long *local_60;
uint local_54;
long *local_50;
uint local_48;
int1 local_43 [2];
int2 local_41;
int4 local_3f;
int1 local_3b;
int2 local_3a;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_78 = 0;
local_68 = *param_1;
_ma_bitmap_lock();
cVar4 = delete_head_or_tail(param_1,(ulong)param_1[0x13] >> 8,param_1[0x13] & 0xff,1,0);
uVar9 = CONCAT71((int7)((ulong)unaff_R14 >> 8),cVar4 != '\0');
local_50 = param_1;
if (1 < (ulong)*(uint *)(param_1 + 0x11)) {
plVar7 = (long *)(param_1[0x10] + (ulong)*(uint *)(param_1 + 0x11) * 0x18);
plVar8 = (long *)(param_1[0x10] + 0x18);
local_70 = param_1 + 0x8e;
local_60 = plVar7;
do {
if ((*(byte *)((long)plVar8 + 0x14) & 1) != 0) {
lVar2 = *plVar8;
uVar1 = *(uint *)(plVar8 + 1);
uVar9 = uVar9 & 0xff;
if ((*(byte *)((long)plVar8 + 0x14) & 4) == 0) {
lVar3 = *param_1;
iVar6 = uVar1 - (*(long *)(lVar3 + 0x40) ==
(ulong)*(uint *)(lVar3 + 0x7bc) * (lVar2 + (ulong)uVar1));
local_54 = (uint)uVar9;
if (iVar6 == 0) {
local_48 = 0;
}
else {
uVar5 = pagecache_delete_pages(*(int8 *)(lVar3 + 0x600),local_70,lVar2,iVar6,4,1);
local_48 = (uint)CONCAT71((int7)((ulong)uVar5 >> 8),(char)uVar5 != '\0');
}
if (*(char *)(lVar3 + 0x7e7) != '\0') {
local_41 = 1;
local_3f = (int4)lVar2;
local_3b = (int1)((ulong)lVar2 >> 0x20);
local_3a = (int2)uVar1;
local_98 = local_43;
local_90 = 0xb;
cVar4 = translog_write_record(local_80,8,param_1[1],param_1,0xb,3,local_b8,local_98,0);
local_48 = local_48 & 0xff;
if (cVar4 != '\0') {
local_48 = 1;
}
}
__mutex = (pthread_mutex_t *)(lVar3 + 0xa98);
if (*(long *)(lVar3 + 0xad8) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c",
0xa23);
}
cVar4 = _ma_bitmap_reset_full_page_bits(local_50,lVar3 + 0xa10,lVar2,(ulong)uVar1);
if (*(long *)(lVar3 + 0xad8) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
uVar9 = (ulong)local_54;
plVar7 = local_60;
param_1 = local_50;
if (cVar4 != '\0' || (char)local_48 != '\0') {
uVar9 = 1;
}
}
else {
cVar4 = delete_head_or_tail(param_1,lVar2,uVar1 & 0xffff7fff,0,0);
plVar7 = local_60;
if (cVar4 != '\0') {
uVar9 = 1;
}
}
}
plVar8 = plVar8 + 3;
} while (plVar8 < plVar7);
}
lVar2 = local_68;
_ma_bitmap_unlock(local_68);
uVar5 = 0;
uVar10 = uVar9;
if (*(char *)(lVar2 + 0x7e7) != '\0') {
cVar4 = _ma_write_clr(local_50,param_1[0x17],0x12,*(long *)(lVar2 + 0x6a8) != 0,
-(int)param_1[0x16],&local_78,0);
uVar5 = local_78;
uVar10 = 1;
param_1 = local_50;
if (cVar4 == '\0') {
uVar10 = uVar9 & 0xff;
}
}
_ma_unpin_all_pages(param_1,uVar5);
*(int8 *)(param_1[1] + 0x90) = 0;
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar10 & 0xffffffff;
}
| |
32,584 | my_hash_sort_latin1_de | eloqsql/strings/ctype-latin1.c | void my_hash_sort_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
const uchar *end;
register ulong m1= *nr1, m2= *nr2;
/*
Remove end space. We have to do this to be able to compare
'AE' and 'Ä' as identical
*/
end= skip_trailing_space(key, len);
for (; key < end ; key++)
{
uint X= (uint) combo1map[(uint) *key];
MY_HASH_ADD(m1, m2, X);
if ((X= combo2map[*key]))
{
MY_HASH_ADD(m1, m2, X);
}
}
*nr1= m1;
*nr2= m2;
} | O0 | c | my_hash_sort_latin1_de:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x73ec0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x73ea1
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x10101d(%rip), %rax # 0x174e20
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x1010d4(%rip), %rax # 0x174f20
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
je 0x73e8e
jmp 0x73e5a
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
jmp 0x73e8e
jmp 0x73e90
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x73de3
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| my_hash_sort_latin1_de:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_40], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call skip_trailing_space_0
mov [rbp+var_30], rax
loc_73DE3:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_30]
jnb loc_73EA1
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov eax, eax
mov ecx, eax
lea rax, combo1map
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_44], eax
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov ecx, [rbp+var_44]
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo2map
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_44], eax
cmp eax, 0
jz short loc_73E8E
jmp short $+2
loc_73E5A:
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov ecx, [rbp+var_44]
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
jmp short $+2
loc_73E8E:
jmp short $+2
loc_73E90:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_73DE3
loc_73EA1:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 50h
pop rbp
retn
| _QWORD * my_hash_sort_latin1_de(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5)
{
_QWORD *result; // rax
long long v6; // [rsp+10h] [rbp-40h]
long long v7; // [rsp+18h] [rbp-38h]
unsigned long long v8; // [rsp+20h] [rbp-30h]
unsigned __int8 *v11; // [rsp+40h] [rbp-10h]
v11 = a2;
v7 = *a4;
v6 = *a5;
v8 = skip_trailing_space_0(a2, a3);
while ( (unsigned long long)v11 < v8 )
{
v7 ^= (v7 << 8) + combo1map[*v11] * (v6 + (v7 & 0x3F));
v6 += 3LL;
if ( combo2map[*v11] )
{
v7 ^= (v7 << 8) + combo2map[*v11] * (v6 + (v7 & 0x3F));
v6 += 3LL;
}
++v11;
}
*a4 = v7;
result = a5;
*a5 = v6;
return result;
}
| my_hash_sort_latin1_de:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00173ec0
MOV qword ptr [RBP + -0x30],RAX
LAB_00173de3:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x00173ea1
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x274e20]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x274f20]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JZ 0x00173e8e
JMP 0x00173e5a
LAB_00173e5a:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00173e8e
LAB_00173e8e:
JMP 0x00173e90
LAB_00173e90:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00173de3
LAB_00173ea1:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
ADD RSP,0x50
POP RBP
RET
|
void my_hash_sort_latin1_de
(int8 param_1,byte *param_2,int8 param_3,ulong *param_4,long *param_5)
{
long lVar1;
byte *pbVar2;
long local_48;
ulong local_40;
byte *local_18;
local_40 = *param_4;
local_48 = *param_5;
pbVar2 = (byte *)skip_trailing_space(param_2,param_3);
for (local_18 = param_2; local_18 < pbVar2; local_18 = local_18 + 1) {
local_40 = ((local_40 & 0x3f) + local_48) * (ulong)(byte)combo1map[*local_18] + local_40 * 0x100
^ local_40;
lVar1 = local_48 + 3;
if ((byte)combo2map[*local_18] != 0) {
local_40 = ((local_40 & 0x3f) + local_48 + 3) * (ulong)(uint)(byte)combo2map[*local_18] +
local_40 * 0x100 ^ local_40;
lVar1 = local_48 + 6;
}
local_48 = lVar1;
}
*param_4 = local_40;
*param_5 = local_48;
return;
}
| |
32,585 | void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double) | monkey531[P]llama/common/json.hpp | JSON_HEDLEY_NON_NULL(1)
void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value)
{
static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3,
"internal error: not enough precision");
JSON_ASSERT(std::isfinite(value));
JSON_ASSERT(value > 0);
// If the neighbors (and boundaries) of 'value' are always computed for double-precision
// numbers, all float's can be recovered using strtod (and strtof). However, the resulting
// decimal representations are not exactly "short".
//
// The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars)
// says "value is converted to a string as if by std::sprintf in the default ("C") locale"
// and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars'
// does.
// On the other hand, the documentation for 'std::to_chars' requires that "parsing the
// representation using the corresponding std::from_chars function recovers value exactly". That
// indicates that single precision floating-point numbers should be recovered using
// 'std::strtof'.
//
// NB: If the neighbors are computed for single-precision numbers, there is a single float
// (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision
// value is off by 1 ulp.
#if 0 // NOLINT(readability-avoid-unconditional-preprocessor-if)
const boundaries w = compute_boundaries(static_cast<double>(value));
#else
const boundaries w = compute_boundaries(value);
#endif
grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus);
} | O2 | cpp | void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jge 0x87bc5
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x87be1
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x87d9b
movq 0x10(%r12), %rcx
movl 0x18(%r12), %r8d
movups (%r12), %xmm0
movups 0x20(%r12), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x87ee3
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x28960(%rip), %rdi # 0xb052c
leaq 0x289a3(%rip), %rdx # 0xb0576
leaq 0x2e033(%rip), %rcx # 0xb5c0d
movl $0x4589, %esi # imm = 0x4589
jmp 0x87bfb
leaq 0x28944(%rip), %rdi # 0xb052c
leaq 0x28987(%rip), %rdx # 0xb0576
leaq 0x2e130(%rip), %rcx # 0xb5d26
movl $0x458a, %esi # imm = 0x458A
xorl %eax, %eax
callq 0x23ed0
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2IdEEvPcRiS5_T_:
push r15
push r14
push r12
push rbx
sub rsp, 58h
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jge short loc_87BC5
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jbe short loc_87BE1
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea r12, [rsp+78h+var_50]
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double)
mov rcx, [r12+10h]
mov r8d, [r12+18h]
movups xmm0, xmmword ptr [r12]
movups xmm1, xmmword ptr [r12+20h]
movups [rsp+78h+var_68], xmm1
movups [rsp+78h+var_78], xmm0
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
loc_87BC5:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aStdIsfiniteVal; "std::isfinite(value)"
mov esi, 4589h
jmp short loc_87BFB
loc_87BE1:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aValue0; "value > 0"
mov esi, 458Ah
loc_87BFB:
xor eax, eax
call _ggml_abort
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(
long long a1,
long long a2,
long long a3,
double a4)
{
long long v5; // r9
char *v7; // rsi
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
_QWORD v12[3]; // [rsp+28h] [rbp-50h] BYREF
unsigned int v13; // [rsp+40h] [rbp-38h]
long long v14; // [rsp+48h] [rbp-30h]
long long v15; // [rsp+50h] [rbp-28h]
if ( (*(_QWORD *)&a4 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
{
v7 = (_BYTE *)(&stru_4578 + 17);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17801LL,
"GGML_ASSERT(%s) failed",
"std::isfinite(value)");
}
else
{
if ( a4 > 0.0 )
{
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(v12);
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(
a1,
a2,
a3,
v12[2],
v13,
v5,
v12[0],
v12[1],
v14,
v15);
}
v7 = (_BYTE *)(&stru_4578 + 18);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17802LL,
"GGML_ASSERT(%s) failed",
"value > 0");
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(
(nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v7,
v8,
v9,
v10,
v11);
}
| grisu2<double>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JGE 0x00187bc5
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JBE 0x00187be1
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA R12,[RSP + 0x28]
MOV RDI,R12
CALL 0x00187d9b
MOV RCX,qword ptr [R12 + 0x10]
MOV R8D,dword ptr [R12 + 0x18]
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS XMM1,xmmword ptr [R12 + 0x20]
MOVUPS xmmword ptr [RSP + 0x10],XMM1
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00187ee3
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00187bc5:
LEA RDI,[0x1b052c]
LEA RDX,[0x1b0576]
LEA RCX,[0x1b5c0d]
MOV ESI,0x4589
JMP 0x00187bfb
LAB_00187be1:
LEA RDI,[0x1b052c]
LEA RDX,[0x1b0576]
LEA RCX,[0x1b5d26]
MOV ESI,0x458a
LAB_00187bfb:
XOR EAX,EAX
CALL 0x00123ed0
|
/* void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double) */
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>
(char *param_1,int *param_2,int *param_3,double param_4)
{
char *pcVar1;
int8 uVar2;
int8 in_R9;
int4 local_50 [2];
int4 uStack_48;
int8 local_40;
int4 local_38;
int4 local_30;
int4 uStack_28;
if ((ulong)ABS(param_4) < 0x7ff0000000000000) {
if (0.0 < param_4) {
compute_boundaries<double>((dtoa_impl *)local_50,param_4);
grisu2(param_1,param_2,param_3,local_40,local_38,in_R9,local_50[0],uStack_48,local_30,
uStack_28);
return;
}
pcVar1 = "value > 0";
uVar2 = 0x458a;
}
else {
pcVar1 = "std::isfinite(value)";
uVar2 = 0x4589;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar2,
"GGML_ASSERT(%s) failed",pcVar1);
}
| |
32,586 | nglog::posix_strerror_r(int, char*, unsigned long) | ng-log[P]ng-log/src/logging.cc | NGLOG_NO_EXPORT
int posix_strerror_r(int err, char* buf, size_t len) {
// Sanity check input parameters
if (buf == nullptr || len <= 0) {
errno = EINVAL;
return -1;
}
// Reset buf and errno, and try calling whatever version of strerror_r()
// is implemented by glibc
buf[0] = '\000';
int old_errno = errno;
errno = 0;
char* rc = reinterpret_cast<char*>(strerror_r(err, buf, len));
// Both versions set errno on failure
if (errno) {
// Should already be there, but better safe than sorry
buf[0] = '\000';
return -1;
}
errno = old_errno;
// POSIX is vague about whether the string will be terminated, although
// is indirectly implies that typically ERANGE will be returned, instead
// of truncating the string. This is different from the GNU implementation.
// We play it safe by always terminating the string explicitly.
buf[len - 1] = '\000';
// If the function succeeded, we can use its exit code to determine the
// semantics implemented by glibc
if (!rc) {
return 0;
} else {
// GNU semantics detected
if (rc == buf) {
return 0;
} else {
buf[0] = '\000';
#if defined(NGLOG_OS_MACOSX) || defined(NGLOG_OS_FREEBSD) || \
defined(NGLOG_OS_OPENBSD)
if (reinterpret_cast<intptr_t>(rc) < sys_nerr) {
// This means an error on MacOSX or FreeBSD.
return -1;
}
#endif
strncat(buf, rc, len - 1);
return 0;
}
}
} | O3 | cpp | nglog::posix_strerror_r(int, char*, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
setne %al
testq %rdx, %rdx
setne %cl
testb %cl, %al
jne 0x18185
callq 0x11070
movl $0x16, (%rax)
jmp 0x181b8
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movb $0x0, (%rsi)
callq 0x11070
movq %rax, %r15
movl (%rax), %r12d
movl $0x0, (%rax)
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x11180
cmpl $0x0, (%r15)
je 0x181c8
movb $0x0, (%r14)
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %r12d, (%r15)
movb $0x0, -0x1(%r14,%rbx)
testq %rax, %rax
sete %cl
cmpq %r14, %rax
sete %dl
xorl %ebp, %ebp
orb %cl, %dl
jne 0x181bd
decq %rbx
movb $0x0, (%r14)
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x115c0
jmp 0x181bd
| _ZN5nglog16posix_strerror_rEiPcm:
push rbp
push r15
push r14
push r12
push rbx
test rsi, rsi
setnz al
test rdx, rdx
setnz cl
test al, cl
jnz short loc_18185
call ___errno_location
mov dword ptr [rax], 16h
jmp short loc_181B8
loc_18185:
mov rbx, rdx
mov r14, rsi
mov ebp, edi
mov byte ptr [rsi], 0
call ___errno_location
mov r15, rax
mov r12d, [rax]
mov dword ptr [rax], 0
mov edi, ebp
mov rsi, r14
mov rdx, rbx
call _strerror_r
cmp dword ptr [r15], 0
jz short loc_181C8
mov byte ptr [r14], 0
loc_181B8:
mov ebp, 0FFFFFFFFh
loc_181BD:
mov eax, ebp
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_181C8:
mov [r15], r12d
mov byte ptr [r14+rbx-1], 0
test rax, rax
setz cl
cmp rax, r14
setz dl
xor ebp, ebp
or dl, cl
jnz short loc_181BD
dec rbx
mov byte ptr [r14], 0
mov rdi, r14
mov rsi, rax
mov rdx, rbx
call _strncat
jmp short loc_181BD
| long long nglog::posix_strerror_r(nglog *this, _BYTE *a2, char *a3)
{
int *v4; // r15
int v5; // r12d
long long v6; // rax
unsigned int v7; // ebp
if ( a3 == 0LL || a2 == 0LL )
{
*(_DWORD *)__errno_location(this) = 22;
return (unsigned int)-1;
}
*a2 = 0;
v4 = (int *)((long long (*)(void))__errno_location)();
v5 = *v4;
*v4 = 0;
v6 = strerror_r((unsigned int)this, a2, a3);
if ( *v4 )
{
*a2 = 0;
return (unsigned int)-1;
}
*v4 = v5;
a3[(_QWORD)a2 - 1] = 0;
v7 = 0;
if ( v6 != 0 && v6 != (_QWORD)a2 )
{
*a2 = 0;
strncat(a2, v6, a3 - 1);
}
return v7;
}
| posix_strerror_r:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
TEST RSI,RSI
SETNZ AL
TEST RDX,RDX
SETNZ CL
TEST AL,CL
JNZ 0x00118185
CALL 0x00111070
MOV dword ptr [RAX],0x16
JMP 0x001181b8
LAB_00118185:
MOV RBX,RDX
MOV R14,RSI
MOV EBP,EDI
MOV byte ptr [RSI],0x0
CALL 0x00111070
MOV R15,RAX
MOV R12D,dword ptr [RAX]
MOV dword ptr [RAX],0x0
MOV EDI,EBP
MOV RSI,R14
MOV RDX,RBX
CALL 0x00111180
CMP dword ptr [R15],0x0
JZ 0x001181c8
MOV byte ptr [R14],0x0
LAB_001181b8:
MOV EBP,0xffffffff
LAB_001181bd:
MOV EAX,EBP
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001181c8:
MOV dword ptr [R15],R12D
MOV byte ptr [R14 + RBX*0x1 + -0x1],0x0
TEST RAX,RAX
SETZ CL
CMP RAX,R14
SETZ DL
XOR EBP,EBP
OR DL,CL
JNZ 0x001181bd
DEC RBX
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV RSI,RAX
MOV RDX,RBX
CALL 0x001115c0
JMP 0x001181bd
|
/* nglog::posix_strerror_r(int, char*, unsigned long) */
int8 nglog::posix_strerror_r(int param_1,char *param_2,ulong param_3)
{
int iVar1;
int *piVar2;
char *__src;
if (param_2 == (char *)0x0 || param_3 == 0) {
piVar2 = __errno_location();
*piVar2 = 0x16;
}
else {
*param_2 = '\0';
piVar2 = __errno_location();
iVar1 = *piVar2;
*piVar2 = 0;
__src = strerror_r(param_1,param_2,param_3);
if (*piVar2 == 0) {
*piVar2 = iVar1;
param_2[param_3 - 1] = '\0';
if (__src == param_2 || __src == (char *)0x0) {
return 0;
}
*param_2 = '\0';
strncat(param_2,__src,param_3 - 1);
return 0;
}
*param_2 = '\0';
}
return 0xffffffff;
}
| |
32,587 | my_default_csname | eloqsql/mysys/charset.c | const char* my_default_csname()
{
const char* csname = NULL;
#ifdef _WIN32
char cpbuf[64];
int cp = GetConsoleCP();
if (cp == 0)
cp = GetACP();
snprintf(cpbuf, sizeof(cpbuf), "cp%d", (int)cp);
csname = my_os_charset_to_mysql_charset(cpbuf);
#elif defined(HAVE_SETLOCALE) && defined(HAVE_NL_LANGINFO)
if (setlocale(LC_CTYPE, "") && (csname = nl_langinfo(CODESET)))
csname = my_os_charset_to_mysql_charset(csname);
#endif
return csname ? csname : MYSQL_DEFAULT_CHARSET_NAME;
} | O0 | c | my_default_csname:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, -0x8(%rbp)
xorl %edi, %edi
leaq 0x7ad6b(%rip), %rsi # 0x15c964
callq 0x2a600
cmpq $0x0, %rax
je 0xe1c25
movl $0xe, %edi
callq 0x2a590
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0xe1c25
movq -0x8(%rbp), %rdi
callq 0xe1c50
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe1c36
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xe1c43
leaq 0x7d989(%rip), %rax # 0x15f5c6
movq %rax, -0x10(%rbp)
jmp 0xe1c43
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| my_default_csname:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], 0
xor edi, edi
lea rsi, aUsageSOptions+15h; ""
call _setlocale
cmp rax, 0
jz short loc_E1C25
mov edi, 0Eh
call _nl_langinfo
mov [rbp+var_8], rax
cmp rax, 0
jz short loc_E1C25
mov rdi, [rbp+var_8]
call my_os_charset_to_mysql_charset
mov [rbp+var_8], rax
loc_E1C25:
cmp [rbp+var_8], 0
jz short loc_E1C36
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
jmp short loc_E1C43
loc_E1C36:
lea rax, aLatin1; "latin1"
mov [rbp+var_10], rax
jmp short $+2
loc_E1C43:
mov rax, [rbp+var_10]
add rsp, 10h
pop rbp
retn
| const char *my_default_csname()
{
long long v2; // [rsp+8h] [rbp-8h]
v2 = 0LL;
if ( setlocale(0LL, "") )
{
v2 = nl_langinfo(14LL);
if ( v2 )
v2 = my_os_charset_to_mysql_charset(v2);
}
if ( v2 )
return (const char *)v2;
else
return "latin1";
}
| my_default_csname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],0x0
XOR EDI,EDI
LEA RSI,[0x25c964]
CALL 0x0012a600
CMP RAX,0x0
JZ 0x001e1c25
MOV EDI,0xe
CALL 0x0012a590
MOV qword ptr [RBP + -0x8],RAX
CMP RAX,0x0
JZ 0x001e1c25
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001e1c50
MOV qword ptr [RBP + -0x8],RAX
LAB_001e1c25:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001e1c36
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001e1c43
LAB_001e1c36:
LEA RAX,[0x25f5c6]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001e1c43
LAB_001e1c43:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x10
POP RBP
RET
|
char * my_default_csname(void)
{
char *pcVar1;
char *local_18;
char *local_10;
local_10 = (char *)0x0;
pcVar1 = setlocale(0,"");
if (pcVar1 != (char *)0x0) {
local_10 = nl_langinfo(0xe);
if (local_10 != (char *)0x0) {
local_10 = (char *)my_os_charset_to_mysql_charset(local_10);
}
}
if (local_10 == (char *)0x0) {
local_18 = "latin1";
}
else {
local_18 = local_10;
}
return local_18;
}
| |
32,588 | my_init_mysys_psi_keys | eloqsql/mysys/my_init.c | void my_init_mysys_psi_keys()
{
const char* category= "mysys";
int count;
count= sizeof(all_mysys_mutexes)/sizeof(all_mysys_mutexes[0]);
mysql_mutex_register(category, all_mysys_mutexes, count);
count= sizeof(all_mysys_conds)/sizeof(all_mysys_conds[0]);
mysql_cond_register(category, all_mysys_conds, count);
count= sizeof(all_mysys_rwlocks)/sizeof(all_mysys_rwlocks[0]);
mysql_rwlock_register(category, all_mysys_rwlocks, count);
count= sizeof(all_mysys_threads)/sizeof(all_mysys_threads[0]);
mysql_thread_register(category, all_mysys_threads, count);
count= sizeof(all_mysys_files)/sizeof(all_mysys_files[0]);
mysql_file_register(category, all_mysys_files, count);
count= array_elements(all_mysys_stages);
mysql_stage_register(category, all_mysys_stages, count);
} | O3 | c | my_init_mysys_psi_keys:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2e6c73(%rip), %r14 # 0x389060
movq (%r14), %rax
leaq 0x3c24e(%rip), %rbx # 0xde645
leaq 0x2e6452(%rip), %rsi # 0x388850
movq %rbx, %rdi
movl $0x13, %edx
callq *(%rax)
movq (%r14), %rax
leaq 0x2e660e(%rip), %rsi # 0x388a20
movq %rbx, %rdi
movl $0x7, %edx
callq *0x10(%rax)
movq (%r14), %rax
leaq 0x2e66a9(%rip), %rsi # 0x388ad0
movq %rbx, %rdi
movl $0x1, %edx
callq *0x8(%rax)
movq (%r14), %rax
leaq 0x2e66b4(%rip), %rsi # 0x388af0
movq %rbx, %rdi
movl $0x1, %edx
callq *0x18(%rax)
movq (%r14), %rax
leaq 0x2e66bf(%rip), %rsi # 0x388b10
movq %rbx, %rdi
movl $0x2, %edx
callq *0x20(%rax)
movq (%r14), %rax
movq 0x28(%rax), %rax
leaq 0x2e63d6(%rip), %rsi # 0x388840
movq %rbx, %rdi
movl $0x1, %edx
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
| my_init_mysys_psi_keys:
push rbp
mov rbp, rsp
push r14
push rbx
lea r14, PSI_server
mov rax, [r14]
lea rbx, aMysys; "mysys"
lea rsi, all_mysys_mutexes
mov rdi, rbx
mov edx, 13h
call qword ptr [rax]
mov rax, [r14]
lea rsi, all_mysys_conds
mov rdi, rbx
mov edx, 7
call qword ptr [rax+10h]
mov rax, [r14]
lea rsi, all_mysys_rwlocks
mov rdi, rbx
mov edx, 1
call qword ptr [rax+8]
mov rax, [r14]
lea rsi, all_mysys_threads
mov rdi, rbx
mov edx, 1
call qword ptr [rax+18h]
mov rax, [r14]
lea rsi, all_mysys_files
mov rdi, rbx
mov edx, 2
call qword ptr [rax+20h]
mov rax, [r14]
mov rax, [rax+28h]
lea rsi, all_mysys_stages
mov rdi, rbx
mov edx, 1
pop rbx
pop r14
pop rbp
jmp rax
| long long my_init_mysys_psi_keys()
{
((void ( *)(const char *, _UNKNOWN **, long long))*PSI_server)("mysys", &all_mysys_mutexes, 19LL);
((void ( *)(const char *, _UNKNOWN **, long long))PSI_server[2])("mysys", &all_mysys_conds, 7LL);
((void ( *)(const char *, _UNKNOWN **, long long))PSI_server[1])("mysys", &all_mysys_rwlocks, 1LL);
((void ( *)(const char *, _UNKNOWN **, long long))PSI_server[3])("mysys", &all_mysys_threads, 1LL);
((void ( *)(const char *, _UNKNOWN **, long long))PSI_server[4])("mysys", &all_mysys_files, 2LL);
return ((long long ( *)(const char *, _UNKNOWN **, long long))PSI_server[5])("mysys", &all_mysys_stages, 1LL);
}
| my_init_mysys_psi_keys:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA R14,[0x489060]
MOV RAX,qword ptr [R14]
LEA RBX,[0x1de645]
LEA RSI,[0x488850]
MOV RDI,RBX
MOV EDX,0x13
CALL qword ptr [RAX]
MOV RAX,qword ptr [R14]
LEA RSI,[0x488a20]
MOV RDI,RBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [R14]
LEA RSI,[0x488ad0]
MOV RDI,RBX
MOV EDX,0x1
CALL qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14]
LEA RSI,[0x488af0]
MOV RDI,RBX
MOV EDX,0x1
CALL qword ptr [RAX + 0x18]
MOV RAX,qword ptr [R14]
LEA RSI,[0x488b10]
MOV RDI,RBX
MOV EDX,0x2
CALL qword ptr [RAX + 0x20]
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x28]
LEA RSI,[0x488840]
MOV RDI,RBX
MOV EDX,0x1
POP RBX
POP R14
POP RBP
JMP RAX
|
void my_init_mysys_psi_keys(void)
{
(**(code **)PSI_server)("mysys",all_mysys_mutexes,0x13);
(**(code **)(PSI_server + 0x10))("mysys",all_mysys_conds,7);
(**(code **)(PSI_server + 8))("mysys",all_mysys_rwlocks,1);
(**(code **)(PSI_server + 0x18))("mysys",all_mysys_threads,1);
(**(code **)(PSI_server + 0x20))("mysys",all_mysys_files,2);
/* WARNING: Could not recover jumptable at 0x001a2476. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(PSI_server + 0x28))("mysys",&all_mysys_stages,1);
return;
}
| |
32,589 | std::vector<int, std::allocator<int>> rapidcsv::Document::GetColumn<int>(unsigned long) const | Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h | std::vector<T> GetColumn(const size_t pColumnIdx) const
{
const size_t dataColumnIdx = GetDataColumnIndex(pColumnIdx);
std::vector<T> column;
Converter<T> converter(mConverterParams);
for (auto itRow = mData.begin(); itRow != mData.end(); ++itRow)
{
if (std::distance(mData.begin(), itRow) > mLabelParams.mColumnNameIdx)
{
if (dataColumnIdx < itRow->size())
{
T val;
converter.ToVal(itRow->at(dataColumnIdx), val);
column.push_back(val);
}
else
{
const std::string errStr = "requested column index " +
std::to_string(pColumnIdx) + " >= " +
std::to_string(itRow->size() - GetDataColumnIndex(0)) +
" (number of columns on row index " +
std::to_string(std::distance(mData.begin(), itRow) -
(mLabelParams.mColumnNameIdx + 1)) + ")";
throw std::out_of_range(errStr);
}
}
}
return column;
} | O1 | c | std::vector<int, std::allocator<int>> rapidcsv::Document::GetColumn<int>(unsigned long) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rdx, 0x8(%rsp)
movl 0x24(%rsi), %eax
leal 0x1(%rax), %ecx
xorl %ebx, %ebx
cmpl $-0x1, %eax
cmovgel %ecx, %ebx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, (%rsp)
movq $0x0, 0x10(%rdi)
leaq 0x30(%rsi), %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsi), %rbp
cmpq 0x70(%rsi), %rbp
je 0x1f444
movq %rsi, %r14
addq 0x8(%rsp), %rbx
movq %rbx, %r12
shlq $0x5, %r12
leaq 0x50(%rsp), %r13
movq %rbp, %r15
movq %r15, %rax
subq 0x68(%r14), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movslq 0x20(%r14), %rcx
cmpq %rcx, %rax
jle 0x1f436
movq (%rbp), %rsi
movq 0x8(%rbp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %rbx
jae 0x1f45a
addq %r12, %rsi
leaq 0x70(%rsp), %rdi
movq %r13, %rdx
callq 0x1f98e
movq (%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x1f42e
movl 0x50(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x1f436
movq %r13, %rdx
callq 0x1fd90
addq $0x18, %rbp
addq $0x18, %r15
cmpq 0x70(%r14), %rbp
jne 0x1f3ca
movq (%rsp), %rax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb8(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x1fa59
leaq 0x1e78a(%rip), %rsi # 0x3dbfd
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0x1d28f
leaq 0x1e786(%rip), %rsi # 0x3dc15
leaq 0xd8(%rsp), %rdi
callq 0xb7f0
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1f4bf
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x1f4cc
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rbp), %rsi
subq (%rbp), %rsi
sarq $0x5, %rsi
movl 0x24(%r14), %eax
leal 0x1(%rax), %ecx
xorl %edx, %edx
cmpl $-0x1, %eax
cmovgel %ecx, %edx
subq %rdx, %rsi
leaq 0x98(%rsp), %rdi
callq 0x1fa59
leaq 0xf8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x1ce20
leaq 0x1e6ea(%rip), %rsi # 0x3dc1a
leaq 0xf8(%rsp), %rdi
callq 0xb7f0
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1f55f
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x1f56c
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
subq 0x68(%r14), %r15
sarq $0x3, %r15
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
movslq 0x20(%r14), %rsi
notq %rsi
addq %r15, %rsi
leaq 0x78(%rsp), %rdi
callq 0x1fae9
leaq 0x118(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0x1ce20
leaq 0x1dd32(%rip), %rsi # 0x3d2fe
leaq 0x118(%rsp), %rdi
callq 0xb7f0
leaq 0x60(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1f5fa
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x1f607
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x128(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f640
movq 0x128(%rsp), %rsi
incq %rsi
callq 0xb400
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f661
movq 0x88(%rsp), %rsi
incq %rsi
callq 0xb400
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x1f678
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb400
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f699
movq 0x108(%rsp), %rsi
incq %rsi
callq 0xb400
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f6ba
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0xb400
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x1f6d1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb400
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f6f2
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0xb400
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f713
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0xb400
movl $0x10, %edi
callq 0xb1b0
movq %rax, %r15
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0xb660
movq 0x3a894(%rip), %rsi # 0x59fc8
movq 0x3a885(%rip), %rdx # 0x59fc0
movq %r15, %rdi
callq 0xb740
movq %rax, %r14
jmp 0x1f753
movq %rax, %r14
movq %r15, %rdi
callq 0xb2d0
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1f88c
movq 0x60(%rsp), %rsi
jmp 0x1f87d
movq %rax, %r14
leaq 0x128(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f794
movq 0x128(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x1f794
movq %rax, %r14
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f7ba
movq 0x88(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x1f7ba
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x1f7d6
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x1f7d6
movq %rax, %r14
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f7fc
movq 0x108(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x1f7fc
movq %rax, %r14
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f822
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x1f822
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x1f83e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x1f83e
movq %rax, %r14
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f864
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x1f864
movq %rax, %r14
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f88c
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x1f88c
jmp 0x1f889
movq %rax, %r14
movq (%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x1f8a8
movq (%rsp), %rax
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0xb400
movq %r14, %rdi
callq 0xb780
| _ZNK8rapidcsv8Document9GetColumnIiEESt6vectorIT_SaIS3_EEm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 138h
mov [rsp+168h+var_160], rdx
mov eax, [rsi+24h]
lea ecx, [rax+1]
xor ebx, ebx
cmp eax, 0FFFFFFFFh
cmovge ebx, ecx
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov [rsp+168h+var_168], rdi
mov qword ptr [rdi+10h], 0
lea rax, [rsi+30h]
mov [rsp+168h+var_F8], rax
mov rbp, [rsi+68h]
cmp rbp, [rsi+70h]
jz loc_1F444
mov r14, rsi
add rbx, [rsp+168h+var_160]
mov r12, rbx
shl r12, 5
lea r13, [rsp+168h+var_118]
mov r15, rbp
loc_1F3CA:
mov rax, r15
sub rax, [r14+68h]
sar rax, 3
mov rcx, 0AAAAAAAAAAAAAAABh
imul rax, rcx
movsxd rcx, dword ptr [r14+20h]
cmp rax, rcx
jle short loc_1F436
mov rsi, [rbp+0]
mov rax, [rbp+8]
sub rax, rsi
sar rax, 5
cmp rbx, rax
jnb short loc_1F45A
add rsi, r12
lea rdi, [rsp+168h+var_F8]
mov rdx, r13
call _ZNK8rapidcsv9ConverterIiE5ToValERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERi; rapidcsv::Converter<int>::ToVal(std::string const&,int &)
mov rdi, [rsp+168h+var_168]
mov rsi, [rdi+8]
cmp rsi, [rdi+10h]
jz short loc_1F42E
mov eax, dword ptr [rsp+168h+var_118]
mov [rsi], eax
add rsi, 4
mov [rdi+8], rsi
jmp short loc_1F436
loc_1F42E:
mov rdx, r13
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_1F436:
add rbp, 18h
add r15, 18h
cmp rbp, [r14+70h]
jnz short loc_1F3CA
loc_1F444:
mov rax, [rsp+168h+var_168]
add rsp, 138h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1F45A:
lea rdi, [rsp+168h+var_B0]; this
mov rsi, [rsp+168h+var_160]; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rsi, aRequestedColum; "requested column index "
lea rdi, [rsp+168h+var_90]
lea rdx, [rsp+168h+var_B0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rsi, asc_3DC15; " >= "
lea rdi, [rsp+168h+var_90]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r12, [rsp+168h+var_148]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_1F4BF
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
jmp short loc_1F4CC
loc_1F4BF:
mov [rsp+168h+var_158], rdx
mov rdx, [rcx]
mov [rsp+168h+var_148], rdx
loc_1F4CC:
mov rdx, [rax+8]
mov [rsp+168h+var_150], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [rbp+8]
sub rsi, [rbp+0]
sar rsi, 5
mov eax, [r14+24h]
lea ecx, [rax+1]
xor edx, edx
cmp eax, 0FFFFFFFFh
cmovge edx, ecx
sub rsi, rdx; unsigned __int64
lea rdi, [rsp+168h+var_D0]; this
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rdi, [rsp+168h+var_70]
lea rsi, [rsp+168h+var_158]
lea rdx, [rsp+168h+var_D0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rsi, aNumberOfColumn; " (number of columns on row index "
lea rdi, [rsp+168h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r13, [rsp+168h+var_128]
mov [r13-10h], r13
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_1F55F
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r13+0], xmm0
jmp short loc_1F56C
loc_1F55F:
mov [rsp+168h+var_138], rdx
mov rdx, [rcx]
mov [rsp+168h+var_128], rdx
loc_1F56C:
mov rdx, [rax+8]
mov [rsp+168h+var_130], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
sub r15, [r14+68h]
sar r15, 3
mov rax, 0AAAAAAAAAAAAAAABh
imul r15, rax
movsxd rsi, dword ptr [r14+20h]
not rsi
add rsi, r15; __int64
lea rdi, [rsp+168h+var_F0]; this
call _ZNSt7__cxx119to_stringEl; std::to_string(long)
lea rdi, [rsp+168h+var_50]
lea rsi, [rsp+168h+var_138]
lea rdx, [rsp+168h+var_F0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rsi, a0ArgSize+0Eh; ")"
lea rdi, [rsp+168h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rbp, [rsp+168h+var_108]
mov [rbp-10h], rbp
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_1F5FA
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbp+0], xmm0
jmp short loc_1F607
loc_1F5FA:
mov [rsp+168h+var_118], rdx
mov rdx, [rcx]
mov [rsp+168h+var_108], rdx
loc_1F607:
mov rdx, [rax+8]
mov [rsp+168h+var_110], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rax, [rsp+168h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F640
mov rsi, [rsp+168h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F640:
lea rax, [rsp+168h+var_E0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F661
mov rsi, [rsp+168h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F661:
mov rdi, [rsp+168h+var_138]; void *
cmp rdi, r13
jz short loc_1F678
mov rsi, [rsp+168h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F678:
lea rax, [rsp+168h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F699
mov rsi, [rsp+168h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F699:
lea rax, [rsp+168h+var_C0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F6BA
mov rsi, [rsp+168h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F6BA:
mov rdi, [rsp+168h+var_158]; void *
cmp rdi, r12
jz short loc_1F6D1
mov rsi, [rsp+168h+var_148]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F6D1:
lea rax, [rsp+168h+var_80]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F6F2
mov rsi, [rsp+168h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F6F2:
lea rax, [rsp+168h+var_A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F713
mov rsi, [rsp+168h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F713:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, [rsp+168h+var_118]
mov rdi, rax
call __ZNSt12out_of_rangeC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::out_of_range::out_of_range(std::string const&)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r14, rax
jmp short loc_1F753
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
loc_1F753:
mov rdi, [rsp+168h+var_118]
cmp rdi, rbp
jz loc_1F88C
mov rsi, [rsp+168h+var_108]
jmp loc_1F87D
mov r14, rax
lea rax, [rsp+168h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F794
mov rsi, [rsp+168h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1F794
mov r14, rax
loc_1F794:
lea rax, [rsp+168h+var_E0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F7BA
mov rsi, [rsp+168h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1F7BA
mov r14, rax
loc_1F7BA:
mov rdi, [rsp+168h+var_138]; void *
cmp rdi, r13
jz short loc_1F7D6
mov rsi, [rsp+168h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1F7D6
mov r14, rax
loc_1F7D6:
lea rax, [rsp+168h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F7FC
mov rsi, [rsp+168h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1F7FC
mov r14, rax
loc_1F7FC:
lea rax, [rsp+168h+var_C0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F822
mov rsi, [rsp+168h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1F822
mov r14, rax
loc_1F822:
mov rdi, [rsp+168h+var_158]; void *
cmp rdi, r12
jz short loc_1F83E
mov rsi, [rsp+168h+var_148]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1F83E
mov r14, rax
loc_1F83E:
lea rax, [rsp+168h+var_80]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F864
mov rsi, [rsp+168h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1F864
mov r14, rax
loc_1F864:
lea rax, [rsp+168h+var_A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F88C
mov rsi, [rsp+168h+var_A0]
loc_1F87D:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1F88C
jmp short $+2
loc_1F889:
mov r14, rax
loc_1F88C:
mov rax, [rsp+168h+var_168]
mov rdi, [rax]; void *
test rdi, rdi
jz short loc_1F8A8
mov rax, [rsp+168h+var_168]
mov rsi, [rax+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F8A8:
mov rdi, r14
call __Unwind_Resume
| long long rapidcsv::Document::GetColumn<int>(long long a1, long long a2, unsigned long long a3)
{
int v3; // eax
long long v4; // rbx
_QWORD *v5; // rbp
unsigned long long v7; // rbx
long long v8; // r15
_DWORD *v9; // rsi
long long v11; // rax
__int128 *v12; // rcx
int v13; // eax
long long v14; // rdx
long long v15; // rax
__int128 *v16; // rcx
long long v17; // rax
__int128 *v18; // rcx
void *exception; // r15
void *v21[2]; // [rsp+10h] [rbp-158h] BYREF
__int128 v22; // [rsp+20h] [rbp-148h] BYREF
void *v23[2]; // [rsp+30h] [rbp-138h] BYREF
__int128 v24; // [rsp+40h] [rbp-128h] BYREF
_QWORD v25[2]; // [rsp+50h] [rbp-118h] BYREF
__int128 v26; // [rsp+60h] [rbp-108h] BYREF
long long v27; // [rsp+70h] [rbp-F8h] BYREF
void *v28[2]; // [rsp+78h] [rbp-F0h] BYREF
long long v29; // [rsp+88h] [rbp-E0h] BYREF
void *v30[2]; // [rsp+98h] [rbp-D0h] BYREF
long long v31; // [rsp+A8h] [rbp-C0h] BYREF
void *v32[2]; // [rsp+B8h] [rbp-B0h] BYREF
long long v33; // [rsp+C8h] [rbp-A0h] BYREF
void *v34[2]; // [rsp+D8h] [rbp-90h] BYREF
long long v35; // [rsp+E8h] [rbp-80h] BYREF
void *v36[2]; // [rsp+F8h] [rbp-70h] BYREF
long long v37; // [rsp+108h] [rbp-60h] BYREF
void *v38[2]; // [rsp+118h] [rbp-50h] BYREF
long long v39; // [rsp+128h] [rbp-40h] BYREF
v3 = *(_DWORD *)(a2 + 36);
v4 = 0LL;
if ( v3 >= -1 )
v4 = (unsigned int)(v3 + 1);
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v27 = a2 + 48;
v5 = *(_QWORD **)(a2 + 104);
if ( v5 != *(_QWORD **)(a2 + 112) )
{
v7 = a3 + v4;
v8 = *(_QWORD *)(a2 + 104);
do
{
if ( (long long)(0xAAAAAAAAAAAAAAABLL * ((v8 - *(_QWORD *)(a2 + 104)) >> 3)) > *(int *)(a2 + 32) )
{
if ( v7 >= (long long)(v5[1] - *v5) >> 5 )
{
std::to_string((std::__cxx11 *)v32, a3);
std::operator+<char>((long long)v34, (long long)"requested column index ", (long long)v32);
v11 = std::string::append(v34, " >= ");
v21[0] = &v22;
v12 = (__int128 *)(v11 + 16);
if ( *(_QWORD *)v11 == v11 + 16 )
{
v22 = *v12;
}
else
{
v21[0] = *(void **)v11;
*(_QWORD *)&v22 = *(_QWORD *)v12;
}
v21[1] = *(void **)(v11 + 8);
*(_QWORD *)v11 = v12;
*(_QWORD *)(v11 + 8) = 0LL;
*(_BYTE *)(v11 + 16) = 0;
v13 = *(_DWORD *)(a2 + 36);
v14 = 0LL;
if ( v13 >= -1 )
v14 = (unsigned int)(v13 + 1);
std::to_string((std::__cxx11 *)v30, ((long long)(v5[1] - *v5) >> 5) - v14);
std::operator+<char>((long long)v36, v21, v30);
v15 = std::string::append(v36, " (number of columns on row index ");
v23[0] = &v24;
v16 = (__int128 *)(v15 + 16);
if ( *(_QWORD *)v15 == v15 + 16 )
{
v24 = *v16;
}
else
{
v23[0] = *(void **)v15;
*(_QWORD *)&v24 = *(_QWORD *)v16;
}
v23[1] = *(void **)(v15 + 8);
*(_QWORD *)v15 = v16;
*(_QWORD *)(v15 + 8) = 0LL;
*(_BYTE *)(v15 + 16) = 0;
std::to_string(
(std::__cxx11 *)v28,
0xAAAAAAAAAAAAAAABLL * ((v8 - *(_QWORD *)(a2 + 104)) >> 3) + ~(long long)*(int *)(a2 + 32));
std::operator+<char>((long long)v38, v23, v28);
v17 = std::string::append(v38, ")");
v25[0] = &v26;
v18 = (__int128 *)(v17 + 16);
if ( *(_QWORD *)v17 == v17 + 16 )
{
v26 = *v18;
}
else
{
v25[0] = *(_QWORD *)v17;
*(_QWORD *)&v26 = *(_QWORD *)v18;
}
v25[1] = *(_QWORD *)(v17 + 8);
*(_QWORD *)v17 = v18;
*(_QWORD *)(v17 + 8) = 0LL;
*(_BYTE *)(v17 + 16) = 0;
if ( v38[0] != &v39 )
operator delete(v38[0], v39 + 1);
if ( v28[0] != &v29 )
operator delete(v28[0], v29 + 1);
if ( v23[0] != &v24 )
operator delete(v23[0], v24 + 1);
if ( v36[0] != &v37 )
operator delete(v36[0], v37 + 1);
if ( v30[0] != &v31 )
operator delete(v30[0], v31 + 1);
if ( v21[0] != &v22 )
operator delete(v21[0], v22 + 1);
if ( v34[0] != &v35 )
operator delete(v34[0], v35 + 1);
if ( v32[0] != &v33 )
operator delete(v32[0], v33 + 1);
exception = __cxa_allocate_exception(0x10uLL);
std::out_of_range::out_of_range(exception, v25);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))&std::out_of_range::~out_of_range);
}
rapidcsv::Converter<int>::ToVal(&v27, 32 * v7 + *v5, v25);
v9 = *(_DWORD **)(a1 + 8);
if ( v9 == *(_DWORD **)(a1 + 16) )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v9, v25);
}
else
{
*v9 = v25[0];
*(_QWORD *)(a1 + 8) = v9 + 1;
}
}
v5 += 3;
v8 += 24LL;
}
while ( v5 != *(_QWORD **)(a2 + 112) );
}
return a1;
}
| GetColumn<int>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x138
MOV qword ptr [RSP + 0x8],RDX
MOV EAX,dword ptr [RSI + 0x24]
LEA ECX,[RAX + 0x1]
XOR EBX,EBX
CMP EAX,-0x1
CMOVGE EBX,ECX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RSP],RDI
MOV qword ptr [RDI + 0x10],0x0
LEA RAX,[RSI + 0x30]
MOV qword ptr [RSP + 0x70],RAX
MOV RBP,qword ptr [RSI + 0x68]
CMP RBP,qword ptr [RSI + 0x70]
JZ 0x0011f444
MOV R14,RSI
ADD RBX,qword ptr [RSP + 0x8]
MOV R12,RBX
SHL R12,0x5
LEA R13,[RSP + 0x50]
MOV R15,RBP
LAB_0011f3ca:
MOV RAX,R15
SUB RAX,qword ptr [R14 + 0x68]
SAR RAX,0x3
MOV RCX,-0x5555555555555555
IMUL RAX,RCX
MOVSXD RCX,dword ptr [R14 + 0x20]
CMP RAX,RCX
JLE 0x0011f436
MOV RSI,qword ptr [RBP]
MOV RAX,qword ptr [RBP + 0x8]
SUB RAX,RSI
SAR RAX,0x5
CMP RBX,RAX
JNC 0x0011f45a
ADD RSI,R12
LAB_0011f403:
LEA RDI,[RSP + 0x70]
MOV RDX,R13
CALL 0x0011f98e
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JZ 0x0011f42e
MOV EAX,dword ptr [RSP + 0x50]
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RDI + 0x8],RSI
JMP 0x0011f436
LAB_0011f42e:
MOV RDX,R13
CALL 0x0011fd90
LAB_0011f436:
ADD RBP,0x18
ADD R15,0x18
CMP RBP,qword ptr [R14 + 0x70]
JNZ 0x0011f3ca
LAB_0011f444:
MOV RAX,qword ptr [RSP]
ADD RSP,0x138
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011f45a:
LEA RDI,[RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0011fa59
LAB_0011f46c:
LEA RSI,[0x13dbfd]
LEA RDI,[RSP + 0xd8]
LEA RDX,[RSP + 0xb8]
CALL 0x0011d28f
LAB_0011f488:
LEA RSI,[0x13dc15]
LEA RDI,[RSP + 0xd8]
CALL 0x0010b7f0
LEA R12,[RSP + 0x20]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x0011f4bf
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
JMP 0x0011f4cc
LAB_0011f4bf:
MOV qword ptr [RSP + 0x10],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x20],RDX
LAB_0011f4cc:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [RBP + 0x8]
SUB RSI,qword ptr [RBP]
SAR RSI,0x5
MOV EAX,dword ptr [R14 + 0x24]
LEA ECX,[RAX + 0x1]
XOR EDX,EDX
CMP EAX,-0x1
CMOVGE EDX,ECX
SUB RSI,RDX
LAB_0011f502:
LEA RDI,[RSP + 0x98]
CALL 0x0011fa59
LAB_0011f50f:
LEA RDI,[RSP + 0xf8]
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x98]
CALL 0x0011ce20
LAB_0011f529:
LEA RSI,[0x13dc1a]
LEA RDI,[RSP + 0xf8]
CALL 0x0010b7f0
LEA R13,[RSP + 0x40]
MOV qword ptr [R13 + -0x10],R13
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x0011f55f
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R13],XMM0
JMP 0x0011f56c
LAB_0011f55f:
MOV qword ptr [RSP + 0x30],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x40],RDX
LAB_0011f56c:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
SUB R15,qword ptr [R14 + 0x68]
SAR R15,0x3
MOV RAX,-0x5555555555555555
IMUL R15,RAX
MOVSXD RSI,dword ptr [R14 + 0x20]
NOT RSI
ADD RSI,R15
LAB_0011f5a4:
LEA RDI,[RSP + 0x78]
CALL 0x0011fae9
LAB_0011f5ae:
LEA RDI,[RSP + 0x118]
LEA RSI,[RSP + 0x30]
LEA RDX,[RSP + 0x78]
CALL 0x0011ce20
LAB_0011f5c5:
LEA RSI,[0x13d2fe]
LEA RDI,[RSP + 0x118]
CALL 0x0010b7f0
LAB_0011f5d9:
LEA RBP,[RSP + 0x60]
MOV qword ptr [RBP + -0x10],RBP
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x0011f5fa
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBP],XMM0
JMP 0x0011f607
LAB_0011f5fa:
MOV qword ptr [RSP + 0x50],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x60],RDX
LAB_0011f607:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x58],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RAX,[RSP + 0x128]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011f640
MOV RSI,qword ptr [RSP + 0x128]
INC RSI
CALL 0x0010b400
LAB_0011f640:
LEA RAX,[RSP + 0x88]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011f661
MOV RSI,qword ptr [RSP + 0x88]
INC RSI
CALL 0x0010b400
LAB_0011f661:
MOV RDI,qword ptr [RSP + 0x30]
CMP RDI,R13
JZ 0x0011f678
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0010b400
LAB_0011f678:
LEA RAX,[RSP + 0x108]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011f699
MOV RSI,qword ptr [RSP + 0x108]
INC RSI
CALL 0x0010b400
LAB_0011f699:
LEA RAX,[RSP + 0xa8]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011f6ba
MOV RSI,qword ptr [RSP + 0xa8]
INC RSI
CALL 0x0010b400
LAB_0011f6ba:
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R12
JZ 0x0011f6d1
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0010b400
LAB_0011f6d1:
LEA RAX,[RSP + 0xe8]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011f6f2
MOV RSI,qword ptr [RSP + 0xe8]
INC RSI
CALL 0x0010b400
LAB_0011f6f2:
LEA RAX,[RSP + 0xc8]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011f713
MOV RSI,qword ptr [RSP + 0xc8]
INC RSI
CALL 0x0010b400
LAB_0011f713:
MOV EDI,0x10
CALL 0x0010b1b0
MOV R15,RAX
LAB_0011f720:
LEA RSI,[RSP + 0x50]
MOV RDI,RAX
CALL 0x0010b660
LAB_0011f72d:
MOV RSI,qword ptr [0x00159fc8]
MOV RDX,qword ptr [0x00159fc0]
MOV RDI,R15
CALL 0x0010b740
|
/* std::vector<int, std::allocator<int> > rapidcsv::Document::GetColumn<int>(unsigned long) const */
ulong rapidcsv::Document::GetColumn<int>(ulong param_1)
{
int4 *puVar1;
long lVar2;
long *plVar3;
long *plVar4;
out_of_range *this;
long *plVar5;
ulong in_RDX;
ulong uVar6;
long in_RSI;
long *plVar7;
long *local_158;
long local_150;
long local_148;
long lStack_140;
long *local_138;
long local_130;
long local_128;
long lStack_120;
long *local_118;
long local_110;
long local_108;
long lStack_100;
long local_f8;
long *local_f0 [2];
long local_e0 [2];
long *local_d0 [2];
long local_c0 [2];
long *local_b0 [2];
long local_a0 [2];
long *local_90 [2];
long local_80 [2];
long *local_70 [2];
long local_60 [2];
long *local_50 [2];
long local_40 [2];
uVar6 = 0;
if (-2 < *(int *)(in_RSI + 0x24)) {
uVar6 = (ulong)(*(int *)(in_RSI + 0x24) + 1);
}
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
local_f8 = in_RSI + 0x30;
plVar4 = *(long **)(in_RSI + 0x68);
if (plVar4 != *(long **)(in_RSI + 0x70)) {
plVar7 = plVar4;
do {
lVar2 = ((long)plVar7 - *(long *)(in_RSI + 0x68) >> 3) * -0x5555555555555555;
if (lVar2 - *(int *)(in_RSI + 0x20) != 0 && *(int *)(in_RSI + 0x20) <= lVar2) {
if ((ulong)(plVar4[1] - *plVar4 >> 5) <= uVar6 + in_RDX) {
/* try { // try from 0011f45a to 0011f46b has its CatchHandler @ 0011f887 */
std::__cxx11::to_string((__cxx11 *)local_b0,in_RDX);
/* try { // try from 0011f46c to 0011f487 has its CatchHandler @ 0011f861 */
std::operator+((char *)local_90,(string *)"requested column index ");
/* try { // try from 0011f488 to 0011f49b has its CatchHandler @ 0011f83b */
plVar3 = (long *)std::__cxx11::string::append((char *)local_90);
local_158 = (long *)*plVar3;
plVar5 = plVar3 + 2;
if (local_158 == plVar5) {
local_148 = *plVar5;
lStack_140 = plVar3[3];
local_158 = &local_148;
}
else {
local_148 = *plVar5;
}
local_150 = plVar3[1];
*plVar3 = (long)plVar5;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
uVar6 = 0;
if (-2 < *(int *)(in_RSI + 0x24)) {
uVar6 = (ulong)(*(int *)(in_RSI + 0x24) + 1);
}
/* try { // try from 0011f502 to 0011f50e has its CatchHandler @ 0011f81f */
std::__cxx11::to_string((__cxx11 *)local_d0,(plVar4[1] - *plVar4 >> 5) - uVar6);
/* try { // try from 0011f50f to 0011f528 has its CatchHandler @ 0011f7f9 */
std::operator+((string *)local_70,(string *)&local_158);
/* try { // try from 0011f529 to 0011f53c has its CatchHandler @ 0011f7d3 */
plVar4 = (long *)std::__cxx11::string::append((char *)local_70);
local_138 = (long *)*plVar4;
plVar3 = plVar4 + 2;
if (local_138 == plVar3) {
local_128 = *plVar3;
lStack_120 = plVar4[3];
local_138 = &local_128;
}
else {
local_128 = *plVar3;
}
local_130 = plVar4[1];
*plVar4 = (long)plVar3;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
/* try { // try from 0011f5a4 to 0011f5ad has its CatchHandler @ 0011f7b7 */
std::__cxx11::to_string
((__cxx11 *)local_f0,
~(long)*(int *)(in_RSI + 0x20) +
((long)plVar7 - *(long *)(in_RSI + 0x68) >> 3) * -0x5555555555555555);
/* try { // try from 0011f5ae to 0011f5c4 has its CatchHandler @ 0011f791 */
std::operator+((string *)local_50,(string *)&local_138);
/* try { // try from 0011f5c5 to 0011f5d8 has its CatchHandler @ 0011f76b */
plVar4 = (long *)std::__cxx11::string::append((char *)local_50);
local_118 = (long *)*plVar4;
plVar7 = plVar4 + 2;
if (local_118 == plVar7) {
local_108 = *plVar7;
lStack_100 = plVar4[3];
local_118 = &local_108;
}
else {
local_108 = *plVar7;
}
local_110 = plVar4[1];
*plVar4 = (long)plVar7;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (local_f0[0] != local_e0) {
operator_delete(local_f0[0],local_e0[0] + 1);
}
if (local_138 != &local_128) {
operator_delete(local_138,local_128 + 1);
}
if (local_70[0] != local_60) {
operator_delete(local_70[0],local_60[0] + 1);
}
if (local_d0[0] != local_c0) {
operator_delete(local_d0[0],local_c0[0] + 1);
}
if (local_158 != &local_148) {
operator_delete(local_158,local_148 + 1);
}
if (local_90[0] != local_80) {
operator_delete(local_90[0],local_80[0] + 1);
}
if (local_b0[0] != local_a0) {
operator_delete(local_b0[0],local_a0[0] + 1);
}
this = (out_of_range *)__cxa_allocate_exception(0x10);
/* try { // try from 0011f720 to 0011f72c has its CatchHandler @ 0011f748 */
std::out_of_range::out_of_range(this,(string *)&local_118);
/* try { // try from 0011f72d to 0011f742 has its CatchHandler @ 0011f743 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00159fc8,PTR__out_of_range_00159fc0);
}
/* try { // try from 0011f403 to 0011f435 has its CatchHandler @ 0011f889 */
Converter<int>::ToVal
((Converter<int> *)&local_f8,(string *)(*plVar4 + (uVar6 + in_RDX) * 0x20),
(int *)&local_118);
puVar1 = *(int4 **)(param_1 + 8);
if (puVar1 == *(int4 **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,puVar1,&local_118);
}
else {
*puVar1 = local_118._0_4_;
*(int4 **)(param_1 + 8) = puVar1 + 1;
}
}
plVar4 = plVar4 + 3;
plVar7 = plVar7 + 3;
} while (plVar4 != *(long **)(in_RSI + 0x70));
}
return param_1;
}
| |
32,590 | JS_TryGetPropertyInt64 | bluesky950520[P]quickjs/quickjs.c | static int JS_TryGetPropertyInt64(JSContext *ctx, JSValue obj, int64_t idx, JSValue *pval)
{
JSValue val;
JSAtom prop;
int present;
if (likely(JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT &&
(uint64_t)idx <= INT32_MAX)) {
/* fast path for array and typed array access */
JSObject *p = JS_VALUE_GET_OBJ(obj);
if (js_get_fast_array_element(ctx, p, idx, pval))
return TRUE;
}
val = JS_EXCEPTION;
present = -1;
prop = JS_NewAtomInt64(ctx, idx);
if (likely(prop != JS_ATOM_NULL)) {
present = JS_HasProperty(ctx, obj, prop);
if (present > 0) {
val = JS_GetProperty(ctx, obj, prop);
if (unlikely(JS_IsException(val)))
present = -1;
} else if (present == FALSE) {
val = JS_UNDEFINED;
}
JS_FreeAtom(ctx, prop);
}
*pval = val;
return present;
} | O0 | c | JS_TryGetPropertyInt64:
subq $0x88, %rsp
movq %rsi, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
movq %rdi, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movq %r8, 0x58(%rsp)
movq 0x78(%rsp), %rax
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, 0x7(%rsp)
jne 0x8ded2
cmpq $0x7fffffff, 0x60(%rsp) # imm = 0x7FFFFFFF
setbe %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x8df23
movq 0x70(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x68(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x60(%rsp), %rax
movl %eax, %edx
movq 0x58(%rsp), %rcx
callq 0x378d0
cmpl $0x0, %eax
je 0x8df21
movl $0x1, 0x84(%rsp)
jmp 0x8e066
jmp 0x8df23
movl $0x0, 0x28(%rsp)
movq $0x6, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x50(%rsp)
movl $0xffffffff, 0x40(%rsp) # imm = 0xFFFFFFFF
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x380c0
movl %eax, 0x44(%rsp)
cmpl $0x0, 0x44(%rsp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x8e045
movq 0x68(%rsp), %rdi
movl 0x44(%rsp), %ecx
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x371c0
movl %eax, 0x40(%rsp)
cmpl $0x0, 0x40(%rsp)
jle 0x8e009
movq 0x68(%rsp), %rdi
movl 0x44(%rsp), %ecx
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x30070
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x8e007
movl $0xffffffff, 0x40(%rsp) # imm = 0xFFFFFFFF
jmp 0x8e037
cmpl $0x0, 0x40(%rsp)
jne 0x8e035
movl $0x0, 0x8(%rsp)
movq $0x3, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x8e037
movq 0x68(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x2f330
movq 0x58(%rsp), %rax
movq 0x48(%rsp), %rcx
movq %rcx, (%rax)
movq 0x50(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x40(%rsp), %eax
movl %eax, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
| JS_TryGetPropertyInt64:
sub rsp, 88h
mov [rsp+88h+var_18], rsi
mov [rsp+88h+var_10], rdx
mov [rsp+88h+var_20], rdi
mov [rsp+88h+var_28], rcx
mov [rsp+88h+var_30], r8
mov rax, [rsp+88h+var_10]
mov ecx, eax
xor eax, eax
cmp ecx, 0FFFFFFFFh
mov [rsp+88h+var_81], al
jnz short loc_8DED2
cmp [rsp+88h+var_28], 7FFFFFFFh
setbe al
mov [rsp+88h+var_81], al
loc_8DED2:
mov al, [rsp+88h+var_81]
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_8DF23
mov rax, [rsp+88h+var_18]
mov [rsp+88h+var_50], rax
mov rdi, [rsp+88h+var_20]
mov rsi, [rsp+88h+var_50]
mov rax, [rsp+88h+var_28]
mov edx, eax
mov rcx, [rsp+88h+var_30]
call js_get_fast_array_element
cmp eax, 0
jz short loc_8DF21
mov [rsp+88h+var_4], 1
jmp loc_8E066
loc_8DF21:
jmp short $+2
loc_8DF23:
mov dword ptr [rsp+88h+var_60], 0
mov [rsp+88h+var_58], 6
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_40], rax
mov rax, [rsp+88h+var_58]
mov [rsp+88h+var_38], rax
mov [rsp+88h+var_48], 0FFFFFFFFh
mov rdi, [rsp+88h+var_20]
mov rsi, [rsp+88h+var_28]
call JS_NewAtomInt64
mov [rsp+88h+var_44], eax
cmp [rsp+88h+var_44], 0
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz loc_8E045
mov rdi, [rsp+88h+var_20]
mov ecx, [rsp+88h+var_44]
mov rsi, [rsp+88h+var_18]
mov rdx, [rsp+88h+var_10]
call JS_HasProperty
mov [rsp+88h+var_48], eax
cmp [rsp+88h+var_48], 0
jle short loc_8E009
mov rdi, [rsp+88h+var_20]
mov ecx, [rsp+88h+var_44]
mov rsi, [rsp+88h+var_18]
mov rdx, [rsp+88h+var_10]
call JS_GetProperty
mov [rsp+88h+var_70], rax
mov [rsp+88h+var_68], rdx
mov rax, [rsp+88h+var_70]
mov [rsp+88h+var_40], rax
mov rax, [rsp+88h+var_68]
mov [rsp+88h+var_38], rax
mov rdi, [rsp+88h+var_40]
mov rsi, [rsp+88h+var_38]
call JS_IsException_1
cmp eax, 0
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_8E007
mov [rsp+88h+var_48], 0FFFFFFFFh
loc_8E007:
jmp short loc_8E037
loc_8E009:
cmp [rsp+88h+var_48], 0
jnz short loc_8E035
mov dword ptr [rsp+88h+var_80], 0
mov [rsp+88h+var_78], 3
mov rax, [rsp+88h+var_80]
mov [rsp+88h+var_40], rax
mov rax, [rsp+88h+var_78]
mov [rsp+88h+var_38], rax
loc_8E035:
jmp short $+2
loc_8E037:
mov rdi, [rsp+88h+var_20]
mov esi, [rsp+88h+var_44]
call JS_FreeAtom
loc_8E045:
mov rax, [rsp+88h+var_30]
mov rcx, [rsp+88h+var_40]
mov [rax], rcx
mov rcx, [rsp+88h+var_38]
mov [rax+8], rcx
mov eax, [rsp+88h+var_48]
mov [rsp+88h+var_4], eax
loc_8E066:
mov eax, [rsp+88h+var_4]
add rsp, 88h
retn
| long long JS_TryGetPropertyInt64(long long a1, long long a2, int a3, unsigned long long a4, long long *a5)
{
long long v5; // rdx
bool v7; // [rsp+7h] [rbp-81h]
long long v8; // [rsp+8h] [rbp-80h]
long long v9; // [rsp+28h] [rbp-60h]
int HasProperty; // [rsp+40h] [rbp-48h]
unsigned int v11; // [rsp+44h] [rbp-44h]
long long Property; // [rsp+48h] [rbp-40h]
long long v13; // [rsp+50h] [rbp-38h]
v7 = 0;
if ( a3 == -1 )
v7 = a4 <= 0x7FFFFFFF;
if ( v7 && (unsigned int)js_get_fast_array_element(a1, a2, a4, a5) )
{
return 1;
}
else
{
LODWORD(v9) = 0;
Property = v9;
v13 = 6LL;
HasProperty = -1;
v11 = JS_NewAtomInt64(a1, a4);
if ( v11 )
{
HasProperty = JS_HasProperty(a1, a2, a3, v11);
if ( HasProperty <= 0 )
{
if ( !HasProperty )
{
LODWORD(v8) = 0;
Property = v8;
v13 = 3LL;
}
}
else
{
Property = JS_GetProperty(a1, a2, a3, v11);
v13 = v5;
if ( JS_IsException_1(Property, v5) )
HasProperty = -1;
}
JS_FreeAtom(a1, v11);
}
*a5 = Property;
a5[1] = v13;
return (unsigned int)HasProperty;
}
}
| JS_TryGetPropertyInt64:
SUB RSP,0x88
MOV qword ptr [RSP + 0x70],RSI
MOV qword ptr [RSP + 0x78],RDX
MOV qword ptr [RSP + 0x68],RDI
MOV qword ptr [RSP + 0x60],RCX
MOV qword ptr [RSP + 0x58],R8
MOV RAX,qword ptr [RSP + 0x78]
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,-0x1
MOV byte ptr [RSP + 0x7],AL
JNZ 0x0018ded2
CMP qword ptr [RSP + 0x60],0x7fffffff
SETBE AL
MOV byte ptr [RSP + 0x7],AL
LAB_0018ded2:
MOV AL,byte ptr [RSP + 0x7]
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0018df23
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x60]
MOV EDX,EAX
MOV RCX,qword ptr [RSP + 0x58]
CALL 0x001378d0
CMP EAX,0x0
JZ 0x0018df21
MOV dword ptr [RSP + 0x84],0x1
JMP 0x0018e066
LAB_0018df21:
JMP 0x0018df23
LAB_0018df23:
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x6
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x50],RAX
MOV dword ptr [RSP + 0x40],0xffffffff
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x001380c0
MOV dword ptr [RSP + 0x44],EAX
CMP dword ptr [RSP + 0x44],0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0018e045
MOV RDI,qword ptr [RSP + 0x68]
MOV ECX,dword ptr [RSP + 0x44]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x001371c0
MOV dword ptr [RSP + 0x40],EAX
CMP dword ptr [RSP + 0x40],0x0
JLE 0x0018e009
MOV RDI,qword ptr [RSP + 0x68]
MOV ECX,dword ptr [RSP + 0x44]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x00130070
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00129fb0
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0018e007
MOV dword ptr [RSP + 0x40],0xffffffff
LAB_0018e007:
JMP 0x0018e037
LAB_0018e009:
CMP dword ptr [RSP + 0x40],0x0
JNZ 0x0018e035
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x3
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x50],RAX
LAB_0018e035:
JMP 0x0018e037
LAB_0018e037:
MOV RDI,qword ptr [RSP + 0x68]
MOV ESI,dword ptr [RSP + 0x44]
CALL 0x0012f330
LAB_0018e045:
MOV RAX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RSP + 0x40]
MOV dword ptr [RSP + 0x84],EAX
LAB_0018e066:
MOV EAX,dword ptr [RSP + 0x84]
ADD RSP,0x88
RET
|
int JS_TryGetPropertyInt64
(int8 param_1,int8 param_2,int8 param_3,ulong param_4,
int1 (*param_5) [16])
{
int iVar1;
int iVar2;
int1 auVar3 [16];
uint uStack_7c;
uint uStack_5c;
int local_48;
int local_4;
if (((int)param_3 == -1 && param_4 < 0x80000000) &&
(iVar1 = js_get_fast_array_element(param_1,param_2,param_4 & 0xffffffff,param_5), iVar1 != 0))
{
local_4 = 1;
}
else {
auVar3._8_8_ = 6;
auVar3._0_8_ = (ulong)uStack_5c << 0x20;
local_48 = -1;
iVar1 = JS_NewAtomInt64(param_1,param_4);
if (iVar1 != 0) {
local_48 = JS_HasProperty(param_1,param_2,param_3,iVar1);
if (local_48 < 1) {
if (local_48 == 0) {
auVar3._8_8_ = 3;
auVar3._0_8_ = (ulong)uStack_7c << 0x20;
}
}
else {
auVar3 = JS_GetProperty(param_1,param_2,param_3,iVar1);
iVar2 = JS_IsException(auVar3._0_8_,auVar3._8_8_);
if (iVar2 != 0) {
local_48 = -1;
}
}
JS_FreeAtom(param_1,iVar1);
}
*param_5 = auVar3;
local_4 = local_48;
}
return local_4;
}
| |
32,591 | used_buffs_add | eloqsql/storage/maria/ma_loghandler.c | static void
used_buffs_add(TRUNSLOG_USED_BUFFERS *buffs,
struct st_translog_buffer *buff)
{
DBUG_ENTER("used_buffs_add");
DBUG_PRINT("enter", ("ADD buffs: %p unlk %u (%p) wrt_ptr: %u (%p)"
" buff %p (%u)",
buffs,
buffs->wrt_ptr, buffs->buff[buffs->wrt_ptr],
buffs->unlck_ptr, buffs->buff[buffs->unlck_ptr],
buff, buff->buffer_no));
DBUG_ASSERT(buffs->wrt_ptr < MAX_TRUNSLOG_USED_BUFFERS);
buffs->buff[buffs->wrt_ptr++]= buff;
DBUG_VOID_RETURN;
} | O0 | c | used_buffs_add:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x3ad1e
jmp 0x3ad20
jmp 0x3ad22
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rsi
movb 0x18(%rsi), %cl
movb %cl, %dil
addb $0x1, %dil
movb %dil, 0x18(%rsi)
movzbl %cl, %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x3ad45
popq %rbp
retq
nopw (%rax,%rax)
| used_buffs_add:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_3AD1E:
jmp short $+2
loc_3AD20:
jmp short $+2
loc_3AD22:
mov rdx, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rbp+var_8]
mov cl, [rsi+18h]
mov dil, cl
add dil, 1
mov [rsi+18h], dil
movzx ecx, cl
mov [rax+rcx*8], rdx
jmp short $+2
loc_3AD45:
pop rbp
retn
| long long used_buffs_add(long long a1, long long a2)
{
long long result; // rax
unsigned __int8 v3; // cl
result = a1;
v3 = *(_BYTE *)(a1 + 24);
*(_BYTE *)(a1 + 24) = v3 + 1;
*(_QWORD *)(a1 + 8LL * v3) = a2;
return result;
}
| used_buffs_add:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x0013ad1e
LAB_0013ad1e:
JMP 0x0013ad20
LAB_0013ad20:
JMP 0x0013ad22
LAB_0013ad22:
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
MOV CL,byte ptr [RSI + 0x18]
MOV DIL,CL
ADD DIL,0x1
MOV byte ptr [RSI + 0x18],DIL
MOVZX ECX,CL
MOV qword ptr [RAX + RCX*0x8],RDX
JMP 0x0013ad45
LAB_0013ad45:
POP RBP
RET
|
void used_buffs_add(long param_1,int8 param_2)
{
byte bVar1;
bVar1 = *(byte *)(param_1 + 0x18);
*(byte *)(param_1 + 0x18) = bVar1 + 1;
*(int8 *)(param_1 + (ulong)bVar1 * 8) = param_2;
return;
}
| |
32,592 | get_closure_var2 | bluesky950520[P]quickjs/quickjs.c | static int get_closure_var2(JSContext *ctx, JSFunctionDef *s,
JSFunctionDef *fd, BOOL is_local,
BOOL is_arg, int var_idx, JSAtom var_name,
BOOL is_const, BOOL is_lexical,
JSVarKindEnum var_kind)
{
int i;
if (fd != s->parent) {
var_idx = get_closure_var2(ctx, s->parent, fd, is_local,
is_arg, var_idx, var_name,
is_const, is_lexical, var_kind);
if (var_idx < 0)
return -1;
is_local = FALSE;
}
for(i = 0; i < s->closure_var_count; i++) {
JSClosureVar *cv = &s->closure_var[i];
if (cv->var_idx == var_idx && cv->is_arg == is_arg &&
cv->is_local == is_local)
return i;
}
return add_closure_var(ctx, s, is_local, is_arg, var_idx, var_name,
is_const, is_lexical, var_kind);
} | O0 | c | get_closure_var2:
pushq %rbx
subq $0x60, %rsp
movl 0x88(%rsp), %eax
movl 0x80(%rsp), %eax
movl 0x78(%rsp), %eax
movl 0x70(%rsp), %eax
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movl %ecx, 0x3c(%rsp)
movl %r8d, 0x38(%rsp)
movl %r9d, 0x34(%rsp)
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
cmpq 0x8(%rcx), %rax
je 0xb7937
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x40(%rsp), %rdx
movl 0x3c(%rsp), %ecx
movl 0x38(%rsp), %r8d
movl 0x34(%rsp), %r9d
movl 0x70(%rsp), %ebx
movl 0x78(%rsp), %r11d
movl 0x80(%rsp), %r10d
movl 0x88(%rsp), %eax
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0xb7880
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jge 0xb792f
movl $0xffffffff, 0x5c(%rsp) # imm = 0xFFFFFFFF
jmp 0xb7a01
movl $0x0, 0x3c(%rsp)
movl $0x0, 0x30(%rsp)
movl 0x30(%rsp), %eax
movq 0x48(%rsp), %rcx
cmpl 0x198(%rcx), %eax
jge 0xb79bb
movq 0x48(%rsp), %rax
movq 0x1a0(%rax), %rax
movslq 0x30(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movzwl 0x2(%rax), %eax
cmpl 0x34(%rsp), %eax
jne 0xb79ac
movq 0x28(%rsp), %rax
movb (%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl 0x38(%rsp), %eax
jne 0xb79ac
movq 0x28(%rsp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl 0x3c(%rsp), %eax
jne 0xb79ac
movl 0x30(%rsp), %eax
movl %eax, 0x5c(%rsp)
jmp 0xb7a01
jmp 0xb79ae
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0xb793f
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x3c(%rsp), %edx
movl 0x38(%rsp), %ecx
movl 0x34(%rsp), %r8d
movl 0x70(%rsp), %r9d
movl 0x78(%rsp), %r11d
movl 0x80(%rsp), %r10d
movl 0x88(%rsp), %eax
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0xb0900
movl %eax, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
addq $0x60, %rsp
popq %rbx
retq
nopl (%rax,%rax)
| get_closure_var2:
push rbx
sub rsp, 60h
mov eax, [rsp+68h+arg_18]
mov eax, [rsp+68h+arg_10]
mov eax, [rsp+68h+arg_8]
mov eax, [rsp+68h+arg_0]
mov [rsp+68h+var_18], rdi
mov [rsp+68h+var_20], rsi
mov [rsp+68h+var_28], rdx
mov [rsp+68h+var_2C], ecx
mov [rsp+68h+var_30], r8d
mov [rsp+68h+var_34], r9d
mov rax, [rsp+68h+var_28]
mov rcx, [rsp+68h+var_20]
cmp rax, [rcx+8]
jz short loc_B7937
mov rdi, [rsp+68h+var_18]
mov rax, [rsp+68h+var_20]
mov rsi, [rax+8]
mov rdx, [rsp+68h+var_28]
mov ecx, [rsp+68h+var_2C]
mov r8d, [rsp+68h+var_30]
mov r9d, [rsp+68h+var_34]
mov ebx, [rsp+68h+arg_0]
mov r11d, [rsp+68h+arg_8]
mov r10d, [rsp+68h+arg_10]
mov eax, [rsp+68h+arg_18]
mov [rsp+68h+var_68], ebx
mov [rsp+68h+var_60], r11d
mov [rsp+68h+var_58], r10d
mov [rsp+68h+var_50], eax
call get_closure_var2
mov [rsp+68h+var_34], eax
cmp [rsp+68h+var_34], 0
jge short loc_B792F
mov [rsp+68h+var_C], 0FFFFFFFFh
jmp loc_B7A01
loc_B792F:
mov [rsp+68h+var_2C], 0
loc_B7937:
mov [rsp+68h+var_38], 0
loc_B793F:
mov eax, [rsp+68h+var_38]
mov rcx, [rsp+68h+var_20]
cmp eax, [rcx+198h]
jge short loc_B79BB
mov rax, [rsp+68h+var_20]
mov rax, [rax+1A0h]
movsxd rcx, [rsp+68h+var_38]
shl rcx, 3
add rax, rcx
mov [rsp+68h+var_40], rax
mov rax, [rsp+68h+var_40]
movzx eax, word ptr [rax+2]
cmp eax, [rsp+68h+var_34]
jnz short loc_B79AC
mov rax, [rsp+68h+var_40]
mov al, [rax]
shr al, 1
and al, 1
movzx eax, al
cmp eax, [rsp+68h+var_30]
jnz short loc_B79AC
mov rax, [rsp+68h+var_40]
mov al, [rax]
and al, 1
movzx eax, al
cmp eax, [rsp+68h+var_2C]
jnz short loc_B79AC
mov eax, [rsp+68h+var_38]
mov [rsp+68h+var_C], eax
jmp short loc_B7A01
loc_B79AC:
jmp short $+2
loc_B79AE:
mov eax, [rsp+68h+var_38]
add eax, 1
mov [rsp+68h+var_38], eax
jmp short loc_B793F
loc_B79BB:
mov rdi, [rsp+68h+var_18]
mov rsi, [rsp+68h+var_20]
mov edx, [rsp+68h+var_2C]
mov ecx, [rsp+68h+var_30]
mov r8d, [rsp+68h+var_34]
mov r9d, [rsp+68h+arg_0]
mov r11d, [rsp+68h+arg_8]
mov r10d, [rsp+68h+arg_10]
mov eax, [rsp+68h+arg_18]
mov [rsp+68h+var_68], r11d
mov [rsp+68h+var_60], r10d
mov [rsp+68h+var_58], eax
call add_closure_var
mov [rsp+68h+var_C], eax
loc_B7A01:
mov eax, [rsp+68h+var_C]
add rsp, 60h
pop rbx
retn
| long long get_closure_var2(
long long a1,
long long a2,
long long a3,
int a4,
unsigned int a5,
int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
unsigned int a15,
int a16,
int a17,
int a18)
{
long long v19; // [rsp+28h] [rbp-40h]
unsigned int i; // [rsp+30h] [rbp-38h]
int closure_var2; // [rsp+34h] [rbp-34h]
int v23; // [rsp+3Ch] [rbp-2Ch]
v23 = a4;
closure_var2 = a6;
if ( a3 != *(_QWORD *)(a2 + 8) )
{
closure_var2 = get_closure_var2(a1, *(_QWORD *)(a2 + 8), a3, a4, a5, a6, a15, a16, a17, a18);
if ( closure_var2 < 0 )
return (unsigned int)-1;
v23 = 0;
}
for ( i = 0; (signed int)i < *(_DWORD *)(a2 + 408); ++i )
{
v19 = 8LL * (int)i + *(_QWORD *)(a2 + 416);
if ( *(unsigned __int16 *)(v19 + 2) == closure_var2
&& ((*(_BYTE *)v19 & 2) != 0) == a5
&& (*(_BYTE *)v19 & 1) == v23 )
{
return i;
}
}
return (unsigned int)add_closure_var(
a1,
a2,
v23,
a5,
(unsigned int)closure_var2,
a15,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a16,
a17,
a18);
}
| get_closure_var2:
PUSH RBX
SUB RSP,0x60
MOV EAX,dword ptr [RSP + 0x88]
MOV EAX,dword ptr [RSP + 0x80]
MOV EAX,dword ptr [RSP + 0x78]
MOV EAX,dword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV dword ptr [RSP + 0x3c],ECX
MOV dword ptr [RSP + 0x38],R8D
MOV dword ptr [RSP + 0x34],R9D
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x48]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001b7937
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RSP + 0x40]
MOV ECX,dword ptr [RSP + 0x3c]
MOV R8D,dword ptr [RSP + 0x38]
MOV R9D,dword ptr [RSP + 0x34]
MOV EBX,dword ptr [RSP + 0x70]
MOV R11D,dword ptr [RSP + 0x78]
MOV R10D,dword ptr [RSP + 0x80]
MOV EAX,dword ptr [RSP + 0x88]
MOV dword ptr [RSP],EBX
MOV dword ptr [RSP + 0x8],R11D
MOV dword ptr [RSP + 0x10],R10D
MOV dword ptr [RSP + 0x18],EAX
CALL 0x001b7880
MOV dword ptr [RSP + 0x34],EAX
CMP dword ptr [RSP + 0x34],0x0
JGE 0x001b792f
MOV dword ptr [RSP + 0x5c],0xffffffff
JMP 0x001b7a01
LAB_001b792f:
MOV dword ptr [RSP + 0x3c],0x0
LAB_001b7937:
MOV dword ptr [RSP + 0x30],0x0
LAB_001b793f:
MOV EAX,dword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x48]
CMP EAX,dword ptr [RCX + 0x198]
JGE 0x001b79bb
MOV RAX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RAX + 0x1a0]
MOVSXD RCX,dword ptr [RSP + 0x30]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOVZX EAX,word ptr [RAX + 0x2]
CMP EAX,dword ptr [RSP + 0x34]
JNZ 0x001b79ac
MOV RAX,qword ptr [RSP + 0x28]
MOV AL,byte ptr [RAX]
SHR AL,0x1
AND AL,0x1
MOVZX EAX,AL
CMP EAX,dword ptr [RSP + 0x38]
JNZ 0x001b79ac
MOV RAX,qword ptr [RSP + 0x28]
MOV AL,byte ptr [RAX]
AND AL,0x1
MOVZX EAX,AL
CMP EAX,dword ptr [RSP + 0x3c]
JNZ 0x001b79ac
MOV EAX,dword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x5c],EAX
JMP 0x001b7a01
LAB_001b79ac:
JMP 0x001b79ae
LAB_001b79ae:
MOV EAX,dword ptr [RSP + 0x30]
ADD EAX,0x1
MOV dword ptr [RSP + 0x30],EAX
JMP 0x001b793f
LAB_001b79bb:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x48]
MOV EDX,dword ptr [RSP + 0x3c]
MOV ECX,dword ptr [RSP + 0x38]
MOV R8D,dword ptr [RSP + 0x34]
MOV R9D,dword ptr [RSP + 0x70]
MOV R11D,dword ptr [RSP + 0x78]
MOV R10D,dword ptr [RSP + 0x80]
MOV EAX,dword ptr [RSP + 0x88]
MOV dword ptr [RSP],R11D
MOV dword ptr [RSP + 0x8],R10D
MOV dword ptr [RSP + 0x10],EAX
CALL 0x001b0900
MOV dword ptr [RSP + 0x5c],EAX
LAB_001b7a01:
MOV EAX,dword ptr [RSP + 0x5c]
ADD RSP,0x60
POP RBX
RET
|
int get_closure_var2(int8 param_1,long param_2,long param_3,uint param_4,uint param_5,
uint param_6,int4 param_7,int4 param_8,int4 param_9,
int4 param_10)
{
int iVar1;
byte *pbVar2;
int local_38;
uint local_34;
uint local_2c;
local_34 = param_6;
local_2c = param_4;
if (param_3 != *(long *)(param_2 + 8)) {
local_34 = get_closure_var2(param_1,*(int8 *)(param_2 + 8),param_3,param_4,param_5,param_6
,param_7,param_8,param_9,param_10);
if ((int)local_34 < 0) {
return -1;
}
local_2c = 0;
}
local_38 = 0;
while( true ) {
if (*(int *)(param_2 + 0x198) <= local_38) {
iVar1 = add_closure_var(param_1,param_2,local_2c,param_5,local_34,param_7,param_8,param_9,
param_10);
return iVar1;
}
pbVar2 = (byte *)(*(long *)(param_2 + 0x1a0) + (long)local_38 * 8);
if (((*(ushort *)(pbVar2 + 2) == local_34) && ((*pbVar2 >> 1 & 1) == param_5)) &&
((*pbVar2 & 1) == local_2c)) break;
local_38 = local_38 + 1;
}
return local_38;
}
| |
32,593 | get_closure_var2 | bluesky950520[P]quickjs/quickjs.c | static int get_closure_var2(JSContext *ctx, JSFunctionDef *s,
JSFunctionDef *fd, BOOL is_local,
BOOL is_arg, int var_idx, JSAtom var_name,
BOOL is_const, BOOL is_lexical,
JSVarKindEnum var_kind)
{
int i;
if (fd != s->parent) {
var_idx = get_closure_var2(ctx, s->parent, fd, is_local,
is_arg, var_idx, var_name,
is_const, is_lexical, var_kind);
if (var_idx < 0)
return -1;
is_local = FALSE;
}
for(i = 0; i < s->closure_var_count; i++) {
JSClosureVar *cv = &s->closure_var[i];
if (cv->var_idx == var_idx && cv->is_arg == is_arg &&
cv->is_local == is_local)
return i;
}
return add_closure_var(ctx, s, is_local, is_arg, var_idx, var_name,
is_const, is_lexical, var_kind);
} | O3 | c | get_closure_var2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rsi, %r14
movq %rdi, %r12
movl 0x58(%rsp), %r13d
movl 0x50(%rsp), %r11d
movl 0x48(%rsp), %r10d
movl 0x40(%rsp), %eax
movq 0x8(%rsi), %rsi
cmpq %rdx, %rsi
je 0x6f358
movq %r12, %rdi
movl %ebx, %r8d
pushq %r13
movq %r11, %r13
pushq %r11
movq %r10, %rbp
pushq %r10
movq %rax, %r15
pushq %rax
callq 0x6f2f3
addq $0x20, %rsp
testl %eax, %eax
js 0x6f3c1
movl %eax, %r9d
xorl %ecx, %ecx
movq %rbp, %r10
movq %r13, %r11
movl 0x58(%rsp), %r13d
jmp 0x6f35b
movq %rax, %r15
movslq 0x198(%r14), %rdx
testq %rdx, %rdx
jle 0x6f39c
movq 0x1a0(%r14), %rsi
xorl %eax, %eax
movzwl 0x2(%rsi,%rax,8), %edi
cmpl %edi, %r9d
jne 0x6f394
movzbl (%rsi,%rax,8), %edi
movl %edi, %r8d
shrl %r8d
andl $0x1, %r8d
cmpl %ebx, %r8d
jne 0x6f394
andl $0x1, %edi
cmpl %edi, %ecx
je 0x6f3c6
incq %rax
cmpq %rax, %rdx
jne 0x6f370
subq $0x8, %rsp
movq %r12, %rdi
movq %r14, %rsi
movl %ecx, %edx
movl %ebx, %ecx
movl %r9d, %r8d
movl %r15d, %r9d
pushq %r13
pushq %r11
pushq %r10
callq 0x6e44c
addq $0x28, %rsp
jmp 0x6f3ca
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| get_closure_var2:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, r8d
mov r14, rsi
mov r12, rdi
mov r13d, [rsp+38h+arg_18]
mov r11d, [rsp+38h+arg_10]
mov r10d, [rsp+38h+arg_8]
mov eax, [rsp+38h+arg_0]
mov rsi, [rsi+8]
cmp rsi, rdx
jz short loc_6F358
mov rdi, r12
mov r8d, ebx
push r13
mov r13, r11
push r11
mov rbp, r10
push r10
mov r15, rax
push rax
call get_closure_var2
add rsp, 20h
test eax, eax
js short loc_6F3C1
mov r9d, eax
xor ecx, ecx
mov r10, rbp
mov r11, r13
mov r13d, [rsp+38h+arg_18]
jmp short loc_6F35B
loc_6F358:
mov r15, rax
loc_6F35B:
movsxd rdx, dword ptr [r14+198h]
test rdx, rdx
jle short loc_6F39C
mov rsi, [r14+1A0h]
xor eax, eax
loc_6F370:
movzx edi, word ptr [rsi+rax*8+2]
cmp r9d, edi
jnz short loc_6F394
movzx edi, byte ptr [rsi+rax*8]
mov r8d, edi
shr r8d, 1
and r8d, 1
cmp r8d, ebx
jnz short loc_6F394
and edi, 1
cmp ecx, edi
jz short loc_6F3C6
loc_6F394:
inc rax
cmp rdx, rax
jnz short loc_6F370
loc_6F39C:
sub rsp, 8
mov rdi, r12
mov rsi, r14
mov edx, ecx
mov ecx, ebx
mov r8d, r9d
mov r9d, r15d
push r13
push r11
push r10
call add_closure_var
add rsp, 28h
jmp short loc_6F3CA
loc_6F3C1:
mov eax, 0FFFFFFFFh
loc_6F3C6:
add rsp, 8
loc_6F3CA:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long get_closure_var2(
long long a1,
long long a2,
long long a3,
int a4,
unsigned int a5,
int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
unsigned int a15,
int a16,
int a17,
int a18)
{
char v20; // r13
char v21; // r11
char v22; // r10
long long v23; // rsi
unsigned int v24; // r15d
int closure_var2; // eax
long long v26; // rdx
long long v27; // rsi
long long result; // rax
v20 = a18;
v21 = a17;
v22 = a16;
v23 = *(_QWORD *)(a2 + 8);
if ( v23 == a3 )
{
v24 = a15;
}
else
{
v24 = a15;
closure_var2 = get_closure_var2(a1, v23, a3, a4, a5, a6, a15, a16, a17, a18);
if ( closure_var2 < 0 )
return 0xFFFFFFFFLL;
a6 = closure_var2;
a4 = 0;
v22 = a16;
v21 = a17;
v20 = a18;
}
v26 = *(int *)(a2 + 408);
if ( v26 <= 0 )
return add_closure_var(a1, a2, a4, a5, a6, v24, a7, a8, a9, a10, a11, a12, a13, a14, v22, v21, v20);
v27 = *(_QWORD *)(a2 + 416);
result = 0LL;
while ( a6 != *(unsigned __int16 *)(v27 + 8 * result + 2)
|| ((*(unsigned __int8 *)(v27 + 8 * result) >> 1) & 1) != a5
|| a4 != (*(_BYTE *)(v27 + 8 * result) & 1) )
{
if ( v26 == ++result )
return add_closure_var(a1, a2, a4, a5, a6, v24, a7, a8, a9, a10, a11, a12, a13, a14, v22, v21, v20);
}
return result;
}
| get_closure_var2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,R8D
MOV R14,RSI
MOV R12,RDI
MOV R13D,dword ptr [RSP + 0x58]
MOV R11D,dword ptr [RSP + 0x50]
MOV R10D,dword ptr [RSP + 0x48]
MOV EAX,dword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSI + 0x8]
CMP RSI,RDX
JZ 0x0016f358
MOV RDI,R12
MOV R8D,EBX
PUSH R13
MOV R13,R11
PUSH R11
MOV RBP,R10
PUSH R10
MOV R15,RAX
PUSH RAX
CALL 0x0016f2f3
ADD RSP,0x20
TEST EAX,EAX
JS 0x0016f3c1
MOV R9D,EAX
XOR ECX,ECX
MOV R10,RBP
MOV R11,R13
MOV R13D,dword ptr [RSP + 0x58]
JMP 0x0016f35b
LAB_0016f358:
MOV R15,RAX
LAB_0016f35b:
MOVSXD RDX,dword ptr [R14 + 0x198]
TEST RDX,RDX
JLE 0x0016f39c
MOV RSI,qword ptr [R14 + 0x1a0]
XOR EAX,EAX
LAB_0016f370:
MOVZX EDI,word ptr [RSI + RAX*0x8 + 0x2]
CMP R9D,EDI
JNZ 0x0016f394
MOVZX EDI,byte ptr [RSI + RAX*0x8]
MOV R8D,EDI
SHR R8D,0x1
AND R8D,0x1
CMP R8D,EBX
JNZ 0x0016f394
AND EDI,0x1
CMP ECX,EDI
JZ 0x0016f3c6
LAB_0016f394:
INC RAX
CMP RDX,RAX
JNZ 0x0016f370
LAB_0016f39c:
SUB RSP,0x8
MOV RDI,R12
MOV RSI,R14
MOV EDX,ECX
MOV ECX,EBX
MOV R8D,R9D
MOV R9D,R15D
PUSH R13
PUSH R11
PUSH R10
CALL 0x0016e44c
ADD RSP,0x28
JMP 0x0016f3ca
LAB_0016f3c1:
MOV EAX,0xffffffff
LAB_0016f3c6:
ADD RSP,0x8
LAB_0016f3ca:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long get_closure_var2(int8 param_1,long param_2,long param_3,uint param_4,uint param_5,
uint param_6,int4 param_7,int4 param_8,int4 param_9,
int4 param_10)
{
byte bVar1;
long lVar2;
if (*(long *)(param_2 + 8) != param_3) {
param_6 = get_closure_var2(param_1);
if ((int)param_6 < 0) {
return 0xffffffff;
}
param_4 = 0;
}
if (0 < (long)*(int *)(param_2 + 0x198)) {
lVar2 = 0;
do {
if (((param_6 == *(ushort *)(*(long *)(param_2 + 0x1a0) + 2 + lVar2 * 8)) &&
(bVar1 = *(byte *)(*(long *)(param_2 + 0x1a0) + lVar2 * 8), (bVar1 >> 1 & 1) == param_5))
&& (param_4 == (bVar1 & 1))) {
return lVar2;
}
lVar2 = lVar2 + 1;
} while (*(int *)(param_2 + 0x198) != lVar2);
}
lVar2 = add_closure_var(param_1,param_2,param_4,param_5,param_6,param_7,param_8,param_9,param_10);
return lVar2;
}
| |
32,594 | ma_ft_update | eloqsql/storage/maria/ma_ft_update.c | int _ma_ft_update(MARIA_HA *info, uint keynr, uchar *keybuf,
const uchar *oldrec, const uchar *newrec, my_off_t pos)
{
int error= -1;
FT_WORD *oldlist,*newlist, *old_word, *new_word;
CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset;
int cmp, cmp2;
DBUG_ENTER("_ma_ft_update");
if (!(old_word=oldlist=_ma_ft_parserecord(info, keynr, oldrec,
&info->ft_memroot)) ||
!(new_word=newlist=_ma_ft_parserecord(info, keynr, newrec,
&info->ft_memroot)))
goto err;
error=0;
while(old_word->pos && new_word->pos)
{
cmp= ha_compare_text(cs, (uchar*) old_word->pos,old_word->len,
(uchar*) new_word->pos,new_word->len,0);
cmp2= cmp ? 0 : (fabs(old_word->weight - new_word->weight) > 1.e-5);
if (cmp < 0 || cmp2)
{
MARIA_KEY key;
_ma_ft_make_key(info, &key, keynr, keybuf, old_word, pos);
if (_ma_ck_delete(info, &key))
{
error= -1;
goto err;
}
}
if (cmp > 0 || cmp2)
{
MARIA_KEY key;
_ma_ft_make_key(info, &key, keynr, keybuf, new_word,pos);
if ((error= _ma_ck_write(info, &key)))
goto err;
}
if (cmp<=0) old_word++;
if (cmp>=0) new_word++;
}
if (old_word->pos)
error= _ma_ft_erase(info,keynr,keybuf,old_word,pos);
else if (new_word->pos)
error= _ma_ft_store(info,keynr,keybuf,new_word,pos);
err:
free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE));
DBUG_RETURN(error);
} | O0 | c | ma_ft_update:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq 0xc0(%rax), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x328, %rcx # imm = 0x328
callq 0x8c1b0
movq %rax, -0x40(%rbp)
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0x8c414
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x328, %rcx # imm = 0x328
callq 0x8c1b0
movq %rax, -0x48(%rbp)
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
jne 0x8c419
jmp 0x8c5e2
movl $0x0, -0x34(%rbp)
movq -0x50(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, -0xa9(%rbp)
je 0x8c443
movq -0x58(%rbp), %rax
cmpq $0x0, (%rax)
setne %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x8c452
jmp 0x8c592
movq -0x60(%rbp), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movq -0x50(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
movq -0x58(%rbp), %rax
movq (%rax), %rcx
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0xefe60
movl %eax, -0x64(%rbp)
cmpl $0x0, -0x64(%rbp)
je 0x8c492
xorl %eax, %eax
movl %eax, -0xb0(%rbp)
jmp 0x8c4c9
movq -0x50(%rbp), %rax
movsd 0x10(%rax), %xmm0
movq -0x58(%rbp), %rax
subsd 0x10(%rax), %xmm0
movaps 0xcba85(%rip), %xmm1 # 0x157f30
pand %xmm1, %xmm0
movsd 0xcb639(%rip), %xmm1 # 0x157af0
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xb0(%rbp)
movl -0xb0(%rbp), %eax
movl %eax, -0x68(%rbp)
cmpl $0x0, -0x64(%rbp)
jl 0x8c4de
cmpl $0x0, -0x68(%rbp)
je 0x8c51f
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x50(%rbp), %r8
movq -0x30(%rbp), %r9
leaq -0x88(%rbp), %rsi
callq 0x8c610
movq -0x8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x87250
cmpb $0x0, %al
je 0x8c51d
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
jmp 0x8c5e2
jmp 0x8c51f
cmpl $0x0, -0x64(%rbp)
jg 0x8c52b
cmpl $0x0, -0x68(%rbp)
je 0x8c569
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x58(%rbp), %r8
movq -0x30(%rbp), %r9
leaq -0xa8(%rbp), %rsi
callq 0x8c610
movq -0x8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x81f80
movsbl %al, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x8c567
jmp 0x8c5e2
jmp 0x8c569
cmpl $0x0, -0x64(%rbp)
jg 0x8c57b
movq -0x50(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x50(%rbp)
cmpl $0x0, -0x64(%rbp)
jl 0x8c58d
movq -0x58(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x58(%rbp)
jmp 0x8c420
movq -0x50(%rbp), %rax
cmpq $0x0, (%rax)
je 0x8c5b9
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x8c780
movl %eax, -0x34(%rbp)
jmp 0x8c5e0
movq -0x58(%rbp), %rax
cmpq $0x0, (%rax)
je 0x8c5de
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x58(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x8c810
movl %eax, -0x34(%rbp)
jmp 0x8c5e0
jmp 0x8c5e2
movq -0x8(%rbp), %rdi
addq $0x328, %rdi # imm = 0x328
movl $0x2, %esi
callq 0xed3c0
movl -0x34(%rbp), %eax
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nop
| _ma_ft_update:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov [rbp+var_34], 0FFFFFFFFh
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_C]
imul rcx, 118h
add rax, rcx
mov rax, [rax+0C0h]
mov rax, [rax]
mov [rbp+var_60], rax
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_8]
add rcx, 328h
call _ma_ft_parserecord
mov [rbp+var_40], rax
mov [rbp+var_50], rax
cmp rax, 0
jz short loc_8C414
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_8]
add rcx, 328h
call _ma_ft_parserecord
mov [rbp+var_48], rax
mov [rbp+var_58], rax
cmp rax, 0
jnz short loc_8C419
loc_8C414:
jmp loc_8C5E2
loc_8C419:
mov [rbp+var_34], 0
loc_8C420:
mov rcx, [rbp+var_50]
xor eax, eax
cmp qword ptr [rcx], 0
mov [rbp+var_A9], al
jz short loc_8C443
mov rax, [rbp+var_58]
cmp qword ptr [rax], 0
setnz al
mov [rbp+var_A9], al
loc_8C443:
mov al, [rbp+var_A9]
test al, 1
jnz short loc_8C452
jmp loc_8C592
loc_8C452:
mov rdi, [rbp+var_60]
mov rax, [rbp+var_50]
mov rsi, [rax]
mov rax, [rbp+var_50]
mov eax, [rax+8]
mov edx, eax
mov rax, [rbp+var_58]
mov rcx, [rax]
mov rax, [rbp+var_58]
mov eax, [rax+8]
mov r8d, eax
xor r9d, r9d
call ha_compare_text
mov [rbp+var_64], eax
cmp [rbp+var_64], 0
jz short loc_8C492
xor eax, eax
mov [rbp+var_B0], eax
jmp short loc_8C4C9
loc_8C492:
mov rax, [rbp+var_50]
movsd xmm0, qword ptr [rax+10h]
mov rax, [rbp+var_58]
subsd xmm0, qword ptr [rax+10h]
movaps xmm1, cs:xmmword_157F30
pand xmm0, xmm1
movsd xmm1, cs:qword_157AF0
ucomisd xmm0, xmm1
setnbe al
and al, 1
movzx eax, al
mov [rbp+var_B0], eax
loc_8C4C9:
mov eax, [rbp+var_B0]
mov [rbp+var_68], eax
cmp [rbp+var_64], 0
jl short loc_8C4DE
cmp [rbp+var_68], 0
jz short loc_8C51F
loc_8C4DE:
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_50]
mov r9, [rbp+var_30]
lea rsi, [rbp+var_88]
call _ma_ft_make_key
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_88]
call _ma_ck_delete
cmp al, 0
jz short loc_8C51D
mov [rbp+var_34], 0FFFFFFFFh
jmp loc_8C5E2
loc_8C51D:
jmp short $+2
loc_8C51F:
cmp [rbp+var_64], 0
jg short loc_8C52B
cmp [rbp+var_68], 0
jz short loc_8C569
loc_8C52B:
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_58]
mov r9, [rbp+var_30]
lea rsi, [rbp+var_A8]
call _ma_ft_make_key
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_A8]
call _ma_ck_write
movsx eax, al
mov [rbp+var_34], eax
cmp eax, 0
jz short loc_8C567
jmp short loc_8C5E2
loc_8C567:
jmp short $+2
loc_8C569:
cmp [rbp+var_64], 0
jg short loc_8C57B
mov rax, [rbp+var_50]
add rax, 18h
mov [rbp+var_50], rax
loc_8C57B:
cmp [rbp+var_64], 0
jl short loc_8C58D
mov rax, [rbp+var_58]
add rax, 18h
mov [rbp+var_58], rax
loc_8C58D:
jmp loc_8C420
loc_8C592:
mov rax, [rbp+var_50]
cmp qword ptr [rax], 0
jz short loc_8C5B9
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_50]
mov r8, [rbp+var_30]
call _ma_ft_erase
mov [rbp+var_34], eax
jmp short loc_8C5E0
loc_8C5B9:
mov rax, [rbp+var_58]
cmp qword ptr [rax], 0
jz short loc_8C5DE
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_58]
mov r8, [rbp+var_30]
call _ma_ft_store
mov [rbp+var_34], eax
loc_8C5DE:
jmp short $+2
loc_8C5E0:
jmp short $+2
loc_8C5E2:
mov rdi, [rbp+var_8]
add rdi, 328h
mov esi, 2
call free_root
mov eax, [rbp+var_34]
mov [rbp+var_B4], eax
mov eax, [rbp+var_B4]
add rsp, 0C0h
pop rbp
retn
| long long ma_ft_update(long long *a1, unsigned int a2, long long a3, long long a4, long long a5, long long a6)
{
__m128i v6; // xmm0
char v7; // al
BOOL v9; // [rsp+10h] [rbp-B0h]
bool v10; // [rsp+17h] [rbp-A9h]
_BYTE v11[32]; // [rsp+18h] [rbp-A8h] BYREF
long long v12[4]; // [rsp+38h] [rbp-88h] BYREF
BOOL v13; // [rsp+58h] [rbp-68h]
int v14; // [rsp+5Ch] [rbp-64h]
long long v15; // [rsp+60h] [rbp-60h]
long long v16; // [rsp+68h] [rbp-58h]
long long v17; // [rsp+70h] [rbp-50h]
long long v18; // [rsp+78h] [rbp-48h]
long long v19; // [rsp+80h] [rbp-40h]
unsigned int v20; // [rsp+8Ch] [rbp-34h]
long long v21; // [rsp+90h] [rbp-30h]
long long v22; // [rsp+98h] [rbp-28h]
long long v23; // [rsp+A0h] [rbp-20h]
long long v24; // [rsp+A8h] [rbp-18h]
unsigned int v25; // [rsp+B4h] [rbp-Ch]
long long *v26; // [rsp+B8h] [rbp-8h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
v21 = a6;
v20 = -1;
v15 = **(_QWORD **)(280LL * a2 + *(_QWORD *)(*a1 + 1392) + 192);
v19 = ma_ft_parserecord(a1, a2, a4, (long long)(a1 + 101));
v17 = v19;
if ( v19 )
{
v18 = ma_ft_parserecord(v26, v25, v22, (long long)(v26 + 101));
v16 = v18;
if ( v18 )
{
v20 = 0;
while ( 1 )
{
v10 = 0;
if ( *(_QWORD *)v17 )
v10 = *(_QWORD *)v16 != 0LL;
if ( !v10 )
break;
v14 = ha_compare_text(
v15,
*(_QWORD *)v17,
*(unsigned int *)(v17 + 8),
*(_QWORD *)v16,
*(unsigned int *)(v16 + 8),
0LL);
if ( v14 )
{
v9 = 0;
}
else
{
v6 = (__m128i)*(unsigned long long *)(v17 + 16);
*(double *)v6.m128i_i64 = *(double *)v6.m128i_i64 - *(double *)(v16 + 16);
v9 = *(double *)_mm_and_si128(v6, (__m128i)xmmword_157F30).m128i_i64 > 0.00001;
}
v13 = v9;
if ( v14 < 0 || v13 )
{
ma_ft_make_key(v26, v12, v25, v24, v17, v21);
if ( ma_ck_delete(v26, v12) )
{
v20 = -1;
goto LABEL_27;
}
}
if ( v14 > 0 || v13 )
{
ma_ft_make_key(v26, v11, v25, v24, v16, v21);
v7 = ma_ck_write((long long)v26, (long long)v11);
v20 = v7;
if ( v7 )
goto LABEL_27;
}
if ( v14 <= 0 )
v17 += 24LL;
if ( v14 >= 0 )
v16 += 24LL;
}
if ( *(_QWORD *)v17 )
{
v20 = ma_ft_erase(v26, v25, v24, v17, v21);
}
else if ( *(_QWORD *)v16 )
{
v20 = ma_ft_store(v26, v25, v24, v16, v21);
}
}
}
LABEL_27:
free_root(v26 + 101, 2LL);
return v20;
}
| _ma_ft_update:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV dword ptr [RBP + -0x34],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x328
CALL 0x0018c1b0
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JZ 0x0018c414
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x328
CALL 0x0018c1b0
MOV qword ptr [RBP + -0x48],RAX
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JNZ 0x0018c419
LAB_0018c414:
JMP 0x0018c5e2
LAB_0018c419:
MOV dword ptr [RBP + -0x34],0x0
LAB_0018c420:
MOV RCX,qword ptr [RBP + -0x50]
XOR EAX,EAX
CMP qword ptr [RCX],0x0
MOV byte ptr [RBP + -0xa9],AL
JZ 0x0018c443
MOV RAX,qword ptr [RBP + -0x58]
CMP qword ptr [RAX],0x0
SETNZ AL
MOV byte ptr [RBP + -0xa9],AL
LAB_0018c443:
MOV AL,byte ptr [RBP + -0xa9]
TEST AL,0x1
JNZ 0x0018c452
JMP 0x0018c592
LAB_0018c452:
MOV RDI,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x8]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RAX + 0x8]
MOV R8D,EAX
XOR R9D,R9D
CALL 0x001efe60
MOV dword ptr [RBP + -0x64],EAX
CMP dword ptr [RBP + -0x64],0x0
JZ 0x0018c492
XOR EAX,EAX
MOV dword ptr [RBP + -0xb0],EAX
JMP 0x0018c4c9
LAB_0018c492:
MOV RAX,qword ptr [RBP + -0x50]
MOVSD XMM0,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x58]
SUBSD XMM0,qword ptr [RAX + 0x10]
MOVAPS XMM1,xmmword ptr [0x00257f30]
PAND XMM0,XMM1
MOVSD XMM1,qword ptr [0x00257af0]
UCOMISD XMM0,XMM1
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0xb0],EAX
LAB_0018c4c9:
MOV EAX,dword ptr [RBP + -0xb0]
MOV dword ptr [RBP + -0x68],EAX
CMP dword ptr [RBP + -0x64],0x0
JL 0x0018c4de
CMP dword ptr [RBP + -0x68],0x0
JZ 0x0018c51f
LAB_0018c4de:
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x50]
MOV R9,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x88]
CALL 0x0018c610
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x88]
CALL 0x00187250
CMP AL,0x0
JZ 0x0018c51d
MOV dword ptr [RBP + -0x34],0xffffffff
JMP 0x0018c5e2
LAB_0018c51d:
JMP 0x0018c51f
LAB_0018c51f:
CMP dword ptr [RBP + -0x64],0x0
JG 0x0018c52b
CMP dword ptr [RBP + -0x68],0x0
JZ 0x0018c569
LAB_0018c52b:
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x58]
MOV R9,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0xa8]
CALL 0x0018c610
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0xa8]
CALL 0x00181f80
MOVSX EAX,AL
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JZ 0x0018c567
JMP 0x0018c5e2
LAB_0018c567:
JMP 0x0018c569
LAB_0018c569:
CMP dword ptr [RBP + -0x64],0x0
JG 0x0018c57b
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x18
MOV qword ptr [RBP + -0x50],RAX
LAB_0018c57b:
CMP dword ptr [RBP + -0x64],0x0
JL 0x0018c58d
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x18
MOV qword ptr [RBP + -0x58],RAX
LAB_0018c58d:
JMP 0x0018c420
LAB_0018c592:
MOV RAX,qword ptr [RBP + -0x50]
CMP qword ptr [RAX],0x0
JZ 0x0018c5b9
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x50]
MOV R8,qword ptr [RBP + -0x30]
CALL 0x0018c780
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0018c5e0
LAB_0018c5b9:
MOV RAX,qword ptr [RBP + -0x58]
CMP qword ptr [RAX],0x0
JZ 0x0018c5de
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x58]
MOV R8,qword ptr [RBP + -0x30]
CALL 0x0018c810
MOV dword ptr [RBP + -0x34],EAX
LAB_0018c5de:
JMP 0x0018c5e0
LAB_0018c5e0:
JMP 0x0018c5e2
LAB_0018c5e2:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x328
MOV ESI,0x2
CALL 0x001ed3c0
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0xb4],EAX
MOV EAX,dword ptr [RBP + -0xb4]
ADD RSP,0xc0
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int _ma_ft_update(long *param_1,uint param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
char cVar1;
bool bVar2;
uint local_b8;
int1 local_b0 [32];
int1 local_90 [32];
uint local_70;
int local_6c;
int8 local_68;
long *local_60;
long *local_58;
long *local_50;
long *local_48;
int local_3c;
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
uint local_14;
long *local_10;
local_3c = -1;
local_68 = **(int8 **)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xc0);
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_14 = param_2;
local_10 = param_1;
local_58 = (long *)_ma_ft_parserecord(param_1,param_2,param_4,param_1 + 0x65);
local_48 = local_58;
if ((local_58 != (long *)0x0) &&
(local_60 = (long *)_ma_ft_parserecord(local_10,local_14,local_30,local_10 + 0x65),
local_50 = local_60, local_60 != (long *)0x0)) {
local_3c = 0;
while( true ) {
bVar2 = false;
if (*local_58 != 0) {
bVar2 = *local_60 != 0;
}
if (!bVar2) break;
local_6c = ha_compare_text(local_68,*local_58,(int)local_58[1],*local_60,(int)local_60[1],0);
if (local_6c == 0) {
local_b8 = (uint)(DAT_00257af0 <
(double)((ulong)((double)local_58[2] - (double)local_60[2]) & _DAT_00257f30
));
}
else {
local_b8 = 0;
}
local_70 = local_b8;
if ((local_6c < 0) || (local_b8 != 0)) {
_ma_ft_make_key(local_10,local_90,local_14,local_20,local_58);
cVar1 = _ma_ck_delete(local_10,local_90);
if (cVar1 != '\0') {
local_3c = -1;
goto LAB_0018c5e2;
}
}
if ((0 < local_6c) || (local_70 != 0)) {
_ma_ft_make_key(local_10,local_b0,local_14,local_20,local_60);
cVar1 = _ma_ck_write(local_10,local_b0);
local_3c = (int)cVar1;
if (local_3c != 0) goto LAB_0018c5e2;
}
if (local_6c < 1) {
local_58 = local_58 + 3;
}
if (-1 < local_6c) {
local_60 = local_60 + 3;
}
}
if (*local_58 == 0) {
if (*local_60 != 0) {
local_3c = _ma_ft_store(local_10,local_14,local_20,local_60,local_38);
}
}
else {
local_3c = _ma_ft_erase(local_10,local_14,local_20,local_58,local_38);
}
}
LAB_0018c5e2:
free_root(local_10 + 0x65,2);
return local_3c;
}
| |
32,595 | get_simple_collation_handler_by_flags | eloqsql/mysys/charset.c | static MY_COLLATION_HANDLER *get_simple_collation_handler_by_flags(uint flags)
{
return flags & MY_CS_BINSORT ?
(flags & MY_CS_NOPAD ?
&my_collation_8bit_nopad_bin_handler :
&my_collation_8bit_bin_handler) :
(flags & MY_CS_NOPAD ?
&my_collation_8bit_simple_nopad_ci_handler :
&my_collation_8bit_simple_ci_handler);
} | O0 | c | get_simple_collation_handler_by_flags:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xe0bc6
movl -0x4(%rbp), %edx
andl $0x20000, %edx # imm = 0x20000
leaq 0x1d63a6(%rip), %rax # 0x2b6f58
leaq 0x1d640f(%rip), %rcx # 0x2b6fc8
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0xe0be8
movl -0x4(%rbp), %edx
andl $0x20000, %edx # imm = 0x20000
leaq 0x1d8ec2(%rip), %rax # 0x2b9a98
leaq 0x1d8f2b(%rip), %rcx # 0x2b9b08
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nop
| get_simple_collation_handler_by_flags:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
and eax, 10h
cmp eax, 0
jz short loc_E0BC6
mov edx, [rbp+var_4]
and edx, 20000h
lea rax, my_collation_8bit_bin_handler
lea rcx, my_collation_8bit_nopad_bin_handler
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_10], rax
jmp short loc_E0BE8
loc_E0BC6:
mov edx, [rbp+var_4]
and edx, 20000h
lea rax, my_collation_8bit_simple_ci_handler
lea rcx, my_collation_8bit_simple_nopad_ci_handler
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_10], rax
loc_E0BE8:
mov rax, [rbp+var_10]
pop rbp
retn
| long long ( ** get_simple_collation_handler_by_flags(int a1))()
{
long long ( **v1)(); // rax
long long ( **v2)(); // rax
if ( (a1 & 0x10) != 0 )
{
v1 = my_collation_8bit_bin_handler;
if ( (a1 & 0x20000) != 0 )
return my_collation_8bit_nopad_bin_handler;
return v1;
}
else
{
v2 = my_collation_8bit_simple_ci_handler;
if ( (a1 & 0x20000) != 0 )
return my_collation_8bit_simple_nopad_ci_handler;
return v2;
}
}
| get_simple_collation_handler_by_flags:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001e0bc6
MOV EDX,dword ptr [RBP + -0x4]
AND EDX,0x20000
LEA RAX,[0x3b6f58]
LEA RCX,[0x3b6fc8]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001e0be8
LAB_001e0bc6:
MOV EDX,dword ptr [RBP + -0x4]
AND EDX,0x20000
LEA RAX,[0x3b9a98]
LEA RCX,[0x3b9b08]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_001e0be8:
MOV RAX,qword ptr [RBP + -0x10]
POP RBP
RET
|
int1 * get_simple_collation_handler_by_flags(uint param_1)
{
int1 *local_18;
if ((param_1 & 0x10) == 0) {
local_18 = my_collation_8bit_simple_ci_handler;
if ((param_1 & 0x20000) != 0) {
local_18 = my_collation_8bit_simple_nopad_ci_handler;
}
}
else {
local_18 = my_collation_8bit_bin_handler;
if ((param_1 & 0x20000) != 0) {
local_18 = my_collation_8bit_nopad_bin_handler;
}
}
return local_18;
}
| |
32,596 | testing::internal::FlagToEnvVar[abi:cxx11](char const*) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc | static std::string FlagToEnvVar(const char* flag) {
const std::string full_flag =
(Message() << GTEST_FLAG_PREFIX_ << flag).GetString();
Message env_var;
for (size_t i = 0; i != full_flag.length(); i++) {
env_var << ToUpper(full_flag.c_str()[i]);
}
return env_var.GetString();
} | O0 | cpp | testing::internal::FlagToEnvVar[abi:cxx11](char const*):
subq $0x98, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
leaq 0x60(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xc0620
movq 0x28(%rsp), %rdi
leaq 0x58ed2(%rip), %rsi # 0x112a51
callq 0xe3cd0
movq %rax, 0x30(%rsp)
jmp 0xb9b8b
movq 0x30(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x210c0
movq %rax, 0x10(%rsp)
jmp 0xb9ba4
movq 0x10(%rsp), %rsi
leaq 0x68(%rsp), %rdi
callq 0xb2630
jmp 0xb9bb5
leaq 0x60(%rsp), %rdi
callq 0x1acd0
leaq 0x48(%rsp), %rdi
callq 0xc0620
jmp 0xb9bcb
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x1b820
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
je 0xb9c86
leaq 0x68(%rsp), %rdi
callq 0x1acc0
movq 0x40(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0xee8a0
movb %al, 0x7(%rsp)
jmp 0xb9c17
movb 0x7(%rsp), %al
movb %al, 0x3f(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x3f(%rsp), %rsi
callq 0xe93d0
jmp 0xb9c30
jmp 0xb9c32
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0xb9bd4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x1acd0
jmp 0xb9cc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0xb9cb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x1acd0
jmp 0xb9cb8
movq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xb2630
jmp 0xb9c97
leaq 0x48(%rsp), %rdi
callq 0x1acd0
leaq 0x68(%rsp), %rdi
callq 0x1aac0
movq 0x20(%rsp), %rax
addq $0x98, %rsp
retq
leaq 0x68(%rsp), %rdi
callq 0x1aac0
movq 0x58(%rsp), %rdi
callq 0x14c80
nopl (%rax)
| _ZN7testing8internalL12FlagToEnvVarB5cxx11EPKc:
sub rsp, 98h
mov qword ptr [rsp+98h+var_80], rdi
mov rax, rdi
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_10], rsi
lea rdi, [rsp+98h+var_38]; this
mov [rsp+98h+var_70], rdi
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rdi, [rsp+98h+var_70]
lea rsi, aGtest; "gtest_"
call _ZN7testing7MessagelsIA7_cEERS0_RKT_; testing::Message::operator<<<char [7]>(char [7] const&)
mov [rsp+98h+var_68], rax
jmp short $+2
loc_B9B8B:
mov rdi, [rsp+98h+var_68]
lea rsi, [rsp+98h+var_10]
call _ZN7testing7MessagelsIKcEERS0_RKPT_; testing::Message::operator<<<char const>(char const * const&)
mov qword ptr [rsp+98h+var_88], rax
jmp short $+2
loc_B9BA4:
mov rsi, qword ptr [rsp+98h+var_88]; char
lea rdi, [rsp+98h+var_30]; int
call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void)
jmp short $+2
loc_B9BB5:
lea rdi, [rsp+98h+var_38]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
lea rdi, [rsp+98h+var_50]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
jmp short $+2
loc_B9BCB:
mov [rsp+98h+var_58], 0
loc_B9BD4:
mov rax, [rsp+98h+var_58]
mov [rsp+98h+var_90], rax
lea rdi, [rsp+98h+var_30]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rcx, rax
mov rax, [rsp+98h+var_90]
cmp rax, rcx
jz loc_B9C86
lea rdi, [rsp+98h+var_30]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rcx, [rsp+98h+var_58]
movsx edi, byte ptr [rax+rcx]; this
call _ZN7testing8internal7ToUpperEc; testing::internal::ToUpper(char)
mov [rsp+98h+var_91], al
jmp short $+2
loc_B9C17:
mov al, [rsp+98h+var_91]
mov [rsp+98h+var_59], al
lea rdi, [rsp+98h+var_50]
lea rsi, [rsp+98h+var_59]
call _ZN7testing7MessagelsIcEERS0_RKT_; testing::Message::operator<<<char>(char const&)
jmp short $+2
loc_B9C30:
jmp short $+2
loc_B9C32:
mov rax, [rsp+98h+var_58]
add rax, 1
mov [rsp+98h+var_58], rax
jmp short loc_B9BD4
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_58]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp short loc_B9CC2
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
jmp short loc_B9CB8
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_40]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp short loc_B9CB8
loc_B9C86:
mov rdi, qword ptr [rsp+98h+var_80]; int
lea rsi, [rsp+98h+var_50]; int
call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void)
jmp short $+2
loc_B9C97:
lea rdi, [rsp+98h+var_50]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
lea rdi, [rsp+98h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, [rsp+98h+var_78]
add rsp, 98h
retn
loc_B9CB8:
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_B9CC2:
mov rdi, [rsp+arg_50]
call __Unwind_Resume
| long long testing::internal::FlagToEnvVar[abi:cxx11](long long a1, char *a2)
{
long long v2; // rax
long long v4; // [rsp+8h] [rbp-90h]
long long v5; // [rsp+30h] [rbp-68h]
char v6; // [rsp+3Fh] [rbp-59h] BYREF
long long i; // [rsp+40h] [rbp-58h]
int v8[6]; // [rsp+48h] [rbp-50h] BYREF
_BYTE v9[8]; // [rsp+60h] [rbp-38h] BYREF
int v10[8]; // [rsp+68h] [rbp-30h] BYREF
_QWORD v11[2]; // [rsp+88h] [rbp-10h] BYREF
v11[1] = a1;
v11[0] = a2;
testing::Message::Message((testing::Message *)v9);
v5 = testing::Message::operator<<<char [7]>(v9, "gtest_");
LODWORD(a2) = testing::Message::operator<<<char const>(v5, v11);
testing::Message::GetString[abi:cxx11]((int)v10, (int)a2);
testing::Message::~Message((testing::Message *)v9);
testing::Message::Message((testing::Message *)v8);
for ( i = 0LL; ; ++i )
{
v4 = i;
if ( v4 == std::string::length((long long)v10) )
break;
v2 = std::string::c_str((long long)v10);
v6 = testing::internal::ToUpper((testing::internal *)(unsigned int)*(char *)(v2 + i), (char)a2);
a2 = &v6;
testing::Message::operator<<<char>(v8, &v6);
}
testing::Message::GetString[abi:cxx11](a1, (int)v8);
testing::Message::~Message((testing::Message *)v8);
std::string::~string(v10);
return a1;
}
| FlagToEnvVar[abi:cxx11]:
SUB RSP,0x98
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x90],RDI
MOV qword ptr [RSP + 0x88],RSI
LEA RDI,[RSP + 0x60]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x001c0620
MOV RDI,qword ptr [RSP + 0x28]
LAB_001b9b78:
LEA RSI,[0x212a51]
CALL 0x001e3cd0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001b9b8b
LAB_001b9b8b:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[RSP + 0x88]
CALL 0x001210c0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001b9ba4
LAB_001b9ba4:
MOV RSI,qword ptr [RSP + 0x10]
LEA RDI,[RSP + 0x68]
CALL 0x001b2630
JMP 0x001b9bb5
LAB_001b9bb5:
LEA RDI,[RSP + 0x60]
CALL 0x0011acd0
LAB_001b9bbf:
LEA RDI,[RSP + 0x48]
CALL 0x001c0620
JMP 0x001b9bcb
LAB_001b9bcb:
MOV qword ptr [RSP + 0x40],0x0
LAB_001b9bd4:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x68]
CALL 0x0011b820
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,RCX
JZ 0x001b9c86
LEA RDI,[RSP + 0x68]
CALL 0x0011acc0
MOV RCX,qword ptr [RSP + 0x40]
MOVSX EDI,byte ptr [RAX + RCX*0x1]
LAB_001b9c0c:
CALL 0x001ee8a0
MOV byte ptr [RSP + 0x7],AL
JMP 0x001b9c17
LAB_001b9c17:
MOV AL,byte ptr [RSP + 0x7]
MOV byte ptr [RSP + 0x3f],AL
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x3f]
CALL 0x001e93d0
JMP 0x001b9c30
LAB_001b9c30:
JMP 0x001b9c32
LAB_001b9c32:
MOV RAX,qword ptr [RSP + 0x40]
ADD RAX,0x1
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001b9bd4
LAB_001b9c86:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x48]
CALL 0x001b2630
LAB_001b9c95:
JMP 0x001b9c97
LAB_001b9c97:
LEA RDI,[RSP + 0x48]
CALL 0x0011acd0
LEA RDI,[RSP + 0x68]
CALL 0x0011aac0
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x98
RET
|
/* testing::internal::FlagToEnvVar[abi:cxx11](char const*) */
internal * __thiscall testing::internal::FlagToEnvVar_abi_cxx11_(internal *this,char *param_1)
{
Message *this_00;
long lVar1;
long lVar2;
char local_59;
long local_58;
Message local_50 [24];
Message local_38 [8];
string local_30 [32];
char *local_10;
internal *local_8;
local_10 = param_1;
local_8 = this;
Message::Message(local_38);
/* try { // try from 001b9b78 to 001b9bb2 has its CatchHandler @ 001b9c42 */
this_00 = Message::operator<<(local_38,"gtest_");
Message::operator<<(this_00,&local_10);
Message::GetString_abi_cxx11_();
Message::~Message(local_38);
/* try { // try from 001b9bbf to 001b9bc8 has its CatchHandler @ 001b9c5c */
Message::Message(local_50);
local_58 = 0;
while( true ) {
lVar2 = local_58;
lVar1 = std::__cxx11::string::length(local_30);
if (lVar2 == lVar1) break;
lVar2 = std::__cxx11::string::c_str(local_30);
/* try { // try from 001b9c0c to 001b9c94 has its CatchHandler @ 001b9c6c */
local_59 = ToUpper(*(char *)(lVar2 + local_58));
Message::operator<<(local_50,&local_59);
local_58 = local_58 + 1;
}
Message::GetString_abi_cxx11_();
Message::~Message(local_50);
std::__cxx11::string::~string(local_30);
return this;
}
| |
32,597 | js_inner_module_linking | bluesky950520[P]quickjs/quickjs.c | static int js_inner_module_linking(JSContext *ctx, JSModuleDef *m,
JSModuleDef **pstack_top, int index)
{
int i;
JSImportEntry *mi;
JSModuleDef *m1;
JSVarRef **var_refs, *var_ref;
JSObject *p;
BOOL is_c_module;
JSValue ret_val;
if (js_check_stack_overflow(ctx->rt, 0)) {
JS_ThrowStackOverflow(ctx);
return -1;
}
#ifdef DUMP_MODULE_RESOLVE
if (check_dump_flag(ctx->rt, DUMP_MODULE_RESOLVE)) {
char buf1[ATOM_GET_STR_BUF_SIZE];
printf("js_inner_module_linking '%s':\n", JS_AtomGetStr(ctx, buf1, sizeof(buf1), m->module_name));
}
#endif
if (m->status == JS_MODULE_STATUS_LINKING ||
m->status == JS_MODULE_STATUS_LINKED ||
m->status == JS_MODULE_STATUS_EVALUATING_ASYNC ||
m->status == JS_MODULE_STATUS_EVALUATED)
return index;
assert(m->status == JS_MODULE_STATUS_UNLINKED);
m->status = JS_MODULE_STATUS_LINKING;
m->dfs_index = index;
m->dfs_ancestor_index = index;
index++;
/* push 'm' on stack */
m->stack_prev = *pstack_top;
*pstack_top = m;
for(i = 0; i < m->req_module_entries_count; i++) {
JSReqModuleEntry *rme = &m->req_module_entries[i];
m1 = rme->module;
index = js_inner_module_linking(ctx, m1, pstack_top, index);
if (index < 0)
goto fail;
assert(m1->status == JS_MODULE_STATUS_LINKING ||
m1->status == JS_MODULE_STATUS_LINKED ||
m1->status == JS_MODULE_STATUS_EVALUATING_ASYNC ||
m1->status == JS_MODULE_STATUS_EVALUATED);
if (m1->status == JS_MODULE_STATUS_LINKING) {
m->dfs_ancestor_index = min_int(m->dfs_ancestor_index,
m1->dfs_ancestor_index);
}
}
#ifdef DUMP_MODULE_RESOLVE
if (check_dump_flag(ctx->rt, DUMP_MODULE_RESOLVE)) {
char buf1[ATOM_GET_STR_BUF_SIZE];
printf("instantiating module '%s':\n", JS_AtomGetStr(ctx, buf1, sizeof(buf1), m->module_name));
}
#endif
/* check the indirect exports */
for(i = 0; i < m->export_entries_count; i++) {
JSExportEntry *me = &m->export_entries[i];
if (me->export_type == JS_EXPORT_TYPE_INDIRECT &&
me->local_name != JS_ATOM__star_) {
JSResolveResultEnum ret;
JSExportEntry *res_me;
JSModuleDef *res_m, *m1;
m1 = m->req_module_entries[me->u.req_module_idx].module;
ret = js_resolve_export(ctx, &res_m, &res_me, m1, me->local_name);
if (ret != JS_RESOLVE_RES_FOUND) {
js_resolve_export_throw_error(ctx, ret, m, me->export_name);
goto fail;
}
}
}
#ifdef DUMP_MODULE_RESOLVE
if (check_dump_flag(ctx->rt, DUMP_MODULE_RESOLVE)) {
printf("exported bindings:\n");
for(i = 0; i < m->export_entries_count; i++) {
JSExportEntry *me = &m->export_entries[i];
printf(" name="); print_atom(ctx, me->export_name);
printf(" local="); print_atom(ctx, me->local_name);
printf(" type=%d idx=%d\n", me->export_type, me->u.local.var_idx);
}
}
#endif
is_c_module = (m->init_func != NULL);
if (!is_c_module) {
p = JS_VALUE_GET_OBJ(m->func_obj);
var_refs = p->u.func.var_refs;
for(i = 0; i < m->import_entries_count; i++) {
mi = &m->import_entries[i];
#ifdef DUMP_MODULE_RESOLVE
if (check_dump_flag(ctx->rt, DUMP_MODULE_RESOLVE)) {
printf("import var_idx=%d name=", mi->var_idx);
print_atom(ctx, mi->import_name);
printf(": ");
}
#endif
m1 = m->req_module_entries[mi->req_module_idx].module;
if (mi->import_name == JS_ATOM__star_) {
JSValue val;
/* name space import */
val = JS_GetModuleNamespace(ctx, m1);
if (JS_IsException(val))
goto fail;
set_value(ctx, &var_refs[mi->var_idx]->value, val);
module_trace(ctx, "namespace\n");
} else {
JSResolveResultEnum ret;
JSExportEntry *res_me;
JSModuleDef *res_m;
JSObject *p1;
ret = js_resolve_export(ctx, &res_m,
&res_me, m1, mi->import_name);
if (ret != JS_RESOLVE_RES_FOUND) {
js_resolve_export_throw_error(ctx, ret, m1, mi->import_name);
goto fail;
}
if (res_me->local_name == JS_ATOM__star_) {
JSValue val;
JSModuleDef *m2;
/* name space import from */
m2 = res_m->req_module_entries[res_me->u.req_module_idx].module;
val = JS_GetModuleNamespace(ctx, m2);
if (JS_IsException(val))
goto fail;
var_ref = js_create_module_var(ctx, TRUE);
if (!var_ref) {
JS_FreeValue(ctx, val);
goto fail;
}
set_value(ctx, &var_ref->value, val);
var_refs[mi->var_idx] = var_ref;
module_trace(ctx, "namespace from\n");
} else {
var_ref = res_me->u.local.var_ref;
if (!var_ref) {
p1 = JS_VALUE_GET_OBJ(res_m->func_obj);
var_ref = p1->u.func.var_refs[res_me->u.local.var_idx];
}
var_ref->header.ref_count++;
var_refs[mi->var_idx] = var_ref;
module_trace(ctx, "local export (var_ref=%p)\n", var_ref);
}
}
}
/* keep the exported variables in the module export entries (they
are used when the eval function is deleted and cannot be
initialized before in case imports are exported) */
for(i = 0; i < m->export_entries_count; i++) {
JSExportEntry *me = &m->export_entries[i];
if (me->export_type == JS_EXPORT_TYPE_LOCAL) {
var_ref = var_refs[me->u.local.var_idx];
var_ref->header.ref_count++;
me->u.local.var_ref = var_ref;
}
}
/* initialize the global variables */
ret_val = JS_Call(ctx, m->func_obj, JS_TRUE, 0, NULL);
if (JS_IsException(ret_val))
goto fail;
JS_FreeValue(ctx, ret_val);
}
assert(m->dfs_ancestor_index <= m->dfs_index);
if (m->dfs_index == m->dfs_ancestor_index) {
for(;;) {
/* pop m1 from stack */
m1 = *pstack_top;
*pstack_top = m1->stack_prev;
m1->status = JS_MODULE_STATUS_LINKED;
if (m1 == m)
break;
}
}
#ifdef DUMP_MODULE_RESOLVE
if (check_dump_flag(ctx->rt, DUMP_MODULE_RESOLVE)) {
printf("js_inner_module_linking done\n");
}
#endif
return index;
fail:
return -1;
} | O1 | c | js_inner_module_linking:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq 0x18(%rdi), %rax
cmpq %rbp, 0xe8(%rax)
jbe 0x44650
leaq 0x5a994(%rip), %rsi # 0x9efd6
xorl %eax, %eax
callq 0x20add
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x44673
movl %ecx, %r8d
movq %rsi, %r15
movl 0x80(%rsi), %eax
movl %eax, %ecx
shrl $0x18, %ecx
cmpl $0x5, %ecx
ja 0x44682
movl $0x36, %esi
btl %ecx, %esi
jae 0x44682
movl %r8d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, -0x30(%rbp)
andl $0xffffff, %eax # imm = 0xFFFFFF
orl $0x1000000, %eax # imm = 0x1000000
movl %eax, 0x80(%r15)
movl %r8d, 0x84(%r15)
movl %r8d, 0x88(%r15)
incl %r8d
movq (%rdx), %rax
movq %rax, 0x90(%r15)
movq %r15, (%rdx)
cmpl $0x0, 0x20(%r15)
jle 0x44735
movl $0x8, %r14d
xorl %r12d, %r12d
movq 0x18(%r15), %rax
movq (%rax,%r14), %r13
movq -0x30(%rbp), %rdi
movq %r13, %rsi
movq %rdx, %rbx
movl %r8d, %ecx
callq 0x4461d
movl %eax, %r8d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %r8d, %r8d
js 0x44673
movzbl 0x83(%r13), %ecx
shll $0x18, %ecx
cmpl $0x1000000, %ecx # imm = 0x1000000
jne 0x44719
movl 0x88(%r15), %ecx
movl 0x88(%r13), %edx
cmpl %edx, %ecx
cmovll %ecx, %edx
movl %edx, 0x88(%r15)
testl %r8d, %r8d
js 0x44673
movq %rbx, %rdx
incq %r12
movslq 0x20(%r15), %rax
addq $0x10, %r14
cmpq %rax, %r12
jl 0x446c5
movl %r8d, -0x34(%rbp)
movq %rdx, -0x70(%rbp)
cmpl $0x0, 0x30(%r15)
jle 0x447cf
movl $0x18, %r14d
xorl %r12d, %r12d
movq 0x28(%r15), %r13
cmpl $0x1, -0x8(%r13,%r14)
jne 0x447b5
movl -0x4(%r13,%r14), %r8d
cmpl $0x7e, %r8d
je 0x447b5
movq 0x18(%r15), %rax
movslq -0x18(%r13,%r14), %rcx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rcx
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x4377e
testl %eax, %eax
je 0x447af
movl (%r13,%r14), %ecx
movq %rbx, %rdi
movl %eax, %ebx
movl %eax, %esi
movq %r15, %rdx
callq 0x437e9
movl %ebx, %eax
movl $0x5, %ecx
jmp 0x447b1
xorl %ecx, %ecx
testl %eax, %eax
jne 0x447b7
xorl %ecx, %ecx
testl %ecx, %ecx
jne 0x44649
incq %r12
movslq 0x30(%r15), %rax
addq $0x20, %r14
cmpq %rax, %r12
jl 0x44751
cmpq $0x0, 0x78(%r15)
je 0x44815
movl 0x84(%r15), %eax
cmpl 0x88(%r15), %eax
movq -0x70(%rbp), %rdx
jne 0x4480d
movl -0x34(%rbp), %esi
movq (%rdx), %rax
movq 0x90(%rax), %rcx
movq %rcx, (%rdx)
movb $0x2, 0x83(%rax)
cmpq %r15, %rax
jne 0x447ed
movl %esi, %eax
jmp 0x44673
movl -0x34(%rbp), %eax
jmp 0x44673
movq 0x68(%r15), %rax
movq 0x38(%rax), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, 0x50(%r15)
movq -0x30(%rbp), %r12
jle 0x449d6
xorl %r14d, %r14d
xorl %ecx, %ecx
movq %rcx, -0x48(%rbp)
movq 0x18(%r15), %rax
movq 0x48(%r15), %rdx
movslq 0x8(%rdx,%r14), %rcx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %r13
movq %rdx, %rbx
movl 0x4(%rdx,%r14), %r8d
movq %r12, %rdi
cmpl $0x7e, %r8d
jne 0x448a3
movq %r13, %rsi
callq 0x30af7
cmpl $0x6, %edx
je 0x44649
movslq (%rbx,%r14), %rcx
movq -0x40(%rbp), %rsi
movq (%rsi,%rcx,8), %rdi
movq 0x20(%rdi), %rsi
movq 0x28(%rdi), %rcx
movq %rax, 0x20(%rdi)
movq %rdx, 0x28(%rdi)
movq 0x18(%r12), %rdi
movq %rcx, %rdx
callq 0x1d8c6
movq -0x48(%rbp), %rcx
jmp 0x44954
leaq -0x50(%rbp), %rsi
leaq -0x68(%rbp), %rdx
movq %r13, %rcx
callq 0x4377e
testl %eax, %eax
je 0x448d5
movl 0x4(%rbx,%r14), %ecx
movq %r12, %rdi
movl %eax, %esi
movq %r13, %rdx
callq 0x437e9
movl $0x5, %r12d
movq -0x48(%rbp), %rcx
jmp 0x44947
movq -0x68(%rbp), %rax
cmpl $0x7e, 0x14(%rax)
jne 0x44916
movq -0x50(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq (%rax), %rax
shlq $0x4, %rax
movq 0x8(%rcx,%rax), %rsi
movq %r12, %rdi
callq 0x30af7
movq %rdx, %r13
movl $0x5, %r12d
cmpl $0x6, %r13d
jne 0x4496a
xorl %eax, %eax
testb %al, %al
movq -0x48(%rbp), %rcx
jne 0x44944
jmp 0x44947
movq 0x8(%rax), %rcx
testq %rcx, %rcx
jne 0x44932
movq -0x50(%rbp), %rcx
movq 0x68(%rcx), %rcx
movq 0x38(%rcx), %rcx
movslq (%rax), %rax
movq (%rcx,%rax,8), %rcx
incl (%rcx)
movslq (%rbx,%r14), %rax
movq -0x40(%rbp), %rdx
movq %rcx, (%rdx,%rax,8)
movq -0x48(%rbp), %rcx
xorl %r12d, %r12d
testl %r12d, %r12d
movq -0x30(%rbp), %r12
jne 0x44649
incq %rcx
movslq 0x50(%r15), %rax
addq $0xc, %r14
cmpq %rax, %rcx
jl 0x44835
jmp 0x449d6
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x1103b
testq %rax, %rax
je 0x449bd
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
movq %rax, %r12
movq -0x58(%rbp), %rax
movq %rax, 0x20(%r12)
movq %r13, 0x28(%r12)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1d8c6
movslq (%rbx,%r14), %rax
movq -0x40(%rbp), %rcx
movq %r12, (%rcx,%rax,8)
xorl %r12d, %r12d
movb $0x1, %al
jmp 0x4490c
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x58(%rbp), %rsi
movq %r13, %rdx
callq 0x1d8c6
jmp 0x4490a
cmpl $0x0, 0x30(%r15)
jle 0x44a12
movl $0x10, %eax
xorl %ecx, %ecx
movq -0x40(%rbp), %rdi
movq 0x28(%r15), %rdx
cmpl $0x0, (%rdx,%rax)
jne 0x44a02
movslq -0x10(%rdx,%rax), %rsi
movq (%rdi,%rsi,8), %rsi
incl (%rsi)
movq %rsi, -0x8(%rdx,%rax)
incq %rcx
movslq 0x30(%r15), %rdx
addq $0x20, %rax
cmpq %rdx, %rcx
jl 0x449e8
movq 0x68(%r15), %rsi
movq 0x70(%r15), %rdx
movl $0x0, -0x68(%rbp)
movq $0x3, -0x60(%rbp)
movups -0x68(%rbp), %xmm0
movups %xmm0, (%rsp)
movl $0x2, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x1, %ecx
movl $0x1, %r8d
movq %r12, %rdi
xorl %r9d, %r9d
callq 0x284ca
movq %rax, %rsi
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0x6, %edx
je 0x44673
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1d8c6
jmp 0x447d6
| js_inner_module_linking:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rax, [rdi+18h]
cmp [rax+0E8h], rbp
jbe short loc_44650
lea rsi, aMaximumCallSta; "Maximum call stack size exceeded"
xor eax, eax
call JS_ThrowRangeError
loc_44649:
mov eax, 0FFFFFFFFh
jmp short loc_44673
loc_44650:
mov r8d, ecx
mov r15, rsi
mov eax, [rsi+80h]
mov ecx, eax
shr ecx, 18h
cmp ecx, 5
ja short loc_44682
mov esi, 36h ; '6'
bt esi, ecx
jnb short loc_44682
mov eax, r8d
loc_44673:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_44682:
mov [rbp+var_30], rdi
and eax, 0FFFFFFh
or eax, 1000000h
mov [r15+80h], eax
mov [r15+84h], r8d
mov [r15+88h], r8d
inc r8d
mov rax, [rdx]
mov [r15+90h], rax
mov [rdx], r15
cmp dword ptr [r15+20h], 0
jle short loc_44735
mov r14d, 8
xor r12d, r12d
loc_446C5:
mov rax, [r15+18h]
mov r13, [rax+r14]
mov rdi, [rbp+var_30]
mov rsi, r13
mov rbx, rdx
mov ecx, r8d
call js_inner_module_linking
mov r8d, eax
mov eax, 0FFFFFFFFh
test r8d, r8d
js short loc_44673
movzx ecx, byte ptr [r13+83h]
shl ecx, 18h
cmp ecx, 1000000h
jnz short loc_44719
mov ecx, [r15+88h]
mov edx, [r13+88h]
cmp ecx, edx
cmovl edx, ecx
mov [r15+88h], edx
loc_44719:
test r8d, r8d
js loc_44673
mov rdx, rbx
inc r12
movsxd rax, dword ptr [r15+20h]
add r14, 10h
cmp r12, rax
jl short loc_446C5
loc_44735:
mov [rbp+var_34], r8d
mov [rbp+var_70], rdx
cmp dword ptr [r15+30h], 0
jle loc_447CF
mov r14d, 18h
xor r12d, r12d
loc_44751:
mov r13, [r15+28h]
cmp dword ptr [r13+r14-8], 1
jnz short loc_447B5
mov r8d, [r13+r14-4]
cmp r8d, 7Eh ; '~'
jz short loc_447B5
mov rax, [r15+18h]
movsxd rcx, dword ptr [r13+r14-18h]
shl rcx, 4
mov rcx, [rax+rcx+8]
mov rbx, [rbp+var_30]
mov rdi, rbx
lea rsi, [rbp+var_50]
lea rdx, [rbp+var_68]
call js_resolve_export
test eax, eax
jz short loc_447AF
mov ecx, [r13+r14+0]
mov rdi, rbx
mov ebx, eax
mov esi, eax
mov rdx, r15
call js_resolve_export_throw_error
mov eax, ebx
mov ecx, 5
jmp short loc_447B1
loc_447AF:
xor ecx, ecx
loc_447B1:
test eax, eax
jnz short loc_447B7
loc_447B5:
xor ecx, ecx
loc_447B7:
test ecx, ecx
jnz loc_44649
inc r12
movsxd rax, dword ptr [r15+30h]
add r14, 20h ; ' '
cmp r12, rax
jl short loc_44751
loc_447CF:
cmp qword ptr [r15+78h], 0
jz short loc_44815
loc_447D6:
mov eax, [r15+84h]
cmp eax, [r15+88h]
mov rdx, [rbp+var_70]
jnz short loc_4480D
mov esi, [rbp+var_34]
loc_447ED:
mov rax, [rdx]
mov rcx, [rax+90h]
mov [rdx], rcx
mov byte ptr [rax+83h], 2
cmp rax, r15
jnz short loc_447ED
mov eax, esi
jmp loc_44673
loc_4480D:
mov eax, [rbp+var_34]
jmp loc_44673
loc_44815:
mov rax, [r15+68h]
mov rax, [rax+38h]
mov [rbp+var_40], rax
cmp dword ptr [r15+50h], 0
mov r12, [rbp+var_30]
jle loc_449D6
xor r14d, r14d
xor ecx, ecx
loc_44835:
mov [rbp+var_48], rcx
mov rax, [r15+18h]
mov rdx, [r15+48h]
movsxd rcx, dword ptr [rdx+r14+8]
shl rcx, 4
mov r13, [rax+rcx+8]
mov rbx, rdx
mov r8d, [rdx+r14+4]
mov rdi, r12
cmp r8d, 7Eh ; '~'
jnz short loc_448A3
mov rsi, r13
call JS_GetModuleNamespace
cmp edx, 6
jz loc_44649
movsxd rcx, dword ptr [rbx+r14]
mov rsi, [rbp+var_40]
mov rdi, [rsi+rcx*8]
mov rsi, [rdi+20h]
mov rcx, [rdi+28h]
mov [rdi+20h], rax
mov [rdi+28h], rdx
mov rdi, [r12+18h]
mov rdx, rcx
call JS_FreeValueRT
mov rcx, [rbp+var_48]
jmp loc_44954
loc_448A3:
lea rsi, [rbp+var_50]
lea rdx, [rbp+var_68]
mov rcx, r13
call js_resolve_export
test eax, eax
jz short loc_448D5
mov ecx, [rbx+r14+4]
mov rdi, r12
mov esi, eax
mov rdx, r13
call js_resolve_export_throw_error
mov r12d, 5
mov rcx, [rbp+var_48]
jmp short loc_44947
loc_448D5:
mov rax, qword ptr [rbp+var_68]
cmp dword ptr [rax+14h], 7Eh ; '~'
jnz short loc_44916
mov rcx, [rbp+var_50]
mov rcx, [rcx+18h]
movsxd rax, dword ptr [rax]
shl rax, 4
mov rsi, [rcx+rax+8]
mov rdi, r12
call JS_GetModuleNamespace
mov r13, rdx
mov r12d, 5
cmp r13d, 6
jnz short loc_4496A
loc_4490A:
xor eax, eax
loc_4490C:
test al, al
mov rcx, [rbp+var_48]
jnz short loc_44944
jmp short loc_44947
loc_44916:
mov rcx, [rax+8]
test rcx, rcx
jnz short loc_44932
mov rcx, [rbp+var_50]
mov rcx, [rcx+68h]
mov rcx, [rcx+38h]
movsxd rax, dword ptr [rax]
mov rcx, [rcx+rax*8]
loc_44932:
inc dword ptr [rcx]
movsxd rax, dword ptr [rbx+r14]
mov rdx, [rbp+var_40]
mov [rdx+rax*8], rcx
mov rcx, [rbp+var_48]
loc_44944:
xor r12d, r12d
loc_44947:
test r12d, r12d
mov r12, [rbp+var_30]
jnz loc_44649
loc_44954:
inc rcx
movsxd rax, dword ptr [r15+50h]
add r14, 0Ch
cmp rcx, rax
jl loc_44835
jmp short loc_449D6
loc_4496A:
mov [rbp+var_58], rax
mov rdi, [rbp+var_30]
mov esi, 1
call js_create_module_var
test rax, rax
jz short loc_449BD
mov rsi, [rax+20h]
mov rdx, [rax+28h]
mov r12, rax
mov rax, [rbp+var_58]
mov [r12+20h], rax
mov [r12+28h], r13
mov rax, [rbp+var_30]
mov rdi, [rax+18h]
call JS_FreeValueRT
movsxd rax, dword ptr [rbx+r14]
mov rcx, [rbp+var_40]
mov [rcx+rax*8], r12
xor r12d, r12d
mov al, 1
jmp loc_4490C
loc_449BD:
mov rax, [rbp+var_30]
mov rdi, [rax+18h]
mov rsi, [rbp+var_58]
mov rdx, r13
call JS_FreeValueRT
jmp loc_4490A
loc_449D6:
cmp dword ptr [r15+30h], 0
jle short loc_44A12
mov eax, 10h
xor ecx, ecx
mov rdi, [rbp+var_40]
loc_449E8:
mov rdx, [r15+28h]
cmp dword ptr [rdx+rax], 0
jnz short loc_44A02
movsxd rsi, dword ptr [rdx+rax-10h]
mov rsi, [rdi+rsi*8]
inc dword ptr [rsi]
mov [rdx+rax-8], rsi
loc_44A02:
inc rcx
movsxd rdx, dword ptr [r15+30h]
add rax, 20h ; ' '
cmp rcx, rdx
jl short loc_449E8
loc_44A12:
mov rsi, [r15+68h]
mov rdx, [r15+70h]
mov dword ptr [rbp+var_68], 0
mov qword ptr [rbp+var_68+8], 3
movups xmm0, [rbp+var_68]
movups [rsp+90h+var_90], xmm0
mov [rsp+90h+var_78], 2
mov [rsp+90h+var_80], 0
mov ecx, 1
mov r8d, 1
mov rdi, r12
xor r9d, r9d
call JS_CallInternal
mov rsi, rax
mov eax, 0FFFFFFFFh
cmp edx, 6
jz loc_44673
mov rax, [rbp+var_30]
mov rdi, [rax+18h]
call JS_FreeValueRT
jmp loc_447D6
| long long js_inner_module_linking(
long long a1,
long long a2,
long long *a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long result; // rax
unsigned int v16; // eax
int v17; // esi
int v18; // r8d
long long v19; // r14
long long v20; // r12
long long v21; // r13
long long *v22; // rbx
int v23; // edx
long long v24; // r14
long long v25; // r12
long long v26; // r13
long long v27; // r8
long long v28; // rbx
int v29; // eax
long long v30; // rdi
int v31; // ebx
int v32; // ecx
unsigned int v33; // esi
long long v34; // rax
long long v35; // r12
long long v36; // r14
long long v37; // rcx
long long v38; // rax
long long v39; // rdx
long long v40; // rcx
long long v41; // r13
long long v42; // rbx
long long v43; // r8
long long ModuleNamespace; // rax
long long v45; // rdx
long long v46; // rdi
_DWORD *v47; // rsi
long long v48; // rcx
long long v49; // rcx
int v50; // eax
int v51; // r12d
_DWORD *v52; // rax
long long v53; // rdx
long long v54; // r13
char v55; // al
_DWORD *v56; // rcx
bool v57; // zf
long long module_var; // rax
_DWORD *v59; // rsi
long long v60; // rdx
long long v61; // r12
long long v62; // rax
long long v63; // rcx
long long v64; // rdi
long long v65; // rdx
_DWORD *v66; // rsi
long long v67; // rsi
long long v68; // rdx
long long v69; // rdx
_DWORD *v70; // rsi
char v71; // [rsp+0h] [rbp-90h]
long long *v72; // [rsp+20h] [rbp-70h]
__m128 v73; // [rsp+28h] [rbp-68h] BYREF
_DWORD *v74; // [rsp+38h] [rbp-58h]
long long v75; // [rsp+40h] [rbp-50h] BYREF
long long v76; // [rsp+48h] [rbp-48h]
long long v77; // [rsp+50h] [rbp-40h]
unsigned int v78; // [rsp+5Ch] [rbp-34h]
long long v79; // [rsp+60h] [rbp-30h]
long long savedregs; // [rsp+90h] [rbp+0h] BYREF
if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) > (unsigned long long)&savedregs )
{
JS_ThrowRangeError(
a1,
(long long)"Maximum call stack size exceeded",
(long long)a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v71);
return 0xFFFFFFFFLL;
}
v16 = *(_DWORD *)(a2 + 128);
if ( HIBYTE(v16) <= 5u )
{
v17 = 54;
if ( _bittest(&v17, HIBYTE(v16)) )
return (unsigned int)a4;
}
v79 = a1;
*(_DWORD *)(a2 + 128) = v16 & 0xFFFFFF | 0x1000000;
*(_DWORD *)(a2 + 132) = a4;
*(_DWORD *)(a2 + 136) = a4;
v18 = a4 + 1;
*(_QWORD *)(a2 + 144) = *a3;
*a3 = a2;
if ( *(int *)(a2 + 32) <= 0 )
{
LABEL_16:
v78 = v18;
v72 = a3;
if ( *(int *)(a2 + 48) > 0 )
{
v24 = 24LL;
v25 = 0LL;
do
{
v26 = *(_QWORD *)(a2 + 40);
if ( *(_DWORD *)(v26 + v24 - 8) != 1 )
goto LABEL_24;
v27 = *(unsigned int *)(v26 + v24 - 4);
if ( (_DWORD)v27 == 126 )
goto LABEL_24;
v28 = v79;
v29 = js_resolve_export(
v79,
(long long)&v75,
(long long)&v73,
*(_QWORD *)(*(_QWORD *)(a2 + 24) + 16LL * *(int *)(v26 + v24 - 24) + 8),
v27);
if ( v29 )
{
v30 = v28;
v31 = v29;
js_resolve_export_throw_error(
v30,
v29,
a2,
*(_DWORD *)(v26 + v24),
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14);
v29 = v31;
v32 = 5;
}
else
{
v32 = 0;
}
if ( !v29 )
LABEL_24:
v32 = 0;
if ( v32 )
return 0xFFFFFFFFLL;
++v25;
v24 += 32LL;
}
while ( v25 < *(int *)(a2 + 48) );
}
if ( *(_QWORD *)(a2 + 120) )
goto LABEL_28;
v77 = *(_QWORD *)(*(_QWORD *)(a2 + 104) + 56LL);
v35 = v79;
if ( *(int *)(a2 + 80) <= 0 )
{
LABEL_55:
if ( *(int *)(a2 + 48) > 0 )
{
v62 = 16LL;
v63 = 0LL;
v64 = v77;
do
{
v65 = *(_QWORD *)(a2 + 40);
if ( !*(_DWORD *)(v65 + v62) )
{
v66 = *(_DWORD **)(v64 + 8LL * *(int *)(v65 + v62 - 16));
++*v66;
*(_QWORD *)(v65 + v62 - 8) = v66;
}
++v63;
v62 += 32LL;
}
while ( v63 < *(int *)(a2 + 48) );
}
v67 = *(_QWORD *)(a2 + 104);
v68 = *(_QWORD *)(a2 + 112);
v73.m128_i32[0] = 0;
v73.m128_u64[1] = 3LL;
v70 = (_DWORD *)JS_CallInternal(v35, v67, v68, 1LL, 1LL, 0LL, v73, a8, a9, a10, a11, a12, a13, a14, 0, 3, 0LL, 2u);
result = 0xFFFFFFFFLL;
if ( (_DWORD)v69 == 6 )
return result;
JS_FreeValueRT(*(_QWORD *)(v79 + 24), v70, v69);
LABEL_28:
if ( *(_DWORD *)(a2 + 132) != *(_DWORD *)(a2 + 136) )
return v78;
v33 = v78;
do
{
v34 = *v72;
*v72 = *(_QWORD *)(*v72 + 144);
*(_BYTE *)(v34 + 131) = 2;
}
while ( v34 != a2 );
return v33;
}
v36 = 0LL;
v37 = 0LL;
while ( 1 )
{
v76 = v37;
v38 = *(_QWORD *)(a2 + 24);
v39 = *(_QWORD *)(a2 + 72);
v40 = 16LL * *(int *)(v39 + v36 + 8);
v41 = *(_QWORD *)(v38 + v40 + 8);
v42 = v39;
v43 = *(unsigned int *)(v39 + v36 + 4);
if ( (_DWORD)v43 != 126 )
break;
ModuleNamespace = JS_GetModuleNamespace(
v35,
*(_QWORD *)(v38 + v40 + 8),
*(double *)a7.m128_u64,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14);
if ( (_DWORD)v45 == 6 )
return 0xFFFFFFFFLL;
v46 = *(_QWORD *)(v77 + 8LL * *(int *)(v42 + v36));
v47 = *(_DWORD **)(v46 + 32);
v48 = *(_QWORD *)(v46 + 40);
*(_QWORD *)(v46 + 32) = ModuleNamespace;
*(_QWORD *)(v46 + 40) = v45;
JS_FreeValueRT(*(_QWORD *)(v35 + 24), v47, v48);
v49 = v76;
LABEL_50:
v37 = v49 + 1;
v36 += 12LL;
if ( v37 >= *(int *)(a2 + 80) )
goto LABEL_55;
}
v50 = js_resolve_export(v35, (long long)&v75, (long long)&v73, *(_QWORD *)(v38 + v40 + 8), v43);
if ( v50 )
{
js_resolve_export_throw_error(
v35,
v50,
v41,
*(_DWORD *)(v42 + v36 + 4),
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14);
v51 = 5;
v49 = v76;
goto LABEL_49;
}
if ( *(_DWORD *)(v73.m128_u64[0] + 20) != 126 )
{
v56 = *(_DWORD **)(v73.m128_u64[0] + 8);
if ( !v56 )
v56 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(v75 + 104) + 56LL) + 8LL * *(int *)v73.m128_u64[0]);
++*v56;
*(_QWORD *)(v77 + 8LL * *(int *)(v42 + v36)) = v56;
v49 = v76;
goto LABEL_48;
}
v52 = (_DWORD *)JS_GetModuleNamespace(
v35,
*(_QWORD *)(*(_QWORD *)(v75 + 24) + 16LL * *(int *)v73.m128_u64[0] + 8),
*(double *)a7.m128_u64,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14);
v54 = v53;
v51 = 5;
if ( (_DWORD)v53 != 6 )
{
v74 = v52;
module_var = js_create_module_var(v79, 1);
if ( module_var )
{
v59 = *(_DWORD **)(module_var + 32);
v60 = *(_QWORD *)(module_var + 40);
v61 = module_var;
*(_QWORD *)(module_var + 32) = v74;
*(_QWORD *)(module_var + 40) = v54;
JS_FreeValueRT(*(_QWORD *)(v79 + 24), v59, v60);
*(_QWORD *)(v77 + 8LL * *(int *)(v42 + v36)) = v61;
v51 = 0;
v55 = 1;
LABEL_43:
v49 = v76;
if ( !v55 )
{
LABEL_49:
v57 = v51 == 0;
v35 = v79;
if ( !v57 )
return 0xFFFFFFFFLL;
goto LABEL_50;
}
LABEL_48:
v51 = 0;
goto LABEL_49;
}
JS_FreeValueRT(*(_QWORD *)(v79 + 24), v74, v54);
}
v55 = 0;
goto LABEL_43;
}
v19 = 8LL;
v20 = 0LL;
while ( 1 )
{
v21 = *(_QWORD *)(*(_QWORD *)(a2 + 24) + v19);
v22 = a3;
v18 = js_inner_module_linking(v79, v21, a3, (unsigned int)v18);
result = 0xFFFFFFFFLL;
if ( v18 < 0 )
return result;
if ( *(unsigned __int8 *)(v21 + 131) << 24 == 0x1000000 )
{
v23 = *(_DWORD *)(v21 + 136);
if ( *(_DWORD *)(a2 + 136) < v23 )
v23 = *(_DWORD *)(a2 + 136);
*(_DWORD *)(a2 + 136) = v23;
}
a3 = v22;
++v20;
v19 += 16LL;
if ( v20 >= *(int *)(a2 + 32) )
goto LABEL_16;
}
}
| js_inner_module_linking:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RAX,qword ptr [RDI + 0x18]
CMP qword ptr [RAX + 0xe8],RBP
JBE 0x00144650
LEA RSI,[0x19efd6]
XOR EAX,EAX
CALL 0x00120add
LAB_00144649:
MOV EAX,0xffffffff
JMP 0x00144673
LAB_00144650:
MOV R8D,ECX
MOV R15,RSI
MOV EAX,dword ptr [RSI + 0x80]
MOV ECX,EAX
SHR ECX,0x18
CMP ECX,0x5
JA 0x00144682
MOV ESI,0x36
BT ESI,ECX
JNC 0x00144682
MOV EAX,R8D
LAB_00144673:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00144682:
MOV qword ptr [RBP + -0x30],RDI
AND EAX,0xffffff
OR EAX,0x1000000
MOV dword ptr [R15 + 0x80],EAX
MOV dword ptr [R15 + 0x84],R8D
MOV dword ptr [R15 + 0x88],R8D
INC R8D
MOV RAX,qword ptr [RDX]
MOV qword ptr [R15 + 0x90],RAX
MOV qword ptr [RDX],R15
CMP dword ptr [R15 + 0x20],0x0
JLE 0x00144735
MOV R14D,0x8
XOR R12D,R12D
LAB_001446c5:
MOV RAX,qword ptr [R15 + 0x18]
MOV R13,qword ptr [RAX + R14*0x1]
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R13
MOV RBX,RDX
MOV ECX,R8D
CALL 0x0014461d
MOV R8D,EAX
MOV EAX,0xffffffff
TEST R8D,R8D
JS 0x00144673
MOVZX ECX,byte ptr [R13 + 0x83]
SHL ECX,0x18
CMP ECX,0x1000000
JNZ 0x00144719
MOV ECX,dword ptr [R15 + 0x88]
MOV EDX,dword ptr [R13 + 0x88]
CMP ECX,EDX
CMOVL EDX,ECX
MOV dword ptr [R15 + 0x88],EDX
LAB_00144719:
TEST R8D,R8D
JS 0x00144673
MOV RDX,RBX
INC R12
MOVSXD RAX,dword ptr [R15 + 0x20]
ADD R14,0x10
CMP R12,RAX
JL 0x001446c5
LAB_00144735:
MOV dword ptr [RBP + -0x34],R8D
MOV qword ptr [RBP + -0x70],RDX
CMP dword ptr [R15 + 0x30],0x0
JLE 0x001447cf
MOV R14D,0x18
XOR R12D,R12D
LAB_00144751:
MOV R13,qword ptr [R15 + 0x28]
CMP dword ptr [R13 + R14*0x1 + -0x8],0x1
JNZ 0x001447b5
MOV R8D,dword ptr [R13 + R14*0x1 + -0x4]
CMP R8D,0x7e
JZ 0x001447b5
MOV RAX,qword ptr [R15 + 0x18]
MOVSXD RCX,dword ptr [R13 + R14*0x1 + -0x18]
SHL RCX,0x4
MOV RCX,qword ptr [RAX + RCX*0x1 + 0x8]
MOV RBX,qword ptr [RBP + -0x30]
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
LEA RDX,[RBP + -0x68]
CALL 0x0014377e
TEST EAX,EAX
JZ 0x001447af
MOV ECX,dword ptr [R13 + R14*0x1]
MOV RDI,RBX
MOV EBX,EAX
MOV ESI,EAX
MOV RDX,R15
CALL 0x001437e9
MOV EAX,EBX
MOV ECX,0x5
JMP 0x001447b1
LAB_001447af:
XOR ECX,ECX
LAB_001447b1:
TEST EAX,EAX
JNZ 0x001447b7
LAB_001447b5:
XOR ECX,ECX
LAB_001447b7:
TEST ECX,ECX
JNZ 0x00144649
INC R12
MOVSXD RAX,dword ptr [R15 + 0x30]
ADD R14,0x20
CMP R12,RAX
JL 0x00144751
LAB_001447cf:
CMP qword ptr [R15 + 0x78],0x0
JZ 0x00144815
LAB_001447d6:
MOV EAX,dword ptr [R15 + 0x84]
CMP EAX,dword ptr [R15 + 0x88]
MOV RDX,qword ptr [RBP + -0x70]
JNZ 0x0014480d
MOV ESI,dword ptr [RBP + -0x34]
LAB_001447ed:
MOV RAX,qword ptr [RDX]
MOV RCX,qword ptr [RAX + 0x90]
MOV qword ptr [RDX],RCX
MOV byte ptr [RAX + 0x83],0x2
CMP RAX,R15
JNZ 0x001447ed
MOV EAX,ESI
JMP 0x00144673
LAB_0014480d:
MOV EAX,dword ptr [RBP + -0x34]
JMP 0x00144673
LAB_00144815:
MOV RAX,qword ptr [R15 + 0x68]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x40],RAX
CMP dword ptr [R15 + 0x50],0x0
MOV R12,qword ptr [RBP + -0x30]
JLE 0x001449d6
XOR R14D,R14D
XOR ECX,ECX
LAB_00144835:
MOV qword ptr [RBP + -0x48],RCX
MOV RAX,qword ptr [R15 + 0x18]
MOV RDX,qword ptr [R15 + 0x48]
MOVSXD RCX,dword ptr [RDX + R14*0x1 + 0x8]
SHL RCX,0x4
MOV R13,qword ptr [RAX + RCX*0x1 + 0x8]
MOV RBX,RDX
MOV R8D,dword ptr [RDX + R14*0x1 + 0x4]
MOV RDI,R12
CMP R8D,0x7e
JNZ 0x001448a3
MOV RSI,R13
CALL 0x00130af7
CMP EDX,0x6
JZ 0x00144649
MOVSXD RCX,dword ptr [RBX + R14*0x1]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RSI + RCX*0x8]
MOV RSI,qword ptr [RDI + 0x20]
MOV RCX,qword ptr [RDI + 0x28]
MOV qword ptr [RDI + 0x20],RAX
MOV qword ptr [RDI + 0x28],RDX
MOV RDI,qword ptr [R12 + 0x18]
MOV RDX,RCX
CALL 0x0011d8c6
MOV RCX,qword ptr [RBP + -0x48]
JMP 0x00144954
LAB_001448a3:
LEA RSI,[RBP + -0x50]
LEA RDX,[RBP + -0x68]
MOV RCX,R13
CALL 0x0014377e
TEST EAX,EAX
JZ 0x001448d5
MOV ECX,dword ptr [RBX + R14*0x1 + 0x4]
MOV RDI,R12
MOV ESI,EAX
MOV RDX,R13
CALL 0x001437e9
MOV R12D,0x5
MOV RCX,qword ptr [RBP + -0x48]
JMP 0x00144947
LAB_001448d5:
MOV RAX,qword ptr [RBP + -0x68]
CMP dword ptr [RAX + 0x14],0x7e
JNZ 0x00144916
MOV RCX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RCX + 0x18]
MOVSXD RAX,dword ptr [RAX]
SHL RAX,0x4
MOV RSI,qword ptr [RCX + RAX*0x1 + 0x8]
MOV RDI,R12
CALL 0x00130af7
MOV R13,RDX
MOV R12D,0x5
CMP R13D,0x6
JNZ 0x0014496a
LAB_0014490a:
XOR EAX,EAX
LAB_0014490c:
TEST AL,AL
MOV RCX,qword ptr [RBP + -0x48]
JNZ 0x00144944
JMP 0x00144947
LAB_00144916:
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JNZ 0x00144932
MOV RCX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RCX + 0x68]
MOV RCX,qword ptr [RCX + 0x38]
MOVSXD RAX,dword ptr [RAX]
MOV RCX,qword ptr [RCX + RAX*0x8]
LAB_00144932:
INC dword ptr [RCX]
MOVSXD RAX,dword ptr [RBX + R14*0x1]
MOV RDX,qword ptr [RBP + -0x40]
MOV qword ptr [RDX + RAX*0x8],RCX
MOV RCX,qword ptr [RBP + -0x48]
LAB_00144944:
XOR R12D,R12D
LAB_00144947:
TEST R12D,R12D
MOV R12,qword ptr [RBP + -0x30]
JNZ 0x00144649
LAB_00144954:
INC RCX
MOVSXD RAX,dword ptr [R15 + 0x50]
ADD R14,0xc
CMP RCX,RAX
JL 0x00144835
JMP 0x001449d6
LAB_0014496a:
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,0x1
CALL 0x0011103b
TEST RAX,RAX
JZ 0x001449bd
MOV RSI,qword ptr [RAX + 0x20]
MOV RDX,qword ptr [RAX + 0x28]
MOV R12,RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [R12 + 0x20],RAX
MOV qword ptr [R12 + 0x28],R13
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0011d8c6
MOVSXD RAX,dword ptr [RBX + R14*0x1]
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RCX + RAX*0x8],R12
XOR R12D,R12D
MOV AL,0x1
JMP 0x0014490c
LAB_001449bd:
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,R13
CALL 0x0011d8c6
JMP 0x0014490a
LAB_001449d6:
CMP dword ptr [R15 + 0x30],0x0
JLE 0x00144a12
MOV EAX,0x10
XOR ECX,ECX
MOV RDI,qword ptr [RBP + -0x40]
LAB_001449e8:
MOV RDX,qword ptr [R15 + 0x28]
CMP dword ptr [RDX + RAX*0x1],0x0
JNZ 0x00144a02
MOVSXD RSI,dword ptr [RDX + RAX*0x1 + -0x10]
MOV RSI,qword ptr [RDI + RSI*0x8]
INC dword ptr [RSI]
MOV qword ptr [RDX + RAX*0x1 + -0x8],RSI
LAB_00144a02:
INC RCX
MOVSXD RDX,dword ptr [R15 + 0x30]
ADD RAX,0x20
CMP RCX,RDX
JL 0x001449e8
LAB_00144a12:
MOV RSI,qword ptr [R15 + 0x68]
MOV RDX,qword ptr [R15 + 0x70]
MOV dword ptr [RBP + -0x68],0x0
MOV qword ptr [RBP + -0x60],0x3
MOVUPS XMM0,xmmword ptr [RBP + -0x68]
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x18],0x2
MOV qword ptr [RSP + 0x10],0x0
MOV ECX,0x1
MOV R8D,0x1
MOV RDI,R12
XOR R9D,R9D
CALL 0x001284ca
MOV RSI,RAX
MOV EAX,0xffffffff
CMP EDX,0x6
JZ 0x00144673
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0011d8c6
JMP 0x001447d6
|
int js_inner_module_linking(long param_1,long param_2,long *param_3,int param_4)
{
long lVar1;
int8 uVar2;
int8 uVar3;
int *piVar4;
bool bVar5;
int iVar6;
uint uVar7;
int *piVar8;
long lVar9;
long lVar10;
long lVar11;
int1 auVar12 [12];
int1 auVar13 [16];
int4 local_70;
int4 uStack_6c;
int8 uStack_68;
int8 local_60;
long local_58;
long local_50;
long local_48;
int local_3c;
long local_38;
if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) {
JS_ThrowRangeError(param_1,"Maximum call stack size exceeded");
LAB_00144649:
local_3c = -1;
}
else {
uVar7 = *(uint *)(param_2 + 0x80) >> 0x18;
if ((5 < uVar7) || (local_3c = param_4, (0x36U >> (uVar7 & 0x1f) & 1) == 0)) {
*(uint *)(param_2 + 0x80) = *(uint *)(param_2 + 0x80) & 0xffffff | 0x1000000;
*(int *)(param_2 + 0x84) = param_4;
*(int *)(param_2 + 0x88) = param_4;
param_4 = param_4 + 1;
*(long *)(param_2 + 0x90) = *param_3;
*param_3 = param_2;
local_38 = param_1;
if (0 < *(int *)(param_2 + 0x20)) {
lVar10 = 8;
lVar9 = 0;
do {
lVar11 = *(long *)(*(long *)(param_2 + 0x18) + lVar10);
param_4 = js_inner_module_linking(local_38,lVar11,param_3,param_4);
if (param_4 < 0) {
return -1;
}
if (*(char *)(lVar11 + 0x83) == '\x01') {
iVar6 = *(int *)(lVar11 + 0x88);
if (*(int *)(param_2 + 0x88) < *(int *)(lVar11 + 0x88)) {
iVar6 = *(int *)(param_2 + 0x88);
}
*(int *)(param_2 + 0x88) = iVar6;
}
if (param_4 < 0) {
return -1;
}
lVar9 = lVar9 + 1;
lVar10 = lVar10 + 0x10;
} while (lVar9 < *(int *)(param_2 + 0x20));
}
local_3c = param_4;
if (0 < *(int *)(param_2 + 0x30)) {
lVar10 = 0x18;
lVar9 = 0;
do {
lVar1 = local_38;
lVar11 = *(long *)(param_2 + 0x28);
if (((*(int *)(lVar11 + -8 + lVar10) == 1) && (*(int *)(lVar11 + -4 + lVar10) != 0x7e)) &&
(iVar6 = js_resolve_export(local_38,&local_58,&local_70), iVar6 != 0)) {
js_resolve_export_throw_error(lVar1,iVar6,param_2,*(int4 *)(lVar11 + lVar10));
iVar6 = 5;
}
else {
iVar6 = 0;
}
if (iVar6 != 0) goto LAB_00144649;
lVar9 = lVar9 + 1;
lVar10 = lVar10 + 0x20;
} while (lVar9 < *(int *)(param_2 + 0x30));
}
if (*(long *)(param_2 + 0x78) == 0) {
local_48 = *(long *)(*(long *)(param_2 + 0x68) + 0x38);
lVar9 = local_38;
if (0 < *(int *)(param_2 + 0x50)) {
lVar11 = 0;
lVar10 = 0;
do {
lVar1 = *(long *)(param_2 + 0x48);
uVar2 = *(int8 *)
(*(long *)(param_2 + 0x18) + 8 + (long)*(int *)(lVar1 + 8 + lVar11) * 0x10);
local_50 = lVar10;
if (*(int *)(lVar1 + 4 + lVar11) == 0x7e) {
auVar13 = JS_GetModuleNamespace(lVar9,uVar2);
if (auVar13._8_4_ == 6) goto LAB_00144649;
lVar10 = *(long *)(local_48 + (long)*(int *)(lVar1 + lVar11) * 8);
uVar2 = *(int8 *)(lVar10 + 0x20);
*(int1 (*) [16])(lVar10 + 0x20) = auVar13;
JS_FreeValueRT(*(int8 *)(lVar9 + 0x18),uVar2,*(int8 *)(lVar10 + 0x28));
}
else {
iVar6 = js_resolve_export(lVar9,&local_58,&local_70,uVar2);
if (iVar6 == 0) {
piVar4 = (int *)CONCAT44(uStack_6c,local_70);
if (piVar4[5] == 0x7e) {
auVar13 = JS_GetModuleNamespace
(lVar9,*(int8 *)
(*(long *)(local_58 + 0x18) + 8 + (long)*piVar4 * 0x10
));
iVar6 = 5;
if (auVar13._8_4_ == 6) {
LAB_0014490a:
bVar5 = false;
}
else {
local_60 = auVar13._0_8_;
lVar9 = js_create_module_var(local_38,1);
if (lVar9 == 0) {
JS_FreeValueRT(*(int8 *)(local_38 + 0x18),local_60,auVar13._8_8_);
goto LAB_0014490a;
}
uVar2 = *(int8 *)(lVar9 + 0x20);
uVar3 = *(int8 *)(lVar9 + 0x28);
*(int8 *)(lVar9 + 0x20) = local_60;
*(long *)(lVar9 + 0x28) = auVar13._8_8_;
JS_FreeValueRT(*(int8 *)(local_38 + 0x18),uVar2,uVar3);
*(long *)(local_48 + (long)*(int *)(lVar1 + lVar11) * 8) = lVar9;
iVar6 = 0;
bVar5 = true;
}
if (!bVar5) goto LAB_00144947;
}
else {
piVar8 = *(int **)(piVar4 + 2);
if (piVar8 == (int *)0x0) {
piVar8 = *(int **)(*(long *)(*(long *)(local_58 + 0x68) + 0x38) +
(long)*piVar4 * 8);
}
*piVar8 = *piVar8 + 1;
*(int **)(local_48 + (long)*(int *)(lVar1 + lVar11) * 8) = piVar8;
}
iVar6 = 0;
}
else {
js_resolve_export_throw_error(lVar9,iVar6,uVar2,*(int4 *)(lVar1 + 4 + lVar11))
;
iVar6 = 5;
}
LAB_00144947:
lVar9 = local_38;
if (iVar6 != 0) goto LAB_00144649;
}
lVar10 = local_50 + 1;
lVar11 = lVar11 + 0xc;
} while (lVar10 < *(int *)(param_2 + 0x50));
}
if (0 < *(int *)(param_2 + 0x30)) {
lVar10 = 0x10;
lVar11 = 0;
do {
lVar1 = *(long *)(param_2 + 0x28);
if (*(int *)(lVar1 + lVar10) == 0) {
piVar4 = *(int **)(local_48 + (long)*(int *)(lVar1 + -0x10 + lVar10) * 8);
*piVar4 = *piVar4 + 1;
*(int **)(lVar1 + -8 + lVar10) = piVar4;
}
lVar11 = lVar11 + 1;
lVar10 = lVar10 + 0x20;
} while (lVar11 < *(int *)(param_2 + 0x30));
}
local_70 = 0;
uStack_68 = 3;
auVar12 = JS_CallInternal(lVar9,*(int8 *)(param_2 + 0x68),
*(int8 *)(param_2 + 0x70),1,1,0,0,3,0,2);
if (auVar12._8_4_ == 6) {
return -1;
}
JS_FreeValueRT(*(int8 *)(local_38 + 0x18),auVar12._0_8_);
}
if (*(int *)(param_2 + 0x84) == *(int *)(param_2 + 0x88)) {
do {
lVar9 = *param_3;
*param_3 = *(long *)(lVar9 + 0x90);
*(int1 *)(lVar9 + 0x83) = 2;
} while (lVar9 != param_2);
}
}
}
return local_3c;
}
| |
32,598 | Cache::log2i(unsigned int) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp | uint32_t Cache::log2i(uint32_t val) {
if (val == 0)
return uint32_t(-1);
if (val == 1)
return 0;
uint32_t ret = 0;
while (val > 1) {
val >>= 1;
ret++;
}
return ret;
} | O1 | cpp | Cache::log2i(unsigned int):
testl %esi, %esi
je 0x4ea8
xorl %eax, %eax
cmpl $0x1, %esi
je 0x4ea7
cmpl $0x2, %esi
jb 0x4ea7
xorl %eax, %eax
movl %esi, %ecx
shrl %ecx
incl %eax
cmpl $0x3, %esi
movl %ecx, %esi
ja 0x4e9c
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
retq
| _ZN5Cache5log2iEj:
test esi, esi
jz short loc_4EA8
xor eax, eax
cmp esi, 1
jz short locret_4EA7
cmp esi, 2
jb short locret_4EA7
xor eax, eax
mov ecx, esi
loc_4E9C:
shr ecx, 1
inc eax
cmp esi, 3
mov esi, ecx
ja short loc_4E9C
locret_4EA7:
retn
loc_4EA8:
mov eax, 0FFFFFFFFh
retn
| long long Cache::log2i(Cache *this, unsigned int a2)
{
long long result; // rax
unsigned int v3; // ecx
bool v4; // cc
if ( !a2 )
return 0xFFFFFFFFLL;
result = 0LL;
if ( a2 != 1 )
{
LODWORD(result) = 0;
v3 = a2;
do
{
v3 >>= 1;
result = (unsigned int)(result + 1);
v4 = a2 <= 3;
a2 = v3;
}
while ( !v4 );
}
return result;
}
| log2i:
TEST ESI,ESI
JZ 0x00104ea8
XOR EAX,EAX
CMP ESI,0x1
JZ 0x00104ea7
CMP ESI,0x2
JC 0x00104ea7
XOR EAX,EAX
MOV ECX,ESI
LAB_00104e9c:
SHR ECX,0x1
INC EAX
CMP ESI,0x3
MOV ESI,ECX
JA 0x00104e9c
LAB_00104ea7:
RET
LAB_00104ea8:
MOV EAX,0xffffffff
RET
|
/* Cache::log2i(unsigned int) */
int __thiscall Cache::log2i(Cache *this,uint param_1)
{
bool bVar1;
int iVar2;
if (param_1 != 0) {
iVar2 = 0;
if ((param_1 != 1) && (1 < param_1)) {
iVar2 = 0;
do {
iVar2 = iVar2 + 1;
bVar1 = 3 < param_1;
param_1 = param_1 >> 1;
} while (bVar1);
}
return iVar2;
}
return -1;
}
| |
32,599 | Cache::log2i(unsigned int) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp | uint32_t Cache::log2i(uint32_t val) {
if (val == 0)
return uint32_t(-1);
if (val == 1)
return 0;
uint32_t ret = 0;
while (val > 1) {
val >>= 1;
ret++;
}
return ret;
} | O3 | cpp | Cache::log2i(unsigned int):
testl %esi, %esi
je 0x4dc7
xorl %eax, %eax
cmpl $0x1, %esi
je 0x4dc6
movl %esi, %ecx
shrl %ecx
incl %eax
cmpl $0x3, %esi
movl %ecx, %esi
ja 0x4dbb
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
retq
nop
| _ZN5Cache5log2iEj:
test esi, esi
jz short loc_4DC7
xor eax, eax
cmp esi, 1
jz short locret_4DC6
mov ecx, esi
loc_4DBB:
shr ecx, 1
inc eax
cmp esi, 3
mov esi, ecx
ja short loc_4DBB
locret_4DC6:
retn
loc_4DC7:
mov eax, 0FFFFFFFFh
retn
| long long Cache::log2i(Cache *this, unsigned int a2)
{
long long result; // rax
unsigned int v3; // ecx
bool v4; // cc
if ( !a2 )
return 0xFFFFFFFFLL;
result = 0LL;
if ( a2 != 1 )
{
v3 = a2;
do
{
v3 >>= 1;
result = (unsigned int)(result + 1);
v4 = a2 <= 3;
a2 = v3;
}
while ( !v4 );
}
return result;
}
| log2i:
TEST ESI,ESI
JZ 0x00104dc7
XOR EAX,EAX
CMP ESI,0x1
JZ 0x00104dc6
MOV ECX,ESI
LAB_00104dbb:
SHR ECX,0x1
INC EAX
CMP ESI,0x3
MOV ESI,ECX
JA 0x00104dbb
LAB_00104dc6:
RET
LAB_00104dc7:
MOV EAX,0xffffffff
RET
|
/* Cache::log2i(unsigned int) */
int __thiscall Cache::log2i(Cache *this,uint param_1)
{
bool bVar1;
int iVar2;
if (param_1 == 0) {
return -1;
}
iVar2 = 0;
if (param_1 != 1) {
do {
iVar2 = iVar2 + 1;
bVar1 = 3 < param_1;
param_1 = param_1 >> 1;
} while (bVar1);
}
return iVar2;
}
|
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.