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
|
---|---|---|---|---|---|---|---|---|---|---|---|
5,900 | JS_EvalFunctionInternal | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_EvalFunctionInternal(JSContext *ctx, JSValue fun_obj,
JSValue this_obj,
JSVarRef **var_refs, JSStackFrame *sf)
{
JSValue ret_val;
uint32_t tag;
tag = JS_VALUE_GET_TAG(fun_obj);
if (tag == JS_TAG_FUNCTION_BYTECODE) {
fun_obj = js_closure(ctx, fun_obj, var_refs, sf);
ret_val = JS_CallFree(ctx, fun_obj, this_obj, 0, NULL);
} else if (tag == JS_TAG_MODULE) {
JSModuleDef *m;
m = JS_VALUE_GET_PTR(fun_obj);
/* the module refcount should be >= 2 */
JS_FreeValue(ctx, fun_obj);
if (js_create_module_function(ctx, m) < 0)
goto fail;
if (js_link_module(ctx, m) < 0)
goto fail;
ret_val = js_evaluate_module(ctx, m);
if (JS_IsException(ret_val)) {
fail:
return JS_EXCEPTION;
}
} else {
JS_FreeValue(ctx, fun_obj);
ret_val = JS_ThrowTypeError(ctx, "bytecode function expected");
}
return ret_val;
} | O1 | c | JS_EvalFunctionInternal:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movq %rsi, 0x30(%rsp)
cmpl $-0x3, %edx
je 0x3065d
cmpl $-0x2, %edx
jne 0x306b8
movq %r8, %r14
movq %rcx, %r15
movq 0x80(%rsp), %r8
movq %rbx, %rdi
movq %r9, %rcx
callq 0x3e3ca
movq %rax, 0x30(%rsp)
movq $0x0, (%rsp)
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rcx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x22089
movq %rax, %r14
jmp 0x308de
movq 0x30(%rsp), %r14
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x1ccb2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x43837
testl %eax, %eax
js 0x307b7
leaq 0x20(%rsp), %rdx
movq $0x0, (%rdx)
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x43a09
testl %eax, %eax
jns 0x306e7
movq 0x20(%rsp), %rcx
testq %rcx, %rcx
je 0x306df
movb $0x0, 0x83(%rcx)
movq 0x90(%rcx), %rcx
jmp 0x306a3
movq 0x18(%rbx), %rdi
callq 0x1ccb2
leaq 0x6da2d(%rip), %rsi # 0x9e0f5
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21953
movl $0x6, %edx
jmp 0x308de
testl %eax, %eax
js 0x307b7
movl $0xfe000000, %eax # imm = 0xFE000000
andl 0x80(%r14), %eax
cmpl $0x4000000, %eax # imm = 0x4000000
jne 0x30701
movq 0xb8(%r14), %r14
movq 0xc8(%r14), %rax
cmpl $0x3, %eax
jne 0x307be
leaq 0xd0(%r14), %rsi
xorl %r15d, %r15d
movl $0x3, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x356a2
movq %rax, 0xc0(%r14)
movq %rdx, 0xc8(%r14)
movl $0x6, %eax
movl $0x0, %esi
cmpl $0x6, %edx
je 0x308c0
leaq 0x38(%rsp), %rcx
movq $0x0, (%rcx)
leaq 0x40(%rsp), %r8
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x43e67
testl %eax, %eax
js 0x307ca
cmpl $0x0, 0xac(%r14)
jne 0x30894
xorl %eax, %eax
leaq 0x50(%rsp), %rcx
movl %eax, (%rcx)
movl $0x3, %edi
movq %rdi, 0x8(%rcx)
movq 0xd0(%r14), %rsi
movq 0xd8(%r14), %rdx
movl %eax, 0x20(%rsp)
movq %rdi, 0x28(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rcx, 0x10(%rsp)
jmp 0x3086a
xorl %edx, %edx
jmp 0x308cc
movq 0xc0(%r14), %r15
jmp 0x308a2
movq 0x38(%rsp), %rax
testq %rax, %rax
je 0x3081e
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %rdx
movb $0x5, 0x83(%rax)
movb $0x1, 0xf0(%rax)
movq %rcx, 0x20(%rsp)
cmpl $-0x9, %edx
jb 0x307fd
movq 0x20(%rsp), %rsi
incl (%rsi)
movq %rcx, 0xf8(%rax)
movq %rdx, 0x100(%rax)
movq %r14, 0xb8(%rax)
movq 0x90(%rax), %rax
testq %rax, %rax
jne 0x307de
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
leaq 0xf8(%r14), %rax
movq 0xe0(%r14), %rsi
movq 0xe8(%r14), %rdx
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %rbx, %rdi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x278b6
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x1ccb2
movq 0xc0(%r14), %r15
movq 0xc8(%r14), %rax
movq %r15, 0x20(%rsp)
cmpl $-0x9, %eax
jb 0x308b3
movq 0x20(%rsp), %rcx
incl (%rcx)
movabsq $-0x100000000, %rsi # imm = 0xFFFFFFFF00000000
andq %r15, %rsi
movl %r15d, %ecx
orq %rsi, %rcx
cmpl $0x6, %eax
setne %dl
xorl %r14d, %r14d
testb %dl, %dl
movl $0x6, %edx
cmovneq %rax, %rdx
cmovneq %rcx, %r14
movq %r14, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
| JS_EvalFunctionInternal:
push r15
push r14
push rbx
sub rsp, 60h
mov rbx, rdi
mov [rsp+78h+var_48], rsi
cmp edx, 0FFFFFFFDh
jz short loc_3065D
cmp edx, 0FFFFFFFEh
jnz loc_306B8
mov r14, r8
mov r15, rcx
mov r8, [rsp+78h+arg_0]
mov rdi, rbx
mov rcx, r9
call js_closure
mov [rsp+78h+var_48], rax
mov qword ptr [rsp+78h+var_78], 0
mov rdi, rbx
mov rsi, rax
mov rcx, r15
mov r8, r14
xor r9d, r9d
call JS_CallFree
mov r14, rax
jmp loc_308DE
loc_3065D:
mov r14, [rsp+78h+var_48]
mov rdi, [rbx+18h]
mov rsi, r14
call JS_FreeValueRT
mov rdi, rbx
mov rsi, r14
call js_create_module_function
test eax, eax
js loc_307B7
lea rdx, [rsp+78h+var_58]
mov qword ptr [rdx], 0
mov rdi, rbx
mov rsi, r14
xor ecx, ecx
call js_inner_module_linking
test eax, eax
jns short loc_306E7
mov rcx, qword ptr [rsp+78h+var_58]
loc_306A3:
test rcx, rcx
jz short loc_306DF
mov byte ptr [rcx+83h], 0
mov rcx, [rcx+90h]
jmp short loc_306A3
loc_306B8:
mov rdi, [rbx+18h]
call JS_FreeValueRT
lea rsi, aBytecodeFuncti_0; "bytecode function expected"
xor r14d, r14d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
jmp loc_308DE
loc_306DF:
test eax, eax
js loc_307B7
loc_306E7:
mov eax, 0FE000000h
and eax, [r14+80h]
cmp eax, 4000000h
jnz short loc_30701
mov r14, [r14+0B8h]
loc_30701:
mov rax, [r14+0C8h]
cmp eax, 3
jnz loc_307BE
lea rsi, [r14+0D0h]
xor r15d, r15d
mov ecx, 3
mov rdi, rbx
xor edx, edx
call js_new_promise_capability
mov [r14+0C0h], rax
mov [r14+0C8h], rdx
mov eax, 6
mov esi, 0
cmp edx, 6
jz loc_308C0
lea rcx, [rsp+78h+var_40]
mov qword ptr [rcx], 0
lea r8, [rsp+78h+var_38]
mov rdi, rbx
mov rsi, r14
xor edx, edx
call js_inner_module_evaluation
test eax, eax
js short loc_307CA
cmp dword ptr [r14+0ACh], 0
jnz loc_30894
xor eax, eax
lea rcx, [rsp+78h+var_28]
mov [rcx], eax
mov edi, 3
mov [rcx+8], rdi
mov rsi, [r14+0D0h]
mov rdx, [r14+0D8h]
mov dword ptr [rsp+78h+var_58], eax
mov qword ptr [rsp+78h+var_58+8], rdi
movups xmm0, [rsp+78h+var_58]
movups [rsp+78h+var_78], xmm0
mov [rsp+78h+var_68], rcx
jmp loc_3086A
loc_307B7:
xor edx, edx
jmp loc_308CC
loc_307BE:
mov r15, [r14+0C0h]
jmp loc_308A2
loc_307CA:
mov rax, [rsp+78h+var_40]
test rax, rax
jz short loc_3081E
mov rcx, [rsp+78h+var_38]
mov rdx, [rsp+78h+var_30]
loc_307DE:
mov byte ptr [rax+83h], 5
mov byte ptr [rax+0F0h], 1
mov qword ptr [rsp+78h+var_58], rcx
cmp edx, 0FFFFFFF7h
jb short loc_307FD
mov rsi, qword ptr [rsp+78h+var_58]
inc dword ptr [rsi]
loc_307FD:
mov [rax+0F8h], rcx
mov [rax+100h], rdx
mov [rax+0B8h], r14
mov rax, [rax+90h]
test rax, rax
jnz short loc_307DE
loc_3081E:
mov [rsp+78h+var_40], rax
mov rsi, [rsp+78h+var_38]
mov rdx, [rsp+78h+var_30]
mov rdi, [rbx+18h]
call JS_FreeValueRT
lea rax, [r14+0F8h]
mov rsi, [r14+0E0h]
mov rdx, [r14+0E8h]
mov dword ptr [rsp+78h+var_58], 0
mov qword ptr [rsp+78h+var_58+8], 3
movups xmm0, [rsp+78h+var_58]
movups [rsp+78h+var_78], xmm0
mov [rsp+78h+var_68], rax
loc_3086A:
mov [rsp+78h+var_60], 2
mov r8d, 3
mov rdi, rbx
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
mov rdi, [rbx+18h]
mov rsi, rax
call JS_FreeValueRT
loc_30894:
mov r15, [r14+0C0h]
mov rax, [r14+0C8h]
loc_308A2:
mov qword ptr [rsp+78h+var_58], r15
cmp eax, 0FFFFFFF7h
jb short loc_308B3
mov rcx, qword ptr [rsp+78h+var_58]
inc dword ptr [rcx]
loc_308B3:
mov rsi, 0FFFFFFFF00000000h
and rsi, r15
loc_308C0:
mov ecx, r15d
or rcx, rsi
cmp eax, 6
setnz dl
loc_308CC:
xor r14d, r14d
test dl, dl
mov edx, 6
cmovnz rdx, rax
cmovnz r14, rcx
loc_308DE:
mov rax, r14
add rsp, 60h
pop rbx
pop r14
pop r15
retn
| long long JS_EvalFunctionInternal(
long long a1,
_DWORD *a2,
long long a3,
int a4,
int a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14,
long long a15)
{
long long v17; // rdx
long long v18; // r14
_DWORD *v19; // r14
unsigned long long i; // rcx
long long v21; // rdx
long long v22; // rcx
long long v23; // r8
long long v24; // r9
__m128 v25; // xmm4
__m128 v26; // xmm5
long long v27; // rax
unsigned long long v28; // r15
long long v29; // rdx
unsigned long long v30; // rsi
__m128 v31; // xmm4
__m128 v32; // xmm5
long long v33; // rsi
long long v34; // rdx
_DWORD *v35; // rax
long long v36; // rdx
bool v37; // dl
long long v38; // rax
_DWORD *v39; // rcx
long long v40; // rdx
long long v41; // rsi
long long v42; // rdx
__m128 v43; // xmm4
__m128 v44; // xmm5
char v46; // [rsp+0h] [rbp-78h]
__m128 v47; // [rsp+20h] [rbp-58h] BYREF
_DWORD *v48; // [rsp+30h] [rbp-48h]
long long v49; // [rsp+38h] [rbp-40h] BYREF
_DWORD *v50; // [rsp+40h] [rbp-38h] BYREF
long long v51; // [rsp+48h] [rbp-30h]
int v52; // [rsp+50h] [rbp-28h] BYREF
long long v53; // [rsp+58h] [rbp-20h]
v48 = a2;
if ( (_DWORD)a3 != -3 )
{
if ( (_DWORD)a3 == -2 )
{
v48 = (_DWORD *)js_closure(a1, a2, a3, a6, a15);
return JS_CallFree(a1, v48, v17, a4, a5, 0, 0LL);
}
else
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), a2, a3);
v18 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"bytecode function expected",
v21,
v22,
v23,
v24,
a7,
a8,
a9,
a10,
v25,
v26,
a13,
a14,
v46);
}
return v18;
}
v19 = v48;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v48, a3);
if ( (int)js_create_module_function(a1, v48) < 0 )
goto LABEL_18;
v47.m128_u64[0] = 0LL;
if ( (int)js_inner_module_linking(a1, v48, &v47, 0LL) < 0 )
{
for ( i = v47.m128_u64[0]; i; i = *(_QWORD *)(i + 144) )
*(_BYTE *)(i + 131) = 0;
LABEL_18:
v37 = 0;
goto LABEL_32;
}
if ( (v19[32] & 0xFE000000) == 0x4000000 )
v19 = (_DWORD *)*((_QWORD *)v19 + 23);
v27 = *((_QWORD *)v19 + 25);
if ( (_DWORD)v27 != 3 )
{
v28 = *((_QWORD *)v19 + 24);
LABEL_28:
v47.m128_u64[0] = v28;
if ( (unsigned int)v27 >= 0xFFFFFFF7 )
++*(_DWORD *)v47.m128_u64[0];
v30 = v28 & 0xFFFFFFFF00000000LL;
goto LABEL_31;
}
LODWORD(v28) = 0;
*((_QWORD *)v19 + 24) = js_new_promise_capability(a1, v19 + 52, 0LL);
*((_QWORD *)v19 + 25) = v29;
LODWORD(v27) = 6;
v30 = 0LL;
if ( (_DWORD)v29 != 6 )
{
v49 = 0LL;
if ( (int)js_inner_module_evaluation(a1, v19, 0LL, &v49, &v50) < 0 )
{
v38 = v49;
if ( v49 )
{
v39 = v50;
v40 = v51;
do
{
*(_BYTE *)(v38 + 131) = 5;
*(_BYTE *)(v38 + 240) = 1;
v47.m128_u64[0] = (unsigned long long)v39;
if ( (unsigned int)v40 >= 0xFFFFFFF7 )
++*(_DWORD *)v47.m128_u64[0];
*(_QWORD *)(v38 + 248) = v39;
*(_QWORD *)(v38 + 256) = v40;
*(_QWORD *)(v38 + 184) = v19;
v38 = *(_QWORD *)(v38 + 144);
}
while ( v38 );
}
v49 = v38;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v50, v51);
v41 = *((_QWORD *)v19 + 28);
v42 = *((_QWORD *)v19 + 29);
v47.m128_i32[0] = 0;
v47.m128_u64[1] = 3LL;
v35 = (_DWORD *)JS_CallInternal(
a1,
v41,
v42,
0LL,
3LL,
1LL,
v47,
a8,
a9,
a10,
v43,
v44,
a13,
a14,
0,
3,
(long long)(v19 + 62),
2u);
}
else
{
if ( v19[43] )
{
LABEL_27:
v28 = *((_QWORD *)v19 + 24);
v27 = *((_QWORD *)v19 + 25);
goto LABEL_28;
}
v52 = 0;
v53 = 3LL;
v33 = *((_QWORD *)v19 + 26);
v34 = *((_QWORD *)v19 + 27);
v47.m128_i32[0] = 0;
v47.m128_u64[1] = 3LL;
v35 = (_DWORD *)JS_CallInternal(
a1,
v33,
v34,
0LL,
3LL,
1LL,
v47,
a8,
a9,
a10,
v31,
v32,
a13,
a14,
0,
3,
(long long)&v52,
2u);
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v35, v36);
goto LABEL_27;
}
LABEL_31:
i = v30 | (unsigned int)v28;
v37 = (_DWORD)v27 != 6;
LABEL_32:
v18 = 0LL;
if ( v37 )
return i;
return v18;
}
| JS_EvalFunctionInternal:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV RBX,RDI
MOV qword ptr [RSP + 0x30],RSI
CMP EDX,-0x3
JZ 0x0013065d
CMP EDX,-0x2
JNZ 0x001306b8
MOV R14,R8
MOV R15,RCX
MOV R8,qword ptr [RSP + 0x80]
MOV RDI,RBX
MOV RCX,R9
CALL 0x0013e3ca
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP],0x0
MOV RDI,RBX
MOV RSI,RAX
MOV RCX,R15
MOV R8,R14
XOR R9D,R9D
CALL 0x00122089
MOV R14,RAX
JMP 0x001308de
LAB_0013065d:
MOV R14,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
CALL 0x0011ccb2
MOV RDI,RBX
MOV RSI,R14
CALL 0x00143837
TEST EAX,EAX
JS 0x001307b7
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],0x0
MOV RDI,RBX
MOV RSI,R14
XOR ECX,ECX
CALL 0x00143a09
TEST EAX,EAX
JNS 0x001306e7
MOV RCX,qword ptr [RSP + 0x20]
LAB_001306a3:
TEST RCX,RCX
JZ 0x001306df
MOV byte ptr [RCX + 0x83],0x0
MOV RCX,qword ptr [RCX + 0x90]
JMP 0x001306a3
LAB_001306b8:
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
LEA RSI,[0x19e0f5]
XOR R14D,R14D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00121953
MOV EDX,0x6
JMP 0x001308de
LAB_001306df:
TEST EAX,EAX
JS 0x001307b7
LAB_001306e7:
MOV EAX,0xfe000000
AND EAX,dword ptr [R14 + 0x80]
CMP EAX,0x4000000
JNZ 0x00130701
MOV R14,qword ptr [R14 + 0xb8]
LAB_00130701:
MOV RAX,qword ptr [R14 + 0xc8]
CMP EAX,0x3
JNZ 0x001307be
LEA RSI,[R14 + 0xd0]
XOR R15D,R15D
MOV ECX,0x3
MOV RDI,RBX
XOR EDX,EDX
CALL 0x001356a2
MOV qword ptr [R14 + 0xc0],RAX
MOV qword ptr [R14 + 0xc8],RDX
MOV EAX,0x6
MOV ESI,0x0
CMP EDX,0x6
JZ 0x001308c0
LEA RCX,[RSP + 0x38]
MOV qword ptr [RCX],0x0
LEA R8,[RSP + 0x40]
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x00143e67
TEST EAX,EAX
JS 0x001307ca
CMP dword ptr [R14 + 0xac],0x0
JNZ 0x00130894
XOR EAX,EAX
LEA RCX,[RSP + 0x50]
MOV dword ptr [RCX],EAX
MOV EDI,0x3
MOV qword ptr [RCX + 0x8],RDI
MOV RSI,qword ptr [R14 + 0xd0]
MOV RDX,qword ptr [R14 + 0xd8]
MOV dword ptr [RSP + 0x20],EAX
MOV qword ptr [RSP + 0x28],RDI
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],RCX
JMP 0x0013086a
LAB_001307b7:
XOR EDX,EDX
JMP 0x001308cc
LAB_001307be:
MOV R15,qword ptr [R14 + 0xc0]
JMP 0x001308a2
LAB_001307ca:
MOV RAX,qword ptr [RSP + 0x38]
TEST RAX,RAX
JZ 0x0013081e
MOV RCX,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
LAB_001307de:
MOV byte ptr [RAX + 0x83],0x5
MOV byte ptr [RAX + 0xf0],0x1
MOV qword ptr [RSP + 0x20],RCX
CMP EDX,-0x9
JC 0x001307fd
MOV RSI,qword ptr [RSP + 0x20]
INC dword ptr [RSI]
LAB_001307fd:
MOV qword ptr [RAX + 0xf8],RCX
MOV qword ptr [RAX + 0x100],RDX
MOV qword ptr [RAX + 0xb8],R14
MOV RAX,qword ptr [RAX + 0x90]
TEST RAX,RAX
JNZ 0x001307de
LAB_0013081e:
MOV qword ptr [RSP + 0x38],RAX
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
LEA RAX,[R14 + 0xf8]
MOV RSI,qword ptr [R14 + 0xe0]
MOV RDX,qword ptr [R14 + 0xe8]
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],RAX
LAB_0013086a:
MOV dword ptr [RSP + 0x18],0x2
MOV R8D,0x3
MOV RDI,RBX
XOR ECX,ECX
MOV R9D,0x1
CALL 0x001278b6
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RAX
CALL 0x0011ccb2
LAB_00130894:
MOV R15,qword ptr [R14 + 0xc0]
MOV RAX,qword ptr [R14 + 0xc8]
LAB_001308a2:
MOV qword ptr [RSP + 0x20],R15
CMP EAX,-0x9
JC 0x001308b3
MOV RCX,qword ptr [RSP + 0x20]
INC dword ptr [RCX]
LAB_001308b3:
MOV RSI,-0x100000000
AND RSI,R15
LAB_001308c0:
MOV ECX,R15D
OR RCX,RSI
CMP EAX,0x6
SETNZ DL
LAB_001308cc:
XOR R14D,R14D
TEST DL,DL
MOV EDX,0x6
CMOVNZ RDX,RAX
CMOVNZ R14,RCX
LAB_001308de:
MOV RAX,R14
ADD RSP,0x60
POP RBX
POP R14
POP R15
RET
|
ulong JS_EvalFunctionInternal
(long param_1,long param_2,int8 param_3,ulong param_4,int8 param_5,
int8 param_6,int8 param_7)
{
int iVar1;
uint uVar2;
ulong uVar3;
int8 uVar4;
int *piVar5;
int8 uVar6;
bool bVar7;
int1 auVar8 [16];
int4 *puVar9;
int *local_58;
int8 uStack_50;
long local_48;
long local_40;
int *local_38;
int8 local_30;
int4 local_28 [2];
int8 local_20;
local_48 = param_2;
if ((int)param_3 != -3) {
if ((int)param_3 == -2) {
auVar8 = js_closure(param_1,param_2,param_3,param_6,param_7);
local_48 = auVar8._0_8_;
uVar3 = JS_CallFree(param_1,local_48,auVar8._8_8_,param_4,param_5,0,0);
return uVar3;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18));
JS_ThrowTypeError(param_1,"bytecode function expected");
return 0;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_2);
iVar1 = js_create_module_function(param_1,param_2);
if (iVar1 < 0) {
LAB_001307b7:
bVar7 = false;
goto LAB_001308cc;
}
local_58 = (int *)0x0;
iVar1 = js_inner_module_linking(param_1,param_2,&local_58,0);
piVar5 = local_58;
if (iVar1 < 0) {
for (; piVar5 != (int *)0x0; piVar5 = *(int **)(piVar5 + 0x24)) {
*(int1 *)((long)piVar5 + 0x83) = 0;
}
param_4 = 0;
if (iVar1 < 0) goto LAB_001307b7;
}
if ((*(uint *)(param_2 + 0x80) & 0xfe000000) == 0x4000000) {
param_2 = *(long *)(param_2 + 0xb8);
}
uVar2 = (uint)*(int8 *)(param_2 + 200);
if (uVar2 == 3) {
piVar5 = (int *)0x0;
auVar8 = js_new_promise_capability(param_1,param_2 + 0xd0,0,3);
*(int1 (*) [16])(param_2 + 0xc0) = auVar8;
uVar2 = 6;
param_4 = 0;
if (auVar8._8_4_ != 6) {
local_40 = 0;
iVar1 = js_inner_module_evaluation(param_1,param_2,0,&local_40,&local_38);
if (iVar1 < 0) {
for (; local_40 != 0; local_40 = *(long *)(local_40 + 0x90)) {
*(int1 *)(local_40 + 0x83) = 5;
*(int1 *)(local_40 + 0xf0) = 1;
if (0xfffffff6 < (uint)local_30) {
*local_38 = *local_38 + 1;
}
*(int **)(local_40 + 0xf8) = local_38;
*(int8 *)(local_40 + 0x100) = local_30;
*(long *)(local_40 + 0xb8) = param_2;
local_58 = local_38;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_38,local_30);
puVar9 = (int4 *)(param_2 + 0xf8);
uVar4 = *(int8 *)(param_2 + 0xe0);
uVar6 = *(int8 *)(param_2 + 0xe8);
piVar5 = local_58;
LAB_0013086a:
local_58 = (int *)((ulong)piVar5 & 0xffffffff00000000);
uStack_50 = 3;
uVar4 = JS_CallInternal(param_1,uVar4,uVar6,0,3,1,(ulong)piVar5 & 0xffffffff00000000,3,
puVar9,2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4);
}
else if (*(int *)(param_2 + 0xac) == 0) {
puVar9 = local_28;
local_28[0] = 0;
local_20 = 3;
uVar4 = *(int8 *)(param_2 + 0xd0);
uVar6 = *(int8 *)(param_2 + 0xd8);
piVar5 = local_58;
goto LAB_0013086a;
}
piVar5 = *(int **)(param_2 + 0xc0);
uVar2 = (uint)*(int8 *)(param_2 + 200);
goto LAB_001308a2;
}
}
else {
piVar5 = *(int **)(param_2 + 0xc0);
LAB_001308a2:
if (0xfffffff6 < uVar2) {
*piVar5 = *piVar5 + 1;
}
param_4 = (ulong)piVar5 & 0xffffffff00000000;
}
param_4 = (ulong)piVar5 & 0xffffffff | param_4;
bVar7 = uVar2 != 6;
LAB_001308cc:
uVar3 = 0;
if (bVar7) {
uVar3 = param_4;
}
return uVar3;
}
|
|
5,901 | JS_EvalFunctionInternal | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_EvalFunctionInternal(JSContext *ctx, JSValue fun_obj,
JSValue this_obj,
JSVarRef **var_refs, JSStackFrame *sf)
{
JSValue ret_val;
uint32_t tag;
tag = JS_VALUE_GET_TAG(fun_obj);
if (tag == JS_TAG_FUNCTION_BYTECODE) {
fun_obj = js_closure(ctx, fun_obj, var_refs, sf);
ret_val = JS_CallFree(ctx, fun_obj, this_obj, 0, NULL);
} else if (tag == JS_TAG_MODULE) {
JSModuleDef *m;
m = JS_VALUE_GET_PTR(fun_obj);
/* the module refcount should be >= 2 */
JS_FreeValue(ctx, fun_obj);
if (js_create_module_function(ctx, m) < 0)
goto fail;
if (js_link_module(ctx, m) < 0)
goto fail;
ret_val = js_evaluate_module(ctx, m);
if (JS_IsException(ret_val)) {
fail:
return JS_EXCEPTION;
}
} else {
JS_FreeValue(ctx, fun_obj);
ret_val = JS_ThrowTypeError(ctx, "bytecode function expected");
}
return ret_val;
} | O3 | c | JS_EvalFunctionInternal:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpl $-0x3, %edx
je 0x316e8
cmpl $-0x2, %edx
jne 0x3180c
movq %r8, %r15
movq %rcx, %r12
movq 0x80(%rsp), %r8
movq %r14, %rdi
movq %rbx, %rsi
movq %r9, %rcx
callq 0x3fba3
movq $0x0, (%rsp)
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rcx
movq %r15, %r8
xorl %r9d, %r9d
callq 0x228ab
movq %rax, %rbx
movq %rdx, %r15
jmp 0x31989
movq 0x18(%r14), %rdi
movl (%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbx)
cmpl $0x1, %eax
jg 0x31700
movq %rbx, %rsi
callq 0x20d90
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4538b
movl $0x6, %r15d
testl %eax, %eax
js 0x31861
leaq 0x20(%rsp), %rdx
movq $0x0, (%rdx)
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x4557f
testl %eax, %eax
js 0x31847
movl $0xfe000000, %eax # imm = 0xFE000000
andl 0x80(%rbx), %eax
cmpl $0x4000000, %eax # imm = 0x4000000
jne 0x31753
movq 0xb8(%rbx), %rbx
movq 0xc8(%rbx), %rax
cmpl $0x3, %eax
jne 0x31868
leaq 0xd0(%rbx), %rsi
xorl %r15d, %r15d
movl $0x3, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x3687c
movq %rax, 0xc0(%rbx)
movq %rdx, 0xc8(%rbx)
movl $0x6, %eax
movl $0x0, %ecx
cmpl $0x6, %edx
je 0x31970
leaq 0x30(%rsp), %rcx
movq $0x0, (%rcx)
leaq 0x38(%rsp), %r8
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x459cd
testl %eax, %eax
js 0x31874
cmpl $0x0, 0xac(%rbx)
jne 0x3194d
xorl %eax, %eax
leaq 0x48(%rsp), %rcx
movl %eax, (%rcx)
movl $0x3, %edi
movq %rdi, 0x8(%rcx)
movq 0xd0(%rbx), %rsi
movq 0xd8(%rbx), %rdx
movl %eax, 0x20(%rsp)
movq %rdi, 0x28(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rcx, 0x10(%rsp)
jmp 0x31912
cmpl $-0x9, %edx
jb 0x31829
movq 0x18(%r14), %rdi
movl (%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbx)
cmpl $0x1, %eax
jg 0x31829
movq %rbx, %rsi
callq 0x20d90
leaq 0x6f895(%rip), %rsi # 0xa10c5
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2214f
movl $0x6, %r15d
jmp 0x31989
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x31861
movb $0x0, 0x83(%rax)
movq 0x90(%rax), %rax
jmp 0x3184c
xorl %ebx, %ebx
jmp 0x31989
movq 0xc0(%rbx), %r15
jmp 0x3195b
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
testq %rax, %rax
je 0x318bb
movb $0x5, 0x83(%rax)
movb $0x1, 0xf0(%rax)
cmpl $-0x9, %edx
jb 0x3189d
incl (%rsi)
movq %rsi, 0xf8(%rax)
movq %rdx, 0x100(%rax)
movq %rbx, 0xb8(%rax)
movq 0x90(%rax), %rax
jmp 0x31883
movq $0x0, 0x30(%rsp)
cmpl $-0x9, %edx
jb 0x318de
movq 0x18(%r14), %rdi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x318de
callq 0x20d90
leaq 0xf8(%rbx), %rax
movq 0xe0(%rbx), %rsi
movq 0xe8(%rbx), %rdx
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %r14, %rdi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x27eca
cmpl $-0x9, %edx
jb 0x3194d
movq 0x18(%r14), %rdi
movl (%rax), %ecx
leal -0x1(%rcx), %esi
movl %esi, (%rax)
cmpl $0x1, %ecx
jg 0x3194d
movq %rax, %rsi
callq 0x20d90
movq 0xc0(%rbx), %r15
movq 0xc8(%rbx), %rax
cmpl $-0x9, %eax
jb 0x31963
incl (%r15)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r15, %rcx
movl %r15d, %edx
orq %rcx, %rdx
xorl %ebx, %ebx
cmpl $0x6, %eax
movl $0x6, %r15d
cmovneq %rax, %r15
cmovneq %rdx, %rbx
movq %rbx, %rax
movq %r15, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| JS_EvalFunctionInternal:
push r15
push r14
push r12
push rbx
sub rsp, 58h
mov rbx, rsi
mov r14, rdi
cmp edx, 0FFFFFFFDh
jz short loc_316E8
cmp edx, 0FFFFFFFEh
jnz loc_3180C
mov r15, r8
mov r12, rcx
mov r8, [rsp+78h+arg_0]
mov rdi, r14
mov rsi, rbx
mov rcx, r9
call js_closure
mov qword ptr [rsp+78h+var_78], 0
mov rdi, r14
mov rsi, rax
mov rcx, r12
mov r8, r15
xor r9d, r9d
call JS_CallFree
mov rbx, rax
mov r15, rdx
jmp loc_31989
loc_316E8:
mov rdi, [r14+18h]
mov eax, [rbx]
lea ecx, [rax-1]
mov [rbx], ecx
cmp eax, 1
jg short loc_31700
mov rsi, rbx
call js_free_value_rt
loc_31700:
mov rdi, r14
mov rsi, rbx
call js_create_module_function
mov r15d, 6
test eax, eax
js loc_31861
lea rdx, [rsp+78h+var_58]
mov qword ptr [rdx], 0
mov rdi, r14
mov rsi, rbx
xor ecx, ecx
call js_inner_module_linking
test eax, eax
js loc_31847
mov eax, 0FE000000h
and eax, [rbx+80h]
cmp eax, 4000000h
jnz short loc_31753
mov rbx, [rbx+0B8h]
loc_31753:
mov rax, [rbx+0C8h]
cmp eax, 3
jnz loc_31868
lea rsi, [rbx+0D0h]
xor r15d, r15d
mov ecx, 3
mov rdi, r14
xor edx, edx
call js_new_promise_capability
mov [rbx+0C0h], rax
mov [rbx+0C8h], rdx
mov eax, 6
mov ecx, 0
cmp edx, 6
jz loc_31970
lea rcx, [rsp+78h+var_48]
mov qword ptr [rcx], 0
lea r8, [rsp+78h+var_40]
mov rdi, r14
mov rsi, rbx
xor edx, edx
call js_inner_module_evaluation
test eax, eax
js loc_31874
cmp dword ptr [rbx+0ACh], 0
jnz loc_3194D
xor eax, eax
lea rcx, [rsp+78h+var_30]
mov [rcx], eax
mov edi, 3
mov [rcx+8], rdi
mov rsi, [rbx+0D0h]
mov rdx, [rbx+0D8h]
mov dword ptr [rsp+78h+var_58], eax
mov qword ptr [rsp+78h+var_58+8], rdi
movups xmm0, [rsp+78h+var_58]
movups [rsp+78h+var_78], xmm0
mov [rsp+78h+var_68], rcx
jmp loc_31912
loc_3180C:
cmp edx, 0FFFFFFF7h
jb short loc_31829
mov rdi, [r14+18h]
mov eax, [rbx]
lea ecx, [rax-1]
mov [rbx], ecx
cmp eax, 1
jg short loc_31829
mov rsi, rbx
call js_free_value_rt
loc_31829:
lea rsi, aBytecodeFuncti_0; "bytecode function expected"
xor ebx, ebx
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
mov r15d, 6
jmp loc_31989
loc_31847:
mov rax, qword ptr [rsp+78h+var_58]
loc_3184C:
test rax, rax
jz short loc_31861
mov byte ptr [rax+83h], 0
mov rax, [rax+90h]
jmp short loc_3184C
loc_31861:
xor ebx, ebx
jmp loc_31989
loc_31868:
mov r15, [rbx+0C0h]
jmp loc_3195B
loc_31874:
mov rax, [rsp+78h+var_48]
mov rsi, [rsp+78h+var_40]
mov rdx, [rsp+78h+var_38]
loc_31883:
test rax, rax
jz short loc_318BB
mov byte ptr [rax+83h], 5
mov byte ptr [rax+0F0h], 1
cmp edx, 0FFFFFFF7h
jb short loc_3189D
inc dword ptr [rsi]
loc_3189D:
mov [rax+0F8h], rsi
mov [rax+100h], rdx
mov [rax+0B8h], rbx
mov rax, [rax+90h]
jmp short loc_31883
loc_318BB:
mov [rsp+78h+var_48], 0
cmp edx, 0FFFFFFF7h
jb short loc_318DE
mov rdi, [r14+18h]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_318DE
call js_free_value_rt
loc_318DE:
lea rax, [rbx+0F8h]
mov rsi, [rbx+0E0h]
mov rdx, [rbx+0E8h]
mov dword ptr [rsp+78h+var_58], 0
mov qword ptr [rsp+78h+var_58+8], 3
movups xmm0, [rsp+78h+var_58]
movups [rsp+78h+var_78], xmm0
mov [rsp+78h+var_68], rax
loc_31912:
mov [rsp+78h+var_60], 2
mov r8d, 3
mov rdi, r14
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
cmp edx, 0FFFFFFF7h
jb short loc_3194D
mov rdi, [r14+18h]
mov ecx, [rax]
lea esi, [rcx-1]
mov [rax], esi
cmp ecx, 1
jg short loc_3194D
mov rsi, rax
call js_free_value_rt
loc_3194D:
mov r15, [rbx+0C0h]
mov rax, [rbx+0C8h]
loc_3195B:
cmp eax, 0FFFFFFF7h
jb short loc_31963
inc dword ptr [r15]
loc_31963:
mov rcx, 0FFFFFFFF00000000h
and rcx, r15
loc_31970:
mov edx, r15d
or rdx, rcx
xor ebx, ebx
cmp eax, 6
mov r15d, 6
cmovnz r15, rax
cmovnz rbx, rdx
loc_31989:
mov rax, rbx
mov rdx, r15
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
| long long JS_EvalFunctionInternal(
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 a15)
{
long long v15; // rbx
int v17; // r15d
int v18; // r12d
_QWORD *v19; // rax
long long v20; // rdx
long long v21; // rbx
long long v22; // rdi
int v23; // eax
long long v24; // rcx
long long v25; // rax
unsigned long long v26; // r15
long long v27; // rdx
unsigned long long v28; // rcx
long long v29; // r8
long long v30; // r9
__m128 v31; // xmm4
__m128 v32; // xmm5
long long v33; // rsi
long long v34; // rdx
_QWORD *v35; // rax
long long v36; // rdx
long long v37; // r8
long long v38; // r9
long long v39; // rdi
int v40; // eax
long long i; // rax
long long v42; // rax
_QWORD *v43; // rsi
long long v44; // rdx
long long v45; // rdi
int v46; // eax
long long v47; // rcx
long long v48; // rsi
long long v49; // rdx
long long v50; // rdi
long long v51; // rcx
char v53; // [rsp+0h] [rbp-78h]
__m128i v54; // [rsp+20h] [rbp-58h] BYREF
long long v55; // [rsp+30h] [rbp-48h] BYREF
_QWORD v56[2]; // [rsp+38h] [rbp-40h] BYREF
int v57; // [rsp+48h] [rbp-30h] BYREF
long long v58; // [rsp+50h] [rbp-28h]
v15 = a2;
if ( (_DWORD)a3 != -3 )
{
if ( (_DWORD)a3 == -2 )
{
v17 = a5;
v18 = a4;
v19 = (_QWORD *)js_closure(a1, a2, a3, a6, a15);
return JS_CallFree(a1, v19, v20, v18, v17, 0, 0LL);
}
else
{
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
{
v39 = *(_QWORD *)(a1 + 24);
v40 = *(_DWORD *)a2;
a4 = (unsigned int)(*(_DWORD *)a2 - 1);
*(_DWORD *)a2 = a4;
if ( v40 <= 1 )
js_free_value_rt(v39, (_QWORD *)a2, a3, a4, a5, a6);
}
v21 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"bytecode function expected",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v53);
}
return v21;
}
v22 = *(_QWORD *)(a1 + 24);
v23 = *(_DWORD *)a2;
v24 = (unsigned int)(*(_DWORD *)a2 - 1);
*(_DWORD *)a2 = v24;
if ( v23 <= 1 )
js_free_value_rt(v22, (_QWORD *)a2, a3, v24, a5, a6);
if ( (int)js_create_module_function(a1, a2) < 0 )
return 0LL;
v54.m128i_i64[0] = 0LL;
if ( (int)js_inner_module_linking(a1, a2, &v54, 0LL) < 0 )
{
for ( i = v54.m128i_i64[0]; i; i = *(_QWORD *)(i + 144) )
*(_BYTE *)(i + 131) = 0;
return 0LL;
}
if ( (*(_DWORD *)(a2 + 128) & 0xFE000000) == 0x4000000 )
v15 = *(_QWORD *)(a2 + 184);
v25 = *(_QWORD *)(v15 + 200);
if ( (_DWORD)v25 != 3 )
{
v26 = *(_QWORD *)(v15 + 192);
LABEL_37:
if ( (unsigned int)v25 >= 0xFFFFFFF7 )
++*(_DWORD *)v26;
v28 = v26 & 0xFFFFFFFF00000000LL;
goto LABEL_40;
}
LODWORD(v26) = 0;
*(_QWORD *)(v15 + 192) = js_new_promise_capability(a1, v15 + 208, 0LL);
*(_QWORD *)(v15 + 200) = v27;
LODWORD(v25) = 6;
v28 = 0LL;
if ( (_DWORD)v27 != 6 )
{
v55 = 0LL;
if ( (int)js_inner_module_evaluation(a1, v15, 0LL, &v55, v56) < 0 )
{
v42 = v55;
v43 = (_QWORD *)v56[0];
v44 = v56[1];
while ( v42 )
{
*(_BYTE *)(v42 + 131) = 5;
*(_BYTE *)(v42 + 240) = 1;
if ( (unsigned int)v44 >= 0xFFFFFFF7 )
++*(_DWORD *)v43;
*(_QWORD *)(v42 + 248) = v43;
*(_QWORD *)(v42 + 256) = v44;
*(_QWORD *)(v42 + 184) = v15;
v42 = *(_QWORD *)(v42 + 144);
}
v55 = 0LL;
if ( (unsigned int)v44 >= 0xFFFFFFF7 )
{
v45 = *(_QWORD *)(a1 + 24);
v46 = *(_DWORD *)v43;
v47 = (unsigned int)(*(_DWORD *)v43 - 1);
*(_DWORD *)v43 = v47;
if ( v46 <= 1 )
js_free_value_rt(v45, v43, v44, v47, v29, v30);
}
v48 = *(_QWORD *)(v15 + 224);
v49 = *(_QWORD *)(v15 + 232);
v54.m128i_i32[0] = 0;
v54.m128i_i64[1] = 3LL;
v35 = (_QWORD *)JS_CallInternal(
a1,
v48,
v49,
0LL,
3LL,
1LL,
v54,
a8,
a9,
a10,
v31,
v32,
a13,
a14,
0,
3,
v15 + 248,
2u);
}
else
{
if ( *(_DWORD *)(v15 + 172) )
{
LABEL_36:
v26 = *(_QWORD *)(v15 + 192);
v25 = *(_QWORD *)(v15 + 200);
goto LABEL_37;
}
v57 = 0;
v58 = 3LL;
v33 = *(_QWORD *)(v15 + 208);
v34 = *(_QWORD *)(v15 + 216);
v54.m128i_i32[0] = 0;
v54.m128i_i64[1] = 3LL;
v35 = (_QWORD *)JS_CallInternal(
a1,
v33,
v34,
0LL,
3LL,
1LL,
v54,
a8,
a9,
a10,
v31,
v32,
a13,
a14,
0,
3,
(long long)&v57,
2u);
}
if ( (unsigned int)v36 >= 0xFFFFFFF7 )
{
v50 = *(_QWORD *)(a1 + 24);
v51 = *(unsigned int *)v35;
*(_DWORD *)v35 = v51 - 1;
if ( (int)v51 <= 1 )
js_free_value_rt(v50, v35, v36, v51, v37, v38);
}
goto LABEL_36;
}
LABEL_40:
v21 = 0LL;
if ( (_DWORD)v25 != 6 )
return v28 | (unsigned int)v26;
return v21;
}
| JS_EvalFunctionInternal:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RSI
MOV R14,RDI
CMP EDX,-0x3
JZ 0x001316e8
CMP EDX,-0x2
JNZ 0x0013180c
MOV R15,R8
MOV R12,RCX
MOV R8,qword ptr [RSP + 0x80]
MOV RDI,R14
MOV RSI,RBX
MOV RCX,R9
CALL 0x0013fba3
MOV qword ptr [RSP],0x0
MOV RDI,R14
MOV RSI,RAX
MOV RCX,R12
MOV R8,R15
XOR R9D,R9D
CALL 0x001228ab
MOV RBX,RAX
MOV R15,RDX
JMP 0x00131989
LAB_001316e8:
MOV RDI,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [RBX]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBX],ECX
CMP EAX,0x1
JG 0x00131700
MOV RSI,RBX
CALL 0x00120d90
LAB_00131700:
MOV RDI,R14
MOV RSI,RBX
CALL 0x0014538b
MOV R15D,0x6
TEST EAX,EAX
JS 0x00131861
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],0x0
MOV RDI,R14
MOV RSI,RBX
XOR ECX,ECX
CALL 0x0014557f
TEST EAX,EAX
JS 0x00131847
MOV EAX,0xfe000000
AND EAX,dword ptr [RBX + 0x80]
CMP EAX,0x4000000
JNZ 0x00131753
MOV RBX,qword ptr [RBX + 0xb8]
LAB_00131753:
MOV RAX,qword ptr [RBX + 0xc8]
CMP EAX,0x3
JNZ 0x00131868
LEA RSI,[RBX + 0xd0]
XOR R15D,R15D
MOV ECX,0x3
MOV RDI,R14
XOR EDX,EDX
CALL 0x0013687c
MOV qword ptr [RBX + 0xc0],RAX
MOV qword ptr [RBX + 0xc8],RDX
MOV EAX,0x6
MOV ECX,0x0
CMP EDX,0x6
JZ 0x00131970
LEA RCX,[RSP + 0x30]
MOV qword ptr [RCX],0x0
LEA R8,[RSP + 0x38]
MOV RDI,R14
MOV RSI,RBX
XOR EDX,EDX
CALL 0x001459cd
TEST EAX,EAX
JS 0x00131874
CMP dword ptr [RBX + 0xac],0x0
JNZ 0x0013194d
XOR EAX,EAX
LEA RCX,[RSP + 0x48]
MOV dword ptr [RCX],EAX
MOV EDI,0x3
MOV qword ptr [RCX + 0x8],RDI
MOV RSI,qword ptr [RBX + 0xd0]
MOV RDX,qword ptr [RBX + 0xd8]
MOV dword ptr [RSP + 0x20],EAX
MOV qword ptr [RSP + 0x28],RDI
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],RCX
JMP 0x00131912
LAB_0013180c:
CMP EDX,-0x9
JC 0x00131829
MOV RDI,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [RBX]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBX],ECX
CMP EAX,0x1
JG 0x00131829
MOV RSI,RBX
CALL 0x00120d90
LAB_00131829:
LEA RSI,[0x1a10c5]
XOR EBX,EBX
MOV RDI,R14
XOR EAX,EAX
CALL 0x0012214f
MOV R15D,0x6
JMP 0x00131989
LAB_00131847:
MOV RAX,qword ptr [RSP + 0x20]
LAB_0013184c:
TEST RAX,RAX
JZ 0x00131861
MOV byte ptr [RAX + 0x83],0x0
MOV RAX,qword ptr [RAX + 0x90]
JMP 0x0013184c
LAB_00131861:
XOR EBX,EBX
JMP 0x00131989
LAB_00131868:
MOV R15,qword ptr [RBX + 0xc0]
JMP 0x0013195b
LAB_00131874:
MOV RAX,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
LAB_00131883:
TEST RAX,RAX
JZ 0x001318bb
MOV byte ptr [RAX + 0x83],0x5
MOV byte ptr [RAX + 0xf0],0x1
CMP EDX,-0x9
JC 0x0013189d
INC dword ptr [RSI]
LAB_0013189d:
MOV qword ptr [RAX + 0xf8],RSI
MOV qword ptr [RAX + 0x100],RDX
MOV qword ptr [RAX + 0xb8],RBX
MOV RAX,qword ptr [RAX + 0x90]
JMP 0x00131883
LAB_001318bb:
MOV qword ptr [RSP + 0x30],0x0
CMP EDX,-0x9
JC 0x001318de
MOV RDI,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x001318de
CALL 0x00120d90
LAB_001318de:
LEA RAX,[RBX + 0xf8]
MOV RSI,qword ptr [RBX + 0xe0]
MOV RDX,qword ptr [RBX + 0xe8]
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],RAX
LAB_00131912:
MOV dword ptr [RSP + 0x18],0x2
MOV R8D,0x3
MOV RDI,R14
XOR ECX,ECX
MOV R9D,0x1
CALL 0x00127eca
CMP EDX,-0x9
JC 0x0013194d
MOV RDI,qword ptr [R14 + 0x18]
MOV ECX,dword ptr [RAX]
LEA ESI,[RCX + -0x1]
MOV dword ptr [RAX],ESI
CMP ECX,0x1
JG 0x0013194d
MOV RSI,RAX
CALL 0x00120d90
LAB_0013194d:
MOV R15,qword ptr [RBX + 0xc0]
MOV RAX,qword ptr [RBX + 0xc8]
LAB_0013195b:
CMP EAX,-0x9
JC 0x00131963
INC dword ptr [R15]
LAB_00131963:
MOV RCX,-0x100000000
AND RCX,R15
LAB_00131970:
MOV EDX,R15D
OR RDX,RCX
XOR EBX,EBX
CMP EAX,0x6
MOV R15D,0x6
CMOVNZ R15,RAX
CMOVNZ RBX,RDX
LAB_00131989:
MOV RAX,RBX
MOV RDX,R15
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16]
JS_EvalFunctionInternal
(long param_1,int *param_2,int8 param_3,int8 param_4,int8 param_5,
int8 param_6,int8 param_7)
{
int iVar1;
int8 uVar2;
ulong uVar3;
uint uVar4;
int8 uVar5;
int *piVar6;
int1 auVar7 [12];
int1 auVar8 [16];
ulong local_58 [3];
int *local_40;
int8 local_38;
int local_30 [2];
int8 local_28;
uVar4 = (uint)param_3;
if (uVar4 != 0xfffffffd) {
if (uVar4 == 0xfffffffe) {
auVar8 = js_closure(param_1,param_2,param_3,param_6,param_7);
auVar8 = JS_CallFree(param_1,auVar8._0_8_,auVar8._8_8_,param_4,param_5,0,0);
return auVar8;
}
if (0xfffffff6 < uVar4) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *param_2;
*param_2 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,param_2);
}
}
JS_ThrowTypeError(param_1,"bytecode function expected");
return ZEXT816(6) << 0x40;
}
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *param_2;
*param_2 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,param_2);
}
iVar1 = js_create_module_function(param_1,param_2);
if (iVar1 < 0) {
LAB_00131861:
return ZEXT816(6) << 0x40;
}
local_58[0] = 0;
iVar1 = js_inner_module_linking(param_1,param_2,local_58,0);
if (iVar1 < 0) {
for (; local_58[0] != 0; local_58[0] = *(ulong *)(local_58[0] + 0x90)) {
*(int1 *)(local_58[0] + 0x83) = 0;
}
goto LAB_00131861;
}
if ((param_2[0x20] & 0xfe000000U) == 0x4000000) {
param_2 = *(int **)(param_2 + 0x2e);
}
uVar2 = *(int8 *)(param_2 + 0x32);
if ((int)uVar2 == 3) {
piVar6 = (int *)0x0;
auVar8 = js_new_promise_capability(param_1,param_2 + 0x34,0,3);
*(int1 (*) [16])(param_2 + 0x30) = auVar8;
uVar2 = 6;
uVar3 = 0;
if (auVar8._8_4_ == 6) goto LAB_00131970;
local_58[2] = 0;
iVar1 = js_inner_module_evaluation(param_1,param_2,0,local_58 + 2,&local_40);
if (iVar1 < 0) {
for (; local_58[2] != 0; local_58[2] = *(long *)(local_58[2] + 0x90)) {
*(int1 *)(local_58[2] + 0x83) = 5;
*(int1 *)(local_58[2] + 0xf0) = 1;
if (0xfffffff6 < (uint)local_38) {
*local_40 = *local_40 + 1;
}
*(int **)(local_58[2] + 0xf8) = local_40;
*(int8 *)(local_58[2] + 0x100) = local_38;
*(int **)(local_58[2] + 0xb8) = param_2;
}
local_58[2] = 0;
if (0xfffffff6 < (uint)local_38) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *local_40;
*local_40 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2);
}
}
piVar6 = param_2 + 0x3e;
uVar2 = *(int8 *)(param_2 + 0x38);
uVar5 = *(int8 *)(param_2 + 0x3a);
uVar3 = local_58[0];
LAB_00131912:
local_58[0] = uVar3 & 0xffffffff00000000;
local_58[1] = 3;
auVar7 = JS_CallInternal(param_1,uVar2,uVar5,0,3,1,uVar3 & 0xffffffff00000000,3,piVar6,2);
piVar6 = auVar7._0_8_;
if (0xfffffff6 < auVar7._8_4_) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar6;
*piVar6 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,piVar6);
}
}
}
else if (param_2[0x2b] == 0) {
piVar6 = local_30;
local_30[0] = 0;
local_28 = 3;
uVar2 = *(int8 *)(param_2 + 0x34);
uVar5 = *(int8 *)(param_2 + 0x36);
uVar3 = local_58[0];
goto LAB_00131912;
}
piVar6 = *(int **)(param_2 + 0x30);
uVar2 = *(int8 *)(param_2 + 0x32);
}
else {
piVar6 = *(int **)(param_2 + 0x30);
}
if (0xfffffff6 < (uint)uVar2) {
*piVar6 = *piVar6 + 1;
}
uVar3 = (ulong)piVar6 & 0xffffffff00000000;
LAB_00131970:
auVar8._8_8_ = uVar2;
auVar8._0_8_ = (ulong)piVar6 & 0xffffffff | uVar3;
if ((int)uVar2 == 6) {
return ZEXT816(6) << 0x40;
}
return auVar8;
}
|
|
5,902 | my_mb_wc_euc_jp | eloqsql/strings/ctype-ujis.c | static int
my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 :
(s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2;
}
/* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */
if (hi == 0x8E)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (s[1] < 0xA1 || s[1] > 0xDF)
return MY_CS_ILSEQ;
*pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */
return 2;
}
if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ?
3 :
(s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ?
MY_CS_ILSEQ : -3;
}
return MY_CS_ILSEQ;
} | O3 | c | my_mb_wc_euc_jp:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x55a1f
movzbl (%rdx), %edi
testb %dil, %dil
js 0x55a21
movq %rdi, (%rsi)
movl $0x1, %eax
popq %rbp
retq
leal 0x5f(%rdi), %eax
cmpb $0x5d, %al
ja 0x55a6d
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x55a1f
movzbl 0x1(%rdx), %eax
shll $0x9, %edi
leal (%rdi,%rax,2), %eax
leaq 0x207389(%rip), %rcx # 0x25cdd0
movzwl (%rax,%rcx), %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testq %rcx, %rcx
jne 0x55a1f
movb 0x1(%rdx), %al
incb %al
xorl %ecx, %ecx
cmpb $-0x5e, %al
setb %cl
leal -0x2(,%rcx,2), %eax
jmp 0x55a1f
cmpq $0x8f, %rdi
je 0x55ab1
cmpl $0x8e, %edi
jne 0x55af3
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x55a1f
movzbl 0x1(%rdx), %ecx
leal 0x20(%rcx), %edx
movl $0x0, %eax
cmpb $-0x3f, %dl
jb 0x55a1f
addq $0xfec0, %rcx # imm = 0xFEC0
movq %rcx, (%rsi)
movl $0x2, %eax
jmp 0x55a1f
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0x55a1f
movzwl 0x1(%rdx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
leaq 0x2272fb(%rip), %rcx # 0x27cdd0
movzwl (%rcx,%rax,2), %ecx
movq %rcx, (%rsi)
movl $0x3, %eax
testq %rcx, %rcx
jne 0x55a1f
movb 0x1(%rdx), %al
incb %al
cmpb $-0x5e, %al
jae 0x55afa
xorl %eax, %eax
jmp 0x55a1f
movb 0x2(%rdx), %cl
movl $0x0, %eax
cmpb $-0x5f, %cl
jb 0x55a1f
xorl %eax, %eax
cmpb $-0x1, %cl
sete %al
leal (%rax,%rax,2), %eax
addl $-0x3, %eax
jmp 0x55a1f
| my_mb_wc_euc_jp:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_55A1F
movzx edi, byte ptr [rdx]
test dil, dil
js short loc_55A21
mov [rsi], rdi
mov eax, 1
loc_55A1F:
pop rbp
retn
loc_55A21:
lea eax, [rdi+5Fh]
cmp al, 5Dh ; ']'
ja short loc_55A6D
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_55A1F
movzx eax, byte ptr [rdx+1]
shl edi, 9
lea eax, [rdi+rax*2]
lea rcx, jisx0208_eucjp_to_unicode
movzx ecx, word ptr [rax+rcx]
mov [rsi], rcx
mov eax, 2
test rcx, rcx
jnz short loc_55A1F
mov al, [rdx+1]
inc al
xor ecx, ecx
cmp al, 0A2h
setb cl
lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2]
jmp short loc_55A1F
loc_55A6D:
cmp rdi, 8Fh
jz short loc_55AB1
cmp edi, 8Eh
jnz short loc_55AF3
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_55A1F
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx+20h]
mov eax, 0
cmp dl, 0C1h
jb short loc_55A1F
add rcx, 0FEC0h
mov [rsi], rcx
mov eax, 2
jmp loc_55A1F
loc_55AB1:
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja loc_55A1F
movzx eax, word ptr [rdx+1]
rol ax, 8
movzx eax, ax
lea rcx, jisx0212_eucjp_to_unicode
movzx ecx, word ptr [rcx+rax*2]
mov [rsi], rcx
mov eax, 3
test rcx, rcx
jnz loc_55A1F
mov al, [rdx+1]
inc al
cmp al, 0A2h
jnb short loc_55AFA
loc_55AF3:
xor eax, eax
jmp loc_55A1F
loc_55AFA:
mov cl, [rdx+2]
mov eax, 0
cmp cl, 0A1h
jb loc_55A1F
xor eax, eax
cmp cl, 0FFh
setz al
lea eax, [rax+rax*2]
add eax, 0FFFFFFFDh
jmp loc_55A1F
| long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
long long v6; // rcx
long long v7; // rcx
long long v8; // rcx
unsigned __int8 v9; // cl
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
v5 = *a3;
if ( (v5 & 0x80u) == 0LL )
{
*a2 = v5;
return 1LL;
}
if ( (unsigned __int8)(v5 + 95) <= 0x5Du )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = jisx0208_eucjp_to_unicode[256 * (_DWORD)v5 + a3[1]];
*a2 = v6;
result = 2LL;
if ( !v6 )
return 2 * (unsigned int)((unsigned __int8)(a3[1] + 1) < 0xA2u) - 2;
}
return result;
}
if ( v5 != 143 )
{
if ( (_DWORD)v5 == 142 )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v7 = a3[1];
result = 0LL;
if ( (unsigned __int8)(v7 + 32) >= 0xC1u )
{
*a2 = v7 + 65216;
return 2LL;
}
}
return result;
}
return 0LL;
}
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) > a4 )
return result;
v8 = jisx0212_eucjp_to_unicode[(unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8)];
*a2 = v8;
result = 3LL;
if ( v8 )
return result;
if ( (unsigned __int8)(a3[1] + 1) < 0xA2u )
return 0LL;
v9 = a3[2];
result = 0LL;
if ( v9 >= 0xA1u )
return 3 * (unsigned int)(v9 == 0xFF) - 3;
return result;
}
| my_mb_wc_euc_jp:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00155a1f
MOVZX EDI,byte ptr [RDX]
TEST DIL,DIL
JS 0x00155a21
MOV qword ptr [RSI],RDI
MOV EAX,0x1
LAB_00155a1f:
POP RBP
RET
LAB_00155a21:
LEA EAX,[RDI + 0x5f]
CMP AL,0x5d
JA 0x00155a6d
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x00155a1f
MOVZX EAX,byte ptr [RDX + 0x1]
SHL EDI,0x9
LEA EAX,[RDI + RAX*0x2]
LEA RCX,[0x35cdd0]
MOVZX ECX,word ptr [RAX + RCX*0x1]
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST RCX,RCX
JNZ 0x00155a1f
MOV AL,byte ptr [RDX + 0x1]
INC AL
XOR ECX,ECX
CMP AL,0xa2
SETC CL
LEA EAX,[-0x2 + RCX*0x2]
JMP 0x00155a1f
LAB_00155a6d:
CMP RDI,0x8f
JZ 0x00155ab1
CMP EDI,0x8e
JNZ 0x00155af3
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x00155a1f
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + 0x20]
MOV EAX,0x0
CMP DL,0xc1
JC 0x00155a1f
ADD RCX,0xfec0
MOV qword ptr [RSI],RCX
MOV EAX,0x2
JMP 0x00155a1f
LAB_00155ab1:
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x00155a1f
MOVZX EAX,word ptr [RDX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
LEA RCX,[0x37cdd0]
MOVZX ECX,word ptr [RCX + RAX*0x2]
MOV qword ptr [RSI],RCX
MOV EAX,0x3
TEST RCX,RCX
JNZ 0x00155a1f
MOV AL,byte ptr [RDX + 0x1]
INC AL
CMP AL,0xa2
JNC 0x00155afa
LAB_00155af3:
XOR EAX,EAX
JMP 0x00155a1f
LAB_00155afa:
MOV CL,byte ptr [RDX + 0x2]
MOV EAX,0x0
CMP CL,0xa1
JC 0x00155a1f
XOR EAX,EAX
CMP CL,0xff
SETZ AL
LEA EAX,[RAX + RAX*0x2]
ADD EAX,-0x3
JMP 0x00155a1f
|
int my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
ushort uVar2;
int iVar3;
iVar3 = -0x65;
if (param_3 < param_4) {
bVar1 = *param_3;
if ((char)bVar1 < '\0') {
if ((byte)(bVar1 + 0x5f) < 0x5e) {
iVar3 = -0x66;
if (param_3 + 2 <= param_4) {
uVar2 = *(ushort *)
(jisx0208_eucjp_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2));
*param_2 = (ulong)uVar2;
iVar3 = 2;
if ((ulong)uVar2 == 0) {
iVar3 = (uint)((byte)(param_3[1] + 1) < 0xa2) * 2 + -2;
}
}
}
else {
if ((ulong)bVar1 == 0x8f) {
if (param_4 < param_3 + 3) {
return -0x67;
}
uVar2 = *(ushort *)
(&jisx0212_eucjp_to_unicode +
(ulong)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) *
2);
*param_2 = (ulong)uVar2;
if ((ulong)uVar2 != 0) {
return 3;
}
if (0xa1 < (byte)(param_3[1] + 1)) {
if (param_3[2] < 0xa1) {
return 0;
}
return (uint)(param_3[2] == 0xff) * 3 + -3;
}
}
else if (bVar1 == 0x8e) {
if (param_4 < param_3 + 2) {
return -0x66;
}
if ((byte)(param_3[1] + 0x20) < 0xc1) {
return 0;
}
*param_2 = (ulong)param_3[1] + 0xfec0;
return 2;
}
iVar3 = 0;
}
}
else {
*param_2 = (ulong)bVar1;
iVar3 = 1;
}
}
return iVar3;
}
|
|
5,903 | lunasvg::Element::renderToBitmap(int, int, unsigned int) const | dmazzella[P]pylunasvg/lunasvg/source/lunasvg.cpp | Bitmap Element::renderToBitmap(int width, int height, uint32_t backgroundColor) const
{
if(m_node == nullptr)
return Bitmap();
auto elementBounds = element(true)->localTransform().mapRect(element()->paintBoundingBox());
if(elementBounds.isEmpty())
return Bitmap();
if(width <= 0 && height <= 0) {
width = static_cast<int>(std::ceil(elementBounds.w));
height = static_cast<int>(std::ceil(elementBounds.h));
} else if(width > 0 && height <= 0) {
height = static_cast<int>(std::ceil(width * elementBounds.h / elementBounds.w));
} else if(height > 0 && width <= 0) {
width = static_cast<int>(std::ceil(height * elementBounds.w / elementBounds.h));
}
auto xScale = width / elementBounds.w;
auto yScale = height / elementBounds.h;
Matrix matrix(xScale, 0, 0, yScale, -elementBounds.x * xScale, -elementBounds.y * yScale);
Bitmap bitmap(width, height);
bitmap.clear(backgroundColor);
render(bitmap, matrix);
return bitmap;
} | O0 | cpp | lunasvg::Element::renderToBitmap(int, int, unsigned int) const:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0xa0(%rbp)
movq %rdi, %rax
movq %rax, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, (%rax)
jne 0xd743
movq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0xb1d0
movq -0xa0(%rbp), %rdi
callq 0xe830
jmp 0xd937
movq -0x90(%rbp), %rdi
movl $0x1, %esi
callq 0xd470
movq %rax, %rsi
movq (%rsi), %rax
movq 0x50(%rax), %rax
leaq -0x44(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq *%rax
movq -0x90(%rbp), %rdi
xorl %esi, %esi
callq 0xd470
movq %rax, %rdi
movq (%rdi), %rax
movq 0x68(%rax), %rax
callq *%rax
movq -0xa8(%rbp), %rdi
movlpd %xmm0, -0x54(%rbp)
movlpd %xmm1, -0x4c(%rbp)
leaq -0x54(%rbp), %rsi
callq 0x11ed0
movlpd %xmm0, -0x2c(%rbp)
movlpd %xmm1, -0x24(%rbp)
leaq -0x2c(%rbp), %rdi
callq 0xe850
testb $0x1, %al
jne 0xd7b8
jmp 0xd7dc
movq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0xb1d0
movq -0xa0(%rbp), %rdi
callq 0xe830
jmp 0xd937
cmpl $0x0, -0x14(%rbp)
jg 0xd80c
cmpl $0x0, -0x18(%rbp)
jg 0xd80c
movss -0x24(%rbp), %xmm0
callq 0xe890
cvttss2si %xmm0, %eax
movl %eax, -0x14(%rbp)
movss -0x20(%rbp), %xmm0
callq 0xe890
cvttss2si %xmm0, %eax
movl %eax, -0x18(%rbp)
jmp 0xd860
cmpl $0x0, -0x14(%rbp)
jle 0xd835
cmpl $0x0, -0x18(%rbp)
jg 0xd835
cvtsi2ssl -0x14(%rbp), %xmm0
mulss -0x20(%rbp), %xmm0
divss -0x24(%rbp), %xmm0
callq 0xe890
cvttss2si %xmm0, %eax
movl %eax, -0x18(%rbp)
jmp 0xd85e
cmpl $0x0, -0x18(%rbp)
jle 0xd85c
cmpl $0x0, -0x14(%rbp)
jg 0xd85c
cvtsi2ssl -0x18(%rbp), %xmm0
mulss -0x24(%rbp), %xmm0
divss -0x20(%rbp), %xmm0
callq 0xe890
cvttss2si %xmm0, %eax
movl %eax, -0x14(%rbp)
jmp 0xd85e
jmp 0xd860
cvtsi2ssl -0x14(%rbp), %xmm0
movss -0x24(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x58(%rbp)
cvtsi2ssl -0x18(%rbp), %xmm0
movss -0x20(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x5c(%rbp)
movss -0x58(%rbp), %xmm0
movss -0x5c(%rbp), %xmm3
movaps 0x7e839(%rip), %xmm1 # 0x8c0d0
movss -0x2c(%rbp), %xmm4
movss -0x28(%rbp), %xmm5
pxor %xmm1, %xmm4
mulss %xmm0, %xmm4
pxor %xmm1, %xmm5
mulss %xmm3, %xmm5
leaq -0x74(%rbp), %rdi
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq 0xcba0
movq -0xa0(%rbp), %rdi
movb $0x0, -0x75(%rbp)
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0xc560
movq -0xa0(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0xc870
jmp 0xd8e7
movq -0xa0(%rbp), %rsi
movq -0x90(%rbp), %rdi
leaq -0x74(%rbp), %rdx
callq 0xd590
jmp 0xd900
movb $0x1, -0x75(%rbp)
testb $0x1, -0x75(%rbp)
jne 0xd935
jmp 0xd929
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
callq 0xc6a0
jmp 0xd947
movq -0xa0(%rbp), %rdi
callq 0xc6a0
jmp 0xd937
movq -0x98(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0xb6c0
| _ZNK7lunasvg7Element14renderToBitmapEiij:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_A0], rdi
mov rax, rdi
mov [rbp+var_98], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
mov [rbp+var_1C], r8d
mov rax, [rbp+var_10]
mov [rbp+var_90], rax
cmp qword ptr [rax], 0
jnz short loc_D743
mov rdi, [rbp+var_A0]
xor esi, esi
mov edx, 8
call _memset
mov rdi, [rbp+var_A0]; this
call _ZN7lunasvg6BitmapC2Ev; lunasvg::Bitmap::Bitmap(void)
jmp loc_D937
loc_D743:
mov rdi, [rbp+var_90]; this
mov esi, 1; bool
call _ZNK7lunasvg7Element7elementEb; lunasvg::Element::element(bool)
mov rsi, rax
mov rax, [rsi]
mov rax, [rax+50h]
lea rdi, [rbp+var_44]
mov [rbp+var_A8], rdi
call rax
mov rdi, [rbp+var_90]; this
xor esi, esi; bool
call _ZNK7lunasvg7Element7elementEb; lunasvg::Element::element(bool)
mov rdi, rax
mov rax, [rdi]
mov rax, [rax+68h]
call rax
mov rdi, [rbp+var_A8]; this
movlpd [rbp+var_54], xmm0
movlpd [rbp+var_4C], xmm1
lea rsi, [rbp+var_54]; lunasvg::Rect *
call _ZNK7lunasvg9Transform7mapRectERKNS_4RectE; lunasvg::Transform::mapRect(lunasvg::Rect const&)
movlpd [rbp+var_2C], xmm0
movlpd qword ptr [rbp+var_24], xmm1
lea rdi, [rbp+var_2C]; this
call _ZNK7lunasvg4Rect7isEmptyEv; lunasvg::Rect::isEmpty(void)
test al, 1
jnz short loc_D7B8
jmp short loc_D7DC
loc_D7B8:
mov rdi, [rbp+var_A0]
xor esi, esi
mov edx, 8
call _memset
mov rdi, [rbp+var_A0]; this
call _ZN7lunasvg6BitmapC2Ev; lunasvg::Bitmap::Bitmap(void)
jmp loc_D937
loc_D7DC:
cmp [rbp+var_14], 0
jg short loc_D80C
cmp [rbp+var_18], 0
jg short loc_D80C
movss xmm0, [rbp+var_24]; float
call _ZSt4ceilf; std::ceil(float)
cvttss2si eax, xmm0
mov [rbp+var_14], eax
movss xmm0, [rbp+var_24+4]; float
call _ZSt4ceilf; std::ceil(float)
cvttss2si eax, xmm0
mov [rbp+var_18], eax
jmp short loc_D860
loc_D80C:
cmp [rbp+var_14], 0
jle short loc_D835
cmp [rbp+var_18], 0
jg short loc_D835
cvtsi2ss xmm0, [rbp+var_14]
mulss xmm0, [rbp+var_24+4]
divss xmm0, [rbp+var_24]; float
call _ZSt4ceilf; std::ceil(float)
cvttss2si eax, xmm0
mov [rbp+var_18], eax
jmp short loc_D85E
loc_D835:
cmp [rbp+var_18], 0
jle short loc_D85C
cmp [rbp+var_14], 0
jg short loc_D85C
cvtsi2ss xmm0, [rbp+var_18]
mulss xmm0, [rbp+var_24]
divss xmm0, [rbp+var_24+4]; float
call _ZSt4ceilf; std::ceil(float)
cvttss2si eax, xmm0
mov [rbp+var_14], eax
loc_D85C:
jmp short $+2
loc_D85E:
jmp short $+2
loc_D860:
cvtsi2ss xmm0, [rbp+var_14]
movss xmm1, [rbp+var_24]
divss xmm0, xmm1
movss [rbp+var_58], xmm0
cvtsi2ss xmm0, [rbp+var_18]
movss xmm1, [rbp+var_24+4]
divss xmm0, xmm1
movss [rbp+var_5C], xmm0
movss xmm0, [rbp+var_58]; float
movss xmm3, [rbp+var_5C]; float
movaps xmm1, cs:xmmword_8C0D0
movss xmm4, dword ptr [rbp+var_2C]
movss xmm5, dword ptr [rbp+var_2C+4]
pxor xmm4, xmm1
mulss xmm4, xmm0; float
pxor xmm5, xmm1
mulss xmm5, xmm3; float
lea rdi, [rbp+var_74]; this
xorps xmm2, xmm2; float
movaps xmm1, xmm2; float
call _ZN7lunasvg6MatrixC2Effffff; lunasvg::Matrix::Matrix(float,float,float,float,float,float)
mov rdi, [rbp+var_A0]; this
mov [rbp+var_75], 0
mov esi, [rbp+var_14]; int
mov edx, [rbp+var_18]; int
call _ZN7lunasvg6BitmapC2Eii; lunasvg::Bitmap::Bitmap(int,int)
mov rdi, [rbp+var_A0]; this
mov esi, [rbp+var_1C]; unsigned int
call _ZN7lunasvg6Bitmap5clearEj; lunasvg::Bitmap::clear(uint)
jmp short $+2
loc_D8E7:
mov rsi, [rbp+var_A0]; lunasvg::Bitmap *
mov rdi, [rbp+var_90]; this
lea rdx, [rbp+var_74]; lunasvg::Matrix *
call _ZNK7lunasvg7Element6renderERNS_6BitmapERKNS_6MatrixE; lunasvg::Element::render(lunasvg::Bitmap &,lunasvg::Matrix const&)
jmp short $+2
loc_D900:
mov [rbp+var_75], 1
test [rbp+var_75], 1
jnz short loc_D935
jmp short loc_D929
mov rdi, [rbp+var_A0]; this
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
call _ZN7lunasvg6BitmapD2Ev; lunasvg::Bitmap::~Bitmap()
jmp short loc_D947
loc_D929:
mov rdi, [rbp+var_A0]; this
call _ZN7lunasvg6BitmapD2Ev; lunasvg::Bitmap::~Bitmap()
loc_D935:
jmp short $+2
loc_D937:
mov rax, [rbp+var_98]
add rsp, 0B0h
pop rbp
retn
loc_D947:
mov rdi, [rbp+var_80]
call __Unwind_Resume
| lunasvg::Element * lunasvg::Element::renderToBitmap(
lunasvg::Element *this,
lunasvg::SVGNode **a2,
int a3,
int a4,
unsigned int a5,
double a6,
double a7)
{
lunasvg::SVGNode *v7; // rax
lunasvg::SVGNode *v8; // rax
double v9; // xmm0_8
float v10; // xmm0_4
float v11; // xmm0_4
float v12; // xmm0_4
float v13; // xmm0_4
_BYTE v15[24]; // [rsp+3Ch] [rbp-74h] BYREF
float v16; // [rsp+54h] [rbp-5Ch]
float v17; // [rsp+58h] [rbp-58h]
_QWORD v18[2]; // [rsp+5Ch] [rbp-54h] BYREF
_BYTE v19[24]; // [rsp+6Ch] [rbp-44h] BYREF
double v20; // [rsp+84h] [rbp-2Ch] BYREF
double v21; // [rsp+8Ch] [rbp-24h]
unsigned int v22; // [rsp+94h] [rbp-1Ch]
int v23; // [rsp+98h] [rbp-18h]
int v24; // [rsp+9Ch] [rbp-14h]
lunasvg::SVGNode **v25; // [rsp+A0h] [rbp-10h]
lunasvg::Element *v26; // [rsp+A8h] [rbp-8h]
v26 = this;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
if ( *a2 )
{
v7 = lunasvg::Element::element(a2, 1);
(*(void (**)(void))(*(_QWORD *)v7 + 80LL))();
v8 = lunasvg::Element::element(a2, 0);
v9 = (*(double ( **)(lunasvg::SVGNode *))(*(_QWORD *)v8 + 104LL))(v8);
*(double *)v18 = v9;
*(double *)&v18[1] = a7;
lunasvg::Transform::mapRect((lunasvg::Transform *)v19, (const lunasvg::Rect *)v18);
v20 = v9;
v21 = a7;
if ( (lunasvg::Rect::isEmpty((lunasvg::Rect *)&v20) & 1) != 0 )
{
memset(this, 0LL, 8LL);
lunasvg::Bitmap::Bitmap(this);
}
else
{
if ( v24 > 0 || v23 > 0 )
{
if ( v24 <= 0 || v23 > 0 )
{
if ( v23 > 0 && v24 <= 0 )
{
v13 = (float)((float)v23 * *(float *)&v21) / *((float *)&v21 + 1);
std::ceil(v13);
v24 = (int)v13;
}
}
else
{
v12 = (float)((float)v24 * *((float *)&v21 + 1)) / *(float *)&v21;
std::ceil(v12);
v23 = (int)v12;
}
}
else
{
v10 = *(float *)&v21;
std::ceil(*(float *)&v21);
v24 = (int)v10;
v11 = *((float *)&v21 + 1);
std::ceil(*((float *)&v21 + 1));
v23 = (int)v11;
}
v17 = (float)v24 / *(float *)&v21;
v16 = (float)v23 / *((float *)&v21 + 1);
lunasvg::Matrix::Matrix(
(lunasvg::Matrix *)v15,
v17,
0.0,
0.0,
v16,
*(float *)_mm_xor_si128((__m128i)LODWORD(v20), (__m128i)xmmword_8C0D0).m128i_i32 * v17,
*(float *)_mm_xor_si128((__m128i)HIDWORD(v20), (__m128i)xmmword_8C0D0).m128i_i32 * v16);
lunasvg::Bitmap::Bitmap(this, v24, v23);
lunasvg::Bitmap::clear(this, v22);
lunasvg::Element::render(a2, this, (const lunasvg::Matrix *)v15);
}
}
else
{
memset(this, 0LL, 8LL);
lunasvg::Bitmap::Bitmap(this);
}
return this;
}
| renderToBitmap:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0xa0],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x98],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
MOV dword ptr [RBP + -0x1c],R8D
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x90],RAX
CMP qword ptr [RAX],0x0
JNZ 0x0010d743
MOV RDI,qword ptr [RBP + -0xa0]
XOR ESI,ESI
MOV EDX,0x8
CALL 0x0010b1d0
MOV RDI,qword ptr [RBP + -0xa0]
CALL 0x0010e830
JMP 0x0010d937
LAB_0010d743:
MOV RDI,qword ptr [RBP + -0x90]
MOV ESI,0x1
CALL 0x0010d470
MOV RSI,RAX
MOV RAX,qword ptr [RSI]
MOV RAX,qword ptr [RAX + 0x50]
LEA RDI,[RBP + -0x44]
MOV qword ptr [RBP + -0xa8],RDI
CALL RAX
MOV RDI,qword ptr [RBP + -0x90]
XOR ESI,ESI
CALL 0x0010d470
MOV RDI,RAX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x68]
CALL RAX
MOV RDI,qword ptr [RBP + -0xa8]
MOVLPD qword ptr [RBP + -0x54],XMM0
MOVLPD qword ptr [RBP + -0x4c],XMM1
LEA RSI,[RBP + -0x54]
CALL 0x00111ed0
MOVLPD qword ptr [RBP + -0x2c],XMM0
MOVLPD qword ptr [RBP + -0x24],XMM1
LEA RDI,[RBP + -0x2c]
CALL 0x0010e850
TEST AL,0x1
JNZ 0x0010d7b8
JMP 0x0010d7dc
LAB_0010d7b8:
MOV RDI,qword ptr [RBP + -0xa0]
XOR ESI,ESI
MOV EDX,0x8
CALL 0x0010b1d0
MOV RDI,qword ptr [RBP + -0xa0]
CALL 0x0010e830
JMP 0x0010d937
LAB_0010d7dc:
CMP dword ptr [RBP + -0x14],0x0
JG 0x0010d80c
CMP dword ptr [RBP + -0x18],0x0
JG 0x0010d80c
MOVSS XMM0,dword ptr [RBP + -0x24]
CALL 0x0010e890
CVTTSS2SI EAX,XMM0
MOV dword ptr [RBP + -0x14],EAX
MOVSS XMM0,dword ptr [RBP + -0x20]
CALL 0x0010e890
CVTTSS2SI EAX,XMM0
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0010d860
LAB_0010d80c:
CMP dword ptr [RBP + -0x14],0x0
JLE 0x0010d835
CMP dword ptr [RBP + -0x18],0x0
JG 0x0010d835
CVTSI2SS XMM0,dword ptr [RBP + -0x14]
MULSS XMM0,dword ptr [RBP + -0x20]
DIVSS XMM0,dword ptr [RBP + -0x24]
CALL 0x0010e890
CVTTSS2SI EAX,XMM0
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0010d85e
LAB_0010d835:
CMP dword ptr [RBP + -0x18],0x0
JLE 0x0010d85c
CMP dword ptr [RBP + -0x14],0x0
JG 0x0010d85c
CVTSI2SS XMM0,dword ptr [RBP + -0x18]
MULSS XMM0,dword ptr [RBP + -0x24]
DIVSS XMM0,dword ptr [RBP + -0x20]
CALL 0x0010e890
CVTTSS2SI EAX,XMM0
MOV dword ptr [RBP + -0x14],EAX
LAB_0010d85c:
JMP 0x0010d85e
LAB_0010d85e:
JMP 0x0010d860
LAB_0010d860:
CVTSI2SS XMM0,dword ptr [RBP + -0x14]
MOVSS XMM1,dword ptr [RBP + -0x24]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x58],XMM0
CVTSI2SS XMM0,dword ptr [RBP + -0x18]
MOVSS XMM1,dword ptr [RBP + -0x20]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x5c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x58]
MOVSS XMM3,dword ptr [RBP + -0x5c]
MOVAPS XMM1,xmmword ptr [0x0018c0d0]
MOVSS XMM4,dword ptr [RBP + -0x2c]
MOVSS XMM5,dword ptr [RBP + -0x28]
PXOR XMM4,XMM1
MULSS XMM4,XMM0
PXOR XMM5,XMM1
MULSS XMM5,XMM3
LEA RDI,[RBP + -0x74]
XORPS XMM2,XMM2
MOVAPS XMM1,XMM2
CALL 0x0010cba0
MOV RDI,qword ptr [RBP + -0xa0]
MOV byte ptr [RBP + -0x75],0x0
MOV ESI,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RBP + -0x18]
CALL 0x0010c560
MOV RDI,qword ptr [RBP + -0xa0]
MOV ESI,dword ptr [RBP + -0x1c]
LAB_0010d8e0:
CALL 0x0010c870
JMP 0x0010d8e7
LAB_0010d8e7:
MOV RSI,qword ptr [RBP + -0xa0]
MOV RDI,qword ptr [RBP + -0x90]
LEA RDX,[RBP + -0x74]
CALL 0x0010d590
LAB_0010d8fe:
JMP 0x0010d900
LAB_0010d900:
MOV byte ptr [RBP + -0x75],0x1
TEST byte ptr [RBP + -0x75],0x1
JNZ 0x0010d935
JMP 0x0010d929
LAB_0010d929:
MOV RDI,qword ptr [RBP + -0xa0]
CALL 0x0010c6a0
LAB_0010d935:
JMP 0x0010d937
LAB_0010d937:
MOV RAX,qword ptr [RBP + -0x98]
ADD RSP,0xb0
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0010d90a) */
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* lunasvg::Element::renderToBitmap(int, int, unsigned int) const */
Bitmap * lunasvg::Element::renderToBitmap(int param_1,int param_2,uint param_3)
{
long *plVar1;
ulong uVar2;
int in_ECX;
int4 in_register_00000034;
Element *this;
int4 in_register_0000003c;
Bitmap *this_00;
uint in_R8D;
float fVar3;
float in_XMM1_Da;
float in_XMM1_Db;
Matrix local_7c [24];
float local_64;
float local_60;
int8 local_5c [2];
Transform local_4c [24];
int8 local_34;
float local_2c;
float fStack_28;
uint local_24;
int local_20;
uint local_1c;
Element *local_18;
Bitmap *local_10;
this_00 = (Bitmap *)CONCAT44(in_register_0000003c,param_1);
this = (Element *)CONCAT44(in_register_00000034,param_2);
local_1c = param_3;
local_18 = this;
local_10 = this_00;
if (*(long *)this == 0) {
memset(this_00,0,8);
Bitmap::Bitmap(this_00);
}
else {
local_24 = in_R8D;
local_20 = in_ECX;
plVar1 = (long *)element(this,true);
(**(code **)(*plVar1 + 0x50))();
plVar1 = (long *)element(this,false);
local_5c[0] = (**(code **)(*plVar1 + 0x68))();
local_34 = Transform::mapRect(local_4c,(Rect *)local_5c);
local_2c = in_XMM1_Da;
fStack_28 = in_XMM1_Db;
uVar2 = Rect::isEmpty((Rect *)&local_34);
if ((uVar2 & 1) == 0) {
if (((int)local_1c < 1) && (local_20 < 1)) {
fVar3 = (float)std::ceil(local_2c);
local_1c = (uint)fVar3;
fVar3 = (float)std::ceil(fStack_28);
local_20 = (int)fVar3;
}
else if (((int)local_1c < 1) || (0 < local_20)) {
if ((0 < local_20) && ((int)local_1c < 1)) {
fVar3 = (float)std::ceil(((float)local_20 * local_2c) / fStack_28);
local_1c = (uint)fVar3;
}
}
else {
fVar3 = (float)std::ceil(((float)(int)local_1c * fStack_28) / local_2c);
local_20 = (int)fVar3;
}
local_60 = (float)(int)local_1c / local_2c;
local_64 = (float)local_20 / fStack_28;
Matrix::Matrix(local_7c,local_60,0.0,0.0,local_64,
(float)((uint)local_34 ^ _DAT_0018c0d0) * local_60,
(float)(local_34._4_4_ ^ _DAT_0018c0d0) * local_64);
Bitmap::Bitmap(this_00,local_1c,local_20);
/* try { // try from 0010d8e0 to 0010d8fd has its CatchHandler @ 0010d90c */
Bitmap::clear(this_00,local_24);
render(this,this_00,local_7c);
}
else {
memset(this_00,0,8);
Bitmap::Bitmap(this_00);
}
}
return this_00;
}
|
|
5,904 | lunasvg::Element::renderToBitmap(int, int, unsigned int) const | dmazzella[P]pylunasvg/lunasvg/source/lunasvg.cpp | Bitmap Element::renderToBitmap(int width, int height, uint32_t backgroundColor) const
{
if(m_node == nullptr)
return Bitmap();
auto elementBounds = element(true)->localTransform().mapRect(element()->paintBoundingBox());
if(elementBounds.isEmpty())
return Bitmap();
if(width <= 0 && height <= 0) {
width = static_cast<int>(std::ceil(elementBounds.w));
height = static_cast<int>(std::ceil(elementBounds.h));
} else if(width > 0 && height <= 0) {
height = static_cast<int>(std::ceil(width * elementBounds.h / elementBounds.w));
} else if(height > 0 && width <= 0) {
width = static_cast<int>(std::ceil(height * elementBounds.w / elementBounds.h));
}
auto xScale = width / elementBounds.w;
auto yScale = height / elementBounds.h;
Matrix matrix(xScale, 0, 0, yScale, -elementBounds.x * xScale, -elementBounds.y * yScale);
Bitmap bitmap(width, height);
bitmap.clear(backgroundColor);
render(bitmap, matrix);
return bitmap;
} | O2 | cpp | lunasvg::Element::renderToBitmap(int, int, unsigned int) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
cmpq $0x0, (%rsi)
je 0xb461
movl %r8d, %ebp
movl %ecx, %r12d
movl %edx, %r15d
movq %rsi, %r14
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0xb25c
movq (%rax), %rcx
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq *0x50(%rcx)
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
leaq 0x48(%rsp), %rsi
movups %xmm0, (%rsi)
movq %r13, %rdi
callq 0xc55e
movaps %xmm0, %xmm5
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jae 0xb461
movaps %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm2 # xmm2 = xmm2[1,1],xmm1[1,1]
ucomiss %xmm2, %xmm0
jae 0xb461
testl %r15d, %r15d
setg %al
testl %r12d, %r12d
setg %cl
orb %al, %cl
jne 0xb46a
movaps %xmm1, %xmm0
movaps %xmm5, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm2, (%rsp)
callq 0xa1b0
cvttss2si %xmm0, %r15d
movaps (%rsp), %xmm0
jmp 0xb499
andq $0x0, (%rbx)
jmp 0xb517
testl %r12d, %r12d
setg %al
testl %r15d, %r15d
setle %cl
orb %al, %cl
jne 0xb529
cvtsi2ss %r15d, %xmm0
mulss %xmm2, %xmm0
divss %xmm1, %xmm0
movaps %xmm5, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm2, (%rsp)
callq 0xa1b0
movaps (%rsp), %xmm2
movaps 0x10(%rsp), %xmm1
movaps 0x20(%rsp), %xmm5
cvttss2si %xmm0, %r12d
cvtsi2ss %r15d, %xmm0
divss %xmm1, %xmm0
cvtsi2ss %r12d, %xmm3
divss %xmm2, %xmm3
movaps 0x2ec06(%rip), %xmm1 # 0x3a0d0
movaps %xmm5, %xmm4
xorps %xmm1, %xmm4
mulss %xmm0, %xmm4
shufps $0x55, %xmm5, %xmm5 # xmm5 = xmm5[1,1,1,1]
xorps %xmm1, %xmm5
mulss %xmm3, %xmm5
leaq 0x30(%rsp), %rdi
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0xae5c
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0xac02
movq %rbx, %rdi
movl %ebp, %esi
callq 0xace6
leaq 0x30(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb2dc
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r15d, %r15d
setg %al
testl %r12d, %r12d
setle %cl
orb %al, %cl
jne 0xb4b1
cvtsi2ss %r12d, %xmm0
mulss %xmm1, %xmm0
divss %xmm2, %xmm0
movaps %xmm5, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm2, (%rsp)
callq 0xa1b0
movaps (%rsp), %xmm2
movaps 0x10(%rsp), %xmm1
movaps 0x20(%rsp), %xmm5
cvttss2si %xmm0, %r15d
jmp 0xb4b1
movq %rax, %r14
movq %rbx, %rdi
callq 0xac52
movq %r14, %rdi
callq 0xa560
| _ZNK7lunasvg7Element14renderToBitmapEiij:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
cmp qword ptr [rsi], 0
jz loc_B461
mov ebp, r8d
mov r12d, ecx
mov r15d, edx
mov r14, rsi
push 1
pop rsi; bool
mov rdi, r14; this
call _ZNK7lunasvg7Element7elementEb; lunasvg::Element::element(bool)
mov rcx, [rax]
lea r13, [rsp+88h+var_58]
mov rdi, r13
mov rsi, rax
call qword ptr [rcx+50h]
mov rdi, [r14]
mov rax, [rdi]
call qword ptr [rax+68h]
movlhps xmm0, xmm1
lea rsi, [rsp+88h+var_40]; lunasvg::Rect *
movups xmmword ptr [rsi], xmm0
mov rdi, r13; this
call _ZNK7lunasvg9Transform7mapRectERKNS_4RectE; lunasvg::Transform::mapRect(lunasvg::Rect const&)
movaps xmm5, xmm0
xorps xmm0, xmm0
ucomiss xmm0, xmm1
jnb short loc_B461
movaps xmm2, xmm1
shufps xmm2, xmm1, 55h ; 'U'
ucomiss xmm0, xmm2
jnb short loc_B461
test r15d, r15d
setnle al
test r12d, r12d
setnle cl
or cl, al
jnz short loc_B46A
movaps xmm0, xmm1
movaps [rsp+88h+var_68], xmm5
movaps [rsp+88h+var_78], xmm1
movaps [rsp+88h+var_88], xmm2
call _ceilf
cvttss2si r15d, xmm0
movaps xmm0, [rsp+88h+var_88]
jmp short loc_B499
loc_B461:
and qword ptr [rbx], 0
jmp loc_B517
loc_B46A:
test r12d, r12d
setnle al
test r15d, r15d
setle cl
or cl, al
jnz loc_B529
cvtsi2ss xmm0, r15d
mulss xmm0, xmm2
divss xmm0, xmm1
movaps [rsp+88h+var_68], xmm5
movaps [rsp+88h+var_78], xmm1
movaps [rsp+88h+var_88], xmm2
loc_B499:
call _ceilf
movaps xmm2, [rsp+88h+var_88]
movaps xmm1, [rsp+88h+var_78]
movaps xmm5, [rsp+88h+var_68]
cvttss2si r12d, xmm0
loc_B4B1:
cvtsi2ss xmm0, r15d
divss xmm0, xmm1; float
cvtsi2ss xmm3, r12d
divss xmm3, xmm2; float
movaps xmm1, cs:xmmword_3A0D0
movaps xmm4, xmm5
xorps xmm4, xmm1
mulss xmm4, xmm0; float
shufps xmm5, xmm5, 55h ; 'U'
xorps xmm5, xmm1
mulss xmm5, xmm3; float
lea rdi, [rsp+88h+var_58]; this
xorps xmm1, xmm1; float
xorps xmm2, xmm2; float
call _ZN7lunasvg6MatrixC2Effffff; lunasvg::Matrix::Matrix(float,float,float,float,float,float)
mov rdi, rbx; this
mov esi, r15d; int
mov edx, r12d; int
call _ZN7lunasvg6BitmapC2Eii; lunasvg::Bitmap::Bitmap(int,int)
mov rdi, rbx; this
mov esi, ebp; unsigned int
call _ZN7lunasvg6Bitmap5clearEj; lunasvg::Bitmap::clear(uint)
lea rdx, [rsp+88h+var_58]; lunasvg::Matrix *
mov rdi, r14; this
mov rsi, rbx; lunasvg::Bitmap *
call _ZNK7lunasvg7Element6renderERNS_6BitmapERKNS_6MatrixE; lunasvg::Element::render(lunasvg::Bitmap &,lunasvg::Matrix const&)
loc_B517:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B529:
test r15d, r15d
setnle al
test r12d, r12d
setle cl
or cl, al
jnz loc_B4B1
cvtsi2ss xmm0, r12d
mulss xmm0, xmm1
divss xmm0, xmm2
movaps [rsp+88h+var_68], xmm5
movaps [rsp+88h+var_78], xmm1
movaps [rsp+88h+var_88], xmm2
call _ceilf
movaps xmm2, [rsp+88h+var_88]
movaps xmm1, [rsp+88h+var_78]
movaps xmm5, [rsp+88h+var_68]
cvttss2si r15d, xmm0
jmp loc_B4B1
mov r14, rax
mov rdi, rbx; this
call _ZN7lunasvg6BitmapD2Ev; lunasvg::Bitmap::~Bitmap()
mov rdi, r14
call __Unwind_Resume
| lunasvg::Element * lunasvg::Element::renderToBitmap(
lunasvg::Element *this,
lunasvg::Element *a2,
signed int a3,
signed int a4,
__m128 a5,
__m128 a6)
{
long long v8; // rax
__m128 v9; // xmm0
__m128 v10; // xmm5
float v11; // xmm2_4
float v12; // xmm0_4
float v13; // xmm0_4
float v15; // xmm0_4
float v16; // [rsp+0h] [rbp-88h]
__int32 v17; // [rsp+10h] [rbp-78h]
__m128 v18; // [rsp+20h] [rbp-68h]
__m128 v19; // [rsp+20h] [rbp-68h]
_BYTE v20[24]; // [rsp+30h] [rbp-58h] BYREF
__m128 v21[4]; // [rsp+48h] [rbp-40h] BYREF
if ( *(_QWORD *)a2 )
{
v8 = lunasvg::Element::element(a2, 1u);
(*(void ( **)(_BYTE *, long long))(*(_QWORD *)v8 + 80LL))(v20, v8);
*(double *)a5.m128_u64 = (*(double ( **)(_QWORD))(**(_QWORD **)a2 + 104LL))(*(_QWORD *)a2);
v9 = _mm_movelh_ps(a5, a6);
v21[0] = v9;
lunasvg::Transform::mapRect((lunasvg::Transform *)v20, (const lunasvg::Rect *)v21);
v10 = v9;
if ( a6.m128_f32[0] > 0.0 )
{
v11 = _mm_shuffle_ps(a6, a6, 85).m128_f32[0];
if ( v11 > 0.0 )
{
if ( a3 > 0 || a4 > 0 )
{
if ( a4 > 0 || a3 <= 0 )
{
if ( a3 <= 0 && a4 > 0 )
{
v19 = v9;
v15 = ceilf((float)((float)a4 * a6.m128_f32[0]) / v11);
v10 = v19;
a3 = (int)v15;
}
goto LABEL_10;
}
v12 = (float)((float)a3 * v11) / a6.m128_f32[0];
v18 = v10;
v17 = a6.m128_i32[0];
v16 = v11;
}
else
{
v18 = v9;
v17 = a6.m128_i32[0];
v16 = v11;
a3 = (int)ceilf(a6.m128_f32[0]);
v12 = v11;
}
v13 = ceilf(v12);
v11 = v16;
a6.m128_i32[0] = v17;
v10 = v18;
a4 = (int)v13;
LABEL_10:
lunasvg::Matrix::Matrix(
(lunasvg::Matrix *)v20,
(float)a3 / a6.m128_f32[0],
0.0,
0.0,
(float)a4 / v11,
(float)-v10.m128_f32[0] * (float)((float)a3 / a6.m128_f32[0]),
(float)-_mm_shuffle_ps(v10, v10, 85).m128_f32[0] * (float)((float)a4 / v11));
lunasvg::Bitmap::Bitmap(this, a3, a4);
lunasvg::Bitmap::clear(this);
lunasvg::Element::render(a2, this, (const lunasvg::Matrix *)v20);
return this;
}
}
}
*(_QWORD *)this = 0LL;
return this;
}
| renderToBitmap:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
CMP qword ptr [RSI],0x0
JZ 0x0010b461
MOV EBP,R8D
MOV R12D,ECX
MOV R15D,EDX
MOV R14,RSI
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x0010b25c
MOV RCX,qword ptr [RAX]
LEA R13,[RSP + 0x30]
MOV RDI,R13
MOV RSI,RAX
CALL qword ptr [RCX + 0x50]
MOV RDI,qword ptr [R14]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x68]
MOVLHPS XMM0,XMM1
LEA RSI,[RSP + 0x48]
MOVUPS xmmword ptr [RSI],XMM0
MOV RDI,R13
CALL 0x0010c55e
MOVAPS XMM5,XMM0
XORPS XMM0,XMM0
UCOMISS XMM0,XMM1
JNC 0x0010b461
MOVAPS XMM2,XMM1
SHUFPS XMM2,XMM1,0x55
UCOMISS XMM0,XMM2
JNC 0x0010b461
TEST R15D,R15D
SETG AL
TEST R12D,R12D
SETG CL
OR CL,AL
JNZ 0x0010b46a
MOVAPS XMM0,XMM1
MOVAPS xmmword ptr [RSP + 0x20],XMM5
MOVAPS xmmword ptr [RSP + 0x10],XMM1
MOVAPS xmmword ptr [RSP],XMM2
CALL 0x0010a1b0
CVTTSS2SI R15D,XMM0
MOVAPS XMM0,xmmword ptr [RSP]
JMP 0x0010b499
LAB_0010b461:
AND qword ptr [RBX],0x0
JMP 0x0010b517
LAB_0010b46a:
TEST R12D,R12D
SETG AL
TEST R15D,R15D
SETLE CL
OR CL,AL
JNZ 0x0010b529
CVTSI2SS XMM0,R15D
MULSS XMM0,XMM2
DIVSS XMM0,XMM1
MOVAPS xmmword ptr [RSP + 0x20],XMM5
MOVAPS xmmword ptr [RSP + 0x10],XMM1
MOVAPS xmmword ptr [RSP],XMM2
LAB_0010b499:
CALL 0x0010a1b0
MOVAPS XMM2,xmmword ptr [RSP]
MOVAPS XMM1,xmmword ptr [RSP + 0x10]
MOVAPS XMM5,xmmword ptr [RSP + 0x20]
CVTTSS2SI R12D,XMM0
LAB_0010b4b1:
CVTSI2SS XMM0,R15D
DIVSS XMM0,XMM1
CVTSI2SS XMM3,R12D
DIVSS XMM3,XMM2
MOVAPS XMM1,xmmword ptr [0x0013a0d0]
MOVAPS XMM4,XMM5
XORPS XMM4,XMM1
MULSS XMM4,XMM0
SHUFPS XMM5,XMM5,0x55
XORPS XMM5,XMM1
MULSS XMM5,XMM3
LEA RDI,[RSP + 0x30]
XORPS XMM1,XMM1
XORPS XMM2,XMM2
CALL 0x0010ae5c
MOV RDI,RBX
MOV ESI,R15D
MOV EDX,R12D
CALL 0x0010ac02
LAB_0010b4fd:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0010ace6
LEA RDX,[RSP + 0x30]
MOV RDI,R14
MOV RSI,RBX
CALL 0x0010b2dc
LAB_0010b517:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0010b529:
TEST R15D,R15D
SETG AL
TEST R12D,R12D
SETLE CL
OR CL,AL
JNZ 0x0010b4b1
CVTSI2SS XMM0,R12D
MULSS XMM0,XMM1
DIVSS XMM0,XMM2
MOVAPS xmmword ptr [RSP + 0x20],XMM5
MOVAPS xmmword ptr [RSP + 0x10],XMM1
MOVAPS xmmword ptr [RSP],XMM2
CALL 0x0010a1b0
MOVAPS XMM2,xmmword ptr [RSP]
MOVAPS XMM1,xmmword ptr [RSP + 0x10]
MOVAPS XMM5,xmmword ptr [RSP + 0x20]
CVTTSS2SI R15D,XMM0
JMP 0x0010b4b1
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* lunasvg::Element::renderToBitmap(int, int, unsigned int) const */
Bitmap * lunasvg::Element::renderToBitmap(int param_1,int param_2,uint param_3)
{
long *plVar1;
int in_ECX;
int4 in_register_00000034;
Element *this;
int4 in_register_0000003c;
Bitmap *this_00;
float fVar2;
int8 uVar3;
float in_XMM1_Da;
float in_XMM1_Db;
Transform local_58 [24];
int8 local_40 [2];
this_00 = (Bitmap *)CONCAT44(in_register_0000003c,param_1);
this = (Element *)CONCAT44(in_register_00000034,param_2);
if (*(long *)this == 0) {
LAB_0010b461:
*(int8 *)this_00 = 0;
return this_00;
}
plVar1 = (long *)element(this,true);
(**(code **)(*plVar1 + 0x50))(local_58,plVar1);
local_40[0] = (**(code **)(**(long **)this + 0x68))();
uVar3 = Transform::mapRect(local_58,(Rect *)local_40);
if ((in_XMM1_Da <= 0.0) || (in_XMM1_Db <= 0.0)) goto LAB_0010b461;
if (in_ECX < 1 && (int)param_3 < 1) {
fVar2 = ceilf(in_XMM1_Da);
param_3 = (uint)fVar2;
fVar2 = in_XMM1_Db;
}
else {
if ((int)param_3 < 1 || 0 < in_ECX) {
if (0 < in_ECX && (int)param_3 < 1) {
fVar2 = ceilf(((float)in_ECX * in_XMM1_Da) / in_XMM1_Db);
param_3 = (uint)fVar2;
}
goto LAB_0010b4b1;
}
fVar2 = ((float)(int)param_3 * in_XMM1_Db) / in_XMM1_Da;
}
fVar2 = ceilf(fVar2);
in_ECX = (int)fVar2;
LAB_0010b4b1:
Matrix::Matrix((Matrix *)local_58,(float)(int)param_3 / in_XMM1_Da,0.0,0.0,
(float)in_ECX / in_XMM1_Db,
(float)((uint)uVar3 ^ _DAT_0013a0d0) * ((float)(int)param_3 / in_XMM1_Da),
(float)((uint)((ulong)uVar3 >> 0x20) ^ _DAT_0013a0d0) *
((float)in_ECX / in_XMM1_Db));
Bitmap::Bitmap(this_00,param_3,in_ECX);
/* try { // try from 0010b4fd to 0010b516 has its CatchHandler @ 0010b575 */
Bitmap::clear(param_1);
render(this,this_00,(Matrix *)local_58);
return this_00;
}
|
|
5,905 | nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*) | ng-log[P]ng-log/src/utilities.cc | void AlsoErrorWrite(LogSeverity severity, const char* tag,
const char* message) noexcept {
#if defined(NGLOG_OS_WINDOWS)
(void)severity;
(void)tag;
// On Windows, also output to the debugger
::OutputDebugStringA(message);
#elif defined(NGLOG_OS_ANDROID)
constexpr int android_log_levels[] = {
ANDROID_LOG_INFO,
ANDROID_LOG_WARN,
ANDROID_LOG_ERROR,
ANDROID_LOG_FATAL,
};
__android_log_write(android_log_levels[severity], tag, message);
#else
(void)severity;
(void)tag;
(void)message;
#endif
} | O0 | cpp | nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*):
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN5nglog5tools14AlsoErrorWriteENS_11LogSeverityEPKcS3_:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
pop rbp
retn
| void nglog::tools::AlsoErrorWrite()
{
;
}
| AlsoErrorWrite:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
POP RBP
RET
|
/* nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*) */
void nglog::tools::AlsoErrorWrite(void)
{
return;
}
|
|
5,906 | my_strntoull_8bit | eloqsql/strings/ctype-simple.c | ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (overflow)
{
err[0]= ERANGE;
return (~(ulonglong) 0);
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
} | O0 | c | my_strntoull_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rcx
xorl %eax, %eax
cmpq -0x68(%rbp), %rcx
movb %al, -0x76(%rbp)
jae 0x546d8
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x60(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x76(%rbp)
movb -0x76(%rbp), %al
testb $0x1, %al
jne 0x546e1
jmp 0x546f1
jmp 0x546e3
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x546a9
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0x54700
jmp 0x548c1
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x54721
movl $0x1, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x5474b
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x54742
movl $0x0, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x54749
movl $0x0, -0x3c(%rbp)
jmp 0x5474b
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x48(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x4c(%rbp)
movl $0x0, -0x74(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
je 0x54865
movq -0x60(%rbp), %rax
movb (%rax), %al
movb %al, -0x75(%rbp)
movzbl -0x75(%rbp), %eax
cmpl $0x30, %eax
jl 0x547c0
movzbl -0x75(%rbp), %eax
cmpl $0x39, %eax
jg 0x547c0
movzbl -0x75(%rbp), %eax
subl $0x30, %eax
movb %al, -0x75(%rbp)
jmp 0x54808
movzbl -0x75(%rbp), %eax
cmpl $0x41, %eax
jl 0x547e1
movzbl -0x75(%rbp), %eax
cmpl $0x5a, %eax
jg 0x547e1
movzbl -0x75(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movb %al, -0x75(%rbp)
jmp 0x54806
movzbl -0x75(%rbp), %eax
cmpl $0x61, %eax
jl 0x54802
movzbl -0x75(%rbp), %eax
cmpl $0x7a, %eax
jg 0x54802
movzbl -0x75(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movb %al, -0x75(%rbp)
jmp 0x54804
jmp 0x54865
jmp 0x54806
jmp 0x54808
movzbl -0x75(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x54813
jmp 0x54865
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
ja 0x54830
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x54839
movzbl -0x75(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jbe 0x54839
movl $0x1, -0x74(%rbp)
jmp 0x54852
movslq -0x24(%rbp), %rax
imulq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movzbl -0x75(%rbp), %eax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x54854
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x5478b
movq -0x60(%rbp), %rax
cmpq -0x70(%rbp), %rax
jne 0x54871
jmp 0x548c1
cmpq $0x0, -0x30(%rbp)
je 0x54883
movq -0x60(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x0, -0x74(%rbp)
je 0x5489d
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x548e5
cmpl $0x0, -0x3c(%rbp)
je 0x548af
xorl %eax, %eax
subq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x548b7
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x548e5
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x548dd
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
| my_strntoull_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_68], rax
loc_546A9:
mov rcx, [rbp+var_60]
xor eax, eax
cmp rcx, [rbp+var_68]
mov [rbp+var_76], al
jnb short loc_546D8
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_60]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_76], al
loc_546D8:
mov al, [rbp+var_76]
test al, 1
jnz short loc_546E1
jmp short loc_546F1
loc_546E1:
jmp short $+2
loc_546E3:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_546A9
loc_546F1:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_68]
jnz short loc_54700
jmp loc_548C1
loc_54700:
mov rax, [rbp+var_60]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_54721
mov [rbp+var_3C], 1
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_5474B
loc_54721:
mov rax, [rbp+var_60]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_54742
mov [rbp+var_3C], 0
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_54749
loc_54742:
mov [rbp+var_3C], 0
loc_54749:
jmp short $+2
loc_5474B:
mov rax, [rbp+var_60]
mov [rbp+var_70], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov [rbp+var_48], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_4C], eax
mov [rbp+var_74], 0
mov [rbp+var_58], 0
loc_5478B:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_68]
jz loc_54865
mov rax, [rbp+var_60]
mov al, [rax]
mov [rbp+var_75], al
movzx eax, [rbp+var_75]
cmp eax, 30h ; '0'
jl short loc_547C0
movzx eax, [rbp+var_75]
cmp eax, 39h ; '9'
jg short loc_547C0
movzx eax, [rbp+var_75]
sub eax, 30h ; '0'
mov [rbp+var_75], al
jmp short loc_54808
loc_547C0:
movzx eax, [rbp+var_75]
cmp eax, 41h ; 'A'
jl short loc_547E1
movzx eax, [rbp+var_75]
cmp eax, 5Ah ; 'Z'
jg short loc_547E1
movzx eax, [rbp+var_75]
sub eax, 41h ; 'A'
add eax, 0Ah
mov [rbp+var_75], al
jmp short loc_54806
loc_547E1:
movzx eax, [rbp+var_75]
cmp eax, 61h ; 'a'
jl short loc_54802
movzx eax, [rbp+var_75]
cmp eax, 7Ah ; 'z'
jg short loc_54802
movzx eax, [rbp+var_75]
sub eax, 61h ; 'a'
add eax, 0Ah
mov [rbp+var_75], al
jmp short loc_54804
loc_54802:
jmp short loc_54865
loc_54804:
jmp short $+2
loc_54806:
jmp short $+2
loc_54808:
movzx eax, [rbp+var_75]
cmp eax, [rbp+var_24]
jl short loc_54813
jmp short loc_54865
loc_54813:
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
ja short loc_54830
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
jnz short loc_54839
movzx eax, [rbp+var_75]
cmp eax, [rbp+var_4C]
jbe short loc_54839
loc_54830:
mov [rbp+var_74], 1
jmp short loc_54852
loc_54839:
movsxd rax, [rbp+var_24]
imul rax, [rbp+var_58]
mov [rbp+var_58], rax
movzx eax, [rbp+var_75]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
loc_54852:
jmp short $+2
loc_54854:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp loc_5478B
loc_54865:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_70]
jnz short loc_54871
jmp short loc_548C1
loc_54871:
cmp [rbp+var_30], 0
jz short loc_54883
mov rcx, [rbp+var_60]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_54883:
cmp [rbp+var_74], 0
jz short loc_5489D
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_548E5
loc_5489D:
cmp [rbp+var_3C], 0
jz short loc_548AF
xor eax, eax
sub rax, [rbp+var_58]
mov [rbp+var_80], rax
jmp short loc_548B7
loc_548AF:
mov rax, [rbp+var_58]
mov [rbp+var_80], rax
loc_548B7:
mov rax, [rbp+var_80]
mov [rbp+var_8], rax
jmp short loc_548E5
loc_548C1:
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
cmp [rbp+var_30], 0
jz short loc_548DD
mov rcx, [rbp+var_18]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_548DD:
mov [rbp+var_8], 0
loc_548E5:
mov rax, [rbp+var_8]
pop rbp
retn
| long long my_strntoull_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6)
{
bool v8; // [rsp+Ah] [rbp-76h]
unsigned __int8 v9; // [rsp+Bh] [rbp-75h]
unsigned __int8 v10; // [rsp+Bh] [rbp-75h]
int v11; // [rsp+Ch] [rbp-74h]
_BYTE *v12; // [rsp+10h] [rbp-70h]
_BYTE *v13; // [rsp+18h] [rbp-68h]
_BYTE *v14; // [rsp+20h] [rbp-60h]
unsigned long long v15; // [rsp+28h] [rbp-58h]
unsigned long long v16; // [rsp+38h] [rbp-48h]
int v17; // [rsp+44h] [rbp-3Ch]
*a6 = 0;
v14 = a2;
v13 = &a2[a3];
while ( 1 )
{
v8 = 0;
if ( v14 < v13 )
v8 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v14 + 1LL) & 8) != 0;
if ( !v8 )
break;
++v14;
}
if ( v14 == v13 )
goto LABEL_39;
if ( *v14 == 45 )
{
v17 = 1;
++v14;
}
else
{
v17 = 0;
if ( *v14 == 43 )
++v14;
}
v12 = v14;
v16 = 0xFFFFFFFFFFFFFFFFLL / a4;
v11 = 0;
v15 = 0LL;
while ( v14 != v13 )
{
v9 = *v14;
if ( (unsigned __int8)*v14 < 0x30u || v9 > 0x39u )
{
if ( v9 < 0x41u || v9 > 0x5Au )
{
if ( v9 < 0x61u || v9 > 0x7Au )
break;
v10 = v9 - 97 + 10;
}
else
{
v10 = v9 - 65 + 10;
}
}
else
{
v10 = v9 - 48;
}
if ( v10 >= a4 )
break;
if ( v15 > v16 || v15 == v16 && v10 > (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4) )
v11 = 1;
else
v15 = v15 * a4 + v10;
++v14;
}
if ( v14 == v12 )
{
LABEL_39:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v14;
if ( v11 )
{
*a6 = 34;
return -1LL;
}
else if ( v17 )
{
return -(long long)v15;
}
else
{
return v15;
}
}
}
| my_strntoull_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x68],RAX
LAB_001546a9:
MOV RCX,qword ptr [RBP + -0x60]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x68]
MOV byte ptr [RBP + -0x76],AL
JNC 0x001546d8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x60]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x76],AL
LAB_001546d8:
MOV AL,byte ptr [RBP + -0x76]
TEST AL,0x1
JNZ 0x001546e1
JMP 0x001546f1
LAB_001546e1:
JMP 0x001546e3
LAB_001546e3:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001546a9
LAB_001546f1:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x00154700
JMP 0x001548c1
LAB_00154700:
MOV RAX,qword ptr [RBP + -0x60]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x00154721
MOV dword ptr [RBP + -0x3c],0x1
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0015474b
LAB_00154721:
MOV RAX,qword ptr [RBP + -0x60]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2b
JNZ 0x00154742
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00154749
LAB_00154742:
MOV dword ptr [RBP + -0x3c],0x0
LAB_00154749:
JMP 0x0015474b
LAB_0015474b:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x70],RAX
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x48],RAX
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x4c],EAX
MOV dword ptr [RBP + -0x74],0x0
MOV qword ptr [RBP + -0x58],0x0
LAB_0015478b:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x68]
JZ 0x00154865
MOV RAX,qword ptr [RBP + -0x60]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x75],AL
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x30
JL 0x001547c0
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x39
JG 0x001547c0
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x30
MOV byte ptr [RBP + -0x75],AL
JMP 0x00154808
LAB_001547c0:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x41
JL 0x001547e1
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x5a
JG 0x001547e1
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x41
ADD EAX,0xa
MOV byte ptr [RBP + -0x75],AL
JMP 0x00154806
LAB_001547e1:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x61
JL 0x00154802
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x7a
JG 0x00154802
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x61
ADD EAX,0xa
MOV byte ptr [RBP + -0x75],AL
JMP 0x00154804
LAB_00154802:
JMP 0x00154865
LAB_00154804:
JMP 0x00154806
LAB_00154806:
JMP 0x00154808
LAB_00154808:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x00154813
JMP 0x00154865
LAB_00154813:
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x48]
JA 0x00154830
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x00154839
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,dword ptr [RBP + -0x4c]
JBE 0x00154839
LAB_00154830:
MOV dword ptr [RBP + -0x74],0x1
JMP 0x00154852
LAB_00154839:
MOVSXD RAX,dword ptr [RBP + -0x24]
IMUL RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOVZX EAX,byte ptr [RBP + -0x75]
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
LAB_00154852:
JMP 0x00154854
LAB_00154854:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0015478b
LAB_00154865:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x70]
JNZ 0x00154871
JMP 0x001548c1
LAB_00154871:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00154883
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_00154883:
CMP dword ptr [RBP + -0x74],0x0
JZ 0x0015489d
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001548e5
LAB_0015489d:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001548af
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x80],RAX
JMP 0x001548b7
LAB_001548af:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x80],RAX
LAB_001548b7:
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001548e5
LAB_001548c1:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001548dd
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001548dd:
MOV qword ptr [RBP + -0x8],0x0
LAB_001548e5:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,int8 *param_5,
int4 *param_6)
{
int1 auVar1 [16];
int1 auVar2 [16];
bool bVar3;
byte *pbVar4;
byte *pbVar5;
ulong uVar6;
bool bVar7;
ulong local_88;
byte local_7d;
byte *local_68;
ulong local_60;
*param_6 = 0;
pbVar5 = param_2 + param_3;
local_68 = param_2;
while( true ) {
bVar7 = false;
if (local_68 < pbVar5) {
bVar7 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_68) & 8) != 0;
}
if (!bVar7) break;
local_68 = local_68 + 1;
}
if (local_68 != pbVar5) {
if (*local_68 == 0x2d) {
bVar7 = true;
local_68 = local_68 + 1;
}
else {
if (*local_68 == 0x2b) {
local_68 = local_68 + 1;
}
bVar7 = false;
}
pbVar4 = local_68;
auVar1._8_8_ = 0;
auVar1._0_8_ = (long)param_4;
uVar6 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar1,0);
auVar2._8_8_ = 0;
auVar2._0_8_ = (long)param_4;
bVar3 = false;
local_60 = 0;
for (; local_68 != pbVar5; local_68 = local_68 + 1) {
local_7d = *local_68;
if ((local_7d < 0x30) || (0x39 < local_7d)) {
if ((local_7d < 0x41) || (0x5a < local_7d)) {
if ((local_7d < 0x61) || (0x7a < local_7d)) break;
local_7d = local_7d + 0xa9;
}
else {
local_7d = local_7d - 0x37;
}
}
else {
local_7d = local_7d - 0x30;
}
if (param_4 <= (int)(uint)local_7d) break;
if ((uVar6 < local_60) ||
((local_60 == uVar6 &&
(SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar2,0) < (uint)local_7d)))
) {
bVar3 = true;
}
else {
local_60 = (ulong)local_7d + (long)param_4 * local_60;
}
}
if (local_68 != pbVar4) {
if (param_5 != (int8 *)0x0) {
*param_5 = local_68;
}
if (bVar3) {
*param_6 = 0x22;
return 0xffffffffffffffff;
}
if (bVar7) {
local_88 = -local_60;
}
else {
local_88 = local_60;
}
return local_88;
}
}
*param_6 = 0x21;
if (param_5 != (int8 *)0x0) {
*param_5 = param_2;
}
return 0;
}
|
|
5,907 | my_strntoull_8bit | eloqsql/strings/ctype-simple.c | ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (overflow)
{
err[0]= ERANGE;
return (~(ulonglong) 0);
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
} | O3 | c | my_strntoull_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x0, (%r9)
leaq (%rsi,%rdx), %r11
movq %rsi, %r10
testq %rdx, %rdx
jle 0x3f5b1
movq 0x40(%rdi), %rax
movq %rsi, %r10
movzbl (%r10), %edx
testb $0x8, 0x1(%rax,%rdx)
je 0x3f5b1
incq %r10
cmpq %r11, %r10
jb 0x3f59e
cmpq %r11, %r10
je 0x3f699
movb (%r10), %dil
leal -0x2b(%rdi), %eax
andb $-0x3, %al
cmpb $0x1, %al
adcq $0x0, %r10
movslq %ecx, %rbx
movq $-0x1, %rax
xorl %edx, %edx
movq %rbx, -0x38(%rbp)
divq %rbx
xorl %r12d, %r12d
cmpq %r11, %r10
je 0x3f676
movq %rdi, -0x30(%rbp)
movq %r10, %r14
xorl %r15d, %r15d
movq %r15, %rdi
movl %r12d, %r13d
movb (%r14), %r12b
leal -0x30(%r12), %ebx
cmpb $0xa, %bl
jb 0x3f625
leal -0x41(%r12), %ebx
cmpb $0x19, %bl
ja 0x3f614
addb $-0x37, %r12b
jmp 0x3f622
leal -0x61(%r12), %ebx
cmpb $0x19, %bl
ja 0x3f664
addb $-0x57, %r12b
movl %r12d, %ebx
movzbl %bl, %ebx
cmpl %ecx, %ebx
jge 0x3f664
movl $0x1, %r12d
cmpq %rax, %rdi
jbe 0x3f63c
movq %rdi, %r15
jmp 0x3f653
jne 0x3f645
movq %rax, %r15
cmpl %edx, %ebx
ja 0x3f653
imulq -0x38(%rbp), %rdi
movl %ebx, %r15d
addq %rdi, %r15
movl %r13d, %r12d
incq %r14
cmpq %r11, %r14
jne 0x3f5f1
movq %r15, %rdi
movq %r11, %r14
movl %r12d, %r13d
testl %r13d, %r13d
sete %al
movq %rdi, %r12
movq %r14, %r11
movq -0x30(%rbp), %rdi
jmp 0x3f678
movb $0x1, %al
cmpq %r10, %r11
je 0x3f699
testq %r8, %r8
je 0x3f685
movq %r11, (%r8)
testb %al, %al
je 0x3f6ac
movq %r12, %rax
negq %rax
cmpb $0x2d, %dil
cmovneq %r12, %rax
jmp 0x3f6ba
movl $0x21, (%r9)
testq %r8, %r8
je 0x3f6a8
movq %rsi, (%r8)
xorl %eax, %eax
jmp 0x3f6ba
movl $0x22, (%r9)
movq $-0x1, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strntoull_8bit:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov dword ptr [r9], 0
lea r11, [rsi+rdx]
mov r10, rsi
test rdx, rdx
jle short loc_3F5B1
mov rax, [rdi+40h]
mov r10, rsi
loc_3F59E:
movzx edx, byte ptr [r10]
test byte ptr [rax+rdx+1], 8
jz short loc_3F5B1
inc r10
cmp r10, r11
jb short loc_3F59E
loc_3F5B1:
cmp r10, r11
jz loc_3F699
mov dil, [r10]
lea eax, [rdi-2Bh]
and al, 0FDh
cmp al, 1
adc r10, 0
movsxd rbx, ecx
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
mov [rbp+var_38], rbx
div rbx
xor r12d, r12d
cmp r10, r11
jz loc_3F676
mov [rbp+var_30], rdi
mov r14, r10
xor r15d, r15d
loc_3F5F1:
mov rdi, r15
mov r13d, r12d
mov r12b, [r14]
lea ebx, [r12-30h]
cmp bl, 0Ah
jb short loc_3F625
lea ebx, [r12-41h]
cmp bl, 19h
ja short loc_3F614
add r12b, 0C9h
jmp short loc_3F622
loc_3F614:
lea ebx, [r12-61h]
cmp bl, 19h
ja short loc_3F664
add r12b, 0A9h
loc_3F622:
mov ebx, r12d
loc_3F625:
movzx ebx, bl
cmp ebx, ecx
jge short loc_3F664
mov r12d, 1
cmp rdi, rax
jbe short loc_3F63C
mov r15, rdi
jmp short loc_3F653
loc_3F63C:
jnz short loc_3F645
mov r15, rax
cmp ebx, edx
ja short loc_3F653
loc_3F645:
imul rdi, [rbp+var_38]
mov r15d, ebx
add r15, rdi
mov r12d, r13d
loc_3F653:
inc r14
cmp r14, r11
jnz short loc_3F5F1
mov rdi, r15
mov r14, r11
mov r13d, r12d
loc_3F664:
test r13d, r13d
setz al
mov r12, rdi
mov r11, r14
mov rdi, [rbp+var_30]
jmp short loc_3F678
loc_3F676:
mov al, 1
loc_3F678:
cmp r11, r10
jz short loc_3F699
test r8, r8
jz short loc_3F685
mov [r8], r11
loc_3F685:
test al, al
jz short loc_3F6AC
mov rax, r12
neg rax
cmp dil, 2Dh ; '-'
cmovnz rax, r12
jmp short loc_3F6BA
loc_3F699:
mov dword ptr [r9], 21h ; '!'
test r8, r8
jz short loc_3F6A8
mov [r8], rsi
loc_3F6A8:
xor eax, eax
jmp short loc_3F6BA
loc_3F6AC:
mov dword ptr [r9], 22h ; '"'
mov rax, 0FFFFFFFFFFFFFFFFh
loc_3F6BA:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strntoull_8bit(
long long a1,
unsigned __int8 *a2,
long long a3,
int a4,
unsigned __int8 **a5,
_DWORD *a6)
{
unsigned __int8 *v6; // r11
unsigned __int8 *v7; // r10
unsigned __int8 v8; // di
unsigned __int8 *v9; // r10
unsigned long long v10; // rax
unsigned long long v11; // r12
unsigned __int8 *v12; // r14
unsigned long long v13; // r15
unsigned long long v14; // rdi
int v15; // r13d
unsigned __int8 v16; // r12
unsigned __int8 v17; // bl
unsigned __int8 v18; // r12
bool v19; // al
long long result; // rax
unsigned __int8 v21; // [rsp+8h] [rbp-30h]
*a6 = 0;
v6 = &a2[a3];
v7 = a2;
if ( a3 > 0 )
{
v7 = a2;
do
{
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 )
break;
++v7;
}
while ( v7 < v6 );
}
if ( v7 == v6 )
goto LABEL_30;
v8 = *v7;
v9 = &v7[((*v7 - 43) & 0xFD) == 0];
v10 = 0xFFFFFFFFFFFFFFFFLL / a4;
v11 = 0LL;
if ( v9 == v6 )
{
v19 = 1;
}
else
{
v21 = v8;
v12 = v9;
v13 = 0LL;
while ( 1 )
{
v14 = v13;
v15 = v11;
v16 = *v12;
v17 = *v12 - 48;
if ( v17 >= 0xAu )
{
if ( (unsigned __int8)(v16 - 65) > 0x19u )
{
if ( (unsigned __int8)(v16 - 97) > 0x19u )
break;
v18 = v16 - 87;
}
else
{
v18 = v16 - 55;
}
v17 = v18;
}
if ( v17 >= a4 )
break;
LODWORD(v11) = 1;
if ( v13 <= v10 )
{
if ( v13 != v10 || (v13 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) )
{
v13 = a4 * v14 + v17;
LODWORD(v11) = v15;
}
}
if ( ++v12 == v6 )
{
v14 = v13;
v12 = &a2[a3];
v15 = v11;
break;
}
}
v19 = v15 == 0;
v11 = v14;
v6 = v12;
v8 = v21;
}
if ( v6 == v9 )
{
LABEL_30:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v6;
if ( v19 )
{
result = -(long long)v11;
if ( v8 != 45 )
return v11;
}
else
{
*a6 = 34;
return -1LL;
}
}
return result;
}
| my_strntoull_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [R9],0x0
LEA R11,[RSI + RDX*0x1]
MOV R10,RSI
TEST RDX,RDX
JLE 0x0013f5b1
MOV RAX,qword ptr [RDI + 0x40]
MOV R10,RSI
LAB_0013f59e:
MOVZX EDX,byte ptr [R10]
TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8
JZ 0x0013f5b1
INC R10
CMP R10,R11
JC 0x0013f59e
LAB_0013f5b1:
CMP R10,R11
JZ 0x0013f699
MOV DIL,byte ptr [R10]
LEA EAX,[RDI + -0x2b]
AND AL,0xfd
CMP AL,0x1
ADC R10,0x0
MOVSXD RBX,ECX
MOV RAX,-0x1
XOR EDX,EDX
MOV qword ptr [RBP + -0x38],RBX
DIV RBX
XOR R12D,R12D
CMP R10,R11
JZ 0x0013f676
MOV qword ptr [RBP + -0x30],RDI
MOV R14,R10
XOR R15D,R15D
LAB_0013f5f1:
MOV RDI,R15
MOV R13D,R12D
MOV R12B,byte ptr [R14]
LEA EBX,[R12 + -0x30]
CMP BL,0xa
JC 0x0013f625
LEA EBX,[R12 + -0x41]
CMP BL,0x19
JA 0x0013f614
ADD R12B,0xc9
JMP 0x0013f622
LAB_0013f614:
LEA EBX,[R12 + -0x61]
CMP BL,0x19
JA 0x0013f664
ADD R12B,0xa9
LAB_0013f622:
MOV EBX,R12D
LAB_0013f625:
MOVZX EBX,BL
CMP EBX,ECX
JGE 0x0013f664
MOV R12D,0x1
CMP RDI,RAX
JBE 0x0013f63c
MOV R15,RDI
JMP 0x0013f653
LAB_0013f63c:
JNZ 0x0013f645
MOV R15,RAX
CMP EBX,EDX
JA 0x0013f653
LAB_0013f645:
IMUL RDI,qword ptr [RBP + -0x38]
MOV R15D,EBX
ADD R15,RDI
MOV R12D,R13D
LAB_0013f653:
INC R14
CMP R14,R11
JNZ 0x0013f5f1
MOV RDI,R15
MOV R14,R11
MOV R13D,R12D
LAB_0013f664:
TEST R13D,R13D
SETZ AL
MOV R12,RDI
MOV R11,R14
MOV RDI,qword ptr [RBP + -0x30]
JMP 0x0013f678
LAB_0013f676:
MOV AL,0x1
LAB_0013f678:
CMP R11,R10
JZ 0x0013f699
TEST R8,R8
JZ 0x0013f685
MOV qword ptr [R8],R11
LAB_0013f685:
TEST AL,AL
JZ 0x0013f6ac
MOV RAX,R12
NEG RAX
CMP DIL,0x2d
CMOVNZ RAX,R12
JMP 0x0013f6ba
LAB_0013f699:
MOV dword ptr [R9],0x21
TEST R8,R8
JZ 0x0013f6a8
MOV qword ptr [R8],RSI
LAB_0013f6a8:
XOR EAX,EAX
JMP 0x0013f6ba
LAB_0013f6ac:
MOV dword ptr [R9],0x22
MOV RAX,-0x1
LAB_0013f6ba:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,ulong *param_5,
int4 *param_6)
{
byte bVar1;
byte bVar2;
int1 auVar3 [16];
int1 auVar4 [16];
ulong uVar5;
ulong uVar6;
ulong uVar7;
byte *pbVar8;
byte *pbVar9;
byte bVar10;
ulong uVar11;
ulong uVar12;
int iVar13;
byte *pbVar14;
bool bVar15;
*param_6 = 0;
pbVar9 = param_2 + param_3;
pbVar8 = param_2;
if (0 < param_3) {
do {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break;
pbVar8 = pbVar8 + 1;
} while (pbVar8 < pbVar9);
}
if (pbVar8 != pbVar9) {
bVar1 = *pbVar8;
pbVar8 = pbVar8 + ((bVar1 - 0x2b & 0xfd) == 0);
auVar3._8_8_ = 0;
auVar3._0_8_ = (long)param_4;
auVar4 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff);
uVar6 = SUB168(auVar4 / auVar3,0);
uVar7 = 0;
if (pbVar8 == pbVar9) {
bVar15 = true;
}
else {
uVar11 = uVar7;
pbVar14 = pbVar8;
uVar7 = 0;
do {
iVar13 = (int)uVar11;
bVar2 = *pbVar14;
bVar10 = bVar2 - 0x30;
if (9 < bVar10) {
if ((byte)(bVar2 + 0xbf) < 0x1a) {
bVar10 = bVar2 - 0x37;
}
else {
if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_0013f664;
bVar10 = bVar2 + 0xa9;
}
}
if (param_4 <= (int)(uint)bVar10) goto LAB_0013f664;
uVar12 = 1;
uVar5 = uVar7;
if ((uVar7 <= uVar6) &&
((uVar7 != uVar6 || (uVar5 = uVar6, (uint)bVar10 <= SUB164(auVar4 % auVar3,0))))) {
uVar12 = uVar11;
uVar5 = (ulong)bVar10 + uVar7 * (long)param_4;
}
uVar7 = uVar5;
pbVar14 = pbVar14 + 1;
uVar11 = uVar12;
} while (pbVar14 != pbVar9);
iVar13 = (int)uVar12;
pbVar14 = pbVar9;
LAB_0013f664:
pbVar9 = pbVar14;
bVar15 = iVar13 == 0;
}
if (pbVar9 != pbVar8) {
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)pbVar9;
}
if (bVar15) {
if (bVar1 == 0x2d) {
return -uVar7;
}
return uVar7;
}
*param_6 = 0x22;
return 0xffffffffffffffff;
}
}
*param_6 = 0x21;
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)param_2;
}
return 0;
}
|
|
5,908 | LefDefParser::lefwMacroTimingFallcs(double, double) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwMacroTimingFallcs(double min,
double max)
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (!lefwIsMacroTiming)
return LEFW_BAD_ORDER;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) " FALLCS %.11g %.11g ;\n", min, max);
else
fprintf(lefwFile, " FALLCS %.11g %.11g ;\n", min, max);
lefwLines++;
return LEFW_OK;
} | O3 | cpp | LefDefParser::lefwMacroTimingFallcs(double, double):
leaq 0x6b83e(%rip), %rax # 0x8d0f0
movq (%rax), %rdi
testq %rdi, %rdi
je 0x218f1
leaq 0x6ba83(%rip), %rax # 0x8d344
cmpl $0x0, (%rax)
movl $0x2, %eax
je 0x21914
leaq 0x6baca(%rip), %rcx # 0x8d39c
cmpl $0x0, (%rcx)
je 0x21914
pushq %rax
cmpb $0x1, 0x6bafd(%rip) # 0x8d3dc
jne 0x218f7
leaq 0x3af10(%rip), %rsi # 0x5c7f8
movb $0x2, %al
callq 0x55afd
jmp 0x21905
movl $0x1, %eax
retq
leaq 0x3aefa(%rip), %rsi # 0x5c7f8
movb $0x2, %al
callq 0x22e0
leaq 0x6ba30(%rip), %rax # 0x8d33c
incl (%rax)
xorl %eax, %eax
addq $0x8, %rsp
retq
| _ZN12LefDefParser21lefwMacroTimingFallcsEdd:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
test rdi, rdi
jz short loc_218F1
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
cmp dword ptr [rax], 0
mov eax, 2
jz short locret_21914
lea rcx, _ZN12LefDefParser17lefwIsMacroTimingE; LefDefParser::lefwIsMacroTiming
cmp dword ptr [rcx], 0
jz short locret_21914
push rax
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_218F7
lea rsi, aFallcs11g11g; " FALLCS %.11g %.11g ;\n"
mov al, 2
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_21905
loc_218F1:
mov eax, 1
retn
loc_218F7:
lea rsi, aFallcs11g11g; " FALLCS %.11g %.11g ;\n"
mov al, 2
call _fprintf
loc_21905:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
inc dword ptr [rax]
xor eax, eax
add rsp, 8
locret_21914:
retn
| long long LefDefParser::lefwMacroTimingFallcs(
LefDefParser *this,
double a2,
double a3,
long long a4,
int a5,
long long a6,
int a7,
int a8)
{
long long result; // rax
if ( !*(_QWORD *)&LefDefParser::lefwFile )
return 1LL;
result = 2LL;
if ( LefDefParser::lefwDidInit && LefDefParser::lefwIsMacroTiming )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" FALLCS %.11g %.11g ;\n",
a5,
(unsigned int)&LefDefParser::lefwIsMacroTiming,
a7,
a8);
else
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " FALLCS %.11g %.11g ;\n", a2, a3);
++LefDefParser::lefwLines;
return 0LL;
}
return result;
}
| lefwMacroTimingFallcs:
LEA RAX,[0x18d0f0]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x001218f1
LEA RAX,[0x18d344]
CMP dword ptr [RAX],0x0
MOV EAX,0x2
JZ 0x00121914
LEA RCX,[0x18d39c]
CMP dword ptr [RCX],0x0
JZ 0x00121914
PUSH RAX
CMP byte ptr [0x0018d3dc],0x1
JNZ 0x001218f7
LEA RSI,[0x15c7f8]
MOV AL,0x2
CALL 0x00155afd
JMP 0x00121905
LAB_001218f1:
MOV EAX,0x1
RET
LAB_001218f7:
LEA RSI,[0x15c7f8]
MOV AL,0x2
CALL 0x001022e0
LAB_00121905:
LEA RAX,[0x18d33c]
INC dword ptr [RAX]
XOR EAX,EAX
ADD RSP,0x8
LAB_00121914:
RET
|
/* LefDefParser::lefwMacroTimingFallcs(double, double) */
int8 LefDefParser::lefwMacroTimingFallcs(double param_1,double param_2)
{
int8 uVar1;
if (lefwFile != (_IO_FILE *)0x0) {
uVar1 = 2;
if ((lefwDidInit != 0) && (lefwIsMacroTiming != 0)) {
if (lefwWriteEncrypt == '\x01') {
encPrint(lefwFile," FALLCS %.11g %.11g ;\n");
}
else {
fprintf(lefwFile," FALLCS %.11g %.11g ;\n");
}
lefwLines = lefwLines + 1;
uVar1 = 0;
}
return uVar1;
}
return 1;
}
|
|
5,909 | js_typed_array_create | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_create(JSContext *ctx, JSValue ctor,
int argc, JSValue *argv)
{
JSValue ret;
int new_len;
int64_t len;
ret = JS_CallConstructor(ctx, ctor, argc, argv);
if (JS_IsException(ret))
return ret;
/* validate the typed array */
new_len = js_typed_array_get_length_unsafe(ctx, ret);
if (new_len < 0)
goto fail;
if (argc == 1) {
/* ensure that it is large enough */
if (JS_ToLengthFree(ctx, &len, js_dup(argv[0])))
goto fail;
if (new_len < len) {
JS_ThrowTypeError(ctx, "TypedArray length is too small");
fail:
JS_FreeValue(ctx, ret);
return JS_EXCEPTION;
}
}
return ret;
} | O1 | c | js_typed_array_create:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movl %ecx, %r13d
movq %rdi, %r15
movq %rsi, %rcx
movq %rdx, %r8
movl %r13d, %r9d
pushq $0x2
pushq %r12
callq 0x2ee4d
addq $0x10, %rsp
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x77596
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x77319
testl %eax, %eax
js 0x7757b
cmpl $0x1, %r13d
jne 0x77596
movl %eax, %ebp
movq (%r12), %r13
movq 0x8(%r12), %r12
movq %r13, 0x8(%rsp)
cmpl $-0x9, %r12d
jb 0x7751d
movq 0x8(%rsp), %rax
incl (%rax)
subq $0x8, %rsp
leaq 0x10(%rsp), %rsi
movabsq $0x1fffffffffffff, %r9 # imm = 0x1FFFFFFFFFFFFF
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
pushq $0x0
callq 0x26c44
addq $0x10, %rsp
movl %eax, 0x14(%rsp)
movq 0x18(%r15), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1ccb2
cmpl $0x0, 0x14(%rsp)
jne 0x7757b
movl %ebp, %eax
cmpq %rax, 0x8(%rsp)
jle 0x77596
leaq 0x29124(%rip), %rsi # 0xa0695
movq %r15, %rdi
xorl %eax, %eax
callq 0x21953
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1ccb2
movl $0x6, %ebx
xorl %r14d, %r14d
xorl %ecx, %ecx
jmp 0x775a6
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r14, %rcx
andq %rax, %rcx
movl %r14d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_typed_array_create:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, r8
mov r13d, ecx
mov r15, rdi
mov rcx, rsi
mov r8, rdx
mov r9d, r13d
push 2
push r12
call JS_CallConstructorInternal
add rsp, 10h
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jz loc_77596
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call js_typed_array_get_length_unsafe
test eax, eax
js loc_7757B
cmp r13d, 1
jnz loc_77596
mov ebp, eax
mov r13, [r12]
mov r12, [r12+8]
mov [rsp+48h+var_40], r13
cmp r12d, 0FFFFFFF7h
jb short loc_7751D
mov rax, [rsp+48h+var_40]
inc dword ptr [rax]
loc_7751D:
sub rsp, 8
lea rsi, [rsp+50h+var_40]
mov r9, 1FFFFFFFFFFFFFh
mov rdi, r15
mov rdx, r13
mov rcx, r12
xor r8d, r8d
push 0
call JS_ToInt64Clamp
add rsp, 10h
mov [rsp+48h+var_34], eax
mov rdi, [r15+18h]
mov rsi, r13
mov rdx, r12
call JS_FreeValueRT
cmp [rsp+48h+var_34], 0
jnz short loc_7757B
mov eax, ebp
cmp [rsp+48h+var_40], rax
jle short loc_77596
lea rsi, aTypedarrayLeng; "TypedArray length is too small"
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
loc_7757B:
mov rdi, [r15+18h]
mov rsi, r14
mov rdx, rbx
call JS_FreeValueRT
mov ebx, 6
xor r14d, r14d
xor ecx, ecx
jmp short loc_775A6
loc_77596:
mov rax, 0FFFFFFFF00000000h
mov rcx, r14
and rcx, rax
loc_775A6:
mov eax, r14d
or rax, rcx
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long js_typed_array_create(
long long a1,
unsigned long long a2,
long long a3,
unsigned int a4,
_QWORD *a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13)
{
unsigned long long v15; // rax
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
long long v19; // r9
__m128 v20; // xmm4
__m128 v21; // xmm5
unsigned long long v22; // r14
long long v23; // rbx
int length_unsafe; // eax
unsigned int v25; // ebp
_DWORD *v26; // r13
long long v27; // r12
long long v28; // rdx
long long v29; // rcx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
unsigned long long v34; // rcx
char v36; // [rsp+0h] [rbp-48h]
_DWORD *v37; // [rsp+8h] [rbp-40h] BYREF
int v38; // [rsp+14h] [rbp-34h]
v15 = JS_CallConstructorInternal(a1, a2, a3, a2, a3, a4, a6, a7, a8, a9, a10, a11, a12, a13, (long long)a5, 2);
v22 = v15;
v23 = v16;
if ( (_DWORD)v16 == 6 )
goto LABEL_10;
length_unsafe = js_typed_array_get_length_unsafe(a1, v15, v16, v17, v18, v19, a6, a7, a8, a9, v20, v21, a12, a13);
if ( length_unsafe >= 0 )
{
if ( a4 == 1 )
{
v25 = length_unsafe;
v26 = (_DWORD *)*a5;
v27 = a5[1];
v37 = v26;
if ( (unsigned int)v27 >= 0xFFFFFFF7 )
++*v37;
v38 = JS_ToInt64Clamp(a1, (unsigned long long *)&v37, v26, v27, 0LL, 0x1FFFFFFFFFFFFFLL, 0LL);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v27);
if ( v38 )
goto LABEL_9;
if ( (long long)v37 > v25 )
{
JS_ThrowTypeError(
a1,
(long long)"TypedArray length is too small",
v28,
v29,
v30,
v31,
a6,
a7,
a8,
a9,
v32,
v33,
a12,
a13,
v36);
goto LABEL_9;
}
}
LABEL_10:
v34 = v22 & 0xFFFFFFFF00000000LL;
return v34 | (unsigned int)v22;
}
LABEL_9:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v22, v23);
LODWORD(v22) = 0;
v34 = 0LL;
return v34 | (unsigned int)v22;
}
| js_typed_array_create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,R8
MOV R13D,ECX
MOV R15,RDI
MOV RCX,RSI
MOV R8,RDX
MOV R9D,R13D
PUSH 0x2
PUSH R12
CALL 0x0012ee4d
ADD RSP,0x10
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x00177596
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00177319
TEST EAX,EAX
JS 0x0017757b
CMP R13D,0x1
JNZ 0x00177596
MOV EBP,EAX
MOV R13,qword ptr [R12]
MOV R12,qword ptr [R12 + 0x8]
MOV qword ptr [RSP + 0x8],R13
CMP R12D,-0x9
JC 0x0017751d
MOV RAX,qword ptr [RSP + 0x8]
INC dword ptr [RAX]
LAB_0017751d:
SUB RSP,0x8
LEA RSI,[RSP + 0x10]
MOV R9,0x1fffffffffffff
MOV RDI,R15
MOV RDX,R13
MOV RCX,R12
XOR R8D,R8D
PUSH 0x0
CALL 0x00126c44
ADD RSP,0x10
MOV dword ptr [RSP + 0x14],EAX
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R13
MOV RDX,R12
CALL 0x0011ccb2
CMP dword ptr [RSP + 0x14],0x0
JNZ 0x0017757b
MOV EAX,EBP
CMP qword ptr [RSP + 0x8],RAX
JLE 0x00177596
LEA RSI,[0x1a0695]
MOV RDI,R15
XOR EAX,EAX
CALL 0x00121953
LAB_0017757b:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011ccb2
MOV EBX,0x6
XOR R14D,R14D
XOR ECX,ECX
JMP 0x001775a6
LAB_00177596:
MOV RAX,-0x100000000
MOV RCX,R14
AND RCX,RAX
LAB_001775a6:
MOV EAX,R14D
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_typed_array_create
(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5)
{
int *piVar1;
int8 uVar2;
uint uVar3;
ulong uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
int *local_40;
int local_34;
auVar5 = JS_CallConstructorInternal();
uVar4 = auVar5._0_8_;
if (auVar5._8_4_ == 6) {
LAB_00177596:
uVar4 = uVar4 & 0xffffffff00000000;
}
else {
uVar3 = js_typed_array_get_length_unsafe(param_1,uVar4,auVar5._8_8_);
if (-1 < (int)uVar3) {
if (param_4 != 1) goto LAB_00177596;
piVar1 = (int *)*param_5;
uVar2 = param_5[1];
if (0xfffffff6 < (uint)uVar2) {
*piVar1 = *piVar1 + 1;
}
local_40 = piVar1;
local_34 = JS_ToInt64Clamp(param_1,&local_40,piVar1,uVar2,0,0x1fffffffffffff,0);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),piVar1,uVar2);
if (local_34 == 0) {
if ((long)local_40 <= (long)(ulong)uVar3) goto LAB_00177596;
JS_ThrowTypeError(param_1,"TypedArray length is too small");
}
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,auVar5._8_8_);
auVar5 = ZEXT816(6) << 0x40;
uVar4 = 0;
}
auVar6._0_8_ = auVar5._0_8_ & 0xffffffff | uVar4;
auVar6._8_8_ = auVar5._8_8_;
return auVar6;
}
|
|
5,910 | js_typed_array_create | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_create(JSContext *ctx, JSValue ctor,
int argc, JSValue *argv)
{
JSValue ret;
int new_len;
int64_t len;
ret = JS_CallConstructor(ctx, ctor, argc, argv);
if (JS_IsException(ret))
return ret;
/* validate the typed array */
new_len = js_typed_array_get_length_unsafe(ctx, ret);
if (new_len < 0)
goto fail;
if (argc == 1) {
/* ensure that it is large enough */
if (JS_ToLengthFree(ctx, &len, js_dup(argv[0])))
goto fail;
if (new_len < len) {
JS_ThrowTypeError(ctx, "TypedArray length is too small");
fail:
JS_FreeValue(ctx, ret);
return JS_EXCEPTION;
}
}
return ret;
} | O3 | c | js_typed_array_create:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movl %ecx, %ebp
movq %rdi, %r15
movq %rsi, %rcx
movq %rdx, %r8
movl %ebp, %r9d
pushq $0x2
pushq %r12
callq 0x2fc36
addq $0x10, %rsp
movq %rax, %rbx
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x79f84
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x79d60
testl %eax, %eax
js 0x79f57
cmpl $0x1, %ebp
jne 0x79f84
movl %eax, %r13d
movq (%r12), %rdx
movq 0x8(%r12), %rcx
cmpl $-0x9, %ecx
jb 0x79f2e
incl (%rdx)
movq %rsp, %rsi
movq %r15, %rdi
callq 0x4864e
testl %eax, %eax
jne 0x79f57
movl %r13d, %eax
cmpq %rax, (%rsp)
jle 0x79f84
leaq 0x29702(%rip), %rsi # 0xa364f
movq %r15, %rdi
xorl %eax, %eax
callq 0x2214f
cmpl $-0x9, %r14d
jb 0x79f78
movq 0x18(%r15), %rdi
movl (%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbx)
cmpl $0x1, %eax
jg 0x79f78
movq %rbx, %rsi
movq %r14, %rdx
callq 0x20d90
xorl %ebx, %ebx
xorl %ecx, %ecx
movl $0x6, %r14d
jmp 0x79f94
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %rbx, %rcx
andq %rax, %rcx
movl %ebx, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_typed_array_create:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, r8
mov ebp, ecx
mov r15, rdi
mov rcx, rsi
mov r8, rdx
mov r9d, ebp
push 2
push r12
call JS_CallConstructorInternal
add rsp, 10h
mov rbx, rax
mov r14, rdx
cmp r14d, 6
jz loc_79F84
mov rdi, r15
mov rsi, rbx
mov rdx, r14
call js_typed_array_get_length_unsafe
test eax, eax
js short loc_79F57
cmp ebp, 1
jnz short loc_79F84
mov r13d, eax
mov rdx, [r12]
mov rcx, [r12+8]
cmp ecx, 0FFFFFFF7h
jb short loc_79F2E
inc dword ptr [rdx]
loc_79F2E:
mov rsi, rsp
mov rdi, r15
call JS_ToLengthFree
test eax, eax
jnz short loc_79F57
mov eax, r13d
cmp [rsp+38h+var_38], rax
jle short loc_79F84
lea rsi, aTypedarrayLeng; "TypedArray length is too small"
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
loc_79F57:
cmp r14d, 0FFFFFFF7h
jb short loc_79F78
mov rdi, [r15+18h]
mov eax, [rbx]
lea ecx, [rax-1]
mov [rbx], ecx
cmp eax, 1
jg short loc_79F78
mov rsi, rbx
mov rdx, r14
call js_free_value_rt
loc_79F78:
xor ebx, ebx
xor ecx, ecx
mov r14d, 6
jmp short loc_79F94
loc_79F84:
mov rax, 0FFFFFFFF00000000h
mov rcx, rbx
and rcx, rax
loc_79F94:
mov eax, ebx
or rax, rcx
mov rdx, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long js_typed_array_create(
long long a1,
long long a2,
long long a3,
unsigned int a4,
int **a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13)
{
long long v13; // rax
unsigned long long v16; // rax
long long v17; // rdx
long long v18; // rcx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
unsigned long long v23; // rbx
long long v24; // r14
int length_unsafe; // eax
long long v26; // r8
long long v27; // r9
unsigned int v28; // r13d
int *v29; // rdx
long long v30; // rcx
long long v31; // rdx
long long v32; // rcx
__m128 v33; // xmm4
__m128 v34; // xmm5
long long v35; // rdi
int v36; // eax
long long v37; // rcx
unsigned long long v38; // rcx
unsigned long long v40[7]; // [rsp+0h] [rbp-38h] BYREF
v40[0] = v13;
v16 = JS_CallConstructorInternal(a1, a2, a3, a2, a3, a4, a6, a7, a8, a9, a10, a11, a12, a13, (long long)a5, 2);
v23 = v16;
v24 = v17;
if ( (_DWORD)v17 == 6 )
goto LABEL_13;
length_unsafe = js_typed_array_get_length_unsafe(a1, v16, v17, v18, v19, v20, a6, a7, a8, a9, v21, v22, a12, a13);
if ( length_unsafe < 0 )
goto LABEL_9;
if ( a4 != 1 )
goto LABEL_13;
v28 = length_unsafe;
v29 = *a5;
v30 = (long long)a5[1];
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
++*v29;
if ( (unsigned int)JS_ToLengthFree(a1, v40, v29, v30) )
goto LABEL_9;
if ( (long long)v40[0] <= v28 )
{
LABEL_13:
v38 = v23 & 0xFFFFFFFF00000000LL;
return v38 | (unsigned int)v23;
}
JS_ThrowTypeError(
a1,
(long long)"TypedArray length is too small",
v31,
v32,
v26,
v27,
a6,
a7,
a8,
a9,
v33,
v34,
a12,
a13,
v40[0]);
LABEL_9:
if ( (unsigned int)v24 >= 0xFFFFFFF7 )
{
v35 = *(_QWORD *)(a1 + 24);
v36 = *(_DWORD *)v23;
v37 = (unsigned int)(*(_DWORD *)v23 - 1);
*(_DWORD *)v23 = v37;
if ( v36 <= 1 )
js_free_value_rt(v35, (_QWORD *)v23, v24, v37, v26, v27);
}
LODWORD(v23) = 0;
v38 = 0LL;
return v38 | (unsigned int)v23;
}
| js_typed_array_create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,R8
MOV EBP,ECX
MOV R15,RDI
MOV RCX,RSI
MOV R8,RDX
MOV R9D,EBP
PUSH 0x2
PUSH R12
CALL 0x0012fc36
ADD RSP,0x10
MOV RBX,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x00179f84
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
CALL 0x00179d60
TEST EAX,EAX
JS 0x00179f57
CMP EBP,0x1
JNZ 0x00179f84
MOV R13D,EAX
MOV RDX,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
CMP ECX,-0x9
JC 0x00179f2e
INC dword ptr [RDX]
LAB_00179f2e:
MOV RSI,RSP
MOV RDI,R15
CALL 0x0014864e
TEST EAX,EAX
JNZ 0x00179f57
MOV EAX,R13D
CMP qword ptr [RSP],RAX
JLE 0x00179f84
LEA RSI,[0x1a364f]
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012214f
LAB_00179f57:
CMP R14D,-0x9
JC 0x00179f78
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [RBX]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBX],ECX
CMP EAX,0x1
JG 0x00179f78
MOV RSI,RBX
MOV RDX,R14
CALL 0x00120d90
LAB_00179f78:
XOR EBX,EBX
XOR ECX,ECX
MOV R14D,0x6
JMP 0x00179f94
LAB_00179f84:
MOV RAX,-0x100000000
MOV RCX,RBX
AND RCX,RAX
LAB_00179f94:
MOV EAX,EBX
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_typed_array_create
(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5)
{
int8 uVar1;
uint uVar2;
int iVar3;
long in_RAX;
int *piVar4;
ulong uVar5;
int1 auVar6 [16];
int1 auVar7 [16];
long local_38;
local_38 = in_RAX;
auVar6 = JS_CallConstructorInternal();
piVar4 = auVar6._0_8_;
if (auVar6._8_4_ == 6) {
LAB_00179f84:
uVar5 = (ulong)piVar4 & 0xffffffff00000000;
}
else {
uVar2 = js_typed_array_get_length_unsafe(param_1,piVar4,auVar6._8_8_);
if (-1 < (int)uVar2) {
if (param_4 != 1) goto LAB_00179f84;
if (0xfffffff6 < (uint)param_5[1]) {
*(int *)*param_5 = *(int *)*param_5 + 1;
}
iVar3 = JS_ToLengthFree(param_1,&local_38);
if (iVar3 == 0) {
if (local_38 <= (long)(ulong)uVar2) goto LAB_00179f84;
JS_ThrowTypeError(param_1,"TypedArray length is too small");
}
}
if (0xfffffff6 < auVar6._8_4_) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar3 = *piVar4;
*piVar4 = iVar3 + -1;
if (iVar3 < 2) {
js_free_value_rt(uVar1,piVar4,auVar6._8_8_);
}
}
uVar5 = 0;
auVar6 = ZEXT816(6) << 0x40;
}
auVar7._0_8_ = auVar6._0_8_ & 0xffffffff | uVar5;
auVar7._8_8_ = auVar6._8_8_;
return auVar7;
}
|
|
5,911 | JS_LoadModule | bluesky950520[P]quickjs/quickjs.c | JSValue JS_LoadModule(JSContext *ctx, const char *basename,
const char *filename)
{
JSValue promise, resolving_funcs[2];
promise = JS_NewPromiseCapability(ctx, resolving_funcs);
if (JS_IsException(promise))
return JS_EXCEPTION;
JS_LoadModuleInternal(ctx, basename, filename,
(JSValueConst *)resolving_funcs);
JS_FreeValue(ctx, resolving_funcs[0]);
JS_FreeValue(ctx, resolving_funcs[1]);
return promise;
} | O2 | c | JS_LoadModule:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
movq %rsp, %rsi
callq 0x2956d
movq %rdx, %rbx
cmpl $0x6, %ebx
jne 0x29521
pushq $0x6
popq %rbx
xorl %r14d, %r14d
jmp 0x29558
movq %rax, %r14
movq %rsp, %rbp
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x29577
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %r15, %rdi
callq 0x1801e
movq 0x10(%rbp), %rsi
movq 0x18(%rbp), %rdx
movq %r15, %rdi
callq 0x1801e
movq %r14, %rax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_LoadModule:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, rdx
mov r13, rsi
mov r15, rdi
mov rsi, rsp
call JS_NewPromiseCapability
mov rbx, rdx
cmp ebx, 6
jnz short loc_29521
push 6
pop rbx
xor r14d, r14d
jmp short loc_29558
loc_29521:
mov r14, rax
mov rbp, rsp
mov rdi, r15
mov rsi, r13
mov rdx, r12
mov rcx, rbp
call JS_LoadModuleInternal
mov rsi, [rbp+0]
mov rdx, [rbp+8]
mov rdi, r15
call JS_FreeValue
mov rsi, [rbp+10h]
mov rdx, [rbp+18h]
mov rdi, r15
call JS_FreeValue
loc_29558:
mov rax, r14
mov rdx, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long JS_LoadModule(long long a1, long long a2, long long a3)
{
long long v4; // rax
int v5; // edx
long long v6; // r14
long long v8[11]; // [rsp+0h] [rbp-58h] BYREF
v4 = JS_NewPromiseCapability(a1, v8);
if ( v5 == 6 )
return 0LL;
v6 = v4;
JS_LoadModuleInternal(a1, a2, a3, v8);
JS_FreeValue(a1, v8[0], v8[1]);
JS_FreeValue(a1, v8[2], v8[3]);
return v6;
}
| JS_LoadModule:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,RDX
MOV R13,RSI
MOV R15,RDI
MOV RSI,RSP
CALL 0x0012956d
MOV RBX,RDX
CMP EBX,0x6
JNZ 0x00129521
PUSH 0x6
POP RBX
XOR R14D,R14D
JMP 0x00129558
LAB_00129521:
MOV R14,RAX
MOV RBP,RSP
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
MOV RCX,RBP
CALL 0x00129577
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
MOV RDI,R15
CALL 0x0011801e
MOV RSI,qword ptr [RBP + 0x10]
MOV RDX,qword ptr [RBP + 0x18]
MOV RDI,R15
CALL 0x0011801e
LAB_00129558:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] JS_LoadModule(int8 param_1,int8 param_2,int8 param_3)
{
int1 auVar1 [16];
int8 local_58;
int8 local_50;
int8 local_48;
int8 local_40;
auVar1 = JS_NewPromiseCapability(param_1,&local_58);
if (auVar1._8_4_ == 6) {
auVar1 = ZEXT816(6) << 0x40;
}
else {
JS_LoadModuleInternal(param_1,param_2,param_3,&local_58);
JS_FreeValue(param_1,local_58,local_50);
JS_FreeValue(param_1,local_48,local_40);
}
return auVar1;
}
|
|
5,912 | fmt::v10::detail::bigint::assign_pow10(int) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR20 void assign_pow10(int exp) {
FMT_ASSERT(exp >= 0, "");
if (exp == 0) return *this = 1;
// Find the top bit.
int bitmask = 1;
while (exp >= bitmask) bitmask <<= 1;
bitmask >>= 1;
// pow(10, exp) = pow(5, exp) * pow(2, exp). First compute pow(5, exp) by
// repeated squaring and multiplication.
*this = 5;
bitmask >>= 1;
while (bitmask != 0) {
square();
if ((exp & bitmask) != 0) *this *= 5;
bitmask >>= 1;
}
*this <<= exp; // Multiply by pow(2, exp) by shifting.
} | O0 | c | fmt::v10::detail::bigint::assign_pow10(int):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x1c(%rsp)
setge %al
andb $0x1, %al
movb %al, 0x1b(%rsp)
leaq 0x1b(%rsp), %rdi
leaq 0x7b5e3(%rip), %rsi # 0x155fb4
callq 0x889b0
cmpl $0x0, 0x1c(%rsp)
jne 0xda9f1
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0xda950
jmp 0xdaa79
movl $0x1, 0x14(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x14(%rsp), %eax
jl 0xdaa0f
movl 0x14(%rsp), %eax
shll %eax
movl %eax, 0x14(%rsp)
jmp 0xda9f9
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %eax
sarl %eax
movl %eax, 0x14(%rsp)
movl $0x5, %esi
callq 0xda950
movl 0x14(%rsp), %eax
sarl %eax
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
je 0xdaa6b
movq 0x8(%rsp), %rdi
callq 0xdb6e0
movl 0x1c(%rsp), %eax
andl 0x14(%rsp), %eax
cmpl $0x0, %eax
je 0xdaa5f
movq 0x8(%rsp), %rdi
movl $0x5, %esi
callq 0xdadd0
movl 0x14(%rsp), %eax
sarl %eax
movl %eax, 0x14(%rsp)
jmp 0xdaa32
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0xda810
addq $0x28, %rsp
retq
nop
| _ZN3fmt3v106detail6bigint12assign_pow10Ei:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_C], esi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
cmp [rsp+28h+var_C], 0
setnl al
and al, 1
mov [rsp+28h+var_D], al
lea rdi, [rsp+28h+var_D]
lea rsi, aSFromSSMsTotal+1Ah; ""
call _ZN3fmt3v106detail13ignore_unusedIJbA1_cEEEvDpRKT_; fmt::v10::detail::ignore_unused<bool,char [1]>(bool,char [1] const&)
cmp [rsp+28h+var_C], 0
jnz short loc_DA9F1
mov rdi, [rsp+28h+var_20]
mov esi, 1
call _ZN3fmt3v106detail6bigintaSIiEEvT_; fmt::v10::detail::bigint::operator=<int>(int)
jmp loc_DAA79
loc_DA9F1:
mov [rsp+28h+var_14], 1
loc_DA9F9:
mov eax, [rsp+28h+var_C]
cmp eax, [rsp+28h+var_14]
jl short loc_DAA0F
mov eax, [rsp+28h+var_14]
shl eax, 1
mov [rsp+28h+var_14], eax
jmp short loc_DA9F9
loc_DAA0F:
mov rdi, [rsp+28h+var_20]
mov eax, [rsp+28h+var_14]
sar eax, 1
mov [rsp+28h+var_14], eax
mov esi, 5
call _ZN3fmt3v106detail6bigintaSIiEEvT_; fmt::v10::detail::bigint::operator=<int>(int)
mov eax, [rsp+28h+var_14]
sar eax, 1
mov [rsp+28h+var_14], eax
loc_DAA32:
cmp [rsp+28h+var_14], 0
jz short loc_DAA6B
mov rdi, [rsp+28h+var_20]; this
call _ZN3fmt3v106detail6bigint6squareEv; fmt::v10::detail::bigint::square(void)
mov eax, [rsp+28h+var_C]
and eax, [rsp+28h+var_14]
cmp eax, 0
jz short loc_DAA5F
mov rdi, [rsp+28h+var_20]
mov esi, 5
call _ZN3fmt3v106detail6bigintmLIiEERS2_T_; fmt::v10::detail::bigint::operator*=<int>(int)
loc_DAA5F:
mov eax, [rsp+28h+var_14]
sar eax, 1
mov [rsp+28h+var_14], eax
jmp short loc_DAA32
loc_DAA6B:
mov rdi, [rsp+28h+var_20]
mov esi, [rsp+28h+var_C]
call _ZN3fmt3v106detail6bigintlSEi; fmt::v10::detail::bigint::operator<<=(int)
loc_DAA79:
add rsp, 28h
retn
| long long fmt::v10::detail::bigint::assign_pow10(fmt::v10::detail::bigint *this, int a2)
{
int i; // [rsp+14h] [rbp-14h]
int j; // [rsp+14h] [rbp-14h]
fmt::v10::detail::ignore_unused<bool,char [1]>();
if ( !a2 )
return fmt::v10::detail::bigint::operator=<int>((long long)this, 1);
for ( i = 1; a2 >= i; i *= 2 )
;
fmt::v10::detail::bigint::operator=<int>((long long)this, 5);
for ( j = i >> 2; j; j >>= 1 )
{
fmt::v10::detail::bigint::square(this);
if ( (j & a2) != 0 )
fmt::v10::detail::bigint::operator*=<int>(this, 5LL);
}
return fmt::v10::detail::bigint::operator<<=((long long)this, a2);
}
| assign_pow10:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0x1c],0x0
SETGE AL
AND AL,0x1
MOV byte ptr [RSP + 0x1b],AL
LEA RDI,[RSP + 0x1b]
LEA RSI,[0x255fb4]
CALL 0x001889b0
CMP dword ptr [RSP + 0x1c],0x0
JNZ 0x001da9f1
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x1
CALL 0x001da950
JMP 0x001daa79
LAB_001da9f1:
MOV dword ptr [RSP + 0x14],0x1
LAB_001da9f9:
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,dword ptr [RSP + 0x14]
JL 0x001daa0f
MOV EAX,dword ptr [RSP + 0x14]
SHL EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001da9f9
LAB_001daa0f:
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x14]
SAR EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
MOV ESI,0x5
CALL 0x001da950
MOV EAX,dword ptr [RSP + 0x14]
SAR EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
LAB_001daa32:
CMP dword ptr [RSP + 0x14],0x0
JZ 0x001daa6b
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001db6e0
MOV EAX,dword ptr [RSP + 0x1c]
AND EAX,dword ptr [RSP + 0x14]
CMP EAX,0x0
JZ 0x001daa5f
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x5
CALL 0x001dadd0
LAB_001daa5f:
MOV EAX,dword ptr [RSP + 0x14]
SAR EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001daa32
LAB_001daa6b:
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x1c]
CALL 0x001da810
LAB_001daa79:
ADD RSP,0x28
RET
|
/* fmt::v10::detail::bigint::assign_pow10(int) */
void __thiscall fmt::v10::detail::bigint::assign_pow10(bigint *this,int param_1)
{
uint local_14;
bool local_d;
uint local_c;
bigint *local_8;
local_d = -1 < param_1;
local_c = param_1;
local_8 = this;
ignore_unused<bool,char[1]>(&local_d,"");
if (local_c == 0) {
operator=(this,1);
}
else {
for (local_14 = 1; (int)local_14 <= (int)local_c; local_14 = local_14 << 1) {
}
operator=(this,5);
for (local_14 = (int)local_14 >> 2; local_14 != 0; local_14 = (int)local_14 >> 1) {
square(this);
if ((local_c & local_14) != 0) {
operator*=(this,5);
}
}
operator<<=(this,local_c);
}
return;
}
|
|
5,913 | init_file_class(unsigned int) | eloqsql/storage/perfschema/pfs_instr_class.cc | int init_file_class(uint file_class_sizing)
{
int result= 0;
file_class_dirty_count= file_class_allocated_count= 0;
file_class_max= file_class_sizing;
file_class_lost= 0;
if (file_class_max > 0)
{
file_class_array= PFS_MALLOC_ARRAY(& builtin_memory_file_class,
file_class_max,
sizeof(PFS_file_class), PFS_file_class,
MYF(MY_ZEROFILL));
if (unlikely(file_class_array == NULL))
return 1;
}
else
file_class_array= NULL;
return result;
} | O0 | cpp | init_file_class(unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, 0x3ccc88(%rip) # 0x40f2d4
movl $0x0, 0x3ccc82(%rip) # 0x40f2d8
movl -0x8(%rbp), %eax
movq %rax, 0x3cc3e0(%rip) # 0x40ea40
movq $0x0, 0x3cc3dd(%rip) # 0x40ea48
cmpq $0x0, 0x3cc3cd(%rip) # 0x40ea40
jbe 0x426b9
movq 0x3cc3c4(%rip), %rsi # 0x40ea40
leaq 0x3c9b7d(%rip), %rdi # 0x40c200
movl $0x140, %edx # imm = 0x140
movl $0x20, %ecx
callq 0x298c0
movq %rax, 0x3ccbef(%rip) # 0x40f288
cmpq $0x0, 0x3ccbe7(%rip) # 0x40f288
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x426b7
movl $0x1, -0x4(%rbp)
jmp 0x426ca
jmp 0x426c4
movq $0x0, 0x3ccbc4(%rip) # 0x40f288
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _Z15init_file_classj:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], edi
mov [rbp+var_C], 0
mov cs:_ZL26file_class_allocated_count, 0; file_class_allocated_count
mov cs:_ZL22file_class_dirty_count, 0; file_class_dirty_count
mov eax, [rbp+var_8]
mov cs:file_class_max, rax
mov cs:file_class_lost, 0
cmp cs:file_class_max, 0
jbe short loc_426B9
mov rsi, cs:file_class_max
lea rdi, builtin_memory_file_class
mov edx, 140h
mov ecx, 20h ; ' '
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:file_class_array, rax
cmp cs:file_class_array, 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_426B7
mov [rbp+var_4], 1
jmp short loc_426CA
loc_426B7:
jmp short loc_426C4
loc_426B9:
mov cs:file_class_array, 0
loc_426C4:
mov eax, [rbp+var_C]
mov [rbp+var_4], eax
loc_426CA:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
| _BOOL8 init_file_class(unsigned int a1)
{
file_class_allocated_count = 0;
file_class_dirty_count = 0;
file_class_max = a1;
file_class_lost = 0LL;
if ( !a1 )
{
file_class_array = 0LL;
return 0;
}
file_class_array = pfs_malloc_array(
(PFS_builtin_memory_class *)&builtin_memory_file_class,
file_class_max,
0x140uLL,
32);
return !file_class_array;
}
| init_file_class:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [0x0050f2d4],0x0
MOV dword ptr [0x0050f2d8],0x0
MOV EAX,dword ptr [RBP + -0x8]
MOV qword ptr [0x0050ea40],RAX
MOV qword ptr [0x0050ea48],0x0
CMP qword ptr [0x0050ea40],0x0
JBE 0x001426b9
MOV RSI,qword ptr [0x0050ea40]
LEA RDI,[0x50c200]
MOV EDX,0x140
MOV ECX,0x20
CALL 0x001298c0
MOV qword ptr [0x0050f288],RAX
CMP qword ptr [0x0050f288],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001426b7
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001426ca
LAB_001426b7:
JMP 0x001426c4
LAB_001426b9:
MOV qword ptr [0x0050f288],0x0
LAB_001426c4:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x4],EAX
LAB_001426ca:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
/* init_file_class(unsigned int) */
int4 init_file_class(uint param_1)
{
file_class_allocated_count = 0;
file_class_dirty_count = 0;
file_class_max = (ulong)param_1;
file_class_lost = 0;
if (file_class_max == 0) {
file_class_array = 0;
}
else {
file_class_array =
pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_file_class,file_class_max,0x140
,0x20);
if (file_class_array == 0) {
return 1;
}
}
return 0;
}
|
|
5,914 | nglog::LogDestination::SetLogFilenameExtension(char const*) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::SetLogFilenameExtension(const char* ext) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
std::lock_guard<std::mutex> l{log_mutex};
for (int severity = 0; severity < NUM_SEVERITIES; ++severity) {
log_destination(static_cast<LogSeverity>(severity))
->fileobject_.SetExtension(ext);
}
} | O1 | cpp | nglog::LogDestination::SetLogFilenameExtension(char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x34a17(%rip), %rdi # 0x562b8
callq 0x89e0
testl %eax, %eax
jne 0x219a7
leaq 0x2594b(%rip), %r14 # 0x47200
xorl %r15d, %r15d
cmpq $0x0, (%r14)
jne 0x218f3
movl $0xd0, %edi
callq 0xa980
movq %rax, %r13
movq %rax, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x19e80
movq $0x0, (%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x2215e
movq %rsp, %rdi
callq 0x20eb0
movq (%r14), %r12
leaq 0x8(%r12), %r13
movq %r13, %rdi
callq 0x89e0
testl %eax, %eax
jne 0x219a0
leaq 0x78(%r12), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x8150
testl %eax, %eax
je 0x2196c
movq 0x98(%r12), %rdi
testq %rdi, %rdi
je 0x21949
movq $0x0, 0x98(%r12)
callq 0x8620
movl $0x1f, 0xb0(%r12)
movq 0x80(%r12), %r12
movq %rbx, %rdi
callq 0x8270
movq %rbp, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x8a80
movq %r13, %rdi
callq 0x8490
incq %r15
addq $0x8, %r14
cmpq $0x4, %r15
jne 0x218b8
leaq 0x3492c(%rip), %rdi # 0x562b8
callq 0x8490
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x83f0
movl %eax, %edi
callq 0x83f0
jmp 0x219cf
movq %rax, %rbx
movl $0xd0, %esi
movq %r13, %rdi
callq 0xa9cc
jmp 0x219d2
movq %rax, %rbx
movq %r13, %rdi
callq 0x8490
jmp 0x219d2
movq %rax, %rbx
leaq 0x348df(%rip), %rdi # 0x562b8
callq 0x8490
movq %rbx, %rdi
callq 0x8bb0
| _ZN5nglog14LogDestination23SetLogFilenameExtensionEPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_219A7
lea r14, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
xor r15d, r15d
loc_218B8:
cmp qword ptr [r14], 0
jnz short loc_218F3
mov edi, 0D0h; unsigned __int64
call _Znwm; operator new(ulong)
mov r13, rax
mov rdi, rax
mov esi, r15d
xor edx, edx
call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*)
mov [rsp+38h+var_38], 0
mov rdi, r14
mov rsi, r13
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
mov rdi, rsp
call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr()
loc_218F3:
mov r12, [r14]
lea r13, [r12+8]
mov rdi, r13
call _pthread_mutex_lock
test eax, eax
jnz loc_219A0
lea rbp, [r12+78h]
mov rdi, rbp
mov rsi, rbx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_2196C
mov rdi, [r12+98h]
test rdi, rdi
jz short loc_21949
mov qword ptr [r12+98h], 0
call _fclose
mov dword ptr [r12+0B0h], 1Fh
loc_21949:
mov r12, [r12+80h]
mov rdi, rbx
call _strlen
mov rdi, rbp
xor esi, esi
mov rdx, r12
mov rcx, rbx
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_2196C:
mov rdi, r13
call _pthread_mutex_unlock
inc r15
add r14, 8
cmp r15, 4
jnz loc_218B8
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_219A0:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
loc_219A7:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
jmp short loc_219CF
mov rbx, rax
mov esi, 0D0h; unsigned __int64
mov rdi, r13; void *
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_219D2
mov rbx, rax
mov rdi, r13
call _pthread_mutex_unlock
jmp short loc_219D2
loc_219CF:
mov rbx, rax
loc_219D2:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::SetLogFilenameExtension(nglog::LogDestination *this, const char *a2)
{
nglog::LogDestination *v2; // rax
int v4; // eax
long long *v5; // r14
long long i; // r15
long long v7; // r13
long long v8; // r12
long long v9; // r13
int v10; // eax
long long v11; // rbp
long long v12; // rdi
long long v13; // r12
long long v14; // rax
nglog::LogDestination *v16; // [rsp+0h] [rbp-38h] BYREF
v16 = v2;
v4 = pthread_mutex_lock(&nglog::log_mutex);
if ( v4 )
std::__throw_system_error(v4);
v5 = (long long *)&nglog::LogDestination::log_destinations_;
for ( i = 0LL; i != 4; ++i )
{
if ( !*v5 )
{
v7 = operator new(208LL);
nglog::LogDestination::LogDestination(v7, i, 0LL);
v16 = 0LL;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(v5, v7);
std::unique_ptr<nglog::LogDestination>::~unique_ptr(&v16);
}
v8 = *v5;
v9 = *v5 + 8;
v10 = pthread_mutex_lock(v9);
if ( v10 )
std::__throw_system_error(v10);
v11 = v8 + 120;
if ( (unsigned int)std::string::compare(v8 + 120, this) )
{
v12 = *(_QWORD *)(v8 + 152);
if ( v12 )
{
*(_QWORD *)(v8 + 152) = 0LL;
fclose(v12);
*(_DWORD *)(v8 + 176) = 31;
}
v13 = *(_QWORD *)(v8 + 128);
v14 = strlen(this);
std::string::_M_replace(v11, 0LL, v13, this, v14);
}
pthread_mutex_unlock(v9);
++v5;
}
return pthread_mutex_unlock(&nglog::log_mutex);
}
| SetLogFilenameExtension:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RDI,[0x1562b8]
CALL 0x001089e0
TEST EAX,EAX
JNZ 0x001219a7
LEA R14,[0x147200]
XOR R15D,R15D
LAB_001218b8:
CMP qword ptr [R14],0x0
JNZ 0x001218f3
LAB_001218be:
MOV EDI,0xd0
CALL 0x0010a980
LAB_001218c8:
MOV R13,RAX
MOV RDI,RAX
MOV ESI,R15D
XOR EDX,EDX
CALL 0x00119e80
MOV qword ptr [RSP],0x0
MOV RDI,R14
MOV RSI,R13
CALL 0x0012215e
MOV RDI,RSP
CALL 0x00120eb0
LAB_001218f3:
MOV R12,qword ptr [R14]
LEA R13,[R12 + 0x8]
MOV RDI,R13
CALL 0x001089e0
TEST EAX,EAX
JNZ 0x001219a0
LEA RBP,[R12 + 0x78]
MOV RDI,RBP
MOV RSI,RBX
CALL 0x00108150
TEST EAX,EAX
JZ 0x0012196c
MOV RDI,qword ptr [R12 + 0x98]
TEST RDI,RDI
JZ 0x00121949
MOV qword ptr [R12 + 0x98],0x0
CALL 0x00108620
MOV dword ptr [R12 + 0xb0],0x1f
LAB_00121949:
MOV R12,qword ptr [R12 + 0x80]
MOV RDI,RBX
CALL 0x00108270
LAB_00121959:
MOV RDI,RBP
XOR ESI,ESI
MOV RDX,R12
MOV RCX,RBX
MOV R8,RAX
CALL 0x00108a80
LAB_0012196c:
MOV RDI,R13
CALL 0x00108490
INC R15
ADD R14,0x8
CMP R15,0x4
JNZ 0x001218b8
LEA RDI,[0x1562b8]
CALL 0x00108490
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001219a0:
MOV EDI,EAX
CALL 0x001083f0
LAB_001219a7:
MOV EDI,EAX
CALL 0x001083f0
|
/* nglog::LogDestination::SetLogFilenameExtension(char const*) */
void nglog::LogDestination::SetLogFilenameExtension(char *param_1)
{
long lVar1;
FILE *__stream;
char *pcVar2;
int iVar3;
int8 in_RAX;
LogDestination *pLVar4;
__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *this;
ulong uVar5;
int8 local_38;
local_38 = in_RAX;
iVar3 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
this = (__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
&log_destinations_;
uVar5 = 0;
do {
if (*(long *)this == 0) {
/* try { // try from 001218be to 001218c7 has its CatchHandler @ 001219ae */
pLVar4 = (LogDestination *)operator_new(0xd0);
/* try { // try from 001218c8 to 001218d7 has its CatchHandler @ 001219b0 */
LogDestination(pLVar4,uVar5 & 0xffffffff,0);
local_38 = 0;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset
(this,pLVar4);
std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::~unique_ptr
((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
&local_38);
}
lVar1 = *(long *)this;
iVar3 = pthread_mutex_lock((pthread_mutex_t *)(lVar1 + 8));
if (iVar3 != 0) {
/* try { // try from 001219a0 to 001219a6 has its CatchHandler @ 001219cf */
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
iVar3 = std::__cxx11::string::compare((char *)(lVar1 + 0x78));
if (iVar3 != 0) {
__stream = *(FILE **)(lVar1 + 0x98);
if (__stream != (FILE *)0x0) {
*(int8 *)(lVar1 + 0x98) = 0;
fclose(__stream);
*(int4 *)(lVar1 + 0xb0) = 0x1f;
}
pcVar2 = *(char **)(lVar1 + 0x80);
strlen(param_1);
/* try { // try from 00121959 to 0012196b has its CatchHandler @ 001219c2 */
std::__cxx11::string::_M_replace((ulong)(lVar1 + 0x78),0,pcVar2,(ulong)param_1);
}
pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 8));
uVar5 = uVar5 + 1;
this = this + 8;
} while (uVar5 != 4);
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
|
|
5,915 | ma_compact_block_page | eloqsql/storage/maria/ma_blockrec.c | void _ma_compact_block_page(MARIA_SHARE *share,
uchar *buff, uint rownr,
my_bool extend_block, TrID min_read_from,
uint min_row_length)
{
uint max_entry= (uint) buff[DIR_COUNT_OFFSET];
uint page_pos, next_free_pos, start_of_found_block, diff, end_of_found_block;
uint freed_size= 0;
uint block_size= share->block_size;
uchar *dir, *end;
DBUG_ENTER("_ma_compact_block_page");
DBUG_PRINT("enter", ("rownr: %u min_read_from: %lu", rownr,
(ulong) min_read_from));
DBUG_ASSERT(max_entry > 0 &&
max_entry < (block_size - PAGE_HEADER_SIZE(share) -
PAGE_SUFFIX_SIZE) / DIR_ENTRY_SIZE);
/* Move all entries before and including rownr up to start of page */
dir= dir_entry_pos(buff, block_size, rownr);
end= dir_entry_pos(buff, block_size, 0);
page_pos= next_free_pos= start_of_found_block= PAGE_HEADER_SIZE(share);
diff= 0;
for (; dir <= end ; end-= DIR_ENTRY_SIZE)
{
uint offset= uint2korr(end);
if (offset)
{
uint row_length= uint2korr(end + 2);
DBUG_ASSERT(offset >= page_pos);
DBUG_ASSERT(buff + offset + row_length <= dir);
DBUG_ASSERT(row_length >= min_row_length || row_length == 0);
/* Row length can be zero if row is to be deleted */
if (min_read_from && row_length && (buff[offset] & ROW_FLAG_TRANSID))
{
TrID transid= transid_korr(buff+offset+1);
if (transid < min_read_from)
{
/* Remove transid from row by moving the start point of the row up */
buff[offset + TRANSID_SIZE]= buff[offset] & ~ROW_FLAG_TRANSID;
offset+= TRANSID_SIZE;
freed_size+= TRANSID_SIZE;
row_length-= TRANSID_SIZE;
int2store(end+2, row_length);
}
}
if (offset != next_free_pos)
{
uint length= (next_free_pos - start_of_found_block);
/*
There was empty space before this and prev block
Check if we have to move previous block up to page start
*/
if (page_pos != start_of_found_block)
{
/* move up previous block */
memmove(buff + page_pos, buff + start_of_found_block, length);
}
page_pos+= length;
/* next continuous block starts here */
start_of_found_block= offset;
diff= offset - page_pos;
}
int2store(end, offset - diff); /* correct current pos */
next_free_pos= offset + row_length;
if (unlikely(row_length < min_row_length) && row_length)
{
/*
This can only happen in the case we compacted transid and
the row become 'too short'
Move the current row down to it's right place and extend it
with 0.
*/
uint row_diff= min_row_length - row_length;
uint length= (next_free_pos - start_of_found_block);
DBUG_ASSERT(page_pos != start_of_found_block);
bmove(buff + page_pos, buff + start_of_found_block, length);
bzero(buff+ page_pos + length, row_diff);
page_pos+= min_row_length;
int2store(end+2, min_row_length);
freed_size-= row_diff;
next_free_pos= start_of_found_block= page_pos;
diff= 0;
}
}
}
if (page_pos != start_of_found_block)
{
uint length= (next_free_pos - start_of_found_block);
memmove(buff + page_pos, buff + start_of_found_block, length);
}
start_of_found_block= uint2korr(dir);
if (rownr != max_entry - 1)
{
/* Move all entries after rownr to end of page */
uint rownr_length;
DBUG_ASSERT(extend_block); /* Should always be true */
next_free_pos= end_of_found_block= page_pos=
block_size - DIR_ENTRY_SIZE * max_entry - PAGE_SUFFIX_SIZE;
diff= 0;
/* End points to entry before 'rownr' */
for (dir= buff + end_of_found_block ; dir <= end ; dir+= DIR_ENTRY_SIZE)
{
uint offset= uint2korr(dir);
uint row_length;
uint row_end;
if (!offset)
continue;
row_length= uint2korr(dir + 2);
row_end= offset + row_length;
DBUG_ASSERT(offset >= start_of_found_block &&
row_end <= next_free_pos && row_length >= min_row_length);
if (min_read_from && (buff[offset] & ROW_FLAG_TRANSID))
{
TrID transid= transid_korr(buff + offset+1);
if (transid < min_read_from)
{
/* Remove transid from row */
buff[offset + TRANSID_SIZE]= buff[offset] & ~ROW_FLAG_TRANSID;
offset+= TRANSID_SIZE;
row_length-= TRANSID_SIZE;
int2store(dir+2, row_length);
}
if (unlikely(row_length < min_row_length))
{
/*
This can only happen in the case we compacted transid and
the row become 'too short'
*/
uint row_diff= min_row_length - row_length;
if (next_free_pos < row_end + row_diff)
{
/*
Not enough space for extending next block with enough
end 0's. Move current data down to get place for them
*/
uint move_down= row_diff - (next_free_pos - row_end);
bmove(buff + offset - move_down, buff + offset, row_length);
offset-= move_down;
}
/*
Extend the next block with 0, which will be part of current
row when the blocks are joined together later
*/
bzero(buff + next_free_pos - row_diff, row_diff);
next_free_pos-= row_diff;
int2store(dir+2, min_row_length);
}
row_end= offset + row_length;
}
if (row_end != next_free_pos)
{
uint length= (end_of_found_block - next_free_pos);
if (page_pos != end_of_found_block)
{
/* move next block down */
memmove(buff + page_pos - length, buff + next_free_pos, length);
}
page_pos-= length;
/* next continuous block starts here */
end_of_found_block= row_end;
diff= page_pos - row_end;
}
int2store(dir, offset + diff); /* correct current pos */
next_free_pos= offset;
}
if (page_pos != end_of_found_block)
{
uint length= (end_of_found_block - next_free_pos);
memmove(buff + page_pos - length, buff + next_free_pos, length);
next_free_pos= page_pos- length;
}
/* Extend rownr block to cover hole */
rownr_length= next_free_pos - start_of_found_block;
int2store(dir+2, rownr_length);
DBUG_ASSERT(rownr_length >= min_row_length);
}
else
{
if (extend_block)
{
/* Extend last block to cover whole page */
uint length= ((uint) (dir - buff) - start_of_found_block);
int2store(dir+2, length);
DBUG_ASSERT(length >= min_row_length);
}
else
{
/* Add length gained from freed transaction id's to this page */
uint length= uint2korr(buff+ EMPTY_SPACE_OFFSET) + freed_size;
int2store(buff + EMPTY_SPACE_OFFSET, length);
}
buff[PAGE_TYPE_OFFSET]&= ~(uchar) PAGE_CAN_BE_COMPACTED;
}
check_directory(share, buff, block_size, min_row_length,
extend_block ? 0 : (uint) -1);
DBUG_EXECUTE("directory", _ma_print_directory(share,
DBUG_FILE, buff, block_size););
DBUG_VOID_RETURN;
} | O3 | c | ma_compact_block_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, -0x60(%rbp)
movq %rsi, %r10
movzbl 0x8(%rsi), %eax
movq %rax, -0x58(%rbp)
movl 0x7bc(%rdi), %r11d
leaq (%rsi,%r11), %rcx
movq %rdx, -0x68(%rbp)
leal (,%rdx,4), %eax
subq %rax, %rcx
movq %rcx, -0x70(%rbp)
leaq -0x8(%rcx), %rax
movl 0xc18(%rdi), %esi
movq %rax, %rdi
addl $0xc, %esi
leaq (%r10,%r11), %r14
addq $-0x8, %r14
xorl %r15d, %r15d
movl %esi, %r13d
movl %esi, %eax
movl $0x0, -0x2c(%rbp)
movq %r11, -0x48(%rbp)
movq %r10, -0x40(%rbp)
movl %r9d, -0x30(%rbp)
movq %r8, -0x50(%rbp)
movq %rdi, -0x38(%rbp)
movzwl (%r14), %r12d
testl %r12d, %r12d
je 0x48fff
movzwl 0x2(%r14), %ecx
movzwl %cx, %ebx
testq %r8, %r8
je 0x48fa7
testw %cx, %cx
je 0x48fa7
movl %r12d, %edx
movb (%r10,%rdx), %cl
testb $0x1, %cl
je 0x48fa7
movl %esi, %r11d
movl 0x1(%r10,%rdx), %esi
movzwl 0x5(%r10,%rdx), %edx
shlq $0x20, %rdx
orq %rsi, %rdx
cmpq %r8, %rdx
jae 0x48fa4
andb $-0x2, %cl
movb %cl, 0x6(%r10,%r12)
addq $0x6, %r12
addl $0x6, -0x2c(%rbp)
addl $-0x6, %ebx
movw %bx, 0x2(%r14)
movl %r11d, %esi
cmpl %r13d, %r12d
je 0x48fe7
subl %eax, %r13d
cmpl %eax, %esi
je 0x48fdb
movl %esi, %edi
addq %r10, %rdi
movl %esi, %r15d
movl %eax, %esi
addq %r10, %rsi
movl %r13d, %edx
callq 0x2a130
movl %r15d, %esi
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %r8
movl -0x30(%rbp), %r9d
movq -0x40(%rbp), %r10
addl %r13d, %esi
movl %r12d, %r15d
subl %esi, %r15d
movl %r12d, %eax
movl %r12d, %ecx
subl %r15d, %ecx
movw %cx, (%r14)
addl %ebx, %r12d
movl %r9d, %r13d
subl %ebx, %r13d
ja 0x4900e
movl %r12d, %r13d
addq $-0x4, %r14
cmpq %r14, %rdi
jbe 0x48f47
jmp 0x49065
testl %ebx, %ebx
je 0x48ffc
subl %eax, %r12d
movl %esi, %r15d
addq %r10, %r15
movl %esi, %ebx
movl %eax, %esi
addq %r10, %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x2a130
addq %r12, %r15
movq %r15, %rdi
xorl %r15d, %r15d
xorl %esi, %esi
movq %r13, %rdx
callq 0x2a290
movl %ebx, %esi
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %r8
movl -0x30(%rbp), %r9d
movq -0x40(%rbp), %r10
addl %r9d, %esi
movw %r9w, 0x2(%r14)
subl %r13d, -0x2c(%rbp)
movl %esi, %eax
movl %esi, %r13d
jmp 0x48fff
cmpl %eax, %esi
je 0x4908e
subl %eax, %r13d
movl %esi, %edi
addq %r10, %rdi
movl %eax, %esi
addq %r10, %rsi
movq %r13, %rdx
callq 0x2a130
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %r8
movl -0x30(%rbp), %r9d
movq -0x40(%rbp), %r10
movzwl (%rdi), %ecx
movq -0x58(%rbp), %rdx
leal -0x1(%rdx), %eax
cmpl -0x68(%rbp), %eax
jne 0x490b9
cmpb $0x0, -0x60(%rbp)
je 0x4922f
subl %r10d, %edi
subl %ecx, %edi
movq -0x70(%rbp), %rax
movw %di, -0x6(%rax)
jmp 0x49237
shll $0x2, %edx
movq -0x48(%rbp), %rsi
subl %edx, %esi
addl $-0x4, %esi
leaq (%r10,%rsi), %r13
cmpq %r14, %r13
ja 0x49266
movl %ecx, -0x2c(%rbp)
xorl %edx, %edx
movl %esi, %r11d
movl %esi, %edi
movzwl (%r13), %r15d
testl %r15d, %r15d
je 0x49199
movzwl 0x2(%r13), %r12d
leal (%r12,%r15), %ebx
testq %r8, %r8
je 0x49144
movl %r15d, %ecx
movb (%r10,%rcx), %al
testb $0x1, %al
je 0x49144
movq %rdx, -0x38(%rbp)
movl 0x1(%r10,%rcx), %edx
movzwl 0x5(%r10,%rcx), %ecx
shlq $0x20, %rcx
orq %rdx, %rcx
cmpq %r8, %rcx
jae 0x49132
andb $-0x2, %al
movb %al, 0x6(%r10,%r15)
addq $0x6, %r15
addl $-0x6, %r12d
movw %r12w, 0x2(%r13)
movl %r9d, %ecx
subl %r12d, %ecx
movq -0x38(%rbp), %rdx
ja 0x491a8
addl %r15d, %r12d
movl %r12d, %ebx
cmpl %r11d, %ebx
jne 0x4914d
movl %edi, %ebx
jmp 0x4918b
movl %edi, %r12d
subl %r11d, %r12d
cmpl %edi, %esi
je 0x49184
movl %esi, %edi
addq %r10, %rdi
movl %r12d, %edx
subq %rdx, %rdi
movq %rsi, %rax
movl %r11d, %esi
addq %r10, %rsi
movq %rax, -0x48(%rbp)
callq 0x2a130
movq -0x50(%rbp), %r8
movl -0x30(%rbp), %r9d
movq -0x40(%rbp), %r10
movq -0x48(%rbp), %rsi
subl %r12d, %esi
movl %esi, %edx
subl %ebx, %edx
leal (%rdx,%r15), %eax
movw %ax, (%r13)
movl %ebx, %edi
movl %r15d, %r11d
addq $0x4, %r13
cmpq %r14, %r13
jbe 0x490dc
jmp 0x49226
movq %rdi, -0x68(%rbp)
movq %rsi, -0x48(%rbp)
leal (%rcx,%rbx), %eax
cmpl %eax, %r11d
movl %r11d, -0x58(%rbp)
jae 0x491e8
subl %r11d, %ebx
addl %ecx, %ebx
movl %r15d, %esi
addq %r10, %rsi
movq %rsi, %rdi
subq %rbx, %rdi
movl %r12d, %edx
movq %rcx, -0x60(%rbp)
callq 0x2a130
movq -0x60(%rbp), %rcx
movl -0x58(%rbp), %r11d
movq -0x40(%rbp), %r10
subl %ebx, %r15d
movl %r11d, %edi
addq %r10, %rdi
movl %ecx, %edx
subq %rdx, %rdi
xorl %esi, %esi
movq %rcx, %rbx
callq 0x2a290
movl -0x58(%rbp), %r11d
movq -0x40(%rbp), %r10
subl %ebx, %r11d
movl -0x30(%rbp), %r9d
movw %r9w, 0x2(%r13)
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %r8
movq -0x68(%rbp), %rdi
movq -0x38(%rbp), %rdx
jmp 0x4913e
cmpl %edi, %esi
jne 0x4923e
movl %r11d, %esi
jmp 0x49263
movl -0x2c(%rbp), %eax
addw %ax, 0xa(%r10)
andb $0x7f, 0x7(%r10)
jmp 0x4926d
subl %r11d, %edi
movq %rdi, %r14
movl %esi, %edi
addq %r10, %rdi
subq %r14, %rdi
movq %rsi, %rbx
movl %r11d, %esi
addq %r10, %rsi
movq %r14, %rdx
callq 0x2a130
movq %rbx, %rsi
subl %r14d, %esi
movl -0x2c(%rbp), %ecx
subl %ecx, %esi
movw %si, 0x2(%r13)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_compact_block_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov dword ptr [rbp+var_60], ecx
mov r10, rsi
movzx eax, byte ptr [rsi+8]
mov [rbp+var_58], rax
mov r11d, [rdi+7BCh]
lea rcx, [rsi+r11]
mov [rbp+var_68], rdx
lea eax, ds:0[rdx*4]
sub rcx, rax
mov [rbp+var_70], rcx
lea rax, [rcx-8]
mov esi, [rdi+0C18h]
mov rdi, rax
add esi, 0Ch
lea r14, [r10+r11]
add r14, 0FFFFFFFFFFFFFFF8h
xor r15d, r15d
mov r13d, esi
mov eax, esi
mov [rbp+var_2C], 0
mov [rbp+var_48], r11
mov [rbp+var_40], r10
mov [rbp+var_30], r9d
mov [rbp+var_50], r8
mov [rbp+var_38], rdi
loc_48F47:
movzx r12d, word ptr [r14]
test r12d, r12d
jz loc_48FFF
movzx ecx, word ptr [r14+2]
movzx ebx, cx
test r8, r8
jz short loc_48FA7
test cx, cx
jz short loc_48FA7
mov edx, r12d
mov cl, [r10+rdx]
test cl, 1
jz short loc_48FA7
mov r11d, esi
mov esi, [r10+rdx+1]
movzx edx, word ptr [r10+rdx+5]
shl rdx, 20h
or rdx, rsi
cmp rdx, r8
jnb short loc_48FA4
and cl, 0FEh
mov [r10+r12+6], cl
add r12, 6
add [rbp+var_2C], 6
add ebx, 0FFFFFFFAh
mov [r14+2], bx
loc_48FA4:
mov esi, r11d
loc_48FA7:
cmp r12d, r13d
jz short loc_48FE7
sub r13d, eax
cmp esi, eax
jz short loc_48FDB
mov edi, esi
add rdi, r10
mov r15d, esi
mov esi, eax
add rsi, r10
mov edx, r13d
call _memmove
mov esi, r15d
mov rdi, [rbp+var_38]
mov r8, [rbp+var_50]
mov r9d, [rbp+var_30]
mov r10, [rbp+var_40]
loc_48FDB:
add esi, r13d
mov r15d, r12d
sub r15d, esi
mov eax, r12d
loc_48FE7:
mov ecx, r12d
sub ecx, r15d
mov [r14], cx
add r12d, ebx
mov r13d, r9d
sub r13d, ebx
ja short loc_4900E
loc_48FFC:
mov r13d, r12d
loc_48FFF:
add r14, 0FFFFFFFFFFFFFFFCh
cmp rdi, r14
jbe loc_48F47
jmp short loc_49065
loc_4900E:
test ebx, ebx
jz short loc_48FFC
sub r12d, eax
mov r15d, esi
add r15, r10
mov ebx, esi
mov esi, eax
add rsi, r10
mov rdi, r15
mov rdx, r12
call _memmove
add r15, r12
mov rdi, r15
xor r15d, r15d
xor esi, esi
mov rdx, r13
call _memset
mov esi, ebx
mov rdi, [rbp+var_38]
mov r8, [rbp+var_50]
mov r9d, [rbp+var_30]
mov r10, [rbp+var_40]
add esi, r9d
mov [r14+2], r9w
sub [rbp+var_2C], r13d
mov eax, esi
mov r13d, esi
jmp short loc_48FFF
loc_49065:
cmp esi, eax
jz short loc_4908E
sub r13d, eax
mov edi, esi
add rdi, r10
mov esi, eax
add rsi, r10
mov rdx, r13
call _memmove
mov rdi, [rbp+var_38]
mov r8, [rbp+var_50]
mov r9d, [rbp+var_30]
mov r10, [rbp+var_40]
loc_4908E:
movzx ecx, word ptr [rdi]
mov rdx, [rbp+var_58]
lea eax, [rdx-1]
cmp eax, dword ptr [rbp+var_68]
jnz short loc_490B9
cmp byte ptr [rbp+var_60], 0
jz loc_4922F
sub edi, r10d
sub edi, ecx
mov rax, [rbp+var_70]
mov [rax-6], di
jmp loc_49237
loc_490B9:
shl edx, 2
mov rsi, [rbp+var_48]
sub esi, edx
add esi, 0FFFFFFFCh
lea r13, [r10+rsi]
cmp r13, r14
ja loc_49266
mov [rbp+var_2C], ecx
xor edx, edx
mov r11d, esi
mov edi, esi
loc_490DC:
movzx r15d, word ptr [r13+0]
test r15d, r15d
jz loc_49199
movzx r12d, word ptr [r13+2]
lea ebx, [r12+r15]
test r8, r8
jz short loc_49144
mov ecx, r15d
mov al, [r10+rcx]
test al, 1
jz short loc_49144
mov [rbp+var_38], rdx
mov edx, [r10+rcx+1]
movzx ecx, word ptr [r10+rcx+5]
shl rcx, 20h
or rcx, rdx
cmp rcx, r8
jnb short loc_49132
and al, 0FEh
mov [r10+r15+6], al
add r15, 6
add r12d, 0FFFFFFFAh
mov [r13+2], r12w
loc_49132:
mov ecx, r9d
sub ecx, r12d
mov rdx, [rbp+var_38]
ja short loc_491A8
loc_4913E:
add r12d, r15d
mov ebx, r12d
loc_49144:
cmp ebx, r11d
jnz short loc_4914D
mov ebx, edi
jmp short loc_4918B
loc_4914D:
mov r12d, edi
sub r12d, r11d
cmp esi, edi
jz short loc_49184
mov edi, esi
add rdi, r10
mov edx, r12d
sub rdi, rdx
mov rax, rsi
mov esi, r11d
add rsi, r10
mov [rbp+var_48], rax
call _memmove
mov r8, [rbp+var_50]
mov r9d, [rbp+var_30]
mov r10, [rbp+var_40]
mov rsi, [rbp+var_48]
loc_49184:
sub esi, r12d
mov edx, esi
sub edx, ebx
loc_4918B:
lea eax, [rdx+r15]
mov [r13+0], ax
mov edi, ebx
mov r11d, r15d
loc_49199:
add r13, 4
cmp r13, r14
jbe loc_490DC
jmp short loc_49226
loc_491A8:
mov [rbp+var_68], rdi
mov [rbp+var_48], rsi
lea eax, [rcx+rbx]
cmp r11d, eax
mov dword ptr [rbp+var_58], r11d
jnb short loc_491E8
sub ebx, r11d
add ebx, ecx
mov esi, r15d
add rsi, r10
mov rdi, rsi
sub rdi, rbx
mov edx, r12d
mov [rbp+var_60], rcx
call _memmove
mov rcx, [rbp+var_60]
mov r11d, dword ptr [rbp+var_58]
mov r10, [rbp+var_40]
sub r15d, ebx
loc_491E8:
mov edi, r11d
add rdi, r10
mov edx, ecx
sub rdi, rdx
xor esi, esi
mov rbx, rcx
call _memset
mov r11d, dword ptr [rbp+var_58]
mov r10, [rbp+var_40]
sub r11d, ebx
mov r9d, [rbp+var_30]
mov [r13+2], r9w
mov rsi, [rbp+var_48]
mov r8, [rbp+var_50]
mov rdi, [rbp+var_68]
mov rdx, [rbp+var_38]
jmp loc_4913E
loc_49226:
cmp esi, edi
jnz short loc_4923E
mov esi, r11d
jmp short loc_49263
loc_4922F:
mov eax, [rbp+var_2C]
add [r10+0Ah], ax
loc_49237:
and byte ptr [r10+7], 7Fh
jmp short loc_4926D
loc_4923E:
sub edi, r11d
mov r14, rdi
mov edi, esi
add rdi, r10
sub rdi, r14
mov rbx, rsi
mov esi, r11d
add rsi, r10
mov rdx, r14
call _memmove
mov rsi, rbx
sub esi, r14d
loc_49263:
mov ecx, [rbp+var_2C]
loc_49266:
sub esi, ecx
mov [r13+2], si
loc_4926D:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_compact_block_page(long long a1, long long a2, int a3, char a4, unsigned long long a5, unsigned int a6)
{
long long v6; // r10
long long v7; // r11
int v8; // esi
unsigned __int16 *v9; // rdi
unsigned int v10; // esi
unsigned __int16 *v11; // r14
__int16 v12; // r15
unsigned int v13; // r13d
unsigned int v14; // eax
long long v15; // r12
unsigned __int16 v16; // cx
unsigned int v17; // ebx
char v18; // cl
unsigned int v19; // r13d
unsigned int v20; // r12d
long long v21; // r13
long long v22; // r12
long long v23; // r15
long long v24; // rdi
unsigned __int16 v25; // cx
long long result; // rax
long long v27; // rsi
unsigned __int16 *v28; // r13
long long v29; // rdx
unsigned int v30; // r11d
unsigned int v31; // edi
long long v32; // r15
unsigned int v33; // r12d
unsigned int v34; // ebx
char v35; // al
unsigned int v36; // ecx
unsigned int v37; // r12d
long long v38; // rbx
unsigned int v39; // ebx
long long v40; // r14
long long v41; // [rsp+0h] [rbp-70h]
unsigned int v44; // [rsp+10h] [rbp-60h]
int v45; // [rsp+18h] [rbp-58h]
unsigned int v46; // [rsp+18h] [rbp-58h]
unsigned long long v47; // [rsp+20h] [rbp-50h]
int v48; // [rsp+28h] [rbp-48h]
long long v49; // [rsp+30h] [rbp-40h]
long long v50; // [rsp+38h] [rbp-38h]
unsigned int v51; // [rsp+40h] [rbp-30h]
unsigned int v52; // [rsp+44h] [rbp-2Ch]
unsigned __int16 v53; // [rsp+44h] [rbp-2Ch]
v6 = a2;
v45 = *(unsigned __int8 *)(a2 + 8);
v7 = *(unsigned int *)(a1 + 1980);
v41 = a2 + v7 - (unsigned int)(4 * a3);
v8 = *(_DWORD *)(a1 + 3096);
v9 = (unsigned __int16 *)(v41 - 8);
v10 = v8 + 12;
v11 = (unsigned __int16 *)(v6 + v7 - 8);
v12 = 0;
v13 = v10;
v14 = v10;
v52 = 0;
v48 = v7;
v49 = v6;
v51 = a6;
v47 = a5;
do
{
v15 = *v11;
if ( *v11 )
{
v16 = v11[1];
v17 = v16;
if ( a5 )
{
if ( v16 )
{
v18 = *(_BYTE *)(v6 + *v11);
if ( (v18 & 1) != 0
&& (*(unsigned int *)(v6 + *v11 + 1) | ((unsigned long long)*(unsigned __int16 *)(v6 + *v11 + 5) << 32)) < a5 )
{
*(_BYTE *)(v6 + v15 + 6) = v18 & 0xFE;
LODWORD(v15) = v15 + 6;
v52 += 6;
v17 -= 6;
v11[1] = v17;
}
}
}
if ( (_DWORD)v15 != v13 )
{
v19 = v13 - v14;
if ( v10 != v14 )
{
memmove(v6 + v10, v6 + v14, v19);
v9 = (unsigned __int16 *)(v41 - 8);
a5 = v47;
a6 = v51;
v6 = v49;
}
v10 += v19;
v12 = v15 - v10;
v14 = v15;
}
*v11 = v15 - v12;
v20 = v17 + v15;
v21 = a6 - v17;
if ( a6 > v17 && v17 )
{
v22 = v20 - v14;
v23 = v6 + v10;
memmove(v23, v6 + v14, v22);
v24 = v22 + v23;
v12 = 0;
memset(v24, 0LL, v21);
v9 = (unsigned __int16 *)(v41 - 8);
a5 = v47;
a6 = v51;
v6 = v49;
v10 += v51;
v11[1] = v51;
v52 -= v21;
v14 = v10;
v13 = v10;
}
else
{
v13 = v20;
}
}
v11 -= 2;
}
while ( v9 <= v11 );
if ( v10 != v14 )
{
memmove(v6 + v10, v6 + v14, v13 - v14);
v9 = (unsigned __int16 *)(v41 - 8);
a5 = v47;
a6 = v51;
v6 = v49;
}
v25 = *v9;
result = (unsigned int)(v45 - 1);
if ( (_DWORD)result == a3 )
{
if ( a4 )
{
result = v41;
*(_WORD *)(v41 - 6) = (_WORD)v9 - v6 - v25;
}
else
{
result = v52;
*(_WORD *)(v6 + 10) += v52;
}
*(_BYTE *)(v6 + 7) &= ~0x80u;
}
else
{
v27 = (unsigned int)(v48 - 4 * v45 - 4);
v28 = (unsigned __int16 *)(v6 + v27);
if ( v6 + v27 <= (unsigned long long)v11 )
{
v53 = *v9;
v29 = 0LL;
v30 = v48 - 4 * v45 - 4;
v31 = v30;
do
{
v32 = *v28;
if ( *v28 )
{
v33 = v28[1];
v34 = v33 + v32;
if ( a5 )
{
v35 = *(_BYTE *)(v6 + *v28);
if ( (v35 & 1) != 0 )
{
v50 = v29;
if ( (*(unsigned int *)(v6 + *v28 + 1) | ((unsigned long long)*(unsigned __int16 *)(v6 + *v28 + 5) << 32)) < a5 )
{
*(_BYTE *)(v6 + v32 + 6) = v35 & 0xFE;
LODWORD(v32) = v32 + 6;
v33 -= 6;
v28[1] = v33;
}
v36 = a6 - v33;
if ( a6 > v33 )
{
v46 = v30;
if ( v30 < v36 + v34 )
{
v38 = v36 + v34 - v30;
v44 = a6 - v33;
memmove(v6 + (unsigned int)v32 - v38, v6 + (unsigned int)v32, v33);
v36 = v44;
v30 = v46;
v6 = v49;
LODWORD(v32) = v32 - v38;
}
v39 = v36;
memset(v6 + v30 - v36, 0LL, v36);
v6 = v49;
v30 = v46 - v39;
a6 = v51;
v28[1] = v51;
a5 = v47;
v29 = v50;
}
v34 = v32 + v33;
}
}
if ( v34 == v30 )
{
v34 = v31;
}
else
{
v37 = v31 - v30;
if ( (_DWORD)v27 != v31 )
{
memmove(v6 + (unsigned int)v27 - v37, v6 + v30, v37);
a5 = v47;
a6 = v51;
v6 = v49;
}
LODWORD(v27) = v27 - v37;
v29 = (unsigned int)v27 - v34;
}
result = (unsigned int)(v29 + v32);
*v28 = v29 + v32;
v31 = v34;
v30 = v32;
}
v28 += 2;
}
while ( v28 <= v11 );
if ( (_DWORD)v27 == v31 )
{
LOWORD(v27) = v30;
}
else
{
v40 = v31 - v30;
result = memmove(v6 + (unsigned int)v27 - v40, v6 + v30, v40);
LOWORD(v27) = v27 - v40;
}
v25 = v53;
}
v28[1] = v27 - v25;
}
return result;
}
| _ma_compact_block_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x60],ECX
MOV R10,RSI
MOVZX EAX,byte ptr [RSI + 0x8]
MOV qword ptr [RBP + -0x58],RAX
MOV R11D,dword ptr [RDI + 0x7bc]
LEA RCX,[RSI + R11*0x1]
MOV qword ptr [RBP + -0x68],RDX
LEA EAX,[RDX*0x4]
SUB RCX,RAX
MOV qword ptr [RBP + -0x70],RCX
LEA RAX,[RCX + -0x8]
MOV ESI,dword ptr [RDI + 0xc18]
MOV RDI,RAX
ADD ESI,0xc
LEA R14,[R10 + R11*0x1]
ADD R14,-0x8
XOR R15D,R15D
MOV R13D,ESI
MOV EAX,ESI
MOV dword ptr [RBP + -0x2c],0x0
MOV qword ptr [RBP + -0x48],R11
MOV qword ptr [RBP + -0x40],R10
MOV dword ptr [RBP + -0x30],R9D
MOV qword ptr [RBP + -0x50],R8
MOV qword ptr [RBP + -0x38],RDI
LAB_00148f47:
MOVZX R12D,word ptr [R14]
TEST R12D,R12D
JZ 0x00148fff
MOVZX ECX,word ptr [R14 + 0x2]
MOVZX EBX,CX
TEST R8,R8
JZ 0x00148fa7
TEST CX,CX
JZ 0x00148fa7
MOV EDX,R12D
MOV CL,byte ptr [R10 + RDX*0x1]
TEST CL,0x1
JZ 0x00148fa7
MOV R11D,ESI
MOV ESI,dword ptr [R10 + RDX*0x1 + 0x1]
MOVZX EDX,word ptr [R10 + RDX*0x1 + 0x5]
SHL RDX,0x20
OR RDX,RSI
CMP RDX,R8
JNC 0x00148fa4
AND CL,0xfe
MOV byte ptr [R10 + R12*0x1 + 0x6],CL
ADD R12,0x6
ADD dword ptr [RBP + -0x2c],0x6
ADD EBX,-0x6
MOV word ptr [R14 + 0x2],BX
LAB_00148fa4:
MOV ESI,R11D
LAB_00148fa7:
CMP R12D,R13D
JZ 0x00148fe7
SUB R13D,EAX
CMP ESI,EAX
JZ 0x00148fdb
MOV EDI,ESI
ADD RDI,R10
MOV R15D,ESI
MOV ESI,EAX
ADD RSI,R10
MOV EDX,R13D
CALL 0x0012a130
MOV ESI,R15D
MOV RDI,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x50]
MOV R9D,dword ptr [RBP + -0x30]
MOV R10,qword ptr [RBP + -0x40]
LAB_00148fdb:
ADD ESI,R13D
MOV R15D,R12D
SUB R15D,ESI
MOV EAX,R12D
LAB_00148fe7:
MOV ECX,R12D
SUB ECX,R15D
MOV word ptr [R14],CX
ADD R12D,EBX
MOV R13D,R9D
SUB R13D,EBX
JA 0x0014900e
LAB_00148ffc:
MOV R13D,R12D
LAB_00148fff:
ADD R14,-0x4
CMP RDI,R14
JBE 0x00148f47
JMP 0x00149065
LAB_0014900e:
TEST EBX,EBX
JZ 0x00148ffc
SUB R12D,EAX
MOV R15D,ESI
ADD R15,R10
MOV EBX,ESI
MOV ESI,EAX
ADD RSI,R10
MOV RDI,R15
MOV RDX,R12
CALL 0x0012a130
ADD R15,R12
MOV RDI,R15
XOR R15D,R15D
XOR ESI,ESI
MOV RDX,R13
CALL 0x0012a290
MOV ESI,EBX
MOV RDI,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x50]
MOV R9D,dword ptr [RBP + -0x30]
MOV R10,qword ptr [RBP + -0x40]
ADD ESI,R9D
MOV word ptr [R14 + 0x2],R9W
SUB dword ptr [RBP + -0x2c],R13D
MOV EAX,ESI
MOV R13D,ESI
JMP 0x00148fff
LAB_00149065:
CMP ESI,EAX
JZ 0x0014908e
SUB R13D,EAX
MOV EDI,ESI
ADD RDI,R10
MOV ESI,EAX
ADD RSI,R10
MOV RDX,R13
CALL 0x0012a130
MOV RDI,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x50]
MOV R9D,dword ptr [RBP + -0x30]
MOV R10,qword ptr [RBP + -0x40]
LAB_0014908e:
MOVZX ECX,word ptr [RDI]
MOV RDX,qword ptr [RBP + -0x58]
LEA EAX,[RDX + -0x1]
CMP EAX,dword ptr [RBP + -0x68]
JNZ 0x001490b9
CMP byte ptr [RBP + -0x60],0x0
JZ 0x0014922f
SUB EDI,R10D
SUB EDI,ECX
MOV RAX,qword ptr [RBP + -0x70]
MOV word ptr [RAX + -0x6],DI
JMP 0x00149237
LAB_001490b9:
SHL EDX,0x2
MOV RSI,qword ptr [RBP + -0x48]
SUB ESI,EDX
ADD ESI,-0x4
LEA R13,[R10 + RSI*0x1]
CMP R13,R14
JA 0x00149266
MOV dword ptr [RBP + -0x2c],ECX
XOR EDX,EDX
MOV R11D,ESI
MOV EDI,ESI
LAB_001490dc:
MOVZX R15D,word ptr [R13]
TEST R15D,R15D
JZ 0x00149199
MOVZX R12D,word ptr [R13 + 0x2]
LEA EBX,[R12 + R15*0x1]
TEST R8,R8
JZ 0x00149144
MOV ECX,R15D
MOV AL,byte ptr [R10 + RCX*0x1]
TEST AL,0x1
JZ 0x00149144
MOV qword ptr [RBP + -0x38],RDX
MOV EDX,dword ptr [R10 + RCX*0x1 + 0x1]
MOVZX ECX,word ptr [R10 + RCX*0x1 + 0x5]
SHL RCX,0x20
OR RCX,RDX
CMP RCX,R8
JNC 0x00149132
AND AL,0xfe
MOV byte ptr [R10 + R15*0x1 + 0x6],AL
ADD R15,0x6
ADD R12D,-0x6
MOV word ptr [R13 + 0x2],R12W
LAB_00149132:
MOV ECX,R9D
SUB ECX,R12D
MOV RDX,qword ptr [RBP + -0x38]
JA 0x001491a8
LAB_0014913e:
ADD R12D,R15D
MOV EBX,R12D
LAB_00149144:
CMP EBX,R11D
JNZ 0x0014914d
MOV EBX,EDI
JMP 0x0014918b
LAB_0014914d:
MOV R12D,EDI
SUB R12D,R11D
CMP ESI,EDI
JZ 0x00149184
MOV EDI,ESI
ADD RDI,R10
MOV EDX,R12D
SUB RDI,RDX
MOV RAX,RSI
MOV ESI,R11D
ADD RSI,R10
MOV qword ptr [RBP + -0x48],RAX
CALL 0x0012a130
MOV R8,qword ptr [RBP + -0x50]
MOV R9D,dword ptr [RBP + -0x30]
MOV R10,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x48]
LAB_00149184:
SUB ESI,R12D
MOV EDX,ESI
SUB EDX,EBX
LAB_0014918b:
LEA EAX,[RDX + R15*0x1]
MOV word ptr [R13],AX
MOV EDI,EBX
MOV R11D,R15D
LAB_00149199:
ADD R13,0x4
CMP R13,R14
JBE 0x001490dc
JMP 0x00149226
LAB_001491a8:
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x48],RSI
LEA EAX,[RCX + RBX*0x1]
CMP R11D,EAX
MOV dword ptr [RBP + -0x58],R11D
JNC 0x001491e8
SUB EBX,R11D
ADD EBX,ECX
MOV ESI,R15D
ADD RSI,R10
MOV RDI,RSI
SUB RDI,RBX
MOV EDX,R12D
MOV qword ptr [RBP + -0x60],RCX
CALL 0x0012a130
MOV RCX,qword ptr [RBP + -0x60]
MOV R11D,dword ptr [RBP + -0x58]
MOV R10,qword ptr [RBP + -0x40]
SUB R15D,EBX
LAB_001491e8:
MOV EDI,R11D
ADD RDI,R10
MOV EDX,ECX
SUB RDI,RDX
XOR ESI,ESI
MOV RBX,RCX
CALL 0x0012a290
MOV R11D,dword ptr [RBP + -0x58]
MOV R10,qword ptr [RBP + -0x40]
SUB R11D,EBX
MOV R9D,dword ptr [RBP + -0x30]
MOV word ptr [R13 + 0x2],R9W
MOV RSI,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x38]
JMP 0x0014913e
LAB_00149226:
CMP ESI,EDI
JNZ 0x0014923e
MOV ESI,R11D
JMP 0x00149263
LAB_0014922f:
MOV EAX,dword ptr [RBP + -0x2c]
ADD word ptr [R10 + 0xa],AX
LAB_00149237:
AND byte ptr [R10 + 0x7],0x7f
JMP 0x0014926d
LAB_0014923e:
SUB EDI,R11D
MOV R14,RDI
MOV EDI,ESI
ADD RDI,R10
SUB RDI,R14
MOV RBX,RSI
MOV ESI,R11D
ADD RSI,R10
MOV RDX,R14
CALL 0x0012a130
MOV RSI,RBX
SUB ESI,R14D
LAB_00149263:
MOV ECX,dword ptr [RBP + -0x2c]
LAB_00149266:
SUB ESI,ECX
MOV word ptr [R13 + 0x2],SI
LAB_0014926d:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void _ma_compact_block_page
(long param_1,long param_2,int param_3,char param_4,ulong param_5,uint param_6)
{
byte bVar1;
ushort uVar2;
ushort uVar3;
ushort uVar4;
long lVar5;
uint uVar6;
uint uVar7;
uint uVar8;
uint uVar9;
uint uVar10;
ulong uVar11;
uint uVar12;
ushort *puVar13;
ushort *puVar14;
int iVar15;
ulong uVar16;
int local_34;
bVar1 = *(byte *)(param_2 + 8);
uVar9 = *(uint *)(param_1 + 0x7bc);
lVar5 = (param_2 + (ulong)uVar9) - (ulong)(uint)(param_3 * 4);
puVar13 = (ushort *)(lVar5 - 8);
uVar8 = *(int *)(param_1 + 0xc18) + 0xc;
puVar14 = (ushort *)(param_2 + (ulong)uVar9 + -8);
iVar15 = 0;
local_34 = 0;
uVar10 = uVar8;
uVar7 = uVar8;
do {
uVar11 = (ulong)*puVar14;
if (*puVar14 != 0) {
uVar2 = puVar14[1];
uVar6 = (uint)uVar2;
if ((((param_5 != 0) && (uVar2 != 0)) && ((*(byte *)(param_2 + uVar11) & 1) != 0)) &&
(CONCAT24(*(int2 *)(param_2 + 5 + uVar11),*(int4 *)(param_2 + 1 + uVar11)) <
param_5)) {
*(byte *)(param_2 + 6 + uVar11) = *(byte *)(param_2 + uVar11) & 0xfe;
uVar11 = uVar11 + 6;
local_34 = local_34 + 6;
uVar6 = uVar2 - 6;
puVar14[1] = (ushort)uVar6;
}
uVar12 = (uint)uVar11;
if (uVar12 != uVar10) {
if (uVar8 != uVar7) {
memmove((void *)((ulong)uVar8 + param_2),(void *)((ulong)uVar7 + param_2),
(ulong)(uVar10 - uVar7));
}
uVar8 = uVar8 + (uVar10 - uVar7);
iVar15 = uVar12 - uVar8;
uVar7 = uVar12;
}
*puVar14 = (short)uVar11 - (short)iVar15;
uVar10 = uVar12 + uVar6;
uVar12 = param_6 - uVar6;
if ((uVar6 <= param_6 && uVar12 != 0) && (uVar6 != 0)) {
memmove((void *)((ulong)uVar8 + param_2),(void *)((ulong)uVar7 + param_2),
(ulong)(uVar10 - uVar7));
iVar15 = 0;
memset((void *)((long)((ulong)uVar8 + param_2) + (ulong)(uVar10 - uVar7)),0,(ulong)uVar12);
uVar8 = uVar8 + param_6;
puVar14[1] = (ushort)param_6;
local_34 = local_34 - uVar12;
uVar10 = uVar8;
uVar7 = uVar8;
}
}
puVar14 = puVar14 + -2;
} while (puVar13 <= puVar14);
if (uVar8 != uVar7) {
memmove((void *)((ulong)uVar8 + param_2),(void *)((ulong)uVar7 + param_2),
(ulong)(uVar10 - uVar7));
}
uVar2 = *puVar13;
if (bVar1 - 1 == param_3) {
if (param_4 == '\0') {
*(short *)(param_2 + 10) = *(short *)(param_2 + 10) + (short)local_34;
}
else {
*(ushort *)(lVar5 + -6) = ((short)puVar13 - (short)param_2) - uVar2;
}
*(byte *)(param_2 + 7) = *(byte *)(param_2 + 7) & 0x7f;
}
else {
uVar9 = (uVar9 + (uint)bVar1 * -4) - 4;
uVar11 = (ulong)uVar9;
puVar13 = (ushort *)(param_2 + uVar11);
if (puVar13 <= puVar14) {
iVar15 = 0;
uVar10 = uVar9;
do {
uVar3 = *puVar13;
uVar16 = (ulong)uVar3;
if (uVar3 != 0) {
uVar4 = puVar13[1];
uVar8 = (uint)uVar4;
uVar7 = (uint)uVar4 + (uint)uVar3;
if ((param_5 != 0) && ((*(byte *)(param_2 + uVar16) & 1) != 0)) {
if (CONCAT24(*(int2 *)(param_2 + 5 + uVar16),*(int4 *)(param_2 + 1 + uVar16)
) < param_5) {
*(byte *)(param_2 + 6 + uVar16) = *(byte *)(param_2 + uVar16) & 0xfe;
uVar16 = uVar16 + 6;
uVar8 = uVar4 - 6;
puVar13[1] = (ushort)uVar8;
}
uVar6 = param_6 - uVar8;
if (uVar8 <= param_6 && uVar6 != 0) {
if (uVar9 < uVar6 + uVar7) {
uVar7 = (uVar7 - uVar9) + uVar6;
memmove((void *)((long)(uVar16 + param_2) - (ulong)uVar7),(void *)(uVar16 + param_2)
,(ulong)uVar8);
uVar16 = (ulong)((int)uVar16 - uVar7);
}
memset((void *)(((ulong)uVar9 + param_2) - (ulong)uVar6),0,(ulong)uVar6);
uVar9 = uVar9 - uVar6;
puVar13[1] = (ushort)param_6;
}
uVar7 = uVar8 + (int)uVar16;
}
if (uVar7 != uVar9) {
uVar8 = uVar10 - uVar9;
if ((uint)uVar11 != uVar10) {
memmove((void *)((uVar11 + param_2) - (ulong)uVar8),(void *)((ulong)uVar9 + param_2),
(ulong)uVar8);
}
uVar8 = (uint)uVar11 - uVar8;
uVar11 = (ulong)uVar8;
iVar15 = uVar8 - uVar7;
uVar10 = uVar7;
}
*puVar13 = (short)iVar15 + (short)uVar16;
uVar9 = (uint)uVar16;
}
puVar13 = puVar13 + 2;
} while (puVar13 <= puVar14);
if ((uint)uVar11 != uVar10) {
uVar10 = uVar10 - uVar9;
memmove((void *)((uVar11 + param_2) - (ulong)uVar10),(void *)((ulong)uVar9 + param_2),
(ulong)uVar10);
uVar9 = (uint)uVar11 - uVar10;
}
}
puVar13[1] = (short)uVar9 - uVar2;
}
return;
}
|
|
5,916 | cs_leave | eloqsql/strings/ctype.c | static int cs_leave(MY_XML_PARSER *st,const char *attr, size_t len)
{
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
const struct my_cs_file_section_st *s= cs_file_sec(attr,len);
int state= s ? s->state : 0;
int rc;
switch(state){
case _CS_COLLATION:
if (i->tailoring_length)
i->cs.tailoring= i->tailoring;
rc= i->loader->add_collation ? i->loader->add_collation(&i->cs) : MY_XML_OK;
break;
/* Rules: Logical Reset Positions */
case _CS_RESET_FIRST_NON_IGNORABLE:
rc= tailoring_append(st, "[first non-ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_NON_IGNORABLE:
rc= tailoring_append(st, "[last non-ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_PRIMARY_IGNORABLE:
rc= tailoring_append(st, "[first primary ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_PRIMARY_IGNORABLE:
rc= tailoring_append(st, "[last primary ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_SECONDARY_IGNORABLE:
rc= tailoring_append(st, "[first secondary ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_SECONDARY_IGNORABLE:
rc= tailoring_append(st, "[last secondary ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_TERTIARY_IGNORABLE:
rc= tailoring_append(st, "[first tertiary ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_TERTIARY_IGNORABLE:
rc= tailoring_append(st, "[last tertiary ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_TRAILING:
rc= tailoring_append(st, "[first trailing]", 0, NULL);
break;
case _CS_RESET_LAST_TRAILING:
rc= tailoring_append(st, "[last trailing]", 0, NULL);
break;
case _CS_RESET_FIRST_VARIABLE:
rc= tailoring_append(st, "[first variable]", 0, NULL);
break;
case _CS_RESET_LAST_VARIABLE:
rc= tailoring_append(st, "[last variable]", 0, NULL);
break;
default:
rc=MY_XML_OK;
}
return rc;
} | O0 | c | cs_leave:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x140(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2f7b0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2e5a6
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0x2e5ad
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x2e5ad
movl -0x34(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x38(%rbp)
subl $0x9, %eax
je 0x2e687
jmp 0x2e5c4
movl -0x38(%rbp), %eax
subl $0x191, %eax # imm = 0x191
je 0x2e734
jmp 0x2e5d4
movl -0x38(%rbp), %eax
subl $0x192, %eax # imm = 0x192
je 0x2e753
jmp 0x2e5e4
movl -0x38(%rbp), %eax
subl $0x193, %eax # imm = 0x193
je 0x2e772
jmp 0x2e5f4
movl -0x38(%rbp), %eax
subl $0x194, %eax # imm = 0x194
je 0x2e791
jmp 0x2e604
movl -0x38(%rbp), %eax
subl $0x195, %eax # imm = 0x195
je 0x2e7b0
jmp 0x2e614
movl -0x38(%rbp), %eax
subl $0x196, %eax # imm = 0x196
je 0x2e7cf
jmp 0x2e624
movl -0x38(%rbp), %eax
subl $0x197, %eax # imm = 0x197
je 0x2e7eb
jmp 0x2e634
movl -0x38(%rbp), %eax
subl $0x198, %eax # imm = 0x198
je 0x2e807
jmp 0x2e644
movl -0x38(%rbp), %eax
subl $0x199, %eax # imm = 0x199
je 0x2e823
jmp 0x2e654
movl -0x38(%rbp), %eax
subl $0x19a, %eax # imm = 0x19A
je 0x2e83f
jmp 0x2e664
movl -0x38(%rbp), %eax
subl $0x19b, %eax # imm = 0x19B
je 0x2e6f6
jmp 0x2e674
movl -0x38(%rbp), %eax
subl $0x19c, %eax # imm = 0x19C
je 0x2e715
jmp 0x2e85b
movq -0x20(%rbp), %rax
cmpq $0x0, 0x690(%rax)
je 0x2e6ab
movq -0x20(%rbp), %rax
movq 0x688(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x718(%rax)
movq -0x20(%rbp), %rax
movq 0x7a8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
je 0x2e6e4
movq -0x20(%rbp), %rax
movq 0x7a8(%rax), %rax
movq 0xa8(%rax), %rax
movq -0x20(%rbp), %rdi
addq $0x6e0, %rdi # imm = 0x6E0
callq *%rax
movl %eax, -0x3c(%rbp)
jmp 0x2e6eb
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0x2e6eb
movl -0x3c(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x2e862
movq -0x8(%rbp), %rdi
leaq 0x4f94f(%rip), %rsi # 0x7e050
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2f840
movl %eax, -0x30(%rbp)
jmp 0x2e862
movq -0x8(%rbp), %rdi
leaq 0x4f946(%rip), %rsi # 0x7e066
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2f840
movl %eax, -0x30(%rbp)
jmp 0x2e862
movq -0x8(%rbp), %rdi
leaq 0x4f93c(%rip), %rsi # 0x7e07b
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2f840
movl %eax, -0x30(%rbp)
jmp 0x2e862
movq -0x8(%rbp), %rdi
leaq 0x4f937(%rip), %rsi # 0x7e095
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2f840
movl %eax, -0x30(%rbp)
jmp 0x2e862
movq -0x8(%rbp), %rdi
leaq 0x4f931(%rip), %rsi # 0x7e0ae
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2f840
movl %eax, -0x30(%rbp)
jmp 0x2e862
movq -0x8(%rbp), %rdi
leaq 0x4f92e(%rip), %rsi # 0x7e0ca
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2f840
movl %eax, -0x30(%rbp)
jmp 0x2e862
movq -0x8(%rbp), %rdi
leaq 0x4f92a(%rip), %rsi # 0x7e0e5
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2f840
movl %eax, -0x30(%rbp)
jmp 0x2e862
movq -0x8(%rbp), %rdi
leaq 0x4f926(%rip), %rsi # 0x7e100
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2f840
movl %eax, -0x30(%rbp)
jmp 0x2e862
movq -0x8(%rbp), %rdi
leaq 0x4f924(%rip), %rsi # 0x7e11a
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2f840
movl %eax, -0x30(%rbp)
jmp 0x2e862
movq -0x8(%rbp), %rdi
leaq 0x4f919(%rip), %rsi # 0x7e12b
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2f840
movl %eax, -0x30(%rbp)
jmp 0x2e862
movq -0x8(%rbp), %rdi
leaq 0x4f90d(%rip), %rsi # 0x7e13b
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2f840
movl %eax, -0x30(%rbp)
jmp 0x2e862
movq -0x8(%rbp), %rdi
leaq 0x4f902(%rip), %rsi # 0x7e14c
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2f840
movl %eax, -0x30(%rbp)
jmp 0x2e862
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| cs_leave:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax+140h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call cs_file_sec
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jz short loc_2E5A6
mov rax, [rbp+var_28]
mov eax, [rax]
mov [rbp+var_34], eax
jmp short loc_2E5AD
loc_2E5A6:
xor eax, eax
mov [rbp+var_34], eax
jmp short $+2
loc_2E5AD:
mov eax, [rbp+var_34]
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov [rbp+var_38], eax
sub eax, 9
jz loc_2E687
jmp short $+2
loc_2E5C4:
mov eax, [rbp+var_38]
sub eax, 191h
jz loc_2E734
jmp short $+2
loc_2E5D4:
mov eax, [rbp+var_38]
sub eax, 192h
jz loc_2E753
jmp short $+2
loc_2E5E4:
mov eax, [rbp+var_38]
sub eax, 193h
jz loc_2E772
jmp short $+2
loc_2E5F4:
mov eax, [rbp+var_38]
sub eax, 194h
jz loc_2E791
jmp short $+2
loc_2E604:
mov eax, [rbp+var_38]
sub eax, 195h
jz loc_2E7B0
jmp short $+2
loc_2E614:
mov eax, [rbp+var_38]
sub eax, 196h
jz loc_2E7CF
jmp short $+2
loc_2E624:
mov eax, [rbp+var_38]
sub eax, 197h
jz loc_2E7EB
jmp short $+2
loc_2E634:
mov eax, [rbp+var_38]
sub eax, 198h
jz loc_2E807
jmp short $+2
loc_2E644:
mov eax, [rbp+var_38]
sub eax, 199h
jz loc_2E823
jmp short $+2
loc_2E654:
mov eax, [rbp+var_38]
sub eax, 19Ah
jz loc_2E83F
jmp short $+2
loc_2E664:
mov eax, [rbp+var_38]
sub eax, 19Bh
jz loc_2E6F6
jmp short $+2
loc_2E674:
mov eax, [rbp+var_38]
sub eax, 19Ch
jz loc_2E715
jmp loc_2E85B
loc_2E687:
mov rax, [rbp+var_20]
cmp qword ptr [rax+690h], 0
jz short loc_2E6AB
mov rax, [rbp+var_20]
mov rcx, [rax+688h]
mov rax, [rbp+var_20]
mov [rax+718h], rcx
loc_2E6AB:
mov rax, [rbp+var_20]
mov rax, [rax+7A8h]
cmp qword ptr [rax+0A8h], 0
jz short loc_2E6E4
mov rax, [rbp+var_20]
mov rax, [rax+7A8h]
mov rax, [rax+0A8h]
mov rdi, [rbp+var_20]
add rdi, 6E0h
call rax
mov [rbp+var_3C], eax
jmp short loc_2E6EB
loc_2E6E4:
xor eax, eax
mov [rbp+var_3C], eax
jmp short $+2
loc_2E6EB:
mov eax, [rbp+var_3C]
mov [rbp+var_30], eax
jmp loc_2E862
loc_2E6F6:
mov rdi, [rbp+var_8]
lea rsi, aFirstNonIgnora; "[first non-ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_2E862
loc_2E715:
mov rdi, [rbp+var_8]
lea rsi, aLastNonIgnorab; "[last non-ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_2E862
loc_2E734:
mov rdi, [rbp+var_8]
lea rsi, aFirstPrimaryIg; "[first primary ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_2E862
loc_2E753:
mov rdi, [rbp+var_8]
lea rsi, aLastPrimaryIgn; "[last primary ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_2E862
loc_2E772:
mov rdi, [rbp+var_8]
lea rsi, aFirstSecondary; "[first secondary ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_2E862
loc_2E791:
mov rdi, [rbp+var_8]
lea rsi, aLastSecondaryI; "[last secondary ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_2E862
loc_2E7B0:
mov rdi, [rbp+var_8]
lea rsi, aFirstTertiaryI; "[first tertiary ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_2E862
loc_2E7CF:
mov rdi, [rbp+var_8]
lea rsi, aLastTertiaryIg; "[last tertiary ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp short loc_2E862
loc_2E7EB:
mov rdi, [rbp+var_8]
lea rsi, aFirstTrailing; "[first trailing]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp short loc_2E862
loc_2E807:
mov rdi, [rbp+var_8]
lea rsi, aLastTrailing; "[last trailing]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp short loc_2E862
loc_2E823:
mov rdi, [rbp+var_8]
lea rsi, aFirstVariable; "[first variable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp short loc_2E862
loc_2E83F:
mov rdi, [rbp+var_8]
lea rsi, aLastVariable; "[last variable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp short loc_2E862
loc_2E85B:
mov [rbp+var_30], 0
loc_2E862:
mov eax, [rbp+var_30]
add rsp, 40h
pop rbp
retn
| long long cs_leave(long long a1, long long a2, long long a3)
{
int v5; // [rsp+Ch] [rbp-34h]
int *v7; // [rsp+18h] [rbp-28h]
_QWORD *v8; // [rsp+20h] [rbp-20h]
v8 = *(_QWORD **)(a1 + 320);
v7 = (int *)cs_file_sec(a2, a3);
if ( v7 )
v5 = *v7;
else
v5 = 0;
switch ( v5 )
{
case 9:
if ( v8[210] )
v8[227] = v8[209];
if ( *(_QWORD *)(v8[245] + 168LL) )
return (unsigned int)(*(long long ( **)(_QWORD *))(v8[245] + 168LL))(v8 + 220);
else
return 0;
case 401:
return (unsigned int)tailoring_append(a1, "[first primary ignorable]", 0LL);
case 402:
return (unsigned int)tailoring_append(a1, "[last primary ignorable]", 0LL);
case 403:
return (unsigned int)tailoring_append(a1, "[first secondary ignorable]", 0LL);
case 404:
return (unsigned int)tailoring_append(a1, "[last secondary ignorable]", 0LL);
case 405:
return (unsigned int)tailoring_append(a1, "[first tertiary ignorable]", 0LL);
case 406:
return (unsigned int)tailoring_append(a1, "[last tertiary ignorable]", 0LL);
case 407:
return (unsigned int)tailoring_append(a1, "[first trailing]", 0LL);
case 408:
return (unsigned int)tailoring_append(a1, "[last trailing]", 0LL);
case 409:
return (unsigned int)tailoring_append(a1, "[first variable]", 0LL);
case 410:
return (unsigned int)tailoring_append(a1, "[last variable]", 0LL);
case 411:
return (unsigned int)tailoring_append(a1, "[first non-ignorable]", 0LL);
case 412:
return (unsigned int)tailoring_append(a1, "[last non-ignorable]", 0LL);
default:
return 0;
}
}
| cs_leave:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x140]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0012f7b0
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0012e5a6
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0012e5ad
LAB_0012e5a6:
XOR EAX,EAX
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0012e5ad
LAB_0012e5ad:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x38],EAX
SUB EAX,0x9
JZ 0x0012e687
JMP 0x0012e5c4
LAB_0012e5c4:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x191
JZ 0x0012e734
JMP 0x0012e5d4
LAB_0012e5d4:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x192
JZ 0x0012e753
JMP 0x0012e5e4
LAB_0012e5e4:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x193
JZ 0x0012e772
JMP 0x0012e5f4
LAB_0012e5f4:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x194
JZ 0x0012e791
JMP 0x0012e604
LAB_0012e604:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x195
JZ 0x0012e7b0
JMP 0x0012e614
LAB_0012e614:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x196
JZ 0x0012e7cf
JMP 0x0012e624
LAB_0012e624:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x197
JZ 0x0012e7eb
JMP 0x0012e634
LAB_0012e634:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x198
JZ 0x0012e807
JMP 0x0012e644
LAB_0012e644:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x199
JZ 0x0012e823
JMP 0x0012e654
LAB_0012e654:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x19a
JZ 0x0012e83f
JMP 0x0012e664
LAB_0012e664:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x19b
JZ 0x0012e6f6
JMP 0x0012e674
LAB_0012e674:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x19c
JZ 0x0012e715
JMP 0x0012e85b
LAB_0012e687:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x690],0x0
JZ 0x0012e6ab
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x688]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x718],RCX
LAB_0012e6ab:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x7a8]
CMP qword ptr [RAX + 0xa8],0x0
JZ 0x0012e6e4
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x7a8]
MOV RAX,qword ptr [RAX + 0xa8]
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x6e0
CALL RAX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0012e6eb
LAB_0012e6e4:
XOR EAX,EAX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0012e6eb
LAB_0012e6eb:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e6f6:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x17e050]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0012f840
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e715:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x17e066]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0012f840
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e734:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x17e07b]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0012f840
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e753:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x17e095]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0012f840
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e772:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x17e0ae]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0012f840
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e791:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x17e0ca]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0012f840
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e7b0:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x17e0e5]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0012f840
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e7cf:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x17e100]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0012f840
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e7eb:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x17e11a]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0012f840
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e807:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x17e12b]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0012f840
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e823:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x17e13b]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0012f840
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e83f:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x17e14c]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0012f840
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012e862
LAB_0012e85b:
MOV dword ptr [RBP + -0x30],0x0
LAB_0012e862:
MOV EAX,dword ptr [RBP + -0x30]
ADD RSP,0x40
POP RBP
RET
|
int4 cs_leave(long param_1,int8 param_2,int8 param_3)
{
long lVar1;
int *piVar2;
int4 local_44;
int local_3c;
int4 local_38;
lVar1 = *(long *)(param_1 + 0x140);
piVar2 = (int *)cs_file_sec(param_2,param_3);
if (piVar2 == (int *)0x0) {
local_3c = 0;
}
else {
local_3c = *piVar2;
}
if (local_3c == 9) {
if (*(long *)(lVar1 + 0x690) != 0) {
*(int8 *)(lVar1 + 0x718) = *(int8 *)(lVar1 + 0x688);
}
if (*(long *)(*(long *)(lVar1 + 0x7a8) + 0xa8) == 0) {
local_44 = 0;
}
else {
local_44 = (**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa8))(lVar1 + 0x6e0);
}
local_38 = local_44;
}
else if (local_3c == 0x191) {
local_38 = tailoring_append(param_1,"[first primary ignorable]",0);
}
else if (local_3c == 0x192) {
local_38 = tailoring_append(param_1,"[last primary ignorable]",0);
}
else if (local_3c == 0x193) {
local_38 = tailoring_append(param_1,"[first secondary ignorable]",0);
}
else if (local_3c == 0x194) {
local_38 = tailoring_append(param_1,"[last secondary ignorable]",0);
}
else if (local_3c == 0x195) {
local_38 = tailoring_append(param_1,"[first tertiary ignorable]",0);
}
else if (local_3c == 0x196) {
local_38 = tailoring_append(param_1,"[last tertiary ignorable]",0);
}
else if (local_3c == 0x197) {
local_38 = tailoring_append(param_1,"[first trailing]",0);
}
else if (local_3c == 0x198) {
local_38 = tailoring_append(param_1,"[last trailing]",0);
}
else if (local_3c == 0x199) {
local_38 = tailoring_append(param_1,"[first variable]",0);
}
else if (local_3c == 0x19a) {
local_38 = tailoring_append(param_1,"[last variable]",0);
}
else if (local_3c == 0x19b) {
local_38 = tailoring_append(param_1,"[first non-ignorable]",0);
}
else if (local_3c == 0x19c) {
local_38 = tailoring_append(param_1,"[last non-ignorable]",0);
}
else {
local_38 = 0;
}
return local_38;
}
|
|
5,917 | psi_mutex_trylock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_TRYLOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line);
# else
int result= pthread_mutex_trylock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
} | O3 | c | psi_mutex_trylock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x2f18b8(%rip), %r15 # 0x31ced8
movq (%r15), %rax
movq 0x40(%rdi), %rsi
leaq -0x48(%rbp), %rdi
pushq $0x1
popq %rdx
callq *0x190(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x260b0
movl %eax, %r14d
testq %rbx, %rbx
je 0x2b656
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x198(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| psi_mutex_trylock:
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+40h]
lea rdi, [rbp+var_48]
push 1
pop rdx
call qword ptr [rax+190h]
mov rbx, rax
mov rdi, r14
call _pthread_mutex_trylock
mov r14d, eax
test rbx, rbx
jz short loc_2B656
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+198h]
loc_2B656:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_mutex_trylock(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, long long, long long, _QWORD))PSI_server[50])(
v6,
*(_QWORD *)(a1 + 64),
1LL,
a2,
a3);
v4 = pthread_mutex_trylock(a1);
if ( v3 )
((void ( *)(long long, _QWORD))PSI_server[51])(v3, v4);
return v4;
}
| psi_mutex_trylock:
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,[0x41ced8]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x40]
LEA RDI,[RBP + -0x48]
PUSH 0x1
POP RDX
CALL qword ptr [RAX + 0x190]
MOV RBX,RAX
MOV RDI,R14
CALL 0x001260b0
MOV R14D,EAX
TEST RBX,RBX
JZ 0x0012b656
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x198]
LAB_0012b656:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int psi_mutex_trylock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),1,param_2,param_3);
iVar1 = pthread_mutex_trylock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
|
|
5,918 | MYSQL_BIN_LOG::open_index_file(char const*, char const*, bool) | eloqsql/sql/log.cc | bool MYSQL_BIN_LOG::open_index_file(const char *index_file_name_arg,
const char *log_name, bool need_mutex)
{
File index_file_nr= -1;
DBUG_ASSERT(!my_b_inited(&index_file));
/*
First open of this class instance
Create an index file that will hold all file names uses for logging.
Add new entries to the end of it.
*/
myf opt= MY_UNPACK_FILENAME;
if (!index_file_name_arg)
{
index_file_name_arg= log_name; // Use same basename for index file
opt= MY_UNPACK_FILENAME | MY_REPLACE_EXT;
}
fn_format(index_file_name, index_file_name_arg, mysql_data_home,
".index", opt);
if ((index_file_nr= mysql_file_open(m_key_file_log_index,
index_file_name,
O_RDWR | O_CREAT | O_BINARY | O_CLOEXEC,
MYF(MY_WME))) < 0 ||
mysql_file_sync(index_file_nr, MYF(MY_WME)) ||
init_io_cache_ext(&index_file, index_file_nr,
IO_SIZE, WRITE_CACHE,
mysql_file_seek(index_file_nr, 0L, MY_SEEK_END, MYF(0)),
0, MYF(MY_WME | MY_WAIT_IF_FULL),
m_key_file_log_index_cache) ||
DBUG_EVALUATE_IF("fault_injection_openning_index", 1, 0))
{
/*
TODO: all operations creating/deleting the index file or a log, should
call my_sync_dir() or my_sync_dir_by_file() to be durable.
TODO: file creation should be done with mysql_file_create()
not mysql_file_open().
*/
if (index_file_nr >= 0)
mysql_file_close(index_file_nr, MYF(0));
return TRUE;
}
#ifdef HAVE_REPLICATION
/*
Sync the index by purging any binary log file that is not registered.
In other words, either purge binary log files that were removed from
the index but not purged from the file system due to a crash or purge
any binary log file that was created but not register in the index
due to a crash.
*/
if (set_purge_index_file_name(index_file_name_arg) ||
open_purge_index_file(FALSE) ||
purge_index_entry(NULL, NULL, need_mutex) ||
close_purge_index_file() ||
DBUG_EVALUATE_IF("fault_injection_recovering_index", 1, 0))
{
sql_print_error("MYSQL_BIN_LOG::open_index_file failed to sync the index "
"file.");
return TRUE;
}
#endif
return FALSE;
} | O0 | cpp | MYSQL_BIN_LOG::open_index_file(char const*, char const*, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF
jmp 0x9f356c
movq $0x4, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x9f358b
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x6, -0x30(%rbp)
movq -0x38(%rbp), %rdi
addq $0x710, %rdi # imm = 0x710
movq -0x18(%rbp), %rsi
leaq 0xa0b09f(%rip), %rax # 0x13fe640
movq (%rax), %rdx
movq -0x30(%rbp), %rax
movl %eax, %r8d
leaq 0x386170(%rip), %rcx # 0xd79722
callq 0xbff350
movq -0x38(%rbp), %rcx
movl 0x464(%rcx), %edi
addq $0x710, %rcx # imm = 0x710
leaq 0x3d458f(%rip), %rsi # 0xdc7b5e
movl $0xdfd, %edx # imm = 0xDFD
movl $0x80042, %r8d # imm = 0x80042
movl $0x10, %r9d
callq 0x9f1890
movl %eax, -0x28(%rbp)
cmpl $0x0, %eax
jl 0x9f367c
movl -0x28(%rbp), %edx
leaq 0x3d4563(%rip), %rdi # 0xdc7b5e
movl $0xdfe, %esi # imm = 0xDFE
movl $0x10, %ecx
callq 0x9f21a0
cmpl $0x0, %eax
jne 0x9f367c
movq -0x38(%rbp), %rax
addq $0x608, %rax # imm = 0x608
movq %rax, -0x48(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x28(%rbp), %edx
leaq 0x3d4531(%rip), %rdi # 0xdc7b5e
movl $0xe01, %esi # imm = 0xE01
xorl %eax, %eax
movl %eax, %r9d
movl $0x2, %r8d
movq %r9, %rcx
callq 0x9f3720
movq -0x48(%rbp), %rdi
movl -0x3c(%rbp), %esi
movq %rax, %r8
movq -0x38(%rbp), %rax
movl 0x468(%rax), %eax
movl $0x1000, %edx # imm = 0x1000
movl $0x2, %ecx
xorl %r9d, %r9d
movq $0x30, (%rsp)
movl %eax, 0x8(%rsp)
callq 0xbff9f0
cmpl $0x0, %eax
je 0x9f36a0
cmpl $0x0, -0x28(%rbp)
jl 0x9f369a
movl -0x28(%rbp), %edx
leaq 0x3d44d2(%rip), %rdi # 0xdc7b5e
movl $0xe0d, %esi # imm = 0xE0D
xorl %eax, %eax
movl %eax, %ecx
callq 0x9f1970
movb $0x1, -0x1(%rbp)
jmp 0x9f3711
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9f3810
cmpl $0x0, %eax
jne 0x9f36ed
movq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x9f3890
cmpl $0x0, %eax
jne 0x9f36ed
movq -0x38(%rbp), %rdi
movb -0x21(%rbp), %al
xorl %ecx, %ecx
movl %ecx, %edx
andb $0x1, %al
movq %rdx, %rsi
movzbl %al, %ecx
callq 0x9f3980
cmpl $0x0, %eax
jne 0x9f36ed
movq -0x38(%rbp), %rdi
callq 0x9f3e00
cmpl $0x0, %eax
je 0x9f370d
leaq 0x3d446a(%rip), %rdi # 0xdc7b5e
movl $0xe21, %esi # imm = 0xE21
leaq 0x3d491e(%rip), %rdx # 0xdc801e
movb $0x0, %al
callq 0x9eca00
movb $0x1, -0x1(%rbp)
jmp 0x9f3711
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN13MYSQL_BIN_LOG15open_index_fileEPKcS1_b:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
and al, 1
mov [rbp+var_21], al
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov [rbp+var_28], 0FFFFFFFFh
jmp short $+2
loc_9F356C:
mov [rbp+var_30], 4
cmp [rbp+var_18], 0
jnz short loc_9F358B
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
mov [rbp+var_30], 6
loc_9F358B:
mov rdi, [rbp+var_38]
add rdi, 710h
mov rsi, [rbp+var_18]
lea rax, mysql_data_home
mov rdx, [rax]
mov rax, [rbp+var_30]
mov r8d, eax
lea rcx, aRelayBinIndex+0Ah; ".index"
call fn_format
mov rcx, [rbp+var_38]
mov edi, [rcx+464h]; unsigned int
add rcx, 710h; char *
lea rsi, aWorkspaceLlm4b_99; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0DFDh; unsigned int
mov r8d, 80042h; int
mov r9d, 10h; unsigned __int64
call _ZL22inline_mysql_file_openjPKcjS0_im_13; inline_mysql_file_open(uint,char const*,uint,char const*,int,ulong)
mov [rbp+var_28], eax
cmp eax, 0
jl loc_9F367C
mov edx, [rbp+var_28]; int
lea rdi, aWorkspaceLlm4b_99; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 0DFEh; unsigned int
mov ecx, 10h; unsigned __int64
call _ZL22inline_mysql_file_syncPKcjim_3; inline_mysql_file_sync(char const*,uint,int,ulong)
cmp eax, 0
jnz short loc_9F367C
mov rax, [rbp+var_38]
add rax, 608h
mov [rbp+var_48], rax
mov eax, [rbp+var_28]
mov [rbp+var_3C], eax
mov edx, [rbp+var_28]; int
lea rdi, aWorkspaceLlm4b_99; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 0E01h; unsigned int
xor eax, eax
mov r9d, eax; unsigned __int64
mov r8d, 2; int
mov rcx, r9; unsigned __int64
call _ZL22inline_mysql_file_seekPKcjiyim_2; inline_mysql_file_seek(char const*,uint,int,ulong long,int,ulong)
mov rdi, [rbp+var_48]
mov esi, [rbp+var_3C]
mov r8, rax
mov rax, [rbp+var_38]
mov eax, [rax+468h]
mov edx, 1000h
mov ecx, 2
xor r9d, r9d
mov [rsp+60h+var_60], 30h ; '0'
mov [rsp+60h+var_58], eax
call init_io_cache_ext
cmp eax, 0
jz short loc_9F36A0
loc_9F367C:
cmp [rbp+var_28], 0
jl short loc_9F369A
mov edx, [rbp+var_28]; int
lea rdi, aWorkspaceLlm4b_99; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 0E0Dh; unsigned int
xor eax, eax
mov ecx, eax; unsigned __int64
call _ZL23inline_mysql_file_closePKcjim_18; inline_mysql_file_close(char const*,uint,int,ulong)
loc_9F369A:
mov [rbp+var_1], 1
jmp short loc_9F3711
loc_9F36A0:
mov rdi, [rbp+var_38]; this
mov rsi, [rbp+var_18]; char *
call _ZN13MYSQL_BIN_LOG25set_purge_index_file_nameEPKc; MYSQL_BIN_LOG::set_purge_index_file_name(char const*)
cmp eax, 0
jnz short loc_9F36ED
mov rdi, [rbp+var_38]; this
xor esi, esi; bool
call _ZN13MYSQL_BIN_LOG21open_purge_index_fileEb; MYSQL_BIN_LOG::open_purge_index_file(bool)
cmp eax, 0
jnz short loc_9F36ED
mov rdi, [rbp+var_38]; this
mov al, [rbp+var_21]
xor ecx, ecx
mov edx, ecx; unsigned __int64 *
and al, 1
mov rsi, rdx; THD *
movzx ecx, al; bool
call _ZN13MYSQL_BIN_LOG17purge_index_entryEP3THDPyb; MYSQL_BIN_LOG::purge_index_entry(THD *,ulong long *,bool)
cmp eax, 0
jnz short loc_9F36ED
mov rdi, [rbp+var_38]; this
call _ZN13MYSQL_BIN_LOG22close_purge_index_fileEv; MYSQL_BIN_LOG::close_purge_index_file(void)
cmp eax, 0
jz short loc_9F370D
loc_9F36ED:
lea rdi, aWorkspaceLlm4b_99; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 0E21h; int
lea rdx, aMysqlBinLogOpe; "MYSQL_BIN_LOG::open_index_file failed t"...
mov al, 0
call _Z16glog_print_errorPKciS0_z; glog_print_error(char const*,int,char const*,...)
mov [rbp+var_1], 1
jmp short loc_9F3711
loc_9F370D:
mov [rbp+var_1], 0
loc_9F3711:
mov al, [rbp+var_1]
and al, 1
add rsp, 60h
pop rbp
retn
| char MYSQL_BIN_LOG::open_index_file(MYSQL_BIN_LOG *this, char *a2, char *a3, char a4)
{
int v4; // eax
unsigned int v6; // [rsp+30h] [rbp-30h]
int v7; // [rsp+38h] [rbp-28h]
char v8; // [rsp+3Fh] [rbp-21h]
char *v9; // [rsp+48h] [rbp-18h]
v9 = a2;
v8 = a4 & 1;
v6 = 4;
if ( !a2 )
{
v9 = a3;
v6 = 6;
}
fn_format((char *)this + 1808, v9, mysql_data_home, ".index", v6);
v7 = inline_mysql_file_open(
*((_DWORD *)this + 281),
"/workspace/llm4binary/github2025/eloqsql/sql/log.cc",
0xDFDu,
(const char *)this + 1808,
0x80042u,
16LL);
if ( v7 < 0
|| (unsigned int)inline_mysql_file_sync("/workspace/llm4binary/github2025/eloqsql/sql/log.cc", 0xDFEu, v7, 16LL)
|| (v4 = inline_mysql_file_seek("/workspace/llm4binary/github2025/eloqsql/sql/log.cc", 0xE01u, v7, 0LL, 2, 0LL),
(unsigned int)init_io_cache_ext((int)this + 1544, v7, 4096, 2, v4, 0, 48LL, *((_DWORD *)this + 282))) )
{
if ( v7 >= 0 )
inline_mysql_file_close("/workspace/llm4binary/github2025/eloqsql/sql/log.cc", 0xE0Du, v7, 0LL);
return 1;
}
else if ( (unsigned int)MYSQL_BIN_LOG::set_purge_index_file_name(this, v9)
|| (unsigned int)MYSQL_BIN_LOG::open_purge_index_file(this, 0)
|| (unsigned int)MYSQL_BIN_LOG::purge_index_entry(this, 0LL, 0LL, v8 & 1)
|| (unsigned int)MYSQL_BIN_LOG::close_purge_index_file(this) )
{
glog_print_error(
"/workspace/llm4binary/github2025/eloqsql/sql/log.cc",
0xE21u,
"MYSQL_BIN_LOG::open_index_file failed to sync the index file.");
return 1;
}
else
{
return 0;
}
}
| val_int_signed_typecast_from_int:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0xf0]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x10],RCX
TEST byte ptr [RAX + 0x64],0x1
JNZ 0x009f3590
MOV RAX,qword ptr [RBP + -0x18]
TEST byte ptr [RAX + 0xe],0x1
JZ 0x009f3590
CMP qword ptr [RBP + -0x10],0x0
JGE 0x009f3590
CALL 0x005936d0
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,RAX
CALL 0x009f2990
LAB_009f3590:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x20
POP RBP
RET
|
/* Item::val_int_signed_typecast_from_int() */
long __thiscall Item::val_int_signed_typecast_from_int(Item *this)
{
long lVar1;
THD *pTVar2;
lVar1 = (**(code **)(*(long *)this + 0xf0))();
if (((((byte)this[100] & 1) == 0) && (((byte)this[0xe] & 1) != 0)) && (lVar1 < 0)) {
pTVar2 = (THD *)_current_thd();
push_note_converted_to_negative_complement(this,pTVar2);
}
return lVar1;
}
|
|
5,919 | main | eloqsql/unittest/mysys/aes-t.c | int
main(int argc __attribute__((unused)),char *argv[])
{
MY_INIT(argv[0]);
plan(122);
DO_TEST_P(MY_AES_ECB, 200, '.', 208, "\xd8\x73\x8e\x3a\xbc\x66\x99\x13\x7f\x90\x23\x52\xee\x97\x6f\x9a");
DO_TEST_P(MY_AES_ECB, 128, '?', 144, "\x19\x58\x33\x85\x4c\xaa\x7f\x06\xd1\xb2\xec\xd7\xb7\x6a\xa9\x5b");
DO_TEST_P(MY_AES_CBC, 159, '%', 160, "\x4b\x03\x18\x3d\xf1\xa7\xcd\xa1\x46\xb3\xc6\x8a\x92\xc0\x0f\xc9");
DO_TEST_P(MY_AES_CBC, 192, '@', 208, "\x54\xc4\x75\x1d\xff\xe0\xf6\x80\xf0\x85\xbb\x8b\xda\x07\x21\x17");
DO_TEST_N(MY_AES_ECB, 200, '.', 200, "\xbf\xec\x43\xd1\x66\x8d\x01\xad\x3a\x25\xee\xa6\x3d\xc6\xc4\x68");
DO_TEST_N(MY_AES_ECB, 128, '?', 128, "\x5b\x44\x20\xf3\xd9\xb4\x9d\x74\x5e\xb7\x5a\x0a\xe7\x32\x35\xc3");
DO_TEST_N(MY_AES_CBC, 159, '%', 159, "\xf3\x6e\x40\x00\x3c\x08\xa0\xb1\x2d\x1f\xcf\xce\x54\xc9\x73\x83");
DO_TEST_N(MY_AES_CBC, 192, '@', 192, "\x30\xe5\x28\x8c\x4a\x3b\x02\xd7\x56\x40\x59\x25\xac\x58\x09\x22");
DO_TEST_P(MY_AES_CTR, 200, '.', 200, "\x5a\x77\x19\xea\x67\x50\xe3\xab\x7f\x39\x6f\xc4\xa8\x09\xc5\x88");
DO_TEST_P(MY_AES_GCM, 128, '?', 144, "\x54\x6a\x7c\xa2\x04\xdc\x6e\x80\x1c\xcd\x5f\x7a\x7b\x08\x9e\x9d");
/* test short inputs (less that one block) */
DO_TEST_P(MY_AES_ECB, 1, '.', 16, "\x6c\xd7\x66\x5b\x1b\x1e\x3a\x04\xfd\xb1\x91\x8d\x0e\xfd\xf1\x86");
DO_TEST_P(MY_AES_ECB, 2, '?', 16, "\xdb\x84\x9e\xaf\x5f\xcc\xdb\x6b\xf2\x1c\xeb\x53\x75\xa3\x53\x5e");
DO_TEST_P(MY_AES_CBC, 3, '%', 16, "\x60\x8e\x45\x9a\x07\x39\x63\xce\x02\x19\xdd\x52\xe3\x09\x2a\x66");
DO_TEST_P(MY_AES_CBC, 4, '@', 16, "\x90\xc2\x6b\xf8\x84\x79\x83\xbd\xc1\x60\x71\x04\x55\x6a\xce\x9e");
DO_TEST_N(MY_AES_ECB, 5, '.', 5, "\x6b\x60\xdc\xa4\x24\x9b\x02\xbb\x24\x41\x9b\xb0\xd1\x01\xcd\xba");
DO_TEST_N(MY_AES_ECB, 6, '?', 6, "\x35\x8f\xb7\x9d\xd9\x61\x21\xcf\x25\x66\xd5\x9e\x91\xc1\x42\x7e");
DO_TEST_N(MY_AES_CBC, 7, '%', 7, "\x94\x5e\x80\x71\x41\x7a\x64\x5d\x6f\x2e\x5b\x66\x9b\x5a\x3d\xda");
DO_TEST_N(MY_AES_CBC, 8, '@', 8, "\xb8\x53\x97\xb9\x40\xa6\x98\xaf\x0c\x7b\x9a\xac\xad\x7e\x3c\xe0");
DO_TEST_P(MY_AES_GCM, 9, '?', 25, "\x5e\x05\xfd\xb2\x8e\x17\x04\x1e\xff\x6d\x71\x81\xcd\x85\x8d\xb5");
my_end(0);
return exit_status();
} | O0 | c | main:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
leaq 0x3620ac(%rip), %rax # 0x387940
movq %rcx, (%rax)
callq 0x26f40
movl $0x7a, %edi
callq 0x26410
xorl %edx, %edx
leaq 0x55755(%rip), %rsi # 0x7b004
movl $0xc8, %ecx
movl $0x2e, %r8d
movl $0xd0, %r9d
leaq 0x55748(%rip), %rax # 0x7b00f
movl %edx, %edi
movq %rax, (%rsp)
callq 0x25c40
xorl %edx, %edx
leaq 0x55729(%rip), %rsi # 0x7b004
movl $0x80, %ecx
movl $0x3f, %r8d
movl $0x90, %r9d
leaq 0x5572d(%rip), %rax # 0x7b020
movl %edx, %edi
movq %rax, (%rsp)
callq 0x25c40
movl $0x1, %edi
leaq 0x55727(%rip), %rsi # 0x7b031
xorl %edx, %edx
movl $0x9f, %ecx
movl $0x25, %r8d
movl $0xa0, %r9d
leaq 0x55718(%rip), %rax # 0x7b03c
movq %rax, (%rsp)
callq 0x25c40
movl $0x1, %edi
leaq 0x556f8(%rip), %rsi # 0x7b031
xorl %edx, %edx
movl $0xc0, %ecx
movl $0x40, %r8d
movl $0xd0, %r9d
leaq 0x556fa(%rip), %rax # 0x7b04d
movq %rax, (%rsp)
callq 0x25c40
xorl %edi, %edi
leaq 0x5569f(%rip), %rsi # 0x7b004
movl $0x2, %edx
movl $0xc8, %ecx
movl $0x2e, %r8d
movl $0xc8, %r9d
leaq 0x556dc(%rip), %rax # 0x7b05e
movq %rax, (%rsp)
callq 0x25c40
xorl %edi, %edi
leaq 0x55670(%rip), %rsi # 0x7b004
movl $0x2, %edx
movl $0x80, %ecx
movl $0x3f, %r8d
movl $0x80, %r9d
leaq 0x556be(%rip), %rax # 0x7b06f
movq %rax, (%rsp)
callq 0x25c40
movl $0x1, %edi
leaq 0x5566b(%rip), %rsi # 0x7b031
movl $0x2, %edx
movl $0x9f, %ecx
movl $0x25, %r8d
movl $0x9f, %r9d
leaq 0x5a1dc(%rip), %rax # 0x7fbbf
movq %rax, (%rsp)
callq 0x25c40
movl $0x1, %edi
leaq 0x55639(%rip), %rsi # 0x7b031
movl $0x2, %edx
movl $0xc0, %ecx
movl $0x40, %r8d
movl $0xc0, %r9d
leaq 0x5566b(%rip), %rax # 0x7b080
movq %rax, (%rsp)
callq 0x25c40
movl $0x2, %edi
leaq 0x55667(%rip), %rsi # 0x7b091
xorl %edx, %edx
movl $0xc8, %ecx
movl $0x2e, %r8d
movl $0xc8, %r9d
leaq 0x55658(%rip), %rax # 0x7b09c
movq %rax, (%rsp)
callq 0x25c40
movl $0x3, %edi
leaq 0x55654(%rip), %rsi # 0x7b0ad
xorl %edx, %edx
movl $0x80, %ecx
movl $0x3f, %r8d
movl $0x90, %r9d
leaq 0x55645(%rip), %rax # 0x7b0b8
movq %rax, (%rsp)
callq 0x25c40
xorl %edx, %edx
leaq 0x5557f(%rip), %rsi # 0x7b004
movl $0x1, %ecx
movl $0x2e, %r8d
movl $0x10, %r9d
leaq 0x5562c(%rip), %rax # 0x7b0c9
movl %edx, %edi
movq %rax, (%rsp)
callq 0x25c40
xorl %edx, %edx
leaq 0x55553(%rip), %rsi # 0x7b004
movl $0x2, %ecx
movl $0x3f, %r8d
movl $0x10, %r9d
leaq 0x55611(%rip), %rax # 0x7b0da
movl %edx, %edi
movq %rax, (%rsp)
callq 0x25c40
movl $0x1, %edi
leaq 0x55551(%rip), %rsi # 0x7b031
xorl %edx, %edx
movl $0x3, %ecx
movl $0x25, %r8d
movl $0x10, %r9d
leaq 0x555f1(%rip), %rax # 0x7b0eb
movq %rax, (%rsp)
callq 0x25c40
movl $0x1, %edi
leaq 0x55522(%rip), %rsi # 0x7b031
xorl %edx, %edx
movl $0x4, %ecx
movl $0x40, %r8d
movl $0x10, %r9d
leaq 0x555d3(%rip), %rax # 0x7b0fc
movq %rax, (%rsp)
callq 0x25c40
xorl %edi, %edi
leaq 0x554c9(%rip), %rsi # 0x7b004
movl $0x2, %edx
movl $0x5, %ecx
movl $0x2e, %r8d
movl $0x5, %r9d
leaq 0x555b5(%rip), %rax # 0x7b10d
movq %rax, (%rsp)
callq 0x25c40
xorl %edi, %edi
leaq 0x5549a(%rip), %rsi # 0x7b004
movl $0x2, %edx
movl $0x6, %ecx
movl $0x3f, %r8d
movl $0x6, %r9d
leaq 0x55597(%rip), %rax # 0x7b11e
movq %rax, (%rsp)
callq 0x25c40
movl $0x1, %edi
leaq 0x55495(%rip), %rsi # 0x7b031
movl $0x2, %edx
movl $0x7, %ecx
movl $0x25, %r8d
movl $0x7, %r9d
leaq 0x55576(%rip), %rax # 0x7b12f
movq %rax, (%rsp)
callq 0x25c40
movl $0x1, %edi
leaq 0x55463(%rip), %rsi # 0x7b031
movl $0x2, %edx
movl $0x8, %ecx
movl $0x40, %r8d
movl $0x8, %r9d
leaq 0x55555(%rip), %rax # 0x7b140
movq %rax, (%rsp)
callq 0x25c40
movl $0x3, %edi
leaq 0x554ad(%rip), %rsi # 0x7b0ad
xorl %edx, %edx
movl $0x9, %ecx
movl $0x3f, %r8d
movl $0x19, %r9d
leaq 0x55537(%rip), %rax # 0x7b151
movq %rax, (%rsp)
callq 0x25c40
xorl %edi, %edi
callq 0x27180
callq 0x26aa0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| main:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], 0
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rcx, [rax]
lea rax, my_progname
mov [rax], rcx
call my_init
mov edi, 7Ah ; 'z'
call plan
xor edx, edx
lea rsi, aMyAesEcb; "MY_AES_ECB"
mov ecx, 0C8h
mov r8d, 2Eh ; '.'
mov r9d, 0D0h
lea rax, unk_7B00F
mov edi, edx
mov [rsp+20h+var_20], rax
call do_test
xor edx, edx
lea rsi, aMyAesEcb; "MY_AES_ECB"
mov ecx, 80h
mov r8d, 3Fh ; '?'
mov r9d, 90h
lea rax, unk_7B020
mov edi, edx
mov [rsp+20h+var_20], rax
call do_test
mov edi, 1
lea rsi, aMyAesCbc; "MY_AES_CBC"
xor edx, edx
mov ecx, 9Fh
mov r8d, 25h ; '%'
mov r9d, 0A0h
lea rax, unk_7B03C
mov [rsp+20h+var_20], rax
call do_test
mov edi, 1
lea rsi, aMyAesCbc; "MY_AES_CBC"
xor edx, edx
mov ecx, 0C0h
mov r8d, 40h ; '@'
mov r9d, 0D0h
lea rax, unk_7B04D
mov [rsp+20h+var_20], rax
call do_test
xor edi, edi
lea rsi, aMyAesEcb; "MY_AES_ECB"
mov edx, 2
mov ecx, 0C8h
mov r8d, 2Eh ; '.'
mov r9d, 0C8h
lea rax, unk_7B05E
mov [rsp+20h+var_20], rax
call do_test
xor edi, edi
lea rsi, aMyAesEcb; "MY_AES_ECB"
mov edx, 2
mov ecx, 80h
mov r8d, 3Fh ; '?'
mov r9d, 80h
lea rax, unk_7B06F
mov [rsp+20h+var_20], rax
call do_test
mov edi, 1
lea rsi, aMyAesCbc; "MY_AES_CBC"
mov edx, 2
mov ecx, 9Fh
mov r8d, 25h ; '%'
mov r9d, 9Fh
lea rax, unk_7FBBF
mov [rsp+20h+var_20], rax
call do_test
mov edi, 1
lea rsi, aMyAesCbc; "MY_AES_CBC"
mov edx, 2
mov ecx, 0C0h
mov r8d, 40h ; '@'
mov r9d, 0C0h
lea rax, unk_7B080
mov [rsp+20h+var_20], rax
call do_test
mov edi, 2
lea rsi, aMyAesCtr; "MY_AES_CTR"
xor edx, edx
mov ecx, 0C8h
mov r8d, 2Eh ; '.'
mov r9d, 0C8h
lea rax, unk_7B09C
mov [rsp+20h+var_20], rax
call do_test
mov edi, 3
lea rsi, aMyAesGcm; "MY_AES_GCM"
xor edx, edx
mov ecx, 80h
mov r8d, 3Fh ; '?'
mov r9d, 90h
lea rax, unk_7B0B8
mov [rsp+20h+var_20], rax
call do_test
xor edx, edx
lea rsi, aMyAesEcb; "MY_AES_ECB"
mov ecx, 1
mov r8d, 2Eh ; '.'
mov r9d, 10h
lea rax, unk_7B0C9
mov edi, edx
mov [rsp+20h+var_20], rax
call do_test
xor edx, edx
lea rsi, aMyAesEcb; "MY_AES_ECB"
mov ecx, 2
mov r8d, 3Fh ; '?'
mov r9d, 10h
lea rax, unk_7B0DA
mov edi, edx
mov [rsp+20h+var_20], rax
call do_test
mov edi, 1
lea rsi, aMyAesCbc; "MY_AES_CBC"
xor edx, edx
mov ecx, 3
mov r8d, 25h ; '%'
mov r9d, 10h
lea rax, unk_7B0EB
mov [rsp+20h+var_20], rax
call do_test
mov edi, 1
lea rsi, aMyAesCbc; "MY_AES_CBC"
xor edx, edx
mov ecx, 4
mov r8d, 40h ; '@'
mov r9d, 10h
lea rax, unk_7B0FC
mov [rsp+20h+var_20], rax
call do_test
xor edi, edi
lea rsi, aMyAesEcb; "MY_AES_ECB"
mov edx, 2
mov ecx, 5
mov r8d, 2Eh ; '.'
mov r9d, 5
lea rax, unk_7B10D
mov [rsp+20h+var_20], rax
call do_test
xor edi, edi
lea rsi, aMyAesEcb; "MY_AES_ECB"
mov edx, 2
mov ecx, 6
mov r8d, 3Fh ; '?'
mov r9d, 6
lea rax, unk_7B11E
mov [rsp+20h+var_20], rax
call do_test
mov edi, 1
lea rsi, aMyAesCbc; "MY_AES_CBC"
mov edx, 2
mov ecx, 7
mov r8d, 25h ; '%'
mov r9d, 7
lea rax, unk_7B12F
mov [rsp+20h+var_20], rax
call do_test
mov edi, 1
lea rsi, aMyAesCbc; "MY_AES_CBC"
mov edx, 2
mov ecx, 8
mov r8d, 40h ; '@'
mov r9d, 8
lea rax, unk_7B140
mov [rsp+20h+var_20], rax
call do_test
mov edi, 3
lea rsi, aMyAesGcm; "MY_AES_GCM"
xor edx, edx
mov ecx, 9
mov r8d, 3Fh ; '?'
mov r9d, 19h
lea rax, unk_7B151
mov [rsp+20h+var_20], rax
call do_test
xor edi, edi
call my_end
call exit_status
add rsp, 20h
pop rbp
retn
| int main(int argc, const char **argv, const char **envp)
{
my_progname = *argv;
my_init(argc, argv, envp);
plan(122LL);
do_test(0, (unsigned int)"MY_AES_ECB", 0, 200, 46, 208, (long long)&unk_7B00F);
do_test(0, (unsigned int)"MY_AES_ECB", 0, 128, 63, 144, (long long)&unk_7B020);
do_test(1, (unsigned int)"MY_AES_CBC", 0, 159, 37, 160, (long long)&unk_7B03C);
do_test(1, (unsigned int)"MY_AES_CBC", 0, 192, 64, 208, (long long)&unk_7B04D);
do_test(0, (unsigned int)"MY_AES_ECB", 2, 200, 46, 200, (long long)&unk_7B05E);
do_test(0, (unsigned int)"MY_AES_ECB", 2, 128, 63, 128, (long long)&unk_7B06F);
do_test(1, (unsigned int)"MY_AES_CBC", 2, 159, 37, 159, (long long)&unk_7FBBF);
do_test(1, (unsigned int)"MY_AES_CBC", 2, 192, 64, 192, (long long)&unk_7B080);
do_test(2, (unsigned int)"MY_AES_CTR", 0, 200, 46, 200, (long long)&unk_7B09C);
do_test(3, (unsigned int)"MY_AES_GCM", 0, 128, 63, 144, (long long)&unk_7B0B8);
do_test(0, (unsigned int)"MY_AES_ECB", 0, 1, 46, 16, (long long)&unk_7B0C9);
do_test(0, (unsigned int)"MY_AES_ECB", 0, 2, 63, 16, (long long)&unk_7B0DA);
do_test(1, (unsigned int)"MY_AES_CBC", 0, 3, 37, 16, (long long)&unk_7B0EB);
do_test(1, (unsigned int)"MY_AES_CBC", 0, 4, 64, 16, (long long)&unk_7B0FC);
do_test(0, (unsigned int)"MY_AES_ECB", 2, 5, 46, 5, (long long)&unk_7B10D);
do_test(0, (unsigned int)"MY_AES_ECB", 2, 6, 63, 6, (long long)&unk_7B11E);
do_test(1, (unsigned int)"MY_AES_CBC", 2, 7, 37, 7, (long long)&unk_7B12F);
do_test(1, (unsigned int)"MY_AES_CBC", 2, 8, 64, 8, (long long)&unk_7B140);
do_test(3, (unsigned int)"MY_AES_GCM", 0, 9, 63, 25, (long long)&unk_7B151);
my_end(0LL);
return exit_status();
}
| main:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],0x0
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
LEA RAX,[0x487940]
MOV qword ptr [RAX],RCX
CALL 0x00126f40
MOV EDI,0x7a
CALL 0x00126410
XOR EDX,EDX
LEA RSI,[0x17b004]
MOV ECX,0xc8
MOV R8D,0x2e
MOV R9D,0xd0
LEA RAX,[0x17b00f]
MOV EDI,EDX
MOV qword ptr [RSP],RAX
CALL 0x00125c40
XOR EDX,EDX
LEA RSI,[0x17b004]
MOV ECX,0x80
MOV R8D,0x3f
MOV R9D,0x90
LEA RAX,[0x17b020]
MOV EDI,EDX
MOV qword ptr [RSP],RAX
CALL 0x00125c40
MOV EDI,0x1
LEA RSI,[0x17b031]
XOR EDX,EDX
MOV ECX,0x9f
MOV R8D,0x25
MOV R9D,0xa0
LEA RAX,[0x17b03c]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
MOV EDI,0x1
LEA RSI,[0x17b031]
XOR EDX,EDX
MOV ECX,0xc0
MOV R8D,0x40
MOV R9D,0xd0
LEA RAX,[0x17b04d]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
XOR EDI,EDI
LEA RSI,[0x17b004]
MOV EDX,0x2
MOV ECX,0xc8
MOV R8D,0x2e
MOV R9D,0xc8
LEA RAX,[0x17b05e]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
XOR EDI,EDI
LEA RSI,[0x17b004]
MOV EDX,0x2
MOV ECX,0x80
MOV R8D,0x3f
MOV R9D,0x80
LEA RAX,[0x17b06f]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
MOV EDI,0x1
LEA RSI,[0x17b031]
MOV EDX,0x2
MOV ECX,0x9f
MOV R8D,0x25
MOV R9D,0x9f
LEA RAX,[0x17fbbf]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
MOV EDI,0x1
LEA RSI,[0x17b031]
MOV EDX,0x2
MOV ECX,0xc0
MOV R8D,0x40
MOV R9D,0xc0
LEA RAX,[0x17b080]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
MOV EDI,0x2
LEA RSI,[0x17b091]
XOR EDX,EDX
MOV ECX,0xc8
MOV R8D,0x2e
MOV R9D,0xc8
LEA RAX,[0x17b09c]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
MOV EDI,0x3
LEA RSI,[0x17b0ad]
XOR EDX,EDX
MOV ECX,0x80
MOV R8D,0x3f
MOV R9D,0x90
LEA RAX,[0x17b0b8]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
XOR EDX,EDX
LEA RSI,[0x17b004]
MOV ECX,0x1
MOV R8D,0x2e
MOV R9D,0x10
LEA RAX,[0x17b0c9]
MOV EDI,EDX
MOV qword ptr [RSP],RAX
CALL 0x00125c40
XOR EDX,EDX
LEA RSI,[0x17b004]
MOV ECX,0x2
MOV R8D,0x3f
MOV R9D,0x10
LEA RAX,[0x17b0da]
MOV EDI,EDX
MOV qword ptr [RSP],RAX
CALL 0x00125c40
MOV EDI,0x1
LEA RSI,[0x17b031]
XOR EDX,EDX
MOV ECX,0x3
MOV R8D,0x25
MOV R9D,0x10
LEA RAX,[0x17b0eb]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
MOV EDI,0x1
LEA RSI,[0x17b031]
XOR EDX,EDX
MOV ECX,0x4
MOV R8D,0x40
MOV R9D,0x10
LEA RAX,[0x17b0fc]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
XOR EDI,EDI
LEA RSI,[0x17b004]
MOV EDX,0x2
MOV ECX,0x5
MOV R8D,0x2e
MOV R9D,0x5
LEA RAX,[0x17b10d]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
XOR EDI,EDI
LEA RSI,[0x17b004]
MOV EDX,0x2
MOV ECX,0x6
MOV R8D,0x3f
MOV R9D,0x6
LEA RAX,[0x17b11e]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
MOV EDI,0x1
LEA RSI,[0x17b031]
MOV EDX,0x2
MOV ECX,0x7
MOV R8D,0x25
MOV R9D,0x7
LEA RAX,[0x17b12f]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
MOV EDI,0x1
LEA RSI,[0x17b031]
MOV EDX,0x2
MOV ECX,0x8
MOV R8D,0x40
MOV R9D,0x8
LEA RAX,[0x17b140]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
MOV EDI,0x3
LEA RSI,[0x17b0ad]
XOR EDX,EDX
MOV ECX,0x9
MOV R8D,0x3f
MOV R9D,0x19
LEA RAX,[0x17b151]
MOV qword ptr [RSP],RAX
CALL 0x00125c40
XOR EDI,EDI
CALL 0x00127180
CALL 0x00126aa0
ADD RSP,0x20
POP RBP
RET
|
void main(int8 param_1,int8 *param_2)
{
my_progname = *param_2;
my_init();
plan(0x7a);
do_test(0,"MY_AES_ECB",0,200,0x2e,0xd0,&DAT_0017b00f);
do_test(0,"MY_AES_ECB",0,0x80,0x3f,0x90,&DAT_0017b020);
do_test(1,"MY_AES_CBC",0,0x9f,0x25,0xa0,&DAT_0017b03c);
do_test(1,"MY_AES_CBC",0,0xc0,0x40,0xd0,&DAT_0017b04d);
do_test(0,"MY_AES_ECB",2,200,0x2e,200,&DAT_0017b05e);
do_test(0,"MY_AES_ECB",2,0x80,0x3f,0x80,&DAT_0017b06f);
do_test(1,"MY_AES_CBC",2,0x9f,0x25,0x9f,&DAT_0017fbbf);
do_test(1,"MY_AES_CBC",2,0xc0,0x40,0xc0,&DAT_0017b080);
do_test(2,"MY_AES_CTR",0,200,0x2e,200,&DAT_0017b09c);
do_test(3,"MY_AES_GCM",0,0x80,0x3f,0x90,&DAT_0017b0b8);
do_test(0,"MY_AES_ECB",0,1,0x2e,0x10,&DAT_0017b0c9);
do_test(0,"MY_AES_ECB",0,2,0x3f,0x10,&DAT_0017b0da);
do_test(1,"MY_AES_CBC",0,3,0x25,0x10,&DAT_0017b0eb);
do_test(1,"MY_AES_CBC",0,4,0x40,0x10,&DAT_0017b0fc);
do_test(0,"MY_AES_ECB",2,5,0x2e,5,&DAT_0017b10d);
do_test(0,"MY_AES_ECB",2,6,0x3f,6,&DAT_0017b11e);
do_test(1,"MY_AES_CBC",2,7,0x25,7,&DAT_0017b12f);
do_test(1,"MY_AES_CBC",2,8,0x40,8,&DAT_0017b140);
do_test(3,"MY_AES_GCM",0,9,0x3f,0x19,&DAT_0017b151);
my_end(0);
exit_status();
return;
}
|
|
5,920 | SET_init_ipv4 | xtate/src/xconf.c | static ConfRes SET_init_ipv4(void *conf, const char *name, const char *value) {
XConf *xconf = (XConf *)conf;
UNUSEDPARM(name);
if (xconf->echo) {
if (xconf->set_ipv4_adapter)
fprintf(xconf->echo, "init-ipv4-adapter = %s",
xconf->init_ipv4_adapter ? "true" : "false");
return 0;
}
xconf->set_ipv4_adapter = 1;
xconf->init_ipv4_adapter = conf_parse_bool(value);
return Conf_OK;
} | O3 | c | SET_init_ipv4:
pushq %rbx
movq %rdi, %rbx
movq 0x2a8(%rdi), %rdi
movl 0x704(%rbx), %eax
testq %rdi, %rdi
je 0x5920b
btl $0x14, %eax
jae 0x59237
btl $0x16, %eax
leaq 0x65bc(%rip), %rax # 0x5f7ac
leaq 0x65bb(%rip), %rdx # 0x5f7b2
cmovaeq %rax, %rdx
leaq 0x25abf(%rip), %rsi # 0x7ecc1
xorl %eax, %eax
callq 0x15220
jmp 0x59237
orl $0x100000, %eax # imm = 0x100000
movl %eax, 0x704(%rbx)
movq %rdx, %rdi
callq 0x52537
movzbl %al, %eax
shll $0x16, %eax
movl $0xffbfffff, %ecx # imm = 0xFFBFFFFF
andl 0x704(%rbx), %ecx
orl %eax, %ecx
movl %ecx, 0x704(%rbx)
xorl %eax, %eax
popq %rbx
retq
| SET_init_ipv4:
push rbx
mov rbx, rdi
mov rdi, [rdi+2A8h]
mov eax, [rbx+704h]
test rdi, rdi
jz short loc_5920B
bt eax, 14h
jnb short loc_59237
bt eax, 16h
lea rax, aFalse; "false"
lea rdx, aTrue; "true"
cmovnb rdx, rax
lea rsi, aInitIpv4Adapte; "init-ipv4-adapter = %s"
xor eax, eax
call _fprintf
jmp short loc_59237
loc_5920B:
or eax, 100000h
mov [rbx+704h], eax
mov rdi, rdx
call conf_parse_bool
movzx eax, al
shl eax, 16h
mov ecx, 0FFBFFFFFh
and ecx, [rbx+704h]
or ecx, eax
mov [rbx+704h], ecx
loc_59237:
xor eax, eax
pop rbx
retn
| long long SET_init_ipv4(long long a1, long long a2, char *a3, long long a4, long long a5)
{
long long v6; // rdi
int v7; // eax
const char *v8; // rdx
v6 = *(_QWORD *)(a1 + 680);
v7 = *(_DWORD *)(a1 + 1796);
if ( v6 )
{
if ( (v7 & 0x100000) != 0 )
{
v8 = "true";
if ( (v7 & 0x400000) == 0 )
v8 = "false";
fprintf(v6, "init-ipv4-adapter = %s", v8);
}
}
else
{
*(_DWORD *)(a1 + 1796) = v7 | 0x100000;
*(_DWORD *)(a1 + 1796) = ((unsigned __int8)conf_parse_bool(a3, a2, (long long)a3, a4, a5) << 22) | *(_DWORD *)(a1 + 1796) & 0xFFBFFFFF;
}
return 0LL;
}
| SET_init_ipv4:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x2a8]
MOV EAX,dword ptr [RBX + 0x704]
TEST RDI,RDI
JZ 0x0015920b
BT EAX,0x14
JNC 0x00159237
BT EAX,0x16
LEA RAX,[0x15f7ac]
LEA RDX,[0x15f7b2]
CMOVNC RDX,RAX
LEA RSI,[0x17ecc1]
XOR EAX,EAX
CALL 0x00115220
JMP 0x00159237
LAB_0015920b:
OR EAX,0x100000
MOV dword ptr [RBX + 0x704],EAX
MOV RDI,RDX
CALL 0x00152537
MOVZX EAX,AL
SHL EAX,0x16
MOV ECX,0xffbfffff
AND ECX,dword ptr [RBX + 0x704]
OR ECX,EAX
MOV dword ptr [RBX + 0x704],ECX
LAB_00159237:
XOR EAX,EAX
POP RBX
RET
|
int8 SET_init_ipv4(long param_1,int8 param_2,int8 param_3)
{
uint uVar1;
byte bVar2;
char *pcVar3;
uVar1 = *(uint *)(param_1 + 0x704);
if (*(FILE **)(param_1 + 0x2a8) == (FILE *)0x0) {
*(uint *)(param_1 + 0x704) = uVar1 | 0x100000;
bVar2 = conf_parse_bool(param_3);
*(uint *)(param_1 + 0x704) = *(uint *)(param_1 + 0x704) & 0xffbfffff | (uint)bVar2 << 0x16;
}
else if ((uVar1 >> 0x14 & 1) != 0) {
pcVar3 = "true";
if ((uVar1 >> 0x16 & 1) == 0) {
pcVar3 = "false";
}
fprintf(*(FILE **)(param_1 + 0x2a8),"init-ipv4-adapter = %s",pcVar3);
}
return 0;
}
|
|
5,921 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>&)>, bool, bool) | llama.cpp/common/json.hpp | JSON_HEDLEY_WARN_UNUSED_RESULT
static basic_json parse(InputType&& i,
const parser_callback_t cb = nullptr,
const bool allow_exceptions = true,
const bool ignore_comments = false)
{
basic_json result;
parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result);
return result;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>&)>, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
movl $0x1, %esi
callq 0x858ca
movq %rbx, %rdi
movl $0x1, %esi
callq 0x858ca
movq (%r12), %r15
movq 0x8(%r12), %r12
movq %rsp, %rdi
movq %r13, %rsi
callq 0x8526c
addq %r15, %r12
movzbl %r14b, %r8d
movzbl %bpl, %r9d
leaq 0x20(%rsp), %rdi
movq %rsp, %rcx
movq %r15, %rsi
movq %r12, %rdx
callq 0x851c0
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
movq %rbx, %rdx
callq 0x852ca
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x85b12
movq -0x18(%r14), %rax
testq %rax, %rax
je 0xcfbad
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xcfbc4
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xcfc08
jmp 0xcfc08
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x8589c
jmp 0xcfbef
movq %rax, %r14
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xcfc13
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xcfc13
movq %rax, %rdi
callq 0x27b48
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x858ca
movq %rbx, %rdi
callq 0x89fe4
movq %r14, %rdi
callq 0x20ad0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov ebp, r8d
mov r14d, ecx
mov r13, rdx
mov r12, rsi
mov rbx, rdi
mov byte ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov r15, [r12]
mov r12, [r12+8]
mov rdi, rsp
mov rsi, r13
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&)
add r12, r15
movzx r8d, r14b
movzx r9d, bpl
lea rdi, [rsp+118h+var_F8]
mov rcx, rsp
mov rsi, r15
mov rdx, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool)
lea rdi, [rsp+118h+var_F8]; int
mov esi, 1
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<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>>>::parse(bool,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>&)
lea r14, [rsp+118h+var_D0]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; 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>>>::~lexer()
mov rax, [r14-18h]
test rax, rax
jz short loc_CFBAD
lea rdi, [rsp+118h+var_F8]
mov rsi, rdi
mov edx, 3
call rax
loc_CFBAD:
mov rax, [rsp+118h+var_108]
test rax, rax
jz short loc_CFBC4
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_CFBC4:
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_CFC08
jmp short loc_CFC08
mov r14, rax
lea rdi, [rsp+118h+var_F8]
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<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>>>::~parser()
jmp short loc_CFBEF
mov r14, rax
loc_CFBEF:
mov rax, [rsp+118h+var_108]
test rax, rax
jz short loc_CFC13
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_CFC13
loc_CFC08:
mov rdi, rax
call __clang_call_terminate
mov r14, rax
loc_CFC13:
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov 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>::parse<std::string&>(
long long a1,
long long *a2,
long long a3,
unsigned __int8 a4,
unsigned __int8 a5)
{
long long v8; // r15
long long v9; // r12
__int128 v11; // [rsp+0h] [rbp-118h] BYREF
void ( *v12)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-108h]
int v13[4]; // [rsp+20h] [rbp-F8h] BYREF
void ( *v14)(int *, int *, long long); // [rsp+30h] [rbp-E8h]
_QWORD v15[26]; // [rsp+48h] [rbp-D0h] BYREF
*(_BYTE *)a1 = 0;
*(_QWORD *)(a1 + 8) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
v8 = *a2;
v9 = a2[1];
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function(
&v11,
a3);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(
(long long)v13,
v8,
v8 + v9,
&v11,
a4,
a5);
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(
(long long)v13,
1,
(_BYTE *)a1);
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>>>::~lexer(v15);
if ( v14 )
v14(v13, v13, 3LL);
if ( v12 )
v12(&v11, &v11, 3LL);
return a1;
}
| parse<std::__cxx11::string&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV EBP,R8D
MOV R14D,ECX
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
MOV byte ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV ESI,0x1
CALL 0x001858ca
MOV RDI,RBX
MOV ESI,0x1
CALL 0x001858ca
MOV R15,qword ptr [R12]
MOV R12,qword ptr [R12 + 0x8]
LAB_001cfb4d:
MOV RDI,RSP
MOV RSI,R13
CALL 0x0018526c
ADD R12,R15
LAB_001cfb5b:
MOVZX R8D,R14B
MOVZX R9D,BPL
LEA RDI,[RSP + 0x20]
MOV RCX,RSP
MOV RSI,R15
MOV RDX,R12
CALL 0x001851c0
LAB_001cfb76:
LEA RDI,[RSP + 0x20]
MOV ESI,0x1
MOV RDX,RBX
CALL 0x001852ca
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x00185b12
MOV RAX,qword ptr [R14 + -0x18]
TEST RAX,RAX
JZ 0x001cfbad
LAB_001cfb9e:
LEA RDI,[RSP + 0x20]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001cfbad:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001cfbc4
LAB_001cfbb7:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001cfbc4:
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
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> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::parse<std::__cxx11::string&>(std::__cxx11::string&, std::function<bool (int,
nlohmann::json_abi_v3_11_3::detail::parse_event_t,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&)>, bool, bool) */
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
* __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::parse<std::__cxx11::string&>
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,long *param_1,function *param_3,int1 param_4,int1 param_5)
{
long lVar1;
long lVar2;
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
afStack_118 [16];
code *local_108;
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
local_f8 [16];
code *local_e8;
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>>>
local_d0 [160];
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0;
*(int8 *)(this + 8) = 0;
assert_invariant(SUB81(this,0));
assert_invariant(SUB81(this,0));
lVar1 = *param_1;
lVar2 = param_1[1];
/* try { // try from 001cfb4d to 001cfb57 has its CatchHandler @ 001cfc10 */
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::function(afStack_118,param_3);
/* try { // try from 001cfb5b to 001cfb75 has its CatchHandler @ 001cfbec */
parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
(local_f8,lVar1,lVar2 + lVar1,afStack_118,param_4,param_5);
/* try { // try from 001cfb76 to 001cfb87 has its CatchHandler @ 001cfbdd */
detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::parse(local_f8,true,(basic_json *)this);
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>>>
::~lexer(local_d0);
if (local_e8 != (code *)0x0) {
/* try { // try from 001cfb9e to 001cfbac has its CatchHandler @ 001cfbdb */
(*local_e8)(local_f8,local_f8,3);
}
if (local_108 != (code *)0x0) {
/* try { // try from 001cfbb7 to 001cfbc3 has its CatchHandler @ 001cfbd9 */
(*local_108)(afStack_118,afStack_118,3);
}
return this;
}
|
|
5,922 | google::protobuf::compiler::Parser::ParseEnumStatement(google::protobuf::EnumDescriptorProto*, google::protobuf::compiler::Parser::LocationRecorder const&, google::protobuf::FileDescriptorProto const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/parser.cc | bool Parser::ParseEnumStatement(EnumDescriptorProto* enum_type,
const LocationRecorder& enum_location,
const FileDescriptorProto* containing_file) {
if (TryConsumeEndOfDeclaration(";", nullptr)) {
// empty statement; ignore
return true;
} else if (LookingAt("option")) {
LocationRecorder location(enum_location,
EnumDescriptorProto::kOptionsFieldNumber);
return ParseOption(enum_type->mutable_options(), location, containing_file,
OPTION_STATEMENT);
} else if (LookingAt("reserved")) {
return ParseReserved(enum_type, enum_location);
} else {
LocationRecorder location(enum_location,
EnumDescriptorProto::kValueFieldNumber,
enum_type->value_size());
return ParseEnumConstant(enum_type->add_value(), location, containing_file);
}
} | O0 | cpp | google::protobuf::compiler::Parser::ParseEnumStatement(google::protobuf::EnumDescriptorProto*, google::protobuf::compiler::Parser::LocationRecorder const&, google::protobuf::FileDescriptorProto const*):
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq %rdx, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq 0x88(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0x176332(%rip), %rsi # 0x3b2417
xorl %eax, %eax
movl %eax, %edx
callq 0x230d00
testb $0x1, %al
jne 0x23c0f4
jmp 0x23c101
movb $0x1, 0x97(%rsp)
jmp 0x23c270
movq 0x28(%rsp), %rdi
leaq 0x176206(%rip), %rsi # 0x3b2313
callq 0x23e240
testb $0x1, %al
jne 0x23c11b
jmp 0x23c1a1
movq 0x78(%rsp), %rsi
leaq 0x58(%rsp), %rdi
movl $0x3, %edx
callq 0x231610
movq 0x80(%rsp), %rdi
callq 0x23f9b0
movq %rax, 0x20(%rsp)
jmp 0x23c143
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq 0x70(%rsp), %rcx
leaq 0x58(%rsp), %rdx
movl $0x1, %r8d
callq 0x234ce0
movb %al, 0x1f(%rsp)
jmp 0x23c168
movb 0x1f(%rsp), %al
andb $0x1, %al
movb %al, 0x97(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x2316c0
jmp 0x23c270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x2316c0
jmp 0x23c281
movq 0x28(%rsp), %rdi
leaq 0x1c39d6(%rip), %rsi # 0x3ffb83
callq 0x23e240
testb $0x1, %al
jne 0x23c1b8
jmp 0x23c1dd
movq 0x28(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x23b590
andb $0x1, %al
movb %al, 0x97(%rsp)
jmp 0x23c270
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x80(%rsp), %rdi
callq 0x23e6d0
movq 0x8(%rsp), %rsi
movl %eax, %ecx
leaq 0x30(%rsp), %rdi
movl $0x2, %edx
callq 0x231660
movq 0x80(%rsp), %rdi
callq 0x23f9e0
movq %rax, 0x10(%rsp)
jmp 0x23c21e
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq 0x70(%rsp), %rcx
leaq 0x30(%rsp), %rdx
callq 0x23c290
movb %al, 0x7(%rsp)
jmp 0x23c23d
movb 0x7(%rsp), %al
andb $0x1, %al
movb %al, 0x97(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x2316c0
jmp 0x23c270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x2316c0
jmp 0x23c281
movb 0x97(%rsp), %al
andb $0x1, %al
addq $0x98, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0x21700
nopl (%rax,%rax)
| _ZN6google8protobuf8compiler6Parser18ParseEnumStatementEPNS0_19EnumDescriptorProtoERKNS2_16LocationRecorderEPKNS0_19FileDescriptorProtoE:
sub rsp, 98h
mov [rsp+98h+var_10], rdi
mov [rsp+98h+var_18], rsi
mov [rsp+98h+var_20], rdx
mov [rsp+98h+var_28], rcx
mov rdi, [rsp+98h+var_10]; this
mov [rsp+98h+var_70], rdi
lea rsi, asc_3B2416+1; char *
xor eax, eax
mov edx, eax; google::protobuf::compiler::Parser::LocationRecorder *
call _ZN6google8protobuf8compiler6Parser26TryConsumeEndOfDeclarationEPKcPKNS2_16LocationRecorderE; google::protobuf::compiler::Parser::TryConsumeEndOfDeclaration(char const*,google::protobuf::compiler::Parser::LocationRecorder const*)
test al, 1
jnz short loc_23C0F4
jmp short loc_23C101
loc_23C0F4:
mov [rsp+98h+var_1], 1
jmp loc_23C270
loc_23C101:
mov rdi, [rsp+98h+var_70]; this
lea rsi, aDoesNotHaveARe+1Ch; char *
call _ZN6google8protobuf8compiler6Parser9LookingAtEPKc; google::protobuf::compiler::Parser::LookingAt(char const*)
test al, 1
jnz short loc_23C11B
jmp loc_23C1A1
loc_23C11B:
mov rsi, [rsp+98h+var_20]; google::protobuf::compiler::Parser::LocationRecorder *
lea rdi, [rsp+98h+var_40]; this
mov edx, 3; int
call _ZN6google8protobuf8compiler6Parser16LocationRecorderC2ERKS3_i; google::protobuf::compiler::Parser::LocationRecorder::LocationRecorder(google::protobuf::compiler::Parser::LocationRecorder const&,int)
mov rdi, [rsp+98h+var_18]; this
call _ZN6google8protobuf19EnumDescriptorProto15mutable_optionsEv; google::protobuf::EnumDescriptorProto::mutable_options(void)
mov [rsp+98h+var_78], rax
jmp short $+2
loc_23C143:
mov rsi, [rsp+98h+var_78]
mov rdi, [rsp+98h+var_70]
mov rcx, [rsp+98h+var_28]
lea rdx, [rsp+98h+var_40]
mov r8d, 1
call _ZN6google8protobuf8compiler6Parser11ParseOptionEPNS0_7MessageERKNS2_16LocationRecorderEPKNS0_19FileDescriptorProtoENS2_11OptionStyleE; google::protobuf::compiler::Parser::ParseOption(google::protobuf::Message *,google::protobuf::compiler::Parser::LocationRecorder const&,google::protobuf::FileDescriptorProto const*,google::protobuf::compiler::Parser::OptionStyle)
mov [rsp+98h+var_79], al
jmp short $+2
loc_23C168:
mov al, [rsp+98h+var_79]
and al, 1
mov [rsp+98h+var_1], al
lea rdi, [rsp+98h+var_40]; this
call _ZN6google8protobuf8compiler6Parser16LocationRecorderD2Ev; google::protobuf::compiler::Parser::LocationRecorder::~LocationRecorder()
jmp loc_23C270
mov rcx, rax
mov eax, edx
mov [rsp+arg_48], rcx
mov [rsp+arg_44], eax
lea rdi, [rsp+arg_50]; this
call _ZN6google8protobuf8compiler6Parser16LocationRecorderD2Ev; google::protobuf::compiler::Parser::LocationRecorder::~LocationRecorder()
jmp loc_23C281
loc_23C1A1:
mov rdi, [rsp+98h+var_70]; this
lea rsi, aReserved; "reserved"
call _ZN6google8protobuf8compiler6Parser9LookingAtEPKc; google::protobuf::compiler::Parser::LookingAt(char const*)
test al, 1
jnz short loc_23C1B8
jmp short loc_23C1DD
loc_23C1B8:
mov rdi, [rsp+98h+var_70]; this
mov rsi, [rsp+98h+var_18]; google::protobuf::EnumDescriptorProto *
mov rdx, [rsp+98h+var_20]; google::protobuf::compiler::Parser::LocationRecorder *
call _ZN6google8protobuf8compiler6Parser13ParseReservedEPNS0_19EnumDescriptorProtoERKNS2_16LocationRecorderE; google::protobuf::compiler::Parser::ParseReserved(google::protobuf::EnumDescriptorProto *,google::protobuf::compiler::Parser::LocationRecorder const&)
and al, 1
mov [rsp+98h+var_1], al
jmp loc_23C270
loc_23C1DD:
mov rax, [rsp+98h+var_20]
mov [rsp+98h+var_90], rax
mov rdi, [rsp+98h+var_18]; this
call _ZNK6google8protobuf19EnumDescriptorProto10value_sizeEv; google::protobuf::EnumDescriptorProto::value_size(void)
mov rsi, [rsp+98h+var_90]; google::protobuf::compiler::Parser::LocationRecorder *
mov ecx, eax; int
lea rdi, [rsp+98h+var_68]; this
mov edx, 2; int
call _ZN6google8protobuf8compiler6Parser16LocationRecorderC2ERKS3_ii; google::protobuf::compiler::Parser::LocationRecorder::LocationRecorder(google::protobuf::compiler::Parser::LocationRecorder const&,int,int)
mov rdi, [rsp+98h+var_18]; this
call _ZN6google8protobuf19EnumDescriptorProto9add_valueEv; google::protobuf::EnumDescriptorProto::add_value(void)
mov [rsp+98h+var_88], rax
jmp short $+2
loc_23C21E:
mov rsi, [rsp+98h+var_88]; google::protobuf::EnumValueDescriptorProto *
mov rdi, [rsp+98h+var_70]; this
mov rcx, [rsp+98h+var_28]; google::protobuf::FileDescriptorProto *
lea rdx, [rsp+98h+var_68]; google::protobuf::compiler::Parser::LocationRecorder *
call _ZN6google8protobuf8compiler6Parser17ParseEnumConstantEPNS0_24EnumValueDescriptorProtoERKNS2_16LocationRecorderEPKNS0_19FileDescriptorProtoE; google::protobuf::compiler::Parser::ParseEnumConstant(google::protobuf::EnumValueDescriptorProto *,google::protobuf::compiler::Parser::LocationRecorder const&,google::protobuf::FileDescriptorProto const*)
mov [rsp+98h+var_91], al
jmp short $+2
loc_23C23D:
mov al, [rsp+98h+var_91]
and al, 1
mov [rsp+98h+var_1], al
lea rdi, [rsp+98h+var_68]; this
call _ZN6google8protobuf8compiler6Parser16LocationRecorderD2Ev; google::protobuf::compiler::Parser::LocationRecorder::~LocationRecorder()
jmp short loc_23C270
mov rcx, rax
mov eax, edx
mov [rsp+arg_48], rcx
mov [rsp+arg_44], eax
lea rdi, [rsp+arg_28]; this
call _ZN6google8protobuf8compiler6Parser16LocationRecorderD2Ev; google::protobuf::compiler::Parser::LocationRecorder::~LocationRecorder()
jmp short loc_23C281
loc_23C270:
mov al, [rsp+98h+var_1]
and al, 1
add rsp, 98h
retn
loc_23C281:
mov rdi, [rsp+arg_48]
call __Unwind_Resume
| char google::protobuf::compiler::Parser::ParseEnumStatement(
google::protobuf::compiler::Parser *this,
google::protobuf::EnumDescriptorProto *a2,
const google::protobuf::compiler::Parser::LocationRecorder *a3,
const google::protobuf::FileDescriptorProto *a4)
{
int v4; // eax
google::protobuf::EnumValueDescriptorProto *v6; // [rsp+10h] [rbp-88h]
google::protobuf::Message *v7; // [rsp+20h] [rbp-78h]
_BYTE v8[40]; // [rsp+30h] [rbp-68h] BYREF
google::protobuf::SourceCodeInfo_Location *v9[3]; // [rsp+58h] [rbp-40h] BYREF
google::protobuf::FileDescriptorProto *v10; // [rsp+70h] [rbp-28h]
google::protobuf::compiler::Parser::LocationRecorder *v11; // [rsp+78h] [rbp-20h]
google::protobuf::EnumDescriptorProto *v12; // [rsp+80h] [rbp-18h]
google::protobuf::compiler::Parser *v13; // [rsp+88h] [rbp-10h]
char v14; // [rsp+97h] [rbp-1h]
v13 = this;
v12 = a2;
v11 = a3;
v10 = a4;
if ( (google::protobuf::compiler::Parser::TryConsumeEndOfDeclaration(this, ";", 0LL) & 1) != 0 )
{
v14 = 1;
}
else if ( (google::protobuf::compiler::Parser::LookingAt(this, "option") & 1) != 0 )
{
google::protobuf::compiler::Parser::LocationRecorder::LocationRecorder(
(google::protobuf::compiler::Parser::LocationRecorder *)v9,
(google::protobuf::SourceCodeInfo_Location **)v11,
3);
v7 = (google::protobuf::Message *)google::protobuf::EnumDescriptorProto::mutable_options(v12);
v14 = google::protobuf::compiler::Parser::ParseOption(this, v7, v9, v10, 1) & 1;
google::protobuf::compiler::Parser::LocationRecorder::~LocationRecorder((google::protobuf::compiler::Parser::LocationRecorder *)v9);
}
else if ( (google::protobuf::compiler::Parser::LookingAt(this, "reserved") & 1) != 0 )
{
v14 = google::protobuf::compiler::Parser::ParseReserved((google::protobuf::io::Tokenizer **)this, v12, v11) & 1;
}
else
{
v4 = google::protobuf::EnumDescriptorProto::value_size(v12);
google::protobuf::compiler::Parser::LocationRecorder::LocationRecorder(
(google::protobuf::compiler::Parser::LocationRecorder *)v8,
(google::protobuf::SourceCodeInfo_Location **)v11,
2,
v4);
v6 = (google::protobuf::EnumValueDescriptorProto *)google::protobuf::EnumDescriptorProto::add_value(v12);
v14 = google::protobuf::compiler::Parser::ParseEnumConstant(
this,
v6,
(const google::protobuf::compiler::Parser::LocationRecorder *)v8,
v10) & 1;
google::protobuf::compiler::Parser::LocationRecorder::~LocationRecorder((google::protobuf::compiler::Parser::LocationRecorder *)v8);
}
return v14 & 1;
}
| AllPrintableAscii:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],0x0
LAB_0023c0c1:
MOVSXD RAX,dword ptr [RSP + 0x14]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00121300
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,RCX
JNC 0x0023c126
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RSI,dword ptr [RSP + 0x14]
CALL 0x00121ba0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JL 0x0023c110
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RSI,dword ptr [RSP + 0x14]
CALL 0x00121ba0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7e
JLE 0x0023c117
LAB_0023c110:
MOV byte ptr [RSP + 0x27],0x0
JMP 0x0023c12b
LAB_0023c117:
JMP 0x0023c119
LAB_0023c119:
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x0023c0c1
LAB_0023c126:
MOV byte ptr [RSP + 0x27],0x1
LAB_0023c12b:
MOV AL,byte ptr [RSP + 0x27]
AND AL,0x1
ADD RSP,0x28
RET
|
/* google::protobuf::compiler::csharp::AllPrintableAscii(std::__cxx11::string const&) */
int8 google::protobuf::compiler::csharp::AllPrintableAscii(string *param_1)
{
uint uVar1;
ulong uVar2;
ulong uVar3;
char *pcVar4;
int4 local_14;
int1 local_1;
local_14 = 0;
do {
uVar2 = (ulong)local_14;
uVar3 = std::__cxx11::string::size();
if (uVar3 <= uVar2) {
local_1 = 1;
LAB_0023c12b:
return CONCAT71((int7)(uVar2 >> 8),local_1);
}
pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)param_1);
uVar1 = (uint)*pcVar4;
if ((int)uVar1 < 0x20) {
LAB_0023c110:
uVar2 = (ulong)uVar1;
local_1 = 0;
goto LAB_0023c12b;
}
pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)param_1);
uVar1 = (uint)*pcVar4;
if (0x7e < (int)uVar1) goto LAB_0023c110;
local_14 = local_14 + 1;
} while( true );
}
|
|
5,923 | 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]]));
} | O3 | c | translog_first_theoretical_lsn:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x2020, %rsp # imm = 0x2020
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
callq 0x35d90
movq %rax, %rbx
movl $0x1, %edi
callq 0x37617
testb %al, %al
je 0x3795d
movabsq $0x100002000, %r14 # imm = 0x100002000
cmpq %r14, %rbx
jne 0x37961
movzwl 0x3c66fc(%rip), %eax # 0x3fe054
addq %r14, %rax
jmp 0x379ac
xorl %eax, %eax
jmp 0x379ac
leaq -0x2020(%rbp), %rax
movq %r14, (%rax)
leaq -0x2030(%rbp), %rdi
movq %rax, (%rdi)
leaq -0x2018(%rbp), %rsi
xorl %edx, %edx
callq 0x34388
testq %rax, %rax
je 0x379a7
movzbl 0x6(%rax), %eax
leaq 0xbc758d(%rip), %rcx # 0xbfef20
movl $0x2000, %edx # imm = 0x2000
addl (%rcx,%rax,4), %edx
leaq (%r14,%rdx), %rax
addq $-0x2000, %rax # imm = 0xE000
jmp 0x379ac
movl $0x1, %eax
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x379c7
addq $0x2020, %rsp # imm = 0x2020
popq %rbx
popq %r14
popq %rbp
retq
callq 0x29260
| translog_first_theoretical_lsn:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 2020h
mov rax, fs:28h
mov [rbp+var_18], rax
call translog_get_horizon
mov rbx, rax
mov edi, 1
call translog_is_file
test al, al
jz short loc_3795D
mov r14, 100002000h
cmp rbx, r14
jnz short loc_37961
movzx eax, cs:word_3FE054
add rax, r14
jmp short loc_379AC
loc_3795D:
xor eax, eax
jmp short loc_379AC
loc_37961:
lea rax, [rbp+var_2020]
mov [rax], r14
lea rdi, [rbp+var_2030]
mov [rdi], rax
lea rsi, [rbp+var_2018]
xor edx, edx
call translog_get_page
test rax, rax
jz short loc_379A7
movzx eax, byte ptr [rax+6]
lea rcx, page_overhead
mov edx, 2000h
add edx, [rcx+rax*4]
lea rax, [r14+rdx]
add rax, 0FFFFFFFFFFFFE000h
jmp short loc_379AC
loc_379A7:
mov eax, 1
loc_379AC:
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_379C7
add rsp, 2020h
pop rbx
pop r14
pop rbp
retn
loc_379C7:
call ___stack_chk_fail
| long long translog_first_theoretical_lsn(long long a1, long long a2)
{
long long horizon; // rbx
long long v3; // rdx
long long v4; // rcx
int v5; // r8d
int v6; // r9d
long long page; // rax
long long *v9; // [rsp+0h] [rbp-2030h] BYREF
long long v10; // [rsp+10h] [rbp-2020h] BYREF
_BYTE v11[8192]; // [rsp+18h] [rbp-2018h] BYREF
unsigned long long v12; // [rsp+2018h] [rbp-18h]
v12 = __readfsqword(0x28u);
horizon = translog_get_horizon();
if ( !translog_is_file(1u, a2, v3, v4, v5, v6) )
return 0LL;
if ( horizon == 0x100002000LL )
return (unsigned __int16)word_3FE054 + 0x100002000LL;
v10 = 0x100002000LL;
v9 = &v10;
page = translog_get_page(&v9, (long long)v11, 0LL);
if ( page )
return (unsigned int)(*((_DWORD *)&page_overhead + *(unsigned __int8 *)(page + 6)) + 0x2000) + 0x100000000LL;
else
return 1LL;
}
| translog_first_theoretical_lsn:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x2020
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
CALL 0x00135d90
MOV RBX,RAX
MOV EDI,0x1
CALL 0x00137617
TEST AL,AL
JZ 0x0013795d
MOV R14,0x100002000
CMP RBX,R14
JNZ 0x00137961
MOVZX EAX,word ptr [0x004fe054]
ADD RAX,R14
JMP 0x001379ac
LAB_0013795d:
XOR EAX,EAX
JMP 0x001379ac
LAB_00137961:
LEA RAX,[RBP + -0x2020]
MOV qword ptr [RAX],R14
LEA RDI,[RBP + -0x2030]
MOV qword ptr [RDI],RAX
LEA RSI,[RBP + -0x2018]
XOR EDX,EDX
CALL 0x00134388
TEST RAX,RAX
JZ 0x001379a7
MOVZX EAX,byte ptr [RAX + 0x6]
LEA RCX,[0xcfef20]
MOV EDX,0x2000
ADD EDX,dword ptr [RCX + RAX*0x4]
LEA RAX,[R14 + RDX*0x1]
ADD RAX,-0x2000
JMP 0x001379ac
LAB_001379a7:
MOV EAX,0x1
LAB_001379ac:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x001379c7
ADD RSP,0x2020
POP RBX
POP R14
POP RBP
RET
LAB_001379c7:
CALL 0x00129260
|
long translog_first_theoretical_lsn(void)
{
char cVar1;
long lVar2;
long in_FS_OFFSET;
int8 *local_2038 [2];
int8 local_2028;
int1 local_2020 [8192];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = translog_get_horizon();
cVar1 = translog_is_file(1);
if (cVar1 == '\0') {
lVar2 = 0;
}
else if (lVar2 == 0x100002000) {
lVar2 = (ulong)DAT_004fe054 + 0x100002000;
}
else {
local_2038[0] = &local_2028;
local_2028 = 0x100002000;
lVar2 = translog_get_page(local_2038,local_2020,0);
if (lVar2 == 0) {
lVar2 = 1;
}
else {
lVar2 = (ulong)(*(int *)(page_overhead + (ulong)*(byte *)(lVar2 + 6) * 4) + 0x2000) +
0x100000000;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return lVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
5,924 | js_parse_expr_binary | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_expr_binary(JSParseState *s, int level,
int parse_flags)
{
int op, opcode;
if (level == 0) {
return js_parse_unary(s, PF_POW_ALLOWED);
} else if (s->token.val == TOK_PRIVATE_NAME &&
(parse_flags & PF_IN_ACCEPTED) && level == 4 &&
peek_token(s, FALSE) == TOK_IN) {
JSAtom atom;
atom = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail_private_in;
if (s->token.val != TOK_IN)
goto fail_private_in;
if (next_token(s))
goto fail_private_in;
if (js_parse_expr_binary(s, level - 1, parse_flags)) {
fail_private_in:
JS_FreeAtom(s->ctx, atom);
return -1;
}
emit_op(s, OP_scope_in_private_field);
emit_atom(s, atom);
emit_u16(s, s->cur_func->scope_level);
JS_FreeAtom(s->ctx, atom);
return 0;
} else {
if (js_parse_expr_binary(s, level - 1, parse_flags))
return -1;
}
for(;;) {
op = s->token.val;
switch(level) {
case 1:
switch(op) {
case '*':
opcode = OP_mul;
break;
case '/':
opcode = OP_div;
break;
case '%':
opcode = OP_mod;
break;
default:
return 0;
}
break;
case 2:
switch(op) {
case '+':
opcode = OP_add;
break;
case '-':
opcode = OP_sub;
break;
default:
return 0;
}
break;
case 3:
switch(op) {
case TOK_SHL:
opcode = OP_shl;
break;
case TOK_SAR:
opcode = OP_sar;
break;
case TOK_SHR:
opcode = OP_shr;
break;
default:
return 0;
}
break;
case 4:
switch(op) {
case '<':
opcode = OP_lt;
break;
case '>':
opcode = OP_gt;
break;
case TOK_LTE:
opcode = OP_lte;
break;
case TOK_GTE:
opcode = OP_gte;
break;
case TOK_INSTANCEOF:
opcode = OP_instanceof;
break;
case TOK_IN:
if (parse_flags & PF_IN_ACCEPTED) {
opcode = OP_in;
} else {
return 0;
}
break;
default:
return 0;
}
break;
case 5:
switch(op) {
case TOK_EQ:
opcode = OP_eq;
break;
case TOK_NEQ:
opcode = OP_neq;
break;
case TOK_STRICT_EQ:
opcode = OP_strict_eq;
break;
case TOK_STRICT_NEQ:
opcode = OP_strict_neq;
break;
default:
return 0;
}
break;
case 6:
switch(op) {
case '&':
opcode = OP_and;
break;
default:
return 0;
}
break;
case 7:
switch(op) {
case '^':
opcode = OP_xor;
break;
default:
return 0;
}
break;
case 8:
switch(op) {
case '|':
opcode = OP_or;
break;
default:
return 0;
}
break;
default:
abort();
}
if (next_token(s))
return -1;
if (js_parse_expr_binary(s, level - 1, parse_flags))
return -1;
emit_op(s, opcode);
}
return 0;
} | O2 | c | js_parse_expr_binary:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x5ed07
movl %edx, %ebp
movl %esi, %r14d
cmpl $-0x57, 0x20(%rbx)
jne 0x5ecdc
testb $0x1, %bpl
sete %al
cmpl $0x4, %r14d
setne %cl
orb %al, %cl
jne 0x5ecdc
movq %rbx, %rdi
xorl %esi, %esi
callq 0x556f1
cmpl $-0x49, %eax
jne 0x5ecdc
movslq 0x38(%rbx), %r14
cmpq $0xe0, %r14
jl 0x5ec9a
movq (%rbx), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r14,8), %rax
incl (%rax)
movq %rbx, %rdi
callq 0x535fe
testl %eax, %eax
jne 0x5ecc9
cmpl $-0x49, 0x20(%rbx)
jne 0x5ecc9
movq %rbx, %rdi
callq 0x535fe
testl %eax, %eax
jne 0x5ecc9
pushq $0x3
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x5ec36
testl %eax, %eax
je 0x5ed20
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x1e545
pushq $-0x1
popq %rax
jmp 0x5ed88
decl %r14d
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x5ec36
pushq $-0x1
popq %r15
testl %eax, %eax
jne 0x5ed5b
movl 0x20(%rbx), %ecx
leaq 0x28a22(%rip), %r12 # 0x87720
movslq (%r12,%r14,4), %rax
addq %r12, %rax
jmpq *%rax
pushq $0x4
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5ee73
movq %rbx, %rdi
movl $0xc0, %esi
callq 0x535cb
movq %rbx, %rdi
movl %r14d, %esi
callq 0x54cac
movq 0x90(%rbx), %rax
movzwl 0xe8(%rax), %esi
movq %rbx, %rdi
callq 0x535ea
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x1e545
jmp 0x5ed86
movl %r15d, %eax
jmp 0x5ed88
cmpl $0x25, %ecx
je 0x5ed7e
movb $-0x66, %r13b
cmpl $0x2a, %ecx
je 0x5ee0f
cmpl $0x2f, %ecx
jne 0x5ed86
movb $-0x65, %r13b
jmp 0x5ee0f
movb $-0x64, %r13b
jmp 0x5ee0f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $-0x63, %r13b
cmpl $0x2b, %ecx
je 0x5ee0f
cmpl $0x2d, %ecx
jne 0x5ed86
movb $-0x62, %r13b
jmp 0x5ee0f
addl $0x6a, %ecx
cmpl $0x3, %ecx
jae 0x5ed86
addb $-0x61, %cl
movl %ecx, %r13d
jmp 0x5ee0f
cmpl $-0x66, %ecx
je 0x5edec
cmpl $-0x64, %ecx
je 0x5edf6
xorl %eax, %eax
cmpl $-0x49, %ecx
je 0x5ede1
cmpl $-0x48, %ecx
je 0x5edf1
movb $-0x5a, %r13b
cmpl $0x3c, %ecx
je 0x5ee0f
cmpl $0x3e, %ecx
jne 0x5ed88
movb $-0x58, %r13b
jmp 0x5ee0f
movb $-0x55, %r13b
testb $0x1, %bpl
jne 0x5ee0f
jmp 0x5ed88
movb $-0x59, %r13b
jmp 0x5ee0f
movb $-0x56, %r13b
jmp 0x5ee0f
movb $-0x57, %r13b
jmp 0x5ee0f
addl $0x63, %ecx
cmpl $0x4, %ecx
jae 0x5ed86
shll $0x3, %ecx
movl $0xafadaeac, %r13d # imm = 0xAFADAEAC
shrl %cl, %r13d
movq %rbx, %rdi
callq 0x535fe
testl %eax, %eax
jne 0x5ed5b
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x5ec36
testl %eax, %eax
jne 0x5ed5b
movzbl %r13b, %esi
movq %rbx, %rdi
callq 0x535cb
movl 0x20(%rbx), %ecx
movslq (%r12,%r14,4), %rax
addq %r12, %rax
jmpq *%rax
movb $-0x5e, %r13b
cmpl $0x26, %ecx
je 0x5ee0f
jmp 0x5ed86
movb $-0x5d, %r13b
cmpl $0x5e, %ecx
je 0x5ee0f
jmp 0x5ed86
movb $-0x5c, %r13b
cmpl $0x7c, %ecx
je 0x5ee0f
jmp 0x5ed86
| js_parse_expr_binary:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
test esi, esi
jz loc_5ED07
mov ebp, edx
mov r14d, esi
cmp dword ptr [rbx+20h], 0FFFFFFA9h
jnz loc_5ECDC
test bpl, 1
setz al
cmp r14d, 4
setnz cl
or cl, al
jnz short loc_5ECDC
mov rdi, rbx
xor esi, esi
call peek_token
cmp eax, 0FFFFFFB7h
jnz short loc_5ECDC
movsxd r14, dword ptr [rbx+38h]
cmp r14, 0E0h
jl short loc_5EC9A
mov rax, [rbx]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r14*8]
inc dword ptr [rax]
loc_5EC9A:
mov rdi, rbx
call next_token
test eax, eax
jnz short loc_5ECC9
cmp dword ptr [rbx+20h], 0FFFFFFB7h
jnz short loc_5ECC9
mov rdi, rbx
call next_token
test eax, eax
jnz short loc_5ECC9
push 3
pop rsi
mov rdi, rbx
mov edx, ebp
call js_parse_expr_binary
test eax, eax
jz short loc_5ED20
loc_5ECC9:
mov rdi, [rbx]
mov esi, r14d
call JS_FreeAtom
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp loc_5ED88
loc_5ECDC:
dec r14d
mov rdi, rbx
mov esi, r14d
mov edx, ebp
call js_parse_expr_binary
push 0FFFFFFFFFFFFFFFFh
pop r15
test eax, eax
jnz short loc_5ED5B
mov ecx, [rbx+20h]
lea r12, jpt_5ED05
movsxd rax, ds:(jpt_5ED05 - 87720h)[r12+r14*4]; switch 8 cases
add rax, r12
jmp rax; switch jump
loc_5ED07:
push 4
pop rsi
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp js_parse_unary
loc_5ED20:
mov rdi, rbx
mov esi, 0C0h
call emit_op
mov rdi, rbx
mov esi, r14d
call emit_atom
mov rax, [rbx+90h]
movzx esi, word ptr [rax+0E8h]
mov rdi, rbx
call emit_u16
mov rdi, [rbx]
mov esi, r14d
call JS_FreeAtom
jmp short loc_5ED86
loc_5ED5B:
mov eax, r15d
jmp short loc_5ED88
loc_5ED60:
cmp ecx, 25h ; '%'; jumptable 000000000005ED05 case 0
jz short loc_5ED7E
mov r13b, 9Ah
cmp ecx, 2Ah ; '*'
jz loc_5EE0F
cmp ecx, 2Fh ; '/'
jnz short loc_5ED86
mov r13b, 9Bh
jmp loc_5EE0F
loc_5ED7E:
mov r13b, 9Ch
jmp loc_5EE0F
loc_5ED86:
xor eax, eax
loc_5ED88:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5ED97:
mov r13b, 9Dh; jumptable 000000000005ED05 case 1
cmp ecx, 2Bh ; '+'
jz short loc_5EE0F
cmp ecx, 2Dh ; '-'
jnz short loc_5ED86
mov r13b, 9Eh
jmp short loc_5EE0F
loc_5EDA9:
add ecx, 6Ah ; 'j'; jumptable 000000000005ED05 case 2
cmp ecx, 3
jnb short loc_5ED86
add cl, 9Fh
mov r13d, ecx
jmp short loc_5EE0F
loc_5EDB9:
cmp ecx, 0FFFFFF9Ah; jumptable 000000000005ED05 case 3
jz short loc_5EDEC
cmp ecx, 0FFFFFF9Ch
jz short loc_5EDF6
xor eax, eax
cmp ecx, 0FFFFFFB7h
jz short loc_5EDE1
cmp ecx, 0FFFFFFB8h
jz short loc_5EDF1
mov r13b, 0A6h
cmp ecx, 3Ch ; '<'
jz short loc_5EE0F
cmp ecx, 3Eh ; '>'
jnz short loc_5ED88
mov r13b, 0A8h
jmp short loc_5EE0F
loc_5EDE1:
mov r13b, 0ABh
test bpl, 1
jnz short loc_5EE0F
jmp short loc_5ED88
loc_5EDEC:
mov r13b, 0A7h
jmp short loc_5EE0F
loc_5EDF1:
mov r13b, 0AAh
jmp short loc_5EE0F
loc_5EDF6:
mov r13b, 0A9h
jmp short loc_5EE0F
loc_5EDFB:
add ecx, 63h ; 'c'; jumptable 000000000005ED05 case 4
cmp ecx, 4
jnb short loc_5ED86
shl ecx, 3
mov r13d, 0AFADAEACh
shr r13d, cl
loc_5EE0F:
mov rdi, rbx
call next_token
test eax, eax
jnz loc_5ED5B
mov rdi, rbx
mov esi, r14d
mov edx, ebp
call js_parse_expr_binary
test eax, eax
jnz loc_5ED5B
movzx esi, r13b
mov rdi, rbx
call emit_op
mov ecx, [rbx+20h]
movsxd rax, ds:(jpt_5ED05 - 87720h)[r12+r14*4]; switch 8 cases
add rax, r12
jmp rax; switch jump
loc_5EE4C:
mov r13b, 0A2h; jumptable 000000000005ED05 case 5
cmp ecx, 26h ; '&'
jz short loc_5EE0F
jmp loc_5ED86
loc_5EE59:
mov r13b, 0A3h; jumptable 000000000005ED05 case 6
cmp ecx, 5Eh ; '^'
jz short loc_5EE0F
jmp loc_5ED86
loc_5EE66:
mov r13b, 0A4h; jumptable 000000000005ED05 case 7
cmp ecx, 7Ch ; '|'
jz short loc_5EE0F
jmp loc_5ED86
| long long js_parse_expr_binary(
int *a1,
int a2,
unsigned int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
long long v18; // r14
_DWORD *v19; // rax
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long result; // rax
unsigned int v27; // r14d
long long v28; // rsi
long long v29; // rdx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
long long v34; // rcx
unsigned int v35; // r13d
unsigned int v36; // ecx
if ( !a2 )
return js_parse_unary(a1, 4LL);
if ( a1[8] == -87 && (a3 & 1) != 0 && a2 == 4 && (unsigned int)peek_token((long long)a1, 0) == -73 )
{
v18 = a1[14];
if ( v18 >= 224 )
{
v19 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v18);
++*v19;
}
if ( (unsigned int)next_token((long long)a1, 0LL, v12, a4, a5, a6, a7, v16, v17, a10, a11, v13, v14, v15)
|| a1[8] != -73
|| (unsigned int)next_token((long long)a1, 0LL, v20, a4, a5, a6, a7, v24, v25, a10, a11, v21, v22, v23)
|| (unsigned int)js_parse_expr_binary(a1, 3LL, a3) )
{
JS_FreeAtom(*(_QWORD *)a1, v18);
return -1LL;
}
else
{
emit_op((long long)a1, 192);
emit_atom((long long)a1, (unsigned int)v18);
emit_u16((long long)a1, *(_WORD *)(*((_QWORD *)a1 + 18) + 232LL));
JS_FreeAtom(*(_QWORD *)a1, v18);
return 0LL;
}
}
else
{
v27 = a2 - 1;
v28 = v27;
if ( !(unsigned int)js_parse_expr_binary(a1, v27, a3) )
{
v34 = (unsigned int)a1[8];
switch ( v27 )
{
case 0u:
LABEL_17:
if ( (_DWORD)v34 == 37 )
{
LOBYTE(v35) = -100;
goto LABEL_43;
}
LOBYTE(v35) = -102;
if ( (_DWORD)v34 == 42 )
goto LABEL_43;
if ( (_DWORD)v34 == 47 )
{
LOBYTE(v35) = -101;
goto LABEL_43;
}
return 0LL;
case 1u:
LABEL_24:
LOBYTE(v35) = -99;
if ( (_DWORD)v34 == 43 )
goto LABEL_43;
if ( (_DWORD)v34 != 45 )
return 0LL;
LOBYTE(v35) = -98;
goto LABEL_43;
case 2u:
LABEL_27:
v34 = (unsigned int)(v34 + 106);
if ( (unsigned int)v34 >= 3 )
return 0LL;
LOBYTE(v34) = v34 - 97;
LOBYTE(v35) = v34;
goto LABEL_43;
case 3u:
while ( 2 )
{
if ( (_DWORD)v34 == -102 )
{
LOBYTE(v35) = -89;
}
else if ( (_DWORD)v34 == -100 )
{
LOBYTE(v35) = -87;
}
else
{
result = 0LL;
if ( (_DWORD)v34 == -73 )
{
LOBYTE(v35) = -85;
if ( (a3 & 1) == 0 )
return result;
}
else if ( (_DWORD)v34 == -72 )
{
LOBYTE(v35) = -86;
}
else
{
LOBYTE(v35) = -90;
if ( (_DWORD)v34 != 60 )
{
if ( (_DWORD)v34 != 62 )
return result;
LOBYTE(v35) = -88;
}
}
}
LABEL_43:
if ( !(unsigned int)next_token((long long)a1, v28, v29, a4, a5, a6, a7, v32, v33, a10, a11, v34, v30, v31)
&& !(unsigned int)js_parse_expr_binary(a1, v27, a3) )
{
v28 = (unsigned __int8)v35;
emit_op((long long)a1, v35);
v34 = (unsigned int)a1[8];
switch ( v27 )
{
case 0u:
goto LABEL_17;
case 1u:
goto LABEL_24;
case 2u:
goto LABEL_27;
case 3u:
continue;
case 4u:
goto LABEL_41;
case 5u:
goto LABEL_46;
case 6u:
goto LABEL_48;
case 7u:
goto LABEL_50;
}
}
break;
}
break;
case 4u:
LABEL_41:
v36 = v34 + 99;
if ( v36 >= 4 )
return 0LL;
v34 = 8 * v36;
v35 = 0xAFADAEAC >> v34;
goto LABEL_43;
case 5u:
LABEL_46:
LOBYTE(v35) = -94;
if ( (_DWORD)v34 != 38 )
return 0LL;
goto LABEL_43;
case 6u:
LABEL_48:
LOBYTE(v35) = -93;
if ( (_DWORD)v34 != 94 )
return 0LL;
goto LABEL_43;
case 7u:
LABEL_50:
LOBYTE(v35) = -92;
if ( (_DWORD)v34 != 124 )
return 0LL;
goto LABEL_43;
}
}
return 0xFFFFFFFFLL;
}
}
| js_parse_expr_binary:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
TEST ESI,ESI
JZ 0x0015ed07
MOV EBP,EDX
MOV R14D,ESI
CMP dword ptr [RBX + 0x20],-0x57
JNZ 0x0015ecdc
TEST BPL,0x1
SETZ AL
CMP R14D,0x4
SETNZ CL
OR CL,AL
JNZ 0x0015ecdc
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001556f1
CMP EAX,-0x49
JNZ 0x0015ecdc
MOVSXD R14,dword ptr [RBX + 0x38]
CMP R14,0xe0
JL 0x0015ec9a
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R14*0x8]
INC dword ptr [RAX]
LAB_0015ec9a:
MOV RDI,RBX
CALL 0x001535fe
TEST EAX,EAX
JNZ 0x0015ecc9
CMP dword ptr [RBX + 0x20],-0x49
JNZ 0x0015ecc9
MOV RDI,RBX
CALL 0x001535fe
TEST EAX,EAX
JNZ 0x0015ecc9
PUSH 0x3
POP RSI
MOV RDI,RBX
MOV EDX,EBP
CALL 0x0015ec36
TEST EAX,EAX
JZ 0x0015ed20
LAB_0015ecc9:
MOV RDI,qword ptr [RBX]
MOV ESI,R14D
CALL 0x0011e545
PUSH -0x1
POP RAX
JMP 0x0015ed88
LAB_0015ecdc:
DEC R14D
MOV RDI,RBX
MOV ESI,R14D
MOV EDX,EBP
CALL 0x0015ec36
PUSH -0x1
POP R15
TEST EAX,EAX
JNZ 0x0015ed5b
MOV ECX,dword ptr [RBX + 0x20]
LEA R12,[0x187720]
MOVSXD RAX,dword ptr [R12 + R14*0x4]
ADD RAX,R12
JMP RAX
LAB_0015ed07:
PUSH 0x4
POP RSI
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0015ee73
LAB_0015ed20:
MOV RDI,RBX
MOV ESI,0xc0
CALL 0x001535cb
MOV RDI,RBX
MOV ESI,R14D
CALL 0x00154cac
MOV RAX,qword ptr [RBX + 0x90]
MOVZX ESI,word ptr [RAX + 0xe8]
MOV RDI,RBX
CALL 0x001535ea
MOV RDI,qword ptr [RBX]
MOV ESI,R14D
CALL 0x0011e545
JMP 0x0015ed86
LAB_0015ed5b:
MOV EAX,R15D
JMP 0x0015ed88
LAB_0015ed86:
XOR EAX,EAX
LAB_0015ed88:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 js_parse_expr_binary(long *param_1,int param_2,uint param_3)
{
int *piVar1;
int iVar2;
int iVar3;
int8 uVar4;
if (param_2 == 0) {
uVar4 = js_parse_unary(param_1,4);
return uVar4;
}
if ((((int)param_1[4] == -0x57) && (param_2 == 4 && (param_3 & 1) != 0)) &&
(iVar2 = peek_token(param_1,0), iVar2 == -0x49)) {
iVar2 = (int)param_1[7];
if (0xdf < (long)iVar2) {
piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + (long)iVar2 * 8);
*piVar1 = *piVar1 + 1;
}
iVar3 = next_token(param_1);
if (((iVar3 == 0) && ((int)param_1[4] == -0x49)) &&
((iVar3 = next_token(param_1), iVar3 == 0 &&
(iVar3 = js_parse_expr_binary(param_1,3,param_3), iVar3 == 0)))) {
emit_op(param_1,0xc0);
emit_atom(param_1,iVar2);
emit_u16(param_1,*(int2 *)(param_1[0x12] + 0xe8));
JS_FreeAtom(*param_1,iVar2);
return 0;
}
JS_FreeAtom(*param_1,iVar2);
return 0xffffffffffffffff;
}
iVar2 = js_parse_expr_binary(param_1,(ulong)(param_2 - 1),param_3);
if (iVar2 != 0) {
return 0xffffffff;
}
/* WARNING: Could not recover jumptable at 0x0015ed05. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar4 = (*(code *)(&DAT_00187720 + *(int *)(&DAT_00187720 + (ulong)(param_2 - 1) * 4)))();
return uVar4;
}
|
|
5,925 | js_parse_expr_binary | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_expr_binary(JSParseState *s, int level,
int parse_flags)
{
int op, opcode;
if (level == 0) {
return js_parse_unary(s, PF_POW_ALLOWED);
} else if (s->token.val == TOK_PRIVATE_NAME &&
(parse_flags & PF_IN_ACCEPTED) && level == 4 &&
peek_token(s, FALSE) == TOK_IN) {
JSAtom atom;
atom = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail_private_in;
if (s->token.val != TOK_IN)
goto fail_private_in;
if (next_token(s))
goto fail_private_in;
if (js_parse_expr_binary(s, level - 1, parse_flags)) {
fail_private_in:
JS_FreeAtom(s->ctx, atom);
return -1;
}
emit_op(s, OP_scope_in_private_field);
emit_atom(s, atom);
emit_u16(s, s->cur_func->scope_level);
JS_FreeAtom(s->ctx, atom);
return 0;
} else {
if (js_parse_expr_binary(s, level - 1, parse_flags))
return -1;
}
for(;;) {
op = s->token.val;
switch(level) {
case 1:
switch(op) {
case '*':
opcode = OP_mul;
break;
case '/':
opcode = OP_div;
break;
case '%':
opcode = OP_mod;
break;
default:
return 0;
}
break;
case 2:
switch(op) {
case '+':
opcode = OP_add;
break;
case '-':
opcode = OP_sub;
break;
default:
return 0;
}
break;
case 3:
switch(op) {
case TOK_SHL:
opcode = OP_shl;
break;
case TOK_SAR:
opcode = OP_sar;
break;
case TOK_SHR:
opcode = OP_shr;
break;
default:
return 0;
}
break;
case 4:
switch(op) {
case '<':
opcode = OP_lt;
break;
case '>':
opcode = OP_gt;
break;
case TOK_LTE:
opcode = OP_lte;
break;
case TOK_GTE:
opcode = OP_gte;
break;
case TOK_INSTANCEOF:
opcode = OP_instanceof;
break;
case TOK_IN:
if (parse_flags & PF_IN_ACCEPTED) {
opcode = OP_in;
} else {
return 0;
}
break;
default:
return 0;
}
break;
case 5:
switch(op) {
case TOK_EQ:
opcode = OP_eq;
break;
case TOK_NEQ:
opcode = OP_neq;
break;
case TOK_STRICT_EQ:
opcode = OP_strict_eq;
break;
case TOK_STRICT_NEQ:
opcode = OP_strict_neq;
break;
default:
return 0;
}
break;
case 6:
switch(op) {
case '&':
opcode = OP_and;
break;
default:
return 0;
}
break;
case 7:
switch(op) {
case '^':
opcode = OP_xor;
break;
default:
return 0;
}
break;
case 8:
switch(op) {
case '|':
opcode = OP_or;
break;
default:
return 0;
}
break;
default:
abort();
}
if (next_token(s))
return -1;
if (js_parse_expr_binary(s, level - 1, parse_flags))
return -1;
emit_op(s, opcode);
}
return 0;
} | O3 | c | js_parse_expr_binary:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x71f4e
movl %edx, %ebp
movl %esi, %r14d
cmpl $-0x57, 0x20(%rbx)
jne 0x71f23
testb $0x1, %bpl
sete %al
cmpl $0x4, %r14d
setne %cl
orb %al, %cl
jne 0x71f23
movq 0x70(%rbx), %rdi
xorl %esi, %esi
callq 0x666d7
cmpl $-0x49, %eax
jne 0x71f23
movslq 0x38(%rbx), %r14
cmpq $0xe0, %r14
jl 0x71ee2
movq (%rbx), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r14,8), %rax
incl (%rax)
movq %rbx, %rdi
callq 0x640b2
testl %eax, %eax
jne 0x71f13
cmpl $-0x49, 0x20(%rbx)
jne 0x71f13
movq %rbx, %rdi
callq 0x640b2
testl %eax, %eax
jne 0x71f13
movq %rbx, %rdi
movl $0x3, %esi
movl %ebp, %edx
callq 0x71e7c
testl %eax, %eax
je 0x71f67
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x24f3d
jmp 0x71fc9
decl %r14d
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x71e7c
testl %eax, %eax
jne 0x71fc9
movl 0x20(%rbx), %ecx
leaq 0x3278f(%rip), %r15 # 0xa46d4
movslq (%r15,%r14,4), %rax
addq %r15, %rax
jmpq *%rax
movq %rbx, %rdi
movl $0x4, %esi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x720fd
movq 0x90(%rbx), %rax
movl $0x138, %r15d # imm = 0x138
leaq (%rax,%r15), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xc0, %esi
callq 0x1fe0d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x65a61
movq 0x90(%rbx), %rdi
movzwl 0xe8(%rdi), %eax
addq %r15, %rdi
leaq 0xe(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
callq 0x1fd5e
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x24f3d
jmp 0x71ff6
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x71ff8
cmpl $0x25, %ecx
je 0x71fee
movb $-0x66, %r12b
cmpl $0x2a, %ecx
je 0x72082
cmpl $0x2f, %ecx
jne 0x71ff6
movb $-0x65, %r12b
jmp 0x72082
movb $-0x64, %r12b
jmp 0x72082
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $-0x63, %r12b
cmpl $0x2b, %ecx
je 0x72082
cmpl $0x2d, %ecx
jne 0x71ff6
movb $-0x62, %r12b
jmp 0x72082
addl $0x6a, %ecx
cmpl $0x3, %ecx
jae 0x71ff6
addb $-0x61, %cl
movl %ecx, %r12d
jmp 0x72082
xorl %eax, %eax
cmpl $-0x49, %ecx
jg 0x72048
cmpl $-0x66, %ecx
je 0x7205f
cmpl $-0x64, %ecx
je 0x72069
cmpl $-0x49, %ecx
jne 0x71ff8
movb $-0x55, %r12b
testb $0x1, %bpl
jne 0x72082
jmp 0x71ff8
cmpl $-0x48, %ecx
je 0x72064
movb $-0x5a, %r12b
cmpl $0x3c, %ecx
je 0x72082
cmpl $0x3e, %ecx
jne 0x71ff8
movb $-0x58, %r12b
jmp 0x72082
movb $-0x59, %r12b
jmp 0x72082
movb $-0x56, %r12b
jmp 0x72082
movb $-0x57, %r12b
jmp 0x72082
addl $0x63, %ecx
cmpl $0x4, %ecx
jae 0x71ff6
shll $0x3, %ecx
movl $0xafadaeac, %r12d # imm = 0xAFADAEAC
shrl %cl, %r12d
movq %rbx, %rdi
callq 0x640b2
testl %eax, %eax
jne 0x71fc9
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x71e7c
testl %eax, %eax
jne 0x71fc9
movq 0x90(%rbx), %rax
leaq 0x138(%rax), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movzbl %r12b, %esi
callq 0x1fe0d
movl 0x20(%rbx), %ecx
movslq (%r15,%r14,4), %rax
addq %r15, %rax
jmpq *%rax
movb $-0x5e, %r12b
cmpl $0x26, %ecx
je 0x72082
jmp 0x71ff6
movb $-0x5d, %r12b
cmpl $0x5e, %ecx
je 0x72082
jmp 0x71ff6
movb $-0x5c, %r12b
cmpl $0x7c, %ecx
je 0x72082
jmp 0x71ff6
| js_parse_expr_binary:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rdi
test esi, esi
jz loc_71F4E
mov ebp, edx
mov r14d, esi
cmp dword ptr [rbx+20h], 0FFFFFFA9h
jnz loc_71F23
test bpl, 1
setz al
cmp r14d, 4
setnz cl
or cl, al
jnz short loc_71F23
mov rdi, [rbx+70h]
xor esi, esi
call peek_token
cmp eax, 0FFFFFFB7h
jnz short loc_71F23
movsxd r14, dword ptr [rbx+38h]
cmp r14, 0E0h
jl short loc_71EE2
mov rax, [rbx]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r14*8]
inc dword ptr [rax]
loc_71EE2:
mov rdi, rbx
call next_token
test eax, eax
jnz short loc_71F13
cmp dword ptr [rbx+20h], 0FFFFFFB7h
jnz short loc_71F13
mov rdi, rbx
call next_token
test eax, eax
jnz short loc_71F13
mov rdi, rbx
mov esi, 3
mov edx, ebp
call js_parse_expr_binary
test eax, eax
jz short loc_71F67
loc_71F13:
mov rdi, [rbx]
mov esi, r14d
call JS_FreeAtom
jmp loc_71FC9
loc_71F23:
dec r14d
mov rdi, rbx
mov esi, r14d
mov edx, ebp
call js_parse_expr_binary
test eax, eax
jnz loc_71FC9
mov ecx, [rbx+20h]
lea r15, jpt_71F4C
movsxd rax, ds:(jpt_71F4C - 0A46D4h)[r15+r14*4]; switch 8 cases
add rax, r15
jmp rax; switch jump
loc_71F4E:
mov rdi, rbx
mov esi, 4
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp js_parse_unary
loc_71F67:
mov rax, [rbx+90h]
mov r15d, 138h
lea rdi, [rax+r15]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0C0h
call dbuf_putc
mov rdi, rbx
mov esi, r14d
call emit_atom
mov rdi, [rbx+90h]
movzx eax, word ptr [rdi+0E8h]
add rdi, r15
lea rsi, [rsp+38h+var_2A]
mov [rsi], ax
mov edx, 2
call dbuf_put
mov rdi, [rbx]
mov esi, r14d
call JS_FreeAtom
jmp short loc_71FF6
loc_71FC9:
mov eax, 0FFFFFFFFh
jmp short loc_71FF8
loc_71FD0:
cmp ecx, 25h ; '%'; jumptable 0000000000071F4C case 0
jz short loc_71FEE
mov r12b, 9Ah
cmp ecx, 2Ah ; '*'
jz loc_72082
cmp ecx, 2Fh ; '/'
jnz short loc_71FF6
mov r12b, 9Bh
jmp loc_72082
loc_71FEE:
mov r12b, 9Ch
jmp loc_72082
loc_71FF6:
xor eax, eax
loc_71FF8:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_72005:
mov r12b, 9Dh; jumptable 0000000000071F4C case 1
cmp ecx, 2Bh ; '+'
jz short loc_72082
cmp ecx, 2Dh ; '-'
jnz short loc_71FF6
mov r12b, 9Eh
jmp short loc_72082
loc_72017:
add ecx, 6Ah ; 'j'; jumptable 0000000000071F4C case 2
cmp ecx, 3
jnb short loc_71FF6
add cl, 9Fh
mov r12d, ecx
jmp short loc_72082
loc_72027:
xor eax, eax; jumptable 0000000000071F4C case 3
cmp ecx, 0FFFFFFB7h
jg short loc_72048
cmp ecx, 0FFFFFF9Ah
jz short loc_7205F
cmp ecx, 0FFFFFF9Ch
jz short loc_72069
cmp ecx, 0FFFFFFB7h
jnz short loc_71FF8
mov r12b, 0ABh
test bpl, 1
jnz short loc_72082
jmp short loc_71FF8
loc_72048:
cmp ecx, 0FFFFFFB8h
jz short loc_72064
mov r12b, 0A6h
cmp ecx, 3Ch ; '<'
jz short loc_72082
cmp ecx, 3Eh ; '>'
jnz short loc_71FF8
mov r12b, 0A8h
jmp short loc_72082
loc_7205F:
mov r12b, 0A7h
jmp short loc_72082
loc_72064:
mov r12b, 0AAh
jmp short loc_72082
loc_72069:
mov r12b, 0A9h
jmp short loc_72082
loc_7206E:
add ecx, 63h ; 'c'; jumptable 0000000000071F4C case 4
cmp ecx, 4
jnb short loc_71FF6
shl ecx, 3
mov r12d, 0AFADAEACh
shr r12d, cl
loc_72082:
mov rdi, rbx
call next_token
test eax, eax
jnz loc_71FC9
mov rdi, rbx
mov esi, r14d
mov edx, ebp
call js_parse_expr_binary
test eax, eax
jnz loc_71FC9
mov rax, [rbx+90h]
lea rdi, [rax+138h]
mov ecx, [rax+140h]
mov [rax+168h], ecx
movzx esi, r12b
call dbuf_putc
mov ecx, [rbx+20h]
movsxd rax, ds:(jpt_71F4C - 0A46D4h)[r15+r14*4]; switch 8 cases
add rax, r15
jmp rax; switch jump
loc_720D6:
mov r12b, 0A2h; jumptable 0000000000071F4C case 5
cmp ecx, 26h ; '&'
jz short loc_72082
jmp loc_71FF6
loc_720E3:
mov r12b, 0A3h; jumptable 0000000000071F4C case 6
cmp ecx, 5Eh ; '^'
jz short loc_72082
jmp loc_71FF6
loc_720F0:
mov r12b, 0A4h; jumptable 0000000000071F4C case 7
cmp ecx, 7Ch ; '|'
jz short loc_72082
jmp loc_71FF6
| long long js_parse_expr_binary(
long long a1,
int a2,
unsigned int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v13; // rdx
long long v14; // rcx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
long long v19; // r14
_DWORD *v20; // rax
long long v21; // rdx
long long v22; // rcx
long long v23; // r8
long long v24; // r9
__m128 v25; // xmm4
__m128 v26; // xmm5
unsigned int v27; // r14d
long long v28; // rsi
long long v29; // rdx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
long long v34; // rcx
long long result; // rax
long long v36; // rax
long long v37; // rdi
unsigned int v38; // r12d
unsigned int v39; // ecx
long long v40; // rax
_WORD v41[21]; // [rsp+Eh] [rbp-2Ah] BYREF
if ( !a2 )
return js_parse_unary(a1, 4LL);
if ( *(_DWORD *)(a1 + 32) != -87
|| (a3 & 1) == 0
|| a2 != 4
|| (unsigned int)peek_token(*(unsigned __int8 **)(a1 + 112), 0) != -73 )
{
v27 = a2 - 1;
v28 = v27;
if ( !(unsigned int)js_parse_expr_binary(a1, v27, a3) )
{
v34 = *(unsigned int *)(a1 + 32);
switch ( v27 )
{
case 0u:
LABEL_17:
if ( (_DWORD)v34 == 37 )
{
LOBYTE(v38) = -100;
goto LABEL_44;
}
LOBYTE(v38) = -102;
if ( (_DWORD)v34 == 42 )
goto LABEL_44;
if ( (_DWORD)v34 == 47 )
{
LOBYTE(v38) = -101;
goto LABEL_44;
}
return 0LL;
case 1u:
LABEL_24:
LOBYTE(v38) = -99;
if ( (_DWORD)v34 == 43 )
goto LABEL_44;
if ( (_DWORD)v34 != 45 )
return 0LL;
LOBYTE(v38) = -98;
goto LABEL_44;
case 2u:
LABEL_27:
v34 = (unsigned int)(v34 + 106);
if ( (unsigned int)v34 >= 3 )
return 0LL;
LOBYTE(v34) = v34 - 97;
LOBYTE(v38) = v34;
goto LABEL_44;
case 3u:
while ( 2 )
{
result = 0LL;
if ( (int)v34 > -73 )
{
if ( (_DWORD)v34 == -72 )
{
LOBYTE(v38) = -86;
}
else
{
LOBYTE(v38) = -90;
if ( (_DWORD)v34 != 60 )
{
if ( (_DWORD)v34 != 62 )
return result;
LOBYTE(v38) = -88;
}
}
}
else
{
switch ( (_DWORD)v34 )
{
case 0xFFFFFF9A:
LOBYTE(v38) = -89;
break;
case 0xFFFFFF9C:
LOBYTE(v38) = -87;
break;
case 0xFFFFFFB7:
LOBYTE(v38) = -85;
if ( (a3 & 1) == 0 )
return result;
break;
default:
return result;
}
}
LABEL_44:
if ( !(unsigned int)next_token(a1, a4, a5, a6, a7, v32, v33, a10, a11, v28, v29, v34, v30, v31)
&& !(unsigned int)js_parse_expr_binary(a1, v27, a3) )
{
v40 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v40 + 360) = *(_DWORD *)(v40 + 320);
v28 = (unsigned __int8)v38;
dbuf_putc((_QWORD *)(v40 + 312), v38);
v34 = *(unsigned int *)(a1 + 32);
switch ( v27 )
{
case 0u:
goto LABEL_17;
case 1u:
goto LABEL_24;
case 2u:
goto LABEL_27;
case 3u:
continue;
case 4u:
goto LABEL_42;
case 5u:
goto LABEL_47;
case 6u:
goto LABEL_49;
case 7u:
goto LABEL_51;
}
}
break;
}
break;
case 4u:
LABEL_42:
v39 = v34 + 99;
if ( v39 >= 4 )
return 0LL;
v34 = 8 * v39;
v38 = 0xAFADAEAC >> v34;
goto LABEL_44;
case 5u:
LABEL_47:
LOBYTE(v38) = -94;
if ( (_DWORD)v34 != 38 )
return 0LL;
goto LABEL_44;
case 6u:
LABEL_49:
LOBYTE(v38) = -93;
if ( (_DWORD)v34 != 94 )
return 0LL;
goto LABEL_44;
case 7u:
LABEL_51:
LOBYTE(v38) = -92;
if ( (_DWORD)v34 != 124 )
return 0LL;
goto LABEL_44;
}
}
return 0xFFFFFFFFLL;
}
v19 = *(int *)(a1 + 56);
if ( v19 >= 224 )
{
v20 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v19);
++*v20;
}
if ( (unsigned int)next_token(a1, a4, a5, a6, a7, v17, v18, a10, a11, 0LL, v13, v14, v15, v16)
|| *(_DWORD *)(a1 + 32) != -73
|| (unsigned int)next_token(a1, a4, a5, a6, a7, v25, v26, a10, a11, 0LL, v21, v22, v23, v24)
|| (unsigned int)js_parse_expr_binary(a1, 3LL, a3) )
{
JS_FreeAtom(*(_QWORD *)a1, v19);
return 0xFFFFFFFFLL;
}
v36 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v36 + 360) = *(_DWORD *)(v36 + 320);
dbuf_putc((_QWORD *)(v36 + 312), 192);
emit_atom((_QWORD *)a1, v19);
v37 = *(_QWORD *)(a1 + 144);
v41[0] = *(_WORD *)(v37 + 232);
dbuf_put((_QWORD *)(v37 + 312), (long long)v41, 2LL);
JS_FreeAtom(*(_QWORD *)a1, v19);
return 0LL;
}
| js_parse_expr_binary:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
TEST ESI,ESI
JZ 0x00171f4e
MOV EBP,EDX
MOV R14D,ESI
CMP dword ptr [RBX + 0x20],-0x57
JNZ 0x00171f23
TEST BPL,0x1
SETZ AL
CMP R14D,0x4
SETNZ CL
OR CL,AL
JNZ 0x00171f23
MOV RDI,qword ptr [RBX + 0x70]
XOR ESI,ESI
CALL 0x001666d7
CMP EAX,-0x49
JNZ 0x00171f23
MOVSXD R14,dword ptr [RBX + 0x38]
CMP R14,0xe0
JL 0x00171ee2
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R14*0x8]
INC dword ptr [RAX]
LAB_00171ee2:
MOV RDI,RBX
CALL 0x001640b2
TEST EAX,EAX
JNZ 0x00171f13
CMP dword ptr [RBX + 0x20],-0x49
JNZ 0x00171f13
MOV RDI,RBX
CALL 0x001640b2
TEST EAX,EAX
JNZ 0x00171f13
MOV RDI,RBX
MOV ESI,0x3
MOV EDX,EBP
CALL 0x00171e7c
TEST EAX,EAX
JZ 0x00171f67
LAB_00171f13:
MOV RDI,qword ptr [RBX]
MOV ESI,R14D
CALL 0x00124f3d
JMP 0x00171fc9
LAB_00171f23:
DEC R14D
MOV RDI,RBX
MOV ESI,R14D
MOV EDX,EBP
CALL 0x00171e7c
TEST EAX,EAX
JNZ 0x00171fc9
MOV ECX,dword ptr [RBX + 0x20]
LEA R15,[0x1a46d4]
MOVSXD RAX,dword ptr [R15 + R14*0x4]
ADD RAX,R15
JMP RAX
LAB_00171f4e:
MOV RDI,RBX
MOV ESI,0x4
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001720fd
LAB_00171f67:
MOV RAX,qword ptr [RBX + 0x90]
MOV R15D,0x138
LEA RDI,[RAX + R15*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0xc0
CALL 0x0011fe0d
MOV RDI,RBX
MOV ESI,R14D
CALL 0x00165a61
MOV RDI,qword ptr [RBX + 0x90]
MOVZX EAX,word ptr [RDI + 0xe8]
ADD RDI,R15
LEA RSI,[RSP + 0xe]
MOV word ptr [RSI],AX
MOV EDX,0x2
CALL 0x0011fd5e
MOV RDI,qword ptr [RBX]
MOV ESI,R14D
CALL 0x00124f3d
JMP 0x00171ff6
LAB_00171fc9:
MOV EAX,0xffffffff
JMP 0x00171ff8
LAB_00171ff6:
XOR EAX,EAX
LAB_00171ff8:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 js_parse_expr_binary(long *param_1,int param_2,uint param_3)
{
int *piVar1;
long lVar2;
int iVar3;
int iVar4;
int8 uVar5;
int2 local_2a;
if (param_2 == 0) {
uVar5 = js_parse_unary(param_1,4);
return uVar5;
}
if ((((int)param_1[4] == -0x57) && (param_2 == 4 && (param_3 & 1) != 0)) &&
(iVar3 = peek_token(param_1[0xe],0), iVar3 == -0x49)) {
iVar3 = (int)param_1[7];
if (0xdf < (long)iVar3) {
piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + (long)iVar3 * 8);
*piVar1 = *piVar1 + 1;
}
iVar4 = next_token(param_1);
if (((iVar4 == 0) && ((int)param_1[4] == -0x49)) &&
((iVar4 = next_token(param_1), iVar4 == 0 &&
(iVar4 = js_parse_expr_binary(param_1,3,param_3), iVar4 == 0)))) {
lVar2 = param_1[0x12];
*(int4 *)(lVar2 + 0x168) = *(int4 *)(lVar2 + 0x140);
dbuf_putc(lVar2 + 0x138,0xc0);
emit_atom(param_1,iVar3);
local_2a = *(int2 *)(param_1[0x12] + 0xe8);
dbuf_put(param_1[0x12] + 0x138,&local_2a,2);
JS_FreeAtom(*param_1,iVar3);
return 0;
}
JS_FreeAtom(*param_1,iVar3);
}
else {
iVar3 = js_parse_expr_binary(param_1,(ulong)(param_2 - 1),param_3);
if (iVar3 == 0) {
/* WARNING: Could not recover jumptable at 0x00171f4c. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar5 = (*(code *)(&DAT_001a46d4 + *(int *)(&DAT_001a46d4 + (ulong)(param_2 - 1) * 4)))();
return uVar5;
}
}
return 0xffffffff;
}
|
|
5,926 | 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=(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>) | monkey531[P]llama/common/./json.hpp | basic_json& operator=(basic_json other) noexcept (
std::is_nothrow_move_constructible<value_t>::value&&
std::is_nothrow_move_assignable<value_t>::value&&
std::is_nothrow_move_constructible<json_value>::value&&
std::is_nothrow_move_assignable<json_value>::value&&
std::is_nothrow_move_assignable<json_base_class_t>::value
)
{
// check that passed value is valid
other.assert_invariant();
using std::swap;
swap(m_data.m_type, other.m_data.m_type);
swap(m_data.m_value, other.m_data.m_value);
json_base_class_t::operator=(std::move(other));
set_parents();
assert_invariant();
return *this;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator=(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>):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl $0x1, %esi
callq 0x3175a
movb (%r14), %al
movb (%rbx), %cl
movb %cl, (%r14)
movb %al, (%rbx)
movq 0x8(%r14), %rax
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%r14)
movq %rax, 0x8(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x3175a
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rdi, rsi
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]
mov cl, [rbx]
mov [r14], cl
mov [rbx], al
mov rax, [r14+8]
mov rcx, [rbx+8]
mov [r14+8], rcx
mov [rbx+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 rax, r14
add rsp, 8
pop rbx
pop r14
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>::operator=(
long long a1,
long long a2)
{
char v2; // al
long long v3; // rax
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 *)a2);
v2 = *(_BYTE *)a1;
*(_BYTE *)a1 = *(_BYTE *)a2;
*(_BYTE *)a2 = v2;
v3 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(a1 + 8) = *(_QWORD *)(a2 + 8);
*(_QWORD *)(a2 + 8) = v3;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
return a1;
}
| operator=:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,RSI
MOV ESI,0x1
CALL 0x0013175a
MOV AL,byte ptr [R14]
MOV CL,byte ptr [RBX]
MOV byte ptr [R14],CL
MOV byte ptr [RBX],AL
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [R14 + 0x8],RCX
MOV qword ptr [RBX + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013175a
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
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>::TEMPNAMEPLACEHOLDERVALUE(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>) */
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
* __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_2)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 uVar2;
assert_invariant(SUB81(param_2,0));
bVar1 = *this;
*this = *param_2;
*param_2 = bVar1;
uVar2 = *(int8 *)(this + 8);
*(int8 *)(this + 8) = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = uVar2;
assert_invariant(SUB81(this,0));
return this;
}
|
|
5,927 | inline_mysql_file_delete | eloqsql/include/mysql/psi/mysql_file.h | static inline int
inline_mysql_file_delete(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *name, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, name, &locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
result= my_delete(name, flags);
PSI_FILE_CALL(end_file_close_wait)(locker, result);
return result;
}
#endif
result= my_delete(name, flags);
return result;
} | O0 | c | inline_mysql_file_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
leaq 0x268444(%rip), %rax # 0x2c1158
movq (%rax), %rax
movq 0x148(%rax), %rax
movl -0x8(%rbp), %esi
movq -0x20(%rbp), %rcx
leaq -0x80(%rbp), %rdi
movl $0xe, %edx
leaq -0x38(%rbp), %r8
callq *%rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x58da8
leaq 0x2683f9(%rip), %rax # 0x2c1158
movq (%rax), %rax
movq 0x220(%rax), %rax
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xf0b00
movl %eax, -0x2c(%rbp)
leaq 0x2683cb(%rip), %rax # 0x2c1158
movq (%rax), %rax
movq 0x228(%rax), %rax
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq *%rax
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x58dbe
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xf0b00
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| inline_mysql_file_delete_0:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+148h]
mov esi, [rbp+var_8]
mov rcx, [rbp+var_20]
lea rdi, [rbp+var_80]
mov edx, 0Eh
lea r8, [rbp+var_38]
call rax
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_58DA8
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+220h]
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call my_delete
mov [rbp+var_2C], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+228h]
mov rdi, [rbp+var_38]
mov esi, [rbp+var_2C]
call rax
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
jmp short loc_58DBE
loc_58DA8:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call my_delete
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
loc_58DBE:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long inline_mysql_file_delete_0(unsigned int a1, long long a2, unsigned int a3, long long a4, long long a5)
{
_BYTE v6[72]; // [rsp+0h] [rbp-80h] BYREF
long long v7; // [rsp+48h] [rbp-38h] BYREF
unsigned int v8; // [rsp+54h] [rbp-2Ch]
long long v9; // [rsp+58h] [rbp-28h]
long long v10; // [rsp+60h] [rbp-20h]
unsigned int v11; // [rsp+6Ch] [rbp-14h]
long long v12; // [rsp+70h] [rbp-10h]
unsigned int v13; // [rsp+78h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = a5;
v7 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v6, a1, 14LL, a4, &v7);
if ( v7 )
{
((void ( *)(long long, long long, _QWORD))PSI_server[68])(v7, v12, v11);
v8 = my_delete(v10, v9);
((void ( *)(long long, _QWORD))PSI_server[69])(v7, v8);
}
else
{
return (unsigned int)my_delete(v10, v9);
}
return v8;
}
| inline_mysql_file_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x80]
MOV EDX,0xe
LEA R8,[RBP + -0x38]
CALL RAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00158da8
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x220]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001f0b00
MOV dword ptr [RBP + -0x2c],EAX
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x228]
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,dword ptr [RBP + -0x2c]
CALL RAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00158dbe
LAB_00158da8:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001f0b00
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
LAB_00158dbe:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_delete
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int8 param_5)
{
int1 local_88 [72];
long local_40;
int4 local_34;
int8 local_30;
int8 local_28;
int4 local_1c;
int8 local_18;
int4 local_10;
int4 local_c;
local_30 = param_5;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0xe,param_4,&local_40);
if (local_40 == 0) {
local_c = my_delete(local_28,local_30);
}
else {
(**(code **)(PSI_server + 0x220))(local_40,local_18,local_1c);
local_34 = my_delete(local_28,local_30);
(**(code **)(PSI_server + 0x228))(local_40,local_34);
local_c = local_34;
}
return local_c;
}
|
|
5,928 | google::protobuf::compiler::Version::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/plugin.pb.cc | void Version::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<Version*>(&to_msg);
auto& from = static_cast<const Version&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.Version)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_set_suffix(from._internal_suffix());
}
if (cached_has_bits & 0x00000002u) {
_this->_impl_.major_ = from._impl_.major_;
}
if (cached_has_bits & 0x00000004u) {
_this->_impl_.minor_ = from._impl_.minor_;
}
if (cached_has_bits & 0x00000008u) {
_this->_impl_.patch_ = from._impl_.patch_;
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
} | O0 | cpp | google::protobuf::compiler::Version::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&):
subq $0x138, %rsp # imm = 0x138
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x90(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0xa9e02
jmp 0xa9eac
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rcx
movb $0x0, 0x57(%rsp)
cmpq %rcx, %rax
je 0xa9e1e
jmp 0xa9e6e
leaq 0x30bbf0(%rip), %rdx # 0x3b5a15
leaq 0x58(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movl $0x3, %esi
movl $0x1f2, %ecx # imm = 0x1F2
callq 0x219560
movq 0x28(%rsp), %rdi
movb $0x1, 0x57(%rsp)
leaq 0x30bc35(%rip), %rsi # 0x3b5a84
callq 0x218e20
movq %rax, 0x30(%rsp)
jmp 0xa9e5b
movq 0x30(%rsp), %rsi
leaq 0x43(%rsp), %rdi
callq 0x218fd0
jmp 0xa9e6c
jmp 0xa9e6e
testb $0x1, 0x57(%rsp)
jne 0xa9e77
jmp 0xa9e81
leaq 0x58(%rsp), %rdi
callq 0x2195a0
jmp 0xa9df7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
testb $0x1, 0x57(%rsp)
jne 0xa9e9d
jmp 0xa9ea7
leaq 0x58(%rsp), %rdi
callq 0x2195a0
jmp 0xaa14a
movl $0x0, 0x3c(%rsp)
movq 0x90(%rsp), %rax
addq $0x10, %rax
movq %rax, 0xd8(%rsp)
movl $0x0, 0xd4(%rsp)
movq 0xd8(%rsp), %rax
movslq 0xd4(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0xaa047
movl 0x3c(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xa9fa8
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x90(%rsp), %rdi
callq 0xaee10
movq 0x10(%rsp), %rcx
movq %rcx, 0x110(%rsp)
movq %rax, 0x108(%rsp)
movq 0x110(%rsp), %rdi
movq %rdi, %rax
addq $0x10, %rax
movq %rax, 0x120(%rsp)
movl $0x0, 0x11c(%rsp)
movq 0x120(%rsp), %rax
movslq 0x11c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq %rdi, %rax
addq $0x10, %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x292e0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, %rdx
callq 0x1e7090
movl 0x3c(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xa9fca
movq 0x90(%rsp), %rax
movl 0x20(%rax), %ecx
movq 0x98(%rsp), %rax
movl %ecx, 0x20(%rax)
movl 0x3c(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xa9fec
movq 0x90(%rsp), %rax
movl 0x24(%rax), %ecx
movq 0x98(%rsp), %rax
movl %ecx, 0x24(%rax)
movl 0x3c(%rsp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xaa00e
movq 0x90(%rsp), %rax
movl 0x28(%rax), %ecx
movq 0x98(%rsp), %rax
movl %ecx, 0x28(%rax)
movl 0x3c(%rsp), %edx
movq 0x98(%rsp), %rax
addq $0x10, %rax
movq %rax, 0xc8(%rsp)
movl $0x0, 0xc4(%rsp)
movq 0xc8(%rsp), %rax
movslq 0xc4(%rsp), %rcx
orl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movq 0x98(%rsp), %rcx
addq $0x8, %rcx
movq 0x90(%rsp), %rax
addq $0x8, %rax
movq %rcx, 0xb8(%rsp)
movq %rax, 0xb0(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x130(%rsp)
movq 0x130(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xaa142
movq 0xb0(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq $0x0, 0xe8(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, (%rsp)
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x128(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xaa121
movq (%rsp), %rdi
callq 0xb1a70
addq $0x8, %rax
movq %rax, 0xf8(%rsp)
jmp 0xaa130
callq *0xe8(%rsp)
movq %rax, 0xf8(%rsp)
movq 0x8(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0xb25d0
addq $0x138, %rsp # imm = 0x138
retq
movq 0x48(%rsp), %rdi
callq 0x21700
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf8compiler7Version9MergeImplERNS0_7MessageERKS3_:
sub rsp, 138h
mov [rsp+138h+var_90], rdi
mov [rsp+138h+var_98], rsi
mov rax, [rsp+138h+var_90]
mov [rsp+138h+var_A0], rax
mov rax, [rsp+138h+var_98]
mov [rsp+138h+var_A8], rax
loc_A9DF7:
xor eax, eax
test al, 1
jnz short loc_A9E02
jmp loc_A9EAC
loc_A9E02:
mov rax, [rsp+138h+var_A8]
mov rcx, [rsp+138h+var_A0]
mov [rsp+138h+var_E1], 0
cmp rax, rcx
jz short loc_A9E1E
jmp short loc_A9E6E
loc_A9E1E:
lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+138h+var_E0]
mov [rsp+138h+var_110], rdi
mov esi, 3
mov ecx, 1F2h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+138h+var_110]
mov [rsp+138h+var_E1], 1
lea rsi, aCheckFailedFro; "CHECK failed: (&from) != (_this): "
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+138h+var_108], rax
jmp short $+2
loc_A9E5B:
mov rsi, [rsp+138h+var_108]
lea rdi, [rsp+138h+var_F5]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_A9E6C:
jmp short $+2
loc_A9E6E:
test [rsp+138h+var_E1], 1
jnz short loc_A9E77
jmp short loc_A9E81
loc_A9E77:
lea rdi, [rsp+138h+var_E0]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_A9E81:
jmp loc_A9DF7
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
test [rsp+arg_4F], 1
jnz short loc_A9E9D
jmp short loc_A9EA7
loc_A9E9D:
lea rdi, [rsp+arg_50]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_A9EA7:
jmp loc_AA14A
loc_A9EAC:
mov [rsp+138h+var_FC], 0
mov rax, [rsp+138h+var_A8]
add rax, 10h
mov [rsp+138h+var_60], rax
mov [rsp+138h+var_64], 0
mov rax, [rsp+138h+var_60]
movsxd rcx, [rsp+138h+var_64]
mov eax, [rax+rcx*4]
mov [rsp+138h+var_FC], eax
mov eax, [rsp+138h+var_FC]
and eax, 0Fh
cmp eax, 0
jz loc_AA047
mov eax, [rsp+138h+var_FC]
and eax, 1
cmp eax, 0
jz loc_A9FA8
mov rax, [rsp+138h+var_A0]
mov [rsp+138h+var_128], rax
mov rdi, [rsp+138h+var_A8]
call _ZNK6google8protobuf8compiler7Version16_internal_suffixB5cxx11Ev; google::protobuf::compiler::Version::_internal_suffix(void)
mov rcx, [rsp+138h+var_128]
mov [rsp+138h+var_28], rcx
mov [rsp+138h+var_30], rax
mov rdi, [rsp+138h+var_28]; this
mov rax, rdi
add rax, 10h
mov [rsp+138h+var_18], rax
mov [rsp+138h+var_1C], 0
mov rax, [rsp+138h+var_18]
movsxd rcx, [rsp+138h+var_1C]
mov edx, [rax+rcx*4]
or edx, 1
mov [rax+rcx*4], edx
mov rax, rdi
add rax, 10h
add rax, 8
mov qword ptr [rsp+138h+var_120], rax
mov rax, [rsp+138h+var_30]
mov qword ptr [rsp+138h+var_118], rax
call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void)
mov rdi, qword ptr [rsp+138h+var_120]; int
mov rsi, qword ptr [rsp+138h+var_118]; int
mov rdx, rax; int
call _ZN6google8protobuf8internal14ArenaStringPtr3SetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS0_5ArenaE; google::protobuf::internal::ArenaStringPtr::Set(std::string const&,google::protobuf::Arena *)
loc_A9FA8:
mov eax, [rsp+138h+var_FC]
and eax, 2
cmp eax, 0
jz short loc_A9FCA
mov rax, [rsp+138h+var_A8]
mov ecx, [rax+20h]
mov rax, [rsp+138h+var_A0]
mov [rax+20h], ecx
loc_A9FCA:
mov eax, [rsp+138h+var_FC]
and eax, 4
cmp eax, 0
jz short loc_A9FEC
mov rax, [rsp+138h+var_A8]
mov ecx, [rax+24h]
mov rax, [rsp+138h+var_A0]
mov [rax+24h], ecx
loc_A9FEC:
mov eax, [rsp+138h+var_FC]
and eax, 8
cmp eax, 0
jz short loc_AA00E
mov rax, [rsp+138h+var_A8]
mov ecx, [rax+28h]
mov rax, [rsp+138h+var_A0]
mov [rax+28h], ecx
loc_AA00E:
mov edx, [rsp+138h+var_FC]
mov rax, [rsp+138h+var_A0]
add rax, 10h
mov [rsp+138h+var_70], rax
mov [rsp+138h+var_74], 0
mov rax, [rsp+138h+var_70]
movsxd rcx, [rsp+138h+var_74]
or edx, [rax+rcx*4]
mov [rax+rcx*4], edx
loc_AA047:
mov rcx, [rsp+138h+var_A0]
add rcx, 8
mov rax, [rsp+138h+var_A8]
add rax, 8
mov [rsp+138h+var_80], rcx
mov [rsp+138h+var_88], rax
mov rax, [rsp+138h+var_80]
mov [rsp+138h+var_130], rax
mov rax, [rsp+138h+var_88]
mov [rsp+138h+var_58], rax
mov rax, [rsp+138h+var_58]
mov [rsp+138h+var_8], rax
mov rax, [rsp+138h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz loc_AA142
mov rax, [rsp+138h+var_88]
mov [rsp+138h+var_48], rax
mov [rsp+138h+var_50], 0
mov rax, [rsp+138h+var_48]
mov [rsp+138h+var_138], rax
mov [rsp+138h+var_38], rax
mov rax, [rsp+138h+var_38]
mov [rsp+138h+var_10], rax
mov rax, [rsp+138h+var_10]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_AA121
mov rdi, [rsp+138h+var_138]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void)
add rax, 8
mov qword ptr [rsp+138h+var_40], rax
jmp short loc_AA130
loc_AA121:
call [rsp+138h+var_50]
mov qword ptr [rsp+138h+var_40], rax
loc_AA130:
mov rdi, [rsp+138h+var_130]; void *
mov rsi, qword ptr [rsp+138h+var_40]; int
call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&)
loc_AA142:
add rsp, 138h
retn
loc_AA14A:
mov rdi, [rsp+arg_40]
call __Unwind_Resume
| long long google::protobuf::compiler::Version::MergeImpl(
google::protobuf::compiler::Version *this,
google::protobuf::Message *a2,
unsigned long long a3)
{
int ArenaForAllocation; // eax
long long result; // rax
unsigned int v5; // [rsp+3Ch] [rbp-FCh]
google::protobuf::Message *v6; // [rsp+90h] [rbp-A8h]
google::protobuf::compiler::Version *v7; // [rsp+98h] [rbp-A0h]
_QWORD *v8; // [rsp+B0h] [rbp-88h]
int v9[2]; // [rsp+F8h] [rbp-40h]
google::protobuf::Message *v10; // [rsp+108h] [rbp-30h]
v7 = this;
v6 = a2;
v5 = *((_DWORD *)a2 + 4);
if ( (v5 & 0xF) != 0 )
{
if ( (v5 & 1) != 0 )
{
v10 = (google::protobuf::Message *)google::protobuf::compiler::Version::_internal_suffix[abi:cxx11](a2);
*((_DWORD *)this + 4) |= 1u;
ArenaForAllocation = google::protobuf::MessageLite::GetArenaForAllocation(this);
this = (google::protobuf::compiler::Version *)((char *)this + 24);
a2 = v10;
google::protobuf::internal::ArenaStringPtr::Set((_DWORD)v7 + 24, (int)v10, ArenaForAllocation);
}
if ( (v5 & 2) != 0 )
*((_DWORD *)v7 + 8) = *((_DWORD *)v6 + 8);
if ( (v5 & 4) != 0 )
*((_DWORD *)v7 + 9) = *((_DWORD *)v6 + 9);
if ( (v5 & 8) != 0 )
*((_DWORD *)v7 + 10) = *((_DWORD *)v6 + 10);
a3 = *((_DWORD *)v7 + 4) | v5;
*((_DWORD *)v7 + 4) = a3;
}
v8 = (_QWORD *)((char *)v6 + 8);
result = *((_QWORD *)v6 + 1) & 1LL;
if ( result )
{
if ( (*v8 & 1LL) != 0 )
*(_QWORD *)v9 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(v8)
+ 8;
else
v9[0] = ((long long ( *)(google::protobuf::compiler::Version *, google::protobuf::Message *, unsigned long long))dword_0)(
this,
a2,
a3);
return google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(
(char *)v7 + 8,
v9[0]);
}
return result;
}
| MergeImpl:
SUB RSP,0x138
MOV qword ptr [RSP + 0xa8],RDI
MOV qword ptr [RSP + 0xa0],RSI
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x90],RAX
LAB_001a9df7:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x001a9e02
JMP 0x001a9eac
LAB_001a9e02:
MOV RAX,qword ptr [RSP + 0x90]
MOV RCX,qword ptr [RSP + 0x98]
MOV byte ptr [RSP + 0x57],0x0
CMP RAX,RCX
JZ 0x001a9e1e
JMP 0x001a9e6e
LAB_001a9e1e:
LEA RDX,[0x4b5a15]
LEA RDI,[RSP + 0x58]
MOV qword ptr [RSP + 0x28],RDI
MOV ESI,0x3
MOV ECX,0x1f2
CALL 0x00319560
MOV RDI,qword ptr [RSP + 0x28]
MOV byte ptr [RSP + 0x57],0x1
LAB_001a9e48:
LEA RSI,[0x4b5a84]
CALL 0x00318e20
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001a9e5b
LAB_001a9e5b:
MOV RSI,qword ptr [RSP + 0x30]
LEA RDI,[RSP + 0x43]
CALL 0x00318fd0
LAB_001a9e6a:
JMP 0x001a9e6c
LAB_001a9e6c:
JMP 0x001a9e6e
LAB_001a9e6e:
TEST byte ptr [RSP + 0x57],0x1
JNZ 0x001a9e77
JMP 0x001a9e81
LAB_001a9e77:
LEA RDI,[RSP + 0x58]
CALL 0x003195a0
LAB_001a9e81:
JMP 0x001a9df7
LAB_001a9eac:
MOV dword ptr [RSP + 0x3c],0x0
MOV RAX,qword ptr [RSP + 0x90]
ADD RAX,0x10
MOV qword ptr [RSP + 0xd8],RAX
MOV dword ptr [RSP + 0xd4],0x0
MOV RAX,qword ptr [RSP + 0xd8]
MOVSXD RCX,dword ptr [RSP + 0xd4]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x3c],EAX
MOV EAX,dword ptr [RSP + 0x3c]
AND EAX,0xf
CMP EAX,0x0
JZ 0x001aa047
MOV EAX,dword ptr [RSP + 0x3c]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001a9fa8
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x001aee10
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x110],RCX
MOV qword ptr [RSP + 0x108],RAX
MOV RDI,qword ptr [RSP + 0x110]
MOV RAX,RDI
ADD RAX,0x10
MOV qword ptr [RSP + 0x120],RAX
MOV dword ptr [RSP + 0x11c],0x0
MOV RAX,qword ptr [RSP + 0x120]
MOVSXD RCX,dword ptr [RSP + 0x11c]
MOV EDX,dword ptr [RAX + RCX*0x4]
OR EDX,0x1
MOV dword ptr [RAX + RCX*0x4],EDX
MOV RAX,RDI
ADD RAX,0x10
ADD RAX,0x8
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x108]
MOV qword ptr [RSP + 0x20],RAX
CALL 0x001292e0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,RAX
CALL 0x002e7090
LAB_001a9fa8:
MOV EAX,dword ptr [RSP + 0x3c]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001a9fca
MOV RAX,qword ptr [RSP + 0x90]
MOV ECX,dword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0x98]
MOV dword ptr [RAX + 0x20],ECX
LAB_001a9fca:
MOV EAX,dword ptr [RSP + 0x3c]
AND EAX,0x4
CMP EAX,0x0
JZ 0x001a9fec
MOV RAX,qword ptr [RSP + 0x90]
MOV ECX,dword ptr [RAX + 0x24]
MOV RAX,qword ptr [RSP + 0x98]
MOV dword ptr [RAX + 0x24],ECX
LAB_001a9fec:
MOV EAX,dword ptr [RSP + 0x3c]
AND EAX,0x8
CMP EAX,0x0
JZ 0x001aa00e
MOV RAX,qword ptr [RSP + 0x90]
MOV ECX,dword ptr [RAX + 0x28]
MOV RAX,qword ptr [RSP + 0x98]
MOV dword ptr [RAX + 0x28],ECX
LAB_001aa00e:
MOV EDX,dword ptr [RSP + 0x3c]
MOV RAX,qword ptr [RSP + 0x98]
ADD RAX,0x10
MOV qword ptr [RSP + 0xc8],RAX
MOV dword ptr [RSP + 0xc4],0x0
MOV RAX,qword ptr [RSP + 0xc8]
MOVSXD RCX,dword ptr [RSP + 0xc4]
OR EDX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RAX + RCX*0x4],EDX
LAB_001aa047:
MOV RCX,qword ptr [RSP + 0x98]
ADD RCX,0x8
MOV RAX,qword ptr [RSP + 0x90]
ADD RAX,0x8
MOV qword ptr [RSP + 0xb8],RCX
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0xe0],RAX
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x130],RAX
MOV RAX,qword ptr [RSP + 0x130]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001aa142
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0xf0],RAX
MOV qword ptr [RSP + 0xe8],0x0
MOV RAX,qword ptr [RSP + 0xf0]
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x100],RAX
MOV RAX,qword ptr [RSP + 0x100]
MOV qword ptr [RSP + 0x128],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001aa121
MOV RDI,qword ptr [RSP]
CALL 0x001b1a70
ADD RAX,0x8
MOV qword ptr [RSP + 0xf8],RAX
JMP 0x001aa130
LAB_001aa121:
CALL qword ptr [RSP + 0xe8]
MOV qword ptr [RSP + 0xf8],RAX
LAB_001aa130:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0xf8]
CALL 0x001b25d0
LAB_001aa142:
ADD RSP,0x138
RET
|
/* WARNING: Removing unreachable block (ram,0x001a9e02) */
/* WARNING: Removing unreachable block (ram,0x001a9e1e) */
/* WARNING: Removing unreachable block (ram,0x001a9e1c) */
/* WARNING: Removing unreachable block (ram,0x001a9e6e) */
/* WARNING: Removing unreachable block (ram,0x001a9e77) */
/* WARNING: Removing unreachable block (ram,0x001a9e75) */
/* WARNING: Removing unreachable block (ram,0x001a9e81) */
/* google::protobuf::compiler::Version::MergeImpl(google::protobuf::Message&,
google::protobuf::Message const&) */
void google::protobuf::compiler::Version::MergeImpl(Message *param_1,Message *param_2)
{
uint uVar1;
string *psVar2;
Arena *pAVar3;
InternalMetadata *this;
UnknownFieldSet *local_40;
uVar1 = *(uint *)(param_2 + 0x10);
if ((uVar1 & 0xf) != 0) {
if ((uVar1 & 1) != 0) {
psVar2 = (string *)_internal_suffix_abi_cxx11_((Version *)param_2);
*(uint *)(param_1 + 0x10) = *(uint *)(param_1 + 0x10) | 1;
pAVar3 = (Arena *)MessageLite::GetArenaForAllocation((MessageLite *)param_1);
internal::ArenaStringPtr::Set((ArenaStringPtr *)(param_1 + 0x18),psVar2,pAVar3);
}
if ((uVar1 & 2) != 0) {
*(int4 *)(param_1 + 0x20) = *(int4 *)(param_2 + 0x20);
}
if ((uVar1 & 4) != 0) {
*(int4 *)(param_1 + 0x24) = *(int4 *)(param_2 + 0x24);
}
if ((uVar1 & 8) != 0) {
*(int4 *)(param_1 + 0x28) = *(int4 *)(param_2 + 0x28);
}
*(uint *)(param_1 + 0x10) = uVar1 | *(uint *)(param_1 + 0x10);
}
this = (InternalMetadata *)(param_2 + 8);
if ((*(ulong *)this & 1) != 0) {
if ((*(ulong *)this & 1) == 0) {
local_40 = (UnknownFieldSet *)(*(code *)0x0)();
}
else {
local_40 = (UnknownFieldSet *)
internal::InternalMetadata::
PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>
(this);
local_40 = (UnknownFieldSet *)((Container *)local_40 + 8);
}
internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(param_1 + 8),local_40);
}
return;
}
|
|
5,929 | nglog::LogDestination::DeleteLogDestinations() | ng-log[P]ng-log/src/logging.cc | void LogDestination::DeleteLogDestinations() {
for (auto& log_destination : log_destinations_) {
log_destination.reset();
}
SinkLock l{sink_mutex_};
sinks_.reset();
} | O2 | cpp | nglog::LogDestination::DeleteLogDestinations():
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
leaq 0x28ad9(%rip), %r14 # 0x32ce0
cmpq $0x20, %rbx
je 0xa21e
leaq (%r14,%rbx), %rdi
xorl %esi, %esi
callq 0x10016
addq $0x8, %rbx
jmp 0xa207
leaq 0x28a73(%rip), %rbx # 0x32c98
movq %rbx, %rdi
callq 0x1bade
leaq 0x28a5c(%rip), %rdi # 0x32c90
xorl %esi, %esi
callq 0x1019c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7750
| _ZN5nglog14LogDestination21DeleteLogDestinationsEv:
push r14
push rbx
push rax
xor ebx, ebx
lea r14, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
loc_A207:
cmp rbx, 20h ; ' '
jz short loc_A21E
lea rdi, [r14+rbx]
xor esi, esi
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
add rbx, 8
jmp short loc_A207
loc_A21E:
lea rbx, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
mov rdi, rbx; this
call _ZNSt22__shared_mutex_pthread4lockEv; std::__shared_mutex_pthread::lock(void)
lea rdi, _ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
xor esi, esi
call _ZNSt15__uniq_ptr_implISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EE5resetEPS5_; std::__uniq_ptr_impl<std::vector<nglog::LogSink *>,std::default_delete<std::vector<nglog::LogSink *>>>::reset(std::vector<nglog::LogSink *>*)
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
jmp _pthread_rwlock_unlock
| long long nglog::LogDestination::DeleteLogDestinations(nglog::LogDestination *this)
{
long long i; // rbx
for ( i = 0LL; i != 32; i += 8LL )
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(
(char *)&nglog::LogDestination::log_destinations_ + i,
0LL);
std::__shared_mutex_pthread::lock((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_);
std::__uniq_ptr_impl<std::vector<nglog::LogSink *>,std::default_delete<std::vector<nglog::LogSink *>>>::reset(
&nglog::LogDestination::sinks_,
0LL);
return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_);
}
| DeleteLogDestinations:
PUSH R14
PUSH RBX
PUSH RAX
XOR EBX,EBX
LEA R14,[0x132ce0]
LAB_0010a207:
CMP RBX,0x20
JZ 0x0010a21e
LEA RDI,[R14 + RBX*0x1]
XOR ESI,ESI
CALL 0x00110016
ADD RBX,0x8
JMP 0x0010a207
LAB_0010a21e:
LEA RBX,[0x132c98]
MOV RDI,RBX
CALL 0x0011bade
LEA RDI,[0x132c90]
XOR ESI,ESI
CALL 0x0011019c
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00107750
|
/* nglog::LogDestination::DeleteLogDestinations() */
void nglog::LogDestination::DeleteLogDestinations(void)
{
long lVar1;
for (lVar1 = 0; lVar1 != 0x20; lVar1 = lVar1 + 8) {
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset
((__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
((long)&log_destinations_ + lVar1),(LogDestination *)0x0);
}
std::__shared_mutex_pthread::lock((__shared_mutex_pthread *)sink_mutex_);
std::
__uniq_ptr_impl<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
::reset((__uniq_ptr_impl<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
*)&sinks_,(vector *)0x0);
pthread_rwlock_unlock((pthread_rwlock_t *)sink_mutex_);
return;
}
|
|
5,930 | void YAML::Node::Assign<aimrt::runtime::core::logger::LoggerManager::Options>(aimrt::runtime::core::logger::LoggerManager::Options const&) | aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/impl.h | inline void Node::Assign(const T& rhs) {
if (!m_isValid)
throw InvalidNode(m_invalidKey);
AssignData(convert<T>::encode(rhs));
} | O0 | c | void YAML::Node::Assign<aimrt::runtime::core::logger::LoggerManager::Options>(aimrt::runtime::core::logger::LoggerManager::Options const&):
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
testb $0x1, (%rax)
jne 0x13f194
movl $0x40, %edi
callq 0x89b90
movq 0x10(%rsp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
addq $0x8, %rsi
callq 0x9be90
jmp 0x13f162
movq 0x8(%rsp), %rdi
leaq 0xd463a(%rip), %rsi # 0x2137a8
leaq 0x5e9bb(%rip), %rdx # 0x19db30
callq 0x92530
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
callq 0x8b4e0
jmp 0x13f1de
movq 0x68(%rsp), %rsi
leaq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x13f1f0
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0xd6440
jmp 0x13f1b7
leaq 0x18(%rsp), %rdi
callq 0x9b150
addq $0x78, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x9b150
movq 0x60(%rsp), %rdi
callq 0x92a70
nopl (%rax,%rax)
| _ZN4YAML4Node6AssignIN5aimrt7runtime4core6logger13LoggerManager7OptionsEEEvRKT_:
sub rsp, 78h
mov qword ptr [rsp+78h+var_8], rdi; int
mov qword ptr [rsp+78h+var_10], rsi; int
mov rax, qword ptr [rsp+78h+var_8]
mov [rsp+78h+var_68], rax; int
test byte ptr [rax], 1
jnz short loc_13F194
mov edi, 40h ; '@'; thrown_size
call ___cxa_allocate_exception
mov rsi, [rsp+78h+var_68]
mov rdi, rax
mov rax, rdi
mov [rsp+78h+var_70], rax
add rsi, 8
call _ZN4YAML11InvalidNodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; YAML::InvalidNode::InvalidNode(std::string const&)
jmp short $+2
loc_13F162:
mov rdi, [rsp+78h+var_70]; void *
lea rsi, _ZTIN4YAML11InvalidNodeE; lptinfo
lea rdx, _ZN4YAML11InvalidNodeD2Ev; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+78h+var_70]; void *
mov rcx, rax
mov eax, edx
mov [rsp+78h+var_18], rcx
mov [rsp+78h+var_1C], eax
call ___cxa_free_exception
jmp short loc_13F1DE
loc_13F194:
mov rsi, qword ptr [rsp+78h+var_10]; int
lea rdi, [rsp+78h+var_60]; int
mov [rsp+78h+var_78], rdi; int
call _ZN4YAML7convertIN5aimrt7runtime4core6logger13LoggerManager7OptionsEE6encodeERKS6_; YAML::convert<aimrt::runtime::core::logger::LoggerManager::Options>::encode(aimrt::runtime::core::logger::LoggerManager::Options const&)
mov rdi, [rsp+78h+var_68]; this
mov rsi, [rsp+78h+var_78]; YAML::Node *
call _ZN4YAML4Node10AssignDataERKS0_; YAML::Node::AssignData(YAML::Node const&)
jmp short $+2
loc_13F1B7:
lea rdi, [rsp+78h+var_60]; this
call _ZN4YAML4NodeD2Ev; YAML::Node::~Node()
add rsp, 78h
retn
mov rcx, rax
mov eax, edx
mov [rsp+78h+var_18], rcx
mov [rsp+78h+var_1C], eax
lea rdi, [rsp+78h+var_60]; this
call _ZN4YAML4NodeD2Ev; YAML::Node::~Node()
loc_13F1DE:
mov rdi, [rsp+78h+var_18]
call __Unwind_Resume
| void YAML::Node::Assign<aimrt::runtime::core::logger::LoggerManager::Options>(
YAML::detail::node **a1,
long long a2)
{
YAML::Mark *exception; // [rsp+8h] [rbp-70h]
int v3[17]; // [rsp+18h] [rbp-60h] BYREF
int v4[2]; // [rsp+68h] [rbp-10h]
int v5[2]; // [rsp+70h] [rbp-8h]
*(_QWORD *)v5 = a1;
*(_QWORD *)v4 = a2;
if ( (*(_BYTE *)a1 & 1) == 0 )
{
exception = (YAML::Mark *)__cxa_allocate_exception(0x40uLL);
YAML::InvalidNode::InvalidNode(exception, (long long)(a1 + 1));
__cxa_throw(exception, (struct type_info *)&`typeinfo for'YAML::InvalidNode, YAML::InvalidNode::~InvalidNode);
}
YAML::convert<aimrt::runtime::core::logger::LoggerManager::Options>::encode(v3, *(_QWORD *)v4);
YAML::Node::AssignData(a1, (YAML::detail::node **)v3);
YAML::Node::~Node((YAML::Node *)v3);
}
| |||
5,931 | void YAML::Node::Assign<aimrt::runtime::core::logger::LoggerManager::Options>(aimrt::runtime::core::logger::LoggerManager::Options const&) | aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/impl.h | inline void Node::Assign(const T& rhs) {
if (!m_isValid)
throw InvalidNode(m_invalidKey);
AssignData(convert<T>::encode(rhs));
} | O3 | c | void YAML::Node::Assign<aimrt::runtime::core::logger::LoggerManager::Options>(aimrt::runtime::core::logger::LoggerManager::Options const&):
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x69ae1
leaq 0x8(%rsp), %rdi
callq 0x69b36
movq %rbx, %rdi
callq 0x35db4
leaq 0x8(%rsp), %rdi
callq 0x35db4
movq 0x38(%rbx), %rdi
movq 0x40(%rsp), %rsi
callq 0x39a12
movq 0x28(%rbx), %rdi
movq 0x30(%rsp), %rsi
callq 0x808ec
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x69abe
callq 0x1ed80
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x69ad9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1f250
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movl $0x40, %edi
callq 0x1e7e0
movq %rax, %r14
addq $0x8, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x24096
leaq 0x45cd4(%rip), %rsi # 0xaf7d8
leaq 0x16c79(%rip), %rdx # 0x80784
movq %r14, %rdi
callq 0x1fec0
movq %rax, %rbx
movq %r14, %rdi
callq 0x1ebc0
jmp 0x69b2d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x23de8
movq %rbx, %rdi
callq 0x1ffd0
nop
| _ZN4YAML4Node6AssignIN5aimrt7runtime4core6plugin13PluginManager7OptionsEEEvRKT_:
push r14
push rbx
sub rsp, 48h
mov rbx, rdi
cmp byte ptr [rdi], 0
jz short loc_69AE1
lea rdi, [rsp+58h+var_50]
call _ZN4YAML7convertIN5aimrt7runtime4core6plugin13PluginManager7OptionsEE6encodeERKS6_; YAML::convert<aimrt::runtime::core::plugin::PluginManager::Options>::encode(aimrt::runtime::core::plugin::PluginManager::Options const&)
mov rdi, rbx; this
call _ZNK4YAML4Node16EnsureNodeExistsEv; YAML::Node::EnsureNodeExists(void)
lea rdi, [rsp+58h+var_50]; this
call _ZNK4YAML4Node16EnsureNodeExistsEv; YAML::Node::EnsureNodeExists(void)
mov rdi, [rbx+38h]; this
mov rsi, [rsp+58h+var_18]; YAML::detail::node *
call _ZN4YAML6detail4node8set_dataERKS1_; YAML::detail::node::set_data(YAML::detail::node const&)
mov rdi, [rbx+28h]
mov rsi, [rsp+58h+var_28]
call _ZN4YAML6detail13memory_holder5mergeERS1_; YAML::detail::memory_holder::merge(YAML::detail::memory_holder&)
mov rdi, [rsp+58h+var_20]
test rdi, rdi
jz short loc_69ABE
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_69ABE:
lea rax, [rsp+58h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_69AD9
mov rsi, [rsp+58h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_69AD9:
add rsp, 48h
pop rbx
pop r14
retn
loc_69AE1:
mov edi, 40h ; '@'; thrown_size
call ___cxa_allocate_exception
mov r14, rax
add rbx, 8
mov rdi, rax
mov rsi, rbx
call _ZN4YAML11InvalidNodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; YAML::InvalidNode::InvalidNode(std::string const&)
lea rsi, _ZTIN4YAML11InvalidNodeE; lptinfo
lea rdx, _ZN4YAML9ExceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_69B2D
mov rbx, rax
lea rdi, [rsp+58h+var_50]; this
call _ZN4YAML4NodeD2Ev; YAML::Node::~Node()
loc_69B2D:
mov rdi, rbx
call __Unwind_Resume
| void YAML::Node::Assign<aimrt::runtime::core::plugin::PluginManager::Options>(YAML::Node *this)
{
void *exception; // r14
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
YAML::detail::memory **v6; // [rsp+8h] [rbp-50h] BYREF
_QWORD *v7; // [rsp+10h] [rbp-48h]
_QWORD v8[3]; // [rsp+20h] [rbp-38h] BYREF
long long v9; // [rsp+38h] [rbp-20h]
YAML::detail::node *v10; // [rsp+40h] [rbp-18h]
if ( !*(_BYTE *)this )
{
exception = __cxa_allocate_exception(0x40uLL);
YAML::InvalidNode::InvalidNode((_DWORD)exception, (_DWORD)this + 8, v2, v3, v4, v5);
__cxa_throw(exception, (struct type_info *)&`typeinfo for'YAML::InvalidNode, YAML::Exception::~Exception);
}
YAML::convert<aimrt::runtime::core::plugin::PluginManager::Options>::encode(&v6);
YAML::Node::EnsureNodeExists((YAML::detail::memory ***)this);
YAML::Node::EnsureNodeExists(&v6);
YAML::detail::node::set_data(*((YAML::detail::node **)this + 7), v10);
YAML::detail::memory_holder::merge(*((_QWORD *)this + 5), v8[2]);
if ( v9 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9);
if ( v7 != v8 )
operator delete(v7, v8[0] + 1LL);
}
| Assign<aimrt::runtime::core::plugin::PluginManager::Options>:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
CMP byte ptr [RDI],0x0
JZ 0x00169ae1
LEA RDI,[RSP + 0x8]
CALL 0x00169b36
LAB_00169a81:
MOV RDI,RBX
CALL 0x00135db4
LEA RDI,[RSP + 0x8]
CALL 0x00135db4
MOV RDI,qword ptr [RBX + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00139a12
MOV RDI,qword ptr [RBX + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x001808ec
LAB_00169aaf:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x00169abe
CALL 0x0011ed80
LAB_00169abe:
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00169ad9
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0011f250
LAB_00169ad9:
ADD RSP,0x48
POP RBX
POP R14
RET
LAB_00169ae1:
MOV EDI,0x40
CALL 0x0011e7e0
MOV R14,RAX
ADD RBX,0x8
LAB_00169af2:
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00124096
LAB_00169afd:
LEA RSI,[0x1af7d8]
LEA RDX,[0x180784]
MOV RDI,R14
CALL 0x0011fec0
|
/* void
YAML::Node::Assign<aimrt::runtime::core::plugin::PluginManager::Options>(aimrt::runtime::core::plugin::PluginManager::Options
const&) */
void __thiscall
YAML::Node::Assign<aimrt::runtime::core::plugin::PluginManager::Options>
(Node *this,Options *param_1)
{
InvalidNode *this_00;
convert<aimrt::runtime::core::plugin::PluginManager::Options> local_50 [8];
long *local_48;
long local_38 [2];
memory_holder *local_28;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20;
node *local_18;
if (*this != (Node)0x0) {
convert<aimrt::runtime::core::plugin::PluginManager::Options>::encode(local_50,param_1);
/* try { // try from 00169a81 to 00169aae has its CatchHandler @ 00169b20 */
EnsureNodeExists(this);
EnsureNodeExists((Node *)local_50);
detail::node::set_data(*(node **)(this + 0x38),local_18);
detail::memory_holder::merge(*(memory_holder **)(this + 0x28),local_28);
if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20);
}
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
return;
}
this_00 = (InvalidNode *)__cxa_allocate_exception(0x40);
/* try { // try from 00169af2 to 00169afc has its CatchHandler @ 00169b13 */
InvalidNode::InvalidNode(this_00,(string *)(this + 8));
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,&InvalidNode::typeinfo,BadInsert::~BadInsert);
}
|
|
5,932 | normalize_dirname | eloqsql/mysys/mf_pack.c | size_t normalize_dirname(char *to, const char *from)
{
size_t length;
char buff[FN_REFLEN + 1];
DBUG_ENTER("normalize_dirname");
/*
Despite the name, this actually converts the name to the system's
format (TODO: name this properly).
*/
(void) intern_filename(buff, from);
length= strlen(buff); /* Fix that '/' is last */
if (length &&
#ifdef FN_DEVCHAR
buff[length - 1] != FN_DEVCHAR &&
#endif
buff[length - 1] != FN_LIBCHAR && buff[length - 1] != '/')
{
/* we need reserve 2 bytes for the trailing slash and the zero */
if (length >= sizeof (buff) - 1)
length= sizeof (buff) - 2;
buff[length]= FN_LIBCHAR;
buff[length + 1]= '\0';
}
length=cleanup_dirname(to, buff);
DBUG_RETURN(length);
} | O3 | c | normalize_dirname:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x210, %rsp # imm = 0x210
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq -0x220(%rbp), %r14
movq %r14, %rdi
callq 0x5c969
movq %r14, %rdi
callq 0x363e0
testq %rax, %rax
je 0x5ccbf
cmpb $0x2f, -0x1(%rax,%r14)
je 0x5ccbf
movl $0x1ff, %ecx # imm = 0x1FF
cmpq %rcx, %rax
cmovbq %rax, %rcx
movw $0x2f, -0x220(%rbp,%rcx)
leaq -0x220(%rbp), %rsi
movq %rbx, %rdi
callq 0x5c9ff
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x5cce9
addq $0x210, %rsp # imm = 0x210
popq %rbx
popq %r14
popq %rbp
retq
callq 0x36290
| normalize_dirname:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 210h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea r14, [rbp+var_220]
mov rdi, r14
call intern_filename
mov rdi, r14
call _strlen
test rax, rax
jz short loc_5CCBF
cmp byte ptr [rax+r14-1], 2Fh ; '/'
jz short loc_5CCBF
mov ecx, 1FFh
cmp rax, rcx
cmovb rcx, rax
mov [rbp+rcx+var_220], 2Fh ; '/'
loc_5CCBF:
lea rsi, [rbp+var_220]
mov rdi, rbx
call cleanup_dirname
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_5CCE9
add rsp, 210h
pop rbx
pop r14
pop rbp
retn
loc_5CCE9:
call ___stack_chk_fail
| long long normalize_dirname(long long a1, _BYTE *a2)
{
unsigned long long v2; // rax
long long v3; // rcx
unsigned __int8 v5[520]; // [rsp+0h] [rbp-220h] BYREF
unsigned long long v6; // [rsp+208h] [rbp-18h]
v6 = __readfsqword(0x28u);
intern_filename((long long)v5, a2);
v2 = strlen(v5);
if ( v2 && v5[v2 - 1] != 47 )
{
v3 = 511LL;
if ( v2 < 0x1FF )
v3 = v2;
*(_WORD *)&v5[v3] = 47;
}
return cleanup_dirname(a1, v5);
}
| normalize_dirname:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x210
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA R14,[RBP + -0x220]
MOV RDI,R14
CALL 0x0015c969
MOV RDI,R14
CALL 0x001363e0
TEST RAX,RAX
JZ 0x0015ccbf
CMP byte ptr [RAX + R14*0x1 + -0x1],0x2f
JZ 0x0015ccbf
MOV ECX,0x1ff
CMP RAX,RCX
CMOVC RCX,RAX
MOV word ptr [RBP + RCX*0x1 + -0x220],0x2f
LAB_0015ccbf:
LEA RSI,[RBP + -0x220]
MOV RDI,RBX
CALL 0x0015c9ff
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x0015cce9
ADD RSP,0x210
POP RBX
POP R14
POP RBP
RET
LAB_0015cce9:
CALL 0x00136290
|
void normalize_dirname(int8 param_1)
{
size_t sVar1;
size_t sVar2;
long in_FS_OFFSET;
int8 uStack_230;
char local_228 [520];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
uStack_230 = (code *)0x15cc94;
intern_filename(local_228);
uStack_230 = (code *)0x15cc9c;
sVar1 = strlen(local_228);
if ((sVar1 != 0) && (local_228[sVar1 - 1] != '/')) {
sVar2 = 0x1ff;
if (sVar1 < 0x1ff) {
sVar2 = sVar1;
}
(local_228 + sVar2)[0] = '/';
(local_228 + sVar2)[1] = '\0';
}
uStack_230 = (code *)0x15ccce;
cleanup_dirname(param_1,local_228);
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return;
}
/* WARNING: Subroutine does not return */
uStack_230 = unpack_dirname;
__stack_chk_fail();
}
|
|
5,933 | maria_rtree_get_first | eloqsql/storage/maria/ma_rt_index.c | int maria_rtree_get_first(MARIA_HA *info, uint keynr, uint key_length)
{
my_off_t root;
MARIA_KEYDEF *keyinfo= info->s->keyinfo + keynr;
if ((root= info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
info->maria_rtree_recursion_depth= -1;
info->keyread_buff_used= 1;
return maria_rtree_get_req(info, keyinfo, key_length, root, 0);
} | O3 | c | maria_rtree_get_first:
movq (%rdi), %rax
movl %esi, %ecx
movq 0x118(%rax), %rdx
movq (%rdx,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x6ac7f
imulq $0x118, %rcx, %rsi # imm = 0x118
addq 0x570(%rax), %rsi
movl $0xffffffff, 0x6f0(%rdi) # imm = 0xFFFFFFFF
movb $0x1, 0x685(%rdi)
xorl %ecx, %ecx
jmp 0x6ac95
pushq %rbp
movq %rsp, %rbp
callq 0xa13e6
movl $0x89, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbp
retq
| maria_rtree_get_first:
mov rax, [rdi]
mov ecx, esi
mov rdx, [rax+118h]
mov rdx, [rdx+rcx*8]
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_6AC7F
imul rsi, rcx, 118h
add rsi, [rax+570h]
mov dword ptr [rdi+6F0h], 0FFFFFFFFh
mov byte ptr [rdi+685h], 1
xor ecx, ecx
jmp short maria_rtree_get_req
loc_6AC7F:
push rbp
mov rbp, rsp
call _my_thread_var
mov dword ptr [rax], 89h
mov eax, 0FFFFFFFFh
pop rbp
retn
| long long maria_rtree_get_first(long long a1, unsigned int a2)
{
long long v2; // rdx
long long v3; // rsi
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 280LL) + 8LL * a2);
if ( v2 == -1 )
{
*(_DWORD *)my_thread_var(a1) = 137;
return 0xFFFFFFFFLL;
}
else
{
v3 = *(_QWORD *)(*(_QWORD *)a1 + 1392LL) + 280LL * a2;
*(_DWORD *)(a1 + 1776) = -1;
*(_BYTE *)(a1 + 1669) = 1;
return maria_rtree_get_req(a1, v3, v2, 0LL);
}
}
| maria_rtree_get_first:
MOV RAX,qword ptr [RDI]
MOV ECX,ESI
MOV RDX,qword ptr [RAX + 0x118]
MOV RDX,qword ptr [RDX + RCX*0x8]
CMP RDX,-0x1
JZ 0x0016ac7f
IMUL RSI,RCX,0x118
ADD RSI,qword ptr [RAX + 0x570]
MOV dword ptr [RDI + 0x6f0],0xffffffff
MOV byte ptr [RDI + 0x685],0x1
XOR ECX,ECX
JMP 0x0016ac95
LAB_0016ac7f:
PUSH RBP
MOV RBP,RSP
CALL 0x001a13e6
MOV dword ptr [RAX],0x89
MOV EAX,0xffffffff
POP RBP
RET
|
int8 maria_rtree_get_first(long *param_1,ulong param_2)
{
long lVar1;
long lVar2;
int8 uVar3;
int4 *puVar4;
lVar1 = *(long *)(*(long *)(*param_1 + 0x118) + (param_2 & 0xffffffff) * 8);
if (lVar1 != -1) {
lVar2 = *(long *)(*param_1 + 0x570);
*(int4 *)(param_1 + 0xde) = 0xffffffff;
*(int1 *)((long)param_1 + 0x685) = 1;
uVar3 = maria_rtree_get_req(param_1,(param_2 & 0xffffffff) * 0x118 + lVar2,lVar1,0);
return uVar3;
}
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x89;
return 0xffffffff;
}
|
|
5,934 | google::protobuf::internal::(anonymous namespace)::Register(google::protobuf::internal::ExtensionInfo const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc | void Register(const ExtensionInfo& info) {
static auto local_static_registry = OnShutdownDelete(new ExtensionRegistry);
global_registry = local_static_registry;
if (!InsertIfNotPresent(local_static_registry, info)) {
GOOGLE_LOG(FATAL) << "Multiple extension registrations for type \""
<< info.message->GetTypeName() << "\", field number "
<< info.number << ".";
}
} | O3 | cpp | google::protobuf::internal::(anonymous namespace)::Register(google::protobuf::internal::ExtensionInfo const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r15
movb 0x162348(%rip), %al # 0x214f00
testb %al, %al
je 0xb2e4c
movq 0x162331(%rip), %rbp # 0x214ef8
movq %rbp, 0x162322(%rip) # 0x214ef0
movq (%r15), %rsi
movslq 0x8(%r15), %rdi
movq %rdi, %r14
xorq %rsi, %r14
movq (%rbp), %rcx
movq 0x8(%rbp), %r8
movq %r14, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %r12
movq (%rcx,%rdx,8), %rax
testq %rax, %rax
je 0xb2c2c
movq (%rax), %r9
movq 0x38(%r9), %rcx
cmpq %r14, %rcx
jne 0xb2c13
cmpq %rsi, 0x8(%r9)
jne 0xb2c13
cmpl %edi, 0x10(%r9)
je 0xb2d97
movq (%r9), %r9
testq %r9, %r9
je 0xb2c2c
movq 0x38(%r9), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r8
cmpq %r12, %rdx
je 0xb2bfe
movl $0x40, %edi
callq 0x2d270
movq %rax, %rbx
movq $0x0, (%rax)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm0, 0x8(%rax)
movups %xmm1, 0x18(%rax)
movups %xmm2, 0x28(%rax)
leaq 0x20(%rbp), %rdi
movq 0x28(%rbp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rbp), %rsi
movq 0x18(%rbp), %rdx
movl $0x1, %ecx
callq 0x2d830
testb $0x1, %al
je 0xb2d3a
movq %rdx, %r13
cmpq $0x1, %rdx
je 0xb2e3b
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2d1f0
movq %rax, %r15
leaq (,%r13,8), %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2c970
movq 0x10(%rbp), %rsi
movq $0x0, 0x10(%rbp)
testq %rsi, %rsi
je 0xb2d13
leaq 0x10(%rbp), %rcx
xorl %r8d, %r8d
movq (%rsi), %rdi
movq 0x38(%rsi), %rax
xorl %edx, %edx
divq %r13
movq (%r15,%rdx,8), %rax
testq %rax, %rax
je 0xb2cee
movq (%rax), %rax
movq %rax, (%rsi)
movq (%r15,%rdx,8), %rax
movq %r8, %rdx
jmp 0xb2d05
movq (%rcx), %rax
movq %rax, (%rsi)
movq %rsi, (%rcx)
movq %rcx, (%r15,%rdx,8)
cmpq $0x0, (%rsi)
je 0xb2d08
leaq (%r15,%r8,8), %rax
movq %rsi, (%rax)
movq %rdi, %rsi
movq %rdx, %r8
testq %rdi, %rdi
jne 0xb2cca
movq (%rbp), %rdi
leaq 0x30(%rbp), %rax
cmpq %rdi, %rax
je 0xb2d25
callq 0x2d160
movq %r13, 0x8(%rbp)
movq %r15, (%rbp)
movq %r14, %rax
xorl %edx, %edx
divq %r13
movq %rdx, %r12
jmp 0xb2d3e
movq (%rbp), %r15
movq %r14, 0x38(%rbx)
movq (%r15,%r12,8), %rax
testq %rax, %rax
je 0xb2d5a
movq (%rax), %rax
movq %rax, (%rbx)
movq (%r15,%r12,8), %rax
movq %rbx, (%rax)
jmp 0xb2d84
leaq 0x10(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rax, (%rbx)
movq %rbx, 0x10(%rbp)
testq %rax, %rax
je 0xb2d80
movq 0x38(%rax), %rax
xorl %edx, %edx
divq 0x8(%rbp)
movq %rbx, (%r15,%rdx,8)
movq (%rbp), %r15
movq %rcx, (%r15,%r12,8)
incq 0x18(%rbp)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb82ce(%rip), %rdx # 0x16b06c
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0x3, %esi
movl $0x64, %ecx
callq 0x857c2
leaq 0xb8569(%rip), %rsi # 0x16b325
movq %rbx, %rdi
callq 0x852c0
movq %rax, %rbx
movq (%r15), %rsi
movq (%rsi), %rax
leaq 0x10(%rsp), %rdi
callq *0x10(%rax)
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x852d2
leaq 0xb8568(%rip), %rsi # 0x16b351
movq %rax, %rdi
callq 0x852c0
movl 0x8(%r15), %esi
movq %rax, %rdi
callq 0x855e8
leaq 0xb9620(%rip), %rsi # 0x16c424
movq %rax, %rdi
callq 0x852c0
leaq 0x7(%rsp), %rdi
movq %rax, %rsi
callq 0x8539a
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb2e2c
callq 0x2d160
leaq 0x30(%rsp), %rdi
callq 0x857e0
jmp 0xb2d88
leaq 0x30(%rbp), %r15
movq $0x0, 0x30(%rbp)
jmp 0xb2cb2
leaq 0x1620ad(%rip), %rdi # 0x214f00
callq 0x2e2e0
testl %eax, %eax
je 0xb2bc0
movl $0x38, %edi
callq 0x2d270
movq %rax, %rbx
addq $0x30, %rax
movq %rax, (%rbx)
movq $0x1, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movl $0x3f800000, 0x20(%rbx) # imm = 0x3F800000
movups %xmm0, 0x28(%rbx)
leaq 0x70bd(%rip), %rdi # 0xb9f52
movq %rbx, %rsi
callq 0x7c499
movq %rbx, 0x162054(%rip) # 0x214ef8
leaq 0x162055(%rip), %rdi # 0x214f00
callq 0x2cb40
jmp 0xb2bc0
movq %rax, %r14
leaq 0x162041(%rip), %rdi # 0x214f00
callq 0x2cb10
jmp 0xb2f24
jmp 0xb2ef7
jmp 0xb2eca
movq %rax, %r14
jmp 0xb2f0d
movq %rax, %rdi
callq 0x2c650
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rbp)
callq 0x2db40
movq %rax, %r14
callq 0x2dfe0
jmp 0xb2f1c
movq %rax, %rdi
callq 0x33bfc
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb2f0d
callq 0x2d160
leaq 0x30(%rsp), %rdi
callq 0x857e0
jmp 0xb2f24
movq %rax, %r14
movq %rbx, %rdi
callq 0x2d160
movq %r14, %rdi
callq 0x2e220
| _ZN6google8protobuf8internal12_GLOBAL__N_18RegisterERKNS1_13ExtensionInfoE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r15, rdi
mov al, cs:_ZGVZN6google8protobuf8internal12_GLOBAL__N_18RegisterERKNS1_13ExtensionInfoEE21local_static_registry; `guard variable for'google::protobuf::internal::`anonymous namespace'::Register(google::protobuf::internal::ExtensionInfo const&)::local_static_registry
test al, al
jz loc_B2E4C
loc_B2BC0:
mov rbp, cs:_ZZN6google8protobuf8internal12_GLOBAL__N_18RegisterERKNS1_13ExtensionInfoEE21local_static_registry; google::protobuf::internal::`anonymous namespace'::Register(google::protobuf::internal::ExtensionInfo const&)::local_static_registry
mov cs:_ZN6google8protobuf8internal12_GLOBAL__N_115global_registryE, rbp; google::protobuf::internal::`anonymous namespace'::global_registry
mov rsi, [r15]
movsxd rdi, dword ptr [r15+8]
mov r14, rdi
xor r14, rsi
mov rcx, [rbp+0]
mov r8, [rbp+8]
mov rax, r14
xor edx, edx
div r8
mov r12, rdx
mov rax, [rcx+rdx*8]
test rax, rax
jz short loc_B2C2C
mov r9, [rax]
mov rcx, [r9+38h]
loc_B2BFE:
cmp rcx, r14
jnz short loc_B2C13
cmp [r9+8], rsi
jnz short loc_B2C13
cmp [r9+10h], edi
jz loc_B2D97
loc_B2C13:
mov r9, [r9]
test r9, r9
jz short loc_B2C2C
mov rcx, [r9+38h]
mov rax, rcx
xor edx, edx
div r8
cmp rdx, r12
jz short loc_B2BFE
loc_B2C2C:
mov edi, 40h ; '@'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov qword ptr [rax], 0
movups xmm0, xmmword ptr [r15]
movups xmm1, xmmword ptr [r15+10h]
movups xmm2, xmmword ptr [r15+20h]
movups xmmword ptr [rax+8], xmm0
movups xmmword ptr [rax+18h], xmm1
movups xmmword ptr [rax+28h], xmm2
lea rdi, [rbp+20h]; this
mov rax, [rbp+28h]
mov [rsp+98h+var_90], rax
mov rsi, [rbp+8]; unsigned __int64
mov rdx, [rbp+18h]; unsigned __int64
mov ecx, 1; unsigned __int64
call __ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEmmm; std::__detail::_Prime_rehash_policy::_M_need_rehash(ulong,ulong,ulong)
test al, 1
jz loc_B2D3A
mov r13, rdx
cmp rdx, 1
jz loc_B2E3B
lea rdi, [rsp+98h+var_68]
mov rsi, r13
xor edx, edx
call __ZN9__gnu_cxx13new_allocatorIPNSt8__detail15_Hash_node_baseEE8allocateEmPKv; __gnu_cxx::new_allocator<std::__detail::_Hash_node_base *>::allocate(ulong,void const*)
mov r15, rax
lea rdx, ds:0[r13*8]
mov rdi, rax
xor esi, esi
call _memset
loc_B2CB2:
mov rsi, [rbp+10h]
mov qword ptr [rbp+10h], 0
test rsi, rsi
jz short loc_B2D13
lea rcx, [rbp+10h]
xor r8d, r8d
loc_B2CCA:
mov rdi, [rsi]
mov rax, [rsi+38h]
xor edx, edx
div r13
mov rax, [r15+rdx*8]
test rax, rax
jz short loc_B2CEE
mov rax, [rax]
mov [rsi], rax
mov rax, [r15+rdx*8]
mov rdx, r8
jmp short loc_B2D05
loc_B2CEE:
mov rax, [rcx]
mov [rsi], rax
mov [rcx], rsi
mov [r15+rdx*8], rcx
cmp qword ptr [rsi], 0
jz short loc_B2D08
lea rax, [r15+r8*8]
loc_B2D05:
mov [rax], rsi
loc_B2D08:
mov rsi, rdi
mov r8, rdx
test rdi, rdi
jnz short loc_B2CCA
loc_B2D13:
mov rdi, [rbp+0]; void *
lea rax, [rbp+30h]
cmp rax, rdi
jz short loc_B2D25
call __ZdlPv; operator delete(void *)
loc_B2D25:
mov [rbp+8], r13
mov [rbp+0], r15
mov rax, r14
xor edx, edx
div r13
mov r12, rdx
jmp short loc_B2D3E
loc_B2D3A:
mov r15, [rbp+0]
loc_B2D3E:
mov [rbx+38h], r14
mov rax, [r15+r12*8]
test rax, rax
jz short loc_B2D5A
mov rax, [rax]
mov [rbx], rax
mov rax, [r15+r12*8]
mov [rax], rbx
jmp short loc_B2D84
loc_B2D5A:
lea rcx, [rbp+10h]
mov rax, [rbp+10h]
mov [rbx], rax
mov [rbp+10h], rbx
test rax, rax
jz short loc_B2D80
mov rax, [rax+38h]
xor edx, edx
div qword ptr [rbp+8]
mov [r15+rdx*8], rbx
mov r15, [rbp+0]
loc_B2D80:
mov [r15+r12*8], rcx
loc_B2D84:
inc qword ptr [rbp+18h]
loc_B2D88:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B2D97:
lea rdx, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/aimrt_"...
lea rbx, [rsp+98h+var_68]
mov rdi, rbx
mov esi, 3
mov ecx, 64h ; 'd'
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aMultipleExtens; "Multiple extension registrations for ty"...
mov rdi, rbx
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov rbx, rax
mov rsi, [r15]
mov rax, [rsi]
lea rdi, [rsp+98h+var_88]
call qword ptr [rax+10h]
lea rsi, [rsp+98h+var_88]
mov rdi, rbx
call _ZN6google8protobuf8internal10LogMessagelsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::LogMessage::operator<<(std::string const&)
lea rsi, aFieldNumber; "\", field number "
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov esi, [r15+8]
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEi; google::protobuf::internal::LogMessage::operator<<(int)
lea rsi, aWhichIsNotDefi+77h; "."
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rdi, [rsp+98h+var_91]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rax, [rsp+98h+var_78]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B2E2C
call __ZdlPv; operator delete(void *)
loc_B2E2C:
lea rdi, [rsp+98h+var_68]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
jmp loc_B2D88
loc_B2E3B:
lea r15, [rbp+30h]
mov qword ptr [rbp+30h], 0
jmp loc_B2CB2
loc_B2E4C:
lea rdi, _ZGVZN6google8protobuf8internal12_GLOBAL__N_18RegisterERKNS1_13ExtensionInfoEE21local_static_registry; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_B2BC0
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
add rax, 30h ; '0'
mov [rbx], rax
mov qword ptr [rbx+8], 1
xorps xmm0, xmm0
movups xmmword ptr [rbx+10h], xmm0
mov dword ptr [rbx+20h], 3F800000h
movups xmmword ptr [rbx+28h], xmm0
lea rdi, _ZZN6google8protobuf8internal16OnShutdownDeleteISt13unordered_setINS1_13ExtensionInfoENS1_12_GLOBAL__N_115ExtensionHasherENS5_11ExtensionEqESaIS4_EEEEPT_SB_ENUlPKvE_8__invokeESD_; this
mov rsi, rbx; void (*)(const void *)
call _ZN6google8protobuf8internal13OnShutdownRunEPFvPKvES3_; google::protobuf::internal::OnShutdownRun(void (*)(void const*),void const*)
mov cs:_ZZN6google8protobuf8internal12_GLOBAL__N_18RegisterERKNS1_13ExtensionInfoEE21local_static_registry, rbx; google::protobuf::internal::`anonymous namespace'::Register(google::protobuf::internal::ExtensionInfo const&)::local_static_registry
lea rdi, _ZGVZN6google8protobuf8internal12_GLOBAL__N_18RegisterERKNS1_13ExtensionInfoEE21local_static_registry; __guard *
call ___cxa_guard_release
jmp loc_B2BC0
mov r14, rax
lea rdi, _ZGVZN6google8protobuf8internal12_GLOBAL__N_18RegisterERKNS1_13ExtensionInfoEE21local_static_registry; __guard *
call ___cxa_guard_abort
jmp short loc_B2F24
jmp short loc_B2EF7
jmp short $+2
loc_B2ECA:
mov r14, rax
jmp short loc_B2F0D
mov rdi, rax; void *
call ___cxa_begin_catch
mov rax, [rsp+98h+var_90]
mov [rbp+28h], rax
call ___cxa_rethrow
mov r14, rax
call ___cxa_end_catch
jmp short loc_B2F1C
mov rdi, rax
call __clang_call_terminate
loc_B2EF7:
mov r14, rax
lea rax, [rsp+98h+var_78]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B2F0D
call __ZdlPv; operator delete(void *)
loc_B2F0D:
lea rdi, [rsp+98h+var_68]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
jmp short loc_B2F24
mov r14, rax
loc_B2F1C:
mov rdi, rbx; void *
call __ZdlPv; operator delete(void *)
loc_B2F24:
mov rdi, r14
call __Unwind_Resume
| void google::protobuf::internal::`anonymous namespace'::Register(long long a1)
{
long long v2; // rbp
unsigned long long v3; // r14
unsigned long long v4; // r8
unsigned long long v5; // r12
long long *v6; // rax
long long *v7; // r9
unsigned long long v8; // rcx
long long v9; // rbx
__int128 v10; // xmm1
__int128 v11; // xmm2
unsigned long long v12; // rdx
unsigned long long v13; // r13
_QWORD *v14; // r15
_QWORD *v15; // rsi
_QWORD *v16; // rcx
unsigned long long v17; // r8
_QWORD *v18; // rdi
unsigned long long v19; // rdx
_QWORD *v20; // rax
_QWORD *v21; // rax
_QWORD *v22; // rax
long long v23; // rax
long long v24; // rbx
long long v25; // rax
long long v26; // rax
char *v27; // rdx
long long v28; // rax
google::protobuf::internal::LogMessage *v29; // rax
long long v30; // rbx
__int128 v31; // rdi
const void *v32; // rdx
char v33; // [rsp+7h] [rbp-91h] BYREF
long long v34; // [rsp+8h] [rbp-90h]
void *v35[2]; // [rsp+10h] [rbp-88h] BYREF
char v36; // [rsp+20h] [rbp-78h] BYREF
_BYTE v37[104]; // [rsp+30h] [rbp-68h] BYREF
if ( !(_BYTE)`guard variable for'google::protobuf::internal::`anonymous namespace'::Register(google::protobuf::internal::ExtensionInfo const&)::local_static_registry
&& __cxa_guard_acquire(&`guard variable for'google::protobuf::internal::`anonymous namespace'::Register(google::protobuf::internal::ExtensionInfo const&)::local_static_registry) )
{
v30 = operator new(0x38uLL);
*(_QWORD *)v30 = v30 + 48;
*(_QWORD *)(v30 + 8) = 1LL;
*(_OWORD *)(v30 + 16) = 0LL;
*(_DWORD *)(v30 + 32) = 1065353216;
*(_OWORD *)(v30 + 40) = 0LL;
*(_QWORD *)&v31 = google::protobuf::internal::OnShutdownDelete<std::unordered_set<google::protobuf::internal::ExtensionInfo,google::protobuf::internal::`anonymous namespace'::ExtensionHasher,google::protobuf::internal::`anonymous namespace'::ExtensionEq,std::allocator<google::protobuf::internal::ExtensionInfo>>>(std::unordered_set<google::protobuf::internal::ExtensionInfo,google::protobuf::internal::`anonymous namespace'::ExtensionHasher,google::protobuf::internal::`anonymous namespace'::ExtensionEq,std::allocator<google::protobuf::internal::ExtensionInfo>> *)::{lambda(void const*)#1}::__invoke;
*((_QWORD *)&v31 + 1) = v30;
google::protobuf::internal::OnShutdownRun(v31, v32);
google::protobuf::internal::`anonymous namespace'::Register(google::protobuf::internal::ExtensionInfo const&)::local_static_registry = v30;
__cxa_guard_release(&`guard variable for'google::protobuf::internal::`anonymous namespace'::Register(google::protobuf::internal::ExtensionInfo const&)::local_static_registry);
}
v2 = google::protobuf::internal::`anonymous namespace'::Register(google::protobuf::internal::ExtensionInfo const&)::local_static_registry;
google::protobuf::internal::`anonymous namespace'::global_registry = google::protobuf::internal::`anonymous namespace'::Register(google::protobuf::internal::ExtensionInfo const&)::local_static_registry;
v3 = *(_QWORD *)a1 ^ *(int *)(a1 + 8);
v4 = *(_QWORD *)(google::protobuf::internal::`anonymous namespace'::Register(google::protobuf::internal::ExtensionInfo const&)::local_static_registry
+ 8);
v5 = v3 % v4;
v6 = *(long long **)(*(_QWORD *)google::protobuf::internal::`anonymous namespace'::Register(google::protobuf::internal::ExtensionInfo const&)::local_static_registry
+ 8 * (v3 % v4));
if ( !v6 )
{
LABEL_9:
v9 = operator new(0x40uLL);
*(_QWORD *)v9 = 0LL;
v10 = *(_OWORD *)(a1 + 16);
v11 = *(_OWORD *)(a1 + 32);
*(_OWORD *)(v9 + 8) = *(_OWORD *)a1;
*(_OWORD *)(v9 + 24) = v10;
*(_OWORD *)(v9 + 40) = v11;
v34 = *(_QWORD *)(v2 + 40);
if ( (std::__detail::_Prime_rehash_policy::_M_need_rehash(
(std::__detail::_Prime_rehash_policy *)(v2 + 32),
*(_QWORD *)(v2 + 8),
*(_QWORD *)(v2 + 24),
1uLL) & 1) != 0 )
{
v13 = v12;
if ( v12 == 1 )
{
v14 = (_QWORD *)(v2 + 48);
*(_QWORD *)(v2 + 48) = 0LL;
}
else
{
v14 = (_QWORD *)__gnu_cxx::new_allocator<std::__detail::_Hash_node_base *>::allocate(v37, v12, 0LL);
memset(v14, 0LL, 8 * v13);
}
v15 = *(_QWORD **)(v2 + 16);
*(_QWORD *)(v2 + 16) = 0LL;
if ( v15 )
{
v16 = (_QWORD *)(v2 + 16);
v17 = 0LL;
while ( 1 )
{
v18 = (_QWORD *)*v15;
v19 = v15[7] % v13;
v20 = (_QWORD *)v14[v19];
if ( v20 )
break;
*v15 = *v16;
*v16 = v15;
v14[v19] = v16;
if ( *v15 )
{
v21 = &v14[v17];
goto LABEL_18;
}
LABEL_19:
v15 = v18;
v17 = v19;
if ( !v18 )
goto LABEL_20;
}
*v15 = *v20;
v21 = (_QWORD *)v14[v19];
v19 = v17;
LABEL_18:
*v21 = v15;
goto LABEL_19;
}
LABEL_20:
if ( v2 + 48 != *(_QWORD *)v2 )
operator delete(*(void **)v2);
*(_QWORD *)(v2 + 8) = v13;
*(_QWORD *)v2 = v14;
v5 = v3 % v13;
}
else
{
v14 = *(_QWORD **)v2;
}
*(_QWORD *)(v9 + 56) = v3;
v22 = (_QWORD *)v14[v5];
if ( v22 )
{
*(_QWORD *)v9 = *v22;
*(_QWORD *)v14[v5] = v9;
}
else
{
v23 = *(_QWORD *)(v2 + 16);
*(_QWORD *)v9 = v23;
*(_QWORD *)(v2 + 16) = v9;
if ( v23 )
{
v14[*(_QWORD *)(v23 + 56) % *(_QWORD *)(v2 + 8)] = v9;
v14 = *(_QWORD **)v2;
}
v14[v5] = v2 + 16;
}
++*(_QWORD *)(v2 + 24);
return;
}
v7 = (long long *)*v6;
v8 = *(_QWORD *)(*v6 + 56);
while ( v8 != v3 || v7[1] != *(_QWORD *)a1 || *((_DWORD *)v7 + 4) != *(_DWORD *)(a1 + 8) )
{
v7 = (long long *)*v7;
if ( v7 )
{
v8 = v7[7];
if ( v8 % v4 == v5 )
continue;
}
goto LABEL_9;
}
google::protobuf::internal::LogMessage::LogMessage(
(long long)v37,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc",
100);
v24 = google::protobuf::internal::LogMessage::operator<<(
(long long)v37,
(long long)"Multiple extension registrations for type \"");
(*(void ( **)(void **))(**(_QWORD **)a1 + 16LL))(v35);
v25 = google::protobuf::internal::LogMessage::operator<<(v24, v35);
v26 = google::protobuf::internal::LogMessage::operator<<(v25, (long long)"\", field number ");
v28 = google::protobuf::internal::LogMessage::operator<<(v26, *(_DWORD *)(a1 + 8), v27);
v29 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(v28, (long long)".");
google::protobuf::internal::LogFinisher::operator=((long long)&v33, v29);
if ( v35[0] != &v36 )
operator delete(v35[0]);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v37);
}
| Register:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R15,RDI
MOV AL,byte ptr [0x00314f00]
TEST AL,AL
JZ 0x001b2e4c
LAB_001b2bc0:
MOV RBP,qword ptr [0x00314ef8]
MOV qword ptr [0x00314ef0],RBP
MOV RSI,qword ptr [R15]
MOVSXD RDI,dword ptr [R15 + 0x8]
MOV R14,RDI
XOR R14,RSI
MOV RCX,qword ptr [RBP]
MOV R8,qword ptr [RBP + 0x8]
MOV RAX,R14
XOR EDX,EDX
DIV R8
MOV R12,RDX
MOV RAX,qword ptr [RCX + RDX*0x8]
TEST RAX,RAX
JZ 0x001b2c2c
MOV R9,qword ptr [RAX]
MOV RCX,qword ptr [R9 + 0x38]
LAB_001b2bfe:
CMP RCX,R14
JNZ 0x001b2c13
CMP qword ptr [R9 + 0x8],RSI
JNZ 0x001b2c13
CMP dword ptr [R9 + 0x10],EDI
JZ 0x001b2d97
LAB_001b2c13:
MOV R9,qword ptr [R9]
TEST R9,R9
JZ 0x001b2c2c
MOV RCX,qword ptr [R9 + 0x38]
MOV RAX,RCX
XOR EDX,EDX
DIV R8
CMP RDX,R12
JZ 0x001b2bfe
LAB_001b2c2c:
MOV EDI,0x40
CALL 0x0012d270
MOV RBX,RAX
MOV qword ptr [RAX],0x0
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS XMM1,xmmword ptr [R15 + 0x10]
MOVUPS XMM2,xmmword ptr [R15 + 0x20]
MOVUPS xmmword ptr [RAX + 0x8],XMM0
MOVUPS xmmword ptr [RAX + 0x18],XMM1
MOVUPS xmmword ptr [RAX + 0x28],XMM2
LEA RDI,[RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RBP + 0x8]
MOV RDX,qword ptr [RBP + 0x18]
LAB_001b2c6f:
MOV ECX,0x1
CALL 0x0012d830
TEST AL,0x1
JZ 0x001b2d3a
MOV R13,RDX
CMP RDX,0x1
JZ 0x001b2e3b
LAB_001b2c8e:
LEA RDI,[RSP + 0x30]
MOV RSI,R13
XOR EDX,EDX
CALL 0x0012d1f0
LAB_001b2c9d:
MOV R15,RAX
LEA RDX,[R13*0x8]
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0012c970
LAB_001b2cb2:
MOV RSI,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + 0x10],0x0
TEST RSI,RSI
JZ 0x001b2d13
LEA RCX,[RBP + 0x10]
XOR R8D,R8D
LAB_001b2cca:
MOV RDI,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x38]
XOR EDX,EDX
DIV R13
MOV RAX,qword ptr [R15 + RDX*0x8]
TEST RAX,RAX
JZ 0x001b2cee
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSI],RAX
MOV RAX,qword ptr [R15 + RDX*0x8]
MOV RDX,R8
JMP 0x001b2d05
LAB_001b2cee:
MOV RAX,qword ptr [RCX]
MOV qword ptr [RSI],RAX
MOV qword ptr [RCX],RSI
MOV qword ptr [R15 + RDX*0x8],RCX
CMP qword ptr [RSI],0x0
JZ 0x001b2d08
LEA RAX,[R15 + R8*0x8]
LAB_001b2d05:
MOV qword ptr [RAX],RSI
LAB_001b2d08:
MOV RSI,RDI
MOV R8,RDX
TEST RDI,RDI
JNZ 0x001b2cca
LAB_001b2d13:
MOV RDI,qword ptr [RBP]
LEA RAX,[RBP + 0x30]
CMP RAX,RDI
JZ 0x001b2d25
CALL 0x0012d160
LAB_001b2d25:
MOV qword ptr [RBP + 0x8],R13
MOV qword ptr [RBP],R15
MOV RAX,R14
XOR EDX,EDX
DIV R13
MOV R12,RDX
JMP 0x001b2d3e
LAB_001b2d3a:
MOV R15,qword ptr [RBP]
LAB_001b2d3e:
MOV qword ptr [RBX + 0x38],R14
MOV RAX,qword ptr [R15 + R12*0x8]
TEST RAX,RAX
JZ 0x001b2d5a
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [R15 + R12*0x8]
MOV qword ptr [RAX],RBX
JMP 0x001b2d84
LAB_001b2d5a:
LEA RCX,[RBP + 0x10]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBP + 0x10],RBX
TEST RAX,RAX
JZ 0x001b2d80
MOV RAX,qword ptr [RAX + 0x38]
XOR EDX,EDX
DIV qword ptr [RBP + 0x8]
MOV qword ptr [R15 + RDX*0x8],RBX
MOV R15,qword ptr [RBP]
LAB_001b2d80:
MOV qword ptr [R15 + R12*0x8],RCX
LAB_001b2d84:
INC qword ptr [RBP + 0x18]
LAB_001b2d88:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b2d97:
LEA RDX,[0x26b06c]
LEA RBX,[RSP + 0x30]
MOV RDI,RBX
MOV ESI,0x3
MOV ECX,0x64
CALL 0x001857c2
LAB_001b2db5:
LEA RSI,[0x26b325]
MOV RDI,RBX
CALL 0x001852c0
MOV RBX,RAX
MOV RSI,qword ptr [R15]
MOV RAX,qword ptr [RSI]
LAB_001b2dcd:
LEA RDI,[RSP + 0x10]
CALL qword ptr [RAX + 0x10]
LAB_001b2dd5:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x001852d2
LEA RSI,[0x26b351]
MOV RDI,RAX
CALL 0x001852c0
MOV ESI,dword ptr [R15 + 0x8]
MOV RDI,RAX
CALL 0x001855e8
LEA RSI,[0x26c424]
MOV RDI,RAX
CALL 0x001852c0
LAB_001b2e0c:
LEA RDI,[RSP + 0x7]
MOV RSI,RAX
CALL 0x0018539a
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001b2e2c
CALL 0x0012d160
LAB_001b2e2c:
LEA RDI,[RSP + 0x30]
CALL 0x001857e0
JMP 0x001b2d88
LAB_001b2e3b:
LEA R15,[RBP + 0x30]
MOV qword ptr [RBP + 0x30],0x0
JMP 0x001b2cb2
LAB_001b2e4c:
LEA RDI,[0x314f00]
CALL 0x0012e2e0
TEST EAX,EAX
JZ 0x001b2bc0
LAB_001b2e60:
MOV EDI,0x38
CALL 0x0012d270
MOV RBX,RAX
ADD RAX,0x30
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOV dword ptr [RBX + 0x20],0x3f800000
MOVUPS xmmword ptr [RBX + 0x28],XMM0
LEA RDI,[0x1b9f52]
MOV RSI,RBX
CALL 0x0017c499
LAB_001b2e9d:
MOV qword ptr [0x00314ef8],RBX
LEA RDI,[0x314f00]
CALL 0x0012cb40
JMP 0x001b2bc0
|
/* google::protobuf::internal::(anonymous
namespace)::Register(google::protobuf::internal::ExtensionInfo const&) */
int8 * google::protobuf::internal::(anonymous_namespace)::Register(ExtensionInfo *param_1)
{
long *plVar1;
ulong *puVar2;
long *plVar3;
int8 uVar4;
int8 uVar5;
int8 uVar6;
int8 uVar7;
int8 uVar8;
long *plVar9;
int iVar10;
int8 *puVar11;
long *plVar12;
long *plVar13;
int8 *puVar14;
LogMessage *pLVar15;
ulong uVar16;
void *pvVar17;
ulong uVar18;
long *plVar19;
ulong uVar20;
int1 auVar21 [16];
LogFinisher local_91;
long local_90;
int1 *local_88 [2];
int1 local_78 [16];
LogMessage local_68 [56];
if ((Register(google::protobuf::internal::ExtensionInfo_const&)::local_static_registry == '\0') &&
(iVar10 = __cxa_guard_acquire(&Register(google::protobuf::internal::ExtensionInfo_const&)::
local_static_registry), iVar10 != 0)) {
/* try { // try from 001b2e60 to 001b2e9c has its CatchHandler @ 001b2eb5 */
plVar12 = (long *)operator_new(0x38);
*plVar12 = (long)(plVar12 + 6);
plVar12[1] = 1;
plVar12[2] = 0;
plVar12[3] = 0;
*(int4 *)(plVar12 + 4) = 0x3f800000;
plVar12[5] = 0;
plVar12[6] = 0;
OnShutdownRun(OnShutdownDelete<std::unordered_set<google::protobuf::internal::ExtensionInfo,google::protobuf::internal::(anonymous_namespace)::ExtensionHasher,google::protobuf::internal::(anonymous_namespace)::ExtensionEq,std::allocator<google::protobuf::internal::ExtensionInfo>>>(std::unordered_set<google::protobuf::internal::ExtensionInfo,google::protobuf::internal::(anonymous_namespace)::ExtensionHasher,google::protobuf::internal::(anonymous_namespace)::ExtensionEq,std::allocator<google::protobuf::internal::ExtensionInfo>>*)
::{lambda(void_const*)#1}::__invoke,plVar12);
Register(google::protobuf::internal::ExtensionInfo_const&)::local_static_registry = plVar12;
__cxa_guard_release(&Register(google::protobuf::internal::ExtensionInfo_const&)::
local_static_registry);
}
plVar9 = Register(google::protobuf::internal::ExtensionInfo_const&)::local_static_registry;
global_registry =
Register(google::protobuf::internal::ExtensionInfo_const&)::local_static_registry;
uVar20 = (long)*(int *)(param_1 + 8) ^ *(ulong *)param_1;
uVar16 = uVar20 % (ulong)Register(google::protobuf::internal::ExtensionInfo_const&)::
local_static_registry[1];
plVar12 = *(long **)(*Register(google::protobuf::internal::ExtensionInfo_const&)::
local_static_registry + uVar16 * 8);
if (plVar12 != (long *)0x0) {
plVar12 = (long *)*plVar12;
uVar18 = plVar12[7];
do {
if (((uVar18 == uVar20) && (plVar12[1] == *(ulong *)param_1)) &&
((int)plVar12[2] == *(int *)(param_1 + 8))) {
LogMessage::LogMessage
(local_68,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc"
,100);
/* try { // try from 001b2db5 to 001b2dc3 has its CatchHandler @ 001b2eca */
pLVar15 = (LogMessage *)
LogMessage::operator<<(local_68,"Multiple extension registrations for type \"");
/* try { // try from 001b2dcd to 001b2dd4 has its CatchHandler @ 001b2ec8 */
(**(code **)(**(long **)param_1 + 0x10))(local_88);
/* try { // try from 001b2dd5 to 001b2e0b has its CatchHandler @ 001b2ef7 */
pLVar15 = (LogMessage *)LogMessage::operator<<(pLVar15,(string *)local_88);
pLVar15 = (LogMessage *)LogMessage::operator<<(pLVar15,"\", field number ");
pLVar15 = (LogMessage *)LogMessage::operator<<(pLVar15,*(int *)(param_1 + 8));
pLVar15 = (LogMessage *)LogMessage::operator<<(pLVar15,".");
/* try { // try from 001b2e0c to 001b2e18 has its CatchHandler @ 001b2ec6 */
LogFinisher::operator=(&local_91,pLVar15);
if (local_88[0] != local_78) {
operator_delete(local_88[0]);
}
puVar11 = (int8 *)LogMessage::~LogMessage(local_68);
return puVar11;
}
plVar12 = (long *)*plVar12;
} while ((plVar12 != (long *)0x0) &&
(uVar18 = plVar12[7],
uVar18 % (ulong)Register(google::protobuf::internal::ExtensionInfo_const&)::
local_static_registry[1] == uVar16));
}
puVar11 = (int8 *)operator_new(0x40);
*puVar11 = 0;
uVar4 = *(int8 *)(param_1 + 8);
uVar5 = *(int8 *)(param_1 + 0x10);
uVar6 = *(int8 *)(param_1 + 0x18);
uVar7 = *(int8 *)(param_1 + 0x20);
uVar8 = *(int8 *)(param_1 + 0x28);
puVar11[1] = *(int8 *)param_1;
puVar11[2] = uVar4;
puVar11[3] = uVar5;
puVar11[4] = uVar6;
puVar11[5] = uVar7;
puVar11[6] = uVar8;
local_90 = plVar9[5];
/* try { // try from 001b2c6f to 001b2c78 has its CatchHandler @ 001b2f19 */
auVar21 = std::__detail::_Prime_rehash_policy::_M_need_rehash
((ulong)(plVar9 + 4),plVar9[1],plVar9[3]);
pvVar17 = auVar21._8_8_;
if ((auVar21 & (int1 [16])0x1) == (int1 [16])0x0) {
plVar12 = (long *)*plVar9;
}
else {
if (pvVar17 == (void *)0x1) {
plVar12 = plVar9 + 6;
plVar9[6] = 0;
}
else {
/* try { // try from 001b2c8e to 001b2c9c has its CatchHandler @ 001b2ecf */
plVar12 = (long *)__gnu_cxx::new_allocator<std::__detail::_Hash_node_base*>::allocate
((ulong)local_68,pvVar17);
memset(plVar12,0,(long)pvVar17 * 8);
}
plVar19 = (long *)plVar9[2];
plVar9[2] = 0;
if (plVar19 != (long *)0x0) {
plVar1 = plVar9 + 2;
uVar16 = 0;
do {
plVar3 = (long *)*plVar19;
uVar18 = (ulong)plVar19[7] % (ulong)pvVar17;
if ((long *)plVar12[uVar18] == (long *)0x0) {
*plVar19 = *plVar1;
*plVar1 = (long)plVar19;
plVar12[uVar18] = (long)plVar1;
if (*plVar19 != 0) {
plVar13 = plVar12 + uVar16;
goto LAB_001b2d05;
}
}
else {
*plVar19 = *(long *)plVar12[uVar18];
plVar13 = (long *)plVar12[uVar18];
uVar18 = uVar16;
LAB_001b2d05:
*plVar13 = (long)plVar19;
}
plVar19 = plVar3;
uVar16 = uVar18;
} while (plVar3 != (long *)0x0);
}
if (plVar9 + 6 != (long *)*plVar9) {
operator_delete((long *)*plVar9);
}
plVar9[1] = (long)pvVar17;
*plVar9 = (long)plVar12;
uVar16 = uVar20 % (ulong)pvVar17;
}
puVar11[7] = uVar20;
if ((int8 *)plVar12[uVar16] == (int8 *)0x0) {
puVar14 = (int8 *)plVar9[2];
*puVar11 = puVar14;
plVar9[2] = (long)puVar11;
if (puVar14 != (int8 *)0x0) {
puVar2 = puVar14 + 7;
puVar14 = (int8 *)(*puVar2 / (ulong)plVar9[1]);
plVar12[*puVar2 % (ulong)plVar9[1]] = (long)puVar11;
plVar12 = (long *)*plVar9;
}
plVar12[uVar16] = (long)(plVar9 + 2);
}
else {
*puVar11 = *(int8 *)plVar12[uVar16];
puVar14 = (int8 *)plVar12[uVar16];
*puVar14 = puVar11;
}
plVar9[3] = plVar9[3] + 1;
return puVar14;
}
|
|
5,935 | sp_get_polygon_mbr | eloqsql/storage/maria/ma_sp_key.c | static int sp_get_polygon_mbr(uchar *(*wkb), uchar *end, uint n_dims,
uchar byte_order, double *mbr)
{
uint n_linear_rings;
uint n_points;
n_linear_rings = uint4korr((*wkb));
(*wkb) += 4;
for (; n_linear_rings > 0; --n_linear_rings)
{
n_points = uint4korr((*wkb));
(*wkb) += 4;
for (; n_points > 0; --n_points)
{
/* Add next point to mbr */
if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr))
return -1;
}
}
return 0;
} | O3 | c | sp_get_polygon_mbr:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
movl (%rcx), %eax
addq $0x4, %rcx
movq %rcx, (%rdi)
testl %eax, %eax
je 0x70c70
addq $-0x8, %rsi
movq (%rdi), %r8
movl (%r8), %ecx
addq $0x4, %r8
movq %r8, (%rdi)
testl %ecx, %ecx
je 0x70c6c
movb $0x1, %r8b
xorl %r9d, %r9d
movq (%rdi), %r10
cmpq %rsi, %r10
ja 0x70c74
movsd (%r10), %xmm0
addq $0x8, %r10
movq %r10, (%rdi)
movsd (%rdx,%r9), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x70c43
movsd %xmm0, (%rdx,%r9)
ucomisd 0x8(%rdx,%r9), %xmm0
jbe 0x70c56
orq $0x8, %r9
movsd %xmm0, (%rdx,%r9)
movl $0x10, %r9d
testb $0x1, %r8b
movl $0x0, %r8d
jne 0x70c1d
decl %ecx
jne 0x70c17
decl %eax
jne 0x70c06
xorl %eax, %eax
jmp 0x70c79
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbp
retq
nop
| sp_get_polygon_mbr:
push rbp
mov rbp, rsp
mov rcx, [rdi]
mov eax, [rcx]
add rcx, 4
mov [rdi], rcx
test eax, eax
jz short loc_70C70
add rsi, 0FFFFFFFFFFFFFFF8h
loc_70C06:
mov r8, [rdi]
mov ecx, [r8]
add r8, 4
mov [rdi], r8
test ecx, ecx
jz short loc_70C6C
loc_70C17:
mov r8b, 1
xor r9d, r9d
loc_70C1D:
mov r10, [rdi]
cmp r10, rsi
ja short loc_70C74
movsd xmm0, qword ptr [r10]
add r10, 8
mov [rdi], r10
movsd xmm1, qword ptr [rdx+r9]
ucomisd xmm1, xmm0
jbe short loc_70C43
movsd qword ptr [rdx+r9], xmm0
loc_70C43:
ucomisd xmm0, qword ptr [rdx+r9+8]
jbe short loc_70C56
or r9, 8
movsd qword ptr [rdx+r9], xmm0
loc_70C56:
mov r9d, 10h
test r8b, 1
mov r8d, 0
jnz short loc_70C1D
dec ecx
jnz short loc_70C17
loc_70C6C:
dec eax
jnz short loc_70C06
loc_70C70:
xor eax, eax
jmp short loc_70C79
loc_70C74:
mov eax, 0FFFFFFFFh
loc_70C79:
pop rbp
retn
| long long sp_get_polygon_mbr(double **a1, long long a2, long long a3)
{
int v3; // eax
unsigned long long v4; // rsi
int v5; // ecx
char v6; // r8
long long v7; // r9
double *v8; // r10
double v9; // xmm0_8
bool v10; // zf
v3 = *(_DWORD *)*a1;
*a1 = (double *)((char *)*a1 + 4);
if ( v3 )
{
v4 = a2 - 8;
do
{
v5 = *(_DWORD *)*a1;
*a1 = (double *)((char *)*a1 + 4);
if ( v5 )
{
while ( 2 )
{
v6 = 1;
v7 = 0LL;
do
{
v8 = *a1;
if ( (unsigned long long)*a1 > v4 )
return 0xFFFFFFFFLL;
v9 = *v8;
*a1 = v8 + 1;
if ( *(double *)(a3 + v7) > v9 )
*(double *)(a3 + v7) = v9;
if ( v9 > *(double *)(a3 + v7 + 8) )
*(double *)(a3 + (v7 | 8)) = v9;
v7 = 16LL;
v10 = (v6 & 1) == 0;
v6 = 0;
}
while ( !v10 );
if ( --v5 )
continue;
break;
}
}
--v3;
}
while ( v3 );
}
return 0LL;
}
| sp_get_polygon_mbr:
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RDI]
MOV EAX,dword ptr [RCX]
ADD RCX,0x4
MOV qword ptr [RDI],RCX
TEST EAX,EAX
JZ 0x00170c70
ADD RSI,-0x8
LAB_00170c06:
MOV R8,qword ptr [RDI]
MOV ECX,dword ptr [R8]
ADD R8,0x4
MOV qword ptr [RDI],R8
TEST ECX,ECX
JZ 0x00170c6c
LAB_00170c17:
MOV R8B,0x1
XOR R9D,R9D
LAB_00170c1d:
MOV R10,qword ptr [RDI]
CMP R10,RSI
JA 0x00170c74
MOVSD XMM0,qword ptr [R10]
ADD R10,0x8
MOV qword ptr [RDI],R10
MOVSD XMM1,qword ptr [RDX + R9*0x1]
UCOMISD XMM1,XMM0
JBE 0x00170c43
MOVSD qword ptr [RDX + R9*0x1],XMM0
LAB_00170c43:
UCOMISD XMM0,qword ptr [RDX + R9*0x1 + 0x8]
JBE 0x00170c56
OR R9,0x8
MOVSD qword ptr [RDX + R9*0x1],XMM0
LAB_00170c56:
MOV R9D,0x10
TEST R8B,0x1
MOV R8D,0x0
JNZ 0x00170c1d
DEC ECX
JNZ 0x00170c17
LAB_00170c6c:
DEC EAX
JNZ 0x00170c06
LAB_00170c70:
XOR EAX,EAX
JMP 0x00170c79
LAB_00170c74:
MOV EAX,0xffffffff
LAB_00170c79:
POP RBP
RET
|
int8 sp_get_polygon_mbr(int8 *param_1,long param_2,long param_3)
{
double dVar1;
double *pdVar2;
bool bVar3;
int iVar4;
int iVar5;
bool bVar6;
ulong uVar7;
iVar4 = *(int *)*param_1;
*param_1 = (int *)*param_1 + 1;
if (iVar4 != 0) {
do {
iVar5 = *(int *)*param_1;
*param_1 = (int *)*param_1 + 1;
for (; iVar5 != 0; iVar5 = iVar5 + -1) {
uVar7 = 0;
bVar3 = true;
do {
bVar6 = bVar3;
pdVar2 = (double *)*param_1;
if ((double *)(param_2 + -8) < pdVar2) {
return 0xffffffff;
}
dVar1 = *pdVar2;
*param_1 = pdVar2 + 1;
if (dVar1 < *(double *)(param_3 + uVar7)) {
*(double *)(param_3 + uVar7) = dVar1;
}
pdVar2 = (double *)(param_3 + 8 + uVar7);
if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) {
*(double *)(param_3 + (uVar7 | 8)) = dVar1;
}
uVar7 = 0x10;
bVar3 = false;
} while (bVar6);
}
iVar4 = iVar4 + -1;
} while (iVar4 != 0);
}
return 0;
}
|
|
5,936 | get_charset_number_internal | eloqsql/mysys/charset.c | static uint
get_charset_number_internal(const char *charset_name, uint cs_flags)
{
CHARSET_INFO **cs;
for (cs= all_charsets;
cs < all_charsets + array_elements(all_charsets);
cs++)
{
if ( cs[0] && cs[0]->cs_name.str && (cs[0]->state & cs_flags) &&
!my_strcasecmp(&my_charset_latin1, cs[0]->cs_name.str, charset_name))
return cs[0]->number;
}
return 0;
} | O3 | c | get_charset_number_internal:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq $-0x8, %r12
leaq 0xb6d993(%rip), %r13 # 0xc01600
leaq 0x31a2ac(%rip), %r15 # 0x3adf20
movq 0x8(%r13,%r12), %rax
testq %rax, %rax
je 0x93ca0
movq 0x10(%rax), %rsi
testq %rsi, %rsi
je 0x93ca0
testl %ebx, 0xc(%rax)
je 0x93ca0
movq 0xc0(%r15), %rax
movq %r15, %rdi
movq %r14, %rdx
callq *0x40(%rax)
testl %eax, %eax
je 0x93cbe
addq $0x8, %r12
cmpq $0x3ff8, %r12 # imm = 0x3FF8
jb 0x93c74
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r13,%r12), %rax
movl (%rax), %eax
jmp 0x93caf
| get_charset_number_internal:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
mov r12, 0FFFFFFFFFFFFFFF8h
lea r13, all_charsets
lea r15, my_charset_latin1
loc_93C74:
mov rax, [r13+r12+8]
test rax, rax
jz short loc_93CA0
mov rsi, [rax+10h]
test rsi, rsi
jz short loc_93CA0
test [rax+0Ch], ebx
jz short loc_93CA0
mov rax, [r15+0C0h]
mov rdi, r15
mov rdx, r14
call qword ptr [rax+40h]
test eax, eax
jz short loc_93CBE
loc_93CA0:
add r12, 8
cmp r12, 3FF8h
jb short loc_93C74
xor eax, eax
loc_93CAF:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_93CBE:
mov rax, [r13+r12+8]
mov eax, [rax]
jmp short loc_93CAF
| long long get_charset_number_internal(long long a1, int a2)
{
long long v3; // r12
long long v4; // rax
long long v5; // rsi
v3 = 0x1FFFFFFFFFFFFFFFLL;
while ( 1 )
{
v4 = all_charsets[v3 + 1];
if ( v4 )
{
v5 = *(_QWORD *)(v4 + 16);
if ( v5 )
{
if ( (a2 & *(_DWORD *)(v4 + 12)) != 0
&& !(*(unsigned int ( **)(void *, long long, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
v5,
a1) )
{
break;
}
}
}
if ( (unsigned long long)++v3 >= 2047 )
return 0LL;
}
return *(unsigned int *)all_charsets[v3 + 1];
}
| get_charset_number_internal:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
MOV R12,-0x8
LEA R13,[0xd01600]
LEA R15,[0x4adf20]
LAB_00193c74:
MOV RAX,qword ptr [R13 + R12*0x1 + 0x8]
TEST RAX,RAX
JZ 0x00193ca0
MOV RSI,qword ptr [RAX + 0x10]
TEST RSI,RSI
JZ 0x00193ca0
TEST dword ptr [RAX + 0xc],EBX
JZ 0x00193ca0
MOV RAX,qword ptr [R15 + 0xc0]
MOV RDI,R15
MOV RDX,R14
CALL qword ptr [RAX + 0x40]
TEST EAX,EAX
JZ 0x00193cbe
LAB_00193ca0:
ADD R12,0x8
CMP R12,0x3ff8
JC 0x00193c74
XOR EAX,EAX
LAB_00193caf:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00193cbe:
MOV RAX,qword ptr [R13 + R12*0x1 + 0x8]
MOV EAX,dword ptr [RAX]
JMP 0x00193caf
|
int4 get_charset_number_internal(int8 param_1,uint param_2)
{
long lVar1;
int iVar2;
ulong uVar3;
uVar3 = 0xfffffffffffffff8;
while ((((lVar1 = *(long *)((long)&DAT_00d01608 + uVar3), lVar1 == 0 ||
(*(long *)(lVar1 + 0x10) == 0)) || ((*(uint *)(lVar1 + 0xc) & param_2) == 0)) ||
(iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_004adfe0 + 0x40))
(&my_charset_latin1,*(long *)(lVar1 + 0x10),param_1), iVar2 != 0))) {
uVar3 = uVar3 + 8;
if (0x3ff7 < uVar3) {
return 0;
}
}
return **(int4 **)((long)&DAT_00d01608 + uVar3);
}
|
|
5,937 | xor_model::~xor_model() | magnetron/test/unittests/models/xor.cpp | explicit xor_model(context& ctx)
: l1{ctx, 2, 2}, l2{ctx, 2, 1} {
register_params(l1.params());
register_params(l2.params());
} | O3 | cpp | xor_model::~xor_model():
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x98(%rdi)
jne 0x1f0d6
leaq 0x90(%rbx), %rdi
movb $0x0, 0x98(%rbx)
callq 0x1e89c
cmpb $0x1, 0x88(%rbx)
jne 0x1f0f2
leaq 0x80(%rbx), %rdi
movb $0x0, 0x88(%rbx)
callq 0x1e89c
leaq 0x87547(%rip), %r14 # 0xa6640
movq %r14, 0x60(%rbx)
leaq 0x68(%rbx), %rdi
callq 0x1f5f0
cmpb $0x1, 0x58(%rbx)
jne 0x1f119
leaq 0x50(%rbx), %rdi
movb $0x0, 0x58(%rbx)
callq 0x1e89c
cmpb $0x1, 0x48(%rbx)
jne 0x1f12c
leaq 0x40(%rbx), %rdi
movb $0x0, 0x48(%rbx)
callq 0x1e89c
movq %r14, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
callq 0x1f5f0
movq %r14, (%rbx)
leaq 0x8(%rbx), %rdi
callq 0x1f5f0
movl $0xa0, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x106d0
| _ZN9xor_modelD0Ev:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
cmp byte ptr [rdi+98h], 1
jnz short loc_1F0D6
lea rdi, [rbx+90h]; this
mov byte ptr [rbx+98h], 0
call _ZN9magnetron6tensorD2Ev; magnetron::tensor::~tensor()
loc_1F0D6:
cmp byte ptr [rbx+88h], 1
jnz short loc_1F0F2
lea rdi, [rbx+80h]; this
mov byte ptr [rbx+88h], 0
call _ZN9magnetron6tensorD2Ev; magnetron::tensor::~tensor()
loc_1F0F2:
lea r14, off_A6640
mov [rbx+60h], r14
lea rdi, [rbx+68h]
call _ZNSt6vectorIN9magnetron6tensorESaIS1_EED2Ev; std::vector<magnetron::tensor>::~vector()
cmp byte ptr [rbx+58h], 1
jnz short loc_1F119
lea rdi, [rbx+50h]; this
mov byte ptr [rbx+58h], 0
call _ZN9magnetron6tensorD2Ev; magnetron::tensor::~tensor()
loc_1F119:
cmp byte ptr [rbx+48h], 1
jnz short loc_1F12C
lea rdi, [rbx+40h]; this
mov byte ptr [rbx+48h], 0
call _ZN9magnetron6tensorD2Ev; magnetron::tensor::~tensor()
loc_1F12C:
mov [rbx+20h], r14
lea rdi, [rbx+28h]
call _ZNSt6vectorIN9magnetron6tensorESaIS1_EED2Ev; std::vector<magnetron::tensor>::~vector()
mov [rbx], r14
lea rdi, [rbx+8]
call _ZNSt6vectorIN9magnetron6tensorESaIS1_EED2Ev; std::vector<magnetron::tensor>::~vector()
mov esi, 0A0h; unsigned __int64
mov rdi, rbx; void *
pop rbx
pop r14
pop rbp
jmp __ZdlPvm; operator delete(void *,ulong)
| void xor_model::~xor_model(xor_model *this)
{
if ( *((_BYTE *)this + 152) == 1 )
{
*((_BYTE *)this + 152) = 0;
magnetron::tensor::~tensor((xor_model *)((char *)this + 144));
}
if ( *((_BYTE *)this + 136) == 1 )
{
*((_BYTE *)this + 136) = 0;
magnetron::tensor::~tensor((xor_model *)((char *)this + 128));
}
*((_QWORD *)this + 12) = off_A6640;
std::vector<magnetron::tensor>::~vector((char *)this + 104);
if ( *((_BYTE *)this + 88) == 1 )
{
*((_BYTE *)this + 88) = 0;
magnetron::tensor::~tensor((xor_model *)((char *)this + 80));
}
if ( *((_BYTE *)this + 72) == 1 )
{
*((_BYTE *)this + 72) = 0;
magnetron::tensor::~tensor((xor_model *)((char *)this + 64));
}
*((_QWORD *)this + 4) = off_A6640;
std::vector<magnetron::tensor>::~vector((char *)this + 40);
*(_QWORD *)this = off_A6640;
std::vector<magnetron::tensor>::~vector((char *)this + 8);
operator delete(this, 0xA0uLL);
}
| ~xor_model:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CMP byte ptr [RDI + 0x98],0x1
JNZ 0x0011f0d6
LEA RDI,[RBX + 0x90]
MOV byte ptr [RBX + 0x98],0x0
CALL 0x0011e89c
LAB_0011f0d6:
CMP byte ptr [RBX + 0x88],0x1
JNZ 0x0011f0f2
LEA RDI,[RBX + 0x80]
MOV byte ptr [RBX + 0x88],0x0
CALL 0x0011e89c
LAB_0011f0f2:
LEA R14,[0x1a6640]
MOV qword ptr [RBX + 0x60],R14
LEA RDI,[RBX + 0x68]
CALL 0x0011f5f0
CMP byte ptr [RBX + 0x58],0x1
JNZ 0x0011f119
LEA RDI,[RBX + 0x50]
MOV byte ptr [RBX + 0x58],0x0
CALL 0x0011e89c
LAB_0011f119:
CMP byte ptr [RBX + 0x48],0x1
JNZ 0x0011f12c
LEA RDI,[RBX + 0x40]
MOV byte ptr [RBX + 0x48],0x0
CALL 0x0011e89c
LAB_0011f12c:
MOV qword ptr [RBX + 0x20],R14
LEA RDI,[RBX + 0x28]
CALL 0x0011f5f0
MOV qword ptr [RBX],R14
LEA RDI,[RBX + 0x8]
CALL 0x0011f5f0
MOV ESI,0xa0
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x001106d0
|
/* xor_model::~xor_model() */
void __thiscall xor_model::~xor_model(xor_model *this)
{
if (this[0x98] == (xor_model)0x1) {
this[0x98] = (xor_model)0x0;
magnetron::tensor::~tensor((tensor *)(this + 0x90));
}
if (this[0x88] == (xor_model)0x1) {
this[0x88] = (xor_model)0x0;
magnetron::tensor::~tensor((tensor *)(this + 0x80));
}
*(int ***)(this + 0x60) = &PTR__module_001a6640;
std::vector<magnetron::tensor,std::allocator<magnetron::tensor>>::~vector
((vector<magnetron::tensor,std::allocator<magnetron::tensor>> *)(this + 0x68));
if (this[0x58] == (xor_model)0x1) {
this[0x58] = (xor_model)0x0;
magnetron::tensor::~tensor((tensor *)(this + 0x50));
}
if (this[0x48] == (xor_model)0x1) {
this[0x48] = (xor_model)0x0;
magnetron::tensor::~tensor((tensor *)(this + 0x40));
}
*(int ***)(this + 0x20) = &PTR__module_001a6640;
std::vector<magnetron::tensor,std::allocator<magnetron::tensor>>::~vector
((vector<magnetron::tensor,std::allocator<magnetron::tensor>> *)(this + 0x28));
*(int ***)this = &PTR__module_001a6640;
std::vector<magnetron::tensor,std::allocator<magnetron::tensor>>::~vector
((vector<magnetron::tensor,std::allocator<magnetron::tensor>> *)(this + 8));
operator_delete(this,0xa0);
return;
}
|
|
5,938 | mysql_stmt_internal_reset | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | static my_bool mysql_stmt_internal_reset(MYSQL_STMT *stmt, my_bool is_close)
{
MYSQL *mysql= stmt->mysql;
my_bool ret= 1;
unsigned int flags= MADB_RESET_LONGDATA | MADB_RESET_BUFFER | MADB_RESET_ERROR;
if (!mysql)
{
/* connection could be invalid, e.g. after mysql_stmt_close or failed reconnect
attempt (see bug CONC-97) */
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state >= MYSQL_STMT_USER_FETCHING &&
stmt->fetch_row_func == stmt_unbuffered_fetch)
flags|= MADB_RESET_BUFFER;
ret= madb_reset_stmt(stmt, flags);
if (stmt->stmt_id)
{
if ((stmt->state > MYSQL_STMT_EXECUTED &&
stmt->mysql->status != MYSQL_STATUS_READY) ||
stmt->mysql->server_status & SERVER_MORE_RESULTS_EXIST)
{
/* flush any pending (multiple) result sets */
if (stmt->state == MYSQL_STMT_WAITING_USE_OR_STORE)
{
stmt->default_rset_handler(stmt);
stmt->state = MYSQL_STMT_USER_FETCHING;
}
if (stmt->field_count)
{
while (mysql_stmt_next_result(stmt) == 0);
stmt->mysql->status= MYSQL_STATUS_READY;
}
}
if (!is_close)
ret= madb_reset_stmt(stmt, MADB_RESET_SERVER);
stmt->state= MYSQL_STMT_PREPARED;
}
else
stmt->state= MYSQL_STMT_INITTED;
stmt->upsert_status.affected_rows= mysql->affected_rows;
stmt->upsert_status.last_insert_id= mysql->insert_id;
stmt->upsert_status.server_status= mysql->server_status;
stmt->upsert_status.warning_count= mysql->warning_count;
mysql->status= MYSQL_STATUS_READY;
return(ret);
} | O3 | c | mysql_stmt_internal_reset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %r12
testq %r12, %r12
je 0x63e64
movl %esi, %r15d
movq %rbx, %rdi
movl $0xb, %esi
callq 0x649fc
movl %eax, %r14d
cmpq $0x0, 0x40(%rbx)
je 0x63ebb
movl 0x50(%rbx), %eax
movq 0x38(%rbx), %rcx
cmpl $0x3, %eax
jb 0x63e09
cmpl $0x0, 0x488(%rcx)
jne 0x63e12
testb $0x8, 0x380(%rcx)
je 0x63e47
cmpl $0x3, %eax
jne 0x63e27
movq %rbx, %rdi
callq *0x358(%rbx)
movl $0x5, 0x50(%rbx)
cmpl $0x0, 0x60(%rbx)
je 0x63e47
movq %rbx, %rdi
callq 0x66304
testl %eax, %eax
je 0x63e2d
movq 0x38(%rbx), %rax
movl $0x0, 0x488(%rax)
movl $0x1, %r13d
testb %r15b, %r15b
jne 0x63ebe
movq %rbx, %rdi
movl $0x4, %esi
callq 0x649fc
movl %eax, %r14d
jmp 0x63ebe
movl $0x7dd, 0x108(%rbx) # imm = 0x7DD
leaq 0x30d(%rbx), %rdi
leaq 0x309c34(%rip), %rax # 0x36dab0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x3a1a0
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x309c1f(%rip), %rax # 0x36dac0
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x3a1a0
movb %r14b, 0x30b(%rbx)
movb $0x1, %r14b
jmp 0x63f08
xorl %r13d, %r13d
movl %r13d, 0x50(%rbx)
movq 0x338(%r12), %rax
movq %rax, 0xf8(%rbx)
movq 0x340(%r12), %rax
movq %rax, 0x100(%rbx)
movl 0x380(%r12), %eax
movl %eax, 0xf4(%rbx)
movl 0x388(%r12), %eax
movl %eax, 0xf0(%rbx)
movl $0x0, 0x488(%r12)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mysql_stmt_internal_reset:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov r12, [rdi+38h]
test r12, r12
jz loc_63E64
mov r15d, esi
mov rdi, rbx
mov esi, 0Bh
call madb_reset_stmt
mov r14d, eax
cmp qword ptr [rbx+40h], 0
jz loc_63EBB
mov eax, [rbx+50h]
mov rcx, [rbx+38h]
cmp eax, 3
jb short loc_63E09
cmp dword ptr [rcx+488h], 0
jnz short loc_63E12
loc_63E09:
test byte ptr [rcx+380h], 8
jz short loc_63E47
loc_63E12:
cmp eax, 3
jnz short loc_63E27
mov rdi, rbx
call qword ptr [rbx+358h]
mov dword ptr [rbx+50h], 5
loc_63E27:
cmp dword ptr [rbx+60h], 0
jz short loc_63E47
loc_63E2D:
mov rdi, rbx
call mysql_stmt_next_result
test eax, eax
jz short loc_63E2D
mov rax, [rbx+38h]
mov dword ptr [rax+488h], 0
loc_63E47:
mov r13d, 1
test r15b, r15b
jnz short loc_63EBE
mov rdi, rbx
mov esi, 4
call madb_reset_stmt
mov r14d, eax
jmp short loc_63EBE
loc_63E64:
mov dword ptr [rbx+108h], 7DDh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov r14b, 1
jmp short loc_63F08
loc_63EBB:
xor r13d, r13d
loc_63EBE:
mov [rbx+50h], r13d
mov rax, [r12+338h]
mov [rbx+0F8h], rax
mov rax, [r12+340h]
mov [rbx+100h], rax
mov eax, [r12+380h]
mov [rbx+0F4h], eax
mov eax, [r12+388h]
mov [rbx+0F0h], eax
mov dword ptr [r12+488h], 0
loc_63F08:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mysql_stmt_internal_reset(long long a1, char a2)
{
long long v2; // r12
unsigned int v3; // r14d
unsigned int v4; // eax
long long v5; // rcx
int v6; // r13d
v2 = *(_QWORD *)(a1 + 56);
if ( v2 )
{
v3 = madb_reset_stmt(a1, 11LL);
if ( *(_QWORD *)(a1 + 64) )
{
v4 = *(_DWORD *)(a1 + 80);
v5 = *(_QWORD *)(a1 + 56);
if ( v4 >= 3 && *(_DWORD *)(v5 + 1160) || (*(_BYTE *)(v5 + 896) & 8) != 0 )
{
if ( v4 == 3 )
{
(*(void ( **)(long long))(a1 + 856))(a1);
*(_DWORD *)(a1 + 80) = 5;
}
if ( *(_DWORD *)(a1 + 96) )
{
while ( !(unsigned int)mysql_stmt_next_result(a1) )
;
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 0;
}
}
v6 = 1;
if ( !a2 )
v3 = madb_reset_stmt(a1, 4LL);
}
else
{
v6 = 0;
}
*(_DWORD *)(a1 + 80) = v6;
*(_QWORD *)(a1 + 248) = *(_QWORD *)(v2 + 824);
*(_QWORD *)(a1 + 256) = *(_QWORD *)(v2 + 832);
*(_DWORD *)(a1 + 244) = *(_DWORD *)(v2 + 896);
*(_DWORD *)(a1 + 240) = *(_DWORD *)(v2 + 904);
*(_DWORD *)(v2 + 1160) = 0;
}
else
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
v3 = 1;
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[13], 512LL);
*(_BYTE *)(a1 + 779) = 0;
}
return v3;
}
| mysql_stmt_internal_reset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R12,qword ptr [RDI + 0x38]
TEST R12,R12
JZ 0x00163e64
MOV R15D,ESI
MOV RDI,RBX
MOV ESI,0xb
CALL 0x001649fc
MOV R14D,EAX
CMP qword ptr [RBX + 0x40],0x0
JZ 0x00163ebb
MOV EAX,dword ptr [RBX + 0x50]
MOV RCX,qword ptr [RBX + 0x38]
CMP EAX,0x3
JC 0x00163e09
CMP dword ptr [RCX + 0x488],0x0
JNZ 0x00163e12
LAB_00163e09:
TEST byte ptr [RCX + 0x380],0x8
JZ 0x00163e47
LAB_00163e12:
CMP EAX,0x3
JNZ 0x00163e27
MOV RDI,RBX
CALL qword ptr [RBX + 0x358]
MOV dword ptr [RBX + 0x50],0x5
LAB_00163e27:
CMP dword ptr [RBX + 0x60],0x0
JZ 0x00163e47
LAB_00163e2d:
MOV RDI,RBX
CALL 0x00166304
TEST EAX,EAX
JZ 0x00163e2d
MOV RAX,qword ptr [RBX + 0x38]
MOV dword ptr [RAX + 0x488],0x0
LAB_00163e47:
MOV R13D,0x1
TEST R15B,R15B
JNZ 0x00163ebe
MOV RDI,RBX
MOV ESI,0x4
CALL 0x001649fc
MOV R14D,EAX
JMP 0x00163ebe
LAB_00163e64:
MOV dword ptr [RBX + 0x108],0x7dd
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x46dab0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x0013a1a0
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x46dac0]
MOV RSI,qword ptr [RAX + 0x68]
MOV EDX,0x200
CALL 0x0013a1a0
MOV byte ptr [RBX + 0x30b],R14B
MOV R14B,0x1
JMP 0x00163f08
LAB_00163ebb:
XOR R13D,R13D
LAB_00163ebe:
MOV dword ptr [RBX + 0x50],R13D
MOV RAX,qword ptr [R12 + 0x338]
MOV qword ptr [RBX + 0xf8],RAX
MOV RAX,qword ptr [R12 + 0x340]
MOV qword ptr [RBX + 0x100],RAX
MOV EAX,dword ptr [R12 + 0x380]
MOV dword ptr [RBX + 0xf4],EAX
MOV EAX,dword ptr [R12 + 0x388]
MOV dword ptr [RBX + 0xf0],EAX
MOV dword ptr [R12 + 0x488],0x0
LAB_00163f08:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 mysql_stmt_internal_reset(long param_1,char param_2)
{
long lVar1;
int4 uVar2;
int iVar3;
int4 uVar4;
lVar1 = *(long *)(param_1 + 0x38);
if (lVar1 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_0046db28,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar2 = 1;
}
else {
uVar2 = madb_reset_stmt(param_1,0xb);
if (*(long *)(param_1 + 0x40) == 0) {
uVar4 = 0;
}
else {
if (((2 < *(uint *)(param_1 + 0x50)) && (*(int *)(*(long *)(param_1 + 0x38) + 0x488) != 0)) ||
((*(byte *)(*(long *)(param_1 + 0x38) + 0x380) & 8) != 0)) {
if (*(uint *)(param_1 + 0x50) == 3) {
(**(code **)(param_1 + 0x358))(param_1);
*(int4 *)(param_1 + 0x50) = 5;
}
if (*(int *)(param_1 + 0x60) != 0) {
do {
iVar3 = mysql_stmt_next_result(param_1);
} while (iVar3 == 0);
*(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 0;
}
}
uVar4 = 1;
if (param_2 == '\0') {
uVar2 = madb_reset_stmt(param_1,4);
}
}
*(int4 *)(param_1 + 0x50) = uVar4;
*(int8 *)(param_1 + 0xf8) = *(int8 *)(lVar1 + 0x338);
*(int8 *)(param_1 + 0x100) = *(int8 *)(lVar1 + 0x340);
*(int4 *)(param_1 + 0xf4) = *(int4 *)(lVar1 + 0x380);
*(int4 *)(param_1 + 0xf0) = *(int4 *)(lVar1 + 0x388);
*(int4 *)(lVar1 + 0x488) = 0;
}
return uVar2;
}
|
|
5,939 | common_sampler_type_to_str[abi:cxx11](common_sampler_type) | monkey531[P]llama/common/sampling.cpp | std::string common_sampler_type_to_str(enum common_sampler_type cnstr) {
switch (cnstr) {
case COMMON_SAMPLER_TYPE_DRY: return "dry";
case COMMON_SAMPLER_TYPE_TOP_K: return "top_k";
case COMMON_SAMPLER_TYPE_TYPICAL_P: return "typ_p";
case COMMON_SAMPLER_TYPE_TOP_P: return "top_p";
case COMMON_SAMPLER_TYPE_MIN_P: return "min_p";
case COMMON_SAMPLER_TYPE_TEMPERATURE: return "temperature";
case COMMON_SAMPLER_TYPE_XTC: return "xtc";
case COMMON_SAMPLER_TYPE_INFILL: return "infill";
case COMMON_SAMPLER_TYPE_PENALTIES: return "penalties";
default : return "";
}
} | O2 | cpp | common_sampler_type_to_str[abi:cxx11](common_sampler_type):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
decl %esi
cmpl $0x9, %esi
ja 0xb4745
leaq 0x22ec6(%rip), %rax # 0xd7584
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x2328d(%rip), %rsi # 0xd795b
leaq 0xf(%rsp), %rdx
jmp 0xb4751
leaq 0x2328f(%rip), %rsi # 0xd796b
leaq 0xc(%rsp), %rdx
jmp 0xb4751
leaq 0x2328d(%rip), %rsi # 0xd7977
leaq 0xa(%rsp), %rdx
jmp 0xb4751
leaq 0x23267(%rip), %rsi # 0xd795f
leaq 0xe(%rsp), %rdx
jmp 0xb4751
leaq 0x2327d(%rip), %rsi # 0xd7983
leaq 0x9(%rsp), %rdx
jmp 0xb4751
leaq 0x16838(%rip), %rsi # 0xcaf4c
leaq 0x8(%rsp), %rdx
jmp 0xb4751
leaq 0x2324f(%rip), %rsi # 0xd7971
leaq 0xb(%rsp), %rdx
jmp 0xb4751
leaq 0x23235(%rip), %rsi # 0xd7965
leaq 0xd(%rsp), %rdx
jmp 0xb4751
leaq 0x23249(%rip), %rsi # 0xd7987
leaq 0x7(%rsp), %rdx
jmp 0xb4751
leaq 0x119ee(%rip), %rsi # 0xc613a
leaq 0x6(%rsp), %rdx
movq %rbx, %rdi
callq 0x2b18e
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
| _Z26common_sampler_type_to_strB5cxx1119common_sampler_type:
push rbx
sub rsp, 10h
mov rbx, rdi
dec esi; switch 10 cases
cmp esi, 9
ja def_B46C5; jumptable 00000000000B46C5 default case, case 5
lea rax, jpt_B46C5
movsxd rcx, ds:(jpt_B46C5 - 0D7584h)[rax+rsi*4]
add rcx, rax
jmp rcx; switch jump
loc_B46C7:
lea rsi, aDry; jumptable 00000000000B46C5 case 1
lea rdx, [rsp+18h+var_9]
jmp short loc_B4751
loc_B46D5:
lea rsi, aTopP_0; jumptable 00000000000B46C5 case 3
lea rdx, [rsp+18h+var_C]
jmp short loc_B4751
loc_B46E3:
lea rsi, aTemperature; jumptable 00000000000B46C5 case 7
lea rdx, [rsp+18h+var_E]
jmp short loc_B4751
loc_B46F1:
lea rsi, aTopK_0; jumptable 00000000000B46C5 case 2
lea rdx, [rsp+18h+var_A]
jmp short loc_B4751
loc_B46FF:
lea rsi, aXtc; jumptable 00000000000B46C5 case 8
lea rdx, [rsp+18h+var_F]
jmp short loc_B4751
loc_B470D:
lea rsi, aSpmInfill+6; jumptable 00000000000B46C5 case 9
lea rdx, [rsp+18h+var_10]
jmp short loc_B4751
loc_B471B:
lea rsi, aMinP_0; jumptable 00000000000B46C5 case 4
lea rdx, [rsp+18h+var_D]
jmp short loc_B4751
loc_B4729:
lea rsi, aTypP; jumptable 00000000000B46C5 case 6
lea rdx, [rsp+18h+var_B]
jmp short loc_B4751
loc_B4737:
lea rsi, aPenalties; jumptable 00000000000B46C5 case 10
lea rdx, [rsp+18h+var_11]
jmp short loc_B4751
def_B46C5:
lea rsi, aSFailedToLoadI+2Ah; jumptable 00000000000B46C5 default case, case 5
lea rdx, [rsp+18h+var_12]
loc_B4751:
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rax, rbx
add rsp, 10h
pop rbx
retn
| _QWORD * common_sampler_type_to_str[abi:cxx11](_QWORD *a1, int a2)
{
char *v2; // rsi
switch ( a2 )
{
case 1:
v2 = "dry";
break;
case 2:
v2 = "top_k";
break;
case 3:
v2 = "top_p";
break;
case 4:
v2 = "min_p";
break;
case 6:
v2 = "typ_p";
break;
case 7:
v2 = "temperature";
break;
case 8:
v2 = "xtc";
break;
case 9:
v2 = "infill";
break;
case 10:
v2 = "penalties";
break;
default:
v2 = "";
break;
}
std::string::basic_string<std::allocator<char>>(a1, (long long)v2);
return a1;
}
| common_sampler_type_to_str[abi:cxx11]:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
DEC ESI
CMP ESI,0x9
JA 0x001b4745
LEA RAX,[0x1d7584]
MOVSXD RCX,dword ptr [RAX + RSI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_1:
LEA RSI,[0x1d795b]
LEA RDX,[RSP + 0xf]
JMP 0x001b4751
caseD_3:
LEA RSI,[0x1d796b]
LEA RDX,[RSP + 0xc]
JMP 0x001b4751
caseD_7:
LEA RSI,[0x1d7977]
LEA RDX,[RSP + 0xa]
JMP 0x001b4751
caseD_2:
LEA RSI,[0x1d795f]
LEA RDX,[RSP + 0xe]
JMP 0x001b4751
caseD_8:
LEA RSI,[0x1d7983]
LEA RDX,[RSP + 0x9]
JMP 0x001b4751
caseD_9:
LEA RSI,[0x1caf4c]
LEA RDX,[RSP + 0x8]
JMP 0x001b4751
caseD_4:
LEA RSI,[0x1d7971]
LEA RDX,[RSP + 0xb]
JMP 0x001b4751
caseD_6:
LEA RSI,[0x1d7965]
LEA RDX,[RSP + 0xd]
JMP 0x001b4751
caseD_a:
LEA RSI,[0x1d7987]
LEA RDX,[RSP + 0x7]
JMP 0x001b4751
caseD_5:
LEA RSI,[0x1c613a]
LEA RDX,[RSP + 0x6]
LAB_001b4751:
MOV RDI,RBX
CALL 0x0012b18e
MOV RAX,RBX
ADD RSP,0x10
POP RBX
RET
|
/* common_sampler_type_to_str[abi:cxx11](common_sampler_type) */
string * common_sampler_type_to_str_abi_cxx11_(string *param_1,int4 param_2)
{
allocator *paVar1;
char *pcVar2;
allocator local_12;
allocator local_11;
allocator local_10;
allocator local_f;
allocator local_e;
allocator local_d;
allocator local_c;
allocator local_b;
allocator local_a;
allocator local_9;
switch(param_2) {
case 1:
pcVar2 = "dry";
paVar1 = &local_9;
break;
case 2:
pcVar2 = "top_k";
paVar1 = &local_a;
break;
case 3:
pcVar2 = "top_p";
paVar1 = &local_c;
break;
case 4:
pcVar2 = "min_p";
paVar1 = &local_d;
break;
default:
pcVar2 = "";
paVar1 = &local_12;
break;
case 6:
pcVar2 = "typ_p";
paVar1 = &local_b;
break;
case 7:
pcVar2 = "temperature";
paVar1 = &local_e;
break;
case 8:
pcVar2 = "xtc";
paVar1 = &local_f;
break;
case 9:
pcVar2 = "infill";
paVar1 = &local_10;
break;
case 10:
pcVar2 = "penalties";
paVar1 = &local_11;
}
std::__cxx11::string::string<std::allocator<char>>(param_1,pcVar2,paVar1);
return param_1;
}
|
|
5,940 | common_sampler_type_to_str[abi:cxx11](common_sampler_type) | monkey531[P]llama/common/sampling.cpp | std::string common_sampler_type_to_str(enum common_sampler_type cnstr) {
switch (cnstr) {
case COMMON_SAMPLER_TYPE_DRY: return "dry";
case COMMON_SAMPLER_TYPE_TOP_K: return "top_k";
case COMMON_SAMPLER_TYPE_TYPICAL_P: return "typ_p";
case COMMON_SAMPLER_TYPE_TOP_P: return "top_p";
case COMMON_SAMPLER_TYPE_MIN_P: return "min_p";
case COMMON_SAMPLER_TYPE_TEMPERATURE: return "temperature";
case COMMON_SAMPLER_TYPE_XTC: return "xtc";
case COMMON_SAMPLER_TYPE_INFILL: return "infill";
case COMMON_SAMPLER_TYPE_PENALTIES: return "penalties";
default : return "";
}
} | O3 | cpp | common_sampler_type_to_str[abi:cxx11](common_sampler_type):
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
decl %esi
cmpl $0x9, %esi
ja 0xf1c96
leaq 0x28a9e(%rip), %rax # 0x11a690
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x28e65(%rip), %rsi # 0x11aa67
leaq 0x28e61(%rip), %rdx # 0x11aa6a
jmp 0xf1c89
leaq 0x28e65(%rip), %rsi # 0x11aa77
leaq 0x28e63(%rip), %rdx # 0x11aa7c
jmp 0xf1c89
leaq 0x28e61(%rip), %rsi # 0x11aa83
leaq 0x28e65(%rip), %rdx # 0x11aa8e
jmp 0xf1c89
leaq 0x28e39(%rip), %rsi # 0x11aa6b
leaq 0x28e37(%rip), %rdx # 0x11aa70
jmp 0xf1c89
leaq 0x28e4d(%rip), %rsi # 0x11aa8f
leaq 0x28e49(%rip), %rdx # 0x11aa92
jmp 0xf1c89
leaq 0x1c41a(%rip), %rsi # 0x10e06c
leaq 0x1c419(%rip), %rdx # 0x10e072
jmp 0xf1c89
leaq 0x28e1b(%rip), %rsi # 0x11aa7d
leaq 0x28e19(%rip), %rdx # 0x11aa82
jmp 0xf1c89
leaq 0x28dff(%rip), %rsi # 0x11aa71
leaq 0x28dfd(%rip), %rdx # 0x11aa76
jmp 0xf1c89
leaq 0x28e11(%rip), %rsi # 0x11aa93
leaq 0x28e13(%rip), %rdx # 0x11aa9c
movq %rbx, %rdi
callq 0x26926
movq %rbx, %rax
popq %rbx
retq
leaq 0x1749d(%rip), %rdx # 0x10913a
movq %rbx, %rdi
movq %rdx, %rsi
jmp 0xf1c8c
| _Z26common_sampler_type_to_strB5cxx1119common_sampler_type:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
dec esi; switch 10 cases
cmp esi, 9
ja def_F1BF9; jumptable 00000000000F1BF9 default case, case 5
lea rax, jpt_F1BF9
movsxd rcx, ds:(jpt_F1BF9 - 11A690h)[rax+rsi*4]
add rcx, rax
jmp rcx; switch jump
loc_F1BFB:
lea rsi, aDry; jumptable 00000000000F1BF9 case 1
lea rdx, aDry+3; ""
jmp short loc_F1C89
loc_F1C0B:
lea rsi, aTopP_0; jumptable 00000000000F1BF9 case 3
lea rdx, aTopP_0+5; ""
jmp short loc_F1C89
loc_F1C1B:
lea rsi, aTemperature; jumptable 00000000000F1BF9 case 7
lea rdx, aTemperature+0Bh; ""
jmp short loc_F1C89
loc_F1C2B:
lea rsi, aTopK_0; jumptable 00000000000F1BF9 case 2
lea rdx, aTopK_0+5; ""
jmp short loc_F1C89
loc_F1C3B:
lea rsi, aXtc; jumptable 00000000000F1BF9 case 8
lea rdx, aXtc+3; ""
jmp short loc_F1C89
loc_F1C4B:
lea rsi, aSpmInfill+6; jumptable 00000000000F1BF9 case 9
lea rdx, aSpmInfill+0Ch; ""
jmp short loc_F1C89
loc_F1C5B:
lea rsi, aMinP_0; jumptable 00000000000F1BF9 case 4
lea rdx, aMinP_0+5; ""
jmp short loc_F1C89
loc_F1C6B:
lea rsi, aTypP; jumptable 00000000000F1BF9 case 6
lea rdx, aTypP+5; ""
jmp short loc_F1C89
loc_F1C7B:
lea rsi, aPenalties; jumptable 00000000000F1BF9 case 10
lea rdx, aPenalties+9; ""
loc_F1C89:
mov rdi, rbx
loc_F1C8C:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
def_F1BF9:
lea rdx, aSFailedToLoadI+2Ah; jumptable 00000000000F1BF9 default case, case 5
mov rdi, rbx
mov rsi, rdx
jmp short loc_F1C8C
| _QWORD * common_sampler_type_to_str[abi:cxx11](_QWORD *a1, int a2)
{
char *v2; // rsi
char *v3; // rdx
*a1 = a1 + 2;
switch ( a2 )
{
case 1:
v2 = "dry";
v3 = "";
break;
case 2:
v2 = "top_k";
v3 = "";
break;
case 3:
v2 = "top_p";
v3 = "";
break;
case 4:
v2 = "min_p";
v3 = "";
break;
case 6:
v2 = "typ_p";
v3 = "";
break;
case 7:
v2 = "temperature";
v3 = "";
break;
case 8:
v2 = "xtc";
v3 = "";
break;
case 9:
v2 = "infill";
v3 = "";
break;
case 10:
v2 = "penalties";
v3 = "";
break;
default:
v3 = "";
v2 = "";
break;
}
std::string::_M_construct<char const*>((long long)a1, v2, (long long)v3);
return a1;
}
| common_sampler_type_to_str[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
DEC ESI
CMP ESI,0x9
JA 0x001f1c96
LEA RAX,[0x21a690]
MOVSXD RCX,dword ptr [RAX + RSI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_1:
LEA RSI,[0x21aa67]
LEA RDX,[0x21aa6a]
JMP 0x001f1c89
caseD_3:
LEA RSI,[0x21aa77]
LEA RDX,[0x21aa7c]
JMP 0x001f1c89
caseD_7:
LEA RSI,[0x21aa83]
LEA RDX,[0x21aa8e]
JMP 0x001f1c89
caseD_2:
LEA RSI,[0x21aa6b]
LEA RDX,[0x21aa70]
JMP 0x001f1c89
caseD_8:
LEA RSI,[0x21aa8f]
LEA RDX,[0x21aa92]
JMP 0x001f1c89
caseD_9:
LEA RSI,[0x20e06c]
LEA RDX,[0x20e072]
JMP 0x001f1c89
caseD_4:
LEA RSI,[0x21aa7d]
LEA RDX,[0x21aa82]
JMP 0x001f1c89
caseD_6:
LEA RSI,[0x21aa71]
LEA RDX,[0x21aa76]
JMP 0x001f1c89
caseD_a:
LEA RSI,[0x21aa93]
LEA RDX,[0x21aa9c]
LAB_001f1c89:
MOV RDI,RBX
LAB_001f1c8c:
CALL 0x00126926
MOV RAX,RBX
POP RBX
RET
caseD_5:
LEA RDX,[0x20913a]
MOV RDI,RBX
MOV RSI,RDX
JMP 0x001f1c8c
|
/* common_sampler_type_to_str[abi:cxx11](common_sampler_type) */
long * common_sampler_type_to_str_abi_cxx11_(long *param_1,int4 param_2)
{
char *pcVar1;
char *pcVar2;
*param_1 = (long)(param_1 + 2);
switch(param_2) {
case 1:
pcVar2 = "dry";
pcVar1 = "";
break;
case 2:
pcVar2 = "top_k";
pcVar1 = "";
break;
case 3:
pcVar2 = "top_p";
pcVar1 = "";
break;
case 4:
pcVar2 = "min_p";
pcVar1 = "";
break;
default:
pcVar1 = "";
pcVar2 = pcVar1;
break;
case 6:
pcVar2 = "typ_p";
pcVar1 = "";
break;
case 7:
pcVar2 = "temperature";
pcVar1 = "";
break;
case 8:
pcVar2 = "xtc";
pcVar1 = "";
break;
case 9:
pcVar2 = "infill";
pcVar1 = "";
break;
case 10:
pcVar2 = "penalties";
pcVar1 = "";
}
std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar2,pcVar1);
return param_1;
}
|
|
5,941 | add_directory | eloqsql/mysys/my_default.c | static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs)
{
char buf[FN_REFLEN];
size_t len;
char *p;
my_bool err __attribute__((unused));
len= normalize_dirname(buf, dir);
if (!(p= strmake_root(alloc, buf, len)))
return 1; /* Failure */
/* Should never fail if DEFAULT_DIRS_SIZE is correct size */
err= array_append_string_unique(p, dirs, DEFAULT_DIRS_SIZE);
DBUG_ASSERT(err == FALSE);
return 0;
} | O3 | c | add_directory:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movq %rdx, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq -0x220(%rbp), %r15
movq %r15, %rdi
callq 0xa2b43
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xa47d5
testq %rax, %rax
je 0x9b1a7
movl $0x8, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xa3fa0
xorl %eax, %eax
jmp 0x9b1ac
movl $0x1, %eax
movq %fs:0x28, %rcx
cmpq -0x20(%rbp), %rcx
jne 0x9b1c9
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a250
nop
| add_directory:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 208h
mov rbx, rdx
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
lea r15, [rbp+var_220]
mov rdi, r15
call normalize_dirname
mov rdi, r14
mov rsi, r15
mov rdx, rax
call strmake_root
test rax, rax
jz short loc_9B1A7
mov edx, 8
mov rdi, rax
mov rsi, rbx
call array_append_string_unique
xor eax, eax
jmp short loc_9B1AC
loc_9B1A7:
mov eax, 1
loc_9B1AC:
mov rcx, fs:28h
cmp rcx, [rbp+var_20]
jnz short loc_9B1C9
add rsp, 208h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_9B1C9:
call ___stack_chk_fail
| long long add_directory(long long a1, long long a2, long long a3)
{
long long v4; // rax
long long v5; // rax
_BYTE v7[512]; // [rsp+0h] [rbp-220h] BYREF
unsigned long long v8; // [rsp+200h] [rbp-20h]
v8 = __readfsqword(0x28u);
v4 = normalize_dirname(v7);
v5 = strmake_root(a1, v7, v4);
if ( !v5 )
return 1LL;
array_append_string_unique(v5, a3, 8LL);
return 0LL;
}
| add_directory:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x208
MOV RBX,RDX
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA R15,[RBP + -0x220]
MOV RDI,R15
CALL 0x001a2b43
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
CALL 0x001a47d5
TEST RAX,RAX
JZ 0x0019b1a7
MOV EDX,0x8
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001a3fa0
XOR EAX,EAX
JMP 0x0019b1ac
LAB_0019b1a7:
MOV EAX,0x1
LAB_0019b1ac:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x20]
JNZ 0x0019b1c9
ADD RSP,0x208
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0019b1c9:
CALL 0x0012a250
|
bool add_directory(int8 param_1,int8 param_2,int8 param_3)
{
int8 uVar1;
long lVar2;
long in_FS_OFFSET;
int1 local_228 [512];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
uVar1 = normalize_dirname(local_228);
lVar2 = strmake_root(param_1,local_228,uVar1);
if (lVar2 != 0) {
array_append_string_unique(lVar2,param_3,8);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_28) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar2 == 0;
}
|
|
5,942 | my_strerror | eloqsql/strings/my_vsnprintf.c | const char* my_strerror(char *buf, size_t len, int nr)
{
char *msg= NULL;
buf[0]= '\0'; /* failsafe */
if (nr <= 0)
{
strmake(buf, (nr == 0 ?
"Internal error/check (Not system error)" :
"Internal error < 0 (Not system error)"),
len-1);
return buf;
}
/*
These (handler-) error messages are shared by perror, as required
by the principle of least surprise.
*/
if ((nr >= HA_ERR_FIRST) && (nr <= HA_ERR_LAST))
{
msg= (char *) handler_error_messages[nr - HA_ERR_FIRST];
strmake(buf, msg, len - 1);
}
else
{
/*
On Windows, do things the Windows way. On a system that supports both
the GNU and the XSI variant, use whichever was configured (GNU); if
this choice is not advertised, use the default (POSIX/XSI). Testing
for __GNUC__ is not sufficient to determine whether this choice exists.
*/
#if defined(_WIN32)
strerror_s(buf, len, nr);
#elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \
(defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \
! defined _GNU_SOURCE
strerror_r(nr, buf, len); /* I can build with or without GNU */
#elif defined(__GLIBC__) && defined (_GNU_SOURCE)
char *r= strerror_r(nr, buf, len);
if (r != buf) /* Want to help, GNU? */
strmake(buf, r, len - 1); /* Then don't. */
#else
strerror_r(nr, buf, len);
#endif
}
/*
strerror() return values are implementation-dependent, so let's
be pragmatic.
*/
if (!buf[0])
strmake(buf, "unknown error", len - 1);
return buf;
} | O0 | c | my_strerror:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
cmpl $0x0, -0x1c(%rbp)
jg 0x768ce
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %ecx
leaq 0x6600(%rip), %rsi # 0x7cea6
leaq 0x65d1(%rip), %rax # 0x7ce7e
cmpl $0x0, %ecx
cmoveq %rax, %rsi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
callq 0x774f0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7696a
cmpl $0x78, -0x1c(%rbp)
jl 0x7690c
cmpl $0xc6, -0x1c(%rbp)
jg 0x7690c
movl -0x1c(%rbp), %eax
subl $0x78, %eax
movslq %eax, %rcx
leaq 0x30eb73(%rip), %rax # 0x385460
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
callq 0x774f0
jmp 0x76941
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x240d0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x7693f
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
callq 0x774f0
jmp 0x76941
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x76962
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
leaq 0x656f(%rip), %rsi # 0x7cecc
callq 0x774f0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strerror:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], 0
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
cmp [rbp+var_1C], 0
jg short loc_768CE
mov rdi, [rbp+var_10]
mov ecx, [rbp+var_1C]
lea rsi, aInternalError0; "Internal error < 0 (Not system error)"
lea rax, aInternalErrorC; "Internal error/check (Not system error)"
cmp ecx, 0
cmovz rsi, rax
mov rdx, [rbp+var_18]
sub rdx, 1
call strmake
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
jmp loc_7696A
loc_768CE:
cmp [rbp+var_1C], 78h ; 'x'
jl short loc_7690C
cmp [rbp+var_1C], 0C6h
jg short loc_7690C
mov eax, [rbp+var_1C]
sub eax, 78h ; 'x'
movsxd rcx, eax
lea rax, handler_error_messages
mov rax, [rax+rcx*8]
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_18]
sub rdx, 1
call strmake
jmp short loc_76941
loc_7690C:
mov edi, [rbp+var_1C]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _strerror_r
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_10]
jz short loc_7693F
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_18]
sub rdx, 1
call strmake
loc_7693F:
jmp short $+2
loc_76941:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jnz short loc_76962
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
sub rdx, 1
lea rsi, aUnknownError; "unknown error"
call strmake
loc_76962:
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_7696A:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| _BYTE * my_strerror(_BYTE *a1, long long a2, int a3)
{
const char *v3; // rsi
long long v5; // [rsp+0h] [rbp-30h]
*a1 = 0;
if ( a3 > 0 )
{
if ( a3 < 120 || a3 > 198 )
{
v5 = strerror_r((unsigned int)a3, a1, a2);
if ( (_BYTE *)v5 != a1 )
strmake(a1, v5, a2 - 1);
}
else
{
strmake(a1, handler_error_messages[a3 - 120], a2 - 1);
}
if ( !*a1 )
strmake(a1, "unknown error", a2 - 1);
return a1;
}
else
{
v3 = "Internal error < 0 (Not system error)";
if ( !a3 )
v3 = "Internal error/check (Not system error)";
strmake(a1, v3, a2 - 1);
return a1;
}
}
| my_strerror:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
CMP dword ptr [RBP + -0x1c],0x0
JG 0x001768ce
MOV RDI,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
LEA RSI,[0x17cea6]
LEA RAX,[0x17ce7e]
CMP ECX,0x0
CMOVZ RSI,RAX
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
CALL 0x001774f0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017696a
LAB_001768ce:
CMP dword ptr [RBP + -0x1c],0x78
JL 0x0017690c
CMP dword ptr [RBP + -0x1c],0xc6
JG 0x0017690c
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x78
MOVSXD RCX,EAX
LEA RAX,[0x485460]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
CALL 0x001774f0
JMP 0x00176941
LAB_0017690c:
MOV EDI,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001240d0
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x10]
JZ 0x0017693f
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
CALL 0x001774f0
LAB_0017693f:
JMP 0x00176941
LAB_00176941:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JNZ 0x00176962
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
LEA RSI,[0x17cecc]
CALL 0x001774f0
LAB_00176962:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017696a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
char * my_strerror(char *param_1,size_t param_2,int param_3)
{
char *pcVar1;
*param_1 = '\0';
if (param_3 < 1) {
pcVar1 = "Internal error < 0 (Not system error)";
if (param_3 == 0) {
pcVar1 = "Internal error/check (Not system error)";
}
strmake(param_1,pcVar1,param_2 - 1);
}
else {
if ((param_3 < 0x78) || (0xc6 < param_3)) {
pcVar1 = strerror_r(param_3,param_1,param_2);
if (pcVar1 != param_1) {
strmake(param_1,pcVar1,param_2 - 1);
}
}
else {
strmake(param_1,*(int8 *)(handler_error_messages + (long)(param_3 + -0x78) * 8),
param_2 - 1);
}
if (*param_1 == '\0') {
strmake(param_1,"unknown error",param_2 - 1);
}
}
return param_1;
}
|
|
5,943 | fn_ext | eloqsql/mysys/mf_fn_ext.c | char *fn_ext(const char *name)
{
register const char *pos, *gpos;
DBUG_ENTER("fn_ext");
DBUG_PRINT("mfunkt",("name: '%s'",name));
#if defined(FN_DEVCHAR) || defined(BASKSLASH_MBTAIL)
{
char buff[FN_REFLEN];
size_t res_length;
gpos= name+ dirname_part(buff,(char*) name, &res_length);
}
#else
if (!(gpos= strrchr(name, FN_LIBCHAR)))
gpos= name;
#endif
pos= strchr(gpos, FN_EXTCHAR);
DBUG_RETURN((char*) (pos ? pos : strend(gpos)));
} | O0 | c | fn_ext:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x3f30e
movq -0x8(%rbp), %rdi
movl $0x2f, %esi
callq 0x25370
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3f32e
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2e, %esi
callq 0x25120
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3f351
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x3f35e
movq -0x18(%rbp), %rdi
callq 0x86e10
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
| fn_ext:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
jmp short $+2
loc_3F30E:
mov rdi, [rbp+var_8]
mov esi, 2Fh ; '/'
call _strrchr
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3F32E
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
loc_3F32E:
mov rdi, [rbp+var_18]
mov esi, 2Eh ; '.'
call _strchr
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz short loc_3F351
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
jmp short loc_3F35E
loc_3F351:
mov rdi, [rbp+var_18]
call strend
mov [rbp+var_20], rax
loc_3F35E:
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
| long long fn_ext(long long a1)
{
long long v3; // [rsp+18h] [rbp-18h]
long long v4; // [rsp+20h] [rbp-10h]
v3 = strrchr(a1, 47LL);
if ( !v3 )
v3 = a1;
v4 = strchr(v3, 46LL);
if ( v4 )
return v4;
else
return strend(v3);
}
| fn_ext:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0013f30e
LAB_0013f30e:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x2f
CALL 0x00125370
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013f32e
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_0013f32e:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x2e
CALL 0x00125120
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0013f351
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0013f35e
LAB_0013f351:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00186e10
MOV qword ptr [RBP + -0x20],RAX
LAB_0013f35e:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x30
POP RBP
RET
|
char * fn_ext(char *param_1)
{
int8 local_28;
int8 local_20;
local_20 = strrchr(param_1,0x2f);
if (local_20 == (char *)0x0) {
local_20 = param_1;
}
local_28 = strchr(local_20,0x2e);
if (local_28 == (char *)0x0) {
local_28 = (char *)strend(local_20);
}
return local_28;
}
|
|
5,944 | my_mb_wc_utf8mb4_quick | eloqsql/strings/ctype-utf8.h | static inline int
my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
{
*pwc= c;
return 1;
}
else if (c < 0xc2)
return MY_CS_ILSEQ;
else if (c < 0xe0)
{
if (s + 2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
else if (c < 0xf0)
{
if (s + 3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (s + 4 > e) /* We need 4 characters */
return MY_CS_TOOSMALL4;
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
} | O0 | c | my_mb_wc_utf8mb4_quick:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x5b626
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x5b8a3
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x80, %eax
jge 0x5b653
movzbl -0x21(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5b8a3
movzbl -0x21(%rbp), %eax
cmpl $0xc2, %eax
jge 0x5b66a
movl $0x0, -0x4(%rbp)
jmp 0x5b8a3
movzbl -0x21(%rbp), %eax
cmpl $0xe0, %eax
jge 0x5b6e0
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x20(%rbp), %rax
jbe 0x5b68f
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x5b8a3
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x5b6ad
movl $0x0, -0x4(%rbp)
jmp 0x5b8a3
movzbl -0x21(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
shlq $0x6, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x5b8a3
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0x5b79c
movq -0x18(%rbp), %rax
addq $0x3, %rax
cmpq -0x20(%rbp), %rax
jbe 0x5b709
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x5b8a3
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x5b747
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x5b747
movzbl -0x21(%rbp), %eax
cmpl $0xe1, %eax
jge 0x5b753
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x5b753
movl $0x0, -0x4(%rbp)
jmp 0x5b8a3
movzbl -0x21(%rbp), %eax
andl $0xf, %eax
movslq %eax, %rcx
shlq $0xc, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x5b8a3
movzbl -0x21(%rbp), %eax
cmpl $0xf5, %eax
jge 0x5b894
movq -0x18(%rbp), %rax
addq $0x4, %rax
cmpq -0x20(%rbp), %rax
jbe 0x5b7c5
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0x5b8a3
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x5b82f
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x5b82f
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x5b82f
movzbl -0x21(%rbp), %eax
cmpl $0xf1, %eax
jge 0x5b815
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x90, %eax
jl 0x5b82f
movzbl -0x21(%rbp), %eax
cmpl $0xf3, %eax
jle 0x5b838
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x8f, %eax
jle 0x5b838
movl $0x0, -0x4(%rbp)
jmp 0x5b8a3
movzbl -0x21(%rbp), %eax
andl $0x7, %eax
movslq %eax, %rcx
shlq $0x12, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0xc, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x5b8a3
jmp 0x5b896
jmp 0x5b898
jmp 0x5b89a
jmp 0x5b89c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_mb_wc_utf8mb4_quick:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_5B626
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_5B8A3
loc_5B626:
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
cmp eax, 80h
jge short loc_5B653
movzx eax, [rbp+var_21]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_5B8A3
loc_5B653:
movzx eax, [rbp+var_21]
cmp eax, 0C2h
jge short loc_5B66A
mov [rbp+var_4], 0
jmp loc_5B8A3
loc_5B66A:
movzx eax, [rbp+var_21]
cmp eax, 0E0h
jge short loc_5B6E0
mov rax, [rbp+var_18]
add rax, 2
cmp rax, [rbp+var_20]
jbe short loc_5B68F
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_5B8A3
loc_5B68F:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_5B6AD
mov [rbp+var_4], 0
jmp loc_5B8A3
loc_5B6AD:
movzx eax, [rbp+var_21]
and eax, 1Fh
movsxd rcx, eax
shl rcx, 6
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_5B8A3
loc_5B6E0:
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge loc_5B79C
mov rax, [rbp+var_18]
add rax, 3
cmp rax, [rbp+var_20]
jbe short loc_5B709
mov [rbp+var_4], 0FFFFFF99h
jmp loc_5B8A3
loc_5B709:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_5B747
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_5B747
movzx eax, [rbp+var_21]
cmp eax, 0E1h
jge short loc_5B753
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_5B753
loc_5B747:
mov [rbp+var_4], 0
jmp loc_5B8A3
loc_5B753:
movzx eax, [rbp+var_21]
and eax, 0Fh
movsxd rcx, eax
shl rcx, 0Ch
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 3
jmp loc_5B8A3
loc_5B79C:
movzx eax, [rbp+var_21]
cmp eax, 0F5h
jge loc_5B894
mov rax, [rbp+var_18]
add rax, 4
cmp rax, [rbp+var_20]
jbe short loc_5B7C5
mov [rbp+var_4], 0FFFFFF98h
jmp loc_5B8A3
loc_5B7C5:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_5B82F
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_5B82F
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_5B82F
movzx eax, [rbp+var_21]
cmp eax, 0F1h
jge short loc_5B815
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 90h
jl short loc_5B82F
loc_5B815:
movzx eax, [rbp+var_21]
cmp eax, 0F3h
jle short loc_5B838
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 8Fh
jle short loc_5B838
loc_5B82F:
mov [rbp+var_4], 0
jmp short loc_5B8A3
loc_5B838:
movzx eax, [rbp+var_21]
and eax, 7
movsxd rcx, eax
shl rcx, 12h
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 0Ch
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 4
jmp short loc_5B8A3
loc_5B894:
jmp short $+2
loc_5B896:
jmp short $+2
loc_5B898:
jmp short $+2
loc_5B89A:
jmp short $+2
loc_5B89C:
mov [rbp+var_4], 0
loc_5B8A3:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_utf8mb4_quick(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3)
{
unsigned __int8 v4; // [rsp+1h] [rbp-21h]
if ( (unsigned long long)a2 < a3 )
{
v4 = *a2;
if ( *a2 >= 0x80u )
{
if ( v4 >= 0xC2u )
{
if ( v4 >= 0xE0u )
{
if ( v4 >= 0xF0u )
{
if ( v4 >= 0xF5u )
{
return 0;
}
else if ( (unsigned long long)(a2 + 4) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64
&& (a2[2] ^ 0x80) < 64
&& (a2[3] ^ 0x80) < 64
&& (v4 >= 0xF1u || a2[1] >= 0x90u)
&& (v4 <= 0xF3u || a2[1] <= 0x8Fu) )
{
*a1 = a2[3] ^ 0x80u | ((long long)(a2[2] ^ 0x80u) << 6) | ((long long)(a2[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18);
return 4;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-104;
}
}
else if ( (unsigned long long)(a2 + 3) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a2[1] >= 0xA0u) )
{
*a1 = a2[2] ^ 0x80u | ((long long)(a2[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12);
return 3;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-103;
}
}
else if ( (unsigned long long)(a2 + 2) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64 )
{
*a1 = a2[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6);
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a1 = v4;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_mb_wc_utf8mb4_quick:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x0015b626
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0015b8a3
LAB_0015b626:
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x80
JGE 0x0015b653
MOVZX EAX,byte ptr [RBP + -0x21]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015b8a3
LAB_0015b653:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xc2
JGE 0x0015b66a
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015b8a3
LAB_0015b66a:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe0
JGE 0x0015b6e0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0015b68f
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0015b8a3
LAB_0015b68f:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x0015b6ad
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015b8a3
LAB_0015b6ad:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x1f
MOVSXD RCX,EAX
SHL RCX,0x6
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0015b8a3
LAB_0015b6e0:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf0
JGE 0x0015b79c
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0015b709
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x0015b8a3
LAB_0015b709:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0015b747
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0015b747
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe1
JGE 0x0015b753
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x0015b753
LAB_0015b747:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015b8a3
LAB_0015b753:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0xf
MOVSXD RCX,EAX
SHL RCX,0xc
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x3
JMP 0x0015b8a3
LAB_0015b79c:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf5
JGE 0x0015b894
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0015b7c5
MOV dword ptr [RBP + -0x4],0xffffff98
JMP 0x0015b8a3
LAB_0015b7c5:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0015b82f
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0015b82f
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0015b82f
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf1
JGE 0x0015b815
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x90
JL 0x0015b82f
LAB_0015b815:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf3
JLE 0x0015b838
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x8f
JLE 0x0015b838
LAB_0015b82f:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015b8a3
LAB_0015b838:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x7
MOVSXD RCX,EAX
SHL RCX,0x12
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0xc
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x4
JMP 0x0015b8a3
LAB_0015b894:
JMP 0x0015b896
LAB_0015b896:
JMP 0x0015b898
LAB_0015b898:
JMP 0x0015b89a
LAB_0015b89a:
JMP 0x0015b89c
LAB_0015b89c:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015b8a3:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3)
{
byte bVar1;
int4 local_c;
if (param_2 < param_3) {
bVar1 = *param_2;
if (bVar1 < 0x80) {
*param_1 = (ulong)bVar1;
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
local_c = 0xffffff9a;
}
else if ((param_2[1] ^ 0x80) < 0x40) {
*param_1 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_2[1] ^ 0x80);
local_c = 2;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf0) {
if (param_3 < param_2 + 3) {
local_c = 0xffffff99;
}
else if ((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_2[1])))) {
*param_1 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_2[1] ^ 0x80) << 6 |
(long)(int)(param_2[2] ^ 0x80);
local_c = 3;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf5) {
if (param_3 < param_2 + 4) {
local_c = 0xffffff98;
}
else if ((((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) &&
((param_2[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_2[1])))) &&
((bVar1 < 0xf4 || (param_2[1] < 0x90)))) {
*param_1 = (long)(int)(bVar1 & 7) << 0x12 | (long)(int)(param_2[1] ^ 0x80) << 0xc |
(long)(int)(param_2[2] ^ 0x80) << 6 | (long)(int)(param_2[3] ^ 0x80);
local_c = 4;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
5,945 | hi0bits | eloqsql/strings/dtoa.c | static int hi0bits(register ULong x)
{
register int k= 0;
if (!(x & 0xffff0000))
{
k= 16;
x<<= 16;
}
if (!(x & 0xff000000))
{
k+= 8;
x<<= 8;
}
if (!(x & 0xf0000000))
{
k+= 4;
x<<= 4;
}
if (!(x & 0xc0000000))
{
k+= 2;
x<<= 2;
}
if (!(x & 0x80000000))
{
k++;
if (!(x & 0x40000000))
return 32;
}
return k;
} | O0 | c | hi0bits:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0xffff0000, %eax # imm = 0xFFFF0000
cmpl $0x0, %eax
jne 0xd175b
movl $0x10, -0xc(%rbp)
movl -0x8(%rbp), %eax
shll $0x10, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0xff000000, %eax # imm = 0xFF000000
cmpl $0x0, %eax
jne 0xd177a
movl -0xc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0xf0000000, %eax # imm = 0xF0000000
cmpl $0x0, %eax
jne 0xd1799
movl -0xc(%rbp), %eax
addl $0x4, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shll $0x4, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0xc0000000, %eax # imm = 0xC0000000
cmpl $0x0, %eax
jne 0xd17b8
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
jne 0xd17e6
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0x40000000, %eax # imm = 0x40000000
cmpl $0x0, %eax
jne 0xd17e4
movl $0x20, -0x4(%rbp)
jmp 0xd17ec
jmp 0xd17e6
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| hi0bits_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
mov [rbp+var_C], 0
mov eax, [rbp+var_8]
and eax, 0FFFF0000h
cmp eax, 0
jnz short loc_D175B
mov [rbp+var_C], 10h
mov eax, [rbp+var_8]
shl eax, 10h
mov [rbp+var_8], eax
loc_D175B:
mov eax, [rbp+var_8]
and eax, 0FF000000h
cmp eax, 0
jnz short loc_D177A
mov eax, [rbp+var_C]
add eax, 8
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
shl eax, 8
mov [rbp+var_8], eax
loc_D177A:
mov eax, [rbp+var_8]
and eax, 0F0000000h
cmp eax, 0
jnz short loc_D1799
mov eax, [rbp+var_C]
add eax, 4
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
shl eax, 4
mov [rbp+var_8], eax
loc_D1799:
mov eax, [rbp+var_8]
and eax, 0C0000000h
cmp eax, 0
jnz short loc_D17B8
mov eax, [rbp+var_C]
add eax, 2
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
shl eax, 2
mov [rbp+var_8], eax
loc_D17B8:
mov eax, [rbp+var_8]
and eax, 80000000h
cmp eax, 0
jnz short loc_D17E6
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
and eax, 40000000h
cmp eax, 0
jnz short loc_D17E4
mov [rbp+var_4], 20h ; ' '
jmp short loc_D17EC
loc_D17E4:
jmp short $+2
loc_D17E6:
mov eax, [rbp+var_C]
mov [rbp+var_4], eax
loc_D17EC:
mov eax, [rbp+var_4]
pop rbp
retn
| long long hi0bits_0(int a1)
{
unsigned int v2; // [rsp+0h] [rbp-Ch]
int v3; // [rsp+4h] [rbp-8h]
v3 = a1;
v2 = 0;
if ( (a1 & 0xFFFF0000) == 0 )
{
v2 = 16;
v3 = a1 << 16;
}
if ( (v3 & 0xFF000000) == 0 )
{
v2 += 8;
v3 <<= 8;
}
if ( (v3 & 0xF0000000) == 0 )
{
v2 += 4;
v3 *= 16;
}
if ( (v3 & 0xC0000000) == 0 )
{
v2 += 2;
v3 *= 4;
}
if ( v3 < 0 )
return v2;
++v2;
if ( (v3 & 0x40000000) != 0 )
return v2;
else
return 32;
}
| hi0bits:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],0x0
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0xffff0000
CMP EAX,0x0
JNZ 0x001d175b
MOV dword ptr [RBP + -0xc],0x10
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x10
MOV dword ptr [RBP + -0x8],EAX
LAB_001d175b:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0xff000000
CMP EAX,0x0
JNZ 0x001d177a
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x8
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x8
MOV dword ptr [RBP + -0x8],EAX
LAB_001d177a:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0xf0000000
CMP EAX,0x0
JNZ 0x001d1799
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x4
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x4
MOV dword ptr [RBP + -0x8],EAX
LAB_001d1799:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0xc0000000
CMP EAX,0x0
JNZ 0x001d17b8
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x2
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x2
MOV dword ptr [RBP + -0x8],EAX
LAB_001d17b8:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0x80000000
CMP EAX,0x0
JNZ 0x001d17e6
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0x40000000
CMP EAX,0x0
JNZ 0x001d17e4
MOV dword ptr [RBP + -0x4],0x20
JMP 0x001d17ec
LAB_001d17e4:
JMP 0x001d17e6
LAB_001d17e6:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x4],EAX
LAB_001d17ec:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int hi0bits(uint param_1)
{
int local_14;
uint local_10;
int local_c;
local_14 = 0;
local_10 = param_1;
if ((param_1 & 0xffff0000) == 0) {
local_14 = 0x10;
local_10 = param_1 << 0x10;
}
if ((local_10 & 0xff000000) == 0) {
local_14 = local_14 + 8;
local_10 = local_10 << 8;
}
if ((local_10 & 0xf0000000) == 0) {
local_14 = local_14 + 4;
local_10 = local_10 << 4;
}
if ((local_10 & 0xc0000000) == 0) {
local_14 = local_14 + 2;
local_10 = local_10 << 2;
}
if (((local_10 & 0x80000000) == 0) && (local_14 = local_14 + 1, (local_10 & 0x40000000) == 0)) {
local_c = 0x20;
}
else {
local_c = local_14;
}
return local_c;
}
|
|
5,946 | plutovg_matrix_parse | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-matrix.c | bool plutovg_matrix_parse(plutovg_matrix_t* matrix, const char* data, int length)
{
float values[6];
plutovg_matrix_init_identity(matrix);
if(length == -1)
length = strlen(data);
const char* it = data;
const char* end = it + length;
bool has_trailing_comma = false;
plutovg_skip_ws(&it, end);
while(it < end) {
if(plutovg_skip_string(&it, end, "matrix")) {
int count = parse_matrix_parameters(&it, end, values, 6, 0);
if(count == 0)
return false;
plutovg_matrix_t m = { values[0], values[1], values[2], values[3], values[4], values[5] };
plutovg_matrix_multiply(matrix, &m, matrix);
} else if(plutovg_skip_string(&it, end, "translate")) {
int count = parse_matrix_parameters(&it, end, values, 1, 1);
if(count == 0)
return false;
if(count == 1) {
plutovg_matrix_translate(matrix, values[0], 0);
} else {
plutovg_matrix_translate(matrix, values[0], values[1]);
}
} else if(plutovg_skip_string(&it, end, "scale")) {
int count = parse_matrix_parameters(&it, end, values, 1, 1);
if(count == 0)
return false;
if(count == 1) {
plutovg_matrix_scale(matrix, values[0], values[0]);
} else {
plutovg_matrix_scale(matrix, values[0], values[1]);
}
} else if(plutovg_skip_string(&it, end, "rotate")) {
int count = parse_matrix_parameters(&it, end, values, 1, 2);
if(count == 0)
return false;
if(count == 3)
plutovg_matrix_translate(matrix, values[1], values[2]);
plutovg_matrix_rotate(matrix, PLUTOVG_DEG2RAD(values[0]));
if(count == 3) {
plutovg_matrix_translate(matrix, -values[1], -values[2]);
}
} else if(plutovg_skip_string(&it, end, "skewX")) {
int count = parse_matrix_parameters(&it, end, values, 1, 0);
if(count == 0)
return false;
plutovg_matrix_shear(matrix, PLUTOVG_DEG2RAD(values[0]), 0);
} else if(plutovg_skip_string(&it, end, "skewY")) {
int count = parse_matrix_parameters(&it, end, values, 1, 0);
if(count == 0)
return false;
plutovg_matrix_shear(matrix, 0, PLUTOVG_DEG2RAD(values[0]));
} else {
return false;
}
plutovg_skip_ws_or_comma(&it, end, &has_trailing_comma);
}
return !has_trailing_comma;
} | O0 | c | plutovg_matrix_parse:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0xb940
cmpl $-0x1, -0x1c(%rbp)
jne 0xc231
movq -0x18(%rbp), %rdi
callq 0x30a0
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movslq -0x1c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movb $0x0, -0x51(%rbp)
movq -0x50(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0xc5b0
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
jae 0xc589
movq -0x50(%rbp), %rsi
leaq -0x48(%rbp), %rdi
leaq 0x2f5a2(%rip), %rdx # 0x3b818
callq 0xc650
testb $0x1, %al
jne 0xc281
jmp 0xc2fe
movq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %rdi
movl $0x6, %ecx
xorl %r8d, %r8d
callq 0xc6f0
movl %eax, -0x58(%rbp)
cmpl $0x0, -0x58(%rbp)
jne 0xc2ac
movb $0x0, -0x1(%rbp)
jmp 0xc593
movss -0x40(%rbp), %xmm0
movss %xmm0, -0x70(%rbp)
movss -0x3c(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
movss -0x38(%rbp), %xmm0
movss %xmm0, -0x68(%rbp)
movss -0x34(%rbp), %xmm0
movss %xmm0, -0x64(%rbp)
movss -0x30(%rbp), %xmm0
movss %xmm0, -0x60(%rbp)
movss -0x2c(%rbp), %xmm0
movss %xmm0, -0x5c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x70(%rbp), %rsi
callq 0xbb10
jmp 0xc573
movq -0x50(%rbp), %rsi
leaq -0x48(%rbp), %rdi
leaq 0x2f512(%rip), %rdx # 0x3b81f
callq 0xc650
testb $0x1, %al
jne 0xc318
jmp 0xc375
movq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %rdi
movl $0x1, %r8d
movl %r8d, %ecx
callq 0xc6f0
movl %eax, -0x74(%rbp)
cmpl $0x0, -0x74(%rbp)
jne 0xc344
movb $0x0, -0x1(%rbp)
jmp 0xc593
cmpl $0x1, -0x74(%rbp)
jne 0xc35d
movq -0x10(%rbp), %rdi
movss -0x40(%rbp), %xmm0
xorps %xmm1, %xmm1
callq 0xbad0
jmp 0xc370
movq -0x10(%rbp), %rdi
movss -0x40(%rbp), %xmm0
movss -0x3c(%rbp), %xmm1
callq 0xbad0
jmp 0xc571
movq -0x50(%rbp), %rsi
leaq -0x48(%rbp), %rdi
leaq 0x2f4a5(%rip), %rdx # 0x3b829
callq 0xc650
testb $0x1, %al
jne 0xc38f
jmp 0xc3ee
movq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %rdi
movl $0x1, %r8d
movl %r8d, %ecx
callq 0xc6f0
movl %eax, -0x78(%rbp)
cmpl $0x0, -0x78(%rbp)
jne 0xc3bb
movb $0x0, -0x1(%rbp)
jmp 0xc593
cmpl $0x1, -0x78(%rbp)
jne 0xc3d6
movq -0x10(%rbp), %rdi
movss -0x40(%rbp), %xmm0
movss -0x40(%rbp), %xmm1
callq 0xbc90
jmp 0xc3e9
movq -0x10(%rbp), %rdi
movss -0x40(%rbp), %xmm0
movss -0x3c(%rbp), %xmm1
callq 0xbc90
jmp 0xc56f
movq -0x50(%rbp), %rsi
leaq -0x48(%rbp), %rdi
leaq 0x2f432(%rip), %rdx # 0x3b82f
callq 0xc650
testb $0x1, %al
jne 0xc40b
jmp 0xc4a0
movq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %rdi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0xc6f0
movl %eax, -0x7c(%rbp)
cmpl $0x0, -0x7c(%rbp)
jne 0xc439
movb $0x0, -0x1(%rbp)
jmp 0xc593
cmpl $0x3, -0x7c(%rbp)
jne 0xc452
movq -0x10(%rbp), %rdi
movss -0x3c(%rbp), %xmm0
movss -0x38(%rbp), %xmm1
callq 0xbad0
movq -0x10(%rbp), %rdi
movss 0x2f3ae(%rip), %xmm0 # 0x3b80c
mulss -0x40(%rbp), %xmm0
callq 0xbcd0
cmpl $0x3, -0x7c(%rbp)
jne 0xc49b
movq -0x10(%rbp), %rdi
movss -0x3c(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm0
movss -0x38(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm1
callq 0xbad0
jmp 0xc56d
movq -0x50(%rbp), %rsi
leaq -0x48(%rbp), %rdi
leaq 0x2f387(%rip), %rdx # 0x3b836
callq 0xc650
testb $0x1, %al
jne 0xc4ba
jmp 0xc500
movq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %rdi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0xc6f0
movl %eax, -0x80(%rbp)
cmpl $0x0, -0x80(%rbp)
jne 0xc4e5
movb $0x0, -0x1(%rbp)
jmp 0xc593
movq -0x10(%rbp), %rdi
movss 0x2f31b(%rip), %xmm0 # 0x3b80c
mulss -0x40(%rbp), %xmm0
xorps %xmm1, %xmm1
callq 0xbd10
jmp 0xc56b
movq -0x50(%rbp), %rsi
leaq -0x48(%rbp), %rdi
leaq 0x2f32d(%rip), %rdx # 0x3b83c
callq 0xc650
testb $0x1, %al
jne 0xc51a
jmp 0xc563
movq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %rdi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0xc6f0
movl %eax, -0x84(%rbp)
cmpl $0x0, -0x84(%rbp)
jne 0xc548
movb $0x0, -0x1(%rbp)
jmp 0xc593
movq -0x10(%rbp), %rdi
movss 0x2f2b8(%rip), %xmm1 # 0x3b80c
mulss -0x40(%rbp), %xmm1
xorps %xmm0, %xmm0
callq 0xbd10
jmp 0xc569
movb $0x0, -0x1(%rbp)
jmp 0xc593
jmp 0xc56b
jmp 0xc56d
jmp 0xc56f
jmp 0xc571
jmp 0xc573
movq -0x50(%rbp), %rsi
leaq -0x48(%rbp), %rdi
leaq -0x51(%rbp), %rdx
callq 0xc7d0
jmp 0xc259
movb -0x51(%rbp), %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| plutovg_matrix_parse:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rdi, [rbp+var_10]
call plutovg_matrix_init_identity
cmp [rbp+var_1C], 0FFFFFFFFh
jnz short loc_C231
mov rdi, [rbp+var_18]
call _strlen
mov [rbp+var_1C], eax
loc_C231:
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_1C]
add rax, rcx
mov [rbp+var_50], rax
mov [rbp+var_51], 0
mov rsi, [rbp+var_50]
lea rdi, [rbp+var_48]
call plutovg_skip_ws
loc_C259:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_50]
jnb loc_C589
mov rsi, [rbp+var_50]
lea rdi, [rbp+var_48]
lea rdx, aMatrix; "matrix"
call plutovg_skip_string
test al, 1
jnz short loc_C281
jmp short loc_C2FE
loc_C281:
mov rsi, [rbp+var_50]
lea rdx, [rbp+var_40]
lea rdi, [rbp+var_48]
mov ecx, 6
xor r8d, r8d
call parse_matrix_parameters
mov [rbp+var_58], eax
cmp [rbp+var_58], 0
jnz short loc_C2AC
mov [rbp+var_1], 0
jmp loc_C593
loc_C2AC:
movss xmm0, [rbp+var_40]
movss [rbp+var_70], xmm0
movss xmm0, [rbp+var_3C]
movss [rbp+var_6C], xmm0
movss xmm0, [rbp+var_38]
movss [rbp+var_68], xmm0
movss xmm0, [rbp+var_34]
movss [rbp+var_64], xmm0
movss xmm0, [rbp+var_30]
movss [rbp+var_60], xmm0
movss xmm0, [rbp+var_2C]
movss [rbp+var_5C], xmm0
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_10]
lea rsi, [rbp+var_70]
call plutovg_matrix_multiply
jmp loc_C573
loc_C2FE:
mov rsi, [rbp+var_50]
lea rdi, [rbp+var_48]
lea rdx, aTranslate; "translate"
call plutovg_skip_string
test al, 1
jnz short loc_C318
jmp short loc_C375
loc_C318:
mov rsi, [rbp+var_50]
lea rdx, [rbp+var_40]
lea rdi, [rbp+var_48]
mov r8d, 1
mov ecx, r8d
call parse_matrix_parameters
mov [rbp+var_74], eax
cmp [rbp+var_74], 0
jnz short loc_C344
mov [rbp+var_1], 0
jmp loc_C593
loc_C344:
cmp [rbp+var_74], 1
jnz short loc_C35D
mov rdi, [rbp+var_10]
movss xmm0, [rbp+var_40]
xorps xmm1, xmm1
call plutovg_matrix_translate
jmp short loc_C370
loc_C35D:
mov rdi, [rbp+var_10]
movss xmm0, [rbp+var_40]
movss xmm1, [rbp+var_3C]
call plutovg_matrix_translate
loc_C370:
jmp loc_C571
loc_C375:
mov rsi, [rbp+var_50]
lea rdi, [rbp+var_48]
lea rdx, aScale; "scale"
call plutovg_skip_string
test al, 1
jnz short loc_C38F
jmp short loc_C3EE
loc_C38F:
mov rsi, [rbp+var_50]
lea rdx, [rbp+var_40]
lea rdi, [rbp+var_48]
mov r8d, 1
mov ecx, r8d
call parse_matrix_parameters
mov [rbp+var_78], eax
cmp [rbp+var_78], 0
jnz short loc_C3BB
mov [rbp+var_1], 0
jmp loc_C593
loc_C3BB:
cmp [rbp+var_78], 1
jnz short loc_C3D6
mov rdi, [rbp+var_10]
movss xmm0, [rbp+var_40]
movss xmm1, [rbp+var_40]
call plutovg_matrix_scale
jmp short loc_C3E9
loc_C3D6:
mov rdi, [rbp+var_10]
movss xmm0, [rbp+var_40]
movss xmm1, [rbp+var_3C]
call plutovg_matrix_scale
loc_C3E9:
jmp loc_C56F
loc_C3EE:
mov rsi, [rbp+var_50]
lea rdi, [rbp+var_48]
lea rdx, aRotate; "rotate"
call plutovg_skip_string
test al, 1
jnz short loc_C40B
jmp loc_C4A0
loc_C40B:
mov rsi, [rbp+var_50]
lea rdx, [rbp+var_40]
lea rdi, [rbp+var_48]
mov ecx, 1
mov r8d, 2
call parse_matrix_parameters
mov [rbp+var_7C], eax
cmp [rbp+var_7C], 0
jnz short loc_C439
mov [rbp+var_1], 0
jmp loc_C593
loc_C439:
cmp [rbp+var_7C], 3
jnz short loc_C452
mov rdi, [rbp+var_10]
movss xmm0, [rbp+var_3C]
movss xmm1, [rbp+var_38]
call plutovg_matrix_translate
loc_C452:
mov rdi, [rbp+var_10]
movss xmm0, cs:dword_3B80C
mulss xmm0, [rbp+var_40]
call plutovg_matrix_rotate
cmp [rbp+var_7C], 3
jnz short loc_C49B
mov rdi, [rbp+var_10]
movss xmm0, [rbp+var_3C]
movd eax, xmm0
xor eax, 80000000h
movd xmm0, eax
movss xmm1, [rbp+var_38]
movd eax, xmm1
xor eax, 80000000h
movd xmm1, eax
call plutovg_matrix_translate
loc_C49B:
jmp loc_C56D
loc_C4A0:
mov rsi, [rbp+var_50]
lea rdi, [rbp+var_48]
lea rdx, aSkewx; "skewX"
call plutovg_skip_string
test al, 1
jnz short loc_C4BA
jmp short loc_C500
loc_C4BA:
mov rsi, [rbp+var_50]
lea rdx, [rbp+var_40]
lea rdi, [rbp+var_48]
mov ecx, 1
xor r8d, r8d
call parse_matrix_parameters
mov [rbp+var_80], eax
cmp [rbp+var_80], 0
jnz short loc_C4E5
mov [rbp+var_1], 0
jmp loc_C593
loc_C4E5:
mov rdi, [rbp+var_10]
movss xmm0, cs:dword_3B80C
mulss xmm0, [rbp+var_40]
xorps xmm1, xmm1
call plutovg_matrix_shear
jmp short loc_C56B
loc_C500:
mov rsi, [rbp+var_50]
lea rdi, [rbp+var_48]
lea rdx, aSkewy; "skewY"
call plutovg_skip_string
test al, 1
jnz short loc_C51A
jmp short loc_C563
loc_C51A:
mov rsi, [rbp+var_50]
lea rdx, [rbp+var_40]
lea rdi, [rbp+var_48]
mov ecx, 1
xor r8d, r8d
call parse_matrix_parameters
mov [rbp+var_84], eax
cmp [rbp+var_84], 0
jnz short loc_C548
mov [rbp+var_1], 0
jmp short loc_C593
loc_C548:
mov rdi, [rbp+var_10]
movss xmm1, cs:dword_3B80C
mulss xmm1, [rbp+var_40]
xorps xmm0, xmm0
call plutovg_matrix_shear
jmp short loc_C569
loc_C563:
mov [rbp+var_1], 0
jmp short loc_C593
loc_C569:
jmp short $+2
loc_C56B:
jmp short $+2
loc_C56D:
jmp short $+2
loc_C56F:
jmp short $+2
loc_C571:
jmp short $+2
loc_C573:
mov rsi, [rbp+var_50]
lea rdi, [rbp+var_48]
lea rdx, [rbp+var_51]
call plutovg_skip_ws_or_comma
jmp loc_C259
loc_C589:
mov al, [rbp+var_51]
xor al, 0FFh
and al, 1
mov [rbp+var_1], al
loc_C593:
mov al, [rbp+var_1]
and al, 1
add rsp, 90h
pop rbp
retn
| bool plutovg_matrix_parse(float *a1, unsigned long long a2, int a3)
{
int v4; // [rsp+14h] [rbp-7Ch]
int v5; // [rsp+18h] [rbp-78h]
int v6; // [rsp+1Ch] [rbp-74h]
float v7[6]; // [rsp+20h] [rbp-70h] BYREF
char v9; // [rsp+3Fh] [rbp-51h] BYREF
unsigned long long v10; // [rsp+40h] [rbp-50h]
unsigned long long v11; // [rsp+48h] [rbp-48h] BYREF
float v12; // [rsp+50h] [rbp-40h] BYREF
float v13; // [rsp+54h] [rbp-3Ch]
float v14; // [rsp+58h] [rbp-38h]
float v15; // [rsp+5Ch] [rbp-34h]
float v16; // [rsp+60h] [rbp-30h]
float v17; // [rsp+64h] [rbp-2Ch]
int v18; // [rsp+74h] [rbp-1Ch]
unsigned long long v19; // [rsp+78h] [rbp-18h]
float *v20; // [rsp+80h] [rbp-10h]
v20 = a1;
v19 = a2;
v18 = a3;
plutovg_matrix_init_identity(a1);
if ( v18 == -1 )
v18 = strlen(v19);
v11 = v19;
v10 = v18 + v19;
v9 = 0;
plutovg_skip_ws(&v11, v10);
while ( v11 < v10 )
{
if ( (plutovg_skip_string(&v11, v10, "matrix") & 1) != 0 )
{
if ( !(unsigned int)parse_matrix_parameters(&v11, v10, &v12, 6LL, 0LL) )
return 0;
v7[0] = v12;
v7[1] = v13;
v7[2] = v14;
v7[3] = v15;
v7[4] = v16;
v7[5] = v17;
plutovg_matrix_multiply(v20, v7, v20);
}
else if ( (plutovg_skip_string(&v11, v10, "translate") & 1) != 0 )
{
v6 = parse_matrix_parameters(&v11, v10, &v12, 1LL, 1LL);
if ( !v6 )
return 0;
if ( v6 == 1 )
plutovg_matrix_translate((long long)v20, v12, 0.0);
else
plutovg_matrix_translate((long long)v20, v12, v13);
}
else if ( (plutovg_skip_string(&v11, v10, "scale") & 1) != 0 )
{
v5 = parse_matrix_parameters(&v11, v10, &v12, 1LL, 1LL);
if ( !v5 )
return 0;
if ( v5 == 1 )
plutovg_matrix_scale(v20, v12, v12);
else
plutovg_matrix_scale(v20, v12, v13);
}
else if ( (plutovg_skip_string(&v11, v10, "rotate") & 1) != 0 )
{
v4 = parse_matrix_parameters(&v11, v10, &v12, 1LL, 2LL);
if ( !v4 )
return 0;
if ( v4 == 3 )
plutovg_matrix_translate((long long)v20, v13, v14);
plutovg_matrix_rotate(v20, 0.017453292 * v12);
if ( v4 == 3 )
plutovg_matrix_translate(
(long long)v20,
COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)LODWORD(v13)) ^ 0x80000000),
COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)LODWORD(v14)) ^ 0x80000000));
}
else if ( (plutovg_skip_string(&v11, v10, "skewX") & 1) != 0 )
{
if ( !(unsigned int)parse_matrix_parameters(&v11, v10, &v12, 1LL, 0LL) )
return 0;
plutovg_matrix_shear(v20, 0.017453292 * v12, 0.0);
}
else
{
if ( (plutovg_skip_string(&v11, v10, "skewY") & 1) == 0 )
return 0;
if ( !(unsigned int)parse_matrix_parameters(&v11, v10, &v12, 1LL, 0LL) )
return 0;
plutovg_matrix_shear(v20, 0.0, 0.017453292 * v12);
}
plutovg_skip_ws_or_comma(&v11, v10, &v9);
}
return (v9 & 1) == 0;
}
| plutovg_matrix_parse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010b940
CMP dword ptr [RBP + -0x1c],-0x1
JNZ 0x0010c231
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001030a0
MOV dword ptr [RBP + -0x1c],EAX
LAB_0010c231:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x1c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV byte ptr [RBP + -0x51],0x0
MOV RSI,qword ptr [RBP + -0x50]
LEA RDI,[RBP + -0x48]
CALL 0x0010c5b0
LAB_0010c259:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x50]
JNC 0x0010c589
MOV RSI,qword ptr [RBP + -0x50]
LEA RDI,[RBP + -0x48]
LEA RDX,[0x13b818]
CALL 0x0010c650
TEST AL,0x1
JNZ 0x0010c281
JMP 0x0010c2fe
LAB_0010c281:
MOV RSI,qword ptr [RBP + -0x50]
LEA RDX,[RBP + -0x40]
LEA RDI,[RBP + -0x48]
MOV ECX,0x6
XOR R8D,R8D
CALL 0x0010c6f0
MOV dword ptr [RBP + -0x58],EAX
CMP dword ptr [RBP + -0x58],0x0
JNZ 0x0010c2ac
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0010c593
LAB_0010c2ac:
MOVSS XMM0,dword ptr [RBP + -0x40]
MOVSS dword ptr [RBP + -0x70],XMM0
MOVSS XMM0,dword ptr [RBP + -0x3c]
MOVSS dword ptr [RBP + -0x6c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x38]
MOVSS dword ptr [RBP + -0x68],XMM0
MOVSS XMM0,dword ptr [RBP + -0x34]
MOVSS dword ptr [RBP + -0x64],XMM0
MOVSS XMM0,dword ptr [RBP + -0x30]
MOVSS dword ptr [RBP + -0x60],XMM0
MOVSS XMM0,dword ptr [RBP + -0x2c]
MOVSS dword ptr [RBP + -0x5c],XMM0
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x70]
CALL 0x0010bb10
JMP 0x0010c573
LAB_0010c2fe:
MOV RSI,qword ptr [RBP + -0x50]
LEA RDI,[RBP + -0x48]
LEA RDX,[0x13b81f]
CALL 0x0010c650
TEST AL,0x1
JNZ 0x0010c318
JMP 0x0010c375
LAB_0010c318:
MOV RSI,qword ptr [RBP + -0x50]
LEA RDX,[RBP + -0x40]
LEA RDI,[RBP + -0x48]
MOV R8D,0x1
MOV ECX,R8D
CALL 0x0010c6f0
MOV dword ptr [RBP + -0x74],EAX
CMP dword ptr [RBP + -0x74],0x0
JNZ 0x0010c344
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0010c593
LAB_0010c344:
CMP dword ptr [RBP + -0x74],0x1
JNZ 0x0010c35d
MOV RDI,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RBP + -0x40]
XORPS XMM1,XMM1
CALL 0x0010bad0
JMP 0x0010c370
LAB_0010c35d:
MOV RDI,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RBP + -0x40]
MOVSS XMM1,dword ptr [RBP + -0x3c]
CALL 0x0010bad0
LAB_0010c370:
JMP 0x0010c571
LAB_0010c375:
MOV RSI,qword ptr [RBP + -0x50]
LEA RDI,[RBP + -0x48]
LEA RDX,[0x13b829]
CALL 0x0010c650
TEST AL,0x1
JNZ 0x0010c38f
JMP 0x0010c3ee
LAB_0010c38f:
MOV RSI,qword ptr [RBP + -0x50]
LEA RDX,[RBP + -0x40]
LEA RDI,[RBP + -0x48]
MOV R8D,0x1
MOV ECX,R8D
CALL 0x0010c6f0
MOV dword ptr [RBP + -0x78],EAX
CMP dword ptr [RBP + -0x78],0x0
JNZ 0x0010c3bb
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0010c593
LAB_0010c3bb:
CMP dword ptr [RBP + -0x78],0x1
JNZ 0x0010c3d6
MOV RDI,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RBP + -0x40]
MOVSS XMM1,dword ptr [RBP + -0x40]
CALL 0x0010bc90
JMP 0x0010c3e9
LAB_0010c3d6:
MOV RDI,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RBP + -0x40]
MOVSS XMM1,dword ptr [RBP + -0x3c]
CALL 0x0010bc90
LAB_0010c3e9:
JMP 0x0010c56f
LAB_0010c3ee:
MOV RSI,qword ptr [RBP + -0x50]
LEA RDI,[RBP + -0x48]
LEA RDX,[0x13b82f]
CALL 0x0010c650
TEST AL,0x1
JNZ 0x0010c40b
JMP 0x0010c4a0
LAB_0010c40b:
MOV RSI,qword ptr [RBP + -0x50]
LEA RDX,[RBP + -0x40]
LEA RDI,[RBP + -0x48]
MOV ECX,0x1
MOV R8D,0x2
CALL 0x0010c6f0
MOV dword ptr [RBP + -0x7c],EAX
CMP dword ptr [RBP + -0x7c],0x0
JNZ 0x0010c439
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0010c593
LAB_0010c439:
CMP dword ptr [RBP + -0x7c],0x3
JNZ 0x0010c452
MOV RDI,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RBP + -0x3c]
MOVSS XMM1,dword ptr [RBP + -0x38]
CALL 0x0010bad0
LAB_0010c452:
MOV RDI,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [0x0013b80c]
MULSS XMM0,dword ptr [RBP + -0x40]
CALL 0x0010bcd0
CMP dword ptr [RBP + -0x7c],0x3
JNZ 0x0010c49b
MOV RDI,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RBP + -0x3c]
MOVD EAX,XMM0
XOR EAX,0x80000000
MOVD XMM0,EAX
MOVSS XMM1,dword ptr [RBP + -0x38]
MOVD EAX,XMM1
XOR EAX,0x80000000
MOVD XMM1,EAX
CALL 0x0010bad0
LAB_0010c49b:
JMP 0x0010c56d
LAB_0010c4a0:
MOV RSI,qword ptr [RBP + -0x50]
LEA RDI,[RBP + -0x48]
LEA RDX,[0x13b836]
CALL 0x0010c650
TEST AL,0x1
JNZ 0x0010c4ba
JMP 0x0010c500
LAB_0010c4ba:
MOV RSI,qword ptr [RBP + -0x50]
LEA RDX,[RBP + -0x40]
LEA RDI,[RBP + -0x48]
MOV ECX,0x1
XOR R8D,R8D
CALL 0x0010c6f0
MOV dword ptr [RBP + -0x80],EAX
CMP dword ptr [RBP + -0x80],0x0
JNZ 0x0010c4e5
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0010c593
LAB_0010c4e5:
MOV RDI,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [0x0013b80c]
MULSS XMM0,dword ptr [RBP + -0x40]
XORPS XMM1,XMM1
CALL 0x0010bd10
JMP 0x0010c56b
LAB_0010c500:
MOV RSI,qword ptr [RBP + -0x50]
LEA RDI,[RBP + -0x48]
LEA RDX,[0x13b83c]
CALL 0x0010c650
TEST AL,0x1
JNZ 0x0010c51a
JMP 0x0010c563
LAB_0010c51a:
MOV RSI,qword ptr [RBP + -0x50]
LEA RDX,[RBP + -0x40]
LEA RDI,[RBP + -0x48]
MOV ECX,0x1
XOR R8D,R8D
CALL 0x0010c6f0
MOV dword ptr [RBP + -0x84],EAX
CMP dword ptr [RBP + -0x84],0x0
JNZ 0x0010c548
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0010c593
LAB_0010c548:
MOV RDI,qword ptr [RBP + -0x10]
MOVSS XMM1,dword ptr [0x0013b80c]
MULSS XMM1,dword ptr [RBP + -0x40]
XORPS XMM0,XMM0
CALL 0x0010bd10
JMP 0x0010c569
LAB_0010c563:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0010c593
LAB_0010c569:
JMP 0x0010c56b
LAB_0010c56b:
JMP 0x0010c56d
LAB_0010c56d:
JMP 0x0010c56f
LAB_0010c56f:
JMP 0x0010c571
LAB_0010c571:
JMP 0x0010c573
LAB_0010c573:
MOV RSI,qword ptr [RBP + -0x50]
LEA RDI,[RBP + -0x48]
LEA RDX,[RBP + -0x51]
CALL 0x0010c7d0
JMP 0x0010c259
LAB_0010c589:
MOV AL,byte ptr [RBP + -0x51]
XOR AL,0xff
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_0010c593:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x90
POP RBP
RET
|
byte plutovg_matrix_parse(int8 param_1,char *param_2,int param_3)
{
int iVar1;
size_t sVar2;
ulong uVar3;
float local_78;
uint local_74;
uint local_70;
int4 local_6c;
int4 local_68;
int4 local_64;
int local_60;
byte local_59;
char *local_58;
char *local_50;
float local_48;
uint local_44;
uint local_40;
int4 local_3c;
int4 local_38;
int4 local_34;
int local_24;
char *local_20;
int8 local_18;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
plutovg_matrix_init_identity(param_1);
if (local_24 == -1) {
sVar2 = strlen(local_20);
local_24 = (int)sVar2;
}
local_50 = local_20;
local_58 = local_20 + local_24;
local_59 = 0;
plutovg_skip_ws(&local_50,local_58);
do {
if (local_58 <= local_50) {
return (local_59 ^ 0xff) & 1;
}
uVar3 = plutovg_skip_string(&local_50,local_58,"matrix");
if ((uVar3 & 1) == 0) {
uVar3 = plutovg_skip_string(&local_50,local_58,"translate");
if ((uVar3 & 1) == 0) {
uVar3 = plutovg_skip_string(&local_50,local_58,"scale");
if ((uVar3 & 1) == 0) {
uVar3 = plutovg_skip_string(&local_50,local_58,"rotate");
if ((uVar3 & 1) == 0) {
uVar3 = plutovg_skip_string(&local_50,local_58,"skewX");
if ((uVar3 & 1) == 0) {
uVar3 = plutovg_skip_string(&local_50,local_58,"skewY");
if ((uVar3 & 1) == 0) {
return 0;
}
iVar1 = parse_matrix_parameters(&local_50,local_58,&local_48,1,0);
if (iVar1 == 0) {
return 0;
}
plutovg_matrix_shear(local_18);
}
else {
iVar1 = parse_matrix_parameters(&local_50,local_58,&local_48,1,0);
if (iVar1 == 0) {
return 0;
}
plutovg_matrix_shear(DAT_0013b80c * local_48,local_18);
}
}
else {
iVar1 = parse_matrix_parameters(&local_50,local_58,&local_48,1,2);
if (iVar1 == 0) {
return 0;
}
if (iVar1 == 3) {
plutovg_matrix_translate(local_18);
}
plutovg_matrix_rotate(DAT_0013b80c * local_48,local_18);
if (iVar1 == 3) {
plutovg_matrix_translate(local_44 ^ 0x80000000,local_40 ^ 0x80000000,local_18);
}
}
}
else {
iVar1 = parse_matrix_parameters(&local_50,local_58,&local_48,1);
if (iVar1 == 0) {
return 0;
}
if (iVar1 == 1) {
plutovg_matrix_scale(local_18);
}
else {
plutovg_matrix_scale(local_18);
}
}
}
else {
iVar1 = parse_matrix_parameters(&local_50,local_58,&local_48,1);
if (iVar1 == 0) {
return 0;
}
if (iVar1 == 1) {
plutovg_matrix_translate(local_18);
}
else {
plutovg_matrix_translate(local_18);
}
}
}
else {
local_60 = parse_matrix_parameters(&local_50,local_58,&local_48,6,0);
if (local_60 == 0) {
return 0;
}
local_78 = local_48;
local_74 = local_44;
local_70 = local_40;
local_6c = local_3c;
local_68 = local_38;
local_64 = local_34;
plutovg_matrix_multiply(local_18,&local_78,local_18);
}
plutovg_skip_ws_or_comma(&local_50,local_58,&local_59);
} while( true );
}
|
|
5,947 | bool nlohmann::json_abi_v3_11_3::operator!=<bool, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool) | monkey531[P]llama/common/json.hpp | bool operator!=(const_reference lhs, ScalarType rhs) noexcept
{
return lhs != basic_json(rhs);
} | O3 | cpp | bool nlohmann::json_abi_v3_11_3::operator!=<bool, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq %r14, %rdi
callq 0x5f4cc
movq %r14, %rdi
movl $0x1, %esi
callq 0x57ee4
movq %rbx, %rdi
movq %r14, %rsi
callq 0xaac79
movl %eax, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x57ee4
movq %r14, %rdi
callq 0x5d352
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN8nlohmann16json_abi_v3_11_3neIbTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
xorps xmm0, xmm0
mov r14, rsp
movaps xmmword ptr [r14], xmm0
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE4EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_9boolean_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::boolean_t)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_3neERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator!=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov ebx, eax
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 eax, ebx
add rsp, 18h
pop rbx
pop r14
retn
| long long ZN8nlohmann16json_abi_v3_11_3neIbTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_(
unsigned __int8 *a1,
unsigned __int8 a2)
{
unsigned int v2; // eax
unsigned int v3; // ebx
_OWORD v5[2]; // [rsp+0h] [rbp-28h] BYREF
v5[0] = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)v5,
a2);
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);
LOBYTE(v2) = nlohmann::json_abi_v3_11_3::operator!=(a1, (unsigned __int8 *)v5, (__m128d)0LL);
v3 = v2;
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 v3;
}
| _ZN8nlohmann16json_abi_v3_11_3neIbTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
XORPS XMM0,XMM0
MOV R14,RSP
MOVAPS xmmword ptr [R14],XMM0
MOV RDI,R14
CALL 0x0015f4cc
MOV RDI,R14
MOV ESI,0x1
CALL 0x00157ee4
MOV RDI,RBX
MOV RSI,R14
CALL 0x001aac79
MOV EBX,EAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00157ee4
MOV RDI,R14
CALL 0x0015d352
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R14
RET
|
int4
_ZN8nlohmann16json_abi_v3_11_3neIbTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_
(basic_json *param_1)
{
int4 uVar1;
int8 local_28;
int8 uStack_20;
local_28 = 0;
uStack_20 = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(&local_28);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_28,0));
uVar1 = nlohmann::json_abi_v3_11_3::operator!=(param_1,(basic_json *)&local_28);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_28,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_28);
return uVar1;
}
|
|
5,948 | my_longlong10_to_str_8bit | eloqsql/strings/ctype-simple.c | size_t my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
char *dst, size_t len, int radix,
longlong val)
{
char buffer[65];
register char *p, *e;
long long_val;
uint sign= 0;
ulonglong uval = (ulonglong)val;
if (radix < 0)
{
if (val < 0)
{
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (ulonglong)0 - uval;
*dst++= '-';
len--;
sign= 1;
}
}
e = p = &buffer[sizeof(buffer)-1];
*p= 0;
if (uval == 0)
{
*--p= '0';
len= 1;
goto cnv;
}
while (uval > (ulonglong) LONG_MAX)
{
ulonglong quo= uval/(uint) 10;
uint rem= (uint) (uval- quo* (uint) 10);
*--p = '0' + rem;
uval= quo;
}
long_val= (long) uval;
while (long_val != 0)
{
long quo= long_val/10;
*--p = (char) ('0' + (long_val - quo*10));
long_val= quo;
}
len= MY_MIN(len, (size_t) (e-p));
cnv:
memcpy(dst, p, len);
return len+sign;
} | O3 | c | my_longlong10_to_str_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r9
movq %rsi, %rdi
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
testl %ecx, %ecx
setns %al
testq %r8, %r8
setns %cl
orb %al, %cl
jne 0x38ebe
negq %r8
movb $0x2d, (%rdi)
incq %rdi
decq %r9
leaq -0x20(%rbp), %rbx
movb $0x0, (%rbx)
movl $0x1, %r14d
jmp 0x38ed2
movb $0x0, -0x20(%rbp)
testq %r8, %r8
je 0x38f5e
leaq -0x20(%rbp), %rbx
xorl %r14d, %r14d
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
testq %r8, %r8
js 0x38ee6
movq %rbx, %rsi
jmp 0x38f07
movq %r8, %rax
mulq %rcx
shrq $0x3, %rdx
leaq -0x21(%rbp), %rsi
imull $0xf6, %edx, %eax
addl %eax, %r8d
addb $0x30, %r8b
movb %r8b, (%rsi)
movq %rdx, %r8
subq %rsi, %rbx
movq %r8, %rax
mulq %rcx
shrq $0x3, %rdx
imull $0xf6, %edx, %eax
addl %r8d, %eax
addb $0x30, %al
movb %al, -0x1(%rsi)
decq %rsi
incq %rbx
cmpq $0x9, %r8
movq %rdx, %r8
ja 0x38f0a
cmpq %rbx, %r9
cmovbq %r9, %rbx
movq %rbx, %rdx
callq 0x24290
movq %fs:0x28, %rax
cmpq -0x18(%rbp), %rax
jne 0x38f6f
addq %r14, %rbx
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x21(%rbp), %rsi
movb $0x30, (%rsi)
movl $0x1, %ebx
xorl %r14d, %r14d
jmp 0x38f38
callq 0x24390
| my_longlong10_to_str_8bit:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov r9, rdx
mov rdi, rsi
mov rax, fs:28h
mov [rbp+var_18], rax
test ecx, ecx
setns al
test r8, r8
setns cl
or cl, al
jnz short loc_38EBE
neg r8
mov byte ptr [rdi], 2Dh ; '-'
inc rdi
dec r9
lea rbx, [rbp+var_20]
mov byte ptr [rbx], 0
mov r14d, 1
jmp short loc_38ED2
loc_38EBE:
mov [rbp+var_20], 0
test r8, r8
jz loc_38F5E
lea rbx, [rbp+var_20]
xor r14d, r14d
loc_38ED2:
mov rcx, 0CCCCCCCCCCCCCCCDh
test r8, r8
js short loc_38EE6
mov rsi, rbx
jmp short loc_38F07
loc_38EE6:
mov rax, r8
mul rcx
shr rdx, 3
lea rsi, [rbp+var_21]
imul eax, edx, 0F6h
add r8d, eax
add r8b, 30h ; '0'
mov [rsi], r8b
mov r8, rdx
loc_38F07:
sub rbx, rsi
loc_38F0A:
mov rax, r8
mul rcx
shr rdx, 3
imul eax, edx, 0F6h
add eax, r8d
add al, 30h ; '0'
mov [rsi-1], al
dec rsi
inc rbx
cmp r8, 9
mov r8, rdx
ja short loc_38F0A
cmp r9, rbx
cmovb rbx, r9
loc_38F38:
mov rdx, rbx
call _memcpy
mov rax, fs:28h
cmp rax, [rbp+var_18]
jnz short loc_38F6F
add rbx, r14
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_38F5E:
lea rsi, [rbp+var_21]
mov byte ptr [rsi], 30h ; '0'
mov ebx, 1
xor r14d, r14d
jmp short loc_38F38
loc_38F6F:
call ___stack_chk_fail
| _BYTE * my_longlong10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, unsigned long long a5)
{
_BYTE *v5; // r9
_BYTE *v6; // rdi
long long v7; // r14
char *v8; // rsi
_BYTE *v9; // rbx
bool v10; // cc
char v12; // [rsp+3Fh] [rbp-21h] BYREF
_BYTE v13[8]; // [rsp+40h] [rbp-20h] BYREF
unsigned long long v14; // [rsp+48h] [rbp-18h]
v5 = a3;
v6 = a2;
v14 = __readfsqword(0x28u);
if ( a4 >= 0 || (a5 & 0x8000000000000000LL) == 0LL )
{
v13[0] = 0;
if ( !a5 )
{
v8 = &v12;
v12 = 48;
v9 = (_BYTE *)(&dword_0 + 1);
v7 = 0LL;
goto LABEL_12;
}
v7 = 0LL;
}
else
{
a5 = -(long long)a5;
*a2 = 45;
v6 = a2 + 1;
v5 = a3 - 1;
v13[0] = 0;
v7 = 1LL;
}
if ( (a5 & 0x8000000000000000LL) != 0LL )
{
v8 = &v12;
v12 = a5 % 0xA + 48;
a5 /= 0xAuLL;
}
else
{
v8 = v13;
}
v9 = (_BYTE *)(v13 - v8);
do
{
*--v8 = a5 % 0xA + 48;
++v9;
v10 = a5 <= 9;
a5 /= 0xAuLL;
}
while ( !v10 );
if ( v5 < v9 )
v9 = v5;
LABEL_12:
memcpy(v6, v8, v9);
return &v9[v7];
}
| my_longlong10_to_str_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R9,RDX
MOV RDI,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
TEST ECX,ECX
SETNS AL
TEST R8,R8
SETNS CL
OR CL,AL
JNZ 0x00138ebe
NEG R8
MOV byte ptr [RDI],0x2d
INC RDI
DEC R9
LEA RBX,[RBP + -0x20]
MOV byte ptr [RBX],0x0
MOV R14D,0x1
JMP 0x00138ed2
LAB_00138ebe:
MOV byte ptr [RBP + -0x20],0x0
TEST R8,R8
JZ 0x00138f5e
LEA RBX,[RBP + -0x20]
XOR R14D,R14D
LAB_00138ed2:
MOV RCX,-0x3333333333333333
TEST R8,R8
JS 0x00138ee6
MOV RSI,RBX
JMP 0x00138f07
LAB_00138ee6:
MOV RAX,R8
MUL RCX
SHR RDX,0x3
LEA RSI,[RBP + -0x21]
IMUL EAX,EDX,0xf6
ADD R8D,EAX
ADD R8B,0x30
MOV byte ptr [RSI],R8B
MOV R8,RDX
LAB_00138f07:
SUB RBX,RSI
LAB_00138f0a:
MOV RAX,R8
MUL RCX
SHR RDX,0x3
IMUL EAX,EDX,0xf6
ADD EAX,R8D
ADD AL,0x30
MOV byte ptr [RSI + -0x1],AL
DEC RSI
INC RBX
CMP R8,0x9
MOV R8,RDX
JA 0x00138f0a
CMP R9,RBX
CMOVC RBX,R9
LAB_00138f38:
MOV RDX,RBX
CALL 0x00124290
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x00138f6f
ADD RBX,R14
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_00138f5e:
LEA RSI,[RBP + -0x21]
MOV byte ptr [RSI],0x30
MOV EBX,0x1
XOR R14D,R14D
JMP 0x00138f38
LAB_00138f6f:
CALL 0x00124390
|
long my_longlong10_to_str_8bit
(int8 param_1,int1 *param_2,ulong param_3,int param_4,ulong param_5)
{
bool bVar1;
ulong __n;
char *__src;
long lVar2;
long in_FS_OFFSET;
char local_29 [9];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
if ((long)param_5 < 0 && param_4 < 0) {
param_5 = -param_5;
*param_2 = 0x2d;
param_2 = param_2 + 1;
param_3 = param_3 - 1;
lVar2 = 1;
}
else {
if (param_5 == 0) {
__src = local_29;
local_29[0] = '0';
__n = 1;
lVar2 = 0;
goto LAB_00138f38;
}
lVar2 = 0;
}
__src = local_29 + 1;
if ((long)param_5 < 0) {
local_29[0] = (char)param_5 + (char)(param_5 / 10) * -10 + '0';
__src = local_29;
param_5 = param_5 / 10;
}
__n = (long)(local_29 + 1) - (long)__src;
do {
__src[-1] = (char)(param_5 / 10) * -10 + (char)param_5 + '0';
__src = __src + -1;
__n = __n + 1;
bVar1 = 9 < param_5;
param_5 = param_5 / 10;
} while (bVar1);
if (param_3 < __n) {
__n = param_3;
}
LAB_00138f38:
local_29[1] = 0;
memcpy(param_2,__src,__n);
if (*(long *)(in_FS_OFFSET + 0x28) != local_20) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return __n + lVar2;
}
|
|
5,949 | void* google::protobuf::internal::ThreadSafeArena::AllocateAligned<(google::protobuf::internal::AllocationClient)0>(unsigned long, std::type_info const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/arena_impl.h | void* AllocateAligned(size_t n, const std::type_info* type) {
SerialArena* arena;
if (PROTOBUF_PREDICT_TRUE(!alloc_policy_.should_record_allocs() &&
GetSerialArenaFast(&arena))) {
return arena->AllocateAligned<alloc_client>(n, AllocPolicy());
} else {
return AllocateAlignedFallback(n, type);
}
} | O0 | c | void* google::protobuf::internal::ThreadSafeArena::AllocateAligned<(google::protobuf::internal::AllocationClient)0>(unsigned long, std::type_info const*):
subq $0xa8, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x28(%rsp)
addq $0x8, %rdi
callq 0x1820a0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x37(%rsp)
jne 0x182d46
movq 0x28(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x38(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq 0x70(%rsp), %rax
movq %rcx, 0x98(%rsp)
movq %rax, 0x90(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x181e00
movq 0x20(%rsp), %rcx
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq 0x8(%rax), %rax
cmpq (%rcx), %rax
jne 0x182cae
movq 0x88(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x90(%rsp), %rax
movq %rcx, (%rax)
movb $0x1, 0xa7(%rsp)
jmp 0x182cb6
movb $0x0, 0xa7(%rsp)
testb $0x1, 0xa7(%rsp)
jne 0x182cc2
jmp 0x182ccc
movb $0x1, 0x87(%rsp)
jmp 0x182d3b
callq 0x181e00
movq 0x18(%rsp), %rdi
movq %rax, 0x68(%rsp)
addq $0x18, %rdi
movl $0x2, %esi
callq 0x181b30
movq %rax, 0x60(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x60(%rsp)
movb %al, 0x17(%rsp)
je 0x182d12
movq 0x60(%rsp), %rdi
callq 0x1825a0
cmpq 0x68(%rsp), %rax
sete %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x182d1c
jmp 0x182d33
movq 0x60(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, (%rax)
movb $0x1, 0x87(%rsp)
jmp 0x182d3b
movb $0x0, 0x87(%rsp)
movb 0x87(%rsp), %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x182d50
jmp 0x182d85
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x181a30
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0x1822c0
movq %rax, 0x58(%rsp)
jmp 0x182d9e
movq 0x28(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x181290
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
addq $0xa8, %rsp
retq
nopl (%rax,%rax)
| _ZN6google8protobuf8internal15ThreadSafeArena15AllocateAlignedILNS1_16AllocationClientE0EEEPvmPKSt9type_info:
sub rsp, 0A8h
mov [rsp+0A8h+var_58], rdi
mov [rsp+0A8h+var_60], rsi
mov [rsp+0A8h+var_68], rdx
mov rdi, [rsp+0A8h+var_58]
mov [rsp+0A8h+var_80], rdi
add rdi, 8; this
call _ZNK6google8protobuf8internal25TaggedAllocationPolicyPtr20should_record_allocsEv; google::protobuf::internal::TaggedAllocationPolicyPtr::should_record_allocs(void)
mov cl, al
xor eax, eax
test cl, 1
mov [rsp+0A8h+var_71], al
jnz loc_182D46
mov rax, [rsp+0A8h+var_80]
mov [rsp+0A8h+var_30], rax
lea rax, [rsp+0A8h+var_70]
mov [rsp+0A8h+var_38], rax
mov rcx, [rsp+0A8h+var_30]
mov [rsp+0A8h+var_90], rcx
mov rax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_10], rcx
mov [rsp+0A8h+var_18], rax
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_88], rax
call _ZN6google8protobuf8internal15ThreadSafeArena12thread_cacheEv; google::protobuf::internal::ThreadSafeArena::thread_cache(void)
mov rcx, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_20], rax
mov rax, [rsp+0A8h+var_20]
mov rax, [rax+8]
cmp rax, [rcx]
jnz short loc_182CAE
mov rax, [rsp+0A8h+var_20]
mov rcx, [rax+10h]
mov rax, [rsp+0A8h+var_18]
mov [rax], rcx
mov [rsp+0A8h+var_1], 1
jmp short loc_182CB6
loc_182CAE:
mov [rsp+0A8h+var_1], 0
loc_182CB6:
test [rsp+0A8h+var_1], 1
jnz short loc_182CC2
jmp short loc_182CCC
loc_182CC2:
mov [rsp+0A8h+var_21], 1
jmp short loc_182D3B
loc_182CCC:
call _ZN6google8protobuf8internal15ThreadSafeArena12thread_cacheEv; google::protobuf::internal::ThreadSafeArena::thread_cache(void)
mov rdi, [rsp+0A8h+var_90]
mov [rsp+0A8h+var_40], rax
add rdi, 18h
mov esi, 2
call _ZNKSt6atomicIPN6google8protobuf8internal11SerialArenaEE4loadESt12memory_order; std::atomic<google::protobuf::internal::SerialArena *>::load(std::memory_order)
mov [rsp+0A8h+var_48], rax
xor eax, eax
cmp [rsp+0A8h+var_48], 0
mov [rsp+0A8h+var_91], al
jz short loc_182D12
mov rdi, [rsp+0A8h+var_48]; this
call _ZNK6google8protobuf8internal11SerialArena5ownerEv; google::protobuf::internal::SerialArena::owner(void)
cmp rax, [rsp+0A8h+var_40]
setz al
mov [rsp+0A8h+var_91], al
loc_182D12:
mov al, [rsp+0A8h+var_91]
test al, 1
jnz short loc_182D1C
jmp short loc_182D33
loc_182D1C:
mov rcx, [rsp+0A8h+var_48]
mov rax, [rsp+0A8h+var_38]
mov [rax], rcx
mov [rsp+0A8h+var_21], 1
jmp short loc_182D3B
loc_182D33:
mov [rsp+0A8h+var_21], 0
loc_182D3B:
mov al, [rsp+0A8h+var_21]
mov [rsp+0A8h+var_71], al
loc_182D46:
mov al, [rsp+0A8h+var_71]
test al, 1
jnz short loc_182D50
jmp short loc_182D85
loc_182D50:
mov rdi, [rsp+0A8h+var_80]; this
mov rax, [rsp+0A8h+var_70]
mov [rsp+0A8h+var_A8], rax
mov rax, [rsp+0A8h+var_60]
mov [rsp+0A8h+var_A0], rax
call _ZNK6google8protobuf8internal15ThreadSafeArena11AllocPolicyEv; google::protobuf::internal::ThreadSafeArena::AllocPolicy(void)
mov rdi, [rsp+0A8h+var_A8]
mov rsi, [rsp+0A8h+var_A0]
mov rdx, rax
call _ZN6google8protobuf8internal11SerialArena15AllocateAlignedILNS1_16AllocationClientE0EEEPvmPKNS1_16AllocationPolicyE; google::protobuf::internal::SerialArena::AllocateAligned<(google::protobuf::internal::AllocationClient)0>(ulong,google::protobuf::internal::AllocationPolicy const*)
mov [rsp+0A8h+var_50], rax
jmp short loc_182D9E
loc_182D85:
mov rdi, [rsp+0A8h+var_80]; this
mov rsi, [rsp+0A8h+var_60]; unsigned __int64
mov rdx, [rsp+0A8h+var_68]; type_info *
call _ZN6google8protobuf8internal15ThreadSafeArena23AllocateAlignedFallbackEmPKSt9type_info; google::protobuf::internal::ThreadSafeArena::AllocateAlignedFallback(ulong,std::type_info const*)
mov [rsp+0A8h+var_50], rax
loc_182D9E:
mov rax, [rsp+0A8h+var_50]
add rsp, 0A8h
retn
| long long google::protobuf::internal::ThreadSafeArena::AllocateAligned<(google::protobuf::internal::AllocationClient)0>(
google::protobuf::internal::ThreadSafeArena *a1,
unsigned long long a2,
type_info *a3)
{
google::protobuf::internal::ThreadSafeArena *v3; // rdi
long long v4; // rax
const google::protobuf::internal::AllocationPolicy *v5; // rax
google::protobuf::internal::SerialArena *v7; // [rsp+0h] [rbp-A8h]
unsigned long long v8; // [rsp+8h] [rbp-A0h]
bool v9; // [rsp+17h] [rbp-91h]
char v11; // [rsp+37h] [rbp-71h]
google::protobuf::internal::SerialArena *v12; // [rsp+38h] [rbp-70h] BYREF
type_info *v13; // [rsp+40h] [rbp-68h]
unsigned long long v14; // [rsp+48h] [rbp-60h]
google::protobuf::internal::ThreadSafeArena *v15; // [rsp+50h] [rbp-58h]
google::protobuf::internal::SerialArena *v17; // [rsp+60h] [rbp-48h]
unsigned long long v18; // [rsp+68h] [rbp-40h]
google::protobuf::internal::SerialArena **v19; // [rsp+70h] [rbp-38h]
google::protobuf::internal::ThreadSafeArena *v20; // [rsp+78h] [rbp-30h]
char v21; // [rsp+87h] [rbp-21h]
unsigned long long v22; // [rsp+88h] [rbp-20h]
google::protobuf::internal::SerialArena **v23; // [rsp+90h] [rbp-18h]
google::protobuf::internal::ThreadSafeArena *v24; // [rsp+98h] [rbp-10h]
char v25; // [rsp+A7h] [rbp-1h]
v15 = a1;
v14 = a2;
v13 = a3;
v3 = (google::protobuf::internal::ThreadSafeArena *)((char *)a1 + 8);
v11 = 0;
if ( !google::protobuf::internal::TaggedAllocationPolicyPtr::should_record_allocs(v3) )
{
v20 = a1;
v19 = &v12;
v24 = a1;
v23 = &v12;
v22 = google::protobuf::internal::ThreadSafeArena::thread_cache(v3);
if ( *(_QWORD *)(v22 + 8) == *(_QWORD *)a1 )
{
*v23 = *(google::protobuf::internal::SerialArena **)(v22 + 16);
v25 = 1;
}
else
{
v25 = 0;
}
if ( (v25 & 1) != 0 )
{
v21 = 1;
}
else
{
v18 = google::protobuf::internal::ThreadSafeArena::thread_cache(v3);
v17 = (google::protobuf::internal::SerialArena *)std::atomic<google::protobuf::internal::SerialArena *>::load(
(long long)a1 + 24,
2u);
v9 = 0;
if ( v17 )
{
v4 = google::protobuf::internal::SerialArena::owner(v17);
v9 = v4 == v18;
}
if ( v9 )
{
*v19 = v17;
v21 = 1;
}
else
{
v21 = 0;
}
}
v11 = v21;
}
if ( (v11 & 1) == 0 )
return google::protobuf::internal::ThreadSafeArena::AllocateAlignedFallback(a1, v14, v13);
v7 = v12;
v8 = v14;
v5 = (const google::protobuf::internal::AllocationPolicy *)google::protobuf::internal::ThreadSafeArena::AllocPolicy(a1);
return google::protobuf::internal::SerialArena::AllocateAligned<(google::protobuf::internal::AllocationClient)0>(
v7,
v8,
v5);
}
| |||
5,950 | void* google::protobuf::internal::ThreadSafeArena::AllocateAligned<(google::protobuf::internal::AllocationClient)0>(unsigned long, std::type_info const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/arena_impl.h | void* AllocateAligned(size_t n, const std::type_info* type) {
SerialArena* arena;
if (PROTOBUF_PREDICT_TRUE(!alloc_policy_.should_record_allocs() &&
GetSerialArenaFast(&arena))) {
return arena->AllocateAligned<alloc_client>(n, AllocPolicy());
} else {
return AllocateAlignedFallback(n, type);
}
} | O3 | c | void* google::protobuf::internal::ThreadSafeArena::AllocateAligned<(google::protobuf::internal::AllocationClient)0>(unsigned long, std::type_info const*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
testb $0x2, 0x8(%rdi)
jne 0x92ed3
movq %fs:0x0, %rax
leaq -0x20(%rax), %rax
movq 0x8(%rax), %rcx
cmpq (%r14), %rcx
jne 0x92ec5
movq 0x10(%rax), %rdi
movq 0x28(%rdi), %rax
movq 0x30(%rdi), %rcx
subq %rax, %rcx
cmpq %rbx, %rcx
jb 0x92ee6
addq %rax, %rbx
movq %rbx, 0x28(%rdi)
popq %rbx
popq %r14
popq %r15
retq
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x92ed3
cmpq %rax, (%rdi)
je 0x92ea8
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x92cca
movq 0x8(%r14), %rdx
andq $-0x8, %rdx
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x9229a
nop
| _ZN6google8protobuf8internal15ThreadSafeArena15AllocateAlignedILNS1_16AllocationClientE0EEEPvmPKSt9type_info:
push r15
push r14
push rbx
mov r15, rdx
mov rbx, rsi
mov r14, rdi
test byte ptr [rdi+8], 2
jnz short loc_92ED3
mov rax, fs:0
lea rax, [rax-20h]
mov rcx, [rax+8]
cmp rcx, [r14]
jnz short loc_92EC5
mov rdi, [rax+10h]
loc_92EA8:
mov rax, [rdi+28h]
mov rcx, [rdi+30h]
sub rcx, rax
cmp rcx, rbx
jb short loc_92EE6
add rbx, rax
mov [rdi+28h], rbx
pop rbx
pop r14
pop r15
retn
loc_92EC5:
mov rdi, [r14+18h]
test rdi, rdi
jz short loc_92ED3
cmp [rdi], rax
jz short loc_92EA8
loc_92ED3:
mov rdi, r14; this
mov rsi, rbx; unsigned __int64
mov rdx, r15; type_info *
pop rbx
pop r14
pop r15
jmp _ZN6google8protobuf8internal15ThreadSafeArena23AllocateAlignedFallbackEmPKSt9type_info; google::protobuf::internal::ThreadSafeArena::AllocateAlignedFallback(ulong,std::type_info const*)
loc_92EE6:
mov rdx, [r14+8]
and rdx, 0FFFFFFFFFFFFFFF8h
mov rsi, rbx
pop rbx
pop r14
pop r15
jmp _ZN6google8protobuf8internal11SerialArena23AllocateAlignedFallbackEmPKNS1_16AllocationPolicyE; google::protobuf::internal::SerialArena::AllocateAlignedFallback(ulong,google::protobuf::internal::AllocationPolicy const*)
| long long google::protobuf::internal::ThreadSafeArena::AllocateAligned<(google::protobuf::internal::AllocationClient)0>(
google::protobuf::internal::ThreadSafeArena *this,
unsigned long long a2,
type_info *a3)
{
unsigned long long v4; // rax
_QWORD *v5; // rdi
long long result; // rax
if ( (*((_BYTE *)this + 8) & 2) != 0 )
return google::protobuf::internal::ThreadSafeArena::AllocateAlignedFallback(this, a2, a3);
v4 = __readfsqword(0) - 32;
if ( *(_QWORD *)(v4 + 8) != *(_QWORD *)this )
{
v5 = (_QWORD *)*((_QWORD *)this + 3);
if ( v5 && *v5 == v4 )
goto LABEL_4;
return google::protobuf::internal::ThreadSafeArena::AllocateAlignedFallback(this, a2, a3);
}
v5 = *(_QWORD **)(v4 + 16);
LABEL_4:
result = v5[5];
if ( v5[6] - result < a2 )
return google::protobuf::internal::SerialArena::AllocateAlignedFallback((long long)v5, a2);
v5[5] = result + a2;
return result;
}
| AllocateAligned<(google::protobuf::internal::AllocationClient)0>:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
TEST byte ptr [RDI + 0x8],0x2
JNZ 0x00192ed3
MOV RAX,qword ptr FS:[0x0]
LEA RAX,[RAX + -0x20]
MOV RCX,qword ptr [RAX + 0x8]
CMP RCX,qword ptr [R14]
JNZ 0x00192ec5
MOV RDI,qword ptr [RAX + 0x10]
LAB_00192ea8:
MOV RAX,qword ptr [RDI + 0x28]
MOV RCX,qword ptr [RDI + 0x30]
SUB RCX,RAX
CMP RCX,RBX
JC 0x00192ee6
ADD RBX,RAX
MOV qword ptr [RDI + 0x28],RBX
POP RBX
POP R14
POP R15
RET
LAB_00192ec5:
MOV RDI,qword ptr [R14 + 0x18]
TEST RDI,RDI
JZ 0x00192ed3
CMP qword ptr [RDI],RAX
JZ 0x00192ea8
LAB_00192ed3:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
POP RBX
POP R14
POP R15
JMP 0x00192cca
LAB_00192ee6:
MOV RDX,qword ptr [R14 + 0x8]
AND RDX,-0x8
MOV RSI,RBX
POP RBX
POP R14
POP R15
JMP 0x0019229a
|
/* void*
google::protobuf::internal::ThreadSafeArena::AllocateAligned<(google::protobuf::internal::AllocationClient)0>(unsigned
long, std::type_info const*) */
void * __thiscall
google::protobuf::internal::ThreadSafeArena::
AllocateAligned<(google::protobuf::internal::AllocationClient)0>
(ThreadSafeArena *this,ulong param_1,type_info *param_2)
{
long lVar1;
void *pvVar2;
SerialArena *this_00;
long *in_FS_OFFSET;
if (((byte)this[8] & 2) == 0) {
lVar1 = *in_FS_OFFSET;
if (*(long *)(lVar1 + -0x18) == *(long *)this) {
this_00 = *(SerialArena **)(lVar1 + -0x10);
}
else {
this_00 = *(SerialArena **)(this + 0x18);
if ((this_00 == (SerialArena *)0x0) || (*(long *)this_00 != lVar1 + -0x20)) goto LAB_00192ed3;
}
pvVar2 = *(void **)(this_00 + 0x28);
if (param_1 <= (ulong)(*(long *)(this_00 + 0x30) - (long)pvVar2)) {
*(ulong *)(this_00 + 0x28) = param_1 + (long)pvVar2;
return pvVar2;
}
pvVar2 = (void *)SerialArena::AllocateAlignedFallback
(this_00,param_1,
(AllocationPolicy *)(*(ulong *)(this + 8) & 0xfffffffffffffff8));
return pvVar2;
}
LAB_00192ed3:
pvVar2 = (void *)AllocateAlignedFallback(this,param_1,param_2);
return pvVar2;
}
|
|
5,951 | TinyAutoEncoder::TinyAutoEncoder(bool) | 7CodeWizard[P]stablediffusion/tae.hpp | TinyAutoEncoder(bool decoder_only_ = true)
: decode_only(decoder_only_) {
name = "tae";
} | O1 | cpp | TinyAutoEncoder::TinyAutoEncoder(bool):
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
movabsq $0x646f6d206c6d6767, %rax # imm = 0x646F6D206C6D6767
movq %rax, 0x18(%rdi)
movl $0x656c7564, 0x1f(%rdi) # imm = 0x656C7564
movq $0xb, 0x10(%rdi)
movb $0x0, 0x23(%rdi)
movq $0x0, 0x60(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movl $0x0, 0x58(%rdi)
leaq 0xbdab5(%rip), %rax # 0xf59b0
movq %rax, (%rdi)
addq $0x68, %rdi
callq 0x3b282
leaq 0x330(%rbx), %rdi
callq 0x3b2c0
movb %bpl, 0x5f8(%rbx)
movq 0x10(%rbx), %rdx
leaq 0x860bd(%rip), %rcx # 0xbdfe2
movl $0x3, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0xa950
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x37f4e
movq %r14, %rdi
callq 0xaae0
nop
| _ZN15TinyAutoEncoderC2Eb:
push rbp
push r14
push rbx
mov ebp, esi
mov rbx, rdi
lea r14, [rdi+8]
lea rax, [rdi+18h]
mov [rdi+8], rax
mov rax, 646F6D206C6D6767h
mov [rdi+18h], rax
mov dword ptr [rdi+1Fh], 656C7564h
mov qword ptr [rdi+10h], 0Bh
mov byte ptr [rdi+23h], 0
mov qword ptr [rdi+60h], 0
xorps xmm0, xmm0
movups xmmword ptr [rdi+28h], xmm0
movups xmmword ptr [rdi+38h], xmm0
movups xmmword ptr [rdi+48h], xmm0
mov dword ptr [rdi+58h], 0
lea rax, off_F59B0
mov [rdi], rax
add rdi, 68h ; 'h'; this
call _ZN11TinyEncoderC2Ev; TinyEncoder::TinyEncoder(void)
lea rdi, [rbx+330h]; this
call _ZN11TinyDecoderC2Ev; TinyDecoder::TinyDecoder(void)
mov [rbx+5F8h], bpl
mov rdx, [rbx+10h]
lea rcx, aTae; "tae"
mov r8d, 3
mov rdi, r14
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
pop rbx
pop r14
pop rbp
retn
mov r14, rax
mov rdi, rbx; this
call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule()
mov rdi, r14
call __Unwind_Resume
| void TinyAutoEncoder::TinyAutoEncoder(TinyAutoEncoder *this, char a2)
{
*((_QWORD *)this + 1) = (char *)this + 24;
strcpy((char *)this + 24, "ggml module");
*((_QWORD *)this + 2) = 11LL;
*((_QWORD *)this + 12) = 0LL;
*(_OWORD *)((char *)this + 40) = 0LL;
*(_OWORD *)((char *)this + 56) = 0LL;
*(_OWORD *)((char *)this + 72) = 0LL;
*((_DWORD *)this + 22) = 0;
*(_QWORD *)this = off_F59B0;
TinyEncoder::TinyEncoder((TinyAutoEncoder *)((char *)this + 104));
TinyDecoder::TinyDecoder((TinyAutoEncoder *)((char *)this + 816));
*((_BYTE *)this + 1528) = a2;
std::string::_M_replace((char *)this + 8, 0LL, *((_QWORD *)this + 2), "tae", 3LL);
}
| |||
5,952 | TinyAutoEncoder::TinyAutoEncoder(bool) | 7CodeWizard[P]stablediffusion/tae.hpp | TinyAutoEncoder(bool decoder_only_ = true)
: decode_only(decoder_only_) {
name = "tae";
} | O2 | cpp | TinyAutoEncoder::TinyAutoEncoder(bool):
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x21acc
leaq 0xb361d(%rip), %rax # 0xd49a0
movq %rax, (%rbx)
leaq 0x68(%rbx), %rdi
callq 0x248e4
leaq 0x330(%rbx), %rdi
callq 0x24928
movb %bpl, 0x5f8(%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x78b65(%rip), %rsi # 0x99f12
callq 0xabc0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x213e6
movq %r14, %rdi
callq 0xaab0
| _ZN15TinyAutoEncoderC2Eb:
push rbp
push r14
push rbx
mov ebp, esi
mov rbx, rdi
call _ZN10GGMLModuleC2Ev; GGMLModule::GGMLModule(void)
lea rax, off_D49A0
mov [rbx], rax
lea rdi, [rbx+68h]; this
call _ZN11TinyEncoderC2Ev; TinyEncoder::TinyEncoder(void)
lea rdi, [rbx+330h]; this
call _ZN11TinyDecoderC2Ev; TinyDecoder::TinyDecoder(void)
mov [rbx+5F8h], bpl
lea rdi, [rbx+8]
lea rsi, aTae; "tae"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
pop rbx
pop r14
pop rbp
retn
mov r14, rax
mov rdi, rbx; this
call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule()
mov rdi, r14
call __Unwind_Resume
| void TinyAutoEncoder::TinyAutoEncoder(TinyAutoEncoder *this, char a2)
{
GGMLModule::GGMLModule(this);
*(_QWORD *)this = off_D49A0;
TinyEncoder::TinyEncoder((TinyAutoEncoder *)((char *)this + 104));
TinyDecoder::TinyDecoder((TinyAutoEncoder *)((char *)this + 816));
*((_BYTE *)this + 1528) = a2;
std::string::assign((char *)this + 8, "tae");
}
| TinyAutoEncoder:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x00121acc
LEA RAX,[0x1d49a0]
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x68]
CALL 0x001248e4
LEA RDI,[RBX + 0x330]
CALL 0x00124928
MOV byte ptr [RBX + 0x5f8],BPL
LEA RDI,[RBX + 0x8]
LAB_001213a6:
LEA RSI,[0x199f12]
CALL 0x0010abc0
LAB_001213b2:
POP RBX
POP R14
POP RBP
RET
|
/* TinyAutoEncoder::TinyAutoEncoder(bool) */
void __thiscall TinyAutoEncoder::TinyAutoEncoder(TinyAutoEncoder *this,bool param_1)
{
GGMLModule::GGMLModule((GGMLModule *)this);
*(int ***)this = &PTR_calculate_mem_size_001d49a0;
TinyEncoder::TinyEncoder((TinyEncoder *)(this + 0x68));
TinyDecoder::TinyDecoder((TinyDecoder *)(this + 0x330));
this[0x5f8] = (TinyAutoEncoder)param_1;
/* try { // try from 001213a6 to 001213b1 has its CatchHandler @ 001213b7 */
std::__cxx11::string::assign((char *)(this + 8));
return;
}
|
|
5,953 | TinyAutoEncoder::TinyAutoEncoder(bool) | 7CodeWizard[P]stablediffusion/tae.hpp | TinyAutoEncoder(bool decoder_only_ = true)
: decode_only(decoder_only_) {
name = "tae";
} | O3 | cpp | TinyAutoEncoder::TinyAutoEncoder(bool):
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
movabsq $0x646f6d206c6d6767, %rax # imm = 0x646F6D206C6D6767
movq %rax, 0x18(%rdi)
movl $0x656c7564, 0x1f(%rdi) # imm = 0x656C7564
movq $0xb, 0x10(%rdi)
movb $0x0, 0x23(%rdi)
movq $0x0, 0x60(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movl $0x0, 0x58(%rdi)
leaq 0xbc625(%rip), %rax # 0xf39b8
movq %rax, (%rdi)
addq $0x68, %rdi
callq 0x3a668
leaq 0x330(%rbx), %rdi
callq 0x3a6a6
movb %bpl, 0x5f8(%rbx)
movq 0x10(%rbx), %rdx
leaq 0x85c35(%rip), %rcx # 0xbcff2
movl $0x3, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0xa940
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x373e6
movq %r14, %rdi
callq 0xaad0
nop
| _ZN15TinyAutoEncoderC2Eb:
push rbp
push r14
push rbx
mov ebp, esi
mov rbx, rdi
lea r14, [rdi+8]
lea rax, [rdi+18h]
mov [rdi+8], rax
mov rax, 646F6D206C6D6767h
mov [rdi+18h], rax
mov dword ptr [rdi+1Fh], 656C7564h
mov qword ptr [rdi+10h], 0Bh
mov byte ptr [rdi+23h], 0
mov qword ptr [rdi+60h], 0
xorps xmm0, xmm0
movups xmmword ptr [rdi+28h], xmm0
movups xmmword ptr [rdi+38h], xmm0
movups xmmword ptr [rdi+48h], xmm0
mov dword ptr [rdi+58h], 0
lea rax, off_F39B8
mov [rdi], rax
add rdi, 68h ; 'h'; this
call _ZN11TinyEncoderC2Ev; TinyEncoder::TinyEncoder(void)
lea rdi, [rbx+330h]; this
call _ZN11TinyDecoderC2Ev; TinyDecoder::TinyDecoder(void)
mov [rbx+5F8h], bpl
mov rdx, [rbx+10h]
lea rcx, aTae; "tae"
mov r8d, 3
mov rdi, r14
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
pop rbx
pop r14
pop rbp
retn
mov r14, rax
mov rdi, rbx; this
call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule()
mov rdi, r14
call __Unwind_Resume
| void TinyAutoEncoder::TinyAutoEncoder(TinyAutoEncoder *this, char a2)
{
*((_QWORD *)this + 1) = (char *)this + 24;
strcpy((char *)this + 24, "ggml module");
*((_QWORD *)this + 2) = 11LL;
*((_QWORD *)this + 12) = 0LL;
*(_OWORD *)((char *)this + 40) = 0LL;
*(_OWORD *)((char *)this + 56) = 0LL;
*(_OWORD *)((char *)this + 72) = 0LL;
*((_DWORD *)this + 22) = 0;
*(_QWORD *)this = off_F39B8;
TinyEncoder::TinyEncoder((TinyAutoEncoder *)((char *)this + 104));
TinyDecoder::TinyDecoder((TinyAutoEncoder *)((char *)this + 816));
*((_BYTE *)this + 1528) = a2;
std::string::_M_replace((char *)this + 8, 0LL, *((_QWORD *)this + 2), "tae", 3LL);
}
| |||
5,954 | 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 0x30d86
movl -0x4(%rbp), %edx
andl $0x20000, %edx # imm = 0x20000
leaq 0x1a0356(%rip), %rax # 0x1d10c8
leaq 0x1a03bf(%rip), %rcx # 0x1d1138
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x30da8
movl -0x4(%rbp), %edx
andl $0x20000, %edx # imm = 0x20000
leaq 0x1a2e72(%rip), %rax # 0x1d3c08
leaq 0x1a2edb(%rip), %rcx # 0x1d3c78
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_30D86
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_30DA8
loc_30D86:
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_30DA8:
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 0x00130d86
MOV EDX,dword ptr [RBP + -0x4]
AND EDX,0x20000
LEA RAX,[0x2d10c8]
LEA RCX,[0x2d1138]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00130da8
LAB_00130d86:
MOV EDX,dword ptr [RBP + -0x4]
AND EDX,0x20000
LEA RAX,[0x2d3c08]
LEA RCX,[0x2d3c78]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_00130da8:
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;
}
|
|
5,955 | rpl_slave_state::load(THD*, char const*, unsigned long, bool, bool) | eloqsql/sql/rpl_gtid.cc | int
rpl_slave_state::load(THD *thd, const char *state_from_master, size_t len,
bool reset, bool in_statement)
{
const char *end= state_from_master + len;
if (reset)
{
if (truncate_state_table(thd))
return 1;
truncate_hash();
}
if (state_from_master == end)
return 0;
for (;;)
{
rpl_gtid gtid;
uint64 sub_id;
void *hton= NULL;
if (gtid_parser_helper(&state_from_master, end, >id) ||
!(sub_id= next_sub_id(gtid.domain_id)) ||
record_gtid(thd, >id, sub_id, false, in_statement, &hton) ||
update(gtid.domain_id, gtid.server_id, sub_id, gtid.seq_no, hton, NULL))
return 1;
if (state_from_master == end)
break;
if (*state_from_master != ',')
return 1;
++state_from_master;
}
return 0;
} | O0 | cpp | rpl_slave_state::load(THD*, char const*, unsigned long, bool, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %r8d, -0x7c(%rbp)
movq %rcx, %rax
movl -0x7c(%rbp), %ecx
movq %rax, -0x78(%rbp)
movq %rdx, %rax
movq -0x78(%rbp), %rdx
movq %rax, -0x70(%rbp)
movq %rsi, %rax
movq -0x70(%rbp), %rsi
movq %rax, -0x68(%rbp)
movq %rdi, %r8
movq -0x68(%rbp), %rdi
movb %r9b, %al
movq %r8, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
andb $0x1, %cl
movb %cl, -0x29(%rbp)
andb $0x1, %al
movb %al, -0x2a(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
testb $0x1, -0x29(%rbp)
je 0xad7b75
movq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xad6360
cmpl $0x0, %eax
je 0xad7b6c
movl $0x1, -0x4(%rbp)
jmp 0xad7c5e
movq -0x60(%rbp), %rdi
callq 0xad6190
movq -0x20(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0xad7b8b
movl $0x0, -0x4(%rbp)
jmp 0xad7c5e
jmp 0xad7b8d
movq $0x0, -0x58(%rbp)
movq -0x38(%rbp), %rsi
leaq -0x20(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0xad7990
cmpl $0x0, %eax
jne 0xad7c1c
movq -0x60(%rbp), %rdi
movl -0x48(%rbp), %esi
callq 0xad70b0
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0xad7c1c
movq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x50(%rbp), %rcx
movb -0x2a(%rbp), %r9b
leaq -0x48(%rbp), %rdx
xorl %r8d, %r8d
leaq -0x58(%rbp), %rax
andb $0x1, %r9b
movzbl %r9b, %r9d
movq %rax, (%rsp)
callq 0xad53f0
cmpl $0x0, %eax
jne 0xad7c1c
movq -0x60(%rbp), %rdi
movl -0x48(%rbp), %esi
movl -0x44(%rbp), %edx
movq -0x50(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x58(%rbp), %r9
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0xad5140
cmpl $0x0, %eax
je 0xad7c25
movl $0x1, -0x4(%rbp)
jmp 0xad7c5e
movq -0x20(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0xad7c31
jmp 0xad7c57
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0xad7c46
movl $0x1, -0x4(%rbp)
jmp 0xad7c5e
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xad7b8d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN15rpl_slave_state4loadEP3THDPKcmbb:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_7C], r8d
mov rax, rcx
mov ecx, [rbp+var_7C]
mov [rbp+var_78], rax
mov rax, rdx
mov rdx, [rbp+var_78]
mov [rbp+var_70], rax
mov rax, rsi
mov rsi, [rbp+var_70]
mov [rbp+var_68], rax
mov r8, rdi
mov rdi, [rbp+var_68]
mov al, r9b
mov [rbp+var_10], r8
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
and cl, 1
mov [rbp+var_29], cl
and al, 1
mov [rbp+var_2A], al
mov rax, [rbp+var_10]
mov [rbp+var_60], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_38], rax
test [rbp+var_29], 1
jz short loc_AD7B75
mov rdi, [rbp+var_60]; this
mov rsi, [rbp+var_18]; THD *
call _ZN15rpl_slave_state20truncate_state_tableEP3THD; rpl_slave_state::truncate_state_table(THD *)
cmp eax, 0
jz short loc_AD7B6C
mov [rbp+var_4], 1
jmp loc_AD7C5E
loc_AD7B6C:
mov rdi, [rbp+var_60]; this
call _ZN15rpl_slave_state13truncate_hashEv; rpl_slave_state::truncate_hash(void)
loc_AD7B75:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_38]
jnz short loc_AD7B8B
mov [rbp+var_4], 0
jmp loc_AD7C5E
loc_AD7B8B:
jmp short $+2
loc_AD7B8D:
mov [rbp+var_58], 0
mov rsi, [rbp+var_38]
lea rdi, [rbp+var_20]
lea rdx, [rbp+var_48]
call _ZL18gtid_parser_helperPPKcS0_P8rpl_gtid; gtid_parser_helper(char const**,char const*,rpl_gtid *)
cmp eax, 0
jnz short loc_AD7C1C
mov rdi, [rbp+var_60]; this
mov esi, [rbp+var_48]; unsigned int
call _ZN15rpl_slave_state11next_sub_idEj; rpl_slave_state::next_sub_id(uint)
mov [rbp+var_50], rax
cmp rax, 0
jz short loc_AD7C1C
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_18]
mov rcx, [rbp+var_50]
mov r9b, [rbp+var_2A]
lea rdx, [rbp+var_48]
xor r8d, r8d
lea rax, [rbp+var_58]
and r9b, 1
movzx r9d, r9b
mov [rsp+90h+var_90], rax
call _ZN15rpl_slave_state11record_gtidEP3THDPK8rpl_gtidybbPPv; rpl_slave_state::record_gtid(THD *,rpl_gtid const*,ulong long,bool,bool,void **)
cmp eax, 0
jnz short loc_AD7C1C
mov rdi, [rbp+var_60]; this
mov esi, [rbp+var_48]; unsigned int
mov edx, [rbp+var_44]; unsigned int
mov rcx, [rbp+var_50]; unsigned __int64
mov r8, [rbp+var_40]; unsigned __int64
mov r9, [rbp+var_58]; void *
xor eax, eax
mov [rsp+90h+var_90], 0; rpl_group_info *
call _ZN15rpl_slave_state6updateEjjyyPvP14rpl_group_info; rpl_slave_state::update(uint,uint,ulong long,ulong long,void *,rpl_group_info *)
cmp eax, 0
jz short loc_AD7C25
loc_AD7C1C:
mov [rbp+var_4], 1
jmp short loc_AD7C5E
loc_AD7C25:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_38]
jnz short loc_AD7C31
jmp short loc_AD7C57
loc_AD7C31:
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 2Ch ; ','
jz short loc_AD7C46
mov [rbp+var_4], 1
jmp short loc_AD7C5E
loc_AD7C46:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_AD7B8D
loc_AD7C57:
mov [rbp+var_4], 0
loc_AD7C5E:
mov eax, [rbp+var_4]
add rsp, 90h
pop rbp
retn
| long long rpl_slave_state::load(rpl_slave_state *this, THD *a2, const char *a3, long long a4, char a5, char a6)
{
void *v7; // [rsp+38h] [rbp-58h] BYREF
unsigned long long sub_id; // [rsp+40h] [rbp-50h]
unsigned int v9[2]; // [rsp+48h] [rbp-48h] BYREF
unsigned long long v10; // [rsp+50h] [rbp-40h]
char *v11; // [rsp+58h] [rbp-38h]
char v12; // [rsp+66h] [rbp-2Ah]
char v13; // [rsp+67h] [rbp-29h]
long long v14; // [rsp+68h] [rbp-28h]
const char *v15; // [rsp+70h] [rbp-20h] BYREF
THD *v16; // [rsp+78h] [rbp-18h]
rpl_slave_state *v17; // [rsp+80h] [rbp-10h]
v17 = this;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = a5 & 1;
v12 = a6 & 1;
v11 = (char *)&a3[a4];
if ( (a5 & 1) != 0 )
{
if ( (unsigned int)rpl_slave_state::truncate_state_table(this, v16) )
return 1;
rpl_slave_state::truncate_hash(this);
}
if ( v15 == v11 )
{
return 0;
}
else
{
while ( 1 )
{
v7 = 0LL;
if ( (unsigned int)gtid_parser_helper(&v15, v11, (long long)v9)
|| (sub_id = rpl_slave_state::next_sub_id(this)) == 0
|| (unsigned int)rpl_slave_state::record_gtid((long long)this, v16, v9, sub_id, 0, v12 & 1, (long long *)&v7)
|| (unsigned int)rpl_slave_state::update(this, v9[0], v9[1], sub_id, v10, v7, 0LL) )
{
return 1;
}
if ( v15 == v11 )
break;
if ( *v15 != 44 )
return 1;
++v15;
}
return 0;
}
}
| ~Trigger:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
LAB_00ad7af4:
CALL 0x009145e0
JMP 0x00ad7afb
LAB_00ad7afb:
ADD RSP,0x10
POP RBP
RET
|
/* Trigger::~Trigger() */
void __thiscall Trigger::~Trigger(Trigger *this)
{
/* try { // try from 00ad7af4 to 00ad7af8 has its CatchHandler @ 00ad7b01 */
sp_head::destroy(*(sp_head **)(this + 8));
return;
}
|
|
5,956 | mysql_next_result_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_next_result_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_next_result,
(parms->mysql),
parms->mysql,
int,
r_int)
} | O0 | c | mysql_next_result_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x251a0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_next_result_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_next_result
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| _DWORD * mysql_next_result_start_internal(long long *a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL);
v2[2] = mysql_next_result(*a1);
result = v2;
*v2 = 0;
return result;
}
| mysql_next_result_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x001251a0
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_next_result_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_next_result(*param_1);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
|
|
5,957 | ImPlot::ShowUserGuide() | zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp | void ShowUserGuide() {
ImGui::BulletText("Left-click drag within the plot area to pan X and Y axes.");
ImGui::Indent();
ImGui::BulletText("Left-click drag on axis labels to pan an individual axis.");
ImGui::Unindent();
ImGui::BulletText("Scroll in the plot area to zoom both X any Y axes.");
ImGui::Indent();
ImGui::BulletText("Scroll on axis labels to zoom an individual axis.");
ImGui::Unindent();
ImGui::BulletText("Right-click drag to box select data.");
ImGui::Indent();
ImGui::BulletText("Hold Alt to expand box selection horizontally.");
ImGui::BulletText("Hold Shift to expand box selection vertically.");
ImGui::BulletText("Left-click while box selecting to cancel the selection.");
ImGui::Unindent();
ImGui::BulletText("Double left-click to fit all visible data.");
ImGui::Indent();
ImGui::BulletText("Double left-click axis labels to fit the individual axis.");
ImGui::Unindent();
ImGui::BulletText("Right-click open the full plot context menu.");
ImGui::Indent();
ImGui::BulletText("Right-click axis labels to open an individual axis context menu.");
ImGui::Unindent();
ImGui::BulletText("Click legend label icons to show/hide plot items.");
} | O1 | cpp | ImPlot::ShowUserGuide():
pushq %rax
leaq 0x1d4cd3(%rip), %rdi # 0x29b375
xorl %eax, %eax
callq 0x256de0
xorps %xmm0, %xmm0
callq 0x22c0d9
leaq 0x1d4cf7(%rip), %rdi # 0x29b3af
xorl %eax, %eax
callq 0x256de0
xorps %xmm0, %xmm0
callq 0x22c126
leaq 0x1d4d1b(%rip), %rdi # 0x29b3e9
xorl %eax, %eax
callq 0x256de0
xorps %xmm0, %xmm0
callq 0x22c0d9
leaq 0x1d4d38(%rip), %rdi # 0x29b41c
xorl %eax, %eax
callq 0x256de0
xorps %xmm0, %xmm0
callq 0x22c126
leaq 0x1d4d54(%rip), %rdi # 0x29b44e
xorl %eax, %eax
callq 0x256de0
xorps %xmm0, %xmm0
callq 0x22c0d9
leaq 0x1d4d63(%rip), %rdi # 0x29b473
xorl %eax, %eax
callq 0x256de0
leaq 0x1d4d84(%rip), %rdi # 0x29b4a2
xorl %eax, %eax
callq 0x256de0
leaq 0x1d4da5(%rip), %rdi # 0x29b4d1
xorl %eax, %eax
callq 0x256de0
xorps %xmm0, %xmm0
callq 0x22c126
leaq 0x1d4dc7(%rip), %rdi # 0x29b509
xorl %eax, %eax
callq 0x256de0
xorps %xmm0, %xmm0
callq 0x22c0d9
leaq 0x1d4ddc(%rip), %rdi # 0x29b534
xorl %eax, %eax
callq 0x256de0
xorps %xmm0, %xmm0
callq 0x22c126
leaq 0x1d4e00(%rip), %rdi # 0x29b56e
xorl %eax, %eax
callq 0x256de0
xorps %xmm0, %xmm0
callq 0x22c0d9
leaq 0x1d4e17(%rip), %rdi # 0x29b59b
xorl %eax, %eax
callq 0x256de0
xorps %xmm0, %xmm0
callq 0x22c126
leaq 0x1d4e42(%rip), %rdi # 0x29b5dc
xorl %eax, %eax
popq %rcx
jmp 0x256de0
| _ZN6ImPlot13ShowUserGuideEv:
push rax
lea rdi, aLeftClickDragW; "Left-click drag within the plot area to"...
xor eax, eax
call _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
xorps xmm0, xmm0; float
call _ZN5ImGui6IndentEf; ImGui::Indent(float)
lea rdi, aLeftClickDragO; "Left-click drag on axis labels to pan a"...
xor eax, eax
call _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
xorps xmm0, xmm0; float
call _ZN5ImGui8UnindentEf; ImGui::Unindent(float)
lea rdi, aScrollInThePlo; "Scroll in the plot area to zoom both X "...
xor eax, eax
call _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
xorps xmm0, xmm0; float
call _ZN5ImGui6IndentEf; ImGui::Indent(float)
lea rdi, aScrollOnAxisLa; "Scroll on axis labels to zoom an indivi"...
xor eax, eax
call _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
xorps xmm0, xmm0; float
call _ZN5ImGui8UnindentEf; ImGui::Unindent(float)
lea rdi, aRightClickDrag; "Right-click drag to box select data."
xor eax, eax
call _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
xorps xmm0, xmm0; float
call _ZN5ImGui6IndentEf; ImGui::Indent(float)
lea rdi, aHoldAltToExpan; "Hold Alt to expand box selection horizo"...
xor eax, eax
call _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
lea rdi, aHoldShiftToExp; "Hold Shift to expand box selection vert"...
xor eax, eax
call _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
lea rdi, aLeftClickWhile; "Left-click while box selecting to cance"...
xor eax, eax
call _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
xorps xmm0, xmm0; float
call _ZN5ImGui8UnindentEf; ImGui::Unindent(float)
lea rdi, aDoubleLeftClic; "Double left-click to fit all visible da"...
xor eax, eax
call _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
xorps xmm0, xmm0; float
call _ZN5ImGui6IndentEf; ImGui::Indent(float)
lea rdi, aDoubleLeftClic_0; "Double left-click axis labels to fit th"...
xor eax, eax
call _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
xorps xmm0, xmm0; float
call _ZN5ImGui8UnindentEf; ImGui::Unindent(float)
lea rdi, aRightClickOpen; "Right-click open the full plot context "...
xor eax, eax
call _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
xorps xmm0, xmm0; float
call _ZN5ImGui6IndentEf; ImGui::Indent(float)
lea rdi, aRightClickAxis; "Right-click axis labels to open an indi"...
xor eax, eax
call _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
xorps xmm0, xmm0; float
call _ZN5ImGui8UnindentEf; ImGui::Unindent(float)
lea rdi, aClickLegendLab; "Click legend label icons to show/hide p"...
xor eax, eax
pop rcx
jmp _ZN5ImGui10BulletTextEPKcz; ImGui::BulletText(char const*,...)
| long long ImPlot::ShowUserGuide(ImPlot *this, const char *a2)
{
ImGui::BulletText((ImGui *)"Left-click drag within the plot area to pan X and Y axes.", a2);
ImGui::Indent((ImGui *)"Left-click drag within the plot area to pan X and Y axes.", 0.0);
ImGui::BulletText((ImGui *)"Left-click drag on axis labels to pan an individual axis.", a2);
ImGui::Unindent((ImGui *)"Left-click drag on axis labels to pan an individual axis.", 0.0);
ImGui::BulletText((ImGui *)"Scroll in the plot area to zoom both X any Y axes.", a2);
ImGui::Indent((ImGui *)"Scroll in the plot area to zoom both X any Y axes.", 0.0);
ImGui::BulletText((ImGui *)"Scroll on axis labels to zoom an individual axis.", a2);
ImGui::Unindent((ImGui *)"Scroll on axis labels to zoom an individual axis.", 0.0);
ImGui::BulletText((ImGui *)"Right-click drag to box select data.", a2);
ImGui::Indent((ImGui *)"Right-click drag to box select data.", 0.0);
ImGui::BulletText((ImGui *)"Hold Alt to expand box selection horizontally.", a2);
ImGui::BulletText((ImGui *)"Hold Shift to expand box selection vertically.", a2);
ImGui::BulletText((ImGui *)"Left-click while box selecting to cancel the selection.", a2);
ImGui::Unindent((ImGui *)"Left-click while box selecting to cancel the selection.", 0.0);
ImGui::BulletText((ImGui *)"Double left-click to fit all visible data.", a2);
ImGui::Indent((ImGui *)"Double left-click to fit all visible data.", 0.0);
ImGui::BulletText((ImGui *)"Double left-click axis labels to fit the individual axis.", a2);
ImGui::Unindent((ImGui *)"Double left-click axis labels to fit the individual axis.", 0.0);
ImGui::BulletText((ImGui *)"Right-click open the full plot context menu.", a2);
ImGui::Indent((ImGui *)"Right-click open the full plot context menu.", 0.0);
ImGui::BulletText((ImGui *)"Right-click axis labels to open an individual axis context menu.", a2);
ImGui::Unindent((ImGui *)"Right-click axis labels to open an individual axis context menu.", 0.0);
return ImGui::BulletText((ImGui *)"Click legend label icons to show/hide plot items.", a2);
}
| ShowUserGuide:
PUSH RAX
LEA RDI,[0x39b375]
XOR EAX,EAX
CALL 0x00356de0
XORPS XMM0,XMM0
CALL 0x0032c0d9
LEA RDI,[0x39b3af]
XOR EAX,EAX
CALL 0x00356de0
XORPS XMM0,XMM0
CALL 0x0032c126
LEA RDI,[0x39b3e9]
XOR EAX,EAX
CALL 0x00356de0
XORPS XMM0,XMM0
CALL 0x0032c0d9
LEA RDI,[0x39b41c]
XOR EAX,EAX
CALL 0x00356de0
XORPS XMM0,XMM0
CALL 0x0032c126
LEA RDI,[0x39b44e]
XOR EAX,EAX
CALL 0x00356de0
XORPS XMM0,XMM0
CALL 0x0032c0d9
LEA RDI,[0x39b473]
XOR EAX,EAX
CALL 0x00356de0
LEA RDI,[0x39b4a2]
XOR EAX,EAX
CALL 0x00356de0
LEA RDI,[0x39b4d1]
XOR EAX,EAX
CALL 0x00356de0
XORPS XMM0,XMM0
CALL 0x0032c126
LEA RDI,[0x39b509]
XOR EAX,EAX
CALL 0x00356de0
XORPS XMM0,XMM0
CALL 0x0032c0d9
LEA RDI,[0x39b534]
XOR EAX,EAX
CALL 0x00356de0
XORPS XMM0,XMM0
CALL 0x0032c126
LEA RDI,[0x39b56e]
XOR EAX,EAX
CALL 0x00356de0
XORPS XMM0,XMM0
CALL 0x0032c0d9
LEA RDI,[0x39b59b]
XOR EAX,EAX
CALL 0x00356de0
XORPS XMM0,XMM0
CALL 0x0032c126
LEA RDI,[0x39b5dc]
XOR EAX,EAX
POP RCX
JMP 0x00356de0
|
/* ImPlot::ShowUserGuide() */
void ImPlot::ShowUserGuide(void)
{
int8 in_RAX;
int8 extraout_RDX;
int8 in_RSI;
ImGui::BulletText("Left-click drag within the plot area to pan X and Y axes.");
ImGui::Indent(0.0);
ImGui::BulletText("Left-click drag on axis labels to pan an individual axis.");
ImGui::Unindent(0.0);
ImGui::BulletText("Scroll in the plot area to zoom both X any Y axes.");
ImGui::Indent(0.0);
ImGui::BulletText("Scroll on axis labels to zoom an individual axis.");
ImGui::Unindent(0.0);
ImGui::BulletText("Right-click drag to box select data.");
ImGui::Indent(0.0);
ImGui::BulletText("Hold Alt to expand box selection horizontally.");
ImGui::BulletText("Hold Shift to expand box selection vertically.");
ImGui::BulletText("Left-click while box selecting to cancel the selection.");
ImGui::Unindent(0.0);
ImGui::BulletText("Double left-click to fit all visible data.");
ImGui::Indent(0.0);
ImGui::BulletText("Double left-click axis labels to fit the individual axis.");
ImGui::Unindent(0.0);
ImGui::BulletText("Right-click open the full plot context menu.");
ImGui::Indent(0.0);
ImGui::BulletText("Right-click axis labels to open an individual axis context menu.");
ImGui::Unindent(0.0);
ImGui::BulletText("Click legend label icons to show/hide plot items.",in_RSI,extraout_RDX,in_RAX);
return;
}
|
|
5,958 | my_thread_init | eloqsql/mysys/my_thr_init.c | my_bool my_thread_init(void)
{
struct st_my_thread_var *tmp;
my_bool error=0;
if (!my_thread_global_init_done)
return 1; /* cannot proceed with uninitialized library */
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_init(): pthread_self: %p\n", pthread_self());
#endif
if (my_thread_var)
{
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_init() called more than once in thread 0x%lx\n",
(long) pthread_self());
#endif
goto end;
}
#ifdef _MSC_VER
install_sigabrt_handler();
#endif
if (!(tmp= (struct st_my_thread_var *) calloc(1, sizeof(*tmp))))
{
error= 1;
goto end;
}
set_mysys_var(tmp);
tmp->pthread_self= pthread_self();
my_thread_init_thr_mutex(tmp);
tmp->stack_ends_here= (char*)&tmp +
STACK_DIRECTION * (long)my_thread_stack_size;
mysql_mutex_lock(&THR_LOCK_threads);
tmp->id= tmp->dbug_id= ++thread_id;
++THR_thread_count;
mysql_mutex_unlock(&THR_LOCK_threads);
tmp->init= 1;
#ifndef DBUG_OFF
/* Generate unique name for thread */
(void) my_thread_name();
#endif
end:
return error;
} | O0 | c | my_thread_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb $0x0, -0x11(%rbp)
cmpb $0x0, 0x380c9d(%rip) # 0x40d820
jne 0x8cb8e
movb $0x1, -0x1(%rbp)
jmp 0x8cc77
callq 0x8ca30
cmpq $0x0, %rax
je 0x8cb9e
jmp 0x8cc71
movl $0x1, %edi
movl $0xf0, %esi
callq 0x388c0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x8cbc0
movb $0x1, -0x11(%rbp)
jmp 0x8cc71
movq -0x10(%rbp), %rdi
callq 0x8cee0
callq 0x386f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq -0x10(%rbp), %rdi
callq 0x8ca80
leaq 0x1bd1b4(%rip), %rax # 0x249da0
movq (%rax), %rax
shlq $0x0, %rax
leaq -0x10(%rbp), %rcx
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb8(%rax)
leaq 0x380b4c(%rip), %rdi # 0x40d758
leaq 0x56d96(%rip), %rsi # 0xe39a9
movl $0x12e, %edx # imm = 0x12E
callq 0x8cd90
movq 0x380c04(%rip), %rcx # 0x40d828
addq $0x1, %rcx
movq %rcx, 0x380bf9(%rip) # 0x40d828
movq -0x10(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0xd0(%rax)
leaq 0x38090c(%rip), %rax # 0x40d558
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x380900(%rip), %rax # 0x40d558
movl %ecx, (%rax)
leaq 0x380af7(%rip), %rdi # 0x40d758
callq 0x8ce80
movq -0x10(%rbp), %rax
movb $0x1, 0xe8(%rax)
movb -0x11(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
| my_thread_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_11], 0
cmp cs:my_thread_global_init_done, 0
jnz short loc_8CB8E
mov [rbp+var_1], 1
jmp loc_8CC77
loc_8CB8E:
call _my_thread_var
cmp rax, 0
jz short loc_8CB9E
jmp loc_8CC71
loc_8CB9E:
mov edi, 1
mov esi, 0F0h
call _calloc
mov [rbp+var_10], rax
cmp rax, 0
jnz short loc_8CBC0
mov [rbp+var_11], 1
jmp loc_8CC71
loc_8CBC0:
mov rdi, [rbp+var_10]
call set_mysys_var
call _pthread_self
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+0C8h], rcx
mov rdi, [rbp+var_10]
call my_thread_init_thr_mutex
lea rax, my_thread_stack_size
mov rax, [rax]
shl rax, 0
lea rcx, [rbp+var_10]
add rcx, rax
mov rax, [rbp+var_10]
mov [rax+0B8h], rcx
lea rdi, THR_LOCK_threads
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 12Eh
call inline_mysql_mutex_lock_0
mov rcx, cs:thread_id
add rcx, 1
mov cs:thread_id, rcx
mov rax, [rbp+var_10]
mov [rax+0D8h], rcx
mov rax, [rbp+var_10]
mov [rax+0D0h], rcx
lea rax, THR_thread_count
mov ecx, [rax]
add ecx, 1
lea rax, THR_thread_count
mov [rax], ecx
lea rdi, THR_LOCK_threads
call inline_mysql_mutex_unlock_0
mov rax, [rbp+var_10]
mov byte ptr [rax+0E8h], 1
loc_8CC71:
mov al, [rbp+var_11]
mov [rbp+var_1], al
loc_8CC77:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char my_thread_init()
{
long long v0; // rcx
char v2; // [rsp+Fh] [rbp-11h]
long long v3; // [rsp+10h] [rbp-10h] BYREF
v2 = 0;
if ( !my_thread_global_init_done )
return 1;
if ( !my_thread_var() )
{
v3 = calloc(1LL, 240LL);
if ( v3 )
{
set_mysys_var(v3);
*(_QWORD *)(v3 + 200) = pthread_self();
my_thread_init_thr_mutex(v3);
*(_QWORD *)(v3 + 184) = (char *)&v3 + my_thread_stack_size;
inline_mysql_mutex_lock_0(
&THR_LOCK_threads,
"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
302LL);
v0 = thread_id + 1;
thread_id = v0;
*(_QWORD *)(v3 + 216) = v0;
*(_QWORD *)(v3 + 208) = v0;
++THR_thread_count;
inline_mysql_mutex_unlock_0(&THR_LOCK_threads);
*(_BYTE *)(v3 + 232) = 1;
}
else
{
return 1;
}
}
return v2;
}
| my_thread_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV byte ptr [RBP + -0x11],0x0
CMP byte ptr [0x0050d820],0x0
JNZ 0x0018cb8e
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0018cc77
LAB_0018cb8e:
CALL 0x0018ca30
CMP RAX,0x0
JZ 0x0018cb9e
JMP 0x0018cc71
LAB_0018cb9e:
MOV EDI,0x1
MOV ESI,0xf0
CALL 0x001388c0
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JNZ 0x0018cbc0
MOV byte ptr [RBP + -0x11],0x1
JMP 0x0018cc71
LAB_0018cbc0:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0018cee0
CALL 0x001386f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xc8],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0018ca80
LEA RAX,[0x349da0]
MOV RAX,qword ptr [RAX]
SHL RAX,0x0
LEA RCX,[RBP + -0x10]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xb8],RCX
LEA RDI,[0x50d758]
LEA RSI,[0x1e39a9]
MOV EDX,0x12e
CALL 0x0018cd90
MOV RCX,qword ptr [0x0050d828]
ADD RCX,0x1
MOV qword ptr [0x0050d828],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xd8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xd0],RCX
LEA RAX,[0x50d558]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x50d558]
MOV dword ptr [RAX],ECX
LEA RDI,[0x50d758]
CALL 0x0018ce80
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xe8],0x1
LAB_0018cc71:
MOV AL,byte ptr [RBP + -0x11]
MOV byte ptr [RBP + -0x1],AL
LAB_0018cc77:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 my_thread_init(void)
{
long lVar1;
pthread_t pVar2;
int1 local_19;
void *local_18;
int1 local_9;
local_19 = 0;
if (my_thread_global_init_done == '\0') {
local_9 = 1;
}
else {
lVar1 = _my_thread_var();
if (lVar1 == 0) {
local_18 = calloc(1,0xf0);
if (local_18 == (void *)0x0) {
local_19 = 1;
}
else {
set_mysys_var(local_18);
pVar2 = pthread_self();
*(pthread_t *)((long)local_18 + 200) = pVar2;
my_thread_init_thr_mutex(local_18);
*(long *)((long)local_18 + 0xb8) = (long)&local_18 + my_thread_stack_size;
inline_mysql_mutex_lock
(THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
0x12e);
lVar1 = thread_id + 1;
thread_id = lVar1;
*(long *)((long)local_18 + 0xd8) = lVar1;
*(long *)((long)local_18 + 0xd0) = lVar1;
THR_thread_count = THR_thread_count + 1;
inline_mysql_mutex_unlock(THR_LOCK_threads);
*(int1 *)((long)local_18 + 0xe8) = 1;
}
}
local_9 = local_19;
}
return local_9;
}
|
|
5,959 | my_strndup | eloqsql/mysys/my_malloc.c | char *my_strndup(PSI_memory_key key, const char *from, size_t length, myf my_flags)
{
char *ptr;
DBUG_ENTER("my_strndup");
if ((ptr= (char*) my_malloc(key, length+1, my_flags)))
{
memcpy(ptr, from, length);
ptr[length]= 0;
}
DBUG_RETURN(ptr);
} | O0 | c | my_strndup:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl -0x4(%rbp), %edi
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
movq -0x20(%rbp), %rdx
callq 0xf3860
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xf3da2
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2a090
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0xf3da4
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strndup:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov edi, [rbp+var_4]
mov rsi, [rbp+var_18]
add rsi, 1
mov rdx, [rbp+var_20]
call my_malloc
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_F3DA2
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _memcpy
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
mov byte ptr [rax+rcx], 0
loc_F3DA2:
jmp short $+2
loc_F3DA4:
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
add rsp, 30h
pop rbp
retn
| long long my_strndup(unsigned int a1, long long a2, long long a3, int a4)
{
long long v5; // [rsp+8h] [rbp-28h]
v5 = my_malloc(a1, (const char *)(a3 + 1), a4);
if ( v5 )
{
memcpy(v5, a2, a3);
*(_BYTE *)(v5 + a3) = 0;
}
return v5;
}
| my_strndup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001f3860
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x001f3da2
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_001f3da2:
JMP 0x001f3da4
LAB_001f3da4:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x30
POP RBP
RET
|
void * my_strndup(int4 param_1,void *param_2,size_t param_3,int8 param_4)
{
void *__dest;
__dest = (void *)my_malloc(param_1,param_3 + 1,param_4);
if (__dest != (void *)0x0) {
memcpy(__dest,param_2,param_3);
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
|
|
5,960 | char* fmt::v10::detail::format_uint<4u, char, unsigned int>(char*, unsigned int, int, bool) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR auto format_uint(Char* buffer, UInt value, int num_digits,
bool upper = false) -> Char* {
buffer += num_digits;
Char* end = buffer;
do {
const char* digits = upper ? "0123456789ABCDEF" : "0123456789abcdef";
unsigned digit = static_cast<unsigned>(value & ((1 << BASE_BITS) - 1));
*--buffer = static_cast<Char>(BASE_BITS < 4 ? static_cast<char>('0' + digit)
: digits[digit]);
} while ((value >>= BASE_BITS) != 0);
return end;
} | O0 | c | char* fmt::v10::detail::format_uint<4u, char, unsigned int>(char*, unsigned int, int, bool):
movb %r8b, %al
movq %rsi, -0x18(%rsp)
movq %rdx, -0x10(%rsp)
movq -0x18(%rsp), %rdx
movq -0x10(%rsp), %rsi
movq %rdi, -0x20(%rsp)
movq %rsi, -0x30(%rsp)
movq %rdx, -0x38(%rsp)
movl %ecx, -0x3c(%rsp)
andb $0x1, %al
movb %al, -0x3d(%rsp)
movl -0x3c(%rsp), %ecx
movq -0x20(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movq -0x20(%rsp), %rax
movq %rax, -0x48(%rsp)
testb $0x1, -0x3d(%rsp)
je 0xa8fd3
leaq 0x6706f(%rip), %rax # 0x11003b
movq %rax, -0x60(%rsp)
jmp 0xa8fe1
leaq 0x67072(%rip), %rax # 0x11004c
movq %rax, -0x60(%rsp)
jmp 0xa8fe1
movq -0x60(%rsp), %rax
movq %rax, -0x50(%rsp)
movl -0x38(%rsp), %eax
andl $0x7, %eax
movl %eax, -0x54(%rsp)
movl -0x54(%rsp), %eax
addl $0x30, %eax
movb %al, %cl
movq -0x20(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x20(%rsp)
movb %cl, -0x1(%rax)
movq -0x38(%rsp), %rdx
movq -0x30(%rsp), %rcx
movq %rcx, %rax
shldq $0x3d, %rdx, %rax
shrq $0x3, %rcx
movq %rcx, -0x30(%rsp)
movq %rax, -0x38(%rsp)
orq %rcx, %rax
jne 0xa8fbe
jmp 0xa903a
movq -0x48(%rsp), %rax
retq
| _ZN3fmt3v106detail11format_uintILj3EcoEEPT0_S4_T1_ib:
mov al, r8b
mov [rsp+var_18], rsi
mov [rsp+var_10], rdx
mov rdx, [rsp+var_18]
mov rsi, [rsp+var_10]
mov [rsp+var_20], rdi
mov [rsp+var_30], rsi
mov [rsp+var_38], rdx
mov [rsp+var_3C], ecx
and al, 1
mov [rsp+var_3D], al
mov ecx, [rsp+var_3C]
mov rax, [rsp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rsp+var_20], rax
mov rax, [rsp+var_20]
mov [rsp+var_48], rax
loc_A8FBE:
test [rsp+var_3D], 1
jz short loc_A8FD3
lea rax, a0123456789abcd; "0123456789ABCDEF"
mov [rsp+var_60], rax
jmp short loc_A8FE1
loc_A8FD3:
lea rax, a0123456789abcd_0; "0123456789abcdef"
mov [rsp+var_60], rax
jmp short $+2
loc_A8FE1:
mov rax, [rsp+var_60]
mov [rsp+var_50], rax
mov eax, dword ptr [rsp+var_38]
and eax, 7
mov [rsp+var_54], eax
mov eax, [rsp+var_54]
add eax, 30h ; '0'
mov cl, al
mov rax, [rsp+var_20]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_20], rdx
mov [rax-1], cl
mov rdx, [rsp+var_38]
mov rcx, [rsp+var_30]
mov rax, rcx
shld rax, rdx, 3Dh
shr rcx, 3
mov [rsp+var_30], rcx
mov [rsp+var_38], rax
or rax, rcx
jnz short loc_A8FBE
jmp short $+2
loc_A903A:
mov rax, [rsp+var_48]
retn
| long long fmt::v10::detail::format_uint<3u,char,unsigned __int128>(long long a1, long long a2, long long a3, int a4)
{
long long v4; // rax
unsigned __int128 v6; // [rsp+28h] [rbp-38h]
long long v7; // [rsp+40h] [rbp-20h]
*((_QWORD *)&v6 + 1) = a3;
*(_QWORD *)&v6 = a2;
v7 = a4 + a1;
do
{
v4 = v7--;
*(_BYTE *)(v4 - 1) = (v6 & 7) + 48;
v6 >>= 3;
}
while ( v6 != 0 );
return a4 + a1;
}
| format_uint<3u,char,unsigned__int128>:
MOV AL,R8B
MOV qword ptr [RSP + -0x18],RSI
MOV qword ptr [RSP + -0x10],RDX
MOV RDX,qword ptr [RSP + -0x18]
MOV RSI,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x20],RDI
MOV qword ptr [RSP + -0x30],RSI
MOV qword ptr [RSP + -0x38],RDX
MOV dword ptr [RSP + -0x3c],ECX
AND AL,0x1
MOV byte ptr [RSP + -0x3d],AL
MOV ECX,dword ptr [RSP + -0x3c]
MOV RAX,qword ptr [RSP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RSP + -0x48],RAX
LAB_001a8fbe:
TEST byte ptr [RSP + -0x3d],0x1
JZ 0x001a8fd3
LEA RAX,[0x21003b]
MOV qword ptr [RSP + -0x60],RAX
JMP 0x001a8fe1
LAB_001a8fd3:
LEA RAX,[0x21004c]
MOV qword ptr [RSP + -0x60],RAX
JMP 0x001a8fe1
LAB_001a8fe1:
MOV RAX,qword ptr [RSP + -0x60]
MOV qword ptr [RSP + -0x50],RAX
MOV EAX,dword ptr [RSP + -0x38]
AND EAX,0x7
MOV dword ptr [RSP + -0x54],EAX
MOV EAX,dword ptr [RSP + -0x54]
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RSP + -0x20]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + -0x20],RDX
MOV byte ptr [RAX + -0x1],CL
MOV RDX,qword ptr [RSP + -0x38]
MOV RCX,qword ptr [RSP + -0x30]
MOV RAX,RCX
SHLD RAX,RDX,0x3d
SHR RCX,0x3
MOV qword ptr [RSP + -0x30],RCX
MOV qword ptr [RSP + -0x38],RAX
OR RAX,RCX
JNZ 0x001a8fbe
JMP 0x001a903a
LAB_001a903a:
MOV RAX,qword ptr [RSP + -0x48]
RET
|
/* char* fmt::v10::detail::format_uint<3u, char, unsigned __int128>(char*, unsigned __int128, int,
bool) */
char * fmt::v10::detail::format_uint<3u,char,unsigned__int128>
(char *param_1,uint param_2,int param_3,bool param_4)
{
int7 in_register_00000009;
int4 in_register_00000014;
int4 in_register_00000034;
ulong local_38;
ulong local_30;
char *local_20;
local_38 = CONCAT44(in_register_00000034,param_2);
local_30 = CONCAT44(in_register_00000014,param_3);
local_20 = param_1 + (int)CONCAT71(in_register_00000009,param_4);
do {
local_20[-1] = ((byte)local_38 & 7) + 0x30;
local_38 = local_30 << 0x3d | local_38 >> 3;
local_30 = local_30 >> 3;
local_20 = local_20 + -1;
} while (local_38 != 0 || local_30 != 0);
return param_1 + (int)CONCAT71(in_register_00000009,param_4);
}
|
|
5,961 | Catch::ReusableStringStream& Catch::ReusableStringStream::operator<<<char const*>(char const* const&) | 11AgReS1SoR11[P]Graph/build_O1/_deps/catch2-src/src/catch2/../catch2/internal/catch_reusable_string_stream.hpp | auto operator << ( T const& value ) -> ReusableStringStream& {
*m_oss << value;
return *this;
} | O1 | cpp | Catch::ReusableStringStream& Catch::ReusableStringStream::operator<<<char const*>(char const* const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq (%rsi), %r15
testq %r15, %r15
je 0x23884
movq %r15, %rdi
callq 0x141f0
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x14600
jmp 0x2389c
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x148e0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
| _ZN5Catch20ReusableStringStreamlsIPKcEERS0_RKT_:
push r15
push r14
push rbx
mov rbx, rdi
mov r14, [rdi+8]
mov r15, [rsi]
test r15, r15
jz short loc_23884
mov rdi, r15
call _strlen
mov rdi, r14
mov rsi, r15
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_2389C
loc_23884:
mov rax, [r14]
mov rax, [rax-18h]
lea rdi, [r14+rax]
mov esi, [r14+rax+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_2389C:
mov rax, rbx
pop rbx
pop r14
pop r15
retn
| long long Catch::ReusableStringStream::operator<<<char const*>(long long a1, _QWORD *a2)
{
_QWORD *v2; // r14
long long v3; // r15
long long v4; // rax
v2 = *(_QWORD **)(a1 + 8);
v3 = *a2;
if ( *a2 )
{
v4 = strlen(*a2);
std::__ostream_insert<char,std::char_traits<char>>(v2, v3, v4);
}
else
{
std::ios::clear((char *)v2 + *(_QWORD *)(*v2 - 24LL), *(_DWORD *)((char *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) | 1u);
}
return a1;
}
| operator<<:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x8]
MOV R15,qword ptr [RSI]
TEST R15,R15
JZ 0x00123884
MOV RDI,R15
CALL 0x001141f0
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
CALL 0x00114600
JMP 0x0012389c
LAB_00123884:
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[R14 + RAX*0x1]
MOV ESI,dword ptr [R14 + RAX*0x1 + 0x20]
OR ESI,0x1
CALL 0x001148e0
LAB_0012389c:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* Catch::ReusableStringStream& Catch::ReusableStringStream::TEMPNAMEPLACEHOLDERVALUE(char const*
const&) */
ReusableStringStream * __thiscall
Catch::ReusableStringStream::operator<<(ReusableStringStream *this,char **param_1)
{
ostream *poVar1;
char *__s;
size_t sVar2;
poVar1 = *(ostream **)(this + 8);
__s = *param_1;
if (__s == (char *)0x0) {
std::ios::clear(poVar1 + *(long *)(*(long *)poVar1 + -0x18),
*(uint *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x20) | 1);
}
else {
sVar2 = strlen(__s);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,__s,sVar2);
}
return this;
}
|
|
5,962 | LefDefParser::lefwSite(char const*, char const*, char const*, double, double) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwSite(const char *siteName,
const char *classType,
const char *symmetry,
double width,
double height)
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (lefwState == LEFW_SITE)
return LEFW_BAD_ORDER;
if (lefwState != LEFW_INIT && lefwState < LEFW_END)
return LEFW_BAD_ORDER; // not of the ENDs
if (!siteName || siteName == 0 || *siteName == 0)
return LEFW_BAD_DATA;
if (lefwWriteEncrypt) {
encPrint(lefwFile, (char*) "SITE %s\n", siteName);
if (classType && strcmp(classType, "PAD") && strcmp(classType, "CORE"))
return LEFW_BAD_DATA;
encPrint(lefwFile, (char*) " CLASS %s ;\n", classType);
if (symmetry)
encPrint(lefwFile, (char*) " SYMMETRY %s ;\n", symmetry);
encPrint(lefwFile, (char*) " SIZE %.11g BY %.11g ;\n", width, height);
// encPrint(lefwFile, (char*)"END %s\n\n", siteName);
} else {
fprintf(lefwFile, "SITE %s\n", siteName);
if (classType && strcmp(classType, "PAD") && strcmp(classType, "CORE"))
return LEFW_BAD_DATA;
fprintf(lefwFile, " CLASS %s ;\n", classType);
if (symmetry)
fprintf(lefwFile, " SYMMETRY %s ;\n", symmetry);
fprintf(lefwFile, " SIZE %.11g BY %.11g ;\n", width, height);
// a separate function call, lefwEndSite
// fprintf(lefwFile, "END %s\n\n", siteName);
}
lefwLines = lefwLines + 4;
lefwSynArray[LEFW_SITE] = 1;
lefwState = LEFW_SITE;
return LEFW_OK;
} | O0 | cpp | LefDefParser::lefwSite(char const*, char const*, char const*, double, double):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
leaq 0x9d59a(%rip), %rax # 0xc5250
cmpq $0x0, (%rax)
jne 0x27cc9
movl $0x1, 0x34(%rsp)
jmp 0x27f1f
leaq 0x9d7d4(%rip), %rax # 0xc54a4
cmpl $0x0, (%rax)
jne 0x27ce2
movl $0x2, 0x34(%rsp)
jmp 0x27f1f
leaq 0x9d7b7(%rip), %rax # 0xc54a0
cmpl $0x42, (%rax)
jne 0x27cfb
movl $0x2, 0x34(%rsp)
jmp 0x27f1f
leaq 0x9d79e(%rip), %rax # 0xc54a0
cmpl $0x1, (%rax)
je 0x27d20
leaq 0x9d792(%rip), %rax # 0xc54a0
cmpl $0x4f, (%rax)
jge 0x27d20
movl $0x2, 0x34(%rsp)
jmp 0x27f1f
cmpq $0x0, 0x28(%rsp)
je 0x27d3d
cmpq $0x0, 0x28(%rsp)
je 0x27d3d
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x27d4a
movl $0x3, 0x34(%rsp)
jmp 0x27f1f
cmpl $0x0, 0x9d7eb(%rip) # 0xc553c
je 0x27e20
leaq 0x9d4f2(%rip), %rax # 0xc5250
movq (%rax), %rdi
movq 0x28(%rsp), %rdx
leaq 0x696f5(%rip), %rsi # 0x91462
movb $0x0, %al
callq 0x8bf50
cmpq $0x0, 0x20(%rsp)
je 0x27db5
movq 0x20(%rsp), %rdi
leaq 0x6be1a(%rip), %rsi # 0x93ba2
callq 0x2360
cmpl $0x0, %eax
je 0x27db5
movq 0x20(%rsp), %rdi
leaq 0x6be08(%rip), %rsi # 0x93ba6
callq 0x2360
cmpl $0x0, %eax
je 0x27db5
movl $0x3, 0x34(%rsp)
jmp 0x27f1f
leaq 0x9d494(%rip), %rax # 0xc5250
movq (%rax), %rdi
movq 0x20(%rsp), %rdx
leaq 0x6bde0(%rip), %rsi # 0x93bab
movb $0x0, %al
callq 0x8bf50
cmpq $0x0, 0x18(%rsp)
je 0x27df7
leaq 0x9d46f(%rip), %rax # 0xc5250
movq (%rax), %rdi
movq 0x18(%rsp), %rdx
leaq 0x6bdca(%rip), %rsi # 0x93bba
movb $0x0, %al
callq 0x8bf50
leaq 0x9d452(%rip), %rax # 0xc5250
movq (%rax), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
leaq 0x6bdb8(%rip), %rsi # 0x93bcc
movb $0x2, %al
callq 0x8bf50
jmp 0x27ee4
leaq 0x9d429(%rip), %rax # 0xc5250
movq (%rax), %rdi
movq 0x28(%rsp), %rdx
leaq 0x6962c(%rip), %rsi # 0x91462
movb $0x0, %al
callq 0x2370
cmpq $0x0, 0x20(%rsp)
je 0x27e7e
movq 0x20(%rsp), %rdi
leaq 0x6bd51(%rip), %rsi # 0x93ba2
callq 0x2360
cmpl $0x0, %eax
je 0x27e7e
movq 0x20(%rsp), %rdi
leaq 0x6bd3f(%rip), %rsi # 0x93ba6
callq 0x2360
cmpl $0x0, %eax
je 0x27e7e
movl $0x3, 0x34(%rsp)
jmp 0x27f1f
leaq 0x9d3cb(%rip), %rax # 0xc5250
movq (%rax), %rdi
movq 0x20(%rsp), %rdx
leaq 0x6bd17(%rip), %rsi # 0x93bab
movb $0x0, %al
callq 0x2370
cmpq $0x0, 0x18(%rsp)
je 0x27ec0
leaq 0x9d3a6(%rip), %rax # 0xc5250
movq (%rax), %rdi
movq 0x18(%rsp), %rdx
leaq 0x6bd01(%rip), %rsi # 0x93bba
movb $0x0, %al
callq 0x2370
leaq 0x9d389(%rip), %rax # 0xc5250
movq (%rax), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
leaq 0x6bcef(%rip), %rsi # 0x93bcc
movb $0x2, %al
callq 0x2370
leaq 0x9d5b1(%rip), %rax # 0xc549c
movl (%rax), %ecx
addl $0x4, %ecx
leaq 0x9d5a5(%rip), %rax # 0xc549c
movl %ecx, (%rax)
leaq 0x9d360(%rip), %rax # 0xc5260
movl $0x1, 0x108(%rax)
leaq 0x9d58f(%rip), %rax # 0xc54a0
movl $0x42, (%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
| _ZN12LefDefParser8lefwSiteEPKcS1_S1_dd:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_20], rdx
movsd [rsp+38h+var_28], xmm0
movsd [rsp+38h+var_30], xmm1
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_27CC9
mov [rsp+38h+var_4], 1
jmp loc_27F1F
loc_27CC9:
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
cmp dword ptr [rax], 0
jnz short loc_27CE2
mov [rsp+38h+var_4], 2
jmp loc_27F1F
loc_27CE2:
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 42h ; 'B'
jnz short loc_27CFB
mov [rsp+38h+var_4], 2
jmp loc_27F1F
loc_27CFB:
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 1
jz short loc_27D20
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 4Fh ; 'O'
jge short loc_27D20
mov [rsp+38h+var_4], 2
jmp loc_27F1F
loc_27D20:
cmp [rsp+38h+var_10], 0
jz short loc_27D3D
cmp [rsp+38h+var_10], 0
jz short loc_27D3D
mov rax, [rsp+38h+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_27D4A
loc_27D3D:
mov [rsp+38h+var_4], 3
jmp loc_27F1F
loc_27D4A:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz loc_27E20
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+38h+var_10]
lea rsi, aSiteS_0; "SITE %s\n"
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
cmp [rsp+38h+var_18], 0
jz short loc_27DB5
mov rdi, [rsp+38h+var_18]
lea rsi, aPad; "PAD"
call _strcmp
cmp eax, 0
jz short loc_27DB5
mov rdi, [rsp+38h+var_18]
lea rsi, aCore; "CORE"
call _strcmp
cmp eax, 0
jz short loc_27DB5
mov [rsp+38h+var_4], 3
jmp loc_27F1F
loc_27DB5:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+38h+var_18]
lea rsi, aClassS_0; " CLASS %s ;\n"
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
cmp [rsp+38h+var_20], 0
jz short loc_27DF7
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+38h+var_20]
lea rsi, aSymmetryS; " SYMMETRY %s ;\n"
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
loc_27DF7:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+38h+var_28]
movsd xmm1, [rsp+38h+var_30]
lea rsi, aSize11gBy11g; " SIZE %.11g BY %.11g ;\n"
mov al, 2
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp loc_27EE4
loc_27E20:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+38h+var_10]
lea rsi, aSiteS_0; "SITE %s\n"
mov al, 0
call _fprintf
cmp [rsp+38h+var_18], 0
jz short loc_27E7E
mov rdi, [rsp+38h+var_18]
lea rsi, aPad; "PAD"
call _strcmp
cmp eax, 0
jz short loc_27E7E
mov rdi, [rsp+38h+var_18]
lea rsi, aCore; "CORE"
call _strcmp
cmp eax, 0
jz short loc_27E7E
mov [rsp+38h+var_4], 3
jmp loc_27F1F
loc_27E7E:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+38h+var_18]
lea rsi, aClassS_0; " CLASS %s ;\n"
mov al, 0
call _fprintf
cmp [rsp+38h+var_20], 0
jz short loc_27EC0
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+38h+var_20]
lea rsi, aSymmetryS; " SYMMETRY %s ;\n"
mov al, 0
call _fprintf
loc_27EC0:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+38h+var_28]
movsd xmm1, [rsp+38h+var_30]
lea rsi, aSize11gBy11g; " SIZE %.11g BY %.11g ;\n"
mov al, 2
call _fprintf
loc_27EE4:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 4
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray
mov dword ptr [rax+108h], 1
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov dword ptr [rax], 42h ; 'B'
mov [rsp+38h+var_4], 0
loc_27F1F:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long LefDefParser::lefwSite(
LefDefParser *this,
const char *a2,
const char *a3,
const char *a4,
double a5,
double a6,
int a7,
int a8)
{
int v8; // ecx
int v9; // r8d
int v10; // r9d
int v11; // edx
int v12; // ecx
int v13; // r8d
int v14; // r9d
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwDidInit )
{
if ( LefDefParser::lefwState == 66 )
{
return 2;
}
else if ( LefDefParser::lefwState == 1 || LefDefParser::lefwState >= 79 )
{
if ( this && *(_BYTE *)this )
{
if ( LefDefParser::lefwWriteEncrypt )
{
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"SITE %s\n", (_DWORD)this, (_DWORD)a4, a7, a8);
if ( a2 && (unsigned int)strcmp(a2, "PAD") && (unsigned int)strcmp(a2, "CORE") )
return 3;
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" CLASS %s ;\n", (_DWORD)a2, v8, v9, v10);
if ( a3 )
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" SYMMETRY %s ;\n",
(_DWORD)a3,
v12,
v13,
v14);
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" SIZE %.11g BY %.11g ;\n",
v11,
v12,
v13,
v14);
}
else
{
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "SITE %s\n", (const char *)this);
if ( a2 && (unsigned int)strcmp(a2, "PAD") && (unsigned int)strcmp(a2, "CORE") )
return 3;
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " CLASS %s ;\n", a2);
if ( a3 )
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " SYMMETRY %s ;\n", a3);
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " SIZE %.11g BY %.11g ;\n", a5, a6);
}
LefDefParser::lefwLines += 4;
LefDefParser::lefwSynArray[66] = 1;
LefDefParser::lefwState = 66;
return 0;
}
return 3;
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| lefwSite:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x18],RDX
MOVSD qword ptr [RSP + 0x10],XMM0
MOVSD qword ptr [RSP + 0x8],XMM1
LEA RAX,[0x1c5250]
CMP qword ptr [RAX],0x0
JNZ 0x00127cc9
MOV dword ptr [RSP + 0x34],0x1
JMP 0x00127f1f
LAB_00127cc9:
LEA RAX,[0x1c54a4]
CMP dword ptr [RAX],0x0
JNZ 0x00127ce2
MOV dword ptr [RSP + 0x34],0x2
JMP 0x00127f1f
LAB_00127ce2:
LEA RAX,[0x1c54a0]
CMP dword ptr [RAX],0x42
JNZ 0x00127cfb
MOV dword ptr [RSP + 0x34],0x2
JMP 0x00127f1f
LAB_00127cfb:
LEA RAX,[0x1c54a0]
CMP dword ptr [RAX],0x1
JZ 0x00127d20
LEA RAX,[0x1c54a0]
CMP dword ptr [RAX],0x4f
JGE 0x00127d20
MOV dword ptr [RSP + 0x34],0x2
JMP 0x00127f1f
LAB_00127d20:
CMP qword ptr [RSP + 0x28],0x0
JZ 0x00127d3d
CMP qword ptr [RSP + 0x28],0x0
JZ 0x00127d3d
MOV RAX,qword ptr [RSP + 0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x00127d4a
LAB_00127d3d:
MOV dword ptr [RSP + 0x34],0x3
JMP 0x00127f1f
LAB_00127d4a:
CMP dword ptr [0x001c553c],0x0
JZ 0x00127e20
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x28]
LEA RSI,[0x191462]
MOV AL,0x0
CALL 0x0018bf50
CMP qword ptr [RSP + 0x20],0x0
JZ 0x00127db5
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x193ba2]
CALL 0x00102360
CMP EAX,0x0
JZ 0x00127db5
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x193ba6]
CALL 0x00102360
CMP EAX,0x0
JZ 0x00127db5
MOV dword ptr [RSP + 0x34],0x3
JMP 0x00127f1f
LAB_00127db5:
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x20]
LEA RSI,[0x193bab]
MOV AL,0x0
CALL 0x0018bf50
CMP qword ptr [RSP + 0x18],0x0
JZ 0x00127df7
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x18]
LEA RSI,[0x193bba]
MOV AL,0x0
CALL 0x0018bf50
LAB_00127df7:
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVSD XMM1,qword ptr [RSP + 0x8]
LEA RSI,[0x193bcc]
MOV AL,0x2
CALL 0x0018bf50
JMP 0x00127ee4
LAB_00127e20:
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x28]
LEA RSI,[0x191462]
MOV AL,0x0
CALL 0x00102370
CMP qword ptr [RSP + 0x20],0x0
JZ 0x00127e7e
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x193ba2]
CALL 0x00102360
CMP EAX,0x0
JZ 0x00127e7e
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x193ba6]
CALL 0x00102360
CMP EAX,0x0
JZ 0x00127e7e
MOV dword ptr [RSP + 0x34],0x3
JMP 0x00127f1f
LAB_00127e7e:
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x20]
LEA RSI,[0x193bab]
MOV AL,0x0
CALL 0x00102370
CMP qword ptr [RSP + 0x18],0x0
JZ 0x00127ec0
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x18]
LEA RSI,[0x193bba]
MOV AL,0x0
CALL 0x00102370
LAB_00127ec0:
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVSD XMM1,qword ptr [RSP + 0x8]
LEA RSI,[0x193bcc]
MOV AL,0x2
CALL 0x00102370
LAB_00127ee4:
LEA RAX,[0x1c549c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x4
LEA RAX,[0x1c549c]
MOV dword ptr [RAX],ECX
LEA RAX,[0x1c5260]
MOV dword ptr [RAX + 0x108],0x1
LEA RAX,[0x1c54a0]
MOV dword ptr [RAX],0x42
MOV dword ptr [RSP + 0x34],0x0
LAB_00127f1f:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
/* LefDefParser::lefwSite(char const*, char const*, char const*, double, double) */
int4
LefDefParser::lefwSite(char *param_1,char *param_2,char *param_3,double param_4,double param_5)
{
int iVar1;
int4 local_4;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if (lefwDidInit == 0) {
local_4 = 2;
}
else if (lefwState == 0x42) {
local_4 = 2;
}
else if ((lefwState == 1) || (0x4e < lefwState)) {
if ((param_1 == (char *)0x0) || ((param_1 == (char *)0x0 || (*param_1 == '\0')))) {
local_4 = 3;
}
else {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile,"SITE %s\n",param_1);
if (((param_2 != (char *)0x0) && (iVar1 = strcmp(param_2,"PAD"), iVar1 != 0)) &&
(iVar1 = strcmp(param_2,"CORE"), iVar1 != 0)) {
return 3;
}
fprintf(lefwFile," CLASS %s ;\n",param_2);
if (param_3 != (char *)0x0) {
fprintf(lefwFile," SYMMETRY %s ;\n",param_3);
}
fprintf(lefwFile," SIZE %.11g BY %.11g ;\n",param_4,param_5);
}
else {
encPrint(lefwFile,"SITE %s\n",param_1);
if (((param_2 != (char *)0x0) && (iVar1 = strcmp(param_2,"PAD"), iVar1 != 0)) &&
(iVar1 = strcmp(param_2,"CORE"), iVar1 != 0)) {
return 3;
}
encPrint(lefwFile," CLASS %s ;\n",param_2);
if (param_3 != (char *)0x0) {
encPrint(lefwFile," SYMMETRY %s ;\n",param_3);
}
encPrint(lefwFile," SIZE %.11g BY %.11g ;\n",param_4,param_5);
}
lefwLines = lefwLines + 4;
lefwSynArray._264_4_ = 1;
lefwState = 0x42;
local_4 = 0;
}
}
else {
local_4 = 2;
}
return local_4;
}
|
|
5,963 | common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) | monkey531[P]llama/common/common.cpp | std::string common_token_to_piece(const struct llama_vocab * vocab, llama_token token, bool special) {
std::string piece;
piece.resize(piece.capacity()); // using string internal cache, 15 bytes + '\n'
const int n_chars = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
if (n_chars < 0) {
piece.resize(-n_chars);
int check = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
GGML_ASSERT(check == -n_chars);
}
else {
piece.resize(n_chars);
}
return piece;
} | O1 | cpp | common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0xf, %esi
xorl %edx, %edx
callq 0x191e0
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movzbl %r15b, %r15d
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x19630
movl %eax, %r12d
testl %eax, %eax
js 0x56156
movl %r12d, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x191e0
jmp 0x56181
negl %r12d
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x191e0
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x19630
cmpl %r12d, %eax
jne 0x56193
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x662c7(%rip), %rdi # 0xbc461
leaq 0x61fe1(%rip), %rdx # 0xb8182
leaq 0x6694f(%rip), %rcx # 0xbcaf7
movl $0x6cc, %esi # imm = 0x6CC
xorl %eax, %eax
callq 0x19b30
jmp 0x561b8
jmp 0x561b8
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x561cf
movq (%r13), %rsi
incq %rsi
callq 0x196d0
movq %r14, %rdi
callq 0x19c00
| _Z21common_token_to_pieceB5cxx11PK11llama_vocabib:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea r13, [rdi+10h]
mov [rdi], r13
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov esi, 0Fh
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdx, [rbx]
mov ecx, [rbx+8]
movzx r15d, r15b
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
mov r12d, eax
test eax, eax
js short loc_56156
mov esi, r12d
mov rdi, rbx
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
jmp short loc_56181
loc_56156:
neg r12d
mov rdi, rbx
mov rsi, r12
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdx, [rbx]
mov ecx, [rbx+8]
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
cmp eax, r12d
jnz short loc_56193
loc_56181:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_56193:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNChars; "check == -n_chars"
mov esi, 6CCh
xor eax, eax
call _ggml_abort
jmp short loc_561B8
jmp short $+2
loc_561B8:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_561CF
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_561CF:
mov rdi, r14
call __Unwind_Resume
| _QWORD * common_token_to_piece[abi:cxx11](_QWORD *a1, long long a2, unsigned int a3, unsigned __int8 a4)
{
long long v4; // rax
_QWORD *v7; // r13
int v8; // eax
long long v9; // r12
long long v11; // rax
long long v12; // r14
long long v13; // [rsp-8h] [rbp-38h]
long long v14; // [rsp-8h] [rbp-38h]
v13 = v4;
v7 = a1 + 2;
*a1 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
std::string::resize(a1, 15LL, 0LL);
v8 = llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, a4, v13);
if ( v8 < 0 )
{
v9 = (unsigned int)-v8;
std::string::resize(a1, v9, 0LL);
if ( (unsigned int)llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, a4, v14) != (_DWORD)v9 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1740LL,
"GGML_ASSERT(%s) failed",
"check == -n_chars");
v12 = v11;
if ( (_QWORD *)*a1 != v7 )
operator delete((void *)*a1, *v7 + 1LL);
_Unwind_Resume(v12);
}
}
else
{
std::string::resize(a1, (unsigned int)v8, 0LL);
}
return a1;
}
| common_token_to_piece[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA R13,[RDI + 0x10]
MOV qword ptr [RDI],R13
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_0015611a:
MOV ESI,0xf
XOR EDX,EDX
CALL 0x001191e0
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_0015612c:
MOVZX R15D,R15B
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x00119630
MOV R12D,EAX
TEST EAX,EAX
JS 0x00156156
MOV ESI,R12D
MOV RDI,RBX
XOR EDX,EDX
CALL 0x001191e0
JMP 0x00156181
LAB_00156156:
NEG R12D
MOV RDI,RBX
MOV RSI,R12
XOR EDX,EDX
CALL 0x001191e0
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_0015616c:
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x00119630
CMP EAX,R12D
JNZ 0x00156193
LAB_00156181:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00156193:
LEA RDI,[0x1bc461]
LEA RDX,[0x1b8182]
LEA RCX,[0x1bcaf7]
MOV ESI,0x6cc
XOR EAX,EAX
CALL 0x00119b30
|
/* common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) */
llama_vocab * common_token_to_piece_abi_cxx11_(llama_vocab *param_1,int param_2,bool param_3)
{
int iVar1;
int iVar2;
int1 in_CL;
int7 in_register_00000011;
int4 in_register_00000034;
*(llama_vocab **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (llama_vocab)0x0;
/* try { // try from 0015611a to 00156125 has its CatchHandler @ 001561b6 */
std::__cxx11::string::resize((ulong)param_1,'\x0f');
/* try { // try from 0015612c to 00156165 has its CatchHandler @ 001561b8 */
iVar1 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar1 < 0) {
std::__cxx11::string::resize((ulong)param_1,(char)-iVar1);
/* try { // try from 0015616c to 001561b3 has its CatchHandler @ 001561b4 */
iVar2 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar2 != -iVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6cc
,"GGML_ASSERT(%s) failed","check == -n_chars");
}
}
else {
std::__cxx11::string::resize((ulong)param_1,(char)iVar1);
}
return param_1;
}
|
|
5,964 | LefDefParser::defiNet::polyRouteStatus(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp | const char* defiNet::polyRouteStatus(int index) const {
char errMsg[128];
if (index < 0 || index > numPolys_) {
sprintf (errMsg, "ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numPolys_);
defiError(0, 6085, errMsg, defData);
return 0;
}
return polyRouteStatus_[index];
} | O0 | cpp | LefDefParser::defiNet::polyRouteStatus(int) const:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movl %esi, 0x94(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x94(%rsp)
jl 0x3eb51
movq 0x8(%rsp), %rcx
movl 0x94(%rsp), %eax
cmpl 0x170(%rcx), %eax
jle 0x3eba1
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0x94(%rsp), %edx
movl 0x170(%rax), %ecx
leaq 0x367ea(%rip), %rsi # 0x75359
movb $0x0, %al
callq 0x7060
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdx
movq 0x240(%rax), %rcx
xorl %edi, %edi
movl $0x17c5, %esi # imm = 0x17C5
callq 0x2a600
movq $0x0, 0xa0(%rsp)
jmp 0x3ebc1
movq 0x8(%rsp), %rax
movq 0x198(%rax), %rax
movslq 0x94(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZNK12LefDefParser7defiNet15polyRouteStatusEi:
sub rsp, 0A8h
mov [rsp+0A8h+var_10], rdi
mov [rsp+0A8h+var_14], esi
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_A0], rax
cmp [rsp+0A8h+var_14], 0
jl short loc_3EB51
mov rcx, [rsp+0A8h+var_A0]
mov eax, [rsp+0A8h+var_14]
cmp eax, [rcx+170h]
jle short loc_3EBA1
loc_3EB51:
mov rax, [rsp+0A8h+var_A0]
lea rdi, [rsp+0A8h+var_98]
mov edx, [rsp+0A8h+var_14]
mov ecx, [rax+170h]
lea rsi, aErrorDefpars60_6; "ERROR (DEFPARS-6085): The index number "...
mov al, 0
call _sprintf
mov rax, [rsp+0A8h+var_A0]
lea rdx, [rsp+0A8h+var_98]; int
mov rcx, [rax+240h]; char *
xor edi, edi; this
mov esi, 17C5h; int
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
mov [rsp+0A8h+var_8], 0
jmp short loc_3EBC1
loc_3EBA1:
mov rax, [rsp+0A8h+var_A0]
mov rax, [rax+198h]
movsxd rcx, [rsp+0A8h+var_14]
mov rax, [rax+rcx*8]
mov [rsp+0A8h+var_8], rax
loc_3EBC1:
mov rax, [rsp+0A8h+var_8]
add rsp, 0A8h
retn
| long long LefDefParser::defiNet::polyRouteStatus(LefDefParser::defrData **this, int a2)
{
LefDefParser::defrData *v2; // r8
char v4[132]; // [rsp+10h] [rbp-98h] BYREF
int v5; // [rsp+94h] [rbp-14h]
LefDefParser::defiNet *v6; // [rsp+98h] [rbp-10h]
v6 = (LefDefParser::defiNet *)this;
v5 = a2;
if ( a2 >= 0 && v5 <= *((_DWORD *)this + 92) )
return *((_QWORD *)this[51] + v5);
sprintf(
v4,
"ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
v5,
*((_DWORD *)this + 92));
LefDefParser::defiError(0LL, 6085, v4, this[72], v2);
return 0LL;
}
| polyRouteStatus:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x98],RDI
MOV dword ptr [RSP + 0x94],ESI
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0x94],0x0
JL 0x0013eb51
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x94]
CMP EAX,dword ptr [RCX + 0x170]
JLE 0x0013eba1
LAB_0013eb51:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0x94]
MOV ECX,dword ptr [RAX + 0x170]
LEA RSI,[0x175359]
MOV AL,0x0
CALL 0x00107060
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x240]
XOR EDI,EDI
MOV ESI,0x17c5
CALL 0x0012a600
MOV qword ptr [RSP + 0xa0],0x0
JMP 0x0013ebc1
LAB_0013eba1:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x198]
MOVSXD RCX,dword ptr [RSP + 0x94]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0xa0],RAX
LAB_0013ebc1:
MOV RAX,qword ptr [RSP + 0xa0]
ADD RSP,0xa8
RET
|
/* LefDefParser::defiNet::polyRouteStatus(int) const */
int8 __thiscall LefDefParser::defiNet::polyRouteStatus(defiNet *this,int param_1)
{
char local_98 [132];
int local_14;
defiNet *local_10;
int8 local_8;
if ((param_1 < 0) || (*(int *)(this + 0x170) < param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_98,
"ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x170));
defiError(0,0x17c5,local_98,*(defrData **)(this + 0x240));
local_8 = 0;
}
else {
local_8 = *(int8 *)(*(long *)(this + 0x198) + (long)param_1 * 8);
}
return local_8;
}
|
|
5,965 | add_export_entry2 | bluesky950520[P]quickjs/quickjs.c | static JSExportEntry *add_export_entry2(JSContext *ctx,
JSParseState *s, JSModuleDef *m,
JSAtom local_name, JSAtom export_name,
JSExportTypeEnum export_type)
{
JSExportEntry *me;
if (find_export_entry(ctx, m, export_name)) {
char buf1[ATOM_GET_STR_BUF_SIZE];
if (s) {
js_parse_error(s, "duplicate exported name '%s'",
JS_AtomGetStr(ctx, buf1, sizeof(buf1), export_name));
} else {
JS_ThrowSyntaxErrorAtom(ctx, "duplicate exported name '%s'", export_name);
}
return NULL;
}
if (js_resize_array(ctx, (void **)&m->export_entries,
sizeof(JSExportEntry),
&m->export_entries_size,
m->export_entries_count + 1))
return NULL;
me = &m->export_entries[m->export_entries_count++];
memset(me, 0, sizeof(*me));
me->local_name = JS_DupAtom(ctx, local_name);
me->export_name = JS_DupAtom(ctx, export_name);
me->export_type = export_type;
return me;
} | O3 | c | add_export_entry2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %ebp
movl %r8d, %ebx
movl %ecx, %r15d
movq %rdx, %r12
movq %rdi, %r14
movslq 0x30(%rdx), %r8
testq %r8, %r8
jle 0x30cea
movq %rsi, %r13
movq 0x28(%r12), %rax
movq %r8, %rcx
shlq $0x5, %rcx
xorl %edx, %edx
cmpl %ebx, 0x18(%rax,%rdx)
je 0x30d58
addq $0x20, %rdx
cmpq %rdx, %rcx
jne 0x30cdb
cmpl %r8d, 0x34(%r12)
jle 0x30db4
movq 0x28(%r12), %rcx
leal 0x1(%r8), %eax
movl %eax, 0x30(%r12)
movslq %r8d, %rdx
shlq $0x5, %rdx
leaq (%rcx,%rdx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rcx,%rdx)
movups %xmm0, (%rcx,%rdx)
cmpl $0xe0, %r15d
jl 0x30d34
movq 0x18(%r14), %rcx
movq 0x68(%rcx), %rcx
movl %r15d, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
movl %r15d, 0x14(%rax)
cmpl $0xe0, %ebx
jl 0x30d50
movq 0x18(%r14), %rcx
movq 0x68(%rcx), %rcx
movl %ebx, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
movl %ebx, 0x18(%rax)
movl %ebp, 0x10(%rax)
jmp 0x30da5
testq %r13, %r13
je 0x30d81
movq 0x18(%r14), %rdi
movq %rsp, %rsi
movl %ebx, %edx
callq 0x21e0b
leaq 0x7028a(%rip), %rsi # 0xa0ffc
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2fed1
jmp 0x30da3
movq 0x18(%r14), %rdi
movq %rsp, %rsi
movl %ebx, %edx
callq 0x21e0b
leaq 0x70266(%rip), %rsi # 0xa0ffc
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x220b9
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28(%r12), %rsi
leaq 0x34(%r12), %rcx
incl %r8d
movq %r14, %rdi
movl $0x20, %edx
callq 0x444ee
testl %eax, %eax
jne 0x30da3
movl 0x30(%r12), %r8d
jmp 0x30cf5
| add_export_entry2:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov ebp, r9d
mov ebx, r8d
mov r15d, ecx
mov r12, rdx
mov r14, rdi
movsxd r8, dword ptr [rdx+30h]
test r8, r8
jle short loc_30CEA
mov r13, rsi
mov rax, [r12+28h]
mov rcx, r8
shl rcx, 5
xor edx, edx
loc_30CDB:
cmp [rax+rdx+18h], ebx
jz short loc_30D58
add rdx, 20h ; ' '
cmp rcx, rdx
jnz short loc_30CDB
loc_30CEA:
cmp [r12+34h], r8d
jle loc_30DB4
loc_30CF5:
mov rcx, [r12+28h]
lea eax, [r8+1]
mov [r12+30h], eax
movsxd rdx, r8d
shl rdx, 5
lea rax, [rcx+rdx]
xorps xmm0, xmm0
movups xmmword ptr [rcx+rdx+10h], xmm0
movups xmmword ptr [rcx+rdx], xmm0
cmp r15d, 0E0h
jl short loc_30D34
mov rcx, [r14+18h]
mov rcx, [rcx+68h]
mov edx, r15d
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
loc_30D34:
mov [rax+14h], r15d
cmp ebx, 0E0h
jl short loc_30D50
mov rcx, [r14+18h]
mov rcx, [rcx+68h]
mov edx, ebx
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
loc_30D50:
mov [rax+18h], ebx
mov [rax+10h], ebp
jmp short loc_30DA5
loc_30D58:
test r13, r13
jz short loc_30D81
mov rdi, [r14+18h]
mov rsi, rsp
mov edx, ebx
call JS_AtomGetStrRT
lea rsi, aDuplicateExpor; "duplicate exported name '%s'"
mov rdi, r13
mov rdx, rax
xor eax, eax
call js_parse_error
jmp short loc_30DA3
loc_30D81:
mov rdi, [r14+18h]
mov rsi, rsp
mov edx, ebx
call JS_AtomGetStrRT
lea rsi, aDuplicateExpor; "duplicate exported name '%s'"
mov rdi, r14
mov rdx, rax
xor eax, eax
call JS_ThrowSyntaxError
loc_30DA3:
xor eax, eax
loc_30DA5:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_30DB4:
lea rsi, [r12+28h]
lea rcx, [r12+34h]
inc r8d
mov rdi, r14
mov edx, 20h ; ' '
call js_realloc_array
test eax, eax
jnz short loc_30DA3
mov r8d, [r12+30h]
jmp loc_30CF5
| long long add_export_entry2(
long long a1,
long long *a2,
long long a3,
int a4,
int a5,
int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
long long v18; // r8
long long v19; // rax
long long v20; // rdx
long long v21; // rcx
long long result; // rax
_DWORD *v23; // rcx
_DWORD *v24; // rcx
long long StrRT; // rax
long long v26; // rcx
long long v27; // r8
long long v28; // r9
__m128 v29; // xmm4
__m128 v30; // xmm5
char v31[120]; // [rsp+0h] [rbp-78h] BYREF
v18 = *(int *)(a3 + 48);
if ( v18 > 0 )
{
v19 = *(_QWORD *)(a3 + 40);
v20 = 0LL;
while ( *(_DWORD *)(v19 + v20 + 24) != a5 )
{
v20 += 32LL;
if ( 32 * v18 == v20 )
goto LABEL_5;
}
StrRT = JS_AtomGetStrRT(*(_QWORD *)(a1 + 24), v31, a5);
if ( a2 )
js_parse_error(
a2,
(long long)"duplicate exported name '%s'",
StrRT,
v26,
v27,
v28,
a7,
a8,
a9,
a10,
v29,
v30,
a13,
a14,
v31[0]);
else
JS_ThrowSyntaxError(
a1,
(long long)"duplicate exported name '%s'",
StrRT,
v26,
v27,
v28,
a7,
a8,
a9,
a10,
v29,
v30,
a13,
a14,
v31[0]);
return 0LL;
}
LABEL_5:
if ( *(_DWORD *)(a3 + 52) <= (int)v18 )
{
if ( (unsigned int)js_realloc_array(a1, a3 + 40, 32LL, a3 + 52, (unsigned int)(v18 + 1)) )
return 0LL;
LODWORD(v18) = *(_DWORD *)(a3 + 48);
}
v21 = *(_QWORD *)(a3 + 40);
*(_DWORD *)(a3 + 48) = v18 + 1;
result = v21 + 32LL * (int)v18;
*(_OWORD *)(result + 16) = 0LL;
*(_OWORD *)result = 0LL;
if ( a4 >= 224 )
{
v23 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a4);
++*v23;
}
*(_DWORD *)(result + 20) = a4;
if ( a5 >= 224 )
{
v24 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a5);
++*v24;
}
*(_DWORD *)(result + 24) = a5;
*(_DWORD *)(result + 16) = a6;
return result;
}
| add_export_entry2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV EBP,R9D
MOV EBX,R8D
MOV R15D,ECX
MOV R12,RDX
MOV R14,RDI
MOVSXD R8,dword ptr [RDX + 0x30]
TEST R8,R8
JLE 0x00130cea
MOV R13,RSI
MOV RAX,qword ptr [R12 + 0x28]
MOV RCX,R8
SHL RCX,0x5
XOR EDX,EDX
LAB_00130cdb:
CMP dword ptr [RAX + RDX*0x1 + 0x18],EBX
JZ 0x00130d58
ADD RDX,0x20
CMP RCX,RDX
JNZ 0x00130cdb
LAB_00130cea:
CMP dword ptr [R12 + 0x34],R8D
JLE 0x00130db4
LAB_00130cf5:
MOV RCX,qword ptr [R12 + 0x28]
LEA EAX,[R8 + 0x1]
MOV dword ptr [R12 + 0x30],EAX
MOVSXD RDX,R8D
SHL RDX,0x5
LEA RAX,[RCX + RDX*0x1]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RCX + RDX*0x1 + 0x10],XMM0
MOVUPS xmmword ptr [RCX + RDX*0x1],XMM0
CMP R15D,0xe0
JL 0x00130d34
MOV RCX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RCX + 0x68]
MOV EDX,R15D
MOV RCX,qword ptr [RCX + RDX*0x8]
INC dword ptr [RCX]
LAB_00130d34:
MOV dword ptr [RAX + 0x14],R15D
CMP EBX,0xe0
JL 0x00130d50
MOV RCX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RCX + 0x68]
MOV EDX,EBX
MOV RCX,qword ptr [RCX + RDX*0x8]
INC dword ptr [RCX]
LAB_00130d50:
MOV dword ptr [RAX + 0x18],EBX
MOV dword ptr [RAX + 0x10],EBP
JMP 0x00130da5
LAB_00130d58:
TEST R13,R13
JZ 0x00130d81
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,RSP
MOV EDX,EBX
CALL 0x00121e0b
LEA RSI,[0x1a0ffc]
MOV RDI,R13
MOV RDX,RAX
XOR EAX,EAX
CALL 0x0012fed1
JMP 0x00130da3
LAB_00130d81:
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,RSP
MOV EDX,EBX
CALL 0x00121e0b
LEA RSI,[0x1a0ffc]
MOV RDI,R14
MOV RDX,RAX
XOR EAX,EAX
CALL 0x001220b9
LAB_00130da3:
XOR EAX,EAX
LAB_00130da5:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00130db4:
LEA RSI,[R12 + 0x28]
LEA RCX,[R12 + 0x34]
INC R8D
MOV RDI,R14
MOV EDX,0x20
CALL 0x001444ee
TEST EAX,EAX
JNZ 0x00130da3
MOV R8D,dword ptr [R12 + 0x30]
JMP 0x00130cf5
|
long add_export_entry2(long param_1,long param_2,long param_3,uint param_4,uint param_5,
int4 param_6)
{
int8 *puVar1;
long lVar2;
int *piVar3;
int iVar4;
int8 uVar5;
long lVar6;
long lVar7;
int1 auStack_78 [72];
iVar4 = *(int *)(param_3 + 0x30);
if (0 < (long)iVar4) {
lVar6 = 0;
do {
if (*(uint *)(*(long *)(param_3 + 0x28) + 0x18 + lVar6) == param_5) {
if (param_2 != 0) {
uVar5 = JS_AtomGetStrRT(*(int8 *)(param_1 + 0x18),auStack_78,param_5);
js_parse_error(param_2,"duplicate exported name \'%s\'",uVar5);
return 0;
}
uVar5 = JS_AtomGetStrRT(*(int8 *)(param_1 + 0x18),auStack_78,param_5);
JS_ThrowSyntaxError(param_1,"duplicate exported name \'%s\'",uVar5);
return 0;
}
lVar6 = lVar6 + 0x20;
} while ((long)iVar4 << 5 != lVar6);
}
if (*(int *)(param_3 + 0x34) <= iVar4) {
iVar4 = js_realloc_array(param_1,param_3 + 0x28,0x20,param_3 + 0x34,iVar4 + 1);
if (iVar4 != 0) {
return 0;
}
iVar4 = *(int *)(param_3 + 0x30);
}
lVar2 = *(long *)(param_3 + 0x28);
*(int *)(param_3 + 0x30) = iVar4 + 1;
lVar7 = (long)iVar4 * 0x20;
lVar6 = lVar2 + lVar7;
puVar1 = (int8 *)(lVar2 + 0x10 + lVar7);
*puVar1 = 0;
puVar1[1] = 0;
*(int8 *)(lVar2 + lVar7) = 0;
((int8 *)(lVar2 + lVar7))[1] = 0;
if (0xdf < (int)param_4) {
piVar3 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_4 * 8);
*piVar3 = *piVar3 + 1;
}
*(uint *)(lVar6 + 0x14) = param_4;
if (0xdf < (int)param_5) {
piVar3 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_5 * 8);
*piVar3 = *piVar3 + 1;
}
*(uint *)(lVar6 + 0x18) = param_5;
*(int4 *)(lVar6 + 0x10) = param_6;
return lVar6;
}
|
|
5,966 | MNN::IDSTQuan::UnPackTo(MNN::IDSTQuanT*, std::__1::function<void (void**, unsigned long)> const*) const | mnn-tts/MNN/schema/current/CaffeOp_generated.h | inline void IDSTQuan::UnPackTo(IDSTQuanT *_o, const flatbuffers::resolver_function_t *_resolver) const {
(void)_o;
(void)_resolver;
{ auto _e = buffer(); if (_e) { _o->buffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->buffer[_i] = _e->Get(_i); } } };
{ auto _e = alpha(); if (_e) { _o->alpha.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->alpha[_i] = _e->Get(_i); } } };
{ auto _e = type(); _o->type = _e; };
{ auto _e = useInt32(); _o->useInt32 = _e; };
{ auto _e = quantScale(); _o->quantScale = _e; };
{ auto _e = scaleIn(); _o->scaleIn = _e; };
{ auto _e = scaleOut(); _o->scaleOut = _e; };
{ auto _e = aMax(); _o->aMax = _e; };
{ auto _e = aMin(); _o->aMin = _e; };
{ auto _e = readType(); _o->readType = _e; };
{ auto _e = has_scaleInt(); _o->has_scaleInt = _e; };
{ auto _e = shapeInt32(); _o->shapeInt32 = _e; };
{ auto _e = weightSize(); _o->weightSize = _e; };
{ auto _e = index(); if (_e) { _o->index.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->index[_i] = _e->Get(_i); } } };
} | O0 | c | MNN::IDSTQuan::UnPackTo(MNN::IDSTQuanT*, std::__1::function<void (void**, unsigned long)> const*) const:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq 0xa0(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x18bf0
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0x188e6
movq 0x98(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x88(%rsp), %rdi
callq 0xb740
movq 0x28(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0xb6d0
movl $0x0, 0x84(%rsp)
movl 0x84(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x88(%rsp), %rdi
callq 0xb740
movl %eax, %ecx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jae 0x188e4
movq 0x88(%rsp), %rdi
movl 0x84(%rsp), %esi
callq 0xb760
movb %al, 0x23(%rsp)
movq 0x98(%rsp), %rdi
movl 0x84(%rsp), %eax
movl %eax, %esi
callq 0xb7d0
movb 0x23(%rsp), %cl
movb %cl, (%rax)
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x1887b
jmp 0x188e6
movq 0x30(%rsp), %rdi
callq 0x18c10
movq %rax, 0x78(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x18992
movq 0x98(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x18(%rsp)
movq 0x78(%rsp), %rdi
callq 0xb9e0
movq 0x18(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0xb970
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x78(%rsp), %rdi
callq 0xb9e0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jae 0x18990
movq 0x78(%rsp), %rdi
movl 0x74(%rsp), %esi
callq 0xba00
movss %xmm0, 0x10(%rsp)
movq 0x98(%rsp), %rdi
addq $0x18, %rdi
movl 0x74(%rsp), %eax
movl %eax, %esi
callq 0xba70
movss 0x10(%rsp), %xmm0
movss %xmm0, (%rax)
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
jmp 0x18932
jmp 0x18992
movq 0x30(%rsp), %rdi
callq 0x18c30
movq 0x30(%rsp), %rdi
movl %eax, 0x70(%rsp)
movl 0x70(%rsp), %ecx
movq 0x98(%rsp), %rax
movl %ecx, 0x30(%rax)
callq 0x18c50
movq 0x30(%rsp), %rdi
andb $0x1, %al
movb %al, 0x6f(%rsp)
movb 0x6f(%rsp), %cl
movq 0x98(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x34(%rax)
callq 0x18c80
movq 0x30(%rsp), %rdi
movss %xmm0, 0x68(%rsp)
movss 0x68(%rsp), %xmm0
movq 0x98(%rsp), %rax
movss %xmm0, 0x38(%rax)
callq 0x18ca0
movq 0x30(%rsp), %rdi
movss %xmm0, 0x64(%rsp)
movss 0x64(%rsp), %xmm0
movq 0x98(%rsp), %rax
movss %xmm0, 0x3c(%rax)
callq 0x18cc0
movq 0x30(%rsp), %rdi
movss %xmm0, 0x60(%rsp)
movss 0x60(%rsp), %xmm0
movq 0x98(%rsp), %rax
movss %xmm0, 0x40(%rax)
callq 0x18ce0
movq 0x30(%rsp), %rdi
movl %eax, 0x5c(%rsp)
movl 0x5c(%rsp), %ecx
movq 0x98(%rsp), %rax
movl %ecx, 0x44(%rax)
callq 0x18d00
movq 0x30(%rsp), %rdi
movl %eax, 0x58(%rsp)
movl 0x58(%rsp), %ecx
movq 0x98(%rsp), %rax
movl %ecx, 0x48(%rax)
callq 0x18d20
movq 0x30(%rsp), %rdi
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %ecx
movq 0x98(%rsp), %rax
movl %ecx, 0x4c(%rax)
callq 0x18d40
movq 0x30(%rsp), %rdi
andb $0x1, %al
movb %al, 0x53(%rsp)
movb 0x53(%rsp), %cl
movq 0x98(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x50(%rax)
callq 0x18d70
movq 0x30(%rsp), %rdi
andb $0x1, %al
movb %al, 0x52(%rsp)
movb 0x52(%rsp), %cl
movq 0x98(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x51(%rax)
callq 0x18da0
movq 0x30(%rsp), %rdi
movl %eax, 0x4c(%rsp)
movl 0x4c(%rsp), %ecx
movq 0x98(%rsp), %rax
movl %ecx, 0x54(%rax)
callq 0x18dc0
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x18b96
movq 0x98(%rsp), %rax
addq $0x58, %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
callq 0x18e50
movq 0x8(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0x18de0
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x40(%rsp), %rdi
callq 0x18e50
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jae 0x18b94
movq 0x40(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x18e70
movl %eax, (%rsp)
movq 0x98(%rsp), %rdi
addq $0x58, %rdi
movl 0x3c(%rsp), %eax
movl %eax, %esi
callq 0x18ee0
movl (%rsp), %ecx
movl %ecx, (%rax)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x18b3e
jmp 0x18b96
addq $0xa8, %rsp
retq
nop
| _ZNK3MNN8IDSTQuan8UnPackToEPNS_9IDSTQuanTEPKNSt3__18functionIFvPPvmEEE:
sub rsp, 0A8h
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov [rsp+0A8h+var_18], rdx
mov rdi, [rsp+0A8h+var_8]; this
mov [rsp+0A8h+var_78], rdi
call _ZNK3MNN8IDSTQuan6bufferEv; MNN::IDSTQuan::buffer(void)
mov [rsp+0A8h+var_20], rax
cmp [rsp+0A8h+var_20], 0
jz loc_188E6
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_80], rax
mov rdi, [rsp+0A8h+var_20]
call _ZNK11flatbuffers6VectorIaE4sizeEv; flatbuffers::Vector<signed char>::size(void)
mov rdi, [rsp+0A8h+var_80]
mov eax, eax
mov esi, eax
call _ZNSt3__16vectorIaNS_9allocatorIaEEE6resizeEm; std::vector<signed char>::resize(ulong)
mov [rsp+0A8h+var_24], 0
loc_1887B:
mov eax, [rsp+0A8h+var_24]
mov [rsp+0A8h+var_84], eax
mov rdi, [rsp+0A8h+var_20]
call _ZNK11flatbuffers6VectorIaE4sizeEv; flatbuffers::Vector<signed char>::size(void)
mov ecx, eax
mov eax, [rsp+0A8h+var_84]
cmp eax, ecx
jnb short loc_188E4
mov rdi, [rsp+0A8h+var_20]
mov esi, [rsp+0A8h+var_24]
call _ZNK11flatbuffers6VectorIaE3GetEj; flatbuffers::Vector<signed char>::Get(uint)
mov [rsp+0A8h+var_85], al
mov rdi, [rsp+0A8h+var_10]
mov eax, [rsp+0A8h+var_24]
mov esi, eax
call _ZNSt3__16vectorIaNS_9allocatorIaEEEixB8nn200100Em; std::vector<signed char>::operator[](ulong)
mov cl, [rsp+0A8h+var_85]
mov [rax], cl
mov eax, [rsp+0A8h+var_24]
add eax, 1
mov [rsp+0A8h+var_24], eax
jmp short loc_1887B
loc_188E4:
jmp short $+2
loc_188E6:
mov rdi, [rsp+0A8h+var_78]; this
call _ZNK3MNN8IDSTQuan5alphaEv; MNN::IDSTQuan::alpha(void)
mov [rsp+0A8h+var_30], rax
cmp [rsp+0A8h+var_30], 0
jz loc_18992
mov rax, [rsp+0A8h+var_10]
add rax, 18h
mov [rsp+0A8h+var_90], rax
mov rdi, [rsp+0A8h+var_30]
call _ZNK11flatbuffers6VectorIfE4sizeEv; flatbuffers::Vector<float>::size(void)
mov rdi, [rsp+0A8h+var_90]
mov eax, eax
mov esi, eax
call _ZNSt3__16vectorIfNS_9allocatorIfEEE6resizeEm; std::vector<float>::resize(ulong)
mov [rsp+0A8h+var_34], 0
loc_18932:
mov eax, [rsp+0A8h+var_34]
mov [rsp+0A8h+var_94], eax
mov rdi, [rsp+0A8h+var_30]
call _ZNK11flatbuffers6VectorIfE4sizeEv; flatbuffers::Vector<float>::size(void)
mov ecx, eax
mov eax, [rsp+0A8h+var_94]
cmp eax, ecx
jnb short loc_18990
mov rdi, [rsp+0A8h+var_30]
mov esi, [rsp+0A8h+var_34]
call _ZNK11flatbuffers6VectorIfE3GetEj; flatbuffers::Vector<float>::Get(uint)
movss [rsp+0A8h+var_98], xmm0
mov rdi, [rsp+0A8h+var_10]
add rdi, 18h
mov eax, [rsp+0A8h+var_34]
mov esi, eax
call _ZNSt3__16vectorIfNS_9allocatorIfEEEixB8nn200100Em; std::vector<float>::operator[](ulong)
movss xmm0, [rsp+0A8h+var_98]
movss dword ptr [rax], xmm0
mov eax, [rsp+0A8h+var_34]
add eax, 1
mov [rsp+0A8h+var_34], eax
jmp short loc_18932
loc_18990:
jmp short $+2
loc_18992:
mov rdi, [rsp+0A8h+var_78]; this
call _ZNK3MNN8IDSTQuan4typeEv; MNN::IDSTQuan::type(void)
mov rdi, [rsp+0A8h+var_78]; this
mov [rsp+0A8h+var_38], eax
mov ecx, [rsp+0A8h+var_38]
mov rax, [rsp+0A8h+var_10]
mov [rax+30h], ecx
call _ZNK3MNN8IDSTQuan8useInt32Ev; MNN::IDSTQuan::useInt32(void)
mov rdi, [rsp+0A8h+var_78]; this
and al, 1
mov [rsp+0A8h+var_39], al
mov cl, [rsp+0A8h+var_39]
mov rax, [rsp+0A8h+var_10]
and cl, 1
mov [rax+34h], cl
call _ZNK3MNN8IDSTQuan10quantScaleEv; MNN::IDSTQuan::quantScale(void)
mov rdi, [rsp+0A8h+var_78]; this
movss [rsp+0A8h+var_40], xmm0
movss xmm0, [rsp+0A8h+var_40]
mov rax, [rsp+0A8h+var_10]
movss dword ptr [rax+38h], xmm0
call _ZNK3MNN8IDSTQuan7scaleInEv; MNN::IDSTQuan::scaleIn(void)
mov rdi, [rsp+0A8h+var_78]; this
movss [rsp+0A8h+var_44], xmm0
movss xmm0, [rsp+0A8h+var_44]
mov rax, [rsp+0A8h+var_10]
movss dword ptr [rax+3Ch], xmm0
call _ZNK3MNN8IDSTQuan8scaleOutEv; MNN::IDSTQuan::scaleOut(void)
mov rdi, [rsp+0A8h+var_78]; this
movss [rsp+0A8h+var_48], xmm0
movss xmm0, [rsp+0A8h+var_48]
mov rax, [rsp+0A8h+var_10]
movss dword ptr [rax+40h], xmm0
call _ZNK3MNN8IDSTQuan4aMaxEv; MNN::IDSTQuan::aMax(void)
mov rdi, [rsp+0A8h+var_78]; this
mov [rsp+0A8h+var_4C], eax
mov ecx, [rsp+0A8h+var_4C]
mov rax, [rsp+0A8h+var_10]
mov [rax+44h], ecx
call _ZNK3MNN8IDSTQuan4aMinEv; MNN::IDSTQuan::aMin(void)
mov rdi, [rsp+0A8h+var_78]; this
mov [rsp+0A8h+var_50], eax
mov ecx, [rsp+0A8h+var_50]
mov rax, [rsp+0A8h+var_10]
mov [rax+48h], ecx
call _ZNK3MNN8IDSTQuan8readTypeEv; MNN::IDSTQuan::readType(void)
mov rdi, [rsp+0A8h+var_78]; this
mov [rsp+0A8h+var_54], eax
mov ecx, [rsp+0A8h+var_54]
mov rax, [rsp+0A8h+var_10]
mov [rax+4Ch], ecx
call _ZNK3MNN8IDSTQuan12has_scaleIntEv; MNN::IDSTQuan::has_scaleInt(void)
mov rdi, [rsp+0A8h+var_78]; this
and al, 1
mov [rsp+0A8h+var_55], al
mov cl, [rsp+0A8h+var_55]
mov rax, [rsp+0A8h+var_10]
and cl, 1
mov [rax+50h], cl
call _ZNK3MNN8IDSTQuan10shapeInt32Ev; MNN::IDSTQuan::shapeInt32(void)
mov rdi, [rsp+0A8h+var_78]; this
and al, 1
mov [rsp+0A8h+var_56], al
mov cl, [rsp+0A8h+var_56]
mov rax, [rsp+0A8h+var_10]
and cl, 1
mov [rax+51h], cl
call _ZNK3MNN8IDSTQuan10weightSizeEv; MNN::IDSTQuan::weightSize(void)
mov rdi, [rsp+0A8h+var_78]; this
mov [rsp+0A8h+var_5C], eax
mov ecx, [rsp+0A8h+var_5C]
mov rax, [rsp+0A8h+var_10]
mov [rax+54h], ecx
call _ZNK3MNN8IDSTQuan5indexEv; MNN::IDSTQuan::index(void)
mov [rsp+0A8h+var_68], rax
cmp [rsp+0A8h+var_68], 0
jz loc_18B96
mov rax, [rsp+0A8h+var_10]
add rax, 58h ; 'X'
mov [rsp+0A8h+var_A0], rax
mov rdi, [rsp+0A8h+var_68]
call _ZNK11flatbuffers6VectorIjE4sizeEv; flatbuffers::Vector<uint>::size(void)
mov rdi, [rsp+0A8h+var_A0]
mov eax, eax
mov esi, eax
call _ZNSt3__16vectorIjNS_9allocatorIjEEE6resizeEm; std::vector<uint>::resize(ulong)
mov [rsp+0A8h+var_6C], 0
loc_18B3E:
mov eax, [rsp+0A8h+var_6C]
mov [rsp+0A8h+var_A4], eax
mov rdi, [rsp+0A8h+var_68]
call _ZNK11flatbuffers6VectorIjE4sizeEv; flatbuffers::Vector<uint>::size(void)
mov ecx, eax
mov eax, [rsp+0A8h+var_A4]
cmp eax, ecx
jnb short loc_18B94
mov rdi, [rsp+0A8h+var_68]
mov esi, [rsp+0A8h+var_6C]
call _ZNK11flatbuffers6VectorIjE3GetEj; flatbuffers::Vector<uint>::Get(uint)
mov [rsp+0A8h+var_A8], eax
mov rdi, [rsp+0A8h+var_10]
add rdi, 58h ; 'X'
mov eax, [rsp+0A8h+var_6C]
mov esi, eax
call _ZNSt3__16vectorIjNS_9allocatorIjEEEixB8nn200100Em; std::vector<uint>::operator[](ulong)
mov ecx, [rsp+0A8h+var_A8]
mov [rax], ecx
mov eax, [rsp+0A8h+var_6C]
add eax, 1
mov [rsp+0A8h+var_6C], eax
jmp short loc_18B3E
loc_18B94:
jmp short $+2
loc_18B96:
add rsp, 0A8h
retn
| long long MNN::IDSTQuan::UnPackTo(MNN::IDSTQuan *a1, long long a2, float a3)
{
unsigned long long v3; // rsi
unsigned long long v4; // rsi
long long result; // rax
unsigned int v6; // eax
unsigned int v7; // ecx
int v8; // [rsp+0h] [rbp-A8h]
char v9; // [rsp+23h] [rbp-85h]
unsigned int k; // [rsp+3Ch] [rbp-6Ch]
long long v11; // [rsp+40h] [rbp-68h]
unsigned int j; // [rsp+74h] [rbp-34h]
unsigned int *v13; // [rsp+78h] [rbp-30h]
unsigned int i; // [rsp+84h] [rbp-24h]
unsigned int *v15; // [rsp+88h] [rbp-20h]
v15 = (unsigned int *)MNN::IDSTQuan::buffer(a1);
if ( v15 )
{
v3 = (unsigned int)flatbuffers::Vector<signed char>::size(v15);
std::vector<signed char>::resize((_QWORD *)a2, v3);
for ( i = 0; i < (unsigned int)flatbuffers::Vector<signed char>::size(v15); ++i )
{
v9 = flatbuffers::Vector<signed char>::Get(v15, i);
*(_BYTE *)std::vector<signed char>::operator[][abi:nn200100]((_QWORD *)a2, i) = v9;
}
}
v13 = (unsigned int *)MNN::IDSTQuan::alpha(a1);
if ( v13 )
{
v4 = (unsigned int)flatbuffers::Vector<float>::size(v13);
std::vector<float>::resize((_QWORD *)(a2 + 24), v4);
for ( j = 0; j < (unsigned int)flatbuffers::Vector<float>::size(v13); ++j )
{
flatbuffers::Vector<float>::Get(v13, j);
*(float *)std::vector<float>::operator[][abi:nn200100]((_QWORD *)(a2 + 24), j) = a3;
}
}
*(_DWORD *)(a2 + 48) = MNN::IDSTQuan::type(a1);
*(_BYTE *)(a2 + 52) = MNN::IDSTQuan::useInt32(a1) & 1;
MNN::IDSTQuan::quantScale(a1);
*(float *)(a2 + 56) = a3;
MNN::IDSTQuan::scaleIn(a1);
*(float *)(a2 + 60) = a3;
MNN::IDSTQuan::scaleOut(a1);
*(float *)(a2 + 64) = a3;
*(_DWORD *)(a2 + 68) = MNN::IDSTQuan::aMax(a1);
*(_DWORD *)(a2 + 72) = MNN::IDSTQuan::aMin(a1);
*(_DWORD *)(a2 + 76) = MNN::IDSTQuan::readType(a1);
*(_BYTE *)(a2 + 80) = MNN::IDSTQuan::has_scaleInt(a1) & 1;
*(_BYTE *)(a2 + 81) = MNN::IDSTQuan::shapeInt32(a1) & 1;
*(_DWORD *)(a2 + 84) = MNN::IDSTQuan::weightSize(a1);
result = MNN::IDSTQuan::index(a1);
v11 = result;
if ( result )
{
v6 = flatbuffers::Vector<unsigned int>::size(result);
std::vector<unsigned int>::resize(a2 + 88, v6);
for ( k = 0; ; ++k )
{
v7 = flatbuffers::Vector<unsigned int>::size(v11);
result = k;
if ( k >= v7 )
break;
v8 = flatbuffers::Vector<unsigned int>::Get(v11, k);
*(_DWORD *)std::vector<unsigned int>::operator[][abi:nn200100](a2 + 88, k) = v8;
}
}
return result;
}
| UnPackTo:
SUB RSP,0xa8
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV RDI,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x00118bf0
MOV qword ptr [RSP + 0x88],RAX
CMP qword ptr [RSP + 0x88],0x0
JZ 0x001188e6
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x0010b740
MOV RDI,qword ptr [RSP + 0x28]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0010b6d0
MOV dword ptr [RSP + 0x84],0x0
LAB_0011887b:
MOV EAX,dword ptr [RSP + 0x84]
MOV dword ptr [RSP + 0x24],EAX
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x0010b740
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x24]
CMP EAX,ECX
JNC 0x001188e4
MOV RDI,qword ptr [RSP + 0x88]
MOV ESI,dword ptr [RSP + 0x84]
CALL 0x0010b760
MOV byte ptr [RSP + 0x23],AL
MOV RDI,qword ptr [RSP + 0x98]
MOV EAX,dword ptr [RSP + 0x84]
MOV ESI,EAX
CALL 0x0010b7d0
MOV CL,byte ptr [RSP + 0x23]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RSP + 0x84]
ADD EAX,0x1
MOV dword ptr [RSP + 0x84],EAX
JMP 0x0011887b
LAB_001188e4:
JMP 0x001188e6
LAB_001188e6:
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00118c10
MOV qword ptr [RSP + 0x78],RAX
CMP qword ptr [RSP + 0x78],0x0
JZ 0x00118992
MOV RAX,qword ptr [RSP + 0x98]
ADD RAX,0x18
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x0010b9e0
MOV RDI,qword ptr [RSP + 0x18]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0010b970
MOV dword ptr [RSP + 0x74],0x0
LAB_00118932:
MOV EAX,dword ptr [RSP + 0x74]
MOV dword ptr [RSP + 0x14],EAX
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x0010b9e0
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,ECX
JNC 0x00118990
MOV RDI,qword ptr [RSP + 0x78]
MOV ESI,dword ptr [RSP + 0x74]
CALL 0x0010ba00
MOVSS dword ptr [RSP + 0x10],XMM0
MOV RDI,qword ptr [RSP + 0x98]
ADD RDI,0x18
MOV EAX,dword ptr [RSP + 0x74]
MOV ESI,EAX
CALL 0x0010ba70
MOVSS XMM0,dword ptr [RSP + 0x10]
MOVSS dword ptr [RAX],XMM0
MOV EAX,dword ptr [RSP + 0x74]
ADD EAX,0x1
MOV dword ptr [RSP + 0x74],EAX
JMP 0x00118932
LAB_00118990:
JMP 0x00118992
LAB_00118992:
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00118c30
MOV RDI,qword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x70],EAX
MOV ECX,dword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x98]
MOV dword ptr [RAX + 0x30],ECX
CALL 0x00118c50
MOV RDI,qword ptr [RSP + 0x30]
AND AL,0x1
MOV byte ptr [RSP + 0x6f],AL
MOV CL,byte ptr [RSP + 0x6f]
MOV RAX,qword ptr [RSP + 0x98]
AND CL,0x1
MOV byte ptr [RAX + 0x34],CL
CALL 0x00118c80
MOV RDI,qword ptr [RSP + 0x30]
MOVSS dword ptr [RSP + 0x68],XMM0
MOVSS XMM0,dword ptr [RSP + 0x68]
MOV RAX,qword ptr [RSP + 0x98]
MOVSS dword ptr [RAX + 0x38],XMM0
CALL 0x00118ca0
MOV RDI,qword ptr [RSP + 0x30]
MOVSS dword ptr [RSP + 0x64],XMM0
MOVSS XMM0,dword ptr [RSP + 0x64]
MOV RAX,qword ptr [RSP + 0x98]
MOVSS dword ptr [RAX + 0x3c],XMM0
CALL 0x00118cc0
MOV RDI,qword ptr [RSP + 0x30]
MOVSS dword ptr [RSP + 0x60],XMM0
MOVSS XMM0,dword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x98]
MOVSS dword ptr [RAX + 0x40],XMM0
CALL 0x00118ce0
MOV RDI,qword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x5c],EAX
MOV ECX,dword ptr [RSP + 0x5c]
MOV RAX,qword ptr [RSP + 0x98]
MOV dword ptr [RAX + 0x44],ECX
CALL 0x00118d00
MOV RDI,qword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x58],EAX
MOV ECX,dword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x98]
MOV dword ptr [RAX + 0x48],ECX
CALL 0x00118d20
MOV RDI,qword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x54],EAX
MOV ECX,dword ptr [RSP + 0x54]
MOV RAX,qword ptr [RSP + 0x98]
MOV dword ptr [RAX + 0x4c],ECX
CALL 0x00118d40
MOV RDI,qword ptr [RSP + 0x30]
AND AL,0x1
MOV byte ptr [RSP + 0x53],AL
MOV CL,byte ptr [RSP + 0x53]
MOV RAX,qword ptr [RSP + 0x98]
AND CL,0x1
MOV byte ptr [RAX + 0x50],CL
CALL 0x00118d70
MOV RDI,qword ptr [RSP + 0x30]
AND AL,0x1
MOV byte ptr [RSP + 0x52],AL
MOV CL,byte ptr [RSP + 0x52]
MOV RAX,qword ptr [RSP + 0x98]
AND CL,0x1
MOV byte ptr [RAX + 0x51],CL
CALL 0x00118da0
MOV RDI,qword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x4c],EAX
MOV ECX,dword ptr [RSP + 0x4c]
MOV RAX,qword ptr [RSP + 0x98]
MOV dword ptr [RAX + 0x54],ECX
CALL 0x00118dc0
MOV qword ptr [RSP + 0x40],RAX
CMP qword ptr [RSP + 0x40],0x0
JZ 0x00118b96
MOV RAX,qword ptr [RSP + 0x98]
ADD RAX,0x58
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x00118e50
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x00118de0
MOV dword ptr [RSP + 0x3c],0x0
LAB_00118b3e:
MOV EAX,dword ptr [RSP + 0x3c]
MOV dword ptr [RSP + 0x4],EAX
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x00118e50
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x4]
CMP EAX,ECX
JNC 0x00118b94
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,dword ptr [RSP + 0x3c]
CALL 0x00118e70
MOV dword ptr [RSP],EAX
MOV RDI,qword ptr [RSP + 0x98]
ADD RDI,0x58
MOV EAX,dword ptr [RSP + 0x3c]
MOV ESI,EAX
CALL 0x00118ee0
MOV ECX,dword ptr [RSP]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RSP + 0x3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x00118b3e
LAB_00118b94:
JMP 0x00118b96
LAB_00118b96:
ADD RSP,0xa8
RET
|
/* MNN::IDSTQuan::UnPackTo(MNN::IDSTQuanT*, std::function<void (void**, unsigned long)> const*)
const */
void MNN::IDSTQuan::UnPackTo(IDSTQuanT *param_1,function *param_2)
{
int1 uVar1;
byte bVar2;
uint uVar3;
Vector<signed_char> *this;
int1 *puVar4;
Vector<float> *this_00;
int4 *puVar5;
Vector<unsigned_int> *this_01;
int4 uVar6;
uint local_6c;
uint local_34;
uint local_24;
this = (Vector<signed_char> *)buffer((IDSTQuan *)param_1);
if (this != (Vector<signed_char> *)0x0) {
uVar3 = flatbuffers::Vector<signed_char>::size(this);
std::vector<signed_char,std::allocator<signed_char>>::resize
((vector<signed_char,std::allocator<signed_char>> *)param_2,(ulong)uVar3);
for (local_24 = 0; uVar3 = flatbuffers::Vector<signed_char>::size(this), local_24 < uVar3;
local_24 = local_24 + 1) {
uVar1 = flatbuffers::Vector<signed_char>::Get(this,local_24);
puVar4 = (int1 *)
std::vector<signed_char,std::allocator<signed_char>>::operator[][abi_nn200100_
((vector<signed_char,std::allocator<signed_char>> *)param_2,(ulong)local_24
);
*puVar4 = uVar1;
}
}
this_00 = (Vector<float> *)alpha((IDSTQuan *)param_1);
if (this_00 != (Vector<float> *)0x0) {
uVar3 = flatbuffers::Vector<float>::size(this_00);
std::vector<float,std::allocator<float>>::resize
((vector<float,std::allocator<float>> *)(param_2 + 0x18),(ulong)uVar3);
for (local_34 = 0; uVar3 = flatbuffers::Vector<float>::size(this_00), local_34 < uVar3;
local_34 = local_34 + 1) {
uVar6 = flatbuffers::Vector<float>::Get(this_00,local_34);
puVar5 = (int4 *)
std::vector<float,std::allocator<float>>::operator[][abi_nn200100_
((vector<float,std::allocator<float>> *)(param_2 + 0x18),(ulong)local_34);
*puVar5 = uVar6;
}
}
uVar6 = type((IDSTQuan *)param_1);
*(int4 *)(param_2 + 0x30) = uVar6;
bVar2 = useInt32((IDSTQuan *)param_1);
param_2[0x34] = (function)(bVar2 & 1);
uVar6 = quantScale((IDSTQuan *)param_1);
*(int4 *)(param_2 + 0x38) = uVar6;
uVar6 = scaleIn((IDSTQuan *)param_1);
*(int4 *)(param_2 + 0x3c) = uVar6;
uVar6 = scaleOut((IDSTQuan *)param_1);
*(int4 *)(param_2 + 0x40) = uVar6;
uVar6 = aMax((IDSTQuan *)param_1);
*(int4 *)(param_2 + 0x44) = uVar6;
uVar6 = aMin((IDSTQuan *)param_1);
*(int4 *)(param_2 + 0x48) = uVar6;
uVar6 = readType((IDSTQuan *)param_1);
*(int4 *)(param_2 + 0x4c) = uVar6;
bVar2 = has_scaleInt((IDSTQuan *)param_1);
param_2[0x50] = (function)(bVar2 & 1);
bVar2 = shapeInt32((IDSTQuan *)param_1);
param_2[0x51] = (function)(bVar2 & 1);
uVar6 = weightSize((IDSTQuan *)param_1);
*(int4 *)(param_2 + 0x54) = uVar6;
this_01 = (Vector<unsigned_int> *)index((IDSTQuan *)param_1);
if (this_01 != (Vector<unsigned_int> *)0x0) {
uVar3 = flatbuffers::Vector<unsigned_int>::size(this_01);
std::vector<unsigned_int,std::allocator<unsigned_int>>::resize
((vector<unsigned_int,std::allocator<unsigned_int>> *)(param_2 + 0x58),(ulong)uVar3);
for (local_6c = 0; uVar3 = flatbuffers::Vector<unsigned_int>::size(this_01), local_6c < uVar3;
local_6c = local_6c + 1) {
uVar6 = flatbuffers::Vector<unsigned_int>::Get(this_01,local_6c);
puVar5 = (int4 *)
std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[][abi_nn200100_
((vector<unsigned_int,std::allocator<unsigned_int>> *)(param_2 + 0x58),
(ulong)local_6c);
*puVar5 = uVar6;
}
}
return;
}
|
|
5,967 | 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[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | llama.cpp/common/json.hpp | reference operator[](typename object_t::key_type key)
{
// implicitly convert null value to an empty object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value.object = create<object_t>();
assert_invariant();
}
// operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto result = m_data.m_value.object->emplace(std::move(key), nullptr);
return set_parent(result.first->second);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string 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[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb (%rdi), %al
testb %al, %al
jne 0xc9588
movb $0x1, (%r14)
movl $0x20, %edi
callq 0x20210
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x8538a
movb (%r14), %al
cmpb $0x1, %al
jne 0xc95f1
movq 0x8(%r14), %r14
movq %rsp, %r15
movb $0x0, (%r15)
movq $0x0, 0x8(%r15)
movq %r15, %rdi
movl $0x1, %esi
callq 0x8538a
movq %r15, %rdi
movl $0x1, %esi
callq 0x8538a
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x8b09c
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x8538a
movq %r14, %rdi
callq 0x89aa4
addq $0x20, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x20650
movq %rax, %rbx
movq %r14, %rdi
callq 0x8aa3c
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x568b0(%rip), %rsi # 0x11fec5
movq %rsp, %rdi
callq 0xbc63c
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x8a864
xorl %ebp, %ebp
leaq 0x97a04(%rip), %rsi # 0x161040
leaq -0x52ce5(%rip), %rdx # 0x7695e
movq %rbx, %rdi
callq 0x20a50
movq %rax, %r14
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8538a
movq %rbx, %rdi
callq 0x89aa4
jmp 0xc9695
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc9683
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0xc968d
jmp 0xc9695
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f00
movq %r14, %rdi
callq 0x20af0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_:
push rbp; void *
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov rbx, rsi
mov r14, rdi
mov al, [rdi]
test al, al
jnz short loc_C9588
mov byte ptr [r14], 1
mov edi, 20h ; ' '; 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_C9588:
cmp al, 1
jnz short loc_C95F1
mov r14, [r14+8]
mov r15, rsp
mov byte ptr [r15], 0
mov qword ptr [r15+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov rsi, rbx
mov rdx, r15
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
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()
add rbx, 20h ; ' '
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_C95F1:
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_28]
mov [rdx], rax
lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"...
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&)
mov bpl, 1
mov rdx, rsp
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
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()
jmp short loc_C9695
mov r14, rax
lea rax, [rsp+48h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C9683
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C9683:
test bpl, bpl
jnz short loc_C968D
jmp short loc_C9695
mov r14, rax
loc_C968D:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C9695:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long *a2)
{
char v2; // al
long long v3; // rax
_QWORD *v4; // r14
long long v5; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v8[2]; // [rsp+0h] [rbp-48h] BYREF
const char *v9; // [rsp+20h] [rbp-28h] BYREF
v2 = *(_BYTE *)a1;
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 1;
v3 = operator new(0x20uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v3;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
v2 = *(_BYTE *)a1;
}
if ( v2 != 1 )
{
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(&)[51],char const*>(
(long long)v8,
(long long)"cannot use operator[] with a string 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,
v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v4 = *(_QWORD **)(a1 + 8);
LOBYTE(v8[0]) = 0;
v8[1] = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v8);
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 *)v8);
v5 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace(
v4,
a2,
(long long)v8);
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 *)v8);
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(v8);
return v5 + 32;
}
| operator[]:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV R14,RDI
MOV AL,byte ptr [RDI]
TEST AL,AL
JNZ 0x001c9588
MOV byte ptr [R14],0x1
MOV EDI,0x20
CALL 0x00120210
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 0x0018538a
MOV AL,byte ptr [R14]
LAB_001c9588:
CMP AL,0x1
JNZ 0x001c95f1
MOV R14,qword ptr [R14 + 0x8]
MOV R15,RSP
MOV byte ptr [R15],0x0
MOV qword ptr [R15 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x0018538a
MOV RDI,R15
MOV ESI,0x1
CALL 0x0018538a
LAB_001c95b9:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x0018b09c
LAB_001c95c7:
MOV RBX,RAX
MOV R14,RSP
MOV RDI,R14
XOR ESI,ESI
CALL 0x0018538a
MOV RDI,R14
CALL 0x00189aa4
ADD RBX,0x20
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001c95f1:
MOV EDI,0x20
CALL 0x00120650
MOV RBX,RAX
MOV RDI,R14
CALL 0x0018aa3c
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001c960e:
LEA RSI,[0x21fec5]
MOV RDI,RSP
CALL 0x001bc63c
MOV BPL,0x1
LAB_001c9620:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0018a864
XOR EBP,EBP
LEA RSI,[0x261040]
LEA RDX,[0x17695e]
MOV RDI,RBX
CALL 0x00120a50
|
/* 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[](std::__cxx11::string) */
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,string *param_2)
{
ordered_map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*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;
bool bVar5;
basic_json local_48 [8];
int8 local_40;
char *local_28;
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>
)0x1;
puVar2 = (int8 *)operator_new(0x20);
*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>
)0x1) {
this_00 = *(ordered_map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8);
local_48[0] = (basic_json)0x0;
local_40 = 0;
bVar5 = SUB81(local_48,0);
assert_invariant(bVar5);
assert_invariant(bVar5);
/* try { // try from 001c95b9 to 001c95c6 has its CatchHandler @ 001c964b */
lVar3 = ordered_map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::emplace(this_00,param_2,local_48);
assert_invariant(bVar5);
data::~data((data *)local_48);
return lVar3 + 0x20;
}
uVar4 = __cxa_allocate_exception(0x20);
local_28 = (char *)type_name(this);
/* try { // try from 001c960e to 001c961c has its CatchHandler @ 001c968a */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
((detail *)local_48,"cannot use operator[] with a string argument with ",&local_28);
/* try { // try from 001c9620 to 001c964a has its CatchHandler @ 001c9665 */
_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_48,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
5,968 | minja::Parser::parseExpansion() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseExpansion() {
static std::regex expansion_tok(R"(\*\*?)");
auto op_str = consumeToken(expansion_tok);
auto expr = parseValueExpression();
if (op_str.empty()) return expr;
if (!expr) throw std::runtime_error("Expected expr of 'expansion' expression");
return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op_str == "*" ? UnaryOpExpr::Op::Expansion : UnaryOpExpr::Op::ExpansionDict);
} | O0 | cpp | minja::Parser::parseExpansion():
subq $0xb8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x18c848(%rip), %rax # 0x2704d0
cmpb $0x0, (%rax)
jne 0xe3cde
leaq 0x18c83c(%rip), %rdi # 0x2704d0
callq 0x56530
cmpl $0x0, %eax
je 0xe3cde
leaq 0x18c80b(%rip), %rdi # 0x2704b0
leaq 0x10408a(%rip), %rsi # 0x1e7d36
movl $0x10, %edx
callq 0x692d0
jmp 0xe3cb8
leaq -0x7a3bf(%rip), %rdi # 0x69900
leaq 0x18c7ea(%rip), %rsi # 0x2704b0
leaq 0x18bc9b(%rip), %rdx # 0x26f968
callq 0x56db0
leaq 0x18c7f7(%rip), %rdi # 0x2704d0
callq 0x568d0
movq 0x28(%rsp), %rsi
leaq 0x18c7c6(%rip), %rdx # 0x2704b0
leaq 0x78(%rsp), %rdi
movl $0x1, %ecx
callq 0xd5e70
movq 0x28(%rsp), %rsi
leaq 0x68(%rsp), %rdi
callq 0xe3f80
jmp 0xe3d0a
leaq 0x78(%rsp), %rdi
callq 0x56430
testb $0x1, %al
jne 0xe3d1a
jmp 0xe3d74
movq 0x18(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xda150
movl $0x1, 0x64(%rsp)
jmp 0xe3ea3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x18c77f(%rip), %rdi # 0x2704d0
callq 0x56660
jmp 0xe3ed8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0xe3ece
leaq 0x68(%rsp), %rdi
callq 0xd6050
testb $0x1, %al
jne 0xe3dfe
movl $0x10, %edi
callq 0x565c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
leaq 0x103f9e(%rip), %rsi # 0x1e7d3c
callq 0x563b0
jmp 0xe3da5
movq 0x10(%rsp), %rdi
movq 0x18b1f7(%rip), %rsi # 0x26efa8
movq 0x18b1b8(%rip), %rdx # 0x26ef70
callq 0x569b0
jmp 0xe3ee5
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
callq 0x56dd0
jmp 0xe3ec4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0xe3ec4
movq 0x28(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0xd5450
jmp 0xe3e0f
leaq 0x10bd3f(%rip), %rsi # 0x1efb55
leaq 0x78(%rsp), %rdi
callq 0x688e0
movb %al, 0xf(%rsp)
jmp 0xe3e26
movb 0xf(%rsp), %al
movzbl %al, %ecx
andl $0x1, %ecx
movl $0x4, %eax
subl %ecx, %eax
movl %eax, 0x34(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x68(%rsp), %rdx
leaq 0x34(%rsp), %rcx
callq 0xe5800
jmp 0xe3e56
movq 0x18(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xdac40
leaq 0x50(%rsp), %rdi
callq 0xdac70
leaq 0x38(%rsp), %rdi
callq 0xd8a10
movl $0x1, 0x64(%rsp)
jmp 0xe3ea3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xd8a10
jmp 0xe3ec4
leaq 0x68(%rsp), %rdi
callq 0xd5e60
leaq 0x78(%rsp), %rdi
callq 0x572d0
movq 0x20(%rsp), %rax
addq $0xb8, %rsp
retq
leaq 0x68(%rsp), %rdi
callq 0xd5e60
leaq 0x78(%rsp), %rdi
callq 0x572d0
movq 0xa0(%rsp), %rdi
callq 0x56a10
nopw %cs:(%rax,%rax)
nop
| _ZN5minja6Parser14parseExpansionEv:
sub rsp, 0B8h
mov [rsp+0B8h+var_A0], rdi
mov rax, rdi
mov [rsp+0B8h+var_98], rax
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_90], rax
lea rax, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; `guard variable for'minja::Parser::parseExpansion(void)::expansion_tok
cmp byte ptr [rax], 0
jnz short loc_E3CDE
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_acquire
cmp eax, 0
jz short loc_E3CDE
lea rdi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok
lea rsi, asc_1E7D36; "\\*\\*?"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
jmp short $+2
loc_E3CB8:
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_release
loc_E3CDE:
mov rsi, [rsp+0B8h+var_90]
lea rdx, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok
lea rdi, [rsp+0B8h+var_40]
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
mov rsi, [rsp+0B8h+var_90]
lea rdi, [rsp+0B8h+var_50]; this
call _ZN5minja6Parser20parseValueExpressionEv; minja::Parser::parseValueExpression(void)
jmp short $+2
loc_E3D0A:
lea rdi, [rsp+0B8h+var_40]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_E3D1A
jmp short loc_E3D74
loc_E3D1A:
mov rdi, [rsp+0B8h+var_A0]
lea rsi, [rsp+0B8h+var_50]
call _ZNSt10shared_ptrIN5minja10ExpressionEEC2EOS2_; std::shared_ptr<minja::Expression>::shared_ptr(std::shared_ptr<minja::Expression>&&)
mov [rsp+0B8h+var_54], 1
jmp loc_E3EA3
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp loc_E3ED8
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
jmp loc_E3ECE
loc_E3D74:
lea rdi, [rsp+0B8h+var_50]
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_E3DFE
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0B8h+var_A8], rax
lea rsi, aExpectedExprOf_0; "Expected expr of 'expansion' expression"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_E3DA5:
mov rdi, [rsp+0B8h+var_A8]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_E3EE5
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
call ___cxa_free_exception
jmp loc_E3EC4
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
jmp loc_E3EC4
loc_E3DFE:
mov rsi, [rsp+0B8h+var_90]
lea rdi, [rsp+0B8h+var_80]; this
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
jmp short $+2
loc_E3E0F:
lea rsi, asc_1EFB54+1; "*"
lea rdi, [rsp+0B8h+var_40]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+0B8h+var_A9], al
jmp short $+2
loc_E3E26:
mov al, [rsp+0B8h+var_A9]
movzx ecx, al
and ecx, 1
mov eax, 4
sub eax, ecx
mov [rsp+0B8h+var_84], eax
lea rdi, [rsp+0B8h+var_68]
lea rsi, [rsp+0B8h+var_80]
lea rdx, [rsp+0B8h+var_50]
lea rcx, [rsp+0B8h+var_84]
call _ZSt11make_sharedIN5minja11UnaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEENS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&)
jmp short $+2
loc_E3E56:
mov rdi, [rsp+0B8h+var_A0]
lea rsi, [rsp+0B8h+var_68]
call _ZNSt10shared_ptrIN5minja10ExpressionEEC2INS0_11UnaryOpExprEvEEOS_IT_E; std::shared_ptr<minja::Expression>::shared_ptr<minja::UnaryOpExpr,void>(std::shared_ptr&&<minja::UnaryOpExpr>)
lea rdi, [rsp+0B8h+var_68]
call _ZNSt10shared_ptrIN5minja11UnaryOpExprEED2Ev; std::shared_ptr<minja::UnaryOpExpr>::~shared_ptr()
lea rdi, [rsp+0B8h+var_80]; this
call _ZN5minja8LocationD2Ev; minja::Location::~Location()
mov [rsp+0B8h+var_54], 1
jmp short loc_E3EA3
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
lea rdi, [rsp+arg_30]; this
call _ZN5minja8LocationD2Ev; minja::Location::~Location()
jmp short loc_E3EC4
loc_E3EA3:
lea rdi, [rsp+0B8h+var_50]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
lea rdi, [rsp+0B8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rsp+0B8h+var_98]
add rsp, 0B8h
retn
loc_E3EC4:
lea rdi, [rsp+arg_60]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
loc_E3ECE:
lea rdi, [rsp+arg_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_E3ED8:
mov rdi, [rsp+arg_98]
call __Unwind_Resume
loc_E3EE5:
nop word ptr [rax+rax+00000000h]
nop
| minja::Parser * minja::Parser::parseExpansion(minja::Parser *this, long long a2)
{
int v2; // r8d
int v3; // r9d
std::runtime_error *exception; // [rsp+10h] [rbp-A8h]
int v6; // [rsp+34h] [rbp-84h] BYREF
_BYTE v7[24]; // [rsp+38h] [rbp-80h] BYREF
_BYTE v8[20]; // [rsp+50h] [rbp-68h] BYREF
int v9; // [rsp+64h] [rbp-54h]
_QWORD v10[2]; // [rsp+68h] [rbp-50h] BYREF
_BYTE v11[48]; // [rsp+78h] [rbp-40h] BYREF
long long v12; // [rsp+A8h] [rbp-10h]
minja::Parser *v13; // [rsp+B0h] [rbp-8h]
v13 = this;
v12 = a2;
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
(long long)"\\*\\*?",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(long long)v11,
a2,
(long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
1u);
minja::Parser::parseValueExpression((minja::Parser *)v10);
if ( (std::string::empty(v11) & 1) != 0 )
{
std::shared_ptr<minja::Expression>::shared_ptr((long long)this, (long long)v10);
v9 = 1;
}
else
{
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(v10) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expr of 'expansion' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Parser::get_location((minja::Parser *)v7, a2);
v6 = 4 - std::operator==<char>((long long)v11, (long long)"*");
std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(
(unsigned int)v8,
(unsigned int)v7,
(unsigned int)v10,
(unsigned int)&v6,
v2,
v3);
std::shared_ptr<minja::Expression>::shared_ptr<minja::UnaryOpExpr,void>((long long)this, (long long)v8);
std::shared_ptr<minja::UnaryOpExpr>::~shared_ptr((long long)v8);
minja::Location::~Location((minja::Location *)v7);
v9 = 1;
}
std::shared_ptr<minja::Expression>::~shared_ptr((long long)v10);
std::string::~string(v11);
return this;
}
| parseExpansion:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0xb0],RDI
MOV qword ptr [RSP + 0xa8],RSI
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x28],RAX
LEA RAX,[0x3704d0]
CMP byte ptr [RAX],0x0
JNZ 0x001e3cde
LEA RDI,[0x3704d0]
CALL 0x00156530
CMP EAX,0x0
JZ 0x001e3cde
LAB_001e3c9e:
LEA RDI,[0x3704b0]
LEA RSI,[0x2e7d36]
MOV EDX,0x10
CALL 0x001692d0
LAB_001e3cb6:
JMP 0x001e3cb8
LAB_001e3cb8:
LEA RDI,[0x169900]
LEA RSI,[0x3704b0]
LEA RDX,[0x36f968]
CALL 0x00156db0
LEA RDI,[0x3704d0]
CALL 0x001568d0
LAB_001e3cde:
MOV RSI,qword ptr [RSP + 0x28]
LEA RDX,[0x3704b0]
LEA RDI,[RSP + 0x78]
MOV ECX,0x1
CALL 0x001d5e70
MOV RSI,qword ptr [RSP + 0x28]
LAB_001e3cfe:
LEA RDI,[RSP + 0x68]
CALL 0x001e3f80
LAB_001e3d08:
JMP 0x001e3d0a
LAB_001e3d0a:
LEA RDI,[RSP + 0x78]
CALL 0x00156430
TEST AL,0x1
JNZ 0x001e3d1a
JMP 0x001e3d74
LAB_001e3d1a:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x68]
CALL 0x001da150
MOV dword ptr [RSP + 0x64],0x1
JMP 0x001e3ea3
LAB_001e3d74:
LEA RDI,[RSP + 0x68]
CALL 0x001d6050
TEST AL,0x1
JNZ 0x001e3dfe
MOV EDI,0x10
CALL 0x001565c0
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
LAB_001e3d97:
LEA RSI,[0x2e7d3c]
CALL 0x001563b0
JMP 0x001e3da5
LAB_001e3da5:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [0x0036efa8]
MOV RDX,qword ptr [0x0036ef70]
CALL 0x001569b0
LAB_001e3dfe:
MOV RSI,qword ptr [RSP + 0x28]
LEA RDI,[RSP + 0x38]
CALL 0x001d5450
JMP 0x001e3e0f
LAB_001e3e0f:
LEA RSI,[0x2efb55]
LEA RDI,[RSP + 0x78]
CALL 0x001688e0
MOV byte ptr [RSP + 0xf],AL
JMP 0x001e3e26
LAB_001e3e26:
MOV AL,byte ptr [RSP + 0xf]
MOVZX ECX,AL
AND ECX,0x1
MOV EAX,0x4
SUB EAX,ECX
MOV dword ptr [RSP + 0x34],EAX
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x38]
LEA RDX,[RSP + 0x68]
LEA RCX,[RSP + 0x34]
CALL 0x001e5800
LAB_001e3e54:
JMP 0x001e3e56
LAB_001e3e56:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x50]
CALL 0x001dac40
LEA RDI,[RSP + 0x50]
CALL 0x001dac70
LEA RDI,[RSP + 0x38]
CALL 0x001d8a10
MOV dword ptr [RSP + 0x64],0x1
JMP 0x001e3ea3
LAB_001e3ea3:
LEA RDI,[RSP + 0x68]
CALL 0x001d5e60
LEA RDI,[RSP + 0x78]
CALL 0x001572d0
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0xb8
RET
|
/* minja::Parser::parseExpansion() */
shared_ptr<minja::Expression> * minja::Parser::parseExpansion(void)
{
bool bVar1;
int iVar2;
ulong uVar3;
runtime_error *this;
int8 in_RSI;
shared_ptr<minja::Expression> *in_RDI;
shared_ptr local_80 [24];
Location local_68 [20];
int4 local_54;
shared_ptr local_50 [16];
string local_40 [64];
if (parseExpansion()::expansion_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseExpansion()::expansion_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 001e3c9e to 001e3cb5 has its CatchHandler @ 001e3d36 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
(parseExpansion()::expansion_tok_abi_cxx11_,"\\*\\*?",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpansion()::expansion_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpansion()::expansion_tok_abi_cxx11_);
}
}
consumeToken(local_40,in_RSI,parseExpansion()::expansion_tok_abi_cxx11_,1);
/* try { // try from 001e3cfe to 001e3d07 has its CatchHandler @ 001e3d5b */
parseValueExpression();
uVar3 = std::__cxx11::string::empty();
if ((uVar3 & 1) == 0) {
bVar1 = std::__shared_ptr::operator_cast_to_bool((__shared_ptr *)local_50);
if (!bVar1) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e3d97 to 001e3da2 has its CatchHandler @ 001e3dc2 */
std::runtime_error::runtime_error(this,"Expected expr of \'expansion\' expression");
/* try { // try from 001e3da5 to 001e3dbc has its CatchHandler @ 001e3de5 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0036efa8,PTR__runtime_error_0036ef70);
}
/* try { // try from 001e3dfe to 001e3e0c has its CatchHandler @ 001e3de5 */
get_location();
/* try { // try from 001e3e0f to 001e3e53 has its CatchHandler @ 001e3e83 */
std::operator==(local_40,"*");
std::
make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>
(local_68,local_80,(Op *)local_50);
std::shared_ptr<minja::Expression>::shared_ptr<minja::UnaryOpExpr,void>
(in_RDI,(shared_ptr *)local_68);
std::shared_ptr<minja::UnaryOpExpr>::~shared_ptr((shared_ptr<minja::UnaryOpExpr> *)local_68);
Location::~Location((Location *)local_80);
}
else {
std::shared_ptr<minja::Expression>::shared_ptr(in_RDI,local_50);
}
local_54 = 1;
std::shared_ptr<minja::Expression>::~shared_ptr((shared_ptr<minja::Expression> *)local_50);
std::__cxx11::string::~string(local_40);
return in_RDI;
}
|
|
5,969 | 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);
} | O3 | 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 0xb7317
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xb7333
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0xb75d0
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 0xb7729
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x34aab(%rip), %rdi # 0xebdc9
leaq 0x2eee5(%rip), %rdx # 0xe620a
leaq 0x3a125(%rip), %rcx # 0xf1451
movl $0x4589, %esi # imm = 0x4589
jmp 0xb734d
leaq 0x34a8f(%rip), %rdi # 0xebdc9
leaq 0x2eec9(%rip), %rdx # 0xe620a
leaq 0x3a222(%rip), %rcx # 0xf156a
movl $0x458a, %esi # imm = 0x458A
xorl %eax, %eax
callq 0x1aec0
| _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_B7317
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jbe short loc_B7333
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_B7317:
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_B734D
loc_B7333:
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_B734D:
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_4588 + 1);
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_4588 + 2);
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 0x001b7317
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JBE 0x001b7333
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA R12,[RSP + 0x28]
MOV RDI,R12
CALL 0x001b75d0
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 0x001b7729
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001b7317:
LEA RDI,[0x1ebdc9]
LEA RDX,[0x1e620a]
LEA RCX,[0x1f1451]
MOV ESI,0x4589
JMP 0x001b734d
LAB_001b7333:
LEA RDI,[0x1ebdc9]
LEA RDX,[0x1e620a]
LEA RCX,[0x1f156a]
MOV ESI,0x458a
LAB_001b734d:
XOR EAX,EAX
CALL 0x0011aec0
|
/* 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);
}
|
|
5,970 | bitmap_get_next_set | eloqsql/mysys/my_bitmap.c | uint bitmap_get_next_set(const MY_BITMAP *map, uint bitmap_bit)
{
uint word_pos, byte_to_mask, i;
union { my_bitmap_map bitmap ; uchar bitmap_buff[sizeof(my_bitmap_map)]; }
first_word;
uchar *ptr= &first_word.bitmap_buff[0];
my_bitmap_map *data_ptr, *end= map->last_word_ptr;
DBUG_ASSERT(map->bitmap);
/* Look for the next bit */
bitmap_bit++;
if (bitmap_bit >= map->n_bits)
return MY_BIT_NONE;
word_pos= bitmap_bit / 32;
data_ptr= map->bitmap + word_pos;
first_word.bitmap= *data_ptr;
/* Mask out previous bits from first_word */
byte_to_mask= (bitmap_bit % 32) / 8;
for (i= 0; i < byte_to_mask; i++)
ptr[i]= 0;
ptr[byte_to_mask]&= 0xFFU << (bitmap_bit & 7);
if (data_ptr == end)
{
if (first_word.bitmap & ~map->last_word_mask)
return get_first_set(first_word.bitmap, word_pos);
else
return MY_BIT_NONE;
}
if (first_word.bitmap)
return get_first_set(first_word.bitmap, word_pos);
for (data_ptr++, word_pos++; data_ptr < end; data_ptr++, word_pos++)
if (*data_ptr)
return get_first_set(*data_ptr, word_pos);
if (!(*end & ~map->last_word_mask))
return MY_BIT_NONE;
return get_first_set(*end, word_pos);
} | O3 | c | bitmap_get_next_set:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
incl %ebx
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpl 0x1c(%rdi), %ebx
jae 0x9dba9
movq %rdi, %r15
movq 0x8(%rdi), %r13
movl %ebx, %eax
shrl $0x5, %eax
movq (%rdi), %rcx
movq %rax, -0x40(%rbp)
movq %rcx, -0x38(%rbp)
leaq (%rcx,%rax,4), %rdx
movl (%rdx), %eax
movl %eax, -0x30(%rbp)
movl %ebx, %r12d
shrl $0x3, %r12d
andl $0x3, %r12d
je 0x9db1a
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movq %rdx, -0x48(%rbp)
movq %r12, %rdx
callq 0x292c0
movq -0x48(%rbp), %rdx
movl %ebx, %ecx
andb $0x7, %cl
movl $0xff, %eax
shll %cl, %eax
andb %al, -0x30(%rbp,%r12)
movl -0x30(%rbp), %eax
cmpq %r13, %rdx
je 0x9db68
testl %eax, %eax
je 0x9dbbb
movl %eax, -0x2c(%rbp)
xorl %edx, %edx
movl $0x0, %ecx
testb %al, %al
jne 0x9db5b
xorl %ecx, %ecx
leaq -0x2b(%rbp), %rsi
movb (%rsi), %al
addl $0x8, %ecx
incq %rsi
testb %al, %al
je 0x9db4f
movzbl %al, %eax
btl %edx, %eax
leal 0x1(%rdx), %edx
jae 0x9db5e
jmp 0x9db9d
movl 0x18(%r15), %ecx
notl %ecx
testl %ecx, %eax
je 0x9dba9
movl %eax, -0x2c(%rbp)
xorl %edx, %edx
movl $0x0, %ecx
testb %al, %al
jne 0x9db92
xorl %ecx, %ecx
leaq -0x2b(%rbp), %rsi
movb (%rsi), %al
addl $0x8, %ecx
incq %rsi
testb %al, %al
je 0x9db86
movzbl %al, %eax
btl %edx, %eax
leal 0x1(%rdx), %edx
jae 0x9db95
andl $-0x20, %ebx
addl %ebx, %ecx
leal (%rdx,%rcx), %r14d
decl %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %rcx
movl %ecx, %eax
shll $0x5, %eax
decl %eax
movq -0x38(%rbp), %rdx
leaq (%rdx,%rcx,4), %rcx
addq $0x4, %rcx
cmpq %r13, %rcx
jae 0x9dc1a
movl (%rcx), %edx
addl $0x20, %eax
addq $0x4, %rcx
testl %edx, %edx
je 0x9dbd2
movl %edx, -0x2c(%rbp)
xorl %ecx, %ecx
movl $0x0, %r14d
testb %dl, %dl
jne 0x9dc07
xorl %r14d, %r14d
leaq -0x2b(%rbp), %rsi
movb (%rsi), %dl
addl $0x8, %r14d
incq %rsi
testb %dl, %dl
je 0x9dbfa
movzbl %dl, %edx
btl %ecx, %edx
leal 0x1(%rcx), %ecx
jae 0x9dc0a
addl %eax, %r14d
addl %ecx, %r14d
jmp 0x9dba9
movl (%r13), %esi
movl 0x18(%r15), %ecx
notl %ecx
testl %ecx, %esi
je 0x9dba9
movl %esi, -0x2c(%rbp)
xorl %edx, %edx
movl $0x0, %ecx
testb %sil, %sil
jne 0x9dc4b
xorl %ecx, %ecx
leaq -0x2b(%rbp), %rdi
movb (%rdi), %sil
addl $0x8, %ecx
incq %rdi
testb %sil, %sil
je 0x9dc3d
movzbl %sil, %esi
btl %edx, %esi
leal 0x1(%rdx), %edx
jae 0x9dc4f
addl %eax, %ecx
leal (%rdx,%rcx), %r14d
addl $0x20, %r14d
jmp 0x9dba9
| bitmap_get_next_set:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, esi
inc ebx
mov r14d, 0FFFFFFFFh
cmp ebx, [rdi+1Ch]
jnb loc_9DBA9
mov r15, rdi
mov r13, [rdi+8]
mov eax, ebx
shr eax, 5
mov rcx, [rdi]
mov [rbp+var_40], rax
mov [rbp+var_38], rcx
lea rdx, [rcx+rax*4]
mov eax, [rdx]
mov [rbp+var_30], eax
mov r12d, ebx
shr r12d, 3
and r12d, 3
jz short loc_9DB1A
lea rdi, [rbp+var_30]
xor esi, esi
mov [rbp+var_48], rdx
mov rdx, r12
call _memset
mov rdx, [rbp+var_48]
loc_9DB1A:
mov ecx, ebx
and cl, 7
mov eax, 0FFh
shl eax, cl
and byte ptr [rbp+r12+var_30], al
mov eax, [rbp+var_30]
cmp rdx, r13
jz short loc_9DB68
test eax, eax
jz loc_9DBBB
mov [rbp+var_2C], eax
xor edx, edx
mov ecx, 0
test al, al
jnz short loc_9DB5B
xor ecx, ecx
lea rsi, [rbp+var_2C+1]
loc_9DB4F:
mov al, [rsi]
add ecx, 8
inc rsi
test al, al
jz short loc_9DB4F
loc_9DB5B:
movzx eax, al
loc_9DB5E:
bt eax, edx
lea edx, [rdx+1]
jnb short loc_9DB5E
jmp short loc_9DB9D
loc_9DB68:
mov ecx, [r15+18h]
not ecx
test eax, ecx
jz short loc_9DBA9
mov [rbp+var_2C], eax
xor edx, edx
mov ecx, 0
test al, al
jnz short loc_9DB92
xor ecx, ecx
lea rsi, [rbp+var_2C+1]
loc_9DB86:
mov al, [rsi]
add ecx, 8
inc rsi
test al, al
jz short loc_9DB86
loc_9DB92:
movzx eax, al
loc_9DB95:
bt eax, edx
lea edx, [rdx+1]
jnb short loc_9DB95
loc_9DB9D:
and ebx, 0FFFFFFE0h
add ecx, ebx
lea r14d, [rdx+rcx]
dec r14d
loc_9DBA9:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9DBBB:
mov rcx, [rbp+var_40]
mov eax, ecx
shl eax, 5
dec eax
mov rdx, [rbp+var_38]
lea rcx, [rdx+rcx*4]
add rcx, 4
loc_9DBD2:
cmp rcx, r13
jnb short loc_9DC1A
mov edx, [rcx]
add eax, 20h ; ' '
add rcx, 4
test edx, edx
jz short loc_9DBD2
mov [rbp+var_2C], edx
xor ecx, ecx
mov r14d, 0
test dl, dl
jnz short loc_9DC07
xor r14d, r14d
lea rsi, [rbp+var_2C+1]
loc_9DBFA:
mov dl, [rsi]
add r14d, 8
inc rsi
test dl, dl
jz short loc_9DBFA
loc_9DC07:
movzx edx, dl
loc_9DC0A:
bt edx, ecx
lea ecx, [rcx+1]
jnb short loc_9DC0A
add r14d, eax
add r14d, ecx
jmp short loc_9DBA9
loc_9DC1A:
mov esi, [r13+0]
mov ecx, [r15+18h]
not ecx
test esi, ecx
jz short loc_9DBA9
mov [rbp+var_2C], esi
xor edx, edx
mov ecx, 0
test sil, sil
jnz short loc_9DC4B
xor ecx, ecx
lea rdi, [rbp+var_2C+1]
loc_9DC3D:
mov sil, [rdi]
add ecx, 8
inc rdi
test sil, sil
jz short loc_9DC3D
loc_9DC4B:
movzx esi, sil
loc_9DC4F:
bt esi, edx
lea edx, [rdx+1]
jnb short loc_9DC4F
add ecx, eax
lea r14d, [rdx+rcx]
add r14d, 20h ; ' '
jmp loc_9DBA9
| long long bitmap_get_next_set(long long *a1, int a2)
{
unsigned int v2; // ebx
unsigned int v3; // r14d
int *v4; // r13
long long v5; // rcx
int *v6; // rdx
int v7; // eax
unsigned int v8; // edx
int v9; // ecx
_BYTE *v10; // rsi
unsigned __int8 v11; // cf
_BYTE *v12; // rsi
int v14; // eax
int *i; // rcx
int v16; // edx
unsigned int v17; // ecx
int v18; // r14d
_BYTE *v19; // rsi
int v20; // esi
unsigned int v21; // edx
int v22; // ecx
_BYTE *v23; // rdi
int *v24; // [rsp+8h] [rbp-48h]
long long v25; // [rsp+10h] [rbp-40h]
long long v26; // [rsp+18h] [rbp-38h]
int v27; // [rsp+20h] [rbp-30h] BYREF
_DWORD v28[11]; // [rsp+24h] [rbp-2Ch] BYREF
v2 = a2 + 1;
v3 = -1;
if ( (unsigned int)(a2 + 1) < *((_DWORD *)a1 + 7) )
{
v4 = (int *)a1[1];
v5 = *a1;
v25 = v2 >> 5;
v26 = *a1;
v6 = (int *)(*a1 + 4 * v25);
v27 = *v6;
if ( ((v2 >> 3) & 3) != 0 )
{
v24 = (int *)(v5 + 4 * v25);
memset(&v27, 0LL, (v2 >> 3) & 3);
v6 = v24;
}
*((_BYTE *)&v28[-1] + ((v2 >> 3) & 3)) &= 255 << (v2 & 7);
LOBYTE(v7) = v27;
if ( v6 == v4 )
{
if ( (~*((_DWORD *)a1 + 6) & v27) != 0 )
{
v28[0] = v27;
v8 = 0;
v9 = 0;
if ( !(_BYTE)v27 )
{
v9 = 0;
v12 = (char *)v28 + 1;
do
{
LOBYTE(v7) = *v12;
v9 += 8;
++v12;
}
while ( !(_BYTE)v7 );
}
v7 = (unsigned __int8)v7;
do
v11 = _bittest(&v7, v8++);
while ( !v11 );
return v8 + (v2 & 0xFFFFFFE0) + v9 - 1;
}
}
else
{
if ( v27 )
{
v28[0] = v27;
v8 = 0;
v9 = 0;
if ( !(_BYTE)v27 )
{
v9 = 0;
v10 = (char *)v28 + 1;
do
{
LOBYTE(v7) = *v10;
v9 += 8;
++v10;
}
while ( !(_BYTE)v7 );
}
v7 = (unsigned __int8)v7;
do
v11 = _bittest(&v7, v8++);
while ( !v11 );
return v8 + (v2 & 0xFFFFFFE0) + v9 - 1;
}
v14 = 32 * v25 - 1;
for ( i = (int *)(v26 + 4 * v25 + 4); i < v4; ++i )
{
v16 = *i;
v14 += 32;
if ( v16 )
{
v28[0] = v16;
v17 = 0;
v18 = 0;
if ( !(_BYTE)v16 )
{
v18 = 0;
v19 = (char *)v28 + 1;
do
{
LOBYTE(v16) = *v19;
v18 += 8;
++v19;
}
while ( !(_BYTE)v16 );
}
v16 = (unsigned __int8)v16;
do
v11 = _bittest(&v16, v17++);
while ( !v11 );
return v17 + v14 + v18;
}
}
v20 = *v4;
if ( (~*((_DWORD *)a1 + 6) & *v4) != 0 )
{
v28[0] = *v4;
v21 = 0;
v22 = 0;
if ( !(_BYTE)v20 )
{
v22 = 0;
v23 = (char *)v28 + 1;
do
{
LOBYTE(v20) = *v23;
v22 += 8;
++v23;
}
while ( !(_BYTE)v20 );
}
v20 = (unsigned __int8)v20;
do
v11 = _bittest(&v20, v21++);
while ( !v11 );
return v21 + v14 + v22 + 32;
}
}
}
return v3;
}
| bitmap_get_next_set:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ESI
INC EBX
MOV R14D,0xffffffff
CMP EBX,dword ptr [RDI + 0x1c]
JNC 0x0019dba9
MOV R15,RDI
MOV R13,qword ptr [RDI + 0x8]
MOV EAX,EBX
SHR EAX,0x5
MOV RCX,qword ptr [RDI]
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],RCX
LEA RDX,[RCX + RAX*0x4]
MOV EAX,dword ptr [RDX]
MOV dword ptr [RBP + -0x30],EAX
MOV R12D,EBX
SHR R12D,0x3
AND R12D,0x3
JZ 0x0019db1a
LEA RDI,[RBP + -0x30]
XOR ESI,ESI
MOV qword ptr [RBP + -0x48],RDX
MOV RDX,R12
CALL 0x001292c0
MOV RDX,qword ptr [RBP + -0x48]
LAB_0019db1a:
MOV ECX,EBX
AND CL,0x7
MOV EAX,0xff
SHL EAX,CL
AND byte ptr [RBP + R12*0x1 + -0x30],AL
MOV EAX,dword ptr [RBP + -0x30]
CMP RDX,R13
JZ 0x0019db68
TEST EAX,EAX
JZ 0x0019dbbb
MOV dword ptr [RBP + -0x2c],EAX
XOR EDX,EDX
MOV ECX,0x0
TEST AL,AL
JNZ 0x0019db5b
XOR ECX,ECX
LEA RSI,[RBP + -0x2b]
LAB_0019db4f:
MOV AL,byte ptr [RSI]
ADD ECX,0x8
INC RSI
TEST AL,AL
JZ 0x0019db4f
LAB_0019db5b:
MOVZX EAX,AL
LAB_0019db5e:
BT EAX,EDX
LEA EDX,[RDX + 0x1]
JNC 0x0019db5e
JMP 0x0019db9d
LAB_0019db68:
MOV ECX,dword ptr [R15 + 0x18]
NOT ECX
TEST EAX,ECX
JZ 0x0019dba9
MOV dword ptr [RBP + -0x2c],EAX
XOR EDX,EDX
MOV ECX,0x0
TEST AL,AL
JNZ 0x0019db92
XOR ECX,ECX
LEA RSI,[RBP + -0x2b]
LAB_0019db86:
MOV AL,byte ptr [RSI]
ADD ECX,0x8
INC RSI
TEST AL,AL
JZ 0x0019db86
LAB_0019db92:
MOVZX EAX,AL
LAB_0019db95:
BT EAX,EDX
LEA EDX,[RDX + 0x1]
JNC 0x0019db95
LAB_0019db9d:
AND EBX,0xffffffe0
ADD ECX,EBX
LEA R14D,[RDX + RCX*0x1]
DEC R14D
LAB_0019dba9:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019dbbb:
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,ECX
SHL EAX,0x5
DEC EAX
MOV RDX,qword ptr [RBP + -0x38]
LEA RCX,[RDX + RCX*0x4]
ADD RCX,0x4
LAB_0019dbd2:
CMP RCX,R13
JNC 0x0019dc1a
MOV EDX,dword ptr [RCX]
ADD EAX,0x20
ADD RCX,0x4
TEST EDX,EDX
JZ 0x0019dbd2
MOV dword ptr [RBP + -0x2c],EDX
XOR ECX,ECX
MOV R14D,0x0
TEST DL,DL
JNZ 0x0019dc07
XOR R14D,R14D
LEA RSI,[RBP + -0x2b]
LAB_0019dbfa:
MOV DL,byte ptr [RSI]
ADD R14D,0x8
INC RSI
TEST DL,DL
JZ 0x0019dbfa
LAB_0019dc07:
MOVZX EDX,DL
LAB_0019dc0a:
BT EDX,ECX
LEA ECX,[RCX + 0x1]
JNC 0x0019dc0a
ADD R14D,EAX
ADD R14D,ECX
JMP 0x0019dba9
LAB_0019dc1a:
MOV ESI,dword ptr [R13]
MOV ECX,dword ptr [R15 + 0x18]
NOT ECX
TEST ESI,ECX
JZ 0x0019dba9
MOV dword ptr [RBP + -0x2c],ESI
XOR EDX,EDX
MOV ECX,0x0
TEST SIL,SIL
JNZ 0x0019dc4b
XOR ECX,ECX
LEA RDI,[RBP + -0x2b]
LAB_0019dc3d:
MOV SIL,byte ptr [RDI]
ADD ECX,0x8
INC RDI
TEST SIL,SIL
JZ 0x0019dc3d
LAB_0019dc4b:
MOVZX ESI,SIL
LAB_0019dc4f:
BT ESI,EDX
LEA EDX,[RDX + 0x1]
JNC 0x0019dc4f
ADD ECX,EAX
LEA R14D,[RDX + RCX*0x1]
ADD R14D,0x20
JMP 0x0019dba9
|
int bitmap_get_next_set(long *param_1,int param_2)
{
byte bVar1;
uint *puVar2;
long lVar3;
uint uVar4;
int iVar5;
uint *puVar6;
uint uVar7;
byte *pbVar8;
uint uVar9;
int iVar10;
uint local_38;
int4 local_34;
uVar7 = param_2 + 1;
iVar5 = -1;
if (uVar7 < *(uint *)((long)param_1 + 0x1c)) {
puVar2 = (uint *)param_1[1];
uVar4 = uVar7 >> 5;
lVar3 = *param_1;
puVar6 = (uint *)(lVar3 + (ulong)uVar4 * 4);
local_38 = *puVar6;
uVar9 = uVar7 >> 3 & 3;
if (uVar9 != 0) {
memset(&local_38,0,(ulong)uVar9);
}
pbVar8 = (byte *)((long)&local_38 + (ulong)uVar9);
*pbVar8 = *pbVar8 & (byte)(0xff << ((byte)uVar7 & 7));
if (puVar6 == puVar2) {
if ((local_38 & ~*(uint *)(param_1 + 3)) == 0) {
return -1;
}
local_34 = local_38;
uVar4 = 0;
iVar5 = 0;
if ((char)local_38 == '\0') {
pbVar8 = (byte *)((long)&local_34 + 1);
do {
bVar1 = *pbVar8;
local_38 = (uint)bVar1;
iVar5 = iVar5 + 8;
pbVar8 = pbVar8 + 1;
} while (bVar1 == 0);
}
do {
uVar9 = uVar4 & 0x1f;
uVar4 = uVar4 + 1;
} while (((local_38 & 0xff) >> uVar9 & 1) == 0);
}
else {
if (local_38 == 0) {
iVar5 = uVar4 * 0x20 + -1;
puVar6 = (uint *)(lVar3 + (ulong)uVar4 * 4);
do {
puVar6 = puVar6 + 1;
if (puVar2 <= puVar6) {
local_34 = *puVar2;
if ((local_34 & ~*(uint *)(param_1 + 3)) == 0) {
return -1;
}
uVar7 = 0;
iVar10 = 0;
if ((char)local_34 == '\0') {
iVar10 = 0;
pbVar8 = (byte *)((long)&local_34 + 1);
do {
bVar1 = *pbVar8;
local_34 = (uint)bVar1;
iVar10 = iVar10 + 8;
pbVar8 = pbVar8 + 1;
} while (bVar1 == 0);
}
do {
uVar4 = uVar7 & 0x1f;
uVar7 = uVar7 + 1;
} while (((local_34 & 0xff) >> uVar4 & 1) == 0);
return uVar7 + iVar10 + iVar5 + 0x20;
}
local_34 = *puVar6;
iVar5 = iVar5 + 0x20;
} while (local_34 == 0);
uVar7 = 0;
iVar10 = 0;
if ((char)local_34 == '\0') {
iVar10 = 0;
pbVar8 = (byte *)((long)&local_34 + 1);
do {
bVar1 = *pbVar8;
local_34 = (uint)bVar1;
iVar10 = iVar10 + 8;
pbVar8 = pbVar8 + 1;
} while (bVar1 == 0);
}
do {
uVar4 = uVar7 & 0x1f;
uVar7 = uVar7 + 1;
} while (((local_34 & 0xff) >> uVar4 & 1) == 0);
return iVar10 + iVar5 + uVar7;
}
local_34 = local_38;
uVar4 = 0;
iVar5 = 0;
if ((char)local_38 == '\0') {
iVar5 = 0;
pbVar8 = (byte *)((long)&local_34 + 1);
do {
bVar1 = *pbVar8;
local_38 = (uint)bVar1;
iVar5 = iVar5 + 8;
pbVar8 = pbVar8 + 1;
} while (bVar1 == 0);
}
do {
uVar9 = uVar4 & 0x1f;
uVar4 = uVar4 + 1;
} while (((local_38 & 0xff) >> uVar9 & 1) == 0);
}
iVar5 = uVar4 + iVar5 + (uVar7 & 0xffffffe0) + -1;
}
return iVar5;
}
|
|
5,971 | ha_maria::write_row(unsigned char const*) | eloqsql/storage/maria/ha_maria.cc | int ha_maria::write_row(const uchar * buf)
{
/*
If we have an auto_increment column and we are writing a changed row
or a new row, then update the auto_increment value in the record.
*/
if (table->next_number_field && buf == table->record[0])
{
int error;
if ((error= update_auto_increment()))
return error;
}
return maria_write(file, buf);
} | O3 | cpp | ha_maria::write_row(unsigned char const*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rax
cmpq $0x0, 0xc8(%rax)
je 0xa8944f
cmpq %rbx, 0x50(%rax)
je 0xa89462
movq 0x4e8(%r14), %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xac0a6f
movq %r14, %rdi
callq 0x9964da
testl %eax, %eax
je 0xa8944f
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZN8ha_maria9write_rowEPKh:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov rax, [rdi+10h]
cmp qword ptr [rax+0C8h], 0
jz short loc_A8944F
cmp [rax+50h], rbx
jz short loc_A89462
loc_A8944F:
mov rdi, [r14+4E8h]
mov rsi, rbx
pop rbx
pop r14
pop rbp
jmp maria_write
loc_A89462:
mov rdi, r14; this
call _ZN7handler21update_auto_incrementEv; handler::update_auto_increment(void)
test eax, eax
jz short loc_A8944F
pop rbx
pop r14
pop rbp
retn
| long long ha_maria::write_row(ha_maria *this, const unsigned __int8 *a2)
{
long long v2; // rax
long long result; // rax
v2 = *((_QWORD *)this + 2);
if ( !*(_QWORD *)(v2 + 200) )
return maria_write(*((_QWORD *)this + 157), a2);
if ( *(const unsigned __int8 **)(v2 + 80) != a2 )
return maria_write(*((_QWORD *)this + 157), a2);
result = handler::update_auto_increment(this);
if ( !(_DWORD)result )
return maria_write(*((_QWORD *)this + 157), a2);
return result;
}
| size_of:
PUSH RBP
MOV RBP,RSP
MOV EAX,0x100
POP RBP
RET
|
/* Field_vers_trx_id::size_of() const */
int8 Field_vers_trx_id::size_of(void)
{
return 0x100;
}
|
|
5,972 | llama_vocab::impl::detokenize(int const*, int, char*, int, bool, bool) const | monkey531[P]llama/src/llama-vocab.cpp | int32_t llama_vocab::impl::detokenize(
const llama_token * tokens,
int32_t n_tokens,
char * text,
int32_t text_len_max,
bool remove_special,
bool unparse_special) const {
if (type == LLAMA_VOCAB_TYPE_NONE) {
return 0;
}
GGML_ASSERT(tokenizer && "Tokenizer not initialized. Call llama_vocab::init_tokenizer() first.");
int32_t avail = text_len_max;
int32_t total = 0;
// remove the leading space
bool remove_space = add_space_prefix;
if (remove_special && add_bos) {
if (n_tokens > 0 && tokens[0] == special_bos_id) {
remove_space = false;
n_tokens--;
tokens++;
}
}
if (remove_special && add_eos) {
if (n_tokens > 0 && tokens[n_tokens - 1] == special_eos_id) {
n_tokens--;
}
}
for (int32_t i = 0; i < n_tokens; ++i) {
GGML_ASSERT(avail >= 0);
int32_t n_chars = token_to_piece(tokens[i], text, avail, remove_space, unparse_special);
remove_space = false;
if (n_chars < 0) {
avail = 0;
total -= n_chars;
} else if (n_chars > 0) {
avail -= n_chars;
text += n_chars;
total += n_chars;
}
}
if (total > text_len_max) {
return -total;
}
if (clean_spaces) {
text -= total; // restart text
// first pass: characters ?!., //TODO: where do these characters come from?
const int32_t total1 = total;
total = total ? 1 : 0;
for (int32_t i = 1; i < total1; ++i) {
const char x = text[i];
if (text[i - 1] == ' ') {
if (x == '?' || x == '!' || x == '.' || x == ',') { // " ?", " !", " .", " ,"
total--; // remove space
}
}
text[total++] = x;
}
// second pass: strip single apostrophe between spaces
const int32_t total2 = total;
total = total ? 1 : 0;
for (int32_t i = 1; i < total2; ++i) {
const char x = text[i];
if (x == '\'' && i + 1 < total2 && text[i - 1] == ' ' && text[i + 1] == ' ') { // " ' "
total--; // remove prev space
text[++i] = '\0'; // remove next space
}
text[total++] = x;
}
// third pass: apostrophe contractions //NOTE: this makes sense?
const int32_t total3 = total;
total = total ? 1 : 0;
for (int32_t i = 1; i < total3; ++i) {
const char x = text[i];
if (text[i - 1] == ' ') {
if (x == '\'' && i + 1 < total3) {
const char x1 = text[i + 1];
if (x1 == 't' || x1 == 'd') { // " 't", " 'd"
//total--; // remove space
} else if (x1 == 's' || x1 == 'm') { // " 's", " 'm"
total--; // remove space
} else if (i + 2 < total3) {
const char x2 = text[i + 2];
if ((x1 == 'l' && x2 == 'l')) { // " 'll"
//total--; // remove space
} else if ((x1 == 'r' && x2 == 'e') || (x1 == 'v' && x2 == 'e')) { // " 're", " 've"
total--; // remove space
} else {
//total--; // remove space
}
} else {
//total--; // remove space
}
}
}
text[total++] = x;
}
}
return total <= text_len_max ? total : -total;
} | O1 | cpp | llama_vocab::impl::detokenize(int const*, int, char*, int, bool, bool) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x0, 0x4(%rdi)
je 0xec534
cmpq $0x0, 0x140(%rdi)
je 0xec6dd
movl %r8d, %r13d
movq %rcx, %r11
movb 0x4c(%rdi), %al
testb %r9b, %r9b
je 0xec497
testl %edx, %edx
jle 0xec497
cmpb $0x0, 0x4d(%rdi)
je 0xec497
movl (%rsi), %ecx
cmpl 0x10(%rdi), %ecx
jne 0xec497
decl %edx
addq $0x4, %rsi
xorl %eax, %eax
testb %r9b, %r9b
je 0xec4b7
testl %edx, %edx
setg %cl
andb 0x4e(%rdi), %cl
cmpb $0x1, %cl
jne 0xec4b7
leal -0x1(%rdx), %ecx
movl (%rsi,%rcx,4), %r8d
cmpl 0x14(%rdi), %r8d
cmovel %ecx, %edx
testl %edx, %edx
movl %r13d, 0x8(%rsp)
jle 0xec53b
movzbl %al, %r8d
movl %edx, %eax
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
movzbl 0x50(%rsp), %eax
movl %eax, 0xc(%rsp)
xorl %ebx, %ebx
testl %r13d, %r13d
js 0xec6bc
movq %rsi, %rbp
movl (%rsi,%r15,4), %esi
movq %rdi, %r14
movq %r11, %r12
movq %r11, %rdx
movl %r13d, %ecx
movl 0xc(%rsp), %r9d
callq 0x69d60
testl %eax, %eax
js 0xec517
je 0xec51c
subl %eax, %r13d
movl %eax, %ecx
movq %r12, %r11
addq %rcx, %r11
addl %eax, %ebx
movq %r14, %rdi
jmp 0xec522
subl %eax, %ebx
xorl %r13d, %r13d
movq %r14, %rdi
movq %r12, %r11
incq %r15
xorl %r8d, %r8d
cmpq %r15, 0x10(%rsp)
movq %rbp, %rsi
jne 0xec4d9
jmp 0xec53d
xorl %eax, %eax
jmp 0xec6ad
xorl %ebx, %ebx
movl 0x8(%rsp), %ebp
cmpl %ebp, %ebx
jle 0xec54e
negl %ebx
movl %ebx, %eax
jmp 0xec6ad
cmpb $0x1, 0x50(%rdi)
jne 0xec6a4
movl %ebx, %esi
movq %r11, %rax
subq %rsi, %rax
xorl %edx, %edx
testl %ebx, %ebx
setne %dl
cmpl $0x2, %ebx
jl 0xec5ad
movl $0x1, %ecx
subq %rsi, %rcx
movabsq $-0x7fffaffe00000000, %rsi # imm = 0x8000500200000000
movb (%r11,%rcx), %dil
cmpb $0x20, -0x1(%r11,%rcx)
jne 0xec59f
movzbl %dil, %r8d
cmpl $0x3f, %r8d
ja 0xec59f
movl %r8d, %r8d
btq %r8, %rsi
jae 0xec59f
decl %edx
movslq %edx, %r8
incl %edx
movb %dil, (%rax,%r8)
incq %rcx
jne 0xec57e
xorl %ecx, %ecx
testl %edx, %edx
setne %cl
cmpl $0x2, %edx
jl 0xec5ff
movl $0x1, %r8d
movslq %r8d, %r9
movb (%rax,%r9), %sil
cmpb $0x27, %sil
jne 0xec5ea
leaq 0x1(%r9), %rdi
cmpl %edx, %edi
jge 0xec5ea
cmpb $0x20, -0x1(%rax,%r9)
jne 0xec5ea
cmpb $0x20, (%rax,%rdi)
jne 0xec5ea
decl %ecx
movb $0x0, (%rax,%rdi)
jmp 0xec5ed
movl %r8d, %edi
movslq %ecx, %r8
incl %ecx
movb %sil, (%rax,%r8)
incl %edi
movl %edi, %r8d
cmpl %edx, %edi
jl 0xec5bf
xorl %ebx, %ebx
testl %ecx, %ecx
setne %bl
cmpl $0x2, %ecx
jl 0xec6a4
movl %ecx, %edx
movl $0x1, %esi
subq %rdx, %rsi
movl $0x3, %edi
movb -0x2(%rax,%rdi), %r8b
cmpb $0x20, -0x3(%rax,%rdi)
jne 0xec65a
cmpb $0x27, %r8b
jne 0xec65a
leaq -0x1(%rdi), %r9
cmpq %rdx, %r9
jae 0xec65a
movzbl -0x1(%rax,%rdi), %r9d
movl %r9d, %r10d
andb $-0x11, %r10b
cmpb $0x64, %r10b
je 0xec65a
cmpl $0x73, %r9d
je 0xec658
cmpl $0x6d, %r9d
jne 0xec675
decl %ebx
movslq %ebx, %r9
incl %ebx
movb %r8b, (%rax,%r9)
leaq (%rsi,%rdi), %r8
incq %r8
incq %rdi
cmpq $0x3, %r8
jne 0xec61e
jmp 0xec6a4
cmpl %edi, %ecx
jle 0xec65a
movb (%rax,%rdi), %r10b
cmpl $0x6c, %r9d
jne 0xec689
cmpb $0x6c, %r10b
je 0xec65a
xorb $0x65, %r10b
andb $-0x5, %r9b
xorb $0x72, %r9b
xorl %r11d, %r11d
orb %r10b, %r9b
sete %r11b
subl %r11d, %ebx
jmp 0xec65a
movl %ebx, %eax
negl %eax
cmpl %ebp, %ebx
cmovlel %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x324d5(%rip), %rdi # 0x11eb98
leaq 0x27cfa(%rip), %rdx # 0x1143c4
leaq 0x32b97(%rip), %rcx # 0x11f268
movl $0xa34, %esi # imm = 0xA34
xorl %eax, %eax
callq 0x6bfd0
leaq 0x324b4(%rip), %rdi # 0x11eb98
leaq 0x27cd9(%rip), %rdx # 0x1143c4
leaq 0x329ee(%rip), %rcx # 0x11f0e0
movl $0xa1d, %esi # imm = 0xA1D
jmp 0xec6d6
nop
| _ZNK11llama_vocab4impl10detokenizeEPKiiPcibb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp dword ptr [rdi+4], 0
jz loc_EC534
cmp qword ptr [rdi+140h], 0
jz loc_EC6DD
mov r13d, r8d
mov r11, rcx
mov al, [rdi+4Ch]
test r9b, r9b
jz short loc_EC497
test edx, edx
jle short loc_EC497
cmp byte ptr [rdi+4Dh], 0
jz short loc_EC497
mov ecx, [rsi]
cmp ecx, [rdi+10h]
jnz short loc_EC497
dec edx
add rsi, 4
xor eax, eax
loc_EC497:
test r9b, r9b
jz short loc_EC4B7
test edx, edx
setnle cl
and cl, [rdi+4Eh]
cmp cl, 1
jnz short loc_EC4B7
lea ecx, [rdx-1]
mov r8d, [rsi+rcx*4]
cmp r8d, [rdi+14h]
cmovz edx, ecx
loc_EC4B7:
test edx, edx
mov [rsp+48h+var_40], r13d
jle short loc_EC53B
movzx r8d, al; int
mov eax, edx
mov [rsp+48h+var_38], rax
xor r15d, r15d
movzx eax, [rsp+48h+arg_0]
mov dword ptr [rsp+48h+var_3C], eax
xor ebx, ebx
loc_EC4D9:
test r13d, r13d
js loc_EC6BC
mov rbp, rsi
mov esi, [rsi+r15*4]; int
mov r14, rdi
mov r12, r11
mov rdx, r11; char *
mov ecx, r13d; int
mov r9d, dword ptr [rsp+48h+var_3C]; bool
call __ZNK11llama_vocab4impl14token_to_pieceEiPciib; llama_vocab::impl::token_to_piece(int,char *,int,int,bool)
test eax, eax
js short loc_EC517
jz short loc_EC51C
sub r13d, eax
mov ecx, eax
mov r11, r12
add r11, rcx
add ebx, eax
mov rdi, r14
jmp short loc_EC522
loc_EC517:
sub ebx, eax
xor r13d, r13d
loc_EC51C:
mov rdi, r14
mov r11, r12
loc_EC522:
inc r15
xor r8d, r8d
cmp [rsp+48h+var_38], r15
mov rsi, rbp
jnz short loc_EC4D9
jmp short loc_EC53D
loc_EC534:
xor eax, eax
jmp loc_EC6AD
loc_EC53B:
xor ebx, ebx
loc_EC53D:
mov ebp, [rsp+48h+var_40]
cmp ebx, ebp
jle short loc_EC54E
neg ebx
mov eax, ebx
jmp loc_EC6AD
loc_EC54E:
cmp byte ptr [rdi+50h], 1
jnz loc_EC6A4
mov esi, ebx
mov rax, r11
sub rax, rsi
xor edx, edx
test ebx, ebx
setnz dl
cmp ebx, 2
jl short loc_EC5AD
mov ecx, 1
sub rcx, rsi
mov rsi, 8000500200000000h
loc_EC57E:
mov dil, [r11+rcx]
cmp byte ptr [r11+rcx-1], 20h ; ' '
jnz short loc_EC59F
movzx r8d, dil
cmp r8d, 3Fh ; '?'
ja short loc_EC59F
mov r8d, r8d
bt rsi, r8
jnb short loc_EC59F
dec edx
loc_EC59F:
movsxd r8, edx
inc edx
mov [rax+r8], dil
inc rcx
jnz short loc_EC57E
loc_EC5AD:
xor ecx, ecx
test edx, edx
setnz cl
cmp edx, 2
jl short loc_EC5FF
mov r8d, 1
loc_EC5BF:
movsxd r9, r8d
mov sil, [rax+r9]
cmp sil, 27h ; '''
jnz short loc_EC5EA
lea rdi, [r9+1]
cmp edi, edx
jge short loc_EC5EA
cmp byte ptr [rax+r9-1], 20h ; ' '
jnz short loc_EC5EA
cmp byte ptr [rax+rdi], 20h ; ' '
jnz short loc_EC5EA
dec ecx
mov byte ptr [rax+rdi], 0
jmp short loc_EC5ED
loc_EC5EA:
mov edi, r8d
loc_EC5ED:
movsxd r8, ecx
inc ecx
mov [rax+r8], sil
inc edi
mov r8d, edi
cmp edi, edx
jl short loc_EC5BF
loc_EC5FF:
xor ebx, ebx
test ecx, ecx
setnz bl
cmp ecx, 2
jl loc_EC6A4
mov edx, ecx
mov esi, 1
sub rsi, rdx
mov edi, 3
loc_EC61E:
mov r8b, [rax+rdi-2]
cmp byte ptr [rax+rdi-3], 20h ; ' '
jnz short loc_EC65A
cmp r8b, 27h ; '''
jnz short loc_EC65A
lea r9, [rdi-1]
cmp r9, rdx
jnb short loc_EC65A
movzx r9d, byte ptr [rax+rdi-1]
mov r10d, r9d
and r10b, 0EFh
cmp r10b, 64h ; 'd'
jz short loc_EC65A
cmp r9d, 73h ; 's'
jz short loc_EC658
cmp r9d, 6Dh ; 'm'
jnz short loc_EC675
loc_EC658:
dec ebx
loc_EC65A:
movsxd r9, ebx
inc ebx
mov [rax+r9], r8b
lea r8, [rsi+rdi]
inc r8
inc rdi
cmp r8, 3
jnz short loc_EC61E
jmp short loc_EC6A4
loc_EC675:
cmp ecx, edi
jle short loc_EC65A
mov r10b, [rax+rdi]
cmp r9d, 6Ch ; 'l'
jnz short loc_EC689
cmp r10b, 6Ch ; 'l'
jz short loc_EC65A
loc_EC689:
xor r10b, 65h
and r9b, 0FBh
xor r9b, 72h
xor r11d, r11d
or r9b, r10b
setz r11b
sub ebx, r11d
jmp short loc_EC65A
loc_EC6A4:
mov eax, ebx
neg eax
cmp ebx, ebp
cmovle eax, ebx
loc_EC6AD:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_EC6BC:
lea rdi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAvail0; "avail >= 0"
mov esi, 0A34h
loc_EC6D6:
xor eax, eax
call _ggml_abort
loc_EC6DD:
lea rdi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTokenizerToken; "tokenizer && \"Tokenizer not initialize"...
mov esi, 0A1Dh
jmp short loc_EC6D6
| long long llama_vocab::impl::detokenize(
llama_vocab::impl *this,
const int *a2,
int a3,
char *a4,
int a5,
char a6,
bool a7)
{
int v7; // r13d
unsigned __int8 v9; // al
int v10; // r8d
long long v11; // r15
int v12; // ebx
char *v13; // r12
int v14; // eax
long long result; // rax
char *v16; // rax
int v17; // edx
long long v18; // rcx
unsigned long long v19; // rsi
unsigned __int8 v20; // di
long long v21; // r8
int v22; // ecx
int v23; // r8d
char v24; // si
long long v25; // rdi
long long v26; // r8
long long v27; // rdi
char v28; // r8
int v29; // r9d
long long v30; // r9
long long v31; // r8
char v32; // r10
long long v34; // [rsp+10h] [rbp-38h]
if ( !*((_DWORD *)this + 1) )
return 0LL;
if ( !*((_QWORD *)this + 40) )
{
while ( 1 )
LABEL_62:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-vocab.cpp",
2589LL,
"GGML_ASSERT(%s) failed",
"tokenizer && \"Tokenizer not initialized. Call llama_vocab::init_tokenizer() first.\"");
}
v7 = a5;
v9 = *((_BYTE *)this + 76);
if ( a6 && a3 > 0 && *((_BYTE *)this + 77) && *a2 == *((_DWORD *)this + 4) )
{
--a3;
++a2;
v9 = 0;
}
if ( a6 && (*((_BYTE *)this + 78) & (a3 > 0)) == 1 && a2[a3 - 1] == *((_DWORD *)this + 5) )
--a3;
if ( a3 > 0 )
{
v10 = v9;
v34 = (unsigned int)a3;
v11 = 0LL;
v12 = 0;
while ( 1 )
{
if ( v7 < 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-vocab.cpp",
2612LL,
"GGML_ASSERT(%s) failed",
"avail >= 0");
goto LABEL_62;
}
v13 = a4;
v14 = llama_vocab::impl::token_to_piece(this, a2[v11], a4, v7, v10, a7);
if ( v14 < 0 )
break;
if ( !v14 )
goto LABEL_19;
v7 -= v14;
a4 = &v13[v14];
v12 += v14;
LABEL_20:
++v11;
v10 = 0;
if ( v34 == v11 )
goto LABEL_24;
}
v12 -= v14;
v7 = 0;
LABEL_19:
a4 = v13;
goto LABEL_20;
}
v12 = 0;
LABEL_24:
if ( v12 > a5 )
return (unsigned int)-v12;
if ( *((_BYTE *)this + 80) == 1 )
{
v16 = &a4[-v12];
v17 = v12 != 0;
if ( v12 >= 2 )
{
v18 = 1LL - (unsigned int)v12;
v19 = 0x8000500200000000LL;
do
{
v20 = a4[v18];
if ( a4[v18 - 1] == 32 && v20 <= 0x3Fu && _bittest64((const long long *)&v19, v20) )
--v17;
v21 = v17++;
v16[v21] = v20;
++v18;
}
while ( v18 );
}
v22 = v17 != 0;
if ( v17 >= 2 )
{
v23 = 1;
do
{
v24 = v16[v23];
if ( v24 == 39 && (v25 = v23 + 1LL, v23 + 1 < v17) && v16[v23 - 1] == 32 && v16[v25] == 32 )
{
--v22;
v16[v25] = 0;
}
else
{
LODWORD(v25) = v23;
}
v26 = v22++;
v16[v26] = v24;
v23 = v25 + 1;
}
while ( (int)v25 + 1 < v17 );
}
v12 = v22 != 0;
if ( v22 >= 2 )
{
v27 = 3LL;
do
{
v28 = v16[v27 - 2];
if ( v16[v27 - 3] == 32 && v28 == 39 && v27 - 1 < (unsigned long long)(unsigned int)v22 )
{
v29 = (unsigned __int8)v16[v27 - 1];
if ( (v16[v27 - 1] & 0xEF) != 0x64 )
{
if ( v29 == 115 || v29 == 109 )
{
--v12;
}
else if ( v22 > (int)v27 )
{
v32 = v16[v27];
if ( v29 != 108 || v32 != 108 )
v12 -= ((unsigned __int8)v32 ^ 0x65 | v29 & 0xFB ^ 0x72) == 0;
}
}
}
v30 = v12++;
v16[v30] = v28;
v31 = 1LL - (unsigned int)v22 + v27++ + 1;
}
while ( v31 != 3 );
}
}
result = (unsigned int)-v12;
if ( v12 <= a5 )
return (unsigned int)v12;
return result;
}
| detokenize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP dword ptr [RDI + 0x4],0x0
JZ 0x001ec534
CMP qword ptr [RDI + 0x140],0x0
JZ 0x001ec6dd
MOV R13D,R8D
MOV R11,RCX
MOV AL,byte ptr [RDI + 0x4c]
TEST R9B,R9B
JZ 0x001ec497
TEST EDX,EDX
JLE 0x001ec497
CMP byte ptr [RDI + 0x4d],0x0
JZ 0x001ec497
MOV ECX,dword ptr [RSI]
CMP ECX,dword ptr [RDI + 0x10]
JNZ 0x001ec497
DEC EDX
ADD RSI,0x4
XOR EAX,EAX
LAB_001ec497:
TEST R9B,R9B
JZ 0x001ec4b7
TEST EDX,EDX
SETG CL
AND CL,byte ptr [RDI + 0x4e]
CMP CL,0x1
JNZ 0x001ec4b7
LEA ECX,[RDX + -0x1]
MOV R8D,dword ptr [RSI + RCX*0x4]
CMP R8D,dword ptr [RDI + 0x14]
CMOVZ EDX,ECX
LAB_001ec4b7:
TEST EDX,EDX
MOV dword ptr [RSP + 0x8],R13D
JLE 0x001ec53b
MOVZX R8D,AL
MOV EAX,EDX
MOV qword ptr [RSP + 0x10],RAX
XOR R15D,R15D
MOVZX EAX,byte ptr [RSP + 0x50]
MOV dword ptr [RSP + 0xc],EAX
XOR EBX,EBX
LAB_001ec4d9:
TEST R13D,R13D
JS 0x001ec6bc
MOV RBP,RSI
MOV ESI,dword ptr [RSI + R15*0x4]
MOV R14,RDI
MOV R12,R11
MOV RDX,R11
MOV ECX,R13D
MOV R9D,dword ptr [RSP + 0xc]
CALL 0x00169d60
TEST EAX,EAX
JS 0x001ec517
JZ 0x001ec51c
SUB R13D,EAX
MOV ECX,EAX
MOV R11,R12
ADD R11,RCX
ADD EBX,EAX
MOV RDI,R14
JMP 0x001ec522
LAB_001ec517:
SUB EBX,EAX
XOR R13D,R13D
LAB_001ec51c:
MOV RDI,R14
MOV R11,R12
LAB_001ec522:
INC R15
XOR R8D,R8D
CMP qword ptr [RSP + 0x10],R15
MOV RSI,RBP
JNZ 0x001ec4d9
JMP 0x001ec53d
LAB_001ec534:
XOR EAX,EAX
JMP 0x001ec6ad
LAB_001ec53b:
XOR EBX,EBX
LAB_001ec53d:
MOV EBP,dword ptr [RSP + 0x8]
CMP EBX,EBP
JLE 0x001ec54e
NEG EBX
MOV EAX,EBX
JMP 0x001ec6ad
LAB_001ec54e:
CMP byte ptr [RDI + 0x50],0x1
JNZ 0x001ec6a4
MOV ESI,EBX
MOV RAX,R11
SUB RAX,RSI
XOR EDX,EDX
TEST EBX,EBX
SETNZ DL
CMP EBX,0x2
JL 0x001ec5ad
MOV ECX,0x1
SUB RCX,RSI
MOV RSI,-0x7fffaffe00000000
LAB_001ec57e:
MOV DIL,byte ptr [R11 + RCX*0x1]
CMP byte ptr [R11 + RCX*0x1 + -0x1],0x20
JNZ 0x001ec59f
MOVZX R8D,DIL
CMP R8D,0x3f
JA 0x001ec59f
MOV R8D,R8D
BT RSI,R8
JNC 0x001ec59f
DEC EDX
LAB_001ec59f:
MOVSXD R8,EDX
INC EDX
MOV byte ptr [RAX + R8*0x1],DIL
INC RCX
JNZ 0x001ec57e
LAB_001ec5ad:
XOR ECX,ECX
TEST EDX,EDX
SETNZ CL
CMP EDX,0x2
JL 0x001ec5ff
MOV R8D,0x1
LAB_001ec5bf:
MOVSXD R9,R8D
MOV SIL,byte ptr [RAX + R9*0x1]
CMP SIL,0x27
JNZ 0x001ec5ea
LEA RDI,[R9 + 0x1]
CMP EDI,EDX
JGE 0x001ec5ea
CMP byte ptr [RAX + R9*0x1 + -0x1],0x20
JNZ 0x001ec5ea
CMP byte ptr [RAX + RDI*0x1],0x20
JNZ 0x001ec5ea
DEC ECX
MOV byte ptr [RAX + RDI*0x1],0x0
JMP 0x001ec5ed
LAB_001ec5ea:
MOV EDI,R8D
LAB_001ec5ed:
MOVSXD R8,ECX
INC ECX
MOV byte ptr [RAX + R8*0x1],SIL
INC EDI
MOV R8D,EDI
CMP EDI,EDX
JL 0x001ec5bf
LAB_001ec5ff:
XOR EBX,EBX
TEST ECX,ECX
SETNZ BL
CMP ECX,0x2
JL 0x001ec6a4
MOV EDX,ECX
MOV ESI,0x1
SUB RSI,RDX
MOV EDI,0x3
LAB_001ec61e:
MOV R8B,byte ptr [RAX + RDI*0x1 + -0x2]
CMP byte ptr [RAX + RDI*0x1 + -0x3],0x20
JNZ 0x001ec65a
CMP R8B,0x27
JNZ 0x001ec65a
LEA R9,[RDI + -0x1]
CMP R9,RDX
JNC 0x001ec65a
MOVZX R9D,byte ptr [RAX + RDI*0x1 + -0x1]
MOV R10D,R9D
AND R10B,0xef
CMP R10B,0x64
JZ 0x001ec65a
CMP R9D,0x73
JZ 0x001ec658
CMP R9D,0x6d
JNZ 0x001ec675
LAB_001ec658:
DEC EBX
LAB_001ec65a:
MOVSXD R9,EBX
INC EBX
MOV byte ptr [RAX + R9*0x1],R8B
LEA R8,[RSI + RDI*0x1]
INC R8
INC RDI
CMP R8,0x3
JNZ 0x001ec61e
JMP 0x001ec6a4
LAB_001ec675:
CMP ECX,EDI
JLE 0x001ec65a
MOV R10B,byte ptr [RAX + RDI*0x1]
CMP R9D,0x6c
JNZ 0x001ec689
CMP R10B,0x6c
JZ 0x001ec65a
LAB_001ec689:
XOR R10B,0x65
AND R9B,0xfb
XOR R9B,0x72
XOR R11D,R11D
OR R9B,R10B
SETZ R11B
SUB EBX,R11D
JMP 0x001ec65a
LAB_001ec6a4:
MOV EAX,EBX
NEG EAX
CMP EBX,EBP
CMOVLE EAX,EBX
LAB_001ec6ad:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ec6bc:
LEA RDI,[0x21eb98]
LEA RDX,[0x2143c4]
LEA RCX,[0x21f268]
MOV ESI,0xa34
LAB_001ec6d6:
XOR EAX,EAX
CALL 0x0016bfd0
LAB_001ec6dd:
LEA RDI,[0x21eb98]
LEA RDX,[0x2143c4]
LEA RCX,[0x21f0e0]
MOV ESI,0xa1d
JMP 0x001ec6d6
|
/* llama_vocab::impl::detokenize(int const*, int, char*, int, bool, bool) const */
ulong __thiscall
llama_vocab::impl::detokenize
(impl *this,int *param_1,int param_2,char *param_3,int param_4,bool param_5,bool param_6)
{
byte bVar1;
char cVar2;
impl iVar3;
uint uVar4;
ulong uVar5;
uint uVar6;
long lVar7;
char *pcVar8;
int8 uVar9;
uint uVar10;
long lVar11;
int iVar12;
ulong uVar13;
if (*(int *)(this + 4) == 0) {
uVar5 = 0;
}
else {
if (*(long *)(this + 0x140) == 0) {
pcVar8 =
"tokenizer && \"Tokenizer not initialized. Call llama_vocab::init_tokenizer() first.\"";
uVar9 = 0xa1d;
LAB_001ec6d6:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-vocab.cpp",
uVar9,"GGML_ASSERT(%s) failed",pcVar8);
}
iVar3 = this[0x4c];
if ((((param_5) && (0 < param_2)) && (this[0x4d] != (impl)0x0)) &&
(*param_1 == *(int *)(this + 0x10))) {
param_2 = param_2 - 1;
param_1 = param_1 + 1;
iVar3 = (impl)0x0;
}
if (((param_5) && ((0 < param_2 & (byte)this[0x4e]) == 1)) &&
(param_1[param_2 - 1U] == *(int *)(this + 0x14))) {
param_2 = param_2 - 1U;
}
if (param_2 < 1) {
uVar5 = 0;
}
else {
uVar4 = (uint)(byte)iVar3;
uVar13 = 0;
uVar5 = 0;
iVar12 = param_4;
do {
if (iVar12 < 0) {
pcVar8 = "avail >= 0";
uVar9 = 0xa34;
goto LAB_001ec6d6;
}
uVar4 = token_to_piece(this,param_1[uVar13],param_3,iVar12,uVar4,param_6);
if ((int)uVar4 < 0) {
uVar5 = (ulong)((int)uVar5 - uVar4);
iVar12 = 0;
}
else if (uVar4 != 0) {
iVar12 = iVar12 - uVar4;
param_3 = param_3 + uVar4;
uVar5 = (ulong)((int)uVar5 + uVar4);
}
uVar13 = uVar13 + 1;
uVar4 = 0;
} while ((uint)param_2 != uVar13);
}
iVar12 = (int)uVar5;
if (param_4 < iVar12) {
uVar5 = (ulong)(uint)-iVar12;
}
else {
uVar13 = uVar5;
if (this[0x50] == (impl)0x1) {
uVar4 = (uint)(iVar12 != 0);
if (1 < iVar12) {
lVar7 = 1 - uVar5;
uVar4 = (uint)(iVar12 != 0);
do {
bVar1 = param_3[lVar7];
if (((param_3[lVar7 + -1] == ' ') && (bVar1 < 0x40)) &&
((0x8000500200000000U >> ((ulong)(uint)bVar1 & 0x3f) & 1) != 0)) {
uVar4 = uVar4 - 1;
}
lVar11 = (long)(int)uVar4;
uVar4 = uVar4 + 1;
param_3[lVar11 - uVar5] = bVar1;
lVar7 = lVar7 + 1;
} while (lVar7 != 0);
}
uVar6 = (uint)(uVar4 != 0);
if (1 < (int)uVar4) {
uVar10 = 1;
uVar6 = (uint)(uVar4 != 0);
do {
lVar7 = (long)(int)uVar10;
cVar2 = param_3[lVar7 - uVar5];
if ((((cVar2 == '\'') && (uVar13 = lVar7 + 1, (int)uVar13 < (int)uVar4)) &&
(param_3[lVar7 + (-1 - uVar5)] == ' ')) && (param_3[uVar13 - uVar5] == ' ')) {
uVar6 = uVar6 - 1;
param_3[uVar13 - uVar5] = '\0';
}
else {
uVar13 = (ulong)uVar10;
}
lVar7 = (long)(int)uVar6;
uVar6 = uVar6 + 1;
param_3[lVar7 - uVar5] = cVar2;
uVar10 = (int)uVar13 + 1;
} while ((int)uVar10 < (int)uVar4);
}
uVar13 = (ulong)(uVar6 != 0);
if (1 < (int)uVar6) {
lVar7 = 3;
do {
iVar12 = (int)uVar13;
if (((param_3[lVar7 + (-3 - uVar5)] == ' ') && (param_3[lVar7 + (-2 - uVar5)] == '\''))
&& ((lVar7 - 1U < (ulong)uVar6 &&
(bVar1 = param_3[lVar7 + (-1 - uVar5)], (bVar1 & 0xef) != 100)))) {
if ((bVar1 == 0x73) || (bVar1 == 0x6d)) {
iVar12 = iVar12 + -1;
}
else if (((int)lVar7 < (int)uVar6) &&
((bVar1 != 0x6c || (param_3[lVar7 - uVar5] != 'l')))) {
iVar12 = iVar12 - (uint)((bVar1 & 0xfb) == 0x72 && param_3[lVar7 - uVar5] == 'e');
}
}
uVar13 = (ulong)(iVar12 + 1);
param_3[(long)iVar12 - uVar5] = param_3[lVar7 + (-2 - uVar5)];
lVar11 = lVar7 - (ulong)uVar6;
lVar7 = lVar7 + 1;
} while (lVar11 != 1);
}
}
uVar5 = (ulong)(uint)-(int)uVar13;
if ((int)uVar13 <= param_4) {
uVar5 = uVar13;
}
}
}
return uVar5;
}
|
|
5,973 | llama_vocab::impl::detokenize(int const*, int, char*, int, bool, bool) const | monkey531[P]llama/src/llama-vocab.cpp | int32_t llama_vocab::impl::detokenize(
const llama_token * tokens,
int32_t n_tokens,
char * text,
int32_t text_len_max,
bool remove_special,
bool unparse_special) const {
if (type == LLAMA_VOCAB_TYPE_NONE) {
return 0;
}
GGML_ASSERT(tokenizer && "Tokenizer not initialized. Call llama_vocab::init_tokenizer() first.");
int32_t avail = text_len_max;
int32_t total = 0;
// remove the leading space
bool remove_space = add_space_prefix;
if (remove_special && add_bos) {
if (n_tokens > 0 && tokens[0] == special_bos_id) {
remove_space = false;
n_tokens--;
tokens++;
}
}
if (remove_special && add_eos) {
if (n_tokens > 0 && tokens[n_tokens - 1] == special_eos_id) {
n_tokens--;
}
}
for (int32_t i = 0; i < n_tokens; ++i) {
GGML_ASSERT(avail >= 0);
int32_t n_chars = token_to_piece(tokens[i], text, avail, remove_space, unparse_special);
remove_space = false;
if (n_chars < 0) {
avail = 0;
total -= n_chars;
} else if (n_chars > 0) {
avail -= n_chars;
text += n_chars;
total += n_chars;
}
}
if (total > text_len_max) {
return -total;
}
if (clean_spaces) {
text -= total; // restart text
// first pass: characters ?!., //TODO: where do these characters come from?
const int32_t total1 = total;
total = total ? 1 : 0;
for (int32_t i = 1; i < total1; ++i) {
const char x = text[i];
if (text[i - 1] == ' ') {
if (x == '?' || x == '!' || x == '.' || x == ',') { // " ?", " !", " .", " ,"
total--; // remove space
}
}
text[total++] = x;
}
// second pass: strip single apostrophe between spaces
const int32_t total2 = total;
total = total ? 1 : 0;
for (int32_t i = 1; i < total2; ++i) {
const char x = text[i];
if (x == '\'' && i + 1 < total2 && text[i - 1] == ' ' && text[i + 1] == ' ') { // " ' "
total--; // remove prev space
text[++i] = '\0'; // remove next space
}
text[total++] = x;
}
// third pass: apostrophe contractions //NOTE: this makes sense?
const int32_t total3 = total;
total = total ? 1 : 0;
for (int32_t i = 1; i < total3; ++i) {
const char x = text[i];
if (text[i - 1] == ' ') {
if (x == '\'' && i + 1 < total3) {
const char x1 = text[i + 1];
if (x1 == 't' || x1 == 'd') { // " 't", " 'd"
//total--; // remove space
} else if (x1 == 's' || x1 == 'm') { // " 's", " 'm"
total--; // remove space
} else if (i + 2 < total3) {
const char x2 = text[i + 2];
if ((x1 == 'l' && x2 == 'l')) { // " 'll"
//total--; // remove space
} else if ((x1 == 'r' && x2 == 'e') || (x1 == 'v' && x2 == 'e')) { // " 're", " 've"
total--; // remove space
} else {
//total--; // remove space
}
} else {
//total--; // remove space
}
}
}
text[total++] = x;
}
}
return total <= text_len_max ? total : -total;
} | O3 | cpp | llama_vocab::impl::detokenize(int const*, int, char*, int, bool, bool) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x0, 0x4(%rdi)
je 0xe83af
cmpq $0x0, 0x140(%rdi)
je 0xe8586
movl %r8d, %r13d
movq %rcx, %r11
movb 0x4c(%rdi), %al
testb %r9b, %r9b
movl %r8d, 0x8(%rsp)
je 0xe8330
testl %edx, %edx
jle 0xe8314
cmpb $0x0, 0x4d(%rdi)
je 0xe8314
movl (%rsi), %ecx
cmpl 0x10(%rdi), %ecx
jne 0xe8314
decl %edx
addq $0x4, %rsi
xorl %eax, %eax
testl %edx, %edx
setg %cl
andb 0x4e(%rdi), %cl
cmpb $0x1, %cl
jne 0xe8330
leal -0x1(%rdx), %ecx
movl (%rsi,%rcx,4), %r8d
cmpl 0x14(%rdi), %r8d
je 0xe8332
jmp 0xe8338
movl %edx, %ecx
movl %ecx, %edx
testl %ecx, %ecx
jle 0xe83b6
movzbl %al, %r8d
movl %edx, %eax
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
movzbl 0x50(%rsp), %eax
movl %eax, 0xc(%rsp)
xorl %r12d, %r12d
testl %r13d, %r13d
js 0xe8565
movq %rsi, %rbp
movl (%rsi,%r15,4), %esi
movq %rdi, %r14
movq %r11, %rbx
movq %r11, %rdx
movl %r13d, %ecx
movl 0xc(%rsp), %r9d
callq 0x68d00
testl %eax, %eax
js 0xe8391
je 0xe8397
subl %eax, %r13d
movl %eax, %ecx
movq %rbx, %r11
addq %rcx, %r11
addl %eax, %r12d
movq %r14, %rdi
jmp 0xe839d
subl %eax, %r12d
xorl %r13d, %r13d
movq %r14, %rdi
movq %rbx, %r11
incq %r15
xorl %r8d, %r8d
cmpq %r15, 0x10(%rsp)
movq %rbp, %rsi
jne 0xe8352
jmp 0xe83b9
xorl %eax, %eax
jmp 0xe8556
xorl %r12d, %r12d
movl 0x8(%rsp), %ebp
cmpl %ebp, %r12d
jle 0xe83cd
negl %r12d
movl %r12d, %eax
jmp 0xe8556
cmpb $0x1, 0x50(%rdi)
jne 0xe854a
testl %r12d, %r12d
setne %sil
cmpl $0x2, %r12d
jl 0xe8546
movl %r12d, %edx
movq %r11, %rax
subq %rdx, %rax
xorl %ecx, %ecx
testl %r12d, %r12d
setne %cl
movl $0x1, %esi
subq %rdx, %rsi
movabsq $-0x7fffaffe00000000, %rdi # imm = 0x8000500200000000
movb (%r11,%rsi), %r8b
cmpb $0x20, -0x1(%r11,%rsi)
jne 0xe842a
movzbl %r8b, %edx
cmpl $0x3f, %edx
ja 0xe842a
movl %edx, %edx
btq %rdx, %rdi
jae 0xe842a
decl %ecx
movl %ecx, %edx
leal 0x1(%rdx), %ecx
movslq %edx, %r9
movb %r8b, (%rax,%r9)
incq %rsi
jne 0xe840b
testl %ecx, %ecx
setne %sil
testl %edx, %edx
jle 0xe8546
xorl %esi, %esi
testl %ecx, %ecx
setne %sil
movl $0x1, %edi
movslq %edi, %r9
movb (%rax,%r9), %r8b
cmpb $0x27, %r8b
jne 0xe8487
cmpl %edx, %edi
jge 0xe8487
cmpb $0x20, -0x1(%rax,%r9)
jne 0xe8487
incq %r9
cmpb $0x20, (%rax,%r9)
jne 0xe8487
decl %esi
movb $0x0, (%rax,%r9)
movl %esi, %ecx
movl %r9d, %edi
jmp 0xe8489
movl %esi, %ecx
leal 0x1(%rcx), %esi
movslq %ecx, %r9
movb %r8b, (%rax,%r9)
leal 0x1(%rdi), %r8d
cmpl %edx, %edi
movl %r8d, %edi
jl 0xe8456
xorl %r12d, %r12d
testl %esi, %esi
setne %r12b
testl %ecx, %ecx
jle 0xe854a
movl %esi, %edx
movl $0x1, %esi
subq %rdx, %rsi
movl $0x3, %edi
movb -0x2(%rax,%rdi), %r8b
cmpb $0x20, -0x3(%rax,%rdi)
jne 0xe84fb
cmpb $0x27, %r8b
jne 0xe84fb
leaq -0x1(%rdi), %r9
cmpq %rdx, %r9
jae 0xe84fb
movzbl -0x1(%rax,%rdi), %r9d
movl %r9d, %r10d
andb $-0x11, %r10b
cmpb $0x64, %r10b
je 0xe84fb
cmpl $0x73, %r9d
je 0xe84f8
cmpl $0x6d, %r9d
jne 0xe8517
decl %r12d
movslq %r12d, %r9
incl %r12d
movb %r8b, (%rax,%r9)
leaq (%rsi,%rdi), %r8
incq %r8
incq %rdi
cmpq $0x3, %r8
jne 0xe84be
jmp 0xe854a
cmpl %edi, %ecx
jl 0xe84fb
movb (%rax,%rdi), %r10b
cmpl $0x6c, %r9d
jne 0xe852b
cmpb $0x6c, %r10b
je 0xe84fb
xorb $0x65, %r10b
andb $-0x5, %r9b
xorb $0x72, %r9b
xorl %r11d, %r11d
orb %r10b, %r9b
sete %r11b
subl %r11d, %r12d
jmp 0xe84fb
movzbl %sil, %r12d
movl %r12d, %eax
negl %eax
cmpl %ebp, %r12d
cmovlel %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32020(%rip), %rdi # 0x11a58c
leaq 0x27e51(%rip), %rdx # 0x1103c4
leaq 0x326e2(%rip), %rcx # 0x11ac5c
movl $0xa34, %esi # imm = 0xA34
xorl %eax, %eax
callq 0x6af70
leaq 0x31fff(%rip), %rdi # 0x11a58c
leaq 0x27e30(%rip), %rdx # 0x1103c4
leaq 0x32539(%rip), %rcx # 0x11aad4
movl $0xa1d, %esi # imm = 0xA1D
jmp 0xe857f
| _ZNK11llama_vocab4impl10detokenizeEPKiiPcibb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp dword ptr [rdi+4], 0
jz loc_E83AF
cmp qword ptr [rdi+140h], 0
jz loc_E8586
mov r13d, r8d
mov r11, rcx
mov al, [rdi+4Ch]
test r9b, r9b
mov [rsp+48h+var_40], r8d
jz short loc_E8330
test edx, edx
jle short loc_E8314
cmp byte ptr [rdi+4Dh], 0
jz short loc_E8314
mov ecx, [rsi]
cmp ecx, [rdi+10h]
jnz short loc_E8314
dec edx
add rsi, 4
xor eax, eax
loc_E8314:
test edx, edx
setnle cl
and cl, [rdi+4Eh]
cmp cl, 1
jnz short loc_E8330
lea ecx, [rdx-1]
mov r8d, [rsi+rcx*4]
cmp r8d, [rdi+14h]
jz short loc_E8332
jmp short loc_E8338
loc_E8330:
mov ecx, edx
loc_E8332:
mov edx, ecx
test ecx, ecx
jle short loc_E83B6
loc_E8338:
movzx r8d, al; int
mov eax, edx
mov [rsp+48h+var_38], rax
xor r15d, r15d
movzx eax, [rsp+48h+arg_0]
mov dword ptr [rsp+48h+var_3C], eax
xor r12d, r12d
loc_E8352:
test r13d, r13d
js loc_E8565
mov rbp, rsi
mov esi, [rsi+r15*4]; int
mov r14, rdi
mov rbx, r11
mov rdx, r11; char *
mov ecx, r13d; int
mov r9d, dword ptr [rsp+48h+var_3C]; bool
call __ZNK11llama_vocab4impl14token_to_pieceEiPciib; llama_vocab::impl::token_to_piece(int,char *,int,int,bool)
test eax, eax
js short loc_E8391
jz short loc_E8397
sub r13d, eax
mov ecx, eax
mov r11, rbx
add r11, rcx
add r12d, eax
mov rdi, r14
jmp short loc_E839D
loc_E8391:
sub r12d, eax
xor r13d, r13d
loc_E8397:
mov rdi, r14
mov r11, rbx
loc_E839D:
inc r15
xor r8d, r8d
cmp [rsp+48h+var_38], r15
mov rsi, rbp
jnz short loc_E8352
jmp short loc_E83B9
loc_E83AF:
xor eax, eax
jmp loc_E8556
loc_E83B6:
xor r12d, r12d
loc_E83B9:
mov ebp, [rsp+48h+var_40]
cmp r12d, ebp
jle short loc_E83CD
neg r12d
mov eax, r12d
jmp loc_E8556
loc_E83CD:
cmp byte ptr [rdi+50h], 1
jnz loc_E854A
test r12d, r12d
setnz sil
cmp r12d, 2
jl loc_E8546
mov edx, r12d
mov rax, r11
sub rax, rdx
xor ecx, ecx
test r12d, r12d
setnz cl
mov esi, 1
sub rsi, rdx
mov rdi, 8000500200000000h
loc_E840B:
mov r8b, [r11+rsi]
cmp byte ptr [r11+rsi-1], 20h ; ' '
jnz short loc_E842A
movzx edx, r8b
cmp edx, 3Fh ; '?'
ja short loc_E842A
mov edx, edx
bt rdi, rdx
jnb short loc_E842A
dec ecx
loc_E842A:
mov edx, ecx
lea ecx, [rdx+1]
movsxd r9, edx
mov [rax+r9], r8b
inc rsi
jnz short loc_E840B
test ecx, ecx
setnz sil
test edx, edx
jle loc_E8546
xor esi, esi
test ecx, ecx
setnz sil
mov edi, 1
loc_E8456:
movsxd r9, edi
mov r8b, [rax+r9]
cmp r8b, 27h ; '''
jnz short loc_E8487
cmp edi, edx
jge short loc_E8487
cmp byte ptr [rax+r9-1], 20h ; ' '
jnz short loc_E8487
inc r9
cmp byte ptr [rax+r9], 20h ; ' '
jnz short loc_E8487
dec esi
mov byte ptr [rax+r9], 0
mov ecx, esi
mov edi, r9d
jmp short loc_E8489
loc_E8487:
mov ecx, esi
loc_E8489:
lea esi, [rcx+1]
movsxd r9, ecx
mov [rax+r9], r8b
lea r8d, [rdi+1]
cmp edi, edx
mov edi, r8d
jl short loc_E8456
xor r12d, r12d
test esi, esi
setnz r12b
test ecx, ecx
jle loc_E854A
mov edx, esi
mov esi, 1
sub rsi, rdx
mov edi, 3
loc_E84BE:
mov r8b, [rax+rdi-2]
cmp byte ptr [rax+rdi-3], 20h ; ' '
jnz short loc_E84FB
cmp r8b, 27h ; '''
jnz short loc_E84FB
lea r9, [rdi-1]
cmp r9, rdx
jnb short loc_E84FB
movzx r9d, byte ptr [rax+rdi-1]
mov r10d, r9d
and r10b, 0EFh
cmp r10b, 64h ; 'd'
jz short loc_E84FB
cmp r9d, 73h ; 's'
jz short loc_E84F8
cmp r9d, 6Dh ; 'm'
jnz short loc_E8517
loc_E84F8:
dec r12d
loc_E84FB:
movsxd r9, r12d
inc r12d
mov [rax+r9], r8b
lea r8, [rsi+rdi]
inc r8
inc rdi
cmp r8, 3
jnz short loc_E84BE
jmp short loc_E854A
loc_E8517:
cmp ecx, edi
jl short loc_E84FB
mov r10b, [rax+rdi]
cmp r9d, 6Ch ; 'l'
jnz short loc_E852B
cmp r10b, 6Ch ; 'l'
jz short loc_E84FB
loc_E852B:
xor r10b, 65h
and r9b, 0FBh
xor r9b, 72h
xor r11d, r11d
or r9b, r10b
setz r11b
sub r12d, r11d
jmp short loc_E84FB
loc_E8546:
movzx r12d, sil
loc_E854A:
mov eax, r12d
neg eax
cmp r12d, ebp
cmovle eax, r12d
loc_E8556:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_E8565:
lea rdi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAvail0; "avail >= 0"
mov esi, 0A34h
loc_E857F:
xor eax, eax
call _ggml_abort
loc_E8586:
lea rdi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTokenizerToken; "tokenizer && \"Tokenizer not initialize"...
mov esi, 0A1Dh
jmp short loc_E857F
| long long llama_vocab::impl::detokenize(
llama_vocab::impl *this,
const int *a2,
int a3,
char *a4,
int a5,
char a6,
bool a7)
{
int v7; // r13d
unsigned __int8 v9; // al
long long v10; // rcx
int v11; // r8d
long long v12; // r15
int v13; // r12d
char *v14; // rbx
int v15; // eax
long long result; // rax
bool v17; // si
char *v18; // rax
int v19; // ecx
long long v20; // rsi
unsigned long long v21; // rdi
unsigned __int8 v22; // r8
int v23; // edx
unsigned int v24; // esi
int v25; // edi
char v26; // r8
long long v27; // r9
int v28; // ecx
unsigned long long v30; // rdx
long long v31; // rsi
long long v32; // rdi
char v33; // r8
int v34; // r9d
long long v35; // r9
long long v36; // r8
char v37; // r10
long long v39; // [rsp+10h] [rbp-38h]
if ( !*((_DWORD *)this + 1) )
return 0LL;
if ( !*((_QWORD *)this + 40) )
{
while ( 1 )
LABEL_63:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-vocab.cpp",
2589LL,
"GGML_ASSERT(%s) failed",
"tokenizer && \"Tokenizer not initialized. Call llama_vocab::init_tokenizer() first.\"");
}
v7 = a5;
v9 = *((_BYTE *)this + 76);
if ( !a6 )
goto LABEL_11;
if ( a3 > 0 && *((_BYTE *)this + 77) && *a2 == *((_DWORD *)this + 4) )
{
--a3;
++a2;
v9 = 0;
}
if ( (*((_BYTE *)this + 78) & (a3 > 0)) == 1 )
{
v10 = (unsigned int)(a3 - 1);
if ( a2[v10] != *((_DWORD *)this + 5) )
goto LABEL_13;
}
else
{
LABEL_11:
LODWORD(v10) = a3;
}
a3 = v10;
if ( (int)v10 > 0 )
{
LABEL_13:
v11 = v9;
v39 = (unsigned int)a3;
v12 = 0LL;
v13 = 0;
while ( 1 )
{
if ( v7 < 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-vocab.cpp",
2612LL,
"GGML_ASSERT(%s) failed",
"avail >= 0");
goto LABEL_63;
}
v14 = a4;
v15 = llama_vocab::impl::token_to_piece(this, a2[v12], a4, v7, v11, a7);
if ( v15 < 0 )
break;
if ( !v15 )
goto LABEL_19;
v7 -= v15;
a4 = &v14[v15];
v13 += v15;
LABEL_20:
++v12;
v11 = 0;
if ( v39 == v12 )
goto LABEL_24;
}
v13 -= v15;
v7 = 0;
LABEL_19:
a4 = v14;
goto LABEL_20;
}
v13 = 0;
LABEL_24:
if ( v13 > a5 )
return (unsigned int)-v13;
if ( *((_BYTE *)this + 80) == 1 )
{
v17 = v13 != 0;
if ( v13 < 2 )
goto LABEL_58;
v18 = &a4[-v13];
v19 = v13 != 0;
v20 = 1LL - (unsigned int)v13;
v21 = 0x8000500200000000LL;
do
{
v22 = a4[v20];
if ( a4[v20 - 1] == 32 && v22 <= 0x3Fu && _bittest64((const long long *)&v21, v22) )
--v19;
v23 = v19++;
v18[v23] = v22;
++v20;
}
while ( v20 );
v17 = v19 != 0;
if ( v23 <= 0 )
{
LABEL_58:
v13 = v17;
}
else
{
v24 = v19 != 0;
v25 = 1;
do
{
v26 = v18[v25];
if ( v26 == 39 && v25 < v23 && v18[v25 - 1] == 32 && (v27 = v25 + 1LL, v18[v27] == 32) )
{
v18[v27] = 0;
v28 = v24 - 1;
++v25;
}
else
{
v28 = v24;
}
v24 = v28 + 1;
v18[v28] = v26;
}
while ( v25++ < v23 );
v13 = v24 != 0;
if ( v28 > 0 )
{
v30 = v24;
v31 = 1LL - v24;
v32 = 3LL;
do
{
v33 = v18[v32 - 2];
if ( v18[v32 - 3] == 32 && v33 == 39 && v32 - 1 < v30 )
{
v34 = (unsigned __int8)v18[v32 - 1];
if ( (v18[v32 - 1] & 0xEF) != 0x64 )
{
if ( v34 == 115 || v34 == 109 )
{
--v13;
}
else if ( v28 >= (int)v32 )
{
v37 = v18[v32];
if ( v34 != 108 || v37 != 108 )
v13 -= ((unsigned __int8)v37 ^ 0x65 | v34 & 0xFB ^ 0x72) == 0;
}
}
}
v35 = v13++;
v18[v35] = v33;
v36 = v31 + v32++ + 1;
}
while ( v36 != 3 );
}
}
}
result = (unsigned int)-v13;
if ( v13 <= a5 )
return (unsigned int)v13;
return result;
}
| detokenize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP dword ptr [RDI + 0x4],0x0
JZ 0x001e83af
CMP qword ptr [RDI + 0x140],0x0
JZ 0x001e8586
MOV R13D,R8D
MOV R11,RCX
MOV AL,byte ptr [RDI + 0x4c]
TEST R9B,R9B
MOV dword ptr [RSP + 0x8],R8D
JZ 0x001e8330
TEST EDX,EDX
JLE 0x001e8314
CMP byte ptr [RDI + 0x4d],0x0
JZ 0x001e8314
MOV ECX,dword ptr [RSI]
CMP ECX,dword ptr [RDI + 0x10]
JNZ 0x001e8314
DEC EDX
ADD RSI,0x4
XOR EAX,EAX
LAB_001e8314:
TEST EDX,EDX
SETG CL
AND CL,byte ptr [RDI + 0x4e]
CMP CL,0x1
JNZ 0x001e8330
LEA ECX,[RDX + -0x1]
MOV R8D,dword ptr [RSI + RCX*0x4]
CMP R8D,dword ptr [RDI + 0x14]
JZ 0x001e8332
JMP 0x001e8338
LAB_001e8330:
MOV ECX,EDX
LAB_001e8332:
MOV EDX,ECX
TEST ECX,ECX
JLE 0x001e83b6
LAB_001e8338:
MOVZX R8D,AL
MOV EAX,EDX
MOV qword ptr [RSP + 0x10],RAX
XOR R15D,R15D
MOVZX EAX,byte ptr [RSP + 0x50]
MOV dword ptr [RSP + 0xc],EAX
XOR R12D,R12D
LAB_001e8352:
TEST R13D,R13D
JS 0x001e8565
MOV RBP,RSI
MOV ESI,dword ptr [RSI + R15*0x4]
MOV R14,RDI
MOV RBX,R11
MOV RDX,R11
MOV ECX,R13D
MOV R9D,dword ptr [RSP + 0xc]
CALL 0x00168d00
TEST EAX,EAX
JS 0x001e8391
JZ 0x001e8397
SUB R13D,EAX
MOV ECX,EAX
MOV R11,RBX
ADD R11,RCX
ADD R12D,EAX
MOV RDI,R14
JMP 0x001e839d
LAB_001e8391:
SUB R12D,EAX
XOR R13D,R13D
LAB_001e8397:
MOV RDI,R14
MOV R11,RBX
LAB_001e839d:
INC R15
XOR R8D,R8D
CMP qword ptr [RSP + 0x10],R15
MOV RSI,RBP
JNZ 0x001e8352
JMP 0x001e83b9
LAB_001e83af:
XOR EAX,EAX
JMP 0x001e8556
LAB_001e83b6:
XOR R12D,R12D
LAB_001e83b9:
MOV EBP,dword ptr [RSP + 0x8]
CMP R12D,EBP
JLE 0x001e83cd
NEG R12D
MOV EAX,R12D
JMP 0x001e8556
LAB_001e83cd:
CMP byte ptr [RDI + 0x50],0x1
JNZ 0x001e854a
TEST R12D,R12D
SETNZ SIL
CMP R12D,0x2
JL 0x001e8546
MOV EDX,R12D
MOV RAX,R11
SUB RAX,RDX
XOR ECX,ECX
TEST R12D,R12D
SETNZ CL
MOV ESI,0x1
SUB RSI,RDX
MOV RDI,-0x7fffaffe00000000
LAB_001e840b:
MOV R8B,byte ptr [R11 + RSI*0x1]
CMP byte ptr [R11 + RSI*0x1 + -0x1],0x20
JNZ 0x001e842a
MOVZX EDX,R8B
CMP EDX,0x3f
JA 0x001e842a
MOV EDX,EDX
BT RDI,RDX
JNC 0x001e842a
DEC ECX
LAB_001e842a:
MOV EDX,ECX
LEA ECX,[RDX + 0x1]
MOVSXD R9,EDX
MOV byte ptr [RAX + R9*0x1],R8B
INC RSI
JNZ 0x001e840b
TEST ECX,ECX
SETNZ SIL
TEST EDX,EDX
JLE 0x001e8546
XOR ESI,ESI
TEST ECX,ECX
SETNZ SIL
MOV EDI,0x1
LAB_001e8456:
MOVSXD R9,EDI
MOV R8B,byte ptr [RAX + R9*0x1]
CMP R8B,0x27
JNZ 0x001e8487
CMP EDI,EDX
JGE 0x001e8487
CMP byte ptr [RAX + R9*0x1 + -0x1],0x20
JNZ 0x001e8487
INC R9
CMP byte ptr [RAX + R9*0x1],0x20
JNZ 0x001e8487
DEC ESI
MOV byte ptr [RAX + R9*0x1],0x0
MOV ECX,ESI
MOV EDI,R9D
JMP 0x001e8489
LAB_001e8487:
MOV ECX,ESI
LAB_001e8489:
LEA ESI,[RCX + 0x1]
MOVSXD R9,ECX
MOV byte ptr [RAX + R9*0x1],R8B
LEA R8D,[RDI + 0x1]
CMP EDI,EDX
MOV EDI,R8D
JL 0x001e8456
XOR R12D,R12D
TEST ESI,ESI
SETNZ R12B
TEST ECX,ECX
JLE 0x001e854a
MOV EDX,ESI
MOV ESI,0x1
SUB RSI,RDX
MOV EDI,0x3
LAB_001e84be:
MOV R8B,byte ptr [RAX + RDI*0x1 + -0x2]
CMP byte ptr [RAX + RDI*0x1 + -0x3],0x20
JNZ 0x001e84fb
CMP R8B,0x27
JNZ 0x001e84fb
LEA R9,[RDI + -0x1]
CMP R9,RDX
JNC 0x001e84fb
MOVZX R9D,byte ptr [RAX + RDI*0x1 + -0x1]
MOV R10D,R9D
AND R10B,0xef
CMP R10B,0x64
JZ 0x001e84fb
CMP R9D,0x73
JZ 0x001e84f8
CMP R9D,0x6d
JNZ 0x001e8517
LAB_001e84f8:
DEC R12D
LAB_001e84fb:
MOVSXD R9,R12D
INC R12D
MOV byte ptr [RAX + R9*0x1],R8B
LEA R8,[RSI + RDI*0x1]
INC R8
INC RDI
CMP R8,0x3
JNZ 0x001e84be
JMP 0x001e854a
LAB_001e8517:
CMP ECX,EDI
JL 0x001e84fb
MOV R10B,byte ptr [RAX + RDI*0x1]
CMP R9D,0x6c
JNZ 0x001e852b
CMP R10B,0x6c
JZ 0x001e84fb
LAB_001e852b:
XOR R10B,0x65
AND R9B,0xfb
XOR R9B,0x72
XOR R11D,R11D
OR R9B,R10B
SETZ R11B
SUB R12D,R11D
JMP 0x001e84fb
LAB_001e8546:
MOVZX R12D,SIL
LAB_001e854a:
MOV EAX,R12D
NEG EAX
CMP R12D,EBP
CMOVLE EAX,R12D
LAB_001e8556:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001e8565:
LEA RDI,[0x21a58c]
LEA RDX,[0x2103c4]
LEA RCX,[0x21ac5c]
MOV ESI,0xa34
LAB_001e857f:
XOR EAX,EAX
CALL 0x0016af70
LAB_001e8586:
LEA RDI,[0x21a58c]
LEA RDX,[0x2103c4]
LEA RCX,[0x21aad4]
MOV ESI,0xa1d
JMP 0x001e857f
|
/* llama_vocab::impl::detokenize(int const*, int, char*, int, bool, bool) const */
ulong __thiscall
llama_vocab::impl::detokenize
(impl *this,int *param_1,int param_2,char *param_3,int param_4,bool param_5,bool param_6)
{
long lVar1;
byte bVar2;
char cVar3;
impl iVar4;
uint uVar5;
ulong uVar6;
uint uVar7;
char *pcVar8;
int iVar9;
long lVar10;
ulong uVar11;
int8 uVar12;
int iVar13;
int iVar14;
ulong uVar15;
if (*(int *)(this + 4) == 0) {
return 0;
}
if (*(long *)(this + 0x140) == 0) {
pcVar8 = "tokenizer && \"Tokenizer not initialized. Call llama_vocab::init_tokenizer() first.\""
;
uVar12 = 0xa1d;
LAB_001e857f:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-vocab.cpp",
uVar12,"GGML_ASSERT(%s) failed",pcVar8);
}
iVar4 = this[0x4c];
uVar5 = param_2;
if (param_5) {
if (((0 < param_2) && (this[0x4d] != (impl)0x0)) && (*param_1 == *(int *)(this + 0x10))) {
param_2 = param_2 - 1;
param_1 = param_1 + 1;
iVar4 = (impl)0x0;
}
uVar5 = param_2;
if (((0 < param_2 & (byte)this[0x4e]) != 1) ||
(uVar5 = param_2 - 1U, param_1[param_2 - 1U] == *(int *)(this + 0x14))) goto LAB_001e8332;
LAB_001e8338:
uVar5 = (uint)(byte)iVar4;
uVar15 = 0;
uVar6 = 0;
iVar14 = param_4;
do {
if (iVar14 < 0) {
pcVar8 = "avail >= 0";
uVar12 = 0xa34;
goto LAB_001e857f;
}
uVar5 = token_to_piece(this,param_1[uVar15],param_3,iVar14,uVar5,param_6);
if ((int)uVar5 < 0) {
uVar6 = (ulong)((int)uVar6 - uVar5);
iVar14 = 0;
}
else if (uVar5 != 0) {
iVar14 = iVar14 - uVar5;
param_3 = param_3 + uVar5;
uVar6 = (ulong)((int)uVar6 + uVar5);
}
uVar15 = uVar15 + 1;
uVar5 = 0;
} while ((uint)param_2 != uVar15);
}
else {
LAB_001e8332:
param_2 = uVar5;
if (0 < param_2) goto LAB_001e8338;
uVar6 = 0;
}
uVar5 = (uint)uVar6;
if (param_4 < (int)uVar5) {
return (ulong)-uVar5;
}
uVar15 = uVar6;
if (this[0x50] == (impl)0x1) {
if (1 < (int)uVar5) {
lVar10 = 1 - uVar6;
uVar5 = (uint)(uVar5 != 0);
do {
uVar7 = uVar5;
bVar2 = param_3[lVar10];
if (((param_3[lVar10 + -1] == ' ') && (bVar2 < 0x40)) &&
((0x8000500200000000U >> ((ulong)(uint)bVar2 & 0x3f) & 1) != 0)) {
uVar7 = uVar7 - 1;
}
uVar5 = uVar7 + 1;
param_3[(long)(int)uVar7 - uVar6] = bVar2;
lVar10 = lVar10 + 1;
} while (lVar10 != 0);
if (0 < (int)uVar7) {
uVar11 = (ulong)(uVar5 != 0);
iVar14 = 1;
do {
lVar10 = (long)iVar14;
cVar3 = param_3[lVar10 - uVar6];
iVar9 = (int)uVar11;
iVar13 = iVar14;
if ((((cVar3 == '\'') && (iVar14 < (int)uVar7)) && (param_3[lVar10 + (-1 - uVar6)] == ' ')
) && (lVar10 = lVar10 + 1, param_3[lVar10 - uVar6] == ' ')) {
iVar9 = iVar9 + -1;
param_3[lVar10 - uVar6] = '\0';
iVar13 = (int)lVar10;
}
uVar11 = (ulong)(iVar9 + 1U);
param_3[(long)iVar9 - uVar6] = cVar3;
iVar14 = iVar13 + 1;
} while (iVar13 < (int)uVar7);
uVar15 = (ulong)(iVar9 + 1U != 0);
if (0 < iVar9) {
lVar10 = 3;
do {
iVar14 = (int)uVar15;
if (((param_3[lVar10 + (-3 - uVar6)] == ' ') && (param_3[lVar10 + (-2 - uVar6)] == '\'')
) && ((lVar10 - 1U < uVar11 &&
(bVar2 = param_3[lVar10 + (-1 - uVar6)], (bVar2 & 0xef) != 100)))) {
if ((bVar2 == 0x73) || (bVar2 == 0x6d)) {
iVar14 = iVar14 + -1;
}
else if (((int)lVar10 <= iVar9) &&
((bVar2 != 0x6c || (param_3[lVar10 - uVar6] != 'l')))) {
iVar14 = iVar14 - (uint)((bVar2 & 0xfb) == 0x72 && param_3[lVar10 - uVar6] == 'e');
}
}
uVar15 = (ulong)(iVar14 + 1);
param_3[(long)iVar14 - uVar6] = param_3[lVar10 + (-2 - uVar6)];
lVar1 = lVar10 - uVar11;
lVar10 = lVar10 + 1;
} while (lVar1 != 1);
}
goto LAB_001e854a;
}
}
uVar15 = (ulong)(uVar5 != 0);
}
LAB_001e854a:
uVar6 = (ulong)(uint)-(int)uVar15;
if ((int)uVar15 <= param_4) {
uVar6 = uVar15;
}
return uVar6;
}
|
|
5,974 | server_game::fixed_update() | untodesu[P]voxelius/game/server/game.cc | void server_game::fixed_update(void)
{
// FIXME: threading
for(auto dimension : globals::dimensions) {
CollisionComponent::fixed_update(dimension.second);
VelocityComponent::fixed_update(dimension.second);
TransformComponent::fixed_update(dimension.second);
GravityComponent::fixed_update(dimension.second);
StasisComponent::fixed_update(dimension.second);
}
} | O0 | cpp | server_game::fixed_update():
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x2acef1(%rip), %rax # 0x2d1270
movq %rax, -0x8(%rbp)
leaq 0x2acee6(%rip), %rdi # 0x2d1270
callq 0x24870
movq %rax, -0x10(%rbp)
leaq 0x2aced6(%rip), %rdi # 0x2d1270
callq 0x248a0
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x248d0
testb $0x1, %al
jne 0x243b6
jmp 0x2442d
leaq -0x10(%rbp), %rdi
callq 0x24900
movq %rax, %rsi
leaq -0x40(%rbp), %rdi
callq 0x24930
movq -0x20(%rbp), %rdi
callq 0x92160
jmp 0x243d6
movq -0x20(%rbp), %rdi
callq 0xe1f10
jmp 0x243e1
movq -0x20(%rbp), %rdi
callq 0xe1c90
jmp 0x243ec
movq -0x20(%rbp), %rdi
callq 0xaf5a0
jmp 0x243f7
movq -0x20(%rbp), %rdi
callq 0xd40a0
jmp 0x24402
leaq -0x40(%rbp), %rdi
callq 0x24970
leaq -0x10(%rbp), %rdi
callq 0x24990
jmp 0x243a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x24970
jmp 0x24433
addq $0x50, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x1aff0
nopl (%rax)
| _ZN11server_game12fixed_updateEv:
push rbp
mov rbp, rsp
sub rsp, 50h
lea rax, _ZN7globals10dimensionsB5cxx11E; globals::dimensions
mov [rbp+var_8], rax
lea rdi, _ZN7globals10dimensionsB5cxx11E; globals::dimensions
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9DimensionSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE5beginEv; std::unordered_map<std::string,Dimension *>::begin(void)
mov [rbp+var_10], rax
lea rdi, _ZN7globals10dimensionsB5cxx11E; globals::dimensions
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9DimensionSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE3endEv; std::unordered_map<std::string,Dimension *>::end(void)
mov [rbp+var_18], rax
loc_243A3:
lea rdi, [rbp+var_10]
lea rsi, [rbp+var_18]
call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9DimensionELb1EEESE_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<std::string const,Dimension *>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,Dimension *>,true> const&)
test al, 1
jnz short loc_243B6
jmp short loc_2442D
loc_243B6:
lea rdi, [rbp+var_10]
call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9DimensionELb0ELb1EEdeEv; std::__detail::_Node_iterator<std::pair<std::string const,Dimension *>,false,true>::operator*(void)
mov rsi, rax; Dimension *
lea rdi, [rbp+var_40]
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9DimensionEC2ERKS9_; std::pair<std::string const,Dimension *>::pair(std::pair<std::string const,Dimension *> const&)
mov rdi, [rbp+var_20]; this
call _ZN18CollisionComponent12fixed_updateEP9Dimension; CollisionComponent::fixed_update(Dimension *)
jmp short $+2
loc_243D6:
mov rdi, [rbp+var_20]; this
call _ZN17VelocityComponent12fixed_updateEP9Dimension; VelocityComponent::fixed_update(Dimension *)
jmp short $+2
loc_243E1:
mov rdi, [rbp+var_20]; this
call _ZN18TransformComponent12fixed_updateEP9Dimension; TransformComponent::fixed_update(Dimension *)
jmp short $+2
loc_243EC:
mov rdi, [rbp+var_20]; this
call _ZN16GravityComponent12fixed_updateEP9Dimension; GravityComponent::fixed_update(Dimension *)
jmp short $+2
loc_243F7:
mov rdi, [rbp+var_20]; this
call _ZN15StasisComponent12fixed_updateEP9Dimension; StasisComponent::fixed_update(Dimension *)
jmp short $+2
loc_24402:
lea rdi, [rbp+var_40]
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9DimensionED2Ev; std::pair<std::string const,Dimension *>::~pair()
lea rdi, [rbp+var_10]
call _ZNSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9DimensionELb0ELb1EEppEv; std::__detail::_Node_iterator<std::pair<std::string const,Dimension *>,false,true>::operator++(void)
jmp short loc_243A3
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_40]
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9DimensionED2Ev; std::pair<std::string const,Dimension *>::~pair()
jmp short loc_24433
loc_2442D:
add rsp, 50h
pop rbp
retn
loc_24433:
mov rdi, [rbp+var_48]
call __Unwind_Resume
| long long server_game::fixed_update(server_game *this)
{
long long result; // rax
Dimension *v2; // rsi
_BYTE v3[32]; // [rsp+10h] [rbp-40h] BYREF
TransformComponent *v4; // [rsp+30h] [rbp-20h]
long long v5; // [rsp+38h] [rbp-18h] BYREF
_QWORD v6[2]; // [rsp+40h] [rbp-10h] BYREF
v6[1] = &globals::dimensions[abi:cxx11];
v6[0] = std::unordered_map<std::string,Dimension *>::begin(&globals::dimensions[abi:cxx11]);
v5 = std::unordered_map<std::string,Dimension *>::end(&globals::dimensions[abi:cxx11]);
while ( 1 )
{
result = std::__detail::operator!=(v6, &v5);
if ( (result & 1) == 0 )
break;
v2 = (Dimension *)std::__detail::_Node_iterator<std::pair<std::string const,Dimension *>,false,true>::operator*(v6);
std::pair<std::string const,Dimension *>::pair(v3, v2);
CollisionComponent::fixed_update(v4, v2);
VelocityComponent::fixed_update(v4, v2);
TransformComponent::fixed_update(v4, v2);
GravityComponent::fixed_update(v4, v2);
StasisComponent::fixed_update(v4, v2);
std::pair<std::string const,Dimension *>::~pair(v3);
std::__detail::_Node_iterator<std::pair<std::string const,Dimension *>,false,true>::operator++(v6);
}
return result;
}
| fixed_update:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
LEA RAX,[0x3d1270]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[0x3d1270]
CALL 0x00124870
MOV qword ptr [RBP + -0x10],RAX
LEA RDI,[0x3d1270]
CALL 0x001248a0
MOV qword ptr [RBP + -0x18],RAX
LAB_001243a3:
LEA RDI,[RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL 0x001248d0
TEST AL,0x1
JNZ 0x001243b6
JMP 0x0012442d
LAB_001243b6:
LEA RDI,[RBP + -0x10]
CALL 0x00124900
MOV RSI,RAX
LEA RDI,[RBP + -0x40]
CALL 0x00124930
MOV RDI,qword ptr [RBP + -0x20]
LAB_001243cf:
CALL 0x00192160
JMP 0x001243d6
LAB_001243d6:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001e1f10
JMP 0x001243e1
LAB_001243e1:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001e1c90
JMP 0x001243ec
LAB_001243ec:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001af5a0
JMP 0x001243f7
LAB_001243f7:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001d40a0
LAB_00124400:
JMP 0x00124402
LAB_00124402:
LEA RDI,[RBP + -0x40]
CALL 0x00124970
LEA RDI,[RBP + -0x10]
CALL 0x00124990
JMP 0x001243a3
LAB_0012442d:
ADD RSP,0x50
POP RBP
RET
|
/* server_game::fixed_update() */
void server_game::fixed_update(void)
{
ulong uVar1;
pair *ppVar2;
pair<std::__cxx11::string_const,Dimension*> local_48 [32];
Dimension *local_28;
int8 local_20;
int8 local_18;
int1 *local_10;
local_10 = globals::dimensions_abi_cxx11_;
local_18 = std::
unordered_map<std::__cxx11::string,Dimension*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,Dimension*>>>
::begin((unordered_map<std::__cxx11::string,Dimension*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,Dimension*>>>
*)globals::dimensions_abi_cxx11_);
local_20 = std::
unordered_map<std::__cxx11::string,Dimension*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,Dimension*>>>
::end();
while( true ) {
uVar1 = std::__detail::operator!=
((_Node_iterator_base *)&local_18,(_Node_iterator_base *)&local_20);
if ((uVar1 & 1) == 0) break;
ppVar2 = (pair *)std::__detail::
_Node_iterator<std::pair<std::__cxx11::string_const,Dimension*>,false,true>::
operator*((_Node_iterator<std::pair<std::__cxx11::string_const,Dimension*>,false,true>
*)&local_18);
std::pair<std::__cxx11::string_const,Dimension*>::pair(local_48,ppVar2);
/* try { // try from 001243cf to 001243ff has its CatchHandler @ 00124416 */
CollisionComponent::fixed_update(local_28);
VelocityComponent::fixed_update(local_28);
TransformComponent::fixed_update(local_28);
GravityComponent::fixed_update(local_28);
StasisComponent::fixed_update(local_28);
std::pair<std::__cxx11::string_const,Dimension*>::~pair(local_48);
std::__detail::_Node_iterator<std::pair<std::__cxx11::string_const,Dimension*>,false,true>::
operator++((_Node_iterator<std::pair<std::__cxx11::string_const,Dimension*>,false,true> *)
&local_18);
}
return;
}
|
|
5,975 | bitmap_is_subset | eloqsql/mysys/my_bitmap.c | my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2)
{
my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end;
DBUG_ASSERT(map1->bitmap && map2->bitmap);
DBUG_ASSERT(map1->n_bits==map2->n_bits);
end= map1->last_word_ptr;
while (m1 < end)
{
if ((*m1++) & ~(*m2++))
return 0;
}
/* here both maps have the same number of bits - see assert above */
return ((*m1 & ~*m2 & ~map1->last_word_mask) ? 0 : 1);
} | O3 | c | bitmap_is_subset:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
movq (%rsi), %rcx
cmpq %rdx, %rax
jae 0x801fa
leaq 0x4(%rax), %rsi
movl (%rcx), %r8d
addq $0x4, %rcx
notl %r8d
testl %r8d, (%rax)
movq %rsi, %rax
je 0x801db
xorl %eax, %eax
jmp 0x80206
movl 0x18(%rdi), %edx
orl (%rcx), %edx
notl %edx
testl %edx, (%rax)
sete %al
popq %rbp
retq
| bitmap_is_subset:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov rdx, [rdi+8]
mov rcx, [rsi]
loc_801DB:
cmp rax, rdx
jnb short loc_801FA
lea rsi, [rax+4]
mov r8d, [rcx]
add rcx, 4
not r8d
test [rax], r8d
mov rax, rsi
jz short loc_801DB
xor eax, eax
jmp short loc_80206
loc_801FA:
mov edx, [rdi+18h]
or edx, [rcx]
not edx
test [rax], edx
setz al
loc_80206:
pop rbp
retn
| bool bitmap_is_subset(long long a1, int **a2)
{
_DWORD *v2; // rax
int *v3; // rcx
int v4; // r8d
v2 = *(_DWORD **)a1;
v3 = *a2;
while ( (unsigned long long)v2 < *(_QWORD *)(a1 + 8) )
{
v4 = *v3++;
if ( (~v4 & *v2++) != 0 )
return 0;
}
return (~(*v3 | *(_DWORD *)(a1 + 24)) & *v2) == 0;
}
| bitmap_is_subset:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RSI]
LAB_001801db:
CMP RAX,RDX
JNC 0x001801fa
LEA RSI,[RAX + 0x4]
MOV R8D,dword ptr [RCX]
ADD RCX,0x4
NOT R8D
TEST dword ptr [RAX],R8D
MOV RAX,RSI
JZ 0x001801db
XOR EAX,EAX
JMP 0x00180206
LAB_001801fa:
MOV EDX,dword ptr [RDI + 0x18]
OR EDX,dword ptr [RCX]
NOT EDX
TEST dword ptr [RAX],EDX
SETZ AL
LAB_00180206:
POP RBP
RET
|
int8 bitmap_is_subset(int8 *param_1,int8 *param_2)
{
uint uVar1;
uint uVar2;
uint *puVar3;
uint *puVar4;
puVar4 = (uint *)*param_2;
puVar3 = (uint *)*param_1;
do {
if ((uint *)param_1[1] <= puVar3) {
return CONCAT71((int7)((ulong)puVar3 >> 8),
(*puVar3 & ~(*(uint *)(param_1 + 3) | *puVar4)) == 0);
}
uVar1 = *puVar4;
puVar4 = puVar4 + 1;
uVar2 = *puVar3;
puVar3 = puVar3 + 1;
} while ((uVar2 & ~uVar1) == 0);
return 0;
}
|
|
5,976 | process_dbl_arg | eloqsql/strings/my_vsnprintf.c | static char *process_dbl_arg(char *to, char *end, size_t width,
double par, char arg_type)
{
if (width == MAX_WIDTH)
width= FLT_DIG; /* width not set, use default */
else if (width >= FLOATING_POINT_DECIMALS)
width= FLOATING_POINT_DECIMALS - 1; /* max.precision for my_fcvt() */
width= MY_MIN(width, (size_t)(end-to) - 1);
if (arg_type == 'f')
to+= my_fcvt(par, (int)width , to, NULL);
else
to+= my_gcvt(par, MY_GCVT_ARG_DOUBLE, (int) width , to, NULL);
return to;
} | O0 | c | process_dbl_arg:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movb %al, -0x21(%rbp)
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jne 0x85e82
movq $0x6, -0x18(%rbp)
jmp 0x85e93
cmpq $0x1f, -0x18(%rbp)
jb 0x85e91
movq $0x1e, -0x18(%rbp)
jmp 0x85e93
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
subq %rdx, %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x85eb5
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x85ec8
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0x66, %eax
jne 0x85efb
movsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl %eax, %edi
movq -0x8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x7df30
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x85f20
movsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl %eax, %esi
movq -0x8(%rbp), %rdx
movl $0x1, %edi
xorl %eax, %eax
movl %eax, %ecx
callq 0x7f970
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| process_dbl_arg:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
movsd [rbp+var_20], xmm0
mov [rbp+var_21], al
cmp [rbp+var_18], 0FFFFh
jnz short loc_85E82
mov [rbp+var_18], 6
jmp short loc_85E93
loc_85E82:
cmp [rbp+var_18], 1Fh
jb short loc_85E91
mov [rbp+var_18], 1Eh
loc_85E91:
jmp short $+2
loc_85E93:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rdx, [rbp+var_8]
sub rcx, rdx
sub rcx, 1
cmp rax, rcx
jnb short loc_85EB5
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
jmp short loc_85EC8
loc_85EB5:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
sub rax, rcx
sub rax, 1
mov [rbp+var_30], rax
loc_85EC8:
mov rax, [rbp+var_30]
mov [rbp+var_18], rax
movsx eax, [rbp+var_21]
cmp eax, 66h ; 'f'
jnz short loc_85EFB
movsd xmm0, [rbp+var_20]
mov rax, [rbp+var_18]
mov edi, eax
mov rsi, [rbp+var_8]
xor eax, eax
mov edx, eax
call my_fcvt
add rax, [rbp+var_8]
mov [rbp+var_8], rax
jmp short loc_85F20
loc_85EFB:
movsd xmm0, [rbp+var_20]
mov rax, [rbp+var_18]
mov esi, eax
mov rdx, [rbp+var_8]
mov edi, 1
xor eax, eax
mov ecx, eax
call my_gcvt
add rax, [rbp+var_8]
mov [rbp+var_8], rax
loc_85F20:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| _BYTE * process_dbl_arg(_BYTE *a1, long long a2, unsigned long long a3, char a4, double a5)
{
int v6; // [rsp+0h] [rbp-30h]
unsigned long long v7; // [rsp+18h] [rbp-18h]
v7 = a3;
if ( a3 == 0xFFFF )
{
v7 = 6LL;
}
else if ( a3 >= 0x1F )
{
v7 = 30LL;
}
if ( v7 >= a2 - (long long)a1 - 1 )
v6 = a2 - (_DWORD)a1 - 1;
else
v6 = v7;
if ( a4 == 102 )
return &a1[my_fcvt(v6, a1, 0LL, a5)];
else
return &a1[my_gcvt(1, v6, a1, 0LL, a5)];
}
| process_dbl_arg:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOVSD qword ptr [RBP + -0x20],XMM0
MOV byte ptr [RBP + -0x21],AL
CMP qword ptr [RBP + -0x18],0xffff
JNZ 0x00185e82
MOV qword ptr [RBP + -0x18],0x6
JMP 0x00185e93
LAB_00185e82:
CMP qword ptr [RBP + -0x18],0x1f
JC 0x00185e91
MOV qword ptr [RBP + -0x18],0x1e
LAB_00185e91:
JMP 0x00185e93
LAB_00185e93:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
SUB RCX,RDX
SUB RCX,0x1
CMP RAX,RCX
JNC 0x00185eb5
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00185ec8
LAB_00185eb5:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
SUB RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_00185ec8:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x18],RAX
MOVSX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x66
JNZ 0x00185efb
MOVSD XMM0,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0017df30
ADD RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00185f20
LAB_00185efb:
MOVSD XMM0,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x8]
MOV EDI,0x1
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0017f970
ADD RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x8],RAX
LAB_00185f20:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long process_dbl_arg(int8 param_1,long param_2,long param_3,ulong param_4,char param_5)
{
int8 local_38;
int8 local_20;
int8 local_10;
if (param_4 == 0xffff) {
local_20 = 6;
}
else {
local_20 = param_4;
if (0x1e < param_4) {
local_20 = 0x1e;
}
}
if (local_20 < (param_3 - param_2) - 1U) {
local_38 = local_20;
}
else {
local_38 = (param_3 - param_2) - 1;
}
if (param_5 == 'f') {
local_10 = my_fcvt(param_1,local_38 & 0xffffffff,param_2,0);
}
else {
local_10 = my_gcvt(param_1,1,local_38 & 0xffffffff,param_2,0);
}
local_10 = local_10 + param_2;
return local_10;
}
|
|
5,977 | string_buffer_realloc | bluesky950520[P]quickjs/quickjs.c | static no_inline int string_buffer_realloc(StringBuffer *s, int new_len, int c)
{
JSString *new_str;
int new_size;
size_t new_size_bytes, slack;
if (s->error_status)
return -1;
if (new_len > JS_STRING_LEN_MAX) {
JS_ThrowRangeError(s->ctx, "invalid string length");
return string_buffer_set_error(s);
}
new_size = min_int(max_int(new_len, s->size * 3 / 2), JS_STRING_LEN_MAX);
if (!s->is_wide_char && c >= 0x100) {
return string_buffer_widen(s, new_size);
}
new_size_bytes = sizeof(JSString) + (new_size << s->is_wide_char) + 1 - s->is_wide_char;
new_str = js_realloc2(s->ctx, s->str, new_size_bytes, &slack);
if (!new_str)
return string_buffer_set_error(s);
new_size = min_int(new_size + (slack >> s->is_wide_char), JS_STRING_LEN_MAX);
s->size = new_size;
s->str = new_str;
return 0;
} | O0 | c | string_buffer_realloc:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movl %edx, 0x30(%rsp)
movq 0x38(%rsp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x75fe9
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x76130
cmpl $0x3fffffff, 0x34(%rsp) # imm = 0x3FFFFFFF
jle 0x76025
movq 0x38(%rsp), %rax
movq (%rax), %rdi
leaq 0x9dbcc(%rip), %rsi # 0x113bce
movb $0x0, %al
callq 0x2f960
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x76140
movl %eax, 0x44(%rsp)
jmp 0x76130
movl 0x34(%rsp), %edi
movq 0x38(%rsp), %rax
imull $0x3, 0x14(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
callq 0x63600
movl %eax, %edi
movl $0x3fffffff, %esi # imm = 0x3FFFFFFF
callq 0x56ff0
movl %eax, 0x24(%rsp)
movq 0x38(%rsp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x7607d
cmpl $0x100, 0x30(%rsp) # imm = 0x100
jl 0x7607d
movq 0x38(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x76190
movl %eax, 0x44(%rsp)
jmp 0x76130
movl 0x24(%rsp), %eax
movq 0x38(%rsp), %rcx
movl 0x18(%rcx), %ecx
shll %cl, %eax
cltq
addq $0x18, %rax
addq $0x1, %rax
movq 0x38(%rsp), %rcx
movslq 0x18(%rcx), %rcx
subq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x18(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x28170
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x760e3
movq 0x38(%rsp), %rdi
callq 0x76140
movl %eax, 0x44(%rsp)
jmp 0x76130
movslq 0x24(%rsp), %rax
movq 0x10(%rsp), %rdx
movq 0x38(%rsp), %rcx
movl 0x18(%rcx), %ecx
shrq %cl, %rdx
movq %rdx, %rcx
addq %rcx, %rax
movl %eax, %edi
movl $0x3fffffff, %esi # imm = 0x3FFFFFFF
callq 0x56ff0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x14(%rax)
movq 0x28(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
| string_buffer_realloc:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_14], esi
mov [rsp+48h+var_18], edx
mov rax, [rsp+48h+var_10]
cmp dword ptr [rax+1Ch], 0
jz short loc_75FE9
mov [rsp+48h+var_4], 0FFFFFFFFh
jmp loc_76130
loc_75FE9:
cmp [rsp+48h+var_14], 3FFFFFFFh
jle short loc_76025
mov rax, [rsp+48h+var_10]
mov rdi, [rax]
lea rsi, aInvalidStringL; "invalid string length"
mov al, 0
call JS_ThrowRangeError
mov [rsp+48h+var_48], rax
mov [rsp+48h+var_40], rdx
mov rdi, [rsp+48h+var_10]
call string_buffer_set_error
mov [rsp+48h+var_4], eax
jmp loc_76130
loc_76025:
mov edi, [rsp+48h+var_14]
mov rax, [rsp+48h+var_10]
imul eax, [rax+14h], 3
mov ecx, 2
cdq
idiv ecx
mov esi, eax
call max_int_1
mov edi, eax
mov esi, 3FFFFFFFh
call min_int_1
mov [rsp+48h+var_24], eax
mov rax, [rsp+48h+var_10]
cmp dword ptr [rax+18h], 0
jnz short loc_7607D
cmp [rsp+48h+var_18], 100h
jl short loc_7607D
mov rdi, [rsp+48h+var_10]
mov esi, [rsp+48h+var_24]
call string_buffer_widen
mov [rsp+48h+var_4], eax
jmp loc_76130
loc_7607D:
mov eax, [rsp+48h+var_24]
mov rcx, [rsp+48h+var_10]
mov ecx, [rcx+18h]
shl eax, cl
cdqe
add rax, 18h
add rax, 1
mov rcx, [rsp+48h+var_10]
movsxd rcx, dword ptr [rcx+18h]
sub rax, rcx
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_10]
mov rdi, [rax]
mov rax, [rsp+48h+var_10]
mov rsi, [rax+8]
mov rdx, [rsp+48h+var_30]
lea rcx, [rsp+48h+var_38]
call js_realloc2
mov [rsp+48h+var_20], rax
cmp [rsp+48h+var_20], 0
jnz short loc_760E3
mov rdi, [rsp+48h+var_10]
call string_buffer_set_error
mov [rsp+48h+var_4], eax
jmp short loc_76130
loc_760E3:
movsxd rax, [rsp+48h+var_24]
mov rdx, [rsp+48h+var_38]
mov rcx, [rsp+48h+var_10]
mov ecx, [rcx+18h]
shr rdx, cl
mov rcx, rdx
add rax, rcx
mov edi, eax
mov esi, 3FFFFFFFh
call min_int_1
mov [rsp+48h+var_24], eax
mov ecx, [rsp+48h+var_24]
mov rax, [rsp+48h+var_10]
mov [rax+14h], ecx
mov rcx, [rsp+48h+var_20]
mov rax, [rsp+48h+var_10]
mov [rax+8], rcx
mov [rsp+48h+var_4], 0
loc_76130:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
| long long string_buffer_realloc(
long long a1,
signed int 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)
{
unsigned int v14; // eax
char v16; // [rsp+0h] [rbp-48h]
unsigned long long v17; // [rsp+10h] [rbp-38h] BYREF
unsigned long long v18; // [rsp+18h] [rbp-30h]
unsigned int v19; // [rsp+24h] [rbp-24h]
long long v20; // [rsp+28h] [rbp-20h]
int v21; // [rsp+30h] [rbp-18h]
signed int v22; // [rsp+34h] [rbp-14h]
long long v23; // [rsp+38h] [rbp-10h]
v23 = a1;
v22 = a2;
v21 = a3;
if ( *(_DWORD *)(a1 + 28) )
{
return (unsigned int)-1;
}
else if ( v22 <= 0x3FFFFFFF )
{
v14 = max_int_1(v22, 3 * *(_DWORD *)(v23 + 20) / 2);
v19 = min_int_1(v14, 0x3FFFFFFFu);
if ( *(_DWORD *)(v23 + 24) || v21 < 256 )
{
v18 = (int)(v19 << *(_DWORD *)(v23 + 24)) + 25LL - *(int *)(v23 + 24);
v20 = js_realloc2(*(_QWORD *)v23, *(_QWORD *)(v23 + 8), v18, &v17);
if ( v20 )
{
v19 = min_int_1((unsigned int)(v17 >> *(_DWORD *)(v23 + 24)) + v19, 0x3FFFFFFFu);
*(_DWORD *)(v23 + 20) = v19;
*(_QWORD *)(v23 + 8) = v20;
return 0;
}
else
{
return (unsigned int)string_buffer_set_error(v23);
}
}
else
{
return (unsigned int)string_buffer_widen(v23, v19);
}
}
else
{
JS_ThrowRangeError(
*(_QWORD *)v23,
(long long)"invalid string length",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v16);
return (unsigned int)string_buffer_set_error(v23);
}
}
| string_buffer_realloc:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV dword ptr [RSP + 0x34],ESI
MOV dword ptr [RSP + 0x30],EDX
MOV RAX,qword ptr [RSP + 0x38]
CMP dword ptr [RAX + 0x1c],0x0
JZ 0x00175fe9
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x00176130
LAB_00175fe9:
CMP dword ptr [RSP + 0x34],0x3fffffff
JLE 0x00176025
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x213bce]
MOV AL,0x0
CALL 0x0012f960
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00176140
MOV dword ptr [RSP + 0x44],EAX
JMP 0x00176130
LAB_00176025:
MOV EDI,dword ptr [RSP + 0x34]
MOV RAX,qword ptr [RSP + 0x38]
IMUL EAX,dword ptr [RAX + 0x14],0x3
MOV ECX,0x2
CDQ
IDIV ECX
MOV ESI,EAX
CALL 0x00163600
MOV EDI,EAX
MOV ESI,0x3fffffff
CALL 0x00156ff0
MOV dword ptr [RSP + 0x24],EAX
MOV RAX,qword ptr [RSP + 0x38]
CMP dword ptr [RAX + 0x18],0x0
JNZ 0x0017607d
CMP dword ptr [RSP + 0x30],0x100
JL 0x0017607d
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x24]
CALL 0x00176190
MOV dword ptr [RSP + 0x44],EAX
JMP 0x00176130
LAB_0017607d:
MOV EAX,dword ptr [RSP + 0x24]
MOV RCX,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RCX + 0x18]
SHL EAX,CL
CDQE
ADD RAX,0x18
ADD RAX,0x1
MOV RCX,qword ptr [RSP + 0x38]
MOVSXD RCX,dword ptr [RCX + 0x18]
SUB RAX,RCX
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RSP + 0x18]
LEA RCX,[RSP + 0x10]
CALL 0x00128170
MOV qword ptr [RSP + 0x28],RAX
CMP qword ptr [RSP + 0x28],0x0
JNZ 0x001760e3
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00176140
MOV dword ptr [RSP + 0x44],EAX
JMP 0x00176130
LAB_001760e3:
MOVSXD RAX,dword ptr [RSP + 0x24]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RCX + 0x18]
SHR RDX,CL
MOV RCX,RDX
ADD RAX,RCX
MOV EDI,EAX
MOV ESI,0x3fffffff
CALL 0x00156ff0
MOV dword ptr [RSP + 0x24],EAX
MOV ECX,dword ptr [RSP + 0x24]
MOV RAX,qword ptr [RSP + 0x38]
MOV dword ptr [RAX + 0x14],ECX
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RSP + 0x44],0x0
LAB_00176130:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
int4 string_buffer_realloc(int8 *param_1,int param_2,int param_3)
{
long lVar1;
int4 uVar2;
ulong local_38;
long local_30;
int local_24;
long local_20;
int local_18;
int local_14;
int8 *local_10;
int4 local_4;
if (*(int *)((long)param_1 + 0x1c) == 0) {
local_18 = param_3;
local_14 = param_2;
local_10 = param_1;
if (param_2 < 0x40000000) {
lVar1 = (long)(*(int *)((long)param_1 + 0x14) * 3);
uVar2 = max_int(param_2,lVar1 / 2 & 0xffffffff,lVar1 % 2 & 0xffffffff);
local_24 = min_int(uVar2,0x3fffffff);
if ((*(int *)(local_10 + 3) == 0) && (0xff < local_18)) {
local_4 = string_buffer_widen(local_10,local_24);
}
else {
local_30 = ((long)(local_24 << ((byte)*(int4 *)(local_10 + 3) & 0x1f)) + 0x19) -
(long)*(int *)(local_10 + 3);
local_20 = js_realloc2(*local_10,local_10[1],local_30,&local_38);
if (local_20 == 0) {
local_4 = string_buffer_set_error(local_10);
}
else {
uVar2 = min_int(local_24 + (int)(local_38 >> ((byte)*(int4 *)(local_10 + 3) & 0x3f))
,0x3fffffff);
*(int4 *)((long)local_10 + 0x14) = uVar2;
local_10[1] = local_20;
local_4 = 0;
}
}
}
else {
JS_ThrowRangeError(*param_1,"invalid string length");
local_4 = string_buffer_set_error(local_10);
}
}
else {
local_4 = 0xffffffff;
}
return local_4;
}
|
|
5,978 | bool (anonymous namespace)::Bisearch<(anonymous namespace)::WordBreakPropertyInterval, 993ul>(unsigned int, std::array<(anonymous namespace)::WordBreakPropertyInterval, 993ul> const&, (anonymous namespace)::WordBreakPropertyInterval*) | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/screen/string.cpp | bool Bisearch(uint32_t ucs, const std::array<C, N>& table, C* out) {
if (ucs < table.front().first || ucs > table.back().last) { // NOLINT
return false;
}
int min = 0;
int max = N - 1;
while (max >= min) {
const int mid = (min + max) / 2;
if (ucs > table[mid].last) { // NOLINT
min = mid + 1;
} else if (ucs < table[mid].first) { // NOLINT
max = mid - 1;
} else {
*out = table[mid]; // NOLINT
return true;
}
}
return false;
} | O1 | cpp | bool (anonymous namespace)::Bisearch<(anonymous namespace)::WordBreakPropertyInterval, 993ul>(unsigned int, std::array<(anonymous namespace)::WordBreakPropertyInterval, 993ul> const&, (anonymous namespace)::WordBreakPropertyInterval*):
leal -0xe01f0(%rdi), %eax
cmpl $0xfff1fe1a, %eax # imm = 0xFFF1FE1A
jb 0x3b5cb
movl $0x3e0, %edx # imm = 0x3E0
xorl %ecx, %ecx
leaq 0x620d(%rip), %rax # 0x41780
cmpl %ecx, %edx
jl 0x3b5cb
leal (%rdx,%rcx), %r9d
movl %r9d, %r8d
shrl $0x1f, %r8d
addl %r9d, %r8d
sarl %r8d
movslq %r8d, %r9
leaq (%r9,%r9,2), %r9
cmpl %edi, 0x4(%rax,%r9,4)
jae 0x3b5a1
incl %r8d
movb $0x1, %r9b
movl %r8d, %ecx
jmp 0x3b5c6
leaq (%rax,%r9,4), %r9
cmpl %edi, (%r9)
jbe 0x3b5b5
decl %r8d
movb $0x1, %r9b
movl %r8d, %edx
jmp 0x3b5c6
movl 0x8(%r9), %r8d
movl %r8d, 0x8(%rsi)
movq (%r9), %r8
movq %r8, (%rsi)
xorl %r9d, %r9d
testb %r9b, %r9b
jne 0x3b573
retq
| _ZN12_GLOBAL__N_18BisearchINS_25WordBreakPropertyIntervalELm993EEEbjRKSt5arrayIT_XT0_EEPS3_:
lea eax, [rdi-0E01F0h]
cmp eax, 0FFF1FE1Ah
jb short locret_3B5CB
mov edx, 3E0h
xor ecx, ecx
lea rax, _ZN12_GLOBAL__N_122g_word_break_intervalsE; `anonymous namespace'::g_word_break_intervals
loc_3B573:
cmp edx, ecx
jl short locret_3B5CB
lea r9d, [rdx+rcx]
mov r8d, r9d
shr r8d, 1Fh
add r8d, r9d
sar r8d, 1
movsxd r9, r8d
lea r9, [r9+r9*2]
cmp [rax+r9*4+4], edi
jnb short loc_3B5A1
inc r8d
mov r9b, 1
mov ecx, r8d
jmp short loc_3B5C6
loc_3B5A1:
lea r9, [rax+r9*4]
cmp [r9], edi
jbe short loc_3B5B5
dec r8d
mov r9b, 1
mov edx, r8d
jmp short loc_3B5C6
loc_3B5B5:
mov r8d, [r9+8]
mov [rsi+8], r8d
mov r8, [r9]
mov [rsi], r8
xor r9d, r9d
loc_3B5C6:
test r9b, r9b
jnz short loc_3B573
locret_3B5CB:
retn
| unsigned long long `anonymous namespace'::Bisearch<`anonymous namespace'::WordBreakPropertyInterval,993ul>(
unsigned int a1,
long long a2)
{
unsigned long long result; // rax
int v3; // edx
int v4; // ecx
int v5; // r8d
char v6; // r9
char *v7; // r9
result = a1 - 918000;
if ( (unsigned int)result >= 0xFFF1FE1A )
{
v3 = 992;
v4 = 0;
result = (unsigned long long)`anonymous namespace'::g_word_break_intervals;
do
{
if ( v3 < v4 )
break;
v5 = (v3 + v4) / 2;
if ( `anonymous namespace'::g_word_break_intervals[3 * v5 + 1] >= a1 )
{
v7 = (char *)&`anonymous namespace'::g_word_break_intervals[3 * v5];
if ( *(_DWORD *)v7 <= a1 )
{
*(_DWORD *)(a2 + 8) = *((_DWORD *)v7 + 2);
*(_QWORD *)a2 = *(_QWORD *)v7;
v6 = 0;
}
else
{
v6 = 1;
v3 = v5 - 1;
}
}
else
{
v6 = 1;
v4 = v5 + 1;
}
}
while ( v6 );
}
return result;
}
| Bisearch<(anonymous_namespace)::WordBreakPropertyInterval,993ul>:
LEA EAX,[RDI + -0xe01f0]
CMP EAX,0xfff1fe1a
JC 0x0013b5cb
MOV EDX,0x3e0
XOR ECX,ECX
LEA RAX,[0x141780]
LAB_0013b573:
CMP EDX,ECX
JL 0x0013b5cb
LEA R9D,[RDX + RCX*0x1]
MOV R8D,R9D
SHR R8D,0x1f
ADD R8D,R9D
SAR R8D,0x1
MOVSXD R9,R8D
LEA R9,[R9 + R9*0x2]
CMP dword ptr [RAX + R9*0x4 + 0x4],EDI
JNC 0x0013b5a1
INC R8D
MOV R9B,0x1
MOV ECX,R8D
JMP 0x0013b5c6
LAB_0013b5a1:
LEA R9,[RAX + R9*0x4]
CMP dword ptr [R9],EDI
JBE 0x0013b5b5
DEC R8D
MOV R9B,0x1
MOV EDX,R8D
JMP 0x0013b5c6
LAB_0013b5b5:
MOV R8D,dword ptr [R9 + 0x8]
MOV dword ptr [RSI + 0x8],R8D
MOV R8,qword ptr [R9]
MOV qword ptr [RSI],R8
XOR R9D,R9D
LAB_0013b5c6:
TEST R9B,R9B
JNZ 0x0013b573
LAB_0013b5cb:
RET
|
/* bool (anonymous namespace)::Bisearch<(anonymous namespace)::WordBreakPropertyInterval,
993ul>(unsigned int, std::array<(anonymous namespace)::WordBreakPropertyInterval, 993ul> const&,
(anonymous namespace)::WordBreakPropertyInterval*) */
bool (anonymous_namespace)::Bisearch<(anonymous_namespace)::WordBreakPropertyInterval,993ul>
(uint param_1,array *param_2,WordBreakPropertyInterval *param_3)
{
long lVar1;
bool bVar2;
uint uVar3;
int iVar4;
int iVar5;
int iVar6;
uVar3 = param_1 - 0xe01f0;
if (0xfff1fe19 < uVar3) {
iVar6 = 0x3e0;
iVar5 = 0;
uVar3 = 0x141780;
do {
if (iVar6 < iVar5) break;
iVar4 = (iVar6 + iVar5) / 2;
if (*(uint *)(g_word_break_intervals + (long)iVar4 * 0xc + 4) < param_1) {
iVar5 = iVar4 + 1;
bVar2 = true;
}
else {
lVar1 = (long)iVar4 * 0xc;
if (param_1 < *(uint *)(g_word_break_intervals + lVar1)) {
iVar6 = iVar4 + -1;
bVar2 = true;
}
else {
*(int4 *)(param_2 + 8) = *(int4 *)(g_word_break_intervals + lVar1 + 8);
*(int8 *)param_2 = *(int8 *)(g_word_break_intervals + lVar1);
bVar2 = false;
}
}
} while (bVar2);
}
return SUB41(uVar3,0);
}
|
|
5,979 | vio_delete | eloqsql/vio/vio.c | void vio_delete(Vio* vio)
{
if (!vio)
return; /* It must be safe to delete null pointers. */
if (vio->type != VIO_CLOSED)
vio->vioclose(vio);
my_free(vio->read_buffer);
my_free(vio);
} | O0 | c | vio_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xe56e65
jmp 0xe56e9c
movq -0x8(%rbp), %rax
cmpl $0x0, 0x118(%rax)
je 0xe56e83
movq -0x8(%rbp), %rax
movq 0x1b0(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rdi
callq 0x1324630
movq -0x8(%rbp), %rdi
callq 0x1324630
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| vio_delete:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
cmp [rbp+var_8], 0
jnz short loc_E56E65
jmp short loc_E56E9C
loc_E56E65:
mov rax, [rbp+var_8]
cmp dword ptr [rax+118h], 0
jz short loc_E56E83
mov rax, [rbp+var_8]
mov rax, [rax+1B0h]
mov rdi, [rbp+var_8]
call rax
loc_E56E83:
mov rax, [rbp+var_8]
mov rdi, [rax+128h]
call my_free
mov rdi, [rbp+var_8]
call my_free
loc_E56E9C:
add rsp, 10h
pop rbp
retn
| long long vio_delete(long long a1)
{
long long result; // rax
if ( a1 )
{
if ( *(_DWORD *)(a1 + 280) )
(*(void ( **)(long long))(a1 + 432))(a1);
my_free(*(_QWORD *)(a1 + 296));
return my_free(a1);
}
return result;
}
| init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RDI
CALL 0x00e56df0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
OR ECX,dword ptr [RBP + -0x14]
MOV RDI,qword ptr [RBP + -0x10]
LEA R8,[0x1c8be10]
XOR EDX,EDX
MOV ESI,0xa0000
CMP RDI,R8
CMOVNZ EDX,ESI
OR ECX,EDX
MOV RDX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RDX + 0xc]
AND EDI,0x410
MOV EDX,0x8
XOR ESI,ESI
CMP EDI,0x0
CMOVNZ EDX,ESI
OR ECX,EDX
MOV dword ptr [RAX + 0x14],ECX
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[0x1c8be10]
LEA RCX,[0x1e3bf00]
CMP RSI,RDX
CMOVZ RCX,RDX
MOV qword ptr [RAX + 0x18],RCX
XOR EAX,EAX
LEA RCX,[0x1c8be10]
CMP qword ptr [RBP + -0x10],RCX
MOV byte ptr [RBP + -0x15],AL
JZ 0x00e56efc
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x18]
CALL 0x00e56f10
CMP AL,0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x15],AL
LAB_00e56efc:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RBP + -0x15]
AND CL,0x1
MOV byte ptr [RAX + 0x10],CL
ADD RSP,0x20
POP RBP
RET
|
/* Regexp_processor_pcre::init(charset_info_st const*, int) */
void __thiscall
Regexp_processor_pcre::init(Regexp_processor_pcre *this,charset_info_st *param_1,int param_2)
{
char cVar1;
uint uVar2;
int1 *puVar3;
uint uVar4;
uint uVar5;
byte local_1d;
uVar2 = default_regex_flags();
uVar4 = 0;
if (param_1 != (charset_info_st *)&my_charset_bin) {
uVar4 = 0xa0000;
}
uVar5 = 8;
if ((*(uint *)(param_1 + 0xc) & 0x410) != 0) {
uVar5 = 0;
}
*(uint *)(this + 0x14) = uVar2 | param_2 | uVar4 | uVar5;
puVar3 = my_charset_utf8mb3_general_ci;
if (param_1 == (charset_info_st *)&my_charset_bin) {
puVar3 = (int1 *)&my_charset_bin;
}
*(int1 **)(this + 0x18) = puVar3;
local_1d = 0;
if (param_1 != (charset_info_st *)&my_charset_bin) {
cVar1 = ::my_charset_same(param_1,*(charset_info_st **)(this + 0x18));
local_1d = cVar1 != '\0' ^ 0xff;
}
this[0x10] = (Regexp_processor_pcre)(local_1d & 1);
return;
}
|
|
5,980 | mi_keylength_part | eloqsql/storage/myisam/mi_search.c | uint _mi_keylength_part(MI_KEYDEF *keyinfo, register uchar *key,
HA_KEYSEG *end)
{
reg1 HA_KEYSEG *keyseg;
uchar *start= key;
for (keyseg=keyinfo->seg ; keyseg != end ; keyseg++)
{
if (keyseg->flag & HA_NULL_PART)
if (!*key++)
continue;
if (keyseg->flag & (HA_SPACE_PACK | HA_BLOB_PART | HA_VAR_LENGTH_PART))
{
uint length;
get_key_length(length,key);
key+=length;
}
else
key+= keyseg->length;
}
return (uint) (key-start);
} | O0 | c | mi_keylength_part:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0xc1d5a
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xc1cbd
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpb $0x0, (%rax)
jne 0xc1cbb
jmp 0xc1d49
jmp 0xc1cbd
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x29, %eax
cmpl $0x0, %eax
je 0xc1d31
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0xc1cf2
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0xc1d1f
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
movzwl %ax, %eax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0xc1d47
movq -0x20(%rbp), %rax
movzwl 0x14(%rax), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0xc1d49
movq -0x20(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x20(%rbp)
jmp 0xc1c84
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nopw (%rax,%rax)
| _mi_keylength_part:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov [rbp+var_20], rax
loc_C1C84:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_18]
jz loc_C1D5A
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
and eax, 10h
cmp eax, 0
jz short loc_C1CBD
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
cmp byte ptr [rax], 0
jnz short loc_C1CBB
jmp loc_C1D49
loc_C1CBB:
jmp short $+2
loc_C1CBD:
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
and eax, 29h
cmp eax, 0
jz short loc_C1D31
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_C1CF2
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
jmp short loc_C1D1F
loc_C1CF2:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+2]
movzx eax, ax
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_2C], eax
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_10], rax
loc_C1D1F:
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp short loc_C1D47
loc_C1D31:
mov rax, [rbp+var_20]
movzx ecx, word ptr [rax+14h]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
loc_C1D47:
jmp short $+2
loc_C1D49:
mov rax, [rbp+var_20]
add rax, 20h ; ' '
mov [rbp+var_20], rax
jmp loc_C1C84
loc_C1D5A:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
sub rax, rcx
pop rbp
retn
| unsigned __int8 * mi_keylength_part(long long a1, unsigned __int8 *a2, long long a3)
{
unsigned __int8 *v3; // rax
unsigned __int8 *v4; // rax
int v6; // [rsp+0h] [rbp-2Ch]
long long i; // [rsp+Ch] [rbp-20h]
unsigned __int8 *v8; // [rsp+1Ch] [rbp-10h]
unsigned __int8 *v9; // [rsp+1Ch] [rbp-10h]
v8 = a2;
for ( i = *(_QWORD *)(a1 + 40); i != a3; i += 32LL )
{
if ( (*(_WORD *)(i + 18) & 0x10) != 0 )
{
v3 = v8++;
if ( !*v3 )
continue;
}
if ( (*(_WORD *)(i + 18) & 0x29) != 0 )
{
if ( *v8 == 255 )
{
v6 = _byteswap_ushort(*(_WORD *)(v8 + 1));
v9 = v8 + 3;
}
else
{
v4 = v8;
v9 = v8 + 1;
v6 = *v4;
}
v8 = &v9[v6];
}
else
{
v8 += *(unsigned __int16 *)(i + 20);
}
}
return (unsigned __int8 *)(v8 - a2);
}
| _mi_keylength_part:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
LAB_001c1c84:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x001c1d5a
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001c1cbd
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
CMP byte ptr [RAX],0x0
JNZ 0x001c1cbb
JMP 0x001c1d49
LAB_001c1cbb:
JMP 0x001c1cbd
LAB_001c1cbd:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x29
CMP EAX,0x0
JZ 0x001c1d31
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x001c1cf2
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001c1d1f
LAB_001c1cf2:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x10],RAX
LAB_001c1d1f:
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001c1d47
LAB_001c1d31:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,word ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_001c1d47:
JMP 0x001c1d49
LAB_001c1d49:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x20
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001c1c84
LAB_001c1d5a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
POP RBP
RET
|
long _mi_keylength_part(long param_1,byte *param_2,long param_3)
{
byte bVar1;
byte *pbVar2;
uint local_34;
long local_28;
byte *local_18;
local_18 = param_2;
for (local_28 = *(long *)(param_1 + 0x28); local_28 != param_3; local_28 = local_28 + 0x20) {
if (((*(ushort *)(local_28 + 0x12) & 0x10) == 0) ||
(pbVar2 = local_18 + 1, bVar1 = *local_18, local_18 = pbVar2, bVar1 != 0)) {
if ((*(ushort *)(local_28 + 0x12) & 0x29) == 0) {
local_18 = local_18 + (int)(uint)*(ushort *)(local_28 + 0x14);
}
else {
if (*local_18 == 0xff) {
local_34 = (uint)CONCAT11(local_18[1],local_18[2]);
local_18 = local_18 + 3;
}
else {
local_34 = (uint)*local_18;
local_18 = local_18 + 1;
}
local_18 = local_18 + local_34;
}
}
}
return (long)local_18 - (long)param_2;
}
|
|
5,981 | mysql_real_query_cont | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_real_query_cont(int *ret, MYSQL *mysql, int ready_status)
{
MK_ASYNC_CONT_BODY(
mysql,
1,
r_int)
} | O3 | c | mysql_real_query_cont:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x480(%rsi), %rax
movq 0x28(%rax), %r15
cmpb $0x0, 0x15(%r15)
je 0x49d52
movb $0x1, 0x14(%r15)
movl %edx, 0x4(%r15)
leaq 0x38(%r15), %rdi
callq 0x4e777
movb $0x0, 0x14(%r15)
testl %eax, %eax
jle 0x49dad
movl (%r15), %r15d
jmp 0x49e17
movl $0x7de, 0x90(%r14) # imm = 0x7DE
leaq 0x297(%r14), %rdi
leaq 0x2e3c55(%rip), %rax # 0x32d9c0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x35110
xorl %r15d, %r15d
movb %r15b, 0x29c(%r14)
leaq 0x97(%r14), %rdi
leaq 0x2e3c40(%rip), %rax # 0x32d9d0
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x35110
movb %r15b, 0x296(%r14)
movl $0x1, (%rbx)
jmp 0x49e17
movb $0x0, 0x15(%r15)
js 0x49dba
movl 0x8(%r15), %eax
jmp 0x49e12
movl $0x7d8, 0x90(%r14) # imm = 0x7D8
leaq 0x297(%r14), %rdi
leaq 0x2e3bed(%rip), %rax # 0x32d9c0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x35110
xorl %r15d, %r15d
movb %r15b, 0x29c(%r14)
leaq 0x97(%r14), %rdi
leaq 0x2e3bd8(%rip), %rax # 0x32d9d0
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x35110
movb %r15b, 0x296(%r14)
movl $0x1, %eax
movl %eax, (%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mysql_real_query_cont:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+480h]
mov r15, [rax+28h]
cmp byte ptr [r15+15h], 0
jz short loc_49D52
mov byte ptr [r15+14h], 1
mov [r15+4], edx
lea rdi, [r15+38h]
call my_context_continue
mov byte ptr [r15+14h], 0
test eax, eax
jle short loc_49DAD
mov r15d, [r15]
jmp loc_49E17
loc_49D52:
mov dword ptr [r14+90h], 7DEh
lea rdi, [r14+297h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [r14+29Ch], r15b
lea rdi, [r14+97h]
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov [r14+296h], r15b
mov dword ptr [rbx], 1
jmp short loc_49E17
loc_49DAD:
mov byte ptr [r15+15h], 0
js short loc_49DBA
mov eax, [r15+8]
jmp short loc_49E12
loc_49DBA:
mov dword ptr [r14+90h], 7D8h
lea rdi, [r14+297h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [r14+29Ch], r15b
lea rdi, [r14+97h]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov [r14+296h], r15b
mov eax, 1
loc_49E12:
mov [rbx], eax
xor r15d, r15d
loc_49E17:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mysql_real_query_cont(int *a1, long long a2, unsigned int a3)
{
unsigned int *v3; // r15
int v4; // eax
unsigned int v5; // r15d
int v6; // eax
v3 = *(unsigned int **)(*(_QWORD *)(a2 + 1152) + 40LL);
if ( *((_BYTE *)v3 + 21) )
{
*((_BYTE *)v3 + 20) = 1;
v3[1] = a3;
v4 = my_context_continue(v3 + 14);
*((_BYTE *)v3 + 20) = 0;
if ( v4 <= 0 )
{
*((_BYTE *)v3 + 21) = 0;
if ( v4 < 0 )
{
*(_DWORD *)(a2 + 144) = 2008;
strncpy(a2 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a2 + 668) = 0;
strncpy(a2 + 151, client_errors[8], 511LL);
*(_BYTE *)(a2 + 662) = 0;
v6 = 1;
}
else
{
v6 = v3[2];
}
*a1 = v6;
return 0;
}
else
{
return *v3;
}
}
else
{
*(_DWORD *)(a2 + 144) = 2014;
strncpy(a2 + 663, SQLSTATE_UNKNOWN, 5LL);
v5 = 0;
*(_BYTE *)(a2 + 668) = 0;
strncpy(a2 + 151, client_errors[14], 511LL);
*(_BYTE *)(a2 + 662) = 0;
*a1 = 1;
}
return v5;
}
| mysql_real_query_cont:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x480]
MOV R15,qword ptr [RAX + 0x28]
CMP byte ptr [R15 + 0x15],0x0
JZ 0x00149d52
MOV byte ptr [R15 + 0x14],0x1
MOV dword ptr [R15 + 0x4],EDX
LEA RDI,[R15 + 0x38]
CALL 0x0014e777
MOV byte ptr [R15 + 0x14],0x0
TEST EAX,EAX
JLE 0x00149dad
MOV R15D,dword ptr [R15]
JMP 0x00149e17
LAB_00149d52:
MOV dword ptr [R14 + 0x90],0x7de
LEA RDI,[R14 + 0x297]
LEA RAX,[0x42d9c0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00135110
XOR R15D,R15D
MOV byte ptr [R14 + 0x29c],R15B
LEA RDI,[R14 + 0x97]
LEA RAX,[0x42d9d0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00135110
MOV byte ptr [R14 + 0x296],R15B
MOV dword ptr [RBX],0x1
JMP 0x00149e17
LAB_00149dad:
MOV byte ptr [R15 + 0x15],0x0
JS 0x00149dba
MOV EAX,dword ptr [R15 + 0x8]
JMP 0x00149e12
LAB_00149dba:
MOV dword ptr [R14 + 0x90],0x7d8
LEA RDI,[R14 + 0x297]
LEA RAX,[0x42d9c0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00135110
XOR R15D,R15D
MOV byte ptr [R14 + 0x29c],R15B
LEA RDI,[R14 + 0x97]
LEA RAX,[0x42d9d0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00135110
MOV byte ptr [R14 + 0x296],R15B
MOV EAX,0x1
LAB_00149e12:
MOV dword ptr [RBX],EAX
XOR R15D,R15D
LAB_00149e17:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 mysql_real_query_cont(int4 *param_1,long param_2,int4 param_3)
{
int4 *puVar1;
int iVar2;
int4 uVar3;
puVar1 = *(int4 **)(*(long *)(param_2 + 0x480) + 0x28);
if (*(char *)((long)puVar1 + 0x15) == '\0') {
*(int4 *)(param_2 + 0x90) = 0x7de;
strncpy((char *)(param_2 + 0x297),SQLSTATE_UNKNOWN,5);
uVar3 = 0;
*(int1 *)(param_2 + 0x29c) = 0;
strncpy((char *)(param_2 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_0042da40,0x1ff);
*(int1 *)(param_2 + 0x296) = 0;
*param_1 = 1;
}
else {
*(int1 *)(puVar1 + 5) = 1;
puVar1[1] = param_3;
iVar2 = my_context_continue(puVar1 + 0xe);
*(int1 *)(puVar1 + 5) = 0;
if (iVar2 < 1) {
*(int1 *)((long)puVar1 + 0x15) = 0;
if (iVar2 < 0) {
*(int4 *)(param_2 + 0x90) = 0x7d8;
strncpy((char *)(param_2 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_2 + 0x29c) = 0;
strncpy((char *)(param_2 + 0x97),PTR_s_Client_run_out_of_memory_0042da10,0x1ff);
*(int1 *)(param_2 + 0x296) = 0;
uVar3 = 1;
}
else {
uVar3 = puVar1[2];
}
*param_1 = uVar3;
uVar3 = 0;
}
else {
uVar3 = *puVar1;
}
}
return uVar3;
}
|
|
5,982 | my_stat | eloqsql/mysys/my_lib.c | MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
{
int m_used;
DBUG_ENTER("my_stat");
DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path,
stat_area, my_flags));
if ((m_used= (stat_area == NULL)))
if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT),
my_flags)))
goto error;
#ifndef _WIN32
if (!stat((char *) path, (struct stat *) stat_area))
{
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(stat_area);
}
#else
if (!my_win_stat(path, stat_area))
DBUG_RETURN(stat_area);
#endif
DBUG_PRINT("error",("Got errno: %d from stat", errno));
my_errno= errno;
if (m_used) /* Free if new area */
my_free(stat_area);
error:
if (my_flags & (MY_FAE+MY_WME))
{
my_error(EE_STAT, MYF(ME_BELL), path, my_errno);
DBUG_RETURN((MY_STAT *) NULL);
}
DBUG_RETURN((MY_STAT *) NULL);
} | O0 | c | my_stat:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0xf4776
cmpq $0x0, -0x18(%rbp)
sete %al
movb %al, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movl %ecx, -0x24(%rbp)
testb $0x1, %al
jne 0xf478f
jmp 0xf47b4
leaq 0xb8fdd2(%rip), %rax # 0xc84568
movl (%rax), %edi
movq -0x20(%rbp), %rdx
movl $0x90, %esi
callq 0xf4be0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0xf47b2
jmp 0xf47fb
jmp 0xf47b4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2a7d0
cmpl $0x0, %eax
jne 0xf47d2
jmp 0xf47c8
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xf4841
jmp 0xf47d4
jmp 0xf47d6
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x28(%rbp)
callq 0xf7440
movl -0x28(%rbp), %ecx
movl %ecx, (%rax)
cmpl $0x0, -0x24(%rbp)
je 0xf47f9
movq -0x18(%rbp), %rdi
callq 0xf4f60
jmp 0xf47fb
movq -0x20(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0xf4837
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0xf7440
movq -0x30(%rbp), %rdx
movl (%rax), %ecx
movl $0xd, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0xf0ef0
movq $0x0, -0x8(%rbp)
jmp 0xf4841
jmp 0xf4839
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_stat:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_F4776:
cmp [rbp+var_18], 0
setz al
mov cl, al
and cl, 1
movzx ecx, cl
mov [rbp+var_24], ecx
test al, 1
jnz short loc_F478F
jmp short loc_F47B4
loc_F478F:
lea rax, key_memory_MY_STAT
mov edi, [rax]
mov rdx, [rbp+var_20]
mov esi, 90h
call my_malloc
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_F47B2
jmp short loc_F47FB
loc_F47B2:
jmp short $+2
loc_F47B4:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _stat64
cmp eax, 0
jnz short loc_F47D2
jmp short $+2
loc_F47C8:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_F4841
loc_F47D2:
jmp short $+2
loc_F47D4:
jmp short $+2
loc_F47D6:
call ___errno_location
mov eax, [rax]
mov [rbp+var_28], eax
call _my_thread_var
mov ecx, [rbp+var_28]
mov [rax], ecx
cmp [rbp+var_24], 0
jz short loc_F47F9
mov rdi, [rbp+var_18]
call my_free
loc_F47F9:
jmp short $+2
loc_F47FB:
mov rax, [rbp+var_20]
and rax, 18h
cmp rax, 0
jz short loc_F4837
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
call _my_thread_var
mov rdx, [rbp+var_30]
mov ecx, [rax]
mov edi, 0Dh
mov esi, 4
mov al, 0
call my_error
mov [rbp+var_8], 0
jmp short loc_F4841
loc_F4837:
jmp short $+2
loc_F4839:
mov [rbp+var_8], 0
loc_F4841:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| const char * my_stat(const char *a1, const char *a2, long long a3)
{
const char *v3; // rdi
const char *v4; // rsi
unsigned int *v5; // rax
int v7; // [rsp+8h] [rbp-28h]
BOOL v8; // [rsp+Ch] [rbp-24h]
char v9; // [rsp+10h] [rbp-20h]
const char *v10; // [rsp+18h] [rbp-18h]
v10 = a2;
v9 = a3;
v8 = a2 == 0LL;
if ( a2
|| (v3 = (const char *)key_memory_MY_STAT,
v4 = (const char *)&qword_90,
(v10 = (const char *)my_malloc(key_memory_MY_STAT, 144LL, a3)) != 0LL) )
{
v3 = a1;
v4 = v10;
if ( !(unsigned int)stat64(a1, v10) )
return v10;
v7 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a1, v10) = v7;
if ( v8 )
{
v3 = v10;
my_free(v10);
}
}
if ( (v9 & 0x18) != 0 )
{
v5 = (unsigned int *)my_thread_var(v3, v4);
my_error(0xDu, 4LL, a1, *v5);
}
return 0LL;
}
| my_stat:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
JMP 0x001f4776
LAB_001f4776:
CMP qword ptr [RBP + -0x18],0x0
SETZ AL
MOV CL,AL
AND CL,0x1
MOVZX ECX,CL
MOV dword ptr [RBP + -0x24],ECX
TEST AL,0x1
JNZ 0x001f478f
JMP 0x001f47b4
LAB_001f478f:
LEA RAX,[0xd84568]
MOV EDI,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x20]
MOV ESI,0x90
CALL 0x001f4be0
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x001f47b2
JMP 0x001f47fb
LAB_001f47b2:
JMP 0x001f47b4
LAB_001f47b4:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0012a7d0
CMP EAX,0x0
JNZ 0x001f47d2
JMP 0x001f47c8
LAB_001f47c8:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f4841
LAB_001f47d2:
JMP 0x001f47d4
LAB_001f47d4:
JMP 0x001f47d6
LAB_001f47d6:
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x28],EAX
CALL 0x001f7440
MOV ECX,dword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
CMP dword ptr [RBP + -0x24],0x0
JZ 0x001f47f9
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001f4f60
LAB_001f47f9:
JMP 0x001f47fb
LAB_001f47fb:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x18
CMP RAX,0x0
JZ 0x001f4837
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x001f7440
MOV RDX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX]
MOV EDI,0xd
MOV ESI,0x4
MOV AL,0x0
CALL 0x001f0ef0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001f4841
LAB_001f4837:
JMP 0x001f4839
LAB_001f4839:
MOV qword ptr [RBP + -0x8],0x0
LAB_001f4841:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3)
{
int iVar1;
int *piVar2;
int4 *puVar3;
stat64 *local_20;
local_20 = param_2;
if ((param_2 != (stat64 *)0x0) ||
(local_20 = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), local_20 != (stat64 *)0x0)) {
iVar1 = stat64(param_1,local_20);
if (iVar1 == 0) {
return local_20;
}
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if (param_2 == (stat64 *)0x0) {
my_free(local_20);
}
}
if ((param_3 & 0x18) != 0) {
puVar3 = (int4 *)_my_thread_var();
my_error(0xd,4,param_1,*puVar3);
}
return (stat64 *)0x0;
}
|
|
5,983 | mysql_find_charset_name | eloqsql/libmariadb/libmariadb/ma_charset.c | MARIADB_CHARSET_INFO * mysql_find_charset_name(const char *name)
{
MARIADB_CHARSET_INFO *c = (MARIADB_CHARSET_INFO *)mariadb_compiled_charsets;
const char *csname;
if (!strcasecmp(name, MADB_AUTODETECT_CHARSET_NAME))
csname= madb_get_os_character_set();
else
csname= (char *)name;
if (!strcasecmp("utf8",csname))
csname= "utf8mb3";
do {
if (!strcasecmp(c->csname, csname)) {
return(c);
}
++c;
} while (c[0].nr != 0);
return(NULL);
} | O0 | c | mysql_find_charset_name:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x4101d(%rip), %rax # 0x5af90
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x3483f(%rip), %rsi # 0x4e7c1
callq 0x13480
cmpl $0x0, %eax
jne 0x19f97
callq 0x1a010
movq %rax, -0x20(%rbp)
jmp 0x19f9f
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq 0x34c11(%rip), %rdi # 0x4ebbb
callq 0x13480
cmpl $0x0, %eax
jne 0x19fbf
leaq 0x35592(%rip), %rax # 0x4f54d
movq %rax, -0x20(%rbp)
jmp 0x19fc1
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x13480
cmpl $0x0, %eax
jne 0x19fe1
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x19ffe
movq -0x18(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x19fc1
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| mysql_find_charset_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
lea rax, mariadb_compiled_charsets
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
lea rsi, aCharsetAuto+8; "auto"
call _strcasecmp
cmp eax, 0
jnz short loc_19F97
call madb_get_os_character_set
mov [rbp+var_20], rax
jmp short loc_19F9F
loc_19F97:
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
loc_19F9F:
mov rsi, [rbp+var_20]
lea rdi, aWrongCharsetEx+18h; "utf8"
call _strcasecmp
cmp eax, 0
jnz short loc_19FBF
lea rax, aUtf8mb3; "utf8mb3"
mov [rbp+var_20], rax
loc_19FBF:
jmp short $+2
loc_19FC1:
mov rax, [rbp+var_18]
mov rdi, [rax+8]
mov rsi, [rbp+var_20]
call _strcasecmp
cmp eax, 0
jnz short loc_19FE1
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_19FFE
loc_19FE1:
mov rax, [rbp+var_18]
add rax, 48h ; 'H'
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0
jnz short loc_19FC1
mov [rbp+var_8], 0
loc_19FFE:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| _QWORD * mysql_find_charset_name(const char *a1)
{
int v1; // eax
const char *os_character_set; // [rsp+0h] [rbp-20h]
_QWORD *v4; // [rsp+8h] [rbp-18h]
v4 = &mariadb_compiled_charsets;
if ( !(unsigned int)strcasecmp(a1, "auto") )
{
os_character_set = (const char *)madb_get_os_character_set();
v1 = strcasecmp("utf8", os_character_set);
}
else
{
os_character_set = a1;
v1 = strcasecmp("utf8", a1);
}
if ( !v1 )
os_character_set = "utf8mb3";
do
{
if ( !(unsigned int)strcasecmp(v4[1], os_character_set) )
return v4;
v4 += 9;
}
while ( *(_DWORD *)v4 );
return 0LL;
}
| mysql_find_charset_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0x15af90]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14e7c1]
CALL 0x00113480
CMP EAX,0x0
JNZ 0x00119f97
CALL 0x0011a010
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00119f9f
LAB_00119f97:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
LAB_00119f9f:
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[0x14ebbb]
CALL 0x00113480
CMP EAX,0x0
JNZ 0x00119fbf
LEA RAX,[0x14f54d]
MOV qword ptr [RBP + -0x20],RAX
LAB_00119fbf:
JMP 0x00119fc1
LAB_00119fc1:
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00113480
CMP EAX,0x0
JNZ 0x00119fe1
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00119ffe
LAB_00119fe1:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x48
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x0
JNZ 0x00119fc1
MOV qword ptr [RBP + -0x8],0x0
LAB_00119ffe:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int * mysql_find_charset_name(char *param_1)
{
int iVar1;
char *local_28;
int *local_20;
local_20 = &mariadb_compiled_charsets;
iVar1 = strcasecmp(param_1,"auto");
local_28 = param_1;
if (iVar1 == 0) {
local_28 = (char *)madb_get_os_character_set();
}
iVar1 = strcasecmp("utf8",local_28);
if (iVar1 == 0) {
local_28 = "utf8mb3";
}
do {
iVar1 = strcasecmp(*(char **)(local_20 + 2),local_28);
if (iVar1 == 0) {
return local_20;
}
local_20 = local_20 + 0x12;
} while (*local_20 != 0);
return (int *)0x0;
}
|
|
5,984 | OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | void
Tessellation::initializeInventoryForParamTri(int sumOfEdgeRates) {
int res = _innerRates[0];
if (_isUniform) {
if (res > 1) {
_numInteriorPoints = tri::CountInteriorCoords(res);
_numFacets = tri::CountUniformFacets(res);
} else {
_numInteriorPoints = 0;
_numFacets = 1;
_singleFace = true;
}
} else {
if (res > 2) {
_numInteriorPoints = tri::CountInteriorCoords(res);
_numFacets = tri::CountNonUniformFacets(_outerRates, res);
} else {
_numInteriorPoints = 1;
_numFacets = sumOfEdgeRates;
_triangleFan = true;
}
}
_numBoundaryPoints = sumOfEdgeRates;
} | O0 | cpp | OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri(int):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl 0x20(%rax), %ecx
movl %ecx, -0x10(%rbp)
movb 0x4(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
je 0x1be867
cmpl $0x1, -0x10(%rbp)
jle 0x1be847
movl -0x10(%rbp), %edi
callq 0xc8eb0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x10(%rbp), %edi
callq 0xd1910
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x1be865
movq -0x18(%rbp), %rax
movl $0x0, 0x18(%rax)
movl $0x1, 0x1c(%rax)
movb 0x4(%rax), %cl
andb $-0x9, %cl
orb $0x8, %cl
movb %cl, 0x4(%rax)
jmp 0x1be8b4
cmpl $0x2, -0x10(%rbp)
jle 0x1be895
movl -0x10(%rbp), %edi
callq 0xc8eb0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
movq 0x28(%rax), %rdi
movl -0x10(%rbp), %esi
callq 0xcbd10
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x1be8b2
movq -0x18(%rbp), %rax
movl $0x1, 0x18(%rax)
movl -0xc(%rbp), %ecx
movl %ecx, 0x1c(%rax)
movb 0x4(%rax), %cl
andb $-0x21, %cl
orb $0x20, %cl
movb %cl, 0x4(%rax)
jmp 0x1be8b4
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, 0x14(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Bfr12Tessellation30initializeInventoryForParamTriEi:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov dword ptr [rbp+var_10+4], esi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov ecx, [rax+20h]
mov dword ptr [rbp+var_10], ecx
mov al, [rax+4]
shr al, 1
and al, 1
movzx eax, al
cmp ax, 0
jz short loc_1BE867
cmp dword ptr [rbp+var_10], 1
jle short loc_1BE847
mov edi, dword ptr [rbp+var_10]; this
call __ZN10OpenSubdiv6v3_6_03Bfr3tri19CountInteriorCoordsEi; OpenSubdiv::v3_6_0::Bfr::tri::CountInteriorCoords(int)
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+18h], ecx
mov edi, dword ptr [rbp+var_10]; this
call __ZN10OpenSubdiv6v3_6_03Bfr3tri18CountUniformFacetsEi; OpenSubdiv::v3_6_0::Bfr::tri::CountUniformFacets(int)
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+1Ch], ecx
jmp short loc_1BE865
loc_1BE847:
mov rax, [rbp+var_18]
mov dword ptr [rax+18h], 0
mov dword ptr [rax+1Ch], 1
mov cl, [rax+4]
and cl, 0F7h
or cl, 8
mov [rax+4], cl
loc_1BE865:
jmp short loc_1BE8B4
loc_1BE867:
cmp dword ptr [rbp+var_10], 2
jle short loc_1BE895
mov edi, dword ptr [rbp+var_10]; this
call __ZN10OpenSubdiv6v3_6_03Bfr3tri19CountInteriorCoordsEi; OpenSubdiv::v3_6_0::Bfr::tri::CountInteriorCoords(int)
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+18h], ecx
mov rdi, [rax+28h]; this
mov esi, dword ptr [rbp+var_10]; int *
call __ZN10OpenSubdiv6v3_6_03Bfr3tri21CountNonUniformFacetsEPKii; OpenSubdiv::v3_6_0::Bfr::tri::CountNonUniformFacets(int const*,int)
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+1Ch], ecx
jmp short loc_1BE8B2
loc_1BE895:
mov rax, [rbp+var_18]
mov dword ptr [rax+18h], 1
mov ecx, dword ptr [rbp+var_10+4]
mov [rax+1Ch], ecx
mov cl, [rax+4]
and cl, 0DFh
or cl, 20h
mov [rax+4], cl
loc_1BE8B2:
jmp short $+2
loc_1BE8B4:
mov rax, [rbp+var_18]
mov ecx, dword ptr [rbp+var_10+4]
mov [rax+14h], ecx
add rsp, 20h
pop rbp
retn
| OpenSubdiv::v3_6_0::Bfr::Tessellation * OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri(
OpenSubdiv::v3_6_0::Bfr::Tessellation *this,
int a2)
{
int v2; // edx
OpenSubdiv::v3_6_0::Bfr::Tessellation *result; // rax
int v4; // [rsp+10h] [rbp-10h]
v4 = *((_DWORD *)this + 8);
if ( (*((_BYTE *)this + 4) & 2) != 0 )
{
if ( v4 <= 1 )
{
*((_DWORD *)this + 6) = 0;
*((_DWORD *)this + 7) = 1;
*((_BYTE *)this + 4) = *((_BYTE *)this + 4) & 0xF7 | 8;
}
else
{
*((_DWORD *)this + 6) = OpenSubdiv::v3_6_0::Bfr::tri::CountInteriorCoords(
(OpenSubdiv::v3_6_0::Bfr::tri *)(unsigned int)v4,
a2);
*((_DWORD *)this + 7) = OpenSubdiv::v3_6_0::Bfr::tri::CountUniformFacets(
(OpenSubdiv::v3_6_0::Bfr::tri *)(unsigned int)v4,
a2);
}
}
else if ( v4 <= 2 )
{
*((_DWORD *)this + 6) = 1;
*((_DWORD *)this + 7) = a2;
*((_BYTE *)this + 4) = *((_BYTE *)this + 4) & 0xDF | 0x20;
}
else
{
*((_DWORD *)this + 6) = OpenSubdiv::v3_6_0::Bfr::tri::CountInteriorCoords(
(OpenSubdiv::v3_6_0::Bfr::tri *)(unsigned int)v4,
a2);
*((_DWORD *)this + 7) = OpenSubdiv::v3_6_0::Bfr::tri::CountNonUniformFacets(
*((OpenSubdiv::v3_6_0::Bfr::tri **)this + 5),
(const int *)(unsigned int)v4,
v2);
}
result = this;
*((_DWORD *)this + 5) = a2;
return result;
}
| |||
5,985 | OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | void
Tessellation::initializeInventoryForParamTri(int sumOfEdgeRates) {
int res = _innerRates[0];
if (_isUniform) {
if (res > 1) {
_numInteriorPoints = tri::CountInteriorCoords(res);
_numFacets = tri::CountUniformFacets(res);
} else {
_numInteriorPoints = 0;
_numFacets = 1;
_singleFace = true;
}
} else {
if (res > 2) {
_numInteriorPoints = tri::CountInteriorCoords(res);
_numFacets = tri::CountNonUniformFacets(_outerRates, res);
} else {
_numInteriorPoints = 1;
_numFacets = sumOfEdgeRates;
_triangleFan = true;
}
}
_numBoundaryPoints = sumOfEdgeRates;
} | O1 | cpp | OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri(int):
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x20(%rdi), %esi
movb 0x4(%rdi), %al
testb $0x2, %al
jne 0x9f2d1
cmpl $0x3, %esi
jl 0x9f2f5
leal -0x2(%rsi), %eax
leal -0x1(%rsi), %ecx
imull %eax, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movl %eax, 0x18(%r14)
movq 0x28(%r14), %rdi
callq 0x39dc0
movl %eax, 0x1c(%r14)
jmp 0x9f319
cmpl $0x2, %esi
jl 0x9f305
leal -0x2(%rsi), %eax
leal -0x1(%rsi), %ecx
imull %eax, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movl %eax, 0x18(%r14)
imull %esi, %esi
movl %esi, 0x1c(%r14)
jmp 0x9f319
movl $0x1, 0x18(%r14)
movl %ebx, 0x1c(%r14)
orb $0x20, %al
jmp 0x9f315
movabsq $0x100000000, %rcx # imm = 0x100000000
movq %rcx, 0x18(%r14)
orb $0x8, %al
movb %al, 0x4(%r14)
movl %ebx, 0x14(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN10OpenSubdiv6v3_6_03Bfr12Tessellation30initializeInventoryForParamTriEi:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
mov esi, [rdi+20h]; int *
mov al, [rdi+4]
test al, 2
jnz short loc_9F2D1
cmp esi, 3
jl short loc_9F2F5
lea eax, [rsi-2]
lea ecx, [rsi-1]
imul ecx, eax
mov eax, ecx
shr eax, 1Fh
add eax, ecx
sar eax, 1
mov [r14+18h], eax
mov rdi, [r14+28h]; this
call __ZN10OpenSubdiv6v3_6_03Bfr3tri21CountNonUniformFacetsEPKii; OpenSubdiv::v3_6_0::Bfr::tri::CountNonUniformFacets(int const*,int)
mov [r14+1Ch], eax
jmp short loc_9F319
loc_9F2D1:
cmp esi, 2
jl short loc_9F305
lea eax, [rsi-2]
lea ecx, [rsi-1]
imul ecx, eax
mov eax, ecx
shr eax, 1Fh
add eax, ecx
sar eax, 1
mov [r14+18h], eax
imul esi, esi
mov [r14+1Ch], esi
jmp short loc_9F319
loc_9F2F5:
mov dword ptr [r14+18h], 1
mov [r14+1Ch], ebx
or al, 20h
jmp short loc_9F315
loc_9F305:
mov rcx, 100000000h
mov [r14+18h], rcx
or al, 8
loc_9F315:
mov [r14+4], al
loc_9F319:
mov [r14+14h], ebx
add rsp, 8
pop rbx
pop r14
retn
| char OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri(
OpenSubdiv::v3_6_0::Bfr::Tessellation *this,
int a2,
int a3)
{
const int *v4; // rsi
char v5; // al
int v6; // eax
v4 = (const int *)*((unsigned int *)this + 8);
v5 = *((_BYTE *)this + 4);
if ( (v5 & 2) != 0 )
{
if ( (int)v4 >= 2 )
{
v6 = ((int)v4 - 2) * ((int)v4 - 1) / 2;
*((_DWORD *)this + 6) = v6;
*((_DWORD *)this + 7) = (_DWORD)v4 * (_DWORD)v4;
goto LABEL_9;
}
*((_QWORD *)this + 3) = 0x100000000LL;
LOBYTE(v6) = v5 | 8;
LABEL_8:
*((_BYTE *)this + 4) = v6;
goto LABEL_9;
}
if ( (int)v4 < 3 )
{
*((_DWORD *)this + 6) = 1;
*((_DWORD *)this + 7) = a2;
LOBYTE(v6) = v5 | 0x20;
goto LABEL_8;
}
*((_DWORD *)this + 6) = ((int)v4 - 2) * ((int)v4 - 1) / 2;
v6 = OpenSubdiv::v3_6_0::Bfr::tri::CountNonUniformFacets(*((OpenSubdiv::v3_6_0::Bfr::tri **)this + 5), v4, a3);
*((_DWORD *)this + 7) = v6;
LABEL_9:
*((_DWORD *)this + 5) = a2;
return v6;
}
| initializeInventoryForParamTri:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI + 0x20]
MOV AL,byte ptr [RDI + 0x4]
TEST AL,0x2
JNZ 0x0019f2d1
CMP ESI,0x3
JL 0x0019f2f5
LEA EAX,[RSI + -0x2]
LEA ECX,[RSI + -0x1]
IMUL ECX,EAX
MOV EAX,ECX
SHR EAX,0x1f
ADD EAX,ECX
SAR EAX,0x1
MOV dword ptr [R14 + 0x18],EAX
MOV RDI,qword ptr [R14 + 0x28]
CALL 0x00139dc0
MOV dword ptr [R14 + 0x1c],EAX
JMP 0x0019f319
LAB_0019f2d1:
CMP ESI,0x2
JL 0x0019f305
LEA EAX,[RSI + -0x2]
LEA ECX,[RSI + -0x1]
IMUL ECX,EAX
MOV EAX,ECX
SHR EAX,0x1f
ADD EAX,ECX
SAR EAX,0x1
MOV dword ptr [R14 + 0x18],EAX
IMUL ESI,ESI
MOV dword ptr [R14 + 0x1c],ESI
JMP 0x0019f319
LAB_0019f2f5:
MOV dword ptr [R14 + 0x18],0x1
MOV dword ptr [R14 + 0x1c],EBX
OR AL,0x20
JMP 0x0019f315
LAB_0019f305:
MOV RCX,0x100000000
MOV qword ptr [R14 + 0x18],RCX
OR AL,0x8
LAB_0019f315:
MOV byte ptr [R14 + 0x4],AL
LAB_0019f319:
MOV dword ptr [R14 + 0x14],EBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri(int) */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri
(Tessellation *this,int param_1)
{
int iVar1;
Tessellation TVar2;
int4 uVar3;
iVar1 = *(int *)(this + 0x20);
TVar2 = this[4];
if (((byte)TVar2 & 2) == 0) {
if (2 < iVar1) {
*(int *)(this + 0x18) = ((iVar1 + -1) * (iVar1 + -2)) / 2;
uVar3 = tri::CountNonUniformFacets(*(int **)(this + 0x28),iVar1);
*(int4 *)(this + 0x1c) = uVar3;
goto LAB_0019f319;
}
*(int4 *)(this + 0x18) = 1;
*(int *)(this + 0x1c) = param_1;
TVar2 = (Tessellation)((byte)TVar2 | 0x20);
}
else {
if (1 < iVar1) {
*(int *)(this + 0x18) = ((iVar1 + -1) * (iVar1 + -2)) / 2;
*(int *)(this + 0x1c) = iVar1 * iVar1;
goto LAB_0019f319;
}
*(int8 *)(this + 0x18) = 0x100000000;
TVar2 = (Tessellation)((byte)TVar2 | 8);
}
this[4] = TVar2;
LAB_0019f319:
*(int *)(this + 0x14) = param_1;
return;
}
|
|
5,986 | OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | void
Tessellation::initializeInventoryForParamTri(int sumOfEdgeRates) {
int res = _innerRates[0];
if (_isUniform) {
if (res > 1) {
_numInteriorPoints = tri::CountInteriorCoords(res);
_numFacets = tri::CountUniformFacets(res);
} else {
_numInteriorPoints = 0;
_numFacets = 1;
_singleFace = true;
}
} else {
if (res > 2) {
_numInteriorPoints = tri::CountInteriorCoords(res);
_numFacets = tri::CountNonUniformFacets(_outerRates, res);
} else {
_numInteriorPoints = 1;
_numFacets = sumOfEdgeRates;
_triangleFan = true;
}
}
_numBoundaryPoints = sumOfEdgeRates;
} | O3 | cpp | OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri(int):
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x20(%rdi), %esi
movb 0x4(%rdi), %al
testb $0x2, %al
jne 0xa1e20
cmpl $0x3, %esi
jl 0xa1e3d
leal -0x2(%rsi), %eax
leal -0x1(%rsi), %ecx
imull %eax, %ecx
shrl %ecx
movl %ecx, 0x18(%r14)
movq 0x28(%r14), %rdi
callq 0x39da0
movl %eax, 0x1c(%r14)
jmp 0xa1e61
cmpl $0x2, %esi
jl 0xa1e4d
leal -0x2(%rsi), %eax
leal -0x1(%rsi), %ecx
imull %eax, %ecx
shrl %ecx
movl %ecx, 0x18(%r14)
imull %esi, %esi
movl %esi, 0x1c(%r14)
jmp 0xa1e61
movl $0x1, 0x18(%r14)
movl %ebx, 0x1c(%r14)
orb $0x20, %al
jmp 0xa1e5d
movabsq $0x100000000, %rcx # imm = 0x100000000
movq %rcx, 0x18(%r14)
orb $0x8, %al
movb %al, 0x4(%r14)
movl %ebx, 0x14(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN10OpenSubdiv6v3_6_03Bfr12Tessellation30initializeInventoryForParamTriEi:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
mov esi, [rdi+20h]; int *
mov al, [rdi+4]
test al, 2
jnz short loc_A1E20
cmp esi, 3
jl short loc_A1E3D
lea eax, [rsi-2]
lea ecx, [rsi-1]
imul ecx, eax
shr ecx, 1
mov [r14+18h], ecx
mov rdi, [r14+28h]; this
call __ZN10OpenSubdiv6v3_6_03Bfr3tri21CountNonUniformFacetsEPKii; OpenSubdiv::v3_6_0::Bfr::tri::CountNonUniformFacets(int const*,int)
mov [r14+1Ch], eax
jmp short loc_A1E61
loc_A1E20:
cmp esi, 2
jl short loc_A1E4D
lea eax, [rsi-2]
lea ecx, [rsi-1]
imul ecx, eax
shr ecx, 1
mov [r14+18h], ecx
imul esi, esi
mov [r14+1Ch], esi
jmp short loc_A1E61
loc_A1E3D:
mov dword ptr [r14+18h], 1
mov [r14+1Ch], ebx
or al, 20h
jmp short loc_A1E5D
loc_A1E4D:
mov rcx, 100000000h
mov [r14+18h], rcx
or al, 8
loc_A1E5D:
mov [r14+4], al
loc_A1E61:
mov [r14+14h], ebx
add rsp, 8
pop rbx
pop r14
retn
| char OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri(
OpenSubdiv::v3_6_0::Bfr::Tessellation *this,
int a2,
int a3)
{
const int *v4; // rsi
char v5; // al
int v6; // eax
v4 = (const int *)*((unsigned int *)this + 8);
v5 = *((_BYTE *)this + 4);
if ( (v5 & 2) != 0 )
{
if ( (int)v4 >= 2 )
{
LOBYTE(v6) = (_BYTE)v4 - 2;
*((_DWORD *)this + 6) = (unsigned int)(((_DWORD)v4 - 2) * ((_DWORD)v4 - 1)) >> 1;
*((_DWORD *)this + 7) = (_DWORD)v4 * (_DWORD)v4;
goto LABEL_9;
}
*((_QWORD *)this + 3) = 0x100000000LL;
LOBYTE(v6) = v5 | 8;
LABEL_8:
*((_BYTE *)this + 4) = v6;
goto LABEL_9;
}
if ( (int)v4 < 3 )
{
*((_DWORD *)this + 6) = 1;
*((_DWORD *)this + 7) = a2;
LOBYTE(v6) = v5 | 0x20;
goto LABEL_8;
}
*((_DWORD *)this + 6) = (unsigned int)(((_DWORD)v4 - 2) * ((_DWORD)v4 - 1)) >> 1;
v6 = OpenSubdiv::v3_6_0::Bfr::tri::CountNonUniformFacets(*((OpenSubdiv::v3_6_0::Bfr::tri **)this + 5), v4, a3);
*((_DWORD *)this + 7) = v6;
LABEL_9:
*((_DWORD *)this + 5) = a2;
return v6;
}
| initializeInventoryForParamTri:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI + 0x20]
MOV AL,byte ptr [RDI + 0x4]
TEST AL,0x2
JNZ 0x001a1e20
CMP ESI,0x3
JL 0x001a1e3d
LEA EAX,[RSI + -0x2]
LEA ECX,[RSI + -0x1]
IMUL ECX,EAX
SHR ECX,0x1
MOV dword ptr [R14 + 0x18],ECX
MOV RDI,qword ptr [R14 + 0x28]
CALL 0x00139da0
MOV dword ptr [R14 + 0x1c],EAX
JMP 0x001a1e61
LAB_001a1e20:
CMP ESI,0x2
JL 0x001a1e4d
LEA EAX,[RSI + -0x2]
LEA ECX,[RSI + -0x1]
IMUL ECX,EAX
SHR ECX,0x1
MOV dword ptr [R14 + 0x18],ECX
IMUL ESI,ESI
MOV dword ptr [R14 + 0x1c],ESI
JMP 0x001a1e61
LAB_001a1e3d:
MOV dword ptr [R14 + 0x18],0x1
MOV dword ptr [R14 + 0x1c],EBX
OR AL,0x20
JMP 0x001a1e5d
LAB_001a1e4d:
MOV RCX,0x100000000
MOV qword ptr [R14 + 0x18],RCX
OR AL,0x8
LAB_001a1e5d:
MOV byte ptr [R14 + 0x4],AL
LAB_001a1e61:
MOV dword ptr [R14 + 0x14],EBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri(int) */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamTri
(Tessellation *this,int param_1)
{
int iVar1;
Tessellation TVar2;
int4 uVar3;
iVar1 = *(int *)(this + 0x20);
TVar2 = this[4];
if (((byte)TVar2 & 2) == 0) {
if (2 < iVar1) {
*(uint *)(this + 0x18) = (uint)((iVar1 + -1) * (iVar1 + -2)) >> 1;
uVar3 = tri::CountNonUniformFacets(*(int **)(this + 0x28),iVar1);
*(int4 *)(this + 0x1c) = uVar3;
goto LAB_001a1e61;
}
*(int4 *)(this + 0x18) = 1;
*(int *)(this + 0x1c) = param_1;
TVar2 = (Tessellation)((byte)TVar2 | 0x20);
}
else {
if (1 < iVar1) {
*(uint *)(this + 0x18) = (uint)((iVar1 + -1) * (iVar1 + -2)) >> 1;
*(int *)(this + 0x1c) = iVar1 * iVar1;
goto LAB_001a1e61;
}
*(int8 *)(this + 0x18) = 0x100000000;
TVar2 = (Tessellation)((byte)TVar2 | 8);
}
this[4] = TVar2;
LAB_001a1e61:
*(int *)(this + 0x14) = param_1;
return;
}
|
|
5,987 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_array(unsigned long) | monkey531[P]llama/common/json.hpp | bool start_array(std::size_t len)
{
ref_stack.push_back(handle_value(BasicJsonType::value_t::array));
if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()))
{
JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back()));
}
return true;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_array(unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
leaq 0x8(%rsp), %rsi
movb $0x2, (%rsi)
callq 0x453b6
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x45496
cmpq $-0x1, %r15
je 0x4520d
movq 0x10(%r14), %rax
movq -0x8(%rax), %rdi
callq 0x41afc
cmpq %r15, %rax
jb 0x4521a
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x41c6f
leaq 0x6bd18(%rip), %rsi # 0xb0f51
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x43a71
movq 0x10(%r14), %rax
movq -0x8(%rax), %rcx
movb $0x1, %bpl
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movl $0x198, %esi # imm = 0x198
callq 0x41b24
xorl %ebp, %ebp
leaq 0xb6c5a(%rip), %rsi # 0xfbec8
leaq -0x5321(%rip), %rdx # 0x3ff54
movq %rbx, %rdi
callq 0x23f40
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x241f8
jmp 0x45292
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x241f8
testb %bpl, %bpl
jne 0x452a6
jmp 0x452ae
movq %rax, %r14
movq %rbx, %rdi
callq 0x236a0
movq %r14, %rdi
callq 0x23fc0
| _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11start_arrayEm:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r15, rsi
mov r14, rdi
lea rbx, [rdi+8]
lea rsi, [rsp+68h+var_60]
mov byte ptr [rsi], 2
call _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEEPSF_OT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<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>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&)
lea rsi, [rsp+68h+var_40]
mov [rsi], rax
mov rdi, rbx
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE12emplace_backIJSE_EEERSE_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> * &&)
cmp r15, 0FFFFFFFFFFFFFFFFh
jz short loc_4520D
mov rax, [r14+10h]
mov rdi, [rax-8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; 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>::max_size(void)
cmp rax, r15
jb short loc_4521A
loc_4520D:
mov al, 1
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4521A:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]; this
mov rsi, r15; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rsi, aExcessiveArray; "excessive array size: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA23_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(char const(&)[23],std::string &&)
mov rax, [r14+10h]
mov rcx, [rax-8]
mov bpl, 1
lea rdx, [rsp+68h+var_40]
mov rdi, rbx; this
mov esi, 198h; int
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+68h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_45292
mov r14, rax
mov bpl, 1
loc_45292:
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_452A6
jmp short loc_452AE
mov r14, rax
loc_452A6:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_452AE:
mov rdi, r14
call __Unwind_Resume
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::start_array(
long long a1,
unsigned long long a2)
{
nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // rbx
_BYTE v4[32]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v5[8]; // [rsp+28h] [rbp-40h] BYREF
v4[0] = 2;
v5[0] = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(
a1,
v4);
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> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>(a1 + 8);
if ( a2 != -1LL
&& 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>::max_size(*(unsigned __int8 **)(*(_QWORD *)(a1 + 16) - 8LL)) < a2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::to_string((std::__cxx11 *)v4, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(
(long long)v5,
(long long)"excessive array size: ",
(long long)v4);
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
408,
(long long)v5,
*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL));
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return 1;
}
| start_array:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R15,RSI
MOV R14,RDI
LEA RBX,[RDI + 0x8]
LEA RSI,[RSP + 0x8]
MOV byte ptr [RSI],0x2
CALL 0x001453b6
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],RAX
MOV RDI,RBX
CALL 0x00145496
CMP R15,-0x1
JZ 0x0014520d
MOV RAX,qword ptr [R14 + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
CALL 0x00141afc
CMP RAX,R15
JC 0x0014521a
LAB_0014520d:
MOV AL,0x1
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014521a:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
LAB_00145225:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
CALL 0x00141c6f
LAB_00145232:
LEA RSI,[0x1b0f51]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00143a71
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
MOV BPL,0x1
LAB_00145253:
LEA RDX,[RSP + 0x28]
MOV RDI,RBX
MOV ESI,0x198
CALL 0x00141b24
XOR EBP,EBP
LEA RSI,[0x1fbec8]
LEA RDX,[0x13ff54]
MOV RDI,RBX
CALL 0x00123f40
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::start_array(unsigned long) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::start_array(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong param_1)
{
ulong uVar1;
int8 uVar2;
__cxx11 local_60 [32];
basic_json *local_40 [4];
local_60[0] = (__cxx11)0x2;
local_40[0] = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,local_60);
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8),local_40);
if (param_1 != 0xffffffffffffffff) {
uVar1 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::max_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>
**)(*(long *)(this + 0x10) + -8));
if (uVar1 < param_1) {
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 00145225 to 00145231 has its CatchHandler @ 001452a3 */
std::__cxx11::to_string(local_60,param_1);
/* try { // try from 00145232 to 00145247 has its CatchHandler @ 0014528c */
concat<std::__cxx11::string,char_const(&)[23],std::__cxx11::string>
((detail *)local_40,"excessive array size: ",(string *)local_60);
/* try { // try from 00145253 to 0014527c has its CatchHandler @ 0014527d */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x198,local_40,*(int8 *)(*(long *)(this + 0x10) + -8));
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&out_of_range::typeinfo,exception::~exception);
}
}
return 1;
}
|
|
5,988 | int2str | eloqsql/strings/int2str.c | char *
int2str(register long int val, register char *dst, register int radix,
int upcase)
{
char buffer[65];
register char *p;
long int new_val;
const char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower;
ulong uval= (ulong) val;
if (radix < 0)
{
if (radix < -36 || radix > -2)
return NullS;
if (val < 0)
{
*dst++ = '-';
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (ulong)0 - uval;
}
radix = -radix;
}
else if (radix > 36 || radix < 2)
return NullS;
/*
The slightly contorted code which follows is due to the fact that
few machines directly support unsigned long / and %. Certainly
the VAX C compiler generates a subroutine call. In the interests
of efficiency (hollow laugh) I let this happen for the first digit
only; after that "val" will be in range so that signed integer
division will do. Sorry 'bout that. CHECK THE CODE PRODUCED BY
YOUR C COMPILER. The first % and / should be unsigned, the second
% and / signed, but C compilers tend to be extraordinarily
sensitive to minor details of style. This works on a VAX, that's
all I claim for it.
*/
p = &buffer[sizeof(buffer)-1];
*p = '\0';
new_val= uval / (ulong) radix;
*--p = dig_vec[(uchar) (uval- (ulong) new_val*(ulong) radix)];
val = new_val;
#ifdef HAVE_LDIV
while (val != 0)
{
ldiv_t res;
res=ldiv(val,radix);
*--p = dig_vec[res.rem];
val= res.quot;
}
#else
while (val != 0)
{
new_val=val/radix;
*--p = dig_vec[(uchar) (val-new_val*radix)];
val= new_val;
}
#endif
while ((*dst++ = *p++) != 0) ;
return dst-1;
} | O0 | c | int2str:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
movl %edx, -0x6c(%rbp)
movl %ecx, -0x70(%rbp)
movl -0x70(%rbp), %edx
leaq 0x142960(%rip), %rax # 0x1b82d0
leaq 0x142929(%rip), %rcx # 0x1b82a0
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x90(%rbp)
cmpl $0x0, -0x6c(%rbp)
jge 0x759e2
cmpl $-0x24, -0x6c(%rbp)
jl 0x759a2
cmpl $-0x2, -0x6c(%rbp)
jle 0x759af
movq $0x0, -0x58(%rbp)
jmp 0x75b09
cmpq $0x0, -0x60(%rbp)
jge 0x759d8
movq -0x68(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x68(%rbp)
movb $0x2d, (%rax)
xorl %eax, %eax
subq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
xorl %eax, %eax
subl -0x6c(%rbp), %eax
movl %eax, -0x6c(%rbp)
jmp 0x759fd
cmpl $0x24, -0x6c(%rbp)
jg 0x759ee
cmpl $0x2, -0x6c(%rbp)
jge 0x759fb
movq $0x0, -0x58(%rbp)
jmp 0x75b09
jmp 0x759fd
leaq -0x50(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movb $0x0, (%rax)
movq -0x90(%rbp), %rax
movslq -0x6c(%rbp), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, -0x80(%rbp)
movq -0x88(%rbp), %rax
movq -0x90(%rbp), %rcx
movq -0x80(%rbp), %rdx
movslq -0x6c(%rbp), %rsi
imulq %rsi, %rdx
subq %rdx, %rcx
movzbl %cl, %ecx
movb (%rax,%rcx), %cl
movq -0x78(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x78(%rbp)
movb %cl, -0x1(%rax)
movq -0x80(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x75acf
movq -0x60(%rbp), %rdi
movslq -0x6c(%rbp), %rsi
callq 0x24120
movq %rax, -0xb0(%rbp)
movq %rdx, -0xa8(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x88(%rbp), %rax
movq -0x98(%rbp), %rcx
movb (%rax,%rcx), %cl
movq -0x78(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x78(%rbp)
movb %cl, -0x1(%rax)
movq -0xa0(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x75a61
jmp 0x75ad1
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x78(%rbp)
movb (%rax), %al
movq -0x68(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x68(%rbp)
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x75afd
jmp 0x75ad1
movq -0x68(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x75b36
movq -0xb8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
callq 0x242f0
nopl (%rax,%rax)
| int2str:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_60], rdi
mov [rbp+var_68], rsi
mov [rbp+var_6C], edx
mov [rbp+var_70], ecx
mov edx, [rbp+var_70]
lea rax, _dig_vec_lower; "0123456789abcdefghijklmnopqrstuvwxyz"
lea rcx, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_88], rax
mov rax, [rbp+var_60]
mov [rbp+var_90], rax
cmp [rbp+var_6C], 0
jge short loc_759E2
cmp [rbp+var_6C], 0FFFFFFDCh
jl short loc_759A2
cmp [rbp+var_6C], 0FFFFFFFEh
jle short loc_759AF
loc_759A2:
mov [rbp+var_58], 0
jmp loc_75B09
loc_759AF:
cmp [rbp+var_60], 0
jge short loc_759D8
mov rax, [rbp+var_68]
mov rcx, rax
add rcx, 1
mov [rbp+var_68], rcx
mov byte ptr [rax], 2Dh ; '-'
xor eax, eax
sub rax, [rbp+var_90]
mov [rbp+var_90], rax
loc_759D8:
xor eax, eax
sub eax, [rbp+var_6C]
mov [rbp+var_6C], eax
jmp short loc_759FD
loc_759E2:
cmp [rbp+var_6C], 24h ; '$'
jg short loc_759EE
cmp [rbp+var_6C], 2
jge short loc_759FB
loc_759EE:
mov [rbp+var_58], 0
jmp loc_75B09
loc_759FB:
jmp short $+2
loc_759FD:
lea rax, [rbp+var_50]
add rax, 40h ; '@'
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov byte ptr [rax], 0
mov rax, [rbp+var_90]
movsxd rcx, [rbp+var_6C]
xor edx, edx
div rcx
mov [rbp+var_80], rax
mov rax, [rbp+var_88]
mov rcx, [rbp+var_90]
mov rdx, [rbp+var_80]
movsxd rsi, [rbp+var_6C]
imul rdx, rsi
sub rcx, rdx
movzx ecx, cl
mov cl, [rax+rcx]
mov rax, [rbp+var_78]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_78], rdx
mov [rax-1], cl
mov rax, [rbp+var_80]
mov [rbp+var_60], rax
loc_75A61:
cmp [rbp+var_60], 0
jz short loc_75ACF
mov rdi, [rbp+var_60]
movsxd rsi, [rbp+var_6C]
call _ldiv
mov [rbp+var_B0], rax
mov [rbp+var_A8], rdx
mov rax, [rbp+var_B0]
mov [rbp+var_A0], rax
mov rax, [rbp+var_A8]
mov [rbp+var_98], rax
mov rax, [rbp+var_88]
mov rcx, [rbp+var_98]
mov cl, [rax+rcx]
mov rax, [rbp+var_78]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_78], rdx
mov [rax-1], cl
mov rax, [rbp+var_A0]
mov [rbp+var_60], rax
jmp short loc_75A61
loc_75ACF:
jmp short $+2
loc_75AD1:
mov rax, [rbp+var_78]
mov rcx, rax
add rcx, 1
mov [rbp+var_78], rcx
mov al, [rax]
mov rcx, [rbp+var_68]
mov rdx, rcx
add rdx, 1
mov [rbp+var_68], rdx
mov [rcx], al
movsx eax, al
cmp eax, 0
jz short loc_75AFD
jmp short loc_75AD1
loc_75AFD:
mov rax, [rbp+var_68]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_58], rax
loc_75B09:
mov rax, [rbp+var_58]
mov [rbp+var_B8], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_75B36
mov rax, [rbp+var_B8]
add rsp, 0C0h
pop rbp
retn
loc_75B36:
call ___stack_chk_fail
| _BYTE * int2str(long long a1, _BYTE *a2, int a3, int a4)
{
const char *v4; // rax
long long v5; // rdx
_BYTE *v6; // rax
_BYTE *v7; // rax
_BYTE *v8; // rcx
long long v10; // [rsp+10h] [rbp-B0h]
unsigned long long v11; // [rsp+30h] [rbp-90h]
const char *v12; // [rsp+38h] [rbp-88h]
_BYTE *v13; // [rsp+48h] [rbp-78h]
int v14; // [rsp+54h] [rbp-6Ch]
_BYTE *v15; // [rsp+58h] [rbp-68h]
unsigned long long i; // [rsp+60h] [rbp-60h]
_BYTE v18[9]; // [rsp+AFh] [rbp-11h] BYREF
unsigned long long v19; // [rsp+B8h] [rbp-8h]
v19 = __readfsqword(0x28u);
v15 = a2;
v14 = a3;
v4 = "0123456789abcdefghijklmnopqrstuvwxyz";
if ( a4 )
v4 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
v12 = v4;
v11 = a1;
if ( a3 >= 0 )
{
if ( a3 > 36 || a3 < 2 )
return 0LL;
}
else
{
if ( a3 < -36 || a3 > -2 )
return 0LL;
if ( a1 < 0 )
{
v15 = a2 + 1;
*a2 = 45;
v11 = -a1;
}
v14 = -a3;
}
v18[1] = 0;
v13 = v18;
v18[0] = v4[(unsigned __int8)(v11 % v14)];
for ( i = v11 / v14; i; i = v10 )
{
v10 = ldiv(i, v14);
v6 = v13--;
*(v6 - 1) = v12[v5];
}
do
{
v7 = v13++;
LOBYTE(v7) = *v7;
v8 = v15++;
*v8 = (_BYTE)v7;
}
while ( (_BYTE)v7 );
return v15 - 1;
}
| int2str:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x68],RSI
MOV dword ptr [RBP + -0x6c],EDX
MOV dword ptr [RBP + -0x70],ECX
MOV EDX,dword ptr [RBP + -0x70]
LEA RAX,[0x2b82d0]
LEA RCX,[0x2b82a0]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x90],RAX
CMP dword ptr [RBP + -0x6c],0x0
JGE 0x001759e2
CMP dword ptr [RBP + -0x6c],-0x24
JL 0x001759a2
CMP dword ptr [RBP + -0x6c],-0x2
JLE 0x001759af
LAB_001759a2:
MOV qword ptr [RBP + -0x58],0x0
JMP 0x00175b09
LAB_001759af:
CMP qword ptr [RBP + -0x60],0x0
JGE 0x001759d8
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x68],RCX
MOV byte ptr [RAX],0x2d
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x90],RAX
LAB_001759d8:
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x6c],EAX
JMP 0x001759fd
LAB_001759e2:
CMP dword ptr [RBP + -0x6c],0x24
JG 0x001759ee
CMP dword ptr [RBP + -0x6c],0x2
JGE 0x001759fb
LAB_001759ee:
MOV qword ptr [RBP + -0x58],0x0
JMP 0x00175b09
LAB_001759fb:
JMP 0x001759fd
LAB_001759fd:
LEA RAX,[RBP + -0x50]
ADD RAX,0x40
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x90]
MOVSXD RCX,dword ptr [RBP + -0x6c]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x90]
MOV RDX,qword ptr [RBP + -0x80]
MOVSXD RSI,dword ptr [RBP + -0x6c]
IMUL RDX,RSI
SUB RCX,RDX
MOVZX ECX,CL
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x78]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x78],RDX
MOV byte ptr [RAX + -0x1],CL
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x60],RAX
LAB_00175a61:
CMP qword ptr [RBP + -0x60],0x0
JZ 0x00175acf
MOV RDI,qword ptr [RBP + -0x60]
MOVSXD RSI,dword ptr [RBP + -0x6c]
CALL 0x00124120
MOV qword ptr [RBP + -0xb0],RAX
MOV qword ptr [RBP + -0xa8],RDX
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x98]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x78]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x78],RDX
MOV byte ptr [RAX + -0x1],CL
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00175a61
LAB_00175acf:
JMP 0x00175ad1
LAB_00175ad1:
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x78],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x68]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x68],RDX
MOV byte ptr [RCX],AL
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00175afd
JMP 0x00175ad1
LAB_00175afd:
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x58],RAX
LAB_00175b09:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00175b36
MOV RAX,qword ptr [RBP + -0xb8]
ADD RSP,0xc0
POP RBP
RET
LAB_00175b36:
CALL 0x001242f0
|
char * int2str(ulong param_1,char *param_2,int param_3,int param_4)
{
char cVar1;
char *pcVar2;
char *pcVar3;
long in_FS_OFFSET;
ldiv_t lVar4;
ulong local_b8;
long local_b0;
ulong local_98;
char *local_80;
int local_74;
char *local_70;
ulong local_68;
char *local_60;
char local_19 [9];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar3 = "0123456789abcdefghijklmnopqrstuvwxyz";
if (param_4 != 0) {
pcVar3 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
}
local_98 = param_1;
local_70 = param_2;
if (param_3 < 0) {
if ((param_3 < -0x24) || (-2 < param_3)) {
local_60 = (char *)0x0;
goto LAB_00175b09;
}
if ((long)param_1 < 0) {
local_70 = param_2 + 1;
*param_2 = '-';
local_98 = -param_1;
}
local_74 = -param_3;
}
else if ((0x24 < param_3) || (local_74 = param_3, param_3 < 2)) {
local_60 = (char *)0x0;
goto LAB_00175b09;
}
local_19[1] = 0;
local_68 = local_98 / (ulong)(long)local_74;
local_19[0] = pcVar3[(byte)((char)local_98 - (char)local_68 * (char)local_74)];
local_80 = local_19;
while (pcVar2 = local_70, local_68 != 0) {
lVar4 = ldiv(local_68,(long)local_74);
local_b8 = lVar4.quot;
local_b0 = lVar4.rem;
local_80[-1] = pcVar3[local_b0];
local_80 = local_80 + -1;
local_68 = local_b8;
}
do {
local_70 = pcVar2;
cVar1 = *local_80;
*local_70 = cVar1;
local_80 = local_80 + 1;
pcVar2 = local_70 + 1;
} while (cVar1 != '\0');
local_60 = local_70;
LAB_00175b09:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_60;
}
|
|
5,989 | maria_init_bulk_insert | eloqsql/storage/maria/ma_write.c | int maria_init_bulk_insert(MARIA_HA *info, size_t cache_size, ha_rows rows)
{
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *key=share->keyinfo;
bulk_insert_param *params;
uint i, num_keys, total_keylength;
ulonglong key_map;
DBUG_ENTER("_ma_init_bulk_insert");
DBUG_PRINT("enter",("cache_size: %lu", (ulong) cache_size));
DBUG_ASSERT(!info->bulk_insert &&
(!rows || rows >= MARIA_MIN_ROWS_TO_USE_BULK_INSERT));
maria_clear_all_keys_active(key_map);
for (i=total_keylength=num_keys=0 ; i < share->base.keys ; i++)
{
if (! (key[i].flag & HA_NOSAME) && (share->base.auto_key != i + 1) &&
maria_is_key_active(share->state.key_map, i))
{
num_keys++;
maria_set_key_active(key_map, i);
total_keylength+=key[i].maxlength+TREE_ELEMENT_EXTRA_SIZE;
}
}
if (num_keys==0 ||
num_keys * (size_t) MARIA_MIN_SIZE_BULK_INSERT_TREE > cache_size)
DBUG_RETURN(0);
if (rows && rows*total_keylength < cache_size)
cache_size= (size_t)rows;
else
cache_size/=total_keylength*16;
info->bulk_insert=(TREE *)
my_malloc(PSI_INSTRUMENT_ME, (sizeof(TREE)*share->base.keys+
sizeof(bulk_insert_param)*num_keys),MYF(0));
if (!info->bulk_insert)
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
params=(bulk_insert_param *)(info->bulk_insert+share->base.keys);
for (i=0 ; i < share->base.keys ; i++)
{
if (maria_is_key_active(key_map, i))
{
params->info=info;
params->keynr=i;
/* Only allocate a 16'th of the buffer at a time */
init_tree(&info->bulk_insert[i],
cache_size * key[i].maxlength,
cache_size * key[i].maxlength, 0,
(qsort_cmp2) keys_compare, keys_free, (void *)params++, MYF(0));
}
else
info->bulk_insert[i].root=0;
}
DBUG_RETURN(0);
} | O3 | c | maria_init_bulk_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x30(%rbp)
movq (%rdi), %r13
movl 0x3e8(%r13), %edi
testq %rdi, %rdi
je 0x6d5f2
movq %rdx, %rbx
movq 0x570(%r13), %r14
xorl %ecx, %ecx
xorl %r15d, %r15d
xorl %r8d, %r8d
xorl %eax, %eax
imulq $0x118, %rcx, %r9 # imm = 0x118
testb $0x1, 0xa2(%r14,%r9)
jne 0x6d4c7
movl 0x3ec(%r13), %r10d
leaq 0x1(%rcx), %rdx
cmpq %r10, %rdx
je 0x6d4cd
movq 0x140(%r13), %r11
movl $0x1, %r10d
shlq %cl, %r10
btq %rcx, %r11
jae 0x6d4cd
addq %r14, %r9
incl %eax
orq %r10, %r15
movzwl 0xae(%r9), %ecx
addl %ecx, %r8d
addl $0x20, %r8d
jmp 0x6d4cd
incq %rcx
movq %rcx, %rdx
movq %rdx, %rcx
cmpq %rdi, %rdx
jne 0x6d476
xorl %r12d, %r12d
testl %eax, %eax
je 0x6d5f5
movq %r15, -0x40(%rbp)
movl %eax, %ecx
movq %rcx, %rax
shlq $0xe, %rax
cmpq %rsi, %rax
ja 0x6d5f5
testq %rbx, %rbx
je 0x6d507
movl %r8d, %eax
imulq %rbx, %rax
cmpq %rsi, %rax
jb 0x6d516
shll $0x4, %r8d
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq %rax, %rbx
imulq $0x298, %rdi, %rax # imm = 0x298
shlq $0x4, %rcx
addq %rax, %rcx
xorl %r12d, %r12d
xorl %edi, %edi
movq %rcx, %rsi
xorl %edx, %edx
callq 0xbf321
movq %rax, %r15
movq -0x30(%rbp), %rax
movq %r15, 0x310(%rax)
testq %r15, %r15
je 0x6d607
movl 0x3e8(%r13), %eax
testq %rax, %rax
je 0x6d5f5
movq %rbx, -0x38(%rbp)
imulq $0x298, %rax, %rax # imm = 0x298
addq %rax, %r15
addq $0xae, %r14
xorl %r12d, %r12d
xorl %ebx, %ebx
movq -0x40(%rbp), %rax
btq %rbx, %rax
jae 0x6d5c2
movq -0x30(%rbp), %rax
movq %rax, (%r15)
movl %ebx, 0x8(%r15)
movq 0x310(%rax), %rdi
addq %r12, %rdi
movzwl (%r14), %edx
imulq -0x38(%rbp), %rdx
movq %rdx, %rsi
xorl %ecx, %ecx
leaq 0x67(%rip), %r8 # 0x6d60f
leaq 0xa1(%rip), %r9 # 0x6d650
pushq $0x0
pushq %r15
addq $0x10, %r15
callq 0xc400c
addq $0x10, %rsp
jmp 0x6d5d5
movq -0x30(%rbp), %rax
movq 0x310(%rax), %rax
movq $0x0, (%rax,%r12)
incq %rbx
movl 0x3e8(%r13), %eax
addq $0x298, %r12 # imm = 0x298
addq $0x118, %r14 # imm = 0x118
cmpq %rax, %rbx
jb 0x6d574
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x80, %r12d
jmp 0x6d5f5
| maria_init_bulk_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_30], rdi
mov r13, [rdi]
mov edi, [r13+3E8h]
test rdi, rdi
jz loc_6D5F2
mov rbx, rdx
mov r14, [r13+570h]
xor ecx, ecx
xor r15d, r15d
xor r8d, r8d
xor eax, eax
loc_6D476:
imul r9, rcx, 118h
test byte ptr [r14+r9+0A2h], 1
jnz short loc_6D4C7
mov r10d, [r13+3ECh]
lea rdx, [rcx+1]
cmp rdx, r10
jz short loc_6D4CD
mov r11, [r13+140h]
mov r10d, 1
shl r10, cl
bt r11, rcx
jnb short loc_6D4CD
add r9, r14
inc eax
or r15, r10
movzx ecx, word ptr [r9+0AEh]
add r8d, ecx
add r8d, 20h ; ' '
jmp short loc_6D4CD
loc_6D4C7:
inc rcx
mov rdx, rcx
loc_6D4CD:
mov rcx, rdx
cmp rdx, rdi
jnz short loc_6D476
xor r12d, r12d
test eax, eax
jz loc_6D5F5
mov [rbp+var_40], r15
mov ecx, eax
mov rax, rcx
shl rax, 0Eh
cmp rax, rsi
ja loc_6D5F5
test rbx, rbx
jz short loc_6D507
mov eax, r8d
imul rax, rbx
cmp rax, rsi
jb short loc_6D516
loc_6D507:
shl r8d, 4
mov rax, rsi
xor edx, edx
div r8
mov rbx, rax
loc_6D516:
imul rax, rdi, 298h
shl rcx, 4
add rcx, rax
xor r12d, r12d
xor edi, edi
mov rsi, rcx
xor edx, edx
call my_malloc
mov r15, rax
mov rax, [rbp+var_30]
mov [rax+310h], r15
test r15, r15
jz loc_6D607
mov eax, [r13+3E8h]
test rax, rax
jz loc_6D5F5
mov [rbp+var_38], rbx
imul rax, 298h
add r15, rax
add r14, 0AEh
xor r12d, r12d
xor ebx, ebx
loc_6D574:
mov rax, [rbp+var_40]
bt rax, rbx
jnb short loc_6D5C2
mov rax, [rbp+var_30]
mov [r15], rax
mov [r15+8], ebx
mov rdi, [rax+310h]
add rdi, r12
movzx edx, word ptr [r14]
imul rdx, [rbp+var_38]
mov rsi, rdx
xor ecx, ecx
lea r8, keys_compare
lea r9, keys_free
push 0
push r15
add r15, 10h
call init_tree
add rsp, 10h
jmp short loc_6D5D5
loc_6D5C2:
mov rax, [rbp+var_30]
mov rax, [rax+310h]
mov qword ptr [rax+r12], 0
loc_6D5D5:
inc rbx
mov eax, [r13+3E8h]
add r12, 298h
add r14, 118h
cmp rbx, rax
jb short loc_6D574
loc_6D5F2:
xor r12d, r12d
loc_6D5F5:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6D607:
mov r12d, 80h
jmp short loc_6D5F5
| long long maria_init_bulk_insert(_QWORD *a1, unsigned long long a2, unsigned long long a3)
{
long long v3; // r13
long long v4; // rdi
long long v6; // r14
unsigned long long v7; // rcx
long long v8; // r15
unsigned int v9; // r8d
unsigned int v10; // eax
unsigned long long v11; // rdx
long long v12; // r11
unsigned int v13; // r12d
long long v14; // r15
long long v15; // r15
unsigned __int16 *v16; // r14
long long v17; // r12
unsigned long long v18; // rbx
long long v19; // rax
long long v21; // [rsp-10h] [rbp-50h]
long long v22; // [rsp+0h] [rbp-40h]
int v23; // [rsp+8h] [rbp-38h]
v3 = *a1;
v4 = *(unsigned int *)(*a1 + 1000LL);
if ( !v4 )
return 0;
v6 = *(_QWORD *)(v3 + 1392);
v7 = 0LL;
v8 = 0LL;
v9 = 0;
v10 = 0;
do
{
if ( (*(_BYTE *)(v6 + 280 * v7 + 162) & 1) != 0 )
{
v11 = v7 + 1;
}
else
{
v11 = v7 + 1;
if ( v7 + 1 != *(_DWORD *)(v3 + 1004) )
{
v12 = *(_QWORD *)(v3 + 320);
if ( _bittest64(&v12, v7) )
{
++v10;
v8 |= 1LL << v7;
v9 += *(unsigned __int16 *)(v6 + 280 * v7 + 174) + 32;
}
}
}
v7 = v11;
}
while ( v11 != v4 );
v13 = 0;
if ( v10 )
{
v22 = v8;
if ( (unsigned long long)v10 << 14 <= a2 )
{
if ( !a3 || a3 * v9 >= a2 )
a3 = a2 / (16 * v9);
v13 = 0;
v14 = my_malloc(0LL, 664 * v4 + 16LL * v10, 0LL);
a1[98] = v14;
if ( !v14 )
return 128;
if ( *(_DWORD *)(v3 + 1000) )
{
v23 = a3;
v15 = 664LL * *(unsigned int *)(v3 + 1000) + v14;
v16 = (unsigned __int16 *)(v6 + 174);
v17 = 0LL;
v18 = 0LL;
do
{
v19 = v22;
if ( _bittest64(&v19, v18) )
{
*(_QWORD *)v15 = a1;
*(_DWORD *)(v15 + 8) = v18;
v21 = v15;
v15 += 16LL;
init_tree(
v17 + *((_DWORD *)a1 + 196),
v23 * *v16,
v23 * *v16,
0,
(unsigned int)keys_compare,
(unsigned int)keys_free,
v21,
0LL);
}
else
{
*(_QWORD *)(a1[98] + v17) = 0LL;
}
++v18;
v17 += 664LL;
v16 += 140;
}
while ( v18 < *(unsigned int *)(v3 + 1000) );
return 0;
}
}
}
return v13;
}
| maria_init_bulk_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x30],RDI
MOV R13,qword ptr [RDI]
MOV EDI,dword ptr [R13 + 0x3e8]
TEST RDI,RDI
JZ 0x0016d5f2
MOV RBX,RDX
MOV R14,qword ptr [R13 + 0x570]
XOR ECX,ECX
XOR R15D,R15D
XOR R8D,R8D
XOR EAX,EAX
LAB_0016d476:
IMUL R9,RCX,0x118
TEST byte ptr [R14 + R9*0x1 + 0xa2],0x1
JNZ 0x0016d4c7
MOV R10D,dword ptr [R13 + 0x3ec]
LEA RDX,[RCX + 0x1]
CMP RDX,R10
JZ 0x0016d4cd
MOV R11,qword ptr [R13 + 0x140]
MOV R10D,0x1
SHL R10,CL
BT R11,RCX
JNC 0x0016d4cd
ADD R9,R14
INC EAX
OR R15,R10
MOVZX ECX,word ptr [R9 + 0xae]
ADD R8D,ECX
ADD R8D,0x20
JMP 0x0016d4cd
LAB_0016d4c7:
INC RCX
MOV RDX,RCX
LAB_0016d4cd:
MOV RCX,RDX
CMP RDX,RDI
JNZ 0x0016d476
XOR R12D,R12D
TEST EAX,EAX
JZ 0x0016d5f5
MOV qword ptr [RBP + -0x40],R15
MOV ECX,EAX
MOV RAX,RCX
SHL RAX,0xe
CMP RAX,RSI
JA 0x0016d5f5
TEST RBX,RBX
JZ 0x0016d507
MOV EAX,R8D
IMUL RAX,RBX
CMP RAX,RSI
JC 0x0016d516
LAB_0016d507:
SHL R8D,0x4
MOV RAX,RSI
XOR EDX,EDX
DIV R8
MOV RBX,RAX
LAB_0016d516:
IMUL RAX,RDI,0x298
SHL RCX,0x4
ADD RCX,RAX
XOR R12D,R12D
XOR EDI,EDI
MOV RSI,RCX
XOR EDX,EDX
CALL 0x001bf321
MOV R15,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x310],R15
TEST R15,R15
JZ 0x0016d607
MOV EAX,dword ptr [R13 + 0x3e8]
TEST RAX,RAX
JZ 0x0016d5f5
MOV qword ptr [RBP + -0x38],RBX
IMUL RAX,RAX,0x298
ADD R15,RAX
ADD R14,0xae
XOR R12D,R12D
XOR EBX,EBX
LAB_0016d574:
MOV RAX,qword ptr [RBP + -0x40]
BT RAX,RBX
JNC 0x0016d5c2
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [R15],RAX
MOV dword ptr [R15 + 0x8],EBX
MOV RDI,qword ptr [RAX + 0x310]
ADD RDI,R12
MOVZX EDX,word ptr [R14]
IMUL RDX,qword ptr [RBP + -0x38]
MOV RSI,RDX
XOR ECX,ECX
LEA R8,[0x16d60f]
LEA R9,[0x16d650]
PUSH 0x0
PUSH R15
ADD R15,0x10
CALL 0x001c400c
ADD RSP,0x10
JMP 0x0016d5d5
LAB_0016d5c2:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x310]
MOV qword ptr [RAX + R12*0x1],0x0
LAB_0016d5d5:
INC RBX
MOV EAX,dword ptr [R13 + 0x3e8]
ADD R12,0x298
ADD R14,0x118
CMP RBX,RAX
JC 0x0016d574
LAB_0016d5f2:
XOR R12D,R12D
LAB_0016d5f5:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016d607:
MOV R12D,0x80
JMP 0x0016d5f5
|
int8 maria_init_bulk_insert(long *param_1,ulong param_2,ulong param_3)
{
long lVar1;
uint uVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
ushort *puVar8;
ulong uVar9;
int8 *puVar10;
lVar1 = *param_1;
uVar5 = (ulong)*(uint *)(lVar1 + 1000);
if (uVar5 != 0) {
lVar7 = *(long *)(lVar1 + 0x570);
uVar4 = 0;
uVar9 = 0;
uVar6 = 0;
uVar2 = 0;
do {
if ((((*(byte *)(lVar7 + 0xa2 + uVar4 * 0x118) & 1) == 0) &&
(uVar4 + 1 != (ulong)*(uint *)(lVar1 + 0x3ec))) &&
((*(ulong *)(lVar1 + 0x140) >> (uVar4 & 0x3f) & 1) != 0)) {
uVar2 = uVar2 + 1;
uVar9 = uVar9 | 1L << ((byte)uVar4 & 0x3f);
uVar6 = (ulong)((int)uVar6 + (uint)*(ushort *)(uVar4 * 0x118 + lVar7 + 0xae) + 0x20);
}
uVar4 = uVar4 + 1;
} while (uVar4 != uVar5);
if (uVar2 == 0) {
return 0;
}
if (param_2 < (ulong)uVar2 << 0xe) {
return 0;
}
if ((param_3 == 0) || (param_2 <= uVar6 * param_3)) {
param_3 = param_2 / (uint)((int)uVar6 << 4);
}
lVar3 = my_malloc(0,(ulong)uVar2 * 0x10 + uVar5 * 0x298,0);
param_1[0x62] = lVar3;
if (lVar3 == 0) {
return 0x80;
}
if ((ulong)*(uint *)(lVar1 + 1000) == 0) {
return 0;
}
puVar10 = (int8 *)(lVar3 + (ulong)*(uint *)(lVar1 + 1000) * 0x298);
puVar8 = (ushort *)(lVar7 + 0xae);
lVar7 = 0;
uVar5 = 0;
do {
if ((uVar9 >> (uVar5 & 0x3f) & 1) == 0) {
*(int8 *)(param_1[0x62] + lVar7) = 0;
}
else {
*puVar10 = param_1;
*(int *)(puVar10 + 1) = (int)uVar5;
init_tree(param_1[0x62] + lVar7,*puVar8 * param_3,*puVar8 * param_3,0,keys_compare,keys_free
,puVar10,0,uVar9,param_3);
puVar10 = puVar10 + 2;
}
uVar5 = uVar5 + 1;
lVar7 = lVar7 + 0x298;
puVar8 = puVar8 + 0x8c;
} while (uVar5 < *(uint *)(lVar1 + 1000));
}
return 0;
}
|
|
5,990 | get_argument | eloqsql/mysys/my_default.c | static char *get_argument(const char *keyword, size_t kwlen,
char *ptr, char *name, uint line)
{
char *end;
/* Skip over "include / includedir keyword" and following whitespace */
for (ptr+= kwlen - 1;
my_isspace(&my_charset_latin1, ptr[0]);
ptr++)
{}
/*
Trim trailing whitespace from directory name
The -1 below is for the newline added by fgets()
Note that my_isspace() is true for \r and \n
*/
for (end= ptr + strlen(ptr) - 1;
my_isspace(&my_charset_latin1, *(end - 1));
end--)
{}
end[0]= 0; /* Cut off end space */
/* Print error msg if there is nothing after !include* directive */
if (end <= ptr)
{
fprintf(stderr,
"error: Wrong '!%s' directive in config file: %s at line %d\n",
keyword, name, line);
return 0;
}
return ptr;
} | O3 | c | get_argument:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r14
movq %rdi, %r12
leaq 0x31c0b7(%rip), %rax # 0x395ef0
movq 0x40(%rax), %r13
leaq (%rsi,%rdx), %r15
addq $-0x2, %r15
movzbl 0x1(%r15), %eax
incq %r15
testb $0x8, 0x1(%r13,%rax)
jne 0x79e45
movq %r15, %rdi
callq 0x3a4c0
addq %r15, %rax
movzbl -0x2(%rax), %ecx
decq %rax
testb $0x8, 0x1(%r13,%rcx)
jne 0x79e60
movb $0x0, (%rax)
cmpq %r15, %rax
ja 0x79ea0
movq 0x2f2142(%rip), %rax # 0x36bfc0
movq (%rax), %rdi
leaq 0x46782(%rip), %rdx # 0xc060a
xorl %r15d, %r15d
movl $0x1, %esi
movq %r12, %rcx
movq %r14, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0x3a2f0
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| get_argument:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, r8d
mov r14, rcx
mov r12, rdi
lea rax, my_charset_latin1
mov r13, [rax+40h]
lea r15, [rsi+rdx]
add r15, 0FFFFFFFFFFFFFFFEh
loc_79E45:
movzx eax, byte ptr [r15+1]
inc r15
test byte ptr [r13+rax+1], 8
jnz short loc_79E45
mov rdi, r15
call _strlen
add rax, r15
loc_79E60:
movzx ecx, byte ptr [rax-2]
dec rax
test byte ptr [r13+rcx+1], 8
jnz short loc_79E60
mov byte ptr [rax], 0
cmp rax, r15
ja short loc_79EA0
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rdx, aErrorWrongSDir; "error: Wrong '!%s' directive in config "...
xor r15d, r15d
mov esi, 1
mov rcx, r12
mov r8, r14
mov r9d, ebx
xor eax, eax
call ___fprintf_chk
loc_79EA0:
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long get_argument(const char *a1, long long a2, long long a3, const char *a4, int a5)
{
long long v7; // r13
unsigned long long v8; // r15
long long v9; // rax
_BYTE *v10; // rax
long long v11; // rcx
v7 = *((_QWORD *)&my_charset_latin1 + 8);
v8 = a2 + a3 - 2;
do
v9 = *(unsigned __int8 *)++v8;
while ( (*(_BYTE *)(v7 + v9 + 1) & 8) != 0 );
v10 = (_BYTE *)(v8 + strlen(v8));
do
{
v11 = (unsigned __int8)*(v10 - 2);
--v10;
}
while ( (*(_BYTE *)(v7 + v11 + 1) & 8) != 0 );
*v10 = 0;
if ( (unsigned long long)v10 <= v8 )
{
v8 = 0LL;
__fprintf_chk(stderr, 1LL, "error: Wrong '!%s' directive in config file: %s at line %d\n", a1, a4, a5);
}
return v8;
}
| get_argument:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,R8D
MOV R14,RCX
MOV R12,RDI
LEA RAX,[0x495ef0]
MOV R13,qword ptr [RAX + 0x40]
LEA R15,[RSI + RDX*0x1]
ADD R15,-0x2
LAB_00179e45:
MOVZX EAX,byte ptr [R15 + 0x1]
INC R15
TEST byte ptr [R13 + RAX*0x1 + 0x1],0x8
JNZ 0x00179e45
MOV RDI,R15
CALL 0x0013a4c0
ADD RAX,R15
LAB_00179e60:
MOVZX ECX,byte ptr [RAX + -0x2]
DEC RAX
TEST byte ptr [R13 + RCX*0x1 + 0x1],0x8
JNZ 0x00179e60
MOV byte ptr [RAX],0x0
CMP RAX,R15
JA 0x00179ea0
MOV RAX,qword ptr [0x0046bfc0]
MOV RDI,qword ptr [RAX]
LEA RDX,[0x1c060a]
XOR R15D,R15D
MOV ESI,0x1
MOV RCX,R12
MOV R8,R14
MOV R9D,EBX
XOR EAX,EAX
CALL 0x0013a2f0
LAB_00179ea0:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
char * get_argument(int8 param_1,long param_2,long param_3,int8 param_4,
int4 param_5)
{
byte *pbVar1;
int *puVar2;
size_t sVar3;
char *pcVar4;
char *__s;
puVar2 = PTR_ctype_latin1_00495f30;
__s = (char *)(param_2 + param_3 + -2);
do {
pbVar1 = (byte *)(__s + 1);
__s = __s + 1;
} while ((PTR_ctype_latin1_00495f30[(ulong)*pbVar1 + 1] & 8) != 0);
sVar3 = strlen(__s);
pcVar4 = __s + sVar3;
do {
pbVar1 = (byte *)(pcVar4 + -2);
pcVar4 = pcVar4 + -1;
} while ((puVar2[(ulong)*pbVar1 + 1] & 8) != 0);
*pcVar4 = '\0';
if (pcVar4 <= __s) {
__s = (char *)0x0;
__fprintf_chk(*(int8 *)PTR_stderr_0046bfc0,1,
"error: Wrong \'!%s\' directive in config file: %s at line %d\n",param_1,param_4,
param_5);
}
return __s;
}
|
|
5,991 | my_numchars_utf16 | eloqsql/strings/ctype-ucs2.c | static size_t
my_numchars_utf16(CHARSET_INFO *cs,
const char *b, const char *e)
{
size_t nchars= 0;
for ( ; ; nchars++)
{
size_t charlen= my_ismbchar(cs, b, e);
if (!charlen)
break;
b+= charlen;
}
return nchars;
} | O0 | c | my_numchars_utf16:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x6ca20
movl %eax, %eax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x692ec
jmp 0x69306
movq -0x28(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x692cc
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
| my_numchars_utf16:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], 0
loc_692CC:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call my_ismbchar_1
mov eax, eax
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_692EC
jmp short loc_69306
loc_692EC:
mov rax, [rbp+var_28]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_692CC
loc_69306:
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
| long long my_numchars_utf16(long long a1, long long a2, long long a3)
{
unsigned int v3; // eax
long long i; // [rsp+10h] [rbp-20h]
for ( i = 0LL; ; ++i )
{
v3 = my_ismbchar_1(a1, a2, a3);
if ( !v3 )
break;
a2 += v3;
}
return i;
}
| my_numchars_utf16:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],0x0
LAB_001692cc:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0016ca20
MOV EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001692ec
JMP 0x00169306
LAB_001692ec:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001692cc
LAB_00169306:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
long my_numchars_utf16(int8 param_1,long param_2,int8 param_3)
{
uint uVar1;
int8 local_28;
int8 local_18;
local_28 = 0;
local_18 = param_2;
while( true ) {
uVar1 = my_ismbchar(param_1,local_18,param_3);
if ((ulong)uVar1 == 0) break;
local_18 = (ulong)uVar1 + local_18;
local_28 = local_28 + 1;
}
return local_28;
}
|
|
5,992 | my_numchars_utf16 | eloqsql/strings/ctype-ucs2.c | static size_t
my_numchars_utf16(CHARSET_INFO *cs,
const char *b, const char *e)
{
size_t nchars= 0;
for ( ; ; nchars++)
{
size_t charlen= my_ismbchar(cs, b, e);
if (!charlen)
break;
b+= charlen;
}
return nchars;
} | O3 | c | my_numchars_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0xb8(%rdi), %rax
callq *0xc0(%rax)
xorl %r12d, %r12d
cmpl $0x2, %eax
jl 0x4cd36
movl %eax, %eax
addq %rax, %r14
incq %r12
movq 0xb8(%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
cmpl $0x1, %eax
jg 0x4cd13
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| my_numchars_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rax, [rdi+0B8h]
call qword ptr [rax+0C0h]
xor r12d, r12d
cmp eax, 2
jl short loc_4CD36
loc_4CD13:
mov eax, eax
add r14, rax
inc r12
mov rax, [r15+0B8h]
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call qword ptr [rax+0C0h]
cmp eax, 1
jg short loc_4CD13
loc_4CD36:
mov rax, r12
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_numchars_utf16(long long a1, long long a2, long long a3)
{
int v5; // eax
long long v6; // r12
v5 = (*(long long (**)(void))(*(_QWORD *)(a1 + 184) + 192LL))();
v6 = 0LL;
if ( v5 >= 2 )
{
do
{
a2 += (unsigned int)v5;
++v6;
v5 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(a1, a2, a3);
}
while ( v5 > 1 );
}
return v6;
}
| my_numchars_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0xb8]
CALL qword ptr [RAX + 0xc0]
XOR R12D,R12D
CMP EAX,0x2
JL 0x0014cd36
LAB_0014cd13:
MOV EAX,EAX
ADD R14,RAX
INC R12
MOV RAX,qword ptr [R15 + 0xb8]
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x1
JG 0x0014cd13
LAB_0014cd36:
MOV RAX,R12
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_numchars_utf16(long param_1,long param_2,int8 param_3)
{
uint uVar1;
long lVar2;
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))();
lVar2 = 0;
while (1 < (int)uVar1) {
param_2 = param_2 + (ulong)uVar1;
lVar2 = lVar2 + 1;
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
}
return lVar2;
}
|
|
5,993 | nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t) | monkey531[P]llama/common/json.hpp | static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("parse_error", id_), "parse error",
position_string(pos), ": ", exception::diagnostics(context), what_arg);
return {id_, pos.chars_read_total, w.c_str()};
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x949a0(%rip), %rsi # 0xedd85
leaq 0x949a4(%rip), %rdx # 0xedd90
leaq 0x8(%rsp), %rdi
callq 0x21530
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl %ebp, %edx
callq 0x570a4
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x5f78c
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movq %r15, (%rsp)
leaq 0x9495c(%rip), %rdx # 0xedd91
leaq 0x98d93(%rip), %r8 # 0xf21cf
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x48(%rsp), %rcx
leaq 0x28(%rsp), %r9
callq 0x5f683
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x5946f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5948a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x594a5
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1a890
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x594bc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
movq (%r14), %r14
movq 0x88(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x57312
leaq 0xd0a88(%rip), %rax # 0x129f60
addq $0x10, %rax
movq %rax, (%rbx)
movq %r14, 0x20(%rbx)
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59504
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x1a890
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x595b1
movq 0x98(%rsp), %rsi
jmp 0x595a4
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x59555
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59575
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x59575
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59595
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x59595
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x595b1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x595b1
movq %rax, %rbx
movq %rbx, %rdi
callq 0x1af20
nop
| _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea r12, [rsp+0D8h+var_C0]
mov [r12-10h], r12
lea rsi, aParseError; "parse_error"
lea rdx, aParseError+0Bh; ""
lea rdi, [rsp+0D8h+var_D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0D8h+var_70]; int
lea rsi, [rsp+0D8h+var_D0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea rdi, [rsp+0D8h+var_90]; int
mov rsi, r14; int
call _ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE; nlohmann::json_abi_v3_11_3::detail::parse_error::position_string(nlohmann::json_abi_v3_11_3::detail::position_t const&)
lea r13, [rsp+0D8h+var_A0]
mov [r13-10h], r13
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
mov [rsp+0D8h+var_D8], r15
lea rdx, aParseError_0; "parse error"
lea r8, aSubtype+9; ": "
lea rdi, [rsp+0D8h+var_50]
lea rsi, [rsp+0D8h+var_70]
lea rcx, [rsp+0D8h+var_90]
lea r9, [rsp+0D8h+var_B0]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_RA12_KcS8_RA3_S9_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&)
mov rdi, [rsp+0D8h+var_B0]; void *
cmp rdi, r13
jz short loc_5946F
mov rsi, [rsp+0D8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5946F:
lea rax, [rsp+0D8h+var_80]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5948A
mov rsi, [rsp+0D8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5948A:
lea rax, [rsp+0D8h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_594A5
mov rsi, [rsp+0D8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_594A5:
mov rdi, [rsp+0D8h+var_D0]; void *
cmp rdi, r12
jz short loc_594BC
mov rsi, [rsp+0D8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_594BC:
mov r14, [r14]
mov rdx, [rsp+0D8h+var_50]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail11parse_errorE; `vtable for'nlohmann::json_abi_v3_11_3::detail::parse_error
add rax, 10h
mov [rbx], rax
mov [rbx+20h], r14
lea rax, [rsp+0D8h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_59504
mov rsi, [rsp+0D8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_59504:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_90]
mov rdi, [rax-10h]
cmp rdi, rax
jz loc_595B1
mov rsi, [rsp+arg_90]
jmp short loc_595A4
mov rbx, rax
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_59555
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_59555:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_59575
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_59575
mov rbx, rax
loc_59575:
lea rax, [rsp+arg_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_59595
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_59595
mov rbx, rax
loc_59595:
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_595B1
mov rsi, [rsp+arg_10]
loc_595A4:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_595B1
mov rbx, rax
loc_595B1:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
long long *a3,
long long a4)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
long long v10; // r14
void *v12; // [rsp+0h] [rbp-D8h]
void *v13[2]; // [rsp+8h] [rbp-D0h] BYREF
_QWORD v14[2]; // [rsp+18h] [rbp-C0h] BYREF
void *v15; // [rsp+28h] [rbp-B0h] BYREF
long long v16; // [rsp+30h] [rbp-A8h]
_QWORD v17[2]; // [rsp+38h] [rbp-A0h] BYREF
int v18[4]; // [rsp+48h] [rbp-90h] BYREF
long long v19; // [rsp+58h] [rbp-80h] BYREF
int v20[4]; // [rsp+68h] [rbp-70h] BYREF
long long v21; // [rsp+78h] [rbp-60h] BYREF
char *v22; // [rsp+88h] [rbp-50h] BYREF
long long v23; // [rsp+98h] [rbp-40h] BYREF
v13[0] = v14;
std::string::_M_construct<char const*>(v13, "parse_error", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v20, (long long)v13, a2);
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](
(int)v18,
(int)a3,
v6,
v7,
v8,
v9,
v12,
(int)v13[0],
(long long)v13[1],
v14[0],
(void *)v14[1],
(int)v15,
v16);
v15 = v17;
v16 = 0LL;
LOBYTE(v17[0]) = 0;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(
(unsigned int)&v22,
(unsigned int)v20,
(unsigned int)"parse error",
(unsigned int)v18,
(unsigned int)": ",
(unsigned int)&v15,
a4);
if ( v15 != v17 )
operator delete(v15, v17[0] + 1LL);
if ( *(long long **)v18 != &v19 )
operator delete(*(void **)v18, v19 + 1);
if ( *(long long **)v20 != &v21 )
operator delete(*(void **)v20, v21 + 1);
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
v10 = *a3;
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v22);
*(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::parse_error + 2;
*((_QWORD *)this + 4) = v10;
if ( v22 != (char *)&v23 )
operator delete(v22, v23 + 1);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LAB_001593de:
LEA RSI,[0x1edd85]
LEA RDX,[0x1edd90]
LEA RDI,[RSP + 0x8]
CALL 0x00121530
LAB_001593f6:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x8]
MOV EDX,EBP
CALL 0x001570a4
LAB_00159407:
LEA RDI,[RSP + 0x48]
MOV RSI,R14
CALL 0x0015f78c
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],0x0
MOV byte ptr [R13],0x0
LAB_0015942a:
MOV qword ptr [RSP],R15
LEA RDX,[0x1edd91]
LEA R8,[0x1f21cf]
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x68]
LEA RCX,[RSP + 0x48]
LEA R9,[RSP + 0x28]
CALL 0x0015f683
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x0015946f
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011a890
LAB_0015946f:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015948a
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011a890
LAB_0015948a:
LEA RAX,[RSP + 0x78]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001594a5
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011a890
LAB_001594a5:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x001594bc
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a890
LAB_001594bc:
MOV R14,qword ptr [R14]
MOV RDX,qword ptr [RSP + 0x88]
LAB_001594c7:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00157312
LAB_001594d1:
LEA RAX,[0x229f60]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x20],R14
LEA RAX,[RSP + 0x98]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00159504
MOV RSI,qword ptr [RSP + 0x98]
INC RSI
CALL 0x0011a890
LAB_00159504:
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(exception *param_1,int param_2,position_t *param_3,string *param_4)
{
int8 uVar1;
long *local_d0 [2];
long local_c0 [2];
int1 *local_b0;
int8 local_a8;
int1 local_a0;
int7 uStack_9f;
long *local_90 [2];
long local_80 [2];
long *local_70 [2];
long local_60 [2];
long *local_50 [2];
long local_40 [2];
/* try { // try from 001593de to 001593f5 has its CatchHandler @ 001595ae */
local_d0[0] = local_c0;
std::__cxx11::string::_M_construct<char_const*>(local_d0,"parse_error","");
/* try { // try from 001593f6 to 00159406 has its CatchHandler @ 00159592 */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_70,(string *)local_d0,param_2);
/* try { // try from 00159407 to 00159413 has its CatchHandler @ 00159572 */
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_
((parse_error *)local_90,param_3);
local_a8 = 0;
local_a0 = 0;
/* try { // try from 0015942a to 00159457 has its CatchHandler @ 0015953b */
local_b0 = &local_a0;
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,char_const(&)[12],std::__cxx11::string,char_const(&)[3],std::__cxx11::string,std::__cxx11::string_const&>
((detail *)local_50,(string *)local_70,"parse error",(string *)local_90,": ",
(string *)&local_b0,param_4);
if (local_b0 != &local_a0) {
operator_delete(local_b0,CONCAT71(uStack_9f,local_a0) + 1);
}
if (local_90[0] != local_80) {
operator_delete(local_90[0],local_80[0] + 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);
}
uVar1 = *(int8 *)param_3;
/* try { // try from 001594c7 to 001594d0 has its CatchHandler @ 00159519 */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,(char *)local_50[0]);
*(int ***)param_1 = &PTR__exception_00229f70;
*(int8 *)(param_1 + 0x20) = uVar1;
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return param_1;
}
|
|
5,994 | pem_pbkdf1 | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/pem.c | static int pem_pbkdf1(unsigned char *key, size_t keylen,
unsigned char *iv,
const unsigned char *pwd, size_t pwdlen)
{
mbedtls_md5_context md5_ctx;
unsigned char md5sum[16];
size_t use_len;
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
mbedtls_md5_init(&md5_ctx);
/*
* key[ 0..15] = MD5(pwd || IV)
*/
if ((ret = mbedtls_md5_starts_ret(&md5_ctx)) != 0) {
goto exit;
}
if ((ret = mbedtls_md5_update_ret(&md5_ctx, pwd, pwdlen)) != 0) {
goto exit;
}
if ((ret = mbedtls_md5_update_ret(&md5_ctx, iv, 8)) != 0) {
goto exit;
}
if ((ret = mbedtls_md5_finish_ret(&md5_ctx, md5sum)) != 0) {
goto exit;
}
if (keylen <= 16) {
memcpy(key, md5sum, keylen);
goto exit;
}
memcpy(key, md5sum, 16);
/*
* key[16..23] = MD5(key[ 0..15] || pwd || IV])
*/
if ((ret = mbedtls_md5_starts_ret(&md5_ctx)) != 0) {
goto exit;
}
if ((ret = mbedtls_md5_update_ret(&md5_ctx, md5sum, 16)) != 0) {
goto exit;
}
if ((ret = mbedtls_md5_update_ret(&md5_ctx, pwd, pwdlen)) != 0) {
goto exit;
}
if ((ret = mbedtls_md5_update_ret(&md5_ctx, iv, 8)) != 0) {
goto exit;
}
if ((ret = mbedtls_md5_finish_ret(&md5_ctx, md5sum)) != 0) {
goto exit;
}
use_len = 16;
if (keylen < 32) {
use_len = keylen - 16;
}
memcpy(key + 16, md5sum, use_len);
exit:
mbedtls_md5_free(&md5_ctx);
mbedtls_platform_zeroize(md5sum, 16);
return ret;
} | O3 | c | pem_pbkdf1:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
callq 0x8abd8
movq %rbp, %rdi
callq 0x8ac0f
testl %eax, %eax
jne 0x98a10
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x8b3f6
testl %eax, %eax
jne 0x98a10
leaq 0x10(%rsp), %rdi
movl $0x8, %edx
movq %r15, %rsi
callq 0x8b3f6
testl %eax, %eax
jne 0x98a10
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x8b4ae
testl %eax, %eax
je 0x98a3a
movl %eax, %ebp
leaq 0x10(%rsp), %rdi
callq 0x8abf7
movq %rsp, %rdi
movl $0x10, %esi
callq 0x8db8c
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x10, %r14
ja 0x98a52
movq %rsp, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xf3a0
xorl %ebp, %ebp
jmp 0x98a12
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
leaq 0x10(%rsp), %rdi
callq 0x8ac0f
testl %eax, %eax
jne 0x98a10
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
movl $0x10, %edx
callq 0x8b3f6
testl %eax, %eax
jne 0x98a10
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x8b3f6
testl %eax, %eax
jne 0x98a10
leaq 0x10(%rsp), %rdi
movl $0x8, %edx
movq %r15, %rsi
callq 0x8b3f6
testl %eax, %eax
jne 0x98a10
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x8b4ae
testl %eax, %eax
jne 0x98a10
leaq -0x10(%r14), %rax
cmpq $0x20, %r14
movl $0x10, %edx
cmovbq %rax, %rdx
addq $0x10, %rbx
movq %rsp, %rsi
movq %rbx, %rdi
jmp 0x98a49
| pem_pbkdf1:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12, r8
mov r13, rcx
mov r15, rdx
mov r14, rsi
mov rbx, rdi
lea rbp, [rsp+98h+var_88]
mov rdi, rbp
call mbedtls_md5_init
mov rdi, rbp
call mbedtls_md5_starts_ret
test eax, eax
jnz short loc_98A10
lea rdi, [rsp+98h+var_88]
mov rsi, r13
mov rdx, r12
call mbedtls_md5_update_ret
test eax, eax
jnz short loc_98A10
lea rdi, [rsp+98h+var_88]
mov edx, 8
mov rsi, r15
call mbedtls_md5_update_ret
test eax, eax
jnz short loc_98A10
lea rdi, [rsp+98h+var_88]
mov rsi, rsp
call mbedtls_md5_finish_ret
test eax, eax
jz short loc_98A3A
loc_98A10:
mov ebp, eax
loc_98A12:
lea rdi, [rsp+98h+var_88]
call mbedtls_md5_free
mov rdi, rsp
mov esi, 10h
call mbedtls_platform_zeroize
mov eax, ebp
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_98A3A:
cmp r14, 10h
ja short loc_98A52
mov rsi, rsp
mov rdi, rbx
mov rdx, r14
loc_98A49:
call _memcpy
xor ebp, ebp
jmp short loc_98A12
loc_98A52:
movaps xmm0, [rsp+98h+var_98]
movups xmmword ptr [rbx], xmm0
lea rdi, [rsp+98h+var_88]
call mbedtls_md5_starts_ret
test eax, eax
jnz short loc_98A10
lea rdi, [rsp+98h+var_88]
mov rsi, rsp
mov edx, 10h
call mbedtls_md5_update_ret
test eax, eax
jnz short loc_98A10
lea rdi, [rsp+98h+var_88]
mov rsi, r13
mov rdx, r12
call mbedtls_md5_update_ret
test eax, eax
jnz loc_98A10
lea rdi, [rsp+98h+var_88]
mov edx, 8
mov rsi, r15
call mbedtls_md5_update_ret
test eax, eax
jnz loc_98A10
lea rdi, [rsp+98h+var_88]
mov rsi, rsp
call mbedtls_md5_finish_ret
test eax, eax
jnz loc_98A10
lea rax, [r14-10h]
cmp r14, 20h ; ' '
mov edx, 10h
cmovb rdx, rax
add rbx, 10h
mov rsi, rsp
mov rdi, rbx
jmp loc_98A49
| long long pem_pbkdf1(_OWORD *a1, unsigned long long a2, int *a3, int *a4, unsigned long long a5)
{
unsigned int updated; // eax
unsigned int v9; // ebp
long long v11; // rdx
__int128 v12; // [rsp+0h] [rbp-98h] BYREF
unsigned int v13[34]; // [rsp+10h] [rbp-88h] BYREF
mbedtls_md5_init((long long)v13);
updated = mbedtls_md5_starts_ret((long long)v13);
if ( updated )
goto LABEL_5;
updated = mbedtls_md5_update_ret((int *)v13, a4, a5);
if ( updated )
goto LABEL_5;
updated = mbedtls_md5_update_ret((int *)v13, a3, 8uLL);
if ( updated )
goto LABEL_5;
updated = mbedtls_md5_finish_ret(v13, &v12);
if ( updated )
goto LABEL_5;
if ( a2 <= 0x10 )
{
v11 = a2;
LABEL_9:
memcpy(a1, &v12, v11);
v9 = 0;
goto LABEL_6;
}
*a1 = v12;
updated = mbedtls_md5_starts_ret((long long)v13);
if ( !updated )
{
updated = mbedtls_md5_update_ret((int *)v13, (int *)&v12, 0x10uLL);
if ( !updated )
{
updated = mbedtls_md5_update_ret((int *)v13, a4, a5);
if ( !updated )
{
updated = mbedtls_md5_update_ret((int *)v13, a3, 8uLL);
if ( !updated )
{
updated = mbedtls_md5_finish_ret(v13, &v12);
if ( !updated )
{
v11 = 16LL;
if ( a2 < 0x20 )
v11 = a2 - 16;
++a1;
goto LABEL_9;
}
}
}
}
}
LABEL_5:
v9 = updated;
LABEL_6:
mbedtls_md5_free((long long)v13);
mbedtls_platform_zeroize((long long)&v12, 16LL);
return v9;
}
| pem_pbkdf1:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12,R8
MOV R13,RCX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
LEA RBP,[RSP + 0x10]
MOV RDI,RBP
CALL 0x0018abd8
MOV RDI,RBP
CALL 0x0018ac0f
TEST EAX,EAX
JNZ 0x00198a10
LEA RDI,[RSP + 0x10]
MOV RSI,R13
MOV RDX,R12
CALL 0x0018b3f6
TEST EAX,EAX
JNZ 0x00198a10
LEA RDI,[RSP + 0x10]
MOV EDX,0x8
MOV RSI,R15
CALL 0x0018b3f6
TEST EAX,EAX
JNZ 0x00198a10
LEA RDI,[RSP + 0x10]
MOV RSI,RSP
CALL 0x0018b4ae
TEST EAX,EAX
JZ 0x00198a3a
LAB_00198a10:
MOV EBP,EAX
LAB_00198a12:
LEA RDI,[RSP + 0x10]
CALL 0x0018abf7
MOV RDI,RSP
MOV ESI,0x10
CALL 0x0018db8c
MOV EAX,EBP
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00198a3a:
CMP R14,0x10
JA 0x00198a52
MOV RSI,RSP
MOV RDI,RBX
MOV RDX,R14
LAB_00198a49:
CALL 0x0010f3a0
XOR EBP,EBP
JMP 0x00198a12
LAB_00198a52:
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RBX],XMM0
LEA RDI,[RSP + 0x10]
CALL 0x0018ac0f
TEST EAX,EAX
JNZ 0x00198a10
LEA RDI,[RSP + 0x10]
MOV RSI,RSP
MOV EDX,0x10
CALL 0x0018b3f6
TEST EAX,EAX
JNZ 0x00198a10
LEA RDI,[RSP + 0x10]
MOV RSI,R13
MOV RDX,R12
CALL 0x0018b3f6
TEST EAX,EAX
JNZ 0x00198a10
LEA RDI,[RSP + 0x10]
MOV EDX,0x8
MOV RSI,R15
CALL 0x0018b3f6
TEST EAX,EAX
JNZ 0x00198a10
LEA RDI,[RSP + 0x10]
MOV RSI,RSP
CALL 0x0018b4ae
TEST EAX,EAX
JNZ 0x00198a10
LEA RAX,[R14 + -0x10]
CMP R14,0x20
MOV EDX,0x10
CMOVC RDX,RAX
ADD RBX,0x10
MOV RSI,RSP
MOV RDI,RBX
JMP 0x00198a49
|
int pem_pbkdf1(int4 *param_1,size_t param_2,int8 param_3,int8 param_4,
int8 param_5)
{
size_t sVar1;
int iVar2;
bool bVar3;
int4 local_98;
int4 uStack_94;
int4 uStack_90;
int4 uStack_8c;
int1 local_88 [88];
mbedtls_md5_init(local_88);
iVar2 = mbedtls_md5_starts_ret(local_88);
if ((((iVar2 == 0) && (iVar2 = mbedtls_md5_update_ret(local_88,param_4,param_5), iVar2 == 0)) &&
(iVar2 = mbedtls_md5_update_ret(local_88,param_3,8), iVar2 == 0)) &&
(iVar2 = mbedtls_md5_finish_ret(local_88,&local_98), iVar2 == 0)) {
if (0x10 < param_2) {
*param_1 = local_98;
param_1[1] = uStack_94;
param_1[2] = uStack_90;
param_1[3] = uStack_8c;
iVar2 = mbedtls_md5_starts_ret(local_88);
if (((iVar2 != 0) || (iVar2 = mbedtls_md5_update_ret(local_88,&local_98,0x10), iVar2 != 0)) ||
((iVar2 = mbedtls_md5_update_ret(local_88,param_4,param_5), iVar2 != 0 ||
((iVar2 = mbedtls_md5_update_ret(local_88,param_3,8), iVar2 != 0 ||
(iVar2 = mbedtls_md5_finish_ret(local_88,&local_98), iVar2 != 0)))))) goto LAB_00198a12;
sVar1 = param_2 - 0x10;
bVar3 = param_2 < 0x20;
param_2 = 0x10;
if (bVar3) {
param_2 = sVar1;
}
param_1 = param_1 + 4;
}
memcpy(param_1,&local_98,param_2);
iVar2 = 0;
}
LAB_00198a12:
mbedtls_md5_free(local_88);
mbedtls_platform_zeroize(&local_98,0x10);
return iVar2;
}
|
|
5,995 | cleanup_dirname | eloqsql/mysys/mf_pack.c | size_t cleanup_dirname(register char *to, const char *from)
{
reg5 size_t length;
reg2 char * pos;
reg3 char * from_ptr;
reg4 char * start;
char parent[5], /* for "FN_PARENTDIR" */
buff[FN_REFLEN + 1],*end_parentdir;
#ifdef BACKSLASH_MBTAIL
CHARSET_INFO *fs= fs_character_set();
#endif
DBUG_ENTER("cleanup_dirname");
DBUG_PRINT("enter",("from: '%s'",from));
start=buff;
from_ptr=(char *) from;
#ifdef FN_DEVCHAR
if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0)
{ /* Skip device part */
length=(size_t) (pos-from_ptr)+1;
start=strnmov(buff,from_ptr,length); from_ptr+=length;
}
#endif
parent[0]=FN_LIBCHAR;
length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent);
for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++)
{
#ifdef BACKSLASH_MBTAIL
uint l;
if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2)))
{
for (l-- ; l ; *++pos= *from_ptr++, l--);
start= pos + 1; /* Don't look inside multi-byte char */
continue;
}
#endif
if (*pos == '/')
*pos = FN_LIBCHAR;
if (*pos == FN_LIBCHAR)
{
if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0)
{ /* If .../../; skip prev */
pos-=length;
if (pos != start)
{ /* not /../ */
pos--;
if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR))
{
if (!home_dir)
{
pos+=length+1; /* Don't unpack ~/.. */
continue;
}
pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */
if (*pos == FN_LIBCHAR)
pos--; /* home ended with '/' */
}
if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR))
{
if (my_getwd(curr_dir,FN_REFLEN,MYF(0)))
{
pos+=length+1; /* Don't unpack ./.. */
continue;
}
pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */
if (*pos == FN_LIBCHAR)
pos--; /* home ended with '/' */
}
end_parentdir=pos;
while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */
pos--;
if (pos[1] == FN_HOMELIB ||
(pos >= start && memcmp(pos, parent, length) == 0))
{ /* Don't remove ~user/ */
pos=strmov(end_parentdir+1,parent);
*pos=FN_LIBCHAR;
continue;
}
}
}
else if ((size_t) (pos-start) == length-1 &&
!memcmp(start,parent+1,length-1))
start=pos; /* Starts with "../" */
else if (pos-start > 0 && pos[-1] == FN_LIBCHAR)
{
#ifdef FN_NETWORK_DRIVES
if (pos-start != 1)
#endif
pos--; /* Remove dupplicate '/' */
}
else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR)
pos-=2; /* Skip /./ */
}
}
(void) strmov(to,buff);
DBUG_PRINT("exit",("to: '%s'",to));
DBUG_RETURN((size_t) (pos-buff));
} | O3 | c | cleanup_dirname:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rsi, %r14
movq %rdi, -0x248(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0x35(%rbp), %r15
movb $0x2f, (%r15)
movw $0x2e2e, 0x1(%r15) # imm = 0x2E2E
movb $0x0, 0x3(%r15)
leaq -0x240(%rbp), %r12
movq %r12, %r13
movzbl (%r14), %eax
movb %al, (%r12)
cmpl $0x2f, %eax
je 0x9b026
testl %eax, %eax
jne 0x9b1de
jmp 0x9b1e9
movb $0x2f, (%r12)
movq %r12, %rax
subq %r13, %rax
cmpq $0x4, %rax
jb 0x9b0fd
movzwl -0x3(%r12), %ecx
xorw -0x35(%rbp), %cx
movb -0x1(%r12), %dl
xorb -0x33(%rbp), %dl
movzbl %dl, %edx
orw %cx, %dx
jne 0x9b11a
leaq -0x3(%r12), %rax
cmpq %r13, %rax
je 0x9b161
leaq -0x4(%r12), %rbx
movb -0x4(%r12), %al
cmpb $0x7e, %al
jne 0x9b0c0
cmpq %r13, %rbx
je 0x9b086
cmpb $0x2f, -0x5(%r12)
jne 0x9b185
leaq 0xb6c84b(%rip), %rax # 0xc078d8
movq (%rax), %rsi
testq %rsi, %rsi
je 0x9b1de
leaq -0x240(%rbp), %rdi
callq 0x29760
leaq -0x1(%rax), %rbx
leaq -0x2(%rax), %rcx
xorl %edx, %edx
cmpb $0x2f, -0x1(%rax)
sete %dl
notq %rdx
cmoveq %rcx, %rbx
movb (%rax,%rdx), %al
cmpb $0x2e, %al
jne 0x9b185
cmpq %r13, %rbx
leaq 0xb6c81e(%rip), %r12 # 0xc078f0
je 0x9b0de
cmpb $0x2f, -0x1(%rbx)
jne 0x9b185
movl $0x200, %esi # imm = 0x200
movq %r12, %rdi
xorl %edx, %edx
callq 0x9e5c0
testl %eax, %eax
je 0x9b166
addq $0x4, %rbx
movq %rbx, %r12
jmp 0x9b1de
cmpq $0x2, %rax
jne 0x9b11a
movzwl (%r13), %eax
cmpw -0x34(%rbp), %ax
je 0x9b15c
movb -0x1(%r12), %cl
cmpb $0x2f, %cl
je 0x9b12d
jmp 0x9b13f
testq %rax, %rax
jle 0x9b1de
movb -0x1(%r12), %cl
cmpb $0x2f, %cl
jne 0x9b135
decq %r12
jmp 0x9b1de
cmpq $0x1, %rax
je 0x9b1de
cmpb $0x2e, %cl
jne 0x9b1de
leaq -0x2(%r12), %rax
cmpb $0x2f, -0x2(%r12)
cmoveq %rax, %r12
jmp 0x9b1de
movq %r12, %r13
jmp 0x9b1de
movq %rax, %r12
jmp 0x9b1de
leaq -0x240(%rbp), %rdi
movq %r12, %rsi
callq 0x29760
leaq -0x1(%rax), %rbx
leaq -0x2(%rax), %rcx
cmpb $0x2f, -0x1(%rax)
cmoveq %rcx, %rbx
movq %rbx, %r12
cmpq %r13, %rbx
jb 0x9b19f
movq %rbx, %r12
cmpb $0x2f, (%r12)
je 0x9b1a9
decq %r12
cmpq %r13, %r12
jae 0x9b190
cmpb $0x7e, 0x1(%r12)
je 0x9b1ca
jmp 0x9b1de
cmpb $0x7e, 0x1(%r12)
je 0x9b1ca
movzwl (%r12), %eax
xorw -0x35(%rbp), %ax
movb 0x2(%r12), %cl
xorb -0x33(%rbp), %cl
movzbl %cl, %ecx
orw %ax, %cx
jne 0x9b1de
incq %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x29760
movq %rax, %r12
movb $0x2f, (%rax)
incq %r14
incq %r12
jmp 0x9b00c
leaq -0x240(%rbp), %rbx
movq -0x248(%rbp), %rdi
movq %rbx, %rsi
callq 0x29350
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x9b226
subq %rbx, %r12
movq %r12, %rax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29250
| cleanup_dirname:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 228h
mov r14, rsi
mov [rbp+var_248], rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea r15, [rbp+var_35]
mov byte ptr [r15], 2Fh ; '/'
mov word ptr [r15+1], 2E2Eh
mov byte ptr [r15+3], 0
lea r12, [rbp+var_240]
mov r13, r12
loc_9B00C:
movzx eax, byte ptr [r14]
mov [r12], al
cmp eax, 2Fh ; '/'
jz short loc_9B026
test eax, eax
jnz loc_9B1DE
jmp loc_9B1E9
loc_9B026:
mov byte ptr [r12], 2Fh ; '/'
mov rax, r12
sub rax, r13
cmp rax, 4
jb loc_9B0FD
movzx ecx, word ptr [r12-3]
xor cx, [rbp+var_35]
mov dl, [r12-1]
xor dl, [rbp+var_33]
movzx edx, dl
or dx, cx
jnz loc_9B11A
lea rax, [r12-3]
cmp rax, r13
jz loc_9B161
lea rbx, [r12-4]
mov al, [r12-4]
cmp al, 7Eh ; '~'
jnz short loc_9B0C0
cmp rbx, r13
jz short loc_9B086
cmp byte ptr [r12-5], 2Fh ; '/'
jnz loc_9B185
loc_9B086:
lea rax, home_dir
mov rsi, [rax]
test rsi, rsi
jz loc_9B1DE
lea rdi, [rbp+var_240]
call _stpcpy
lea rbx, [rax-1]
lea rcx, [rax-2]
xor edx, edx
cmp byte ptr [rax-1], 2Fh ; '/'
setz dl
not rdx
cmovz rbx, rcx
mov al, [rax+rdx]
loc_9B0C0:
cmp al, 2Eh ; '.'
jnz loc_9B185
cmp rbx, r13
lea r12, curr_dir
jz short loc_9B0DE
cmp byte ptr [rbx-1], 2Fh ; '/'
jnz loc_9B185
loc_9B0DE:
mov esi, 200h
mov rdi, r12
xor edx, edx
call my_getwd
test eax, eax
jz short loc_9B166
add rbx, 4
mov r12, rbx
jmp loc_9B1DE
loc_9B0FD:
cmp rax, 2
jnz short loc_9B11A
movzx eax, word ptr [r13+0]
cmp ax, [rbp+var_35+1]
jz short loc_9B15C
mov cl, [r12-1]
cmp cl, 2Fh ; '/'
jz short loc_9B12D
jmp short loc_9B13F
loc_9B11A:
test rax, rax
jle loc_9B1DE
mov cl, [r12-1]
cmp cl, 2Fh ; '/'
jnz short loc_9B135
loc_9B12D:
dec r12
jmp loc_9B1DE
loc_9B135:
cmp rax, 1
jz loc_9B1DE
loc_9B13F:
cmp cl, 2Eh ; '.'
jnz loc_9B1DE
lea rax, [r12-2]
cmp byte ptr [r12-2], 2Fh ; '/'
cmovz r12, rax
jmp loc_9B1DE
loc_9B15C:
mov r13, r12
jmp short loc_9B1DE
loc_9B161:
mov r12, rax
jmp short loc_9B1DE
loc_9B166:
lea rdi, [rbp+var_240]
mov rsi, r12
call _stpcpy
lea rbx, [rax-1]
lea rcx, [rax-2]
cmp byte ptr [rax-1], 2Fh ; '/'
cmovz rbx, rcx
loc_9B185:
mov r12, rbx
cmp rbx, r13
jb short loc_9B19F
mov r12, rbx
loc_9B190:
cmp byte ptr [r12], 2Fh ; '/'
jz short loc_9B1A9
dec r12
cmp r12, r13
jnb short loc_9B190
loc_9B19F:
cmp byte ptr [r12+1], 7Eh ; '~'
jz short loc_9B1CA
jmp short loc_9B1DE
loc_9B1A9:
cmp byte ptr [r12+1], 7Eh ; '~'
jz short loc_9B1CA
movzx eax, word ptr [r12]
xor ax, [rbp+var_35]
mov cl, [r12+2]
xor cl, [rbp+var_33]
movzx ecx, cl
or cx, ax
jnz short loc_9B1DE
loc_9B1CA:
inc rbx
mov rdi, rbx
mov rsi, r15
call _stpcpy
mov r12, rax
mov byte ptr [rax], 2Fh ; '/'
loc_9B1DE:
inc r14
inc r12
jmp loc_9B00C
loc_9B1E9:
lea rbx, [rbp+var_240]
mov rdi, [rbp+var_248]
mov rsi, rbx
call _strcpy
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_9B226
sub r12, rbx
mov rax, r12
add rsp, 228h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9B226:
call ___stack_chk_fail
| long long cleanup_dirname(long long a1, unsigned __int8 *a2)
{
_BYTE *v3; // r12
_WORD *v4; // r13
int v5; // eax
long long v6; // rax
_BYTE *v7; // rbx
char v8; // al
long long v9; // rax
char v10; // cl
long long v11; // rax
long long v13; // [rsp+8h] [rbp-248h]
_BYTE v14[523]; // [rsp+10h] [rbp-240h] BYREF
char v15[5]; // [rsp+21Bh] [rbp-35h] BYREF
unsigned long long v16; // [rsp+220h] [rbp-30h]
v13 = a1;
v16 = __readfsqword(0x28u);
strcpy(v15, "/..");
v3 = v14;
v4 = v14;
while ( 1 )
{
v5 = *a2;
*v3 = v5;
if ( v5 != 47 )
break;
*v3 = 47;
v6 = v3 - (_BYTE *)v4;
if ( (unsigned long long)(v3 - (_BYTE *)v4) < 4 )
{
if ( v6 == 2 )
{
if ( *v4 == *(_WORD *)&v15[1] )
{
v4 = v3;
goto LABEL_45;
}
v10 = *(v3 - 1);
if ( v10 == 47 )
goto LABEL_26;
LABEL_28:
if ( v10 == 46 && *(v3 - 2) == 47 )
v3 -= 2;
goto LABEL_45;
}
}
else if ( !((unsigned __int16)(*(_WORD *)v15 ^ *(_WORD *)(v3 - 3)) | (unsigned __int8)(v15[2] ^ *(v3 - 1))) )
{
if ( v3 - 3 == (_BYTE *)v4 )
{
v3 -= 3;
goto LABEL_45;
}
v7 = v3 - 4;
v8 = *(v3 - 4);
if ( v8 == 126 )
{
if ( v7 == (_BYTE *)v4 || *(v3 - 5) == 47 )
{
if ( !home_dir )
goto LABEL_45;
v9 = stpcpy(v14, home_dir);
v7 = (_BYTE *)(v9 - 1);
if ( *(_BYTE *)(v9 - 1) == 47 )
v7 = (_BYTE *)(v9 - 2);
v8 = *(_BYTE *)(v9 + ~(unsigned long long)(*(_BYTE *)(v9 - 1) == 47));
goto LABEL_15;
}
}
else
{
LABEL_15:
if ( v8 == 46 && (v7 == (_BYTE *)v4 || *(v7 - 1) == 47) )
{
if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) )
{
v3 = v7 + 4;
goto LABEL_45;
}
v11 = stpcpy(v14, &curr_dir);
v7 = (_BYTE *)(v11 - 1);
if ( *(_BYTE *)(v11 - 1) == 47 )
v7 = (_BYTE *)(v11 - 2);
}
}
v3 = v7;
if ( v7 < (_BYTE *)v4 )
{
LABEL_40:
if ( v3[1] == 126 )
goto LABEL_44;
}
else
{
v3 = v7;
while ( *v3 != 47 )
{
if ( --v3 < (_BYTE *)v4 )
goto LABEL_40;
}
if ( v3[1] == 126 || !((unsigned __int16)(*(_WORD *)v15 ^ *(_WORD *)v3) | (unsigned __int8)(v15[2] ^ v3[2])) )
{
LABEL_44:
v3 = (_BYTE *)stpcpy(v7 + 1, v15);
*v3 = 47;
goto LABEL_45;
}
}
goto LABEL_45;
}
if ( v6 <= 0 )
goto LABEL_45;
v10 = *(v3 - 1);
if ( v10 == 47 )
{
LABEL_26:
--v3;
goto LABEL_45;
}
if ( v6 != 1 )
goto LABEL_28;
LABEL_45:
++a2;
++v3;
}
if ( v5 )
goto LABEL_45;
strcpy(v13, v14);
return v3 - v14;
}
| cleanup_dirname:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV R14,RSI
MOV qword ptr [RBP + -0x248],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA R15,[RBP + -0x35]
MOV byte ptr [R15],0x2f
MOV word ptr [R15 + 0x1],0x2e2e
MOV byte ptr [R15 + 0x3],0x0
LEA R12,[RBP + -0x240]
MOV R13,R12
LAB_0019b00c:
MOVZX EAX,byte ptr [R14]
MOV byte ptr [R12],AL
CMP EAX,0x2f
JZ 0x0019b026
TEST EAX,EAX
JNZ 0x0019b1de
JMP 0x0019b1e9
LAB_0019b026:
MOV byte ptr [R12],0x2f
MOV RAX,R12
SUB RAX,R13
CMP RAX,0x4
JC 0x0019b0fd
MOVZX ECX,word ptr [R12 + -0x3]
XOR CX,word ptr [RBP + -0x35]
MOV DL,byte ptr [R12 + -0x1]
XOR DL,byte ptr [RBP + -0x33]
MOVZX EDX,DL
OR DX,CX
JNZ 0x0019b11a
LEA RAX,[R12 + -0x3]
CMP RAX,R13
JZ 0x0019b161
LEA RBX,[R12 + -0x4]
MOV AL,byte ptr [R12 + -0x4]
CMP AL,0x7e
JNZ 0x0019b0c0
CMP RBX,R13
JZ 0x0019b086
CMP byte ptr [R12 + -0x5],0x2f
JNZ 0x0019b185
LAB_0019b086:
LEA RAX,[0xd078d8]
MOV RSI,qword ptr [RAX]
TEST RSI,RSI
JZ 0x0019b1de
LEA RDI,[RBP + -0x240]
CALL 0x00129760
LEA RBX,[RAX + -0x1]
LEA RCX,[RAX + -0x2]
XOR EDX,EDX
CMP byte ptr [RAX + -0x1],0x2f
SETZ DL
NOT RDX
CMOVZ RBX,RCX
MOV AL,byte ptr [RAX + RDX*0x1]
LAB_0019b0c0:
CMP AL,0x2e
JNZ 0x0019b185
CMP RBX,R13
LEA R12,[0xd078f0]
JZ 0x0019b0de
CMP byte ptr [RBX + -0x1],0x2f
JNZ 0x0019b185
LAB_0019b0de:
MOV ESI,0x200
MOV RDI,R12
XOR EDX,EDX
CALL 0x0019e5c0
TEST EAX,EAX
JZ 0x0019b166
ADD RBX,0x4
MOV R12,RBX
JMP 0x0019b1de
LAB_0019b0fd:
CMP RAX,0x2
JNZ 0x0019b11a
MOVZX EAX,word ptr [R13]
CMP AX,word ptr [RBP + -0x34]
JZ 0x0019b15c
MOV CL,byte ptr [R12 + -0x1]
CMP CL,0x2f
JZ 0x0019b12d
JMP 0x0019b13f
LAB_0019b11a:
TEST RAX,RAX
JLE 0x0019b1de
MOV CL,byte ptr [R12 + -0x1]
CMP CL,0x2f
JNZ 0x0019b135
LAB_0019b12d:
DEC R12
JMP 0x0019b1de
LAB_0019b135:
CMP RAX,0x1
JZ 0x0019b1de
LAB_0019b13f:
CMP CL,0x2e
JNZ 0x0019b1de
LEA RAX,[R12 + -0x2]
CMP byte ptr [R12 + -0x2],0x2f
CMOVZ R12,RAX
JMP 0x0019b1de
LAB_0019b15c:
MOV R13,R12
JMP 0x0019b1de
LAB_0019b161:
MOV R12,RAX
JMP 0x0019b1de
LAB_0019b166:
LEA RDI,[RBP + -0x240]
MOV RSI,R12
CALL 0x00129760
LEA RBX,[RAX + -0x1]
LEA RCX,[RAX + -0x2]
CMP byte ptr [RAX + -0x1],0x2f
CMOVZ RBX,RCX
LAB_0019b185:
MOV R12,RBX
CMP RBX,R13
JC 0x0019b19f
MOV R12,RBX
LAB_0019b190:
CMP byte ptr [R12],0x2f
JZ 0x0019b1a9
DEC R12
CMP R12,R13
JNC 0x0019b190
LAB_0019b19f:
CMP byte ptr [R12 + 0x1],0x7e
JZ 0x0019b1ca
JMP 0x0019b1de
LAB_0019b1a9:
CMP byte ptr [R12 + 0x1],0x7e
JZ 0x0019b1ca
MOVZX EAX,word ptr [R12]
XOR AX,word ptr [RBP + -0x35]
MOV CL,byte ptr [R12 + 0x2]
XOR CL,byte ptr [RBP + -0x33]
MOVZX ECX,CL
OR CX,AX
JNZ 0x0019b1de
LAB_0019b1ca:
INC RBX
MOV RDI,RBX
MOV RSI,R15
CALL 0x00129760
MOV R12,RAX
MOV byte ptr [RAX],0x2f
LAB_0019b1de:
INC R14
INC R12
JMP 0x0019b00c
LAB_0019b1e9:
LEA RBX,[RBP + -0x240]
MOV RDI,qword ptr [RBP + -0x248]
MOV RSI,RBX
CALL 0x00129350
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0019b226
SUB R12,RBX
MOV RAX,R12
ADD RSP,0x228
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019b226:
CALL 0x00129250
|
long cleanup_dirname(char *param_1,char *param_2)
{
char cVar1;
int iVar2;
ulong uVar3;
char *pcVar4;
short *psVar5;
short *psVar6;
short *psVar7;
short *psVar8;
short *psVar9;
long in_FS_OFFSET;
short local_248 [261];
int1 local_3d [2];
char cStack_3b;
int1 local_3a;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
_local_3d = 0x2e2e2f;
local_3a = 0;
psVar7 = local_248;
psVar8 = psVar7;
do {
cVar1 = *param_2;
*(char *)psVar7 = cVar1;
psVar5 = psVar7;
psVar9 = psVar8;
if (cVar1 == '/') {
*(char *)psVar7 = '/';
uVar3 = (long)psVar7 - (long)psVar8;
if (uVar3 < 4) {
if (uVar3 != 2) goto LAB_0019b11a;
psVar9 = psVar7;
if (*psVar8 == stack0xffffffffffffffc4) goto LAB_0019b1de;
cVar1 = *(char *)((long)psVar7 + -1);
if (cVar1 == '/') goto LAB_0019b12d;
LAB_0019b13f:
psVar9 = psVar8;
if ((cVar1 == '.') && ((char)psVar7[-1] == '/')) {
psVar5 = psVar7 + -1;
}
}
else if (*(char *)((long)psVar7 + -1) == cStack_3b &&
(int1 [2])*(short *)((long)psVar7 + -3) == local_3d) {
psVar5 = (short *)((long)psVar7 + -3);
if (psVar5 == psVar8) goto LAB_0019b1de;
psVar5 = psVar7 + -2;
cVar1 = (char)psVar7[-2];
if (cVar1 == '~') {
if ((psVar5 == psVar8) || (psVar6 = psVar5, *(char *)((long)psVar7 + -5) == '/')) {
psVar5 = psVar7;
if (home_dir == (char *)0x0) goto LAB_0019b1de;
pcVar4 = stpcpy((char *)local_248,home_dir);
psVar5 = (short *)(pcVar4 + -1);
if (pcVar4[-1] == '/') {
psVar5 = (short *)(pcVar4 + -2);
}
cVar1 = pcVar4[~(ulong)(pcVar4[-1] == '/')];
goto LAB_0019b0c0;
}
}
else {
LAB_0019b0c0:
psVar6 = psVar5;
if ((cVar1 == '.') && ((psVar5 == psVar8 || (*(char *)((long)psVar5 + -1) == '/')))) {
iVar2 = my_getwd(&curr_dir,0x200,0);
if (iVar2 != 0) {
psVar5 = psVar5 + 2;
goto LAB_0019b1de;
}
pcVar4 = stpcpy((char *)local_248,&curr_dir);
psVar5 = (short *)(pcVar4 + -1);
psVar6 = (short *)(pcVar4 + -1);
if (pcVar4[-1] == '/') {
psVar5 = (short *)(pcVar4 + -2);
psVar6 = (short *)(pcVar4 + -2);
}
}
}
for (; psVar8 <= psVar5; psVar5 = (short *)((long)psVar5 + -1)) {
if ((char)*psVar5 == '/') {
if (*(char *)((long)psVar5 + 1) == '~') goto LAB_0019b1ca;
if ((char)psVar5[1] != cStack_3b || (int1 [2])*psVar5 != local_3d)
goto LAB_0019b1de;
goto LAB_0019b1ca;
}
}
if (*(char *)((long)psVar5 + 1) == '~') {
LAB_0019b1ca:
psVar5 = (short *)stpcpy((char *)((long)psVar6 + 1),local_3d);
*(int1 *)psVar5 = 0x2f;
}
}
else {
LAB_0019b11a:
if (0 < (long)uVar3) {
cVar1 = *(char *)((long)psVar7 + -1);
if (cVar1 == '/') {
LAB_0019b12d:
psVar5 = (short *)((long)psVar7 + -1);
psVar9 = psVar8;
}
else if (uVar3 != 1) goto LAB_0019b13f;
}
}
}
else if (cVar1 == '\0') {
strcpy(param_1,(char *)local_248);
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return (long)psVar7 - (long)local_248;
}
LAB_0019b1de:
param_2 = param_2 + 1;
psVar7 = (short *)((long)psVar5 + 1);
psVar8 = psVar9;
} while( true );
}
|
|
5,996 | lf_alloc_destroy | eloqsql/mysys/lf_alloc-pin.c | void lf_alloc_destroy(LF_ALLOCATOR *allocator)
{
uchar *node= allocator->top;
while (node)
{
uchar *tmp= anext_node(node);
if (allocator->destructor)
allocator->destructor(node);
my_free(node);
node= tmp;
}
lf_pinbox_destroy(&allocator->pinbox);
allocator->top= 0;
} | O3 | c | lf_alloc_destroy:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rdi), %r14
testq %r14, %r14
je 0xa8854
movl 0x38(%rbx), %eax
movq (%r14,%rax), %r15
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0xa8844
movq %r14, %rdi
callq *%rax
movq %r14, %rdi
callq 0xa2e9e
movq %r15, %r14
testq %r15, %r15
jne 0xa882f
movq %rbx, %rdi
callq 0xa89e7
movq $0x0, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| lf_alloc_destroy:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+48h]
test r14, r14
jz short loc_A8854
loc_A882F:
mov eax, [rbx+38h]
mov r15, [r14+rax]
mov rax, [rbx+60h]
test rax, rax
jz short loc_A8844
mov rdi, r14
call rax
loc_A8844:
mov rdi, r14
call my_free
mov r14, r15
test r15, r15
jnz short loc_A882F
loc_A8854:
mov rdi, rbx
call lf_dynarray_destroy
mov qword ptr [rbx+48h], 0
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long lf_alloc_destroy(long long a1)
{
long long v1; // r14
long long v2; // r15
void ( *v3)(long long); // rax
long long result; // rax
v1 = *(_QWORD *)(a1 + 72);
if ( v1 )
{
do
{
v2 = *(_QWORD *)(v1 + *(unsigned int *)(a1 + 56));
v3 = *(void ( **)(long long))(a1 + 96);
if ( v3 )
v3(v1);
my_free(v1);
v1 = v2;
}
while ( v2 );
}
result = lf_dynarray_destroy(a1);
*(_QWORD *)(a1 + 72) = 0LL;
return result;
}
| lf_alloc_destroy:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x48]
TEST R14,R14
JZ 0x001a8854
LAB_001a882f:
MOV EAX,dword ptr [RBX + 0x38]
MOV R15,qword ptr [R14 + RAX*0x1]
MOV RAX,qword ptr [RBX + 0x60]
TEST RAX,RAX
JZ 0x001a8844
MOV RDI,R14
CALL RAX
LAB_001a8844:
MOV RDI,R14
CALL 0x001a2e9e
MOV R14,R15
TEST R15,R15
JNZ 0x001a882f
LAB_001a8854:
MOV RDI,RBX
CALL 0x001a89e7
MOV qword ptr [RBX + 0x48],0x0
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void lf_alloc_destroy(long param_1)
{
long lVar1;
long lVar2;
lVar2 = *(long *)(param_1 + 0x48);
while (lVar2 != 0) {
lVar1 = *(long *)(lVar2 + (ulong)*(uint *)(param_1 + 0x38));
if (*(code **)(param_1 + 0x60) != (code *)0x0) {
(**(code **)(param_1 + 0x60))(lVar2);
}
my_free(lVar2);
lVar2 = lVar1;
}
lf_dynarray_destroy(param_1);
*(int8 *)(param_1 + 0x48) = 0;
return;
}
|
|
5,997 | translog_start_buffer | eloqsql/storage/maria/ma_loghandler.c | static void translog_start_buffer(struct st_translog_buffer *buffer,
struct st_buffer_cursor *cursor,
uint buffer_no)
{
DBUG_ENTER("translog_start_buffer");
DBUG_PRINT("enter",
("Assign buffer: #%u (%p) offset: 0x%x(%u)",
(uint) buffer->buffer_no, buffer,
(uint) LSN_OFFSET(log_descriptor.horizon),
(uint) LSN_OFFSET(log_descriptor.horizon)));
DBUG_ASSERT(buffer_no == buffer->buffer_no);
buffer->pre_force_close_horizon=
buffer->prev_last_lsn= buffer->last_lsn= LSN_IMPOSSIBLE;
DBUG_PRINT("info", ("last_lsn and prev_last_lsn set to 0 buffer: %p",
buffer));
buffer->offset= log_descriptor.horizon;
buffer->next_buffer_offset= LSN_IMPOSSIBLE;
buffer->file= get_current_logfile();
buffer->overlay= 0;
buffer->size= 0;
buffer->skipped_data= 0;
translog_cursor_init(cursor, buffer, buffer_no);
DBUG_PRINT("info", ("file: #%ld (%d) init cursor #%u: %p "
"chaser: %d Size: %lu (%lu)",
(long) (buffer->file ? buffer->file->number : 0),
(buffer->file ? buffer->file->handler.file : -1),
(uint) cursor->buffer->buffer_no, cursor->buffer,
cursor->chaser, (ulong) cursor->buffer->size,
(ulong) (cursor->ptr - cursor->buffer->buffer)));
translog_check_cursor(cursor);
mysql_mutex_lock(&log_descriptor.dirty_buffer_mask_lock);
log_descriptor.dirty_buffer_mask|= (1 << buffer->buffer_no);
mysql_mutex_unlock(&log_descriptor.dirty_buffer_mask_lock);
DBUG_VOID_RETURN;
} | O3 | c | translog_start_buffer:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
xorl %r12d, %r12d
movq %r12, 0x100028(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x100000(%rdi)
movq 0xbe30c1(%rip), %rax # 0xc277f8
movq %rax, 0x100010(%rdi)
movq %r12, 0x100018(%rdi)
callq 0x4a9c0
movq %rax, 0x100038(%rbx)
movb %r12b, 0x100088(%rbx)
movq %r12, 0x100030(%rbx)
movq %rbx, 0x20(%r15)
movq %rbx, 0x28(%r15)
movb %r14b, 0x36(%r15)
movw $0x0, 0x30(%r15)
leaq 0xbe3087(%rip), %rax # 0xc27800
cmpq %rax, %r15
setne 0x37(%r15)
movl $0x0, 0x32(%r15)
movb %r12b, 0x38(%r15)
cmpq %r12, 0xbe305c(%rip) # 0xc277f0
jne 0x447d5
leaq 0xbe3013(%rip), %rdi # 0xc277b0
callq 0x2a230
movb 0x10008c(%rbx), %cl
movl $0x1, %eax
shll %cl, %eax
orb %al, 0xbe2ff3(%rip) # 0xc277a8
movq 0xbe3034(%rip), %rdi # 0xc277f0
testq %rdi, %rdi
jne 0x447dc
leaq 0xbe2fe8(%rip), %rdi # 0xc277b0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2a1f0
callq 0x2cffb
jmp 0x447a2
leaq 0x36a235(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x447c1
| translog_start_buffer:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14d, edx
mov r15, rsi
mov rbx, rdi
xor r12d, r12d
mov [rdi+100028h], r12
xorps xmm0, xmm0
movups xmmword ptr [rdi+100000h], xmm0
mov rax, cs:qword_C277F8
mov [rdi+100010h], rax
mov [rdi+100018h], r12
call get_current_logfile
mov [rbx+100038h], rax
mov [rbx+100088h], r12b
mov [rbx+100030h], r12
mov [r15+20h], rbx
mov [r15+28h], rbx
mov [r15+36h], r14b
mov word ptr [r15+30h], 0
lea rax, xmmword_C27800
cmp r15, rax
setnz byte ptr [r15+37h]
mov dword ptr [r15+32h], 0
mov [r15+38h], r12b
cmp cs:qword_C277F0, r12
jnz short loc_447D5
lea rdi, unk_C277B0
call _pthread_mutex_lock
loc_447A2:
mov cl, [rbx+10008Ch]
mov eax, 1
shl eax, cl
or cs:byte_C277A8, al
mov rdi, cs:qword_C277F0
test rdi, rdi
jnz short loc_447DC
loc_447C1:
lea rdi, unk_C277B0
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_447D5:
call translog_start_buffer_cold_1
jmp short loc_447A2
loc_447DC:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_447C1
| long long translog_start_buffer(long long a1, __int128 *a2, char a3)
{
*(_QWORD *)(a1 + 1048616) = 0LL;
*(_OWORD *)(a1 + 0x100000) = 0LL;
*(_QWORD *)(a1 + 1048592) = qword_C277F8;
*(_QWORD *)(a1 + 1048600) = 0LL;
*(_QWORD *)(a1 + 1048632) = get_current_logfile();
*(_BYTE *)(a1 + 1048712) = 0;
*(_QWORD *)(a1 + 1048624) = 0LL;
*((_QWORD *)a2 + 4) = a1;
*((_QWORD *)a2 + 5) = a1;
*((_BYTE *)a2 + 54) = a3;
*((_WORD *)a2 + 24) = 0;
*((_BYTE *)a2 + 55) = a2 != &xmmword_C27800;
*(_DWORD *)((char *)a2 + 50) = 0;
*((_BYTE *)a2 + 56) = 0;
if ( qword_C277F0 )
translog_start_buffer_cold_1();
else
pthread_mutex_lock(&unk_C277B0);
byte_C277A8 |= 1 << *(_BYTE *)(a1 + 1048716);
if ( qword_C277F0 )
PSI_server[44]();
return pthread_mutex_unlock(&unk_C277B0);
}
| translog_start_buffer:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14D,EDX
MOV R15,RSI
MOV RBX,RDI
XOR R12D,R12D
MOV qword ptr [RDI + 0x100028],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x100000],XMM0
MOV RAX,qword ptr [0x00d277f8]
MOV qword ptr [RDI + 0x100010],RAX
MOV qword ptr [RDI + 0x100018],R12
CALL 0x0014a9c0
MOV qword ptr [RBX + 0x100038],RAX
MOV byte ptr [RBX + 0x100088],R12B
MOV qword ptr [RBX + 0x100030],R12
MOV qword ptr [R15 + 0x20],RBX
MOV qword ptr [R15 + 0x28],RBX
MOV byte ptr [R15 + 0x36],R14B
MOV word ptr [R15 + 0x30],0x0
LEA RAX,[0xd27800]
CMP R15,RAX
SETNZ byte ptr [R15 + 0x37]
MOV dword ptr [R15 + 0x32],0x0
MOV byte ptr [R15 + 0x38],R12B
CMP qword ptr [0x00d277f0],R12
JNZ 0x001447d5
LEA RDI,[0xd277b0]
CALL 0x0012a230
LAB_001447a2:
MOV CL,byte ptr [RBX + 0x10008c]
MOV EAX,0x1
SHL EAX,CL
OR byte ptr [0x00d277a8],AL
MOV RDI,qword ptr [0x00d277f0]
TEST RDI,RDI
JNZ 0x001447dc
LAB_001447c1:
LEA RDI,[0xd277b0]
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0012a1f0
LAB_001447d5:
CALL 0x0012cffb
JMP 0x001447a2
LAB_001447dc:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001447c1
|
void translog_start_buffer(long param_1,int *param_2,int1 param_3)
{
int8 uVar1;
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x1f) = 0;
*(int8 *)(param_1 + 0x100000) = 0;
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + -1) = 0;
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) = DAT_00d277f8;
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0xf) = 0;
uVar1 = get_current_logfile();
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) = uVar1;
*(int1 *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1) = 0;
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x27) = 0;
*(long *)(param_2 + 0x20) = param_1;
*(long *)(param_2 + 0x28) = param_1;
param_2[0x36] = param_3;
*(int2 *)(param_2 + 0x30) = 0;
param_2[0x37] = param_2 != &DAT_00d27800;
*(int4 *)(param_2 + 0x32) = 0;
param_2[0x38] = 0;
if (DAT_00d277f0 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00d277b0);
}
else {
translog_start_buffer_cold_1();
}
DAT_00d277a8 = DAT_00d277a8 |
(byte)(1 << (*(byte *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1 + 4) &
0x1f));
if (DAT_00d277f0 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d277b0);
return;
}
|
|
5,998 | nglog::IsFailureSignalHandlerInstalled() | ng-log[P]ng-log/src/signalhandler.cc | bool IsFailureSignalHandlerInstalled() {
#ifdef HAVE_SIGACTION
// TODO(andschwa): Return kFailureSignalHandlerInstalled?
struct sigaction sig_action;
memset(&sig_action, 0, sizeof(sig_action));
sigemptyset(&sig_action.sa_mask);
sigaction(SIGABRT, nullptr, &sig_action);
if (sig_action.sa_sigaction == &FailureSignalHandler) {
return true;
}
#elif defined(NGLOG_OS_WINDOWS)
return kFailureSignalHandlerInstalled;
#endif // HAVE_SIGACTION
return false;
} | O0 | cpp | nglog::IsFailureSignalHandlerInstalled():
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x93a0
leaq -0xa0(%rbp), %rdi
addq $0x8, %rdi
callq 0x9920
movl $0x6, %edi
xorl %eax, %eax
movl %eax, %esi
leaq -0xa0(%rbp), %rdx
callq 0x9930
leaq 0x26(%rip), %rax # 0x48500
cmpq %rax, -0xa0(%rbp)
jne 0x484e9
movb $0x1, -0x1(%rbp)
jmp 0x484ed
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN5nglog31IsFailureSignalHandlerInstalledEv:
push rbp
mov rbp, rsp
sub rsp, 0A0h
lea rdi, [rbp+var_A0]
xor esi, esi
mov edx, 98h
call _memset
lea rdi, [rbp+var_A0]
add rdi, 8
call _sigemptyset
mov edi, 6
xor eax, eax
mov esi, eax
lea rdx, [rbp+var_A0]
call _sigaction
lea rax, _ZN5nglog12_GLOBAL__N_120FailureSignalHandlerEiP9siginfo_tPv; nglog::`anonymous namespace'::FailureSignalHandler(int,siginfo_t *,void *)
cmp [rbp+var_A0], rax
jnz short loc_484E9
mov [rbp+var_1], 1
jmp short loc_484ED
loc_484E9:
mov [rbp+var_1], 0
loc_484ED:
mov al, [rbp+var_1]
and al, 1
add rsp, 0A0h
pop rbp
retn
| bool nglog::IsFailureSignalHandlerInstalled(nglog *this)
{
long long ( *v2)(); // [rsp+0h] [rbp-A0h] BYREF
long long v3; // [rsp+8h] [rbp-98h] BYREF
memset(&v2, 0LL, 152LL);
sigemptyset(&v3);
sigaction(6LL, 0LL, &v2);
return v2 == nglog::`anonymous namespace'::FailureSignalHandler;
}
| IsFailureSignalHandlerInstalled:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
LEA RDI,[RBP + -0xa0]
XOR ESI,ESI
MOV EDX,0x98
CALL 0x001093a0
LEA RDI,[RBP + -0xa0]
ADD RDI,0x8
CALL 0x00109920
MOV EDI,0x6
XOR EAX,EAX
MOV ESI,EAX
LEA RDX,[RBP + -0xa0]
CALL 0x00109930
LEA RAX,[0x148500]
CMP qword ptr [RBP + -0xa0],RAX
JNZ 0x001484e9
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001484ed
LAB_001484e9:
MOV byte ptr [RBP + -0x1],0x0
LAB_001484ed:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0xa0
POP RBP
RET
|
/* nglog::IsFailureSignalHandlerInstalled() */
int8 nglog::IsFailureSignalHandlerInstalled(void)
{
_union_1457 local_a8;
sigset_t sStack_a0;
memset(&local_a8,0,0x98);
sigemptyset(&sStack_a0);
sigaction(6,(sigaction *)0x0,(sigaction *)&local_a8);
return CONCAT71(0x1485,local_a8.sa_handler == (anonymous_namespace)::FailureSignalHandler);
}
|
|
5,999 | nglog::IsFailureSignalHandlerInstalled() | ng-log[P]ng-log/src/signalhandler.cc | bool IsFailureSignalHandlerInstalled() {
#ifdef HAVE_SIGACTION
// TODO(andschwa): Return kFailureSignalHandlerInstalled?
struct sigaction sig_action;
memset(&sig_action, 0, sizeof(sig_action));
sigemptyset(&sig_action.sa_mask);
sigaction(SIGABRT, nullptr, &sig_action);
if (sig_action.sa_sigaction == &FailureSignalHandler) {
return true;
}
#elif defined(NGLOG_OS_WINDOWS)
return kFailureSignalHandlerInstalled;
#endif // HAVE_SIGACTION
return false;
} | O3 | cpp | nglog::IsFailureSignalHandlerInstalled():
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rsp, %rbx
movl $0x98, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x72b0
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x76b0
movl $0x6, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x76c0
leaq 0x12(%rip), %rax # 0x1f789
cmpq %rax, -0x8(%r14)
sete %al
addq $0x98, %rsp
popq %rbx
popq %r14
retq
| _ZN5nglog31IsFailureSignalHandlerInstalledEv:
push r14
push rbx
sub rsp, 98h
mov rbx, rsp
mov edx, 98h
mov rdi, rbx
xor esi, esi
call _memset
lea r14, [rsp+0A8h+var_A0]
mov rdi, r14
call _sigemptyset
mov edi, 6
xor esi, esi
mov rdx, rbx
call _sigaction
lea rax, _ZN5nglog12_GLOBAL__N_120FailureSignalHandlerEiP9siginfo_tPv; nglog::`anonymous namespace'::FailureSignalHandler(int,siginfo_t *,void *)
cmp [r14-8], rax
setz al
add rsp, 98h
pop rbx
pop r14
retn
| bool nglog::IsFailureSignalHandlerInstalled(nglog *this)
{
long long ( *v2)(); // [rsp+0h] [rbp-A8h] BYREF
_BYTE v3[160]; // [rsp+8h] [rbp-A0h] BYREF
memset(&v2, 0LL, 152LL);
sigemptyset(v3);
sigaction(6LL, 0LL, &v2);
return v2 == nglog::`anonymous namespace'::FailureSignalHandler;
}
| IsFailureSignalHandlerInstalled:
PUSH R14
PUSH RBX
SUB RSP,0x98
MOV RBX,RSP
MOV EDX,0x98
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001072b0
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x001076b0
MOV EDI,0x6
XOR ESI,ESI
MOV RDX,RBX
CALL 0x001076c0
LEA RAX,[0x11f789]
CMP qword ptr [R14 + -0x8],RAX
SETZ AL
ADD RSP,0x98
POP RBX
POP R14
RET
|
/* nglog::IsFailureSignalHandlerInstalled() */
int8 nglog::IsFailureSignalHandlerInstalled(void)
{
_union_1457 local_a8;
sigset_t local_a0;
memset(&local_a8,0,0x98);
sigemptyset(&local_a0);
sigaction(6,(sigaction *)0x0,(sigaction *)&local_a8);
return CONCAT71(0x11f7,local_a8.sa_handler == (anonymous_namespace)::FailureSignalHandler);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.