index int64 0 66.5k | func_name stringlengths 2 5.36k | func_dep stringlengths 16 2.19k | func stringlengths 8 55.3k | test stringlengths 0 7.07k | opt stringclasses 4 values | language stringclasses 2 values | asm stringlengths 0 45.4k | ida_asm stringlengths 0 44.7k | ida_pseudo stringlengths 0 44.3k | ghidra_asm stringlengths 0 49.1k | ghidra_pseudo stringlengths 0 64.7k |
|---|---|---|---|---|---|---|---|---|---|---|---|
32,600 | js_map_clear | bluesky950520[P]quickjs/quickjs.c | static JSValue js_map_clear(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic);
struct list_head *el, *el1;
JSMapRecord *mr;
if (!s)
return JS_EXCEPTION;
list_for_each_safe(el, el1, &s->records) {
mr = list_entry(el, JSMapRecord, link);
map_delete_record(ctx->rt, s, mr);
}
return JS_UNDEFINED;
} | O3 | c | js_map_clear:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
addl $0x23, %r9d
cmpl $-0x1, %edx
jne 0x513bd
movzwl 0x6(%rsi), %eax
cmpl %eax, %r9d
jne 0x513bd
movq 0x30(%rsi), %r15
testq %r15, %r15
je 0x513bd
leaq 0x8(%r15), %r12
movq 0x10(%r15), %rdx
movl $0x3, %r14d
cmpq %r12, %rdx
je 0x513ce
movq 0x8(%rdx), %r13
addq $-0x10, %rdx
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x517d9
movq %r13, %rdx
cmpq %r12, %r13
jne 0x5139f
jmp 0x513ce
movq %rbx, %rdi
movl %r9d, %esi
callq 0x270bb
movl $0x6, %r14d
xorl %eax, %eax
movq %r14, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| js_map_clear:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
add r9d, 23h ; '#'
cmp edx, 0FFFFFFFFh
jnz short loc_513BD
movzx eax, word ptr [rsi+6]
cmp r9d, eax
jnz short loc_513BD
mov r15, [rsi+30h]
test r15, r15
jz short loc_513BD
lea r12, [r15+8]
mov rdx, [r15+10h]
mov r14d, 3
cmp rdx, r12
jz short loc_513CE
loc_5139F:
mov r13, [rdx+8]
add rdx, 0FFFFFFFFFFFFFFF0h
mov rdi, [rbx+18h]
mov rsi, r15
call map_delete_record
mov rdx, r13
cmp r13, r12
jnz short loc_5139F
jmp short loc_513CE
loc_513BD:
mov rdi, rbx
mov esi, r9d
call JS_ThrowTypeErrorInvalidClass
mov r14d, 6
loc_513CE:
xor eax, eax
mov rdx, r14
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long js_map_clear(
long long a1,
long long a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
int a14)
{
int v14; // r9d
long long v15; // r15
long long v16; // rdx
long long v17; // r13
v14 = a14 + 35;
if ( a3 == -1 && v14 == *(unsigned __int16 *)(a2 + 6) && (v15 = *(_QWORD *)(a2 + 48)) != 0 )
{
v16 = *(_QWORD *)(v15 + 16);
if ( v16 != v15 + 8 )
{
do
{
v17 = *(_QWORD *)(v16 + 8);
map_delete_record(*(_QWORD *)(a1 + 24), v15, v16 - 16);
v16 = v17;
}
while ( v17 != v15 + 8 );
}
}
else
{
JS_ThrowTypeErrorInvalidClass(a1, v14, a4, a5, a6, a7, a8, a9, a10, a11);
}
return 0LL;
}
| js_map_clear:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
ADD R9D,0x23
CMP EDX,-0x1
JNZ 0x001513bd
MOVZX EAX,word ptr [RSI + 0x6]
CMP R9D,EAX
JNZ 0x001513bd
MOV R15,qword ptr [RSI + 0x30]
TEST R15,R15
JZ 0x001513bd
LEA R12,[R15 + 0x8]
MOV RDX,qword ptr [R15 + 0x10]
MOV R14D,0x3
CMP RDX,R12
JZ 0x001513ce
LAB_0015139f:
MOV R13,qword ptr [RDX + 0x8]
ADD RDX,-0x10
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
CALL 0x001517d9
MOV RDX,R13
CMP R13,R12
JNZ 0x0015139f
JMP 0x001513ce
LAB_001513bd:
MOV RDI,RBX
MOV ESI,R9D
CALL 0x001270bb
MOV R14D,0x6
LAB_001513ce:
XOR EAX,EAX
MOV RDX,R14
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int1 [16]
js_map_clear(long param_1,long param_2,int param_3,int8 param_4,int8 param_5,int param_6
)
{
long lVar1;
long lVar2;
int1 auVar3 [16];
long lVar4;
ulong uVar5;
if (((param_3 == -1) && (param_6 + 0x23U == (uint)*(ushort *)(param_2 + 6))) &&
(lVar1 = *(long *)(param_2 + 0x30), lVar1 != 0)) {
uVar5 = 3;
lVar4 = *(long *)(lVar1 + 0x10);
while (lVar4 != lVar1 + 8) {
lVar2 = *(long *)(lVar4 + 8);
map_delete_record(*(int8 *)(param_1 + 0x18),lVar1,lVar4 + -0x10);
lVar4 = lVar2;
}
}
else {
JS_ThrowTypeErrorInvalidClass(param_1,param_6 + 0x23U);
uVar5 = 6;
}
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar5;
return auVar3 << 0x40;
}
| |
32,601 | cyclotomic_sqr_fp12 | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/fp12_tower.c | static void cyclotomic_sqr_fp12(vec384fp12 ret, const vec384fp12 a)
{
vec384fp4 t0, t1, t2;
sqr_fp4(t0, a[0][0], a[1][1]);
sqr_fp4(t1, a[1][0], a[0][2]);
sqr_fp4(t2, a[0][1], a[1][2]);
sub_fp2(ret[0][0], t0[0], a[0][0]);
add_fp2(ret[0][0], ret[0][0], ret[0][0]);
add_fp2(ret[0][0], ret[0][0], t0[0]);
sub_fp2(ret[0][1], t1[0], a[0][1]);
add_fp2(ret[0][1], ret[0][1], ret[0][1]);
add_fp2(ret[0][1], ret[0][1], t1[0]);
sub_fp2(ret[0][2], t2[0], a[0][2]);
add_fp2(ret[0][2], ret[0][2], ret[0][2]);
add_fp2(ret[0][2], ret[0][2], t2[0]);
mul_by_u_plus_1_fp2(t2[1], t2[1]);
add_fp2(ret[1][0], t2[1], a[1][0]);
add_fp2(ret[1][0], ret[1][0], ret[1][0]);
add_fp2(ret[1][0], ret[1][0], t2[1]);
add_fp2(ret[1][1], t0[1], a[1][1]);
add_fp2(ret[1][1], ret[1][1], ret[1][1]);
add_fp2(ret[1][1], ret[1][1], t0[1]);
add_fp2(ret[1][2], t1[1], a[1][2]);
add_fp2(ret[1][2], ret[1][2], ret[1][2]);
add_fp2(ret[1][2], ret[1][2], t1[1]);
} | O0 | c | cyclotomic_sqr_fp12:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp # imm = 0x250
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xd0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x120, %rdx # imm = 0x120
addq $0x60, %rdx
callq 0xbdbf0
leaq -0x190(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x120, %rsi # imm = 0x120
movq -0x10(%rbp), %rdx
addq $0xc0, %rdx
callq 0xbdbf0
leaq -0x250(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x60, %rsi
movq -0x10(%rbp), %rdx
addq $0x120, %rdx # imm = 0x120
addq $0xc0, %rdx
callq 0xbdbf0
movq -0x8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xb6520
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0xb64b0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0xb64b0
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq -0x190(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x60, %rdx
callq 0xb6520
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
movq -0x8(%rbp), %rdx
addq $0x60, %rdx
callq 0xb64b0
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
leaq -0x190(%rbp), %rdx
callq 0xb64b0
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq -0x250(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0xc0, %rdx
callq 0xb6520
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
movq -0x8(%rbp), %rdx
addq $0xc0, %rdx
callq 0xb64b0
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
leaq -0x250(%rbp), %rdx
callq 0xb64b0
leaq -0x250(%rbp), %rdi
addq $0x60, %rdi
leaq -0x250(%rbp), %rsi
addq $0x60, %rsi
callq 0xbd630
movq -0x8(%rbp), %rdi
addq $0x120, %rdi # imm = 0x120
leaq -0x250(%rbp), %rsi
addq $0x60, %rsi
movq -0x10(%rbp), %rdx
addq $0x120, %rdx # imm = 0x120
callq 0xb64b0
movq -0x8(%rbp), %rdi
addq $0x120, %rdi # imm = 0x120
movq -0x8(%rbp), %rsi
addq $0x120, %rsi # imm = 0x120
movq -0x8(%rbp), %rdx
addq $0x120, %rdx # imm = 0x120
callq 0xb64b0
movq -0x8(%rbp), %rdi
addq $0x120, %rdi # imm = 0x120
movq -0x8(%rbp), %rsi
addq $0x120, %rsi # imm = 0x120
leaq -0x250(%rbp), %rdx
addq $0x60, %rdx
callq 0xb64b0
movq -0x8(%rbp), %rdi
addq $0x120, %rdi # imm = 0x120
addq $0x60, %rdi
leaq -0xd0(%rbp), %rsi
addq $0x60, %rsi
movq -0x10(%rbp), %rdx
addq $0x120, %rdx # imm = 0x120
addq $0x60, %rdx
callq 0xb64b0
movq -0x8(%rbp), %rdi
addq $0x120, %rdi # imm = 0x120
addq $0x60, %rdi
movq -0x8(%rbp), %rsi
addq $0x120, %rsi # imm = 0x120
addq $0x60, %rsi
movq -0x8(%rbp), %rdx
addq $0x120, %rdx # imm = 0x120
addq $0x60, %rdx
callq 0xb64b0
movq -0x8(%rbp), %rdi
addq $0x120, %rdi # imm = 0x120
addq $0x60, %rdi
movq -0x8(%rbp), %rsi
addq $0x120, %rsi # imm = 0x120
addq $0x60, %rsi
leaq -0xd0(%rbp), %rdx
addq $0x60, %rdx
callq 0xb64b0
movq -0x8(%rbp), %rdi
addq $0x120, %rdi # imm = 0x120
addq $0xc0, %rdi
leaq -0x190(%rbp), %rsi
addq $0x60, %rsi
movq -0x10(%rbp), %rdx
addq $0x120, %rdx # imm = 0x120
addq $0xc0, %rdx
callq 0xb64b0
movq -0x8(%rbp), %rdi
addq $0x120, %rdi # imm = 0x120
addq $0xc0, %rdi
movq -0x8(%rbp), %rsi
addq $0x120, %rsi # imm = 0x120
addq $0xc0, %rsi
movq -0x8(%rbp), %rdx
addq $0x120, %rdx # imm = 0x120
addq $0xc0, %rdx
callq 0xb64b0
movq -0x8(%rbp), %rdi
addq $0x120, %rdi # imm = 0x120
addq $0xc0, %rdi
movq -0x8(%rbp), %rsi
addq $0x120, %rsi # imm = 0x120
addq $0xc0, %rsi
leaq -0x190(%rbp), %rdx
addq $0x60, %rdx
callq 0xb64b0
addq $0x250, %rsp # imm = 0x250
popq %rbp
retq
nopl (%rax)
| cyclotomic_sqr_fp12:
push rbp
mov rbp, rsp
sub rsp, 250h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_D0]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, 120h
add rdx, 60h ; '`'
call sqr_fp4
lea rdi, [rbp+var_190]
mov rsi, [rbp+var_10]
add rsi, 120h
mov rdx, [rbp+var_10]
add rdx, 0C0h
call sqr_fp4
lea rdi, [rbp+var_250]
mov rsi, [rbp+var_10]
add rsi, 60h ; '`'
mov rdx, [rbp+var_10]
add rdx, 120h
add rdx, 0C0h
call sqr_fp4
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_D0]
mov rdx, [rbp+var_10]
call _sub_fp2
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
mov rdx, [rbp+var_8]
call add_fp2
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_D0]
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
lea rsi, [rbp+var_190]
mov rdx, [rbp+var_10]
add rdx, 60h ; '`'
call _sub_fp2
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
mov rdx, [rbp+var_8]
add rdx, 60h ; '`'
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
lea rdx, [rbp+var_190]
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, [rbp+var_250]
mov rdx, [rbp+var_10]
add rdx, 0C0h
call _sub_fp2
mov rdi, [rbp+var_8]
add rdi, 0C0h
mov rsi, [rbp+var_8]
add rsi, 0C0h
mov rdx, [rbp+var_8]
add rdx, 0C0h
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 0C0h
mov rsi, [rbp+var_8]
add rsi, 0C0h
lea rdx, [rbp+var_250]
call add_fp2
lea rdi, [rbp+var_250]
add rdi, 60h ; '`'
lea rsi, [rbp+var_250]
add rsi, 60h ; '`'
call mul_by_u_plus_1_fp2
mov rdi, [rbp+var_8]
add rdi, 120h
lea rsi, [rbp+var_250]
add rsi, 60h ; '`'
mov rdx, [rbp+var_10]
add rdx, 120h
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 120h
mov rsi, [rbp+var_8]
add rsi, 120h
mov rdx, [rbp+var_8]
add rdx, 120h
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 120h
mov rsi, [rbp+var_8]
add rsi, 120h
lea rdx, [rbp+var_250]
add rdx, 60h ; '`'
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 120h
add rdi, 60h ; '`'
lea rsi, [rbp+var_D0]
add rsi, 60h ; '`'
mov rdx, [rbp+var_10]
add rdx, 120h
add rdx, 60h ; '`'
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 120h
add rdi, 60h ; '`'
mov rsi, [rbp+var_8]
add rsi, 120h
add rsi, 60h ; '`'
mov rdx, [rbp+var_8]
add rdx, 120h
add rdx, 60h ; '`'
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 120h
add rdi, 60h ; '`'
mov rsi, [rbp+var_8]
add rsi, 120h
add rsi, 60h ; '`'
lea rdx, [rbp+var_D0]
add rdx, 60h ; '`'
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 120h
add rdi, 0C0h
lea rsi, [rbp+var_190]
add rsi, 60h ; '`'
mov rdx, [rbp+var_10]
add rdx, 120h
add rdx, 0C0h
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 120h
add rdi, 0C0h
mov rsi, [rbp+var_8]
add rsi, 120h
add rsi, 0C0h
mov rdx, [rbp+var_8]
add rdx, 120h
add rdx, 0C0h
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 120h
add rdi, 0C0h
mov rsi, [rbp+var_8]
add rsi, 120h
add rsi, 0C0h
lea rdx, [rbp+var_190]
add rdx, 60h ; '`'
call add_fp2
add rsp, 250h
pop rbp
retn
| long long cyclotomic_sqr_fp12(long long a1, long long a2)
{
_BYTE v3[96]; // [rsp+0h] [rbp-250h] BYREF
_BYTE v4[96]; // [rsp+60h] [rbp-1F0h] BYREF
_BYTE v5[96]; // [rsp+C0h] [rbp-190h] BYREF
_BYTE v6[96]; // [rsp+120h] [rbp-130h] BYREF
_BYTE v7[96]; // [rsp+180h] [rbp-D0h] BYREF
_BYTE v8[96]; // [rsp+1E0h] [rbp-70h] BYREF
long long v9; // [rsp+240h] [rbp-10h]
long long v10; // [rsp+248h] [rbp-8h]
v10 = a1;
v9 = a2;
sqr_fp4(v7, a2, a2 + 384);
sqr_fp4(v5, v9 + 288, v9 + 192);
sqr_fp4(v3, v9 + 96, v9 + 480);
sub_fp2(v10, v7, v9);
add_fp2(v10, v10, v10);
add_fp2(v10, v10, v7);
sub_fp2(v10 + 96, v5, v9 + 96);
add_fp2(v10 + 96, v10 + 96, v10 + 96);
add_fp2(v10 + 96, v10 + 96, v5);
sub_fp2(v10 + 192, v3, v9 + 192);
add_fp2(v10 + 192, v10 + 192, v10 + 192);
add_fp2(v10 + 192, v10 + 192, v3);
mul_by_u_plus_1_fp2(v4, v4);
add_fp2(v10 + 288, v4, v9 + 288);
add_fp2(v10 + 288, v10 + 288, v10 + 288);
add_fp2(v10 + 288, v10 + 288, v4);
add_fp2(v10 + 384, v8, v9 + 384);
add_fp2(v10 + 384, v10 + 384, v10 + 384);
add_fp2(v10 + 384, v10 + 384, v8);
add_fp2(v10 + 480, v6, v9 + 480);
add_fp2(v10 + 480, v10 + 480, v10 + 480);
return add_fp2(v10 + 480, v10 + 480, v6);
}
| cyclotomic_sqr_fp12:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x250
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0xd0]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x120
ADD RDX,0x60
CALL 0x001bdbf0
LEA RDI,[RBP + -0x190]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x120
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0xc0
CALL 0x001bdbf0
LEA RDI,[RBP + -0x250]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x120
ADD RDX,0xc0
CALL 0x001bdbf0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0xd0]
MOV RDX,qword ptr [RBP + -0x10]
CALL 0x001b6520
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x8]
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0xd0]
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
LEA RSI,[RBP + -0x190]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x60
CALL 0x001b6520
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0x60
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
LEA RDX,[RBP + -0x190]
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[RBP + -0x250]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0xc0
CALL 0x001b6520
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0xc0
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
LEA RDX,[RBP + -0x250]
CALL 0x001b64b0
LEA RDI,[RBP + -0x250]
ADD RDI,0x60
LEA RSI,[RBP + -0x250]
ADD RSI,0x60
CALL 0x001bd630
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x120
LEA RSI,[RBP + -0x250]
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x120
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x120
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x120
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0x120
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x120
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x120
LEA RDX,[RBP + -0x250]
ADD RDX,0x60
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x120
ADD RDI,0x60
LEA RSI,[RBP + -0xd0]
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x120
ADD RDX,0x60
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x120
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x120
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0x120
ADD RDX,0x60
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x120
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x120
ADD RSI,0x60
LEA RDX,[RBP + -0xd0]
ADD RDX,0x60
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x120
ADD RDI,0xc0
LEA RSI,[RBP + -0x190]
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x120
ADD RDX,0xc0
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x120
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x120
ADD RSI,0xc0
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0x120
ADD RDX,0xc0
CALL 0x001b64b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x120
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x120
ADD RSI,0xc0
LEA RDX,[RBP + -0x190]
ADD RDX,0x60
CALL 0x001b64b0
ADD RSP,0x250
POP RBP
RET
|
void cyclotomic_sqr_fp12(long param_1,long param_2)
{
int1 local_258 [96];
int1 auStack_1f8 [96];
int1 local_198 [96];
int1 auStack_138 [96];
int1 local_d8 [96];
int1 auStack_78 [96];
long local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
sqr_fp4(local_d8,param_2,param_2 + 0x180);
sqr_fp4(local_198,local_18 + 0x120,local_18 + 0xc0);
sqr_fp4(local_258,local_18 + 0x60,local_18 + 0x1e0);
sub_fp2(local_10,local_d8,local_18);
add_fp2(local_10,local_10,local_10);
add_fp2(local_10,local_10,local_d8);
sub_fp2(local_10 + 0x60,local_198,local_18 + 0x60);
add_fp2(local_10 + 0x60,local_10 + 0x60,local_10 + 0x60);
add_fp2(local_10 + 0x60,local_10 + 0x60,local_198);
sub_fp2(local_10 + 0xc0,local_258,local_18 + 0xc0);
add_fp2(local_10 + 0xc0,local_10 + 0xc0,local_10 + 0xc0);
add_fp2(local_10 + 0xc0,local_10 + 0xc0,local_258);
mul_by_u_plus_1_fp2(auStack_1f8,auStack_1f8);
add_fp2(local_10 + 0x120,auStack_1f8,local_18 + 0x120);
add_fp2(local_10 + 0x120,local_10 + 0x120,local_10 + 0x120);
add_fp2(local_10 + 0x120,local_10 + 0x120,auStack_1f8);
add_fp2(local_10 + 0x180,auStack_78,local_18 + 0x180);
add_fp2(local_10 + 0x180,local_10 + 0x180,local_10 + 0x180);
add_fp2(local_10 + 0x180,local_10 + 0x180,auStack_78);
add_fp2(local_10 + 0x1e0,auStack_138,local_18 + 0x1e0);
add_fp2(local_10 + 0x1e0,local_10 + 0x1e0,local_10 + 0x1e0);
add_fp2(local_10 + 0x1e0,local_10 + 0x1e0,auStack_138);
return;
}
| |
32,602 | mariadb_set_conf_option | eloqsql/libmariadb/libmariadb/mariadb_lib.c | my_bool _mariadb_set_conf_option(MYSQL *mysql, const char *config_option, const char *config_value)
{
if (config_option)
{
int i;
char *c;
/* CONC-395: replace underscore "_" by dash "-" */
while ((c= strchr(config_option, '_')))
*c= '-';
for (i=0; mariadb_defaults[i].conf_key; i++)
{
if (!strcmp(mariadb_defaults[i].conf_key, config_option))
{
my_bool val_bool;
int val_int;
size_t val_sizet;
int rc;
void *option_val= NULL;
switch (mariadb_defaults[i].type) {
case MARIADB_OPTION_FUNC:
return mariadb_defaults[i].u.option_func(mysql, config_option, config_value, -1);
break;
case MARIADB_OPTION_BOOL:
val_bool= 0;
if (config_value)
val_bool= atoi(config_value);
option_val= &val_bool;
break;
case MARIADB_OPTION_INT:
val_int= 0;
if (config_value)
val_int= atoi(config_value);
option_val= &val_int;
break;
case MARIADB_OPTION_SIZET:
val_sizet= 0;
if (config_value)
val_sizet= strtol(config_value, NULL, 10);
option_val= &val_sizet;
break;
case MARIADB_OPTION_STR:
option_val= (void*)config_value;
break;
case MARIADB_OPTION_NONE:
break;
}
rc= mysql_optionsv(mysql, mariadb_defaults[i].u.option, option_val);
return(test(rc));
}
}
}
/* unknown key */
return 1;
} | O0 | c | mariadb_set_conf_option:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1f5ba
jmp 0x1f411
movq -0x18(%rbp), %rdi
movl $0x5f, %esi
callq 0x13170
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x1f432
movq -0x30(%rbp), %rax
movb $0x2d, (%rax)
jmp 0x1f411
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rcx
leaq 0x4918c(%rip), %rax # 0x685d0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x1f5b8
movslq -0x24(%rbp), %rcx
leaq 0x4916f(%rip), %rax # 0x685d0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x135f0
cmpl $0x0, %eax
jne 0x1f5a8
movq $0x0, -0x50(%rbp)
movslq -0x24(%rbp), %rax
leaq (%rax,%rax,2), %rcx
leaq 0x4913b(%rip), %rax # 0x685d0
movl 0x8(%rax,%rcx,8), %eax
movq %rax, -0x58(%rbp)
subq $0x5, %rax
ja 0x1f56d
movq -0x58(%rbp), %rax
leaq 0x39ab2(%rip), %rcx # 0x58f64
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq -0x24(%rbp), %rcx
leaq 0x4910a(%rip), %rax # 0x685d0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq $-0x1, %rcx
callq *%rax
movb %al, -0x1(%rbp)
jmp 0x1f5be
movb $0x0, -0x31(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1f504
movq -0x20(%rbp), %rdi
callq 0x136b0
movb %al, -0x31(%rbp)
leaq -0x31(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x1f56d
movl $0x0, -0x38(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1f528
movq -0x20(%rbp), %rdi
callq 0x136b0
movl %eax, -0x38(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x1f56d
movq $0x0, -0x40(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1f557
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x13600
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x1f56d
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x1f56d
jmp 0x1f56d
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rcx
leaq 0x49054(%rip), %rax # 0x685d0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %esi
movq -0x50(%rbp), %rdx
movb $0x0, %al
callq 0x1f5d0
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, -0x1(%rbp)
jmp 0x1f5be
jmp 0x1f5aa
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1f439
jmp 0x1f5ba
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _mariadb_set_conf_option:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_18], 0
jz loc_1F5BA
jmp short $+2
loc_1F411:
mov rdi, [rbp+var_18]
mov esi, 5Fh ; '_'
call _strchr
mov [rbp+var_30], rax
cmp rax, 0
jz short loc_1F432
mov rax, [rbp+var_30]
mov byte ptr [rax], 2Dh ; '-'
jmp short loc_1F411
loc_1F432:
mov [rbp+var_24], 0
loc_1F439:
movsxd rcx, [rbp+var_24]
lea rax, mariadb_defaults
imul rcx, 18h
add rax, rcx
cmp qword ptr [rax+10h], 0
jz loc_1F5B8
movsxd rcx, [rbp+var_24]
lea rax, mariadb_defaults
imul rcx, 18h
add rax, rcx
mov rdi, [rax+10h]
mov rsi, [rbp+var_18]
call _strcmp
cmp eax, 0
jnz loc_1F5A8
mov [rbp+var_50], 0
movsxd rax, [rbp+var_24]
lea rcx, [rax+rax*2]
lea rax, mariadb_defaults
mov eax, [rax+rcx*8+8]
mov [rbp+var_58], rax
sub rax, 5; switch 6 cases
ja def_1F4B9; jumptable 000000000001F4B9 default case
mov rax, [rbp+var_58]
lea rcx, jpt_1F4B9
movsxd rax, ds:(jpt_1F4B9 - 58F64h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1F4BB:
movsxd rcx, [rbp+var_24]; jumptable 000000000001F4B9 case 5
lea rax, mariadb_defaults
imul rcx, 18h
add rax, rcx
mov rax, [rax]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, 0FFFFFFFFFFFFFFFFh
call rax
mov [rbp+var_1], al
jmp loc_1F5BE
loc_1F4ED:
mov [rbp+var_31], 0; jumptable 000000000001F4B9 case 1
cmp [rbp+var_20], 0
jz short loc_1F504
mov rdi, [rbp+var_20]
call _atoi
mov [rbp+var_31], al
loc_1F504:
lea rax, [rbp+var_31]
mov [rbp+var_50], rax
jmp short def_1F4B9; jumptable 000000000001F4B9 default case
loc_1F50E:
mov [rbp+var_38], 0; jumptable 000000000001F4B9 case 2
cmp [rbp+var_20], 0
jz short loc_1F528
mov rdi, [rbp+var_20]
call _atoi
mov [rbp+var_38], eax
loc_1F528:
lea rax, [rbp+var_38]
mov [rbp+var_50], rax
jmp short def_1F4B9; jumptable 000000000001F4B9 default case
loc_1F532:
mov [rbp+var_40], 0; jumptable 000000000001F4B9 case 3
cmp [rbp+var_20], 0
jz short loc_1F557
mov rdi, [rbp+var_20]
xor eax, eax
mov esi, eax
mov edx, 0Ah
call _strtol
mov [rbp+var_40], rax
loc_1F557:
lea rax, [rbp+var_40]
mov [rbp+var_50], rax
jmp short def_1F4B9; jumptable 000000000001F4B9 default case
loc_1F561:
mov rax, [rbp+var_20]; jumptable 000000000001F4B9 case 4
mov [rbp+var_50], rax
jmp short def_1F4B9; jumptable 000000000001F4B9 default case
loc_1F56B:
jmp short $+2; jumptable 000000000001F4B9 case 0
def_1F4B9:
mov rdi, [rbp+var_10]; jumptable 000000000001F4B9 default case
movsxd rcx, [rbp+var_24]
lea rax, mariadb_defaults
imul rcx, 18h
add rax, rcx
mov esi, [rax]
mov rdx, [rbp+var_50]
mov al, 0
call mysql_optionsv
mov [rbp+var_44], eax
mov edx, [rbp+var_44]
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
mov [rbp+var_1], al
jmp short loc_1F5BE
loc_1F5A8:
jmp short $+2
loc_1F5AA:
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_1F439
loc_1F5B8:
jmp short $+2
loc_1F5BA:
mov [rbp+var_1], 1
loc_1F5BE:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| char mariadb_set_conf_option(long long a1, long long a2, long long a3)
{
int v3; // r8d
int v4; // r9d
int v5; // eax
int v7; // [rsp+10h] [rbp-50h]
long long v8; // [rsp+20h] [rbp-40h] BYREF
int v9; // [rsp+28h] [rbp-38h] BYREF
char v10; // [rsp+2Fh] [rbp-31h] BYREF
_BYTE *v11; // [rsp+30h] [rbp-30h]
int i; // [rsp+3Ch] [rbp-24h]
long long v13; // [rsp+40h] [rbp-20h]
long long v14; // [rsp+48h] [rbp-18h]
long long v15; // [rsp+50h] [rbp-10h]
bool v16; // [rsp+5Fh] [rbp-1h]
v15 = a1;
v14 = a2;
v13 = a3;
if ( a2 )
{
while ( 1 )
{
v11 = (_BYTE *)strchr(v14, 95LL);
if ( !v11 )
break;
*v11 = 45;
}
for ( i = 0; *((_QWORD *)&mariadb_defaults + 3 * i + 2); ++i )
{
if ( !(unsigned int)strcmp(*((_QWORD *)&mariadb_defaults + 3 * i + 2), v14) )
{
v7 = 0;
switch ( *((_DWORD *)&mariadb_defaults + 6 * i + 2) )
{
case 1:
v10 = 0;
if ( v13 )
v10 = atoi(v13);
v5 = mysql_optionsv(v15, *((_DWORD *)&mariadb_defaults + 6 * i), (unsigned int)&v10, 24 * i, v3, v4);
goto LABEL_20;
case 2:
v9 = 0;
if ( v13 )
v9 = atoi(v13);
v5 = mysql_optionsv(v15, *((_DWORD *)&mariadb_defaults + 6 * i), (unsigned int)&v9, 24 * i, v3, v4);
goto LABEL_20;
case 3:
v8 = 0LL;
if ( v13 )
v8 = strtol(v13, 0LL, 10LL);
v5 = mysql_optionsv(v15, *((_DWORD *)&mariadb_defaults + 6 * i), (unsigned int)&v8, 24 * i, v3, v4);
goto LABEL_20;
case 4:
v7 = v13;
goto LABEL_19;
case 5:
return (*((long long ( **)(long long, long long, long long, long long))&mariadb_defaults + 3 * i))(
v15,
v14,
v13,
-1LL);
default:
LABEL_19:
v5 = mysql_optionsv(v15, *((_DWORD *)&mariadb_defaults + 6 * i), v7, 24 * i, v3, v4);
LABEL_20:
v16 = v5 != 0;
break;
}
return v16;
}
}
}
return 1;
}
| _mariadb_set_conf_option:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0011f5ba
JMP 0x0011f411
LAB_0011f411:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x5f
CALL 0x00113170
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JZ 0x0011f432
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x2d
JMP 0x0011f411
LAB_0011f432:
MOV dword ptr [RBP + -0x24],0x0
LAB_0011f439:
MOVSXD RCX,dword ptr [RBP + -0x24]
LEA RAX,[0x1685d0]
IMUL RCX,RCX,0x18
ADD RAX,RCX
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0011f5b8
MOVSXD RCX,dword ptr [RBP + -0x24]
LEA RAX,[0x1685d0]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001135f0
CMP EAX,0x0
JNZ 0x0011f5a8
MOV qword ptr [RBP + -0x50],0x0
MOVSXD RAX,dword ptr [RBP + -0x24]
LEA RCX,[RAX + RAX*0x2]
LEA RAX,[0x1685d0]
MOV EAX,dword ptr [RAX + RCX*0x8 + 0x8]
MOV qword ptr [RBP + -0x58],RAX
SUB RAX,0x5
JA 0x0011f56d
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[0x158f64]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOVSXD RCX,dword ptr [RBP + -0x24]
LEA RAX,[0x1685d0]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,-0x1
CALL RAX
MOV byte ptr [RBP + -0x1],AL
JMP 0x0011f5be
caseD_1:
MOV byte ptr [RBP + -0x31],0x0
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0011f504
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001136b0
MOV byte ptr [RBP + -0x31],AL
LAB_0011f504:
LEA RAX,[RBP + -0x31]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0011f56d
caseD_2:
MOV dword ptr [RBP + -0x38],0x0
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0011f528
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001136b0
MOV dword ptr [RBP + -0x38],EAX
LAB_0011f528:
LEA RAX,[RBP + -0x38]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0011f56d
caseD_3:
MOV qword ptr [RBP + -0x40],0x0
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0011f557
MOV RDI,qword ptr [RBP + -0x20]
XOR EAX,EAX
MOV ESI,EAX
MOV EDX,0xa
CALL 0x00113600
MOV qword ptr [RBP + -0x40],RAX
LAB_0011f557:
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0011f56d
caseD_4:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0011f56d
caseD_0:
JMP 0x0011f56d
default:
MOV RDI,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x24]
LEA RAX,[0x1685d0]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV ESI,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x50]
MOV AL,0x0
CALL 0x0011f5d0
MOV dword ptr [RBP + -0x44],EAX
MOV EDX,dword ptr [RBP + -0x44]
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV byte ptr [RBP + -0x1],AL
JMP 0x0011f5be
LAB_0011f5a8:
JMP 0x0011f5aa
LAB_0011f5aa:
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0011f439
LAB_0011f5b8:
JMP 0x0011f5ba
LAB_0011f5ba:
MOV byte ptr [RBP + -0x1],0x1
LAB_0011f5be:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
bool _mariadb_set_conf_option(int8 param_1,char *param_2,long *param_3)
{
int1 uVar1;
int iVar2;
long *local_58;
long local_48;
int local_40;
int1 local_39;
char *local_38;
int local_2c;
long *local_28;
char *local_20;
int8 local_18;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if (param_2 != (char *)0x0) {
while (local_38 = strchr(local_20,0x5f), local_38 != (char *)0x0) {
*local_38 = '-';
}
local_2c = 0;
local_38 = (char *)0x0;
while (*(long *)(mariadb_defaults + (long)local_2c * 0x18 + 0x10) != 0) {
iVar2 = strcmp(*(char **)(mariadb_defaults + (long)local_2c * 0x18 + 0x10),local_20);
if (iVar2 == 0) {
local_58 = (long *)0x0;
switch(*(int4 *)(mariadb_defaults + (long)local_2c * 0x18 + 8)) {
case 0:
break;
case 1:
local_39 = 0;
if (local_28 != (long *)0x0) {
iVar2 = atoi((char *)local_28);
local_39 = (int1)iVar2;
}
local_58 = (long *)&local_39;
break;
case 2:
local_40 = 0;
if (local_28 != (long *)0x0) {
local_40 = atoi((char *)local_28);
}
local_58 = (long *)&local_40;
break;
case 3:
local_48 = 0;
if (local_28 != (long *)0x0) {
local_48 = strtol((char *)local_28,(char **)0x0,10);
}
local_58 = &local_48;
break;
case 4:
local_58 = local_28;
break;
case 5:
uVar1 = (**(code **)(mariadb_defaults + (long)local_2c * 0x18))
(local_18,local_20,local_28,0xffffffffffffffff);
return (bool)uVar1;
}
iVar2 = mysql_optionsv(local_18,*(int4 *)(mariadb_defaults + (long)local_2c * 0x18),
local_58);
return iVar2 != 0;
}
local_2c = local_2c + 1;
}
}
return true;
}
| |
32,603 | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<unsigned long&>(unsigned long&, bool) | monkey531[P]llama/common/json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O1 | cpp | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<unsigned long&>(unsigned long&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl 0x38(%rdi), %ecx
cmpq %rax, 0x20(%rdi)
sete %dl
testl %ecx, %ecx
sete %dil
andb %dl, %dil
cmpb $0x1, %dil
je 0x61212
movl %ecx, %ecx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
leaq -0x1(%rcx), %rdx
addq $0x3e, %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
sarq $0x6, %rcx
leaq (%rax,%rcx,8), %rax
leaq 0x3f(%r15), %rcx
andq %rdx, %rcx
xorl %edi, %edi
cmpq %r15, %rcx
setbe %dil
movq -0x8(%rax,%rdi,8), %rax
btq %rdx, %rax
jae 0x610a5
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq (%rsi), %rsi
movq %r14, %rdi
callq 0x612ac
movq %r14, %rdi
movl $0x1, %esi
callq 0x58c4e
testb %bpl, %bpl
jne 0x61052
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0xc(%rsp)
movb $0x5, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x61233
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
testb %al, %al
je 0x611e6
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x610af
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x611e6
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x61109
cmpl $0x2, %ecx
jne 0x61238
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5da80
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x611e2
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x61202
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x58c4e
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x58c4e
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x5b5ea
movq %r15, %rdi
xorl %esi, %esi
callq 0x58c4e
movq %r15, %rdi
callq 0x5e43a
movq (%rbx), %r14
jmp 0x611e2
movq 0x58(%rbx), %rax
movl 0x60(%rbx), %ecx
cmpq %rax, 0x48(%rbx)
sete %dl
testl %ecx, %ecx
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x61246
movl %ecx, %esi
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
addq $0x3e, %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdi
leaq 0x3f(%r15), %rdx
andq %rcx, %rdx
xorl %r8d, %r8d
cmpq %r15, %rdx
setbe %r8b
movl $0x1, %edx
shlq %cl, %rdx
andq -0x8(%rdi,%r8,8), %rdx
subl $0x1, %esi
movl %esi, 0x60(%rbx)
jae 0x6117b
movl $0x3f, 0x60(%rbx)
addq $-0x8, %rax
movq %rax, 0x58(%rbx)
testq %rdx, %rdx
je 0x611e6
cmpq $0x0, 0x70(%rbx)
je 0x61267
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x58c4e
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x58c4e
movq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0x5b5ea
movq %r15, %rdi
xorl %esi, %esi
callq 0x58c4e
movq %r15, %rdi
callq 0x5e43a
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x611eb
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x58c4e
movq %r15, %rdi
callq 0x5e43a
movl %ebx, %eax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8dbb4(%rip), %rdi # 0xeedcd
leaq 0x8dbf7(%rip), %rdx # 0xeee17
leaq 0x8eb22(%rip), %rcx # 0xefd49
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x1bed0
callq 0x1b320
leaq 0x8eb1e(%rip), %rcx # 0xefd5d
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x61252
leaq 0x8eb4e(%rip), %rcx # 0xefd9b
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x8db74(%rip), %rdi # 0xeedcd
leaq 0x8dbb7(%rip), %rdx # 0xeee17
xorl %eax, %eax
callq 0x1bed0
leaq 0x8db5f(%rip), %rdi # 0xeedcd
leaq 0x8dba2(%rip), %rdx # 0xeee17
leaq 0x8eb37(%rip), %rcx # 0xefdb3
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x1bed0
jmp 0x6128a
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x58c4e
movq %r14, %rdi
callq 0x5e43a
movq %rbx, %rdi
callq 0x1bfc0
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRmEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov ebp, edx
mov rbx, rdi
mov rax, [rdi+30h]
mov ecx, [rdi+38h]
cmp [rdi+20h], rax
setz dl
test ecx, ecx
setz dil
and dil, dl
cmp dil, 1
jz loc_61212
mov ecx, ecx
mov r15, 8000000000000000h
lea rdx, [rcx-1]
add rcx, 3Eh ; '>'
test rdx, rdx
cmovns rcx, rdx
sar rcx, 6
lea rax, [rax+rcx*8]
lea rcx, [r15+3Fh]
and rcx, rdx
xor edi, edi
cmp rcx, r15
setbe dil
mov rax, [rax+rdi*8-8]
bt rax, rdx
jnb loc_610A5
xorps xmm0, xmm0
lea r14, [rsp+68h+var_58]
movaps xmmword ptr [r14], xmm0
mov rsi, [rsi]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE6EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_17number_unsigned_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_unsigned_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)
test bpl, bpl
jnz short loc_61052
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+68h+var_5C], eax
mov [rsp+68h+var_5D], 5
cmp qword ptr [rbx+90h], 0
jz loc_61233
lea rdi, [rbx+80h]
lea rsi, [rsp+68h+var_5C]
lea rdx, [rsp+68h+var_5D]
lea rcx, [rsp+68h+var_58]
call qword ptr [rbx+98h]
test al, al
jz loc_611E6
loc_61052:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_610AF
mov rax, [rax-8]
test rax, rax
jz loc_611E6
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz loc_61109
cmp ecx, 2
jnz loc_61238
mov rdi, [rax+8]
lea rsi, [rsp+68h+var_58]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_611E2
loc_610A5:
xor ebx, ebx
xor r14d, r14d
jmp loc_61202
loc_610AF:
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_38]
movaps xmmword ptr [r15], xmm0
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 byte ptr [r14], 0
mov qword ptr [r14+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, [rbx]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp loc_611E2
loc_61109:
mov rax, [rbx+58h]
mov ecx, [rbx+60h]
cmp [rbx+48h], rax
setz dl
test ecx, ecx
setz sil
and sil, dl
cmp sil, 1
jz loc_61246
mov esi, ecx
lea rcx, [rsi-1]
mov rdx, rsi
add rdx, 3Eh ; '>'
test rcx, rcx
cmovns rdx, rcx
sar rdx, 6
lea rdi, [rax+rdx*8]
lea rdx, [r15+3Fh]
and rdx, rcx
xor r8d, r8d
cmp rdx, r15
setbe r8b
mov edx, 1
shl rdx, cl
and rdx, [rdi+r8*8-8]
sub esi, 1
mov [rbx+60h], esi
jnb short loc_6117B
mov dword ptr [rbx+60h], 3Fh ; '?'
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+58h], rax
loc_6117B:
test rdx, rdx
jz short loc_611E6
cmp qword ptr [rbx+70h], 0
jz loc_61267
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_48]
movaps xmmword ptr [r15], xmm0
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 byte ptr [r14], 0
mov qword ptr [r14+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, [rbx+70h]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_611E2:
mov bl, 1
jmp short loc_611EB
loc_611E6:
xor ebx, ebx
xor r14d, r14d
loc_611EB:
lea r15, [rsp+68h+var_58]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_61202:
mov eax, ebx
mov rdx, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_61212:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_61233:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_61238:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_61252
loc_61246:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_61252:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_61267:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_6128A:
mov rbx, rax
lea r14, [rsp+68h+var_58]
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 rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<unsigned long &>(
long long a1,
_QWORD *a2,
char a3)
{
unsigned int v4; // ebx
long long v5; // rax
unsigned int v6; // ecx
signed long long v7; // rdx
long long v8; // rcx
long long v9; // rax
long long v10; // rax
unsigned __int8 *v11; // rax
int v12; // ecx
long long v13; // rax
unsigned int v14; // ecx
long long v15; // rsi
long long v16; // rcx
long long v17; // rdx
long long v18; // rdx
const char *v20; // rcx
long long v21; // rsi
long long v22; // rbx
char v23; // [rsp+Bh] [rbp-5Dh] BYREF
int v24; // [rsp+Ch] [rbp-5Ch] BYREF
__int128 v25; // [rsp+10h] [rbp-58h] BYREF
__int128 v26; // [rsp+20h] [rbp-48h] BYREF
_OWORD v27[3]; // [rsp+30h] [rbp-38h] BYREF
v4 = a1;
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
goto LABEL_28;
}
v7 = v6 - 1LL;
v8 = v6 + 62LL;
if ( v7 >= 0 )
v8 = v7;
v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8);
if ( _bittest64(&v9, v7) )
{
v25 = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::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>>(
&v25,
*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 *)&v25);
if ( a3 )
{
LABEL_8:
v10 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v10 )
{
v27[0] = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 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 *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)a1,
(long long)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v27);
goto LABEL_23;
}
v11 = *(unsigned __int8 **)(v10 - 8);
if ( v11 )
{
v12 = *v11;
if ( v12 != 1 )
{
if ( v12 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v11 + 1),
(long long)&v25);
LABEL_23:
LOBYTE(v4) = 1;
LABEL_25:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v25);
return v4;
}
v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v21 = 7243LL;
goto LABEL_31;
}
v13 = *(_QWORD *)(a1 + 88);
v14 = *(_DWORD *)(a1 + 96);
if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 )
{
v20 = "!key_keep_stack.empty()";
v21 = 7255LL;
LABEL_31:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v21,
"GGML_ASSERT(%s) failed",
v20);
goto LABEL_32;
}
v15 = v14;
v16 = v14 - 1LL;
v17 = v15 + 62;
if ( v16 >= 0 )
v17 = v16;
v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16);
*(_DWORD *)(a1 + 96) = v15 - 1;
if ( !(_DWORD)v15 )
{
*(_DWORD *)(a1 + 96) = 63;
*(_QWORD *)(a1 + 88) = v13 - 8;
}
if ( v18 )
{
if ( *(_QWORD *)(a1 + 112) )
{
v26 = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 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 *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(a1 + 112),
(long long)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26);
goto LABEL_23;
}
LABEL_32:
v22 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v25);
_Unwind_Resume(v22);
}
}
LABEL_24:
v4 = 0;
goto LABEL_25;
}
v24 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3;
v23 = 5;
if ( *(_QWORD *)(a1 + 144) )
{
if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))(
a1 + 128,
&v24,
&v23,
&v25) )
goto LABEL_24;
goto LABEL_8;
}
LABEL_28:
std::__throw_bad_function_call();
}
return 0;
}
| handle_value<unsigned_long&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV EBP,EDX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x30]
MOV ECX,dword ptr [RDI + 0x38]
CMP qword ptr [RDI + 0x20],RAX
SETZ DL
TEST ECX,ECX
SETZ DIL
AND DIL,DL
CMP DIL,0x1
JZ 0x00161212
MOV ECX,ECX
MOV R15,-0x8000000000000000
LEA RDX,[RCX + -0x1]
ADD RCX,0x3e
TEST RDX,RDX
CMOVNS RCX,RDX
SAR RCX,0x6
LEA RAX,[RAX + RCX*0x8]
LEA RCX,[R15 + 0x3f]
AND RCX,RDX
XOR EDI,EDI
CMP RCX,R15
SETBE DIL
MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8]
BT RAX,RDX
JNC 0x001610a5
XORPS XMM0,XMM0
LEA R14,[RSP + 0x10]
MOVAPS xmmword ptr [R14],XMM0
MOV RSI,qword ptr [RSI]
MOV RDI,R14
CALL 0x001612ac
MOV RDI,R14
MOV ESI,0x1
CALL 0x00158c4e
TEST BPL,BPL
JNZ 0x00161052
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x5
CMP qword ptr [RBX + 0x90],0x0
JZ 0x00161233
LEA RDI,[RBX + 0x80]
LAB_00161035:
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JZ 0x001611e6
LAB_00161052:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x001610af
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x001611e6
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x00161109
CMP ECX,0x2
JNZ 0x00161238
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x10]
CALL 0x0015da80
LAB_0016108c:
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x001611e2
LAB_001610a5:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x00161202
LAB_001610af:
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x30]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x00158c4e
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x00158c4e
MOV RDI,qword ptr [RBX]
MOV RSI,R15
CALL 0x0015b5ea
MOV RDI,R15
XOR ESI,ESI
CALL 0x00158c4e
MOV RDI,R15
CALL 0x0015e43a
MOV R14,qword ptr [RBX]
JMP 0x001611e2
LAB_00161109:
MOV RAX,qword ptr [RBX + 0x58]
MOV ECX,dword ptr [RBX + 0x60]
CMP qword ptr [RBX + 0x48],RAX
SETZ DL
TEST ECX,ECX
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JZ 0x00161246
MOV ESI,ECX
LEA RCX,[RSI + -0x1]
MOV RDX,RSI
ADD RDX,0x3e
TEST RCX,RCX
CMOVNS RDX,RCX
SAR RDX,0x6
LEA RDI,[RAX + RDX*0x8]
LEA RDX,[R15 + 0x3f]
AND RDX,RCX
XOR R8D,R8D
CMP RDX,R15
SETBE R8B
MOV EDX,0x1
SHL RDX,CL
AND RDX,qword ptr [RDI + R8*0x8 + -0x8]
SUB ESI,0x1
MOV dword ptr [RBX + 0x60],ESI
JNC 0x0016117b
MOV dword ptr [RBX + 0x60],0x3f
ADD RAX,-0x8
MOV qword ptr [RBX + 0x58],RAX
LAB_0016117b:
TEST RDX,RDX
JZ 0x001611e6
CMP qword ptr [RBX + 0x70],0x0
JZ 0x00161267
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x20]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x00158c4e
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x00158c4e
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R15
CALL 0x0015b5ea
MOV RDI,R15
XOR ESI,ESI
CALL 0x00158c4e
MOV RDI,R15
CALL 0x0015e43a
MOV R14,qword ptr [RBX + 0x70]
LAB_001611e2:
MOV BL,0x1
JMP 0x001611eb
LAB_001611e6:
XOR EBX,EBX
XOR R14D,R14D
LAB_001611eb:
LEA R15,[RSP + 0x10]
MOV RDI,R15
XOR ESI,ESI
CALL 0x00158c4e
MOV RDI,R15
CALL 0x0015e43a
LAB_00161202:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00161212:
LEA RDI,[0x1eedcd]
LEA RDX,[0x1eee17]
LEA RCX,[0x1efd49]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x0011bed0
LAB_00161233:
CALL 0x0011b320
LAB_00161238:
LEA RCX,[0x1efd5d]
MOV ESI,0x1c4b
JMP 0x00161252
LAB_00161246:
LEA RCX,[0x1efd9b]
MOV ESI,0x1c57
LAB_00161252:
LEA RDI,[0x1eedcd]
LEA RDX,[0x1eee17]
XOR EAX,EAX
CALL 0x0011bed0
LAB_00161267:
LEA RDI,[0x1eedcd]
LEA RDX,[0x1eee17]
LEA RCX,[0x1efdb3]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x0011bed0
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<unsigned long&>(unsigned long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<unsigned_long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong *param_1,bool param_2)
{
uint uVar1;
char cVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
int8 uVar6;
bool bVar7;
long lVar8;
int1 auVar9 [16];
int1 local_5d;
int4 local_5c;
ulong local_58;
int8 uStack_50;
ulong local_48;
int8 uStack_40;
ulong local_38;
int8 uStack_30;
uVar1 = *(uint *)(this + 0x38);
if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) &
1) == 0) {
uVar5 = 0;
lVar8 = 0;
goto LAB_00161202;
}
local_58 = 0;
uStack_50 = 0;
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::
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_58,*param_1);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
if (param_2) {
LAB_00161052:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_38 = local_58;
uStack_30 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_38,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,(data *)&local_38);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_38);
lVar8 = *(long *)this;
}
else {
pcVar4 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar4 == (char *)0x0) goto LAB_001611e6;
if (*pcVar4 == '\x01') {
lVar8 = *(long *)(this + 0x58);
uVar1 = *(uint *)(this + 0x60);
if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) {
pcVar4 = "!key_keep_stack.empty()";
uVar6 = 0x1c57;
goto LAB_00161252;
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8);
*(uint *)(this + 0x60) = uVar1 - 1;
if (uVar1 == 0) {
*(int4 *)(this + 0x60) = 0x3f;
*(long *)(this + 0x58) = lVar8 + -8;
}
if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_001611e6;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 00161267 to 00161287 has its CatchHandler @ 00161288 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
0x1c60,"GGML_ASSERT(%s) failed","object_element");
}
local_48 = local_58;
uStack_40 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_48,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 + 0x70),(data *)&local_48);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_48);
lVar8 = *(long *)(this + 0x70);
}
else {
if (*pcVar4 != '\x02') {
pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar6 = 0x1c4b;
LAB_00161252:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
uVar6,"GGML_ASSERT(%s) failed",pcVar4);
}
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>>>
**)(pcVar4 + 8),(basic_json *)&local_58);
lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar5 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_5d = 5;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 00161233 to 00161266 has its CatchHandler @ 0016128a */
std::__throw_bad_function_call();
}
/* try { // try from 00161035 to 0016108b has its CatchHandler @ 0016128a */
cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58);
if (cVar2 != '\0') goto LAB_00161052;
LAB_001611e6:
uVar5 = 0;
lVar8 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_58,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
LAB_00161202:
auVar9._0_8_ = uVar5 & 0xffffffff;
auVar9._8_8_ = lVar8;
return auVar9;
}
| |
32,604 | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<unsigned long&>(unsigned long&, bool) | monkey531[P]llama/common/json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O2 | cpp | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<unsigned long&>(unsigned long&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %rax
cmpq 0x30(%rdi), %rax
jne 0x446f8
cmpl $0x0, 0x38(%rbx)
je 0x44850
leaq 0x20(%rbx), %rdi
callq 0x41882
testq %rdx, (%rax)
je 0x44793
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x448da
testb %bpl, %bpl
jne 0x44744
leaq 0x80(%rbx), %rdi
movq 0x10(%rbx), %rsi
subq 0x8(%rbx), %rsi
shrq $0x3, %rsi
pushq $0x5
popq %rdx
leaq 0x8(%rsp), %rcx
callq 0x418b0
testb %al, %al
je 0x44831
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4479d
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x44831
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x447c7
cmpl $0x2, %ecx
jne 0x44871
movq 0x8(%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x41ce6
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x4482d
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x44840
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x41cb2
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3ff8e
movq %r14, %rdi
callq 0x3d408
movq (%rbx), %r14
jmp 0x4482d
movq 0x48(%rbx), %rax
cmpq 0x58(%rbx), %rax
jne 0x447db
cmpl $0x0, 0x60(%rbx)
je 0x4487f
leaq 0x48(%rbx), %rdi
callq 0x41882
movq %rdx, %r14
leaq 0x58(%rbx), %rdi
movq (%rax), %r15
callq 0x40ee8
testq %r14, %r15
je 0x44831
cmpq $0x0, 0x70(%rbx)
je 0x448a0
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x41cb2
movq 0x70(%rbx), %rdi
movq %r14, %rsi
callq 0x3ff8e
movq %r14, %rdi
callq 0x3d408
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x44836
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
callq 0x3d408
movl %ebx, %eax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6b579(%rip), %rdi # 0xafdd0
leaq 0x6b5bc(%rip), %rdx # 0xafe1a
leaq 0x6c4f6(%rip), %rcx # 0xb0d5b
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x23ef0
leaq 0x6c4f7(%rip), %rcx # 0xb0d6f
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x4488b
leaq 0x6c527(%rip), %rcx # 0xb0dad
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x6b53e(%rip), %rdi # 0xafdd0
leaq 0x6b581(%rip), %rdx # 0xafe1a
xorl %eax, %eax
callq 0x23ef0
leaq 0x6b529(%rip), %rdi # 0xafdd0
leaq 0x6b56c(%rip), %rdx # 0xafe1a
leaq 0x6c510(%rip), %rcx # 0xb0dc5
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x23ef0
jmp 0x448c5
jmp 0x448c5
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3d408
movq %rbx, %rdi
callq 0x23fc0
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRmEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 38h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rax, [rdi+20h]
cmp rax, [rdi+30h]
jnz short loc_446F8
cmp dword ptr [rbx+38h], 0
jz loc_44850
loc_446F8:
lea rdi, [rbx+20h]
call _ZNSt6vectorIbSaIbEE4backEv; std::vector<bool>::back(void)
test [rax], rdx
jz loc_44793
lea rdi, [rsp+58h+var_50]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRmmTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
test bpl, bpl
jnz short loc_44744
lea rdi, [rbx+80h]
mov rsi, [rbx+10h]
sub rsi, [rbx+8]
shr rsi, 3
push 5
pop rdx
lea rcx, [rsp+58h+var_50]
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; 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> &)>::operator()(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> &)
test al, al
jz loc_44831
loc_44744:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_4479D
mov rax, [rax-8]
test rax, rax
jz loc_44831
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz short loc_447C7
cmp ecx, 2
jnz loc_44871
mov rdi, [rax+8]
lea rsi, [rsp+58h+var_50]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_4482D
loc_44793:
xor ebx, ebx
xor r14d, r14d
jmp loc_44840
loc_4479D:
lea r14, [rsp+58h+var_30]
lea rsi, [rsp+58h+var_50]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rdi, [rbx]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov r14, [rbx]
jmp short loc_4482D
loc_447C7:
mov rax, [rbx+48h]
cmp rax, [rbx+58h]
jnz short loc_447DB
cmp dword ptr [rbx+60h], 0
jz loc_4487F
loc_447DB:
lea rdi, [rbx+48h]
call _ZNSt6vectorIbSaIbEE4backEv; std::vector<bool>::back(void)
mov r14, rdx
lea rdi, [rbx+58h]; this
mov r15, [rax]
call _ZNSt18_Bit_iterator_base12_M_bump_downEv; std::_Bit_iterator_base::_M_bump_down(void)
test r15, r14
jz short loc_44831
cmp qword ptr [rbx+70h], 0
jz loc_448A0
lea r14, [rsp+58h+var_40]
lea rsi, [rsp+58h+var_50]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rdi, [rbx+70h]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov r14, [rbx+70h]
loc_4482D:
mov bl, 1
jmp short loc_44836
loc_44831:
xor ebx, ebx
xor r14d, r14d
loc_44836:
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_44840:
mov eax, ebx
mov rdx, r14
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_44850:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_44871:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_4488B
loc_4487F:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_4488B:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_448A0:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short loc_448C5
jmp short $+2
loc_448C5:
mov rbx, rax
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<unsigned long &>(
long long a1,
long long a2,
char a3)
{
unsigned int v4; // ebx
_QWORD *v5; // rax
long long v6; // rdx
long long v7; // rax
unsigned __int8 *v8; // rax
int v9; // ecx
long long *v10; // rax
long long v11; // rdx
long long v12; // r14
long long v13; // r15
const char *v15; // rcx
long long v16; // rsi
long long v17; // rbx
_BYTE v18[16]; // [rsp+8h] [rbp-50h] BYREF
char v19[16]; // [rsp+18h] [rbp-40h] BYREF
char v20[48]; // [rsp+28h] [rbp-30h] BYREF
v4 = a1;
if ( *(_QWORD *)(a1 + 32) == *(_QWORD *)(a1 + 48) && !*(_DWORD *)(a1 + 56) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
LABEL_23:
v15 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v16 = 7243LL;
LABEL_25:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v16,
"GGML_ASSERT(%s) failed",
v15);
goto LABEL_26;
}
v5 = (_QWORD *)std::vector<bool>::back(a1 + 32);
if ( (v6 & *v5) != 0 )
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRmmTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(
v18,
a2);
if ( a3
|| (unsigned __int8)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> &)>::operator()(
a1 + 128,
(*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3,
5) )
{
v7 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v7 )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v20,
(long long)v18);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)a1,
(long long)v20);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v20);
goto LABEL_18;
}
v8 = *(unsigned __int8 **)(v7 - 8);
if ( v8 )
{
v9 = *v8;
if ( v9 != 1 )
{
if ( v9 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v8 + 1),
(long long)v18);
LABEL_18:
LOBYTE(v4) = 1;
LABEL_20:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v18);
return v4;
}
goto LABEL_23;
}
if ( *(_QWORD *)(a1 + 72) == *(_QWORD *)(a1 + 88) && !*(_DWORD *)(a1 + 96) )
{
v15 = "!key_keep_stack.empty()";
v16 = 7255LL;
goto LABEL_25;
}
v10 = (long long *)std::vector<bool>::back(a1 + 72);
v12 = v11;
v13 = *v10;
std::_Bit_iterator_base::_M_bump_down((std::_Bit_iterator_base *)(a1 + 88));
if ( (v12 & v13) != 0 )
{
if ( *(_QWORD *)(a1 + 112) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v19,
(long long)v18);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(a1 + 112),
(long long)v19);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v19);
goto LABEL_18;
}
LABEL_26:
v17 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v18);
_Unwind_Resume(v17);
}
}
}
v4 = 0;
goto LABEL_20;
}
return 0;
}
| handle_value<unsigned_long&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x20]
CMP RAX,qword ptr [RDI + 0x30]
JNZ 0x001446f8
CMP dword ptr [RBX + 0x38],0x0
JZ 0x00144850
LAB_001446f8:
LEA RDI,[RBX + 0x20]
CALL 0x00141882
TEST qword ptr [RAX],RDX
JZ 0x00144793
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x001448da
TEST BPL,BPL
JNZ 0x00144744
LEA RDI,[RBX + 0x80]
MOV RSI,qword ptr [RBX + 0x10]
SUB RSI,qword ptr [RBX + 0x8]
SHR RSI,0x3
LAB_0014472f:
PUSH 0x5
POP RDX
LEA RCX,[RSP + 0x8]
CALL 0x001418b0
TEST AL,AL
JZ 0x00144831
LAB_00144744:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0014479d
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x00144831
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x001447c7
CMP ECX,0x2
JNZ 0x00144871
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x8]
CALL 0x00141ce6
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x0014482d
LAB_00144793:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x00144840
LAB_0014479d:
LEA R14,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00141cb2
MOV RDI,qword ptr [RBX]
MOV RSI,R14
CALL 0x0013ff8e
MOV RDI,R14
CALL 0x0013d408
MOV R14,qword ptr [RBX]
JMP 0x0014482d
LAB_001447c7:
MOV RAX,qword ptr [RBX + 0x48]
CMP RAX,qword ptr [RBX + 0x58]
JNZ 0x001447db
CMP dword ptr [RBX + 0x60],0x0
JZ 0x0014487f
LAB_001447db:
LEA RDI,[RBX + 0x48]
CALL 0x00141882
LAB_001447e4:
MOV R14,RDX
LEA RDI,[RBX + 0x58]
MOV R15,qword ptr [RAX]
CALL 0x00140ee8
TEST R15,R14
JZ 0x00144831
CMP qword ptr [RBX + 0x70],0x0
JZ 0x001448a0
LEA R14,[RSP + 0x18]
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00141cb2
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R14
CALL 0x0013ff8e
MOV RDI,R14
CALL 0x0013d408
MOV R14,qword ptr [RBX + 0x70]
LAB_0014482d:
MOV BL,0x1
JMP 0x00144836
LAB_00144831:
XOR EBX,EBX
XOR R14D,R14D
LAB_00144836:
LEA RDI,[RSP + 0x8]
CALL 0x0013d408
LAB_00144840:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00144850:
LEA RDI,[0x1afdd0]
LEA RDX,[0x1afe1a]
LEA RCX,[0x1b0d5b]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x00123ef0
LAB_00144871:
LEA RCX,[0x1b0d6f]
MOV ESI,0x1c4b
JMP 0x0014488b
LAB_0014487f:
LEA RCX,[0x1b0dad]
MOV ESI,0x1c57
LAB_0014488b:
LEA RDI,[0x1afdd0]
LEA RDX,[0x1afe1a]
XOR EAX,EAX
CALL 0x00123ef0
LAB_001448a0:
LEA RDI,[0x1afdd0]
LEA RDX,[0x1afe1a]
LEA RCX,[0x1b0dc5]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x00123ef0
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<unsigned long&>(unsigned long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<unsigned_long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong *param_1,bool param_2)
{
char cVar1;
char *pcVar2;
ulong uVar3;
int8 uVar4;
long lVar5;
int1 auVar6 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_50 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_40 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_30 [16];
if ((*(long *)(this + 0x20) == *(long *)(this + 0x30)) && (*(int *)(this + 0x38) == 0)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
auVar6 = std::vector<bool,std::allocator<bool>>::back
((vector<bool,std::allocator<bool>> *)(this + 0x20));
if ((*auVar6._0_8_ & auVar6._8_8_) == 0) {
uVar3 = 0;
lVar5 = 0;
goto LAB_00144840;
}
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRmmTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
(local_50,param_1);
if (param_2) {
LAB_00144744:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_30,local_50);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,local_30);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_30);
lVar5 = *(long *)this;
}
else {
pcVar2 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar2 == (char *)0x0) goto LAB_00144831;
if (*pcVar2 == '\x01') {
if ((*(long *)(this + 0x48) == *(long *)(this + 0x58)) && (*(int *)(this + 0x60) == 0)) {
pcVar2 = "!key_keep_stack.empty()";
uVar4 = 0x1c57;
goto LAB_0014488b;
}
/* try { // try from 001447db to 001447e3 has its CatchHandler @ 001448c3 */
auVar6 = std::vector<bool,std::allocator<bool>>::back
((vector<bool,std::allocator<bool>> *)(this + 0x48));
uVar3 = *auVar6._0_8_;
std::_Bit_iterator_base::_M_bump_down((_Bit_iterator_base *)(this + 0x58));
if ((uVar3 & auVar6._8_8_) == 0) goto LAB_00144831;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 001448a0 to 001448c0 has its CatchHandler @ 001448c1 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
0x1c60,"GGML_ASSERT(%s) failed","object_element");
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_40,local_50);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 + 0x70),local_40);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_40);
lVar5 = *(long *)(this + 0x70);
}
else {
if (*pcVar2 != '\x02') {
pcVar2 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar4 = 0x1c4b;
LAB_0014488b:
/* try { // try from 0014488b to 0014489f has its CatchHandler @ 001448c5 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
uVar4,"GGML_ASSERT(%s) failed",pcVar2);
}
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>>>
**)(pcVar2 + 8),local_50);
lVar5 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar3 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
/* try { // try from 0014472f to 00144779 has its CatchHandler @ 001448c5 */
cVar1 = 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>&)>
::operator()(this + 0x80,(ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3,5,
local_50);
if (cVar1 != '\0') goto LAB_00144744;
LAB_00144831:
uVar3 = 0;
lVar5 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_50);
LAB_00144840:
auVar6._0_8_ = uVar3 & 0xffffffff;
auVar6._8_8_ = lVar5;
return auVar6;
}
| |
32,605 | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<unsigned long&>(unsigned long&, bool) | monkey531[P]llama/common/json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O3 | cpp | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<unsigned long&>(unsigned long&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq 0x30(%rdi), %rax
movl 0x38(%rdi), %ecx
cmpq %rax, 0x20(%rdi)
sete %dl
testl %ecx, %ecx
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x5ffd3
movl %ecx, %ecx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
leaq -0x1(%rcx), %rdx
addq $0x3e, %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
sarq $0x6, %rcx
leaq (%rax,%rcx,8), %rax
leaq 0x3f(%r15), %rcx
andq %rdx, %rcx
xorl %esi, %esi
cmpq %r15, %rcx
setbe %sil
movq -0x8(%rax,%rsi,8), %rax
btq %rdx, %rax
jae 0x5fe66
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x586c0
movq %r14, %rdi
movl $0x1, %esi
callq 0x586c0
testb %bpl, %bpl
jne 0x5fe13
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0xc(%rsp)
movb $0x5, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x5fff4
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
testb %al, %al
je 0x5ffa7
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x5fe70
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x5ffa7
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x5feca
cmpl $0x2, %ecx
jne 0x5fff9
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5d282
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x5ffa3
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x5ffc3
leaq 0x10(%rsp), %r14
movups (%r14), %xmm0
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x586c0
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x586c0
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x5ae62
movq %r15, %rdi
xorl %esi, %esi
callq 0x586c0
movq %r15, %rdi
callq 0x5dbae
movq (%rbx), %r14
jmp 0x5ffa3
movq 0x58(%rbx), %rax
movl 0x60(%rbx), %ecx
cmpq %rax, 0x48(%rbx)
sete %dl
testl %ecx, %ecx
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x60007
movl %ecx, %esi
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
addq $0x3e, %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdi
leaq 0x3f(%r15), %rdx
andq %rcx, %rdx
xorl %r8d, %r8d
cmpq %r15, %rdx
setbe %r8b
movl $0x1, %edx
shlq %cl, %rdx
andq -0x8(%rdi,%r8,8), %rdx
subl $0x1, %esi
movl %esi, 0x60(%rbx)
jae 0x5ff3c
movl $0x3f, 0x60(%rbx)
addq $-0x8, %rax
movq %rax, 0x58(%rbx)
testq %rdx, %rdx
je 0x5ffa7
cmpq $0x0, 0x70(%rbx)
je 0x60028
leaq 0x10(%rsp), %r14
movups (%r14), %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x586c0
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x586c0
movq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0x5ae62
movq %r15, %rdi
xorl %esi, %esi
callq 0x586c0
movq %r15, %rdi
callq 0x5dbae
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x5ffac
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x586c0
movq %r15, %rdi
callq 0x5dbae
movl %ebx, %eax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8bdf3(%rip), %rdi # 0xebdcd
leaq 0x8be36(%rip), %rdx # 0xebe17
leaq 0x8cd61(%rip), %rcx # 0xecd49
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x1aed0
callq 0x1a320
leaq 0x8cd5d(%rip), %rcx # 0xecd5d
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x60013
leaq 0x8cd8d(%rip), %rcx # 0xecd9b
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x8bdb3(%rip), %rdi # 0xebdcd
leaq 0x8bdf6(%rip), %rdx # 0xebe17
xorl %eax, %eax
callq 0x1aed0
leaq 0x8bd9e(%rip), %rdi # 0xebdcd
leaq 0x8bde1(%rip), %rdx # 0xebe17
leaq 0x8cd76(%rip), %rcx # 0xecdb3
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x1aed0
jmp 0x6004b
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x586c0
movq %r14, %rdi
callq 0x5dbae
movq %rbx, %rdi
callq 0x1afc0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIDnEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov ebp, edx
mov rax, [rdi+30h]
mov ecx, [rdi+38h]
cmp [rdi+20h], rax
setz dl
test ecx, ecx
setz sil
and sil, dl
cmp sil, 1
jz loc_5FFD3
mov ecx, ecx
mov r15, 8000000000000000h
lea rdx, [rcx-1]
add rcx, 3Eh ; '>'
test rdx, rdx
cmovns rcx, rdx
sar rcx, 6
lea rax, [rax+rcx*8]
lea rcx, [r15+3Fh]
and rcx, rdx
xor esi, esi
cmp rcx, r15
setbe sil
mov rax, [rax+rsi*8-8]
bt rax, rdx
jnb loc_5FE66
mov rbx, rdi
lea r14, [rsp+68h+var_58]
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
test bpl, bpl
jnz short loc_5FE13
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+68h+var_5C], eax
mov [rsp+68h+var_5D], 5
cmp qword ptr [rbx+90h], 0
jz loc_5FFF4
lea rdi, [rbx+80h]
lea rsi, [rsp+68h+var_5C]
lea rdx, [rsp+68h+var_5D]
lea rcx, [rsp+68h+var_58]
call qword ptr [rbx+98h]
test al, al
jz loc_5FFA7
loc_5FE13:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_5FE70
mov rax, [rax-8]
test rax, rax
jz loc_5FFA7
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz loc_5FECA
cmp ecx, 2
jnz loc_5FFF9
mov rdi, [rax+8]
lea rsi, [rsp+68h+var_58]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_5FFA3
loc_5FE66:
xor ebx, ebx
xor r14d, r14d
jmp loc_5FFC3
loc_5FE70:
lea r14, [rsp+68h+var_58]
movups xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_38]
movaps xmmword ptr [r15], xmm0
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 byte ptr [r14], 0
mov qword ptr [r14+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, [rbx]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp loc_5FFA3
loc_5FECA:
mov rax, [rbx+58h]
mov ecx, [rbx+60h]
cmp [rbx+48h], rax
setz dl
test ecx, ecx
setz sil
and sil, dl
cmp sil, 1
jz loc_60007
mov esi, ecx
lea rcx, [rsi-1]
mov rdx, rsi
add rdx, 3Eh ; '>'
test rcx, rcx
cmovns rdx, rcx
sar rdx, 6
lea rdi, [rax+rdx*8]
lea rdx, [r15+3Fh]
and rdx, rcx
xor r8d, r8d
cmp rdx, r15
setbe r8b
mov edx, 1
shl rdx, cl
and rdx, [rdi+r8*8-8]
sub esi, 1
mov [rbx+60h], esi
jnb short loc_5FF3C
mov dword ptr [rbx+60h], 3Fh ; '?'
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+58h], rax
loc_5FF3C:
test rdx, rdx
jz short loc_5FFA7
cmp qword ptr [rbx+70h], 0
jz loc_60028
lea r14, [rsp+68h+var_58]
movups xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_48]
movaps xmmword ptr [r15], xmm0
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 byte ptr [r14], 0
mov qword ptr [r14+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, [rbx+70h]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_5FFA3:
mov bl, 1
jmp short loc_5FFAC
loc_5FFA7:
xor ebx, ebx
xor r14d, r14d
loc_5FFAC:
lea r15, [rsp+68h+var_58]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_5FFC3:
mov eax, ebx
mov rdx, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_5FFD3:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_5FFF4:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_5FFF9:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_60013
loc_60007:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_60013:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_60028:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_6004B:
mov rbx, rax
lea r14, [rsp+68h+var_58]
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 rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<decltype(nullptr)>(
long long a1,
long long a2,
char a3)
{
long long v4; // rax
unsigned int v5; // ecx
signed long long v6; // rdx
long long v7; // rcx
long long v8; // rax
unsigned int v9; // ebx
long long v10; // rax
unsigned __int8 *v11; // rax
int v12; // ecx
long long v13; // rax
unsigned int v14; // ecx
long long v15; // rsi
long long v16; // rcx
long long v17; // rdx
long long v18; // rdx
const char *v20; // rcx
long long v21; // rsi
long long v22; // rbx
char v23; // [rsp+Bh] [rbp-5Dh] BYREF
int v24; // [rsp+Ch] [rbp-5Ch] BYREF
__int128 v25; // [rsp+10h] [rbp-58h] BYREF
__int128 v26; // [rsp+20h] [rbp-48h] BYREF
_OWORD v27[3]; // [rsp+30h] [rbp-38h] BYREF
v4 = *(_QWORD *)(a1 + 48);
v5 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v4 && v5 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
goto LABEL_28;
}
v6 = v5 - 1LL;
v7 = v5 + 62LL;
if ( v6 >= 0 )
v7 = v6;
v8 = *(_QWORD *)(v4 + 8 * (v7 >> 6) + 8LL * ((v6 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8);
if ( _bittest64(&v8, v6) )
{
v9 = a1;
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 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 *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
if ( a3 )
{
LABEL_8:
v10 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v10 )
{
v27[0] = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 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 *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)a1,
(long long)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v27);
goto LABEL_23;
}
v11 = *(unsigned __int8 **)(v10 - 8);
if ( v11 )
{
v12 = *v11;
if ( v12 != 1 )
{
if ( v12 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v11 + 1),
(long long)&v25);
LABEL_23:
LOBYTE(v9) = 1;
LABEL_25:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v25);
return v9;
}
v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v21 = 7243LL;
goto LABEL_31;
}
v13 = *(_QWORD *)(a1 + 88);
v14 = *(_DWORD *)(a1 + 96);
if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 )
{
v20 = "!key_keep_stack.empty()";
v21 = 7255LL;
LABEL_31:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v21,
"GGML_ASSERT(%s) failed",
v20);
goto LABEL_32;
}
v15 = v14;
v16 = v14 - 1LL;
v17 = v15 + 62;
if ( v16 >= 0 )
v17 = v16;
v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16);
*(_DWORD *)(a1 + 96) = v15 - 1;
if ( !(_DWORD)v15 )
{
*(_DWORD *)(a1 + 96) = 63;
*(_QWORD *)(a1 + 88) = v13 - 8;
}
if ( v18 )
{
if ( *(_QWORD *)(a1 + 112) )
{
v26 = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 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 *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(a1 + 112),
(long long)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26);
goto LABEL_23;
}
LABEL_32:
v22 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v25);
_Unwind_Resume(v22);
}
}
LABEL_24:
v9 = 0;
goto LABEL_25;
}
v24 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3;
v23 = 5;
if ( *(_QWORD *)(a1 + 144) )
{
if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))(
a1 + 128,
&v24,
&v23,
&v25) )
goto LABEL_24;
goto LABEL_8;
}
LABEL_28:
std::__throw_bad_function_call();
}
return 0;
}
| handle_value<decltype(nullptr)>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV EBP,EDX
MOV RAX,qword ptr [RDI + 0x30]
MOV ECX,dword ptr [RDI + 0x38]
CMP qword ptr [RDI + 0x20],RAX
SETZ DL
TEST ECX,ECX
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JZ 0x0015ffd3
MOV ECX,ECX
MOV R15,-0x8000000000000000
LEA RDX,[RCX + -0x1]
ADD RCX,0x3e
TEST RDX,RDX
CMOVNS RCX,RDX
SAR RCX,0x6
LEA RAX,[RAX + RCX*0x8]
LEA RCX,[R15 + 0x3f]
AND RCX,RDX
XOR ESI,ESI
CMP RCX,R15
SETBE SIL
MOV RAX,qword ptr [RAX + RSI*0x8 + -0x8]
BT RAX,RDX
JNC 0x0015fe66
MOV RBX,RDI
LEA R14,[RSP + 0x10]
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x001586c0
MOV RDI,R14
MOV ESI,0x1
CALL 0x001586c0
TEST BPL,BPL
JNZ 0x0015fe13
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x5
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0015fff4
LEA RDI,[RBX + 0x80]
LAB_0015fdf6:
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JZ 0x0015ffa7
LAB_0015fe13:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0015fe70
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x0015ffa7
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x0015feca
CMP ECX,0x2
JNZ 0x0015fff9
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x10]
CALL 0x0015d282
LAB_0015fe4d:
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x0015ffa3
LAB_0015fe66:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x0015ffc3
LAB_0015fe70:
LEA R14,[RSP + 0x10]
MOVUPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x30]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x001586c0
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x001586c0
MOV RDI,qword ptr [RBX]
MOV RSI,R15
CALL 0x0015ae62
MOV RDI,R15
XOR ESI,ESI
CALL 0x001586c0
MOV RDI,R15
CALL 0x0015dbae
MOV R14,qword ptr [RBX]
JMP 0x0015ffa3
LAB_0015feca:
MOV RAX,qword ptr [RBX + 0x58]
MOV ECX,dword ptr [RBX + 0x60]
CMP qword ptr [RBX + 0x48],RAX
SETZ DL
TEST ECX,ECX
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JZ 0x00160007
MOV ESI,ECX
LEA RCX,[RSI + -0x1]
MOV RDX,RSI
ADD RDX,0x3e
TEST RCX,RCX
CMOVNS RDX,RCX
SAR RDX,0x6
LEA RDI,[RAX + RDX*0x8]
LEA RDX,[R15 + 0x3f]
AND RDX,RCX
XOR R8D,R8D
CMP RDX,R15
SETBE R8B
MOV EDX,0x1
SHL RDX,CL
AND RDX,qword ptr [RDI + R8*0x8 + -0x8]
SUB ESI,0x1
MOV dword ptr [RBX + 0x60],ESI
JNC 0x0015ff3c
MOV dword ptr [RBX + 0x60],0x3f
ADD RAX,-0x8
MOV qword ptr [RBX + 0x58],RAX
LAB_0015ff3c:
TEST RDX,RDX
JZ 0x0015ffa7
CMP qword ptr [RBX + 0x70],0x0
JZ 0x00160028
LEA R14,[RSP + 0x10]
MOVUPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x20]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x001586c0
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x001586c0
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R15
CALL 0x0015ae62
MOV RDI,R15
XOR ESI,ESI
CALL 0x001586c0
MOV RDI,R15
CALL 0x0015dbae
MOV R14,qword ptr [RBX + 0x70]
LAB_0015ffa3:
MOV BL,0x1
JMP 0x0015ffac
LAB_0015ffa7:
XOR EBX,EBX
XOR R14D,R14D
LAB_0015ffac:
LEA R15,[RSP + 0x10]
MOV RDI,R15
XOR ESI,ESI
CALL 0x001586c0
MOV RDI,R15
CALL 0x0015dbae
LAB_0015ffc3:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0015ffd3:
LEA RDI,[0x1ebdcd]
LEA RDX,[0x1ebe17]
LEA RCX,[0x1ecd49]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x0011aed0
LAB_0015fff4:
CALL 0x0011a320
LAB_0015fff9:
LEA RCX,[0x1ecd5d]
MOV ESI,0x1c4b
JMP 0x00160013
LAB_00160007:
LEA RCX,[0x1ecd9b]
MOV ESI,0x1c57
LAB_00160013:
LEA RDI,[0x1ebdcd]
LEA RDX,[0x1ebe17]
XOR EAX,EAX
CALL 0x0011aed0
LAB_00160028:
LEA RDI,[0x1ebdcd]
LEA RDX,[0x1ebe17]
LEA RCX,[0x1ecdb3]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x0011aed0
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<decltype(nullptr)>(decltype(nullptr)&&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<decltype(nullptr)>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,_func_decltype_nullptr **param_1,bool param_2)
{
uint uVar1;
char cVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
int8 uVar6;
bool bVar7;
long lVar8;
int1 auVar9 [16];
int1 local_5d;
int4 local_5c;
basic_json local_58;
int7 uStack_57;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 uStack_30;
uVar1 = *(uint *)(this + 0x38);
if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) &
1) == 0) {
uVar5 = 0;
lVar8 = 0;
goto LAB_0015ffc3;
}
local_58 = (basic_json)0x0;
uStack_50 = 0;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
if (param_2) {
LAB_0015fe13:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_38 = CONCAT71(uStack_57,local_58);
uStack_30 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_58,0));
local_58 = (basic_json)0x0;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_38,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,(data *)&local_38);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_38);
lVar8 = *(long *)this;
}
else {
pcVar4 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar4 == (char *)0x0) goto LAB_0015ffa7;
if (*pcVar4 == '\x01') {
lVar8 = *(long *)(this + 0x58);
uVar1 = *(uint *)(this + 0x60);
if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) {
pcVar4 = "!key_keep_stack.empty()";
uVar6 = 0x1c57;
goto LAB_00160013;
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8);
*(uint *)(this + 0x60) = uVar1 - 1;
if (uVar1 == 0) {
*(int4 *)(this + 0x60) = 0x3f;
*(long *)(this + 0x58) = lVar8 + -8;
}
if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_0015ffa7;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 00160028 to 00160048 has its CatchHandler @ 00160049 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
0x1c60,"GGML_ASSERT(%s) failed","object_element");
}
local_48 = CONCAT71(uStack_57,local_58);
uStack_40 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_58,0));
local_58 = (basic_json)0x0;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_48,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 + 0x70),(data *)&local_48);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_48);
lVar8 = *(long *)(this + 0x70);
}
else {
if (*pcVar4 != '\x02') {
pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar6 = 0x1c4b;
LAB_00160013:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
uVar6,"GGML_ASSERT(%s) failed",pcVar4);
}
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>>>
**)(pcVar4 + 8),&local_58);
lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar5 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_5d = 5;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 0015fff4 to 00160027 has its CatchHandler @ 0016004b */
std::__throw_bad_function_call();
}
/* try { // try from 0015fdf6 to 0015fe4c has its CatchHandler @ 0016004b */
cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58);
if (cVar2 != '\0') goto LAB_0015fe13;
LAB_0015ffa7:
uVar5 = 0;
lVar8 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_58,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
LAB_0015ffc3:
auVar9._0_8_ = uVar5 & 0xffffffff;
auVar9._8_8_ = lVar8;
return auVar9;
}
| |
32,606 | open_cached_file | eloqsql/mysys/mf_cache.c | my_bool open_cached_file(IO_CACHE *cache, const char* dir, const char *prefix,
size_t cache_size, myf cache_myflags)
{
DBUG_ENTER("open_cached_file");
cache->dir= dir;
if (prefix)
{
DBUG_ASSERT(strlen(prefix) == 2);
memcpy(cache->prefix, prefix, 3);
}
else
cache->prefix[0]= 0;
cache->file_name=0;
cache->buffer=0; /* Mark that not open */
if (!init_io_cache(cache, -1, cache_size, WRITE_CACHE, 0L, 0,
MYF(cache_myflags | MY_NABP)))
{
DBUG_RETURN(0);
}
DBUG_RETURN(1);
} | O3 | c | open_cached_file:
movq %rsi, 0xc8(%rdi)
leaq 0xd0(%rdi), %rax
testq %rdx, %rdx
je 0xab85f
movb 0x2(%rdx), %sil
movb %sil, 0x2(%rax)
movzwl (%rdx), %edx
movw %dx, (%rax)
jmp 0xab862
movb $0x0, (%rax)
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %eax, %eax
movq %rax, 0xc0(%rdi)
movq %rax, 0x20(%rdi)
orq $0x4, %r8
movq %r8, (%rsp)
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
movq %rcx, %rdx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x97ebe
testl %eax, %eax
setne %al
addq $0x10, %rsp
popq %rbp
retq
| open_cached_file:
mov [rdi+0C8h], rsi
lea rax, [rdi+0D0h]
test rdx, rdx
jz short loc_AB85F
mov sil, [rdx+2]
mov [rax+2], sil
movzx edx, word ptr [rdx]
mov [rax], dx
jmp short loc_AB862
loc_AB85F:
mov byte ptr [rax], 0
loc_AB862:
push rbp
mov rbp, rsp
sub rsp, 10h
xor eax, eax
mov [rdi+0C0h], rax
mov [rdi+20h], rax
or r8, 4
mov [rsp+18h+var_18], r8
mov esi, 0FFFFFFFFh
mov rdx, rcx
mov ecx, 2
xor r8d, r8d
xor r9d, r9d
call init_io_cache
test eax, eax
setnz al
add rsp, 10h
pop rbp
retn
| bool open_cached_file(long long a1, long long a2, long long a3, unsigned long long a4, long long a5)
{
_WORD *v5; // rax
*(_QWORD *)(a1 + 200) = a2;
v5 = (_WORD *)(a1 + 208);
if ( a3 )
{
*(_BYTE *)(a1 + 210) = *(_BYTE *)(a3 + 2);
*v5 = *(_WORD *)a3;
}
else
{
*(_BYTE *)v5 = 0;
}
*(_QWORD *)(a1 + 192) = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
return (unsigned int)init_io_cache(a1, 0xFFFFFFFF, a4, 2, 0LL, 0, a5 | 4) != 0;
}
| open_cached_file:
MOV qword ptr [RDI + 0xc8],RSI
LEA RAX,[RDI + 0xd0]
TEST RDX,RDX
JZ 0x001ab85f
MOV SIL,byte ptr [RDX + 0x2]
MOV byte ptr [RAX + 0x2],SIL
MOVZX EDX,word ptr [RDX]
MOV word ptr [RAX],DX
JMP 0x001ab862
LAB_001ab85f:
MOV byte ptr [RAX],0x0
LAB_001ab862:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
XOR EAX,EAX
MOV qword ptr [RDI + 0xc0],RAX
MOV qword ptr [RDI + 0x20],RAX
OR R8,0x4
MOV qword ptr [RSP],R8
MOV ESI,0xffffffff
MOV RDX,RCX
MOV ECX,0x2
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00197ebe
TEST EAX,EAX
SETNZ AL
ADD RSP,0x10
POP RBP
RET
|
bool open_cached_file(long param_1,int8 param_2,int2 *param_3,int8 param_4,
ulong param_5)
{
int iVar1;
*(int8 *)(param_1 + 200) = param_2;
if (param_3 == (int2 *)0x0) {
*(int1 *)(param_1 + 0xd0) = 0;
}
else {
*(int1 *)(param_1 + 0xd2) = *(int1 *)(param_3 + 1);
*(int2 *)(param_1 + 0xd0) = *param_3;
}
*(int8 *)(param_1 + 0xc0) = 0;
*(int8 *)(param_1 + 0x20) = 0;
iVar1 = init_io_cache(param_1,0xffffffff,param_4,2,0,0,param_5 | 4);
return iVar1 != 0;
}
| |
32,607 | net_realloc | eloqsql/libmariadb/libmariadb/ma_net.c | static my_bool net_realloc(NET *net, size_t length)
{
uchar *buff;
size_t pkt_length;
if (length >= net->max_packet_size)
{
net->error=1;
net->pvio->set_error(net->pvio->mysql, CR_NET_PACKET_TOO_LARGE, SQLSTATE_UNKNOWN, 0);
return(1);
}
pkt_length = (length+IO_SIZE-1) & ~(IO_SIZE-1);
/* reallocate buffer:
size= pkt_length + NET_HEADER_SIZE + COMP_HEADER_SIZE */
if (!(buff=(uchar*) realloc(net->buff,
pkt_length + NET_HEADER_SIZE + COMP_HEADER_SIZE)))
{
net->error=1;
return(1);
}
net->buff=net->write_pos=buff;
net->buff_end=buff+(net->max_packet=(unsigned long)pkt_length);
return(0);
} | O0 | c | net_realloc:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jb 0x4eafd
movq -0x10(%rbp), %rax
movb $0x1, 0x94(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x50(%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rdi
leaq 0x1b8aa(%rip), %rax # 0x6a390
movq (%rax), %rdx
movl $0x7e4, %esi # imm = 0x7E4
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq *%r8
movb $0x1, -0x1(%rbp)
jmp 0x4eb7c
movq -0x18(%rbp), %rax
addq $0x1000, %rax # imm = 0x1000
subq $0x1, %rax
andq $-0x1000, %rax # imm = 0xF000
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x4, %rsi
addq $0x3, %rsi
callq 0x13700
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x4eb49
movq -0x10(%rbp), %rax
movb $0x1, 0x94(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x4eb7c
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdx
movq %rax, 0x50(%rdx)
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| net_realloc:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+58h]
jb short loc_4EAFD
mov rax, [rbp+var_10]
mov byte ptr [rax+94h], 1
mov rax, [rbp+var_10]
mov rax, [rax]
mov r8, [rax+50h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rdi, [rax+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7E4h
xor eax, eax
mov ecx, eax
mov al, 0
call r8
mov [rbp+var_1], 1
jmp short loc_4EB7C
loc_4EAFD:
mov rax, [rbp+var_18]
add rax, 1000h
sub rax, 1
and rax, 0FFFFFFFFFFFFF000h
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rdi, [rax+8]
mov rsi, [rbp+var_28]
add rsi, 4
add rsi, 3
call _realloc
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_4EB49
mov rax, [rbp+var_10]
mov byte ptr [rax+94h], 1
mov [rbp+var_1], 1
jmp short loc_4EB7C
loc_4EB49:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov rdx, [rbp+var_10]
mov [rdx+50h], rax
add rcx, rax
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov [rbp+var_1], 0
loc_4EB7C:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char net_realloc(_QWORD *a1, unsigned long long a2)
{
unsigned long long v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
if ( a2 < a1[11] )
{
v3 = (a2 + 4095) & 0xFFFFFFFFFFFFF000LL;
v4 = realloc(a1[1], v3 + 7);
if ( v4 )
{
a1[3] = v4;
a1[1] = v4;
a1[10] = v3;
a1[2] = v3 + v4;
return 0;
}
else
{
*((_BYTE *)a1 + 148) = 1;
return 1;
}
}
else
{
*((_BYTE *)a1 + 148) = 1;
(*(void ( **)(_QWORD, long long, char *, _QWORD))(*a1 + 80LL))(
*(_QWORD *)(*a1 + 64LL),
2020LL,
SQLSTATE_UNKNOWN,
0LL);
return 1;
}
}
| net_realloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x58]
JC 0x0014eafd
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x94],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV R8,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x40]
LEA RAX,[0x16a390]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7e4
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL R8
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014eb7c
LAB_0014eafd:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1000
SUB RAX,0x1
AND RAX,-0x1000
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x4
ADD RSI,0x3
CALL 0x00113700
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0014eb49
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x94],0x1
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014eb7c
LAB_0014eb49:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
MOV qword ptr [RDX + 0x50],RAX
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_0014eb7c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 net_realloc(long *param_1,ulong param_2)
{
ulong uVar1;
void *pvVar2;
int1 local_9;
if (param_2 < (ulong)param_1[0xb]) {
uVar1 = param_2 + 0xfff & 0xfffffffffffff000;
pvVar2 = realloc((void *)param_1[1],uVar1 + 7);
if (pvVar2 == (void *)0x0) {
*(int1 *)((long)param_1 + 0x94) = 1;
local_9 = 1;
}
else {
param_1[3] = (long)pvVar2;
param_1[1] = (long)pvVar2;
param_1[10] = uVar1;
param_1[2] = (long)pvVar2 + uVar1;
local_9 = 0;
}
}
else {
*(int1 *)((long)param_1 + 0x94) = 1;
(**(code **)(*param_1 + 0x50))(*(int8 *)(*param_1 + 0x40),0x7e4,SQLSTATE_UNKNOWN,0);
local_9 = 1;
}
return local_9;
}
| |
32,608 | LefDefParser::defwSpecialNetPathViaData(int, int, int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwSpecialNetPathViaData(int numX,
int numY,
int stepX,
int stepY)
{
defwFunc = DEFW_PATH; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (defwState != DEFW_PATH)
return DEFW_BAD_ORDER;
if ((++defwLineItemCounter & 3) == 0) {
fprintf(defwFile, "\n ");
defwLines++;
}
fprintf(defwFile, " DO %d BY %d STEP %d %d", numX, numY, stepX, stepY);
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwSpecialNetPathViaData(int, int, int, int):
subq $0x18, %rsp
movl %edi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
leaq 0x129ad(%rip), %rax # 0x2b168
movl $0x37, (%rax)
leaq 0x12990(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x187db
movl $0x1, 0x14(%rsp)
jmp 0x1886d
leaq 0x12982(%rip), %rax # 0x2b164
cmpl $0x37, (%rax)
je 0x187f1
movl $0x2, 0x14(%rsp)
jmp 0x1886d
leaq 0x12984(%rip), %rax # 0x2b17c
movl (%rax), %eax
addl $0x1, %eax
leaq 0x12978(%rip), %rcx # 0x2b17c
movl %eax, (%rcx)
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x1883b
leaq 0x12943(%rip), %rax # 0x2b158
movq (%rax), %rdi
leaq 0xc1d9(%rip), %rsi # 0x249f8
movb $0x0, %al
callq 0x10f0
leaq 0x12933(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x12927(%rip), %rax # 0x2b160
movl %ecx, (%rax)
leaq 0x12916(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl 0x8(%rsp), %r8d
movl 0x4(%rsp), %r9d
leaq 0xc2d8(%rip), %rsi # 0x24b36
movb $0x0, %al
callq 0x10f0
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser25defwSpecialNetPathViaDataEiiii:
sub rsp, 18h
mov [rsp+18h+var_8], edi
mov [rsp+18h+var_C], esi
mov [rsp+18h+var_10], edx
mov [rsp+18h+var_14], ecx
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 37h ; '7'
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_187DB
mov [rsp+18h+var_4], 1
jmp loc_1886D
loc_187DB:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 37h ; '7'
jz short loc_187F1
mov [rsp+18h+var_4], 2
jmp short loc_1886D
loc_187F1:
lea rax, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter
mov eax, [rax]
add eax, 1
lea rcx, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter
mov [rcx], eax
and eax, 3
cmp eax, 0
jnz short loc_1883B
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
lea rsi, asc_249F8; "\n "
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
loc_1883B:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+18h+var_8]
mov ecx, [rsp+18h+var_C]
mov r8d, [rsp+18h+var_10]
mov r9d, [rsp+18h+var_14]
lea rsi, aDoDByDStepDD; " DO %d BY %d STEP %d %d"
mov al, 0
call _fprintf
mov [rsp+18h+var_4], 0
loc_1886D:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| long long LefDefParser::defwSpecialNetPathViaData(LefDefParser *this, int a2, int a3, int a4)
{
LefDefParser::defwFunc = 55;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwState == 55 )
{
if ( (++LefDefParser::defwLineItemCounter & 3) == 0 )
{
fprintf(LefDefParser::defwFile, "\n ");
++LefDefParser::defwLines;
}
fprintf(LefDefParser::defwFile, " DO %d BY %d STEP %d %d", (_DWORD)this, a2, a3, a4);
return 0;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| defwSpecialNetPathViaData:
SUB RSP,0x18
MOV dword ptr [RSP + 0x10],EDI
MOV dword ptr [RSP + 0xc],ESI
MOV dword ptr [RSP + 0x8],EDX
MOV dword ptr [RSP + 0x4],ECX
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x37
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x001187db
MOV dword ptr [RSP + 0x14],0x1
JMP 0x0011886d
LAB_001187db:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x37
JZ 0x001187f1
MOV dword ptr [RSP + 0x14],0x2
JMP 0x0011886d
LAB_001187f1:
LEA RAX,[0x12b17c]
MOV EAX,dword ptr [RAX]
ADD EAX,0x1
LEA RCX,[0x12b17c]
MOV dword ptr [RCX],EAX
AND EAX,0x3
CMP EAX,0x0
JNZ 0x0011883b
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1249f8]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LAB_0011883b:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0xc]
MOV R8D,dword ptr [RSP + 0x8]
MOV R9D,dword ptr [RSP + 0x4]
LEA RSI,[0x124b36]
MOV AL,0x0
CALL 0x001010f0
MOV dword ptr [RSP + 0x14],0x0
LAB_0011886d:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::defwSpecialNetPathViaData(int, int, int, int) */
int4 LefDefParser::defwSpecialNetPathViaData(int param_1,int param_2,int param_3,int param_4)
{
int4 local_4;
defwFunc = 0x37;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if (defwState == 0x37) {
defwLineItemCounter = defwLineItemCounter + 1;
if ((defwLineItemCounter & 3) == 0) {
fprintf(defwFile,"\n ");
defwLines = defwLines + 1;
}
fprintf(defwFile," DO %d BY %d STEP %d %d",(ulong)(uint)param_1,(ulong)(uint)param_2,
(ulong)(uint)param_3,(ulong)(uint)param_4);
local_4 = 0;
}
else {
local_4 = 2;
}
return local_4;
}
| |
32,609 | LefDefParser::defwSpecialNetPathViaData(int, int, int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwSpecialNetPathViaData(int numX,
int numY,
int stepX,
int stepY)
{
defwFunc = DEFW_PATH; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (defwState != DEFW_PATH)
return DEFW_BAD_ORDER;
if ((++defwLineItemCounter & 3) == 0) {
fprintf(defwFile, "\n ");
defwLines++;
}
fprintf(defwFile, " DO %d BY %d STEP %d %d", numX, numY, stepX, stepY);
return DEFW_OK;
} | O3 | cpp | LefDefParser::defwSpecialNetPathViaData(int, int, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
leaq 0x11876(%rip), %rax # 0x1e178
movl $0x37, (%rax)
leaq 0x11859(%rip), %r13 # 0x1e168
movq (%r13), %rcx
testq %rcx, %rcx
je 0xc989
leaq 0x11855(%rip), %rax # 0x1e174
movl $0x2, %r12d
cmpl $0x37, (%rax)
jne 0xc98f
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
leaq 0x11853(%rip), %rax # 0x1e18c
movl (%rax), %edx
incl %edx
movl %edx, (%rax)
testb $0x3, %dl
jne 0xc967
leaq 0x91ec(%rip), %rdi # 0x15b37
movl $0x6, %esi
movl $0x1, %edx
callq 0x1110
leaq 0x1180f(%rip), %rax # 0x1e170
incl (%rax)
movq (%r13), %rcx
leaq 0x9307(%rip), %rsi # 0x15c75
xorl %r12d, %r12d
movq %rcx, %rdi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
xorl %eax, %eax
callq 0x10e0
jmp 0xc98f
movl $0x1, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12LefDefParser25defwSpecialNetPathViaDataEiiii:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, ecx
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 37h ; '7'
lea r13, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rcx, [r13+0]
test rcx, rcx
jz short loc_C989
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov r12d, 2
cmp dword ptr [rax], 37h ; '7'
jnz short loc_C98F
mov ebp, edx
mov r14d, esi
mov r15d, edi
lea rax, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter
mov edx, [rax]
inc edx
mov [rax], edx
loc_C93F:
test dl, 3
jnz short loc_C967
lea rdi, asc_15B37; "\n "
mov esi, 6
mov edx, 1
call _fwrite
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
inc dword ptr [rax]
mov rcx, [r13+0]
loc_C967:
lea rsi, aDoDByDStepDD; " DO %d BY %d STEP %d %d"
xor r12d, r12d
mov rdi, rcx
mov edx, r15d
mov ecx, r14d
mov r8d, ebp
mov r9d, ebx
xor eax, eax
call _fprintf
jmp short loc_C98F
loc_C989:
mov r12d, 1
loc_C98F:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::defwSpecialNetPathViaData(LefDefParser *this, int a2, int a3, int a4)
{
long long v5; // rcx
unsigned int v6; // r12d
LefDefParser::defwFunc = 55;
v5 = LefDefParser::defwFile;
if ( LefDefParser::defwFile )
{
v6 = 2;
if ( LefDefParser::defwState == 55 )
{
if ( (++LefDefParser::defwLineItemCounter & 3) == 0 )
{
fwrite("\n ", 6LL, 1LL, LefDefParser::defwFile);
++LefDefParser::defwLines;
v5 = LefDefParser::defwFile;
}
v6 = 0;
fprintf(v5, " DO %d BY %d STEP %d %d", (_DWORD)this, a2, a3, a4);
}
}
else
{
return 1;
}
return v6;
}
| defwSpecialNetPathViaData:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ECX
LEA RAX,[0x11e178]
MOV dword ptr [RAX],0x37
LEA R13,[0x11e168]
MOV RCX,qword ptr [R13]
TEST RCX,RCX
JZ 0x0010c989
LEA RAX,[0x11e174]
MOV R12D,0x2
CMP dword ptr [RAX],0x37
JNZ 0x0010c98f
MOV EBP,EDX
MOV R14D,ESI
MOV R15D,EDI
LEA RAX,[0x11e18c]
MOV EDX,dword ptr [RAX]
INC EDX
MOV dword ptr [RAX],EDX
TEST DL,0x3
JNZ 0x0010c967
LEA RDI,[0x115b37]
MOV ESI,0x6
MOV EDX,0x1
CALL 0x00101110
LEA RAX,[0x11e170]
INC dword ptr [RAX]
MOV RCX,qword ptr [R13]
LAB_0010c967:
LEA RSI,[0x115c75]
XOR R12D,R12D
MOV RDI,RCX
MOV EDX,R15D
MOV ECX,R14D
MOV R8D,EBP
MOV R9D,EBX
XOR EAX,EAX
CALL 0x001010e0
JMP 0x0010c98f
LAB_0010c989:
MOV R12D,0x1
LAB_0010c98f:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defwSpecialNetPathViaData(int, int, int, int) */
int8 LefDefParser::defwSpecialNetPathViaData(int param_1,int param_2,int param_3,int param_4)
{
int8 uVar1;
defwFunc = 0x37;
if (defwFile == (FILE *)0x0) {
uVar1 = 1;
}
else {
uVar1 = 2;
if (defwState == 0x37) {
defwLineItemCounter = defwLineItemCounter + 1;
if ((defwLineItemCounter & 3) == 0) {
fwrite(&DAT_00115b37,6,1,defwFile);
defwLines = defwLines + 1;
}
uVar1 = 0;
fprintf(defwFile," DO %d BY %d STEP %d %d",(ulong)(uint)param_1,(ulong)(uint)param_2,
(ulong)(uint)param_3,(ulong)(uint)param_4);
}
}
return uVar1;
}
| |
32,610 | chess::attacks::initAttacks() | Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp | inline void attacks::initAttacks() {
BishopTable[0].attacks = BishopAttacks;
RookTable[0].attacks = RookAttacks;
for (int i = 0; i < 64; i++) {
initSliders(static_cast<Square>(i), BishopTable, BishopMagics[i], bishopAttacks);
initSliders(static_cast<Square>(i), RookTable, RookMagics[i], rookAttacks);
}
} | O0 | cpp | chess::attacks::initAttacks():
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
leaq 0x3582e(%rip), %rax # 0x392d0
movq %rax, 0x3fc37(%rip) # 0x436e0
leaq 0x40420(%rip), %rax # 0x43ed0
movq %rax, 0x108429(%rip) # 0x10bee0
movl $0x0, -0x4(%rbp)
cmpl $0x40, -0x4(%rbp)
jge 0x3bae
movl -0x4(%rbp), %esi
leaq -0x8(%rbp), %rdi
callq 0x43a0
movslq -0x4(%rbp), %rcx
leaq 0x1e601(%rip), %rax # 0x220e0
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
leaq 0x912(%rip), %rsi # 0x4400
leaq -0x28(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x4720
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
movl -0x8(%rbp), %edi
leaq 0x3fbc3(%rip), %rsi # 0x436d0
callq 0x3fb0
jmp 0x3b14
leaq -0x28(%rbp), %rdi
callq 0x47b0
movl -0x4(%rbp), %esi
leaq -0x38(%rbp), %rdi
callq 0x43a0
movslq -0x4(%rbp), %rcx
leaq 0x1e7ac(%rip), %rax # 0x222e0
movq (%rax,%rcx,8), %rax
movq %rax, -0x78(%rbp)
leaq 0xc8d(%rip), %rsi # 0x47d0
leaq -0x58(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x4720
movq -0x78(%rbp), %rdx
movq -0x70(%rbp), %rcx
movl -0x38(%rbp), %edi
leaq 0x10836e(%rip), %rsi # 0x10bed0
callq 0x3fb0
jmp 0x3b69
leaq -0x58(%rbp), %rdi
callq 0x47b0
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3abe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x47b0
jmp 0x3bb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x47b0
jmp 0x3bb7
addq $0x80, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x34d0
| _ZN5chess7attacks11initAttacksEv:
push rbp
mov rbp, rsp
sub rsp, 80h
lea rax, _ZN5chess7attacks13BishopAttacksE; chess::attacks::BishopAttacks
mov cs:qword_436E0, rax
lea rax, _ZN5chess7attacks11RookAttacksE; chess::attacks::RookAttacks
mov cs:qword_10BEE0, rax
mov [rbp+var_4], 0
loc_3ABE:
cmp [rbp+var_4], 40h ; '@'
jge loc_3BAE
mov esi, [rbp+var_4]; int
lea rdi, [rbp+var_8]; this
call _ZN5chess6SquareC2Ei; chess::Square::Square(int)
movsxd rcx, [rbp+var_4]
lea rax, _ZN5chess7attacks12BishopMagicsE; chess::attacks::BishopMagics
mov rax, [rax+rcx*8]
mov [rbp+var_68], rax
lea rsi, _ZN5chess7attacks13bishopAttacksENS_6SquareENS_8BitboardE; chess::attacks::bishopAttacks(chess::Square,chess::Bitboard)
lea rdi, [rbp+var_28]
mov [rbp+var_60], rdi
call _ZNSt8functionIFN5chess8BitboardENS0_6SquareES1_EEC2IRS3_vEEOT_; std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)>::function<chess::Bitboard (&)(chess::Square,chess::Bitboard),void>(chess::Bitboard (&)(chess::Square,chess::Bitboard) &&)
mov rdx, [rbp+var_68]
mov rcx, [rbp+var_60]
mov edi, [rbp+var_8]
lea rsi, _ZN5chess7attacks11BishopTableE; chess::attacks::BishopTable
call _ZN5chess7attacks11initSlidersENS_6SquareEPNS0_5MagicEmRKSt8functionIFNS_8BitboardES1_S5_EE; chess::attacks::initSliders(chess::Square,chess::attacks::Magic *,ulong,std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)> const&)
jmp short $+2
loc_3B14:
lea rdi, [rbp+var_28]
call _ZNSt8functionIFN5chess8BitboardENS0_6SquareES1_EED2Ev; std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)>::~function()
mov esi, [rbp+var_4]; int
lea rdi, [rbp+var_38]; this
call _ZN5chess6SquareC2Ei; chess::Square::Square(int)
movsxd rcx, [rbp+var_4]
lea rax, _ZN5chess7attacks10RookMagicsE; chess::attacks::RookMagics
mov rax, [rax+rcx*8]
mov [rbp+var_78], rax
lea rsi, _ZN5chess7attacks11rookAttacksENS_6SquareENS_8BitboardE; chess::attacks::rookAttacks(chess::Square,chess::Bitboard)
lea rdi, [rbp+var_58]
mov [rbp+var_70], rdi
call _ZNSt8functionIFN5chess8BitboardENS0_6SquareES1_EEC2IRS3_vEEOT_; std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)>::function<chess::Bitboard (&)(chess::Square,chess::Bitboard),void>(chess::Bitboard (&)(chess::Square,chess::Bitboard) &&)
mov rdx, [rbp+var_78]
mov rcx, [rbp+var_70]
mov edi, [rbp+var_38]
lea rsi, _ZN5chess7attacks9RookTableE; chess::attacks::RookTable
call _ZN5chess7attacks11initSlidersENS_6SquareEPNS0_5MagicEmRKSt8functionIFNS_8BitboardES1_S5_EE; chess::attacks::initSliders(chess::Square,chess::attacks::Magic *,ulong,std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)> const&)
jmp short $+2
loc_3B69:
lea rdi, [rbp+var_58]
call _ZNSt8functionIFN5chess8BitboardENS0_6SquareES1_EED2Ev; std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)>::~function()
mov eax, [rbp+var_4]
add eax, 1
mov [rbp+var_4], eax
jmp loc_3ABE
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_28]
call _ZNSt8functionIFN5chess8BitboardENS0_6SquareES1_EED2Ev; std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)>::~function()
jmp short loc_3BB7
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_58]
call _ZNSt8functionIFN5chess8BitboardENS0_6SquareES1_EED2Ev; std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)>::~function()
jmp short loc_3BB7
loc_3BAE:
add rsp, 80h
pop rbp
retn
loc_3BB7:
mov rdi, [rbp+var_30]
call __Unwind_Resume
| long long chess::attacks::initAttacks(chess::attacks *this)
{
long long result; // rax
long long v2; // [rsp+8h] [rbp-78h]
long long v3; // [rsp+18h] [rbp-68h]
_BYTE v4[32]; // [rsp+28h] [rbp-58h] BYREF
unsigned int v5; // [rsp+48h] [rbp-38h] BYREF
_BYTE v6[32]; // [rsp+58h] [rbp-28h] BYREF
unsigned int v7; // [rsp+78h] [rbp-8h] BYREF
int i; // [rsp+7Ch] [rbp-4h]
qword_436E0 = (long long)&chess::attacks::BishopAttacks;
result = (long long)&chess::attacks::RookAttacks;
qword_10BEE0 = (long long)&chess::attacks::RookAttacks;
for ( i = 0; i < 64; ++i )
{
chess::Square::Square((chess::Square *)&v7, i);
v3 = chess::attacks::BishopMagics[i];
std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)>::function<chess::Bitboard (&)(chess::Square,chess::Bitboard),void>(
v6,
&chess::attacks::bishopAttacks);
chess::attacks::initSliders(v7, &chess::attacks::BishopTable, v3, v6);
std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)>::~function(v6);
chess::Square::Square((chess::Square *)&v5, i);
v2 = chess::attacks::RookMagics[i];
std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)>::function<chess::Bitboard (&)(chess::Square,chess::Bitboard),void>(
v4,
&chess::attacks::rookAttacks);
chess::attacks::initSliders(v5, &chess::attacks::RookTable, v2, v4);
std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)>::~function(v4);
result = (unsigned int)(i + 1);
}
return result;
}
| initAttacks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
LEA RAX,[0x1392d0]
MOV qword ptr [0x001436e0],RAX
LEA RAX,[0x143ed0]
MOV qword ptr [0x0020bee0],RAX
MOV dword ptr [RBP + -0x4],0x0
LAB_00103abe:
CMP dword ptr [RBP + -0x4],0x40
JGE 0x00103bae
MOV ESI,dword ptr [RBP + -0x4]
LEA RDI,[RBP + -0x8]
CALL 0x001043a0
MOVSXD RCX,dword ptr [RBP + -0x4]
LEA RAX,[0x1220e0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x68],RAX
LEA RSI,[0x104400]
LEA RDI,[RBP + -0x28]
MOV qword ptr [RBP + -0x60],RDI
CALL 0x00104720
MOV RDX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x60]
MOV EDI,dword ptr [RBP + -0x8]
LAB_00103b06:
LEA RSI,[0x1436d0]
CALL 0x00103fb0
JMP 0x00103b14
LAB_00103b14:
LEA RDI,[RBP + -0x28]
CALL 0x001047b0
MOV ESI,dword ptr [RBP + -0x4]
LEA RDI,[RBP + -0x38]
CALL 0x001043a0
MOVSXD RCX,dword ptr [RBP + -0x4]
LEA RAX,[0x1222e0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x78],RAX
LEA RSI,[0x1047d0]
LEA RDI,[RBP + -0x58]
MOV qword ptr [RBP + -0x70],RDI
CALL 0x00104720
MOV RDX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x70]
MOV EDI,dword ptr [RBP + -0x38]
LAB_00103b5b:
LEA RSI,[0x20bed0]
CALL 0x00103fb0
LAB_00103b67:
JMP 0x00103b69
LAB_00103b69:
LEA RDI,[RBP + -0x58]
CALL 0x001047b0
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00103abe
LAB_00103bae:
ADD RSP,0x80
POP RBP
RET
|
/* chess::attacks::initAttacks() */
void chess::attacks::initAttacks(void)
{
int8 uVar1;
function<chess::Bitboard(chess::Square,chess::Bitboard)> local_60 [32];
int4 local_40 [4];
function<chess::Bitboard(chess::Square,chess::Bitboard)> local_30 [32];
int4 local_10;
int local_c;
BishopTable._16_8_ = BishopAttacks;
RookTable._16_8_ = RookAttacks;
for (local_c = 0; local_c < 0x40; local_c = local_c + 1) {
Square::Square((Square *)&local_10,local_c);
uVar1 = *(int8 *)(BishopMagics + (long)local_c * 8);
std::function<chess::Bitboard(chess::Square,chess::Bitboard)>::
function<chess::Bitboard(&)(chess::Square,chess::Bitboard),void>(local_30,bishopAttacks);
/* try { // try from 00103b06 to 00103b11 has its CatchHandler @ 00103b80 */
initSliders(local_10,BishopTable,uVar1,local_30);
std::function<chess::Bitboard(chess::Square,chess::Bitboard)>::~function(local_30);
Square::Square((Square *)local_40,local_c);
uVar1 = *(int8 *)(RookMagics + (long)local_c * 8);
std::function<chess::Bitboard(chess::Square,chess::Bitboard)>::
function<chess::Bitboard(&)(chess::Square,chess::Bitboard),void>(local_60,rookAttacks);
/* try { // try from 00103b5b to 00103b66 has its CatchHandler @ 00103b97 */
initSliders(local_40[0],RookTable,uVar1,local_60);
std::function<chess::Bitboard(chess::Square,chess::Bitboard)>::~function(local_60);
}
return;
}
| |
32,611 | chess::attacks::initAttacks() | Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp | inline void attacks::initAttacks() {
BishopTable[0].attacks = BishopAttacks;
RookTable[0].attacks = RookAttacks;
for (int i = 0; i < 64; i++) {
initSliders(static_cast<Square>(i), BishopTable, BishopMagics[i], bishopAttacks);
initSliders(static_cast<Square>(i), RookTable, RookMagics[i], rookAttacks);
}
} | O1 | cpp | chess::attacks::initAttacks():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x1a983(%rip), %rax # 0x1e210
movq %rax, 0x24d8c(%rip) # 0x28620
leaq 0x25575(%rip), %rax # 0x28e10
movq %rax, 0xed57e(%rip) # 0xf0e20
xorl %r13d, %r13d
leaq 0x662(%rip), %rbp # 0x3f0e
leaq 0x665(%rip), %rbx # 0x3f18
movq %rsp, %r14
leaq 0xed553(%rip), %r15 # 0xf0e10
xorl %r12d, %r12d
leaq 0xa799(%rip), %rax # 0xe060
movq (%r13,%rax), %rdx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x3b7(%rip), %rax # 0x3c96
movq %rax, (%rsp)
movq %rbp, 0x18(%rsp)
movq %rbx, 0x10(%rsp)
movl %r12d, %edi
leaq 0x24d19(%rip), %rsi # 0x28610
movq %r14, %rcx
callq 0x3b00
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3916
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xa943(%rip), %rax # 0xe260
movq (%r13,%rax), %rdx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x4f9(%rip), %rax # 0x3e2e
movq %rax, (%rsp)
movq %rbp, 0x18(%rsp)
movq %rbx, 0x10(%rsp)
movl %r12d, %edi
movq %r15, %rsi
movq %r14, %rcx
callq 0x3b00
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3968
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
incq %r12
addq $0x8, %r13
cmpq $0x40, %r12
jne 0x38c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x39cc
jmp 0x39cc
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x39c4
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x39c4
jmp 0x39cc
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x39c4
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x3360
movq %rax, %rdi
callq 0x3f02
| _ZN5chess7attacks11initAttacksEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
lea rax, _ZN5chess7attacks13BishopAttacksE; chess::attacks::BishopAttacks
mov cs:qword_28620, rax
lea rax, _ZN5chess7attacks11RookAttacksE; chess::attacks::RookAttacks
mov cs:qword_F0E20, rax
xor r13d, r13d
lea rbp, _ZNSt17_Function_handlerIFN5chess8BitboardENS0_6SquareES1_EPS3_E9_M_invokeERKSt9_Any_dataOS2_OS1_; std::_Function_handler<chess::Bitboard ()(chess::Square,chess::Bitboard),chess::Bitboard (*)(chess::Square,chess::Bitboard)>::_M_invoke(std::_Any_data const&,chess::Square&&,chess::Bitboard&&)
lea rbx, _ZNSt17_Function_handlerIFN5chess8BitboardENS0_6SquareES1_EPS3_E10_M_managerERSt9_Any_dataRKS6_St18_Manager_operation; std::_Function_handler<chess::Bitboard ()(chess::Square,chess::Bitboard),chess::Bitboard (*)(chess::Square,chess::Bitboard)>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov r14, rsp
lea r15, _ZN5chess7attacks9RookTableE; chess::attacks::RookTable
xor r12d, r12d
loc_38C0:
lea rax, _ZN5chess7attacks12BishopMagicsE; chess::attacks::BishopMagics
mov rdx, [r13+rax+0]
xorps xmm0, xmm0
movaps [rsp+58h+var_58], xmm0
movaps [rsp+58h+var_48], xmm0
lea rax, _ZN5chess7attacks13bishopAttacksENS_6SquareENS_8BitboardE; chess::attacks::bishopAttacks(chess::Square,chess::Bitboard)
mov qword ptr [rsp+58h+var_58], rax
mov qword ptr [rsp+58h+var_48+8], rbp
mov qword ptr [rsp+58h+var_48], rbx
mov edi, r12d
lea rsi, _ZN5chess7attacks11BishopTableE; chess::attacks::BishopTable
mov rcx, r14
call _ZN5chess7attacks11initSlidersENS_6SquareEPNS0_5MagicEmRKSt8functionIFNS_8BitboardES1_S5_EE; chess::attacks::initSliders(chess::Square,chess::attacks::Magic *,ulong,std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)> const&)
mov rax, qword ptr [rsp+58h+var_48]
test rax, rax
jz short loc_3916
mov rdi, r14
mov rsi, r14
mov edx, 3
call rax
loc_3916:
lea rax, _ZN5chess7attacks10RookMagicsE; chess::attacks::RookMagics
mov rdx, [r13+rax+0]
xorps xmm0, xmm0
movaps [rsp+58h+var_58], xmm0
movaps [rsp+58h+var_48], xmm0
lea rax, _ZN5chess7attacks11rookAttacksENS_6SquareENS_8BitboardE; chess::attacks::rookAttacks(chess::Square,chess::Bitboard)
mov qword ptr [rsp+58h+var_58], rax
mov qword ptr [rsp+58h+var_48+8], rbp
mov qword ptr [rsp+58h+var_48], rbx
mov edi, r12d
mov rsi, r15
mov rcx, r14
call _ZN5chess7attacks11initSlidersENS_6SquareEPNS0_5MagicEmRKSt8functionIFNS_8BitboardES1_S5_EE; chess::attacks::initSliders(chess::Square,chess::attacks::Magic *,ulong,std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)> const&)
mov rax, qword ptr [rsp+58h+var_48]
test rax, rax
jz short loc_3968
mov rdi, r14
mov rsi, r14
mov edx, 3
call rax
loc_3968:
inc r12
add r13, 8
cmp r12, 40h ; '@'
jnz loc_38C0
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_39CC
jmp short loc_39CC
mov rbx, rax
mov rax, qword ptr [rsp+58h+var_48]
test rax, rax
jz short loc_39C4
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_39C4
jmp short loc_39CC
mov rbx, rax
mov rax, qword ptr [rsp+58h+var_48]
test rax, rax
jz short loc_39C4
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_39C4:
mov rdi, rbx
call __Unwind_Resume
loc_39CC:
mov rdi, rax
call __clang_call_terminate
| long long ( * chess::attacks::initAttacks(chess::attacks *this))()
{
long long v1; // r13
long long i; // r12
long long v3; // rdx
long long v4; // rdx
long long ( *result)(); // rax
long long ( *v6)(); // [rsp+0h] [rbp-58h] BYREF
long long v7; // [rsp+8h] [rbp-50h]
long long ( *v8)(); // [rsp+10h] [rbp-48h]
long long ( *v9)(); // [rsp+18h] [rbp-40h]
qword_28620 = (long long)&chess::attacks::BishopAttacks;
qword_F0E20 = (long long)&chess::attacks::RookAttacks;
v1 = 0LL;
for ( i = 0LL; i != 64; ++i )
{
v3 = *(_QWORD *)((char *)&chess::attacks::BishopMagics + v1);
v7 = 0LL;
v6 = chess::attacks::bishopAttacks;
v9 = std::_Function_handler<chess::Bitboard ()(chess::Square,chess::Bitboard),chess::Bitboard (*)(chess::Square,chess::Bitboard)>::_M_invoke;
v8 = std::_Function_handler<chess::Bitboard ()(chess::Square,chess::Bitboard),chess::Bitboard (*)(chess::Square,chess::Bitboard)>::_M_manager;
chess::attacks::initSliders((unsigned int)i, &chess::attacks::BishopTable, v3, &v6);
if ( v8 )
((void ( *)(long long ( **)(), long long ( **)(), long long))v8)(&v6, &v6, 3LL);
v4 = *(_QWORD *)((char *)&chess::attacks::RookMagics + v1);
v7 = 0LL;
v6 = chess::attacks::rookAttacks;
v9 = std::_Function_handler<chess::Bitboard ()(chess::Square,chess::Bitboard),chess::Bitboard (*)(chess::Square,chess::Bitboard)>::_M_invoke;
v8 = std::_Function_handler<chess::Bitboard ()(chess::Square,chess::Bitboard),chess::Bitboard (*)(chess::Square,chess::Bitboard)>::_M_manager;
chess::attacks::initSliders((unsigned int)i, &chess::attacks::RookTable, v4, &v6);
result = v8;
if ( v8 )
result = (long long ( *)())((long long ( *)(long long ( **)(), long long ( **)(), long long))v8)(
&v6,
&v6,
3LL);
v1 += 8LL;
}
return result;
}
| initAttacks:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
LEA RAX,[0x11e210]
MOV qword ptr [0x00128620],RAX
LEA RAX,[0x128e10]
MOV qword ptr [0x001f0e20],RAX
XOR R13D,R13D
LEA RBP,[0x103f0e]
LEA RBX,[0x103f18]
MOV R14,RSP
LEA R15,[0x1f0e10]
XOR R12D,R12D
LAB_001038c0:
LEA RAX,[0x10e060]
MOV RDX,qword ptr [R13 + RAX*0x1]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
LEA RAX,[0x103c96]
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x18],RBP
MOV qword ptr [RSP + 0x10],RBX
LAB_001038ed:
MOV EDI,R12D
LEA RSI,[0x128610]
MOV RCX,R14
CALL 0x00103b00
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00103916
LAB_00103909:
MOV RDI,R14
MOV RSI,R14
MOV EDX,0x3
CALL RAX
LAB_00103916:
LEA RAX,[0x10e260]
MOV RDX,qword ptr [R13 + RAX*0x1]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
LEA RAX,[0x103e2e]
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x18],RBP
MOV qword ptr [RSP + 0x10],RBX
LAB_00103943:
MOV EDI,R12D
MOV RSI,R15
MOV RCX,R14
CALL 0x00103b00
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00103968
LAB_0010395b:
MOV RDI,R14
MOV RSI,R14
MOV EDX,0x3
CALL RAX
LAB_00103968:
INC R12
ADD R13,0x8
CMP R12,0x40
JNZ 0x001038c0
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* chess::attacks::initAttacks() */
void chess::attacks::initAttacks(void)
{
ulong uVar1;
long lVar2;
code *local_58;
int8 uStack_50;
code *local_48;
code *pcStack_40;
DAT_00128620 = BishopAttacks;
DAT_001f0e20 = RookAttacks;
lVar2 = 0;
uVar1 = 0;
do {
uStack_50 = 0;
local_58 = bishopAttacks;
pcStack_40 = std::
_Function_handler<chess::Bitboard(chess::Square,chess::Bitboard),chess::Bitboard(*)(chess::Square,chess::Bitboard)>
::_M_invoke;
local_48 = std::
_Function_handler<chess::Bitboard(chess::Square,chess::Bitboard),chess::Bitboard(*)(chess::Square,chess::Bitboard)>
::_M_manager;
/* try { // try from 001038ed to 001038fe has its CatchHandler @ 001039aa */
initSliders(uVar1 & 0xffffffff,&BishopTable,*(int8 *)((long)&BishopMagics + lVar2),
&local_58);
if (local_48 != (code *)0x0) {
/* try { // try from 00103909 to 00103915 has its CatchHandler @ 0010398a */
(*local_48)(&local_58,&local_58,3);
}
uStack_50 = 0;
local_58 = rookAttacks;
pcStack_40 = std::
_Function_handler<chess::Bitboard(chess::Square,chess::Bitboard),chess::Bitboard(*)(chess::Square,chess::Bitboard)>
::_M_invoke;
local_48 = std::
_Function_handler<chess::Bitboard(chess::Square,chess::Bitboard),chess::Bitboard(*)(chess::Square,chess::Bitboard)>
::_M_manager;
/* try { // try from 00103943 to 00103950 has its CatchHandler @ 0010398c */
initSliders(uVar1 & 0xffffffff,&RookTable,*(int8 *)((long)&RookMagics + lVar2),&local_58);
if (local_48 != (code *)0x0) {
/* try { // try from 0010395b to 00103967 has its CatchHandler @ 00103988 */
(*local_48)(&local_58,&local_58,3);
}
uVar1 = uVar1 + 1;
lVar2 = lVar2 + 8;
} while (uVar1 != 0x40);
return;
}
| |
32,612 | chess::attacks::initAttacks() | Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp | inline void attacks::initAttacks() {
BishopTable[0].attacks = BishopAttacks;
RookTable[0].attacks = RookAttacks;
for (int i = 0; i < 64; i++) {
initSliders(static_cast<Square>(i), BishopTable, BishopMagics[i], bishopAttacks);
initSliders(static_cast<Square>(i), RookTable, RookMagics[i], rookAttacks);
}
} | O3 | cpp | chess::attacks::initAttacks():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x19983(%rip), %rax # 0x1c200
movq %rax, 0x23d8c(%rip) # 0x26610
leaq 0x24575(%rip), %rax # 0x26e00
movq %rax, 0xec57e(%rip) # 0xeee10
xorl %r13d, %r13d
leaq 0x6a4(%rip), %rbp # 0x2f40
leaq 0x6a7(%rip), %rbx # 0x2f4a
leaq 0x8(%rsp), %r14
leaq 0xec551(%rip), %r15 # 0xeee00
xorl %r12d, %r12d
leaq 0x97a7(%rip), %rax # 0xc060
movq (%r13,%rax), %rdx
movq $0x0, 0x10(%rsp)
leaq 0x42a(%rip), %rax # 0x2cf8
movq %rax, 0x8(%rsp)
movq %rbp, 0x20(%rsp)
movq %rbx, 0x18(%rsp)
movl %r12d, %edi
leaq 0x23d19(%rip), %rsi # 0x26600
movq %r14, %rcx
callq 0x2b64
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x2906
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x9953(%rip), %rax # 0xc260
movq (%r13,%rax), %rdx
movq $0x0, 0x10(%rsp)
leaq 0x56e(%rip), %rax # 0x2e90
movq %rax, 0x8(%rsp)
movq %rbp, 0x20(%rsp)
movq %rbx, 0x18(%rsp)
movl %r12d, %edi
movq %r15, %rsi
movq %r14, %rcx
callq 0x2b64
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x2956
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
incq %r12
addq $0x8, %r13
cmpq $0x40, %r12
jne 0x28b2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x29be
jmp 0x29be
movq %rax, %rbx
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x29b6
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x29b6
jmp 0x29be
movq %rax, %rbx
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x29b6
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x2350
movq %rax, %rdi
callq 0x2f35
| _ZN5chess7attacks11initAttacksEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
lea rax, _ZN5chess7attacks13BishopAttacksE; chess::attacks::BishopAttacks
mov cs:qword_26610, rax
lea rax, _ZN5chess7attacks11RookAttacksE; chess::attacks::RookAttacks
mov cs:qword_EEE10, rax
xor r13d, r13d
lea rbp, _ZNSt17_Function_handlerIFN5chess8BitboardENS0_6SquareES1_EPS3_E9_M_invokeERKSt9_Any_dataOS2_OS1_; std::_Function_handler<chess::Bitboard ()(chess::Square,chess::Bitboard),chess::Bitboard (*)(chess::Square,chess::Bitboard)>::_M_invoke(std::_Any_data const&,chess::Square&&,chess::Bitboard&&)
lea rbx, _ZNSt17_Function_handlerIFN5chess8BitboardENS0_6SquareES1_EPS3_E10_M_managerERSt9_Any_dataRKS6_St18_Manager_operation; std::_Function_handler<chess::Bitboard ()(chess::Square,chess::Bitboard),chess::Bitboard (*)(chess::Square,chess::Bitboard)>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
lea r14, [rsp+58h+var_50]
lea r15, _ZN5chess7attacks9RookTableE; chess::attacks::RookTable
xor r12d, r12d
loc_28B2:
lea rax, _ZN5chess7attacks12BishopMagicsE; chess::attacks::BishopMagics
mov rdx, [r13+rax+0]
mov [rsp+58h+var_48], 0
lea rax, _ZN5chess7attacks13bishopAttacksENS_6SquareENS_8BitboardE; chess::attacks::bishopAttacks(chess::Square,chess::Bitboard)
mov [rsp+58h+var_50], rax
mov [rsp+58h+var_38], rbp
mov [rsp+58h+var_40], rbx
mov edi, r12d
lea rsi, _ZN5chess7attacks11BishopTableE; chess::attacks::BishopTable
mov rcx, r14
call _ZN5chess7attacks11initSlidersENS_6SquareEPNS0_5MagicEmRKSt8functionIFNS_8BitboardES1_S5_EE; chess::attacks::initSliders(chess::Square,chess::attacks::Magic *,ulong,std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)> const&)
mov rax, [rsp+58h+var_40]
test rax, rax
jz short loc_2906
mov rdi, r14
mov rsi, r14
mov edx, 3
call rax
loc_2906:
lea rax, _ZN5chess7attacks10RookMagicsE; chess::attacks::RookMagics
mov rdx, [r13+rax+0]
mov [rsp+58h+var_48], 0
lea rax, _ZN5chess7attacks11rookAttacksENS_6SquareENS_8BitboardE; chess::attacks::rookAttacks(chess::Square,chess::Bitboard)
mov [rsp+58h+var_50], rax
mov [rsp+58h+var_38], rbp
mov [rsp+58h+var_40], rbx
mov edi, r12d
mov rsi, r15
mov rcx, r14
call _ZN5chess7attacks11initSlidersENS_6SquareEPNS0_5MagicEmRKSt8functionIFNS_8BitboardES1_S5_EE; chess::attacks::initSliders(chess::Square,chess::attacks::Magic *,ulong,std::function<chess::Bitboard ()(chess::Square,chess::Bitboard)> const&)
mov rax, [rsp+58h+var_40]
test rax, rax
jz short loc_2956
mov rdi, r14
mov rsi, r14
mov edx, 3
call rax
loc_2956:
inc r12
add r13, 8
cmp r12, 40h ; '@'
jnz loc_28B2
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_29BE
jmp short loc_29BE
mov rbx, rax
mov rax, [rsp+58h+var_40]
test rax, rax
jz short loc_29B6
lea rdi, [rsp+58h+var_50]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_29B6
jmp short loc_29BE
mov rbx, rax
mov rax, [rsp+58h+var_40]
test rax, rax
jz short loc_29B6
lea rdi, [rsp+58h+var_50]
mov rsi, rdi
mov edx, 3
call rax
loc_29B6:
mov rdi, rbx
call __Unwind_Resume
loc_29BE:
mov rdi, rax
call __clang_call_terminate
| long long ( * chess::attacks::initAttacks(chess::attacks *this))()
{
long long v1; // r13
long long i; // r12
long long v3; // rdx
long long v4; // rdx
long long ( *result)(); // rax
long long ( *v6)(); // [rsp+8h] [rbp-50h] BYREF
long long v7; // [rsp+10h] [rbp-48h]
long long ( *v8)(); // [rsp+18h] [rbp-40h]
long long ( *v9)(); // [rsp+20h] [rbp-38h]
qword_26610 = (long long)&chess::attacks::BishopAttacks;
qword_EEE10 = (long long)&chess::attacks::RookAttacks;
v1 = 0LL;
for ( i = 0LL; i != 64; ++i )
{
v3 = *(_QWORD *)((char *)&chess::attacks::BishopMagics + v1);
v7 = 0LL;
v6 = chess::attacks::bishopAttacks;
v9 = std::_Function_handler<chess::Bitboard ()(chess::Square,chess::Bitboard),chess::Bitboard (*)(chess::Square,chess::Bitboard)>::_M_invoke;
v8 = std::_Function_handler<chess::Bitboard ()(chess::Square,chess::Bitboard),chess::Bitboard (*)(chess::Square,chess::Bitboard)>::_M_manager;
chess::attacks::initSliders((unsigned int)i, &chess::attacks::BishopTable, v3, &v6);
if ( v8 )
((void ( *)(long long ( **)(), long long ( **)(), long long))v8)(&v6, &v6, 3LL);
v4 = *(_QWORD *)((char *)&chess::attacks::RookMagics + v1);
v7 = 0LL;
v6 = chess::attacks::rookAttacks;
v9 = std::_Function_handler<chess::Bitboard ()(chess::Square,chess::Bitboard),chess::Bitboard (*)(chess::Square,chess::Bitboard)>::_M_invoke;
v8 = std::_Function_handler<chess::Bitboard ()(chess::Square,chess::Bitboard),chess::Bitboard (*)(chess::Square,chess::Bitboard)>::_M_manager;
chess::attacks::initSliders((unsigned int)i, &chess::attacks::RookTable, v4, &v6);
result = v8;
if ( v8 )
result = (long long ( *)())((long long ( *)(long long ( **)(), long long ( **)(), long long))v8)(
&v6,
&v6,
3LL);
v1 += 8LL;
}
return result;
}
| initAttacks:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
LEA RAX,[0x11c200]
MOV qword ptr [0x00126610],RAX
LEA RAX,[0x126e00]
MOV qword ptr [0x001eee10],RAX
XOR R13D,R13D
LEA RBP,[0x102f40]
LEA RBX,[0x102f4a]
LEA R14,[RSP + 0x8]
LEA R15,[0x1eee00]
XOR R12D,R12D
LAB_001028b2:
LEA RAX,[0x10c060]
MOV RDX,qword ptr [R13 + RAX*0x1]
MOV qword ptr [RSP + 0x10],0x0
LEA RAX,[0x102cf8]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x20],RBP
MOV qword ptr [RSP + 0x18],RBX
LAB_001028dd:
MOV EDI,R12D
LEA RSI,[0x126600]
MOV RCX,R14
CALL 0x00102b64
MOV RAX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x00102906
LAB_001028f9:
MOV RDI,R14
MOV RSI,R14
MOV EDX,0x3
CALL RAX
LAB_00102906:
LEA RAX,[0x10c260]
MOV RDX,qword ptr [R13 + RAX*0x1]
MOV qword ptr [RSP + 0x10],0x0
LEA RAX,[0x102e90]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x20],RBP
MOV qword ptr [RSP + 0x18],RBX
LAB_00102931:
MOV EDI,R12D
MOV RSI,R15
MOV RCX,R14
CALL 0x00102b64
MOV RAX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x00102956
LAB_00102949:
MOV RDI,R14
MOV RSI,R14
MOV EDX,0x3
CALL RAX
LAB_00102956:
INC R12
ADD R13,0x8
CMP R12,0x40
JNZ 0x001028b2
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* chess::attacks::initAttacks() */
void chess::attacks::initAttacks(void)
{
ulong uVar1;
long lVar2;
code *local_50;
int8 local_48;
code *local_40;
code *local_38;
DAT_00126610 = BishopAttacks;
DAT_001eee10 = RookAttacks;
lVar2 = 0;
uVar1 = 0;
do {
local_48 = 0;
local_50 = bishopAttacks;
local_38 = std::
_Function_handler<chess::Bitboard(chess::Square,chess::Bitboard),chess::Bitboard(*)(chess::Square,chess::Bitboard)>
::_M_invoke;
local_40 = std::
_Function_handler<chess::Bitboard(chess::Square,chess::Bitboard),chess::Bitboard(*)(chess::Square,chess::Bitboard)>
::_M_manager;
/* try { // try from 001028dd to 001028ee has its CatchHandler @ 0010299a */
initSliders(uVar1 & 0xffffffff,&BishopTable,*(int8 *)((long)&BishopMagics + lVar2),
&local_50);
if (local_40 != (code *)0x0) {
/* try { // try from 001028f9 to 00102905 has its CatchHandler @ 00102978 */
(*local_40)(&local_50,&local_50,3);
}
local_48 = 0;
local_50 = rookAttacks;
local_38 = std::
_Function_handler<chess::Bitboard(chess::Square,chess::Bitboard),chess::Bitboard(*)(chess::Square,chess::Bitboard)>
::_M_invoke;
local_40 = std::
_Function_handler<chess::Bitboard(chess::Square,chess::Bitboard),chess::Bitboard(*)(chess::Square,chess::Bitboard)>
::_M_manager;
/* try { // try from 00102931 to 0010293e has its CatchHandler @ 0010297a */
initSliders(uVar1 & 0xffffffff,&RookTable,*(int8 *)((long)&RookMagics + lVar2),&local_50);
if (local_40 != (code *)0x0) {
/* try { // try from 00102949 to 00102955 has its CatchHandler @ 00102976 */
(*local_40)(&local_50,&local_50,3);
}
uVar1 = uVar1 + 1;
lVar2 = lVar2 + 8;
} while (uVar1 != 0x40);
return;
}
| |
32,613 | pvio_socket_async_write | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | ssize_t pvio_socket_async_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length)
{
ssize_t r= -1;
struct st_pvio_socket *csock= NULL;
#ifndef _WIN32
int write_flags= MSG_DONTWAIT;
#ifdef MSG_NOSIGNAL
write_flags|= MSG_NOSIGNAL;
#endif
#endif
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
#ifndef WIN32
r= ma_send(csock->socket, buffer, length, write_flags);
#else
/* Windows doesn't support MSG_DONTWAIT, so we need to set
socket to non blocking */
pvio_socket_blocking(pvio, 0, 0);
r= send(csock->socket, (const char *)buffer, (int)length, 0);
#endif
return r;
} | O0 | c | pvio_socket_async_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x40, -0x34(%rbp)
movl -0x34(%rbp), %eax
orl $0x4000, %eax # imm = 0x4000
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x425a7
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x425b1
movq $-0x1, -0x8(%rbp)
jmp 0x425de
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x34(%rbp), %ecx
callq 0x43a20
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| pvio_socket_async_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], 0
mov [rbp+var_34], 40h ; '@'
mov eax, [rbp+var_34]
or eax, 4000h
mov [rbp+var_34], eax
cmp [rbp+var_10], 0
jz short loc_425A7
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_425B1
loc_425A7:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_425DE
loc_425B1:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_34]
call ma_send
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_425DE:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long pvio_socket_async_write(_QWORD *a1, long long a2, long long a3)
{
if ( a1 && *a1 )
return ma_send(*(unsigned int *)*a1, a2, a3, 16448LL);
else
return -1LL;
}
| pvio_socket_async_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],-0x1
MOV qword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x34],0x40
MOV EAX,dword ptr [RBP + -0x34]
OR EAX,0x4000
MOV dword ptr [RBP + -0x34],EAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001425a7
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x001425b1
LAB_001425a7:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001425de
LAB_001425b1:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x34]
CALL 0x00143a20
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_001425de:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 pvio_socket_async_write(long *param_1,int8 param_2,int8 param_3)
{
int8 local_10;
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
local_10 = 0xffffffffffffffff;
}
else {
local_10 = ma_send(*(int4 *)*param_1,param_2,param_3,0x4040);
}
return local_10;
}
| |
32,614 | deadlock_search | eloqsql/mysys/waiting_threads.c | static int deadlock_search(struct deadlock_arg *arg, WT_THD *blocker,
uint depth)
{
WT_RESOURCE *rc, *volatile *shared_ptr= &blocker->waiting_for;
WT_THD *cursor;
uint i;
int ret= WT_OK;
DBUG_ENTER("deadlock_search");
DBUG_PRINT("wt", ("enter: thd=%s, blocker=%s, depth=%u",
arg->thd->name, blocker->name, depth));
arg->last_locked_rc= 0;
if (depth > arg->max_depth)
{
DBUG_PRINT("wt", ("exit: WT_DEPTH_EXCEEDED (early)"));
DBUG_RETURN(WT_DEPTH_EXCEEDED);
}
retry:
/*
safe dereference as explained in lf_alloc-pin.c
(in short: protects against lf_alloc_free() in lf_hash_delete())
*/
do
{
rc= *shared_ptr;
lf_pin(arg->thd->pins, 0, rc);
} while (rc != *shared_ptr && LF_BACKOFF());
if (rc == 0)
{
DBUG_PRINT("wt", ("exit: OK (early)"));
DBUG_RETURN(0);
}
rc_rdlock(rc);
if (rc->state != ACTIVE || *shared_ptr != rc)
{
/* blocker is not waiting on this resource anymore */
rc_unlock(rc);
lf_unpin(arg->thd->pins, 0);
goto retry;
}
/* as the state is locked, we can unpin now */
lf_unpin(arg->thd->pins, 0);
/*
Below is not a pure depth-first search. It's a depth-first with a
slightest hint of breadth-first. Depth-first is:
check(element, X):
foreach current in element->nodes[] do:
if current == X return error;
check(current, X);
while we do
check(element, X):
foreach current in element->nodes[] do:
if current == X return error;
foreach current in element->nodes[] do:
check(current, X);
preferring shorter deadlocks over longer ones.
*/
for (i= 0; i < rc->owners.elements; i++)
{
cursor= *dynamic_element(&rc->owners, i, WT_THD**);
/*
We're only looking for (and detecting) cycles that include 'arg->thd'.
That is, only deadlocks that *we* have created. For example,
thd->A->B->thd
(thd waits for A, A waits for B, while B is waiting for thd).
While walking the graph we can encounter other cicles, e.g.
thd->A->B->C->A
This will not be detected. Instead we will walk it in circles until
the search depth limit is reached (the latter guarantees that an
infinite loop is impossible). We expect the thread that has created
the cycle (one of A, B, and C) to detect its deadlock.
*/
if (cursor == arg->thd)
{
ret= WT_DEADLOCK;
increment_cycle_stats(depth, arg->max_depth ==
*arg->thd->deadlock_search_depth_long);
arg->victim= cursor;
goto end;
}
}
for (i= 0; i < rc->owners.elements; i++)
{
cursor= *dynamic_element(&rc->owners, i, WT_THD**);
switch (deadlock_search(arg, cursor, depth+1)) {
case WT_OK:
break;
case WT_DEPTH_EXCEEDED:
ret= WT_DEPTH_EXCEEDED;
break;
case WT_DEADLOCK:
ret= WT_DEADLOCK;
change_victim(cursor, arg); /* also sets arg->last_locked_rc to 0 */
i= rc->owners.elements; /* jump out of the loop */
break;
default:
DBUG_ASSERT(0);
}
if (arg->last_locked_rc)
rc_unlock(arg->last_locked_rc);
}
end:
/*
Note that 'rc' is locked in this function, but it's never unlocked here.
Instead it's saved in arg->last_locked_rc and the *caller* is
expected to unlock it. It's done to support different killing
strategies. This is how it works:
Assuming a graph
thd->A->B->C->thd
deadlock_search() function starts from thd, locks it (in fact it locks not
a thd, but a resource it is waiting on, but below, for simplicity, I'll
talk about "locking a thd"). Then it goes down recursively, locks A, and so
on. Goes down recursively, locks B. Goes down recursively, locks C.
Notices that C is waiting on thd. Deadlock detected. Sets arg->victim=thd.
Returns from the last deadlock_search() call. C stays locked!
Now it checks whether C is a more appropriate victim than 'thd'.
If yes - arg->victim=C, otherwise C is unlocked. Returns. B stays locked.
Now it checks whether B is a more appropriate victim than arg->victim.
If yes - old arg->victim is unlocked and arg->victim=B,
otherwise B is unlocked. Return.
And so on.
In short, a resource is locked in a frame. But it's not unlocked in the
same frame, it's unlocked by the caller, and only after the caller checks
that it doesn't need to use current WT_THD as a victim. If it does - the
lock is kept and the old victim's resource is unlocked. When the recursion
is unrolled and we are back to deadlock() function, there are only two
locks left - on thd and on the victim.
*/
arg->last_locked_rc= rc;
DBUG_PRINT("wt", ("exit: %s",
ret == WT_DEPTH_EXCEEDED ? "WT_DEPTH_EXCEEDED" :
ret ? "WT_DEADLOCK" : "OK"));
DBUG_RETURN(ret);
} | O3 | c | deadlock_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq $0x0, 0x18(%rdi)
movl $0xfffffffe, %r15d # imm = 0xFFFFFFFE
movl %edx, -0x2c(%rbp)
cmpl %edx, 0x8(%rdi)
jb 0xa74c7
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x2decb4(%rip), %r14 # 0x386018
movq 0x28(%r12), %r13
movq (%rbx), %rax
movq 0x30(%rax), %rax
movq %r13, %rcx
xchgq %rcx, (%rax)
cmpq 0x28(%r12), %r13
je 0xa738c
movl (%r14), %eax
testl %eax, %eax
je 0xa7364
pause
decl %eax
jne 0xa7384
jmp 0xa7364
testq %r13, %r13
je 0xa73c4
leaq 0x18(%r13), %r15
movq %r15, %rdi
callq 0xa4390
cmpl $0x0, 0x14(%r13)
jne 0xa73ae
movq 0x28(%r12), %rax
cmpq %r13, %rax
je 0xa73cc
movq %r15, %rdi
callq 0xa44be
movq (%rbx), %rax
movq 0x30(%rax), %rax
xorl %ecx, %ecx
xchgq %rcx, (%rax)
jmp 0xa7364
xorl %r15d, %r15d
jmp 0xa74c7
movq (%rbx), %rax
movq 0x30(%rax), %rax
xorl %ecx, %ecx
xchgq %rcx, (%rax)
xorl %r15d, %r15d
movl 0xe8(%r13), %eax
testq %rax, %rax
je 0xa74c3
movq 0xe0(%r13), %rsi
movq (%rbx), %rdx
xorl %edi, %edi
movq (%rsi,%rdi,8), %rcx
cmpq %rdx, %rcx
je 0xa7484
incq %rdi
cmpq %rdi, %rax
jne 0xa73f7
testq %rax, %rax
je 0xa74c0
incl -0x2c(%rbp)
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0xe0(%r13), %rax
movl %r14d, %ecx
movq (%rax,%rcx,8), %r12
movq %rbx, %rdi
movq %r12, %rsi
movl -0x2c(%rbp), %edx
callq 0xa732f
cmpl $-0x1, %eax
je 0xa744c
cmpl $-0x2, %eax
jne 0xa7464
movl $0xfffffffe, %r15d # imm = 0xFFFFFFFE
jmp 0xa7464
movq %r12, %rdi
movq %rbx, %rsi
callq 0xa74d9
movl 0xe8(%r13), %r14d
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xa7476
addq $0x18, %rdi
callq 0xa44be
incl %r14d
cmpl 0xe8(%r13), %r14d
jb 0xa741e
jmp 0xa74c3
movl 0x8(%rbx), %eax
movq 0x50(%rdx), %rdx
xorl %esi, %esi
cmpq %rax, (%rdx)
sete %sil
movl -0x2c(%rbp), %edx
cmpl $0x20, %edx
movl $0x20, %eax
cmovbl %edx, %eax
movl %esi, %edx
shll $0x7, %edx
leal (%rdx,%rsi,4), %edx
addq 0x2dcaef(%rip), %rdx # 0x383fa0
incl (%rdx,%rax,4)
movq %rcx, 0x10(%rbx)
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
jmp 0xa74c3
xorl %r15d, %r15d
movq %r13, 0x18(%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| deadlock_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov qword ptr [rdi+18h], 0
mov r15d, 0FFFFFFFEh
mov [rbp+var_2C], edx
cmp [rdi+8], edx
jb loc_A74C7
mov r12, rsi
mov rbx, rdi
lea r14, my_cpu_relax_multiplier
loc_A7364:
mov r13, [r12+28h]
mov rax, [rbx]
mov rax, [rax+30h]
mov rcx, r13
xchg rcx, [rax]
cmp r13, [r12+28h]
jz short loc_A738C
mov eax, [r14]
test eax, eax
jz short loc_A7364
loc_A7384:
pause
dec eax
jnz short loc_A7384
jmp short loc_A7364
loc_A738C:
test r13, r13
jz short loc_A73C4
lea r15, [r13+18h]
mov rdi, r15
call my_rw_rdlock
cmp dword ptr [r13+14h], 0
jnz short loc_A73AE
mov rax, [r12+28h]
cmp rax, r13
jz short loc_A73CC
loc_A73AE:
mov rdi, r15
call my_rw_unlock
mov rax, [rbx]
mov rax, [rax+30h]
xor ecx, ecx
xchg rcx, [rax]
jmp short loc_A7364
loc_A73C4:
xor r15d, r15d
jmp loc_A74C7
loc_A73CC:
mov rax, [rbx]
mov rax, [rax+30h]
xor ecx, ecx
xchg rcx, [rax]
xor r15d, r15d
mov eax, [r13+0E8h]
test rax, rax
jz loc_A74C3
mov rsi, [r13+0E0h]
mov rdx, [rbx]
xor edi, edi
loc_A73F7:
mov rcx, [rsi+rdi*8]
cmp rcx, rdx
jz loc_A7484
inc rdi
cmp rax, rdi
jnz short loc_A73F7
test rax, rax
jz loc_A74C0
inc [rbp+var_2C]
xor r14d, r14d
xor r15d, r15d
loc_A741E:
mov rax, [r13+0E0h]
mov ecx, r14d
mov r12, [rax+rcx*8]
mov rdi, rbx
mov rsi, r12
mov edx, [rbp+var_2C]
call deadlock_search
cmp eax, 0FFFFFFFFh
jz short loc_A744C
cmp eax, 0FFFFFFFEh
jnz short loc_A7464
mov r15d, 0FFFFFFFEh
jmp short loc_A7464
loc_A744C:
mov rdi, r12
mov rsi, rbx
call change_victim
mov r14d, [r13+0E8h]
mov r15d, 0FFFFFFFFh
loc_A7464:
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_A7476
add rdi, 18h
call my_rw_unlock
loc_A7476:
inc r14d
cmp r14d, [r13+0E8h]
jb short loc_A741E
jmp short loc_A74C3
loc_A7484:
mov eax, [rbx+8]
mov rdx, [rdx+50h]
xor esi, esi
cmp [rdx], rax
setz sil
mov edx, [rbp+var_2C]
cmp edx, 20h ; ' '
mov eax, 20h ; ' '
cmovb eax, edx
mov edx, esi
shl edx, 7
lea edx, [rdx+rsi*4]
add rdx, cs:wt_cycle_stats_ptr
inc dword ptr [rdx+rax*4]
mov [rbx+10h], rcx
mov r15d, 0FFFFFFFFh
jmp short loc_A74C3
loc_A74C0:
xor r15d, r15d
loc_A74C3:
mov [rbx+18h], r13
loc_A74C7:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long deadlock_search(long long *a1, long long a2, unsigned int a3)
{
unsigned int v3; // r15d
long long v5; // r13
int i; // eax
long long v7; // rdx
long long v8; // rdi
long long v9; // rcx
unsigned int v10; // r14d
long long v11; // r12
int v12; // eax
long long v13; // rdi
BOOL v14; // esi
long long v15; // rax
unsigned int v18; // [rsp+0h] [rbp-2Ch]
a1[3] = 0LL;
v3 = -2;
if ( *((_DWORD *)a1 + 2) >= a3 )
{
while ( 1 )
{
while ( 1 )
{
v5 = *(_QWORD *)(a2 + 40);
_InterlockedExchange64(*(volatile long long **)(*a1 + 48), v5);
if ( v5 == *(_QWORD *)(a2 + 40) )
break;
for ( i = my_cpu_relax_multiplier; i; --i )
_mm_pause();
}
if ( !v5 )
return 0;
my_rw_rdlock(v5 + 24);
if ( !*(_DWORD *)(v5 + 20) && *(_QWORD *)(a2 + 40) == v5 )
break;
my_rw_unlock(v5 + 24);
_InterlockedExchange64(*(volatile long long **)(*a1 + 48), 0LL);
}
_InterlockedExchange64(*(volatile long long **)(*a1 + 48), 0LL);
v3 = 0;
if ( *(_DWORD *)(v5 + 232) )
{
v7 = *a1;
v8 = 0LL;
while ( 1 )
{
v9 = *(_QWORD *)(*(_QWORD *)(v5 + 224) + 8 * v8);
if ( v9 == v7 )
break;
if ( *(_DWORD *)(v5 + 232) == ++v8 )
{
if ( *(_DWORD *)(v5 + 232) )
{
v18 = a3 + 1;
v10 = 0;
v3 = 0;
do
{
v11 = *(_QWORD *)(*(_QWORD *)(v5 + 224) + 8LL * v10);
v12 = deadlock_search(a1, v11, v18);
if ( v12 == -1 )
{
change_victim(v11, a1);
v10 = *(_DWORD *)(v5 + 232);
v3 = -1;
}
else if ( v12 == -2 )
{
v3 = -2;
}
v13 = a1[3];
if ( v13 )
my_rw_unlock(v13 + 24);
++v10;
}
while ( v10 < *(_DWORD *)(v5 + 232) );
}
else
{
v3 = 0;
}
goto LABEL_29;
}
}
v15 = 32LL;
if ( a3 < 0x20 )
v15 = a3;
v14 = **(_QWORD **)(v7 + 80) == *((_DWORD *)a1 + 2);
++*(_DWORD *)((char *)&wt_cycle_stats[v15] + (unsigned int)(132 * v14));
a1[2] = v9;
v3 = -1;
}
LABEL_29:
a1[3] = v5;
}
return v3;
}
| deadlock_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RDI + 0x18],0x0
MOV R15D,0xfffffffe
MOV dword ptr [RBP + -0x2c],EDX
CMP dword ptr [RDI + 0x8],EDX
JC 0x001a74c7
MOV R12,RSI
MOV RBX,RDI
LEA R14,[0x486018]
LAB_001a7364:
MOV R13,qword ptr [R12 + 0x28]
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x30]
MOV RCX,R13
XCHG qword ptr [RAX],RCX
CMP R13,qword ptr [R12 + 0x28]
JZ 0x001a738c
MOV EAX,dword ptr [R14]
TEST EAX,EAX
JZ 0x001a7364
LAB_001a7384:
PAUSE
DEC EAX
JNZ 0x001a7384
JMP 0x001a7364
LAB_001a738c:
TEST R13,R13
JZ 0x001a73c4
LEA R15,[R13 + 0x18]
MOV RDI,R15
CALL 0x001a4390
CMP dword ptr [R13 + 0x14],0x0
JNZ 0x001a73ae
MOV RAX,qword ptr [R12 + 0x28]
CMP RAX,R13
JZ 0x001a73cc
LAB_001a73ae:
MOV RDI,R15
CALL 0x001a44be
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x30]
XOR ECX,ECX
XCHG qword ptr [RAX],RCX
JMP 0x001a7364
LAB_001a73c4:
XOR R15D,R15D
JMP 0x001a74c7
LAB_001a73cc:
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x30]
XOR ECX,ECX
XCHG qword ptr [RAX],RCX
XOR R15D,R15D
MOV EAX,dword ptr [R13 + 0xe8]
TEST RAX,RAX
JZ 0x001a74c3
MOV RSI,qword ptr [R13 + 0xe0]
MOV RDX,qword ptr [RBX]
XOR EDI,EDI
LAB_001a73f7:
MOV RCX,qword ptr [RSI + RDI*0x8]
CMP RCX,RDX
JZ 0x001a7484
INC RDI
CMP RAX,RDI
JNZ 0x001a73f7
TEST RAX,RAX
JZ 0x001a74c0
INC dword ptr [RBP + -0x2c]
XOR R14D,R14D
XOR R15D,R15D
LAB_001a741e:
MOV RAX,qword ptr [R13 + 0xe0]
MOV ECX,R14D
MOV R12,qword ptr [RAX + RCX*0x8]
MOV RDI,RBX
MOV RSI,R12
MOV EDX,dword ptr [RBP + -0x2c]
CALL 0x001a732f
CMP EAX,-0x1
JZ 0x001a744c
CMP EAX,-0x2
JNZ 0x001a7464
MOV R15D,0xfffffffe
JMP 0x001a7464
LAB_001a744c:
MOV RDI,R12
MOV RSI,RBX
CALL 0x001a74d9
MOV R14D,dword ptr [R13 + 0xe8]
MOV R15D,0xffffffff
LAB_001a7464:
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x001a7476
ADD RDI,0x18
CALL 0x001a44be
LAB_001a7476:
INC R14D
CMP R14D,dword ptr [R13 + 0xe8]
JC 0x001a741e
JMP 0x001a74c3
LAB_001a7484:
MOV EAX,dword ptr [RBX + 0x8]
MOV RDX,qword ptr [RDX + 0x50]
XOR ESI,ESI
CMP qword ptr [RDX],RAX
SETZ SIL
MOV EDX,dword ptr [RBP + -0x2c]
CMP EDX,0x20
MOV EAX,0x20
CMOVC EAX,EDX
MOV EDX,ESI
SHL EDX,0x7
LEA EDX,[RDX + RSI*0x4]
ADD RDX,qword ptr [0x00483fa0]
INC dword ptr [RDX + RAX*0x4]
MOV qword ptr [RBX + 0x10],RCX
MOV R15D,0xffffffff
JMP 0x001a74c3
LAB_001a74c0:
XOR R15D,R15D
LAB_001a74c3:
MOV qword ptr [RBX + 0x18],R13
LAB_001a74c7:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 deadlock_search(long *param_1,long param_2,uint param_3)
{
long lVar1;
long lVar2;
int8 uVar3;
int iVar4;
ulong uVar5;
ulong uVar6;
int iVar7;
int8 uVar8;
bool bVar9;
param_1[3] = 0;
uVar8 = 0xfffffffe;
if (param_3 <= *(uint *)(param_1 + 1)) {
while( true ) {
while( true ) {
lVar1 = *(long *)(param_2 + 0x28);
LOCK();
**(long **)(*param_1 + 0x30) = lVar1;
UNLOCK();
iVar7 = my_cpu_relax_multiplier;
if (lVar1 == *(long *)(param_2 + 0x28)) break;
for (; iVar7 != 0; iVar7 = iVar7 + -1) {
}
}
if (lVar1 == 0) {
return 0;
}
my_rw_rdlock();
if ((*(int *)(lVar1 + 0x14) == 0) && (*(long *)(param_2 + 0x28) == lVar1)) break;
my_rw_unlock(lVar1 + 0x18);
LOCK();
**(int8 **)(*param_1 + 0x30) = 0;
UNLOCK();
}
LOCK();
**(int8 **)(*param_1 + 0x30) = 0;
UNLOCK();
uVar8 = 0;
uVar5 = (ulong)*(uint *)(lVar1 + 0xe8);
if (uVar5 != 0) {
uVar6 = 0;
do {
lVar2 = *(long *)(*(long *)(lVar1 + 0xe0) + uVar6 * 8);
if (lVar2 == *param_1) {
bVar9 = **(ulong **)(*param_1 + 0x50) == (ulong)*(uint *)(param_1 + 1);
uVar5 = 0x20;
if (param_3 < 0x20) {
uVar5 = (ulong)param_3;
}
*(int *)(PTR_wt_cycle_stats_00483fa0 +
uVar5 * 4 + (ulong)((uint)bVar9 * 0x80 + (uint)bVar9 * 4)) =
*(int *)(PTR_wt_cycle_stats_00483fa0 +
uVar5 * 4 + (ulong)((uint)bVar9 * 0x80 + (uint)bVar9 * 4)) + 1;
param_1[2] = lVar2;
uVar8 = 0xffffffff;
goto LAB_001a74c3;
}
uVar6 = uVar6 + 1;
} while (uVar5 != uVar6);
if (uVar5 == 0) {
uVar8 = 0;
}
else {
uVar5 = 0;
uVar8 = 0;
do {
iVar7 = (int)uVar5;
uVar3 = *(int8 *)(*(long *)(lVar1 + 0xe0) + uVar5 * 8);
iVar4 = deadlock_search(param_1,uVar3,param_3 + 1);
if (iVar4 == -1) {
change_victim(uVar3,param_1);
iVar7 = *(int *)(lVar1 + 0xe8);
uVar8 = 0xffffffff;
}
else if (iVar4 == -2) {
uVar8 = 0xfffffffe;
}
if (param_1[3] != 0) {
my_rw_unlock(param_1[3] + 0x18);
}
uVar5 = (ulong)(iVar7 + 1U);
} while (iVar7 + 1U < *(uint *)(lVar1 + 0xe8));
}
}
LAB_001a74c3:
param_1[3] = lVar1;
}
return uVar8;
}
| |
32,615 | my_strntoul_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static ulong
my_strntoul_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr + l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr !=NULL )
*endptr= (char*)s;
err[0]= (cnv == MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int) wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow = 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr != NULL )
*endptr= (char*)s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr= (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (overflow)
{
err[0]= (ERANGE);
return (~(uint32) 0);
}
return (negative ? -((long) res) : (long) res);
} | O0 | c | my_strntoul_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0xb8951
movq -0x50(%rbp), %rax
addq $-0x9, %rax
movq %rax, -0x88(%rbp)
subq $0x24, %rax
ja 0xb894d
movq -0x88(%rbp), %rax
leaq 0x15a579(%rip), %rcx # 0x212ea4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xb894f
jmp 0xb894f
cmpl $0x0, -0x3c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
jmp 0xb894f
jmp 0xb894f
jmp 0xb89a8
jmp 0xb8989
cmpq $0x0, -0x30(%rbp)
je 0xb8963
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %edx
movl $0x21, %ecx
movl $0x54, %eax
cmpl $0x0, %edx
cmovel %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xb8b71
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0xb88ea
jmp 0xb89a6
jmp 0xb89a8
movl $0x0, -0x40(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %eax, -0x60(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %edx, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0xb8ab9
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
cmpq $0x30, -0x50(%rbp)
jb 0xb8a27
cmpq $0x39, -0x50(%rbp)
ja 0xb8a27
movq -0x50(%rbp), %rax
subq $0x30, %rax
movq %rax, -0x50(%rbp)
jmp 0xb8a70
cmpq $0x41, -0x50(%rbp)
jb 0xb8a47
cmpq $0x5a, -0x50(%rbp)
ja 0xb8a47
movq -0x50(%rbp), %rax
subq $0x41, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0xb8a6e
cmpq $0x61, -0x50(%rbp)
jb 0xb8a67
cmpq $0x7a, -0x50(%rbp)
ja 0xb8a67
movq -0x50(%rbp), %rax
subq $0x61, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0xb8a6c
jmp 0xb8af8
jmp 0xb8a6e
jmp 0xb8a70
movq -0x50(%rbp), %rax
cmpl -0x24(%rbp), %eax
jl 0xb8a7b
jmp 0xb8af8
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
ja 0xb8a97
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
jne 0xb8aa0
movq -0x50(%rbp), %rax
movl -0x5c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0xb8aa0
movl $0x1, -0x40(%rbp)
jmp 0xb8ab7
movl -0x24(%rbp), %eax
imull -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x50(%rbp), %rcx
movl -0x64(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x64(%rbp)
jmp 0xb8aea
cmpl $0x0, -0x44(%rbp)
jne 0xb8ae8
cmpq $0x0, -0x30(%rbp)
je 0xb8ad1
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movl $0x54, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xb8b71
jmp 0xb8af8
jmp 0xb8aec
movb $0x1, %al
testb $0x1, %al
jne 0xb89d8
jmp 0xb8af8
cmpq $0x0, -0x30(%rbp)
je 0xb8b0a
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x70(%rbp), %rax
cmpq -0x80(%rbp), %rax
jne 0xb8b28
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xb8b71
cmpl $0x0, -0x40(%rbp)
je 0xb8b43
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x8(%rbp)
jmp 0xb8b71
cmpl $0x0, -0x3c(%rbp)
je 0xb8b5c
movl -0x64(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x90(%rbp)
jmp 0xb8b66
movl -0x64(%rbp), %eax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
| my_strntoul_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 90h
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 [rbp+var_3C], 0
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_78], rax
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
loc_B88EA:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle short loc_B8951
mov rax, [rbp+var_50]
add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases
mov [rbp+var_88], rax
sub rax, 24h
ja short def_B8932; jumptable 00000000000B8932 default case, cases 10-31,33-42,44
mov rax, [rbp+var_88]
lea rcx, jpt_B8932
movsxd rax, ds:(jpt_B8932 - 212EA4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_B8934:
jmp short loc_B894F; jumptable 00000000000B8932 case 32
loc_B8936:
jmp short loc_B894F; jumptable 00000000000B8932 case 9
loc_B8938:
cmp [rbp+var_3C], 0; jumptable 00000000000B8932 case 45
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_3C], eax
jmp short loc_B894F
loc_B894B:
jmp short loc_B894F; jumptable 00000000000B8932 case 43
def_B8932:
jmp short loc_B89A8; jumptable 00000000000B8932 default case, cases 10-31,33-42,44
loc_B894F:
jmp short loc_B8989
loc_B8951:
cmp [rbp+var_30], 0
jz short loc_B8963
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_B8963:
mov edx, [rbp+var_44]
mov ecx, 21h ; '!'
mov eax, 54h ; 'T'
cmp edx, 0
cmovz ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
mov [rbp+var_8], 0
jmp loc_B8B71
loc_B8989:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
mov al, 1
test al, 1
jnz loc_B88EA
jmp short $+2
loc_B89A6:
jmp short $+2
loc_B89A8:
mov [rbp+var_40], 0
mov [rbp+var_64], 0
mov rax, [rbp+var_70]
mov [rbp+var_80], rax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_60], eax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_5C], edx
loc_B89D8:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle loc_B8AB9
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
cmp [rbp+var_50], 30h ; '0'
jb short loc_B8A27
cmp [rbp+var_50], 39h ; '9'
ja short loc_B8A27
mov rax, [rbp+var_50]
sub rax, 30h ; '0'
mov [rbp+var_50], rax
jmp short loc_B8A70
loc_B8A27:
cmp [rbp+var_50], 41h ; 'A'
jb short loc_B8A47
cmp [rbp+var_50], 5Ah ; 'Z'
ja short loc_B8A47
mov rax, [rbp+var_50]
sub rax, 41h ; 'A'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_B8A6E
loc_B8A47:
cmp [rbp+var_50], 61h ; 'a'
jb short loc_B8A67
cmp [rbp+var_50], 7Ah ; 'z'
ja short loc_B8A67
mov rax, [rbp+var_50]
sub rax, 61h ; 'a'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_B8A6C
loc_B8A67:
jmp loc_B8AF8
loc_B8A6C:
jmp short $+2
loc_B8A6E:
jmp short $+2
loc_B8A70:
mov rax, [rbp+var_50]
cmp eax, [rbp+var_24]
jl short loc_B8A7B
jmp short loc_B8AF8
loc_B8A7B:
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
ja short loc_B8A97
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
jnz short loc_B8AA0
mov rax, [rbp+var_50]
mov ecx, [rbp+var_5C]
cmp rax, rcx
jbe short loc_B8AA0
loc_B8A97:
mov [rbp+var_40], 1
jmp short loc_B8AB7
loc_B8AA0:
mov eax, [rbp+var_24]
imul eax, [rbp+var_64]
mov [rbp+var_64], eax
mov rcx, [rbp+var_50]
mov eax, [rbp+var_64]
add rax, rcx
mov [rbp+var_64], eax
loc_B8AB7:
jmp short loc_B8AEA
loc_B8AB9:
cmp [rbp+var_44], 0
jnz short loc_B8AE8
cmp [rbp+var_30], 0
jz short loc_B8AD1
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_B8AD1:
mov rax, [rbp+var_38]
mov dword ptr [rax], 54h ; 'T'
mov [rbp+var_8], 0
jmp loc_B8B71
loc_B8AE8:
jmp short loc_B8AF8
loc_B8AEA:
jmp short $+2
loc_B8AEC:
mov al, 1
test al, 1
jnz loc_B89D8
jmp short $+2
loc_B8AF8:
cmp [rbp+var_30], 0
jz short loc_B8B0A
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_B8B0A:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_80]
jnz short loc_B8B28
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
mov [rbp+var_8], 0
jmp short loc_B8B71
loc_B8B28:
cmp [rbp+var_40], 0
jz short loc_B8B43
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov eax, 0FFFFFFFFh
mov [rbp+var_8], rax
jmp short loc_B8B71
loc_B8B43:
cmp [rbp+var_3C], 0
jz short loc_B8B5C
mov eax, [rbp+var_64]
mov ecx, eax
xor eax, eax
sub rax, rcx
mov [rbp+var_90], rax
jmp short loc_B8B66
loc_B8B5C:
mov eax, [rbp+var_64]
mov [rbp+var_90], rax
loc_B8B66:
mov rax, [rbp+var_90]
mov [rbp+var_8], rax
loc_B8B71:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
| long long my_strntoul_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
int v6; // ecx
long long v9; // [rsp+10h] [rbp-80h]
long long v10; // [rsp+18h] [rbp-78h]
long long v11; // [rsp+20h] [rbp-70h]
unsigned int v12; // [rsp+2Ch] [rbp-64h]
unsigned int v13; // [rsp+30h] [rbp-60h]
unsigned int v14; // [rsp+34h] [rbp-5Ch]
long long ( *v15)(long long, unsigned long long *, long long, long long); // [rsp+38h] [rbp-58h]
unsigned long long v16; // [rsp+40h] [rbp-50h] BYREF
int v17; // [rsp+4Ch] [rbp-44h]
int v18; // [rsp+50h] [rbp-40h]
BOOL v19; // [rsp+54h] [rbp-3Ch]
int *v20; // [rsp+58h] [rbp-38h]
_QWORD *v21; // [rsp+60h] [rbp-30h]
unsigned int v22; // [rsp+6Ch] [rbp-24h]
long long v23; // [rsp+70h] [rbp-20h]
long long v24; // [rsp+78h] [rbp-18h]
long long v25; // [rsp+80h] [rbp-10h]
v25 = a1;
v24 = a2;
v23 = a3;
v22 = a4;
v21 = a5;
v20 = a6;
v19 = 0;
v15 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v11 = a2;
v10 = a3 + a2;
*a6 = 0;
while ( 2 )
{
v17 = v15(v25, &v16, v11, v10);
if ( v17 <= 0 )
{
if ( v21 )
*v21 = v11;
v6 = 33;
if ( !v17 )
v6 = 84;
*v20 = v6;
return 0LL;
}
else
{
switch ( v16 )
{
case 9uLL:
case 0x20uLL:
case 0x2BuLL:
goto LABEL_10;
case 0x2DuLL:
v19 = !v19;
LABEL_10:
v11 += v17;
continue;
default:
v18 = 0;
v12 = 0;
v9 = v11;
v13 = 0xFFFFFFFF / v22;
v14 = 0xFFFFFFFF % v22;
break;
}
while ( 1 )
{
v17 = v15(v25, &v16, v11, v10);
if ( v17 <= 0 )
break;
v11 += v17;
if ( v16 < 0x30 || v16 > 0x39 )
{
if ( v16 < 0x41 || v16 > 0x5A )
{
if ( v16 < 0x61 || v16 > 0x7A )
goto LABEL_33;
v16 = v16 - 97 + 10;
}
else
{
v16 = v16 - 65 + 10;
}
}
else
{
v16 -= 48LL;
}
if ( (int)v16 >= (int)v22 )
goto LABEL_33;
if ( v12 > v13 || v12 == v13 && v16 > v14 )
v18 = 1;
else
v12 = v16 + v12 * v22;
}
if ( v17 )
{
LABEL_33:
if ( v21 )
*v21 = v11;
if ( v11 == v9 )
{
*v20 = 33;
return 0LL;
}
else if ( v18 )
{
*v20 = 34;
return 0xFFFFFFFFLL;
}
else if ( v19 )
{
return -(long long)v12;
}
else
{
return v12;
}
}
if ( v21 )
*v21 = v11;
*v20 = 84;
return 0LL;
}
}
}
| my_strntoul_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
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 dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
LAB_001b88ea:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x50]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JLE 0x001b8951
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,-0x9
MOV qword ptr [RBP + -0x88],RAX
SUB RAX,0x24
JA 0x001b894d
MOV RAX,qword ptr [RBP + -0x88]
LEA RCX,[0x312ea4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_20:
JMP 0x001b894f
caseD_9:
JMP 0x001b894f
caseD_2d:
CMP dword ptr [RBP + -0x3c],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001b894f
caseD_2b:
JMP 0x001b894f
caseD_a:
JMP 0x001b89a8
LAB_001b894f:
JMP 0x001b8989
LAB_001b8951:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001b8963
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001b8963:
MOV EDX,dword ptr [RBP + -0x44]
MOV ECX,0x21
MOV EAX,0x54
CMP EDX,0x0
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001b8b71
LAB_001b8989:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x70]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV AL,0x1
TEST AL,0x1
JNZ 0x001b88ea
JMP 0x001b89a6
LAB_001b89a6:
JMP 0x001b89a8
LAB_001b89a8:
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x64],0x0
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x80],RAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x60],EAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x5c],EDX
LAB_001b89d8:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x50]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JLE 0x001b8ab9
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x70]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x50],0x30
JC 0x001b8a27
CMP qword ptr [RBP + -0x50],0x39
JA 0x001b8a27
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x30
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001b8a70
LAB_001b8a27:
CMP qword ptr [RBP + -0x50],0x41
JC 0x001b8a47
CMP qword ptr [RBP + -0x50],0x5a
JA 0x001b8a47
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x41
ADD RAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001b8a6e
LAB_001b8a47:
CMP qword ptr [RBP + -0x50],0x61
JC 0x001b8a67
CMP qword ptr [RBP + -0x50],0x7a
JA 0x001b8a67
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x61
ADD RAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001b8a6c
LAB_001b8a67:
JMP 0x001b8af8
LAB_001b8a6c:
JMP 0x001b8a6e
LAB_001b8a6e:
JMP 0x001b8a70
LAB_001b8a70:
MOV RAX,qword ptr [RBP + -0x50]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x001b8a7b
JMP 0x001b8af8
LAB_001b8a7b:
MOV EAX,dword ptr [RBP + -0x64]
CMP EAX,dword ptr [RBP + -0x60]
JA 0x001b8a97
MOV EAX,dword ptr [RBP + -0x64]
CMP EAX,dword ptr [RBP + -0x60]
JNZ 0x001b8aa0
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x5c]
CMP RAX,RCX
JBE 0x001b8aa0
LAB_001b8a97:
MOV dword ptr [RBP + -0x40],0x1
JMP 0x001b8ab7
LAB_001b8aa0:
MOV EAX,dword ptr [RBP + -0x24]
IMUL EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x64],EAX
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x64]
ADD RAX,RCX
MOV dword ptr [RBP + -0x64],EAX
LAB_001b8ab7:
JMP 0x001b8aea
LAB_001b8ab9:
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x001b8ae8
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001b8ad1
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001b8ad1:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x54
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001b8b71
LAB_001b8ae8:
JMP 0x001b8af8
LAB_001b8aea:
JMP 0x001b8aec
LAB_001b8aec:
MOV AL,0x1
TEST AL,0x1
JNZ 0x001b89d8
JMP 0x001b8af8
LAB_001b8af8:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001b8b0a
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001b8b0a:
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x80]
JNZ 0x001b8b28
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001b8b71
LAB_001b8b28:
CMP dword ptr [RBP + -0x40],0x0
JZ 0x001b8b43
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001b8b71
LAB_001b8b43:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001b8b5c
MOV EAX,dword ptr [RBP + -0x64]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
MOV qword ptr [RBP + -0x90],RAX
JMP 0x001b8b66
LAB_001b8b5c:
MOV EAX,dword ptr [RBP + -0x64]
MOV qword ptr [RBP + -0x90],RAX
LAB_001b8b66:
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x8],RAX
LAB_001b8b71:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001b89a4) */
/* WARNING: Removing unreachable block (ram,0x001b8af6) */
ulong my_strntoul_mb2_or_mb4
(long param_1,long param_2,long param_3,uint param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
ulong uVar2;
long lVar3;
uint uVar4;
int4 uVar5;
ulong local_98;
long local_78;
uint local_6c;
ulong local_58;
int local_4c;
int local_48;
uint local_44;
int4 *local_40;
long *local_38;
uint local_2c;
long local_28;
long local_20;
long local_18;
ulong local_10;
local_44 = 0;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
*param_6 = 0;
local_78 = param_2;
local_40 = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
lVar3 = local_78;
local_4c = (*pcVar1)(local_18,&local_58,local_78,param_2 + param_3);
if (local_4c < 1) {
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
uVar5 = 0x21;
if (local_4c == 0) {
uVar5 = 0x54;
}
*local_40 = uVar5;
return 0;
}
switch(local_58) {
case 9:
break;
default:
local_48 = 0;
local_6c = 0;
uVar4 = (uint)(0xffffffff / (ulong)local_2c);
uVar2 = (ulong)local_2c;
goto LAB_001b89d8;
case 0x20:
break;
case 0x2b:
break;
case 0x2d:
local_44 = (uint)((local_44 != 0 ^ 0xffU) & 1);
}
local_78 = local_78 + local_4c;
} while( true );
LAB_001b89d8:
local_4c = (*pcVar1)(local_18,&local_58,local_78,param_2 + param_3);
if (local_4c < 1) {
if (local_4c == 0) {
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
*local_40 = 0x54;
local_10 = 0;
}
else {
LAB_001b8af8:
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
if (local_78 == lVar3) {
*local_40 = 0x21;
local_10 = 0;
}
else if (local_48 == 0) {
if (local_44 == 0) {
local_98 = (ulong)local_6c;
}
else {
local_98 = -(ulong)local_6c;
}
local_10 = local_98;
}
else {
*local_40 = 0x22;
local_10 = 0xffffffff;
}
}
return local_10;
}
local_78 = local_78 + local_4c;
if ((local_58 < 0x30) || (0x39 < local_58)) {
if ((local_58 < 0x41) || (0x5a < local_58)) {
if ((local_58 < 0x61) || (0x7a < local_58)) goto LAB_001b8af8;
local_58 = local_58 - 0x57;
}
else {
local_58 = local_58 - 0x37;
}
}
else {
local_58 = local_58 - 0x30;
}
if ((int)local_2c <= (int)local_58) goto LAB_001b8af8;
if ((uVar4 < local_6c) || ((local_6c == uVar4 && (0xffffffffU % uVar2 < local_58)))) {
local_48 = 1;
}
else {
local_6c = local_2c * local_6c + (int)local_58;
}
goto LAB_001b89d8;
}
| |
32,616 | my_coll_parser_scan_shift_sequence | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_shift_sequence(MY_COLL_RULE_PARSER *p)
{
MY_COLL_RULE before_extend;
memset(&p->rule.curr, 0, sizeof(p->rule.curr));
/* Scan single shift character or contraction */
if (!my_coll_parser_scan_character_list(p, p->rule.curr,
MY_UCA_MAX_CONTRACTION,
"Contraction"))
return 0;
before_extend= p->rule; /* Remember the part before "/" */
/* Append the part after "/" as expansion */
if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_EXTEND)
{
my_coll_parser_scan(p);
if (!my_coll_parser_scan_character_list(p, p->rule.base,
MY_UCA_MAX_EXPANSION,
"Expansion"))
return 0;
}
else if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CONTEXT)
{
/*
We support 2-character long context sequences only:
one character is the previous context, plus the current character.
It's OK as Unicode's CLDR does not have longer examples.
*/
my_coll_parser_scan(p);
p->rule.with_context= TRUE;
if (!my_coll_parser_scan_character_list(p, p->rule.curr + 1, 1, "context"))
return 0;
}
/* Add rule to the rule list */
if (my_coll_rules_add(p->rules, &p->rule))
return 0;
p->rule= before_extend; /* Restore to the state before "/" */
return 1;
} | O0 | c | my_coll_parser_scan_shift_sequence:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
addq $0x50, %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x24180
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
addq $0x50, %rsi
movl $0x6, %edx
leaq 0x2c5dd(%rip), %rcx # 0x7bc30
callq 0x4fc40
cmpl $0x0, %eax
jne 0x4f669
movl $0x0, -0x4(%rbp)
jmp 0x4f768
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
leaq -0xb0(%rbp), %rdi
movl $0xa0, %edx
callq 0x24210
movq -0x10(%rbp), %rdi
callq 0x4ec80
cmpl $0x8, (%rax)
jne 0x4f6c9
movq -0x10(%rbp), %rdi
callq 0x4f460
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
movl $0xa, %edx
leaq 0x2c39c(%rip), %rcx # 0x7ba4d
callq 0x4fc40
cmpl $0x0, %eax
jne 0x4f6c7
movl $0x0, -0x4(%rbp)
jmp 0x4f768
jmp 0x4f722
movq -0x10(%rbp), %rdi
callq 0x4ec80
cmpl $0x9, (%rax)
jne 0x4f720
movq -0x10(%rbp), %rdi
callq 0x4f460
movq -0x10(%rbp), %rax
movb $0x1, 0xe8(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
addq $0x50, %rsi
addq $0x8, %rsi
movl $0x1, %edx
leaq 0x2d063(%rip), %rcx # 0x7c76e
callq 0x4fc40
cmpl $0x0, %eax
jne 0x4f71e
movl $0x0, -0x4(%rbp)
jmp 0x4f768
jmp 0x4f720
jmp 0x4f722
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
callq 0x4ff90
cmpl $0x0, %eax
je 0x4f748
movl $0x0, -0x4(%rbp)
jmp 0x4f768
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
leaq -0xb0(%rbp), %rsi
movl $0xa0, %edx
callq 0x24210
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_coll_parser_scan_shift_sequence:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
add rdi, 50h ; 'P'
xor esi, esi
mov edx, 30h ; '0'
call _memset
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
add rsi, 50h ; 'P'
mov edx, 6
lea rcx, aContraction; "Contraction"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_4F669
mov [rbp+var_4], 0
jmp loc_4F768
loc_4F669:
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
lea rdi, [rbp+var_B0]
mov edx, 0A0h
call _memcpy
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 8
jnz short loc_4F6C9
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
mov edx, 0Ah
lea rcx, aExpansion; "Expansion"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_4F6C7
mov [rbp+var_4], 0
jmp loc_4F768
loc_4F6C7:
jmp short loc_4F722
loc_4F6C9:
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 9
jnz short loc_4F720
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov rax, [rbp+var_10]
mov byte ptr [rax+0E8h], 1
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
add rsi, 50h ; 'P'
add rsi, 8
mov edx, 1
lea rcx, aCharsetsCharse_52+23h; "context"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_4F71E
mov [rbp+var_4], 0
jmp short loc_4F768
loc_4F71E:
jmp short $+2
loc_4F720:
jmp short $+2
loc_4F722:
mov rax, [rbp+var_10]
mov rdi, [rax+0F0h]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
call my_coll_rules_add
cmp eax, 0
jz short loc_4F748
mov [rbp+var_4], 0
jmp short loc_4F768
loc_4F748:
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
lea rsi, [rbp+var_B0]
mov edx, 0A0h
call _memcpy
mov [rbp+var_4], 1
loc_4F768:
mov eax, [rbp+var_4]
add rsp, 0B0h
pop rbp
retn
| long long my_coll_parser_scan_shift_sequence(long long a1)
{
_BYTE v2[160]; // [rsp+0h] [rbp-B0h] BYREF
long long v3; // [rsp+A0h] [rbp-10h]
v3 = a1;
memset(a1 + 160, 0LL, 48LL);
if ( (unsigned int)my_coll_parser_scan_character_list(v3, v3 + 160, 6LL, "Contraction") )
{
memcpy(v2, v3 + 80, sizeof(v2));
if ( *(_DWORD *)my_coll_parser_curr(v3) == 8 )
{
my_coll_parser_scan(v3);
if ( !(unsigned int)my_coll_parser_scan_character_list(v3, v3 + 80, 10LL, "Expansion") )
return 0;
}
else if ( *(_DWORD *)my_coll_parser_curr(v3) == 9 )
{
my_coll_parser_scan(v3);
*(_BYTE *)(v3 + 232) = 1;
if ( !(unsigned int)my_coll_parser_scan_character_list(v3, v3 + 168, 1LL, "context") )
return 0;
}
if ( (unsigned int)my_coll_rules_add(*(_QWORD *)(v3 + 240), v3 + 80) )
{
return 0;
}
else
{
memcpy(v3 + 80, v2, 160LL);
return 1;
}
}
else
{
return 0;
}
}
| my_coll_parser_scan_shift_sequence:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
ADD RDI,0x50
XOR ESI,ESI
MOV EDX,0x30
CALL 0x00124180
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
ADD RSI,0x50
MOV EDX,0x6
LEA RCX,[0x17bc30]
CALL 0x0014fc40
CMP EAX,0x0
JNZ 0x0014f669
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014f768
LAB_0014f669:
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
LEA RDI,[RBP + -0xb0]
MOV EDX,0xa0
CALL 0x00124210
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0014ec80
CMP dword ptr [RAX],0x8
JNZ 0x0014f6c9
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0014f460
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
MOV EDX,0xa
LEA RCX,[0x17ba4d]
CALL 0x0014fc40
CMP EAX,0x0
JNZ 0x0014f6c7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014f768
LAB_0014f6c7:
JMP 0x0014f722
LAB_0014f6c9:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0014ec80
CMP dword ptr [RAX],0x9
JNZ 0x0014f720
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0014f460
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xe8],0x1
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
ADD RSI,0x50
ADD RSI,0x8
MOV EDX,0x1
LEA RCX,[0x17c76e]
CALL 0x0014fc40
CMP EAX,0x0
JNZ 0x0014f71e
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014f768
LAB_0014f71e:
JMP 0x0014f720
LAB_0014f720:
JMP 0x0014f722
LAB_0014f722:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0xf0]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
CALL 0x0014ff90
CMP EAX,0x0
JZ 0x0014f748
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014f768
LAB_0014f748:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
LEA RSI,[RBP + -0xb0]
MOV EDX,0xa0
CALL 0x00124210
MOV dword ptr [RBP + -0x4],0x1
LAB_0014f768:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xb0
POP RBP
RET
|
int4 my_coll_parser_scan_shift_sequence(long param_1)
{
int iVar1;
int *piVar2;
int1 local_b8 [160];
long local_18;
int4 local_c;
local_18 = param_1;
memset((void *)(param_1 + 0xa0),0,0x30);
iVar1 = my_coll_parser_scan_character_list(local_18,local_18 + 0xa0,6,"Contraction");
if (iVar1 == 0) {
local_c = 0;
}
else {
memcpy(local_b8,(void *)(local_18 + 0x50),0xa0);
piVar2 = (int *)my_coll_parser_curr(local_18);
if (*piVar2 == 8) {
my_coll_parser_scan(local_18);
iVar1 = my_coll_parser_scan_character_list(local_18,local_18 + 0x50,10,"Expansion");
if (iVar1 == 0) {
return 0;
}
}
else {
piVar2 = (int *)my_coll_parser_curr(local_18);
if (*piVar2 == 9) {
my_coll_parser_scan(local_18);
*(int1 *)(local_18 + 0xe8) = 1;
iVar1 = my_coll_parser_scan_character_list(local_18,local_18 + 0xa8,1,"context");
if (iVar1 == 0) {
return 0;
}
}
}
iVar1 = my_coll_rules_add(*(int8 *)(local_18 + 0xf0),local_18 + 0x50);
if (iVar1 == 0) {
memcpy((void *)(local_18 + 0x50),local_b8,0xa0);
local_c = 1;
}
else {
local_c = 0;
}
}
return local_c;
}
| |
32,617 | my_coll_parser_scan_shift_sequence | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_shift_sequence(MY_COLL_RULE_PARSER *p)
{
MY_COLL_RULE before_extend;
memset(&p->rule.curr, 0, sizeof(p->rule.curr));
/* Scan single shift character or contraction */
if (!my_coll_parser_scan_character_list(p, p->rule.curr,
MY_UCA_MAX_CONTRACTION,
"Contraction"))
return 0;
before_extend= p->rule; /* Remember the part before "/" */
/* Append the part after "/" as expansion */
if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_EXTEND)
{
my_coll_parser_scan(p);
if (!my_coll_parser_scan_character_list(p, p->rule.base,
MY_UCA_MAX_EXPANSION,
"Expansion"))
return 0;
}
else if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CONTEXT)
{
/*
We support 2-character long context sequences only:
one character is the previous context, plus the current character.
It's OK as Unicode's CLDR does not have longer examples.
*/
my_coll_parser_scan(p);
p->rule.with_context= TRUE;
if (!my_coll_parser_scan_character_list(p, p->rule.curr + 1, 1, "context"))
return 0;
}
/* Add rule to the rule list */
if (my_coll_rules_add(p->rules, &p->rule))
return 0;
p->rule= before_extend; /* Restore to the state before "/" */
return 1;
} | O3 | c | my_coll_parser_scan_shift_sequence:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %r15
leaq 0xa0(%rdi), %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0xc0(%rdi)
movups %xmm0, 0xb0(%rdi)
movups %xmm0, 0xa0(%rdi)
leaq 0x1e6a9(%rip), %rcx # 0x5ec2a
movl $0x6, %edx
callq 0x406d9
xorl %r14d, %r14d
testl %eax, %eax
je 0x406c8
leaq 0x50(%r15), %rbx
leaq -0xb8(%rbp), %rdi
movl $0xa0, %edx
movq %rbx, %rsi
callq 0x24220
movl (%r15), %eax
cmpl $0x9, %eax
je 0x405f7
cmpl $0x8, %eax
jne 0x40646
leaq 0x28(%r15), %rdi
movq 0x48(%r15), %rax
movq %rax, 0x20(%r15)
movups 0x28(%r15), %xmm0
movups 0x38(%r15), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
callq 0x401df
leaq 0x1e474(%rip), %rcx # 0x5ea5e
movl $0xa, %edx
movq %r15, %rdi
movq %rbx, %rsi
jmp 0x40639
leaq 0x28(%r15), %rdi
movq 0x48(%r15), %rax
movq %rax, 0x20(%r15)
movups 0x28(%r15), %xmm0
movups 0x38(%r15), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
callq 0x401df
movb $0x1, 0xe8(%r15)
leaq 0xa8(%r15), %rsi
leaq 0x1f137(%rip), %rcx # 0x5f768
movl $0x1, %edx
movq %r15, %rdi
callq 0x406d9
testl %eax, %eax
je 0x406c8
movq 0xf0(%r15), %r15
movq 0x10(%r15), %rcx
cmpq 0x18(%r15), %rcx
jae 0x4065d
movq 0x20(%r15), %rax
jmp 0x4068e
movq 0x20(%r15), %rdi
movq 0x28(%r15), %rax
movq 0x90(%rax), %rax
addq $0x81, %rcx
movq %rcx, 0x18(%r15)
shlq $0x5, %rcx
leaq (%rcx,%rcx,4), %rsi
callq *%rax
movq %rax, 0x20(%r15)
testq %rax, %rax
je 0x406c8
movq 0x10(%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r15)
leaq (%rcx,%rcx,4), %rdi
shlq $0x5, %rdi
addq %rax, %rdi
movl $0xa0, %edx
movq %rbx, %rsi
callq 0x24220
leaq -0xb8(%rbp), %rsi
movl $0xa0, %edx
movq %rbx, %rdi
callq 0x24220
movl $0x1, %r14d
movl %r14d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_coll_parser_scan_shift_sequence:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 0A8h
mov r15, rdi
lea rsi, [rdi+0A0h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+0C0h], xmm0
movups xmmword ptr [rdi+0B0h], xmm0
movups xmmword ptr [rdi+0A0h], xmm0
lea rcx, aContraction; "Contraction"
mov edx, 6
call my_coll_parser_scan_character_list
xor r14d, r14d
test eax, eax
jz loc_406C8
lea rbx, [r15+50h]
lea rdi, [rbp+var_B8]
mov edx, 0A0h
mov rsi, rbx
call _memcpy
mov eax, [r15]
cmp eax, 9
jz short loc_405F7
cmp eax, 8
jnz loc_40646
lea rdi, [r15+28h]
mov rax, [r15+48h]
mov [r15+20h], rax
movups xmm0, xmmword ptr [r15+28h]
movups xmm1, xmmword ptr [r15+38h]
movups xmmword ptr [r15+10h], xmm1
movups xmmword ptr [r15], xmm0
call my_coll_lexem_next
lea rcx, aExpansion; "Expansion"
mov edx, 0Ah
mov rdi, r15
mov rsi, rbx
jmp short loc_40639
loc_405F7:
lea rdi, [r15+28h]
mov rax, [r15+48h]
mov [r15+20h], rax
movups xmm0, xmmword ptr [r15+28h]
movups xmm1, xmmword ptr [r15+38h]
movups xmmword ptr [r15+10h], xmm1
movups xmmword ptr [r15], xmm0
call my_coll_lexem_next
mov byte ptr [r15+0E8h], 1
lea rsi, [r15+0A8h]
lea rcx, aCharsetsCharse_52+23h; "context"
mov edx, 1
mov rdi, r15
loc_40639:
call my_coll_parser_scan_character_list
test eax, eax
jz loc_406C8
loc_40646:
mov r15, [r15+0F0h]
mov rcx, [r15+10h]
cmp rcx, [r15+18h]
jnb short loc_4065D
mov rax, [r15+20h]
jmp short loc_4068E
loc_4065D:
mov rdi, [r15+20h]
mov rax, [r15+28h]
mov rax, [rax+90h]
add rcx, 81h
mov [r15+18h], rcx
shl rcx, 5
lea rsi, [rcx+rcx*4]
call rax
mov [r15+20h], rax
test rax, rax
jz short loc_406C8
mov rcx, [r15+10h]
loc_4068E:
lea rdx, [rcx+1]
mov [r15+10h], rdx
lea rdi, [rcx+rcx*4]
shl rdi, 5
add rdi, rax
mov edx, 0A0h
mov rsi, rbx
call _memcpy
lea rsi, [rbp+var_B8]
mov edx, 0A0h
mov rdi, rbx
call _memcpy
mov r14d, 1
loc_406C8:
mov eax, r14d
add rsp, 0A8h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_coll_parser_scan_shift_sequence(long long a1)
{
unsigned int v1; // r14d
long long v2; // rbx
__int128 v3; // xmm0
char *v4; // rcx
long long v5; // rdx
long long v6; // rsi
__int128 v7; // xmm0
_QWORD *v8; // r15
unsigned long long v9; // rcx
long long v10; // rax
long long v11; // rdi
long long ( *v12)(long long, long long); // rax
unsigned long long v13; // rcx
_BYTE v15[184]; // [rsp+8h] [rbp-B8h] BYREF
*(_OWORD *)(a1 + 192) = 0LL;
*(_OWORD *)(a1 + 176) = 0LL;
*(_OWORD *)(a1 + 160) = 0LL;
v1 = 0;
if ( !(unsigned int)my_coll_parser_scan_character_list(a1, a1 + 160, 6LL, "Contraction") )
return v1;
v2 = a1 + 80;
memcpy(v15, a1 + 80, 160LL);
if ( *(_DWORD *)a1 == 9 )
{
*(_QWORD *)(a1 + 32) = *(_QWORD *)(a1 + 72);
v7 = *(_OWORD *)(a1 + 40);
*(_OWORD *)(a1 + 16) = *(_OWORD *)(a1 + 56);
*(_OWORD *)a1 = v7;
my_coll_lexem_next(a1 + 40);
*(_BYTE *)(a1 + 232) = 1;
v6 = a1 + 168;
v4 = "context";
v5 = 1LL;
LABEL_6:
if ( !(unsigned int)my_coll_parser_scan_character_list(a1, v6, v5, v4) )
return v1;
goto LABEL_7;
}
if ( *(_DWORD *)a1 == 8 )
{
*(_QWORD *)(a1 + 32) = *(_QWORD *)(a1 + 72);
v3 = *(_OWORD *)(a1 + 40);
*(_OWORD *)(a1 + 16) = *(_OWORD *)(a1 + 56);
*(_OWORD *)a1 = v3;
my_coll_lexem_next(a1 + 40);
v4 = "Expansion";
v5 = 10LL;
v6 = a1 + 80;
goto LABEL_6;
}
LABEL_7:
v8 = *(_QWORD **)(a1 + 240);
v9 = v8[2];
if ( v9 < v8[3] )
{
v10 = v8[4];
LABEL_11:
v8[2] = v9 + 1;
memcpy(v10 + 160 * v9, v2, 160LL);
memcpy(v2, v15, 160LL);
return 1;
}
v11 = v8[4];
v12 = *(long long ( **)(long long, long long))(v8[5] + 144LL);
v13 = v9 + 129;
v8[3] = v13;
v10 = v12(v11, 160 * v13);
v8[4] = v10;
if ( v10 )
{
v9 = v8[2];
goto LABEL_11;
}
return v1;
}
| my_coll_parser_scan_shift_sequence:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa8
MOV R15,RDI
LEA RSI,[RDI + 0xa0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0xc0],XMM0
MOVUPS xmmword ptr [RDI + 0xb0],XMM0
MOVUPS xmmword ptr [RDI + 0xa0],XMM0
LEA RCX,[0x15ec2a]
MOV EDX,0x6
CALL 0x001406d9
XOR R14D,R14D
TEST EAX,EAX
JZ 0x001406c8
LEA RBX,[R15 + 0x50]
LEA RDI,[RBP + -0xb8]
MOV EDX,0xa0
MOV RSI,RBX
CALL 0x00124220
MOV EAX,dword ptr [R15]
CMP EAX,0x9
JZ 0x001405f7
CMP EAX,0x8
JNZ 0x00140646
LEA RDI,[R15 + 0x28]
MOV RAX,qword ptr [R15 + 0x48]
MOV qword ptr [R15 + 0x20],RAX
MOVUPS XMM0,xmmword ptr [R15 + 0x28]
MOVUPS XMM1,xmmword ptr [R15 + 0x38]
MOVUPS xmmword ptr [R15 + 0x10],XMM1
MOVUPS xmmword ptr [R15],XMM0
CALL 0x001401df
LEA RCX,[0x15ea5e]
MOV EDX,0xa
MOV RDI,R15
MOV RSI,RBX
JMP 0x00140639
LAB_001405f7:
LEA RDI,[R15 + 0x28]
MOV RAX,qword ptr [R15 + 0x48]
MOV qword ptr [R15 + 0x20],RAX
MOVUPS XMM0,xmmword ptr [R15 + 0x28]
MOVUPS XMM1,xmmword ptr [R15 + 0x38]
MOVUPS xmmword ptr [R15 + 0x10],XMM1
MOVUPS xmmword ptr [R15],XMM0
CALL 0x001401df
MOV byte ptr [R15 + 0xe8],0x1
LEA RSI,[R15 + 0xa8]
LEA RCX,[0x15f768]
MOV EDX,0x1
MOV RDI,R15
LAB_00140639:
CALL 0x001406d9
TEST EAX,EAX
JZ 0x001406c8
LAB_00140646:
MOV R15,qword ptr [R15 + 0xf0]
MOV RCX,qword ptr [R15 + 0x10]
CMP RCX,qword ptr [R15 + 0x18]
JNC 0x0014065d
MOV RAX,qword ptr [R15 + 0x20]
JMP 0x0014068e
LAB_0014065d:
MOV RDI,qword ptr [R15 + 0x20]
MOV RAX,qword ptr [R15 + 0x28]
MOV RAX,qword ptr [RAX + 0x90]
ADD RCX,0x81
MOV qword ptr [R15 + 0x18],RCX
SHL RCX,0x5
LEA RSI,[RCX + RCX*0x4]
CALL RAX
MOV qword ptr [R15 + 0x20],RAX
TEST RAX,RAX
JZ 0x001406c8
MOV RCX,qword ptr [R15 + 0x10]
LAB_0014068e:
LEA RDX,[RCX + 0x1]
MOV qword ptr [R15 + 0x10],RDX
LEA RDI,[RCX + RCX*0x4]
SHL RDI,0x5
ADD RDI,RAX
MOV EDX,0xa0
MOV RSI,RBX
CALL 0x00124220
LEA RSI,[RBP + -0xb8]
MOV EDX,0xa0
MOV RDI,RBX
CALL 0x00124220
MOV R14D,0x1
LAB_001406c8:
MOV EAX,R14D
ADD RSP,0xa8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 my_coll_parser_scan_shift_sequence(int *param_1)
{
int *__src;
long lVar1;
code *pcVar2;
int iVar3;
long lVar4;
char *pcVar5;
ulong uVar6;
int8 uVar7;
int *piVar8;
int1 local_c0 [160];
param_1[0x30] = 0;
param_1[0x31] = 0;
param_1[0x32] = 0;
param_1[0x33] = 0;
param_1[0x2c] = 0;
param_1[0x2d] = 0;
param_1[0x2e] = 0;
param_1[0x2f] = 0;
param_1[0x28] = 0;
param_1[0x29] = 0;
param_1[0x2a] = 0;
param_1[0x2b] = 0;
iVar3 = my_coll_parser_scan_character_list(param_1,param_1 + 0x28,6,"Contraction");
if (iVar3 == 0) {
return 0;
}
__src = param_1 + 0x14;
memcpy(local_c0,__src,0xa0);
if (*param_1 == 9) {
*(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x12);
param_1[4] = param_1[0xe];
param_1[5] = param_1[0xf];
param_1[6] = param_1[0x10];
param_1[7] = param_1[0x11];
*param_1 = param_1[10];
param_1[1] = param_1[0xb];
param_1[2] = param_1[0xc];
param_1[3] = param_1[0xd];
my_coll_lexem_next(param_1 + 10);
*(int1 *)(param_1 + 0x3a) = 1;
piVar8 = param_1 + 0x2a;
pcVar5 = "context";
uVar7 = 1;
}
else {
if (*param_1 != 8) goto LAB_00140646;
*(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x12);
param_1[4] = param_1[0xe];
param_1[5] = param_1[0xf];
param_1[6] = param_1[0x10];
param_1[7] = param_1[0x11];
*param_1 = param_1[10];
param_1[1] = param_1[0xb];
param_1[2] = param_1[0xc];
param_1[3] = param_1[0xd];
my_coll_lexem_next(param_1 + 10);
pcVar5 = "Expansion";
uVar7 = 10;
piVar8 = __src;
}
iVar3 = my_coll_parser_scan_character_list(param_1,piVar8,uVar7,pcVar5);
if (iVar3 == 0) {
return 0;
}
LAB_00140646:
lVar1 = *(long *)(param_1 + 0x3c);
uVar6 = *(ulong *)(lVar1 + 0x10);
if (uVar6 < *(ulong *)(lVar1 + 0x18)) {
lVar4 = *(long *)(lVar1 + 0x20);
}
else {
pcVar2 = *(code **)(*(long *)(lVar1 + 0x28) + 0x90);
*(ulong *)(lVar1 + 0x18) = uVar6 + 0x81;
lVar4 = (*pcVar2)(*(int8 *)(lVar1 + 0x20),(uVar6 + 0x81) * 0xa0);
*(long *)(lVar1 + 0x20) = lVar4;
if (lVar4 == 0) {
return 0;
}
uVar6 = *(ulong *)(lVar1 + 0x10);
}
*(ulong *)(lVar1 + 0x10) = uVar6 + 1;
memcpy((void *)(uVar6 * 0xa0 + lVar4),__src,0xa0);
memcpy(__src,local_c0,0xa0);
return 1;
}
| |
32,618 | initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*) | eloqsql/mysys/lf_hash.cc | static int initialize_bucket(LF_HASH *hash, LF_SLIST **node,
uint bucket, LF_PINS *pins)
{
uint parent= my_clear_highest_bit(bucket);
LF_SLIST *dummy= (LF_SLIST *)my_malloc(key_memory_lf_slist,
sizeof(LF_SLIST), MYF(MY_WME));
LF_SLIST **tmp= 0, *cur;
LF_SLIST **el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, parent);
if (unlikely(!el || !dummy))
return -1;
if (*el == NULL && bucket &&
unlikely(initialize_bucket(hash, el, parent, pins)))
{
my_free(dummy);
return -1;
}
dummy->hashnr= my_reverse_bits(bucket) | 0; /* dummy node */
dummy->key= dummy_key;
dummy->keylen= 0;
if ((cur= l_insert(el, hash->charset, dummy, pins, LF_HASH_UNIQUE)))
{
my_free(dummy);
dummy= cur;
}
my_atomic_casptr((void **)node, (void **)(char*) &tmp, dummy);
/*
note that if the CAS above failed (after l_insert() succeeded),
it would mean that some other thread has executed l_insert() for
the same dummy node, its l_insert() failed, it picked up our
dummy node (in "dummy= cur") and executed the same CAS as above.
Which means that even if CAS above failed we don't need to retry,
and we should not free(dummy) - there's no memory leak here
*/
return 0;
} | O0 | cpp | initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl -0x1c(%rbp), %edi
callq 0xfdc90
movl %eax, -0x2c(%rbp)
leaq 0xb85acb(%rip), %rax # 0xc832f4
movl (%rax), %edi
movl $0x20, %esi
movl $0x10, %edx
callq 0xf3860
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xfcdc0
movq %rax, -0x50(%rbp)
movb $0x1, %al
cmpq $0x0, -0x50(%rbp)
movb %al, -0x5a(%rbp)
je 0xfd86f
cmpq $0x0, -0x38(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x5a(%rbp)
movb -0x5a(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xfd888
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xfd973
movq -0x50(%rbp), %rax
cmpq $0x0, (%rax)
jne 0xfd8c6
cmpl $0x0, -0x1c(%rbp)
je 0xfd8c6
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x2c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0xfd800
cmpl $0x0, %eax
je 0xfd8c6
movq -0x38(%rbp), %rdi
callq 0xf3be0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xfd973
movl -0x1c(%rbp), %edi
callq 0xfd980
movl %eax, %ecx
orl $0x0, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x18(%rax)
movq 0x1c2397(%rip), %rcx # 0x2bfc78
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x1, %r8d
callq 0xfda00
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0xfd932
movq -0x38(%rbp), %rdi
callq 0xf3be0
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x69(%rbp)
movq %rcx, -0x68(%rbp)
testb $0x1, %al
jne 0xfd964
movq -0x68(%rbp), %rax
movq %rax, -0x40(%rbp)
movb -0x69(%rbp), %al
andb $0x1, %al
movb %al, -0x59(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov edi, [rbp+var_1C]; unsigned int
call _ZL20my_clear_highest_bitj; my_clear_highest_bit(uint)
mov [rbp+var_2C], eax
lea rax, key_memory_lf_slist
mov edi, [rax]
mov esi, 20h ; ' '
mov edx, 10h
call my_malloc
mov [rbp+var_38], rax
mov [rbp+var_40], 0
mov rdi, [rbp+var_10]
mov esi, [rbp+var_2C]
call lf_dynarray_lvalue
mov [rbp+var_50], rax
mov al, 1
cmp [rbp+var_50], 0
mov [rbp+var_5A], al
jz short loc_FD86F
cmp [rbp+var_38], 0
setnz al
xor al, 0FFh
mov [rbp+var_5A], al
loc_FD86F:
mov al, [rbp+var_5A]
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_FD888
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_FD973
loc_FD888:
mov rax, [rbp+var_50]
cmp qword ptr [rax], 0
jnz short loc_FD8C6
cmp [rbp+var_1C], 0
jz short loc_FD8C6
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_50]
mov edx, [rbp+var_2C]
mov rcx, [rbp+var_28]
call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *)
cmp eax, 0
jz short loc_FD8C6
mov rdi, [rbp+var_38]
call my_free
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_FD973
loc_FD8C6:
mov edi, [rbp+var_1C]; unsigned int
call _ZL15my_reverse_bitsj; my_reverse_bits(uint)
mov ecx, eax
or ecx, 0
mov rax, [rbp+var_38]
mov [rax+18h], ecx
mov rcx, cs:_ZL9dummy_key; dummy_key
mov rax, [rbp+var_38]
mov [rax+8], rcx
mov rax, [rbp+var_38]
mov qword ptr [rax+10h], 0
mov rdi, [rbp+var_50]
mov rax, [rbp+var_10]
mov rsi, [rax+0A8h]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_28]
mov r8d, 1
call _ZL8l_insertPP8LF_SLISTPK15charset_info_stS0_P7LF_PINSj; l_insert(LF_SLIST **,charset_info_st const*,LF_SLIST *,LF_PINS *,uint)
mov [rbp+var_48], rax
cmp rax, 0
jz short loc_FD932
mov rdi, [rbp+var_38]
call my_free
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
loc_FD932:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
mov rax, [rbp+var_40]
mov rdx, [rbp+var_58]
lock cmpxchg [rcx], rdx
mov rcx, rax
setz al
mov [rbp+var_69], al
mov [rbp+var_68], rcx
test al, 1
jnz short loc_FD964
mov rax, [rbp+var_68]
mov [rbp+var_40], rax
loc_FD964:
mov al, [rbp+var_69]
and al, 1
mov [rbp+var_59], al
mov [rbp+var_4], 0
loc_FD973:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
| long long initialize_bucket(long long a1, volatile signed long long *a2, unsigned int a3, long long a4)
{
char v5; // [rsp+16h] [rbp-5Ah]
_QWORD *v6; // [rsp+20h] [rbp-50h]
long long v7; // [rsp+28h] [rbp-48h]
long long v8; // [rsp+38h] [rbp-38h]
unsigned int v9; // [rsp+44h] [rbp-2Ch]
v9 = my_clear_highest_bit(a3);
v8 = my_malloc(key_memory_lf_slist, (const char *)&qword_20, 16);
v6 = (_QWORD *)lf_dynarray_lvalue(a1, v9);
v5 = 1;
if ( v6 )
v5 = ~(v8 != 0);
if ( (v5 & 1) != 0 )
{
return (unsigned int)-1;
}
else if ( !*v6 && a3 && (unsigned int)initialize_bucket(a1, v6, v9, a4) )
{
my_free(v8);
return (unsigned int)-1;
}
else
{
*(_DWORD *)(v8 + 24) = my_reverse_bits(a3);
*(_QWORD *)(v8 + 8) = dummy_key;
*(_QWORD *)(v8 + 16) = 0LL;
v7 = l_insert(v6, *(_QWORD *)(a1 + 168), v8, a4, 1LL);
if ( v7 )
{
my_free(v8);
v8 = v7;
}
_InterlockedCompareExchange64(a2, v8, 0LL);
return 0;
}
}
| initialize_bucket:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV EDI,dword ptr [RBP + -0x1c]
CALL 0x001fdc90
MOV dword ptr [RBP + -0x2c],EAX
LEA RAX,[0xd832f4]
MOV EDI,dword ptr [RAX]
MOV ESI,0x20
MOV EDX,0x10
CALL 0x001f3860
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x40],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x2c]
CALL 0x001fcdc0
MOV qword ptr [RBP + -0x50],RAX
MOV AL,0x1
CMP qword ptr [RBP + -0x50],0x0
MOV byte ptr [RBP + -0x5a],AL
JZ 0x001fd86f
CMP qword ptr [RBP + -0x38],0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x5a],AL
LAB_001fd86f:
MOV AL,byte ptr [RBP + -0x5a]
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001fd888
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001fd973
LAB_001fd888:
MOV RAX,qword ptr [RBP + -0x50]
CMP qword ptr [RAX],0x0
JNZ 0x001fd8c6
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x001fd8c6
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x50]
MOV EDX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x28]
CALL 0x001fd800
CMP EAX,0x0
JZ 0x001fd8c6
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001f3be0
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001fd973
LAB_001fd8c6:
MOV EDI,dword ptr [RBP + -0x1c]
CALL 0x001fd980
MOV ECX,EAX
OR ECX,0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x18],ECX
MOV RCX,qword ptr [0x003bfc78]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0xa8]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,0x1
CALL 0x001fda00
MOV qword ptr [RBP + -0x48],RAX
CMP RAX,0x0
JZ 0x001fd932
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001f3be0
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
LAB_001fd932:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x58]
CMPXCHG.LOCK qword ptr [RCX],RDX
MOV RCX,RAX
SETZ AL
MOV byte ptr [RBP + -0x69],AL
MOV qword ptr [RBP + -0x68],RCX
TEST AL,0x1
JNZ 0x001fd964
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x40],RAX
LAB_001fd964:
MOV AL,byte ptr [RBP + -0x69]
AND AL,0x1
MOV byte ptr [RBP + -0x59],AL
MOV dword ptr [RBP + -0x4],0x0
LAB_001fd973:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
/* initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*) */
int4 initialize_bucket(st_lf_hash *param_1,LF_SLIST **param_2,uint param_3,LF_PINS *param_4)
{
uint uVar1;
int iVar2;
int4 uVar3;
LF_SLIST **ppLVar4;
LF_SLIST *pLVar5;
LF_SLIST *local_40;
int4 local_c;
uVar1 = my_clear_highest_bit(param_3);
local_40 = (LF_SLIST *)my_malloc(key_memory_lf_slist,0x20,0x10);
ppLVar4 = (LF_SLIST **)lf_dynarray_lvalue(param_1,uVar1);
if (ppLVar4 == (LF_SLIST **)0x0 || local_40 == (LF_SLIST *)0x0) {
local_c = 0xffffffff;
}
else if (((*ppLVar4 == (LF_SLIST *)0x0) && (param_3 != 0)) &&
(iVar2 = initialize_bucket(param_1,ppLVar4,uVar1,param_4), iVar2 != 0)) {
my_free(local_40);
local_c = 0xffffffff;
}
else {
uVar3 = my_reverse_bits(param_3);
*(int4 *)(local_40 + 0x18) = uVar3;
*(int **)(local_40 + 8) = dummy_key;
*(int8 *)(local_40 + 0x10) = 0;
pLVar5 = (LF_SLIST *)l_insert(ppLVar4,*(charset_info_st **)(param_1 + 0xa8),local_40,param_4,1);
if (pLVar5 != (LF_SLIST *)0x0) {
my_free(local_40);
local_40 = pLVar5;
}
LOCK();
if (*param_2 == (LF_SLIST *)0x0) {
*param_2 = local_40;
}
UNLOCK();
local_c = 0;
}
return local_c;
}
| |
32,619 | start_of_next_entry | eloqsql/storage/maria/ma_blockrec.c | static inline uint start_of_next_entry(uchar *dir)
{
uchar *prev;
/*
Find previous used entry. (There is always a previous entry as
the directory never starts with a deleted entry)
*/
for (prev= dir - DIR_ENTRY_SIZE ;
prev[0] == 0 && prev[1] == 0 ;
prev-= DIR_ENTRY_SIZE)
{}
return (uint) uint2korr(prev);
} | O0 | c | start_of_next_entry:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
jne 0x5c9c6
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x5c9cf
jmp 0x5c9df
jmp 0x5c9d1
movq -0x10(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x5c9a4
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
popq %rbp
retq
nopl (%rax,%rax)
| start_of_next_entry:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_10], rax
loc_5C9A4:
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_11], al
jnz short loc_5C9C6
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 0
setz al
mov [rbp+var_11], al
loc_5C9C6:
mov al, [rbp+var_11]
test al, 1
jnz short loc_5C9CF
jmp short loc_5C9DF
loc_5C9CF:
jmp short $+2
loc_5C9D1:
mov rax, [rbp+var_10]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_10], rax
jmp short loc_5C9A4
loc_5C9DF:
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
pop rbp
retn
| long long start_of_next_entry(long long a1)
{
bool v2; // [rsp+1h] [rbp-11h]
_BYTE *i; // [rsp+2h] [rbp-10h]
for ( i = (_BYTE *)(a1 - 4); ; i -= 4 )
{
v2 = 0;
if ( !*i )
v2 = i[1] == 0;
if ( !v2 )
break;
}
return *(unsigned __int16 *)i;
}
| start_of_next_entry:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x10],RAX
LAB_0015c9a4:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JNZ 0x0015c9c6
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
SETZ AL
MOV byte ptr [RBP + -0x11],AL
LAB_0015c9c6:
MOV AL,byte ptr [RBP + -0x11]
TEST AL,0x1
JNZ 0x0015c9cf
JMP 0x0015c9df
LAB_0015c9cf:
JMP 0x0015c9d1
LAB_0015c9d1:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0015c9a4
LAB_0015c9df:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
POP RBP
RET
|
int2 start_of_next_entry(long param_1)
{
bool bVar1;
char *local_18;
local_18 = (char *)(param_1 + -4);
while( true ) {
bVar1 = false;
if (*local_18 == '\0') {
bVar1 = local_18[1] == '\0';
}
if (!bVar1) break;
local_18 = local_18 + -4;
}
return *(int2 *)local_18;
}
| |
32,620 | bchange | eloqsql/strings/bchange.c | void bchange(register uchar *dst, size_t old_length, register const uchar *src,
size_t new_length, size_t tot_length)
{
size_t rest=tot_length-old_length;
if (old_length < new_length)
bmove_upp(dst+rest+new_length,dst+tot_length,rest);
else
bmove(dst+new_length,dst+old_length,rest);
memcpy(dst,src,new_length);
} | O0 | c | bchange:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x3d581
movq -0x8(%rbp), %rdi
addq -0x30(%rbp), %rdi
addq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x3d5c0
jmp 0x3d59a
movq -0x8(%rbp), %rdi
addq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x25600
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x25270
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| bchange:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_28]
sub rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
cmp rax, [rbp+var_20]
jnb short loc_3D581
mov rdi, [rbp+var_8]
add rdi, [rbp+var_30]
add rdi, [rbp+var_20]
mov rsi, [rbp+var_8]
add rsi, [rbp+var_28]
mov rdx, [rbp+var_30]
call bmove_upp
jmp short loc_3D59A
loc_3D581:
mov rdi, [rbp+var_8]
add rdi, [rbp+var_20]
mov rsi, [rbp+var_8]
add rsi, [rbp+var_10]
mov rdx, [rbp+var_30]
call _memmove
loc_3D59A:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
add rsp, 30h
pop rbp
retn
| long long bchange(long long a1, unsigned long long a2, long long a3, unsigned long long a4, long long a5)
{
long long v6; // [rsp+0h] [rbp-30h]
v6 = a5 - a2;
if ( a2 >= a4 )
memmove(a4 + a1, a2 + a1, v6);
else
bmove_upp(a4 + v6 + a1, a5 + a1, v6);
return memcpy(a1, a3, a4);
}
| bchange:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0013d581
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,qword ptr [RBP + -0x30]
ADD RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x0013d5c0
JMP 0x0013d59a
LAB_0013d581:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00125600
LAB_0013d59a:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00125270
ADD RSP,0x30
POP RBP
RET
|
void bchange(void *param_1,ulong param_2,void *param_3,ulong param_4,long param_5)
{
size_t __n;
__n = param_5 - param_2;
if (param_2 < param_4) {
bmove_upp((long)param_1 + param_4 + __n,(long)param_1 + param_5,__n);
}
else {
memmove((void *)((long)param_1 + param_4),(void *)((long)param_1 + param_2),__n);
}
memcpy(param_1,param_3,param_4);
return;
}
| |
32,621 | get_internal_charset | eloqsql/mysys/charset.c | static CHARSET_INFO *
get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags)
{
char buf[FN_REFLEN];
struct charset_info_st *cs;
DBUG_ASSERT(cs_number < array_elements(all_charsets));
if ((cs= (struct charset_info_st*) all_charsets[cs_number]))
{
if (cs->state & MY_CS_READY) /* if CS is already initialized */
{
my_collation_statistics_inc_use_count(cs_number);
return cs;
}
/*
To make things thread safe we are not allowing other threads to interfere
while we may changing the cs_info_table
*/
mysql_mutex_lock(&THR_LOCK_charset);
if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */
{
MY_CHARSET_LOADER loader;
strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS);
my_charset_loader_init_mysys(&loader);
my_read_charset_file(&loader, buf, flags);
}
if (cs->state & MY_CS_AVAILABLE)
{
if (!(cs->state & MY_CS_READY))
{
if (!simple_8bit_charset_data_is_full(cs))
{
CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs);
if (refcs)
inherit_charset_data(cs, refcs);
}
if (!simple_8bit_collation_data_is_full(cs))
{
CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags);
if (refcl)
inherit_collation_data(cs, refcl);
}
if (my_ci_init_charset(cs, loader) ||
my_ci_init_collation(cs, loader))
{
cs= NULL;
}
else
cs->state|= MY_CS_READY;
}
my_collation_statistics_inc_use_count(cs_number);
}
else
cs= NULL;
mysql_mutex_unlock(&THR_LOCK_charset);
}
return cs;
} | O0 | c | get_internal_charset:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp # imm = 0x300
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x2d0(%rbp)
movl %esi, -0x2d4(%rbp)
movq %rdx, -0x2e0(%rbp)
jmp 0xdc05e
movl -0x2d4(%rbp), %eax
movl %eax, %ecx
leaq 0xb9e653(%rip), %rax # 0xc7a6c0
movq (%rax,%rcx,8), %rax
movq %rax, -0x2e8(%rbp)
cmpq $0x0, %rax
je 0xdc267
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
je 0xdc0b4
movl -0x2d4(%rbp), %edi
callq 0xdd9c0
movq -0x2e8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
jmp 0xdc275
leaq 0xba7425(%rip), %rdi # 0xc834e0
leaq 0x77e3a(%rip), %rsi # 0x153efc
movl $0x36b, %edx # imm = 0x36B
callq 0xdd9f0
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x9, %eax
cmpl $0x0, %eax
jne 0xdc130
leaq -0x210(%rbp), %rdi
callq 0xdb6a0
movq %rax, %rdi
movq -0x2e8(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x77de0(%rip), %rdx # 0x153edf
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x14df40
leaq -0x2c0(%rbp), %rdi
callq 0xdb000
leaq -0x210(%rbp), %rsi
movq -0x2e0(%rbp), %rdx
leaq -0x2c0(%rbp), %rdi
callq 0xdd540
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x200, %eax # imm = 0x200
cmpl $0x0, %eax
je 0xdc250
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
jne 0xdc243
movq -0x2e8(%rbp), %rdi
callq 0xdd460
cmpb $0x0, %al
jne 0xdc1a2
movq -0x2e8(%rbp), %rdi
callq 0xdda60
movq %rax, -0x2f0(%rbp)
cmpq $0x0, -0x2f0(%rbp)
je 0xdc1a0
movq -0x2e8(%rbp), %rdi
movq -0x2f0(%rbp), %rsi
callq 0xddaa0
jmp 0xdc1a2
movq -0x2e8(%rbp), %rdi
callq 0xdd4c0
cmpb $0x0, %al
jne 0xdc1eb
movq -0x2e8(%rbp), %rdi
movq -0x2e0(%rbp), %rsi
callq 0xddb20
movq %rax, -0x2f8(%rbp)
cmpq $0x0, -0x2f8(%rbp)
je 0xdc1e9
movq -0x2e8(%rbp), %rdi
movq -0x2f8(%rbp), %rsi
callq 0xddc30
jmp 0xdc1eb
movq -0x2e8(%rbp), %rdi
movq -0x2d0(%rbp), %rsi
callq 0xddc70
movsbl %al, %eax
cmpl $0x0, %eax
jne 0xdc221
movq -0x2e8(%rbp), %rdi
movq -0x2d0(%rbp), %rsi
callq 0xddcc0
movsbl %al, %eax
cmpl $0x0, %eax
je 0xdc22e
movq $0x0, -0x2e8(%rbp)
jmp 0xdc241
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x100, %ecx # imm = 0x100
movl %ecx, 0xc(%rax)
jmp 0xdc243
movl -0x2d4(%rbp), %edi
callq 0xdd9c0
jmp 0xdc25b
movq $0x0, -0x2e8(%rbp)
leaq 0xba727e(%rip), %rdi # 0xc834e0
callq 0xddd10
movq -0x2e8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0x2c8(%rbp), %rax
movq %rax, -0x300(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xdc2a5
movq -0x300(%rbp), %rax
addq $0x300, %rsp # imm = 0x300
popq %rbp
retq
callq 0x2a270
nopw (%rax,%rax)
| get_internal_charset:
push rbp
mov rbp, rsp
sub rsp, 300h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2D0], rdi
mov [rbp+var_2D4], esi
mov [rbp+var_2E0], rdx
jmp short $+2
loc_DC05E:
mov eax, [rbp+var_2D4]
mov ecx, eax
lea rax, all_charsets
mov rax, [rax+rcx*8]
mov [rbp+var_2E8], rax
cmp rax, 0
jz loc_DC267
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 100h
cmp eax, 0
jz short loc_DC0B4
mov edi, [rbp+var_2D4]
call my_collation_statistics_inc_use_count
mov rax, [rbp+var_2E8]
mov [rbp+var_2C8], rax
jmp loc_DC275
loc_DC0B4:
lea rdi, THR_LOCK_charset
lea rsi, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 36Bh
call inline_mysql_mutex_lock_22
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 9
cmp eax, 0
jnz short loc_DC130
lea rdi, [rbp+var_210]
call get_charsets_dir
mov rdi, rax
mov rax, [rbp+var_2E8]
mov rsi, [rax+10h]
lea rdx, aIndexXml+5; ".xml"
xor eax, eax
mov ecx, eax
mov al, 0
call strxmov
lea rdi, [rbp+var_2C0]
call my_charset_loader_init_mysys
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_2E0]
lea rdi, [rbp+var_2C0]
call my_read_charset_file
loc_DC130:
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 200h
cmp eax, 0
jz loc_DC250
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 100h
cmp eax, 0
jnz loc_DC243
mov rdi, [rbp+var_2E8]
call simple_8bit_charset_data_is_full
cmp al, 0
jnz short loc_DC1A2
mov rdi, [rbp+var_2E8]
call find_charset_data_inheritance_source
mov [rbp+var_2F0], rax
cmp [rbp+var_2F0], 0
jz short loc_DC1A0
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2F0]
call inherit_charset_data
loc_DC1A0:
jmp short $+2
loc_DC1A2:
mov rdi, [rbp+var_2E8]
call simple_8bit_collation_data_is_full
cmp al, 0
jnz short loc_DC1EB
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2E0]
call find_collation_data_inheritance_source
mov [rbp+var_2F8], rax
cmp [rbp+var_2F8], 0
jz short loc_DC1E9
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2F8]
call inherit_collation_data
loc_DC1E9:
jmp short $+2
loc_DC1EB:
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2D0]
call my_ci_init_charset
movsx eax, al
cmp eax, 0
jnz short loc_DC221
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2D0]
call my_ci_init_collation
movsx eax, al
cmp eax, 0
jz short loc_DC22E
loc_DC221:
mov [rbp+var_2E8], 0
jmp short loc_DC241
loc_DC22E:
mov rax, [rbp+var_2E8]
mov ecx, [rax+0Ch]
or ecx, 100h
mov [rax+0Ch], ecx
loc_DC241:
jmp short $+2
loc_DC243:
mov edi, [rbp+var_2D4]
call my_collation_statistics_inc_use_count
jmp short loc_DC25B
loc_DC250:
mov [rbp+var_2E8], 0
loc_DC25B:
lea rdi, THR_LOCK_charset
call inline_mysql_mutex_unlock_23
loc_DC267:
mov rax, [rbp+var_2E8]
mov [rbp+var_2C8], rax
loc_DC275:
mov rax, [rbp+var_2C8]
mov [rbp+var_300], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_DC2A5
mov rax, [rbp+var_300]
add rsp, 300h
pop rbp
retn
loc_DC2A5:
call ___stack_chk_fail
| long long get_internal_charset(long long a1, unsigned int a2, long long a3)
{
int charsets_dir; // eax
int v4; // r8d
int v5; // r9d
long long collation_data_inheritance_source; // [rsp+8h] [rbp-2F8h]
long long charset_data_inheritance_source; // [rsp+10h] [rbp-2F0h]
long long v9; // [rsp+18h] [rbp-2E8h]
_BYTE v12[176]; // [rsp+40h] [rbp-2C0h] BYREF
_BYTE v13[520]; // [rsp+F0h] [rbp-210h] BYREF
unsigned long long v14; // [rsp+2F8h] [rbp-8h]
v14 = __readfsqword(0x28u);
v9 = all_charsets[a2];
if ( !v9 )
return v9;
if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 )
{
inline_mysql_mutex_lock_22(&THR_LOCK_charset, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 875LL);
if ( (*(_DWORD *)(v9 + 12) & 9) == 0 )
{
charsets_dir = get_charsets_dir((long long)v13);
strxmov(charsets_dir, *(_QWORD *)(v9 + 16), (unsigned int)".xml", 0, v4, v5);
my_charset_loader_init_mysys((long long)v12);
my_read_charset_file(v12, v13, a3);
}
if ( (*(_DWORD *)(v9 + 12) & 0x200) != 0 )
{
if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 )
{
if ( !(unsigned __int8)simple_8bit_charset_data_is_full(v9) )
{
charset_data_inheritance_source = find_charset_data_inheritance_source(v9);
if ( charset_data_inheritance_source )
inherit_charset_data(v9, charset_data_inheritance_source);
}
if ( !(unsigned __int8)simple_8bit_collation_data_is_full(v9) )
{
collation_data_inheritance_source = find_collation_data_inheritance_source(v9, a3);
if ( collation_data_inheritance_source )
inherit_collation_data(v9, collation_data_inheritance_source);
}
if ( (unsigned __int8)my_ci_init_charset(v9, a1) || (unsigned __int8)my_ci_init_collation(v9, a1) )
v9 = 0LL;
else
*(_DWORD *)(v9 + 12) |= 0x100u;
}
my_collation_statistics_inc_use_count(a2);
}
else
{
v9 = 0LL;
}
inline_mysql_mutex_unlock_23(&THR_LOCK_charset);
return v9;
}
my_collation_statistics_inc_use_count(a2);
return v9;
}
| get_internal_charset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x300
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x2d0],RDI
MOV dword ptr [RBP + -0x2d4],ESI
MOV qword ptr [RBP + -0x2e0],RDX
JMP 0x001dc05e
LAB_001dc05e:
MOV EAX,dword ptr [RBP + -0x2d4]
MOV ECX,EAX
LEA RAX,[0xd7a6c0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x2e8],RAX
CMP RAX,0x0
JZ 0x001dc267
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x100
CMP EAX,0x0
JZ 0x001dc0b4
MOV EDI,dword ptr [RBP + -0x2d4]
CALL 0x001dd9c0
MOV RAX,qword ptr [RBP + -0x2e8]
MOV qword ptr [RBP + -0x2c8],RAX
JMP 0x001dc275
LAB_001dc0b4:
LEA RDI,[0xd834e0]
LEA RSI,[0x253efc]
MOV EDX,0x36b
CALL 0x001dd9f0
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x9
CMP EAX,0x0
JNZ 0x001dc130
LEA RDI,[RBP + -0x210]
CALL 0x001db6a0
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RAX + 0x10]
LEA RDX,[0x253edf]
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x0024df40
LEA RDI,[RBP + -0x2c0]
CALL 0x001db000
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x2e0]
LEA RDI,[RBP + -0x2c0]
CALL 0x001dd540
LAB_001dc130:
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x200
CMP EAX,0x0
JZ 0x001dc250
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x100
CMP EAX,0x0
JNZ 0x001dc243
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x001dd460
CMP AL,0x0
JNZ 0x001dc1a2
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x001dda60
MOV qword ptr [RBP + -0x2f0],RAX
CMP qword ptr [RBP + -0x2f0],0x0
JZ 0x001dc1a0
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2f0]
CALL 0x001ddaa0
LAB_001dc1a0:
JMP 0x001dc1a2
LAB_001dc1a2:
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x001dd4c0
CMP AL,0x0
JNZ 0x001dc1eb
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2e0]
CALL 0x001ddb20
MOV qword ptr [RBP + -0x2f8],RAX
CMP qword ptr [RBP + -0x2f8],0x0
JZ 0x001dc1e9
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2f8]
CALL 0x001ddc30
LAB_001dc1e9:
JMP 0x001dc1eb
LAB_001dc1eb:
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2d0]
CALL 0x001ddc70
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x001dc221
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2d0]
CALL 0x001ddcc0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001dc22e
LAB_001dc221:
MOV qword ptr [RBP + -0x2e8],0x0
JMP 0x001dc241
LAB_001dc22e:
MOV RAX,qword ptr [RBP + -0x2e8]
MOV ECX,dword ptr [RAX + 0xc]
OR ECX,0x100
MOV dword ptr [RAX + 0xc],ECX
LAB_001dc241:
JMP 0x001dc243
LAB_001dc243:
MOV EDI,dword ptr [RBP + -0x2d4]
CALL 0x001dd9c0
JMP 0x001dc25b
LAB_001dc250:
MOV qword ptr [RBP + -0x2e8],0x0
LAB_001dc25b:
LEA RDI,[0xd834e0]
CALL 0x001ddd10
LAB_001dc267:
MOV RAX,qword ptr [RBP + -0x2e8]
MOV qword ptr [RBP + -0x2c8],RAX
LAB_001dc275:
MOV RAX,qword ptr [RBP + -0x2c8]
MOV qword ptr [RBP + -0x300],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001dc2a5
MOV RAX,qword ptr [RBP + -0x300]
ADD RSP,0x300
POP RBP
RET
LAB_001dc2a5:
CALL 0x0012a270
|
long get_internal_charset(int8 param_1,uint param_2,int8 param_3)
{
char cVar1;
int8 uVar2;
long lVar3;
long in_FS_OFFSET;
long local_2f0;
int1 local_2c8 [176];
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2f0 = (&all_charsets)[param_2];
if (local_2f0 != 0) {
if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) {
inline_mysql_mutex_lock
(THR_LOCK_charset,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x36b);
if ((*(uint *)(local_2f0 + 0xc) & 9) == 0) {
uVar2 = get_charsets_dir(local_218);
strxmov(uVar2,*(int8 *)(local_2f0 + 0x10),".xml",0);
my_charset_loader_init_mysys(local_2c8);
my_read_charset_file(local_2c8,local_218,param_3);
}
if ((*(uint *)(local_2f0 + 0xc) & 0x200) == 0) {
local_2f0 = 0;
}
else {
if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) {
cVar1 = simple_8bit_charset_data_is_full(local_2f0);
if ((cVar1 == '\0') &&
(lVar3 = find_charset_data_inheritance_source(local_2f0), lVar3 != 0)) {
inherit_charset_data(local_2f0,lVar3);
}
cVar1 = simple_8bit_collation_data_is_full(local_2f0);
if ((cVar1 == '\0') &&
(lVar3 = find_collation_data_inheritance_source(local_2f0,param_3), lVar3 != 0)) {
inherit_collation_data(local_2f0,lVar3);
}
cVar1 = my_ci_init_charset(local_2f0,param_1);
if ((cVar1 == '\0') && (cVar1 = my_ci_init_collation(local_2f0,param_1), cVar1 == '\0')) {
*(uint *)(local_2f0 + 0xc) = *(uint *)(local_2f0 + 0xc) | 0x100;
}
else {
local_2f0 = 0;
}
}
my_collation_statistics_inc_use_count(param_2);
}
inline_mysql_mutex_unlock(THR_LOCK_charset);
}
else {
my_collation_statistics_inc_use_count(param_2);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_2f0;
}
| |
32,622 | close_cached_file | eloqsql/mysys/mf_cache.c | void close_cached_file(IO_CACHE *cache)
{
DBUG_ENTER("close_cached_file");
if (my_b_inited(cache))
{
File file=cache->file;
cache->file= -1; /* Don't flush data */
(void) end_io_cache(cache);
if (file >= 0)
{
(void) my_close(file,MYF(0));
#ifdef CANT_DELETE_OPEN_FILES
if (cache->file_name)
{
(void) my_delete(cache->file_name, MYF(MY_WME));
my_free(cache->file_name);
}
#endif
}
}
DBUG_VOID_RETURN;
} | O3 | c | close_cached_file:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0x20(%rdi)
je 0xaf7f1
movl 0xd4(%rdi), %ebx
movl $0xffffffff, 0xd4(%rdi) # imm = 0xFFFFFFFF
callq 0x99f4f
testl %ebx, %ebx
js 0xaf7f1
movl %ebx, %edi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa6ba1
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| close_cached_file:
push rbp
mov rbp, rsp
push rbx
push rax
cmp qword ptr [rdi+20h], 0
jz short loc_AF7F1
mov ebx, [rdi+0D4h]
mov dword ptr [rdi+0D4h], 0FFFFFFFFh
call end_io_cache
test ebx, ebx
js short loc_AF7F1
mov edi, ebx
xor esi, esi
add rsp, 8
pop rbx
pop rbp
jmp my_close
loc_AF7F1:
add rsp, 8
pop rbx
pop rbp
retn
| long long close_cached_file(long long a1)
{
int v1; // ebx
long long result; // rax
if ( *(_QWORD *)(a1 + 32) )
{
v1 = *(_DWORD *)(a1 + 212);
*(_DWORD *)(a1 + 212) = -1;
result = end_io_cache(a1);
if ( v1 >= 0 )
return my_close((unsigned int)v1, 0);
}
return result;
}
| close_cached_file:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CMP qword ptr [RDI + 0x20],0x0
JZ 0x001af7f1
MOV EBX,dword ptr [RDI + 0xd4]
MOV dword ptr [RDI + 0xd4],0xffffffff
CALL 0x00199f4f
TEST EBX,EBX
JS 0x001af7f1
MOV EDI,EBX
XOR ESI,ESI
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001a6ba1
LAB_001af7f1:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void close_cached_file(long param_1)
{
int iVar1;
if (*(long *)(param_1 + 0x20) != 0) {
iVar1 = *(int *)(param_1 + 0xd4);
*(int4 *)(param_1 + 0xd4) = 0xffffffff;
end_io_cache();
if (-1 < iVar1) {
my_close(iVar1,0);
return;
}
}
return;
}
| |
32,623 | my_caseup_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_caseup_utf8mb3(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->caseup_multiply == 1);
while ((src < srcend) &&
(srcres= my_utf8mb3_uni(cs, &wc, (uchar *) src, (uchar*) srcend)) > 0)
{
my_toupper_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
} | O0 | c | my_caseup_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x64b2a
jmp 0x64b2c
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x64b5c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x647c0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x64b65
jmp 0x64bb8
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x65930
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x647f0
movl %eax, -0x38(%rbp)
cmpl $0x0, %eax
jg 0x64b91
jmp 0x64bb8
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x38(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x64b2c
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| my_caseup_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_58], rax
jmp short $+2
loc_64B2A:
jmp short $+2
loc_64B2C:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_59], al
jnb short loc_64B5C
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_utf8mb3_uni
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_59], al
loc_64B5C:
mov al, [rbp+var_59]
test al, 1
jnz short loc_64B65
jmp short loc_64BB8
loc_64B65:
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_30]
call my_toupper_utf8mb3
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_uni_utf8mb3
mov [rbp+var_38], eax
cmp eax, 0
jg short loc_64B91
jmp short loc_64BB8
loc_64B91:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_38]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_64B2C
loc_64BB8:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_50]
sub rax, rcx
add rsp, 60h
pop rbp
retn
| _BYTE * my_caseup_utf8mb3(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6)
{
bool v7; // [rsp+7h] [rbp-59h]
long long v8; // [rsp+8h] [rbp-58h]
unsigned long long v10; // [rsp+18h] [rbp-48h]
unsigned long long v11; // [rsp+20h] [rbp-40h]
int v12; // [rsp+28h] [rbp-38h]
int v13; // [rsp+2Ch] [rbp-34h]
unsigned long long v14[2]; // [rsp+30h] [rbp-30h] BYREF
_BYTE *v15; // [rsp+40h] [rbp-20h]
long long v16; // [rsp+48h] [rbp-18h]
unsigned long long v17; // [rsp+50h] [rbp-10h]
long long v18; // [rsp+58h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14[1] = a5;
v11 = a3 + a2;
v10 = (unsigned long long)&a4[a5];
v8 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( v17 < v11 )
{
v13 = my_utf8mb3_uni(v18, (long long)v14, v17, v11, a5, a6);
v7 = v13 > 0;
}
if ( !v7 )
break;
my_toupper_utf8mb3(v8, v14);
v12 = my_uni_utf8mb3(v18, v14[0], v15, v10);
if ( v12 <= 0 )
break;
v17 += v13;
v15 += v12;
}
return (_BYTE *)(v15 - a4);
}
| my_caseup_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00164b2a
LAB_00164b2a:
JMP 0x00164b2c
LAB_00164b2c:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x59],AL
JNC 0x00164b5c
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x001647c0
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x59],AL
LAB_00164b5c:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x00164b65
JMP 0x00164bb8
LAB_00164b65:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x30]
CALL 0x00165930
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x001647f0
MOV dword ptr [RBP + -0x38],EAX
CMP EAX,0x0
JG 0x00164b91
JMP 0x00164bb8
LAB_00164b91:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00164b2c
LAB_00164bb8:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long my_caseup_utf8mb3(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
bool bVar2;
int iVar3;
int local_3c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (local_18 < param_2 + param_3) {
local_3c = my_utf8mb3_uni(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_toupper_utf8mb3(uVar1,&local_38);
iVar3 = my_uni_utf8mb3(local_10,local_38,local_28,param_4 + param_5);
if (iVar3 < 1) break;
local_18 = local_18 + (long)local_3c;
local_28 = local_28 + iVar3;
}
return local_28 - param_4;
}
| |
32,624 | common_log_entry::print(_IO_FILE*) const | monkey531[P]llama/common/log.cpp | void print(FILE * file = nullptr) const {
FILE * fcur = file;
if (!fcur) {
// stderr displays DBG messages only when their verbosity level is not higher than the threshold
// these messages will still be logged to a file
if (level == GGML_LOG_LEVEL_DEBUG && common_log_verbosity_thold < LOG_DEFAULT_DEBUG) {
return;
}
fcur = stdout;
if (level != GGML_LOG_LEVEL_NONE) {
fcur = stderr;
}
}
if (level != GGML_LOG_LEVEL_NONE && level != GGML_LOG_LEVEL_CONT && prefix) {
if (timestamp) {
// [M.s.ms.us]
fprintf(fcur, "%s%d.%02d.%03d.%03d%s ",
g_col[COMMON_LOG_COL_BLUE],
(int) (timestamp / 1000000 / 60),
(int) (timestamp / 1000000 % 60),
(int) (timestamp / 1000 % 1000),
(int) (timestamp % 1000),
g_col[COMMON_LOG_COL_DEFAULT]);
}
switch (level) {
case GGML_LOG_LEVEL_INFO: fprintf(fcur, "%sI %s", g_col[COMMON_LOG_COL_GREEN], g_col[COMMON_LOG_COL_DEFAULT]); break;
case GGML_LOG_LEVEL_WARN: fprintf(fcur, "%sW %s", g_col[COMMON_LOG_COL_MAGENTA], "" ); break;
case GGML_LOG_LEVEL_ERROR: fprintf(fcur, "%sE %s", g_col[COMMON_LOG_COL_RED], "" ); break;
case GGML_LOG_LEVEL_DEBUG: fprintf(fcur, "%sD %s", g_col[COMMON_LOG_COL_YELLOW], "" ); break;
default:
break;
}
}
fprintf(fcur, "%s", msg.data());
if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) {
fprintf(fcur, "%s", g_col[COMMON_LOG_COL_DEFAULT]);
}
fflush(fcur);
} | O3 | cpp | common_log_entry::print(_IO_FILE*) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
testq %rsi, %rsi
jne 0xd171e
cmpl $0x1, %eax
jne 0xd1707
leaq 0x60e54(%rip), %rcx # 0x132550
cmpl $0x0, (%rcx)
jg 0xd1707
popq %rbx
popq %r14
popq %r15
retq
testl %eax, %eax
jne 0xd1714
movq 0x5f7f6(%rip), %rcx # 0x130f08
jmp 0xd171b
movq 0x5f865(%rip), %rcx # 0x130f80
movq (%rcx), %r14
testl %eax, %eax
je 0xd189b
cmpl $0x5, %eax
je 0xd189b
cmpb $0x1, 0x4(%rbx)
jne 0xd189b
movq 0x8(%rbx), %r10
testq %r10, %r10
je 0xd1822
movq 0x60e0b(%rip), %r15 # 0x132558
movq 0x28(%r15), %r9
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
movq %r10, %rax
imulq %rcx
movq %rdx, %rcx
movq %rdx, %r8
shrq $0x3f, %r8
sarq $0x12, %rcx
movabsq $-0x70d59cc6bc5928d7, %rdx # imm = 0x8F2A633943A6D729
movq %r10, %rax
imulq %rdx
addq %rcx, %r8
leaq (%rdx,%r10), %rcx
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x19, %rcx
addl %eax, %ecx
movabsq $-0x7777777777777777, %rdx # imm = 0x8888888888888889
movq %r8, %rax
imulq %rdx
addq %r8, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x5, %rdx
addl %eax, %edx
imull $0x3c, %edx, %eax
subl %eax, %r8d
movabsq $0x20c49ba5e353f7cf, %rsi # imm = 0x20C49BA5E353F7CF
movq %r10, %rax
imulq %rsi
movq %rdx, %r11
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %r11
addq %rax, %r11
movq %r11, %rax
imulq %rsi
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x7, %rdx
addl %eax, %edx
imull $0x3e8, %edx, %eax # imm = 0x3E8
imull $0x3e8, %r11d, %edx # imm = 0x3E8
subl %eax, %r11d
subl %edx, %r10d
leaq 0x285dd(%rip), %rsi # 0xf9de4
movq %r14, %rdi
movq %r9, %rdx
movl %r11d, %r9d
xorl %eax, %eax
pushq (%r15)
pushq %r10
callq 0x1bd60
addq $0x10, %rsp
movl (%rbx), %eax
decl %eax
cmpl $0x3, %eax
ja 0xd189b
leaq 0x285a4(%rip), %rcx # 0xf9dd4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x60d18(%rip), %rax # 0x132558
movq 0x20(%rax), %rdx
leaq 0x285c5(%rip), %rsi # 0xf9e10
jmp 0xd1873
movq 0x60d04(%rip), %rax # 0x132558
movq 0x30(%rax), %rdx
leaq 0x285a3(%rip), %rsi # 0xf9e02
jmp 0xd1873
movq 0x60cf0(%rip), %rax # 0x132558
movq 0x10(%rax), %rdx
leaq 0x28596(%rip), %rsi # 0xf9e09
leaq 0x188c9(%rip), %rcx # 0xea143
jmp 0xd1891
movq 0x60cd5(%rip), %rax # 0x132558
movq (%rax), %rcx
movq 0x18(%rax), %rdx
leaq 0x2856a(%rip), %rsi # 0xf9dfb
movq %r14, %rdi
xorl %eax, %eax
callq 0x1bd60
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x1ba30
movl (%rbx), %eax
cmpl $0x4, %eax
ja 0xd18ca
movl $0x1a, %ecx
btl %eax, %ecx
jae 0xd18ca
movq 0x60c99(%rip), %rax # 0x132558
movq (%rax), %rdi
movq %r14, %rsi
callq 0x1ba30
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1bab0
nop
| _ZNK16common_log_entry5printEP8_IO_FILE:
push r15
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov eax, [rdi]
test rsi, rsi
jnz short loc_D171E
cmp eax, 1
jnz short loc_D1707
lea rcx, common_log_verbosity_thold
cmp dword ptr [rcx], 0
jg short loc_D1707
pop rbx
pop r14
pop r15
retn
loc_D1707:
test eax, eax
jnz short loc_D1714
mov rcx, cs:stdout_ptr
jmp short loc_D171B
loc_D1714:
mov rcx, cs:stderr_ptr
loc_D171B:
mov r14, [rcx]
loc_D171E:
test eax, eax
jz def_D1837; jumptable 00000000000D1837 default case
cmp eax, 5
jz def_D1837; jumptable 00000000000D1837 default case
cmp byte ptr [rbx+4], 1
jnz def_D1837; jumptable 00000000000D1837 default case
mov r10, [rbx+8]
test r10, r10
jz loc_D1822
mov r15, cs:_ZL5g_col; g_col
mov r9, [r15+28h]
mov rcx, 431BDE82D7B634DBh
mov rax, r10
imul rcx
mov rcx, rdx
mov r8, rdx
shr r8, 3Fh
sar rcx, 12h
mov rdx, 8F2A633943A6D729h
mov rax, r10
imul rdx
add r8, rcx
lea rcx, [rdx+r10]
mov rax, rcx
shr rax, 3Fh
shr rcx, 19h
add ecx, eax
mov rdx, 8888888888888889h
mov rax, r8
imul rdx
add rdx, r8
mov rax, rdx
shr rax, 3Fh
shr rdx, 5
add edx, eax
imul eax, edx, 3Ch ; '<'
sub r8d, eax
mov rsi, 20C49BA5E353F7CFh
mov rax, r10
imul rsi
mov r11, rdx
mov rax, rdx
shr rax, 3Fh
sar r11, 7
add r11, rax
mov rax, r11
imul rsi
mov rax, rdx
shr rax, 3Fh
shr rdx, 7
add edx, eax
imul eax, edx, 3E8h
imul edx, r11d, 3E8h
sub r11d, eax
sub r10d, edx
lea rsi, aSD02d03d03dS; "%s%d.%02d.%03d.%03d%s "
mov rdi, r14
mov rdx, r9
mov r9d, r11d
xor eax, eax
push qword ptr [r15]
push r10
call _fprintf
add rsp, 10h
mov eax, [rbx]
loc_D1822:
dec eax; switch 4 cases
cmp eax, 3
ja short def_D1837; jumptable 00000000000D1837 default case
lea rcx, jpt_D1837
movsxd rax, ds:(jpt_D1837 - 0F9DD4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_D1839:
mov rax, cs:_ZL5g_col; jumptable 00000000000D1837 case 1
mov rdx, [rax+20h]
lea rsi, aSdS; "%sD %s"
jmp short loc_D1873
loc_D184D:
mov rax, cs:_ZL5g_col; jumptable 00000000000D1837 case 3
mov rdx, [rax+30h]
lea rsi, aSwS; "%sW %s"
jmp short loc_D1873
loc_D1861:
mov rax, cs:_ZL5g_col; jumptable 00000000000D1837 case 4
mov rdx, [rax+10h]
lea rsi, aSeS; "%sE %s"
loc_D1873:
lea rcx, asc_EA135+0Eh; ""
jmp short loc_D1891
loc_D187C:
mov rax, cs:_ZL5g_col; jumptable 00000000000D1837 case 2
mov rcx, [rax]
mov rdx, [rax+18h]
lea rsi, aSiS; "%sI %s"
loc_D1891:
mov rdi, r14
xor eax, eax
call _fprintf
def_D1837:
mov rdi, [rbx+10h]; jumptable 00000000000D1837 default case
mov rsi, r14
call _fputs
mov eax, [rbx]
cmp eax, 4
ja short loc_D18CA
mov ecx, 1Ah
bt ecx, eax
jnb short loc_D18CA
mov rax, cs:_ZL5g_col; g_col
mov rdi, [rax]
mov rsi, r14
call _fputs
loc_D18CA:
mov rdi, r14
pop rbx
pop r14
pop r15
jmp _fflush
| long long common_log_entry::print(unsigned int *a1, long long a2)
{
long long v2; // r14
long long result; // rax
long long *v4; // rcx
long long v5; // r10
long long v6; // rdx
const char *v7; // rsi
char *v8; // rcx
int v9; // ecx
v2 = a2;
result = *a1;
if ( !a2 )
{
if ( (_DWORD)result == 1 && common_log_verbosity_thold[0] <= 0 )
return result;
if ( (_DWORD)result )
v4 = (long long *)&stderr;
else
v4 = (long long *)&stdout;
v2 = *v4;
}
if ( (_DWORD)result && (_DWORD)result != 5 && *((_BYTE *)a1 + 4) == 1 )
{
v5 = *((_QWORD *)a1 + 1);
if ( v5 )
{
fprintf(
v2,
"%s%d.%02d.%03d.%03d%s ",
*(const char **)(g_col + 40),
(int)v5 / 60000000,
(int)(v5 / 1000000) % 60,
(int)(v5 / 1000) % 1000,
v5 % 1000,
*(const char **)g_col);
LODWORD(result) = *a1;
}
switch ( (int)result )
{
case 1:
v6 = *(_QWORD *)(g_col + 32);
v7 = "%sD %s";
goto LABEL_17;
case 2:
v8 = *(char **)g_col;
v6 = *(_QWORD *)(g_col + 24);
v7 = "%sI %s";
goto LABEL_19;
case 3:
v6 = *(_QWORD *)(g_col + 48);
v7 = "%sW %s";
goto LABEL_17;
case 4:
v6 = *(_QWORD *)(g_col + 16);
v7 = "%sE %s";
LABEL_17:
v8 = "";
LABEL_19:
fprintf(v2, v7, v6, v8);
break;
default:
break;
}
}
fputs(*((_QWORD *)a1 + 2));
if ( *a1 <= 4 )
{
v9 = 26;
if ( _bittest(&v9, *a1) )
fputs(*(_QWORD *)g_col);
}
return fflush(v2);
}
| print:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV EAX,dword ptr [RDI]
TEST RSI,RSI
JNZ 0x001d171e
CMP EAX,0x1
JNZ 0x001d1707
LEA RCX,[0x232550]
CMP dword ptr [RCX],0x0
JG 0x001d1707
POP RBX
POP R14
POP R15
RET
LAB_001d1707:
TEST EAX,EAX
JNZ 0x001d1714
MOV RCX,qword ptr [0x00230f08]
JMP 0x001d171b
LAB_001d1714:
MOV RCX,qword ptr [0x00230f80]
LAB_001d171b:
MOV R14,qword ptr [RCX]
LAB_001d171e:
TEST EAX,EAX
JZ 0x001d189b
CMP EAX,0x5
JZ 0x001d189b
CMP byte ptr [RBX + 0x4],0x1
JNZ 0x001d189b
MOV R10,qword ptr [RBX + 0x8]
TEST R10,R10
JZ 0x001d1822
MOV R15,qword ptr [0x00232558]
MOV R9,qword ptr [R15 + 0x28]
MOV RCX,0x431bde82d7b634db
MOV RAX,R10
IMUL RCX
MOV RCX,RDX
MOV R8,RDX
SHR R8,0x3f
SAR RCX,0x12
MOV RDX,-0x70d59cc6bc5928d7
MOV RAX,R10
IMUL RDX
ADD R8,RCX
LEA RCX,[RDX + R10*0x1]
MOV RAX,RCX
SHR RAX,0x3f
SHR RCX,0x19
ADD ECX,EAX
MOV RDX,-0x7777777777777777
MOV RAX,R8
IMUL RDX
ADD RDX,R8
MOV RAX,RDX
SHR RAX,0x3f
SHR RDX,0x5
ADD EDX,EAX
IMUL EAX,EDX,0x3c
SUB R8D,EAX
MOV RSI,0x20c49ba5e353f7cf
MOV RAX,R10
IMUL RSI
MOV R11,RDX
MOV RAX,RDX
SHR RAX,0x3f
SAR R11,0x7
ADD R11,RAX
MOV RAX,R11
IMUL RSI
MOV RAX,RDX
SHR RAX,0x3f
SHR RDX,0x7
ADD EDX,EAX
IMUL EAX,EDX,0x3e8
IMUL EDX,R11D,0x3e8
SUB R11D,EAX
SUB R10D,EDX
LEA RSI,[0x1f9de4]
MOV RDI,R14
MOV RDX,R9
MOV R9D,R11D
XOR EAX,EAX
PUSH qword ptr [R15]
PUSH R10
CALL 0x0011bd60
ADD RSP,0x10
MOV EAX,dword ptr [RBX]
LAB_001d1822:
DEC EAX
CMP EAX,0x3
JA 0x001d189b
LEA RCX,[0x1f9dd4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [0x00232558]
MOV RDX,qword ptr [RAX + 0x20]
LEA RSI,[0x1f9e10]
JMP 0x001d1873
caseD_3:
MOV RAX,qword ptr [0x00232558]
MOV RDX,qword ptr [RAX + 0x30]
LEA RSI,[0x1f9e02]
JMP 0x001d1873
caseD_4:
MOV RAX,qword ptr [0x00232558]
MOV RDX,qword ptr [RAX + 0x10]
LEA RSI,[0x1f9e09]
LAB_001d1873:
LEA RCX,[0x1ea143]
JMP 0x001d1891
caseD_2:
MOV RAX,qword ptr [0x00232558]
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x18]
LEA RSI,[0x1f9dfb]
LAB_001d1891:
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011bd60
default:
MOV RDI,qword ptr [RBX + 0x10]
MOV RSI,R14
CALL 0x0011ba30
MOV EAX,dword ptr [RBX]
CMP EAX,0x4
JA 0x001d18ca
MOV ECX,0x1a
BT ECX,EAX
JNC 0x001d18ca
MOV RAX,qword ptr [0x00232558]
MOV RDI,qword ptr [RAX]
MOV RSI,R14
CALL 0x0011ba30
LAB_001d18ca:
MOV RDI,R14
POP RBX
POP R14
POP R15
JMP 0x0011bab0
|
/* common_log_entry::print(_IO_FILE*) const */
void __thiscall common_log_entry::print(common_log_entry *this,_IO_FILE *param_1)
{
long lVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int8 *puVar4;
char *pcVar5;
int8 uVar6;
char *__format;
int iVar7;
iVar7 = *(int *)this;
if (param_1 == (_IO_FILE *)0x0) {
if ((iVar7 == 1) && (common_log_verbosity_thold < 1)) {
return;
}
puVar4 = (int8 *)PTR_stderr_00230f80;
if (iVar7 == 0) {
puVar4 = (int8 *)PTR_stdout_00230f08;
}
param_1 = (_IO_FILE *)*puVar4;
}
if (((iVar7 == 0) || (iVar7 == 5)) || (this[4] != (common_log_entry)0x1))
goto switchD_001d1837_default;
lVar1 = *(long *)(this + 8);
if (lVar1 != 0) {
auVar3 = SEXT816(lVar1 / 1000000) * ZEXT816(0x8888888888888889);
auVar2 = SEXT816(lVar1 / 1000) * SEXT816(0x20c49ba5e353f7cf);
iVar7 = (int)(lVar1 / 1000);
fprintf(param_1,"%s%d.%02d.%03d.%03d%s ",g_col[5],
(ulong)(uint)((int)(SUB168(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),8) >> 0x19) -
(SUB164(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),0xc) >> 0x1f)),
(ulong)(uint)((int)(lVar1 / 1000000) +
((int)(auVar3._8_8_ >> 5) - (auVar3._12_4_ >> 0x1f)) * -0x3c),
(ulong)(uint)(iVar7 + ((int)(auVar2._8_8_ >> 7) - (auVar2._12_4_ >> 0x1f)) * -1000),
(ulong)(uint)((int)lVar1 + iVar7 * -1000),*g_col);
iVar7 = *(int *)this;
}
switch(iVar7) {
case 1:
uVar6 = g_col[4];
__format = "%sD %s";
break;
case 2:
pcVar5 = (char *)*g_col;
uVar6 = g_col[3];
__format = "%sI %s";
goto LAB_001d1891;
case 3:
uVar6 = g_col[6];
__format = "%sW %s";
break;
case 4:
uVar6 = g_col[2];
__format = "%sE %s";
break;
default:
goto switchD_001d1837_default;
}
pcVar5 = "";
LAB_001d1891:
fprintf(param_1,__format,uVar6,pcVar5);
switchD_001d1837_default:
fputs(*(char **)(this + 0x10),param_1);
if ((*(uint *)this < 5) && ((0x1aU >> (*(uint *)this & 0x1f) & 1) != 0)) {
fputs((char *)*g_col,param_1);
}
fflush(param_1);
return;
}
| |
32,625 | file_input::read_tensor_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<unsigned char, std::allocator<unsigned char>>&) | monkey531[P]llama/examples/export-lora/export-lora.cpp | void read_tensor_data(std::string name, std::vector<uint8_t> & buf) {
if (tensors.find(name) == tensors.end()) {
throw std::runtime_error("cannot find tensor with name: " + name);
}
auto len = ggml_nbytes(tensors[name]);
if (buf.size() < len) {
buf.resize(len);
}
auto i_tensor_in = gguf_find_tensor(ctx_gguf, name.c_str()); // idx of tensor in the input file
auto offset = gguf_get_data_offset(ctx_gguf) + gguf_get_tensor_offset(ctx_gguf, i_tensor_in);
f_in.seekg(offset);
f_in.read((char* )buf.data(), len);
} | O2 | cpp | file_input::read_tensor_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<unsigned char, std::allocator<unsigned char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x218(%rdi), %r12
movq %r12, %rdi
callq 0x2a442
leaq 0x220(%r14), %rcx
cmpq %rcx, %rax
je 0x2a74c
movq %r12, %rdi
movq %r15, %rsi
callq 0x2916e
movq (%rax), %rdi
callq 0x24100
movq %rax, %r12
movq 0x8(%rbx), %rax
subq (%rbx), %rax
cmpq %r12, %rax
jae 0x2a6f5
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2a7ba
movq 0x8(%r14), %rdi
movq (%r15), %rsi
callq 0x24b00
movq %rax, %r15
movq 0x8(%r14), %rdi
callq 0x249f0
movq %rax, %r13
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x246d0
addq %rax, %r13
addq $0x10, %r14
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x24cf0
movq (%rbx), %rsi
movq %r14, %rdi
movq %r12, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24cd0
pushq $0x10
popq %rdi
callq 0x24520
movq %rax, %rbx
leaq 0x81ed6(%rip), %rsi # 0xac634
leaq 0x8(%rsp), %rdi
movq %r15, %rdx
callq 0x290f8
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x25050
xorl %ebp, %ebp
movq 0xd686c(%rip), %rsi # 0x100ff0
movq 0xd67cd(%rip), %rdx # 0x100f58
movq %rbx, %rdi
callq 0x25150
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x25478
testb %bpl, %bpl
jne 0x2a7aa
jmp 0x2a7b2
movq %rax, %r14
movq %rbx, %rdi
callq 0x247a0
movq %r14, %rdi
callq 0x251e0
| _ZN10file_input16read_tensor_dataENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIhSaIhEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
lea r12, [rdi+218h]
mov rdi, r12
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::find(std::string const&)
lea rcx, [r14+220h]
cmp rax, rcx
jz loc_2A74C
mov rdi, r12
mov rsi, r15
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixERSB_; std::map<std::string,ggml_tensor *>::operator[](std::string const&)
mov rdi, [rax]
call _ggml_nbytes
mov r12, rax
mov rax, [rbx+8]
sub rax, [rbx]
cmp rax, r12
jnb short loc_2A6F5
mov rdi, rbx
mov rsi, r12
call _ZNSt6vectorIhSaIhEE6resizeEm; std::vector<uchar>::resize(ulong)
loc_2A6F5:
mov rdi, [r14+8]
mov rsi, [r15]
call _gguf_find_tensor
mov r15, rax
mov rdi, [r14+8]
call _gguf_get_data_offset
mov r13, rax
mov rdi, [r14+8]
mov rsi, r15
call _gguf_get_tensor_offset
add r13, rax
add r14, 10h
mov rdi, r14
mov rsi, r13
xor edx, edx
call __ZNSi5seekgESt4fposI11__mbstate_tE; std::istream::seekg(std::fpos<__mbstate_t>)
mov rsi, [rbx]; char *
mov rdi, r14; this
mov rdx, r12; __int64
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp __ZNSi4readEPcl; std::istream::read(char *,long)
loc_2A74C:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aCannotFindTens; "cannot find tensor with name: "
lea rdi, [rsp+58h+var_50]
mov rdx, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+58h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_2A7AA
jmp short loc_2A7B2
mov r14, rax
loc_2A7AA:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_2A7B2:
mov rdi, r14
call __Unwind_Resume
| long long file_input::read_tensor_data(long long a1, _QWORD *a2, long long a3)
{
_QWORD *v4; // rax
unsigned long long v5; // r12
long long tensor; // r15
long long data_offset; // r13
long long tensor_offset; // rax
void *exception; // rbx
_BYTE v11[80]; // [rsp+8h] [rbp-50h] BYREF
if ( std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::find(
a1 + 536,
(long long)a2) == a1 + 544 )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v11, (long long)"cannot find tensor with name: ", (long long)a2);
std::runtime_error::runtime_error(exception, v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4 = (_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a1 + 536, (long long)a2);
v5 = ggml_nbytes(*v4);
if ( *(_QWORD *)(a3 + 8) - *(_QWORD *)a3 < v5 )
std::vector<unsigned char>::resize(a3, v5);
tensor = gguf_find_tensor(*(_QWORD *)(a1 + 8), *a2);
data_offset = gguf_get_data_offset(*(_QWORD *)(a1 + 8));
tensor_offset = gguf_get_tensor_offset(*(_QWORD *)(a1 + 8), tensor);
std::istream::seekg(a1 + 16, tensor_offset + data_offset, 0LL);
return std::istream::read((std::istream *)(a1 + 16), *(char **)a3, v5);
}
| read_tensor_data:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
LEA R12,[RDI + 0x218]
MOV RDI,R12
CALL 0x0012a442
LEA RCX,[R14 + 0x220]
CMP RAX,RCX
JZ 0x0012a74c
MOV RDI,R12
MOV RSI,R15
CALL 0x0012916e
MOV RDI,qword ptr [RAX]
CALL 0x00124100
MOV R12,RAX
MOV RAX,qword ptr [RBX + 0x8]
SUB RAX,qword ptr [RBX]
CMP RAX,R12
JNC 0x0012a6f5
MOV RDI,RBX
MOV RSI,R12
CALL 0x0012a7ba
LAB_0012a6f5:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [R15]
CALL 0x00124b00
MOV R15,RAX
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x001249f0
MOV R13,RAX
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,R15
CALL 0x001246d0
ADD R13,RAX
ADD R14,0x10
MOV RDI,R14
MOV RSI,R13
XOR EDX,EDX
CALL 0x00124cf0
MOV RSI,qword ptr [RBX]
MOV RDI,R14
MOV RDX,R12
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00124cd0
LAB_0012a74c:
PUSH 0x10
POP RDI
CALL 0x00124520
MOV RBX,RAX
LAB_0012a757:
LEA RSI,[0x1ac634]
LEA RDI,[RSP + 0x8]
MOV RDX,R15
CALL 0x001290f8
MOV BPL,0x1
LAB_0012a76e:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00125050
XOR EBP,EBP
MOV RSI,qword ptr [0x00200ff0]
MOV RDX,qword ptr [0x00200f58]
MOV RDI,RBX
CALL 0x00125150
|
/* file_input::read_tensor_data(std::__cxx11::string, std::vector<unsigned char,
std::allocator<unsigned char> >&) */
void __thiscall
file_input::read_tensor_data
(file_input *this,string *param_2,
vector<unsigned_char,std::allocator<unsigned_char>> *param_3)
{
file_input *pfVar1;
int8 *puVar2;
ulong uVar3;
int8 uVar4;
long lVar5;
long lVar6;
runtime_error *this_00;
string local_50 [32];
pfVar1 = (file_input *)
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>
::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>
*)(this + 0x218),param_2);
if (pfVar1 != this + 0x220) {
puVar2 = (int8 *)
std::
map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>
::operator[]((map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>
*)(this + 0x218),param_2);
uVar3 = ggml_nbytes(*puVar2);
if ((ulong)(*(long *)(param_3 + 8) - *(long *)param_3) < uVar3) {
std::vector<unsigned_char,std::allocator<unsigned_char>>::resize(param_3,uVar3);
}
uVar4 = gguf_find_tensor(*(int8 *)(this + 8),*(int8 *)param_2);
lVar5 = gguf_get_data_offset(*(int8 *)(this + 8));
lVar6 = gguf_get_tensor_offset(*(int8 *)(this + 8),uVar4);
std::istream::seekg(this + 0x10,lVar5 + lVar6,0);
std::istream::read((char *)(this + 0x10),*(long *)param_3);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0012a757 to 0012a76a has its CatchHandler @ 0012a7a7 */
std::operator+((char *)local_50,(string *)"cannot find tensor with name: ");
/* try { // try from 0012a76e to 0012a792 has its CatchHandler @ 0012a793 */
std::runtime_error::runtime_error(this_00,local_50);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00200ff0,PTR__runtime_error_00200f58);
}
| |
32,626 | nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*) | ng-log[P]ng-log/src/symbolize.cc | bool GetSectionHeaderByName(int fd, const char* name, size_t name_len,
ElfW(Shdr) * out) {
ElfW(Ehdr) elf_header;
if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) {
return false;
}
ElfW(Shdr) shstrtab;
size_t shstrtab_offset =
(elf_header.e_shoff + static_cast<size_t>(elf_header.e_shentsize) *
static_cast<size_t>(elf_header.e_shstrndx));
if (!ReadFromOffsetExact(fd, &shstrtab, sizeof(shstrtab), shstrtab_offset)) {
return false;
}
for (size_t i = 0; i < elf_header.e_shnum; ++i) {
size_t section_header_offset =
(elf_header.e_shoff + elf_header.e_shentsize * i);
if (!ReadFromOffsetExact(fd, out, sizeof(*out), section_header_offset)) {
return false;
}
char header_name[kMaxSectionNameLen];
if (sizeof(header_name) < name_len) {
RAW_LOG(WARNING,
"Section name '%s' is too long (%zu); "
"section will not be found (even if present).",
name, name_len);
// No point in even trying.
return false;
}
size_t name_offset = shstrtab.sh_offset + out->sh_name;
ssize_t n_read = ReadFromOffset(fd, &header_name, name_len, name_offset);
if (n_read == -1) {
return false;
} else if (static_cast<size_t>(n_read) != name_len) {
// Short read -- name could be at end of file.
continue;
}
if (memcmp(header_name, name, name_len) == 0) {
return true;
}
}
return false;
} | O3 | cpp | nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %rcx, %r12
movq %rdx, 0x38(%rsp)
movq %rsi, %r14
movl %edi, %ebp
xorl %ebx, %ebx
leaq 0x40(%rsp), %rsi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x212f9
cmpq $0x40, %rax
jne 0x212e2
movq 0x68(%rsp), %r13
movzwl 0x7a(%rsp), %eax
movzwl 0x7e(%rsp), %ecx
movq %rax, 0x30(%rsp)
imulq %rax, %rcx
addq %r13, %rcx
leaq 0xc8(%rsp), %rsi
movl $0x40, %edx
movl %ebp, %edi
callq 0x212f9
cmpq $0x40, %rax
jne 0x212a4
movzwl 0x7c(%rsp), %ecx
testq %rcx, %rcx
je 0x212a8
movq %r14, 0x10(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %rcx, %rax
negq %rax
movq %rax, 0x18(%rsp)
movb $0x1, %al
movq %rax, 0x8(%rsp)
movl $0x1, %r14d
movq %rcx, 0x20(%rsp)
movl $0x40, %edx
movl %ebp, %edi
movq %r12, %rsi
movq %r13, %rcx
callq 0x212f9
cmpq $0x40, %rax
jne 0x2129f
movq 0x38(%rsp), %r9
cmpq $0x41, %r9
jae 0x212ac
movq %r12, %rbx
movl (%r12), %ecx
addq 0x28(%rsp), %rcx
movl %ebp, %r15d
movl %ebp, %edi
leaq 0x80(%rsp), %rsi
movq %r9, %rdx
movq %r9, %rbp
callq 0x212f9
cmpq $-0x1, %rax
setne %r12b
je 0x212da
cmpq %rbp, %rax
jne 0x2126c
leaq 0x80(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x7540
testl %eax, %eax
je 0x212da
movq 0x20(%rsp), %rcx
cmpq %rcx, %r14
setb %al
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
addq %r14, %rax
incq %rax
incq %r14
addq 0x30(%rsp), %r13
cmpq $0x1, %rax
movq %rbx, %r12
movl %r15d, %ebp
jne 0x211f1
xorl %r12d, %r12d
jmp 0x212da
xorl %ebx, %ebx
jmp 0x212e2
xorl %ebx, %ebx
jmp 0x212df
leaq 0x3d7e(%rip), %rsi # 0x25031
leaq 0x3dc0(%rip), %rcx # 0x2507a
xorl %r12d, %r12d
movl $0x1, %edi
movl $0x10d, %edx # imm = 0x10D
movq 0x10(%rsp), %r8
xorl %eax, %eax
callq 0x20128
movb $0x1, %al
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rbx
andb %r12b, %bl
andb $0x1, %bl
movl %ebx, %eax
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5nglog5tools22GetSectionHeaderByNameEiPKcmP10Elf64_Shdr:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 108h
mov r12, rcx
mov [rsp+138h+var_100], rdx
mov r14, rsi
mov ebp, edi
xor ebx, ebx
lea rsi, [rsp+138h+var_F8]; int
mov edx, offset dword_40; void *
xor ecx, ecx; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_212E2
mov r13, [rsp+138h+var_D0]
movzx eax, [rsp+138h+var_BE]
movzx ecx, [rsp+138h+var_BA]
mov [rsp+138h+var_108], rax
imul rcx, rax
add rcx, r13; unsigned __int64
lea rsi, [rsp+138h+var_70]; int
mov edx, offset dword_40; void *
mov edi, ebp; this
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_212A4
movzx ecx, [rsp+138h+var_BC]
test rcx, rcx
jz loc_212A8
mov [rsp+138h+var_128], r14
mov rax, [rsp+138h+var_58]
mov [rsp+138h+var_110], rax
mov rax, rcx
neg rax
mov [rsp+138h+var_120], rax
mov al, 1
mov [rsp+138h+var_130], rax
mov r14d, 1
mov [rsp+138h+var_118], rcx
loc_211F1:
mov edx, offset dword_40; void *
mov edi, ebp; this
mov rsi, r12; int
mov rcx, r13; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_2129F
mov r9, [rsp+138h+var_100]
cmp r9, 41h ; 'A'
jnb loc_212AC
mov rbx, r12
mov ecx, [r12]
add rcx, [rsp+138h+var_110]; unsigned __int64
mov r15d, ebp
mov edi, ebp; this
lea rsi, [rsp+138h+var_B8]; int
mov rdx, r9; void *
mov rbp, r9
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
setnz r12b
jz loc_212DA
cmp rax, rbp
jnz short loc_2126C
lea rdi, [rsp+138h+var_B8]
mov rsi, [rsp+138h+var_128]
mov rdx, rbp
call _bcmp
test eax, eax
jz short loc_212DA
loc_2126C:
mov rcx, [rsp+138h+var_118]
cmp r14, rcx
setb al
mov [rsp+138h+var_130], rax
mov rax, [rsp+138h+var_120]
add rax, r14
inc rax
inc r14
add r13, [rsp+138h+var_108]
cmp rax, 1
mov r12, rbx
mov ebp, r15d
jnz loc_211F1
loc_2129F:
xor r12d, r12d
jmp short loc_212DA
loc_212A4:
xor ebx, ebx
jmp short loc_212E2
loc_212A8:
xor ebx, ebx
jmp short loc_212DF
loc_212AC:
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSectionNameSIs; "Section name '%s' is too long (%zu); se"...
xor r12d, r12d
mov edi, 1
mov edx, 10Dh
mov r8, [rsp+138h+var_128]
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
mov al, 1
mov [rsp+138h+var_130], rax
loc_212DA:
mov rbx, [rsp+138h+var_130]
loc_212DF:
and bl, r12b
loc_212E2:
and bl, 1
mov eax, ebx
add rsp, 108h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nglog::tools::GetSectionHeaderByName(
nglog::tools *this,
long long a2,
void *a3,
unsigned int *a4,
unsigned long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
unsigned int v14; // ebx
unsigned long long v15; // r8
unsigned long long v16; // r13
unsigned long long v17; // r8
long long v18; // rax
unsigned long long v19; // r14
unsigned long long v20; // r8
__m128 v21; // xmm4
__m128 v22; // xmm5
unsigned int *v23; // rbx
long long v24; // rax
long long v25; // rax
unsigned int v26; // eax
char v28; // [rsp+0h] [rbp-138h]
unsigned int v29; // [rsp+8h] [rbp-130h]
long long v30; // [rsp+18h] [rbp-120h]
unsigned long long v31; // [rsp+20h] [rbp-118h]
long long v32; // [rsp+28h] [rbp-110h]
long long v33; // [rsp+30h] [rbp-108h]
int v35; // [rsp+40h] [rbp-F8h] BYREF
unsigned long long v36; // [rsp+68h] [rbp-D0h]
unsigned __int16 v37; // [rsp+7Ah] [rbp-BEh]
unsigned __int16 v38; // [rsp+7Ch] [rbp-BCh]
unsigned __int16 v39; // [rsp+7Eh] [rbp-BAh]
int v40[18]; // [rsp+80h] [rbp-B8h] BYREF
int v41; // [rsp+C8h] [rbp-70h] BYREF
long long v42; // [rsp+E0h] [rbp-58h]
v14 = 0;
if ( nglog::tools::ReadFromOffset(this, (int)&v35, &dword_40, 0LL, a5) == 64 )
{
v16 = v36;
v33 = v37;
if ( nglog::tools::ReadFromOffset(
(nglog::tools *)(unsigned int)this,
(int)&v41,
&dword_40,
v36 + v37 * (unsigned long long)v39,
v15) == 64 )
{
if ( v38 )
{
v32 = v42;
v18 = -(long long)v38;
v30 = v18;
LOBYTE(v18) = 1;
v29 = v18;
v19 = 1LL;
v31 = v38;
while ( 1 )
{
if ( nglog::tools::ReadFromOffset((nglog::tools *)(unsigned int)this, (int)a4, &dword_40, v16, v17) != 64 )
{
LABEL_11:
LOBYTE(a4) = 0;
goto LABEL_15;
}
if ( (unsigned long long)a3 >= 0x41 )
break;
v23 = a4;
v24 = nglog::tools::ReadFromOffset((nglog::tools *)(unsigned int)this, (int)v40, a3, v32 + *a4, v20);
LOBYTE(a4) = v24 != -1;
if ( v24 == -1 )
goto LABEL_15;
if ( (void *)v24 == a3 )
{
LODWORD(v24) = bcmp(v40, a2, a3);
if ( !(_DWORD)v24 )
goto LABEL_15;
}
LOBYTE(v24) = v19 < v31;
v29 = v24;
v25 = v19 + v30 + 1;
++v19;
v16 += v33;
a4 = v23;
if ( v25 == 1 )
goto LABEL_11;
}
LOBYTE(a4) = 0;
nglog::RawLog(
(nglog *)((char *)&dword_0 + 1),
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/symbolize.cc",
269,
(long long)"Section name '%s' is too long (%zu); section will not be found (even if present).",
a2,
(long long)a3,
a6,
a7,
a8,
a9,
v21,
v22,
a12,
a13,
v28);
LOBYTE(v26) = 1;
v29 = v26;
LABEL_15:
v14 = v29;
}
else
{
v14 = 0;
}
LOBYTE(v14) = (unsigned __int8)a4 & v14;
}
else
{
v14 = 0;
}
}
LOBYTE(v14) = v14 & 1;
return v14;
}
| GetSectionHeaderByName:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x108
MOV R12,RCX
MOV qword ptr [RSP + 0x38],RDX
MOV R14,RSI
MOV EBP,EDI
XOR EBX,EBX
LEA RSI,[RSP + 0x40]
MOV EDX,0x40
XOR ECX,ECX
CALL 0x001212f9
CMP RAX,0x40
JNZ 0x001212e2
MOV R13,qword ptr [RSP + 0x68]
MOVZX EAX,word ptr [RSP + 0x7a]
MOVZX ECX,word ptr [RSP + 0x7e]
MOV qword ptr [RSP + 0x30],RAX
IMUL RCX,RAX
ADD RCX,R13
LEA RSI,[RSP + 0xc8]
MOV EDX,0x40
MOV EDI,EBP
CALL 0x001212f9
CMP RAX,0x40
JNZ 0x001212a4
MOVZX ECX,word ptr [RSP + 0x7c]
TEST RCX,RCX
JZ 0x001212a8
MOV qword ptr [RSP + 0x10],R14
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,RCX
NEG RAX
MOV qword ptr [RSP + 0x18],RAX
MOV AL,0x1
MOV qword ptr [RSP + 0x8],RAX
MOV R14D,0x1
MOV qword ptr [RSP + 0x20],RCX
LAB_001211f1:
MOV EDX,0x40
MOV EDI,EBP
MOV RSI,R12
MOV RCX,R13
CALL 0x001212f9
CMP RAX,0x40
JNZ 0x0012129f
MOV R9,qword ptr [RSP + 0x38]
CMP R9,0x41
JNC 0x001212ac
MOV RBX,R12
MOV ECX,dword ptr [R12]
ADD RCX,qword ptr [RSP + 0x28]
MOV R15D,EBP
MOV EDI,EBP
LEA RSI,[RSP + 0x80]
MOV RDX,R9
MOV RBP,R9
CALL 0x001212f9
CMP RAX,-0x1
SETNZ R12B
JZ 0x001212da
CMP RAX,RBP
JNZ 0x0012126c
LEA RDI,[RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBP
CALL 0x00107540
TEST EAX,EAX
JZ 0x001212da
LAB_0012126c:
MOV RCX,qword ptr [RSP + 0x20]
CMP R14,RCX
SETC AL
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,R14
INC RAX
INC R14
ADD R13,qword ptr [RSP + 0x30]
CMP RAX,0x1
MOV R12,RBX
MOV EBP,R15D
JNZ 0x001211f1
LAB_0012129f:
XOR R12D,R12D
JMP 0x001212da
LAB_001212a4:
XOR EBX,EBX
JMP 0x001212e2
LAB_001212a8:
XOR EBX,EBX
JMP 0x001212df
LAB_001212ac:
LEA RSI,[0x125031]
LEA RCX,[0x12507a]
XOR R12D,R12D
MOV EDI,0x1
MOV EDX,0x10d
MOV R8,qword ptr [RSP + 0x10]
XOR EAX,EAX
CALL 0x00120128
MOV AL,0x1
MOV qword ptr [RSP + 0x8],RAX
LAB_001212da:
MOV RBX,qword ptr [RSP + 0x8]
LAB_001212df:
AND BL,R12B
LAB_001212e2:
AND BL,0x1
MOV EAX,EBX
ADD RSP,0x108
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*) */
ulong nglog::tools::GetSectionHeaderByName
(int param_1,char *param_2,ulong param_3,Elf64_Shdr *param_4)
{
uint uVar1;
long lVar2;
ulong uVar3;
int8 uVar4;
ulong uVar5;
Elf64_Shdr *pEVar6;
ulong uVar7;
ulong uVar8;
bool bVar9;
bool local_130;
int7 uStack_12f;
int1 local_f8 [40];
ulong local_d0;
ushort local_be;
ushort local_bc;
ushort local_ba;
int1 local_b8 [72];
int1 local_70 [24];
long local_58;
uVar5 = 0;
lVar2 = ReadFromOffset(param_1,local_f8,0x40,0);
if (lVar2 == 0x40) {
lVar2 = ReadFromOffset(param_1,local_70,0x40,(ulong)local_ba * (ulong)local_be + local_d0);
if (lVar2 == 0x40) {
uVar5 = (ulong)local_bc;
if (uVar5 == 0) {
local_130 = false;
uStack_12f = 0;
pEVar6 = param_4;
}
else {
uStack_12f = (int7)(-uVar5 >> 8);
local_130 = true;
uVar7 = local_d0;
uVar8 = 1;
do {
lVar2 = ReadFromOffset(param_1,param_4,0x40,uVar7);
if (lVar2 != 0x40) break;
if (0x40 < param_3) {
pEVar6 = (Elf64_Shdr *)0x0;
uVar4 = RawLog(1,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/symbolize.cc"
,0x10d,
"Section name \'%s\' is too long (%zu); section will not be found (even if present)."
,param_2);
uStack_12f = (int7)((ulong)uVar4 >> 8);
local_130 = true;
goto LAB_001212df;
}
uVar3 = ReadFromOffset(param_1,local_b8,param_3,(ulong)param_4->sh_name + local_58);
pEVar6 = (Elf64_Shdr *)(ulong)(uVar3 != 0xffffffffffffffff);
if (uVar3 == 0xffffffffffffffff) goto LAB_001212df;
if (uVar3 == param_3) {
uVar1 = bcmp(local_b8,param_2,param_3);
uVar3 = (ulong)uVar1;
if (uVar1 == 0) goto LAB_001212df;
}
local_130 = uVar8 < uVar5;
uStack_12f = (int7)(uVar3 >> 8);
uVar7 = uVar7 + local_be;
bVar9 = uVar8 != uVar5;
uVar8 = uVar8 + 1;
} while (bVar9);
pEVar6 = (Elf64_Shdr *)0x0;
}
LAB_001212df:
uVar5 = CONCAT71(uStack_12f,local_130 & (byte)pEVar6);
}
else {
uVar5 = 0;
}
}
return uVar5 & 0xffffff01;
}
| |
32,627 | get_code | corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_ctx.h | static bytes_t get_code(evmone_context_t* ctx, const address_t address) {
changed_account_t* changed_account = get_changed_account(ctx, address);
if (changed_account) return changed_account->code;
ssz_ob_t account = get_src_account(ctx, address, false);
if (!account.def) return NULL_BYTES;
bytes32_t code_hash = {0};
eth_get_account_value(account, ETH_ACCOUNT_CODE_HASH, code_hash);
for (call_code_t* call_code = ctx->call_codes; call_code; call_code = call_code->next) {
if (memcmp(call_code->hash, code_hash, 32) == 0)
return call_code->code;
}
ssz_ob_t code = ssz_get(&account, "code");
if (code.def && code.def->type == SSZ_TYPE_LIST) return code.bytes;
return NULL_BYTES;
// return account.def ? ssz_get(&account, "code").bytes : NULL_BYTES;
} | O1 | c | get_code:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movq %rdi, %r14
callq 0x27bd3
testq %rax, %rax
je 0x27a9d
movl 0x38(%rax), %ebx
movq 0x40(%rax), %rdx
jmp 0x27b69
leaq 0x18(%rsp), %r12
xorl %ebx, %ebx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x27c22
cmpq $0x0, 0x10(%r12)
je 0x27b67
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movdqu 0x18(%rsp), %xmm0
movdqu %xmm0, (%rsp)
movl $0x4, %edi
callq 0x2c25b
movq 0x30(%r14), %rcx
testq %rcx, %rcx
sete %al
je 0x27b25
movdqu (%rcx), %xmm0
movdqu 0x10(%rcx), %xmm1
pcmpeqb 0x40(%rsp), %xmm1
pcmpeqb 0x30(%rsp), %xmm0
pand %xmm1, %xmm0
pmovmskb %xmm0, %edx
cmpl $0xffff, %edx # imm = 0xFFFF
je 0x27b27
movq 0x38(%rcx), %rcx
jmp 0x27af2
jmp 0x27b2e
movl 0x20(%rcx), %ebx
movq 0x28(%rcx), %rdx
testb %al, %al
je 0x27b69
leaq 0x5bced(%rip), %rdx # 0x83826
leaq 0x50(%rsp), %rbx
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x574bd
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x27b65
cmpl $0x4, 0x8(%rax)
jne 0x27b65
movl 0x50(%rsp), %ebx
movq 0x58(%rsp), %rdx
jmp 0x27b69
xorl %ebx, %ebx
xorl %edx, %edx
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| get_code:
push r15
push r14
push r12
push rbx
sub rsp, 68h
mov r15, rsi
mov r14, rdi
call get_changed_account
test rax, rax
jz short loc_27A9D
mov ebx, [rax+38h]
mov rdx, [rax+40h]
jmp loc_27B69
loc_27A9D:
lea r12, [rsp+88h+var_70]
xor ebx, ebx
mov rdi, r12
mov rsi, r14
mov rdx, r15
xor ecx, ecx
call get_src_account
cmp qword ptr [r12+10h], 0
jz loc_27B67
xorps xmm0, xmm0
lea rsi, [rsp+88h+var_58]
movaps xmmword ptr [rsi+10h], xmm0
movaps xmmword ptr [rsi], xmm0
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_78], rax
movdqu xmm0, [rsp+88h+var_70]
movdqu [rsp+88h+var_88], xmm0
mov edi, 4
call eth_get_account_value
mov rcx, [r14+30h]
loc_27AF2:
test rcx, rcx
setz al
jz short loc_27B25
movdqu xmm0, xmmword ptr [rcx]
movdqu xmm1, xmmword ptr [rcx+10h]
pcmpeqb xmm1, [rsp+88h+var_48]
pcmpeqb xmm0, [rsp+88h+var_58]
pand xmm0, xmm1
pmovmskb edx, xmm0
cmp edx, 0FFFFh
jz short loc_27B27
mov rcx, [rcx+38h]
jmp short loc_27AF2
loc_27B25:
jmp short loc_27B2E
loc_27B27:
mov ebx, [rcx+20h]
mov rdx, [rcx+28h]
loc_27B2E:
test al, al
jz short loc_27B69
lea rdx, aCode; "code"
lea rbx, [rsp+88h+var_38]
lea rsi, [rsp+88h+var_70]
mov rdi, rbx
call ssz_get
mov rax, [rbx+10h]
test rax, rax
jz short loc_27B65
cmp dword ptr [rax+8], 4
jnz short loc_27B65
mov ebx, [rsp+88h+var_38]
mov rdx, [rsp+88h+var_30]
jmp short loc_27B69
loc_27B65:
xor ebx, ebx
loc_27B67:
xor edx, edx
loc_27B69:
mov eax, ebx
add rsp, 68h
pop rbx
pop r12
pop r14
pop r15
retn
| long long get_code(long long a1, long long a2)
{
long long changed_account; // rax
unsigned __int32 v3; // ebx
int v4; // edx
int v5; // ecx
int v6; // r8d
int v7; // r9d
const __m128i *i; // rcx
__m128i v10; // [rsp+18h] [rbp-70h] BYREF
long long v11; // [rsp+28h] [rbp-60h]
__m128i v12; // [rsp+30h] [rbp-58h] BYREF
__m128i v13; // [rsp+40h] [rbp-48h]
unsigned __int32 v14; // [rsp+50h] [rbp-38h] BYREF
long long v15; // [rsp+60h] [rbp-28h]
changed_account = get_changed_account();
if ( changed_account )
{
return *(unsigned __int32 *)(changed_account + 56);
}
else
{
v3 = 0;
get_src_account(&v10, a1, a2, 0LL);
if ( v11 )
{
v13 = 0LL;
v12 = 0LL;
eth_get_account_value(4, (unsigned int)&v12, v4, v5, v6, v7, _mm_loadu_si128(&v10), v11);
for ( i = *(const __m128i **)(a1 + 48); i; i = (const __m128i *)i[3].m128i_i64[1] )
{
if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_loadu_si128(i), v12), _mm_cmpeq_epi8(_mm_loadu_si128(i + 1), v13))) == 0xFFFF )
{
v3 = i[2].m128i_u32[0];
break;
}
}
if ( !i )
{
ssz_get(&v14, &v10);
if ( v15 && *(_DWORD *)(v15 + 8) == 4 )
return v14;
else
return 0;
}
}
}
return v3;
}
| get_code:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R15,RSI
MOV R14,RDI
CALL 0x00127bd3
TEST RAX,RAX
JZ 0x00127a9d
MOV EBX,dword ptr [RAX + 0x38]
MOV RDX,qword ptr [RAX + 0x40]
JMP 0x00127b69
LAB_00127a9d:
LEA R12,[RSP + 0x18]
XOR EBX,EBX
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
XOR ECX,ECX
CALL 0x00127c22
CMP qword ptr [R12 + 0x10],0x0
JZ 0x00127b67
XORPS XMM0,XMM0
LEA RSI,[RSP + 0x30]
MOVAPS xmmword ptr [RSI + 0x10],XMM0
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
MOVDQU XMM0,xmmword ptr [RSP + 0x18]
MOVDQU xmmword ptr [RSP],XMM0
MOV EDI,0x4
CALL 0x0012c25b
MOV RCX,qword ptr [R14 + 0x30]
LAB_00127af2:
TEST RCX,RCX
SETZ AL
JZ 0x00127b25
MOVDQU XMM0,xmmword ptr [RCX]
MOVDQU XMM1,xmmword ptr [RCX + 0x10]
PCMPEQB XMM1,xmmword ptr [RSP + 0x40]
PCMPEQB XMM0,xmmword ptr [RSP + 0x30]
PAND XMM0,XMM1
PMOVMSKB EDX,XMM0
CMP EDX,0xffff
JZ 0x00127b27
MOV RCX,qword ptr [RCX + 0x38]
JMP 0x00127af2
LAB_00127b25:
JMP 0x00127b2e
LAB_00127b27:
MOV EBX,dword ptr [RCX + 0x20]
MOV RDX,qword ptr [RCX + 0x28]
LAB_00127b2e:
TEST AL,AL
JZ 0x00127b69
LEA RDX,[0x183826]
LEA RBX,[RSP + 0x50]
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x001574bd
MOV RAX,qword ptr [RBX + 0x10]
TEST RAX,RAX
JZ 0x00127b65
CMP dword ptr [RAX + 0x8],0x4
JNZ 0x00127b65
MOV EBX,dword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
JMP 0x00127b69
LAB_00127b65:
XOR EBX,EBX
LAB_00127b67:
XOR EDX,EDX
LAB_00127b69:
MOV EAX,EBX
ADD RSP,0x68
POP RBX
POP R12
POP R14
POP R15
RET
|
int4 get_code(long param_1,int8 param_2)
{
long lVar1;
char *pcVar2;
int4 uVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int1 local_70 [16];
long local_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
int4 local_38 [4];
long local_28;
lVar1 = get_changed_account();
if (lVar1 == 0) {
uVar3 = 0;
get_src_account(local_70,param_1,param_2,0);
if (local_60 != 0) {
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
eth_get_account_value(4);
for (pcVar2 = *(char **)(param_1 + 0x30); pcVar2 != (char *)0x0;
pcVar2 = *(char **)(pcVar2 + 0x38)) {
auVar5[0] = -(pcVar2[0x10] == (char)local_48);
auVar5[1] = -(pcVar2[0x11] == local_48._1_1_);
auVar5[2] = -(pcVar2[0x12] == local_48._2_1_);
auVar5[3] = -(pcVar2[0x13] == local_48._3_1_);
auVar5[4] = -(pcVar2[0x14] == local_48._4_1_);
auVar5[5] = -(pcVar2[0x15] == local_48._5_1_);
auVar5[6] = -(pcVar2[0x16] == local_48._6_1_);
auVar5[7] = -(pcVar2[0x17] == local_48._7_1_);
auVar5[8] = -(pcVar2[0x18] == (char)uStack_40);
auVar5[9] = -(pcVar2[0x19] == uStack_40._1_1_);
auVar5[10] = -(pcVar2[0x1a] == uStack_40._2_1_);
auVar5[0xb] = -(pcVar2[0x1b] == uStack_40._3_1_);
auVar5[0xc] = -(pcVar2[0x1c] == uStack_40._4_1_);
auVar5[0xd] = -(pcVar2[0x1d] == uStack_40._5_1_);
auVar5[0xe] = -(pcVar2[0x1e] == uStack_40._6_1_);
auVar5[0xf] = -(pcVar2[0x1f] == uStack_40._7_1_);
auVar4[0] = -(*pcVar2 == (char)local_58);
auVar4[1] = -(pcVar2[1] == local_58._1_1_);
auVar4[2] = -(pcVar2[2] == local_58._2_1_);
auVar4[3] = -(pcVar2[3] == local_58._3_1_);
auVar4[4] = -(pcVar2[4] == local_58._4_1_);
auVar4[5] = -(pcVar2[5] == local_58._5_1_);
auVar4[6] = -(pcVar2[6] == local_58._6_1_);
auVar4[7] = -(pcVar2[7] == local_58._7_1_);
auVar4[8] = -(pcVar2[8] == (char)uStack_50);
auVar4[9] = -(pcVar2[9] == uStack_50._1_1_);
auVar4[10] = -(pcVar2[10] == uStack_50._2_1_);
auVar4[0xb] = -(pcVar2[0xb] == uStack_50._3_1_);
auVar4[0xc] = -(pcVar2[0xc] == uStack_50._4_1_);
auVar4[0xd] = -(pcVar2[0xd] == uStack_50._5_1_);
auVar4[0xe] = -(pcVar2[0xe] == uStack_50._6_1_);
auVar4[0xf] = -(pcVar2[0xf] == uStack_50._7_1_);
auVar4 = auVar4 & auVar5;
if ((ushort)((ushort)(SUB161(auVar4 >> 7,0) & 1) |
(ushort)(SUB161(auVar4 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar4 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar4 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar4 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar4 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar4 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar4 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar4 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar4 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar4 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar4 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar4 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar4 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar4 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar4[0xf] >> 7) << 0xf) == 0xffff) {
uVar3 = *(int4 *)(pcVar2 + 0x20);
break;
}
}
if (pcVar2 != (char *)0x0) {
return uVar3;
}
ssz_get(local_38,local_70,&DAT_00183826);
if ((local_28 != 0) && (*(int *)(local_28 + 8) == 4)) {
return local_38[0];
}
}
uVar3 = 0;
}
else {
uVar3 = *(int4 *)(lVar1 + 0x38);
}
return uVar3;
}
| |
32,628 | get_code | corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_ctx.h | static bytes_t get_code(evmone_context_t* ctx, const address_t address) {
changed_account_t* changed_account = get_changed_account(ctx, address);
if (changed_account) return changed_account->code;
ssz_ob_t account = get_src_account(ctx, address, false);
if (!account.def) return NULL_BYTES;
bytes32_t code_hash = {0};
eth_get_account_value(account, ETH_ACCOUNT_CODE_HASH, code_hash);
for (call_code_t* call_code = ctx->call_codes; call_code; call_code = call_code->next) {
if (memcmp(call_code->hash, code_hash, 32) == 0)
return call_code->code;
}
ssz_ob_t code = ssz_get(&account, "code");
if (code.def && code.def->type == SSZ_TYPE_LIST) return code.bytes;
return NULL_BYTES;
// return account.def ? ssz_get(&account, "code").bytes : NULL_BYTES;
} | O3 | c | get_code:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %r14
callq 0x27648
testq %rax, %rax
je 0x27519
movl 0x38(%rax), %ebx
movq 0x40(%rax), %rdx
jmp 0x275de
leaq 0x20(%rsp), %r12
xorl %ebx, %ebx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x27690
cmpq $0x0, 0x10(%r12)
je 0x275d3
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movdqu 0x20(%rsp), %xmm0
movdqu %xmm0, (%rsp)
movl $0x4, %edi
callq 0x2bb9d
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x2759e
movdqu (%rax), %xmm0
movdqu 0x10(%rax), %xmm1
pcmpeqb 0x60(%rsp), %xmm1
pcmpeqb 0x50(%rsp), %xmm0
pand %xmm1, %xmm0
pmovmskb %xmm0, %ecx
cmpl $0xffff, %ecx # imm = 0xFFFF
je 0x275d7
movq 0x38(%rax), %rax
jmp 0x2756e
leaq 0x58281(%rip), %rdx # 0x7f826
leaq 0x38(%rsp), %rbx
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x53211
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x275d1
cmpl $0x4, 0x8(%rax)
jne 0x275d1
movl 0x38(%rsp), %ebx
movq 0x40(%rsp), %rdx
jmp 0x275de
xorl %ebx, %ebx
xorl %edx, %edx
jmp 0x275de
movl 0x20(%rax), %ebx
movq 0x28(%rax), %rdx
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| get_code:
push r15
push r14
push r12
push rbx
sub rsp, 78h
mov r15, rsi
mov r14, rdi
call get_changed_account
test rax, rax
jz short loc_27519
mov ebx, [rax+38h]
mov rdx, [rax+40h]
jmp loc_275DE
loc_27519:
lea r12, [rsp+98h+var_78]
xor ebx, ebx
mov rdi, r12
mov rsi, r14
mov rdx, r15
xor ecx, ecx
call get_src_account
cmp qword ptr [r12+10h], 0
jz loc_275D3
xorps xmm0, xmm0
lea rsi, [rsp+98h+var_48]
movaps xmmword ptr [rsi+10h], xmm0
movaps xmmword ptr [rsi], xmm0
mov rax, [rsp+98h+var_68]
mov [rsp+98h+var_88], rax
movdqu xmm0, [rsp+98h+var_78]
movdqu [rsp+98h+var_98], xmm0
mov edi, 4
call eth_get_account_value
mov rax, [r14+30h]
loc_2756E:
test rax, rax
jz short loc_2759E
movdqu xmm0, xmmword ptr [rax]
movdqu xmm1, xmmword ptr [rax+10h]
pcmpeqb xmm1, [rsp+98h+var_38]
pcmpeqb xmm0, [rsp+98h+var_48]
pand xmm0, xmm1
pmovmskb ecx, xmm0
cmp ecx, 0FFFFh
jz short loc_275D7
mov rax, [rax+38h]
jmp short loc_2756E
loc_2759E:
lea rdx, aCode; "code"
lea rbx, [rsp+98h+var_60]
lea rsi, [rsp+98h+var_78]
mov rdi, rbx
call ssz_get
mov rax, [rbx+10h]
test rax, rax
jz short loc_275D1
cmp dword ptr [rax+8], 4
jnz short loc_275D1
mov ebx, [rsp+98h+var_60]
mov rdx, [rsp+98h+var_58]
jmp short loc_275DE
loc_275D1:
xor ebx, ebx
loc_275D3:
xor edx, edx
jmp short loc_275DE
loc_275D7:
mov ebx, [rax+20h]
mov rdx, [rax+28h]
loc_275DE:
mov eax, ebx
add rsp, 78h
pop rbx
pop r12
pop r14
pop r15
retn
| long long get_code(long long a1, long long a2)
{
long long changed_account; // rax
unsigned int v3; // ebx
int v4; // edx
int v5; // ecx
int v6; // r8d
int v7; // r9d
const __m128i *i; // rax
__m128i v10; // [rsp+20h] [rbp-78h] BYREF
long long v11; // [rsp+30h] [rbp-68h]
unsigned int v12; // [rsp+38h] [rbp-60h] BYREF
long long v13; // [rsp+48h] [rbp-50h]
__m128i v14; // [rsp+50h] [rbp-48h] BYREF
__m128i v15; // [rsp+60h] [rbp-38h]
changed_account = get_changed_account();
if ( changed_account )
{
return *(unsigned int *)(changed_account + 56);
}
else
{
v3 = 0;
get_src_account(&v10, a1, a2, 0LL);
if ( v11 )
{
v15 = 0LL;
v14 = 0LL;
eth_get_account_value(4, (unsigned int)&v14, v4, v5, v6, v7, _mm_loadu_si128(&v10), v11);
for ( i = *(const __m128i **)(a1 + 48); i; i = (const __m128i *)i[3].m128i_i64[1] )
{
if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_loadu_si128(i), v14), _mm_cmpeq_epi8(_mm_loadu_si128(i + 1), v15))) == 0xFFFF )
return i[2].m128i_u32[0];
}
ssz_get(&v12, &v10);
if ( v13 && *(_DWORD *)(v13 + 8) == 4 )
return v12;
else
return 0;
}
}
return v3;
}
| get_code:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R15,RSI
MOV R14,RDI
CALL 0x00127648
TEST RAX,RAX
JZ 0x00127519
MOV EBX,dword ptr [RAX + 0x38]
MOV RDX,qword ptr [RAX + 0x40]
JMP 0x001275de
LAB_00127519:
LEA R12,[RSP + 0x20]
XOR EBX,EBX
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
XOR ECX,ECX
CALL 0x00127690
CMP qword ptr [R12 + 0x10],0x0
JZ 0x001275d3
XORPS XMM0,XMM0
LEA RSI,[RSP + 0x50]
MOVAPS xmmword ptr [RSI + 0x10],XMM0
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVDQU XMM0,xmmword ptr [RSP + 0x20]
MOVDQU xmmword ptr [RSP],XMM0
MOV EDI,0x4
CALL 0x0012bb9d
MOV RAX,qword ptr [R14 + 0x30]
LAB_0012756e:
TEST RAX,RAX
JZ 0x0012759e
MOVDQU XMM0,xmmword ptr [RAX]
MOVDQU XMM1,xmmword ptr [RAX + 0x10]
PCMPEQB XMM1,xmmword ptr [RSP + 0x60]
PCMPEQB XMM0,xmmword ptr [RSP + 0x50]
PAND XMM0,XMM1
PMOVMSKB ECX,XMM0
CMP ECX,0xffff
JZ 0x001275d7
MOV RAX,qword ptr [RAX + 0x38]
JMP 0x0012756e
LAB_0012759e:
LEA RDX,[0x17f826]
LEA RBX,[RSP + 0x38]
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00153211
MOV RAX,qword ptr [RBX + 0x10]
TEST RAX,RAX
JZ 0x001275d1
CMP dword ptr [RAX + 0x8],0x4
JNZ 0x001275d1
MOV EBX,dword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
JMP 0x001275de
LAB_001275d1:
XOR EBX,EBX
LAB_001275d3:
XOR EDX,EDX
JMP 0x001275de
LAB_001275d7:
MOV EBX,dword ptr [RAX + 0x20]
MOV RDX,qword ptr [RAX + 0x28]
LAB_001275de:
MOV EAX,EBX
ADD RSP,0x78
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16] get_code(long param_1,int8 param_2)
{
long lVar1;
char *pcVar2;
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [16];
int1 local_78 [16];
long local_68;
uint local_60 [2];
int8 local_58;
long local_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 uStack_30;
lVar1 = get_changed_account();
if (lVar1 == 0) {
get_src_account(local_78,param_1,param_2,0);
if (local_68 != 0) {
local_38 = 0;
uStack_30 = 0;
local_48 = 0;
uStack_40 = 0;
eth_get_account_value(4);
for (pcVar2 = *(char **)(param_1 + 0x30); pcVar2 != (char *)0x0;
pcVar2 = *(char **)(pcVar2 + 0x38)) {
auVar4[0] = -(pcVar2[0x10] == (char)local_38);
auVar4[1] = -(pcVar2[0x11] == local_38._1_1_);
auVar4[2] = -(pcVar2[0x12] == local_38._2_1_);
auVar4[3] = -(pcVar2[0x13] == local_38._3_1_);
auVar4[4] = -(pcVar2[0x14] == local_38._4_1_);
auVar4[5] = -(pcVar2[0x15] == local_38._5_1_);
auVar4[6] = -(pcVar2[0x16] == local_38._6_1_);
auVar4[7] = -(pcVar2[0x17] == local_38._7_1_);
auVar4[8] = -(pcVar2[0x18] == (char)uStack_30);
auVar4[9] = -(pcVar2[0x19] == uStack_30._1_1_);
auVar4[10] = -(pcVar2[0x1a] == uStack_30._2_1_);
auVar4[0xb] = -(pcVar2[0x1b] == uStack_30._3_1_);
auVar4[0xc] = -(pcVar2[0x1c] == uStack_30._4_1_);
auVar4[0xd] = -(pcVar2[0x1d] == uStack_30._5_1_);
auVar4[0xe] = -(pcVar2[0x1e] == uStack_30._6_1_);
auVar4[0xf] = -(pcVar2[0x1f] == uStack_30._7_1_);
auVar3[0] = -(*pcVar2 == (char)local_48);
auVar3[1] = -(pcVar2[1] == local_48._1_1_);
auVar3[2] = -(pcVar2[2] == local_48._2_1_);
auVar3[3] = -(pcVar2[3] == local_48._3_1_);
auVar3[4] = -(pcVar2[4] == local_48._4_1_);
auVar3[5] = -(pcVar2[5] == local_48._5_1_);
auVar3[6] = -(pcVar2[6] == local_48._6_1_);
auVar3[7] = -(pcVar2[7] == local_48._7_1_);
auVar3[8] = -(pcVar2[8] == (char)uStack_40);
auVar3[9] = -(pcVar2[9] == uStack_40._1_1_);
auVar3[10] = -(pcVar2[10] == uStack_40._2_1_);
auVar3[0xb] = -(pcVar2[0xb] == uStack_40._3_1_);
auVar3[0xc] = -(pcVar2[0xc] == uStack_40._4_1_);
auVar3[0xd] = -(pcVar2[0xd] == uStack_40._5_1_);
auVar3[0xe] = -(pcVar2[0xe] == uStack_40._6_1_);
auVar3[0xf] = -(pcVar2[0xf] == uStack_40._7_1_);
auVar3 = auVar3 & auVar4;
if ((ushort)((ushort)(SUB161(auVar3 >> 7,0) & 1) |
(ushort)(SUB161(auVar3 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar3 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar3 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar3 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar3 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar3 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar3 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar3 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar3 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar3 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar3 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar3 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar3 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar3 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar3[0xf] >> 7) << 0xf) == 0xffff) {
local_60[0] = *(uint *)(pcVar2 + 0x20);
local_58 = *(int8 *)(pcVar2 + 0x28);
goto LAB_001275de;
}
}
ssz_get(local_60,local_78,&DAT_0017f826);
if ((local_50 != 0) && (*(int *)(local_50 + 8) == 4)) goto LAB_001275de;
}
local_60[0] = 0;
local_58 = 0;
}
else {
local_60[0] = *(uint *)(lVar1 + 0x38);
local_58 = *(int8 *)(lVar1 + 0x40);
}
LAB_001275de:
auVar5._4_4_ = 0;
auVar5._0_4_ = local_60[0];
auVar5._8_8_ = local_58;
return auVar5;
}
| |
32,629 | mysql_close_slow_part_cont | eloqsql/libmariadb/libmariadb/mariadb_async.c | MK_ASYNC_CONT_BODY_VOID_RETURN(sock)
}
int STDCALL
mysql_close_start(MYSQL *sock)
{
int res;
/* It is legitimate to have NULL sock argument, which will do nothing. */
if (sock && sock->net.pvio)
{
res= mysql_close_slow_part_start(sock);
/* If we need to block, return now and do the rest in mysql_close_cont(). */
if (res)
return res;
}
mysql_close(sock);
return 0;
} | O0 | c | mysql_close_slow_part_cont:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x15(%rax)
jne 0x5c3ad
jmp 0x5c33e
movq -0x10(%rbp), %rax
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movq -0x10(%rbp), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x1d4e62(%rip), %rax # 0x2311c0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x36140
movq -0x10(%rbp), %rax
movb $0x0, 0x29c(%rax)
movq -0x10(%rbp), %rdi
addq $0x97, %rdi
leaq 0x1d4e48(%rip), %rax # 0x2311d0
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x36140
movq -0x10(%rbp), %rax
movb $0x0, 0x296(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x5c464
movq -0x20(%rbp), %rax
movb $0x1, 0x14(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rdi
addq $0x38, %rdi
callq 0x61ed0
movl %eax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movb $0x0, 0x14(%rax)
cmpl $0x0, -0x18(%rbp)
jle 0x5c3e8
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x5c464
movq -0x20(%rbp), %rax
movb $0x0, 0x15(%rax)
cmpl $0x0, -0x18(%rbp)
jge 0x5c45d
jmp 0x5c3f8
movq -0x10(%rbp), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movq -0x10(%rbp), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x1d4da8(%rip), %rax # 0x2311c0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x36140
movq -0x10(%rbp), %rax
movb $0x0, 0x29c(%rax)
movq -0x10(%rbp), %rdi
addq $0x97, %rdi
leaq 0x1d4d8e(%rip), %rax # 0x2311d0
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x36140
movq -0x10(%rbp), %rax
movb $0x0, 0x296(%rax)
jmp 0x5c45d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| mysql_close_slow_part_cont:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
cmp byte ptr [rax+15h], 0
jnz short loc_5C3AD
jmp short $+2
loc_5C33E:
mov rax, [rbp+var_10]
mov dword ptr [rax+90h], 7DEh
mov rdi, [rbp+var_10]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+29Ch], 0
mov rdi, [rbp+var_10]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+296h], 0
mov [rbp+var_4], 0
jmp loc_5C464
loc_5C3AD:
mov rax, [rbp+var_20]
mov byte ptr [rax+14h], 1
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+4], ecx
mov rdi, [rbp+var_20]
add rdi, 38h ; '8'
call my_context_continue
mov [rbp+var_18], eax
mov rax, [rbp+var_20]
mov byte ptr [rax+14h], 0
cmp [rbp+var_18], 0
jle short loc_5C3E8
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_5C464
loc_5C3E8:
mov rax, [rbp+var_20]
mov byte ptr [rax+15h], 0
cmp [rbp+var_18], 0
jge short loc_5C45D
jmp short $+2
loc_5C3F8:
mov rax, [rbp+var_10]
mov dword ptr [rax+90h], 7D8h
mov rdi, [rbp+var_10]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+29Ch], 0
mov rdi, [rbp+var_10]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+296h], 0
jmp short $+2
loc_5C45D:
mov [rbp+var_4], 0
loc_5C464:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long mysql_close_slow_part_cont(long long a1, unsigned int a2)
{
unsigned int *v3; // [rsp+0h] [rbp-20h]
int v4; // [rsp+8h] [rbp-18h]
v3 = *(unsigned int **)(*(_QWORD *)(a1 + 1152) + 40LL);
if ( *((_BYTE *)v3 + 21) )
{
*((_BYTE *)v3 + 20) = 1;
v3[1] = a2;
v4 = my_context_continue(v3 + 14);
*((_BYTE *)v3 + 20) = 0;
if ( v4 <= 0 )
{
*((_BYTE *)v3 + 21) = 0;
if ( v4 < 0 )
{
*(_DWORD *)(a1 + 144) = 2008;
strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 668) = 0;
strncpy(a1 + 151, client_errors[8], 511LL);
*(_BYTE *)(a1 + 662) = 0;
}
return 0;
}
else
{
return *v3;
}
}
else
{
*(_DWORD *)(a1 + 144) = 2014;
strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 668) = 0;
strncpy(a1 + 151, client_errors[14], 511LL);
*(_BYTE *)(a1 + 662) = 0;
return 0;
}
}
| mysql_close_slow_part_cont:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x15],0x0
JNZ 0x0015c3ad
JMP 0x0015c33e
LAB_0015c33e:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x90],0x7de
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x297
LEA RAX,[0x3311c0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00136140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x29c],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x97
LEA RAX,[0x3311d0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00136140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x296],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015c464
LAB_0015c3ad:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x14],0x1
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x4],ECX
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x38
CALL 0x00161ed0
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x14],0x0
CMP dword ptr [RBP + -0x18],0x0
JLE 0x0015c3e8
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015c464
LAB_0015c3e8:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x15],0x0
CMP dword ptr [RBP + -0x18],0x0
JGE 0x0015c45d
JMP 0x0015c3f8
LAB_0015c3f8:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x90],0x7d8
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x297
LEA RAX,[0x3311c0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00136140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x29c],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x97
LEA RAX,[0x3311d0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00136140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x296],0x0
JMP 0x0015c45d
LAB_0015c45d:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015c464:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 mysql_close_slow_part_cont(long param_1,int4 param_2)
{
int4 *puVar1;
int iVar2;
int4 local_c;
puVar1 = *(int4 **)(*(long *)(param_1 + 0x480) + 0x28);
if (*(char *)((long)puVar1 + 0x15) == '\0') {
*(int4 *)(param_1 + 0x90) = 0x7de;
strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x29c) = 0;
strncpy((char *)(param_1 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_00331240,0x1ff);
*(int1 *)(param_1 + 0x296) = 0;
local_c = 0;
}
else {
*(int1 *)(puVar1 + 5) = 1;
puVar1[1] = param_2;
iVar2 = my_context_continue(puVar1 + 0xe);
*(int1 *)(puVar1 + 5) = 0;
if (iVar2 < 1) {
*(int1 *)((long)puVar1 + 0x15) = 0;
if (iVar2 < 0) {
*(int4 *)(param_1 + 0x90) = 0x7d8;
strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x29c) = 0;
strncpy((char *)(param_1 + 0x97),PTR_s_Client_run_out_of_memory_00331210,0x1ff);
*(int1 *)(param_1 + 0x296) = 0;
}
local_c = 0;
}
else {
local_c = *puVar1;
}
}
return local_c;
}
| |
32,630 | CLI::App::_parse(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&) | MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/impl/App_inl.hpp | CLI11_INLINE void App::_parse(std::vector<std::string> &&args) {
// this can only be called by the top level in which case parent == nullptr by definition
// operation is simplified
increment_parsed();
_trigger_pre_parse(args.size());
bool positional_only = false;
while(!args.empty()) {
_parse_single(args, positional_only);
}
_process();
// Throw error if any items are left over (depending on settings)
_process_extras();
} | O3 | cpp | CLI::App::_parse(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1e77c
cmpb $0x0, 0x4e(%rbx)
je 0x1e2c8
cmpb $0x1, 0x4f(%rbx)
jne 0x1e2ed
cmpq $0x0, 0x10(%rbx)
je 0x1e2ed
movl 0x2a4(%rbx), %ebp
movq 0x178(%rbx), %r15
movq %r15, (%rsp)
movq 0x180(%rbx), %r12
movq %r12, 0x8(%rsp)
movq 0x188(%rbx), %r13
movq %r13, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x178(%rbx)
movq $0x0, 0x188(%rbx)
movq %rbx, %rdi
callq 0x1de46
movl %ebp, 0x2a4(%rbx)
movb $0x1, 0x4e(%rbx)
movq 0x188(%rbx), %rax
movq %r13, 0x188(%rbx)
movups 0x178(%rbx), %xmm0
movq %r15, 0x178(%rbx)
movq %r12, 0x180(%rbx)
leaq 0x20(%rsp), %rdi
movaps %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
movq %rsp, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
callq 0x19156
movq %r15, %rdi
callq 0x19156
jmp 0x1e2ed
movq 0x8(%r14), %rax
subq (%r14), %rax
movb $0x1, 0x4e(%rbx)
cmpq $0x0, 0x60(%rbx)
je 0x1e2ed
sarq $0x5, %rax
leaq 0x50(%rbx), %rdi
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
callq *0x68(%rbx)
movb $0x0, 0x20(%rsp)
movq (%r14), %rax
cmpq 0x8(%r14), %rax
je 0x1e317
leaq 0x20(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1e7b6
movq (%r14), %rax
cmpq 0x8(%r14), %rax
jne 0x1e300
movq %rbx, %rdi
callq 0x1ea44
movq %rbx, %rdi
callq 0x1eabc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x19156
movq %rbx, %rdi
callq 0x7780
nop
| _ZN3CLI3App6_parseEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
call _ZN3CLI3App16increment_parsedEv; CLI::App::increment_parsed(void)
cmp byte ptr [rbx+4Eh], 0
jz loc_1E2C8
cmp byte ptr [rbx+4Fh], 1
jnz loc_1E2ED
cmp qword ptr [rbx+10h], 0
jz loc_1E2ED
mov ebp, [rbx+2A4h]
mov r15, [rbx+178h]
mov [rsp+68h+var_68], r15
mov r12, [rbx+180h]
mov [rsp+68h+var_60], r12
mov r13, [rbx+188h]
mov [rsp+68h+var_58], r13
xorps xmm0, xmm0
movups xmmword ptr [rbx+178h], xmm0
mov qword ptr [rbx+188h], 0
mov rdi, rbx; this
call _ZN3CLI3App5clearEv; CLI::App::clear(void)
mov [rbx+2A4h], ebp
mov byte ptr [rbx+4Eh], 1
mov rax, [rbx+188h]
mov [rbx+188h], r13
movups xmm0, xmmword ptr [rbx+178h]
mov [rbx+178h], r15
mov [rbx+180h], r12
lea rdi, [rsp+68h+var_48]
movaps xmmword ptr [rdi], xmm0
mov [rdi+10h], rax
mov r15, rsp
xorps xmm0, xmm0
movaps xmmword ptr [r15], xmm0
mov qword ptr [r15+10h], 0
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EED2Ev; std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector()
mov rdi, r15
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EED2Ev; std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector()
jmp short loc_1E2ED
loc_1E2C8:
mov rax, [r14+8]
sub rax, [r14]
mov byte ptr [rbx+4Eh], 1
cmp qword ptr [rbx+60h], 0
jz short loc_1E2ED
sar rax, 5
lea rdi, [rbx+50h]
lea rsi, [rsp+68h+var_48]
mov [rsi], rax
call qword ptr [rbx+68h]
loc_1E2ED:
mov [rsp+68h+var_48], 0
mov rax, [r14]
cmp rax, [r14+8]
jz short loc_1E317
lea r15, [rsp+68h+var_48]
loc_1E300:
mov rdi, rbx; int
mov rsi, r14
mov rdx, r15
call _ZN3CLI3App13_parse_singleERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERb; CLI::App::_parse_single(std::vector<std::string> &,bool &)
mov rax, [r14]
cmp rax, [r14+8]
jnz short loc_1E300
loc_1E317:
mov rdi, rbx; this
call _ZN3CLI3App8_processEv; CLI::App::_process(void)
mov rdi, rbx; this
call _ZN3CLI3App15_process_extrasEv; CLI::App::_process_extras(void)
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, rsp
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EED2Ev; std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector()
mov rdi, rbx
call __Unwind_Resume
| long long CLI::App::_parse(CLI::App *this, _QWORD *a2)
{
int v2; // ebp
__int128 v3; // kr00_16
long long v4; // r13
long long v5; // rax
__int128 v6; // xmm0
long long v7; // rax
__int128 v9; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h]
__int128 v11; // [rsp+20h] [rbp-48h] BYREF
long long v12; // [rsp+30h] [rbp-38h]
CLI::App::increment_parsed(this);
if ( *((_BYTE *)this + 78) )
{
if ( *((_BYTE *)this + 79) == 1 && *((_QWORD *)this + 2) )
{
v2 = *((_DWORD *)this + 169);
v9 = *(_OWORD *)((char *)this + 376);
v3 = v9;
v10 = *((_QWORD *)this + 49);
v4 = v10;
*(_OWORD *)((char *)this + 376) = 0LL;
*((_QWORD *)this + 49) = 0LL;
CLI::App::clear(this);
*((_DWORD *)this + 169) = v2;
*((_BYTE *)this + 78) = 1;
v5 = *((_QWORD *)this + 49);
*((_QWORD *)this + 49) = v4;
v6 = *(_OWORD *)((char *)this + 376);
*(_OWORD *)((char *)this + 376) = v3;
v11 = v6;
v12 = v5;
v9 = 0LL;
v10 = 0LL;
std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector((long long)&v11);
std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector((long long)&v9);
}
}
else
{
v7 = a2[1] - *a2;
*((_BYTE *)this + 78) = 1;
if ( *((_QWORD *)this + 12) )
{
*(_QWORD *)&v11 = v7 >> 5;
(*((void ( **)(char *))this + 13))((char *)this + 80);
}
}
LOBYTE(v11) = 0;
while ( *a2 != a2[1] )
CLI::App::_parse_single((int)this);
CLI::App::_process(this);
return CLI::App::_process_extras(this);
}
| _parse:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
CALL 0x0011e77c
CMP byte ptr [RBX + 0x4e],0x0
JZ 0x0011e2c8
CMP byte ptr [RBX + 0x4f],0x1
JNZ 0x0011e2ed
CMP qword ptr [RBX + 0x10],0x0
JZ 0x0011e2ed
MOV EBP,dword ptr [RBX + 0x2a4]
MOV R15,qword ptr [RBX + 0x178]
MOV qword ptr [RSP],R15
MOV R12,qword ptr [RBX + 0x180]
MOV qword ptr [RSP + 0x8],R12
MOV R13,qword ptr [RBX + 0x188]
MOV qword ptr [RSP + 0x10],R13
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x178],XMM0
MOV qword ptr [RBX + 0x188],0x0
LAB_0011e266:
MOV RDI,RBX
CALL 0x0011de46
LAB_0011e26e:
MOV dword ptr [RBX + 0x2a4],EBP
MOV byte ptr [RBX + 0x4e],0x1
MOV RAX,qword ptr [RBX + 0x188]
MOV qword ptr [RBX + 0x188],R13
MOVUPS XMM0,xmmword ptr [RBX + 0x178]
MOV qword ptr [RBX + 0x178],R15
MOV qword ptr [RBX + 0x180],R12
LEA RDI,[RSP + 0x20]
MOVAPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],RAX
MOV R15,RSP
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R15],XMM0
MOV qword ptr [R15 + 0x10],0x0
CALL 0x00119156
MOV RDI,R15
CALL 0x00119156
JMP 0x0011e2ed
LAB_0011e2c8:
MOV RAX,qword ptr [R14 + 0x8]
SUB RAX,qword ptr [R14]
MOV byte ptr [RBX + 0x4e],0x1
CMP qword ptr [RBX + 0x60],0x0
JZ 0x0011e2ed
SAR RAX,0x5
LEA RDI,[RBX + 0x50]
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI],RAX
CALL qword ptr [RBX + 0x68]
LAB_0011e2ed:
MOV byte ptr [RSP + 0x20],0x0
MOV RAX,qword ptr [R14]
CMP RAX,qword ptr [R14 + 0x8]
JZ 0x0011e317
LEA R15,[RSP + 0x20]
LAB_0011e300:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0011e7b6
MOV RAX,qword ptr [R14]
CMP RAX,qword ptr [R14 + 0x8]
JNZ 0x0011e300
LAB_0011e317:
MOV RDI,RBX
CALL 0x0011ea44
MOV RDI,RBX
CALL 0x0011eabc
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* CLI::App::_parse(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&&) */
void __thiscall CLI::App::_parse(App *this,vector *param_1)
{
int4 uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
long lVar5;
long lVar6;
int8 local_68;
int8 uStack_60;
int8 local_58;
ulong local_48;
int8 uStack_40;
int8 local_38;
increment_parsed(this);
if (this[0x4e] == (App)0x0) {
lVar5 = *(long *)(param_1 + 8);
lVar6 = *(long *)param_1;
this[0x4e] = (App)0x1;
if (*(long *)(this + 0x60) != 0) {
local_48 = lVar5 - lVar6 >> 5;
(**(code **)(this + 0x68))(this + 0x50);
}
}
else if ((this[0x4f] == (App)0x1) && (*(long *)(this + 0x10) != 0)) {
uVar1 = *(int4 *)(this + 0x2a4);
uVar2 = *(int8 *)(this + 0x178);
uVar3 = *(int8 *)(this + 0x180);
uVar4 = *(int8 *)(this + 0x188);
*(int8 *)(this + 0x178) = 0;
*(int8 *)(this + 0x180) = 0;
*(int8 *)(this + 0x188) = 0;
local_68 = uVar2;
uStack_60 = uVar3;
local_58 = uVar4;
/* try { // try from 0011e266 to 0011e26d has its CatchHandler @ 0011e336 */
clear(this);
*(int4 *)(this + 0x2a4) = uVar1;
this[0x4e] = (App)0x1;
local_38 = *(int8 *)(this + 0x188);
*(int8 *)(this + 0x188) = uVar4;
local_48 = *(ulong *)(this + 0x178);
uStack_40 = *(int8 *)(this + 0x180);
*(int8 *)(this + 0x178) = uVar2;
*(int8 *)(this + 0x180) = uVar3;
local_68 = 0;
uStack_60 = 0;
local_58 = 0;
std::
vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
::~vector((vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
*)&local_48);
std::
vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
::~vector((vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
*)&local_68);
}
local_48 = local_48 & 0xffffffffffffff00;
if (*(long *)param_1 != *(long *)(param_1 + 8)) {
do {
_parse_single(this,param_1,(bool *)&local_48);
} while (*(long *)param_1 != *(long *)(param_1 + 8));
}
_process(this);
_process_extras(this);
return;
}
| |
32,631 | ma_state_info_read_dsk | eloqsql/storage/maria/ma_open.c | uint _ma_state_info_read_dsk(File file __attribute__((unused)),
MARIA_STATE_INFO *state __attribute__((unused)))
{
#ifdef MARIA_EXTERNAL_LOCKING
uchar buff[MARIA_STATE_INFO_SIZE + MARIA_STATE_EXTRA_SIZE];
/* trick to detect transactional tables */
DBUG_ASSERT(state->create_rename_lsn == LSN_IMPOSSIBLE);
if (!maria_single_user)
{
if (mysql_file_pread(file, buff, state->state_length, 0L, MYF(MY_NABP)))
return 1;
_ma_state_info_read(buff, state);
}
#endif
return 0;
} | O3 | c | ma_state_info_read_dsk:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
popq %rbp
retq
| _ma_state_info_read_dsk:
push rbp
mov rbp, rsp
xor eax, eax
pop rbp
retn
| long long ma_state_info_read_dsk()
{
return 0LL;
}
| _ma_state_info_read_dsk:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
POP RBP
RET
|
int8 _ma_state_info_read_dsk(void)
{
return 0;
}
| |
32,632 | my_xml_attr_ensure_space | eloqsql/strings/xml.c | static int my_xml_attr_ensure_space(MY_XML_PARSER *st, size_t len)
{
size_t ofs= st->attr.end - st->attr.start;
len++; // Add terminating zero.
if (ofs + len > st->attr.buffer_size)
{
st->attr.buffer_size= (SIZE_T_MAX - len) / 2 > st->attr.buffer_size ?
st->attr.buffer_size * 2 + len : SIZE_T_MAX;
if (!st->attr.buffer)
{
st->attr.buffer= (char *) my_malloc(PSI_INSTRUMENT_ME, st->attr.buffer_size, MYF(0));
if (st->attr.buffer)
memcpy(st->attr.buffer, st->attr.static_buffer, ofs + 1 /*term. zero */);
}
else
st->attr.buffer= (char *) my_realloc(PSI_INSTRUMENT_ME, st->attr.buffer,
st->attr.buffer_size, MYF(0));
st->attr.start= st->attr.buffer;
st->attr.end= st->attr.start + ofs;
return st->attr.buffer ? MY_XML_OK : MY_XML_ERROR;
}
return MY_XML_OK;
} | O0 | c | my_xml_attr_ensure_space:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x118(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x110(%rcx), %rax
jbe 0xb1d73
movq $-0x1, %rax
subq -0x18(%rbp), %rax
shrq %rax
movq -0x10(%rbp), %rcx
cmpq 0x110(%rcx), %rax
jbe 0xb1c75
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rax
shlq %rax
addq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xb1c82
movq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xb1c82
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x110(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x108(%rax)
jne 0xb1cf6
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rsi
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x5d530
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x108(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x108(%rax)
je 0xb1cf4
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x88, %rsi
movq -0x20(%rbp), %rdx
addq $0x1, %rdx
callq 0x26280
jmp 0xb1d25
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rdx
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %ecx
callq 0x5d700
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x108(%rax)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x118(%rax)
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rcx
addq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdx
movl $0x1, %eax
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xb1d7a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_xml_attr_ensure_space:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+118h]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+110h]
jbe loc_B1D73
mov rax, 0FFFFFFFFFFFFFFFFh
sub rax, [rbp+var_18]
shr rax, 1
mov rcx, [rbp+var_10]
cmp rax, [rcx+110h]
jbe short loc_B1C75
mov rax, [rbp+var_10]
mov rax, [rax+110h]
shl rax, 1
add rax, [rbp+var_18]
mov [rbp+var_28], rax
jmp short loc_B1C82
loc_B1C75:
mov rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_28], rax
jmp short $+2
loc_B1C82:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+110h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+108h], 0
jnz short loc_B1CF6
mov rax, [rbp+var_10]
mov rsi, [rax+110h]
xor edi, edi
xor eax, eax
mov edx, eax
call my_malloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+108h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+108h], 0
jz short loc_B1CF4
mov rax, [rbp+var_10]
mov rdi, [rax+108h]
mov rsi, [rbp+var_10]
add rsi, 88h
mov rdx, [rbp+var_20]
add rdx, 1
call _memcpy
loc_B1CF4:
jmp short loc_B1D25
loc_B1CF6:
mov rax, [rbp+var_10]
mov rsi, [rax+108h]
mov rax, [rbp+var_10]
mov rdx, [rax+110h]
xor edi, edi
xor eax, eax
mov ecx, eax
call my_realloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+108h], rcx
loc_B1D25:
mov rax, [rbp+var_10]
mov rcx, [rax+108h]
mov rax, [rbp+var_10]
mov [rax+118h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+118h]
add rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+120h], rcx
mov rax, [rbp+var_10]
mov rdx, [rax+108h]
mov eax, 1
xor ecx, ecx
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_B1D7A
loc_B1D73:
mov [rbp+var_4], 0
loc_B1D7A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| _BOOL8 my_xml_attr_ensure_space(_QWORD *a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
v4 = a1[36] - a1[35];
v5 = a2 + 1;
if ( (unsigned long long)(a2 + 1 + v4) <= a1[34] )
{
return 0;
}
else
{
if ( (unsigned long long)(-1 - v5) >> 1 <= a1[34] )
v3 = -1LL;
else
v3 = v5 + 2LL * a1[34];
a1[34] = v3;
if ( a1[33] )
{
a1[33] = my_realloc(0, a1[33], a1[34], 0);
}
else
{
a1[33] = my_malloc(0, a1[34], 0);
if ( a1[33] )
memcpy(a1[33], a1 + 17, v4 + 1);
}
a1[35] = a1[33];
a1[36] = v4 + a1[35];
return a1[33] == 0LL;
}
}
| my_xml_attr_ensure_space:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x118]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x110]
JBE 0x001b1d73
MOV RAX,-0x1
SUB RAX,qword ptr [RBP + -0x18]
SHR RAX,0x1
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x110]
JBE 0x001b1c75
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x110]
SHL RAX,0x1
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001b1c82
LAB_001b1c75:
MOV RAX,-0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001b1c82
LAB_001b1c82:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x110],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x108],0x0
JNZ 0x001b1cf6
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x110]
XOR EDI,EDI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0015d530
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x108],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x108],0x0
JZ 0x001b1cf4
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x108]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x88
MOV RDX,qword ptr [RBP + -0x20]
ADD RDX,0x1
CALL 0x00126280
LAB_001b1cf4:
JMP 0x001b1d25
LAB_001b1cf6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x110]
XOR EDI,EDI
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0015d700
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x108],RCX
LAB_001b1d25:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x118],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x118]
ADD RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x120],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x108]
MOV EAX,0x1
XOR ECX,ECX
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b1d7a
LAB_001b1d73:
MOV dword ptr [RBP + -0x4],0x0
LAB_001b1d7a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
bool my_xml_attr_ensure_space(long param_1,long param_2)
{
long lVar1;
int8 uVar2;
bool bVar3;
long local_30;
lVar1 = *(long *)(param_1 + 0x120) - *(long *)(param_1 + 0x118);
param_2 = param_2 + 1;
if (*(ulong *)(param_1 + 0x110) < (ulong)(lVar1 + param_2)) {
if (*(ulong *)(param_1 + 0x110) < -param_2 - 1U >> 1) {
local_30 = *(long *)(param_1 + 0x110) * 2 + param_2;
}
else {
local_30 = -1;
}
*(long *)(param_1 + 0x110) = local_30;
if (*(long *)(param_1 + 0x108) == 0) {
uVar2 = my_malloc(0,*(int8 *)(param_1 + 0x110),0);
*(int8 *)(param_1 + 0x108) = uVar2;
if (*(long *)(param_1 + 0x108) != 0) {
memcpy(*(void **)(param_1 + 0x108),(void *)(param_1 + 0x88),lVar1 + 1);
}
}
else {
uVar2 = my_realloc(0,*(int8 *)(param_1 + 0x108),*(int8 *)(param_1 + 0x110),0);
*(int8 *)(param_1 + 0x108) = uVar2;
}
*(int8 *)(param_1 + 0x118) = *(int8 *)(param_1 + 0x108);
*(long *)(param_1 + 0x120) = *(long *)(param_1 + 0x118) + lVar1;
bVar3 = *(long *)(param_1 + 0x108) == 0;
}
else {
bVar3 = false;
}
return bVar3;
}
| |
32,633 | my_string_metadata_get | eloqsql/strings/ctype.c | void
my_string_metadata_get(MY_STRING_METADATA *metadata,
CHARSET_INFO *cs, const char *str, size_t length)
{
if (cs->mbmaxlen == 1 && !(cs->state & MY_CS_NONASCII))
{
metadata->char_length= length;
metadata->repertoire= my_string_repertoire_8bit(cs, str, (ulong)length);
}
else
{
my_string_metadata_get_mb(metadata, cs, str, (ulong)length);
}
} | O3 | c | my_string_metadata_get:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
cmpl $0x1, 0x9c(%rsi)
jne 0xd1711
testb $0x20, 0xd(%r12)
jne 0xd1711
movq %r14, (%rbx)
movl $0x3, %eax
testq %r14, %r14
je 0xd16f1
movl $0x2000, %ecx # imm = 0x2000
andl 0xc(%r12), %ecx
jne 0xd170c
testq %r14, %r14
jle 0xd1707
addq %r15, %r14
cmpb $0x0, (%r15)
js 0xd170c
incq %r15
cmpq %r14, %r15
jb 0xd16f9
movl $0x1, %eax
movl %eax, 0x8(%rbx)
jmp 0xd177b
movl $0x1, 0x8(%rbx)
movq $0x0, (%rbx)
testq %r14, %r14
jle 0xd177b
addq %r15, %r14
leaq -0x30(%rbp), %r13
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq *0x28(%rax)
testl %eax, %eax
jle 0xd1756
cmpq $0x80, -0x30(%rbp)
jb 0xd176e
orb $0x2, 0x8(%rbx)
jmp 0xd176e
je 0xd1765
orb $0x2, 0x8(%rbx)
cmpl $-0x64, %eax
jb 0xd177b
negl %eax
jmp 0xd176e
orb $0x2, 0x8(%rbx)
movl $0x1, %eax
movl %eax, %eax
addq %rax, %r15
incq (%rbx)
cmpq %r14, %r15
jb 0xd172b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_string_metadata_get:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
cmp dword ptr [rsi+9Ch], 1
jnz short loc_D1711
test byte ptr [r12+0Dh], 20h
jnz short loc_D1711
mov [rbx], r14
mov eax, 3
test r14, r14
jz short loc_D16F1
mov ecx, 2000h
and ecx, [r12+0Ch]
jnz short loc_D170C
loc_D16F1:
test r14, r14
jle short loc_D1707
add r14, r15
loc_D16F9:
cmp byte ptr [r15], 0
js short loc_D170C
inc r15
cmp r15, r14
jb short loc_D16F9
loc_D1707:
mov eax, 1
loc_D170C:
mov [rbx+8], eax
jmp short loc_D177B
loc_D1711:
mov dword ptr [rbx+8], 1
mov qword ptr [rbx], 0
test r14, r14
jle short loc_D177B
add r14, r15
lea r13, [rbp+var_30]
loc_D172B:
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r13
mov rdx, r15
mov rcx, r14
call qword ptr [rax+28h]
test eax, eax
jle short loc_D1756
cmp [rbp+var_30], 80h
jb short loc_D176E
or byte ptr [rbx+8], 2
jmp short loc_D176E
loc_D1756:
jz short loc_D1765
or byte ptr [rbx+8], 2
cmp eax, 0FFFFFF9Ch
jb short loc_D177B
neg eax
jmp short loc_D176E
loc_D1765:
or byte ptr [rbx+8], 2
mov eax, 1
loc_D176E:
mov eax, eax
add r15, rax
inc qword ptr [rbx]
cmp r15, r14
jb short loc_D172B
loc_D177B:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_string_metadata_get(long long a1, long long a2, char *a3, long long a4)
{
long long result; // rax
char *v5; // r15
unsigned long long v6; // r14
unsigned long long v7[6]; // [rsp+0h] [rbp-30h] BYREF
v7[0] = result;
v5 = a3;
if ( *(_DWORD *)(a2 + 156) != 1 || (*(_BYTE *)(a2 + 13) & 0x20) != 0 )
{
*(_DWORD *)(a1 + 8) = 1;
*(_QWORD *)a1 = 0LL;
if ( a4 > 0 )
{
v6 = (unsigned long long)&a3[a4];
do
{
result = (*(long long ( **)(long long, unsigned long long *, char *, unsigned long long))(*(_QWORD *)(a2 + 184)
+ 40LL))(
a2,
v7,
v5,
v6);
if ( (int)result <= 0 )
{
if ( (_DWORD)result )
{
*(_BYTE *)(a1 + 8) |= 2u;
if ( (unsigned int)result < 0xFFFFFF9C )
return result;
LODWORD(result) = -(int)result;
}
else
{
*(_BYTE *)(a1 + 8) |= 2u;
LODWORD(result) = 1;
}
}
else if ( v7[0] >= 0x80 )
{
*(_BYTE *)(a1 + 8) |= 2u;
}
result = (unsigned int)result;
v5 += (unsigned int)result;
++*(_QWORD *)a1;
}
while ( (unsigned long long)v5 < v6 );
}
}
else
{
*(_QWORD *)a1 = a4;
result = 3LL;
if ( !a4 || (*(_DWORD *)(a2 + 12) & 0x2000) == 0 )
{
if ( a4 <= 0 )
{
LABEL_8:
result = 1LL;
}
else
{
while ( *v5 >= 0 )
{
if ( ++v5 >= &a3[a4] )
goto LABEL_8;
}
}
}
*(_DWORD *)(a1 + 8) = result;
}
return result;
}
| my_string_metadata_get:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
CMP dword ptr [RSI + 0x9c],0x1
JNZ 0x001d1711
TEST byte ptr [R12 + 0xd],0x20
JNZ 0x001d1711
MOV qword ptr [RBX],R14
MOV EAX,0x3
TEST R14,R14
JZ 0x001d16f1
MOV ECX,0x2000
AND ECX,dword ptr [R12 + 0xc]
JNZ 0x001d170c
LAB_001d16f1:
TEST R14,R14
JLE 0x001d1707
ADD R14,R15
LAB_001d16f9:
CMP byte ptr [R15],0x0
JS 0x001d170c
INC R15
CMP R15,R14
JC 0x001d16f9
LAB_001d1707:
MOV EAX,0x1
LAB_001d170c:
MOV dword ptr [RBX + 0x8],EAX
JMP 0x001d177b
LAB_001d1711:
MOV dword ptr [RBX + 0x8],0x1
MOV qword ptr [RBX],0x0
TEST R14,R14
JLE 0x001d177b
ADD R14,R15
LEA R13,[RBP + -0x30]
LAB_001d172b:
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R13
MOV RDX,R15
MOV RCX,R14
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x001d1756
CMP qword ptr [RBP + -0x30],0x80
JC 0x001d176e
OR byte ptr [RBX + 0x8],0x2
JMP 0x001d176e
LAB_001d1756:
JZ 0x001d1765
OR byte ptr [RBX + 0x8],0x2
CMP EAX,-0x64
JC 0x001d177b
NEG EAX
JMP 0x001d176e
LAB_001d1765:
OR byte ptr [RBX + 0x8],0x2
MOV EAX,0x1
LAB_001d176e:
MOV EAX,EAX
ADD R15,RAX
INC qword ptr [RBX]
CMP R15,R14
JC 0x001d172b
LAB_001d177b:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void my_string_metadata_get(long *param_1,long param_2,char *param_3,long param_4)
{
int4 uVar1;
uint uVar2;
ulong in_RAX;
char *pcVar3;
ulong local_38;
if ((*(int *)(param_2 + 0x9c) == 1) && ((*(byte *)(param_2 + 0xd) & 0x20) == 0)) {
*param_1 = param_4;
uVar1 = 3;
if ((param_4 == 0) || ((*(uint *)(param_2 + 0xc) & 0x2000) == 0)) {
if (0 < param_4) {
pcVar3 = param_3 + param_4;
do {
if (*param_3 < '\0') goto LAB_001d170c;
param_3 = param_3 + 1;
} while (param_3 < pcVar3);
}
uVar1 = 1;
}
LAB_001d170c:
*(int4 *)(param_1 + 1) = uVar1;
}
else {
*(int4 *)(param_1 + 1) = 1;
*param_1 = 0;
if (0 < param_4) {
pcVar3 = param_3 + param_4;
local_38 = in_RAX;
do {
uVar2 = (**(code **)(*(long *)(param_2 + 0xb8) + 0x28))(param_2,&local_38,param_3,pcVar3);
if ((int)uVar2 < 1) {
if (uVar2 == 0) {
*(byte *)(param_1 + 1) = *(byte *)(param_1 + 1) | 2;
uVar2 = 1;
}
else {
*(byte *)(param_1 + 1) = *(byte *)(param_1 + 1) | 2;
if (uVar2 < 0xffffff9c) {
return;
}
uVar2 = -uVar2;
}
}
else if (0x7f < local_38) {
*(byte *)(param_1 + 1) = *(byte *)(param_1 + 1) | 2;
}
param_3 = param_3 + uVar2;
*param_1 = *param_1 + 1;
} while (param_3 < pcVar3);
}
}
return;
}
| |
32,634 | inline_mysql_mutex_init | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_mutex_init(
#ifdef HAVE_PSI_MUTEX_INTERFACE
PSI_mutex_key key,
#endif
mysql_mutex_t *that,
const pthread_mutexattr_t *attr
#ifdef SAFE_MUTEX
, const char *src_name, const char *src_file, uint src_line
#endif
)
{
#ifdef HAVE_PSI_MUTEX_INTERFACE
that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex);
#else
that->m_psi= NULL;
#endif
#ifdef COROUTINE_ENABLED
that->l.data= that;
that->l.prev= that->l.next= NULL;
#endif
#ifdef SAFE_MUTEX
return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line);
#else
return pthread_mutex_init(&that->m_mutex, attr);
#endif
} | O0 | c | inline_mysql_mutex_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x213306(%rip), %rax # 0x2cb2a0
movq (%rax), %rax
movq 0x40(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2a340
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| inline_mysql_mutex_init_6:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+40h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+40h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_10]
mov [rax+38h], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+30h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+28h], 0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_mutex_init
add rsp, 20h
pop rbp
retn
| long long inline_mysql_mutex_init_6(unsigned int a1, _QWORD *a2, long long a3)
{
a2[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(a1, a2);
a2[7] = a2;
a2[6] = 0LL;
a2[5] = 0LL;
return pthread_mutex_init(a2, a3);
}
| inline_mysql_mutex_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x3cb2a0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x40]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x28],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0012a340
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_mutex_init
(int4 param_1,pthread_mutex_t *param_2,pthread_mutexattr_t *param_3)
{
int8 uVar1;
uVar1 = (**(code **)(PSI_server + 0x40))(param_1,param_2);
*(int8 *)((long)param_2 + 0x40) = uVar1;
*(pthread_mutex_t **)((long)param_2 + 0x38) = param_2;
*(int8 *)((long)param_2 + 0x30) = 0;
param_2[1].__align = 0;
pthread_mutex_init(param_2,param_3);
return;
}
| |
32,635 | 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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t) | monkey531[P]llama/common/json.hpp | json_value(value_t t)
{
switch (t)
{
case value_t::object:
{
object = create<object_t>();
break;
}
case value_t::array:
{
array = create<array_t>();
break;
}
case value_t::string:
{
string = create<string_t>("");
break;
}
case value_t::binary:
{
binary = create<binary_t>();
break;
}
case value_t::boolean:
{
boolean = static_cast<boolean_t>(false);
break;
}
case value_t::number_integer:
{
number_integer = static_cast<number_integer_t>(0);
break;
}
case value_t::number_unsigned:
{
number_unsigned = static_cast<number_unsigned_t>(0);
break;
}
case value_t::number_float:
{
number_float = static_cast<number_float_t>(0.0);
break;
}
case value_t::null:
{
object = nullptr; // silence warning, see #821
break;
}
case value_t::discarded:
default:
{
object = nullptr; // silence warning, see #821
if (JSON_HEDLEY_UNLIKELY(t == value_t::null))
{
JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3", nullptr)); // LCOV_EXCL_LINE
}
break;
}
}
} | O0 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t):
subq $0x68, %rsp
movb %sil, %al
movq %rdi, 0x60(%rsp)
movb %al, 0x5f(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movzbl 0x5f(%rsp), %eax
movq %rax, 0x18(%rsp)
subq $0x9, %rax
ja 0xa13c1
movq 0x18(%rsp), %rax
leaq 0x1660ea(%rip), %rcx # 0x2073f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0xa14b0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0xa149b
callq 0xa15b0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0xa149b
leaq 0x16befd(%rip), %rdi # 0x20d241
callq 0xa16b0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0xa149b
callq 0xa17c0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0xa149b
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
jmp 0xa149b
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0xa149b
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0xa149b
movq 0x10(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
jmp 0xa149b
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0xa149b
jmp 0xa13c1
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
cmpb $0x0, 0x5f(%rsp)
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa13e2
jmp 0xa1499
movb $0x1, 0x23(%rsp)
movl $0x20, %edi
callq 0x5a6b0
movq %rax, (%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5b0f0
movq 0x8(%rsp), %rdx
leaq 0x16bf20(%rip), %rsi # 0x20d330
leaq 0x38(%rsp), %rdi
callq 0x63270
jmp 0xa141c
movq (%rsp), %rdi
xorl %eax, %eax
movl %eax, %ecx
movl $0x1f4, %esi # imm = 0x1F4
leaq 0x38(%rsp), %rdx
callq 0xa18c0
jmp 0xa1435
movq (%rsp), %rdi
movb $0x0, 0x23(%rsp)
leaq 0x1ff85b(%rip), %rsi # 0x2a0ca0
leaq 0x614(%rip), %rdx # 0xa1a60
callq 0x5ab30
jmp 0xa14aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0xa147b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x5b588
leaq 0x37(%rsp), %rdi
callq 0x5b560
testb $0x1, 0x23(%rsp)
jne 0xa148e
jmp 0xa1497
movq (%rsp), %rdi
callq 0x5af90
jmp 0xa14a0
jmp 0xa149b
addq $0x68, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x5abf0
nopw (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_valueC2ENS0_6detail7value_tE:
sub rsp, 68h
mov al, sil
mov qword ptr [rsp+68h+var_8], rdi; int
mov [rsp+68h+var_9], al
mov rax, qword ptr [rsp+68h+var_8]
mov qword ptr [rsp+68h+var_58], rax; int
movzx eax, [rsp+68h+var_9]
mov qword ptr [rsp+68h+var_50], rax; char
sub rax, 9; switch 10 cases
ja def_A1311; jumptable 00000000000A1311 default case
mov rax, qword ptr [rsp+68h+var_50]
lea rcx, jpt_A1311
movsxd rax, ds:(jpt_A1311 - 2073F4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_A1313:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; jumptable 00000000000A1311 case 1
mov rcx, rax
mov rax, qword ptr [rsp+68h+var_58]
mov [rax], rcx
jmp loc_A149B
loc_A1328:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; jumptable 00000000000A1311 case 2
mov rcx, rax
mov rax, qword ptr [rsp+68h+var_58]
mov [rax], rcx
jmp loc_A149B
loc_A133D:
lea rdi, aExampleSpecifi+27h; jumptable 00000000000A1311 case 3
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRA1_KcEEEPT_DpOT0_; 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>::create<std::string,char const(&)[1]>(char const(&)[1] &&)
mov rcx, rax
mov rax, qword ptr [rsp+68h+var_58]
mov [rax], rcx
jmp loc_A149B
loc_A1359:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJEEEPT_DpOT0_; jumptable 00000000000A1311 case 8
mov rcx, rax
mov rax, qword ptr [rsp+68h+var_58]
mov [rax], rcx
jmp loc_A149B
loc_A136E:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 00000000000A1311 case 4
mov byte ptr [rax], 0
jmp loc_A149B
loc_A137B:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 00000000000A1311 case 5
mov qword ptr [rax], 0
jmp loc_A149B
loc_A138C:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 00000000000A1311 case 6
mov qword ptr [rax], 0
jmp loc_A149B
loc_A139D:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 00000000000A1311 case 7
xorps xmm0, xmm0
movsd qword ptr [rax], xmm0
jmp loc_A149B
loc_A13AE:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 00000000000A1311 case 0
mov qword ptr [rax], 0
jmp loc_A149B
loc_A13BF:
jmp short $+2; jumptable 00000000000A1311 case 9
def_A1311:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 00000000000A1311 default case
mov qword ptr [rax], 0
cmp [rsp+68h+var_9], 0
setz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_A13E2
jmp loc_A1499
loc_A13E2:
mov [rsp+68h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+68h+var_68], rax; int
lea rdi, [rsp+68h+var_31]
mov qword ptr [rsp+68h+var_60], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+68h+var_60]
lea rsi, a961c151d2e87f2; "961c151d2e87f2686a955a9be24d316f1362bf2"...
lea rdi, [rsp+68h+var_31+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_A141C:
mov rdi, [rsp+68h+var_68]; int
xor eax, eax
mov ecx, eax
mov esi, 1F4h
lea rdx, [rsp+68h+var_31+1]
call _ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
jmp short $+2
loc_A1435:
mov rdi, [rsp+68h+var_68]; void *
mov [rsp+68h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail11other_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail11other_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_A14AA
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
jmp short loc_A147B
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A147B:
lea rdi, [rsp+arg_2F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_1B], 1
jnz short loc_A148E
jmp short loc_A1497
loc_A148E:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_A1497:
jmp short loc_A14A0
loc_A1499:
jmp short $+2
loc_A149B:
add rsp, 68h
retn
loc_A14A0:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
loc_A14AA:
nop word ptr [rax+rax+00h]
| json_value:
SUB RSP,0x68
MOV AL,SIL
MOV qword ptr [RSP + 0x60],RDI
MOV byte ptr [RSP + 0x5f],AL
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x10],RAX
MOVZX EAX,byte ptr [RSP + 0x5f]
MOV qword ptr [RSP + 0x18],RAX
SUB RAX,0x9
JA 0x001a13c1
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[0x3073f4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
CALL 0x001a14b0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x001a149b
caseD_2:
CALL 0x001a15b0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x001a149b
caseD_3:
LEA RDI,[0x30d241]
CALL 0x001a16b0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x001a149b
caseD_8:
CALL 0x001a17c0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x001a149b
caseD_4:
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX],0x0
JMP 0x001a149b
caseD_5:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x001a149b
caseD_6:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x001a149b
caseD_7:
MOV RAX,qword ptr [RSP + 0x10]
XORPS XMM0,XMM0
MOVSD qword ptr [RAX],XMM0
JMP 0x001a149b
caseD_0:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x001a149b
caseD_9:
JMP 0x001a13c1
default:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
CMP byte ptr [RSP + 0x5f],0x0
SETZ AL
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x001a13e2
JMP 0x001a1499
LAB_001a13e2:
MOV byte ptr [RSP + 0x23],0x1
MOV EDI,0x20
CALL 0x0015a6b0
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x37]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0015b0f0
MOV RDX,qword ptr [RSP + 0x8]
LAB_001a1409:
LEA RSI,[0x30d330]
LEA RDI,[RSP + 0x38]
CALL 0x00163270
JMP 0x001a141c
LAB_001a141c:
MOV RDI,qword ptr [RSP]
XOR EAX,EAX
MOV ECX,EAX
MOV ESI,0x1f4
LEA RDX,[RSP + 0x38]
CALL 0x001a18c0
JMP 0x001a1435
LAB_001a1435:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x23],0x0
LEA RSI,[0x3a0ca0]
LEA RDX,[0x1a1a60]
CALL 0x0015ab30
LAB_001a1499:
JMP 0x001a149b
LAB_001a149b:
ADD RSP,0x68
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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t) */
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>
::json_value::json_value(json_value *this,char param_2)
{
ordered_map *poVar1;
vector *pvVar2;
string *psVar3;
byte_container_with_subtype *pbVar4;
int8 uVar5;
allocator local_31;
string local_30 [39];
char local_9;
json_value *local_8;
local_9 = param_2;
local_8 = this;
switch(param_2) {
case '\0':
*(int8 *)this = 0;
break;
case '\x01':
poVar1 = create<nlohmann::json_abi_v3_11_3::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>>>>>
();
*(ordered_map **)this = poVar1;
break;
case '\x02':
pvVar2 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
();
*(vector **)this = pvVar2;
break;
case '\x03':
psVar3 = create<std::__cxx11::string,char_const(&)[1]>("");
*(string **)this = psVar3;
break;
case '\x04':
*this = (json_value)0x0;
break;
case '\x05':
*(int8 *)this = 0;
break;
case '\x06':
*(int8 *)this = 0;
break;
case '\a':
*(int8 *)this = 0;
break;
case '\b':
pbVar4 = create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>>
();
*(byte_container_with_subtype **)this = pbVar4;
break;
case '\t':
default:
*(int8 *)this = 0;
if (param_2 == '\0') {
uVar5 = __cxa_allocate_exception(0x20);
std::allocator<char>::allocator();
/* try { // try from 001a1409 to 001a1419 has its CatchHandler @ 001a1453 */
std::__cxx11::string::string<std::allocator<char>>
(local_30,"961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3",&local_31);
/* try { // try from 001a141c to 001a1450 has its CatchHandler @ 001a1463 */
_ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(uVar5,500,local_30,0);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar5,&detail::other_error::typeinfo,detail::other_error::~other_error);
}
}
return;
}
| ||
32,636 | graph_init_tensor | 7CodeWizard[P]stablediffusion/ggml/src/ggml-backend.c | static void graph_init_tensor(struct ggml_hash_set hash_set, struct ggml_tensor ** node_copies, bool * node_init, struct ggml_tensor * src) {
size_t id = ggml_hash_find(hash_set, src);
if (node_init[id]) {
return;
}
node_init[id] = true;
struct ggml_tensor * dst = node_copies[id];
if (dst->view_src != NULL) {
ggml_backend_view_init(dst->view_src->buffer, dst);
}
else {
ggml_backend_tensor_copy(src, dst);
}
// init src
for (int i = 0; i < GGML_MAX_SRC; i++) {
struct ggml_tensor * s = src->src[i];
if (s == NULL) {
break;
}
graph_init_tensor(hash_set, node_copies, node_init, s);
}
} | O0 | c | graph_init_tensor:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq 0x20(%rsp), %rdx
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x1291b0
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq 0x18(%rsp), %rcx
testb $0x1, (%rax,%rcx)
je 0x16a34b
jmp 0x16a3fe
movq 0x28(%rsp), %rax
movq 0x18(%rsp), %rcx
movb $0x1, (%rax,%rcx)
movq 0x30(%rsp), %rax
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x108(%rax)
je 0x16a397
movq 0x10(%rsp), %rax
movq 0x108(%rax), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x1698c0
jmp 0x16a3a6
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x167280
movl $0x0, 0xc(%rsp)
cmpl $0xa, 0xc(%rsp)
jge 0x16a3fe
movq 0x20(%rsp), %rax
movslq 0xc(%rsp), %rcx
movq 0xa0(%rax,%rcx,8), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x16a3d4
jmp 0x16a3fe
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq (%rsp), %r8
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x16a300
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x16a3ae
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
| graph_init_tensor:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_8], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_20], rcx
mov [rsp+48h+var_28], r8
mov rdx, [rsp+48h+var_28]
mov rdi, [rsp+48h+var_10]
mov rsi, [rsp+48h+var_8]
call ggml_hash_find
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_20]
mov rcx, [rsp+48h+var_30]
test byte ptr [rax+rcx], 1
jz short loc_16A34B
jmp loc_16A3FE
loc_16A34B:
mov rax, [rsp+48h+var_20]
mov rcx, [rsp+48h+var_30]
mov byte ptr [rax+rcx], 1
mov rax, [rsp+48h+var_18]
mov rcx, [rsp+48h+var_30]
mov rax, [rax+rcx*8]
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_38]
cmp qword ptr [rax+108h], 0
jz short loc_16A397
mov rax, [rsp+48h+var_38]
mov rax, [rax+108h]
mov rdi, [rax+8]
mov rsi, [rsp+48h+var_38]
call ggml_backend_view_init
jmp short loc_16A3A6
loc_16A397:
mov rdi, [rsp+48h+var_28]
mov rsi, [rsp+48h+var_38]
call ggml_backend_tensor_copy
loc_16A3A6:
mov [rsp+48h+var_3C], 0
loc_16A3AE:
cmp [rsp+48h+var_3C], 0Ah
jge short loc_16A3FE
mov rax, [rsp+48h+var_28]
movsxd rcx, [rsp+48h+var_3C]
mov rax, [rax+rcx*8+0A0h]
mov [rsp+48h+var_48], rax
cmp [rsp+48h+var_48], 0
jnz short loc_16A3D4
jmp short loc_16A3FE
loc_16A3D4:
mov rdx, [rsp+48h+var_18]
mov rcx, [rsp+48h+var_20]
mov r8, [rsp+48h+var_48]
mov rdi, [rsp+48h+var_10]
mov rsi, [rsp+48h+var_8]
call graph_init_tensor
mov eax, [rsp+48h+var_3C]
add eax, 1
mov [rsp+48h+var_3C], eax
jmp short loc_16A3AE
loc_16A3FE:
add rsp, 48h
retn
| long long graph_init_tensor(unsigned long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long result; // rax
int i; // [rsp+Ch] [rbp-3Ch]
long long v7; // [rsp+10h] [rbp-38h]
long long v8; // [rsp+18h] [rbp-30h]
v8 = ggml_hash_find(a1, a2, a5);
result = a4;
if ( (*(_BYTE *)(a4 + v8) & 1) == 0 )
{
*(_BYTE *)(a4 + v8) = 1;
v7 = *(_QWORD *)(a3 + 8 * v8);
if ( *(_QWORD *)(v7 + 264) )
result = ggml_backend_view_init(*(_QWORD *)(*(_QWORD *)(v7 + 264) + 8LL), v7);
else
result = ggml_backend_tensor_copy(a5, v7);
for ( i = 0; i < 10; ++i )
{
result = *(_QWORD *)(a5 + 8LL * i + 160);
if ( !result )
break;
graph_init_tensor(a1, a2, a3, a4, result);
result = (unsigned int)(i + 1);
}
}
return result;
}
| |||
32,637 | graph_init_tensor | 7CodeWizard[P]stablediffusion/ggml/src/ggml-backend.c | static void graph_init_tensor(struct ggml_hash_set hash_set, struct ggml_tensor ** node_copies, bool * node_init, struct ggml_tensor * src) {
size_t id = ggml_hash_find(hash_set, src);
if (node_init[id]) {
return;
}
node_init[id] = true;
struct ggml_tensor * dst = node_copies[id];
if (dst->view_src != NULL) {
ggml_backend_view_init(dst->view_src->buffer, dst);
}
else {
ggml_backend_tensor_copy(src, dst);
}
// init src
for (int i = 0; i < GGML_MAX_SRC; i++) {
struct ggml_tensor * s = src->src[i];
if (s == NULL) {
break;
}
graph_init_tensor(hash_set, node_copies, node_init, s);
}
} | O1 | c | graph_init_tensor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %r8, %rdx
callq 0x95f88
cmpb $0x0, (%r14,%rax)
jne 0xb5bcb
movb $0x1, (%r14,%rax)
movq (%r15,%rax,8), %rsi
movq 0x108(%rsi), %rax
testq %rax, %rax
je 0xb5b9a
movq 0x8(%rax), %rdi
callq 0xb56e1
jmp 0xb5ba2
movq %rbx, %rdi
callq 0xb40dd
xorl %ebp, %ebp
movq 0xa0(%rbx,%rbp,8), %r8
testq %r8, %r8
je 0xb5bcb
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0xb5b51
incq %rbp
cmpq $0xa, %rbp
jne 0xb5ba4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| graph_init_tensor:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov r13, rdi
mov rdx, r8
call ggml_hash_find
cmp byte ptr [r14+rax], 0
jnz short loc_B5BCB
mov byte ptr [r14+rax], 1
mov rsi, [r15+rax*8]
mov rax, [rsi+108h]
test rax, rax
jz short loc_B5B9A
mov rdi, [rax+8]
call ggml_backend_view_init
jmp short loc_B5BA2
loc_B5B9A:
mov rdi, rbx
call ggml_backend_tensor_copy
loc_B5BA2:
xor ebp, ebp
loc_B5BA4:
mov r8, [rbx+rbp*8+0A0h]
test r8, r8
jz short loc_B5BCB
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, r14
call graph_init_tensor
inc rbp
cmp rbp, 0Ah
jnz short loc_B5BA4
loc_B5BCB:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long graph_init_tensor(
unsigned long long a1,
long long a2,
long long a3,
long long a4,
unsigned long long a5,
double a6,
__m128 a7)
{
long long result; // rax
long long v12; // rsi
long long v13; // rax
long long i; // rbp
long long v15; // r8
result = ggml_hash_find(a1, a2, a5);
if ( !*(_BYTE *)(a4 + result) )
{
*(_BYTE *)(a4 + result) = 1;
v12 = *(_QWORD *)(a3 + 8 * result);
v13 = *(_QWORD *)(v12 + 264);
if ( v13 )
result = ggml_backend_view_init(*(_QWORD *)(v13 + 8), v12);
else
result = ggml_backend_tensor_copy(a5, v12, a6, a7);
for ( i = 0LL; i != 10; ++i )
{
v15 = *(_QWORD *)(a5 + 8 * i + 160);
if ( !v15 )
break;
result = graph_init_tensor(a1, a2, a3, a4, v15);
}
}
return result;
}
| |||
32,638 | graph_init_tensor | 7CodeWizard[P]stablediffusion/ggml/src/ggml-backend.c | static void graph_init_tensor(struct ggml_hash_set hash_set, struct ggml_tensor ** node_copies, bool * node_init, struct ggml_tensor * src) {
size_t id = ggml_hash_find(hash_set, src);
if (node_init[id]) {
return;
}
node_init[id] = true;
struct ggml_tensor * dst = node_copies[id];
if (dst->view_src != NULL) {
ggml_backend_view_init(dst->view_src->buffer, dst);
}
else {
ggml_backend_tensor_copy(src, dst);
}
// init src
for (int i = 0; i < GGML_MAX_SRC; i++) {
struct ggml_tensor * s = src->src[i];
if (s == NULL) {
break;
}
graph_init_tensor(hash_set, node_copies, node_init, s);
}
} | O2 | c | graph_init_tensor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %r8, %rdx
callq 0x6f96c
cmpb $0x0, (%r14,%rax)
je 0x91e00
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, (%r14,%rax)
movq (%r15,%rax,8), %rsi
movq 0x108(%rsi), %rax
testq %rax, %rax
je 0x91e20
movq 0x8(%rax), %rdi
callq 0x9174f
jmp 0x91e28
movq %rbx, %rdi
callq 0x9012f
xorl %ebp, %ebp
cmpq $0xa, %rbp
je 0x91df1
movq 0xa0(%rbx,%rbp,8), %r8
testq %r8, %r8
je 0x91df1
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x91dc8
incq %rbp
jmp 0x91e2a
| graph_init_tensor:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov r13, rdi
mov rdx, r8
call ggml_hash_find
cmp byte ptr [r14+rax], 0
jz short loc_91E00
loc_91DF1:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_91E00:
mov byte ptr [r14+rax], 1
mov rsi, [r15+rax*8]
mov rax, [rsi+108h]
test rax, rax
jz short loc_91E20
mov rdi, [rax+8]
call ggml_backend_view_init
jmp short loc_91E28
loc_91E20:
mov rdi, rbx
call ggml_backend_tensor_copy
loc_91E28:
xor ebp, ebp
loc_91E2A:
cmp rbp, 0Ah
jz short loc_91DF1
mov r8, [rbx+rbp*8+0A0h]
test r8, r8
jz short loc_91DF1
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, r14
call graph_init_tensor
inc rbp
jmp short loc_91E2A
| long long graph_init_tensor(unsigned long long a1, long long a2, long long a3, long long a4, unsigned long long a5)
{
long long result; // rax
long long v10; // rsi
long long v11; // rax
long long i; // rbp
long long v13; // r8
result = ggml_hash_find(a1, a2, a5);
if ( !*(_BYTE *)(a4 + result) )
{
*(_BYTE *)(a4 + result) = 1;
v10 = *(_QWORD *)(a3 + 8 * result);
v11 = *(_QWORD *)(v10 + 264);
if ( v11 )
result = ggml_backend_view_init(*(_QWORD *)(v11 + 8), v10);
else
result = ggml_backend_tensor_copy(a5, v10);
for ( i = 0LL; i != 10; ++i )
{
v13 = *(_QWORD *)(a5 + 8 * i + 160);
if ( !v13 )
break;
result = graph_init_tensor(a1, a2, a3, a4, v13);
}
}
return result;
}
| graph_init_tensor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
MOV RDX,R8
CALL 0x0016f96c
CMP byte ptr [R14 + RAX*0x1],0x0
JZ 0x00191e00
LAB_00191df1:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00191e00:
MOV byte ptr [R14 + RAX*0x1],0x1
MOV RSI,qword ptr [R15 + RAX*0x8]
MOV RAX,qword ptr [RSI + 0x108]
TEST RAX,RAX
JZ 0x00191e20
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x0019174f
JMP 0x00191e28
LAB_00191e20:
MOV RDI,RBX
CALL 0x0019012f
LAB_00191e28:
XOR EBP,EBP
LAB_00191e2a:
CMP RBP,0xa
JZ 0x00191df1
MOV R8,qword ptr [RBX + RBP*0x8 + 0xa0]
TEST R8,R8
JZ 0x00191df1
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
CALL 0x00191dc8
INC RBP
JMP 0x00191e2a
|
void graph_init_tensor(int8 param_1,int8 param_2,long param_3,long param_4,long param_5)
{
long lVar1;
lVar1 = ggml_hash_find(param_1,param_2,param_5);
if (*(char *)(param_4 + lVar1) == '\0') {
*(int1 *)(param_4 + lVar1) = 1;
lVar1 = *(long *)(*(long *)(param_3 + lVar1 * 8) + 0x108);
if (lVar1 == 0) {
ggml_backend_tensor_copy(param_5);
}
else {
ggml_backend_view_init(*(int8 *)(lVar1 + 8));
}
for (lVar1 = 0; (lVar1 != 10 && (*(long *)(param_5 + 0xa0 + lVar1 * 8) != 0)); lVar1 = lVar1 + 1
) {
graph_init_tensor(param_1,param_2,param_3,param_4);
}
}
return;
}
| |
32,639 | graph_init_tensor | 7CodeWizard[P]stablediffusion/ggml/src/ggml-backend.c | static void graph_init_tensor(struct ggml_hash_set hash_set, struct ggml_tensor ** node_copies, bool * node_init, struct ggml_tensor * src) {
size_t id = ggml_hash_find(hash_set, src);
if (node_init[id]) {
return;
}
node_init[id] = true;
struct ggml_tensor * dst = node_copies[id];
if (dst->view_src != NULL) {
ggml_backend_view_init(dst->view_src->buffer, dst);
}
else {
ggml_backend_tensor_copy(src, dst);
}
// init src
for (int i = 0; i < GGML_MAX_SRC; i++) {
struct ggml_tensor * s = src->src[i];
if (s == NULL) {
break;
}
graph_init_tensor(hash_set, node_copies, node_init, s);
}
} | O3 | c | graph_init_tensor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %r8, %rdx
callq 0x94e71
cmpb $0x0, (%r14,%rax)
jne 0xb4744
movb $0x1, (%r14,%rax)
movq (%r15,%rax,8), %rsi
movq 0x108(%rsi), %rax
testq %rax, %rax
je 0xb4713
movq 0x8(%rax), %rdi
callq 0xb425a
jmp 0xb471b
movq %rbx, %rdi
callq 0xb2cc5
xorl %ebp, %ebp
movq 0xa0(%rbx,%rbp,8), %r8
testq %r8, %r8
je 0xb4744
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0xb46ca
incq %rbp
cmpq $0xa, %rbp
jne 0xb471d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| graph_init_tensor:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov r13, rdi
mov rdx, r8
call ggml_hash_find
cmp byte ptr [r14+rax], 0
jnz short loc_B4744
mov byte ptr [r14+rax], 1
mov rsi, [r15+rax*8]
mov rax, [rsi+108h]
test rax, rax
jz short loc_B4713
mov rdi, [rax+8]
call ggml_backend_view_init
jmp short loc_B471B
loc_B4713:
mov rdi, rbx
call ggml_backend_tensor_copy
loc_B471B:
xor ebp, ebp
loc_B471D:
mov r8, [rbx+rbp*8+0A0h]
test r8, r8
jz short loc_B4744
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, r14
call graph_init_tensor
inc rbp
cmp rbp, 0Ah
jnz short loc_B471D
loc_B4744:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long graph_init_tensor(
unsigned long long a1,
long long a2,
long long a3,
long long a4,
unsigned long long a5,
double a6,
__m128 a7)
{
long long result; // rax
long long v12; // rsi
long long v13; // rax
long long i; // rbp
long long v15; // r8
result = ggml_hash_find(a1, a2, a5);
if ( !*(_BYTE *)(a4 + result) )
{
*(_BYTE *)(a4 + result) = 1;
v12 = *(_QWORD *)(a3 + 8 * result);
v13 = *(_QWORD *)(v12 + 264);
if ( v13 )
result = ggml_backend_view_init(*(_QWORD *)(v13 + 8), v12);
else
result = ggml_backend_tensor_copy(a5, v12, a6, a7);
for ( i = 0LL; i != 10; ++i )
{
v15 = *(_QWORD *)(a5 + 8 * i + 160);
if ( !v15 )
break;
result = graph_init_tensor(a1, a2, a3, a4, v15);
}
}
return result;
}
| |||
32,640 | r3d_shader_load_screen_scene | r3d/src/r3d_state.c | void r3d_shader_load_screen_scene(void)
{
R3D.shader.screen.scene.id = rlLoadShaderCode(VS_COMMON_SCREEN, FS_SCREEN_SCENE);
r3d_shader_screen_scene_t* shader = &R3D.shader.screen.scene;
r3d_shader_get_location(screen.scene, uTexAlbedo);
r3d_shader_get_location(screen.scene, uTexEmission);
r3d_shader_get_location(screen.scene, uTexDiffuse);
r3d_shader_get_location(screen.scene, uTexSpecular);
r3d_shader_get_location(screen.scene, uBloomHdrThreshold);
r3d_shader_enable(screen.scene);
r3d_shader_set_sampler2D_slot(screen.scene, uTexAlbedo, 0);
r3d_shader_set_sampler2D_slot(screen.scene, uTexEmission, 1);
r3d_shader_set_sampler2D_slot(screen.scene, uTexDiffuse, 2);
r3d_shader_set_sampler2D_slot(screen.scene, uTexSpecular, 3);
r3d_shader_disable();
} | O3 | c | r3d_shader_load_screen_scene:
pushq %rbp
movq %rsp, %rbp
leaq 0x55fed(%rip), %rdi # 0x118db0
leaq 0x5ded6(%rip), %rsi # 0x120ca0
callq 0x1e5ad
movl %eax, 0xee90b(%rip) # 0x1b16e0
leaq 0x4e0fc(%rip), %rsi # 0x110ed8
movl %eax, %edi
callq 0x1ea06
movl %eax, 0xee8ff(%rip) # 0x1b16e8
movl 0xee8f1(%rip), %edi # 0x1b16e0
leaq 0x4e0f8(%rip), %rsi # 0x110eee
callq 0x1ea06
movl %eax, 0xee8ef(%rip) # 0x1b16f0
movl 0xee8d9(%rip), %edi # 0x1b16e0
leaq 0x4e561(%rip), %rsi # 0x11136f
callq 0x1ea06
movl %eax, 0xee8df(%rip) # 0x1b16f8
movl 0xee8c1(%rip), %edi # 0x1b16e0
leaq 0x4e555(%rip), %rsi # 0x11137b
callq 0x1ea06
movl %eax, 0xee8cf(%rip) # 0x1b1700
movl 0xee8a9(%rip), %edi # 0x1b16e0
leaq 0x4e1c7(%rip), %rsi # 0x111005
callq 0x1ea06
movl %eax, 0xee8bf(%rip) # 0x1b1708
movl 0xee891(%rip), %edi # 0x1b16e0
callq 0x1be32
cmpl $0x0, 0xee889(%rip) # 0x1b16e4
je 0xc2e83
movl $0x0, 0xee87d(%rip) # 0x1b16e4
leaq 0xee876(%rip), %rsi # 0x1b16e4
movl 0xee874(%rip), %edi # 0x1b16e8
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea22
cmpl $0x1, 0xee862(%rip) # 0x1b16ec
je 0xc2eb2
movl $0x1, 0xee856(%rip) # 0x1b16ec
leaq 0xee84f(%rip), %rsi # 0x1b16ec
movl 0xee84d(%rip), %edi # 0x1b16f0
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea22
cmpl $0x2, 0xee83b(%rip) # 0x1b16f4
je 0xc2ee1
movl $0x2, 0xee82f(%rip) # 0x1b16f4
leaq 0xee828(%rip), %rsi # 0x1b16f4
movl 0xee826(%rip), %edi # 0x1b16f8
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea22
cmpl $0x3, 0xee814(%rip) # 0x1b16fc
je 0xc2f10
movl $0x3, 0xee808(%rip) # 0x1b16fc
leaq 0xee801(%rip), %rsi # 0x1b16fc
movl 0xee7ff(%rip), %edi # 0x1b1700
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea22
popq %rbp
jmp 0x1be3d
| r3d_shader_load_screen_scene:
push rbp
mov rbp, rsp
lea rdi, VS_COMMON_SCREEN; "#version 330 core\nconst vec2 a[3]=vec2"...
lea rsi, FS_SCREEN_SCENE; "#version 330 core\nnoperspective in vec"...
call rlLoadShaderCode
mov cs:dword_1B16E0, eax
lea rsi, aUtexalbedo; "uTexAlbedo"
mov edi, eax
call rlGetLocationUniform
mov cs:dword_1B16E8, eax
mov edi, cs:dword_1B16E0
lea rsi, aUtexemission; "uTexEmission"
call rlGetLocationUniform
mov cs:dword_1B16F0, eax
mov edi, cs:dword_1B16E0
lea rsi, aUtexdiffuse; "uTexDiffuse"
call rlGetLocationUniform
mov cs:dword_1B16F8, eax
mov edi, cs:dword_1B16E0
lea rsi, aUtexspecular; "uTexSpecular"
call rlGetLocationUniform
mov cs:dword_1B1700, eax
mov edi, cs:dword_1B16E0
lea rsi, aUbloomhdrthres; "uBloomHdrThreshold"
call rlGetLocationUniform
mov cs:dword_1B1708, eax
mov edi, cs:dword_1B16E0
call rlEnableShader
cmp cs:dword_1B16E4, 0
jz short loc_C2E83
mov cs:dword_1B16E4, 0
lea rsi, dword_1B16E4
mov edi, cs:dword_1B16E8
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C2E83:
cmp cs:dword_1B16EC, 1
jz short loc_C2EB2
mov cs:dword_1B16EC, 1
lea rsi, dword_1B16EC
mov edi, cs:dword_1B16F0
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C2EB2:
cmp cs:dword_1B16F4, 2
jz short loc_C2EE1
mov cs:dword_1B16F4, 2
lea rsi, dword_1B16F4
mov edi, cs:dword_1B16F8
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C2EE1:
cmp cs:dword_1B16FC, 3
jz short loc_C2F10
mov cs:dword_1B16FC, 3
lea rsi, dword_1B16FC
mov edi, cs:dword_1B1700
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C2F10:
pop rbp
jmp rlDisableShader
| long long r3d_shader_load_screen_scene()
{
int v0; // r8d
int v1; // r9d
dword_1B16E0 = rlLoadShaderCode(
(long long)"#version 330 core\n"
"const vec2 a[3]=vec2[](vec2(-1.0,-1.0),vec2(3.0,-1.0),vec2(-1.0,3.0));noperspective out vec2"
" vTexCoord;void main(){gl_Position=vec4(a[gl_VertexID],0.0,1.0);vTexCoord=(gl_Position.xy*0.5)+0.5;}",
(long long)"#version 330 core\n"
"noperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexEmission;"
"uniform sampler2D uTexDiffuse;uniform sampler2D uTexSpecular;uniform float uBloomHdrThreshol"
"d;layout(location=0)out vec3 b;layout(location=1)out vec3 a;float GetBrightness(vec3 e){retu"
"rn length(e);}void main(){vec3 c=texture(uTexAlbedo,vTexCoord).rgb;vec3 g=texture(uTexEmissi"
"on,vTexCoord).rgb;vec3 f=texture(uTexDiffuse,vTexCoord).rgb;vec3 i=texture(uTexSpecular,vTex"
"Coord).rgb;b=(c*f)+i+g;float d=GetBrightness(b);float h=step(uBloomHdrThreshold,d);a=b*h;}");
dword_1B16E8 = rlGetLocationUniform((unsigned int)dword_1B16E0, (long long)"uTexAlbedo");
dword_1B16F0 = rlGetLocationUniform((unsigned int)dword_1B16E0, (long long)"uTexEmission");
dword_1B16F8 = rlGetLocationUniform((unsigned int)dword_1B16E0, (long long)"uTexDiffuse");
dword_1B1700 = rlGetLocationUniform((unsigned int)dword_1B16E0, (long long)"uTexSpecular");
dword_1B1708 = rlGetLocationUniform((unsigned int)dword_1B16E0, (long long)"uBloomHdrThreshold");
rlEnableShader((unsigned int)dword_1B16E0);
if ( dword_1B16E4 )
{
dword_1B16E4 = 0;
rlSetUniform((unsigned int)dword_1B16E8, (long long)&dword_1B16E4, 4, 1u, v0, v1);
}
if ( dword_1B16EC != 1 )
{
dword_1B16EC = 1;
rlSetUniform((unsigned int)dword_1B16F0, (long long)&dword_1B16EC, 4, 1u, v0, v1);
}
if ( dword_1B16F4 != 2 )
{
dword_1B16F4 = 2;
rlSetUniform((unsigned int)dword_1B16F8, (long long)&dword_1B16F4, 4, 1u, v0, v1);
}
if ( dword_1B16FC != 3 )
{
dword_1B16FC = 3;
rlSetUniform((unsigned int)dword_1B1700, (long long)&dword_1B16FC, 4, 1u, v0, v1);
}
return rlDisableShader();
}
| r3d_shader_load_screen_scene:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x218db0]
LEA RSI,[0x220ca0]
CALL 0x0011e5ad
MOV dword ptr [0x002b16e0],EAX
LEA RSI,[0x210ed8]
MOV EDI,EAX
CALL 0x0011ea06
MOV dword ptr [0x002b16e8],EAX
MOV EDI,dword ptr [0x002b16e0]
LEA RSI,[0x210eee]
CALL 0x0011ea06
MOV dword ptr [0x002b16f0],EAX
MOV EDI,dword ptr [0x002b16e0]
LEA RSI,[0x21136f]
CALL 0x0011ea06
MOV dword ptr [0x002b16f8],EAX
MOV EDI,dword ptr [0x002b16e0]
LEA RSI,[0x21137b]
CALL 0x0011ea06
MOV dword ptr [0x002b1700],EAX
MOV EDI,dword ptr [0x002b16e0]
LEA RSI,[0x211005]
CALL 0x0011ea06
MOV dword ptr [0x002b1708],EAX
MOV EDI,dword ptr [0x002b16e0]
CALL 0x0011be32
CMP dword ptr [0x002b16e4],0x0
JZ 0x001c2e83
MOV dword ptr [0x002b16e4],0x0
LEA RSI,[0x2b16e4]
MOV EDI,dword ptr [0x002b16e8]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea22
LAB_001c2e83:
CMP dword ptr [0x002b16ec],0x1
JZ 0x001c2eb2
MOV dword ptr [0x002b16ec],0x1
LEA RSI,[0x2b16ec]
MOV EDI,dword ptr [0x002b16f0]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea22
LAB_001c2eb2:
CMP dword ptr [0x002b16f4],0x2
JZ 0x001c2ee1
MOV dword ptr [0x002b16f4],0x2
LEA RSI,[0x2b16f4]
MOV EDI,dword ptr [0x002b16f8]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea22
LAB_001c2ee1:
CMP dword ptr [0x002b16fc],0x3
JZ 0x001c2f10
MOV dword ptr [0x002b16fc],0x3
LEA RSI,[0x2b16fc]
MOV EDI,dword ptr [0x002b1700]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea22
LAB_001c2f10:
POP RBP
JMP 0x0011be3d
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void r3d_shader_load_screen_scene(void)
{
DAT_002b16e0 = rlLoadShaderCode("#version 330 core\nconst vec2 a[3]=vec2[](vec2(-1.0,-1.0),vec2(3.0,-1.0),vec2(-1.0,3.0));noperspective out vec2 vTexCoord;void main(){gl_Position=vec4(a[gl_VertexID],0.0,1.0);vTexCoord=(gl_Position.xy*0.5)+0.5;}"
,
"#version 330 core\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexEmission;uniform sampler2D uTexDiffuse;uniform sampler2D uTexSpecular;uniform float uBloomHdrThreshold;layout(location=0)out vec3 b;layout(location=1)out vec3 a;float GetBrightness(vec3 e){return length(e);}void main(){vec3 c=texture(uTexAlbedo,vTexCoord).rgb;vec3 g=texture(uTexEmission,vTexCoord).rgb;vec3 f=texture(uTexDiffuse,vTexCoord).rgb;vec3 i=texture(uTexSpecular,vTexCoord).rgb;b=(c*f)+i+g;float d=GetBrightness(b);float h=step(uBloomHdrThreshold,d);a=b*h;}"
);
_DAT_002b16e8 = rlGetLocationUniform(DAT_002b16e0,"uTexAlbedo");
_DAT_002b16f0 = rlGetLocationUniform(DAT_002b16e0,"uTexEmission");
_DAT_002b16f8 = rlGetLocationUniform(DAT_002b16e0,"uTexDiffuse");
_DAT_002b1700 = rlGetLocationUniform(DAT_002b16e0,"uTexSpecular");
_DAT_002b1708 = rlGetLocationUniform(DAT_002b16e0,"uBloomHdrThreshold");
rlEnableShader(DAT_002b16e0);
if (_DAT_002b16e4 != 0) {
_DAT_002b16e4 = 0;
rlSetUniform(_DAT_002b16e8,&DAT_002b16e4,4,1);
}
if (_DAT_002b16ec != 1) {
_DAT_002b16ec = 1;
rlSetUniform(_DAT_002b16f0,&DAT_002b16ec,4,1);
}
if (_DAT_002b16f4 != 2) {
_DAT_002b16f4 = 2;
rlSetUniform(_DAT_002b16f8,&DAT_002b16f4,4,1);
}
if (_DAT_002b16fc != 3) {
_DAT_002b16fc = 3;
rlSetUniform(_DAT_002b1700,&DAT_002b16fc,4,1);
}
rlDisableShader();
return;
}
| |
32,641 | stbi__load_gif_main_outofmem(stbi__gif*, unsigned char*, int**) | monkey531[P]llama/examples/llava/../../common/stb_image.h | static void *stbi__load_gif_main_outofmem(stbi__gif *g, stbi_uc *out, int **delays)
{
STBI_FREE(g->out);
STBI_FREE(g->history);
STBI_FREE(g->background);
if (out) STBI_FREE(out);
if (delays && *delays) STBI_FREE(*delays);
return stbi__errpuc("outofmem", "Out of memory");
} | O0 | c | stbi__load_gif_main_outofmem(stbi__gif*, unsigned char*, int**):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdx, (%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x613a0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x613a0
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x613a0
cmpq $0x0, 0x8(%rsp)
je 0xa2e2e
movq 0x8(%rsp), %rdi
callq 0x613a0
cmpq $0x0, (%rsp)
je 0xa2e4b
movq (%rsp), %rax
cmpq $0x0, (%rax)
je 0xa2e4b
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x613a0
leaq 0x1ad359(%rip), %rdi # 0x2501ab
callq 0x759c0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| _ZL28stbi__load_gif_main_outofmemP9stbi__gifPhPPi:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov [rsp+18h+var_18], rdx
mov rax, [rsp+18h+var_8]
mov rdi, [rax+8]
call _free
mov rax, [rsp+18h+var_8]
mov rdi, [rax+18h]
call _free
mov rax, [rsp+18h+var_8]
mov rdi, [rax+10h]
call _free
cmp [rsp+18h+var_10], 0
jz short loc_A2E2E
mov rdi, [rsp+18h+var_10]
call _free
loc_A2E2E:
cmp [rsp+18h+var_18], 0
jz short loc_A2E4B
mov rax, [rsp+18h+var_18]
cmp qword ptr [rax], 0
jz short loc_A2E4B
mov rax, [rsp+18h+var_18]
mov rdi, [rax]
call _free
loc_A2E4B:
lea rdi, aOutofmem; "outofmem"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
add rsp, 18h
retn
| long long stbi__load_gif_main_outofmem(_QWORD *a1, long long a2, _QWORD *a3)
{
free(a1[1]);
free(a1[3]);
free(a1[2]);
if ( a2 )
free(a2);
if ( a3 && *a3 )
free(*a3);
stbi__err("outofmem");
return 0LL;
}
| stbi__load_gif_main_outofmem:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001613a0
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x001613a0
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x001613a0
CMP qword ptr [RSP + 0x8],0x0
JZ 0x001a2e2e
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001613a0
LAB_001a2e2e:
CMP qword ptr [RSP],0x0
JZ 0x001a2e4b
MOV RAX,qword ptr [RSP]
CMP qword ptr [RAX],0x0
JZ 0x001a2e4b
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX]
CALL 0x001613a0
LAB_001a2e4b:
LEA RDI,[0x3501ab]
CALL 0x001759c0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
ADD RSP,0x18
RET
|
/* stbi__load_gif_main_outofmem(stbi__gif*, unsigned char*, int**) */
int8 stbi__load_gif_main_outofmem(stbi__gif *param_1,uchar *param_2,int **param_3)
{
free(*(void **)(param_1 + 8));
free(*(void **)(param_1 + 0x18));
free(*(void **)(param_1 + 0x10));
if (param_2 != (uchar *)0x0) {
free(param_2);
}
if ((param_3 != (int **)0x0) && (*param_3 != (int *)0x0)) {
free(*param_3);
}
stbi__err("outofmem");
return 0;
}
| |
32,642 | evmone::instr::core::keccak256(evmone::StackTop, long, evmone::ExecutionState&) | corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions.hpp | inline Result keccak256(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept
{
const auto& index = stack.pop();
auto& size = stack.top();
if (!check_memory(gas_left, state.memory, index, size))
return {EVMC_OUT_OF_GAS, gas_left};
const auto i = static_cast<size_t>(index);
const auto s = static_cast<size_t>(size);
const auto w = num_words(s);
const auto cost = w * 6;
if ((gas_left -= cost) < 0)
return {EVMC_OUT_OF_GAS, gas_left};
auto data = s != 0 ? &state.memory[i] : nullptr;
size = intx::be::load<uint256>(ethash::keccak256(data, s));
return {EVMC_SUCCESS, gas_left};
} | O2 | cpp | evmone::instr::core::keccak256(evmone::StackTop, long, evmone::ExecutionState&):
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movq %rsi, (%rdi)
leaq -0x20(%rbx), %rcx
addq $0x8, %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3b250
testb %al, %al
je 0x3b23b
movq -0x20(%rbx), %rax
movq (%rbx), %rsi
leaq 0x1f(%rax), %rcx
shrq $0x5, %rcx
imulq $-0x6, %rcx, %rdx
addq 0x8(%rsp), %rdx
movq %rdx, 0x8(%rsp)
js 0x3b24b
addq (%r14), %rsi
testq %rax, %rax
cmoveq %rax, %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rax, %rdx
callq 0x4955b
movdqa 0x10(%r14), %xmm0
movdqa 0x3bb82(%rip), %xmm1 # 0x76da0
pshufb %xmm1, %xmm0
movdqu %xmm0, -0x20(%rbx)
movdqa (%r14), %xmm0
pshufb %xmm1, %xmm0
movdqu %xmm0, -0x10(%rbx)
xorl %eax, %eax
jmp 0x3b23e
pushq $0x3
popq %rax
movq 0x8(%rsp), %rdx
addq $0x38, %rsp
popq %rbx
popq %r14
retq
pushq $0x3
popq %rax
jmp 0x3b243
| _ZN6evmone5instr4core9keccak256ENS_8StackTopElRNS_14ExecutionStateE:
push r14
push rbx
sub rsp, 38h
mov r14, rdx
mov rbx, rdi
lea rdi, [rsp+48h+var_40]
mov [rdi], rsi
lea rcx, [rbx-20h]
add r14, 8
mov rsi, r14
mov rdx, rbx
call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&)
test al, al
jz short loc_3B23B
mov rax, [rbx-20h]
mov rsi, [rbx]
lea rcx, [rax+1Fh]
shr rcx, 5
imul rdx, rcx, -6
add rdx, [rsp+48h+var_40]
mov [rsp+48h+var_40], rdx
js short loc_3B24B
add rsi, [r14]
test rax, rax
cmovz rsi, rax
lea r14, [rsp+48h+var_38]
mov rdi, r14
mov rdx, rax
call ethash_keccak256
movdqa xmm0, xmmword ptr [r14+10h]
movdqa xmm1, cs:xmmword_76DA0
pshufb xmm0, xmm1
movdqu xmmword ptr [rbx-20h], xmm0
movdqa xmm0, xmmword ptr [r14]
pshufb xmm0, xmm1
movdqu xmmword ptr [rbx-10h], xmm0
xor eax, eax
jmp short loc_3B23E
loc_3B23B:
push 3
pop rax
loc_3B23E:
mov rdx, [rsp+48h+var_40]
loc_3B243:
add rsp, 38h
pop rbx
pop r14
retn
loc_3B24B:
push 3
pop rax
jmp short loc_3B243
| long long evmone::instr::core::keccak256(__m128i *a1, long long a2, long long a3)
{
_QWORD *v3; // r14
long long v4; // rax
long long v5; // rsi
long long v6; // rsi
__m128i si128; // xmm1
long long v9; // [rsp+8h] [rbp-40h] BYREF
__m128i v10; // [rsp+10h] [rbp-38h] BYREF
__m128i v11[2]; // [rsp+20h] [rbp-28h] BYREF
v9 = a2;
v3 = (_QWORD *)(a3 + 8);
if ( !(unsigned __int8)evmone::check_memory(&v9, a3 + 8, a1, &a1[-2]) )
return 3LL;
v4 = a1[-2].m128i_i64[0];
v5 = a1->m128i_i64[0];
v9 -= 6 * ((unsigned long long)(v4 + 31) >> 5);
if ( v9 < 0 )
return 3LL;
v6 = *v3 + v5;
if ( !v4 )
v6 = 0LL;
ethash_keccak256(&v10, v6, v4);
si128 = _mm_load_si128((const __m128i *)&xmmword_76DA0);
a1[-2] = _mm_shuffle_epi8(_mm_load_si128(v11), si128);
a1[-1] = _mm_shuffle_epi8(_mm_load_si128(&v10), si128);
return 0LL;
}
| keccak256:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R14,RDX
MOV RBX,RDI
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RSI
LEA RCX,[RBX + -0x20]
ADD R14,0x8
MOV RSI,R14
MOV RDX,RBX
CALL 0x0013b250
TEST AL,AL
JZ 0x0013b23b
MOV RAX,qword ptr [RBX + -0x20]
MOV RSI,qword ptr [RBX]
LEA RCX,[RAX + 0x1f]
SHR RCX,0x5
IMUL RDX,RCX,-0x6
ADD RDX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x8],RDX
JS 0x0013b24b
ADD RSI,qword ptr [R14]
TEST RAX,RAX
CMOVZ RSI,RAX
LEA R14,[RSP + 0x10]
MOV RDI,R14
MOV RDX,RAX
CALL 0x0014955b
MOVDQA XMM0,xmmword ptr [R14 + 0x10]
MOVDQA XMM1,xmmword ptr [0x00176da0]
PSHUFB XMM0,XMM1
MOVDQU xmmword ptr [RBX + -0x20],XMM0
MOVDQA XMM0,xmmword ptr [R14]
PSHUFB XMM0,XMM1
MOVDQU xmmword ptr [RBX + -0x10],XMM0
XOR EAX,EAX
JMP 0x0013b23e
LAB_0013b23b:
PUSH 0x3
POP RAX
LAB_0013b23e:
MOV RDX,qword ptr [RSP + 0x8]
LAB_0013b243:
ADD RSP,0x38
POP RBX
POP R14
RET
LAB_0013b24b:
PUSH 0x3
POP RAX
JMP 0x0013b243
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* evmone::instr::core::keccak256(evmone::StackTop, long, evmone::ExecutionState&) */
int1 [16] evmone::instr::core::keccak256(uint *param_1,long param_2,long param_3)
{
long lVar1;
char cVar2;
long lVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int8 uStack_50;
long local_40;
int1 local_38 [16];
int1 local_28 [16];
local_40 = param_2;
cVar2 = check_memory(&local_40,(Memory *)(param_3 + 8),param_1,param_1 + -0x20);
if (cVar2 == '\0') {
uStack_50 = 3;
}
else {
lVar1 = *(long *)(param_1 + -0x20);
local_40 = (lVar1 + 0x1fU >> 5) * -6 + local_40;
if (local_40 < 0) {
uStack_50 = 3;
}
else {
lVar3 = *(long *)param_1 + *(long *)(param_3 + 8);
if (lVar1 == 0) {
lVar3 = 0;
}
ethash_keccak256(local_38,lVar3,lVar1);
auVar5 = _DAT_00176da0;
auVar4 = pshufb(local_28,_DAT_00176da0);
*(int1 (*) [16])(param_1 + -0x20) = auVar4;
auVar5 = pshufb(local_38,auVar5);
*(int1 (*) [16])(param_1 + -0x10) = auVar5;
uStack_50 = 0;
}
}
auVar5._8_8_ = local_40;
auVar5._0_8_ = uStack_50;
return auVar5;
}
| |
32,643 | Type_handler_hybrid_field_type::aggregate_for_result(Type_handler const*) | eloqsql/sql/sql_type.cc | bool
Type_handler_hybrid_field_type::aggregate_for_result(const Type_handler *other)
{
Type_handler_pair tp(m_type_handler, other);
do
{
const Type_handler *hres;
const Type_collection *c;
if (((c= Type_handler::type_collection_for_aggregation(tp.a(), tp.b())) &&
(hres= c->aggregate_for_result(tp.a(), tp.b()))) ||
(hres= type_handler_data->
m_type_aggregator_for_result.find_handler(tp.a(), tp.b())))
{
m_type_handler= hres;
return false;
}
} while (tp.to_base());
return true;
} | O0 | cpp | Type_handler_hybrid_field_type::aggregate_for_result(Type_handler const*):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq -0x28(%rbp), %rdi
callq 0xbff510
leaq -0x28(%rbp), %rdi
callq 0xbff540
movq %rax, -0x48(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xbff560
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0xbe4180
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xbe4bdd
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xbff540
movq %rax, -0x50(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xbff560
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %rax, %rdx
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0xbe4c18
movq 0x1196a1c(%rip), %rax # 0x1d7b600
movq %rax, -0x68(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xbff540
movq %rax, -0x60(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xbff560
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq %rax, %rdx
callq 0xbff580
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0xbe4c29
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
jmp 0xbe4c40
jmp 0xbe4c2b
leaq -0x28(%rbp), %rdi
callq 0xbff5d0
testb $0x1, %al
jne 0xbe4b78
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN30Type_handler_hybrid_field_type20aggregate_for_resultEPK12Type_handler:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
mov rsi, [rax]; Type_handler *
mov rdx, [rbp+var_18]; Type_handler *
lea rdi, [rbp+var_28]; this
call _ZN17Type_handler_pairC2EPK12Type_handlerS2_; Type_handler_pair::Type_handler_pair(Type_handler const*,Type_handler const*)
loc_BE4B78:
lea rdi, [rbp+var_28]; this
call _ZNK17Type_handler_pair1aEv; Type_handler_pair::a(void)
mov [rbp+var_48], rax
lea rdi, [rbp+var_28]; this
call _ZNK17Type_handler_pair1bEv; Type_handler_pair::b(void)
mov rdi, [rbp+var_48]; this
mov rsi, rax; Type_handler *
call _ZN12Type_handler31type_collection_for_aggregationEPKS_S1_; Type_handler::type_collection_for_aggregation(Type_handler const*,Type_handler const*)
mov [rbp+var_38], rax
cmp rax, 0
jz short loc_BE4BDD
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
lea rdi, [rbp+var_28]; this
call _ZNK17Type_handler_pair1aEv; Type_handler_pair::a(void)
mov [rbp+var_50], rax
lea rdi, [rbp+var_28]; this
call _ZNK17Type_handler_pair1bEv; Type_handler_pair::b(void)
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_50]
mov rdx, rax
mov rax, [rdi]
call qword ptr [rax+20h]
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_BE4C18
loc_BE4BDD:
mov rax, cs:type_handler_data
mov [rbp+var_68], rax
lea rdi, [rbp+var_28]; this
call _ZNK17Type_handler_pair1aEv; Type_handler_pair::a(void)
mov [rbp+var_60], rax
lea rdi, [rbp+var_28]; this
call _ZNK17Type_handler_pair1bEv; Type_handler_pair::b(void)
mov rdi, [rbp+var_68]; this
mov rsi, [rbp+var_60]; Type_handler *
mov rdx, rax; Type_handler *
call _ZNK15Type_aggregator12find_handlerEPK12Type_handlerS2_; Type_aggregator::find_handler(Type_handler const*,Type_handler const*)
mov [rbp+var_30], rax
cmp rax, 0
jz short loc_BE4C29
loc_BE4C18:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_30]
mov [rax], rcx
mov [rbp+var_1], 0
jmp short loc_BE4C40
loc_BE4C29:
jmp short $+2
loc_BE4C2B:
lea rdi, [rbp+var_28]; this
call _ZN17Type_handler_pair7to_baseEv; Type_handler_pair::to_base(void)
test al, 1
jnz loc_BE4B78
mov [rbp+var_1], 1
loc_BE4C40:
mov al, [rbp+var_1]
and al, 1
add rsp, 70h
pop rbp
retn
| char Type_handler_hybrid_field_type::aggregate_for_result(const Type_handler **this, const Type_handler *a2)
{
const Type_handler *v2; // rax
const Type_handler *v3; // rdx
long long v4; // rax
const Type_handler *v5; // rax
Type_aggregator *v7; // [rsp+8h] [rbp-68h]
Type_handler *v8; // [rsp+10h] [rbp-60h]
long long v9; // [rsp+20h] [rbp-50h]
Type_handler *v10; // [rsp+28h] [rbp-48h]
void ( ***v11)(Type_collection_std *__hidden); // [rsp+38h] [rbp-38h]
long long handler; // [rsp+40h] [rbp-30h]
_BYTE v13[16]; // [rsp+48h] [rbp-28h] BYREF
Type_handler *v14; // [rsp+58h] [rbp-18h]
const Type_handler **v15; // [rsp+60h] [rbp-10h]
v15 = this;
v14 = a2;
Type_handler_pair::Type_handler_pair((Type_handler_pair *)v13, *this, a2);
do
{
v10 = (Type_handler *)Type_handler_pair::a((Type_handler_pair *)v13);
v2 = (const Type_handler *)Type_handler_pair::b((Type_handler_pair *)v13);
v11 = Type_handler::type_collection_for_aggregation(v10, v2, v3);
if ( !v11
|| (v9 = Type_handler_pair::a((Type_handler_pair *)v13),
v4 = Type_handler_pair::b((Type_handler_pair *)v13),
(handler = ((long long ( *)(void ( ***)(Type_collection_std *__hidden), long long, long long))(*v11)[4])(
v11,
v9,
v4)) == 0) )
{
v7 = (Type_aggregator *)type_handler_data;
v8 = (Type_handler *)Type_handler_pair::a((Type_handler_pair *)v13);
v5 = (const Type_handler *)Type_handler_pair::b((Type_handler_pair *)v13);
handler = Type_aggregator::find_handler(v7, v8, v5);
if ( !handler )
continue;
}
*this = (const Type_handler *)handler;
return 0;
}
while ( (Type_handler_pair::to_base((Type_handler_pair *)v13) & 1) != 0 );
return 1;
}
| ddl_log_increment_phase_no_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x8],EDI
MOV RAX,qword ptr [0x01e5a600]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00be4b68
LAB_00be4b68:
MOV EDI,dword ptr [RBP + -0x8]
CALL 0x00be7340
TEST AL,0x1
JNZ 0x00be4bf1
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV dword ptr [RBP + -0x18],EAX
CMP dword ptr [RBP + -0x14],0x2
JNZ 0x00be4be9
CMP dword ptr [RBP + -0x18],0x12
JNC 0x00be4be9
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
ADD EAX,0x1
MOV byte ptr [RBP + -0x19],AL
MOV EAX,dword ptr [RBP + -0x18]
MOV ECX,EAX
LEA RAX,[0x15b2180]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOVSX ECX,byte ptr [RBP + -0x19]
CMP EAX,ECX
JG 0x00be4bc3
JMP 0x00be4bbd
LAB_00be4bbd:
JMP 0x00be4bbf
LAB_00be4bbf:
MOV byte ptr [RBP + -0x19],0xff
LAB_00be4bc3:
MOV CL,byte ptr [RBP + -0x19]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV EDI,dword ptr [RBP + -0x8]
MOVZX ESI,byte ptr [RBP + -0x19]
CALL 0x00be5970
TEST AL,0x1
JNZ 0x00be4bdf
JMP 0x00be4be7
LAB_00be4bdf:
JMP 0x00be4be1
LAB_00be4be1:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00be4c17
LAB_00be4be7:
JMP 0x00be4bef
LAB_00be4be9:
JMP 0x00be4beb
LAB_00be4beb:
JMP 0x00be4bed
LAB_00be4bed:
JMP 0x00be4bef
LAB_00be4bef:
JMP 0x00be4c11
LAB_00be4bf1:
LEA RDI,[0x1525e1d]
MOV ESI,0x370
LEA RDX,[0x1526023]
MOV AL,0x0
CALL 0x0093a410
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00be4c17
LAB_00be4c11:
JMP 0x00be4c13
LAB_00be4c13:
MOV byte ptr [RBP + -0x1],0x0
LAB_00be4c17:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x20
POP RBP
RET
|
/* ddl_log_increment_phase_no_lock(unsigned int) */
int1 ddl_log_increment_phase_no_lock(uint param_1)
{
char *pcVar1;
ulong uVar2;
uchar local_21;
int1 local_9;
pcVar1 = global_ddl_log;
uVar2 = read_ddl_log_file_entry(param_1);
if ((uVar2 & 1) == 0) {
if ((*pcVar1 == '\x02') && ((byte)pcVar1[1] < 0x12)) {
local_21 = pcVar1[2] + '\x01';
if ((int)(uint)(byte)ddl_log_entry_phases[(uint)(byte)pcVar1[1]] <= (int)(char)local_21) {
local_21 = 0xff;
}
pcVar1[2] = local_21;
uVar2 = update_phase(param_1,local_21);
if ((uVar2 & 1) != 0) {
return 1;
}
}
local_9 = 0;
}
else {
glog_print_error("/workspace/llm4binary/github2025/eloqsql/sql/ddl_log.cc",0x370,
"DDL_LOG: Failed in reading entry before updating it");
local_9 = 1;
}
return local_9;
}
| |
32,644 | my_dir | eloqsql/mysys/my_lib.c | MY_DIR *my_dir(const char *path, myf MyFlags)
{
MY_DIR_HANDLE *dirh;
FILEINFO finfo;
DIR *dirp;
struct dirent *dp;
char tmp_path[FN_REFLEN + 2], *tmp_file;
char dirent_tmp[sizeof(struct dirent)+_POSIX_PATH_MAX+1];
DBUG_ENTER("my_dir");
DBUG_PRINT("my",("path: '%s' MyFlags: %lu",path,MyFlags));
tmp_file= directory_file_name(tmp_path, path);
if (!(dirp= opendir(tmp_path)))
{
my_errno= errno;
goto err_open;
}
if (!(dirh= my_malloc(key_memory_MY_DIR, sizeof(*dirh),
MYF(MyFlags | MY_ZEROFILL))))
goto err_alloc;
if (my_init_dynamic_array(key_memory_MY_DIR, &dirh->array, sizeof(FILEINFO),
ENTRIES_START_SIZE, ENTRIES_INCREMENT,
MYF(MyFlags)))
goto error;
init_alloc_root(key_memory_MY_DIR, &dirh->root, NAMES_START_SIZE,
NAMES_START_SIZE, MYF(MyFlags));
dp= (struct dirent*) dirent_tmp;
while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp)))
{
MY_STAT statbuf, *mystat= 0;
if (dp->d_name[0] == '.' &&
(dp->d_name[1] == '\0' ||
(dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
continue; /* . or .. */
if (MyFlags & MY_WANT_STAT)
{
mystat= &statbuf;
bzero(mystat, sizeof(*mystat));
(void) strmov(tmp_file, dp->d_name);
(void) my_stat(tmp_path, mystat, MyFlags);
if (!(mystat->st_mode & MY_S_IREAD))
continue;
}
if (!(finfo.name= strdup_root(&dirh->root, dp->d_name)))
goto error;
if (mystat &&
!((mystat= memdup_root(&dirh->root, mystat, sizeof(*mystat)))))
goto error;
finfo.mystat= mystat;
if (push_dynamic(&dirh->array, (uchar*)&finfo))
goto error;
}
(void) closedir(dirp);
if (MyFlags & MY_WANT_SORT)
sort_dynamic(&dirh->array, (qsort_cmp) comp_names);
dirh->dir.dir_entry= dynamic_element(&dirh->array, 0, FILEINFO *);
dirh->dir.number_of_files= dirh->array.elements;
DBUG_RETURN(&dirh->dir);
error:
my_dirend(&dirh->dir);
err_alloc:
(void) closedir(dirp);
err_open:
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_DIR, MYF(ME_BELL), path, my_errno);
DBUG_RETURN(NULL);
} | O0 | c | my_dir:
pushq %rbp
movq %rsp, %rbp
subq $0x530, %rsp # imm = 0x530
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x440(%rbp)
movq %rsi, -0x448(%rbp)
jmp 0x673e8
leaq -0x210(%rbp), %rdi
movq -0x440(%rbp), %rsi
callq 0x67790
movq %rax, -0x478(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x26510
movq %rax, -0x468(%rbp)
cmpq $0x0, %rax
jne 0x6743a
callq 0x26050
movl (%rax), %eax
movl %eax, -0x514(%rbp)
callq 0x5c640
movl -0x514(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x6770b
leaq 0x3aa7d3(%rip), %rax # 0x411c14
movl (%rax), %edi
movq -0x448(%rbp), %rdx
orq $0x20, %rdx
movl $0x78, %esi
callq 0x5b130
movq %rax, -0x450(%rbp)
cmpq $0x0, %rax
jne 0x6746a
jmp 0x676ff
leaq 0x3aa7a3(%rip), %rax # 0x411c14
movl (%rax), %edi
movq -0x450(%rbp), %rsi
addq $0x10, %rsi
movq -0x448(%rbp), %rax
movl $0x10, %edx
xorl %ecx, %ecx
movl $0x200, %r8d # imm = 0x200
movl $0x1000, %r9d # imm = 0x1000
movq %rax, (%rsp)
callq 0x59e60
cmpb $0x0, %al
je 0x674aa
jmp 0x676f3
leaq 0x3aa763(%rip), %rax # 0x411c14
movl (%rax), %edi
movq -0x450(%rbp), %rsi
addq $0x38, %rsi
movq -0x448(%rbp), %r8
movl $0x8000, %ecx # imm = 0x8000
movq %rcx, %rdx
callq 0x6a3a0
leaq -0x430(%rbp), %rax
movq %rax, -0x470(%rbp)
movq -0x468(%rbp), %rdi
callq 0x261f0
movq %rax, -0x470(%rbp)
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x67507
jmp 0x6766c
movq $0x0, -0x510(%rbp)
movq -0x470(%rbp), %rax
movsbl 0x13(%rax), %eax
cmpl $0x2e, %eax
jne 0x67554
movq -0x470(%rbp), %rax
movsbl 0x14(%rax), %eax
cmpl $0x0, %eax
je 0x67552
movq -0x470(%rbp), %rax
movsbl 0x14(%rax), %eax
cmpl $0x2e, %eax
jne 0x67554
movq -0x470(%rbp), %rax
movsbl 0x15(%rax), %eax
cmpl $0x0, %eax
jne 0x67554
jmp 0x674e0
movq -0x448(%rbp), %rax
andq $0x4000, %rax # imm = 0x4000
cmpq $0x0, %rax
je 0x675d4
leaq -0x508(%rbp), %rax
movq %rax, -0x510(%rbp)
movq -0x510(%rbp), %rdi
xorl %esi, %esi
movl $0x90, %edx
callq 0x261c0
movq -0x478(%rbp), %rdi
movq -0x470(%rbp), %rsi
addq $0x13, %rsi
callq 0x26330
leaq -0x210(%rbp), %rdi
movq -0x510(%rbp), %rsi
movq -0x448(%rbp), %rdx
callq 0x67800
movq -0x510(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
jne 0x675d2
jmp 0x674e0
jmp 0x675d4
movq -0x450(%rbp), %rdi
addq $0x38, %rdi
movq -0x470(%rbp), %rsi
addq $0x13, %rsi
callq 0x6aed0
movq %rax, -0x460(%rbp)
cmpq $0x0, %rax
jne 0x67601
jmp 0x676f3
cmpq $0x0, -0x510(%rbp)
je 0x67639
movq -0x450(%rbp), %rdi
addq $0x38, %rdi
movq -0x510(%rbp), %rsi
movl $0x90, %edx
callq 0x6af70
movq %rax, -0x510(%rbp)
cmpq $0x0, %rax
jne 0x67639
jmp 0x676f3
movq -0x510(%rbp), %rax
movq %rax, -0x458(%rbp)
movq -0x450(%rbp), %rdi
addq $0x10, %rdi
leaq -0x460(%rbp), %rsi
callq 0x59f90
cmpb $0x0, %al
je 0x67667
jmp 0x676f3
jmp 0x674e0
movq -0x468(%rbp), %rdi
callq 0x26580
movq -0x448(%rbp), %rax
andq $0x2000, %rax # imm = 0x2000
cmpq $0x0, %rax
je 0x676ba
movq -0x450(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x450(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, %esi
movq -0x450(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, %edx
leaq 0x23b(%rip), %rcx # 0x678f0
callq 0x689d0
movq -0x450(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x450(%rbp), %rax
movq %rcx, (%rax)
movq -0x450(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x450(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x450(%rbp), %rax
movq %rax, -0x438(%rbp)
jmp 0x67756
movq -0x450(%rbp), %rdi
callq 0x67370
movq -0x468(%rbp), %rdi
callq 0x26580
movq -0x448(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0x67749
movq -0x440(%rbp), %rax
movq %rax, -0x520(%rbp)
callq 0x5c640
movq -0x520(%rbp), %rdx
movl (%rax), %ecx
movl $0xc, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x66b20
jmp 0x6774b
movq $0x0, -0x438(%rbp)
movq -0x438(%rbp), %rax
movq %rax, -0x528(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x67786
movq -0x528(%rbp), %rax
addq $0x530, %rsp # imm = 0x530
popq %rbp
retq
callq 0x26370
nopl (%rax,%rax)
| my_dir:
push rbp
mov rbp, rsp
sub rsp, 530h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_440], rdi
mov [rbp+var_448], rsi
jmp short $+2
loc_673E8:
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_440]
call directory_file_name
mov [rbp+var_478], rax
lea rdi, [rbp+var_210]
call _opendir
mov [rbp+var_468], rax
cmp rax, 0
jnz short loc_6743A
call ___errno_location
mov eax, [rax]
mov [rbp+var_514], eax
call _my_thread_var
mov ecx, [rbp+var_514]
mov [rax], ecx
jmp loc_6770B
loc_6743A:
lea rax, key_memory_MY_DIR
mov edi, [rax]
mov rdx, [rbp+var_448]
or rdx, 20h
mov esi, 78h ; 'x'
call my_malloc
mov [rbp+var_450], rax
cmp rax, 0
jnz short loc_6746A
jmp loc_676FF
loc_6746A:
lea rax, key_memory_MY_DIR
mov edi, [rax]
mov rsi, [rbp+var_450]
add rsi, 10h
mov rax, [rbp+var_448]
mov edx, 10h
xor ecx, ecx
mov r8d, 200h
mov r9d, 1000h
mov [rsp+530h+var_530], rax
call init_dynamic_array2
cmp al, 0
jz short loc_674AA
jmp loc_676F3
loc_674AA:
lea rax, key_memory_MY_DIR
mov edi, [rax]
mov rsi, [rbp+var_450]
add rsi, 38h ; '8'
mov r8, [rbp+var_448]
mov ecx, 8000h
mov rdx, rcx
call init_alloc_root
lea rax, [rbp+var_430]
mov [rbp+var_470], rax
loc_674E0:
mov rdi, [rbp+var_468]
call _readdir64
mov [rbp+var_470], rax
cmp rax, 0
setnz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_67507
jmp loc_6766C
loc_67507:
mov [rbp+var_510], 0
mov rax, [rbp+var_470]
movsx eax, byte ptr [rax+13h]
cmp eax, 2Eh ; '.'
jnz short loc_67554
mov rax, [rbp+var_470]
movsx eax, byte ptr [rax+14h]
cmp eax, 0
jz short loc_67552
mov rax, [rbp+var_470]
movsx eax, byte ptr [rax+14h]
cmp eax, 2Eh ; '.'
jnz short loc_67554
mov rax, [rbp+var_470]
movsx eax, byte ptr [rax+15h]
cmp eax, 0
jnz short loc_67554
loc_67552:
jmp short loc_674E0
loc_67554:
mov rax, [rbp+var_448]
and rax, 4000h
cmp rax, 0
jz short loc_675D4
lea rax, [rbp+var_508]
mov [rbp+var_510], rax
mov rdi, [rbp+var_510]
xor esi, esi
mov edx, 90h
call _memset
mov rdi, [rbp+var_478]
mov rsi, [rbp+var_470]
add rsi, 13h
call _stpcpy
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_510]
mov rdx, [rbp+var_448]
call my_stat
mov rax, [rbp+var_510]
mov eax, [rax+18h]
and eax, 100h
cmp eax, 0
jnz short loc_675D2
jmp loc_674E0
loc_675D2:
jmp short $+2
loc_675D4:
mov rdi, [rbp+var_450]
add rdi, 38h ; '8'
mov rsi, [rbp+var_470]
add rsi, 13h
call strdup_root
mov [rbp+var_460], rax
cmp rax, 0
jnz short loc_67601
jmp loc_676F3
loc_67601:
cmp [rbp+var_510], 0
jz short loc_67639
mov rdi, [rbp+var_450]
add rdi, 38h ; '8'
mov rsi, [rbp+var_510]
mov edx, 90h
call memdup_root
mov [rbp+var_510], rax
cmp rax, 0
jnz short loc_67639
jmp loc_676F3
loc_67639:
mov rax, [rbp+var_510]
mov [rbp+var_458], rax
mov rdi, [rbp+var_450]
add rdi, 10h
lea rsi, [rbp+var_460]
call insert_dynamic
cmp al, 0
jz short loc_67667
jmp loc_676F3
loc_67667:
jmp loc_674E0
loc_6766C:
mov rdi, [rbp+var_468]
call _closedir
mov rax, [rbp+var_448]
and rax, 2000h
cmp rax, 0
jz short loc_676BA
mov rax, [rbp+var_450]
mov rdi, [rax+10h]
mov rax, [rbp+var_450]
mov eax, [rax+18h]
mov esi, eax
mov rax, [rbp+var_450]
mov eax, [rax+24h]
mov edx, eax
lea rcx, comp_names
call my_qsort
loc_676BA:
mov rax, [rbp+var_450]
mov rcx, [rax+10h]
mov rax, [rbp+var_450]
mov [rax], rcx
mov rax, [rbp+var_450]
mov ecx, [rax+18h]
mov rax, [rbp+var_450]
mov [rax+8], ecx
mov rax, [rbp+var_450]
mov [rbp+var_438], rax
jmp short loc_67756
loc_676F3:
mov rdi, [rbp+var_450]
call my_dirend
loc_676FF:
mov rdi, [rbp+var_468]
call _closedir
loc_6770B:
mov rax, [rbp+var_448]
and rax, 18h
cmp rax, 0
jz short loc_67749
mov rax, [rbp+var_440]
mov [rbp+var_520], rax
call _my_thread_var
mov rdx, [rbp+var_520]
mov ecx, [rax]
mov edi, 0Ch
mov esi, 4
mov al, 0
call my_error
loc_67749:
jmp short $+2
loc_6774B:
mov [rbp+var_438], 0
loc_67756:
mov rax, [rbp+var_438]
mov [rbp+var_528], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_67786
mov rax, [rbp+var_528]
add rsp, 530h
pop rbp
retn
loc_67786:
call ___stack_chk_fail
| long long my_dir(long long a1, long long a2)
{
unsigned int *v2; // rax
long long v4; // [rsp+10h] [rbp-520h]
int v5; // [rsp+1Ch] [rbp-514h]
_BYTE *v6; // [rsp+20h] [rbp-510h]
_BYTE v7[24]; // [rsp+28h] [rbp-508h] BYREF
__int16 v8; // [rsp+40h] [rbp-4F0h]
long long v9; // [rsp+B8h] [rbp-478h]
char *v10; // [rsp+C0h] [rbp-470h]
long long v11; // [rsp+C8h] [rbp-468h]
_QWORD v12[2]; // [rsp+D0h] [rbp-460h] BYREF
long long v13; // [rsp+E0h] [rbp-450h]
long long v14; // [rsp+E8h] [rbp-448h]
long long v15; // [rsp+F0h] [rbp-440h]
char v17; // [rsp+100h] [rbp-430h] BYREF
_BYTE v18[520]; // [rsp+320h] [rbp-210h] BYREF
unsigned long long v19; // [rsp+528h] [rbp-8h]
v19 = __readfsqword(0x28u);
v15 = a1;
v14 = a2;
v9 = directory_file_name(v18, a1);
v11 = opendir(v18);
if ( !v11 )
{
v5 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v5;
LABEL_24:
if ( (v14 & 0x18) != 0 )
{
v4 = v15;
v2 = (unsigned int *)my_thread_var();
my_error(0xCu, 4LL, v4, *v2);
}
return 0LL;
}
v13 = my_malloc(key_memory_MY_DIR, 0x78uLL, (unsigned int)v14 | 0x20);
if ( !v13 )
{
LABEL_23:
closedir(v11);
goto LABEL_24;
}
if ( init_dynamic_array2(key_memory_MY_DIR, v13 + 16, 0x10u, 0LL, 0x200u, 4096, v14) )
{
LABEL_22:
my_dirend(v13);
goto LABEL_23;
}
init_alloc_root(key_memory_MY_DIR, v13 + 56, 0x8000LL, 0x8000LL, v14);
v10 = &v17;
while ( 1 )
{
v10 = (char *)readdir64(v11);
if ( !v10 )
break;
v6 = 0LL;
if ( v10[19] != 46 || v10[20] && (v10[20] != 46 || v10[21]) )
{
if ( (v14 & 0x4000) == 0
|| (v6 = v7, memset(v7, 0LL, 144LL), stpcpy(v9, v10 + 19), my_stat(v18, v7, v14), (v8 & 0x100) != 0) )
{
v12[0] = strdup_root(v13 + 56, v10 + 19);
if ( !v12[0] )
goto LABEL_22;
if ( v6 )
{
v6 = (_BYTE *)memdup_root(v13 + 56, v6, 144LL);
if ( !v6 )
goto LABEL_22;
}
v12[1] = v6;
if ( insert_dynamic(v13 + 16, (long long)v12) )
goto LABEL_22;
}
}
}
closedir(v11);
if ( (v14 & 0x2000) != 0 )
my_qsort(*(_QWORD *)(v13 + 16), *(unsigned int *)(v13 + 24), *(unsigned int *)(v13 + 36), comp_names);
*(_QWORD *)v13 = *(_QWORD *)(v13 + 16);
*(_DWORD *)(v13 + 8) = *(_DWORD *)(v13 + 24);
return v13;
}
| my_dir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x530
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x440],RDI
MOV qword ptr [RBP + -0x448],RSI
JMP 0x001673e8
LAB_001673e8:
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x440]
CALL 0x00167790
MOV qword ptr [RBP + -0x478],RAX
LEA RDI,[RBP + -0x210]
CALL 0x00126510
MOV qword ptr [RBP + -0x468],RAX
CMP RAX,0x0
JNZ 0x0016743a
CALL 0x00126050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x514],EAX
CALL 0x0015c640
MOV ECX,dword ptr [RBP + -0x514]
MOV dword ptr [RAX],ECX
JMP 0x0016770b
LAB_0016743a:
LEA RAX,[0x511c14]
MOV EDI,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x448]
OR RDX,0x20
MOV ESI,0x78
CALL 0x0015b130
MOV qword ptr [RBP + -0x450],RAX
CMP RAX,0x0
JNZ 0x0016746a
JMP 0x001676ff
LAB_0016746a:
LEA RAX,[0x511c14]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x450]
ADD RSI,0x10
MOV RAX,qword ptr [RBP + -0x448]
MOV EDX,0x10
XOR ECX,ECX
MOV R8D,0x200
MOV R9D,0x1000
MOV qword ptr [RSP],RAX
CALL 0x00159e60
CMP AL,0x0
JZ 0x001674aa
JMP 0x001676f3
LAB_001674aa:
LEA RAX,[0x511c14]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x450]
ADD RSI,0x38
MOV R8,qword ptr [RBP + -0x448]
MOV ECX,0x8000
MOV RDX,RCX
CALL 0x0016a3a0
LEA RAX,[RBP + -0x430]
MOV qword ptr [RBP + -0x470],RAX
LAB_001674e0:
MOV RDI,qword ptr [RBP + -0x468]
CALL 0x001261f0
MOV qword ptr [RBP + -0x470],RAX
CMP RAX,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x00167507
JMP 0x0016766c
LAB_00167507:
MOV qword ptr [RBP + -0x510],0x0
MOV RAX,qword ptr [RBP + -0x470]
MOVSX EAX,byte ptr [RAX + 0x13]
CMP EAX,0x2e
JNZ 0x00167554
MOV RAX,qword ptr [RBP + -0x470]
MOVSX EAX,byte ptr [RAX + 0x14]
CMP EAX,0x0
JZ 0x00167552
MOV RAX,qword ptr [RBP + -0x470]
MOVSX EAX,byte ptr [RAX + 0x14]
CMP EAX,0x2e
JNZ 0x00167554
MOV RAX,qword ptr [RBP + -0x470]
MOVSX EAX,byte ptr [RAX + 0x15]
CMP EAX,0x0
JNZ 0x00167554
LAB_00167552:
JMP 0x001674e0
LAB_00167554:
MOV RAX,qword ptr [RBP + -0x448]
AND RAX,0x4000
CMP RAX,0x0
JZ 0x001675d4
LEA RAX,[RBP + -0x508]
MOV qword ptr [RBP + -0x510],RAX
MOV RDI,qword ptr [RBP + -0x510]
XOR ESI,ESI
MOV EDX,0x90
CALL 0x001261c0
MOV RDI,qword ptr [RBP + -0x478]
MOV RSI,qword ptr [RBP + -0x470]
ADD RSI,0x13
CALL 0x00126330
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x510]
MOV RDX,qword ptr [RBP + -0x448]
CALL 0x00167800
MOV RAX,qword ptr [RBP + -0x510]
MOV EAX,dword ptr [RAX + 0x18]
AND EAX,0x100
CMP EAX,0x0
JNZ 0x001675d2
JMP 0x001674e0
LAB_001675d2:
JMP 0x001675d4
LAB_001675d4:
MOV RDI,qword ptr [RBP + -0x450]
ADD RDI,0x38
MOV RSI,qword ptr [RBP + -0x470]
ADD RSI,0x13
CALL 0x0016aed0
MOV qword ptr [RBP + -0x460],RAX
CMP RAX,0x0
JNZ 0x00167601
JMP 0x001676f3
LAB_00167601:
CMP qword ptr [RBP + -0x510],0x0
JZ 0x00167639
MOV RDI,qword ptr [RBP + -0x450]
ADD RDI,0x38
MOV RSI,qword ptr [RBP + -0x510]
MOV EDX,0x90
CALL 0x0016af70
MOV qword ptr [RBP + -0x510],RAX
CMP RAX,0x0
JNZ 0x00167639
JMP 0x001676f3
LAB_00167639:
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RBP + -0x458],RAX
MOV RDI,qword ptr [RBP + -0x450]
ADD RDI,0x10
LEA RSI,[RBP + -0x460]
CALL 0x00159f90
CMP AL,0x0
JZ 0x00167667
JMP 0x001676f3
LAB_00167667:
JMP 0x001674e0
LAB_0016766c:
MOV RDI,qword ptr [RBP + -0x468]
CALL 0x00126580
MOV RAX,qword ptr [RBP + -0x448]
AND RAX,0x2000
CMP RAX,0x0
JZ 0x001676ba
MOV RAX,qword ptr [RBP + -0x450]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x450]
MOV EAX,dword ptr [RAX + 0x18]
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x450]
MOV EAX,dword ptr [RAX + 0x24]
MOV EDX,EAX
LEA RCX,[0x1678f0]
CALL 0x001689d0
LAB_001676ba:
MOV RAX,qword ptr [RBP + -0x450]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x450]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x450]
MOV ECX,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x450]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x450]
MOV qword ptr [RBP + -0x438],RAX
JMP 0x00167756
LAB_001676f3:
MOV RDI,qword ptr [RBP + -0x450]
CALL 0x00167370
LAB_001676ff:
MOV RDI,qword ptr [RBP + -0x468]
CALL 0x00126580
LAB_0016770b:
MOV RAX,qword ptr [RBP + -0x448]
AND RAX,0x18
CMP RAX,0x0
JZ 0x00167749
MOV RAX,qword ptr [RBP + -0x440]
MOV qword ptr [RBP + -0x520],RAX
CALL 0x0015c640
MOV RDX,qword ptr [RBP + -0x520]
MOV ECX,dword ptr [RAX]
MOV EDI,0xc
MOV ESI,0x4
MOV AL,0x0
CALL 0x00166b20
LAB_00167749:
JMP 0x0016774b
LAB_0016774b:
MOV qword ptr [RBP + -0x438],0x0
LAB_00167756:
MOV RAX,qword ptr [RBP + -0x438]
MOV qword ptr [RBP + -0x528],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00167786
MOV RAX,qword ptr [RBP + -0x528]
ADD RSP,0x530
POP RBP
RET
LAB_00167786:
CALL 0x00126370
|
int8 * my_dir(int8 param_1,ulong param_2)
{
int iVar1;
int8 uVar2;
char cVar3;
int *piVar4;
int4 *puVar5;
long in_FS_OFFSET;
int1 *local_518;
int1 local_510 [24];
uint local_4f8;
char *local_480;
dirent64 *local_478;
DIR *local_470;
long local_468;
int1 *local_460;
int8 *local_458;
ulong local_450;
int8 local_448;
int8 *local_440;
dirent64 local_438;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_450 = param_2;
local_448 = param_1;
local_480 = (char *)directory_file_name(local_218,param_1);
local_470 = opendir(local_218);
if (local_470 == (DIR *)0x0) {
piVar4 = __errno_location();
iVar1 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
}
else {
local_458 = (int8 *)my_malloc(key_memory_MY_DIR,0x78,local_450 | 0x20);
if (local_458 != (int8 *)0x0) {
cVar3 = init_dynamic_array2(key_memory_MY_DIR,local_458 + 2,0x10,0,0x200,0x1000,local_450);
if (cVar3 == '\0') {
init_alloc_root(key_memory_MY_DIR,local_458 + 7,0x8000,0x8000,local_450);
local_478 = &local_438;
LAB_001674e0:
do {
do {
local_478 = readdir64(local_470);
if (local_478 == (dirent64 *)0x0) {
closedir(local_470);
if ((local_450 & 0x2000) != 0) {
my_qsort(local_458[2],*(int4 *)(local_458 + 3),
*(int4 *)((long)local_458 + 0x24),comp_names);
}
*local_458 = local_458[2];
*(int4 *)(local_458 + 1) = *(int4 *)(local_458 + 3);
local_440 = local_458;
goto LAB_00167756;
}
local_518 = (int1 *)0x0;
} while ((local_478->d_name[0] == '.') &&
((local_478->d_name[1] == '\0' ||
((local_478->d_name[1] == '.' && (local_478->d_name[2] == '\0'))))));
if ((local_450 & 0x4000) != 0) {
local_518 = local_510;
memset(local_518,0,0x90);
stpcpy(local_480,local_478->d_name);
my_stat(local_218,local_518,local_450);
if ((local_4f8 & 0x100) == 0) goto LAB_001674e0;
}
local_468 = strdup_root(local_458 + 7,local_478->d_name);
if ((local_468 == 0) ||
((local_518 != (int1 *)0x0 &&
(local_518 = (int1 *)memdup_root(local_458 + 7,local_518,0x90),
local_518 == (int1 *)0x0)))) break;
local_460 = local_518;
cVar3 = insert_dynamic(local_458 + 2);
if (cVar3 != '\0') break;
} while( true );
}
my_dirend(local_458);
}
closedir(local_470);
}
uVar2 = local_448;
if ((local_450 & 0x18) != 0) {
puVar5 = (int4 *)_my_thread_var();
my_error(0xc,4,uVar2,*puVar5);
}
local_440 = (int8 *)0x0;
LAB_00167756:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_440;
}
| |
32,645 | my_dir | eloqsql/mysys/my_lib.c | MY_DIR *my_dir(const char *path, myf MyFlags)
{
MY_DIR_HANDLE *dirh;
FILEINFO finfo;
DIR *dirp;
struct dirent *dp;
char tmp_path[FN_REFLEN + 2], *tmp_file;
char dirent_tmp[sizeof(struct dirent)+_POSIX_PATH_MAX+1];
DBUG_ENTER("my_dir");
DBUG_PRINT("my",("path: '%s' MyFlags: %lu",path,MyFlags));
tmp_file= directory_file_name(tmp_path, path);
if (!(dirp= opendir(tmp_path)))
{
my_errno= errno;
goto err_open;
}
if (!(dirh= my_malloc(key_memory_MY_DIR, sizeof(*dirh),
MYF(MyFlags | MY_ZEROFILL))))
goto err_alloc;
if (my_init_dynamic_array(key_memory_MY_DIR, &dirh->array, sizeof(FILEINFO),
ENTRIES_START_SIZE, ENTRIES_INCREMENT,
MYF(MyFlags)))
goto error;
init_alloc_root(key_memory_MY_DIR, &dirh->root, NAMES_START_SIZE,
NAMES_START_SIZE, MYF(MyFlags));
dp= (struct dirent*) dirent_tmp;
while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp)))
{
MY_STAT statbuf, *mystat= 0;
if (dp->d_name[0] == '.' &&
(dp->d_name[1] == '\0' ||
(dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
continue; /* . or .. */
if (MyFlags & MY_WANT_STAT)
{
mystat= &statbuf;
bzero(mystat, sizeof(*mystat));
(void) strmov(tmp_file, dp->d_name);
(void) my_stat(tmp_path, mystat, MyFlags);
if (!(mystat->st_mode & MY_S_IREAD))
continue;
}
if (!(finfo.name= strdup_root(&dirh->root, dp->d_name)))
goto error;
if (mystat &&
!((mystat= memdup_root(&dirh->root, mystat, sizeof(*mystat)))))
goto error;
finfo.mystat= mystat;
if (push_dynamic(&dirh->array, (uchar*)&finfo))
goto error;
}
(void) closedir(dirp);
if (MyFlags & MY_WANT_SORT)
sort_dynamic(&dirh->array, (qsort_cmp) comp_names);
dirh->dir.dir_entry= dynamic_element(&dirh->array, 0, FILEINFO *);
dirh->dir.number_of_files= dirh->array.elements;
DBUG_RETURN(&dirh->dir);
error:
my_dirend(&dirh->dir);
err_alloc:
(void) closedir(dirp);
err_open:
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_DIR, MYF(ME_BELL), path, my_errno);
DBUG_RETURN(NULL);
} | O3 | c | my_dir:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp # imm = 0x2E8
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpb $0x0, (%rdi)
movq %rsi, %r15
leaq 0x31852(%rip), %rsi # 0x7f050
cmovneq %rdi, %rsi
leaq -0x240(%rbp), %rdi
movl $0x201, %edx # imm = 0x201
callq 0x7bd88
movq %rax, %r12
cmpb $0x2f, -0x1(%rax)
je 0x4d826
movw $0x2f, (%r12)
incq %r12
leaq -0x240(%rbp), %rdi
callq 0x26530
testq %rax, %rax
je 0x4d8b6
movq %rax, %r13
leaq 0x386fb3(%rip), %rbx # 0x3d47f4
movl (%rbx), %edi
movq %r15, -0x248(%rbp)
orq $0x20, %r15
movl $0x78, %esi
movq %r15, %rdx
callq 0x470bd
testq %rax, %rax
je 0x4d8a5
movq %rax, %r15
movq %r12, -0x268(%rbp)
movq %rbx, %r12
movl (%rbx), %edi
leaq 0x10(%rax), %rbx
movq -0x248(%rbp), %rax
movq %rax, (%rsp)
movq %rbx, %rsi
movl $0x10, %edx
xorl %ecx, %ecx
movl $0x200, %r8d # imm = 0x200
movl $0x1000, %r9d # imm = 0x1000
callq 0x466c0
testb %al, %al
je 0x4d8f5
movq %r15, %rdi
callq 0x4d79c
movq %r13, %rdi
callq 0x265a0
movq -0x248(%rbp), %r15
jmp 0x4d8c4
callq 0x26060
movl (%rax), %ebx
callq 0x4808e
movl %ebx, (%rax)
testb $0x18, %r15b
je 0x4d8ed
callq 0x4808e
movl (%rax), %ecx
xorl %r15d, %r15d
movl $0x4, %esi
movl $0xc, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4d237
jmp 0x4da66
xorl %r15d, %r15d
jmp 0x4da66
movq %rbx, -0x260(%rbp)
movq %r14, -0x258(%rbp)
movl (%r12), %edi
movq %r15, %rsi
addq $0x38, %rsi
movl $0x8000, %edx # imm = 0x8000
movl $0x8000, %ecx # imm = 0x8000
movq %rsi, -0x250(%rbp)
movq -0x248(%rbp), %r8
callq 0x4f254
movq %r13, %rdi
callq 0x261f0
testq %rax, %rax
je 0x4da2d
movq %rax, %rbx
movq -0x248(%rbp), %r14
cmpb $0x2e, 0x13(%rbx)
jne 0x4d967
movzbl 0x14(%rbx), %eax
testl %eax, %eax
je 0x4da19
cmpl $0x2e, %eax
jne 0x4d967
cmpb $0x0, 0x15(%rbx)
je 0x4da19
addq $0x13, %rbx
btl $0xe, %r14d
jb 0x4d977
xorl %r12d, %r12d
jmp 0x4d9b7
movl $0x90, %edx
leaq -0x308(%rbp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x261c0
movq -0x268(%rbp), %rdi
movq %rbx, %rsi
callq 0x262f0
leaq -0x240(%rbp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x4da9b
testb $0x1, -0x2ef(%rbp)
je 0x4da19
movq -0x250(%rbp), %rdi
movq %rbx, %rsi
callq 0x4f746
movq %rax, -0x278(%rbp)
testq %rax, %rax
je 0x4da8a
testq %r12, %r12
je 0x4d9f9
movl $0x90, %edx
movq -0x250(%rbp), %rdi
movq %r12, %rsi
callq 0x4f7b4
testq %rax, %rax
jne 0x4d9fb
jmp 0x4da8a
xorl %eax, %eax
movq %rax, -0x270(%rbp)
movq -0x260(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x4675e
testb %al, %al
jne 0x4da8a
movq %r13, %rdi
callq 0x261f0
movq %rax, %rbx
testq %rax, %rax
jne 0x4d946
movq %r13, %rdi
callq 0x265a0
btl $0xd, -0x248(%rbp)
jae 0x4da57
movq 0x10(%r15), %rdi
movl 0x18(%r15), %esi
movl 0x24(%r15), %edx
leaq 0xed(%rip), %rcx # 0x4db3f
callq 0x4ea34
movq 0x10(%r15), %rax
movq %rax, (%r15)
movl 0x18(%r15), %eax
movl %eax, 0x8(%r15)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x4da96
movq %r15, %rax
addq $0x2e8, %rsp # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x258(%rbp), %r14
jmp 0x4d89d
callq 0x263b0
| my_dir:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2E8h
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp byte ptr [rdi], 0
mov r15, rsi
lea rsi, asc_7F04F+1; "."
cmovnz rsi, rdi
lea rdi, [rbp+var_240]
mov edx, 201h
call strnmov
mov r12, rax
cmp byte ptr [rax-1], 2Fh ; '/'
jz short loc_4D826
mov word ptr [r12], 2Fh ; '/'
inc r12
loc_4D826:
lea rdi, [rbp+var_240]
call _opendir
test rax, rax
jz short loc_4D8B6
mov r13, rax
lea rbx, key_memory_MY_DIR
mov edi, [rbx]
mov [rbp+var_248], r15
or r15, 20h
mov esi, 78h ; 'x'
mov rdx, r15
call my_malloc
test rax, rax
jz short loc_4D8A5
mov r15, rax
mov [rbp+var_268], r12
mov r12, rbx
mov edi, [rbx]
lea rbx, [rax+10h]
mov rax, [rbp+var_248]
mov [rsp+310h+var_310], rax
mov rsi, rbx
mov edx, 10h
xor ecx, ecx
mov r8d, 200h
mov r9d, 1000h
call init_dynamic_array2
test al, al
jz short loc_4D8F5
loc_4D89D:
mov rdi, r15
call my_dirend
loc_4D8A5:
mov rdi, r13
call _closedir
mov r15, [rbp+var_248]
jmp short loc_4D8C4
loc_4D8B6:
call ___errno_location
mov ebx, [rax]
call _my_thread_var
mov [rax], ebx
loc_4D8C4:
test r15b, 18h
jz short loc_4D8ED
call _my_thread_var
mov ecx, [rax]
xor r15d, r15d
mov esi, 4
mov edi, 0Ch
mov rdx, r14
xor eax, eax
call my_error
jmp loc_4DA66
loc_4D8ED:
xor r15d, r15d
jmp loc_4DA66
loc_4D8F5:
mov [rbp+var_260], rbx
mov [rbp+var_258], r14
mov edi, [r12]
mov rsi, r15
add rsi, 38h ; '8'
mov edx, 8000h
mov ecx, 8000h
mov [rbp+var_250], rsi
mov r8, [rbp+var_248]
call init_alloc_root
mov rdi, r13
call _readdir64
test rax, rax
jz loc_4DA2D
mov rbx, rax
mov r14, [rbp+var_248]
loc_4D946:
cmp byte ptr [rbx+13h], 2Eh ; '.'
jnz short loc_4D967
movzx eax, byte ptr [rbx+14h]
test eax, eax
jz loc_4DA19
cmp eax, 2Eh ; '.'
jnz short loc_4D967
cmp byte ptr [rbx+15h], 0
jz loc_4DA19
loc_4D967:
add rbx, 13h
bt r14d, 0Eh
jb short loc_4D977
xor r12d, r12d
jmp short loc_4D9B7
loc_4D977:
mov edx, 90h
lea r12, [rbp+var_308]
mov rdi, r12
xor esi, esi
call _memset
mov rdi, [rbp+var_268]
mov rsi, rbx
call _strcpy
lea rdi, [rbp+var_240]
mov rsi, r12
mov rdx, r14
call my_stat
test [rbp+var_2EF], 1
jz short loc_4DA19
loc_4D9B7:
mov rdi, [rbp+var_250]
mov rsi, rbx
call strdup_root
mov [rbp+var_278], rax
test rax, rax
jz loc_4DA8A
test r12, r12
jz short loc_4D9F9
mov edx, 90h
mov rdi, [rbp+var_250]
mov rsi, r12
call memdup_root
test rax, rax
jnz short loc_4D9FB
jmp loc_4DA8A
loc_4D9F9:
xor eax, eax
loc_4D9FB:
mov [rbp+var_270], rax
mov rdi, [rbp+var_260]
lea rsi, [rbp+var_278]
call insert_dynamic
test al, al
jnz short loc_4DA8A
loc_4DA19:
mov rdi, r13
call _readdir64
mov rbx, rax
test rax, rax
jnz loc_4D946
loc_4DA2D:
mov rdi, r13
call _closedir
bt dword ptr [rbp+var_248], 0Dh
jnb short loc_4DA57
mov rdi, [r15+10h]
mov esi, [r15+18h]
mov edx, [r15+24h]
lea rcx, comp_names
call my_qsort
loc_4DA57:
mov rax, [r15+10h]
mov [r15], rax
mov eax, [r15+18h]
mov [r15+8], eax
loc_4DA66:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_4DA96
mov rax, r15
add rsp, 2E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4DA8A:
mov r14, [rbp+var_258]
jmp loc_4D89D
loc_4DA96:
call ___stack_chk_fail
| long long my_dir(char *a1, long long a2)
{
char *v2; // r14
char *v4; // rsi
char *v5; // rax
char *v6; // r12
long long v7; // rax
long long v8; // r13
long long v9; // rax
long long v10; // r15
long long v11; // rbx
int v12; // ebx
unsigned int *v13; // rax
long long v14; // rax
_BYTE *v15; // rbx
__int16 v16; // r14
_BYTE *v17; // rbx
_BYTE *v18; // r12
long long v19; // rax
_BYTE v21[144]; // [rsp+8h] [rbp-308h] BYREF
_QWORD v22[2]; // [rsp+98h] [rbp-278h] BYREF
char *v23; // [rsp+A8h] [rbp-268h]
long long v24; // [rsp+B0h] [rbp-260h]
char *v25; // [rsp+B8h] [rbp-258h]
long long v26; // [rsp+C0h] [rbp-250h]
long long v27; // [rsp+C8h] [rbp-248h] BYREF
_BYTE v28[528]; // [rsp+D0h] [rbp-240h] BYREF
unsigned long long v29; // [rsp+2E0h] [rbp-30h]
v2 = a1;
v29 = __readfsqword(0x28u);
v4 = ".";
if ( *a1 )
v4 = a1;
v5 = (char *)strnmov(v28, v4, 513LL);
v6 = v5;
if ( *(v5 - 1) != 47 )
{
*(_WORD *)v5 = 47;
v6 = v5 + 1;
}
v7 = opendir(v28);
if ( !v7 )
{
v12 = *(_DWORD *)__errno_location(v28);
*(_DWORD *)my_thread_var() = v12;
goto LABEL_11;
}
v8 = v7;
v27 = a2;
v9 = my_malloc(key_memory_MY_DIR, 0x78uLL, (unsigned int)a2 | 0x20);
if ( !v9 )
goto LABEL_9;
v10 = v9;
v23 = v6;
v11 = v9 + 16;
if ( (unsigned __int8)init_dynamic_array2(key_memory_MY_DIR, v9 + 16, 0x10u, 0LL, 0x200u, 0x1000u, v27) )
goto LABEL_8;
v24 = v11;
v25 = a1;
v26 = v10 + 56;
init_alloc_root(key_memory_MY_DIR, v10 + 56, 0x8000LL, 0x8000LL, v27);
v14 = readdir64(v8);
if ( !v14 )
{
LABEL_30:
closedir(v8);
if ( _bittest((const signed __int32 *)&v27, 0xDu) )
my_qsort(*(_QWORD *)(v10 + 16), *(unsigned int *)(v10 + 24), *(unsigned int *)(v10 + 36), comp_names);
*(_QWORD *)v10 = *(_QWORD *)(v10 + 16);
*(_DWORD *)(v10 + 8) = *(_DWORD *)(v10 + 24);
return v10;
}
v15 = (_BYTE *)v14;
v16 = v27;
while ( 1 )
{
if ( v15[19] == 46 && (!v15[20] || v15[20] == 46 && !v15[21]) )
goto LABEL_29;
v17 = v15 + 19;
if ( (v16 & 0x4000) != 0 )
{
v18 = v21;
memset(v21, 0LL, sizeof(v21));
strcpy(v23, v17);
my_stat(v28, v21);
if ( (v21[25] & 1) == 0 )
goto LABEL_29;
}
else
{
v18 = 0LL;
}
v22[0] = strdup_root(v26, v17);
if ( !v22[0] )
break;
if ( v18 )
{
v19 = memdup_root(v26, v18, 144LL);
if ( !v19 )
break;
}
else
{
v19 = 0LL;
}
v22[1] = v19;
if ( (unsigned __int8)insert_dynamic(v24, (long long)v22) )
break;
LABEL_29:
v15 = (_BYTE *)readdir64(v8);
if ( !v15 )
goto LABEL_30;
}
v2 = v25;
LABEL_8:
my_dirend(v10);
LABEL_9:
closedir(v8);
LOBYTE(a2) = v27;
LABEL_11:
if ( (a2 & 0x18) == 0 )
return 0LL;
v13 = (unsigned int *)my_thread_var();
v10 = 0LL;
my_error(0xCu, 4, v2, *v13);
return v10;
}
| my_dir:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2e8
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP byte ptr [RDI],0x0
MOV R15,RSI
LEA RSI,[0x17f050]
CMOVNZ RSI,RDI
LEA RDI,[RBP + -0x240]
MOV EDX,0x201
CALL 0x0017bd88
MOV R12,RAX
CMP byte ptr [RAX + -0x1],0x2f
JZ 0x0014d826
MOV word ptr [R12],0x2f
INC R12
LAB_0014d826:
LEA RDI,[RBP + -0x240]
CALL 0x00126530
TEST RAX,RAX
JZ 0x0014d8b6
MOV R13,RAX
LEA RBX,[0x4d47f4]
MOV EDI,dword ptr [RBX]
MOV qword ptr [RBP + -0x248],R15
OR R15,0x20
MOV ESI,0x78
MOV RDX,R15
CALL 0x001470bd
TEST RAX,RAX
JZ 0x0014d8a5
MOV R15,RAX
MOV qword ptr [RBP + -0x268],R12
MOV R12,RBX
MOV EDI,dword ptr [RBX]
LEA RBX,[RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x248]
MOV qword ptr [RSP],RAX
MOV RSI,RBX
MOV EDX,0x10
XOR ECX,ECX
MOV R8D,0x200
MOV R9D,0x1000
CALL 0x001466c0
TEST AL,AL
JZ 0x0014d8f5
LAB_0014d89d:
MOV RDI,R15
CALL 0x0014d79c
LAB_0014d8a5:
MOV RDI,R13
CALL 0x001265a0
MOV R15,qword ptr [RBP + -0x248]
JMP 0x0014d8c4
LAB_0014d8b6:
CALL 0x00126060
MOV EBX,dword ptr [RAX]
CALL 0x0014808e
MOV dword ptr [RAX],EBX
LAB_0014d8c4:
TEST R15B,0x18
JZ 0x0014d8ed
CALL 0x0014808e
MOV ECX,dword ptr [RAX]
XOR R15D,R15D
MOV ESI,0x4
MOV EDI,0xc
MOV RDX,R14
XOR EAX,EAX
CALL 0x0014d237
JMP 0x0014da66
LAB_0014d8ed:
XOR R15D,R15D
JMP 0x0014da66
LAB_0014d8f5:
MOV qword ptr [RBP + -0x260],RBX
MOV qword ptr [RBP + -0x258],R14
MOV EDI,dword ptr [R12]
MOV RSI,R15
ADD RSI,0x38
MOV EDX,0x8000
MOV ECX,0x8000
MOV qword ptr [RBP + -0x250],RSI
MOV R8,qword ptr [RBP + -0x248]
CALL 0x0014f254
MOV RDI,R13
CALL 0x001261f0
TEST RAX,RAX
JZ 0x0014da2d
MOV RBX,RAX
MOV R14,qword ptr [RBP + -0x248]
LAB_0014d946:
CMP byte ptr [RBX + 0x13],0x2e
JNZ 0x0014d967
MOVZX EAX,byte ptr [RBX + 0x14]
TEST EAX,EAX
JZ 0x0014da19
CMP EAX,0x2e
JNZ 0x0014d967
CMP byte ptr [RBX + 0x15],0x0
JZ 0x0014da19
LAB_0014d967:
ADD RBX,0x13
BT R14D,0xe
JC 0x0014d977
XOR R12D,R12D
JMP 0x0014d9b7
LAB_0014d977:
MOV EDX,0x90
LEA R12,[RBP + -0x308]
MOV RDI,R12
XOR ESI,ESI
CALL 0x001261c0
MOV RDI,qword ptr [RBP + -0x268]
MOV RSI,RBX
CALL 0x001262f0
LEA RDI,[RBP + -0x240]
MOV RSI,R12
MOV RDX,R14
CALL 0x0014da9b
TEST byte ptr [RBP + -0x2ef],0x1
JZ 0x0014da19
LAB_0014d9b7:
MOV RDI,qword ptr [RBP + -0x250]
MOV RSI,RBX
CALL 0x0014f746
MOV qword ptr [RBP + -0x278],RAX
TEST RAX,RAX
JZ 0x0014da8a
TEST R12,R12
JZ 0x0014d9f9
MOV EDX,0x90
MOV RDI,qword ptr [RBP + -0x250]
MOV RSI,R12
CALL 0x0014f7b4
TEST RAX,RAX
JNZ 0x0014d9fb
JMP 0x0014da8a
LAB_0014d9f9:
XOR EAX,EAX
LAB_0014d9fb:
MOV qword ptr [RBP + -0x270],RAX
MOV RDI,qword ptr [RBP + -0x260]
LEA RSI,[RBP + -0x278]
CALL 0x0014675e
TEST AL,AL
JNZ 0x0014da8a
LAB_0014da19:
MOV RDI,R13
CALL 0x001261f0
MOV RBX,RAX
TEST RAX,RAX
JNZ 0x0014d946
LAB_0014da2d:
MOV RDI,R13
CALL 0x001265a0
BT dword ptr [RBP + -0x248],0xd
JNC 0x0014da57
MOV RDI,qword ptr [R15 + 0x10]
MOV ESI,dword ptr [R15 + 0x18]
MOV EDX,dword ptr [R15 + 0x24]
LEA RCX,[0x14db3f]
CALL 0x0014ea34
LAB_0014da57:
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [R15],RAX
MOV EAX,dword ptr [R15 + 0x18]
MOV dword ptr [R15 + 0x8],EAX
LAB_0014da66:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0014da96
MOV RAX,R15
ADD RSP,0x2e8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014da8a:
MOV R14,qword ptr [RBP + -0x258]
JMP 0x0014d89d
LAB_0014da96:
CALL 0x001263b0
|
int8 * my_dir(char *param_1,ulong param_2)
{
int iVar1;
ulong uVar2;
char cVar3;
char *pcVar4;
DIR *__dirp;
int8 *puVar5;
int *piVar6;
int4 *puVar7;
dirent64 *pdVar8;
long lVar9;
int1 *__s;
long in_FS_OFFSET;
int1 local_310 [25];
byte local_2f7;
long local_280;
long local_278;
char *local_270;
int8 *local_268;
char *local_260;
int8 *local_258;
ulong local_250;
char local_248 [528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar4 = ".";
if (*param_1 != '\0') {
pcVar4 = param_1;
}
pcVar4 = (char *)strnmov(local_248,pcVar4,0x201);
if (pcVar4[-1] != '/') {
pcVar4[0] = '/';
pcVar4[1] = '\0';
pcVar4 = pcVar4 + 1;
}
__dirp = opendir(local_248);
if (__dirp == (DIR *)0x0) {
piVar6 = __errno_location();
iVar1 = *piVar6;
piVar6 = (int *)_my_thread_var();
*piVar6 = iVar1;
}
else {
local_250 = param_2;
puVar5 = (int8 *)my_malloc(key_memory_MY_DIR,0x78,param_2 | 0x20);
if (puVar5 != (int8 *)0x0) {
local_270 = pcVar4;
cVar3 = init_dynamic_array2(key_memory_MY_DIR,puVar5 + 2,0x10,0,0x200,0x1000,local_250);
if (cVar3 == '\0') {
local_258 = puVar5 + 7;
local_268 = puVar5 + 2;
local_260 = param_1;
init_alloc_root(key_memory_MY_DIR,local_258,0x8000,0x8000,local_250);
pdVar8 = readdir64(__dirp);
uVar2 = local_250;
while (pdVar8 != (dirent64 *)0x0) {
if ((pdVar8->d_name[0] != '.') ||
((pdVar8->d_name[1] != '\0' &&
((pdVar8->d_name[1] != '.' || (pdVar8->d_name[2] != '\0')))))) {
if (((uint)uVar2 >> 0xe & 1) == 0) {
__s = (int1 *)0x0;
}
else {
__s = local_310;
memset(__s,0,0x90);
strcpy(local_270,pdVar8->d_name);
my_stat(local_248,__s,uVar2);
if ((local_2f7 & 1) == 0) goto LAB_0014da19;
}
local_280 = strdup_root(local_258,pdVar8->d_name);
param_1 = local_260;
if (local_280 == 0) goto LAB_0014d89d;
if (__s == (int1 *)0x0) {
lVar9 = 0;
}
else {
lVar9 = memdup_root(local_258,__s,0x90);
param_1 = local_260;
if (lVar9 == 0) goto LAB_0014d89d;
}
local_278 = lVar9;
cVar3 = insert_dynamic(local_268);
param_1 = local_260;
if (cVar3 != '\0') goto LAB_0014d89d;
}
LAB_0014da19:
pdVar8 = readdir64(__dirp);
}
closedir(__dirp);
if (((uint)local_250 >> 0xd & 1) != 0) {
my_qsort(puVar5[2],*(int4 *)(puVar5 + 3),*(int4 *)((long)puVar5 + 0x24),
comp_names);
}
*puVar5 = puVar5[2];
*(int4 *)(puVar5 + 1) = *(int4 *)(puVar5 + 3);
goto LAB_0014da66;
}
LAB_0014d89d:
my_dirend(puVar5);
}
closedir(__dirp);
param_2 = local_250;
}
if ((param_2 & 0x18) == 0) {
puVar5 = (int8 *)0x0;
}
else {
puVar7 = (int4 *)_my_thread_var();
puVar5 = (int8 *)0x0;
my_error(0xc,4,param_1,*puVar7);
}
LAB_0014da66:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return puVar5;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
32,646 | ma_clear_session_state | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void ma_clear_session_state(MYSQL *mysql)
{
uint i;
if (!mysql || !mysql->extension)
return;
for (i= SESSION_TRACK_BEGIN; i <= SESSION_TRACK_END; i++)
{
list_free(mysql->extension->session_state[i].list, 0);
}
memset(mysql->extension->session_state, 0, sizeof(struct st_mariadb_session_state) * SESSION_TRACK_TYPES);
} | O3 | c | ma_clear_session_state:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1b1f8
movq %rdi, %rbx
cmpq $0x0, 0x4f0(%rdi)
je 0x1b1f8
movl $0x8, %r14d
movq 0x4f0(%rbx), %rax
movq (%rax,%r14), %rdi
xorl %esi, %esi
callq 0x1dc03
addq $0x10, %r14
cmpq $0x68, %r14
jne 0x1b1ba
movq 0x4f0(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rax)
movups %xmm0, 0x48(%rax)
movups %xmm0, 0x38(%rax)
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
popq %rbx
popq %r14
popq %rbp
retq
| ma_clear_session_state:
push rbp
mov rbp, rsp
push r14
push rbx
test rdi, rdi
jz short loc_1B1F8
mov rbx, rdi
cmp qword ptr [rdi+4F0h], 0
jz short loc_1B1F8
mov r14d, 8
loc_1B1BA:
mov rax, [rbx+4F0h]
mov rdi, [rax+r14]
xor esi, esi
call list_free
add r14, 10h
cmp r14, 68h ; 'h'
jnz short loc_1B1BA
mov rax, [rbx+4F0h]
xorps xmm0, xmm0
movups xmmword ptr [rax+58h], xmm0
movups xmmword ptr [rax+48h], xmm0
movups xmmword ptr [rax+38h], xmm0
movups xmmword ptr [rax+28h], xmm0
movups xmmword ptr [rax+18h], xmm0
movups xmmword ptr [rax+8], xmm0
loc_1B1F8:
pop rbx
pop r14
pop rbp
retn
| long long ma_clear_session_state(long long a1)
{
long long i; // r14
long long result; // rax
if ( a1 && *(_QWORD *)(a1 + 1264) )
{
for ( i = 8LL; i != 104; i += 16LL )
list_free(*(_QWORD *)(*(_QWORD *)(a1 + 1264) + i), 0LL);
result = *(_QWORD *)(a1 + 1264);
*(_OWORD *)(result + 88) = 0LL;
*(_OWORD *)(result + 72) = 0LL;
*(_OWORD *)(result + 56) = 0LL;
*(_OWORD *)(result + 40) = 0LL;
*(_OWORD *)(result + 24) = 0LL;
*(_OWORD *)(result + 8) = 0LL;
}
return result;
}
| ma_clear_session_state:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
TEST RDI,RDI
JZ 0x0011b1f8
MOV RBX,RDI
CMP qword ptr [RDI + 0x4f0],0x0
JZ 0x0011b1f8
MOV R14D,0x8
LAB_0011b1ba:
MOV RAX,qword ptr [RBX + 0x4f0]
MOV RDI,qword ptr [RAX + R14*0x1]
XOR ESI,ESI
CALL 0x0011dc03
ADD R14,0x10
CMP R14,0x68
JNZ 0x0011b1ba
MOV RAX,qword ptr [RBX + 0x4f0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x58],XMM0
MOVUPS xmmword ptr [RAX + 0x48],XMM0
MOVUPS xmmword ptr [RAX + 0x38],XMM0
MOVUPS xmmword ptr [RAX + 0x28],XMM0
MOVUPS xmmword ptr [RAX + 0x18],XMM0
MOVUPS xmmword ptr [RAX + 0x8],XMM0
LAB_0011b1f8:
POP RBX
POP R14
POP RBP
RET
|
void ma_clear_session_state(long param_1)
{
long lVar1;
if ((param_1 != 0) && (*(long *)(param_1 + 0x4f0) != 0)) {
lVar1 = 8;
do {
list_free(*(int8 *)(*(long *)(param_1 + 0x4f0) + lVar1),0);
lVar1 = lVar1 + 0x10;
} while (lVar1 != 0x68);
lVar1 = *(long *)(param_1 + 0x4f0);
*(int8 *)(lVar1 + 0x58) = 0;
*(int8 *)(lVar1 + 0x60) = 0;
*(int8 *)(lVar1 + 0x48) = 0;
*(int8 *)(lVar1 + 0x50) = 0;
*(int8 *)(lVar1 + 0x38) = 0;
*(int8 *)(lVar1 + 0x40) = 0;
*(int8 *)(lVar1 + 0x28) = 0;
*(int8 *)(lVar1 + 0x30) = 0;
*(int8 *)(lVar1 + 0x18) = 0;
*(int8 *)(lVar1 + 0x20) = 0;
*(int8 *)(lVar1 + 8) = 0;
*(int8 *)(lVar1 + 0x10) = 0;
}
return;
}
| |
32,647 | test_wl4166_3 | eloqsql/libmariadb/unittest/libmariadb/misc.c | static int test_wl4166_3(MYSQL *mysql)
{
int rc;
MYSQL_STMT *stmt;
MYSQL_BIND my_bind[1];
MYSQL_TIME tm[1];
if (mysql_get_server_version(mysql) < 50100) {
diag("Test requires MySQL Server version 5.1 or above");
return SKIP;
}
rc= mysql_query(mysql, "drop table if exists t1");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "create table t1 (year datetime)");
check_mysql_rc(rc, mysql);
stmt= mysql_stmt_init(mysql);
FAIL_IF(!stmt, mysql_error(mysql));
rc= mysql_stmt_prepare(stmt, SL("insert into t1 (year) values (?)"));
check_stmt_rc(rc, stmt);
FAIL_IF(mysql_stmt_param_count(stmt) != 1, "param_count != 1");
memset(my_bind, '\0', sizeof(my_bind));
my_bind[0].buffer_type= MYSQL_TYPE_DATETIME;
my_bind[0].buffer= &tm[0];
rc= mysql_stmt_bind_param(stmt, my_bind);
check_stmt_rc(rc, stmt);
tm[0].year= 2014;
tm[0].month= 1; tm[0].day= 1;
tm[0].hour= 1; tm[0].minute= 1; tm[0].second= 1;
tm[0].second_part= 0; tm[0].neg= 0;
/* Cause a statement reprepare */
rc= mysql_query(mysql, "alter table t1 add column c int");
check_mysql_rc(rc, mysql);
rc= mysql_stmt_execute(stmt);
diag("rc=%d %s", rc, mysql_stmt_error(stmt));
check_stmt_rc(rc, stmt);
if (verify_col_data(mysql, "t1", "year", "2014-01-01 01:01:01")) {
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "drop table t1");
return FAIL;
}
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "drop table t1");
check_mysql_rc(rc, mysql);
return OK;
} | O3 | c | test_wl4166_3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
callq 0x2062b
cmpq $0xc3b3, %rax # imm = 0xC3B3
ja 0x18854
leaq 0x21e3a(%rip), %rdi # 0x3a67c
xorl %eax, %eax
callq 0x1970b
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x188ed
leaq 0x21ac7(%rip), %rsi # 0x3a322
movq %rbx, %rdi
callq 0x1ee15
testl %eax, %eax
je 0x1889b
movl %eax, %r14d
movq %rbx, %rdi
callq 0x20e8e
movq %rax, %r15
movq %rbx, %rdi
callq 0x20e79
leaq 0x209e1(%rip), %rdi # 0x39265
leaq 0x210e3(%rip), %r8 # 0x3996e
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x22f, %r9d # imm = 0x22F
jmp 0x188e0
leaq 0x220fc(%rip), %rsi # 0x3a99e
movq %rbx, %rdi
callq 0x1ee15
testl %eax, %eax
je 0x18900
movl %eax, %r14d
movq %rbx, %rdi
callq 0x20e8e
movq %rax, %r15
movq %rbx, %rdi
callq 0x20e79
leaq 0x2099a(%rip), %rdi # 0x39265
leaq 0x2109c(%rip), %r8 # 0x3996e
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x232, %r9d # imm = 0x232
xorl %eax, %eax
callq 0x1970b
movl $0x1, %r14d
movl %r14d, %eax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x254d4
testq %rax, %rax
je 0x1894b
movq %rax, %r14
leaq 0x220a7(%rip), %rsi # 0x3a9be
movl $0x20, %edx
movq %rax, %rdi
callq 0x25898
testl %eax, %eax
je 0x1896e
movq %r14, %rdi
callq 0x24f74
leaq 0x207e9(%rip), %rdi # 0x39120
leaq 0x21030(%rip), %rdx # 0x3996e
movq %rax, %rsi
movl $0x237, %ecx # imm = 0x237
jmp 0x189f6
movq %rbx, %rdi
callq 0x20e8e
leaq 0x207c6(%rip), %rdi # 0x39120
leaq 0x2100d(%rip), %rdx # 0x3996e
movq %rax, %rsi
movl $0x235, %ecx # imm = 0x235
jmp 0x189f6
movq %r14, %rdi
callq 0x268a3
cmpq $0x1, %rax
jne 0x189dc
xorps %xmm0, %xmm0
leaq -0xc0(%rbp), %rsi
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, (%rsi)
movl $0xc, 0x60(%rsi)
leaq -0x50(%rbp), %rax
movq %rax, 0x10(%rsi)
movq %r14, %rdi
callq 0x24906
testb %al, %al
je 0x18a02
movq %r14, %rdi
callq 0x24f74
leaq 0x20755(%rip), %rdi # 0x39120
leaq 0x20f9c(%rip), %rdx # 0x3996e
movq %rax, %rsi
movl $0x240, %ecx # imm = 0x240
jmp 0x189f6
leaq 0x2073d(%rip), %rdi # 0x39120
leaq 0x21ff5(%rip), %rsi # 0x3a9df
leaq 0x20f7d(%rip), %rdx # 0x3996e
movl $0x239, %ecx # imm = 0x239
xorl %eax, %eax
callq 0x1970b
jmp 0x188e7
movaps 0x20697(%rip), %xmm0 # 0x390a0
movaps %xmm0, -0x50(%rbp)
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movb $0x0, -0x30(%rbp)
leaq 0x21fc2(%rip), %rsi # 0x3a9f0
movq %rbx, %rdi
callq 0x1ee15
testl %eax, %eax
je 0x18a71
movl %eax, %r15d
movq %rbx, %rdi
callq 0x20e8e
movq %rax, %r14
movq %rbx, %rdi
callq 0x20e79
leaq 0x2080e(%rip), %rdi # 0x39265
leaq 0x20f10(%rip), %r8 # 0x3996e
movl %r15d, %esi
movq %r14, %rdx
movl %eax, %ecx
movl $0x249, %r9d # imm = 0x249
jmp 0x188e0
movq %r14, %rdi
callq 0x26469
movl %eax, %r15d
movq %r14, %rdi
callq 0x24f74
leaq 0x21f85(%rip), %rdi # 0x3aa10
movl %r15d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1970b
testl %r15d, %r15d
je 0x18ac0
movq %r14, %rdi
callq 0x24f74
leaq 0x20674(%rip), %rdi # 0x39120
leaq 0x20ebb(%rip), %rdx # 0x3996e
movq %rax, %rsi
movl $0x24d, %ecx # imm = 0x24D
jmp 0x189f6
leaq 0x21427(%rip), %rsi # 0x39eee
leaq 0x21f4b(%rip), %rdx # 0x3aa19
leaq 0x21f49(%rip), %rcx # 0x3aa1e
movq %rbx, %rdi
callq 0x13c1f
movl %eax, %r12d
movq %r14, %rdi
callq 0x24ee5
leaq 0x218c7(%rip), %rsi # 0x3a3b6
movq %rbx, %rdi
callq 0x1ee15
movl $0x1, %r14d
testl %r12d, %r12d
jne 0x188ed
movl %eax, %r15d
testl %eax, %eax
je 0x18b48
movq %rbx, %rdi
callq 0x20e8e
movq %rax, %r12
movq %rbx, %rdi
callq 0x20e79
leaq 0x2073e(%rip), %rdi # 0x39265
leaq 0x20e40(%rip), %r8 # 0x3996e
movl %r15d, %esi
movq %r12, %rdx
movl %eax, %ecx
movl $0x258, %r9d # imm = 0x258
xorl %eax, %eax
callq 0x1970b
jmp 0x188ed
xorl %r14d, %r14d
jmp 0x188ed
| test_wl4166_3:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 0A0h
mov rbx, rdi
call mysql_get_server_version
cmp rax, 0C3B3h
ja short loc_18854
lea rdi, aTestRequiresMy; "Test requires MySQL Server version 5.1 "...
xor eax, eax
call diag
mov r14d, 0FFFFFFFFh
jmp loc_188ED
loc_18854:
lea rsi, aDropTableIfExi_3; "drop table if exists t1"
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_1889B
mov r14d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 22Fh
jmp short loc_188E0
loc_1889B:
lea rsi, aCreateTableT1Y; "create table t1 (year datetime)"
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_18900
mov r14d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 232h
loc_188E0:
xor eax, eax
call diag
loc_188E7:
mov r14d, 1
loc_188ED:
mov eax, r14d
add rsp, 0A0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_18900:
mov rdi, rbx
call mysql_stmt_init
test rax, rax
jz short loc_1894B
mov r14, rax
lea rsi, aInsertIntoT1Ye; "insert into t1 (year) values (?)"
mov edx, 20h ; ' '
mov rdi, rax
call mysql_stmt_prepare
test eax, eax
jz short loc_1896E
mov rdi, r14
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 237h
jmp loc_189F6
loc_1894B:
mov rdi, rbx
call mysql_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 235h
jmp loc_189F6
loc_1896E:
mov rdi, r14
call mysql_stmt_param_count
cmp rax, 1
jnz short loc_189DC
xorps xmm0, xmm0
lea rsi, [rbp+var_C0]
movaps xmmword ptr [rsi+60h], xmm0
movaps xmmword ptr [rsi+10h], xmm0
movaps xmmword ptr [rsi+50h], xmm0
movaps xmmword ptr [rsi+40h], xmm0
movaps xmmword ptr [rsi+30h], xmm0
movaps xmmword ptr [rsi+20h], xmm0
movaps xmmword ptr [rsi], xmm0
mov dword ptr [rsi+60h], 0Ch
lea rax, [rbp+var_50]
mov [rsi+10h], rax
mov rdi, r14
call mysql_stmt_bind_param
test al, al
jz short loc_18A02
mov rdi, r14
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 240h
jmp short loc_189F6
loc_189DC:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aParamCount1; "param_count != 1"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 239h
loc_189F6:
xor eax, eax
call diag
jmp loc_188E7
loc_18A02:
movaps xmm0, cs:xmmword_390A0
movaps [rbp+var_50], xmm0
mov rax, 100000001h
mov [rbp+var_40], rax
mov [rbp+var_38], 0
mov [rbp+var_30], 0
lea rsi, aAlterTableT1Ad_0; "alter table t1 add column c int"
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_18A71
mov r15d, eax
mov rdi, rbx
call mysql_error
mov r14, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r14
mov ecx, eax
mov r9d, 249h
jmp loc_188E0
loc_18A71:
mov rdi, r14
call mysql_stmt_execute
mov r15d, eax
mov rdi, r14
call mysql_stmt_error
lea rdi, aRcDS; "rc=%d %s"
mov esi, r15d
mov rdx, rax
xor eax, eax
call diag
test r15d, r15d
jz short loc_18AC0
mov rdi, r14
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 24Dh
jmp loc_189F6
loc_18AC0:
lea rsi, aLoadDataLocalI+3Bh; "t1"
lea rdx, aYear; "year"
lea rcx, a20140101010101; "2014-01-01 01:01:01"
mov rdi, rbx
call verify_col_data
mov r12d, eax
mov rdi, r14
call mysql_stmt_close
lea rsi, aDropTableT1; "drop table t1"
mov rdi, rbx
call mysql_query
mov r14d, 1
test r12d, r12d
jnz loc_188ED
mov r15d, eax
test eax, eax
jz short loc_18B48
mov rdi, rbx
call mysql_error
mov r12, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r12
mov ecx, eax
mov r9d, 258h
xor eax, eax
call diag
jmp loc_188ED
loc_18B48:
xor r14d, r14d
jmp loc_188ED
| long long test_wl4166_3(long long a1, int a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
unsigned int v6; // r14d
int v7; // eax
int v8; // r14d
int v9; // r15d
int v10; // eax
const char *v11; // rdi
const char *v12; // r8
const char *v13; // rsi
const char *v14; // rdx
int v15; // ecx
int v16; // r9d
int v17; // eax
int v18; // r14d
int v19; // r15d
int v20; // eax
long long v22; // rax
long long v23; // r14
int v24; // eax
int v25; // eax
long long v26; // rdx
int v27; // eax
int v28; // eax
int v29; // r15d
int v30; // r14d
int v31; // eax
int v32; // r15d
int v33; // eax
int v34; // ecx
int v35; // r8d
int v36; // r9d
int v37; // eax
int v38; // r12d
int v39; // eax
int v40; // r15d
int v41; // r12d
int v42; // eax
__int128 v43; // [rsp+0h] [rbp-C0h] BYREF
__int128 v44; // [rsp+10h] [rbp-B0h]
__int128 v45; // [rsp+20h] [rbp-A0h]
__int128 v46; // [rsp+30h] [rbp-90h]
__int128 v47; // [rsp+40h] [rbp-80h]
__int128 v48; // [rsp+50h] [rbp-70h]
__int128 v49; // [rsp+60h] [rbp-60h]
__int128 v50; // [rsp+70h] [rbp-50h] BYREF
long long v51; // [rsp+80h] [rbp-40h]
long long v52; // [rsp+88h] [rbp-38h]
char v53; // [rsp+90h] [rbp-30h]
if ( (unsigned long long)mysql_get_server_version(a1) <= 0xC3B3 )
{
diag((unsigned int)"Test requires MySQL Server version 5.1 or above", a2, v2, v3, v4, v5);
return (unsigned int)-1;
}
v7 = mysql_query(a1, "drop table if exists t1");
if ( v7 )
{
v8 = v7;
v9 = mysql_error(a1);
v10 = mysql_errno(a1);
v11 = "Error (%d): %s (%d) in %s line %d";
v12 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c";
LODWORD(v13) = v8;
LODWORD(v14) = v9;
v15 = v10;
v16 = 559;
LABEL_7:
diag((_DWORD)v11, (_DWORD)v13, (_DWORD)v14, v15, (_DWORD)v12, v16);
return 1;
}
v17 = mysql_query(a1, "create table t1 (year datetime)");
if ( v17 )
{
v18 = v17;
v19 = mysql_error(a1);
v20 = mysql_errno(a1);
v11 = "Error (%d): %s (%d) in %s line %d";
v12 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c";
LODWORD(v13) = v18;
LODWORD(v14) = v19;
v15 = v20;
v16 = 562;
goto LABEL_7;
}
v22 = mysql_stmt_init(a1);
if ( !v22 )
{
v25 = mysql_error(a1);
v11 = "Error: %s (%s: %d)";
v14 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c";
LODWORD(v13) = v25;
v15 = 565;
goto LABEL_7;
}
v23 = v22;
if ( (unsigned int)mysql_stmt_prepare(v22, "insert into t1 (year) values (?)", 32LL) )
{
v24 = mysql_stmt_error(v23);
v11 = "Error: %s (%s: %d)";
v14 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c";
LODWORD(v13) = v24;
v15 = 567;
goto LABEL_7;
}
if ( mysql_stmt_param_count(v23) != 1 )
{
v11 = "Error: %s (%s: %d)";
v13 = "param_count != 1";
v14 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c";
v15 = 569;
goto LABEL_7;
}
v49 = 0LL;
v44 = 0LL;
v48 = 0LL;
v47 = 0LL;
v46 = 0LL;
v45 = 0LL;
v43 = 0LL;
LODWORD(v49) = 12;
*(_QWORD *)&v44 = &v50;
if ( (unsigned __int8)mysql_stmt_bind_param(v23, &v43, v26) )
{
v27 = mysql_stmt_error(v23);
v11 = "Error: %s (%s: %d)";
v14 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c";
LODWORD(v13) = v27;
v15 = 576;
goto LABEL_7;
}
v50 = xmmword_390A0;
v51 = 0x100000001LL;
v52 = 0LL;
v53 = 0;
v28 = mysql_query(a1, "alter table t1 add column c int");
if ( v28 )
{
v29 = v28;
v30 = mysql_error(a1);
v31 = mysql_errno(a1);
v11 = "Error (%d): %s (%d) in %s line %d";
v12 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c";
LODWORD(v13) = v29;
LODWORD(v14) = v30;
v15 = v31;
v16 = 585;
goto LABEL_7;
}
v32 = mysql_stmt_execute(v23);
v33 = mysql_stmt_error(v23);
diag((unsigned int)"rc=%d %s", v32, v33, v34, v35, v36);
if ( v32 )
{
v37 = mysql_stmt_error(v23);
v11 = "Error: %s (%s: %d)";
v14 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c";
LODWORD(v13) = v37;
v15 = 589;
goto LABEL_7;
}
v38 = verify_col_data(a1, "t1", "year", (long long)"2014-01-01 01:01:01");
mysql_stmt_close(v23);
v39 = mysql_query(a1, "drop table t1");
v6 = 1;
if ( !v38 )
{
v40 = v39;
if ( v39 )
{
v41 = mysql_error(a1);
v42 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v40,
v41,
v42,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c",
600);
}
else
{
return 0;
}
}
return v6;
}
| test_wl4166_3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xa0
MOV RBX,RDI
CALL 0x0012062b
CMP RAX,0xc3b3
JA 0x00118854
LEA RDI,[0x13a67c]
XOR EAX,EAX
CALL 0x0011970b
MOV R14D,0xffffffff
JMP 0x001188ed
LAB_00118854:
LEA RSI,[0x13a322]
MOV RDI,RBX
CALL 0x0011ee15
TEST EAX,EAX
JZ 0x0011889b
MOV R14D,EAX
MOV RDI,RBX
CALL 0x00120e8e
MOV R15,RAX
MOV RDI,RBX
CALL 0x00120e79
LEA RDI,[0x139265]
LEA R8,[0x13996e]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x22f
JMP 0x001188e0
LAB_0011889b:
LEA RSI,[0x13a99e]
MOV RDI,RBX
CALL 0x0011ee15
TEST EAX,EAX
JZ 0x00118900
MOV R14D,EAX
MOV RDI,RBX
CALL 0x00120e8e
MOV R15,RAX
MOV RDI,RBX
CALL 0x00120e79
LEA RDI,[0x139265]
LEA R8,[0x13996e]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x232
LAB_001188e0:
XOR EAX,EAX
CALL 0x0011970b
LAB_001188e7:
MOV R14D,0x1
LAB_001188ed:
MOV EAX,R14D
ADD RSP,0xa0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00118900:
MOV RDI,RBX
CALL 0x001254d4
TEST RAX,RAX
JZ 0x0011894b
MOV R14,RAX
LEA RSI,[0x13a9be]
MOV EDX,0x20
MOV RDI,RAX
CALL 0x00125898
TEST EAX,EAX
JZ 0x0011896e
MOV RDI,R14
CALL 0x00124f74
LEA RDI,[0x139120]
LEA RDX,[0x13996e]
MOV RSI,RAX
MOV ECX,0x237
JMP 0x001189f6
LAB_0011894b:
MOV RDI,RBX
CALL 0x00120e8e
LEA RDI,[0x139120]
LEA RDX,[0x13996e]
MOV RSI,RAX
MOV ECX,0x235
JMP 0x001189f6
LAB_0011896e:
MOV RDI,R14
CALL 0x001268a3
CMP RAX,0x1
JNZ 0x001189dc
XORPS XMM0,XMM0
LEA RSI,[RBP + -0xc0]
MOVAPS xmmword ptr [RSI + 0x60],XMM0
MOVAPS xmmword ptr [RSI + 0x10],XMM0
MOVAPS xmmword ptr [RSI + 0x50],XMM0
MOVAPS xmmword ptr [RSI + 0x40],XMM0
MOVAPS xmmword ptr [RSI + 0x30],XMM0
MOVAPS xmmword ptr [RSI + 0x20],XMM0
MOVAPS xmmword ptr [RSI],XMM0
MOV dword ptr [RSI + 0x60],0xc
LEA RAX,[RBP + -0x50]
MOV qword ptr [RSI + 0x10],RAX
MOV RDI,R14
CALL 0x00124906
TEST AL,AL
JZ 0x00118a02
MOV RDI,R14
CALL 0x00124f74
LEA RDI,[0x139120]
LEA RDX,[0x13996e]
MOV RSI,RAX
MOV ECX,0x240
JMP 0x001189f6
LAB_001189dc:
LEA RDI,[0x139120]
LEA RSI,[0x13a9df]
LEA RDX,[0x13996e]
MOV ECX,0x239
LAB_001189f6:
XOR EAX,EAX
CALL 0x0011970b
JMP 0x001188e7
LAB_00118a02:
MOVAPS XMM0,xmmword ptr [0x001390a0]
MOVAPS xmmword ptr [RBP + -0x50],XMM0
MOV RAX,0x100000001
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],0x0
MOV byte ptr [RBP + -0x30],0x0
LEA RSI,[0x13a9f0]
MOV RDI,RBX
CALL 0x0011ee15
TEST EAX,EAX
JZ 0x00118a71
MOV R15D,EAX
MOV RDI,RBX
CALL 0x00120e8e
MOV R14,RAX
MOV RDI,RBX
CALL 0x00120e79
LEA RDI,[0x139265]
LEA R8,[0x13996e]
MOV ESI,R15D
MOV RDX,R14
MOV ECX,EAX
MOV R9D,0x249
JMP 0x001188e0
LAB_00118a71:
MOV RDI,R14
CALL 0x00126469
MOV R15D,EAX
MOV RDI,R14
CALL 0x00124f74
LEA RDI,[0x13aa10]
MOV ESI,R15D
MOV RDX,RAX
XOR EAX,EAX
CALL 0x0011970b
TEST R15D,R15D
JZ 0x00118ac0
MOV RDI,R14
CALL 0x00124f74
LEA RDI,[0x139120]
LEA RDX,[0x13996e]
MOV RSI,RAX
MOV ECX,0x24d
JMP 0x001189f6
LAB_00118ac0:
LEA RSI,[0x139eee]
LEA RDX,[0x13aa19]
LEA RCX,[0x13aa1e]
MOV RDI,RBX
CALL 0x00113c1f
MOV R12D,EAX
MOV RDI,R14
CALL 0x00124ee5
LEA RSI,[0x13a3b6]
MOV RDI,RBX
CALL 0x0011ee15
MOV R14D,0x1
TEST R12D,R12D
JNZ 0x001188ed
MOV R15D,EAX
TEST EAX,EAX
JZ 0x00118b48
MOV RDI,RBX
CALL 0x00120e8e
MOV R12,RAX
MOV RDI,RBX
CALL 0x00120e79
LEA RDI,[0x139265]
LEA R8,[0x13996e]
MOV ESI,R15D
MOV RDX,R12
MOV ECX,EAX
MOV R9D,0x258
XOR EAX,EAX
CALL 0x0011970b
JMP 0x001188ed
LAB_00118b48:
XOR R14D,R14D
JMP 0x001188ed
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 test_wl4166_3(int8 param_1)
{
char cVar1;
int iVar2;
int4 uVar3;
int iVar4;
ulong uVar5;
int8 uVar6;
long lVar7;
char *pcVar8;
long lVar9;
int8 uVar10;
uVar5 = mysql_get_server_version();
if (uVar5 < 0xc3b4) {
diag("Test requires MySQL Server version 5.1 or above");
return 0xffffffff;
}
iVar2 = mysql_query(param_1,"drop table if exists t1");
if (iVar2 == 0) {
iVar2 = mysql_query(param_1,"create table t1 (year datetime)");
if (iVar2 == 0) {
lVar7 = mysql_stmt_init(param_1);
if (lVar7 == 0) {
pcVar8 = (char *)mysql_error(param_1);
uVar6 = 0x235;
}
else {
iVar2 = mysql_stmt_prepare(lVar7,"insert into t1 (year) values (?)",0x20);
if (iVar2 == 0) {
lVar9 = mysql_stmt_param_count(lVar7);
if (lVar9 == 1) {
cVar1 = mysql_stmt_bind_param(lVar7);
if (cVar1 == '\0') {
iVar2 = mysql_query(param_1,"alter table t1 add column c int");
if (iVar2 != 0) {
uVar6 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
uVar10 = 0x249;
goto LAB_001188e0;
}
iVar2 = mysql_stmt_execute(lVar7);
uVar6 = mysql_stmt_error(lVar7);
diag("rc=%d %s",iVar2,uVar6);
if (iVar2 == 0) {
iVar2 = verify_col_data(param_1,"t1",&DAT_0013aa19,"2014-01-01 01:01:01");
mysql_stmt_close(lVar7);
iVar4 = mysql_query(param_1,"drop table t1");
if (iVar2 != 0) {
return 1;
}
if (iVar4 == 0) {
return 0;
}
uVar6 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar4,uVar6,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c"
,600);
return 1;
}
pcVar8 = (char *)mysql_stmt_error(lVar7);
uVar6 = 0x24d;
}
else {
pcVar8 = (char *)mysql_stmt_error(lVar7);
uVar6 = 0x240;
}
}
else {
pcVar8 = "param_count != 1";
uVar6 = 0x239;
}
}
else {
pcVar8 = (char *)mysql_stmt_error(lVar7);
uVar6 = 0x237;
}
}
diag("Error: %s (%s: %d)",pcVar8,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c",uVar6);
return 1;
}
uVar6 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
uVar10 = 0x232;
}
else {
uVar6 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
uVar10 = 0x22f;
}
LAB_001188e0:
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar6,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c",uVar10);
return 1;
}
| |
32,648 | pvio_socket_shutdown | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | int pvio_socket_shutdown(MARIADB_PVIO *pvio)
{
if (pvio && pvio->data)
{
my_socket s = ((struct st_pvio_socket *)pvio->data)->socket;
#ifdef _WIN32
shutdown(s, SD_BOTH);
CancelIoEx((HANDLE)s, NULL);
#else
shutdown(s, SHUT_RDWR);
#endif
}
return -1;
} | O3 | c | pvio_socket_shutdown:
testq %rdi, %rdi
je 0x2f72b
movq (%rdi), %rax
testq %rax, %rax
je 0x2f72b
pushq %rbp
movq %rsp, %rbp
movl (%rax), %edi
movl $0x2, %esi
callq 0x13610
popq %rbp
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
retq
| pvio_socket_shutdown:
test rdi, rdi
jz short loc_2F72B
mov rax, [rdi]
test rax, rax
jz short loc_2F72B
push rbp
mov rbp, rsp
mov edi, [rax]
mov esi, 2
call _shutdown
pop rbp
loc_2F72B:
mov eax, 0FFFFFFFFh
retn
| long long pvio_socket_shutdown(_QWORD *a1)
{
if ( a1 && *a1 )
shutdown(*(unsigned int *)*a1, 2LL);
return 0xFFFFFFFFLL;
}
| pvio_socket_shutdown:
TEST RDI,RDI
JZ 0x0012f72b
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0012f72b
PUSH RBP
MOV RBP,RSP
MOV EDI,dword ptr [RAX]
MOV ESI,0x2
CALL 0x00113610
POP RBP
LAB_0012f72b:
MOV EAX,0xffffffff
RET
|
int8 pvio_socket_shutdown(int8 *param_1)
{
if ((param_1 != (int8 *)0x0) && ((int *)*param_1 != (int *)0x0)) {
shutdown(*(int *)*param_1,2);
}
return 0xffffffff;
}
| |
32,649 | get_collation_number_internal | eloqsql/mysys/charset.c | static uint
get_collation_number_internal(const char *name)
{
CHARSET_INFO **cs;
for (cs= all_charsets;
cs < all_charsets + array_elements(all_charsets);
cs++)
{
if (cs[0] && cs[0]->coll_name.str &&
!my_strcasecmp(&my_charset_latin1, cs[0]->coll_name.str, name))
return cs[0]->number;
}
return 0;
} | O0 | c | get_collation_number_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x38a67d(%rip), %rax # 0x3f7860
movq %rax, -0x18(%rbp)
leaq 0x38a672(%rip), %rax # 0x3f7860
addq $0x4000, %rax # imm = 0x4000
cmpq %rax, -0x18(%rbp)
jae 0x6d25f
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x6d24f
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x6d24f
leaq 0x275cb7(%rip), %rax # 0x2e2ed0
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq 0x20(%rcx), %rsi
movq -0x10(%rbp), %rdx
leaq 0x275c96(%rip), %rdi # 0x2e2ed0
callq *%rax
cmpl $0x0, %eax
jne 0x6d24f
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x6d266
jmp 0x6d251
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0x6d1e7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| get_collation_number_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
lea rax, all_charsets
mov [rbp+var_18], rax
loc_6D1E7:
lea rax, all_charsets
add rax, 4000h
cmp [rbp+var_18], rax
jnb short loc_6D25F
mov rax, [rbp+var_18]
cmp qword ptr [rax], 0
jz short loc_6D24F
mov rax, [rbp+var_18]
mov rax, [rax]
cmp qword ptr [rax+20h], 0
jz short loc_6D24F
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
mov rsi, [rcx+20h]
mov rdx, [rbp+var_10]
lea rdi, my_charset_latin1
call rax
cmp eax, 0
jnz short loc_6D24F
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_6D266
loc_6D24F:
jmp short $+2
loc_6D251:
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_18], rax
jmp short loc_6D1E7
loc_6D25F:
mov [rbp+var_4], 0
loc_6D266:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long get_collation_number_internal(long long a1)
{
unsigned int **i; // [rsp+8h] [rbp-18h]
for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i )
{
if ( *i
&& *((_QWORD *)*i + 4)
&& !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*((_QWORD *)*i + 4),
a1) )
{
return **i;
}
}
return 0;
}
| get_collation_number_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0x4f7860]
MOV qword ptr [RBP + -0x18],RAX
LAB_0016d1e7:
LEA RAX,[0x4f7860]
ADD RAX,0x4000
CMP qword ptr [RBP + -0x18],RAX
JNC 0x0016d25f
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX],0x0
JZ 0x0016d24f
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x0016d24f
LEA RAX,[0x3e2ed0]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x20]
MOV RDX,qword ptr [RBP + -0x10]
LEA RDI,[0x3e2ed0]
CALL RAX
CMP EAX,0x0
JNZ 0x0016d24f
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016d266
LAB_0016d24f:
JMP 0x0016d251
LAB_0016d251:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016d1e7
LAB_0016d25f:
MOV dword ptr [RBP + -0x4],0x0
LAB_0016d266:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 get_collation_number_internal(int8 param_1)
{
int iVar1;
long *local_20;
local_20 = &all_charsets;
while( true ) {
if ((long *)0x4fb85f < local_20) {
return 0;
}
if (((*local_20 != 0) && (*(long *)(*local_20 + 0x20) != 0)) &&
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003e2f90 + 0x40))
(&my_charset_latin1,*(int8 *)(*local_20 + 0x20),param_1), iVar1 == 0
)) break;
local_20 = local_20 + 1;
}
return *(int4 *)*local_20;
}
| |
32,650 | minja::Value::operator/(minja::Value const&) const | monkey531[P]llama/common/minja.hpp | Value operator/(const Value& rhs) const {
if (is_number_integer() && rhs.is_number_integer())
return get<int64_t>() / rhs.get<int64_t>();
else
return get<double>() / rhs.get<double>();
} | O3 | cpp | minja::Value::operator/(minja::Value const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movb 0x40(%rsi), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x97ad3
movb 0x40(%r14), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x97ad3
movq %rsi, %rdi
callq 0x86a8c
movq %rax, %r15
movq %r14, %rdi
callq 0x86a8c
movq %rax, %rcx
movq %r15, %rax
cqto
idivq %rcx
leaq 0x40(%rbx), %r14
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x40(%rbx)
movq %r14, %rdi
movq %rax, %rsi
callq 0x60ea6
jmp 0x97b1f
movq %rsi, %rdi
callq 0x86bd6
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x86bd6
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
leaq 0x40(%rbx), %r14
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x40(%rbx)
movq %r14, %rdi
movapd %xmm1, %xmm0
callq 0x6046e
movq %r14, %rdi
movl $0x1, %esi
callq 0x59184
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZNK5minja5ValuedvERKS0_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rdx
mov rbx, rdi
mov al, [rsi+40h]
add al, 0FBh
cmp al, 1
ja short loc_97AD3
mov al, [r14+40h]
add al, 0FBh
cmp al, 1
ja short loc_97AD3
mov rdi, rsi
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r15, rax
mov rdi, r14
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov rcx, rax
mov rax, r15
cqo
idiv rcx
lea r14, [rbx+40h]
xorpd xmm0, xmm0
movupd xmmword ptr [rbx], xmm0
movupd xmmword ptr [rbx+10h], xmm0
movupd xmmword ptr [rbx+20h], xmm0
movupd xmmword ptr [rbx+30h], xmm0
movupd xmmword ptr [rbx+40h], xmm0
mov rdi, r14
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_integer_t)
jmp short loc_97B1F
loc_97AD3:
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+28h+var_20], xmm0
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd xmm1, [rsp+28h+var_20]
divsd xmm1, xmm0
lea r14, [rbx+40h]
xorpd xmm0, xmm0
movupd xmmword ptr [rbx], xmm0
movupd xmmword ptr [rbx+10h], xmm0
movupd xmmword ptr [rbx+20h], xmm0
movupd xmmword ptr [rbx+30h], xmm0
movupd xmmword ptr [rbx+40h], xmm0
mov rdi, r14
movapd xmm0, xmm1
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_float_t)
loc_97B1F:
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, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long minja::Value::operator/(long long a1, long long a2, long long a3)
{
long long v4; // r15
long long v5; // rax
char *v6; // r14
double v7; // xmm1_8
double v9; // [rsp+8h] [rbp-20h]
if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u || (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) > 1u )
{
v9 = minja::Value::get<double>(a2);
v7 = v9 / minja::Value::get<double>(a3);
v6 = (char *)(a1 + 64);
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)(a1 + 64),
v7);
}
else
{
v4 = minja::Value::get<long>(a2);
v5 = minja::Value::get<long>(a3);
v6 = (char *)(a1 + 64);
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)(a1 + 64),
v4 / v5);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v6);
return a1;
}
| operator/:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDX
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x00197ad3
MOV AL,byte ptr [R14 + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x00197ad3
MOV RDI,RSI
CALL 0x00186a8c
MOV R15,RAX
MOV RDI,R14
CALL 0x00186a8c
MOV RCX,RAX
MOV RAX,R15
CQO
IDIV RCX
LEA R14,[RBX + 0x40]
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RBX],XMM0
MOVUPD xmmword ptr [RBX + 0x10],XMM0
MOVUPD xmmword ptr [RBX + 0x20],XMM0
MOVUPD xmmword ptr [RBX + 0x30],XMM0
MOVUPD xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R14
MOV RSI,RAX
CALL 0x00160ea6
JMP 0x00197b1f
LAB_00197ad3:
MOV RDI,RSI
CALL 0x00186bd6
MOVSD qword ptr [RSP + 0x8],XMM0
MOV RDI,R14
CALL 0x00186bd6
MOVSD XMM1,qword ptr [RSP + 0x8]
DIVSD XMM1,XMM0
LEA R14,[RBX + 0x40]
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RBX],XMM0
MOVUPD xmmword ptr [RBX + 0x10],XMM0
MOVUPD xmmword ptr [RBX + 0x20],XMM0
MOVUPD xmmword ptr [RBX + 0x30],XMM0
MOVUPD xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R14
MOVAPD XMM0,XMM1
CALL 0x0016046e
LAB_00197b1f:
MOV RDI,R14
MOV ESI,0x1
CALL 0x00159184
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
Value * __thiscall minja::Value::operator/(Value *this,Value *param_1)
{
long lVar1;
long lVar2;
Value *in_RDX;
double dVar3;
double dVar4;
if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) {
lVar1 = get<long>(param_1);
lVar2 = get<long>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(this + 0x40,lVar1 / lVar2,lVar1 % lVar2);
}
else {
dVar3 = get<double>(param_1);
dVar4 = get<double>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(dVar3 / dVar4,this + 0x40);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant((bool)((char)this + '@'));
return this;
}
| |
32,651 | void YAML::Node::Assign<aimrt_mujoco_sim::mujoco_sim_module::publisher::ImuSensorPublisherBase::Options>(aimrt_mujoco_sim::mujoco_sim_module::publisher::ImuSensorPublisherBase::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_mujoco_sim::mujoco_sim_module::publisher::ImuSensorPublisherBase::Options>(aimrt_mujoco_sim::mujoco_sim_module::publisher::ImuSensorPublisherBase::Options const&):
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x5b60b
leaq 0x8(%rsp), %rdi
callq 0x5b660
movq %rbx, %rdi
callq 0x4a4ba
leaq 0x8(%rsp), %rdi
callq 0x4a4ba
movq 0x38(%rbx), %rdi
movq 0x40(%rsp), %rsi
callq 0x51702
movq 0x28(%rbx), %rdi
movq 0x30(%rsp), %rsi
callq 0x60894
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x5b5e8
callq 0x466d6
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5b603
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2d2d0
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movl $0x40, %edi
callq 0x2c800
movq %rax, %r14
addq $0x8, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x47084
leaq 0x1adfaa(%rip), %rsi # 0x2095d8
leaq 0x50f7(%rip), %rdx # 0x6072c
movq %r14, %rdi
callq 0x2e0f0
movq %rax, %rbx
movq %r14, %rdi
callq 0x2cc80
jmp 0x5b657
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x46052
movq %rbx, %rdi
callq 0x2e220
nop
| _ZN4YAML4Node6AssignIN16aimrt_mujoco_sim17mujoco_sim_module9publisher24TouchSensorPublisherBase7OptionsEEEvRKT_:
push r14
push rbx
sub rsp, 48h
mov rbx, rdi
cmp byte ptr [rdi], 0
jz short loc_5B60B
lea rdi, [rsp+58h+var_50]; int
call _ZN4YAML7convertIN16aimrt_mujoco_sim17mujoco_sim_module9publisher24TouchSensorPublisherBase7OptionsEE6encodeERKS5_; YAML::convert<aimrt_mujoco_sim::mujoco_sim_module::publisher::TouchSensorPublisherBase::Options>::encode(aimrt_mujoco_sim::mujoco_sim_module::publisher::TouchSensorPublisherBase::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_5B5E8
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5B5E8:
lea rax, [rsp+58h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5B603
mov rsi, [rsp+58h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5B603:
add rsp, 48h
pop rbx
pop r14
retn
loc_5B60B:
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_5B657
mov rbx, rax
lea rdi, [rsp+58h+var_50]; this
call _ZN4YAML4NodeD2Ev; YAML::Node::~Node()
loc_5B657:
mov rdi, rbx
call __Unwind_Resume
| void YAML::Node::Assign<aimrt_mujoco_sim::mujoco_sim_module::publisher::TouchSensorPublisherBase::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
volatile signed __int32 *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_mujoco_sim::mujoco_sim_module::publisher::TouchSensorPublisherBase::Options>::encode((int)&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_mujoco_sim::mujoco_sim_module::publisher::TouchSensorPublisherBase::Options>:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
CMP byte ptr [RDI],0x0
JZ 0x0015b60b
LEA RDI,[RSP + 0x8]
CALL 0x0015b660
LAB_0015b5ab:
MOV RDI,RBX
CALL 0x0014a4ba
LEA RDI,[RSP + 0x8]
CALL 0x0014a4ba
MOV RDI,qword ptr [RBX + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00151702
MOV RDI,qword ptr [RBX + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00160894
LAB_0015b5d9:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x0015b5e8
CALL 0x001466d6
LAB_0015b5e8:
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015b603
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0012d2d0
LAB_0015b603:
ADD RSP,0x48
POP RBX
POP R14
RET
LAB_0015b60b:
MOV EDI,0x40
CALL 0x0012c800
MOV R14,RAX
ADD RBX,0x8
LAB_0015b61c:
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00147084
LAB_0015b627:
LEA RSI,[0x3095d8]
LEA RDX,[0x16072c]
MOV RDI,R14
CALL 0x0012e0f0
|
/* void
YAML::Node::Assign<aimrt_mujoco_sim::mujoco_sim_module::publisher::TouchSensorPublisherBase::Options>(aimrt_mujoco_sim::mujoco_sim_module::publisher::TouchSensorPublisherBase::Options
const&) */
void __thiscall
YAML::Node::
Assign<aimrt_mujoco_sim::mujoco_sim_module::publisher::TouchSensorPublisherBase::Options>
(Node *this,Options *param_1)
{
InvalidNode *this_00;
convert<aimrt_mujoco_sim::mujoco_sim_module::publisher::TouchSensorPublisherBase::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_mujoco_sim::mujoco_sim_module::publisher::TouchSensorPublisherBase::Options>::
encode(local_50,param_1);
/* try { // try from 0015b5ab to 0015b5d8 has its CatchHandler @ 0015b64a */
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 0015b61c to 0015b626 has its CatchHandler @ 0015b63d */
InvalidNode::InvalidNode(this_00,(string *)(this + 8));
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,&InvalidNode::typeinfo,BadInsert::~BadInsert);
}
| |
32,652 | google::protobuf::compiler::CodeGeneratorRequest::Clear() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/plugin.pb.cc | void CodeGeneratorRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorRequest)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.file_to_generate_.Clear();
_impl_.proto_file_.Clear();
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_impl_.parameter_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(_impl_.compiler_version_ != nullptr);
_impl_.compiler_version_->Clear();
}
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} | O0 | cpp | google::protobuf::compiler::CodeGeneratorRequest::Clear():
subq $0xb8, %rsp
movq %rdi, 0x80(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movl $0x0, 0x7c(%rsp)
addq $0x10, %rdi
addq $0x8, %rdi
callq 0x212c80
movq 0x20(%rsp), %rdi
addq $0x10, %rdi
addq $0x20, %rdi
callq 0xaf620
movq 0x20(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x90(%rsp)
movl $0x0, 0x8c(%rsp)
movq 0x90(%rsp), %rax
movslq 0x8c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xaa955
movl 0x7c(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xaa884
movq 0x20(%rsp), %rdi
addq $0x10, %rdi
addq $0x38, %rdi
callq 0xaf040
movl 0x7c(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xaa953
jmp 0xaa896
xorl %eax, %eax
testb $0x1, %al
jne 0xaa8a1
jmp 0xaa945
movq 0x20(%rsp), %rax
movq 0x50(%rax), %rax
movb $0x0, 0x3f(%rsp)
cmpq $0x0, %rax
je 0xaa8b7
jmp 0xaa907
leaq 0x30b157(%rip), %rdx # 0x3b5a15
leaq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x3, %esi
movl $0x296, %ecx # imm = 0x296
callq 0x219560
movq 0x10(%rsp), %rdi
movb $0x1, 0x3f(%rsp)
leaq 0x30b1bf(%rip), %rsi # 0x3b5aa7
callq 0x218e20
movq %rax, 0x18(%rsp)
jmp 0xaa8f4
movq 0x18(%rsp), %rsi
leaq 0x2b(%rsp), %rdi
callq 0x218fd0
jmp 0xaa905
jmp 0xaa907
testb $0x1, 0x3f(%rsp)
jne 0xaa910
jmp 0xaa91a
leaq 0x40(%rsp), %rdi
callq 0x2195a0
jmp 0xaa896
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
testb $0x1, 0x3f(%rsp)
jne 0xaa936
jmp 0xaa940
leaq 0x40(%rsp), %rdi
callq 0x2195a0
jmp 0xaa9d7
movq 0x20(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0xa9450
jmp 0xaa955
movq 0x20(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x21350
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xaa9cf
movq 0x8(%rsp), %rdi
callq 0xb2740
addq $0xb8, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x21700
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf8compiler20CodeGeneratorRequest5ClearEv:
sub rsp, 0B8h
mov [rsp+0B8h+var_38], rdi
mov rdi, [rsp+0B8h+var_38]
mov [rsp+0B8h+var_98], rdi
mov [rsp+0B8h+var_3C], 0
add rdi, 10h
add rdi, 8
call _ZN6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5ClearEv; google::protobuf::RepeatedPtrField<std::string>::Clear(void)
mov rdi, [rsp+0B8h+var_98]
add rdi, 10h
add rdi, 20h ; ' '
call _ZN6google8protobuf16RepeatedPtrFieldINS0_19FileDescriptorProtoEE5ClearEv; google::protobuf::RepeatedPtrField<google::protobuf::FileDescriptorProto>::Clear(void)
mov rax, [rsp+0B8h+var_98]
add rax, 10h
mov [rsp+0B8h+var_28], rax
mov [rsp+0B8h+var_2C], 0
mov rax, [rsp+0B8h+var_28]
movsxd rcx, [rsp+0B8h+var_2C]
mov eax, [rax+rcx*4]
mov [rsp+0B8h+var_3C], eax
mov eax, [rsp+0B8h+var_3C]
and eax, 3
cmp eax, 0
jz loc_AA955
mov eax, [rsp+0B8h+var_3C]
and eax, 1
cmp eax, 0
jz short loc_AA884
mov rdi, [rsp+0B8h+var_98]
add rdi, 10h
add rdi, 38h ; '8'; this
call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)
loc_AA884:
mov eax, [rsp+0B8h+var_3C]
and eax, 2
cmp eax, 0
jz loc_AA953
jmp short $+2
loc_AA896:
xor eax, eax
test al, 1
jnz short loc_AA8A1
jmp loc_AA945
loc_AA8A1:
mov rax, [rsp+0B8h+var_98]
mov rax, [rax+50h]
mov [rsp+0B8h+var_79], 0
cmp rax, 0
jz short loc_AA8B7
jmp short loc_AA907
loc_AA8B7:
lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+0B8h+var_78]
mov [rsp+0B8h+var_A8], rdi
mov esi, 3
mov ecx, 296h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+0B8h+var_A8]
mov [rsp+0B8h+var_79], 1
lea rsi, aCheckFailedImp; "CHECK failed: _impl_.compiler_version_ "...
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+0B8h+var_A0], rax
jmp short $+2
loc_AA8F4:
mov rsi, [rsp+0B8h+var_A0]
lea rdi, [rsp+0B8h+var_8D]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_AA905:
jmp short $+2
loc_AA907:
test [rsp+0B8h+var_79], 1
jnz short loc_AA910
jmp short loc_AA91A
loc_AA910:
lea rdi, [rsp+0B8h+var_78]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_AA91A:
jmp loc_AA896
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
test [rsp+arg_37], 1
jnz short loc_AA936
jmp short loc_AA940
loc_AA936:
lea rdi, [rsp+arg_38]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_AA940:
jmp loc_AA9D7
loc_AA945:
mov rax, [rsp+0B8h+var_98]
mov rdi, [rax+50h]; this
call _ZN6google8protobuf8compiler7Version5ClearEv; google::protobuf::compiler::Version::Clear(void)
loc_AA953:
jmp short $+2
loc_AA955:
mov rax, [rsp+0B8h+var_98]
add rax, 10h
mov [rsp+0B8h+var_20], rax
mov rdi, [rsp+0B8h+var_20]
xor esi, esi
mov edx, 4
call _memset
mov rax, [rsp+0B8h+var_98]
add rax, 8
mov [rsp+0B8h+var_18], rax
mov rax, [rsp+0B8h+var_18]
mov [rsp+0B8h+var_B0], rax
mov [rsp+0B8h+var_10], rax
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_8], rax
mov rax, [rsp+0B8h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_AA9CF
mov rdi, [rsp+0B8h+var_B0]; void *
call _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void)
loc_AA9CF:
add rsp, 0B8h
retn
loc_AA9D7:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
| long long google::protobuf::compiler::CodeGeneratorRequest::Clear(
google::protobuf::compiler::CodeGeneratorRequest *this)
{
long long result; // rax
int v2; // [rsp+7Ch] [rbp-3Ch]
google::protobuf::RepeatedPtrField<std::string>::Clear((char *)this + 24);
google::protobuf::RepeatedPtrField<google::protobuf::FileDescriptorProto>::Clear((char *)this + 48);
v2 = *((_DWORD *)this + 4);
if ( (v2 & 3) != 0 )
{
if ( (v2 & 1) != 0 )
google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::compiler::CodeGeneratorRequest *)((char *)this + 72));
if ( (v2 & 2) != 0 )
google::protobuf::compiler::Version::Clear(*((google::protobuf::compiler::Version **)this + 10));
}
memset((char *)this + 16, 0LL, 4LL);
result = *((_QWORD *)this + 1) & 1LL;
if ( result )
return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((char *)this + 8);
return result;
}
| Clear:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x80],RDI
MOV RDI,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x7c],0x0
ADD RDI,0x10
ADD RDI,0x8
CALL 0x00312c80
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x10
ADD RDI,0x20
CALL 0x001af620
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x10
MOV qword ptr [RSP + 0x90],RAX
MOV dword ptr [RSP + 0x8c],0x0
MOV RAX,qword ptr [RSP + 0x90]
MOVSXD RCX,dword ptr [RSP + 0x8c]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x7c],EAX
MOV EAX,dword ptr [RSP + 0x7c]
AND EAX,0x3
CMP EAX,0x0
JZ 0x001aa955
MOV EAX,dword ptr [RSP + 0x7c]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001aa884
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x10
ADD RDI,0x38
CALL 0x001af040
LAB_001aa884:
MOV EAX,dword ptr [RSP + 0x7c]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001aa953
JMP 0x001aa896
LAB_001aa896:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x001aa8a1
JMP 0x001aa945
LAB_001aa8a1:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x50]
MOV byte ptr [RSP + 0x3f],0x0
CMP RAX,0x0
JZ 0x001aa8b7
JMP 0x001aa907
LAB_001aa8b7:
LEA RDX,[0x4b5a15]
LEA RDI,[RSP + 0x40]
MOV qword ptr [RSP + 0x10],RDI
MOV ESI,0x3
MOV ECX,0x296
CALL 0x00319560
MOV RDI,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0x3f],0x1
LAB_001aa8e1:
LEA RSI,[0x4b5aa7]
CALL 0x00318e20
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001aa8f4
LAB_001aa8f4:
MOV RSI,qword ptr [RSP + 0x18]
LEA RDI,[RSP + 0x2b]
CALL 0x00318fd0
LAB_001aa903:
JMP 0x001aa905
LAB_001aa905:
JMP 0x001aa907
LAB_001aa907:
TEST byte ptr [RSP + 0x3f],0x1
JNZ 0x001aa910
JMP 0x001aa91a
LAB_001aa910:
LEA RDI,[RSP + 0x40]
CALL 0x003195a0
LAB_001aa91a:
JMP 0x001aa896
LAB_001aa945:
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + 0x50]
CALL 0x001a9450
LAB_001aa953:
JMP 0x001aa955
LAB_001aa955:
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x10
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0x98]
XOR ESI,ESI
MOV EDX,0x4
CALL 0x00121350
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x8
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001aa9cf
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001b2740
LAB_001aa9cf:
ADD RSP,0xb8
RET
|
/* WARNING: Removing unreachable block (ram,0x001aa8a1) */
/* WARNING: Removing unreachable block (ram,0x001aa8b7) */
/* WARNING: Removing unreachable block (ram,0x001aa8b5) */
/* WARNING: Removing unreachable block (ram,0x001aa907) */
/* WARNING: Removing unreachable block (ram,0x001aa910) */
/* WARNING: Removing unreachable block (ram,0x001aa90e) */
/* WARNING: Removing unreachable block (ram,0x001aa91a) */
/* google::protobuf::compiler::CodeGeneratorRequest::Clear() */
void __thiscall google::protobuf::compiler::CodeGeneratorRequest::Clear(CodeGeneratorRequest *this)
{
uint uVar1;
RepeatedPtrField<std::__cxx11::string>::Clear
((RepeatedPtrField<std::__cxx11::string> *)(this + 0x18));
RepeatedPtrField<google::protobuf::FileDescriptorProto>::Clear
((RepeatedPtrField<google::protobuf::FileDescriptorProto> *)(this + 0x30));
uVar1 = *(uint *)(this + 0x10);
if ((uVar1 & 3) != 0) {
if ((uVar1 & 1) != 0) {
internal::ArenaStringPtr::ClearNonDefaultToEmpty((ArenaStringPtr *)(this + 0x48));
}
if ((uVar1 & 2) != 0) {
Version::Clear(*(Version **)(this + 0x50));
}
}
memset(this + 0x10,0,4);
if ((*(ulong *)(this + 8) & 1) != 0) {
internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
}
return;
}
| |
32,653 | cpu_get_num_math() | llama.cpp/common/common.cpp | int32_t cpu_get_num_math() {
#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__)
int n_cpu = sysconf(_SC_NPROCESSORS_ONLN);
if (n_cpu < 1) {
return cpu_get_num_physical_cores();
}
if (is_hybrid_cpu()) {
cpu_set_t affinity;
if (!pthread_getaffinity_np(pthread_self(), sizeof(affinity), &affinity)) {
int result = cpu_count_math_cpus(n_cpu);
pthread_setaffinity_np(pthread_self(), sizeof(affinity), &affinity);
if (result > 0) {
return result;
}
}
}
#endif
return cpu_get_num_physical_cores();
} | O3 | cpp | cpu_get_num_math():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp # imm = 0x100
movl $0x54, %edi
callq 0x155d0
movq %rax, %rbx
testl %ebx, %ebx
jle 0x1b245
movl $0x7, %eax
xorl %ecx, %ecx
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
testw %dx, %dx
jns 0x1b26e
callq 0x15740
movq %rax, %r14
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %rax, %rdi
callq 0x15c20
testl %eax, %eax
jne 0x1b26e
xorl %r15d, %r15d
movq %rsp, %r12
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
cmpl $0x3ff, %r15d # imm = 0x3FF
ja 0x1b1e7
movl $0x1, %eax
movl %r15d, %ecx
shlq %cl, %rax
movl %r15d, %ecx
shrl $0x6, %ecx
orq %rax, (%rsp,%rcx,8)
movl $0x80, %esi
movq %r14, %rdi
movq %r12, %rdx
callq 0x156a0
testl %eax, %eax
jne 0x1b259
xorl %ecx, %ecx
movl $0x1a, %eax
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
andl $0xff000000, %eax # imm = 0xFF000000
xorl %ecx, %ecx
cmpl $0x20000000, %eax # imm = 0x20000000
setne %cl
addl %ecx, %ebp
addl %ecx, %r15d
incl %r15d
cmpl %ebx, %r15d
jl 0x1b19f
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %r14, %rdi
callq 0x156a0
testl %ebp, %ebp
jne 0x1b275
jmp 0x1b26e
addq $0x100, %rsp # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1ad88
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %r14, %rdi
callq 0x156a0
callq 0x1ad88
movl %eax, %ebp
movl %ebp, %eax
addq $0x100, %rsp # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _Z16cpu_get_num_mathv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 100h
mov edi, 54h ; 'T'
call _sysconf
mov rbx, rax
test ebx, ebx
jle loc_1B245
mov eax, 7
xor ecx, ecx
mov rsi, rbx
cpuid
xchg rsi, rbx
test dx, dx
jns loc_1B26E
call _pthread_self
mov r14, rax
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, rax
call _pthread_getaffinity_np
test eax, eax
jnz loc_1B26E
xor r15d, r15d
mov r12, rsp
xor ebp, ebp
loc_1B19F:
xorps xmm0, xmm0
movaps [rsp+128h+var_B8], xmm0
movaps [rsp+128h+var_C8], xmm0
movaps [rsp+128h+var_D8], xmm0
movaps [rsp+128h+var_E8], xmm0
movaps [rsp+128h+var_F8], xmm0
movaps [rsp+128h+var_108], xmm0
movaps [rsp+128h+var_118], xmm0
movaps [rsp+128h+var_128], xmm0
cmp r15d, 3FFh
ja short loc_1B1E7
mov eax, 1
mov ecx, r15d
shl rax, cl
mov ecx, r15d
shr ecx, 6
or qword ptr [rsp+rcx*8+128h+var_128], rax
loc_1B1E7:
mov esi, 80h
mov rdi, r14
mov rdx, r12
call _pthread_setaffinity_np
test eax, eax
jnz short loc_1B259
xor ecx, ecx
mov eax, 1Ah
mov rsi, rbx
cpuid
xchg rsi, rbx
and eax, 0FF000000h
xor ecx, ecx
cmp eax, 20000000h
setnz cl
add ebp, ecx
add r15d, ecx
inc r15d
cmp r15d, ebx
jl loc_1B19F
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, r14
call _pthread_setaffinity_np
test ebp, ebp
jnz short loc_1B275
jmp short loc_1B26E
loc_1B245:
add rsp, 100h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void)
loc_1B259:
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, r14
call _pthread_setaffinity_np
loc_1B26E:
call _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void)
mov ebp, eax
loc_1B275:
mov eax, ebp
add rsp, 100h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long cpu_get_num_math(void)
{
long long v0; // rbx
long long v2; // rsi
long long v7; // rbx
long long v8; // rsi
long long v9; // rt0
long long v10; // r14
unsigned int v11; // r15d
unsigned int v12; // ebp
long long v13; // rcx
long long v14; // r8
long long v15; // r9
long long v17; // rsi
long long v22; // rcx
__int128 v24; // [rsp+0h] [rbp-128h] BYREF
__int128 v25; // [rsp+10h] [rbp-118h]
__int128 v26; // [rsp+20h] [rbp-108h]
__int128 v27; // [rsp+30h] [rbp-F8h]
__int128 v28; // [rsp+40h] [rbp-E8h]
__int128 v29; // [rsp+50h] [rbp-D8h]
__int128 v30; // [rsp+60h] [rbp-C8h]
__int128 v31; // [rsp+70h] [rbp-B8h]
_BYTE v32[168]; // [rsp+80h] [rbp-A8h] BYREF
v0 = sysconf(84LL);
if ( (int)v0 <= 0 )
return cpu_get_num_physical_cores();
_RAX = 7LL;
v2 = v0;
__asm { cpuid }
v9 = v2;
v8 = _RBX;
v7 = v9;
if ( (_RDX & 0x8000u) != 0LL )
{
v10 = pthread_self(84LL, v8, _RDX, _RCX);
if ( !(unsigned int)pthread_getaffinity_np(v10, 128LL, v32) )
{
v11 = 0;
v12 = 0;
do
{
v31 = 0LL;
v30 = 0LL;
v29 = 0LL;
v28 = 0LL;
v27 = 0LL;
v26 = 0LL;
v25 = 0LL;
v24 = 0LL;
if ( v11 <= 0x3FF )
*((_QWORD *)&v24 + (v11 >> 6)) |= 1LL << v11;
if ( (unsigned int)((long long ( *)(long long, long long, __int128 *))pthread_setaffinity_np)(
v10,
128LL,
&v24) )
{
pthread_setaffinity_np(
v10,
128LL,
v32,
v13,
v14,
v15,
v24,
*((_QWORD *)&v24 + 1),
v25,
*((_QWORD *)&v25 + 1),
v26,
*((_QWORD *)&v26 + 1),
v27,
*((_QWORD *)&v27 + 1),
v28,
*((_QWORD *)&v28 + 1),
v29,
*((_QWORD *)&v29 + 1),
v30,
*((_QWORD *)&v30 + 1),
v31,
*((_QWORD *)&v31 + 1));
return (unsigned int)cpu_get_num_physical_cores();
}
_RAX = 26LL;
v17 = v7;
__asm { cpuid }
v7 = v17;
v22 = (_RAX & 0xFF000000) != 0x20000000;
v12 += v22;
v11 += v22 + 1;
}
while ( (int)v11 < (int)v17 );
pthread_setaffinity_np(
v10,
128LL,
v32,
v22,
v14,
v15,
v24,
*((_QWORD *)&v24 + 1),
v25,
*((_QWORD *)&v25 + 1),
v26,
*((_QWORD *)&v26 + 1),
v27,
*((_QWORD *)&v27 + 1),
v28,
*((_QWORD *)&v28 + 1),
v29,
*((_QWORD *)&v29 + 1),
v30,
*((_QWORD *)&v30 + 1),
v31,
*((_QWORD *)&v31 + 1));
if ( v12 )
return v12;
}
}
return (unsigned int)cpu_get_num_physical_cores();
}
| cpu_get_num_math:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x100
MOV EDI,0x54
CALL 0x001155d0
MOV RBX,RAX
TEST EBX,EBX
JLE 0x0011b245
MOV EAX,0x7
XOR ECX,ECX
MOV RSI,RBX
CPUID
XCHG RBX,RSI
TEST DX,DX
JNS 0x0011b26e
CALL 0x00115740
MOV R14,RAX
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,RAX
CALL 0x00115c20
TEST EAX,EAX
JNZ 0x0011b26e
XOR R15D,R15D
MOV R12,RSP
XOR EBP,EBP
LAB_0011b19f:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
CMP R15D,0x3ff
JA 0x0011b1e7
MOV EAX,0x1
MOV ECX,R15D
SHL RAX,CL
MOV ECX,R15D
SHR ECX,0x6
OR qword ptr [RSP + RCX*0x8],RAX
LAB_0011b1e7:
MOV ESI,0x80
MOV RDI,R14
MOV RDX,R12
CALL 0x001156a0
TEST EAX,EAX
JNZ 0x0011b259
XOR ECX,ECX
MOV EAX,0x1a
MOV RSI,RBX
CPUID
XCHG RBX,RSI
AND EAX,0xff000000
XOR ECX,ECX
CMP EAX,0x20000000
SETNZ CL
ADD EBP,ECX
ADD R15D,ECX
INC R15D
CMP R15D,EBX
JL 0x0011b19f
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,R14
CALL 0x001156a0
TEST EBP,EBP
JNZ 0x0011b275
JMP 0x0011b26e
LAB_0011b245:
ADD RSP,0x100
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0011ad88
LAB_0011b259:
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,R14
CALL 0x001156a0
LAB_0011b26e:
CALL 0x0011ad88
MOV EBP,EAX
LAB_0011b275:
MOV EAX,EBP
ADD RSP,0x100
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0011b205) */
/* WARNING: Removing unreachable block (ram,0x0011b164) */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* cpu_get_num_math() */
ulong cpu_get_num_math(void)
{
long lVar1;
uint *puVar2;
uint uVar3;
int iVar4;
long lVar5;
pthread_t __th;
ulong uVar6;
uint uVar7;
uint uVar8;
cpu_set_t local_128;
cpu_set_t local_a8;
lVar5 = sysconf(0x54);
if ((int)lVar5 < 1) {
uVar6 = cpu_get_num_physical_cores();
return uVar6;
}
lVar1 = cpuid_Extended_Feature_Enumeration_info(7);
if ((short)*(int4 *)(lVar1 + 8) < 0) {
__th = pthread_self();
iVar4 = pthread_getaffinity_np(__th,0x80,&local_a8);
if (iVar4 == 0) {
uVar8 = 0;
uVar7 = 0;
do {
local_128.__bits[0xe] = 0;
local_128.__bits[0xf] = 0;
local_128.__bits[0xc] = 0;
local_128.__bits[0xd] = 0;
local_128.__bits[10] = 0;
local_128.__bits[0xb] = 0;
local_128.__bits[8] = 0;
local_128.__bits[9] = 0;
local_128.__bits[6] = 0;
local_128.__bits[7] = 0;
local_128.__bits[4] = 0;
local_128.__bits[5] = 0;
local_128.__bits[2] = 0;
local_128.__bits[3] = 0;
local_128.__bits[0] = 0;
local_128.__bits[1] = 0;
if (uVar8 < 0x400) {
local_128.__bits[uVar8 >> 6] = local_128.__bits[uVar8 >> 6] | 1L << ((byte)uVar8 & 0x3f);
}
iVar4 = pthread_setaffinity_np(__th,0x80,&local_128);
if (iVar4 != 0) {
pthread_setaffinity_np(__th,0x80,&local_a8);
goto LAB_0011b26e;
}
puVar2 = (uint *)cpuid(0x1a);
uVar3 = (uint)((*puVar2 & 0xff000000) != 0x20000000);
uVar7 = uVar7 + uVar3;
uVar8 = uVar8 + uVar3 + 1;
} while ((int)uVar8 < (int)lVar5);
pthread_setaffinity_np(__th,0x80,&local_a8);
if (uVar7 != 0) goto LAB_0011b275;
}
}
LAB_0011b26e:
uVar7 = cpu_get_num_physical_cores();
LAB_0011b275:
return (ulong)uVar7;
}
| |
32,654 | my_hash_next | eloqsql/mysys/hash.c | uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length,
HASH_SEARCH_STATE *current_record)
{
HASH_LINK *pos;
uint idx;
if (*current_record != NO_RECORD)
{
HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*);
for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next)
{
pos=data+idx;
if (!hashcmp(hash,pos,key,length))
{
*current_record= idx;
return pos->data;
}
}
*current_record= NO_RECORD;
}
return 0;
} | O0 | c | my_hash_next:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x2e3c7
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
cmpl $-0x1, -0x34(%rbp)
je 0x2e3bd
movq -0x40(%rbp), %rax
movl -0x34(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x2e250
cmpl $0x0, %eax
jne 0x2e3b0
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x2e3cf
jmp 0x2e3b2
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0x2e367
movq -0x28(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| my_hash_next:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_28]
cmp dword ptr [rax], 0FFFFFFFFh
jz loc_2E3C7
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
mov ecx, [rcx]
shl rcx, 4
add rax, rcx
mov eax, [rax]
mov [rbp+var_34], eax
loc_2E367:
cmp [rbp+var_34], 0FFFFFFFFh
jz short loc_2E3BD
mov rax, [rbp+var_40]
mov ecx, [rbp+var_34]
shl rcx, 4
add rax, rcx
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
call hashcmp
cmp eax, 0
jnz short loc_2E3B0
mov ecx, [rbp+var_34]
mov rax, [rbp+var_28]
mov [rax], ecx
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp short loc_2E3CF
loc_2E3B0:
jmp short $+2
loc_2E3B2:
mov rax, [rbp+var_30]
mov eax, [rax]
mov [rbp+var_34], eax
jmp short loc_2E367
loc_2E3BD:
mov rax, [rbp+var_28]
mov dword ptr [rax], 0FFFFFFFFh
loc_2E3C7:
mov [rbp+var_8], 0
loc_2E3CF:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long my_hash_next(long long a1, long long a2, long long a3, unsigned int *a4)
{
long long v5; // [rsp+0h] [rbp-40h]
unsigned int i; // [rsp+Ch] [rbp-34h]
long long v7; // [rsp+10h] [rbp-30h]
if ( *a4 != -1 )
{
v5 = *(_QWORD *)(a1 + 40);
for ( i = *(_DWORD *)(16LL * *a4 + v5); i != -1; i = *(_DWORD *)v7 )
{
v7 = 16LL * i + v5;
if ( !hashcmp(a1, v7, a2, a3) )
{
*a4 = i;
return *(_QWORD *)(v7 + 8);
}
}
*a4 = -1;
}
return 0LL;
}
| my_hash_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX],-0x1
JZ 0x0012e3c7
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX]
SHL RCX,0x4
ADD RAX,RCX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
LAB_0012e367:
CMP dword ptr [RBP + -0x34],-0x1
JZ 0x0012e3bd
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x34]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x0012e250
CMP EAX,0x0
JNZ 0x0012e3b0
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012e3cf
LAB_0012e3b0:
JMP 0x0012e3b2
LAB_0012e3b2:
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0012e367
LAB_0012e3bd:
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0xffffffff
LAB_0012e3c7:
MOV qword ptr [RBP + -0x8],0x0
LAB_0012e3cf:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 my_hash_next(long param_1,int8 param_2,int8 param_3,uint *param_4)
{
long lVar1;
int iVar2;
uint *puVar3;
uint local_3c;
if (*param_4 != 0xffffffff) {
lVar1 = *(long *)(param_1 + 0x28);
local_3c = *(uint *)(lVar1 + (ulong)*param_4 * 0x10);
while (local_3c != 0xffffffff) {
puVar3 = (uint *)(lVar1 + (ulong)local_3c * 0x10);
iVar2 = hashcmp(param_1,puVar3,param_2,param_3);
if (iVar2 == 0) {
*param_4 = local_3c;
return *(int8 *)(puVar3 + 2);
}
local_3c = *puVar3;
}
*param_4 = 0xffffffff;
}
return 0;
}
| |
32,655 | my_fill_utf8mb3_mb | eloqsql/strings/ctype-utf8.c | static void
my_fill_utf8mb3_mb(CHARSET_INFO *cs, char *str, size_t length, int fill)
{
char *end= str + length;
char buf[10];
char buflen= my_ci_native_to_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
for ( ; str + buflen <= end ; )
{
memcpy(str, buf, buflen);
str+= buflen;
}
for ( ; str < end; )
*str++= ' ';
} | O0 | c | my_fill_utf8mb3_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0xd8(%rax), %rax
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rsi
leaq -0x12(%rbp), %rdx
leaq -0x12(%rbp), %rcx
addq $0xa, %rcx
callq *%rax
movb %al, -0x41(%rbp)
jmp 0xc523d
jmp 0xc523f
movq -0x28(%rbp), %rax
movsbl -0x41(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
cmpq -0x40(%rbp), %rax
ja 0xc5279
movq -0x28(%rbp), %rdi
leaq -0x12(%rbp), %rsi
movsbq -0x41(%rbp), %rdx
callq 0x28290
movsbl -0x41(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0xc523f
jmp 0xc527b
movq -0x28(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0xc5299
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x20, (%rax)
jmp 0xc527b
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xc52b1
addq $0x50, %rsp
popq %rbp
retq
callq 0x28390
nopw %cs:(%rax,%rax)
| my_fill_utf8mb3_mb:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov [rbp+var_34], ecx
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rax, [rax+0D8h]
mov rdi, [rbp+var_20]
movsxd rsi, [rbp+var_34]
lea rdx, [rbp+var_12]
lea rcx, [rbp+var_12]
add rcx, 0Ah
call rax
mov [rbp+var_41], al
jmp short $+2
loc_C523D:
jmp short $+2
loc_C523F:
mov rax, [rbp+var_28]
movsx ecx, [rbp+var_41]
movsxd rcx, ecx
add rax, rcx
cmp rax, [rbp+var_40]
ja short loc_C5279
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_12]
movsx rdx, [rbp+var_41]
call _memcpy
movsx ecx, [rbp+var_41]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp short loc_C523F
loc_C5279:
jmp short $+2
loc_C527B:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_40]
jnb short loc_C5299
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov byte ptr [rax], 20h ; ' '
jmp short loc_C527B
loc_C5299:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_C52B1
add rsp, 50h
pop rbp
retn
loc_C52B1:
call ___stack_chk_fail
| unsigned long long my_fill_utf8mb3_mb(long long a1, _BYTE *a2, long long a3, int a4)
{
_BYTE *v4; // rax
char i; // [rsp+Fh] [rbp-41h]
unsigned long long v7; // [rsp+10h] [rbp-40h]
_BYTE *v8; // [rsp+28h] [rbp-28h]
_BYTE v9[10]; // [rsp+3Eh] [rbp-12h] BYREF
unsigned long long v10; // [rsp+48h] [rbp-8h] BYREF
v10 = __readfsqword(0x28u);
v8 = a2;
v7 = (unsigned long long)&a2[a3];
for ( i = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))(
a1,
a4,
v9,
&v10); (unsigned long long)&v8[i] <= v7; v8 += i )
memcpy(v8, v9, i);
while ( (unsigned long long)v8 < v7 )
{
v4 = v8++;
*v4 = 32;
}
return __readfsqword(0x28u);
}
| my_fill_utf8mb3_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV dword ptr [RBP + -0x34],ECX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0xd8]
MOV RDI,qword ptr [RBP + -0x20]
MOVSXD RSI,dword ptr [RBP + -0x34]
LEA RDX,[RBP + -0x12]
LEA RCX,[RBP + -0x12]
ADD RCX,0xa
CALL RAX
MOV byte ptr [RBP + -0x41],AL
JMP 0x001c523d
LAB_001c523d:
JMP 0x001c523f
LAB_001c523f:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RBP + -0x41]
MOVSXD RCX,ECX
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x40]
JA 0x001c5279
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x12]
MOVSX RDX,byte ptr [RBP + -0x41]
CALL 0x00128290
MOVSX ECX,byte ptr [RBP + -0x41]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001c523f
LAB_001c5279:
JMP 0x001c527b
LAB_001c527b:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001c5299
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV byte ptr [RAX],0x20
JMP 0x001c527b
LAB_001c5299:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001c52b1
ADD RSP,0x50
POP RBP
RET
LAB_001c52b1:
CALL 0x00128390
|
void my_fill_utf8mb3_mb(long param_1,int1 *param_2,long param_3,int param_4)
{
char cVar1;
long in_FS_OFFSET;
int1 *local_30;
int1 local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
cVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,(long)param_4,local_1a,&local_10);
for (local_30 = param_2; local_30 + (int)cVar1 <= param_2 + param_3;
local_30 = local_30 + (int)cVar1) {
memcpy(local_30,local_1a,(long)cVar1);
}
while (local_30 < param_2 + param_3) {
*local_30 = 0x20;
local_30 = local_30 + 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
| |
32,656 | js_os_sleep | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_sleep(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int64_t delay;
int ret;
if (JS_ToInt64(ctx, &delay, argv[0]))
return JS_EXCEPTION;
if (delay < 0)
delay = 0;
#if defined(_WIN32)
{
if (delay > INT32_MAX)
delay = INT32_MAX;
Sleep(delay);
ret = 0;
}
#else
{
struct timespec ts;
ts.tv_sec = delay / 1000;
ts.tv_nsec = (delay % 1000) * 1000000;
ret = js_get_errno(nanosleep(&ts, NULL));
}
#endif
return JS_NewInt32(ctx, ret);
} | O2 | c | js_os_sleep:
pushq %rbx
subq $0x20, %rsp
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0x8(%rsp), %rsi
callq 0x250ae
testl %eax, %eax
je 0x183bc
pushq $0x6
popq %rbx
xorl %eax, %eax
jmp 0x183fe
movq 0x8(%rsp), %rax
testq %rax, %rax
jns 0x183ce
andq $0x0, 0x8(%rsp)
xorl %eax, %eax
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divq %rcx
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
imulq $0xf4240, %rdx, %rax # imm = 0xF4240
movq %rax, 0x8(%rdi)
xorl %esi, %esi
callq 0xe330
movslq %eax, %rdi
callq 0x14f5b
movl %eax, %eax
movq %rbx, %rdx
addq $0x20, %rsp
popq %rbx
retq
| js_os_sleep:
push rbx
sub rsp, 20h
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+28h+var_20]
call JS_ToInt64
test eax, eax
jz short loc_183BC
push 6
pop rbx
xor eax, eax
jmp short loc_183FE
loc_183BC:
mov rax, [rsp+28h+var_20]
test rax, rax
jns short loc_183CE
and [rsp+28h+var_20], 0
xor eax, eax
loc_183CE:
mov ecx, 3E8h
xor edx, edx
div rcx
xor ebx, ebx
lea rdi, [rsp+28h+var_18]
mov [rdi], rax
imul rax, rdx, 0F4240h
mov [rdi+8], rax
xor esi, esi
call _nanosleep
movsxd rdi, eax
call js_get_errno
mov eax, eax
loc_183FE:
mov rdx, rbx
add rsp, 20h
pop rbx
retn
| long long js_os_sleep(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned long long v6; // rax
int v7; // eax
long long v8; // [rsp+8h] [rbp-20h] BYREF
_QWORD v9[3]; // [rsp+10h] [rbp-18h] BYREF
if ( (unsigned int)JS_ToInt64(a1, &v8, *a5, a5[1]) )
return 0LL;
v6 = v8;
if ( v8 < 0 )
{
v8 = 0LL;
v6 = 0LL;
}
v9[0] = v6 / 0x3E8;
v9[1] = 1000000 * (v6 % 0x3E8);
v7 = nanosleep(v9, 0LL);
return (unsigned int)js_get_errno(v7);
}
| js_os_sleep:
PUSH RBX
SUB RSP,0x20
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0x8]
CALL 0x001250ae
TEST EAX,EAX
JZ 0x001183bc
PUSH 0x6
POP RBX
XOR EAX,EAX
JMP 0x001183fe
LAB_001183bc:
MOV RAX,qword ptr [RSP + 0x8]
TEST RAX,RAX
JNS 0x001183ce
AND qword ptr [RSP + 0x8],0x0
XOR EAX,EAX
LAB_001183ce:
MOV ECX,0x3e8
XOR EDX,EDX
DIV RCX
XOR EBX,EBX
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],RAX
IMUL RAX,RDX,0xf4240
MOV qword ptr [RDI + 0x8],RAX
XOR ESI,ESI
CALL 0x0010e330
MOVSXD RDI,EAX
CALL 0x00114f5b
MOV EAX,EAX
LAB_001183fe:
MOV RDX,RBX
ADD RSP,0x20
POP RBX
RET
|
int4 js_os_sleep(int8 param_1)
{
int iVar1;
int4 uVar2;
int8 *in_R8;
ulong local_20;
timespec local_18;
iVar1 = JS_ToInt64(param_1,&local_20,*in_R8,in_R8[1]);
if (iVar1 == 0) {
if ((long)local_20 < 0) {
local_20 = 0;
}
local_18.tv_sec = local_20 / 1000;
local_18.tv_nsec = (local_20 % 1000) * 1000000;
iVar1 = nanosleep(&local_18,(timespec *)0x0);
uVar2 = js_get_errno((long)iVar1);
}
else {
uVar2 = 0;
}
return uVar2;
}
| |
32,657 | mbedtls_cipher_auth_decrypt | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/cipher.c | int mbedtls_cipher_auth_decrypt(mbedtls_cipher_context_t *ctx,
const unsigned char *iv, size_t iv_len,
const unsigned char *ad, size_t ad_len,
const unsigned char *input, size_t ilen,
unsigned char *output, size_t *olen,
const unsigned char *tag, size_t tag_len)
{
CIPHER_VALIDATE_RET(ctx != NULL);
CIPHER_VALIDATE_RET(iv_len == 0 || iv != NULL);
CIPHER_VALIDATE_RET(ad_len == 0 || ad != NULL);
CIPHER_VALIDATE_RET(ilen == 0 || input != NULL);
CIPHER_VALIDATE_RET(ilen == 0 || output != NULL);
CIPHER_VALIDATE_RET(olen != NULL);
CIPHER_VALIDATE_RET(tag_len == 0 || tag != NULL);
return mbedtls_cipher_aead_decrypt(ctx, iv, iv_len, ad, ad_len,
input, ilen, output, olen,
tag, tag_len);
} | O3 | c | mbedtls_cipher_auth_decrypt:
jmp 0x9af25
| mbedtls_cipher_auth_decrypt:
jmp short $+2
| // attributes: thunk
long long mbedtls_cipher_auth_decrypt(
int a1,
int a2,
int a3,
int a4,
int a5,
int a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11)
{
return mbedtls_cipher_aead_decrypt(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
}
| mbedtls_cipher_auth_decrypt:
JMP 0x0019af25
|
int mbedtls_cipher_auth_decrypt
(int8 *param_1,int8 param_2,ulong param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 *param_9,int8 param_10,long param_11)
{
int *piVar1;
int iVar2;
int iVar3;
bool bVar4;
piVar1 = (int *)*param_1;
if (piVar1[1] == 8) {
*param_9 = param_7;
iVar2 = mbedtls_ccm_auth_decrypt(param_1[10],param_7,param_2);
bVar4 = iVar2 == -0xf;
}
else if (piVar1[1] == 6) {
*param_9 = param_7;
iVar2 = mbedtls_gcm_auth_decrypt(param_1[10]);
bVar4 = iVar2 == -0x12;
}
else {
if (*piVar1 != 0x49) {
return -0x6080;
}
if (param_11 != 0x10) {
return -0x6100;
}
if ((uint)piVar1[6] != param_3) {
return -0x6100;
}
*param_9 = param_7;
iVar2 = mbedtls_chachapoly_auth_decrypt
(param_1[10],param_7,param_2,param_4,param_5,param_10,param_6,param_8);
bVar4 = iVar2 == -0x56;
}
iVar3 = -0x6300;
if (!bVar4) {
iVar3 = iVar2;
}
return iVar3;
}
| |
32,658 | rw_pr_rdlock | eloqsql/mysys/thr_rwlock.c | int rw_pr_rdlock(rw_pr_lock_t *rwlock)
{
pthread_mutex_lock(&rwlock->lock);
/*
The fact that we were able to acquire 'lock' mutex means
that there are no active writers and we can acquire rd-lock.
Increment active readers counter to prevent requests for
wr-lock from succeeding and unlock mutex.
*/
rwlock->active_readers++;
pthread_mutex_unlock(&rwlock->lock);
return 0;
} | O3 | c | rw_pr_rdlock:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x244c0
incl 0x58(%rbx)
movq %rbx, %rdi
callq 0x24220
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| rw_pr_rdlock:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call _pthread_mutex_lock
inc dword ptr [rbx+58h]
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
| long long rw_pr_rdlock(long long a1)
{
pthread_mutex_lock(a1);
++*(_DWORD *)(a1 + 88);
pthread_mutex_unlock(a1);
return 0LL;
}
| rw_pr_rdlock:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x001244c0
INC dword ptr [RBX + 0x58]
MOV RDI,RBX
CALL 0x00124220
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 rw_pr_rdlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
*(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1;
pthread_mutex_unlock(param_1);
return 0;
}
| |
32,659 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset() | monkey531[P]llama/common/json.hpp | void reset() noexcept
{
token_buffer.clear();
token_string.clear();
token_string.push_back(char_traits<char_type>::to_char_type(current));
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset():
pushq %rax
movq %rdi, %rax
movq $0x0, 0x58(%rdi)
movq 0x50(%rdi), %rcx
movb $0x0, (%rcx)
addq $0x38, %rdi
movq 0x38(%rax), %rcx
cmpq %rcx, 0x40(%rax)
je 0x66f4b
movq %rcx, 0x40(%rax)
movb 0x14(%rax), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
callq 0x66e08
popq %rax
retq
movq %rax, %rdi
callq 0x2d543
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv:
push rax
mov rax, rdi
mov qword ptr [rdi+58h], 0
mov rcx, [rdi+50h]
mov byte ptr [rcx], 0
add rdi, 38h ; '8'
mov rcx, [rax+38h]
cmp [rax+40h], rcx
jz short loc_66F4B
mov [rax+40h], rcx
loc_66F4B:
mov al, [rax+14h]
lea rsi, [rsp+8+var_1]
mov [rsi], al
call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&)
pop rax
retn
mov rdi, rax
call __clang_call_terminate
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(
long long a1)
{
long long v2; // rdi
long long v3; // rcx
char v4; // [rsp+1h] [rbp-1h] BYREF
*(_QWORD *)(a1 + 88) = 0LL;
**(_BYTE **)(a1 + 80) = 0;
v2 = a1 + 56;
v3 = *(_QWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 64) != v3 )
*(_QWORD *)(a1 + 64) = v3;
v4 = *(_BYTE *)(a1 + 20);
std::vector<char>::emplace_back<char>(v2, &v4);
}
| reset:
PUSH RAX
MOV RAX,RDI
MOV qword ptr [RDI + 0x58],0x0
MOV RCX,qword ptr [RDI + 0x50]
MOV byte ptr [RCX],0x0
ADD RDI,0x38
MOV RCX,qword ptr [RAX + 0x38]
CMP qword ptr [RAX + 0x40],RCX
JZ 0x00166f4b
MOV qword ptr [RAX + 0x40],RCX
LAB_00166f4b:
MOV AL,byte ptr [RAX + 0x14]
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],AL
LAB_00166f55:
CALL 0x00166e08
POP RAX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::reset() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::reset(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int8 in_RAX;
int8 uStack_8;
*(int8 *)(this + 0x58) = 0;
**(int1 **)(this + 0x50) = 0;
if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) {
*(long *)(this + 0x40) = *(long *)(this + 0x38);
}
uStack_8 = CONCAT17(this[0x14],(int7)in_RAX);
/* try { // try from 00166f55 to 00166f59 has its CatchHandler @ 00166f5c */
std::vector<char,std::allocator<char>>::emplace_back<char>
((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7));
return uStack_8;
}
| |
32,660 | my_init | eloqsql/mysys/my_init.c | my_bool my_init(void)
{
char *str;
if (my_init_done)
return 0;
my_init_done= 1;
mysys_usage_id++;
my_umask= 0660; /* Default umask for new files */
my_umask_dir= 0700; /* Default umask for new directories */
my_global_flags= 0;
/* Default creation of new files */
if ((str= getenv("UMASK")) != 0)
my_umask= (int) (atoi_octal(str) | 0600);
/* Default creation of new dir's */
if ((str= getenv("UMASK_DIR")) != 0)
my_umask_dir= (int) (atoi_octal(str) | 0700);
init_glob_errs();
instrumented_stdin.m_file= stdin;
instrumented_stdin.m_psi= NULL; /* not yet instrumented */
mysql_stdin= & instrumented_stdin;
my_progname_short= "unknown";
if (my_progname)
my_progname_short= my_progname + dirname_length(my_progname);
/* Initialize our mutex handling */
my_mutex_init();
if (my_thread_global_init())
return 1;
#if defined(SAFEMALLOC) && !defined(DBUG_OFF)
dbug_sanity= sf_sanity;
#endif
/* $HOME is needed early to parse configuration files located in ~/ */
if ((home_dir= getenv("HOME")) != 0)
home_dir= intern_filename(home_dir_buff, home_dir);
{
DBUG_ENTER("my_init");
DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown"));
my_time_init();
my_win_init();
DBUG_PRINT("exit", ("home: '%s'", home_dir));
#ifdef _WIN32
if (win32_init_tcp_ip())
DBUG_RETURN(1);
#endif
#ifdef CHECK_UNLIKELY
init_my_likely();
#endif
DBUG_RETURN(0);
}
} | O3 | c | my_init:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x34970e(%rip), %rax # 0x378fc0
cmpb $0x0, (%rax)
je 0x2f8be
xorl %eax, %eax
jmp 0x2f9a6
leaq 0x3496ff(%rip), %rcx # 0x378fc4
incl (%rcx)
movb $0x1, (%rax)
leaq 0x2cad97(%rip), %r14 # 0x2fa668
movl $0x1b0, (%r14) # imm = 0x1B0
leaq 0x2cad8d(%rip), %rbx # 0x2fa66c
movl $0x1c0, (%rbx) # imm = 0x1C0
leaq 0x349bac(%rip), %rax # 0x379498
movq $0x0, (%rax)
leaq 0x35486(%rip), %rdi # 0x64d80
callq 0x24470
testq %rax, %rax
je 0x2f914
movq %rax, %rdi
callq 0x2f9e2
orl $0x180, %eax # imm = 0x180
movl %eax, (%r14)
leaq 0x3546b(%rip), %rdi # 0x64d86
callq 0x24470
testq %rax, %rax
je 0x2f934
movq %rax, %rdi
callq 0x2f9e2
orl $0x1c0, %eax # imm = 0x1C0
movl %eax, (%rbx)
callq 0x34690
movq 0x2ca680(%rip), %rax # 0x2f9fc0
movq (%rax), %rax
movq %rax, 0x349686(%rip) # 0x378fd0
leaq 0x34967f(%rip), %rax # 0x378fd0
movq $0x0, 0x34967c(%rip) # 0x378fd8
leaq 0x349665(%rip), %rcx # 0x378fc8
movq %rax, (%rcx)
leaq 0x35423(%rip), %rax # 0x64d90
leaq 0x349704(%rip), %r14 # 0x379078
movq %rax, (%r14)
leaq 0x3496f2(%rip), %rax # 0x379070
movq (%rax), %rbx
testq %rbx, %rbx
je 0x2f994
movq %rbx, %rdi
callq 0x2a654
addq %rbx, %rax
movq %rax, (%r14)
callq 0x31e6c
callq 0x31a34
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
je 0x2f9ab
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x35dba(%rip), %rdi # 0x6576c
callq 0x24470
leaq 0x3496aa(%rip), %rbx # 0x379068
movq %rax, (%rbx)
testq %rax, %rax
je 0x2f9d8
leaq 0x3498b3(%rip), %rdi # 0x379280
movq %rax, %rsi
callq 0x34f49
movq %rax, (%rbx)
callq 0x36c0c
jmp 0x2f8b7
| my_init:
push rbp
mov rbp, rsp
push r14
push rbx
lea rax, my_init_done
cmp byte ptr [rax], 0
jz short loc_2F8BE
loc_2F8B7:
xor eax, eax
jmp loc_2F9A6
loc_2F8BE:
lea rcx, mysys_usage_id
inc dword ptr [rcx]
mov byte ptr [rax], 1
lea r14, my_umask
mov dword ptr [r14], 1B0h
lea rbx, my_umask_dir
mov dword ptr [rbx], 1C0h
lea rax, my_global_flags
mov qword ptr [rax], 0
lea rdi, aUmask; "UMASK"
call _getenv
test rax, rax
jz short loc_2F914
mov rdi, rax
call atoi_octal
or eax, 180h
mov [r14], eax
loc_2F914:
lea rdi, aUmaskDir; "UMASK_DIR"
call _getenv
test rax, rax
jz short loc_2F934
mov rdi, rax
call atoi_octal
or eax, 1C0h
mov [rbx], eax
loc_2F934:
call init_glob_errs
mov rax, cs:stdin_ptr
mov rax, [rax]
mov cs:instrumented_stdin, rax
lea rax, instrumented_stdin
mov cs:qword_378FD8, 0
lea rcx, mysql_stdin
mov [rcx], rax
lea rax, aUnknown; "unknown"
lea r14, my_progname_short
mov [r14], rax
lea rax, my_progname
mov rbx, [rax]
test rbx, rbx
jz short loc_2F994
mov rdi, rbx
call dirname_length
add rax, rbx
mov [r14], rax
loc_2F994:
call my_mutex_init
call my_thread_global_init
mov ecx, eax
mov al, 1
test cl, cl
jz short loc_2F9AB
loc_2F9A6:
pop rbx
pop r14
pop rbp
retn
loc_2F9AB:
lea rdi, aMariadbHome+8; "HOME"
call _getenv
lea rbx, home_dir
mov [rbx], rax
test rax, rax
jz short loc_2F9D8
lea rdi, home_dir_buff
mov rsi, rax
call intern_filename
mov [rbx], rax
loc_2F9D8:
call my_time_init
jmp loc_2F8B7
| char my_init()
{
char result; // al
long long v1; // rax
long long v2; // rax
const char *v3; // rbx
char v4; // cl
long long v5; // rax
if ( my_init_done )
return 0;
++mysys_usage_id;
my_init_done = 1;
my_umask = 432;
my_umask_dir = 448;
my_global_flags = 0LL;
v1 = getenv("UMASK");
if ( v1 )
my_umask = atoi_octal(v1) | 0x180;
v2 = getenv("UMASK_DIR");
if ( v2 )
my_umask_dir = atoi_octal(v2) | 0x1C0;
init_glob_errs();
instrumented_stdin = stdin;
qword_378FD8 = 0LL;
mysql_stdin = &instrumented_stdin;
my_progname_short = "unknown";
v3 = my_progname;
if ( my_progname )
my_progname_short = &v3[dirname_length(my_progname)];
my_mutex_init();
v4 = my_thread_global_init();
result = 1;
if ( !v4 )
{
v5 = getenv("HOME");
home_dir = v5;
if ( v5 )
home_dir = intern_filename(&home_dir_buff, v5);
my_time_init();
return 0;
}
return result;
}
| my_init:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA RAX,[0x478fc0]
CMP byte ptr [RAX],0x0
JZ 0x0012f8be
LAB_0012f8b7:
XOR EAX,EAX
JMP 0x0012f9a6
LAB_0012f8be:
LEA RCX,[0x478fc4]
INC dword ptr [RCX]
MOV byte ptr [RAX],0x1
LEA R14,[0x3fa668]
MOV dword ptr [R14],0x1b0
LEA RBX,[0x3fa66c]
MOV dword ptr [RBX],0x1c0
LEA RAX,[0x479498]
MOV qword ptr [RAX],0x0
LEA RDI,[0x164d80]
CALL 0x00124470
TEST RAX,RAX
JZ 0x0012f914
MOV RDI,RAX
CALL 0x0012f9e2
OR EAX,0x180
MOV dword ptr [R14],EAX
LAB_0012f914:
LEA RDI,[0x164d86]
CALL 0x00124470
TEST RAX,RAX
JZ 0x0012f934
MOV RDI,RAX
CALL 0x0012f9e2
OR EAX,0x1c0
MOV dword ptr [RBX],EAX
LAB_0012f934:
CALL 0x00134690
MOV RAX,qword ptr [0x003f9fc0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00478fd0],RAX
LEA RAX,[0x478fd0]
MOV qword ptr [0x00478fd8],0x0
LEA RCX,[0x478fc8]
MOV qword ptr [RCX],RAX
LEA RAX,[0x164d90]
LEA R14,[0x479078]
MOV qword ptr [R14],RAX
LEA RAX,[0x479070]
MOV RBX,qword ptr [RAX]
TEST RBX,RBX
JZ 0x0012f994
MOV RDI,RBX
CALL 0x0012a654
ADD RAX,RBX
MOV qword ptr [R14],RAX
LAB_0012f994:
CALL 0x00131e6c
CALL 0x00131a34
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JZ 0x0012f9ab
LAB_0012f9a6:
POP RBX
POP R14
POP RBP
RET
LAB_0012f9ab:
LEA RDI,[0x16576c]
CALL 0x00124470
LEA RBX,[0x479068]
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JZ 0x0012f9d8
LEA RDI,[0x479280]
MOV RSI,RAX
CALL 0x00134f49
MOV qword ptr [RBX],RAX
LAB_0012f9d8:
CALL 0x00136c0c
JMP 0x0012f8b7
|
int8 my_init(void)
{
long lVar1;
char cVar2;
uint uVar3;
char *pcVar4;
long lVar5;
if (my_init_done == '\0') {
mysys_usage_id = mysys_usage_id + 1;
my_init_done = '\x01';
my_umask = 0x1b0;
my_umask_dir = 0x1c0;
my_global_flags = 0;
pcVar4 = getenv("UMASK");
if (pcVar4 != (char *)0x0) {
uVar3 = atoi_octal(pcVar4);
my_umask = uVar3 | 0x180;
}
pcVar4 = getenv("UMASK_DIR");
if (pcVar4 != (char *)0x0) {
uVar3 = atoi_octal(pcVar4);
my_umask_dir = uVar3 | 0x1c0;
}
init_glob_errs();
lVar1 = my_progname;
instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_003f9fc0;
instrumented_stdin._8_8_ = 0;
mysql_stdin = instrumented_stdin;
my_progname_short = "unknown";
if (my_progname != 0) {
lVar5 = dirname_length(my_progname);
my_progname_short = (char *)(lVar5 + lVar1);
}
my_mutex_init();
cVar2 = my_thread_global_init();
if (cVar2 != '\0') {
return 1;
}
home_dir = getenv("HOME");
if (home_dir != (char *)0x0) {
home_dir = (char *)intern_filename(home_dir_buff,home_dir);
}
my_time_init();
}
return 0;
}
| |
32,661 | _gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [8], 0>(char const (&) [8]) | monkey531[P]llama/common/json.hpp | iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
} | O0 | cpp | _gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [8], 0>(char const (&) [8]):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xb7200
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rdi
callq 0xb7230
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xb7260
testb $0x1, %al
jne 0x1ba6e6
jmp 0x1ba726
movq 0x10(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xb83d0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x20(%rsp), %rdx
callq 0x1ba740
testb $0x1, %al
jne 0x1ba716
jmp 0x1ba718
jmp 0x1ba735
jmp 0x1ba71a
leaq 0x30(%rsp), %rdi
callq 0xb72e0
jmp 0x1ba6c2
movq 0x10(%rsp), %rdi
callq 0xb7230
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rdi, [rsp+38h+var_10]
mov [rsp+38h+var_28], rdi
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; std::vector<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>>>::begin(void)
mov [rsp+38h+var_8], rax
loc_1BA6C2:
mov rdi, [rsp+38h+var_28]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<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>>>::end(void)
mov [rsp+38h+var_20], rax
lea rdi, [rsp+38h+var_8]
lea rsi, [rsp+38h+var_20]
call _ZN9__gnu_cxxneIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator!=<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>> *,std::vector<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>>>>(__gnu_cxx::__normal_iterator<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>> *,std::vector<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>>>> const&,__gnu_cxx::__normal_iterator<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>> *,std::vector<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>>>> const&)
test al, 1
jnz short loc_1BA6E6
jmp short loc_1BA726
loc_1BA6E6:
mov rax, [rsp+38h+var_28]
add rax, 18h
mov [rsp+38h+var_30], rax
lea rdi, [rsp+38h+var_8]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<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>> *,std::vector<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>>>>::operator->(void)
mov rdi, [rsp+38h+var_30]
mov rsi, rax
mov rdx, [rsp+38h+var_18]
call _ZNKSt8equal_toIvEclIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA12_KcEEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSD_OSE_
test al, 1
jnz short loc_1BA716
jmp short loc_1BA718
loc_1BA716:
jmp short loc_1BA735
loc_1BA718:
jmp short $+2
loc_1BA71A:
lea rdi, [rsp+38h+var_8]
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEppEv; __gnu_cxx::__normal_iterator<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>> *,std::vector<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>>>>::operator++(void)
jmp short loc_1BA6C2
loc_1BA726:
mov rdi, [rsp+38h+var_28]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<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>>>::end(void)
mov [rsp+38h+var_8], rax
loc_1BA735:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
| long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(
long long a1,
long long a2)
{
long long v2; // rax
long long v4; // [rsp+18h] [rbp-20h] BYREF
long long v5; // [rsp+20h] [rbp-18h]
long long v6; // [rsp+28h] [rbp-10h]
long long i; // [rsp+30h] [rbp-8h] BYREF
v6 = a1;
v5 = a2;
for ( i = std::vector<std::pair<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>>>::begin(a1);
;
__gnu_cxx::__normal_iterator<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>> *,std::vector<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>>>>::operator++(&i) )
{
v4 = std::vector<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>>>::end(a1);
if ( !__gnu_cxx::operator!=<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>> *,std::vector<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>>>>(
(long long)&i,
(long long)&v4) )
break;
v2 = __gnu_cxx::__normal_iterator<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>> *,std::vector<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>>>>::operator->((long long)&i);
if ( (std::equal_to<void>::operator()<std::string const&,char const(&)[12]>(a1 + 24, v2, v5) & 1) != 0 )
return i;
}
return std::vector<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>>>::end(a1);
}
| _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA26_KcJS8_cETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSD_OSE_DpOT1_:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x8],RCX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x0015ac20
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x001ba740
ADD RSP,0x28
RET
|
void _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA26_KcJS8_cETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSD_OSE_DpOT1_
(char *param_1,int8 param_2,int8 param_3,int8 param_4)
{
std::__cxx11::string::append(param_1);
_ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_JcETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSA_OSB_DpOT1_
(param_1,param_3,param_4);
return;
}
| |
32,662 | _gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [8], 0>(char const (&) [8]) | monkey531[P]llama/common/json.hpp | iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
} | O2 | cpp | _gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [8], 0>(char const (&) [8]):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r14
movq 0x8(%r15), %rax
cmpq %rax, %r14
je 0x92c3b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3a0ea
testb %al, %al
jne 0x92c38
addq $0x30, %r14
jmp 0x92c1a
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA21_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
push r15
push r14
push rbx
mov rbx, rsi
mov r15, rdi
mov r14, [rdi]
loc_92C1A:
mov rax, [r15+8]
cmp r14, rax
jz short loc_92C3B
mov rdi, r14
mov rsi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_92C38
add r14, 30h ; '0'
jmp short loc_92C1A
loc_92C38:
mov rax, r14
loc_92C3B:
pop rbx
pop r14
pop r15
retn
| long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA21_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(
long long *a1)
{
long long i; // r14
long long result; // rax
for ( i = *a1; ; i += 48LL )
{
result = a1[1];
if ( i == result )
break;
if ( std::operator==<char>(i) )
return i;
}
return result;
}
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA21_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R15,RDI
MOV R14,qword ptr [RDI]
LAB_00192c1a:
MOV RAX,qword ptr [R15 + 0x8]
CMP R14,RAX
JZ 0x00192c3b
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013a0ea
TEST AL,AL
JNZ 0x00192c38
ADD R14,0x30
JMP 0x00192c1a
LAB_00192c38:
MOV RAX,R14
LAB_00192c3b:
POP RBX
POP R14
POP R15
RET
|
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA21_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(int8 *param_1,char *param_2)
{
bool bVar1;
string *psVar2;
string *psVar3;
psVar3 = (string *)*param_1;
while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] &&
(bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) {
psVar3 = psVar3 + 0x30;
}
return psVar2;
}
| |
32,663 | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, float, 0>(fmt::v10::appender, float) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR20 auto write(OutputIt out, T value) -> OutputIt {
if (is_constant_evaluated()) return write(out, value, format_specs<Char>());
if (const_check(!is_supported_floating_point(value))) return out;
auto fspecs = float_specs();
if (detail::signbit(value)) {
fspecs.sign = sign::minus;
value = -value;
}
constexpr auto specs = format_specs<Char>();
using floaty = conditional_t<std::is_same<T, long double>::value, double, T>;
using floaty_uint = typename dragonbox::float_info<floaty>::carrier_uint;
floaty_uint mask = exponent_mask<floaty>();
if ((bit_cast<floaty_uint>(value) & mask) == mask)
return write_nonfinite(out, std::isnan(value), specs, fspecs);
auto dec = dragonbox::to_decimal(static_cast<floaty>(value));
return write_float(out, dec, specs, fspecs, {});
} | O0 | c | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, float, 0>(fmt::v10::appender, float):
subq $0x78, %rsp
movq %rdi, 0x58(%rsp)
movss %xmm0, 0x54(%rsp)
movss 0x54(%rsp), %xmm0
callq 0xd2010
xorb $-0x1, %al
andb $0x1, %al
movb %al, 0x73(%rsp)
testb $0x1, 0x73(%rsp)
je 0xd1ec8
movq 0x58(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0xd2003
leaq 0x4c(%rsp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x15400
movss 0x54(%rsp), %xmm0
movss %xmm0, 0x74(%rsp)
movss 0x74(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0xd2250
testb $0x1, %al
jne 0xd1efa
jmp 0xd1f25
movl 0x50(%rsp), %eax
andl $0xffff00ff, %eax # imm = 0xFFFF00FF
orl $0x100, %eax # imm = 0x100
movl %eax, 0x50(%rsp)
movss 0x54(%rsp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, 0x54(%rsp)
movq 0x81444(%rip), %rax # 0x153370
movq %rax, 0x3c(%rsp)
movq 0x81440(%rip), %rax # 0x153378
movq %rax, 0x44(%rsp)
callq 0xc9e70
movl %eax, 0x38(%rsp)
leaq 0x54(%rsp), %rdi
callq 0xc9e50
andl 0x38(%rsp), %eax
cmpl 0x38(%rsp), %eax
jne 0xd1fa9
movq 0x58(%rsp), %rax
movq %rax, 0x30(%rsp)
movss 0x54(%rsp), %xmm0
callq 0xd21c0
movq 0x3c(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq 0x44(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movzbl %al, %esi
andl $0x1, %esi
leaq 0x4c(%rsp), %r8
callq 0xd2020
movq %rax, 0x60(%rsp)
jmp 0xd2003
movss 0x54(%rsp), %xmm0
callq 0xc95f0
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x4c(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rsp, %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq $0x0, (%rax)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rcx
movq (%rsp), %r8
leaq 0x18(%rsp), %rsi
leaq 0x3c(%rsp), %rdx
callq 0xd21e0
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x78, %rsp
retq
nopl (%rax)
| _ZN3fmt3v106detail5writeIcNS0_8appenderEfTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_:
sub rsp, 78h
mov [rsp+78h+var_20], rdi
movss [rsp+78h+var_24], xmm0
movss xmm0, [rsp+78h+var_24]
call _ZN3fmt3v106detail27is_supported_floating_pointIfEEbT_; fmt::v10::detail::is_supported_floating_point<float>(float)
xor al, 0FFh
and al, 1
mov [rsp+78h+var_5], al
test [rsp+78h+var_5], 1
jz short loc_D1EC8
mov rax, [rsp+78h+var_20]
mov [rsp+78h+var_18], rax
jmp loc_D2003
loc_D1EC8:
lea rdi, [rsp+78h+var_2C]
xor esi, esi
mov edx, 8
call _memset
movss xmm0, [rsp+78h+var_24]
movss [rsp+78h+var_4], xmm0
movss xmm0, [rsp+78h+var_4]
cvtss2sd xmm0, xmm0; double
call _ZSt7signbitd; std::signbit(double)
test al, 1
jnz short loc_D1EFA
jmp short loc_D1F25
loc_D1EFA:
mov eax, dword ptr [rsp+78h+var_2C+4]
and eax, 0FFFF00FFh
or eax, 100h
mov dword ptr [rsp+78h+var_2C+4], eax
movss xmm0, [rsp+78h+var_24]
movd eax, xmm0
xor eax, 80000000h
movd xmm0, eax
movss [rsp+78h+var_24], xmm0
loc_D1F25:
mov rax, cs:qword_153370
mov [rsp+78h+var_3C], rax
mov rax, cs:qword_153378
mov [rsp+78h+var_34], rax
call _ZN3fmt3v106detail13exponent_maskIfEENS1_9dragonbox10float_infoIT_vE12carrier_uintEv; fmt::v10::detail::exponent_mask<float>(void)
mov [rsp+78h+var_40], eax
lea rdi, [rsp+78h+var_24]
call _ZN3fmt3v106detail8bit_castIjfTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_
and eax, [rsp+78h+var_40]
cmp eax, [rsp+78h+var_40]
jnz short loc_D1FA9
mov rax, [rsp+78h+var_20]
mov [rsp+78h+var_48], rax
movss xmm0, [rsp+78h+var_24]; float
call _ZSt5isnanf; std::isnan(float)
mov rcx, [rsp+78h+var_3C]
mov [rsp+78h+var_58], rcx
mov rcx, [rsp+78h+var_34]
mov [rsp+78h+var_50], rcx
mov rdi, [rsp+78h+var_48]
mov rdx, [rsp+78h+var_58]
mov rcx, [rsp+78h+var_50]
movzx esi, al
and esi, 1
lea r8, [rsp+78h+var_2C]
call _ZN3fmt3v106detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_12format_specsIT_EERKNS1_11float_specsE; fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>(fmt::v10::appender,bool,fmt::v10::format_specs<char>,fmt::v10::detail::float_specs const&)
mov [rsp+78h+var_18], rax
jmp short loc_D2003
loc_D1FA9:
movss xmm0, [rsp+78h+var_24]
call _ZN3fmt3v106detail9dragonbox10to_decimalIfEENS2_10decimal_fpIT_EES5_; fmt::v10::detail::dragonbox::to_decimal<float>(float)
mov [rsp+78h+var_60], rax
mov rax, [rsp+78h+var_20]
mov [rsp+78h+var_68], rax
mov rax, [rsp+78h+var_2C]
mov [rsp+78h+var_70], rax
mov rax, rsp
mov [rsp+78h+var_10], rax
mov rax, [rsp+78h+var_10]
mov qword ptr [rax], 0
mov rdi, [rsp+78h+var_68]
mov rcx, [rsp+78h+var_70]
mov r8, [rsp+78h+var_78]
lea rsi, [rsp+78h+var_60]
lea rdx, [rsp+78h+var_3C]
call _ZN3fmt3v106detail11write_floatINS0_8appenderENS1_9dragonbox10decimal_fpIfEEcEET_S7_RKT0_RKNS0_12format_specsIT1_EENS1_11float_specsENS1_10locale_refE; fmt::v10::detail::write_float<fmt::v10::appender,fmt::v10::detail::dragonbox::decimal_fp<float>,char>(fmt::v10::appender,fmt::v10::detail::dragonbox::decimal_fp<float> const&,fmt::v10::format_specs<char> const&,fmt::v10::detail::float_specs,fmt::v10::detail::locale_ref)
mov [rsp+78h+var_18], rax
loc_D2003:
mov rax, [rsp+78h+var_18]
add rsp, 78h
retn
| long long ZN3fmt3v106detail5writeIcNS0_8appenderEfTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_(
long long a1,
float a2)
{
char is_supported_floating; // al
char v3; // al
long long v4; // r9
long long v6; // [rsp+0h] [rbp-78h] BYREF
_QWORD v7[3]; // [rsp+18h] [rbp-60h] BYREF
long long v8; // [rsp+30h] [rbp-48h]
int v9; // [rsp+38h] [rbp-40h]
unsigned long long v10; // [rsp+3Ch] [rbp-3Ch] BYREF
long long v11; // [rsp+44h] [rbp-34h]
long long v12; // [rsp+4Ch] [rbp-2Ch] BYREF
float v13; // [rsp+54h] [rbp-24h] BYREF
long long v14; // [rsp+58h] [rbp-20h]
long long *v16; // [rsp+68h] [rbp-10h]
bool v17; // [rsp+73h] [rbp-5h]
unsigned int v18; // [rsp+74h] [rbp-4h]
v14 = a1;
v13 = a2;
is_supported_floating = fmt::v10::detail::is_supported_floating_point<float>(a2);
v17 = (is_supported_floating & 1) == 0;
if ( (is_supported_floating & 1) == 0 )
return v14;
memset(&v12, 0LL, sizeof(v12));
v18 = LODWORD(v13);
if ( (std::signbit(v13) & 1) != 0 )
{
HIDWORD(v12) = HIDWORD(v12) & 0xFFFF00FF | 0x100;
LODWORD(v13) = _mm_cvtsi128_si32((__m128i)LODWORD(v13)) ^ 0x80000000;
}
v10 = 0xFFFFFFFF00000000LL;
v11 = 0x100000020000000LL;
v9 = fmt::v10::detail::exponent_mask<float>((long long)&v12);
if ( (v9 & (unsigned int)ZN3fmt3v106detail8bit_castIjfTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_((unsigned int *)&v13)) == v9 )
{
v8 = v14;
v3 = std::isnan(v13);
v7[1] = v10;
v7[2] = v11;
return fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>(v8, v3 & 1, v10, v11, &v12);
}
else
{
v7[0] = fmt::v10::detail::dragonbox::to_decimal<float>(v13, (long long)&v13, 0);
v16 = &v6;
return ((long long ( *)(long long, _QWORD *, unsigned long long *, long long, _QWORD, long long, _QWORD, long long, long long))fmt::v10::detail::write_float<fmt::v10::appender,fmt::v10::detail::dragonbox::decimal_fp<float>,char>)(
v14,
v7,
&v10,
v12,
0LL,
v4,
0LL,
v12,
v14);
}
}
| _ZN3fmt3v106detail5writeIcNS0_8appenderEfTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_:
SUB RSP,0x78
MOV qword ptr [RSP + 0x58],RDI
MOVSS dword ptr [RSP + 0x54],XMM0
MOVSS XMM0,dword ptr [RSP + 0x54]
CALL 0x001d2010
XOR AL,0xff
AND AL,0x1
MOV byte ptr [RSP + 0x73],AL
TEST byte ptr [RSP + 0x73],0x1
JZ 0x001d1ec8
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001d2003
LAB_001d1ec8:
LEA RDI,[RSP + 0x4c]
XOR ESI,ESI
MOV EDX,0x8
CALL 0x00115400
MOVSS XMM0,dword ptr [RSP + 0x54]
MOVSS dword ptr [RSP + 0x74],XMM0
MOVSS XMM0,dword ptr [RSP + 0x74]
CVTSS2SD XMM0,XMM0
CALL 0x001d2250
TEST AL,0x1
JNZ 0x001d1efa
JMP 0x001d1f25
LAB_001d1efa:
MOV EAX,dword ptr [RSP + 0x50]
AND EAX,0xffff00ff
OR EAX,0x100
MOV dword ptr [RSP + 0x50],EAX
MOVSS XMM0,dword ptr [RSP + 0x54]
MOVD EAX,XMM0
XOR EAX,0x80000000
MOVD XMM0,EAX
MOVSS dword ptr [RSP + 0x54],XMM0
LAB_001d1f25:
MOV RAX,qword ptr [0x00253370]
MOV qword ptr [RSP + 0x3c],RAX
MOV RAX,qword ptr [0x00253378]
MOV qword ptr [RSP + 0x44],RAX
CALL 0x001c9e70
MOV dword ptr [RSP + 0x38],EAX
LEA RDI,[RSP + 0x54]
CALL 0x001c9e50
AND EAX,dword ptr [RSP + 0x38]
CMP EAX,dword ptr [RSP + 0x38]
JNZ 0x001d1fa9
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x30],RAX
MOVSS XMM0,dword ptr [RSP + 0x54]
CALL 0x001d21c0
MOV RCX,qword ptr [RSP + 0x3c]
MOV qword ptr [RSP + 0x20],RCX
MOV RCX,qword ptr [RSP + 0x44]
MOV qword ptr [RSP + 0x28],RCX
MOV RDI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x28]
MOVZX ESI,AL
AND ESI,0x1
LEA R8,[RSP + 0x4c]
CALL 0x001d2020
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001d2003
LAB_001d1fa9:
MOVSS XMM0,dword ptr [RSP + 0x54]
CALL 0x001c95f0
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x4c]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,RSP
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RAX],0x0
MOV RDI,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
MOV R8,qword ptr [RSP]
LEA RSI,[RSP + 0x18]
LEA RDX,[RSP + 0x3c]
CALL 0x001d21e0
MOV qword ptr [RSP + 0x60],RAX
LAB_001d2003:
MOV RAX,qword ptr [RSP + 0x60]
ADD RSP,0x78
RET
|
detail * _ZN3fmt3v106detail5writeIcNS0_8appenderEfTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_
(float param_1,detail *param_2)
{
bool bVar1;
byte bVar2;
uint uVar3;
ulong uVar4;
int1 local_78 [8];
int8 local_70;
detail *local_68;
int8 local_60;
int8 local_58;
int8 local_50;
detail *local_48;
uint local_40;
int8 local_3c;
int8 local_34;
int4 local_2c;
uint uStack_28;
float local_24;
detail *local_20;
detail *local_18;
int1 *local_10;
byte local_5;
float local_4;
local_24 = param_1;
local_20 = param_2;
bVar1 = fmt::v10::detail::is_supported_floating_point<float>(param_1);
local_5 = (bVar1 ^ 0xffU) & 1;
if (local_5 == 0) {
memset(&local_2c,0,8);
local_4 = local_24;
uVar4 = std::signbit((double)local_24);
if ((uVar4 & 1) != 0) {
uStack_28 = uStack_28 & 0xffff00ff | 0x100;
local_24 = -local_24;
}
local_3c = DAT_00253370;
local_34 = DAT_00253378;
local_40 = fmt::v10::detail::exponent_mask<float>();
uVar3 = _ZN3fmt3v106detail8bit_castIjfTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_
(&local_24);
if ((uVar3 & local_40) == local_40) {
local_48 = local_20;
bVar2 = std::isnan(local_24);
local_58 = local_3c;
local_50 = local_34;
local_18 = (detail *)
fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>
(local_48,bVar2 & 1,local_3c,local_34,&local_2c);
}
else {
local_60 = fmt::v10::detail::dragonbox::to_decimal<float>(local_24);
local_68 = local_20;
local_70 = CONCAT44(uStack_28,local_2c);
local_10 = local_78;
local_18 = (detail *)
fmt::v10::detail::
write_float<fmt::v10::appender,fmt::v10::detail::dragonbox::decimal_fp<float>,char>
(local_20,&local_60,&local_3c,local_70,0);
}
}
else {
local_18 = local_20;
}
return local_18;
}
| |
32,664 | mi_read_static_record | eloqsql/storage/myisam/mi_statrec.c | int _mi_read_static_record(register MI_INFO *info, register my_off_t pos,
register uchar *record)
{
int error;
if (pos != HA_OFFSET_ERROR)
{
if (info->opt_flag & WRITE_CACHE_USED &&
info->rec_cache.pos_in_file <= pos &&
flush_io_cache(&info->rec_cache))
return(-1);
info->rec_cache.seek_not_done=1; /* We have done a seek */
error=info->s->file_read(info, record, info->s->base.reclength,
pos,MYF(MY_NABP)) != 0;
fast_mi_writeinfo(info);
if (! error)
{
if (!*record)
{
my_errno=HA_ERR_RECORD_DELETED;
return(1); /* Record is deleted */
}
info->update|= HA_STATE_AKTIV; /* Record is read */
return(0);
}
return(-1); /* Error on read */
}
fast_mi_writeinfo(info); /* No such record */
return(-1);
} | O3 | c | mi_read_static_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpq $-0x1, %rsi
je 0x8e0bb
movq %rdx, %r14
movq %rsi, %r15
testb $0x10, 0x1c8(%rbx)
je 0x8e05c
cmpq %r15, 0x220(%rbx)
ja 0x8e05c
leaq 0x220(%rbx), %rdi
movl $0x1, %esi
callq 0x9cc75
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x8e0ea
movl $0x1, 0x300(%rbx)
movq (%rbx), %rax
movq 0x140(%rax), %rdx
movl $0x4, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq *0x2e0(%rax)
movq %rax, %r15
movq (%rbx), %rax
cmpl $0x0, 0x368(%rax)
jne 0x8e09e
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8370e
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testq %r15, %r15
jne 0x8e0ea
cmpb $0x0, (%r14)
je 0x8e0d9
orb $0x2, 0x1d0(%rbx)
xorl %r12d, %r12d
jmp 0x8e0ea
movq (%rbx), %rax
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
cmpl $0x0, 0x368(%rax)
jne 0x8e0ea
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8370e
jmp 0x8e0ea
callq 0xac2be
movl $0x86, (%rax)
movl $0x1, %r12d
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _mi_read_static_record:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
cmp rsi, 0FFFFFFFFFFFFFFFFh
jz loc_8E0BB
mov r14, rdx
mov r15, rsi
test byte ptr [rbx+1C8h], 10h
jz short loc_8E05C
cmp [rbx+220h], r15
ja short loc_8E05C
lea rdi, [rbx+220h]
mov esi, 1
call my_b_flush_io_cache
mov r12d, 0FFFFFFFFh
test eax, eax
jnz loc_8E0EA
loc_8E05C:
mov dword ptr [rbx+300h], 1
mov rax, [rbx]
mov rdx, [rax+140h]
mov r8d, 4
mov rdi, rbx
mov rsi, r14
mov rcx, r15
call qword ptr [rax+2E0h]
mov r15, rax
mov rax, [rbx]
cmp dword ptr [rax+368h], 0
jnz short loc_8E09E
mov rdi, rbx
xor esi, esi
call _mi_writeinfo
loc_8E09E:
mov r12d, 0FFFFFFFFh
test r15, r15
jnz short loc_8E0EA
cmp byte ptr [r14], 0
jz short loc_8E0D9
or byte ptr [rbx+1D0h], 2
xor r12d, r12d
jmp short loc_8E0EA
loc_8E0BB:
mov rax, [rbx]
mov r12d, 0FFFFFFFFh
cmp dword ptr [rax+368h], 0
jnz short loc_8E0EA
mov rdi, rbx
xor esi, esi
call _mi_writeinfo
jmp short loc_8E0EA
loc_8E0D9:
call _my_thread_var
mov dword ptr [rax], 86h
mov r12d, 1
loc_8E0EA:
mov eax, r12d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long mi_read_static_record(long long a1, unsigned long long a2, _BYTE *a3)
{
unsigned int v4; // r12d
long long v5; // r15
if ( a2 == -1LL )
{
v4 = -1;
if ( !*(_DWORD *)(*(_QWORD *)a1 + 872LL) )
mi_writeinfo((_QWORD *)a1, 0);
}
else if ( (*(_BYTE *)(a1 + 456) & 0x10) == 0
|| *(_QWORD *)(a1 + 544) > a2
|| (v4 = -1, !(unsigned int)my_b_flush_io_cache(a1 + 544, 1LL)) )
{
*(_DWORD *)(a1 + 768) = 1;
v5 = (*(long long ( **)(long long, _BYTE *, _QWORD, unsigned long long, long long))(*(_QWORD *)a1 + 736LL))(
a1,
a3,
*(_QWORD *)(*(_QWORD *)a1 + 320LL),
a2,
4LL);
if ( !*(_DWORD *)(*(_QWORD *)a1 + 872LL) )
mi_writeinfo((_QWORD *)a1, 0);
v4 = -1;
if ( !v5 )
{
if ( *a3 )
{
*(_BYTE *)(a1 + 464) |= 2u;
return 0;
}
else
{
*(_DWORD *)my_thread_var(a1) = 134;
return 1;
}
}
}
return v4;
}
| _mi_read_static_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
CMP RSI,-0x1
JZ 0x0018e0bb
MOV R14,RDX
MOV R15,RSI
TEST byte ptr [RBX + 0x1c8],0x10
JZ 0x0018e05c
CMP qword ptr [RBX + 0x220],R15
JA 0x0018e05c
LEA RDI,[RBX + 0x220]
MOV ESI,0x1
CALL 0x0019cc75
MOV R12D,0xffffffff
TEST EAX,EAX
JNZ 0x0018e0ea
LAB_0018e05c:
MOV dword ptr [RBX + 0x300],0x1
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RAX + 0x140]
MOV R8D,0x4
MOV RDI,RBX
MOV RSI,R14
MOV RCX,R15
CALL qword ptr [RAX + 0x2e0]
MOV R15,RAX
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x0018e09e
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0018370e
LAB_0018e09e:
MOV R12D,0xffffffff
TEST R15,R15
JNZ 0x0018e0ea
CMP byte ptr [R14],0x0
JZ 0x0018e0d9
OR byte ptr [RBX + 0x1d0],0x2
XOR R12D,R12D
JMP 0x0018e0ea
LAB_0018e0bb:
MOV RAX,qword ptr [RBX]
MOV R12D,0xffffffff
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x0018e0ea
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0018370e
JMP 0x0018e0ea
LAB_0018e0d9:
CALL 0x001ac2be
MOV dword ptr [RAX],0x86
MOV R12D,0x1
LAB_0018e0ea:
MOV EAX,R12D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 _mi_read_static_record(long *param_1,ulong param_2,char *param_3)
{
int iVar1;
long lVar2;
int4 *puVar3;
int8 uVar4;
if (param_2 == 0xffffffffffffffff) {
uVar4 = 0xffffffff;
if (*(int *)(*param_1 + 0x368) == 0) {
_mi_writeinfo(param_1,0);
}
}
else {
if ((((*(byte *)(param_1 + 0x39) & 0x10) != 0) && ((ulong)param_1[0x44] <= param_2)) &&
(iVar1 = my_b_flush_io_cache(param_1 + 0x44,1), iVar1 != 0)) {
return 0xffffffff;
}
*(int4 *)(param_1 + 0x60) = 1;
lVar2 = (**(code **)(*param_1 + 0x2e0))
(param_1,param_3,*(int8 *)(*param_1 + 0x140),param_2,4);
if (*(int *)(*param_1 + 0x368) == 0) {
_mi_writeinfo(param_1,0);
}
uVar4 = 0xffffffff;
if (lVar2 == 0) {
if (*param_3 == '\0') {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x86;
uVar4 = 1;
}
else {
*(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 2;
uVar4 = 0;
}
}
}
return uVar4;
}
| |
32,665 | testing::Test::RecordProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int) | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc | void Test::RecordProperty(const std::string& key, int value) {
Message value_message;
value_message << value;
RecordProperty(key, value_message.GetString().c_str());
} | O1 | cpp | testing::Test::RecordProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl %esi, %ebp
movq %rdi, %r14
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0x20c50
movq (%rbx), %rbx
leaq 0x10(%rbx), %rdi
movl %ebp, %esi
callq 0x9960
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x20eb3
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3518c
callq 0x1d29e
leaq 0x4139b4d(%rip), %rdi # 0x415df20
leaq 0x28(%rsp), %rdx
movq %r14, %rsi
callq 0x24308
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x243fb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x94c0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24416
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
testq %rbx, %rbx
je 0x24424
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
jmp 0x24457
jmp 0x24434
movq %rax, %r14
jmp 0x24472
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24457
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x94c0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24472
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
testq %rbx, %rbx
je 0x24480
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq %r14, %rdi
callq 0x99a0
| _ZN7testing4Test14RecordPropertyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi:
push rbp
push r14
push rbx
sub rsp, 50h
mov ebp, esi
mov r14, rdi
lea rbx, [rsp+68h+var_20]
mov rdi, rbx; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rbx, [rbx]
lea rdi, [rbx+10h]
mov esi, ebp
call __ZNSolsEi; std::ostream::operator<<(int)
lea rdi, [rsp+68h+var_60]
mov rsi, rbx
call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *)
mov rsi, [rsp+68h+var_60]
lea rdi, [rsp+68h+var_40]; this
lea rdx, [rsp+68h+var_61]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void)
lea rdi, _ZZN7testing8UnitTest11GetInstanceEvE8instance; testing::UnitTest::GetInstance(void)::instance
lea rdx, [rsp+68h+var_40]
mov rsi, r14
call _ZN7testing8UnitTest14RecordPropertyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; testing::UnitTest::RecordProperty(std::string const&,std::string const&)
lea rax, [rsp+68h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_243FB
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_243FB:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_24416
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_24416:
test rbx, rbx
jz short loc_24424
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+8]
loc_24424:
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
mov r14, rax
jmp short loc_24457
jmp short $+2
loc_24434:
mov r14, rax
jmp short loc_24472
mov r14, rax
lea rax, [rsp+arg_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_24457
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_24457:
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_24472
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_24472:
test rbx, rbx
jz short loc_24480
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+8]
loc_24480:
mov rdi, r14
call __Unwind_Resume
| void testing::Test::RecordProperty(long long a1, unsigned int a2)
{
long long v2; // rbx
char v4; // [rsp+7h] [rbp-61h] BYREF
long long *v5; // [rsp+8h] [rbp-60h] BYREF
long long v6; // [rsp+18h] [rbp-50h] BYREF
void *v7[2]; // [rsp+28h] [rbp-40h] BYREF
long long v8; // [rsp+38h] [rbp-30h] BYREF
long long v9[4]; // [rsp+48h] [rbp-20h] BYREF
testing::Message::Message((testing::Message *)v9);
v2 = v9[0];
std::ostream::operator<<(v9[0] + 16, a2);
testing::internal::StringStreamToString((long long)&v5, v2);
std::string::basic_string<std::allocator<char>>(v7, v5, &v4);
testing::UnitTest::GetInstance((testing::UnitTest *)v7);
testing::UnitTest::RecordProperty((long long)&testing::UnitTest::GetInstance(void)::instance);
if ( v7[0] != &v8 )
{
a1 = v8 + 1;
operator delete(v7[0], v8 + 1);
}
if ( v5 != &v6 )
{
a1 = v6 + 1;
operator delete(v5, v6 + 1);
}
if ( v2 )
(*(void ( **)(long long, long long))(*(_QWORD *)v2 + 8LL))(v2, a1);
}
| RecordProperty:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV EBP,ESI
MOV R14,RDI
LEA RBX,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00120c50
MOV RBX,qword ptr [RBX]
LEA RDI,[RBX + 0x10]
LAB_0012439f:
MOV ESI,EBP
CALL 0x00109960
LAB_001243a6:
LEA RDI,[RSP + 0x8]
MOV RSI,RBX
CALL 0x00120eb3
MOV RSI,qword ptr [RSP + 0x8]
LAB_001243b8:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
CALL 0x0013518c
LAB_001243c7:
CALL 0x0011d29e
LEA RDI,[0x425df20]
LEA RDX,[RSP + 0x28]
MOV RSI,R14
CALL 0x00124308
LAB_001243e0:
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001243fb
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001094c0
LAB_001243fb:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00124416
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001094c0
LAB_00124416:
TEST RBX,RBX
JZ 0x00124424
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x8]
LAB_00124424:
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
|
/* testing::Test::RecordProperty(std::__cxx11::string const&, int) */
void testing::Test::RecordProperty(string *param_1,int param_2)
{
allocator local_61;
long *local_60 [2];
long local_50 [2];
long *local_40 [2];
long local_30 [2];
long *local_20;
Message::Message((Message *)&local_20);
/* try { // try from 0012439f to 001243a5 has its CatchHandler @ 00124434 */
std::ostream::operator<<((ostream *)(local_20 + 2),param_2);
/* try { // try from 001243a6 to 001243b2 has its CatchHandler @ 00124432 */
internal::StringStreamToString((stringstream *)local_60);
/* try { // try from 001243b8 to 001243c6 has its CatchHandler @ 0012442d */
std::__cxx11::string::string<std::allocator<char>>
((string *)local_40,(char *)local_60[0],&local_61);
/* try { // try from 001243c7 to 001243df has its CatchHandler @ 00124439 */
UnitTest::GetInstance();
UnitTest::RecordProperty((UnitTest *)UnitTest::GetInstance()::instance,param_1,(string *)local_40)
;
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
if (local_20 != (long *)0x0) {
(**(code **)(*local_20 + 8))(local_20);
}
return;
}
| |
32,666 | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, minja::Value&&) | monkey531[P]llama/common/json.hpp | std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
} | O0 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, minja::Value&&):
subq $0x68, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x113650
movq %rax, 0x38(%rsp)
movq 0x8(%rsp), %rdi
callq 0x1136c0
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x113680
testb $0x1, %al
jne 0x1271eb
jmp 0x127242
movq 0x8(%rsp), %rax
addq $0x18, %rax
movq %rax, (%rsp)
leaq 0x38(%rsp), %rdi
callq 0x1136f0
movq (%rsp), %rdi
movq %rax, %rsi
movq 0x48(%rsp), %rdx
callq 0x1272a0
testb $0x1, %al
jne 0x127219
jmp 0x127234
movb $0x0, 0x2f(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x2f(%rsp), %rdx
callq 0x120000
jmp 0x127292
jmp 0x127236
leaq 0x38(%rsp), %rdi
callq 0x113a40
jmp 0x1271c7
movq 0x8(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x1272d0
movq 0x8(%rsp), %rdi
callq 0x1136c0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x1200c0
movq %rax, 0x20(%rsp)
movb $0x1, 0x17(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x17(%rsp), %rdx
callq 0x120100
movq 0x58(%rsp), %rax
movb 0x60(%rsp), %dl
addq $0x68, %rsp
retq
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_:
sub rsp, 68h
mov [rsp+68h+var_18], rdi
mov [rsp+68h+var_20], rsi
mov [rsp+68h+var_28], rdx
mov rdi, [rsp+68h+var_18]
mov [rsp+68h+var_60], rdi
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE5beginEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::begin(void)
mov [rsp+68h+var_30], rax
loc_1271C7:
mov rdi, [rsp+68h+var_60]
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void)
mov [rsp+68h+var_38], rax
lea rdi, [rsp+68h+var_30]
lea rsi, [rsp+68h+var_38]
call _ZN9__gnu_cxxneIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbRKNS_17__normal_iteratorIT_T0_EEST_; __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&)
test al, 1
jnz short loc_1271EB
jmp short loc_127242
loc_1271EB:
mov rax, [rsp+68h+var_60]
add rax, 18h
mov [rsp+68h+var_68], rax
lea rdi, [rsp+68h+var_30]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator->(void)
mov rdi, [rsp+68h+var_68]
mov rsi, rax
mov rdx, [rsp+68h+var_20]
call _ZNKSt8equal_toIvEclIRKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEESI_EEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSJ_OSK_
test al, 1
jnz short loc_127219
jmp short loc_127234
loc_127219:
mov [rsp+68h+var_39], 0
lea rdi, [rsp+68h+var_10]
lea rsi, [rsp+68h+var_30]
lea rdx, [rsp+68h+var_39]
call _ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbEC2IRSO_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIST_SU_EEEbE4typeELb1EEEOST_OSU_
jmp short loc_127292
loc_127234:
jmp short $+2
loc_127236:
lea rdi, [rsp+68h+var_30]
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator++(void)
jmp short loc_1271C7
loc_127242:
mov rdi, [rsp+68h+var_60]
mov rsi, [rsp+68h+var_20]
mov rdx, [rsp+68h+var_28]
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE12emplace_backIJRSF_SH_EEERSI_DpOT_; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::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> const&,minja::Value>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value &&)
mov rdi, [rsp+68h+var_60]
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void)
mov [rsp+68h+var_50], rax
mov rdi, [rsp+68h+var_50]
mov esi, 1
call _ZSt4prevIN9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS4_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS4_14adl_serializerES7_IhSaIhEEvEEN5minja5ValueEES7_ISL_SaISL_EEEEET_SQ_NSt15iterator_traitsISQ_E15difference_typeE; std::prev<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::iterator_traits<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>::difference_type)
mov [rsp+68h+var_48], rax
mov [rsp+68h+var_51], 1
lea rdi, [rsp+68h+var_10]
lea rsi, [rsp+68h+var_48]
lea rdx, [rsp+68h+var_51]
call _ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbEC2ISO_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISS_ST_EEEbE4typeELb1EEEOSS_OST_
loc_127292:
mov rax, [rsp+68h+var_10]
mov dl, [rsp+68h+var_8]
add rsp, 68h
retn
| long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace(
long long a1,
long long a2,
long long a3)
{
long long v3; // rax
char v5; // [rsp+17h] [rbp-51h] BYREF
long long v6; // [rsp+18h] [rbp-50h]
long long v7; // [rsp+20h] [rbp-48h] BYREF
char v8; // [rsp+2Fh] [rbp-39h] BYREF
long long v9; // [rsp+30h] [rbp-38h] BYREF
long long i; // [rsp+38h] [rbp-30h] BYREF
long long v11; // [rsp+40h] [rbp-28h]
long long v12; // [rsp+48h] [rbp-20h]
long long v13; // [rsp+50h] [rbp-18h]
long long v14; // [rsp+58h] [rbp-10h] BYREF
v13 = a1;
v12 = a2;
v11 = a3;
for ( i = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::begin(a1);
;
__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator++(&i) )
{
v9 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(a1);
if ( !__gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>(
(long long)&i,
(long long)&v9) )
break;
v3 = __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator->((long long)&i);
if ( (std::equal_to<void>::operator()<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>(
a1 + 24,
v3,
v12) & 1) != 0 )
{
v8 = 0;
ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbEC2IRSO_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIST_SU_EEEbE4typeELb1EEEOST_OSU_(
(long long)&v14,
&i,
&v8);
return v14;
}
}
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::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> const&,minja::Value>(
a1,
v12,
v11);
v6 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(a1);
v7 = std::prev<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>(
v6,
1LL);
v5 = 1;
ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbEC2ISO_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISS_ST_EEEbE4typeELb1EEEOSS_OST_(
(long long)&v14,
&v7,
&v5);
return v14;
}
| |||
32,667 | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, minja::Value&&) | monkey531[P]llama/common/json.hpp | std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
} | O3 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, minja::Value&&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
cmpq 0x8(%rdi), %rbx
je 0x8ea4b
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8cd76
testb %al, %al
jne 0x8ea65
addq $0x60, %rbx
cmpq 0x8(%r14), %rbx
jne 0x8ea32
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x8ea76
movq 0x8(%r14), %rbx
addq $-0x60, %rbx
movb $0x1, %dl
jmp 0x8ea67
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_:
push r15
push r14
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
cmp rbx, [rdi+8]
jz short loc_8EA4B
loc_8EA32:
mov rdi, rbx
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_8EA65
add rbx, 60h ; '`'
cmp rbx, [r14+8]
jnz short loc_8EA32
loc_8EA4B:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE12emplace_backIJRSF_SH_EEERSI_DpOT_; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::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> const&,minja::Value>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value &&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFA0h
mov dl, 1
jmp short loc_8EA67
loc_8EA65:
xor edx, edx
loc_8EA67:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace(
long long a1,
unsigned __int8 *a2,
long long a3,
__m128d a4)
{
unsigned __int8 *v5; // rbx
v5 = *(unsigned __int8 **)a1;
if ( *(_QWORD *)a1 == *(_QWORD *)(a1 + 8) )
{
LABEL_4:
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::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> const&,minja::Value>(
a1,
a2,
a3);
return *(_QWORD *)(a1 + 8) - 96LL;
}
else
{
while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v5, a2, a4) )
{
v5 += 96;
if ( v5 == *(unsigned __int8 **)(a1 + 8) )
goto LABEL_4;
}
}
return (long long)v5;
}
| emplace:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
CMP RBX,qword ptr [RDI + 0x8]
JZ 0x0018ea4b
LAB_0018ea32:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0018cd76
TEST AL,AL
JNZ 0x0018ea65
ADD RBX,0x60
CMP RBX,qword ptr [R14 + 0x8]
JNZ 0x0018ea32
LAB_0018ea4b:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x0018ea76
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x60
MOV DL,0x1
JMP 0x0018ea67
LAB_0018ea65:
XOR EDX,EDX
LAB_0018ea67:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&, minja::Value&&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::emplace(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1,Value *param_2)
{
char cVar1;
int8 extraout_RDX;
int8 uVar2;
basic_json *pbVar3;
int1 auVar4 [16];
pbVar3 = *(basic_json **)this;
if (pbVar3 != *(basic_json **)(this + 8)) {
do {
cVar1 = operator==(pbVar3,param_1);
if (cVar1 != '\0') {
uVar2 = 0;
goto LAB_0018ea67;
}
pbVar3 = pbVar3 + 0x60;
} while (pbVar3 != *(basic_json **)(this + 8));
}
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::
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>const&,minja::Value>
((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this,param_1,param_2);
pbVar3 = (basic_json *)(*(long *)(this + 8) + -0x60);
uVar2 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_0018ea67:
auVar4._8_8_ = uVar2;
auVar4._0_8_ = pbVar3;
return auVar4;
}
| |
32,668 | minja::Value::operator+(minja::Value const&) const | monkey531[P]llama/common/minja.hpp | Value operator+(const Value& rhs) const {
if (is_string() || rhs.is_string()) {
return to_str() + rhs.to_str();
} else if (is_number_integer() && rhs.is_number_integer()) {
return get<int64_t>() + rhs.get<int64_t>();
} else if (is_array() && rhs.is_array()) {
auto res = Value::array();
for (const auto& item : *array_) res.push_back(item);
for (const auto& item : *rhs.array_) res.push_back(item);
return res;
} else {
return get<double>() + rhs.get<double>();
}
} | O2 | cpp | minja::Value::operator+(minja::Value const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movb 0x40(%rsi), %al
cmpb $0x3, %al
je 0x700bb
movb 0x40(%r14), %cl
cmpb $0x3, %cl
jne 0x70126
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
callq 0x6ffd8
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x6ffd8
leaq 0x10(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x38faf
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x65acc
leaq 0x10(%rsp), %rdi
callq 0x241a8
leaq 0x48(%rsp), %rdi
callq 0x241a8
leaq 0x68(%rsp), %rdi
callq 0x241a8
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addb $-0x5, %al
addb $-0x5, %cl
orb %al, %cl
cmpb $0x1, %cl
ja 0x7015a
movq %r15, %rdi
callq 0x62b24
movq %rax, %r15
movq %r14, %rdi
callq 0x62b24
addq %r15, %rax
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x62bda
jmp 0x70114
cmpq $0x0, 0x10(%r15)
je 0x701ad
cmpq $0x0, 0x10(%r14)
je 0x701ad
xorpd %xmm0, %xmm0
leaq 0x30(%rsp), %rsi
movapd %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0x68f30
leaq 0x30(%rsp), %rdi
callq 0x68742
movq 0x10(%r15), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
cmpq %r12, %r15
je 0x701df
movq %rbx, %rdi
movq %r15, %rsi
callq 0x68f9c
addq $0x50, %r15
jmp 0x70197
movq %r15, %rdi
callq 0x62bf8
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x62bf8
addsd 0x8(%rsp), %xmm0
leaq 0x10(%rsp), %rsi
movsd %xmm0, (%rsi)
movq %rbx, %rdi
callq 0x62cae
jmp 0x70114
movq 0x10(%r14), %rax
movq (%rax), %r14
movq 0x8(%rax), %r15
cmpq %r15, %r14
je 0x70114
movq %rbx, %rdi
movq %r14, %rsi
callq 0x68f9c
addq $0x50, %r14
jmp 0x701ea
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x68742
jmp 0x7024d
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241a8
jmp 0x70225
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x241a8
jmp 0x70234
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x241a8
jmp 0x7024d
jmp 0x70242
movq %rax, %r14
movq %rbx, %rdi
callq 0x62aee
movq %r14, %rdi
callq 0x23f70
nop
| _ZNK5minja5ValueplERKS0_:
push r15
push r14
push r12
push rbx
sub rsp, 88h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov al, [rsi+40h]
cmp al, 3
jz short loc_700BB
mov cl, [r14+40h]
cmp cl, 3
jnz short loc_70126
loc_700BB:
lea rdi, [rsp+0A8h+var_40]; this
mov rsi, r15; minja::Value *
call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void)
lea rdi, [rsp+0A8h+var_60]; this
mov rsi, r14; minja::Value *
call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void)
lea rdi, [rsp+0A8h+var_98]
lea rsi, [rsp+0A8h+var_40]
lea rdx, [rsp+0A8h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rsi, [rsp+0A8h+var_98]
mov rdi, rbx
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
lea rdi, [rsp+0A8h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_70114:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
loc_70126:
add al, 0FBh
add cl, 0FBh
or cl, al
cmp cl, 1
ja short loc_7015A
mov rdi, r15
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r15, rax
mov rdi, r14
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
add rax, r15
lea rsi, [rsp+0A8h+var_98]; __int64 *
mov [rsi], rax
mov rdi, rbx; this
call _ZN5minja5ValueC2ERKl; minja::Value::Value(long const&)
jmp short loc_70114
loc_7015A:
cmp qword ptr [r15+10h], 0
jz short loc_701AD
cmp qword ptr [r14+10h], 0
jz short loc_701AD
xorpd xmm0, xmm0
lea rsi, [rsp+0A8h+var_78]
movapd xmmword ptr [rsi], xmm0
and qword ptr [rsi+10h], 0
mov rdi, rbx
call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>)
lea rdi, [rsp+0A8h+var_78]
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
mov rax, [r15+10h]
mov r15, [rax]
mov r12, [rax+8]
loc_70197:
cmp r15, r12
jz short loc_701DF
mov rdi, rbx; this
mov rsi, r15; minja::Value *
call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&)
add r15, 50h ; 'P'
jmp short loc_70197
loc_701AD:
mov rdi, r15
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+0A8h+var_A0], xmm0
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
addsd xmm0, [rsp+0A8h+var_A0]
lea rsi, [rsp+0A8h+var_98]; double *
movsd qword ptr [rsi], xmm0
mov rdi, rbx; this
call _ZN5minja5ValueC2ERKd; minja::Value::Value(double const&)
jmp loc_70114
loc_701DF:
mov rax, [r14+10h]
mov r14, [rax]
mov r15, [rax+8]
loc_701EA:
cmp r14, r15
jz loc_70114
mov rdi, rbx; this
mov rsi, r14; minja::Value *
call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&)
add r14, 50h ; 'P'
jmp short loc_701EA
mov r14, rax
lea rdi, [rsp+arg_28]
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
jmp short loc_7024D
mov r14, rax
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_70225
mov r14, rax
loc_70225:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_70234
mov r14, rax
loc_70234:
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7024D
jmp short $+2
loc_70242:
mov r14, rax
mov rdi, rbx; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_7024D:
mov rdi, r14
call __Unwind_Resume
| minja::Value * minja::Value::operator+(
minja::Value *this,
minja::Value *a2,
const minja::Value ***a3,
double a4)
{
char v5; // al
char v6; // cl
long long v8; // r15
const minja::Value **v9; // rax
const minja::Value *v10; // r15
const minja::Value *v11; // r12
const minja::Value **v12; // rax
const minja::Value *v13; // r14
const minja::Value *v14; // r15
long long v15[4]; // [rsp+10h] [rbp-98h] BYREF
__int128 v16; // [rsp+30h] [rbp-78h] BYREF
long long v17; // [rsp+40h] [rbp-68h]
_QWORD v18[4]; // [rsp+48h] [rbp-60h] BYREF
_QWORD v19[8]; // [rsp+68h] [rbp-40h] BYREF
v5 = *((_BYTE *)a2 + 64);
if ( v5 == 3 || (v6 = *((_BYTE *)a3 + 64), v6 == 3) )
{
minja::Value::to_str[abi:cxx11]((std::__cxx11 *)v19, a2, a4);
minja::Value::to_str[abi:cxx11]((std::__cxx11 *)v18, (minja::Value *)a3, a4);
std::operator+<char>((long long)v15, v19, v18);
minja::Value::Value((long long)this, (long long)v15);
std::string::~string(v15);
std::string::~string(v18);
std::string::~string(v19);
}
else if ( (unsigned __int8)((v5 - 5) | (v6 - 5)) > 1u )
{
if ( *((_QWORD *)a2 + 2) && a3[2] )
{
v16 = 0LL;
v17 = 0LL;
minja::Value::array((long long)this, (long long *)&v16);
std::vector<minja::Value>::~vector((long long)&v16);
v9 = (const minja::Value **)*((_QWORD *)a2 + 2);
v10 = *v9;
v11 = v9[1];
while ( v10 != v11 )
{
minja::Value::push_back(this, v10);
v10 = (const minja::Value *)((char *)v10 + 80);
}
v12 = a3[2];
v13 = *v12;
v14 = v12[1];
while ( v13 != v14 )
{
minja::Value::push_back(this, v13);
v13 = (const minja::Value *)((char *)v13 + 80);
}
}
else
{
minja::Value::get<double>(a2);
minja::Value::get<double>((minja::Value *)a3);
*(double *)v15 = a4 + a4;
minja::Value::Value(this, (const double *)v15);
}
}
else
{
v8 = minja::Value::get<long>(a2);
v15[0] = v8 + minja::Value::get<long>((minja::Value *)a3);
minja::Value::Value(this, v15);
}
return this;
}
| operator+:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
CMP AL,0x3
JZ 0x001700bb
MOV CL,byte ptr [R14 + 0x40]
CMP CL,0x3
JNZ 0x00170126
LAB_001700bb:
LEA RDI,[RSP + 0x68]
MOV RSI,R15
CALL 0x0016ffd8
LAB_001700c8:
LEA RDI,[RSP + 0x48]
MOV RSI,R14
CALL 0x0016ffd8
LAB_001700d5:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x68]
LEA RDX,[RSP + 0x48]
CALL 0x00138faf
LAB_001700e9:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x00165acc
LAB_001700f6:
LEA RDI,[RSP + 0x10]
CALL 0x001241a8
LEA RDI,[RSP + 0x48]
CALL 0x001241a8
LEA RDI,[RSP + 0x68]
CALL 0x001241a8
LAB_00170114:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00170126:
ADD AL,0xfb
ADD CL,0xfb
OR CL,AL
CMP CL,0x1
JA 0x0017015a
MOV RDI,R15
CALL 0x00162b24
MOV R15,RAX
MOV RDI,R14
CALL 0x00162b24
ADD RAX,R15
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RAX
MOV RDI,RBX
CALL 0x00162bda
JMP 0x00170114
LAB_0017015a:
CMP qword ptr [R15 + 0x10],0x0
JZ 0x001701ad
CMP qword ptr [R14 + 0x10],0x0
JZ 0x001701ad
XORPD XMM0,XMM0
LEA RSI,[RSP + 0x30]
MOVAPD xmmword ptr [RSI],XMM0
AND qword ptr [RSI + 0x10],0x0
LAB_0017017a:
MOV RDI,RBX
CALL 0x00168f30
LEA RDI,[RSP + 0x30]
CALL 0x00168742
MOV RAX,qword ptr [R15 + 0x10]
MOV R15,qword ptr [RAX]
MOV R12,qword ptr [RAX + 0x8]
LAB_00170197:
CMP R15,R12
JZ 0x001701df
LAB_0017019c:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00168f9c
LAB_001701a7:
ADD R15,0x50
JMP 0x00170197
LAB_001701ad:
MOV RDI,R15
CALL 0x00162bf8
MOVSD qword ptr [RSP + 0x8],XMM0
MOV RDI,R14
CALL 0x00162bf8
ADDSD XMM0,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x10]
MOVSD qword ptr [RSI],XMM0
MOV RDI,RBX
CALL 0x00162cae
JMP 0x00170114
LAB_001701df:
MOV RAX,qword ptr [R14 + 0x10]
MOV R14,qword ptr [RAX]
MOV R15,qword ptr [RAX + 0x8]
LAB_001701ea:
CMP R14,R15
JZ 0x00170114
LAB_001701f3:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00168f9c
LAB_001701fe:
ADD R14,0x50
JMP 0x001701ea
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
Value * __thiscall minja::Value::operator+(Value *this,Value *param_1)
{
Value *pVVar1;
long lVar2;
long lVar3;
Value *in_RDX;
Value *pVVar4;
double dVar5;
double local_98 [4];
int8 local_78;
int8 uStack_70;
int8 local_68;
string local_60 [32];
string local_40 [32];
if ((param_1[0x40] == (Value)0x3) || (in_RDX[0x40] == (Value)0x3)) {
to_str_abi_cxx11_();
/* try { // try from 001700c8 to 001700d4 has its CatchHandler @ 00170231 */
to_str_abi_cxx11_();
/* try { // try from 001700d5 to 001700e8 has its CatchHandler @ 00170222 */
std::operator+((string *)local_98,local_40);
/* try { // try from 001700e9 to 001700f5 has its CatchHandler @ 00170213 */
Value(this,(string *)local_98);
std::__cxx11::string::~string((string *)local_98);
std::__cxx11::string::~string(local_60);
std::__cxx11::string::~string(local_40);
}
else if ((byte)((char)in_RDX[0x40] - 5U | (char)param_1[0x40] - 5U) < 2) {
lVar2 = get<long>(param_1);
lVar3 = get<long>(in_RDX);
local_98[0] = (double)(lVar3 + lVar2);
Value(this,(long *)local_98);
}
else if ((*(long *)(param_1 + 0x10) == 0) || (*(long *)(in_RDX + 0x10) == 0)) {
dVar5 = get<double>(param_1);
local_98[0] = get<double>(in_RDX);
local_98[0] = local_98[0] + dVar5;
Value(this,local_98);
}
else {
local_78 = 0;
uStack_70 = 0;
local_68 = 0;
/* try { // try from 0017017a to 00170181 has its CatchHandler @ 00170204 */
array(this);
std::vector<minja::Value,std::allocator<minja::Value>>::~vector
((vector<minja::Value,std::allocator<minja::Value>> *)&local_78);
pVVar1 = (Value *)(*(int8 **)(param_1 + 0x10))[1];
for (pVVar4 = (Value *)**(int8 **)(param_1 + 0x10); pVVar4 != pVVar1;
pVVar4 = pVVar4 + 0x50) {
/* try { // try from 0017019c to 001701a6 has its CatchHandler @ 00170242 */
push_back(this,pVVar4);
}
pVVar1 = (Value *)(*(int8 **)(in_RDX + 0x10))[1];
for (pVVar4 = (Value *)**(int8 **)(in_RDX + 0x10); pVVar4 != pVVar1;
pVVar4 = pVVar4 + 0x50) {
/* try { // try from 001701f3 to 001701fd has its CatchHandler @ 00170240 */
push_back(this,pVVar4);
}
}
return this;
}
| |
32,669 | stbi__high_bit(unsigned int) | monkey531[P]llama/examples/llava/../../common/stb_image.h | static int stbi__high_bit(unsigned int z)
{
int n=0;
if (z == 0) return -1;
if (z >= 0x10000) { n += 16; z >>= 16; }
if (z >= 0x00100) { n += 8; z >>= 8; }
if (z >= 0x00010) { n += 4; z >>= 4; }
if (z >= 0x00004) { n += 2; z >>= 2; }
if (z >= 0x00002) { n += 1;/* >>= 1;*/ }
return n;
} | O3 | c | stbi__high_bit(unsigned int):
testl %edi, %edi
je 0x3e254
movl %edi, %eax
shrl $0x10, %eax
xorl %ecx, %ecx
cmpl $0x10000, %edi # imm = 0x10000
setae %cl
cmovbl %edi, %eax
shll $0x4, %ecx
leal 0x8(%rcx), %edx
movl %eax, %esi
shrl $0x8, %esi
cmpl $0x100, %eax # imm = 0x100
cmovbl %eax, %esi
cmovbl %ecx, %edx
leal 0x4(%rdx), %ecx
movl %esi, %edi
shrl $0x4, %edi
cmpl $0x10, %esi
cmovbl %esi, %edi
cmovbl %edx, %ecx
leal 0x2(%rcx), %eax
movl %edi, %edx
shrl $0x2, %edx
cmpl $0x4, %edi
cmovbl %edi, %edx
cmovbl %ecx, %eax
cmpl $0x2, %edx
sbbl $-0x1, %eax
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
retq
| _ZL14stbi__high_bitj:
test edi, edi
jz short loc_3E254
mov eax, edi
shr eax, 10h
xor ecx, ecx
cmp edi, 10000h
setnb cl
cmovb eax, edi
shl ecx, 4
lea edx, [rcx+8]
mov esi, eax
shr esi, 8
cmp eax, 100h
cmovb esi, eax
cmovb edx, ecx
lea ecx, [rdx+4]
mov edi, esi
shr edi, 4
cmp esi, 10h
cmovb edi, esi
cmovb ecx, edx
lea eax, [rcx+2]
mov edx, edi
shr edx, 2
cmp edi, 4
cmovb edx, edi
cmovb eax, ecx
cmp edx, 2
sbb eax, 0FFFFFFFFh
retn
loc_3E254:
mov eax, 0FFFFFFFFh
retn
| long long stbi__high_bit(unsigned int a1)
{
unsigned int v1; // eax
int v2; // edx
unsigned int v3; // esi
int v4; // ecx
unsigned int v5; // edi
int v6; // eax
unsigned int v7; // edx
if ( !a1 )
return 0xFFFFFFFFLL;
v1 = HIWORD(a1);
if ( a1 < 0x10000 )
v1 = a1;
v2 = 16 * (a1 >= 0x10000) + 8;
v3 = v1 >> 8;
if ( v1 < 0x100 )
{
v3 = v1;
v2 = 16 * (a1 >= 0x10000);
}
v4 = v2 + 4;
v5 = v3 >> 4;
if ( v3 < 0x10 )
{
v5 = v3;
v4 = v2;
}
v6 = v4 + 2;
v7 = v5 >> 2;
if ( v5 < 4 )
{
v7 = v5;
v6 = v4;
}
return v6 - ((unsigned int)(v7 < 2) - 1);
}
| stbi__high_bit:
TEST EDI,EDI
JZ 0x0013e254
MOV EAX,EDI
SHR EAX,0x10
XOR ECX,ECX
CMP EDI,0x10000
SETNC CL
CMOVC EAX,EDI
SHL ECX,0x4
LEA EDX,[RCX + 0x8]
MOV ESI,EAX
SHR ESI,0x8
CMP EAX,0x100
CMOVC ESI,EAX
CMOVC EDX,ECX
LEA ECX,[RDX + 0x4]
MOV EDI,ESI
SHR EDI,0x4
CMP ESI,0x10
CMOVC EDI,ESI
CMOVC ECX,EDX
LEA EAX,[RCX + 0x2]
MOV EDX,EDI
SHR EDX,0x2
CMP EDI,0x4
CMOVC EDX,EDI
CMOVC EAX,ECX
CMP EDX,0x2
SBB EAX,-0x1
RET
LAB_0013e254:
MOV EAX,0xffffffff
RET
|
/* stbi__high_bit(unsigned int) */
int stbi__high_bit(uint param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
int iVar4;
if (param_1 == 0) {
return -1;
}
uVar2 = param_1 >> 0x10;
if (0xffff >= param_1) {
uVar2 = param_1;
}
iVar3 = (uint)(0xffff < param_1) * 0x10;
iVar4 = iVar3 + 8;
uVar1 = uVar2 >> 8;
if (uVar2 < 0x100) {
iVar4 = iVar3;
uVar1 = uVar2;
}
iVar3 = iVar4 + 4;
uVar2 = uVar1 >> 4;
if (uVar1 < 0x10) {
iVar3 = iVar4;
uVar2 = uVar1;
}
iVar4 = iVar3 + 2;
uVar1 = uVar2 >> 2;
if (uVar2 < 4) {
iVar4 = iVar3;
uVar1 = uVar2;
}
return (iVar4 + 1) - (uint)(uVar1 < 2);
}
| |
32,670 | mbedtls_mpi_cmp_int | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/bignum.c | int mbedtls_mpi_cmp_int(const mbedtls_mpi *X, mbedtls_mpi_sint z)
{
mbedtls_mpi Y;
mbedtls_mpi_uint p[1];
MPI_VALIDATE_RET(X != NULL);
*p = mpi_sint_abs(z);
Y.s = (z < 0) ? -1 : 1;
Y.n = 1;
Y.p = p;
return mbedtls_mpi_cmp_mpi(X, &Y);
} | O3 | c | mbedtls_mpi_cmp_int:
subq $0x28, %rsp
movq %rsi, %rax
negq %rax
cmovsq %rsi, %rax
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
sarq $0x3f, %rsi
orl $0x1, %esi
leaq 0x10(%rsp), %rax
movl %esi, (%rax)
movq $0x1, 0x8(%rax)
movq %rcx, 0x10(%rax)
movq %rax, %rsi
callq 0x7f0b0
addq $0x28, %rsp
retq
| mbedtls_mpi_cmp_int:
sub rsp, 28h
mov rax, rsi
neg rax
cmovs rax, rsi
lea rcx, [rsp+28h+var_20]
mov [rcx], rax
sar rsi, 3Fh
or esi, 1
lea rax, [rsp+28h+var_18]
mov [rax], esi
mov qword ptr [rax+8], 1
mov [rax+10h], rcx
mov rsi, rax
call mbedtls_mpi_cmp_mpi
add rsp, 28h
retn
| long long mbedtls_mpi_cmp_int(_QWORD *a1, long long a2)
{
long long v2; // rax
long long v4; // [rsp+8h] [rbp-20h] BYREF
int v5; // [rsp+10h] [rbp-18h] BYREF
long long v6; // [rsp+18h] [rbp-10h]
long long *v7; // [rsp+20h] [rbp-8h]
v2 = -a2;
if ( a2 > 0 )
v2 = a2;
v4 = v2;
v5 = (a2 >> 63) | 1;
v6 = 1LL;
v7 = &v4;
return mbedtls_mpi_cmp_mpi(a1, (long long)&v5);
}
| mbedtls_mpi_cmp_int:
SUB RSP,0x28
MOV RAX,RSI
NEG RAX
CMOVS RAX,RSI
LEA RCX,[RSP + 0x8]
MOV qword ptr [RCX],RAX
SAR RSI,0x3f
OR ESI,0x1
LEA RAX,[RSP + 0x10]
MOV dword ptr [RAX],ESI
MOV qword ptr [RAX + 0x8],0x1
MOV qword ptr [RAX + 0x10],RCX
MOV RSI,RAX
CALL 0x0017f0b0
ADD RSP,0x28
RET
|
void mbedtls_mpi_cmp_int(int8 param_1,long param_2)
{
long local_20;
uint local_18 [2];
int8 local_10;
long *local_8;
local_20 = -param_2;
if (0 < param_2) {
local_20 = param_2;
}
local_8 = &local_20;
local_18[0] = (uint)(param_2 >> 0x3f) | 1;
local_10 = 1;
mbedtls_mpi_cmp_mpi(param_1,local_18);
return;
}
| |
32,671 | my_strntod_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static double
my_strntod_mb2_or_mb4(CHARSET_INFO *cs,
char *nptr, size_t length,
char **endptr, int *err)
{
char buf[256];
double res;
register char *b= buf;
register const uchar *s= (const uchar*) nptr;
const uchar *end;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int cnv;
*err= 0;
/* Cut too long strings */
if (length >= sizeof(buf))
length= sizeof(buf) - 1;
end= s + length;
while ((cnv= mb_wc(cs, &wc, s, end)) > 0)
{
s+= cnv;
if (wc > (int) (uchar) 'e' || !wc)
break; /* Can't be part of double */
*b++= (char) wc;
}
*endptr= b;
res= my_strtod(buf, endptr, err);
*endptr= nptr + cs->mbminlen * (size_t) (*endptr - buf);
return res;
} | O3 | c | my_strntod_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rcx, -0x150(%rbp)
movq %rsi, %rcx
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rbx
movq %r8, -0x148(%rbp)
movl $0x0, (%r8)
movl $0xff, %r13d
cmpq %r13, %rdx
cmovbq %rdx, %r13
addq %rsi, %r13
leaq -0x140(%rbp), %rsi
movq %rcx, -0x138(%rbp)
movq %rcx, %rdx
movq %r13, %rcx
callq *%rbx
leaq -0x130(%rbp), %r12
testl %eax, %eax
jle 0x66d39
movq -0x138(%rbp), %r14
movq -0x140(%rbp), %rcx
leaq -0x1(%rcx), %rdx
cmpq $0x64, %rdx
ja 0x66d39
movl %eax, %eax
addq %rax, %r14
movb %cl, (%r12)
incq %r12
movq %r15, %rdi
leaq -0x140(%rbp), %rsi
movq %r14, %rdx
movq %r13, %rcx
callq *%rbx
testl %eax, %eax
jg 0x66d06
movq -0x150(%rbp), %rbx
movq %r12, (%rbx)
leaq -0x130(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq -0x148(%rbp), %rdx
callq 0x768b4
movl 0x98(%r15), %eax
movq (%rbx), %rcx
subq %r14, %rcx
imulq %rax, %rcx
movq -0x138(%rbp), %rax
addq %rcx, %rax
movq %rax, (%rbx)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x66d9b
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x263a0
| my_strntod_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 128h
mov [rbp+var_150], rcx
mov rcx, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+0B8h]
mov rbx, [rax+28h]
mov [rbp+var_148], r8
mov dword ptr [r8], 0
mov r13d, 0FFh
cmp rdx, r13
cmovb r13, rdx
add r13, rsi
lea rsi, [rbp+var_140]
mov [rbp+var_138], rcx
mov rdx, rcx
mov rcx, r13
call rbx
lea r12, [rbp+var_130]
test eax, eax
jle short loc_66D39
mov r14, [rbp+var_138]
loc_66D06:
mov rcx, [rbp+var_140]
lea rdx, [rcx-1]
cmp rdx, 64h ; 'd'
ja short loc_66D39
mov eax, eax
add r14, rax
mov [r12], cl
inc r12
mov rdi, r15
lea rsi, [rbp+var_140]
mov rdx, r14
mov rcx, r13
call rbx
test eax, eax
jg short loc_66D06
loc_66D39:
mov rbx, [rbp+var_150]
mov [rbx], r12
lea r14, [rbp+var_130]
mov rdi, r14
mov rsi, rbx
mov rdx, [rbp+var_148]
call my_strtod
mov eax, [r15+98h]
mov rcx, [rbx]
sub rcx, r14
imul rcx, rax
mov rax, [rbp+var_138]
add rax, rcx
mov [rbx], rax
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_66D9B
add rsp, 128h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_66D9B:
call ___stack_chk_fail
| unsigned long long my_strntod_mb2_or_mb4(long long a1, long long a2, unsigned long long a3, _QWORD *a4, _DWORD *a5)
{
long long ( *v5)(long long, long long *, long long, long long); // rbx
long long v6; // r13
long long v7; // r13
int v8; // eax
_BYTE *v9; // r12
long long v10; // r14
long long v14; // [rsp+10h] [rbp-140h] BYREF
long long v15; // [rsp+18h] [rbp-138h]
_BYTE v16[256]; // [rsp+20h] [rbp-130h] BYREF
unsigned long long v17; // [rsp+120h] [rbp-30h]
v17 = __readfsqword(0x28u);
v5 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
*a5 = 0;
v6 = 255LL;
if ( a3 < 0xFF )
v6 = a3;
v7 = a2 + v6;
v15 = a2;
v8 = v5(a1, &v14, a2, v7);
v9 = v16;
if ( v8 > 0 )
{
v10 = v15;
do
{
if ( (unsigned long long)(v14 - 1) > 0x64 )
break;
v10 += (unsigned int)v8;
*v9++ = v14;
v8 = v5(a1, &v14, v10, v7);
}
while ( v8 > 0 );
}
*a4 = v9;
my_strtod(v16, a4, a5);
*a4 = *(unsigned int *)(a1 + 152) * (*a4 - (_QWORD)v16) + v15;
return __readfsqword(0x28u);
}
| my_strntod_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x128
MOV qword ptr [RBP + -0x150],RCX
MOV RCX,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RBX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x148],R8
MOV dword ptr [R8],0x0
MOV R13D,0xff
CMP RDX,R13
CMOVC R13,RDX
ADD R13,RSI
LEA RSI,[RBP + -0x140]
MOV qword ptr [RBP + -0x138],RCX
MOV RDX,RCX
MOV RCX,R13
CALL RBX
LEA R12,[RBP + -0x130]
TEST EAX,EAX
JLE 0x00166d39
MOV R14,qword ptr [RBP + -0x138]
LAB_00166d06:
MOV RCX,qword ptr [RBP + -0x140]
LEA RDX,[RCX + -0x1]
CMP RDX,0x64
JA 0x00166d39
MOV EAX,EAX
ADD R14,RAX
MOV byte ptr [R12],CL
INC R12
MOV RDI,R15
LEA RSI,[RBP + -0x140]
MOV RDX,R14
MOV RCX,R13
CALL RBX
TEST EAX,EAX
JG 0x00166d06
LAB_00166d39:
MOV RBX,qword ptr [RBP + -0x150]
MOV qword ptr [RBX],R12
LEA R14,[RBP + -0x130]
MOV RDI,R14
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x148]
CALL 0x001768b4
MOV EAX,dword ptr [R15 + 0x98]
MOV RCX,qword ptr [RBX]
SUB RCX,R14
IMUL RCX,RAX
MOV RAX,qword ptr [RBP + -0x138]
ADD RAX,RCX
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00166d9b
ADD RSP,0x128
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00166d9b:
CALL 0x001263a0
|
void my_strntod_mb2_or_mb4
(long param_1,long param_2,ulong param_3,long *param_4,int4 *param_5)
{
code *pcVar1;
uint uVar2;
int1 *puVar3;
ulong uVar4;
long lVar5;
long in_FS_OFFSET;
long local_148;
long local_140;
int1 local_138 [256];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
*param_5 = 0;
uVar4 = 0xff;
if (param_3 < 0xff) {
uVar4 = param_3;
}
local_140 = param_2;
uVar2 = (*pcVar1)(param_1,&local_148,param_2,uVar4 + param_2);
puVar3 = local_138;
lVar5 = local_140;
while ((0 < (int)uVar2 && (local_148 - 1U < 0x65))) {
lVar5 = lVar5 + (ulong)uVar2;
*puVar3 = (char)local_148;
puVar3 = puVar3 + 1;
uVar2 = (*pcVar1)(param_1,&local_148,lVar5,uVar4 + param_2);
}
*param_4 = (long)puVar3;
my_strtod(local_138,param_4,param_5);
*param_4 = local_140 + (*param_4 - (long)local_138) * (ulong)*(uint *)(param_1 + 0x98);
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
32,672 | rak_string_slice | fabiosvm[P]rak/src/string.c | RakString *rak_string_slice(RakString *str, int start, int end, RakError *err)
{
if (start < 0 || end > rak_string_len(str))
{
rak_error_set(err, "string slice out of bounds");
return NULL;
}
int len = start < end ? end - start : 0;
RakString *_str = rak_string_new_with_capacity(len, err);
if (!rak_is_ok(err)) return NULL;
memcpy(rak_string_chars(_str), rak_string_chars(str) + start, len);
_str->slice.len = len;
return _str;
} | O0 | c | rak_string_slice:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0xabb8
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jle 0xabd4
movq -0x20(%rbp), %rdi
leaq 0x3cb6(%rip), %rsi # 0xe879
movb $0x0, %al
callq 0x8220
movq $0x0, -0x8(%rbp)
jmp 0xac49
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0xabe7
movl -0x18(%rbp), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xabee
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0xabee
movl -0x34(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xa8d0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, (%rax)
jne 0xac17
movq $0x0, -0x8(%rbp)
jmp 0xac49
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
movslq -0x24(%rbp), %rdx
callq 0x2100
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rak_string_slice:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
cmp [rbp+var_14], 0
jl short loc_ABB8
mov eax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp eax, [rcx+0Ch]
jle short loc_ABD4
loc_ABB8:
mov rdi, [rbp+var_20]
lea rsi, aStringSliceOut; "string slice out of bounds"
mov al, 0
call rak_error_set
mov [rbp+var_8], 0
jmp short loc_AC49
loc_ABD4:
mov eax, [rbp+var_14]
cmp eax, [rbp+var_18]
jge short loc_ABE7
mov eax, [rbp+var_18]
sub eax, [rbp+var_14]
mov [rbp+var_34], eax
jmp short loc_ABEE
loc_ABE7:
xor eax, eax
mov [rbp+var_34], eax
jmp short $+2
loc_ABEE:
mov eax, [rbp+var_34]
mov [rbp+var_24], eax
mov edi, [rbp+var_24]
mov rsi, [rbp+var_20]
call rak_string_new_with_capacity
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
test byte ptr [rax], 1
jnz short loc_AC17
mov [rbp+var_8], 0
jmp short loc_AC49
loc_AC17:
mov rax, [rbp+var_30]
mov rdi, [rax+10h]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
movsxd rax, [rbp+var_14]
add rsi, rax
movsxd rdx, [rbp+var_24]
call _memcpy
mov ecx, [rbp+var_24]
mov rax, [rbp+var_30]
mov [rax+0Ch], ecx
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_AC49:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long rak_string_slice(
long long a1,
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)
{
char v15; // [rsp+0h] [rbp-40h]
int v16; // [rsp+Ch] [rbp-34h]
long long v17; // [rsp+10h] [rbp-30h]
_BYTE *v18; // [rsp+20h] [rbp-20h]
v18 = (_BYTE *)a4;
if ( a2 >= 0 && (a4 = a1, (int)a3 <= *(_DWORD *)(a1 + 12)) )
{
if ( a2 >= (int)a3 )
v16 = 0;
else
v16 = a3 - a2;
v17 = rak_string_new_with_capacity(
v16,
v18,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14);
if ( (*v18 & 1) != 0 )
{
memcpy(*(_QWORD *)(v17 + 16), a2 + *(_QWORD *)(a1 + 16), v16);
*(_DWORD *)(v17 + 12) = v16;
return v17;
}
else
{
return 0LL;
}
}
else
{
rak_error_set(
(long long)v18,
(long long)"string slice out of bounds",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v15);
return 0LL;
}
}
| rak_string_slice:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
CMP dword ptr [RBP + -0x14],0x0
JL 0x0010abb8
MOV EAX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0xc]
JLE 0x0010abd4
LAB_0010abb8:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x10e879]
MOV AL,0x0
CALL 0x00108220
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010ac49
LAB_0010abd4:
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x18]
JGE 0x0010abe7
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0010abee
LAB_0010abe7:
XOR EAX,EAX
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0010abee
LAB_0010abee:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x24],EAX
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0010a8d0
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
TEST byte ptr [RAX],0x1
JNZ 0x0010ac17
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010ac49
LAB_0010ac17:
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOVSXD RAX,dword ptr [RBP + -0x14]
ADD RSI,RAX
MOVSXD RDX,dword ptr [RBP + -0x24]
CALL 0x00102100
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_0010ac49:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long rak_string_slice(long param_1,int param_2,int param_3,byte *param_4)
{
int local_3c;
long local_10;
if ((param_2 < 0) || (*(int *)(param_1 + 0xc) < param_3)) {
rak_error_set(param_4,"string slice out of bounds");
local_10 = 0;
}
else {
if (param_2 < param_3) {
local_3c = param_3 - param_2;
}
else {
local_3c = 0;
}
local_10 = rak_string_new_with_capacity(local_3c,param_4);
if ((*param_4 & 1) == 0) {
local_10 = 0;
}
else {
memcpy(*(void **)(local_10 + 0x10),(void *)(*(long *)(param_1 + 0x10) + (long)param_2),
(long)local_3c);
*(int *)(local_10 + 0xc) = local_3c;
}
}
return local_10;
}
| |
32,673 | rak_string_slice | fabiosvm[P]rak/src/string.c | RakString *rak_string_slice(RakString *str, int start, int end, RakError *err)
{
if (start < 0 || end > rak_string_len(str))
{
rak_error_set(err, "string slice out of bounds");
return NULL;
}
int len = start < end ? end - start : 0;
RakString *_str = rak_string_new_with_capacity(len, err);
if (!rak_is_ok(err)) return NULL;
memcpy(rak_string_chars(_str), rak_string_chars(str) + start, len);
_str->slice.len = len;
return _str;
} | O3 | c | rak_string_slice:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
testl %esi, %esi
js 0x7fc1
movl %edx, %ebx
movq %rdi, %r12
cmpl %edx, 0xc(%rdi)
jge 0x7fe7
leaq 0x28d0(%rip), %rsi # 0xa898
xorl %r14d, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0x666c
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %ebp
xorl %r14d, %r14d
subl %esi, %ebx
cmovlel %r14d, %ebx
movl %ebx, %edi
movq %r15, %rsi
callq 0x7e25
cmpb $0x1, (%r15)
jne 0x7fd5
movq %rax, %r13
movq 0x10(%rax), %rdi
movl %ebp, %esi
addq 0x10(%r12), %rsi
movslq %ebx, %rdx
callq 0x2100
movl %ebx, 0xc(%r13)
movq %r13, %r14
jmp 0x7fd5
| rak_string_slice:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rcx
test esi, esi
js short loc_7FC1
mov ebx, edx
mov r12, rdi
cmp [rdi+0Ch], edx
jge short loc_7FE7
loc_7FC1:
lea rsi, aStringSliceOut; "string slice out of bounds"
xor r14d, r14d
mov rdi, r15
xor eax, eax
call rak_error_set
loc_7FD5:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7FE7:
mov ebp, esi
xor r14d, r14d
sub ebx, esi
cmovle ebx, r14d
mov edi, ebx
mov rsi, r15
call rak_string_new_with_capacity
cmp byte ptr [r15], 1
jnz short loc_7FD5
mov r13, rax
mov rdi, [rax+10h]
mov esi, ebp
add rsi, [r12+10h]
movsxd rdx, ebx
call _memcpy
mov [r13+0Ch], ebx
mov r14, r13
jmp short loc_7FD5
| long long rak_string_slice(long long a1, int a2, int a3, _BYTE *a4)
{
long long v5; // r14
int v7; // ebx
long long v8; // rax
long long v9; // r13
if ( a2 >= 0 && *(_DWORD *)(a1 + 12) >= a3 )
{
v5 = 0LL;
v7 = a3 - a2;
if ( a3 <= a2 )
v7 = 0;
v8 = rak_string_new_with_capacity(v7, a4);
if ( *a4 == 1 )
{
v9 = v8;
memcpy(*(_QWORD *)(v8 + 16), *(_QWORD *)(a1 + 16) + (unsigned int)a2, v7);
*(_DWORD *)(v9 + 12) = v7;
return v9;
}
}
else
{
v5 = 0LL;
rak_error_set(a4, (long long)"string slice out of bounds");
}
return v5;
}
| rak_string_slice:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RCX
TEST ESI,ESI
JS 0x00107fc1
MOV EBX,EDX
MOV R12,RDI
CMP dword ptr [RDI + 0xc],EDX
JGE 0x00107fe7
LAB_00107fc1:
LEA RSI,[0x10a898]
XOR R14D,R14D
MOV RDI,R15
XOR EAX,EAX
CALL 0x0010666c
LAB_00107fd5:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00107fe7:
MOV EBP,ESI
XOR R14D,R14D
SUB EBX,ESI
CMOVLE EBX,R14D
MOV EDI,EBX
MOV RSI,R15
CALL 0x00107e25
CMP byte ptr [R15],0x1
JNZ 0x00107fd5
MOV R13,RAX
MOV RDI,qword ptr [RAX + 0x10]
MOV ESI,EBP
ADD RSI,qword ptr [R12 + 0x10]
MOVSXD RDX,EBX
CALL 0x00102100
MOV dword ptr [R13 + 0xc],EBX
MOV R14,R13
JMP 0x00107fd5
|
long rak_string_slice(long param_1,uint param_2,int param_3,char *param_4)
{
long lVar1;
int iVar2;
long lVar3;
if (((int)param_2 < 0) || (*(int *)(param_1 + 0xc) < param_3)) {
rak_error_set(param_4,"string slice out of bounds");
lVar3 = 0;
}
else {
iVar2 = param_3 - param_2;
if (iVar2 == 0 || param_3 < (int)param_2) {
iVar2 = 0;
}
lVar1 = rak_string_new_with_capacity(iVar2,param_4);
lVar3 = 0;
if (*param_4 == '\x01') {
memcpy(*(void **)(lVar1 + 0x10),(void *)((ulong)param_2 + *(long *)(param_1 + 0x10)),
(long)iVar2);
*(int *)(lVar1 + 0xc) = iVar2;
lVar3 = lVar1;
}
}
return lVar3;
}
| |
32,674 | my_strnxfrm_latin1_de | eloqsql/strings/ctype-latin1.c | static size_t
my_strnxfrm_latin1_de(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar* src, size_t srclen, uint flags)
{
uchar *de= dst + dstlen;
const uchar *se= src + srclen;
uchar *d0= dst;
for ( ; src < se && dst < de && nweights; src++, nweights--)
{
uchar chr= combo1map[*src];
*dst++= chr;
if ((chr= combo2map[*src]) && dst < de && nweights > 1)
{
*dst++= chr;
nweights--;
}
}
return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, de, nweights, flags, 0);
} | O0 | c | my_strnxfrm_latin1_de:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x4a(%rbp)
jae 0x41a7a
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x38(%rbp), %rcx
movb %al, -0x4a(%rbp)
jae 0x41a7a
cmpl $0x0, -0x1c(%rbp)
setne %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
testb $0x1, %al
jne 0x41a86
jmp 0x41b17
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xfef4a(%rip), %rax # 0x1409e0
movb (%rax,%rcx), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xff020(%rip), %rax # 0x140ae0
movb (%rax,%rcx), %al
movb %al, -0x49(%rbp)
movzbl %al, %eax
cmpl $0x0, %eax
je 0x41afb
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x41afb
cmpl $0x1, -0x1c(%rbp)
jbe 0x41afb
movb -0x49(%rbp), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x41afd
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x41a52
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movl 0x10(%rbp), %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x44b20
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_strnxfrm_latin1_de:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
loc_41A52:
mov rcx, [rbp+var_28]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_4A], al
jnb short loc_41A7A
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_38]
mov [rbp+var_4A], al
jnb short loc_41A7A
cmp [rbp+var_1C], 0
setnz al
mov [rbp+var_4A], al
loc_41A7A:
mov al, [rbp+var_4A]
test al, 1
jnz short loc_41A86
jmp loc_41B17
loc_41A86:
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo1map
mov al, [rax+rcx]
mov [rbp+var_49], al
mov cl, [rbp+var_49]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo2map
mov al, [rax+rcx]
mov [rbp+var_49], al
movzx eax, al
cmp eax, 0
jz short loc_41AFB
mov rax, [rbp+var_10]
cmp rax, [rbp+var_38]
jnb short loc_41AFB
cmp [rbp+var_1C], 1
jbe short loc_41AFB
mov cl, [rbp+var_49]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
mov eax, [rbp+var_1C]
add eax, 0FFFFFFFFh
mov [rbp+var_1C], eax
loc_41AFB:
jmp short $+2
loc_41AFD:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov eax, [rbp+var_1C]
add eax, 0FFFFFFFFh
mov [rbp+var_1C], eax
jmp loc_41A52
loc_41B17:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_38]
mov r8d, [rbp+var_1C]
mov r9d, [rbp+arg_0]
xor eax, eax
mov [rsp+60h+var_60], 0
call my_strxfrm_pad_desc_and_reverse
add rsp, 60h
pop rbp
retn
| long long my_strnxfrm_latin1_de(
int a1,
unsigned __int8 *a2,
long long a3,
unsigned int a4,
unsigned __int8 *a5,
long long a6,
int a7)
{
unsigned __int8 *v7; // rax
unsigned __int8 *v8; // rax
bool v10; // [rsp+16h] [rbp-4Ah]
unsigned __int8 v11; // [rsp+17h] [rbp-49h]
unsigned long long v12; // [rsp+28h] [rbp-38h]
unsigned __int8 *v13; // [rsp+38h] [rbp-28h]
unsigned __int8 *v15; // [rsp+50h] [rbp-10h]
v15 = a2;
v13 = a5;
v12 = (unsigned long long)&a2[a3];
while ( 1 )
{
v10 = 0;
if ( v13 < &a5[a6] )
{
v10 = 0;
if ( (unsigned long long)v15 < v12 )
v10 = a4 != 0;
}
if ( !v10 )
break;
v7 = v15++;
*v7 = combo1map[*v13];
v11 = combo2map[*v13];
if ( v11 && (unsigned long long)v15 < v12 && a4 > 1 )
{
v8 = v15++;
*v8 = v11;
--a4;
}
++v13;
--a4;
}
return my_strxfrm_pad_desc_and_reverse(a1, (_DWORD)a2, (_DWORD)v15, v12, a4, a7, 0);
}
| my_strnxfrm_latin1_de:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x48],RAX
LAB_00141a52:
MOV RCX,qword ptr [RBP + -0x28]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x4a],AL
JNC 0x00141a7a
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x38]
MOV byte ptr [RBP + -0x4a],AL
JNC 0x00141a7a
CMP dword ptr [RBP + -0x1c],0x0
SETNZ AL
MOV byte ptr [RBP + -0x4a],AL
LAB_00141a7a:
MOV AL,byte ptr [RBP + -0x4a]
TEST AL,0x1
JNZ 0x00141a86
JMP 0x00141b17
LAB_00141a86:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x2409e0]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x49],AL
MOV CL,byte ptr [RBP + -0x49]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x240ae0]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x49],AL
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00141afb
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x00141afb
CMP dword ptr [RBP + -0x1c],0x1
JBE 0x00141afb
MOV CL,byte ptr [RBP + -0x49]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x1c],EAX
LAB_00141afb:
JMP 0x00141afd
LAB_00141afd:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00141a52
LAB_00141b17:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOV R8D,dword ptr [RBP + -0x1c]
MOV R9D,dword ptr [RBP + 0x10]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x00144b20
ADD RSP,0x60
POP RBP
RET
|
void my_strnxfrm_latin1_de
(int8 param_1,char *param_2,long param_3,uint param_4,byte *param_5,
long param_6,int4 param_7)
{
char *pcVar1;
char *pcVar2;
bool bVar3;
byte *local_30;
uint local_24;
char *local_18;
pcVar1 = param_2 + param_3;
local_30 = param_5;
local_24 = param_4;
local_18 = param_2;
while( true ) {
bVar3 = false;
if ((local_30 < param_5 + param_6) && (bVar3 = false, local_18 < pcVar1)) {
bVar3 = local_24 != 0;
}
if (!bVar3) break;
pcVar2 = local_18 + 1;
*local_18 = combo1map[*local_30];
if (((combo2map[*local_30] != '\0') && (pcVar2 < pcVar1)) && (1 < local_24)) {
*pcVar2 = combo2map[*local_30];
local_24 = local_24 - 1;
pcVar2 = local_18 + 2;
}
local_18 = pcVar2;
local_30 = local_30 + 1;
local_24 = local_24 - 1;
}
my_strxfrm_pad_desc_and_reverse(param_1,param_2,local_18,pcVar1,local_24,param_7,0);
return;
}
| |
32,675 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment() | llama.cpp/common/json.hpp | bool scan_comment()
{
switch (get())
{
// single-line comments skip input until a newline or EOF is read
case '/':
{
while (true)
{
switch (get())
{
case '\n':
case '\r':
case char_traits<char_type>::eof():
case '\0':
return true;
default:
break;
}
}
}
// multi-line comments skip input until */ is read
case '*':
{
while (true)
{
switch (get())
{
case char_traits<char_type>::eof():
case '\0':
{
error_message = "invalid comment; missing closing '*/'";
return false;
}
case '*':
{
switch (get())
{
case '/':
return true;
default:
{
unget();
continue;
}
}
}
default:
continue;
}
}
}
// unexpected character after reading '/'
default:
{
error_message = "invalid comment; expecting '/' or '*' after '/'";
return false;
}
}
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment():
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x22a1e
cmpl $0x2f, %eax
je 0x88be9
cmpl $0x2a, %eax
jne 0x88c06
movq %rbx, %rdi
callq 0x22a1e
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x88c0f
cmpl $0x2a, %eax
jne 0x88bbd
movq %rbx, %rdi
callq 0x22a1e
cmpl $0x2f, %eax
je 0x88c02
movq %rbx, %rdi
callq 0x89478
jmp 0x88bbd
movl $0x4803, %ebp # imm = 0x4803
movq %rbx, %rdi
callq 0x22a1e
incl %eax
cmpl $0xf, %eax
jae 0x88bee
btl %eax, %ebp
jae 0x88bee
movb $0x1, %al
jmp 0x88c1c
leaq 0x941f1(%rip), %rax # 0x11cdfe
jmp 0x88c16
leaq 0x941c2(%rip), %rax # 0x11cdd8
movq %rax, 0x70(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv:
push rbp
push rbx
push rax
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_88BE9
cmp eax, 2Ah ; '*'
jnz short loc_88C06
loc_88BBD:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax+1]
cmp ecx, 2
jb short loc_88C0F
cmp eax, 2Ah ; '*'
jnz short loc_88BBD
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_88C02
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
jmp short loc_88BBD
loc_88BE9:
mov ebp, 4803h
loc_88BEE:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
inc eax
cmp eax, 0Fh
jnb short loc_88BEE
bt ebp, eax
jnb short loc_88BEE
loc_88C02:
mov al, 1
jmp short loc_88C1C
loc_88C06:
lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"...
jmp short loc_88C16
loc_88C0F:
lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'"
loc_88C16:
mov [rbx+70h], rax
xor eax, eax
loc_88C1C:
add rsp, 8
pop rbx
pop rbp
retn
| char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(
__m128i *a1)
{
int v1; // eax
int v2; // eax
int v3; // ebp
unsigned int v4; // eax
const char *v6; // rax
v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( v1 == 47 )
{
v3 = 18435;
do
{
do
v4 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1)
+ 1;
while ( v4 >= 0xF );
}
while ( !_bittest(&v3, v4) );
return 1;
}
else
{
if ( v1 == 42 )
{
while ( 1 )
{
v2 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( (unsigned int)(v2 + 1) < 2 )
break;
if ( v2 == 42 )
{
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 47 )
return 1;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
}
}
v6 = "invalid comment; missing closing '*/'";
}
else
{
v6 = "invalid comment; expecting '/' or '*' after '/'";
}
a1[7].m128i_i64[0] = (long long)v6;
return 0;
}
}
| scan_comment:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00122a1e
CMP EAX,0x2f
JZ 0x00188be9
CMP EAX,0x2a
JNZ 0x00188c06
LAB_00188bbd:
MOV RDI,RBX
CALL 0x00122a1e
LEA ECX,[RAX + 0x1]
CMP ECX,0x2
JC 0x00188c0f
CMP EAX,0x2a
JNZ 0x00188bbd
MOV RDI,RBX
CALL 0x00122a1e
CMP EAX,0x2f
JZ 0x00188c02
MOV RDI,RBX
CALL 0x00189478
JMP 0x00188bbd
LAB_00188be9:
MOV EBP,0x4803
LAB_00188bee:
MOV RDI,RBX
CALL 0x00122a1e
INC EAX
CMP EAX,0xf
JNC 0x00188bee
BT EBP,EAX
JNC 0x00188bee
LAB_00188c02:
MOV AL,0x1
JMP 0x00188c1c
LAB_00188c06:
LEA RAX,[0x21cdfe]
JMP 0x00188c16
LAB_00188c0f:
LEA RAX,[0x21cdd8]
LAB_00188c16:
MOV qword ptr [RBX + 0x70],RAX
XOR EAX,EAX
LAB_00188c1c:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_comment() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_comment(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
int8 uVar2;
char *pcVar3;
iVar1 = get(this);
if (iVar1 == 0x2f) {
do {
do {
iVar1 = get(this);
} while (0xe < iVar1 + 1U);
} while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0);
LAB_00188c02:
uVar2 = 1;
}
else {
if (iVar1 == 0x2a) {
while (iVar1 = get(this), 1 < iVar1 + 1U) {
if (iVar1 == 0x2a) {
iVar1 = get(this);
if (iVar1 == 0x2f) goto LAB_00188c02;
unget(this);
}
}
pcVar3 = "invalid comment; missing closing \'*/\'";
}
else {
pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'";
}
*(char **)(this + 0x70) = pcVar3;
uVar2 = 0;
}
return uVar2;
}
| |
32,676 | ImPlot3D::NDCRayToPlotRay(ImPlot3DRay const&) | zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp | ImPlot3DRay NDCRayToPlotRay(const ImPlot3DRay& ray) {
ImPlot3DContext& gp = *GImPlot3D;
IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "NDCRayToPlotRay() needs to be called between BeginPlot() and EndPlot()!");
SetupLock();
// Convert NDC origin and a point along the ray to plot coordinates
ImPlot3DPoint plot_origin = NDCToPlot(ray.Origin);
ImPlot3DPoint ndc_point_along_ray = ray.Origin + ray.Direction;
ImPlot3DPoint plot_point_along_ray = NDCToPlot(ndc_point_along_ray);
// Compute the direction in plot coordinates
ImPlot3DPoint plot_direction = (plot_point_along_ray - plot_origin).Normalized();
// Create the ray in plot coordinates
ImPlot3DRay plot_ray;
plot_ray.Origin = plot_origin;
plot_ray.Direction = plot_direction;
return plot_ray;
} | O0 | cpp | ImPlot3D::NDCRayToPlotRay(ImPlot3DRay const&):
subq $0xb8, %rsp
movq %rdi, (%rsp)
movq %rdi, 0x8(%rsp)
movq %rsi, 0xb0(%rsp)
movq 0x5bd989(%rip), %rax # 0x68f638
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0xd1cda
leaq 0x500b4b(%rip), %rdi # 0x5d2818
callq 0x4f7220
testb $0x1, %al
jne 0xd1cd8
jmp 0xd1cda
jmp 0xd1cda
jmp 0xd1cdc
callq 0xd09c0
movq 0xb0(%rsp), %rdi
callq 0xd2430
movss %xmm1, 0x90(%rsp)
movlpd %xmm0, 0x88(%rsp)
movl 0x90(%rsp), %eax
movl %eax, 0xa0(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xb0(%rsp), %rdi
movq %rdi, %rsi
addq $0xc, %rsi
callq 0xcbc30
movss %xmm1, 0x70(%rsp)
movlpd %xmm0, 0x68(%rsp)
movl 0x70(%rsp), %eax
movl %eax, 0x80(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x78(%rsp), %rdi
callq 0xd2430
movss %xmm1, 0x50(%rsp)
movlpd %xmm0, 0x48(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x60(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xcbba0
movss %xmm1, 0x28(%rsp)
movlpd %xmm0, 0x20(%rsp)
movl 0x28(%rsp), %eax
movl %eax, 0x38(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xcd480
movq (%rsp), %rdi
movss %xmm1, 0x18(%rsp)
movlpd %xmm0, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x3c(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x44(%rsp)
callq 0xd99f0
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
movq 0x98(%rsp), %rdx
movq %rdx, (%rcx)
movl 0xa0(%rsp), %edx
movl %edx, 0x8(%rcx)
movq 0x3c(%rsp), %rdx
movq %rdx, 0xc(%rcx)
movl 0x44(%rsp), %edx
movl %edx, 0x14(%rcx)
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN8ImPlot3D15NDCRayToPlotRayERK11ImPlot3DRay:
sub rsp, 0B8h
mov [rsp+0B8h+var_B8], rdi
mov [rsp+0B8h+var_B0], rdi
mov [rsp+0B8h+var_8], rsi
mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
mov [rsp+0B8h+var_10], rax
mov rax, [rsp+0B8h+var_10]
cmp qword ptr [rax+28h], 0
jnz short loc_D1CDA
lea rdi, aNdcraytoplotra; "NDCRayToPlotRay() needs to be called be"...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
test al, 1
jnz short loc_D1CD8
jmp short loc_D1CDA
loc_D1CD8:
jmp short $+2
loc_D1CDA:
jmp short $+2
loc_D1CDC:
call _ZN8ImPlot3D9SetupLockEv; ImPlot3D::SetupLock(void)
mov rdi, [rsp+0B8h+var_8]; this
call _ZN8ImPlot3D9NDCToPlotERK13ImPlot3DPoint; ImPlot3D::NDCToPlot(ImPlot3DPoint const&)
movss [rsp+0B8h+var_28], xmm1
movlpd [rsp+0B8h+var_30], xmm0
mov eax, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_18], eax
mov rax, [rsp+0B8h+var_30]
mov [rsp+0B8h+var_20], rax
mov rdi, [rsp+0B8h+var_8]
mov rsi, rdi
add rsi, 0Ch; ImPlot3DPoint *
call _ZNK13ImPlot3DPointplERKS_; ImPlot3DPoint::operator+(ImPlot3DPoint const&)
movss [rsp+0B8h+var_48], xmm1
movlpd [rsp+0B8h+var_50], xmm0
mov eax, [rsp+0B8h+var_48]
mov [rsp+0B8h+var_38], eax
mov rax, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_40], rax
lea rdi, [rsp+0B8h+var_40]; this
call _ZN8ImPlot3D9NDCToPlotERK13ImPlot3DPoint; ImPlot3D::NDCToPlot(ImPlot3DPoint const&)
movss [rsp+0B8h+var_68], xmm1
movlpd [rsp+0B8h+var_70], xmm0
mov eax, [rsp+0B8h+var_68]
mov [rsp+0B8h+var_58], eax
mov rax, [rsp+0B8h+var_70]
mov [rsp+0B8h+var_60], rax
lea rdi, [rsp+0B8h+var_60]
lea rsi, [rsp+0B8h+var_20]
call _ZNK13ImPlot3DPointmiERKS_; ImPlot3DPoint::operator-(ImPlot3DPoint const&)
movss [rsp+0B8h+var_90], xmm1
movlpd [rsp+0B8h+var_98], xmm0
mov eax, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_80], eax
mov rax, [rsp+0B8h+var_98]
mov [rsp+0B8h+var_88], rax
lea rdi, [rsp+0B8h+var_88]; this
call _ZNK13ImPlot3DPoint10NormalizedEv; ImPlot3DPoint::Normalized(void)
mov rdi, [rsp+0B8h+var_B8]; this
movss [rsp+0B8h+var_A0], xmm1
movlpd [rsp+0B8h+var_A8], xmm0
mov rax, [rsp+0B8h+var_A8]
mov [rsp+0B8h+var_7C], rax
mov eax, [rsp+0B8h+var_A0]
mov [rsp+0B8h+var_74], eax
call _ZN11ImPlot3DRayC2Ev; ImPlot3DRay::ImPlot3DRay(void)
mov rcx, [rsp+0B8h+var_B8]
mov rax, [rsp+0B8h+var_B0]
mov rdx, [rsp+0B8h+var_20]
mov [rcx], rdx
mov edx, [rsp+0B8h+var_18]
mov [rcx+8], edx
mov rdx, [rsp+0B8h+var_7C]
mov [rcx+0Ch], rdx
mov edx, [rsp+0B8h+var_74]
mov [rcx+14h], edx
add rsp, 0B8h
retn
| ImPlot3D * ImPlot3D::NDCRayToPlotRay(
ImPlot3D *this,
const ImPlot3DRay *a2,
long long a3,
bool a4,
double a5,
double a6)
{
ImPlot3D *result; // rax
ImPlot3DRay *v7; // [rsp+0h] [rbp-B8h]
ImPlot3D *v8; // [rsp+8h] [rbp-B0h]
double v9; // [rsp+30h] [rbp-88h] BYREF
int v10; // [rsp+38h] [rbp-80h]
double v11; // [rsp+3Ch] [rbp-7Ch]
int v12; // [rsp+44h] [rbp-74h]
double v13; // [rsp+48h] [rbp-70h]
int v14; // [rsp+50h] [rbp-68h]
double v15; // [rsp+58h] [rbp-60h] BYREF
int v16; // [rsp+60h] [rbp-58h]
double v17; // [rsp+68h] [rbp-50h]
int v18; // [rsp+70h] [rbp-48h]
double v19; // [rsp+78h] [rbp-40h] BYREF
int v20; // [rsp+80h] [rbp-38h]
double v21; // [rsp+88h] [rbp-30h]
int v22; // [rsp+90h] [rbp-28h]
double v23; // [rsp+98h] [rbp-20h] BYREF
int v24; // [rsp+A0h] [rbp-18h]
long long v25; // [rsp+A8h] [rbp-10h]
ImPlot3D *v26; // [rsp+B0h] [rbp-8h]
v7 = this;
v8 = this;
v26 = a2;
v25 = ImPlot3D::GImPlot3D;
if ( !*(_QWORD *)(ImPlot3D::GImPlot3D + 40) )
{
this = (ImPlot3D *)"NDCRayToPlotRay() needs to be called between BeginPlot() and EndPlot()!";
ImGui::ErrorLog(
(ImGui *)"NDCRayToPlotRay() needs to be called between BeginPlot() and EndPlot()!",
(const char *)a2);
}
ImPlot3D::SetupLock(this, (const char *)a2, a5, a6, a3, a4);
ImPlot3D::NDCToPlot(v26, a2);
v22 = LODWORD(a6);
v21 = a5;
v24 = LODWORD(a6);
v23 = a5;
v18 = LODWORD(a6);
v17 = ImPlot3DPoint::operator+((float *)v26, (float *)v26 + 3);
v20 = LODWORD(a6);
v19 = v17;
ImPlot3D::NDCToPlot((ImPlot3D *)&v19, (ImPlot3D *)((char *)v26 + 12));
v14 = LODWORD(a6);
v13 = v17;
v16 = LODWORD(a6);
v15 = v17;
v10 = LODWORD(a6);
v9 = ImPlot3DPoint::operator-((float *)&v15, (float *)&v23);
v11 = ImPlot3DPoint::Normalized((ImPlot3DPoint *)&v9, *(float *)&v9);
v12 = LODWORD(a6);
ImPlot3DRay::ImPlot3DRay(v7);
result = v8;
*(double *)v7 = v23;
*((_DWORD *)v7 + 2) = v24;
*(double *)((char *)v7 + 12) = v11;
*((_DWORD *)v7 + 5) = v12;
return result;
}
| NDCRayToPlotRay:
SUB RSP,0xb8
MOV qword ptr [RSP],RDI
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP + 0xb0],RSI
MOV RAX,qword ptr [0x0078f638]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0xa8]
CMP qword ptr [RAX + 0x28],0x0
JNZ 0x001d1cda
LEA RDI,[0x6d2818]
CALL 0x005f7220
TEST AL,0x1
JNZ 0x001d1cd8
JMP 0x001d1cda
LAB_001d1cd8:
JMP 0x001d1cda
LAB_001d1cda:
JMP 0x001d1cdc
LAB_001d1cdc:
CALL 0x001d09c0
MOV RDI,qword ptr [RSP + 0xb0]
CALL 0x001d2430
MOVSS dword ptr [RSP + 0x90],XMM1
MOVLPD qword ptr [RSP + 0x88],XMM0
MOV EAX,dword ptr [RSP + 0x90]
MOV dword ptr [RSP + 0xa0],EAX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,RDI
ADD RSI,0xc
CALL 0x001cbc30
MOVSS dword ptr [RSP + 0x70],XMM1
MOVLPD qword ptr [RSP + 0x68],XMM0
MOV EAX,dword ptr [RSP + 0x70]
MOV dword ptr [RSP + 0x80],EAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x78],RAX
LEA RDI,[RSP + 0x78]
CALL 0x001d2430
MOVSS dword ptr [RSP + 0x50],XMM1
MOVLPD qword ptr [RSP + 0x48],XMM0
MOV EAX,dword ptr [RSP + 0x50]
MOV dword ptr [RSP + 0x60],EAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x58],RAX
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x98]
CALL 0x001cbba0
MOVSS dword ptr [RSP + 0x28],XMM1
MOVLPD qword ptr [RSP + 0x20],XMM0
MOV EAX,dword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x38],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x30],RAX
LEA RDI,[RSP + 0x30]
CALL 0x001cd480
MOV RDI,qword ptr [RSP]
MOVSS dword ptr [RSP + 0x18],XMM1
MOVLPD qword ptr [RSP + 0x10],XMM0
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x3c],RAX
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x44],EAX
CALL 0x001d99f0
MOV RCX,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x98]
MOV qword ptr [RCX],RDX
MOV EDX,dword ptr [RSP + 0xa0]
MOV dword ptr [RCX + 0x8],EDX
MOV RDX,qword ptr [RSP + 0x3c]
MOV qword ptr [RCX + 0xc],RDX
MOV EDX,dword ptr [RSP + 0x44]
MOV dword ptr [RCX + 0x14],EDX
ADD RSP,0xb8
RET
|
/* ImPlot3D::NDCRayToPlotRay(ImPlot3DRay const&) */
ImPlot3DRay * ImPlot3D::NDCRayToPlotRay(ImPlot3DRay *param_1)
{
ImPlot3DPoint *in_RSI;
int4 in_XMM1_Da;
int8 local_88;
int8 local_7c;
int4 local_74;
int8 local_70;
int8 local_60 [2];
int8 local_50;
int8 local_40 [2];
int8 local_30;
int8 local_20;
int4 local_18;
long local_10;
ImPlot3DPoint *local_8;
local_10 = GImPlot3D;
local_8 = in_RSI;
if (*(long *)(GImPlot3D + 0x28) == 0) {
ImGui::ErrorLog("NDCRayToPlotRay() needs to be called between BeginPlot() and EndPlot()!");
}
SetupLock();
local_30 = NDCToPlot(local_8);
local_20 = local_30;
local_18 = in_XMM1_Da;
local_50 = ImPlot3DPoint::operator+(local_8,local_8 + 0xc);
local_40[0] = local_50;
local_70 = NDCToPlot((ImPlot3DPoint *)local_40);
local_60[0] = local_70;
local_88 = ImPlot3DPoint::operator-((ImPlot3DPoint *)local_60,(ImPlot3DPoint *)&local_20);
local_7c = ImPlot3DPoint::Normalized((ImPlot3DPoint *)&local_88);
local_74 = in_XMM1_Da;
ImPlot3DRay::ImPlot3DRay(param_1);
*(int8 *)param_1 = local_20;
*(int4 *)(param_1 + 8) = local_18;
*(int8 *)(param_1 + 0xc) = local_7c;
*(int4 *)(param_1 + 0x14) = local_74;
return param_1;
}
| |
32,677 | aria_get_capabilities | eloqsql/storage/maria/ma_backup.c | int aria_get_capabilities(File kfile, ARIA_TABLE_CAPABILITIES *cap)
{
MARIA_SHARE share;
int error= 0;
uint head_length= sizeof(share.state.header), base_pos;
uint aligned_bit_blocks;
size_t info_length;
uchar *disc_cache;
DBUG_ENTER("aria_get_capabilities");
bzero(cap, sizeof(*cap));
if (my_pread(kfile,share.state.header.file_version, head_length, 0,
MYF(MY_NABP)))
DBUG_RETURN(HA_ERR_NOT_A_TABLE);
if (memcmp(share.state.header.file_version, maria_file_magic, 4))
DBUG_RETURN(HA_ERR_NOT_A_TABLE);
share.options= mi_uint2korr(share.state.header.options);
info_length= mi_uint2korr(share.state.header.header_length);
base_pos= mi_uint2korr(share.state.header.base_pos);
/*
Allocate space for header information and for data that is too
big to keep on stack
*/
if (!(disc_cache= my_malloc(PSI_NOT_INSTRUMENTED, info_length, MYF(MY_WME))))
DBUG_RETURN(ENOMEM);
if (my_pread(kfile, disc_cache, info_length, 0L, MYF(MY_NABP)))
{
error= my_errno;
goto err;
}
_ma_base_info_read(disc_cache + base_pos, &share.base);
cap->transactional= share.base.born_transactional;
cap->checksum= MY_TEST(share.options & HA_OPTION_PAGE_CHECKSUM);
cap->online_backup_safe= cap->transactional && cap->checksum;
cap->header_size= share.base.keystart;
cap->keypage_header= ((share.base.born_transactional ?
LSN_STORE_SIZE + TRANSID_SIZE :
0) + KEYPAGE_KEYID_SIZE + KEYPAGE_FLAG_SIZE +
KEYPAGE_USED_SIZE);
cap->block_size= share.base.block_size;
cap->data_file_type= share.state.header.data_file_type;
cap->s3_block_size= share.base.s3_block_size;
cap->compression= share.base.compression_algorithm;
cap->encrypted= MY_TEST(share.base.extra_options &
MA_EXTRA_OPTIONS_ENCRYPTED);
if (share.state.header.data_file_type == BLOCK_RECORD)
{
/* Calulate how man pages the row bitmap covers. From _ma_bitmap_init() */
aligned_bit_blocks= (cap->block_size - PAGE_SUFFIX_SIZE) / 6;
/*
In each 6 bytes, we have 6*8/3 = 16 pages covered
The +1 is to add the bitmap page, as this doesn't have to be covered
*/
cap->bitmap_pages_covered= aligned_bit_blocks * 16 + 1;
}
/* Do a check that that we got things right */
if (share.state.header.data_file_type != BLOCK_RECORD &&
cap->online_backup_safe)
error= HA_ERR_NOT_A_TABLE;
err:
my_free(disc_cache);
DBUG_RETURN(error);
} | O3 | c | aria_get_capabilities:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc48, %rsp # imm = 0xC48
movq %rsi, %rbx
movl %edi, %r15d
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsi)
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
leaq -0xc68(%rbp), %rsi
movl $0x18, %edx
movl $0x4, %r8d
xorl %ecx, %ecx
callq 0xa0600
movl $0x82, %r12d
testq %rax, %rax
jne 0x70efb
movl -0xc68(%rbp), %eax
leaq 0x3132a6(%rip), %rcx # 0x384050
cmpl (%rcx), %eax
jne 0x70efb
movzwl -0xc64(%rbp), %eax
movzwl -0xc62(%rbp), %ecx
rolw $0x8, %ax
movzwl %ax, %eax
movq %rax, -0x548(%rbp)
rolw $0x8, %cx
movzwl %cx, %r12d
movzwl -0xc5c(%rbp), %r13d
movl $0x10, %edx
xorl %edi, %edi
movq %r12, %rsi
callq 0x9fd51
testq %rax, %rax
je 0x70e1d
movq %rax, %r14
movl $0x4, %r8d
movl %r15d, %edi
movq %rax, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xa0600
testq %rax, %rax
je 0x70e28
callq 0xa1ac2
movl (%rax), %r12d
jmp 0x70ef3
movl $0xc, %r12d
jmp 0x70efb
rolw $0x8, %r13w
movzwl %r13w, %eax
movq %r14, %rdi
addq %rax, %rdi
leaq -0x908(%rbp), %r15
movq %r15, %rsi
callq 0x70f24
movb 0xec(%r15), %al
movb %al, 0x1d(%rbx)
movl 0x3c0(%r15), %ecx
shrl $0xb, %ecx
andb $0x1, %cl
movb %cl, 0x1c(%rbx)
testb %al, %al
movzbl %cl, %eax
movl $0x0, %ecx
cmovel %ecx, %eax
movb %al, 0x1f(%rbx)
movq (%r15), %rcx
movq %rcx, (%rbx)
movl $0x4, %ecx
movl $0x11, %edx
cmovel %ecx, %edx
movl %edx, 0x14(%rbx)
movl 0xbc(%r15), %ecx
movl %ecx, 0x10(%rbx)
movzbl -0x34a(%r15), %edx
movl %edx, 0x18(%rbx)
movq 0x60(%r15), %rsi
movq %rsi, 0x20(%rbx)
movb 0xd0(%r15), %sil
movb %sil, 0x28(%rbx)
movb 0xc8(%r15), %sil
andb $0x1, %sil
movb %sil, 0x1e(%rbx)
cmpl $0x3, %edx
jne 0x70ee5
addl $-0x4, %ecx
movl $0xaaaaaaab, %eax # imm = 0xAAAAAAAB
imulq %rcx, %rax
shrq $0x20, %rax
andl $-0x4, %eax
leal 0x1(,%rax,4), %eax
movq %rax, 0x8(%rbx)
xorl %r12d, %r12d
jmp 0x70ef3
xorl %ecx, %ecx
testb %al, %al
movl $0x82, %r12d
cmovel %ecx, %r12d
movq %r14, %rdi
callq 0x9ff7e
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x70f1f
movl %r12d, %eax
addq $0xc48, %rsp # imm = 0xC48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29250
| aria_get_capabilities:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C48h
mov rbx, rsi
mov r15d, edi
mov rax, fs:28h
mov [rbp+var_30], rax
xorps xmm0, xmm0
movups xmmword ptr [rsi+20h], xmm0
movups xmmword ptr [rsi+10h], xmm0
movups xmmword ptr [rsi], xmm0
lea rsi, [rbp+var_C68]
mov edx, 18h
mov r8d, 4
xor ecx, ecx
call my_pread
mov r12d, 82h
test rax, rax
jnz loc_70EFB
mov eax, [rbp+var_C68]
lea rcx, maria_file_magic
cmp eax, [rcx]
jnz loc_70EFB
movzx eax, [rbp+var_C64]
movzx ecx, [rbp+var_C62]
rol ax, 8
movzx eax, ax
mov [rbp+var_548], rax
rol cx, 8
movzx r12d, cx
movzx r13d, [rbp+var_C5C]
mov edx, 10h
xor edi, edi
mov rsi, r12
call my_malloc
test rax, rax
jz short loc_70E1D
mov r14, rax
mov r8d, 4
mov edi, r15d
mov rsi, rax
mov rdx, r12
xor ecx, ecx
call my_pread
test rax, rax
jz short loc_70E28
call _my_thread_var
mov r12d, [rax]
jmp loc_70EF3
loc_70E1D:
mov r12d, 0Ch
jmp loc_70EFB
loc_70E28:
rol r13w, 8
movzx eax, r13w
mov rdi, r14
add rdi, rax
lea r15, [rbp+var_908]
mov rsi, r15
call _ma_base_info_read
mov al, [r15+0ECh]
mov [rbx+1Dh], al
mov ecx, [r15+3C0h]
shr ecx, 0Bh
and cl, 1
mov [rbx+1Ch], cl
test al, al
movzx eax, cl
mov ecx, 0
cmovz eax, ecx
mov [rbx+1Fh], al
mov rcx, [r15]
mov [rbx], rcx
mov ecx, 4
mov edx, 11h
cmovz edx, ecx
mov [rbx+14h], edx
mov ecx, [r15+0BCh]
mov [rbx+10h], ecx
movzx edx, byte ptr [r15-34Ah]
mov [rbx+18h], edx
mov rsi, [r15+60h]
mov [rbx+20h], rsi
mov sil, [r15+0D0h]
mov [rbx+28h], sil
mov sil, [r15+0C8h]
and sil, 1
mov [rbx+1Eh], sil
cmp edx, 3
jnz short loc_70EE5
add ecx, 0FFFFFFFCh
mov eax, 0AAAAAAABh
imul rax, rcx
shr rax, 20h
and eax, 0FFFFFFFCh
lea eax, ds:1[rax*4]
mov [rbx+8], rax
xor r12d, r12d
jmp short loc_70EF3
loc_70EE5:
xor ecx, ecx
test al, al
mov r12d, 82h
cmovz r12d, ecx
loc_70EF3:
mov rdi, r14
call my_free
loc_70EFB:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_70F1F
mov eax, r12d
add rsp, 0C48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_70F1F:
call ___stack_chk_fail
| long long aria_get_capabilities(long long a1, long long a2)
{
unsigned int v2; // r12d
long long v3; // r12
__int16 v4; // r13
long long v5; // rax
long long v6; // r14
char v7; // al
bool v8; // cl
bool v9; // zf
bool v10; // al
int v11; // edx
int v12; // ecx
int v13; // edx
int v15; // [rsp+8h] [rbp-C68h] BYREF
__int16 v16; // [rsp+Ch] [rbp-C64h]
__int16 v17; // [rsp+Eh] [rbp-C62h]
__int16 v18; // [rsp+14h] [rbp-C5Ch]
unsigned __int8 v19; // [rsp+1Eh] [rbp-C52h]
_QWORD v20[23]; // [rsp+368h] [rbp-908h] BYREF
int v21; // [rsp+424h] [rbp-84Ch]
char v22; // [rsp+430h] [rbp-840h]
char v23; // [rsp+438h] [rbp-838h]
char v24; // [rsp+454h] [rbp-81Ch]
long long v25; // [rsp+728h] [rbp-548h]
unsigned long long v26; // [rsp+C40h] [rbp-30h]
v26 = __readfsqword(0x28u);
*(_OWORD *)(a2 + 32) = 0LL;
*(_OWORD *)(a2 + 16) = 0LL;
*(_OWORD *)a2 = 0LL;
v2 = 130;
if ( !my_pread(a1, &v15, 24LL, 0LL, 4LL) && v15 == maria_file_magic )
{
v25 = (unsigned __int16)__ROL2__(v16, 8);
v3 = (unsigned __int16)__ROL2__(v17, 8);
v4 = v18;
v5 = my_malloc(0LL, v3, 16LL);
if ( v5 )
{
v6 = v5;
if ( my_pread((unsigned int)a1, v5, v3, 0LL, 4LL) )
{
v2 = *(_DWORD *)my_thread_var((unsigned int)a1);
}
else
{
ma_base_info_read((unsigned __int16)__ROL2__(v4, 8) + v6, v20);
v7 = v24;
*(_BYTE *)(a2 + 29) = v24;
v8 = (v25 & 0x800) != 0;
*(_BYTE *)(a2 + 28) = v8;
v9 = v7 == 0;
v10 = v8;
if ( v9 )
v10 = 0;
*(_BYTE *)(a2 + 31) = v10;
*(_QWORD *)a2 = v20[0];
v11 = 17;
if ( v9 )
v11 = 4;
*(_DWORD *)(a2 + 20) = v11;
v12 = v21;
*(_DWORD *)(a2 + 16) = v21;
v13 = v19;
*(_DWORD *)(a2 + 24) = v19;
*(_QWORD *)(a2 + 32) = v20[12];
*(_BYTE *)(a2 + 40) = v23;
*(_BYTE *)(a2 + 30) = v22 & 1;
if ( v13 == 3 )
{
*(_QWORD *)(a2 + 8) = 4 * (((2863311531u * (unsigned long long)(unsigned int)(v12 - 4)) >> 32) & 0xFFFFFFFC) + 1;
v2 = 0;
}
else
{
v2 = 130;
if ( !v10 )
v2 = 0;
}
}
my_free(v6);
}
else
{
return 12;
}
}
return v2;
}
| aria_get_capabilities:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc48
MOV RBX,RSI
MOV R15D,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x20],XMM0
MOVUPS xmmword ptr [RSI + 0x10],XMM0
MOVUPS xmmword ptr [RSI],XMM0
LEA RSI,[RBP + -0xc68]
MOV EDX,0x18
MOV R8D,0x4
XOR ECX,ECX
CALL 0x001a0600
MOV R12D,0x82
TEST RAX,RAX
JNZ 0x00170efb
MOV EAX,dword ptr [RBP + -0xc68]
LEA RCX,[0x484050]
CMP EAX,dword ptr [RCX]
JNZ 0x00170efb
MOVZX EAX,word ptr [RBP + -0xc64]
MOVZX ECX,word ptr [RBP + -0xc62]
ROL AX,0x8
MOVZX EAX,AX
MOV qword ptr [RBP + -0x548],RAX
ROL CX,0x8
MOVZX R12D,CX
MOVZX R13D,word ptr [RBP + -0xc5c]
MOV EDX,0x10
XOR EDI,EDI
MOV RSI,R12
CALL 0x0019fd51
TEST RAX,RAX
JZ 0x00170e1d
MOV R14,RAX
MOV R8D,0x4
MOV EDI,R15D
MOV RSI,RAX
MOV RDX,R12
XOR ECX,ECX
CALL 0x001a0600
TEST RAX,RAX
JZ 0x00170e28
CALL 0x001a1ac2
MOV R12D,dword ptr [RAX]
JMP 0x00170ef3
LAB_00170e1d:
MOV R12D,0xc
JMP 0x00170efb
LAB_00170e28:
ROL R13W,0x8
MOVZX EAX,R13W
MOV RDI,R14
ADD RDI,RAX
LEA R15,[RBP + -0x908]
MOV RSI,R15
CALL 0x00170f24
MOV AL,byte ptr [R15 + 0xec]
MOV byte ptr [RBX + 0x1d],AL
MOV ECX,dword ptr [R15 + 0x3c0]
SHR ECX,0xb
AND CL,0x1
MOV byte ptr [RBX + 0x1c],CL
TEST AL,AL
MOVZX EAX,CL
MOV ECX,0x0
CMOVZ EAX,ECX
MOV byte ptr [RBX + 0x1f],AL
MOV RCX,qword ptr [R15]
MOV qword ptr [RBX],RCX
MOV ECX,0x4
MOV EDX,0x11
CMOVZ EDX,ECX
MOV dword ptr [RBX + 0x14],EDX
MOV ECX,dword ptr [R15 + 0xbc]
MOV dword ptr [RBX + 0x10],ECX
MOVZX EDX,byte ptr [R15 + -0x34a]
MOV dword ptr [RBX + 0x18],EDX
MOV RSI,qword ptr [R15 + 0x60]
MOV qword ptr [RBX + 0x20],RSI
MOV SIL,byte ptr [R15 + 0xd0]
MOV byte ptr [RBX + 0x28],SIL
MOV SIL,byte ptr [R15 + 0xc8]
AND SIL,0x1
MOV byte ptr [RBX + 0x1e],SIL
CMP EDX,0x3
JNZ 0x00170ee5
ADD ECX,-0x4
MOV EAX,0xaaaaaaab
IMUL RAX,RCX
SHR RAX,0x20
AND EAX,0xfffffffc
LEA EAX,[0x1 + RAX*0x4]
MOV qword ptr [RBX + 0x8],RAX
XOR R12D,R12D
JMP 0x00170ef3
LAB_00170ee5:
XOR ECX,ECX
TEST AL,AL
MOV R12D,0x82
CMOVZ R12D,ECX
LAB_00170ef3:
MOV RDI,R14
CALL 0x0019ff7e
LAB_00170efb:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00170f1f
MOV EAX,R12D
ADD RSP,0xc48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00170f1f:
CALL 0x00129250
|
int4 aria_get_capabilities(ulong param_1,int8 *param_2)
{
long lVar1;
long lVar2;
int4 *puVar3;
byte bVar4;
ushort uVar5;
int4 uVar6;
long in_FS_OFFSET;
int local_c70;
ushort local_c6c;
ushort local_c6a;
ushort local_c64;
byte local_c5a;
int8 local_910 [12];
int8 local_8b0;
int local_854;
byte local_848;
int1 local_840;
char local_824;
ulong local_550;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
param_2[4] = 0;
param_2[5] = 0;
param_2[2] = 0;
param_2[3] = 0;
*param_2 = 0;
param_2[1] = 0;
lVar1 = my_pread(param_1,&local_c70,0x18,0,4);
uVar6 = 0x82;
if ((lVar1 == 0) && (local_c70 == maria_file_magic)) {
local_550 = (ulong)(ushort)(local_c6c << 8 | local_c6c >> 8);
uVar5 = local_c6a << 8 | local_c6a >> 8;
lVar1 = my_malloc(0,uVar5,0x10);
if (lVar1 == 0) {
uVar6 = 0xc;
}
else {
lVar2 = my_pread(param_1 & 0xffffffff,lVar1,uVar5,0,4);
if (lVar2 == 0) {
_ma_base_info_read(lVar1 + (ulong)(ushort)(local_c64 << 8 | local_c64 >> 8),local_910);
*(char *)((long)param_2 + 0x1d) = local_824;
bVar4 = (byte)((uint)local_550 >> 0xb) & 1;
*(byte *)((long)param_2 + 0x1c) = bVar4;
if (local_824 == '\0') {
bVar4 = 0;
}
*(byte *)((long)param_2 + 0x1f) = bVar4;
*param_2 = local_910[0];
uVar6 = 0x11;
if (local_824 == '\0') {
uVar6 = 4;
}
*(int4 *)((long)param_2 + 0x14) = uVar6;
*(int *)(param_2 + 2) = local_854;
*(uint *)(param_2 + 3) = (uint)local_c5a;
param_2[4] = local_8b0;
*(int1 *)(param_2 + 5) = local_840;
*(byte *)((long)param_2 + 0x1e) = local_848 & 1;
if (local_c5a == 3) {
param_2[1] = (ulong)(((uint)((ulong)(local_854 - 4) * 0xaaaaaaab >> 0x20) & 0xfffffffc) *
4 + 1);
uVar6 = 0;
}
else {
uVar6 = 0x82;
if (bVar4 == 0) {
uVar6 = 0;
}
}
}
else {
puVar3 = (int4 *)_my_thread_var();
uVar6 = *puVar3;
}
my_free(lVar1);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar6;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
32,678 | google::protobuf::MergedDescriptorDatabase::FindAllExtensionNumbers(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<int, std::allocator<int>>*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor_database.cc | bool MergedDescriptorDatabase::FindAllExtensionNumbers(
const std::string& extendee_type, std::vector<int>* output) {
std::set<int> merged_results;
std::vector<int> results;
bool success = false;
for (DescriptorDatabase* source : sources_) {
if (source->FindAllExtensionNumbers(extendee_type, &results)) {
std::copy(results.begin(), results.end(),
std::insert_iterator<std::set<int> >(merged_results,
merged_results.begin()));
success = true;
}
results.clear();
}
std::copy(merged_results.begin(), merged_results.end(),
std::insert_iterator<std::vector<int> >(*output, output->end()));
return success;
} | O0 | cpp | google::protobuf::MergedDescriptorDatabase::FindAllExtensionNumbers(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<int, std::allocator<int>>*):
subq $0x168, %rsp # imm = 0x168
movq %rdi, 0x160(%rsp)
movq %rsi, 0x158(%rsp)
movq %rdx, 0x150(%rsp)
movq 0x160(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x76940
leaq 0x108(%rsp), %rdi
callq 0x749c0
movq 0x58(%rsp), %rax
movb $0x0, 0x107(%rsp)
addq $0x8, %rax
movq %rax, 0xf8(%rsp)
movq 0xf8(%rsp), %rdi
callq 0xeacb0
movq %rax, 0xf0(%rsp)
movq 0xf8(%rsp), %rdi
callq 0xeace0
movq %rax, 0xe8(%rsp)
leaq 0xf0(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0xead10
testb $0x1, %al
jne 0xe7da7
jmp 0xe7efc
leaq 0xf0(%rsp), %rdi
callq 0xead50
movq (%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rdi
movq 0x158(%rsp), %rsi
movq (%rdi), %rax
movq 0x28(%rax), %rax
leaq 0x108(%rsp), %rdx
callq *%rax
movb %al, 0x57(%rsp)
jmp 0xe7de6
movb 0x57(%rsp), %al
testb $0x1, %al
jne 0xe7df3
jmp 0xe7edd
leaq 0x108(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x749d0
movq 0x40(%rsp), %rdi
movq %rax, 0xc8(%rsp)
callq 0x74a00
movq %rax, 0xc0(%rsp)
leaq 0x120(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0xeae50
movq 0x48(%rsp), %rsi
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
callq 0xeae80
jmp 0xe7e55
movq 0xc8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movq 0xb8(%rsp), %rcx
callq 0xeadc0
movq %rdx, 0x30(%rsp)
movq %rax, 0x38(%rsp)
jmp 0xe7e86
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movq %rcx, 0x98(%rsp)
movq %rax, 0xa0(%rsp)
movb $0x1, 0x107(%rsp)
jmp 0xe7edd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x74af0
leaq 0x120(%rsp), %rdi
callq 0x76b20
jmp 0xe7fca
leaq 0x108(%rsp), %rdi
callq 0x7ad20
leaq 0xf0(%rsp), %rdi
callq 0xead60
jmp 0xe7d89
leaq 0x120(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xeae50
movq 0x20(%rsp), %rdi
movq %rax, 0x90(%rsp)
callq 0x77f60
movq %rax, 0x88(%rsp)
movq 0x150(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x74a00
movq 0x28(%rsp), %rsi
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rdx
leaq 0x78(%rsp), %rdi
callq 0xeaf40
jmp 0xe7f55
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rcx
callq 0xeaeb0
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
jmp 0xe7f83
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movb 0x107(%rsp), %al
movb %al, 0xf(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x74af0
leaq 0x120(%rsp), %rdi
callq 0x76b20
movb 0xf(%rsp), %al
andb $0x1, %al
addq $0x168, %rsp # imm = 0x168
retq
movq 0xd8(%rsp), %rdi
callq 0x13750
nopw (%rax,%rax)
| _ZN6google8protobuf24MergedDescriptorDatabase23FindAllExtensionNumbersERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSt6vectorIiSaIiEE:
sub rsp, 168h
mov [rsp+168h+var_8], rdi
mov [rsp+168h+var_10], rsi
mov [rsp+168h+var_18], rdx
mov rax, [rsp+168h+var_8]
mov [rsp+168h+var_110], rax
lea rdi, [rsp+168h+var_48]
call _ZNSt3setIiSt4lessIiESaIiEEC2Ev; std::set<int>::set(void)
lea rdi, [rsp+168h+var_60]
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov rax, [rsp+168h+var_110]
mov [rsp+168h+var_61], 0
add rax, 8
mov [rsp+168h+var_70], rax
mov rdi, [rsp+168h+var_70]
call _ZNSt6vectorIPN6google8protobuf18DescriptorDatabaseESaIS3_EE5beginEv; std::vector<google::protobuf::DescriptorDatabase *>::begin(void)
mov [rsp+168h+var_78], rax
mov rdi, [rsp+168h+var_70]
call _ZNSt6vectorIPN6google8protobuf18DescriptorDatabaseESaIS3_EE3endEv; std::vector<google::protobuf::DescriptorDatabase *>::end(void)
mov [rsp+168h+var_80], rax
loc_E7D89:
lea rdi, [rsp+168h+var_78]
lea rsi, [rsp+168h+var_80]
call _ZN9__gnu_cxxneIPPN6google8protobuf18DescriptorDatabaseESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<google::protobuf::DescriptorDatabase **,std::vector<google::protobuf::DescriptorDatabase *>>(__gnu_cxx::__normal_iterator<google::protobuf::DescriptorDatabase **,std::vector<google::protobuf::DescriptorDatabase *>> const&,__gnu_cxx::__normal_iterator<google::protobuf::DescriptorDatabase **,std::vector<google::protobuf::DescriptorDatabase *>> const&)
test al, 1
jnz short loc_E7DA7
jmp loc_E7EFC
loc_E7DA7:
lea rdi, [rsp+168h+var_78]
call _ZNK9__gnu_cxx17__normal_iteratorIPPN6google8protobuf18DescriptorDatabaseESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<google::protobuf::DescriptorDatabase **,std::vector<google::protobuf::DescriptorDatabase *>>::operator*(void)
mov rax, [rax]
mov [rsp+168h+var_88], rax
mov rdi, [rsp+168h+var_88]
mov rsi, [rsp+168h+var_10]
mov rax, [rdi]
mov rax, [rax+28h]
lea rdx, [rsp+168h+var_60]
call rax
mov [rsp+168h+var_111], al
jmp short $+2
loc_E7DE6:
mov al, [rsp+168h+var_111]
test al, 1
jnz short loc_E7DF3
jmp loc_E7EDD
loc_E7DF3:
lea rdi, [rsp+168h+var_60]
mov [rsp+168h+var_128], rdi
call _ZNSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov rdi, [rsp+168h+var_128]
mov [rsp+168h+var_A0], rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov [rsp+168h+var_A8], rax
lea rdi, [rsp+168h+var_48]
mov [rsp+168h+var_120], rdi
call _ZNKSt3setIiSt4lessIiESaIiEE5beginEv; std::set<int>::begin(void)
mov rsi, [rsp+168h+var_120]
mov [rsp+168h+var_C0], rax
mov rdx, [rsp+168h+var_C0]
lea rdi, [rsp+168h+var_B8]
call _ZNSt15insert_iteratorISt3setIiSt4lessIiESaIiEEEC2ERS4_St23_Rb_tree_const_iteratorIiE; std::insert_iterator<std::set<int>>::insert_iterator(std::set<int>&,std::_Rb_tree_const_iterator<int>)
jmp short $+2
loc_E7E55:
mov rdi, [rsp+168h+var_A0]
mov rsi, [rsp+168h+var_A8]
mov rdx, [rsp+168h+var_B8]
mov rcx, [rsp+168h+var_B0]
call _ZSt4copyIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEESt15insert_iteratorISt3setIiSt4lessIiES4_EEET0_T_SE_SD_; std::copy<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::insert_iterator<std::set<int>>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::insert_iterator<std::set<int>>)
mov [rsp+168h+var_138], rdx
mov [rsp+168h+var_130], rax
jmp short $+2
loc_E7E86:
mov rax, [rsp+168h+var_138]
mov rcx, [rsp+168h+var_130]
mov [rsp+168h+var_D0], rcx
mov [rsp+168h+var_C8], rax
mov [rsp+168h+var_61], 1
jmp short loc_E7EDD
mov rcx, rax
mov eax, edx
mov [rsp+arg_D0], rcx
mov [rsp+arg_CC], eax
lea rdi, [rsp+arg_100]
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
lea rdi, [rsp+arg_118]
call _ZNSt3setIiSt4lessIiESaIiEED2Ev; std::set<int>::~set()
jmp loc_E7FCA
loc_E7EDD:
lea rdi, [rsp+168h+var_60]
call _ZNSt6vectorIiSaIiEE5clearEv; std::vector<int>::clear(void)
lea rdi, [rsp+168h+var_78]
call _ZN9__gnu_cxx17__normal_iteratorIPPN6google8protobuf18DescriptorDatabaseESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<google::protobuf::DescriptorDatabase **,std::vector<google::protobuf::DescriptorDatabase *>>::operator++(void)
jmp loc_E7D89
loc_E7EFC:
lea rdi, [rsp+168h+var_48]
mov [rsp+168h+var_148], rdi
call _ZNKSt3setIiSt4lessIiESaIiEE5beginEv; std::set<int>::begin(void)
mov rdi, [rsp+168h+var_148]
mov [rsp+168h+var_D8], rax
call _ZNKSt3setIiSt4lessIiESaIiEE3endEv; std::set<int>::end(void)
mov [rsp+168h+var_E0], rax
mov rdi, [rsp+168h+var_18]
mov [rsp+168h+var_140], rdi
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rsi, [rsp+168h+var_140]
mov [rsp+168h+var_F8], rax
mov rdx, [rsp+168h+var_F8]
lea rdi, [rsp+168h+var_F0]
call _ZNSt15insert_iteratorISt6vectorIiSaIiEEEC2ERS2_N9__gnu_cxx17__normal_iteratorIPiS2_EE; std::insert_iterator<std::vector<int>>::insert_iterator(std::vector<int>&,__gnu_cxx::__normal_iterator<int *,std::vector<int>>)
jmp short $+2
loc_E7F55:
mov rdi, [rsp+168h+var_D8]
mov rsi, [rsp+168h+var_E0]
mov rdx, [rsp+168h+var_F0]
mov rcx, [rsp+168h+var_E8]
call _ZSt4copyISt23_Rb_tree_const_iteratorIiESt15insert_iteratorISt6vectorIiSaIiEEEET0_T_S8_S7_; std::copy<std::_Rb_tree_const_iterator<int>,std::insert_iterator<std::vector<int>>>(std::_Rb_tree_const_iterator<int>,std::_Rb_tree_const_iterator<int>,std::insert_iterator<std::vector<int>>)
mov [rsp+168h+var_158], rdx
mov [rsp+168h+var_150], rax
jmp short $+2
loc_E7F83:
mov rax, [rsp+168h+var_158]
mov rcx, [rsp+168h+var_150]
mov [rsp+168h+var_108], rcx
mov [rsp+168h+var_100], rax
mov al, [rsp+168h+var_61]
mov [rsp+168h+var_159], al
lea rdi, [rsp+168h+var_60]
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
lea rdi, [rsp+168h+var_48]
call _ZNSt3setIiSt4lessIiESaIiEED2Ev; std::set<int>::~set()
mov al, [rsp+168h+var_159]
and al, 1
add rsp, 168h
retn
loc_E7FCA:
mov rdi, [rsp+arg_D0]
call __Unwind_Resume
| char google::protobuf::MergedDescriptorDatabase::FindAllExtensionNumbers(long long a1, long long a2, long long a3)
{
long long v3; // rdx
char v5; // [rsp+Fh] [rbp-159h]
long long v6; // [rsp+28h] [rbp-140h]
long long v7; // [rsp+70h] [rbp-F8h]
_QWORD v8[2]; // [rsp+78h] [rbp-F0h] BYREF
long long v9; // [rsp+88h] [rbp-E0h]
long long v10; // [rsp+90h] [rbp-D8h]
long long v11; // [rsp+98h] [rbp-D0h]
long long v12; // [rsp+A0h] [rbp-C8h]
long long v13; // [rsp+A8h] [rbp-C0h]
_QWORD v14[2]; // [rsp+B0h] [rbp-B8h] BYREF
long long v15; // [rsp+C0h] [rbp-A8h]
long long v16; // [rsp+C8h] [rbp-A0h]
long long v17; // [rsp+E0h] [rbp-88h]
long long v18; // [rsp+E8h] [rbp-80h] BYREF
_QWORD v19[2]; // [rsp+F0h] [rbp-78h] BYREF
char v20; // [rsp+107h] [rbp-61h]
long long v21[3]; // [rsp+108h] [rbp-60h] BYREF
_BYTE v22[48]; // [rsp+120h] [rbp-48h] BYREF
long long v23; // [rsp+150h] [rbp-18h]
long long v24; // [rsp+158h] [rbp-10h]
long long v25; // [rsp+160h] [rbp-8h]
v25 = a1;
v24 = a2;
v23 = a3;
std::set<int>::set((long long)v22);
std::vector<int>::vector((long long)v21);
v20 = 0;
v19[1] = a1 + 8;
v19[0] = std::vector<google::protobuf::DescriptorDatabase *>::begin(a1 + 8);
v18 = std::vector<google::protobuf::DescriptorDatabase *>::end(a1 + 8);
while ( (__gnu_cxx::operator!=<google::protobuf::DescriptorDatabase **,std::vector<google::protobuf::DescriptorDatabase *>>(
v19,
&v18) & 1) != 0 )
{
v17 = *(_QWORD *)__gnu_cxx::__normal_iterator<google::protobuf::DescriptorDatabase **,std::vector<google::protobuf::DescriptorDatabase *>>::operator*(v19);
if ( ((*(long long ( **)(long long, long long, long long *))(*(_QWORD *)v17 + 40LL))(v17, v24, v21) & 1) != 0 )
{
v16 = std::vector<int>::begin((long long)v21);
v15 = std::vector<int>::end((long long)v21);
v13 = std::set<int>::begin();
std::insert_iterator<std::set<int>>::insert_iterator(v14, v22, v13);
v11 = std::copy<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::insert_iterator<std::set<int>>>(
v16,
v15,
v14[0],
v14[1]);
v12 = v3;
v20 = 1;
}
std::vector<int>::clear(v21);
__gnu_cxx::__normal_iterator<google::protobuf::DescriptorDatabase **,std::vector<google::protobuf::DescriptorDatabase *>>::operator++(v19);
}
v10 = std::set<int>::begin();
v9 = std::set<int>::end((long long)v22);
v6 = v23;
v7 = std::vector<int>::end(v23);
std::insert_iterator<std::vector<int>>::insert_iterator(v8, v6, v7);
std::copy<std::_Rb_tree_const_iterator<int>,std::insert_iterator<std::vector<int>>>(v10, v9, v8[0], v8[1]);
v5 = v20;
std::vector<int>::~vector(v21);
std::set<int>::~set((long long)v22);
return v5 & 1;
}
| FindAllExtensionNumbers:
SUB RSP,0x168
MOV qword ptr [RSP + 0x160],RDI
MOV qword ptr [RSP + 0x158],RSI
MOV qword ptr [RSP + 0x150],RDX
MOV RAX,qword ptr [RSP + 0x160]
MOV qword ptr [RSP + 0x58],RAX
LEA RDI,[RSP + 0x120]
CALL 0x00176940
LEA RDI,[RSP + 0x108]
CALL 0x001749c0
MOV RAX,qword ptr [RSP + 0x58]
MOV byte ptr [RSP + 0x107],0x0
ADD RAX,0x8
MOV qword ptr [RSP + 0xf8],RAX
MOV RDI,qword ptr [RSP + 0xf8]
CALL 0x001eacb0
MOV qword ptr [RSP + 0xf0],RAX
MOV RDI,qword ptr [RSP + 0xf8]
CALL 0x001eace0
MOV qword ptr [RSP + 0xe8],RAX
LAB_001e7d89:
LEA RDI,[RSP + 0xf0]
LEA RSI,[RSP + 0xe8]
CALL 0x001ead10
TEST AL,0x1
JNZ 0x001e7da7
JMP 0x001e7efc
LAB_001e7da7:
LEA RDI,[RSP + 0xf0]
CALL 0x001ead50
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0xe0],RAX
MOV RDI,qword ptr [RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0x158]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x28]
LAB_001e7dd6:
LEA RDX,[RSP + 0x108]
CALL RAX
MOV byte ptr [RSP + 0x57],AL
JMP 0x001e7de6
LAB_001e7de6:
MOV AL,byte ptr [RSP + 0x57]
TEST AL,0x1
JNZ 0x001e7df3
JMP 0x001e7edd
LAB_001e7df3:
LEA RDI,[RSP + 0x108]
MOV qword ptr [RSP + 0x40],RDI
CALL 0x001749d0
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0xc8],RAX
CALL 0x00174a00
MOV qword ptr [RSP + 0xc0],RAX
LEA RDI,[RSP + 0x120]
MOV qword ptr [RSP + 0x48],RDI
CALL 0x001eae50
MOV RSI,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xa8],RAX
MOV RDX,qword ptr [RSP + 0xa8]
LEA RDI,[RSP + 0xb0]
CALL 0x001eae80
JMP 0x001e7e55
LAB_001e7e55:
MOV RDI,qword ptr [RSP + 0xc8]
MOV RSI,qword ptr [RSP + 0xc0]
MOV RDX,qword ptr [RSP + 0xb0]
MOV RCX,qword ptr [RSP + 0xb8]
CALL 0x001eadc0
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001e7e86
LAB_001e7e86:
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x98],RCX
MOV qword ptr [RSP + 0xa0],RAX
MOV byte ptr [RSP + 0x107],0x1
JMP 0x001e7edd
LAB_001e7edd:
LEA RDI,[RSP + 0x108]
CALL 0x0017ad20
LEA RDI,[RSP + 0xf0]
CALL 0x001ead60
JMP 0x001e7d89
LAB_001e7efc:
LEA RDI,[RSP + 0x120]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x001eae50
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x90],RAX
CALL 0x00177f60
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0x150]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x00174a00
MOV RSI,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x70],RAX
MOV RDX,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x78]
CALL 0x001eaf40
JMP 0x001e7f55
LAB_001e7f55:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x78]
MOV RCX,qword ptr [RSP + 0x80]
CALL 0x001eaeb0
LAB_001e7f77:
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001e7f83
LAB_001e7f83:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x60],RCX
MOV qword ptr [RSP + 0x68],RAX
MOV AL,byte ptr [RSP + 0x107]
MOV byte ptr [RSP + 0xf],AL
LEA RDI,[RSP + 0x108]
CALL 0x00174af0
LEA RDI,[RSP + 0x120]
CALL 0x00176b20
MOV AL,byte ptr [RSP + 0xf]
AND AL,0x1
ADD RSP,0x168
RET
|
/* google::protobuf::MergedDescriptorDatabase::FindAllExtensionNumbers(std::__cxx11::string const&,
std::vector<int, std::allocator<int> >*) */
ulong __thiscall
google::protobuf::MergedDescriptorDatabase::FindAllExtensionNumbers
(MergedDescriptorDatabase *this,string *param_1,vector *param_2)
{
int1 uVar1;
vector *pvVar2;
bool bVar3;
byte bVar4;
int8 *puVar5;
int8 uVar6;
int1 auVar7 [16];
int8 local_f0;
int8 local_e8;
int8 local_e0;
int8 local_d8;
int1 local_d0 [16];
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_a0;
long *local_88;
int8 local_80;
int8 local_78;
vector<google::protobuf::DescriptorDatabase*,std::allocator<google::protobuf::DescriptorDatabase*>>
*local_70;
int1 local_61;
vector<int,std::allocator<int>> local_60 [24];
set<int,std::less<int>,std::allocator<int>> local_48 [48];
vector *local_18;
string *local_10;
MergedDescriptorDatabase *local_8;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
std::set<int,std::less<int>,std::allocator<int>>::set(local_48);
std::vector<int,std::allocator<int>>::vector(local_60);
local_61 = 0;
local_70 = (vector<google::protobuf::DescriptorDatabase*,std::allocator<google::protobuf::DescriptorDatabase*>>
*)(this + 8);
local_78 = std::
vector<google::protobuf::DescriptorDatabase*,std::allocator<google::protobuf::DescriptorDatabase*>>
::begin(local_70);
local_80 = std::
vector<google::protobuf::DescriptorDatabase*,std::allocator<google::protobuf::DescriptorDatabase*>>
::end(local_70);
while( true ) {
bVar3 = __gnu_cxx::operator!=((__normal_iterator *)&local_78,(__normal_iterator *)&local_80);
if (!bVar3) break;
puVar5 = (int8 *)
__gnu_cxx::
__normal_iterator<google::protobuf::DescriptorDatabase**,std::vector<google::protobuf::DescriptorDatabase*,std::allocator<google::protobuf::DescriptorDatabase*>>>
::operator*((__normal_iterator<google::protobuf::DescriptorDatabase**,std::vector<google::protobuf::DescriptorDatabase*,std::allocator<google::protobuf::DescriptorDatabase*>>>
*)&local_78);
local_88 = (long *)*puVar5;
/* try { // try from 001e7dd6 to 001e7f76 has its CatchHandler @ 001e7eaa */
bVar4 = (**(code **)(*local_88 + 0x28))(local_88,local_10,local_60);
if ((bVar4 & 1) != 0) {
local_a0 = std::vector<int,std::allocator<int>>::begin(local_60);
local_a8 = std::vector<int,std::allocator<int>>::end(local_60);
local_c0 = std::set<int,std::less<int>,std::allocator<int>>::begin(local_48);
std::insert_iterator<std::set<int,std::less<int>,std::allocator<int>>>::insert_iterator
((insert_iterator<std::set<int,std::less<int>,std::allocator<int>>> *)&local_b8,
local_48,local_c0);
auVar7 = std::
copy<__gnu_cxx::__normal_iterator<int*,std::vector<int,std::allocator<int>>>,std::insert_iterator<std::set<int,std::less<int>,std::allocator<int>>>>
(local_a0,local_a8,local_b8,local_b0);
local_61 = 1;
local_d0 = auVar7;
}
std::vector<int,std::allocator<int>>::clear(local_60);
__gnu_cxx::
__normal_iterator<google::protobuf::DescriptorDatabase**,std::vector<google::protobuf::DescriptorDatabase*,std::allocator<google::protobuf::DescriptorDatabase*>>>
::operator++((__normal_iterator<google::protobuf::DescriptorDatabase**,std::vector<google::protobuf::DescriptorDatabase*,std::allocator<google::protobuf::DescriptorDatabase*>>>
*)&local_78);
}
local_d8 = std::set<int,std::less<int>,std::allocator<int>>::begin(local_48);
local_e0 = std::set<int,std::less<int>,std::allocator<int>>::end(local_48);
pvVar2 = local_18;
uVar6 = std::vector<int,std::allocator<int>>::end((vector<int,std::allocator<int>> *)local_18);
std::insert_iterator<std::vector<int,std::allocator<int>>>::insert_iterator
((insert_iterator<std::vector<int,std::allocator<int>>> *)&local_f0,pvVar2,uVar6);
std::
copy<std::_Rb_tree_const_iterator<int>,std::insert_iterator<std::vector<int,std::allocator<int>>>>
(local_d8,local_e0,local_f0,local_e8);
uVar1 = local_61;
std::vector<int,std::allocator<int>>::~vector(local_60);
uVar6 = std::set<int,std::less<int>,std::allocator<int>>::~set(local_48);
return CONCAT71((int7)((ulong)uVar6 >> 8),uVar1) & 0xffffffffffffff01;
}
| |
32,679 | rtree_get_first | eloqsql/storage/myisam/rt_index.c | int rtree_get_first(MI_INFO *info, uint keynr, uint key_length)
{
my_off_t root;
MI_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->rtree_recursion_depth = -1;
info->buff_used = 1;
return rtree_get_req(info, keyinfo, key_length, root, 0);
} | O0 | c | rtree_get_first:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x98(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0xc8f81
callq 0xf60c0
movl $0x89, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc8fb4
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x3c0(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movb $0x1, 0x33d(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
xorl %r8d, %r8d
callq 0xc8fc0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| rtree_get_first:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+218h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+98h]
mov ecx, [rbp+var_14]
mov rax, [rax+rcx*8]
mov [rbp+var_20], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_C8F81
call _my_thread_var
mov dword ptr [rax], 89h
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_C8FB4
loc_C8F81:
mov rax, [rbp+var_10]
mov dword ptr [rax+3C0h], 0FFFFFFFFh
mov rax, [rbp+var_10]
mov byte ptr [rax+33Dh], 1
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov edx, [rbp+var_18]
mov rcx, [rbp+var_20]
xor r8d, r8d
call rtree_get_req
mov [rbp+var_4], eax
loc_C8FB4:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long rtree_get_first(long long a1, const char *a2, unsigned int a3)
{
long long v4; // [rsp+8h] [rbp-28h]
long long v5; // [rsp+10h] [rbp-20h]
v4 = 112LL * (unsigned int)a2 + *(_QWORD *)(*(_QWORD *)a1 + 536LL);
v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 152LL) + 8LL * (unsigned int)a2);
if ( v5 == -1 )
{
*(_DWORD *)my_thread_var(a1, a2) = 137;
return (unsigned int)-1;
}
else
{
*(_DWORD *)(a1 + 960) = -1;
*(_BYTE *)(a1 + 829) = 1;
return (unsigned int)rtree_get_req(a1, v4, a3, v5, 0LL);
}
}
| rtree_get_first:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x98]
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,-0x1
JNZ 0x001c8f81
CALL 0x001f60c0
MOV dword ptr [RAX],0x89
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c8fb4
LAB_001c8f81:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x3c0],0xffffffff
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33d],0x1
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
XOR R8D,R8D
CALL 0x001c8fc0
MOV dword ptr [RBP + -0x4],EAX
LAB_001c8fb4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 rtree_get_first(long *param_1,uint param_2,int4 param_3)
{
long lVar1;
long lVar2;
int4 *puVar3;
int4 local_c;
lVar1 = *(long *)(*param_1 + 0x218);
lVar2 = *(long *)(*(long *)(*param_1 + 0x98) + (ulong)param_2 * 8);
if (lVar2 == -1) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x89;
local_c = 0xffffffff;
}
else {
*(int4 *)(param_1 + 0x78) = 0xffffffff;
*(int1 *)((long)param_1 + 0x33d) = 1;
local_c = rtree_get_req(param_1,lVar1 + (ulong)param_2 * 0x70,param_3,lVar2,0);
}
return local_c;
}
| |
32,680 | rtree_get_first | eloqsql/storage/myisam/rt_index.c | int rtree_get_first(MI_INFO *info, uint keynr, uint key_length)
{
my_off_t root;
MI_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->rtree_recursion_depth = -1;
info->buff_used = 1;
return rtree_get_req(info, keyinfo, key_length, root, 0);
} | O3 | c | rtree_get_first:
movq (%rdi), %rax
movl %esi, %ecx
movq 0x98(%rax), %rdx
movq (%rdx,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x89f2d
imulq $0x70, %rcx, %rsi
addq 0x218(%rax), %rsi
movl $0xffffffff, 0x3c0(%rdi) # imm = 0xFFFFFFFF
movb $0x1, 0x33d(%rdi)
xorl %ecx, %ecx
jmp 0x89f43
pushq %rbp
movq %rsp, %rbp
callq 0xa1b22
movl $0x89, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbp
retq
| rtree_get_first:
mov rax, [rdi]
mov ecx, esi
mov rdx, [rax+98h]
mov rdx, [rdx+rcx*8]
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_89F2D
imul rsi, rcx, 70h ; 'p'
add rsi, [rax+218h]
mov dword ptr [rdi+3C0h], 0FFFFFFFFh
mov byte ptr [rdi+33Dh], 1
xor ecx, ecx
jmp short rtree_get_req
loc_89F2D:
push rbp
mov rbp, rsp
call _my_thread_var
mov dword ptr [rax], 89h
mov eax, 0FFFFFFFFh
pop rbp
retn
| long long rtree_get_first(long long a1, const char *a2)
{
long long v2; // rdx
long long v3; // rsi
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 152LL) + 8LL * (unsigned int)a2);
if ( v2 == -1 )
{
*(_DWORD *)my_thread_var(a1, a2) = 137;
return 0xFFFFFFFFLL;
}
else
{
v3 = *(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * (unsigned int)a2;
*(_DWORD *)(a1 + 960) = -1;
*(_BYTE *)(a1 + 829) = 1;
return rtree_get_req(a1, v3, v2, 0LL);
}
}
| rtree_get_first:
MOV RAX,qword ptr [RDI]
MOV ECX,ESI
MOV RDX,qword ptr [RAX + 0x98]
MOV RDX,qword ptr [RDX + RCX*0x8]
CMP RDX,-0x1
JZ 0x00189f2d
IMUL RSI,RCX,0x70
ADD RSI,qword ptr [RAX + 0x218]
MOV dword ptr [RDI + 0x3c0],0xffffffff
MOV byte ptr [RDI + 0x33d],0x1
XOR ECX,ECX
JMP 0x00189f43
LAB_00189f2d:
PUSH RBP
MOV RBP,RSP
CALL 0x001a1b22
MOV dword ptr [RAX],0x89
MOV EAX,0xffffffff
POP RBP
RET
|
int8 rtree_get_first(long *param_1,ulong param_2)
{
long lVar1;
long lVar2;
int8 uVar3;
int4 *puVar4;
lVar1 = *(long *)(*(long *)(*param_1 + 0x98) + (param_2 & 0xffffffff) * 8);
if (lVar1 != -1) {
lVar2 = *(long *)(*param_1 + 0x218);
*(int4 *)(param_1 + 0x78) = 0xffffffff;
*(int1 *)((long)param_1 + 0x33d) = 1;
uVar3 = rtree_get_req(param_1,(param_2 & 0xffffffff) * 0x70 + lVar2,lVar1,0);
return uVar3;
}
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x89;
return 0xffffffff;
}
| |
32,681 | lunasvg::Rect::united(lunasvg::Rect const&) const | dmazzella[P]pylunasvg/lunasvg/source/graphics.h | constexpr Rect Rect::united(const Rect& rect) const
{
if(!rect.isValid())
return *this;
if(!isValid())
return rect;
auto l = std::min(x, rect.x);
auto t = std::min(y, rect.y);
auto r = std::max(x + w, rect.x + rect.w);
auto b = std::max(y + h, rect.y + rect.h);
return Rect(l, t, r - l, b - t);
} | O0 | c | lunasvg::Rect::united(lunasvg::Rect const&) const:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
callq 0x14530
testb $0x1, %al
jne 0x223ed
movq -0x48(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x224f1
movq -0x48(%rbp), %rdi
callq 0x14530
testb $0x1, %al
jne 0x22412
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x224f1
movq -0x48(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x22510
movq -0x48(%rbp), %rdi
movss (%rax), %xmm0
movss %xmm0, -0x24(%rbp)
addq $0x4, %rdi
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
callq 0x22510
movq %rax, %rcx
movq -0x48(%rbp), %rax
movss (%rcx), %xmm0
movss %xmm0, -0x28(%rbp)
movss (%rax), %xmm0
addss 0x8(%rax), %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x20(%rbp), %rax
movss (%rax), %xmm0
movq -0x20(%rbp), %rax
addss 0x8(%rax), %xmm0
movss %xmm0, -0x34(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x22550
movq %rax, %rcx
movq -0x48(%rbp), %rax
movss (%rcx), %xmm0
movss %xmm0, -0x2c(%rbp)
movss 0x4(%rax), %xmm0
addss 0xc(%rax), %xmm0
movss %xmm0, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x20(%rbp), %rax
addss 0xc(%rax), %xmm0
movss %xmm0, -0x40(%rbp)
leaq -0x3c(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x22550
movss (%rax), %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x24(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movss -0x2c(%rbp), %xmm2
subss -0x24(%rbp), %xmm2
movss -0x38(%rbp), %xmm3
subss -0x28(%rbp), %xmm3
leaq -0x10(%rbp), %rdi
callq 0x14ee0
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZNK7lunasvg4Rect6unitedERKS0_:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
mov rdi, [rbp+var_20]; this
call _ZNK7lunasvg4Rect7isValidEv; lunasvg::Rect::isValid(void)
test al, 1
jnz short loc_223ED
mov rax, [rbp+var_48]
mov rcx, [rax]
mov [rbp+var_10], rcx
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp loc_224F1
loc_223ED:
mov rdi, [rbp+var_48]; this
call _ZNK7lunasvg4Rect7isValidEv; lunasvg::Rect::isValid(void)
test al, 1
jnz short loc_22412
mov rax, [rbp+var_20]
mov rcx, [rax]
mov [rbp+var_10], rcx
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp loc_224F1
loc_22412:
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_20]
call _ZSt3minIfERKT_S2_S2_; std::min<float>(float const&,float const&)
mov rdi, [rbp+var_48]
movss xmm0, dword ptr [rax]
movss [rbp+var_24], xmm0
add rdi, 4
mov rsi, [rbp+var_20]
add rsi, 4
call _ZSt3minIfERKT_S2_S2_; std::min<float>(float const&,float const&)
mov rcx, rax
mov rax, [rbp+var_48]
movss xmm0, dword ptr [rcx]
movss [rbp+var_28], xmm0
movss xmm0, dword ptr [rax]
addss xmm0, dword ptr [rax+8]
movss [rbp+var_30], xmm0
mov rax, [rbp+var_20]
movss xmm0, dword ptr [rax]
mov rax, [rbp+var_20]
addss xmm0, dword ptr [rax+8]
movss [rbp+var_34], xmm0
lea rdi, [rbp+var_30]
lea rsi, [rbp+var_34]
call _ZSt3maxIfERKT_S2_S2_; std::max<float>(float const&,float const&)
mov rcx, rax
mov rax, [rbp+var_48]
movss xmm0, dword ptr [rcx]
movss [rbp+var_2C], xmm0
movss xmm0, dword ptr [rax+4]
addss xmm0, dword ptr [rax+0Ch]
movss [rbp+var_3C], xmm0
mov rax, [rbp+var_20]
movss xmm0, dword ptr [rax+4]
mov rax, [rbp+var_20]
addss xmm0, dword ptr [rax+0Ch]
movss [rbp+var_40], xmm0
lea rdi, [rbp+var_3C]
lea rsi, [rbp+var_40]
call _ZSt3maxIfERKT_S2_S2_; std::max<float>(float const&,float const&)
movss xmm0, dword ptr [rax]
movss [rbp+var_38], xmm0
movss xmm0, [rbp+var_24]; float
movss xmm1, [rbp+var_28]; float
movss xmm2, [rbp+var_2C]
subss xmm2, [rbp+var_24]; float
movss xmm3, [rbp+var_38]
subss xmm3, [rbp+var_28]; float
lea rdi, [rbp+var_10]; this
call _ZN7lunasvg4RectC2Effff; lunasvg::Rect::Rect(float,float,float,float)
loc_224F1:
movsd xmm0, [rbp+var_10]
movsd xmm1, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| double lunasvg::Rect::united(lunasvg::Rect *this, const lunasvg::Rect *a2)
{
float v3; // [rsp+10h] [rbp-40h] BYREF
float v4; // [rsp+14h] [rbp-3Ch] BYREF
float v5; // [rsp+18h] [rbp-38h]
float v6; // [rsp+1Ch] [rbp-34h] BYREF
float v7; // [rsp+20h] [rbp-30h] BYREF
float v8; // [rsp+24h] [rbp-2Ch]
float v9; // [rsp+28h] [rbp-28h]
float v10; // [rsp+2Ch] [rbp-24h]
lunasvg::Rect *v11; // [rsp+30h] [rbp-20h]
lunasvg::Rect *v12; // [rsp+38h] [rbp-18h]
double v13; // [rsp+40h] [rbp-10h] BYREF
long long v14; // [rsp+48h] [rbp-8h]
v12 = this;
v11 = a2;
if ( lunasvg::Rect::isValid(a2) )
{
if ( lunasvg::Rect::isValid(this) )
{
v10 = *(float *)std::min<float>(this, v11);
v9 = *(float *)std::min<float>((char *)this + 4, (char *)v11 + 4);
v7 = *(float *)this + *((float *)this + 2);
v6 = *(float *)v11 + *((float *)v11 + 2);
v8 = *(float *)std::max<float>(&v7, &v6);
v4 = *((float *)this + 1) + *((float *)this + 3);
v3 = *((float *)v11 + 1) + *((float *)v11 + 3);
v5 = *(float *)std::max<float>(&v4, &v3);
lunasvg::Rect::Rect((lunasvg::Rect *)&v13, v10, v9, v8 - v10, v5 - v9);
}
else
{
v13 = *(double *)v11;
v14 = *((_QWORD *)v11 + 1);
}
}
else
{
v13 = *(double *)this;
v14 = *((_QWORD *)this + 1);
}
return v13;
}
| united:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00114530
TEST AL,0x1
JNZ 0x001223ed
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001224f1
LAB_001223ed:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00114530
TEST AL,0x1
JNZ 0x00122412
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001224f1
LAB_00122412:
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00122510
MOV RDI,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RAX]
MOVSS dword ptr [RBP + -0x24],XMM0
ADD RDI,0x4
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x4
CALL 0x00122510
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RCX]
MOVSS dword ptr [RBP + -0x28],XMM0
MOVSS XMM0,dword ptr [RAX]
ADDSS XMM0,dword ptr [RAX + 0x8]
MOVSS dword ptr [RBP + -0x30],XMM0
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM0,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
ADDSS XMM0,dword ptr [RAX + 0x8]
MOVSS dword ptr [RBP + -0x34],XMM0
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x34]
CALL 0x00122550
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RCX]
MOVSS dword ptr [RBP + -0x2c],XMM0
MOVSS XMM0,dword ptr [RAX + 0x4]
ADDSS XMM0,dword ptr [RAX + 0xc]
MOVSS dword ptr [RBP + -0x3c],XMM0
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM0,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x20]
ADDSS XMM0,dword ptr [RAX + 0xc]
MOVSS dword ptr [RBP + -0x40],XMM0
LEA RDI,[RBP + -0x3c]
LEA RSI,[RBP + -0x40]
CALL 0x00122550
MOVSS XMM0,dword ptr [RAX]
MOVSS dword ptr [RBP + -0x38],XMM0
MOVSS XMM0,dword ptr [RBP + -0x24]
MOVSS XMM1,dword ptr [RBP + -0x28]
MOVSS XMM2,dword ptr [RBP + -0x2c]
SUBSS XMM2,dword ptr [RBP + -0x24]
MOVSS XMM3,dword ptr [RBP + -0x38]
SUBSS XMM3,dword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x10]
CALL 0x00114ee0
LAB_001224f1:
MOVSD XMM0,qword ptr [RBP + -0x10]
MOVSD XMM1,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
/* lunasvg::Rect::united(lunasvg::Rect const&) const */
int1 [16] __thiscall lunasvg::Rect::united(Rect *this,Rect *param_1)
{
int1 auVar1 [16];
ulong uVar2;
float *pfVar3;
float local_48;
float local_44;
float local_40;
float local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
Rect *local_28;
Rect *local_20;
int8 local_18;
int8 local_10;
local_28 = param_1;
local_20 = this;
uVar2 = isValid(param_1);
if ((uVar2 & 1) == 0) {
local_18 = *(int8 *)this;
local_10 = *(int8 *)(this + 8);
}
else {
uVar2 = isValid(this);
if ((uVar2 & 1) == 0) {
local_18 = *(int8 *)local_28;
local_10 = *(int8 *)(local_28 + 8);
}
else {
pfVar3 = std::min<float>((float *)this,(float *)local_28);
local_2c = *pfVar3;
pfVar3 = std::min<float>((float *)(this + 4),(float *)(local_28 + 4));
local_30 = *pfVar3;
local_38 = *(float *)this + *(float *)(this + 8);
local_3c = *(float *)local_28 + *(float *)(local_28 + 8);
pfVar3 = std::max<float>(&local_38,&local_3c);
local_34 = *pfVar3;
local_44 = *(float *)(this + 4) + *(float *)(this + 0xc);
local_48 = *(float *)(local_28 + 4) + *(float *)(local_28 + 0xc);
pfVar3 = std::max<float>(&local_44,&local_48);
local_40 = *pfVar3;
Rect((Rect *)&local_18,local_2c,local_30,local_34 - local_2c,local_40 - local_30);
}
}
auVar1._8_8_ = local_10;
auVar1._0_8_ = local_18;
return auVar1;
}
| |
32,682 | my_free | eloqsql/mysys/my_malloc.c | void my_free(void *ptr)
{
my_memory_header *mh;
size_t old_size;
my_bool old_flags;
DBUG_ENTER("my_free");
DBUG_PRINT("my",("ptr: %p", ptr));
if (ptr == NULL)
DBUG_VOID_RETURN;
mh= USER_TO_HEADER(ptr);
old_size= mh->m_size & ~1;
old_flags= mh->m_size & 1;
PSI_CALL_memory_free(mh->m_key, old_size, mh->m_owner);
update_malloc_size(- (longlong) old_size - HEADER_SIZE, old_flags);
#ifndef SAFEMALLOC
/*
Trash memory if not safemalloc. We don't have to do this if safemalloc
is used as safemalloc will also do trashing
*/
TRASH_FREE(ptr, old_size);
#endif
sf_free(mh);
DBUG_VOID_RETURN;
} | O3 | c | my_free:
testq %rdi, %rdi
je 0x9f96f
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq -0x18(%rdi), %rbx
movq -0x18(%rdi), %rdx
movq -0x10(%rdi), %r14
movq %r14, %r15
andq $-0x2, %r15
leaq 0x2e56d9(%rip), %rax # 0x385010
movq (%rax), %rax
movl -0x8(%rdi), %edi
movq %r15, %rsi
callq *0x3f8(%rax)
movq $-0x18, %rdi
subq %r15, %rdi
andl $0x1, %r14d
movl %r14d, %esi
callq *0x2e5193(%rip) # 0x384af0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x29160
retq
| my_free:
test rdi, rdi
jz short locret_9F96F
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
lea rbx, [rdi-18h]
mov rdx, [rdi-18h]
mov r14, [rdi-10h]
mov r15, r14
and r15, 0FFFFFFFFFFFFFFFEh
lea rax, PSI_server
mov rax, [rax]
mov edi, [rdi-8]
mov rsi, r15
call qword ptr [rax+3F8h]
mov rdi, 0FFFFFFFFFFFFFFE8h
sub rdi, r15
and r14d, 1
mov esi, r14d
call cs:update_malloc_size
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _free
locret_9F96F:
retn
| long long my_free(long long a1)
{
long long result; // rax
if ( a1 )
{
((void ( *)(_QWORD, unsigned long long, _QWORD))PSI_server[127])(
*(unsigned int *)(a1 - 8),
*(_QWORD *)(a1 - 16) & 0xFFFFFFFFFFFFFFFELL,
*(_QWORD *)(a1 - 24));
update_malloc_size();
return free(a1 - 24);
}
return result;
}
| my_free:
TEST RDI,RDI
JZ 0x0019f96f
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
LEA RBX,[RDI + -0x18]
MOV RDX,qword ptr [RDI + -0x18]
MOV R14,qword ptr [RDI + -0x10]
MOV R15,R14
AND R15,-0x2
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RDI + -0x8]
MOV RSI,R15
CALL qword ptr [RAX + 0x3f8]
MOV RDI,-0x18
SUB RDI,R15
AND R14D,0x1
MOV ESI,R14D
CALL qword ptr [0x00484af0]
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00129160
LAB_0019f96f:
RET
|
void my_free(long param_1)
{
ulong uVar1;
ulong uVar2;
if (param_1 != 0) {
uVar1 = *(ulong *)(param_1 + -0x10);
uVar2 = uVar1 & 0xfffffffffffffffe;
(**(code **)(PSI_server + 0x3f8))
(*(int4 *)(param_1 + -8),uVar2,*(int8 *)(param_1 + -0x18));
(*(code *)update_malloc_size)(-0x18 - uVar2,(uint)uVar1 & 1);
free((void *)(param_1 + -0x18));
return;
}
return;
}
| |
32,683 | my_uni_utf8mb3_no_range | eloqsql/strings/ctype-utf8.c | static int my_uni_utf8mb3_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r)
{
int count;
if (wc < 0x80)
count= 1;
else if (wc < 0x800)
count= 2;
else if (wc < 0x10000)
count= 3;
else
return MY_CS_ILUNI;
switch (count)
{
case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0]= (uchar) wc;
}
return count;
} | O0 | c | my_uni_utf8mb3_no_range:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x80, -0x18(%rbp)
jae 0x66243
movl $0x1, -0x24(%rbp)
jmp 0x66279
cmpq $0x800, -0x18(%rbp) # imm = 0x800
jae 0x66256
movl $0x2, -0x24(%rbp)
jmp 0x66277
cmpq $0x10000, -0x18(%rbp) # imm = 0x10000
jae 0x66269
movl $0x3, -0x24(%rbp)
jmp 0x66275
movl $0x0, -0x4(%rbp)
jmp 0x6630e
jmp 0x66277
jmp 0x66279
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
subl $0x1, %eax
je 0x662fc
jmp 0x66286
movl -0x28(%rbp), %eax
subl $0x2, %eax
je 0x662cb
jmp 0x66290
movl -0x28(%rbp), %eax
subl $0x3, %eax
jne 0x66308
jmp 0x6629a
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0x800, %rax # imm = 0x800
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0xc0, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uni_utf8mb3_no_range:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_18], 80h
jnb short loc_66243
mov [rbp+var_24], 1
jmp short loc_66279
loc_66243:
cmp [rbp+var_18], 800h
jnb short loc_66256
mov [rbp+var_24], 2
jmp short loc_66277
loc_66256:
cmp [rbp+var_18], offset stru_10000
jnb short loc_66269
mov [rbp+var_24], 3
jmp short loc_66275
loc_66269:
mov [rbp+var_4], 0
jmp loc_6630E
loc_66275:
jmp short $+2
loc_66277:
jmp short $+2
loc_66279:
mov eax, [rbp+var_24]
mov [rbp+var_28], eax
sub eax, 1
jz short loc_662FC
jmp short $+2
loc_66286:
mov eax, [rbp+var_28]
sub eax, 2
jz short loc_662CB
jmp short $+2
loc_66290:
mov eax, [rbp+var_28]
sub eax, 3
jnz short loc_66308
jmp short $+2
loc_6629A:
mov rax, [rbp+var_18]
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+2], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 800h
mov [rbp+var_18], rax
loc_662CB:
mov rax, [rbp+var_18]
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 0C0h
mov [rbp+var_18], rax
loc_662FC:
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
loc_66308:
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_6630E:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_uni_utf8mb3_no_range(long long a1, unsigned long long a2, _BYTE *a3)
{
unsigned int v4; // [rsp+4h] [rbp-24h]
unsigned long long v5; // [rsp+10h] [rbp-18h]
v5 = a2;
if ( a2 >= 0x80 )
{
if ( a2 >= 0x800 )
{
if ( a2 >= (unsigned long long)&stru_10000 )
return 0;
v4 = 3;
}
else
{
v4 = 2;
}
}
else
{
v4 = 1;
}
if ( v4 != 1 )
{
if ( v4 != 2 )
{
a3[2] = a2 & 0x3F | 0x80;
v5 = (a2 >> 6) | 0x800;
}
a3[1] = v5 & 0x3F | 0x80;
v5 = (v5 >> 6) | 0xC0;
}
*a3 = v5;
return v4;
}
| my_uni_utf8mb3_no_range:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x18],0x80
JNC 0x00166243
MOV dword ptr [RBP + -0x24],0x1
JMP 0x00166279
LAB_00166243:
CMP qword ptr [RBP + -0x18],0x800
JNC 0x00166256
MOV dword ptr [RBP + -0x24],0x2
JMP 0x00166277
LAB_00166256:
CMP qword ptr [RBP + -0x18],0x10000
JNC 0x00166269
MOV dword ptr [RBP + -0x24],0x3
JMP 0x00166275
LAB_00166269:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016630e
LAB_00166275:
JMP 0x00166277
LAB_00166277:
JMP 0x00166279
LAB_00166279:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x28],EAX
SUB EAX,0x1
JZ 0x001662fc
JMP 0x00166286
LAB_00166286:
MOV EAX,dword ptr [RBP + -0x28]
SUB EAX,0x2
JZ 0x001662cb
JMP 0x00166290
LAB_00166290:
MOV EAX,dword ptr [RBP + -0x28]
SUB EAX,0x3
JNZ 0x00166308
JMP 0x0016629a
LAB_0016629a:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0x800
MOV qword ptr [RBP + -0x18],RAX
LAB_001662cb:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0xc0
MOV qword ptr [RBP + -0x18],RAX
LAB_001662fc:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
LAB_00166308:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_0016630e:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int my_uni_utf8mb3_no_range(int8 param_1,ulong param_2,int1 *param_3)
{
int local_2c;
ulong local_20;
if (param_2 < 0x80) {
local_2c = 1;
}
else if (param_2 < 0x800) {
local_2c = 2;
}
else {
if (0xffff < param_2) {
return 0;
}
local_2c = 3;
}
local_20 = param_2;
if (local_2c != 1) {
if (local_2c != 2) {
if (local_2c != 3) {
return local_2c;
}
param_3[2] = (byte)param_2 & 0x3f | 0x80;
local_20 = param_2 >> 6 | 0x800;
}
param_3[1] = (byte)local_20 & 0x3f | 0x80;
local_20 = local_20 >> 6 | 0xc0;
}
*param_3 = (char)local_20;
return local_2c;
}
| |
32,684 | inline_mysql_file_fgets | eloqsql/include/mysql/psi/mysql_file.h | static inline char *
inline_mysql_file_fgets(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
char *str, int size, MYSQL_FILE *file)
{
char *result;
#ifdef HAVE_PSI_FILE_INTERFACE
if (psi_likely(file->m_psi))
{
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_stream_locker) (&state, file->m_psi, PSI_FILE_READ);
if (likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) size, src_file, src_line);
result= fgets(str, size, file->m_file);
PSI_FILE_CALL(end_file_wait)(locker, result ? strlen(result) : 0);
return result;
}
}
#endif
result= fgets(str, size, file->m_file);
return result;
} | O0 | c | inline_mysql_file_fgets:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3ae1c
leaq 0x1a9f77(%rip), %rax # 0x1e4ca8
movq (%rax), %rax
movq 0x150(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rsi
leaq -0x88(%rbp), %rdi
movl $0x6, %edx
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3ae1a
leaq 0x1a9f28(%rip), %rax # 0x1e4ca8
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movslq -0x24(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq *%rax
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
callq 0x255e0
movq %rax, -0x38(%rbp)
leaq 0x1a9eef(%rip), %rax # 0x1e4ca8
movq (%rax), %rax
movq 0x218(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x3adee
movq -0x38(%rbp), %rdi
callq 0x25130
movq %rax, -0xa0(%rbp)
jmp 0x3adf9
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x3adf9
movq -0x98(%rbp), %rax
movq -0x90(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3ae3b
jmp 0x3ae1c
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
callq 0x255e0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| inline_mysql_file_fgets:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov rax, [rbp+var_30]
cmp qword ptr [rax+8], 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz loc_3AE1C
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+150h]
mov rcx, [rbp+var_30]
mov rsi, [rcx+8]
lea rdi, [rbp+var_88]
mov edx, 6
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz loc_3AE1A
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
movsxd rsi, [rbp+var_24]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
call rax
mov rdi, [rbp+var_20]
mov esi, [rbp+var_24]
mov rax, [rbp+var_30]
mov rdx, [rax]
call _fgets
mov [rbp+var_38], rax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov [rbp+var_98], rax
mov rax, [rbp+var_40]
mov [rbp+var_90], rax
cmp [rbp+var_38], 0
jz short loc_3ADEE
mov rdi, [rbp+var_38]
call _strlen
mov [rbp+var_A0], rax
jmp short loc_3ADF9
loc_3ADEE:
xor eax, eax
mov [rbp+var_A0], rax
jmp short $+2
loc_3ADF9:
mov rax, [rbp+var_98]
mov rdi, [rbp+var_90]
mov rsi, [rbp+var_A0]
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_3AE3B
loc_3AE1A:
jmp short $+2
loc_3AE1C:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_24]
mov rax, [rbp+var_30]
mov rdx, [rax]
call _fgets
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_3AE3B:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
| long long inline_mysql_file_fgets(long long a1, unsigned int a2, long long a3, unsigned int a4, _QWORD *a5)
{
long long v6; // [rsp+0h] [rbp-A0h]
void ( *v7)(long long, long long); // [rsp+8h] [rbp-98h]
long long v8; // [rsp+10h] [rbp-90h]
_BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF
long long v10; // [rsp+60h] [rbp-40h]
long long v11; // [rsp+68h] [rbp-38h]
_QWORD *v12; // [rsp+70h] [rbp-30h]
unsigned int v13; // [rsp+7Ch] [rbp-24h]
long long v14; // [rsp+80h] [rbp-20h]
unsigned int v15; // [rsp+8Ch] [rbp-14h]
long long v16; // [rsp+90h] [rbp-10h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12 = a5;
if ( a5[1] && (v10 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server[0] + 42))(v9, v12[1], 6LL)) != 0 )
{
(*((void ( **)(long long, _QWORD, long long, _QWORD))PSI_server[0] + 66))(v10, (int)v13, v16, v15);
v11 = fgets(v14, v13, *v12);
v7 = (void ( *)(long long, long long))*((_QWORD *)PSI_server[0] + 67);
v8 = v10;
if ( v11 )
{
v6 = strlen(v11);
v7(v8, v6);
}
else
{
v7(v10, 0LL);
}
return v11;
}
else
{
return fgets(v14, v13, *v12);
}
}
| inline_mysql_file_fgets:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x8],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0013ae1c
LEA RAX,[0x2e4ca8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x150]
MOV RCX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RCX + 0x8]
LEA RDI,[RBP + -0x88]
MOV EDX,0x6
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],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 0x0013ae1a
LEA RAX,[0x2e4ca8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOVSXD RSI,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
CALL RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RAX]
CALL 0x001255e0
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[0x2e4ca8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x90],RAX
CMP qword ptr [RBP + -0x38],0x0
JZ 0x0013adee
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00125130
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x0013adf9
LAB_0013adee:
XOR EAX,EAX
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x0013adf9
LAB_0013adf9:
MOV RAX,qword ptr [RBP + -0x98]
MOV RDI,qword ptr [RBP + -0x90]
MOV RSI,qword ptr [RBP + -0xa0]
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0013ae3b
LAB_0013ae1a:
JMP 0x0013ae1c
LAB_0013ae1c:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RAX]
CALL 0x001255e0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_0013ae3b:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
char * inline_mysql_file_fgets
(int8 param_1,int4 param_2,char *param_3,int param_4,
int8 *param_5)
{
code *pcVar1;
long lVar2;
char *pcVar3;
size_t local_a8;
int1 local_90 [72];
long local_48;
char *local_40;
int8 *local_38;
int local_2c;
char *local_28;
int4 local_1c;
int8 local_18;
local_38 = param_5;
local_2c = param_4;
local_28 = param_3;
local_1c = param_2;
local_18 = param_1;
if (param_5[1] != 0) {
local_48 = (**(code **)(PSI_server + 0x150))(local_90,param_5[1],6);
if (local_48 != 0) {
(**(code **)(PSI_server + 0x210))(local_48,(long)local_2c,local_18,local_1c);
local_40 = fgets(local_28,local_2c,(FILE *)*local_38);
lVar2 = local_48;
pcVar1 = *(code **)(PSI_server + 0x218);
if (local_40 == (char *)0x0) {
local_a8 = 0;
}
else {
local_a8 = strlen(local_40);
}
(*pcVar1)(lVar2,local_a8);
return local_40;
}
local_48 = 0;
}
pcVar3 = fgets(local_28,local_2c,(FILE *)*local_38);
return pcVar3;
}
| |
32,685 | hash_string | bluesky950520[P]quickjs/quickjs.c | static uint32_t hash_string(const JSString *str, uint32_t h)
{
if (str->is_wide_char)
h = hash_string16(str->u.str16, str->len, h);
else
h = hash_string8(str->u.str8, str->len, h);
return h;
} | O1 | c | hash_string:
movl %esi, %eax
movq 0x4(%rdi), %rdx
movl %edx, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
testl %edx, %edx
js 0x3bb76
testq %rcx, %rcx
je 0x3bb92
xorl %edx, %edx
imull $0x107, %eax, %esi # imm = 0x107
movzbl 0x18(%rdi,%rdx), %eax
addl %esi, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x3bb5f
jmp 0x3bb92
testq %rcx, %rcx
je 0x3bb92
xorl %edx, %edx
imull $0x107, %eax, %esi # imm = 0x107
movzwl 0x18(%rdi,%rdx,2), %eax
addl %esi, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x3bb7d
retq
| hash_string:
mov eax, esi
mov rdx, [rdi+4]
mov ecx, edx
and ecx, 7FFFFFFFh
test edx, edx
js short loc_3BB76
test rcx, rcx
jz short locret_3BB92
xor edx, edx
loc_3BB5F:
imul esi, eax, 107h
movzx eax, byte ptr [rdi+rdx+18h]
add eax, esi
inc rdx
cmp rcx, rdx
jnz short loc_3BB5F
jmp short locret_3BB92
loc_3BB76:
test rcx, rcx
jz short locret_3BB92
xor edx, edx
loc_3BB7D:
imul esi, eax, 107h
movzx eax, word ptr [rdi+rdx*2+18h]
add eax, esi
inc rdx
cmp rcx, rdx
jnz short loc_3BB7D
locret_3BB92:
retn
| long long hash_string(long long a1, unsigned int a2)
{
long long result; // rax
long long v3; // rcx
long long j; // rdx
long long i; // rdx
result = a2;
v3 = *(_QWORD *)(a1 + 4) & 0x7FFFFFFFLL;
if ( (int)*(_QWORD *)(a1 + 4) < 0 )
{
if ( v3 )
{
for ( i = 0LL; i != v3; ++i )
result = 263 * (_DWORD)result + (unsigned int)*(unsigned __int16 *)(a1 + 2 * i + 24);
}
}
else if ( v3 )
{
for ( j = 0LL; j != v3; ++j )
result = 263 * (_DWORD)result + (unsigned int)*(unsigned __int8 *)(a1 + j + 24);
}
return result;
}
| |||
32,686 | hash_string | bluesky950520[P]quickjs/quickjs.c | static uint32_t hash_string(const JSString *str, uint32_t h)
{
if (str->is_wide_char)
h = hash_string16(str->u.str16, str->len, h);
else
h = hash_string8(str->u.str8, str->len, h);
return h;
} | O2 | c | hash_string:
movl %esi, %eax
movq 0x4(%rdi), %rcx
addq $0x18, %rdi
movl %ecx, %esi
andl $0x7fffffff, %esi # imm = 0x7FFFFFFF
testl %ecx, %ecx
js 0x3497f
movl %eax, %edx
jmp 0x34631
xorl %ecx, %ecx
cmpq %rcx, %rsi
je 0x34997
imull $0x107, %eax, %edx # imm = 0x107
movzwl (%rdi,%rcx,2), %eax
addl %edx, %eax
incq %rcx
jmp 0x34981
retq
| hash_string:
mov eax, esi
mov rcx, [rdi+4]
add rdi, 18h
mov esi, ecx
and esi, 7FFFFFFFh
test ecx, ecx
js short loc_3497F
mov edx, eax
jmp hash_string8
loc_3497F:
xor ecx, ecx
loc_34981:
cmp rsi, rcx
jz short locret_34997
imul edx, eax, 107h
movzx eax, word ptr [rdi+rcx*2]
add eax, edx
inc rcx
jmp short loc_34981
locret_34997:
retn
| long long hash_string(long long a1, unsigned int a2)
{
long long result; // rax
long long v3; // rcx
long long v4; // rdi
long long v5; // rsi
long long i; // rcx
result = a2;
v3 = *(_QWORD *)(a1 + 4);
v4 = a1 + 24;
v5 = v3 & 0x7FFFFFFF;
if ( (int)v3 >= 0 )
return hash_string8(v4, v5, result);
for ( i = 0LL; v5 != i; ++i )
result = 263 * (_DWORD)result + (unsigned int)*(unsigned __int16 *)(v4 + 2 * i);
return result;
}
| hash_string:
MOV EAX,ESI
MOV RCX,qword ptr [RDI + 0x4]
ADD RDI,0x18
MOV ESI,ECX
AND ESI,0x7fffffff
TEST ECX,ECX
JS 0x0013497f
MOV EDX,EAX
JMP 0x00134631
LAB_0013497f:
XOR ECX,ECX
LAB_00134981:
CMP RSI,RCX
JZ 0x00134997
IMUL EDX,EAX,0x107
MOVZX EAX,word ptr [RDI + RCX*0x2]
ADD EAX,EDX
INC RCX
JMP 0x00134981
LAB_00134997:
RET
|
void hash_string(long param_1,int4 param_2)
{
uint uVar1;
ulong uVar2;
ulong uVar3;
uVar1 = (uint)*(int8 *)(param_1 + 4);
uVar3 = (ulong)(uVar1 & 0x7fffffff);
if (-1 < (int)uVar1) {
hash_string8(param_1 + 0x18,uVar3,param_2);
return;
}
for (uVar2 = 0; uVar3 != uVar2; uVar2 = uVar2 + 1) {
}
return;
}
| |
32,687 | Catch::TagAliasRegistry::expandAliases(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | std::string TagAliasRegistry::expandAliases( std::string const& unexpandedTestSpec ) const {
std::string expandedTestSpec = unexpandedTestSpec;
for( auto const& registryKvp : m_registry ) {
std::size_t pos = expandedTestSpec.find( registryKvp.first );
if( pos != std::string::npos ) {
expandedTestSpec = expandedTestSpec.substr( 0, pos ) +
registryKvp.second.tag +
expandedTestSpec.substr( pos + registryKvp.first.size() );
}
}
return expandedTestSpec;
} | O3 | cpp | Catch::TagAliasRegistry::expandAliases(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
movq %rax, (%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x251d8
movq 0x20(%r14), %r15
addq $0x10, %r14
cmpq %r14, %r15
je 0x6168c
leaq 0x10(%rsp), %r13
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x868e2
cmpq $-0x1, %rax
jne 0x614e7
movq %r15, %rdi
callq 0x17ae0
movq %rax, %r15
cmpq %r14, %rax
jne 0x614ba
jmp 0x6168c
movq %rax, %rbp
leaq 0x68(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x77522
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
movq %r12, %rdi
callq 0x82008
movq %r13, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6152c
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x61538
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
addq 0x28(%r15), %rbp
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq $-0x1, %rcx
callq 0x77522
movq (%rsp), %rcx
movl $0xf, %edi
cmpq %r13, %rcx
leaq 0x58(%rsp), %r12
je 0x61583
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %r8
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0x615b4
movl $0xf, %edi
leaq 0x38(%rsp), %r9
cmpq %r9, %rsi
je 0x615af
movq 0x38(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x615be
movq %rsp, %rdi
callq 0x82008
jmp 0x615cc
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8064e
movq %r12, 0x48(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
jne 0x615e7
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x615f4
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq %rbx, %rdi
leaq 0x48(%rsp), %rsi
callq 0x1816c
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x61635
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x17150
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x61651
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x17150
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x61667
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x17150
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x614d2
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x17150
jmp 0x614d2
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x616c5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x17150
jmp 0x616c5
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x616e5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x17150
jmp 0x616e5
movq %rax, %r14
jmp 0x61701
movq %rax, %r14
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x61701
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x17150
movq (%rbx), %rdi
cmpq 0x20(%rsp), %rdi
je 0x6171b
movq 0x20(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x17150
movq %r14, %rdi
callq 0x17740
nop
| _ZNK5Catch16TagAliasRegistry13expandAliasesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rsp+0B8h+var_98], rax
mov [rdi], rax
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov r15, [r14+20h]
add r14, 10h
cmp r15, r14
jz loc_6168C
lea r13, [rsp+0B8h+var_A8]
loc_614BA:
mov rsi, [r15+20h]
mov rcx, [r15+28h]
mov rdi, rbx
xor edx, edx
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_614E7
loc_614D2:
mov rdi, r15
call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*)
mov r15, rax
cmp rax, r14
jnz short loc_614BA
jmp loc_6168C
loc_614E7:
mov rbp, rax
lea r12, [rsp+0B8h+var_50]
mov rdi, r12
mov rsi, rbx
xor edx, edx
mov rcx, rax
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rsi, [r15+40h]
mov rdx, [r15+48h]
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov [rsp+0B8h+var_B8], r13
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_6152C
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r13+0], xmm0
jmp short loc_61538
loc_6152C:
mov [rsp+0B8h+var_B8], rdx
mov rdx, [rcx]
mov [rsp+0B8h+var_A8], rdx
loc_61538:
mov rdx, [rax+8]
mov [rsp+0B8h+var_B0], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
add rbp, [r15+28h]
lea rdi, [rsp+0B8h+var_90]
mov rsi, rbx
mov rdx, rbp
mov rcx, 0FFFFFFFFFFFFFFFFh
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rcx, [rsp+0B8h+var_B8]
mov edi, 0Fh
cmp rcx, r13
lea r12, [rsp+0B8h+var_60]
jz short loc_61583
mov rdi, [rsp+0B8h+var_A8]
loc_61583:
mov r8, [rsp+0B8h+var_B0]
mov rsi, [rsp+0B8h+var_90]
mov rdx, [rsp+0B8h+var_88]
lea rax, [rdx+r8]
cmp rax, rdi
jbe short loc_615B4
mov edi, 0Fh
lea r9, [rsp+0B8h+var_80]
cmp rsi, r9
jz short loc_615AF
mov rdi, [rsp+0B8h+var_80]
loc_615AF:
cmp rax, rdi
jbe short loc_615BE
loc_615B4:
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_615CC
loc_615BE:
lea rdi, [rsp+0B8h+var_90]
xor esi, esi
xor edx, edx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_615CC:
mov [rsp+0B8h+var_70], r12
mov rdx, [rax]
lea rcx, [rax+10h]
cmp rdx, rcx
jnz short loc_615E7
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
jmp short loc_615F4
loc_615E7:
mov [rsp+0B8h+var_70], rdx
mov rdx, [rcx]
mov [rsp+0B8h+var_60], rdx
loc_615F4:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0B8h+var_68], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
mov rdi, rbx
lea rsi, [rsp+0B8h+var_70]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rsp+0B8h+var_70]; void *
cmp rdi, r12
jz short loc_61635
mov rsi, [rsp+0B8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_61635:
mov rdi, [rsp+0B8h+var_90]; void *
lea rax, [rsp+0B8h+var_80]
cmp rdi, rax
jz short loc_61651
mov rsi, [rsp+0B8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_61651:
mov rdi, [rsp+0B8h+var_B8]; void *
cmp rdi, r13
jz short loc_61667
mov rsi, [rsp+0B8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_61667:
mov rdi, [rsp+0B8h+var_50]; void *
lea rax, [rsp+0B8h+var_40]
cmp rdi, rax
jz loc_614D2
mov rsi, [rsp+0B8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_614D2
loc_6168C:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rsp+arg_20]; void *
lea rax, [rsp+arg_30]
cmp rdi, rax
jz short loc_616C5
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_616C5
mov r14, rax
loc_616C5:
mov rdi, [rsp+0]; void *
cmp rdi, r13
jz short loc_616E5
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_616E5
mov r14, rax
jmp short loc_61701
mov r14, rax
loc_616E5:
mov rdi, [rsp+arg_60]; void *
lea rax, [rsp+arg_70]
cmp rdi, rax
jz short loc_61701
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_61701:
mov rdi, [rbx]; void *
cmp rdi, [rsp+arg_18]
jz short loc_6171B
mov rax, [rsp+arg_18]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6171B:
mov rdi, r14
call __Unwind_Resume
| _QWORD * Catch::TagAliasRegistry::expandAliases(_QWORD *a1, long long a2, long long a3)
{
_QWORD *i; // r15
long long v5; // rax
long long v6; // rbp
long long v7; // rax
__int128 *v8; // rcx
unsigned long long v9; // rdi
unsigned long long v10; // rdi
void **v11; // rax
__int128 *v12; // rcx
void *v14; // [rsp+0h] [rbp-B8h] BYREF
long long v15; // [rsp+8h] [rbp-B0h]
__int128 v16; // [rsp+10h] [rbp-A8h] BYREF
_QWORD *v17; // [rsp+20h] [rbp-98h]
void *v18; // [rsp+28h] [rbp-90h] BYREF
long long v19; // [rsp+30h] [rbp-88h]
_QWORD v20[2]; // [rsp+38h] [rbp-80h] BYREF
void *v21[2]; // [rsp+48h] [rbp-70h] BYREF
__int128 v22; // [rsp+58h] [rbp-60h] BYREF
void *v23[2]; // [rsp+68h] [rbp-50h] BYREF
long long v24; // [rsp+78h] [rbp-40h] BYREF
v17 = a1 + 2;
*a1 = a1 + 2;
std::string::_M_construct<char *>(a1, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
for ( i = *(_QWORD **)(a2 + 32); i != (_QWORD *)(a2 + 16); i = (_QWORD *)std::_Rb_tree_increment(i) )
{
v5 = std::string::find(a1, i[4], 0LL, i[5]);
if ( v5 != -1 )
{
v6 = v5;
std::string::substr(v23, a1, 0LL, v5);
v7 = std::string::_M_append(v23, i[8], i[9]);
v14 = &v16;
v8 = (__int128 *)(v7 + 16);
if ( *(_QWORD *)v7 == v7 + 16 )
{
v16 = *v8;
}
else
{
v14 = *(void **)v7;
*(_QWORD *)&v16 = *(_QWORD *)v8;
}
v15 = *(_QWORD *)(v7 + 8);
*(_QWORD *)v7 = v8;
*(_QWORD *)(v7 + 8) = 0LL;
*(_BYTE *)(v7 + 16) = 0;
std::string::substr(&v18, a1, i[5] + v6, -1LL);
v9 = 15LL;
if ( v14 != &v16 )
v9 = v16;
if ( v19 + v15 <= v9 )
goto LABEL_14;
v10 = 15LL;
if ( v18 != v20 )
v10 = v20[0];
if ( v19 + v15 <= v10 )
v11 = (void **)std::string::replace(&v18, 0LL, 0LL, v14, v15);
else
LABEL_14:
v11 = (void **)std::string::_M_append(&v14, v18, v19);
v21[0] = &v22;
v12 = (__int128 *)(v11 + 2);
if ( *v11 == v11 + 2 )
{
v22 = *v12;
}
else
{
v21[0] = *v11;
*(_QWORD *)&v22 = *(_QWORD *)v12;
}
v21[1] = v11[1];
*v11 = v12;
v11[1] = 0LL;
*(_BYTE *)v12 = 0;
std::string::operator=(a1, (long long)v21);
if ( v21[0] != &v22 )
operator delete(v21[0], v22 + 1);
if ( v18 != v20 )
operator delete(v18, v20[0] + 1LL);
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( v23[0] != &v24 )
operator delete(v23[0], v24 + 1);
}
}
return a1;
}
| expandAliases:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RDI],RAX
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
CALL 0x001251d8
MOV R15,qword ptr [R14 + 0x20]
ADD R14,0x10
CMP R15,R14
JZ 0x0016168c
LEA R13,[RSP + 0x10]
LAB_001614ba:
MOV RSI,qword ptr [R15 + 0x20]
MOV RCX,qword ptr [R15 + 0x28]
MOV RDI,RBX
XOR EDX,EDX
CALL 0x001868e2
CMP RAX,-0x1
JNZ 0x001614e7
LAB_001614d2:
MOV RDI,R15
CALL 0x00117ae0
MOV R15,RAX
CMP RAX,R14
JNZ 0x001614ba
JMP 0x0016168c
LAB_001614e7:
MOV RBP,RAX
LEA R12,[RSP + 0x68]
MOV RDI,R12
MOV RSI,RBX
XOR EDX,EDX
MOV RCX,RAX
CALL 0x00177522
MOV RSI,qword ptr [R15 + 0x40]
MOV RDX,qword ptr [R15 + 0x48]
LAB_00161507:
MOV RDI,R12
CALL 0x00182008
MOV qword ptr [RSP],R13
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x0016152c
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R13],XMM0
JMP 0x00161538
LAB_0016152c:
MOV qword ptr [RSP],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x10],RDX
LAB_00161538:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
ADD RBP,qword ptr [R15 + 0x28]
LAB_00161554:
LEA RDI,[RSP + 0x28]
MOV RSI,RBX
MOV RDX,RBP
MOV RCX,-0x1
CALL 0x00177522
MOV RCX,qword ptr [RSP]
MOV EDI,0xf
CMP RCX,R13
LEA R12,[RSP + 0x58]
JZ 0x00161583
MOV RDI,qword ptr [RSP + 0x10]
LAB_00161583:
MOV R8,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
LEA RAX,[RDX + R8*0x1]
CMP RAX,RDI
JBE 0x001615b4
MOV EDI,0xf
LEA R9,[RSP + 0x38]
CMP RSI,R9
JZ 0x001615af
MOV RDI,qword ptr [RSP + 0x38]
LAB_001615af:
CMP RAX,RDI
JBE 0x001615be
LAB_001615b4:
MOV RDI,RSP
CALL 0x00182008
JMP 0x001615cc
LAB_001615be:
LEA RDI,[RSP + 0x28]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0018064e
LAB_001615cc:
MOV qword ptr [RSP + 0x48],R12
MOV RDX,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RDX,RCX
JNZ 0x001615e7
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
JMP 0x001615f4
LAB_001615e7:
MOV qword ptr [RSP + 0x48],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x58],RDX
LAB_001615f4:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x50],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
MOV RDI,RBX
LEA RSI,[RSP + 0x48]
CALL 0x0011816c
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R12
JZ 0x00161635
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x00117150
LAB_00161635:
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x38]
CMP RDI,RAX
JZ 0x00161651
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00117150
LAB_00161651:
MOV RDI,qword ptr [RSP]
CMP RDI,R13
JZ 0x00161667
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00117150
LAB_00161667:
MOV RDI,qword ptr [RSP + 0x68]
LEA RAX,[RSP + 0x78]
CMP RDI,RAX
JZ 0x001614d2
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00117150
JMP 0x001614d2
LAB_0016168c:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Catch::TagAliasRegistry::expandAliases(std::__cxx11::string const&) const */
string * Catch::TagAliasRegistry::expandAliases(string *param_1)
{
long lVar1;
_Rb_tree_node_base *p_Var2;
long *plVar3;
int8 *puVar4;
ulong *puVar5;
long *in_RDX;
long in_RSI;
ulong uVar6;
ulong *local_b8;
ulong local_b0;
ulong local_a8;
long lStack_a0;
string *local_98;
ulong *local_90;
ulong local_88;
ulong local_80 [2];
long *local_70;
int8 local_68;
long local_60;
int8 uStack_58;
long *local_50 [2];
long local_40 [2];
local_98 = param_1 + 0x10;
*(string **)param_1 = local_98;
std::__cxx11::string::_M_construct<char*>(param_1,*in_RDX,in_RDX[1] + *in_RDX);
p_Var2 = *(_Rb_tree_node_base **)(in_RSI + 0x20);
if (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x10)) {
do {
lVar1 = std::__cxx11::string::find
(param_1,*(char **)(p_Var2 + 0x20),0,*(ulong *)(p_Var2 + 0x28));
if (lVar1 != -1) {
/* try { // try from 001614e7 to 001614fe has its CatchHandler @ 001616dd */
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
/* try { // try from 00161507 to 0016150e has its CatchHandler @ 001616e2 */
plVar3 = (long *)std::__cxx11::string::_M_append
((string *)local_50,*(char **)(p_Var2 + 0x40),
*(ulong *)(p_Var2 + 0x48));
local_b8 = (ulong *)*plVar3;
puVar5 = (ulong *)(plVar3 + 2);
if (local_b8 == puVar5) {
local_a8 = *puVar5;
lStack_a0 = plVar3[3];
local_b8 = &local_a8;
}
else {
local_a8 = *puVar5;
}
local_b0 = plVar3[1];
*plVar3 = (long)puVar5;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
/* try { // try from 00161554 to 0016156a has its CatchHandler @ 001616c2 */
std::__cxx11::string::substr((ulong)&local_90,(ulong)param_1);
uVar6 = 0xf;
if (local_b8 != &local_a8) {
uVar6 = local_a8;
}
if (uVar6 < local_88 + local_b0) {
uVar6 = 0xf;
if (local_90 != local_80) {
uVar6 = local_80[0];
}
if (uVar6 < local_88 + local_b0) goto LAB_001615b4;
puVar4 = (int8 *)
std::__cxx11::string::replace((string *)&local_90,0,0,(char *)local_b8,local_b0);
}
else {
LAB_001615b4:
/* try { // try from 001615b4 to 001615cb has its CatchHandler @ 001616a1 */
puVar4 = (int8 *)
std::__cxx11::string::_M_append((string *)&local_b8,(char *)local_90,local_88);
}
local_70 = (long *)*puVar4;
plVar3 = puVar4 + 2;
if (local_70 == plVar3) {
local_60 = *plVar3;
uStack_58 = puVar4[3];
local_70 = &local_60;
}
else {
local_60 = *plVar3;
}
local_68 = puVar4[1];
*puVar4 = plVar3;
puVar4[1] = 0;
*(int1 *)plVar3 = 0;
std::__cxx11::string::operator=(param_1,(string *)&local_70);
if (local_70 != &local_60) {
operator_delete(local_70,local_60 + 1);
}
if (local_90 != local_80) {
operator_delete(local_90,local_80[0] + 1);
}
if (local_b8 != &local_a8) {
operator_delete(local_b8,local_a8 + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
}
p_Var2 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var2);
} while (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x10));
}
return param_1;
}
| |
32,688 | bchange | eloqsql/strings/bchange.c | void bchange(register uchar *dst, size_t old_length, register const uchar *src,
size_t new_length, size_t tot_length)
{
size_t rest=tot_length-old_length;
if (old_length < new_length)
bmove_upp(dst+rest+new_length,dst+tot_length,rest);
else
bmove(dst+new_length,dst+old_length,rest);
memcpy(dst,src,new_length);
} | O0 | c | bchange:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x68d11
movq -0x8(%rbp), %rdi
addq -0x30(%rbp), %rdi
addq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x68d50
jmp 0x68d2a
movq -0x8(%rbp), %rdi
addq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x265a0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x26280
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| bchange:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_28]
sub rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
cmp rax, [rbp+var_20]
jnb short loc_68D11
mov rdi, [rbp+var_8]
add rdi, [rbp+var_30]
add rdi, [rbp+var_20]
mov rsi, [rbp+var_8]
add rsi, [rbp+var_28]
mov rdx, [rbp+var_30]
call bmove_upp
jmp short loc_68D2A
loc_68D11:
mov rdi, [rbp+var_8]
add rdi, [rbp+var_20]
mov rsi, [rbp+var_8]
add rsi, [rbp+var_10]
mov rdx, [rbp+var_30]
call _memmove
loc_68D2A:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
add rsp, 30h
pop rbp
retn
| long long bchange(long long a1, unsigned long long a2, long long a3, unsigned long long a4, long long a5)
{
long long v6; // [rsp+0h] [rbp-30h]
v6 = a5 - a2;
if ( a2 >= a4 )
memmove(a4 + a1, a2 + a1, v6);
else
bmove_upp(a4 + v6 + a1, a5 + a1, v6);
return memcpy(a1, a3, a4);
}
| bchange:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00168d11
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,qword ptr [RBP + -0x30]
ADD RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00168d50
JMP 0x00168d2a
LAB_00168d11:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001265a0
LAB_00168d2a:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00126280
ADD RSP,0x30
POP RBP
RET
|
void bchange(void *param_1,ulong param_2,void *param_3,ulong param_4,long param_5)
{
size_t __n;
__n = param_5 - param_2;
if (param_2 < param_4) {
bmove_upp((long)param_1 + param_4 + __n,(long)param_1 + param_5,__n);
}
else {
memmove((void *)((long)param_1 + param_4),(void *)((long)param_1 + param_2),__n);
}
memcpy(param_1,param_3,param_4);
return;
}
| |
32,689 | write_hook_for_undo_bulk_insert | eloqsql/storage/maria/ma_blockrec.c | my_bool write_hook_for_undo_bulk_insert(enum translog_record_type type
__attribute__ ((unused)),
TRN *trn, MARIA_HA *tbl_info,
LSN *lsn, void *hook_arg)
{
/*
We are going to call maria_delete_all_rows(), but without logging and
syncing, as an optimization (if we crash before commit, the UNDO will
empty; if we crash after commit, we have flushed and forced the files).
Status still needs to be reset under log mutex, in case of a concurrent
checkpoint.
*/
_ma_reset_status(tbl_info);
return write_hook_for_undo(type, trn, tbl_info, lsn, hook_arg);
} | O0 | c | write_hook_for_undo_bulk_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x78050
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x5b550
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| write_hook_for_undo_bulk_insert:
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 [rbp+var_28], r8
mov rdi, [rbp+var_18]
call _ma_reset_status
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_28]
call write_hook_for_undo
add rsp, 30h
pop rbp
retn
| long long write_hook_for_undo_bulk_insert(unsigned int a1, long long a2, long long a3, _QWORD *a4)
{
ma_reset_status(a3);
return write_hook_for_undo(a1, a2, a3, a4);
}
| write_hook_for_undo_bulk_insert:
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 qword ptr [RBP + -0x28],R8
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00178050
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x28]
CALL 0x0015b550
ADD RSP,0x30
POP RBP
RET
|
void write_hook_for_undo_bulk_insert
(int4 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
_ma_reset_status(param_3);
write_hook_for_undo(param_1,param_2,param_3,param_4,param_5);
return;
}
| |
32,690 | write_hook_for_undo_bulk_insert | eloqsql/storage/maria/ma_blockrec.c | my_bool write_hook_for_undo_bulk_insert(enum translog_record_type type
__attribute__ ((unused)),
TRN *trn, MARIA_HA *tbl_info,
LSN *lsn, void *hook_arg)
{
/*
We are going to call maria_delete_all_rows(), but without logging and
syncing, as an optimization (if we crash before commit, the UNDO will
empty; if we crash after commit, we have flushed and forced the files).
Status still needs to be reset under log mutex, in case of a concurrent
checkpoint.
*/
_ma_reset_status(tbl_info);
return write_hook_for_undo(type, trn, tbl_info, lsn, hook_arg);
} | O3 | c | write_hook_for_undo_bulk_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdx, %rdi
movq %rsi, %rbx
callq 0x5ff61
movq (%r14), %rax
movq %rax, 0x98(%rbx)
movq 0xa0(%rbx), %rcx
movq %rcx, %rdx
shlq $0x8, %rdx
je 0x4e2d9
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
orq %rax, %rcx
movq %rcx, 0xa0(%rbx)
jmp 0x4e2d2
| write_hook_for_undo_bulk_insert:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rcx
mov rdi, rdx
mov rbx, rsi
call _ma_reset_status
mov rax, [r14]
mov [rbx+98h], rax
mov rcx, [rbx+0A0h]
mov rdx, rcx
shl rdx, 8
jz short loc_4E2D9
loc_4E2D2:
xor eax, eax
pop rbx
pop r14
pop rbp
retn
loc_4E2D9:
or rcx, rax
mov [rbx+0A0h], rcx
jmp short loc_4E2D2
| long long write_hook_for_undo_bulk_insert(long long a1, long long a2, long long a3, long long *a4)
{
long long v5; // rax
ma_reset_status(a3);
v5 = *a4;
*(_QWORD *)(a2 + 152) = *a4;
if ( !(*(_QWORD *)(a2 + 160) << 8) )
*(_QWORD *)(a2 + 160) |= v5;
return 0LL;
}
| write_hook_for_undo_bulk_insert:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RCX
MOV RDI,RDX
MOV RBX,RSI
CALL 0x0015ff61
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX + 0x98],RAX
MOV RCX,qword ptr [RBX + 0xa0]
MOV RDX,RCX
SHL RDX,0x8
JZ 0x0014e2d9
LAB_0014e2d2:
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
LAB_0014e2d9:
OR RCX,RAX
MOV qword ptr [RBX + 0xa0],RCX
JMP 0x0014e2d2
|
int8
write_hook_for_undo_bulk_insert(int8 param_1,long param_2,int8 param_3,ulong *param_4)
{
ulong uVar1;
_ma_reset_status(param_3);
uVar1 = *param_4;
*(ulong *)(param_2 + 0x98) = uVar1;
if ((*(ulong *)(param_2 + 0xa0) & 0xffffffffffffff) == 0) {
*(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0xa0) | uVar1;
}
return 0;
}
| |
32,691 | my_getcputime | eloqsql/mysys/my_getsystime.c | ulonglong my_getcputime()
{
#ifdef CLOCK_THREAD_CPUTIME_ID
struct timespec tp;
if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#elif defined(__NR_clock_gettime)
struct timespec tp;
if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#endif /* CLOCK_THREAD_CPUTIME_ID */
return 0;
} | O0 | c | my_getcputime:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x3, %edi
leaq -0x18(%rbp), %rsi
callq 0x38370
cmpl $0x0, %eax
je 0x89d75
movq $0x0, -0x8(%rbp)
jmp 0x89d9d
imulq $0x989680, -0x18(%rbp), %rax # imm = 0x989680
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_getcputime:
push rbp
mov rbp, rsp
sub rsp, 20h
mov edi, 3
lea rsi, [rbp+var_18]
call _clock_gettime
cmp eax, 0
jz short loc_89D75
mov [rbp+var_8], 0
jmp short loc_89D9D
loc_89D75:
imul rax, [rbp+var_18], 989680h
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_20]
add rax, rcx
mov [rbp+var_8], rax
loc_89D9D:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| unsigned long long my_getcputime()
{
long long v1; // [rsp+8h] [rbp-18h] BYREF
unsigned long long v2; // [rsp+10h] [rbp-10h]
if ( (unsigned int)clock_gettime(3LL, &v1) )
return 0LL;
else
return v2 / 0x64 + 10000000 * v1;
}
| my_getcputime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV EDI,0x3
LEA RSI,[RBP + -0x18]
CALL 0x00138370
CMP EAX,0x0
JZ 0x00189d75
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00189d9d
LAB_00189d75:
IMUL RAX,qword ptr [RBP + -0x18],0x989680
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x64
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_00189d9d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long my_getcputime(void)
{
int iVar1;
timespec local_20;
long local_10;
iVar1 = clock_gettime(3,&local_20);
if (iVar1 == 0) {
local_10 = local_20.tv_sec * 10000000 + (ulong)local_20.tv_nsec / 100;
}
else {
local_10 = 0;
}
return local_10;
}
| |
32,692 | ggml_backend_sched_backend_id_from_cur(ggml_backend_sched*, ggml_tensor*) | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp | static int ggml_backend_sched_backend_id_from_cur(ggml_backend_sched_t sched, struct ggml_tensor * tensor) {
// assign pre-allocated nodes to their backend
int cur_backend_id = ggml_backend_sched_backend_from_buffer(sched, tensor, tensor);
if (cur_backend_id != -1) {
SET_CAUSE(tensor, "1.dst");
return cur_backend_id;
}
// view_src
if (tensor->view_src != NULL) {
cur_backend_id = ggml_backend_sched_backend_from_buffer(sched, tensor->view_src, tensor);
if (cur_backend_id != -1) {
SET_CAUSE(tensor, "1.vsrc");
return cur_backend_id;
}
}
if (tensor->buffer || (tensor->view_src && tensor->view_src->buffer)) {
// since the tensor is pre-allocated, it cannot be moved to another backend
ggml_backend_buffer_t buffer = tensor->view_src ? tensor->view_src->buffer : tensor->buffer;
GGML_ABORT("pre-allocated tensor (%s) in a buffer (%s) that cannot run the operation (%s)", tensor->name, ggml_backend_buffer_name(buffer), ggml_op_name(tensor->op));
}
// graph input
if (tensor->flags & GGML_TENSOR_FLAG_INPUT) {
cur_backend_id = sched->n_backends - 1; // last backend (assumed CPU)
SET_CAUSE(tensor, "1.inp");
return cur_backend_id;
}
// operations with weights are preferably run on the same backend as the weights
for (int i = 0; i < GGML_MAX_SRC; i++) {
const struct ggml_tensor * src = tensor->src[i];
if (src == NULL) {
continue;
}
// skip ROPE since the rope freqs tensor is too small to choose a backend based on it
// not an ideal solution
if (tensor->op != GGML_OP_ROPE && src->buffer != NULL && src->buffer->usage == GGML_BACKEND_BUFFER_USAGE_WEIGHTS) {
int src_backend_id = ggml_backend_sched_backend_from_buffer(sched, src, tensor);
// check if a backend with higher prio wants to offload the op
if (src_backend_id == sched->n_backends - 1 && ggml_backend_buffer_is_host(src->buffer)) {
for (int b = 0; b < src_backend_id; b++) {
if (ggml_backend_supports_op(sched->backends[b], tensor) && ggml_backend_offload_op(sched->backends[b], tensor)) {
SET_CAUSE(tensor, "1.off");
return b;
}
}
}
SET_CAUSE(tensor, "1.wgt%d", i);
return src_backend_id;
}
}
return -1;
} | O0 | cpp | ggml_backend_sched_backend_id_from_cur(ggml_backend_sched*, ggml_tensor*):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x63cd0
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
je 0x63505
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x63736
movq -0x18(%rbp), %rax
cmpq $0x0, 0xe8(%rax)
je 0x63541
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0xe8(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x63cd0
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
je 0x6353f
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x63736
jmp 0x63541
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x63574
movq -0x18(%rbp), %rax
cmpq $0x0, 0xe8(%rax)
je 0x635f7
movq -0x18(%rbp), %rax
movq 0xe8(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0x635f7
movq -0x18(%rbp), %rax
cmpq $0x0, 0xe8(%rax)
je 0x63597
movq -0x18(%rbp), %rax
movq 0xe8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x635a3
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x100, %rax # imm = 0x100
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x47e80
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movl 0x50(%rax), %edi
callq 0x46640
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %r8
movq %rax, %r9
leaq 0x51633(%rip), %rdi # 0xb4c17
movl $0x2ea, %esi # imm = 0x2EA
leaq 0x52092(%rip), %rdx # 0xb5682
movb $0x0, %al
callq 0x48a00
movq -0x18(%rbp), %rax
movl 0x94(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x63621
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x63736
movl $0x0, -0x2c(%rbp)
cmpl $0xa, -0x2c(%rbp)
jge 0x6372f
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq 0x98(%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x63652
jmp 0x63721
movq -0x18(%rbp), %rax
cmpl $0x2c, 0x50(%rax)
je 0x6371f
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x6371f
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x1, 0x60(%rax)
jne 0x6371f
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x63cd0
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x63717
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x44ca0
testb $0x1, %al
jne 0x636b9
jmp 0x63717
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x63715
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0x465a0
testb $0x1, %al
jne 0x636e4
jmp 0x63708
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0x48d10
testb $0x1, %al
jne 0x63700
jmp 0x63708
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x63736
jmp 0x6370a
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x636c0
jmp 0x63717
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x63736
jmp 0x63721
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x63628
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
| _ZL38ggml_backend_sched_backend_id_from_curP18ggml_backend_schedP11ggml_tensor:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_18]
call _ZL38ggml_backend_sched_backend_from_bufferP18ggml_backend_schedPK11ggml_tensorS3_; ggml_backend_sched_backend_from_buffer(ggml_backend_sched *,ggml_tensor const*,ggml_tensor const*)
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0FFFFFFFFh
jz short loc_63505
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
jmp loc_63736
loc_63505:
mov rax, [rbp+var_18]
cmp qword ptr [rax+0E8h], 0
jz short loc_63541
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+0E8h]
mov rdx, [rbp+var_18]
call _ZL38ggml_backend_sched_backend_from_bufferP18ggml_backend_schedPK11ggml_tensorS3_; ggml_backend_sched_backend_from_buffer(ggml_backend_sched *,ggml_tensor const*,ggml_tensor const*)
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0FFFFFFFFh
jz short loc_6353F
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
jmp loc_63736
loc_6353F:
jmp short $+2
loc_63541:
mov rax, [rbp+var_18]
cmp qword ptr [rax+8], 0
jnz short loc_63574
mov rax, [rbp+var_18]
cmp qword ptr [rax+0E8h], 0
jz loc_635F7
mov rax, [rbp+var_18]
mov rax, [rax+0E8h]
cmp qword ptr [rax+8], 0
jz loc_635F7
loc_63574:
mov rax, [rbp+var_18]
cmp qword ptr [rax+0E8h], 0
jz short loc_63597
mov rax, [rbp+var_18]
mov rax, [rax+0E8h]
mov rax, [rax+8]
mov [rbp+var_48], rax
jmp short loc_635A3
loc_63597:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_48], rax
loc_635A3:
mov rax, [rbp+var_48]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
add rax, 100h
mov [rbp+var_58], rax
mov rdi, [rbp+var_28]
call _ggml_backend_buffer_name
mov [rbp+var_50], rax
mov rax, [rbp+var_18]
mov edi, [rax+50h]
call _ggml_op_name
mov rcx, [rbp+var_58]
mov r8, [rbp+var_50]
mov r9, rax
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 2EAh
lea rdx, aPreAllocatedTe; "pre-allocated tensor (%s) in a buffer ("...
mov al, 0
call _ggml_abort
loc_635F7:
mov rax, [rbp+var_18]
mov eax, [rax+94h]
and eax, 1
cmp eax, 0
jz short loc_63621
mov rax, [rbp+var_10]
mov eax, [rax+4]
sub eax, 1
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
jmp loc_63736
loc_63621:
mov [rbp+var_2C], 0
loc_63628:
cmp [rbp+var_2C], 0Ah
jge loc_6372F
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_2C]
mov rax, [rax+rcx*8+98h]
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_63652
jmp loc_63721
loc_63652:
mov rax, [rbp+var_18]
cmp dword ptr [rax+50h], 2Ch ; ','
jz loc_6371F
mov rax, [rbp+var_38]
cmp qword ptr [rax+8], 0
jz loc_6371F
mov rax, [rbp+var_38]
mov rax, [rax+8]
cmp dword ptr [rax+60h], 1
jnz loc_6371F
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_18]
call _ZL38ggml_backend_sched_backend_from_bufferP18ggml_backend_schedPK11ggml_tensorS3_; ggml_backend_sched_backend_from_buffer(ggml_backend_sched *,ggml_tensor const*,ggml_tensor const*)
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_10]
mov ecx, [rcx+4]
sub ecx, 1
cmp eax, ecx
jnz short loc_63717
mov rax, [rbp+var_38]
mov rdi, [rax+8]
call _ggml_backend_buffer_is_host
test al, 1
jnz short loc_636B9
jmp short loc_63717
loc_636B9:
mov [rbp+var_40], 0
loc_636C0:
mov eax, [rbp+var_40]
cmp eax, [rbp+var_3C]
jge short loc_63715
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_40]
mov rdi, [rax+rcx*8+8]
mov rsi, [rbp+var_18]
call _ggml_backend_supports_op
test al, 1
jnz short loc_636E4
jmp short loc_63708
loc_636E4:
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_40]
mov rdi, [rax+rcx*8+8]
mov rsi, [rbp+var_18]
call _ggml_backend_offload_op
test al, 1
jnz short loc_63700
jmp short loc_63708
loc_63700:
mov eax, [rbp+var_40]
mov [rbp+var_4], eax
jmp short loc_63736
loc_63708:
jmp short $+2
loc_6370A:
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_40], eax
jmp short loc_636C0
loc_63715:
jmp short $+2
loc_63717:
mov eax, [rbp+var_3C]
mov [rbp+var_4], eax
jmp short loc_63736
loc_6371F:
jmp short $+2
loc_63721:
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp loc_63628
loc_6372F:
mov [rbp+var_4], 0FFFFFFFFh
loc_63736:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long ggml_backend_sched_backend_id_from_cur(long long a1, long long a2)
{
char *v2; // rax
const char *v4; // [rsp+10h] [rbp-50h]
long long v5; // [rsp+18h] [rbp-48h]
unsigned int j; // [rsp+20h] [rbp-40h]
unsigned int v7; // [rsp+24h] [rbp-3Ch]
long long v8; // [rsp+28h] [rbp-38h]
int i; // [rsp+34h] [rbp-2Ch]
unsigned int v10; // [rsp+44h] [rbp-1Ch]
unsigned int v11; // [rsp+44h] [rbp-1Ch]
v10 = ggml_backend_sched_backend_from_buffer(a1, a2, a2);
if ( v10 == -1 )
{
if ( !*(_QWORD *)(a2 + 232)
|| (v11 = ggml_backend_sched_backend_from_buffer(a1, *(_QWORD *)(a2 + 232), a2), v11 == -1) )
{
if ( *(_QWORD *)(a2 + 8) || *(_QWORD *)(a2 + 232) && *(_QWORD *)(*(_QWORD *)(a2 + 232) + 8LL) )
{
if ( *(_QWORD *)(a2 + 232) )
v5 = *(_QWORD *)(*(_QWORD *)(a2 + 232) + 8LL);
else
v5 = *(_QWORD *)(a2 + 8);
v4 = (const char *)ggml_backend_buffer_name(v5);
v2 = ggml_op_name(*(_DWORD *)(a2 + 80));
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp",
746,
(long long)"pre-allocated tensor (%s) in a buffer (%s) that cannot run the operation (%s)",
(const char *)(a2 + 256),
v4,
v2);
}
if ( (*(_DWORD *)(a2 + 148) & 1) != 0 )
{
return (unsigned int)(*(_DWORD *)(a1 + 4) - 1);
}
else
{
for ( i = 0; ; ++i )
{
if ( i >= 10 )
return (unsigned int)-1;
v8 = *(_QWORD *)(a2 + 8LL * i + 152);
if ( v8 )
{
if ( *(_DWORD *)(a2 + 80) != 44 && *(_QWORD *)(v8 + 8) && *(_DWORD *)(*(_QWORD *)(v8 + 8) + 96LL) == 1 )
break;
}
}
v7 = ggml_backend_sched_backend_from_buffer(a1, v8, a2);
if ( v7 == *(_DWORD *)(a1 + 4) - 1 && (ggml_backend_buffer_is_host(*(_QWORD *)(v8 + 8)) & 1) != 0 )
{
for ( j = 0; (int)j < (int)v7; ++j )
{
if ( (ggml_backend_supports_op(*(_QWORD *)(a1 + 8LL * (int)j + 8), a2) & 1) != 0
&& (ggml_backend_offload_op(*(_QWORD *)(a1 + 8LL * (int)j + 8), a2) & 1) != 0 )
{
return j;
}
}
}
return v7;
}
}
else
{
return v11;
}
}
else
{
return v10;
}
}
| ggml_backend_sched_backend_id_from_cur:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00163cd0
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],-0x1
JZ 0x00163505
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00163736
LAB_00163505:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0xe8],0x0
JZ 0x00163541
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0xe8]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00163cd0
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],-0x1
JZ 0x0016353f
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00163736
LAB_0016353f:
JMP 0x00163541
LAB_00163541:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x00163574
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0xe8],0x0
JZ 0x001635f7
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0xe8]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001635f7
LAB_00163574:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0xe8],0x0
JZ 0x00163597
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0xe8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001635a3
LAB_00163597:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x48],RAX
LAB_001635a3:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x100
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00147e80
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,dword ptr [RAX + 0x50]
CALL 0x00146640
MOV RCX,qword ptr [RBP + -0x58]
MOV R8,qword ptr [RBP + -0x50]
MOV R9,RAX
LEA RDI,[0x1b4c17]
MOV ESI,0x2ea
LEA RDX,[0x1b5682]
MOV AL,0x0
CALL 0x00148a00
LAB_001635f7:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x94]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00163621
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
SUB EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00163736
LAB_00163621:
MOV dword ptr [RBP + -0x2c],0x0
LAB_00163628:
CMP dword ptr [RBP + -0x2c],0xa
JGE 0x0016372f
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RAX + RCX*0x8 + 0x98]
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00163652
JMP 0x00163721
LAB_00163652:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x50],0x2c
JZ 0x0016371f
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0016371f
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
CMP dword ptr [RAX + 0x60],0x1
JNZ 0x0016371f
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00163cd0
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x4]
SUB ECX,0x1
CMP EAX,ECX
JNZ 0x00163717
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00144ca0
TEST AL,0x1
JNZ 0x001636b9
JMP 0x00163717
LAB_001636b9:
MOV dword ptr [RBP + -0x40],0x0
LAB_001636c0:
MOV EAX,dword ptr [RBP + -0x40]
CMP EAX,dword ptr [RBP + -0x3c]
JGE 0x00163715
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + RCX*0x8 + 0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001465a0
TEST AL,0x1
JNZ 0x001636e4
JMP 0x00163708
LAB_001636e4:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + RCX*0x8 + 0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00148d10
TEST AL,0x1
JNZ 0x00163700
JMP 0x00163708
LAB_00163700:
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00163736
LAB_00163708:
JMP 0x0016370a
LAB_0016370a:
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
JMP 0x001636c0
LAB_00163715:
JMP 0x00163717
LAB_00163717:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00163736
LAB_0016371f:
JMP 0x00163721
LAB_00163721:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00163628
LAB_0016372f:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_00163736:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
/* ggml_backend_sched_backend_id_from_cur(ggml_backend_sched*, ggml_tensor*) */
int ggml_backend_sched_backend_id_from_cur(ggml_backend_sched *param_1,ggml_tensor *param_2)
{
ggml_tensor *pgVar1;
int iVar2;
int8 uVar3;
int8 uVar4;
ulong uVar5;
int8 local_50;
int local_48;
int local_34;
int local_c;
local_c = ggml_backend_sched_backend_from_buffer(param_1,param_2,param_2);
if ((local_c == -1) &&
((*(long *)(param_2 + 0xe8) == 0 ||
(local_c = ggml_backend_sched_backend_from_buffer
(param_1,*(ggml_tensor **)(param_2 + 0xe8),param_2), local_c == -1)))) {
if ((*(long *)(param_2 + 8) != 0) ||
((*(long *)(param_2 + 0xe8) != 0 && (*(long *)(*(long *)(param_2 + 0xe8) + 8) != 0)))) {
if (*(long *)(param_2 + 0xe8) == 0) {
local_50 = *(int8 *)(param_2 + 8);
}
else {
local_50 = *(int8 *)(*(long *)(param_2 + 0xe8) + 8);
}
uVar3 = ggml_backend_buffer_name(local_50);
uVar4 = ggml_op_name(*(int4 *)(param_2 + 0x50));
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp"
,0x2ea,
"pre-allocated tensor (%s) in a buffer (%s) that cannot run the operation (%s)",
param_2 + 0x100,uVar3,uVar4);
}
if ((*(uint *)(param_2 + 0x94) & 1) == 0) {
for (local_34 = 0; local_34 < 10; local_34 = local_34 + 1) {
pgVar1 = *(ggml_tensor **)(param_2 + (long)local_34 * 8 + 0x98);
if ((((pgVar1 != (ggml_tensor *)0x0) && (*(int *)(param_2 + 0x50) != 0x2c)) &&
(*(long *)(pgVar1 + 8) != 0)) && (*(int *)(*(long *)(pgVar1 + 8) + 0x60) == 1)) {
iVar2 = ggml_backend_sched_backend_from_buffer(param_1,pgVar1,param_2);
if (iVar2 != *(int *)(param_1 + 4) + -1) {
return iVar2;
}
uVar5 = ggml_backend_buffer_is_host(*(int8 *)(pgVar1 + 8));
if ((uVar5 & 1) != 0) {
local_48 = 0;
while( true ) {
if (iVar2 <= local_48) {
return iVar2;
}
uVar5 = ggml_backend_supports_op
(*(int8 *)(param_1 + (long)local_48 * 8 + 8),param_2);
if (((uVar5 & 1) != 0) &&
(uVar5 = ggml_backend_offload_op
(*(int8 *)(param_1 + (long)local_48 * 8 + 8),param_2),
(uVar5 & 1) != 0)) break;
local_48 = local_48 + 1;
}
return local_48;
}
return iVar2;
}
}
local_c = -1;
}
else {
local_c = *(int *)(param_1 + 4) + -1;
}
}
return local_c;
}
| |
32,693 | ggml_backend_sched_backend_id_from_cur(ggml_backend_sched*, ggml_tensor*) | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp | static int ggml_backend_sched_backend_id_from_cur(ggml_backend_sched_t sched, struct ggml_tensor * tensor) {
// assign pre-allocated nodes to their backend
int cur_backend_id = ggml_backend_sched_backend_from_buffer(sched, tensor, tensor);
if (cur_backend_id != -1) {
SET_CAUSE(tensor, "1.dst");
return cur_backend_id;
}
// view_src
if (tensor->view_src != NULL) {
cur_backend_id = ggml_backend_sched_backend_from_buffer(sched, tensor->view_src, tensor);
if (cur_backend_id != -1) {
SET_CAUSE(tensor, "1.vsrc");
return cur_backend_id;
}
}
if (tensor->buffer || (tensor->view_src && tensor->view_src->buffer)) {
// since the tensor is pre-allocated, it cannot be moved to another backend
ggml_backend_buffer_t buffer = tensor->view_src ? tensor->view_src->buffer : tensor->buffer;
GGML_ABORT("pre-allocated tensor (%s) in a buffer (%s) that cannot run the operation (%s)", tensor->name, ggml_backend_buffer_name(buffer), ggml_op_name(tensor->op));
}
// graph input
if (tensor->flags & GGML_TENSOR_FLAG_INPUT) {
cur_backend_id = sched->n_backends - 1; // last backend (assumed CPU)
SET_CAUSE(tensor, "1.inp");
return cur_backend_id;
}
// operations with weights are preferably run on the same backend as the weights
for (int i = 0; i < GGML_MAX_SRC; i++) {
const struct ggml_tensor * src = tensor->src[i];
if (src == NULL) {
continue;
}
// skip ROPE since the rope freqs tensor is too small to choose a backend based on it
// not an ideal solution
if (tensor->op != GGML_OP_ROPE && src->buffer != NULL && src->buffer->usage == GGML_BACKEND_BUFFER_USAGE_WEIGHTS) {
int src_backend_id = ggml_backend_sched_backend_from_buffer(sched, src, tensor);
// check if a backend with higher prio wants to offload the op
if (src_backend_id == sched->n_backends - 1 && ggml_backend_buffer_is_host(src->buffer)) {
for (int b = 0; b < src_backend_id; b++) {
if (ggml_backend_supports_op(sched->backends[b], tensor) && ggml_backend_offload_op(sched->backends[b], tensor)) {
SET_CAUSE(tensor, "1.off");
return b;
}
}
}
SET_CAUSE(tensor, "1.wgt%d", i);
return src_backend_id;
}
}
return -1;
} | O3 | cpp | ggml_backend_sched_backend_id_from_cur(ggml_backend_sched*, ggml_tensor*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdx
callq 0x294f5
cmpl $-0x1, %eax
je 0x292de
movl %eax, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0xe8(%rbx), %rsi
testq %rsi, %rsi
je 0x2931d
movq %r14, %rdi
movq %rbx, %rdx
callq 0x294f5
cmpl $-0x1, %eax
jne 0x292cc
movq 0xe8(%rbx), %rax
cmpq $0x0, 0x8(%rbx)
jne 0x29402
testq %rax, %rax
je 0x29328
cmpq $0x0, 0x8(%rax)
je 0x29328
jmp 0x29402
cmpq $0x0, 0x8(%rbx)
jne 0x29400
testb $0x1, 0x94(%rbx)
jne 0x29369
movl $0x13, %eax
movq (%rbx,%rax,8), %r12
testq %r12, %r12
je 0x29355
cmpl $0x2c, 0x50(%rbx)
je 0x29355
movq 0x8(%r12), %rcx
testq %rcx, %rcx
je 0x29355
cmpl $0x1, 0x60(%rcx)
je 0x29375
incq %rax
cmpq $0x1d, %rax
jne 0x29336
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
jmp 0x292cf
movl 0x4(%r14), %r15d
decl %r15d
jmp 0x292cf
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x294f5
movl %eax, %r15d
movl 0x4(%r14), %ecx
decl %ecx
cmpl %ecx, %eax
jne 0x292cf
movq 0x8(%r12), %rax
movq 0x48(%rax), %rdi
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x292cf
callq *%rax
testl %r15d, %r15d
setg %cl
testb %cl, %al
je 0x292cf
xorl %r12d, %r12d
movq 0x8(%r14,%r12,8), %rax
movq 0x70(%rax), %rdi
movq %rbx, %rsi
callq *0x48(%rdi)
testb %al, %al
je 0x293eb
movq 0x8(%r14,%r12,8), %rax
movq 0x70(%rax), %rdi
movq 0x58(%rdi), %rax
testq %rax, %rax
je 0x293eb
movq %rbx, %rsi
callq *%rax
testb %al, %al
jne 0x293f8
incq %r12
cmpq %r12, %r15
jne 0x293bd
jmp 0x292cf
movl %r12d, %r15d
jmp 0x292cf
xorl %eax, %eax
testq %rax, %rax
cmoveq %rbx, %rax
movq 0x8(%rax), %rax
leaq 0x100(%rbx), %r14
movq 0x48(%rax), %rdi
callq *(%rdi)
movq %rax, %r15
movl 0x50(%rbx), %edi
callq 0x17320
leaq 0x263e8(%rip), %rdi # 0x4f814
leaq 0x26e4c(%rip), %rdx # 0x5027f
movl $0x2ea, %esi # imm = 0x2EA
movq %r14, %rcx
movq %r15, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x17cd0
| _ZL38ggml_backend_sched_backend_id_from_curP18ggml_backend_schedP11ggml_tensor:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rdx, rsi
call _ZL38ggml_backend_sched_backend_from_bufferP18ggml_backend_schedPK11ggml_tensorS3_; ggml_backend_sched_backend_from_buffer(ggml_backend_sched *,ggml_tensor const*,ggml_tensor const*)
cmp eax, 0FFFFFFFFh
jz short loc_292DE
loc_292CC:
mov r15d, eax
loc_292CF:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_292DE:
mov rsi, [rbx+0E8h]
test rsi, rsi
jz short loc_2931D
mov rdi, r14
mov rdx, rbx
call _ZL38ggml_backend_sched_backend_from_bufferP18ggml_backend_schedPK11ggml_tensorS3_; ggml_backend_sched_backend_from_buffer(ggml_backend_sched *,ggml_tensor const*,ggml_tensor const*)
cmp eax, 0FFFFFFFFh
jnz short loc_292CC
mov rax, [rbx+0E8h]
cmp qword ptr [rbx+8], 0
jnz loc_29402
test rax, rax
jz short loc_29328
cmp qword ptr [rax+8], 0
jz short loc_29328
jmp loc_29402
loc_2931D:
cmp qword ptr [rbx+8], 0
jnz loc_29400
loc_29328:
test byte ptr [rbx+94h], 1
jnz short loc_29369
mov eax, 13h
loc_29336:
mov r12, [rbx+rax*8]
test r12, r12
jz short loc_29355
cmp dword ptr [rbx+50h], 2Ch ; ','
jz short loc_29355
mov rcx, [r12+8]
test rcx, rcx
jz short loc_29355
cmp dword ptr [rcx+60h], 1
jz short loc_29375
loc_29355:
inc rax
cmp rax, 1Dh
jnz short loc_29336
mov r15d, 0FFFFFFFFh
jmp loc_292CF
loc_29369:
mov r15d, [r14+4]
dec r15d
jmp loc_292CF
loc_29375:
mov rdi, r14
mov rsi, r12
mov rdx, rbx
call _ZL38ggml_backend_sched_backend_from_bufferP18ggml_backend_schedPK11ggml_tensorS3_; ggml_backend_sched_backend_from_buffer(ggml_backend_sched *,ggml_tensor const*,ggml_tensor const*)
mov r15d, eax
mov ecx, [r14+4]
dec ecx
cmp eax, ecx
jnz loc_292CF
mov rax, [r12+8]
mov rdi, [rax+48h]
mov rax, [rdi+28h]
test rax, rax
jz loc_292CF
call rax
test r15d, r15d
setnle cl
test al, cl
jz loc_292CF
xor r12d, r12d
loc_293BD:
mov rax, [r14+r12*8+8]
mov rdi, [rax+70h]
mov rsi, rbx
call qword ptr [rdi+48h]
test al, al
jz short loc_293EB
mov rax, [r14+r12*8+8]
mov rdi, [rax+70h]
mov rax, [rdi+58h]
test rax, rax
jz short loc_293EB
mov rsi, rbx
call rax
test al, al
jnz short loc_293F8
loc_293EB:
inc r12
cmp r15, r12
jnz short loc_293BD
jmp loc_292CF
loc_293F8:
mov r15d, r12d
jmp loc_292CF
loc_29400:
xor eax, eax
loc_29402:
test rax, rax
cmovz rax, rbx
mov rax, [rax+8]
lea r14, [rbx+100h]
mov rdi, [rax+48h]
call qword ptr [rdi]
mov r15, rax
mov edi, [rbx+50h]
call _ggml_op_name
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aPreAllocatedTe; "pre-allocated tensor (%s) in a buffer ("...
mov esi, 2EAh
mov rcx, r14
mov r8, r15
mov r9, rax
xor eax, eax
call _ggml_abort
| long long ggml_backend_sched_backend_id_from_cur(long long a1, long long a2)
{
int v4; // eax
long long v5; // r15
long long v7; // rsi
long long v8; // rax
long long v9; // rax
long long v10; // r12
long long v11; // rcx
unsigned int v12; // eax
unsigned __int8 (*v13)(void); // rax
long long v14; // r12
long long v15; // rdi
long long v16; // rdi
unsigned __int8 ( *v17)(long long, long long); // rax
int v18; // r15d
unsigned int v19; // eax
v4 = ggml_backend_sched_backend_from_buffer(a1, a2, a2);
if ( v4 != -1 )
goto LABEL_2;
v7 = *(_QWORD *)(a2 + 232);
if ( v7 )
{
v4 = ggml_backend_sched_backend_from_buffer(a1, v7, a2);
if ( v4 != -1 )
{
LABEL_2:
LODWORD(v5) = v4;
return (unsigned int)v5;
}
v8 = *(_QWORD *)(a2 + 232);
if ( *(_QWORD *)(a2 + 8) || v8 && *(_QWORD *)(v8 + 8) )
{
LABEL_31:
if ( !v8 )
v8 = a2;
v18 = (**(long long (***)(void))(*(_QWORD *)(v8 + 8) + 72LL))();
v19 = (unsigned int)ggml_op_name(*(_DWORD *)(a2 + 80));
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp",
746,
(unsigned int)"pre-allocated tensor (%s) in a buffer (%s) that cannot run the operation (%s)",
a2 + 256,
v18,
v19);
}
}
else if ( *(_QWORD *)(a2 + 8) )
{
v8 = 0LL;
goto LABEL_31;
}
if ( (*(_BYTE *)(a2 + 148) & 1) != 0 )
{
LODWORD(v5) = *(_DWORD *)(a1 + 4) - 1;
}
else
{
v9 = 19LL;
while ( 1 )
{
v10 = *(_QWORD *)(a2 + 8 * v9);
if ( v10 )
{
if ( *(_DWORD *)(a2 + 80) != 44 )
{
v11 = *(_QWORD *)(v10 + 8);
if ( v11 )
{
if ( *(_DWORD *)(v11 + 96) == 1 )
break;
}
}
}
if ( ++v9 == 29 )
{
LODWORD(v5) = -1;
return (unsigned int)v5;
}
}
v12 = ggml_backend_sched_backend_from_buffer(a1, *(_QWORD *)(a2 + 8 * v9), a2);
v5 = v12;
if ( v12 == *(_DWORD *)(a1 + 4) - 1 )
{
v13 = *(unsigned __int8 (**)(void))(*(_QWORD *)(*(_QWORD *)(v10 + 8) + 72LL) + 40LL);
if ( v13 )
{
if ( (((int)v5 > 0) & v13()) != 0 )
{
v14 = 0LL;
while ( 1 )
{
v15 = *(_QWORD *)(*(_QWORD *)(a1 + 8 * v14 + 8) + 112LL);
if ( (*(unsigned __int8 ( **)(long long, long long))(v15 + 72))(v15, a2) )
{
v16 = *(_QWORD *)(*(_QWORD *)(a1 + 8 * v14 + 8) + 112LL);
v17 = *(unsigned __int8 ( **)(long long, long long))(v16 + 88);
if ( v17 )
{
if ( v17(v16, a2) )
break;
}
}
if ( v5 == ++v14 )
return (unsigned int)v5;
}
LODWORD(v5) = v14;
}
}
}
}
return (unsigned int)v5;
}
| ggml_backend_sched_backend_id_from_cur:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV RDX,RSI
CALL 0x001294f5
CMP EAX,-0x1
JZ 0x001292de
LAB_001292cc:
MOV R15D,EAX
LAB_001292cf:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001292de:
MOV RSI,qword ptr [RBX + 0xe8]
TEST RSI,RSI
JZ 0x0012931d
MOV RDI,R14
MOV RDX,RBX
CALL 0x001294f5
CMP EAX,-0x1
JNZ 0x001292cc
MOV RAX,qword ptr [RBX + 0xe8]
CMP qword ptr [RBX + 0x8],0x0
JNZ 0x00129402
TEST RAX,RAX
JZ 0x00129328
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00129328
JMP 0x00129402
LAB_0012931d:
CMP qword ptr [RBX + 0x8],0x0
JNZ 0x00129400
LAB_00129328:
TEST byte ptr [RBX + 0x94],0x1
JNZ 0x00129369
MOV EAX,0x13
LAB_00129336:
MOV R12,qword ptr [RBX + RAX*0x8]
TEST R12,R12
JZ 0x00129355
CMP dword ptr [RBX + 0x50],0x2c
JZ 0x00129355
MOV RCX,qword ptr [R12 + 0x8]
TEST RCX,RCX
JZ 0x00129355
CMP dword ptr [RCX + 0x60],0x1
JZ 0x00129375
LAB_00129355:
INC RAX
CMP RAX,0x1d
JNZ 0x00129336
MOV R15D,0xffffffff
JMP 0x001292cf
LAB_00129369:
MOV R15D,dword ptr [R14 + 0x4]
DEC R15D
JMP 0x001292cf
LAB_00129375:
MOV RDI,R14
MOV RSI,R12
MOV RDX,RBX
CALL 0x001294f5
MOV R15D,EAX
MOV ECX,dword ptr [R14 + 0x4]
DEC ECX
CMP EAX,ECX
JNZ 0x001292cf
MOV RAX,qword ptr [R12 + 0x8]
MOV RDI,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x001292cf
CALL RAX
TEST R15D,R15D
SETG CL
TEST AL,CL
JZ 0x001292cf
XOR R12D,R12D
LAB_001293bd:
MOV RAX,qword ptr [R14 + R12*0x8 + 0x8]
MOV RDI,qword ptr [RAX + 0x70]
MOV RSI,RBX
CALL qword ptr [RDI + 0x48]
TEST AL,AL
JZ 0x001293eb
MOV RAX,qword ptr [R14 + R12*0x8 + 0x8]
MOV RDI,qword ptr [RAX + 0x70]
MOV RAX,qword ptr [RDI + 0x58]
TEST RAX,RAX
JZ 0x001293eb
MOV RSI,RBX
CALL RAX
TEST AL,AL
JNZ 0x001293f8
LAB_001293eb:
INC R12
CMP R15,R12
JNZ 0x001293bd
JMP 0x001292cf
LAB_001293f8:
MOV R15D,R12D
JMP 0x001292cf
LAB_00129400:
XOR EAX,EAX
LAB_00129402:
TEST RAX,RAX
CMOVZ RAX,RBX
MOV RAX,qword ptr [RAX + 0x8]
LEA R14,[RBX + 0x100]
MOV RDI,qword ptr [RAX + 0x48]
CALL qword ptr [RDI]
MOV R15,RAX
MOV EDI,dword ptr [RBX + 0x50]
CALL 0x00117320
LEA RDI,[0x14f814]
LEA RDX,[0x15027f]
MOV ESI,0x2ea
MOV RCX,R14
MOV R8,R15
MOV R9,RAX
XOR EAX,EAX
CALL 0x00117cd0
|
/* ggml_backend_sched_backend_id_from_cur(ggml_backend_sched*, ggml_tensor*) */
ulong ggml_backend_sched_backend_id_from_cur(ggml_backend_sched *param_1,ggml_tensor *param_2)
{
code *pcVar1;
byte bVar2;
char cVar3;
uint uVar4;
long lVar5;
ggml_tensor *pgVar6;
int8 uVar7;
int8 uVar8;
ulong uVar9;
ulong uVar10;
uVar4 = ggml_backend_sched_backend_from_buffer(param_1,param_2,param_2);
if (uVar4 == 0xffffffff) {
if (*(ggml_tensor **)(param_2 + 0xe8) == (ggml_tensor *)0x0) {
if (*(long *)(param_2 + 8) != 0) {
pgVar6 = (ggml_tensor *)0x0;
LAB_00129402:
if (pgVar6 == (ggml_tensor *)0x0) {
pgVar6 = param_2;
}
uVar7 = (*(code *)**(int8 **)(*(long *)(pgVar6 + 8) + 0x48))();
uVar8 = ggml_op_name(*(int4 *)(param_2 + 0x50));
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp"
,0x2ea,
"pre-allocated tensor (%s) in a buffer (%s) that cannot run the operation (%s)",
param_2 + 0x100,uVar7,uVar8);
}
}
else {
uVar4 = ggml_backend_sched_backend_from_buffer
(param_1,*(ggml_tensor **)(param_2 + 0xe8),param_2);
if (uVar4 != 0xffffffff) goto LAB_001292cc;
pgVar6 = *(ggml_tensor **)(param_2 + 0xe8);
if ((*(long *)(param_2 + 8) != 0) ||
((pgVar6 != (ggml_tensor *)0x0 && (*(long *)(pgVar6 + 8) != 0)))) goto LAB_00129402;
}
if (((byte)param_2[0x94] & 1) == 0) {
lVar5 = 0x13;
do {
pgVar6 = *(ggml_tensor **)(param_2 + lVar5 * 8);
if ((((pgVar6 != (ggml_tensor *)0x0) && (*(int *)(param_2 + 0x50) != 0x2c)) &&
(*(long *)(pgVar6 + 8) != 0)) && (*(int *)(*(long *)(pgVar6 + 8) + 0x60) == 1)) {
uVar4 = ggml_backend_sched_backend_from_buffer(param_1,pgVar6,param_2);
uVar10 = (ulong)uVar4;
if (uVar4 != *(int *)(param_1 + 4) - 1U) {
return uVar10;
}
pcVar1 = *(code **)(*(long *)(*(long *)(pgVar6 + 8) + 0x48) + 0x28);
if (pcVar1 != (code *)0x0) {
bVar2 = (*pcVar1)();
if ((bVar2 & 0 < (int)uVar4) == 0) {
return uVar10;
}
uVar9 = 0;
do {
cVar3 = (**(code **)(*(long *)(*(long *)(param_1 + uVar9 * 8 + 8) + 0x70) + 0x48))
(*(long *)(*(long *)(param_1 + uVar9 * 8 + 8) + 0x70),param_2);
if (cVar3 != '\0') {
pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + uVar9 * 8 + 8) + 0x70) + 0x58);
if ((pcVar1 != (code *)0x0) &&
(cVar3 = (*pcVar1)(*(long *)(*(long *)(param_1 + uVar9 * 8 + 8) + 0x70),param_2),
cVar3 != '\0')) {
return uVar9 & 0xffffffff;
}
}
uVar9 = uVar9 + 1;
if (uVar10 == uVar9) {
return uVar10;
}
} while( true );
}
return uVar10;
}
lVar5 = lVar5 + 1;
} while (lVar5 != 0x1d);
uVar10 = 0xffffffff;
}
else {
uVar10 = (ulong)(*(int *)(param_1 + 4) - 1);
}
}
else {
LAB_001292cc:
uVar10 = (ulong)uVar4;
}
return uVar10;
}
| |
32,694 | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 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&, long&) | monkey531[P]llama/common/json.hpp | void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O2 | cpp | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 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&, long&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0x6481c
cmpl $0x7, %eax
je 0x64822
cmpl $0x6, %eax
jne 0x64834
movq 0x8(%r14), %rax
jmp 0x64828
cvttsd2si 0x8(%r14), %rax
movq %rax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
movq %r14, %rdi
callq 0x44c82
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x509c6(%rip), %rsi # 0xb521c
leaq 0x10(%rsp), %rdi
callq 0x649a5
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x648b8
xorl %ebp, %ebp
leaq 0x986b7(%rip), %rsi # 0xfcf38
leaq -0x23076(%rip), %rdx # 0x41812
movq %rbx, %rdi
callq 0x23fb0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x242a8
testb %bpl, %bpl
jne 0x648a7
jmp 0x648af
movq %rax, %r14
movq %rbx, %rdi
callq 0x23690
movq %r14, %rdi
callq 0x24030
nop
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_6481C
cmp eax, 7
jz short loc_64822
cmp eax, 6
jnz short loc_64834
loc_6481C:
mov rax, [r14+8]
jmp short loc_64828
loc_64822:
cvttsd2si rax, qword ptr [r14+8]
loc_64828:
mov [rsi], rax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_64834:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_648A7
jmp short loc_648AF
mov r14, rax
loc_648A7:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_648AF:
mov rdi, r14
call __Unwind_Resume
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x5
JZ 0x0016481c
CMP EAX,0x7
JZ 0x00164822
CMP EAX,0x6
JNZ 0x00164834
LAB_0016481c:
MOV RAX,qword ptr [R14 + 0x8]
JMP 0x00164828
LAB_00164822:
CVTTSD2SI RAX,qword ptr [R14 + 0x8]
LAB_00164828:
MOV qword ptr [RSI],RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00164834:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
MOV RDI,R14
CALL 0x00144c82
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0016484f:
LEA RSI,[0x1b521c]
LEA RDI,[RSP + 0x10]
CALL 0x001649a5
MOV BPL,0x1
LAB_00164863:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001648b8
XOR EBP,EBP
LEA RSI,[0x1fcf38]
LEA RDX,[0x141812]
MOV RDI,RBX
CALL 0x00123fb0
|
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,long *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;
long lVar2;
int8 uVar3;
char *local_40;
detail local_38 [32];
bVar1 = *param_1;
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>
)0x5) {
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>
)0x7) {
lVar2 = (long)*(double *)(param_1 + 8);
goto LAB_00164828;
}
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>
)0x6) {
uVar3 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0016484f to 0016485f has its CatchHandler @ 001648a4 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 00164863 to 0016488f has its CatchHandler @ 00164890 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar3,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
lVar2 = *(long *)(param_1 + 8);
LAB_00164828:
*param_2 = lVar2;
return;
}
| ||
32,695 | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 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&, long&) | monkey531[P]llama/common/json.hpp | void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 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&, long&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0xb4847
cmpl $0x7, %eax
je 0xb484d
cmpl $0x6, %eax
jne 0xb487e
movq 0x8(%r14), %rax
jmp 0xb4872
movsd 0x8(%r14), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x3c649(%rip), %xmm0 # 0xf0eb0
cvttsd2si %xmm0, %rax
andq %rdx, %rax
orq %rcx, %rax
movq %rax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
movq %r14, %rdi
callq 0x6181c
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3d98a(%rip), %rsi # 0xf222c
leaq 0x10(%rsp), %rdi
callq 0x88feb
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x88e1c
xorl %ebp, %ebp
leaq 0x7767b(%rip), %rsi # 0x12bf48
leaq -0x56e82(%rip), %rdx # 0x5da52
movq %rbx, %rdi
callq 0x1bfb0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb48fa
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b8e0
testb %bpl, %bpl
jne 0xb4904
jmp 0xb490c
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b670
movq %r14, %rdi
callq 0x1c030
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_B4847
cmp eax, 7
jz short loc_B484D
cmp eax, 6
jnz short loc_B487E
loc_B4847:
mov rax, [r14+8]
jmp short loc_B4872
loc_B484D:
movsd xmm0, qword ptr [r14+8]
cvttsd2si rcx, xmm0
mov rdx, rcx
sar rdx, 3Fh
subsd xmm0, cs:qword_F0EB0
cvttsd2si rax, xmm0
and rax, rdx
or rax, rcx
loc_B4872:
mov [rsi], rax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_B487E:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B48FA
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B48FA:
test bpl, bpl
jnz short loc_B4904
jmp short loc_B490C
mov r14, rax
loc_B4904:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B490C:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
double *a1,
_QWORD *a2)
{
int v2; // eax
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
v2 = *(unsigned __int8 *)a1;
if ( v2 != 5 )
{
if ( v2 == 7 )
{
result = (unsigned int)(int)a1[1];
goto LABEL_6;
}
if ( v2 != 6 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
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>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"type must be number, but is ",
&v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
result = *((_QWORD *)a1 + 1);
LABEL_6:
*a2 = result;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x5
JZ 0x001b4847
CMP EAX,0x7
JZ 0x001b484d
CMP EAX,0x6
JNZ 0x001b487e
LAB_001b4847:
MOV RAX,qword ptr [R14 + 0x8]
JMP 0x001b4872
LAB_001b484d:
MOVSD XMM0,qword ptr [R14 + 0x8]
CVTTSD2SI RCX,XMM0
MOV RDX,RCX
SAR RDX,0x3f
SUBSD XMM0,qword ptr [0x001f0eb0]
CVTTSD2SI RAX,XMM0
AND RAX,RDX
OR RAX,RCX
LAB_001b4872:
MOV qword ptr [RSI],RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001b487e:
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
MOV RDI,R14
CALL 0x0016181c
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001b489b:
LEA RSI,[0x1f222c]
LEA RDI,[RSP + 0x10]
CALL 0x00188feb
MOV BPL,0x1
LAB_001b48af:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00188e1c
XOR EBP,EBP
LEA RSI,[0x22bf48]
LEA RDX,[0x15da52]
MOV RDI,RBX
CALL 0x0011bfb0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,ulong *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;
ulong uVar3;
char *local_40;
detail local_38 [32];
bVar1 = *param_1;
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>
)0x5) {
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>
)0x7) {
uVar3 = (ulong)*(double *)(param_1 + 8);
uVar3 = (long)(*(double *)(param_1 + 8) - _DAT_001f0eb0) & (long)uVar3 >> 0x3f | uVar3;
goto LAB_001b4872;
}
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>
)0x6) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001b489b to 001b48ab has its CatchHandler @ 001b4901 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 001b48af to 001b48db has its CatchHandler @ 001b48dc */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
uVar3 = *(ulong *)(param_1 + 8);
LAB_001b4872:
*param_2 = uVar3;
return;
}
| |
32,696 | queue_replace | eloqsql/mysys/queues.c | void queue_replace(QUEUE *queue, uint idx)
{
uchar *element= queue->root[idx];
uint next_index,
elements= queue->elements,
half_queue= elements>>1,
offset_to_key= queue->offset_to_key,
offset_to_queue_pos= queue->offset_to_queue_pos;
my_bool first= TRUE;
while (idx <= half_queue)
{
next_index= idx + idx;
if (next_index < elements &&
queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
queue->root[next_index+1]+offset_to_key) *
queue->max_at_top > 0)
next_index++;
if (first &&
queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
element+offset_to_key) * queue->max_at_top >= 0)
{
queue->root[idx]= element;
if (offset_to_queue_pos)
(*(uint*) (element + offset_to_queue_pos-1))= idx;
break;
}
first= FALSE;
queue->root[idx]= queue->root[next_index];
if (offset_to_queue_pos)
(*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx;
idx=next_index;
}
insert_at(queue, element, idx);
} | O3 | c | queue_replace:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %r15d
movq %rdi, %rbx
movq (%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
movl 0x10(%rdi), %ecx
movl %ecx, -0x38(%rbp)
shrl %ecx
movl %ecx, -0x34(%rbp)
cmpl %esi, %ecx
movq %rax, -0x40(%rbp)
jae 0x27056
movl %r15d, %r13d
jmp 0x2710a
movl 0x18(%rbx), %ecx
movl 0x1c(%rbx), %esi
movq %rcx, -0x48(%rbp)
addq %rcx, %rax
movq %rax, -0x50(%rbp)
xorl %r14d, %r14d
movq %rsi, -0x30(%rbp)
leal (%r15,%r15), %r13d
movq (%rbx), %rcx
cmpl -0x38(%rbp), %r13d
jae 0x270b3
movq 0x8(%rbx), %rdi
movl %r13d, %eax
movq (%rcx,%rax,8), %rsi
movq -0x48(%rbp), %rax
addq %rax, %rsi
movl %r13d, %r12d
orl $0x1, %r12d
movq (%rcx,%r12,8), %rdx
addq %rax, %rdx
callq *0x28(%rbx)
imull 0x24(%rbx), %eax
testl %eax, %eax
jg 0x270a9
movl %r13d, %r12d
movq (%rbx), %rcx
movl %r12d, %r13d
movq -0x30(%rbp), %rsi
movl %r13d, %r12d
testb $0x1, %r14b
jne 0x270de
movq 0x8(%rbx), %rdi
movq (%rcx,%r12,8), %rsi
addq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq *0x28(%rbx)
imull 0x24(%rbx), %eax
movq (%rbx), %rcx
testl %eax, %eax
jns 0x27127
movq -0x30(%rbp), %rsi
movq (%rcx,%r12,8), %rdx
movl %r15d, %eax
movq %rdx, (%rcx,%rax,8)
testq %rsi, %rsi
je 0x270fa
movq (%rbx), %rcx
movq (%rcx,%rax,8), %rax
movl %r15d, -0x1(%rax,%rsi)
movb $0x1, %r14b
movl %r13d, %r15d
cmpl -0x34(%rbp), %r13d
jbe 0x2706e
movq %rbx, %rdi
movq -0x40(%rbp), %rsi
movl %r13d, %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x26eee
movl %r15d, %eax
movq -0x40(%rbp), %rdx
movq %rdx, (%rcx,%rax,8)
movq -0x30(%rbp), %rcx
testq %rcx, %rcx
je 0x2704e
movl %r15d, -0x1(%rdx,%rcx)
jmp 0x2704e
| queue_replace:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15d, esi
mov rbx, rdi
mov rax, [rdi]
mov ecx, esi
mov rax, [rax+rcx*8]
mov ecx, [rdi+10h]
mov [rbp+var_38], ecx
shr ecx, 1
mov [rbp+var_34], ecx
cmp ecx, esi
mov [rbp+var_40], rax
jnb short loc_27056
loc_2704E:
mov r13d, r15d
jmp loc_2710A
loc_27056:
mov ecx, [rbx+18h]
mov esi, [rbx+1Ch]
mov [rbp+var_48], rcx
add rax, rcx
mov [rbp+var_50], rax
xor r14d, r14d
mov [rbp+var_30], rsi
loc_2706E:
lea r13d, [r15+r15]
mov rcx, [rbx]
cmp r13d, [rbp+var_38]
jnb short loc_270B3
mov rdi, [rbx+8]
mov eax, r13d
mov rsi, [rcx+rax*8]
mov rax, [rbp+var_48]
add rsi, rax
mov r12d, r13d
or r12d, 1
mov rdx, [rcx+r12*8]
add rdx, rax
call qword ptr [rbx+28h]
imul eax, [rbx+24h]
test eax, eax
jg short loc_270A9
mov r12d, r13d
loc_270A9:
mov rcx, [rbx]
mov r13d, r12d
mov rsi, [rbp+var_30]
loc_270B3:
mov r12d, r13d
test r14b, 1
jnz short loc_270DE
mov rdi, [rbx+8]
mov rsi, [rcx+r12*8]
add rsi, [rbp+var_48]
mov rdx, [rbp+var_50]
call qword ptr [rbx+28h]
imul eax, [rbx+24h]
mov rcx, [rbx]
test eax, eax
jns short loc_27127
mov rsi, [rbp+var_30]
loc_270DE:
mov rdx, [rcx+r12*8]
mov eax, r15d
mov [rcx+rax*8], rdx
test rsi, rsi
jz short loc_270FA
mov rcx, [rbx]
mov rax, [rcx+rax*8]
mov [rax+rsi-1], r15d
loc_270FA:
mov r14b, 1
mov r15d, r13d
cmp r13d, [rbp+var_34]
jbe loc_2706E
loc_2710A:
mov rdi, rbx
mov rsi, [rbp+var_40]
mov edx, r13d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp insert_at
loc_27127:
mov eax, r15d
mov rdx, [rbp+var_40]
mov [rcx+rax*8], rdx
mov rcx, [rbp+var_30]
test rcx, rcx
jz loc_2704E
mov [rdx+rcx-1], r15d
jmp loc_2704E
| long long queue_replace(long long *a1, unsigned int a2)
{
unsigned int v2; // r15d
long long v3; // rax
unsigned int v4; // r13d
long long v5; // rsi
char v6; // r14
long long v7; // rcx
long long v8; // r12
int v9; // eax
long long v11; // [rsp+0h] [rbp-50h]
long long v12; // [rsp+8h] [rbp-48h]
long long v13; // [rsp+10h] [rbp-40h]
unsigned int v14; // [rsp+18h] [rbp-38h]
long long v15; // [rsp+20h] [rbp-30h]
v2 = a2;
v3 = *(_QWORD *)(*a1 + 8LL * a2);
v14 = *((_DWORD *)a1 + 4);
v13 = v3;
if ( v14 >> 1 >= a2 )
{
v5 = *((unsigned int *)a1 + 7);
v12 = *((unsigned int *)a1 + 6);
v11 = v12 + v3;
v6 = 0;
v15 = v5;
while ( 1 )
{
v4 = 2 * v2;
v7 = *a1;
if ( 2 * v2 < v14 )
{
v8 = v4 | 1;
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, long long))a1[5])(
a1[1],
v12 + *(_QWORD *)(v7 + 8LL * v4),
v12 + *(_QWORD *)(v7 + 8 * v8))) <= 0 )
LODWORD(v8) = 2 * v2;
v7 = *a1;
v4 = v8;
v5 = v15;
}
if ( (v6 & 1) == 0 )
{
v9 = ((long long ( *)(long long, long long, long long))a1[5])(a1[1], v12 + *(_QWORD *)(v7 + 8LL * v4), v11);
v7 = *a1;
if ( *((_DWORD *)a1 + 9) * v9 >= 0 )
{
*(_QWORD *)(v7 + 8LL * v2) = v13;
if ( v15 )
*(_DWORD *)(v13 + v15 - 1) = v2;
break;
}
v5 = v15;
}
*(_QWORD *)(v7 + 8LL * v2) = *(_QWORD *)(v7 + 8LL * v4);
if ( v5 )
*(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v2) + v5 - 1) = v2;
v6 = 1;
v2 = v4;
if ( v4 > v14 >> 1 )
return insert_at(a1, v13, v4);
}
}
v4 = v2;
return insert_at(a1, v13, v4);
}
| queue_replace:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15D,ESI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV ECX,ESI
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RDI + 0x10]
MOV dword ptr [RBP + -0x38],ECX
SHR ECX,0x1
MOV dword ptr [RBP + -0x34],ECX
CMP ECX,ESI
MOV qword ptr [RBP + -0x40],RAX
JNC 0x00127056
LAB_0012704e:
MOV R13D,R15D
JMP 0x0012710a
LAB_00127056:
MOV ECX,dword ptr [RBX + 0x18]
MOV ESI,dword ptr [RBX + 0x1c]
MOV qword ptr [RBP + -0x48],RCX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
XOR R14D,R14D
MOV qword ptr [RBP + -0x30],RSI
LAB_0012706e:
LEA R13D,[R15 + R15*0x1]
MOV RCX,qword ptr [RBX]
CMP R13D,dword ptr [RBP + -0x38]
JNC 0x001270b3
MOV RDI,qword ptr [RBX + 0x8]
MOV EAX,R13D
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV RAX,qword ptr [RBP + -0x48]
ADD RSI,RAX
MOV R12D,R13D
OR R12D,0x1
MOV RDX,qword ptr [RCX + R12*0x8]
ADD RDX,RAX
CALL qword ptr [RBX + 0x28]
IMUL EAX,dword ptr [RBX + 0x24]
TEST EAX,EAX
JG 0x001270a9
MOV R12D,R13D
LAB_001270a9:
MOV RCX,qword ptr [RBX]
MOV R13D,R12D
MOV RSI,qword ptr [RBP + -0x30]
LAB_001270b3:
MOV R12D,R13D
TEST R14B,0x1
JNZ 0x001270de
MOV RDI,qword ptr [RBX + 0x8]
MOV RSI,qword ptr [RCX + R12*0x8]
ADD RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x50]
CALL qword ptr [RBX + 0x28]
IMUL EAX,dword ptr [RBX + 0x24]
MOV RCX,qword ptr [RBX]
TEST EAX,EAX
JNS 0x00127127
MOV RSI,qword ptr [RBP + -0x30]
LAB_001270de:
MOV RDX,qword ptr [RCX + R12*0x8]
MOV EAX,R15D
MOV qword ptr [RCX + RAX*0x8],RDX
TEST RSI,RSI
JZ 0x001270fa
MOV RCX,qword ptr [RBX]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOV dword ptr [RAX + RSI*0x1 + -0x1],R15D
LAB_001270fa:
MOV R14B,0x1
MOV R15D,R13D
CMP R13D,dword ptr [RBP + -0x34]
JBE 0x0012706e
LAB_0012710a:
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,R13D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00126eee
LAB_00127127:
MOV EAX,R15D
MOV RDX,qword ptr [RBP + -0x40]
MOV qword ptr [RCX + RAX*0x8],RDX
MOV RCX,qword ptr [RBP + -0x30]
TEST RCX,RCX
JZ 0x0012704e
MOV dword ptr [RDX + RCX*0x1 + -0x1],R15D
JMP 0x0012704e
|
void queue_replace(long *param_1,uint param_2)
{
uint uVar1;
long lVar2;
int iVar3;
uint uVar4;
int iVar5;
uint uVar6;
ulong uVar7;
long lVar8;
ulong uVar9;
uint uVar10;
ulong uVar11;
ulong uVar12;
bool bVar13;
uVar12 = (ulong)param_2;
lVar2 = *(long *)(*param_1 + (ulong)param_2 * 8);
uVar1 = *(uint *)(param_1 + 2);
uVar6 = uVar1 >> 1;
if (param_2 <= uVar6) {
uVar7 = (ulong)*(uint *)(param_1 + 3);
uVar9 = (ulong)*(uint *)((long)param_1 + 0x1c);
bVar13 = false;
do {
iVar3 = (int)uVar12;
uVar4 = iVar3 * 2;
lVar8 = *param_1;
uVar10 = uVar4;
if (uVar4 < uVar1) {
iVar5 = (*(code *)param_1[5])
(param_1[1],*(long *)(lVar8 + (ulong)uVar4 * 8) + uVar7,
*(long *)(lVar8 + (ulong)(uVar4 | 1) * 8) + uVar7);
uVar10 = uVar4 | 1;
if (iVar5 * *(int *)((long)param_1 + 0x24) < 1) {
uVar10 = uVar4;
}
lVar8 = *param_1;
}
uVar11 = (ulong)uVar10;
if (!bVar13) {
iVar5 = (*(code *)param_1[5])
(param_1[1],*(long *)(lVar8 + uVar11 * 8) + uVar7,lVar2 + uVar7);
lVar8 = *param_1;
if (-1 < iVar5 * *(int *)((long)param_1 + 0x24)) {
*(long *)(lVar8 + uVar12 * 8) = lVar2;
if (uVar9 != 0) {
*(int *)(lVar2 + -1 + uVar9) = iVar3;
}
break;
}
}
*(int8 *)(lVar8 + uVar12 * 8) = *(int8 *)(lVar8 + uVar11 * 8);
if (uVar9 != 0) {
*(int *)(*(long *)(*param_1 + uVar12 * 8) + -1 + uVar9) = iVar3;
}
bVar13 = true;
uVar12 = uVar11;
} while (uVar10 <= uVar6);
}
insert_at(param_1,lVar2,uVar12);
return;
}
| |
32,697 | OpenSubdiv::v3_6_0::Bfr::FaceVertex::markDuplicateEdges(OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge*, short const*, int const*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp | void
FaceVertex::markDuplicateEdges(Edge edges[],
short const feEdges[],
Index const fvIndices[]) const {
//
// The edge assignment thus far does not correctly detect the presence
// of all edges repeated or duplicated in the same face, e.g. for quad
// with vertices {A, B, A, C} the edge AB occurs both as AB and BA.
// When the face is oriented relative to corner B, we have {B, A, C, A}
// and edge BA will be detected as non-manifold -- but not from corner
// A or C.
//
// So look for repeated instances of the corner vertex in the face and
// inspect its neighbors to see if they match the leading or trailing
// edges.
//
// This is a trivial test for a quad: if the opposite vertex matches
// the corner vertex, both the leading and trailing edges will be
// duplicated and so can immediately be marked non-manifold. So deal
// with the common case of all neighboring quads separately.
//
if (_commonFaceSize == 3) return;
Index vCorner = fvIndices[0];
int numFaces = GetNumFaces();
if (_commonFaceSize == 4) {
Index const * fvOpposite = fvIndices + 2;
for (int face = 0; face < numFaces; ++face, fvOpposite += 4) {
if (*fvOpposite == vCorner) {
edges[feEdges[2*face ]].SetDuplicate();
edges[feEdges[2*face+1]].SetDuplicate();
}
}
} else {
Index const * fv = fvIndices;
for (int face = 0; face < numFaces; ++face) {
int faceSize = GetFaceSize(face);
if (faceSize == 4) {
if (fv[2] == vCorner) {
edges[feEdges[2*face ]].SetDuplicate();
edges[feEdges[2*face+1]].SetDuplicate();
}
} else {
for (int j = 2; j < (faceSize - 2); ++j) {
if (fv[j] == vCorner) {
if (fv[j-1] == fv[1])
edges[feEdges[2*face ]].SetDuplicate();
if (fv[j+1] == fv[faceSize-1])
edges[feEdges[2*face+1]].SetDuplicate();
}
}
}
fv += faceSize;
}
}
} | O2 | cpp | OpenSubdiv::v3_6_0::Bfr::FaceVertex::markDuplicateEdges(OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge*, short const*, int const*) const:
movzwl 0x9c(%rdi), %r9d
cmpw $0x3, %r9w
je 0x97490
movl (%rcx), %eax
movzwl 0x2(%rdi), %r8d
xorl %r10d, %r10d
testw %r8w, %r8w
cmovgl %r8d, %r10d
movzwl %r10w, %r8d
cmpw $0x4, %r9w
jne 0x97384
shll $0x2, %r8d
xorl %edi, %edi
cmpq %rdi, %r8
je 0x97490
cmpl %eax, 0x8(%rcx,%rdi,4)
jne 0x9737e
movswq (%rdx,%rdi), %r9
imulq $0xc, %r9, %r9
movb 0x4(%rsi,%r9), %r10b
andb $-0x28, %r10b
orb $0x24, %r10b
movb %r10b, 0x4(%rsi,%r9)
movswq 0x2(%rdx,%rdi), %r9
imulq $0xc, %r9, %r9
movb 0x4(%rsi,%r9), %r10b
andb $-0x28, %r10b
orb $0x24, %r10b
movb %r10b, 0x4(%rsi,%r9)
addq $0x4, %rdi
jmp 0x97338
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %r9d, %r9d
cmpq %r8, %r9
je 0x97486
movswl 0x9c(%rdi), %r11d
testl %r11d, %r11d
jne 0x973b4
movq 0x60(%rdi), %rbx
movl 0x4(%rbx,%r9,4), %r11d
subl (%rbx,%r9,4), %r11d
cmpl $0x4, %r11d
jne 0x97402
cmpl %eax, 0x8(%rcx)
jne 0x973f6
movswq (%rdx,%r9,4), %rbx
imulq $0xc, %rbx, %rbx
movb 0x4(%rsi,%rbx), %bpl
andb $-0x28, %bpl
orb $0x24, %bpl
movb %bpl, 0x4(%rsi,%rbx)
movswq 0x2(%rdx,%r9,4), %rbx
imulq $0xc, %rbx, %rbx
movb 0x4(%rsi,%rbx), %bpl
andb $-0x28, %bpl
orb $0x24, %bpl
movb %bpl, 0x4(%rsi,%rbx)
movslq %r11d, %r10
leaq (%rcx,%r10,4), %rcx
incq %r9
jmp 0x97391
leal -0x2(%r11), %ebp
leaq (%r9,%r9), %rbx
leal -0x1(%r11), %r14d
movslq %r14d, %r14
leaq 0x1(,%r9,2), %r15
movslq %ebp, %r12
movabsq $0x2, %r13
cmpq %r12, %r13
jge 0x973f6
cmpl %eax, (%rcx,%r13,4)
jne 0x97481
movl -0x4(%rcx,%r13,4), %ebp
cmpl 0x4(%rcx), %ebp
jne 0x97456
movswq (%rdx,%rbx,2), %rbp
imulq $0xc, %rbp, %rbp
movb 0x4(%rsi,%rbp), %r10b
andb $-0x28, %r10b
orb $0x24, %r10b
movb %r10b, 0x4(%rsi,%rbp)
movl 0x4(%rcx,%r13,4), %r10d
incq %r13
cmpl (%rcx,%r14,4), %r10d
jne 0x97426
movswq (%rdx,%r15,2), %r10
imulq $0xc, %r10, %r10
movb 0x4(%rsi,%r10), %bpl
andb $-0x28, %bpl
orb $0x24, %bpl
movb %bpl, 0x4(%rsi,%r10)
jmp 0x97426
incq %r13
jmp 0x97426
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex18markDuplicateEdgesEPNS2_4EdgeEPKsPKi:
movzx r9d, word ptr [rdi+9Ch]
cmp r9w, 3
jz locret_97490
mov eax, [rcx]
movzx r8d, word ptr [rdi+2]
xor r10d, r10d
test r8w, r8w
cmovg r10d, r8d
movzx r8d, r10w
cmp r9w, 4
jnz short loc_97384
shl r8d, 2
xor edi, edi
loc_97338:
cmp r8, rdi
jz locret_97490
cmp [rcx+rdi*4+8], eax
jnz short loc_9737E
movsx r9, word ptr [rdx+rdi]
imul r9, 0Ch
mov r10b, [rsi+r9+4]
and r10b, 0D8h
or r10b, 24h
mov [rsi+r9+4], r10b
movsx r9, word ptr [rdx+rdi+2]
imul r9, 0Ch
mov r10b, [rsi+r9+4]
and r10b, 0D8h
or r10b, 24h
mov [rsi+r9+4], r10b
loc_9737E:
add rdi, 4
jmp short loc_97338
loc_97384:
push rbp
push r15
push r14
push r13
push r12
push rbx
xor r9d, r9d
loc_97391:
cmp r9, r8
jz loc_97486
movsx r11d, word ptr [rdi+9Ch]
test r11d, r11d
jnz short loc_973B4
mov rbx, [rdi+60h]
mov r11d, [rbx+r9*4+4]
sub r11d, [rbx+r9*4]
loc_973B4:
cmp r11d, 4
jnz short loc_97402
cmp [rcx+8], eax
jnz short loc_973F6
movsx rbx, word ptr [rdx+r9*4]
imul rbx, 0Ch
mov bpl, [rsi+rbx+4]
and bpl, 0D8h
or bpl, 24h
mov [rsi+rbx+4], bpl
movsx rbx, word ptr [rdx+r9*4+2]
imul rbx, 0Ch
mov bpl, [rsi+rbx+4]
and bpl, 0D8h
or bpl, 24h
mov [rsi+rbx+4], bpl
loc_973F6:
movsxd r10, r11d
lea rcx, [rcx+r10*4]
inc r9
jmp short loc_97391
loc_97402:
lea ebp, [r11-2]
lea rbx, [r9+r9]
lea r14d, [r11-1]
movsxd r14, r14d
lea r15, ds:1[r9*2]
movsxd r12, ebp
mov r13, 2
loc_97426:
cmp r13, r12
jge short loc_973F6
cmp [rcx+r13*4], eax
jnz short loc_97481
mov ebp, [rcx+r13*4-4]
cmp ebp, [rcx+4]
jnz short loc_97456
movsx rbp, word ptr [rdx+rbx*2]
imul rbp, 0Ch
mov r10b, [rsi+rbp+4]
and r10b, 0D8h
or r10b, 24h
mov [rsi+rbp+4], r10b
loc_97456:
mov r10d, [rcx+r13*4+4]
inc r13
cmp r10d, [rcx+r14*4]
jnz short loc_97426
movsx r10, word ptr [rdx+r15*2]
imul r10, 0Ch
mov bpl, [rsi+r10+4]
and bpl, 0D8h
or bpl, 24h
mov [rsi+r10+4], bpl
jmp short loc_97426
loc_97481:
inc r13
jmp short loc_97426
loc_97486:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_97490:
retn
| void OpenSubdiv::v3_6_0::Bfr::FaceVertex::markDuplicateEdges(
OpenSubdiv::v3_6_0::Bfr::FaceVertex *this,
OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge *a2,
const __int16 *a3,
int *a4)
{
__int16 v4; // r9
int v5; // eax
unsigned __int16 v6; // r10
long long v7; // r8
long long i; // rdi
long long v9; // r9
long long j; // r9
int v11; // r11d
long long v12; // rbx
long long v13; // rbx
long long v14; // r13
long long v15; // rbp
int v16; // r10d
long long v17; // r10
v4 = *((_WORD *)this + 78);
if ( v4 != 3 )
{
v5 = *a4;
v6 = 0;
if ( *((__int16 *)this + 1) > 0 )
v6 = *((_WORD *)this + 1);
v7 = v6;
if ( v4 == 4 )
{
for ( i = 0LL; 2 * v6 != i; i += 2LL )
{
if ( a4[i * 2 + 2] == v5 )
{
*((_BYTE *)a2 + 12 * a3[i] + 4) = *((_BYTE *)a2 + 12 * a3[i] + 4) & 0xD8 | 0x24;
v9 = 12LL * a3[i + 1];
*((_BYTE *)a2 + v9 + 4) = *((_BYTE *)a2 + v9 + 4) & 0xD8 | 0x24;
}
}
}
else
{
for ( j = 0LL; j != v7; ++j )
{
v11 = *((__int16 *)this + 78);
if ( !*((_WORD *)this + 78) )
v11 = *(_DWORD *)(*((_QWORD *)this + 12) + 4 * j + 4) - *(_DWORD *)(*((_QWORD *)this + 12) + 4 * j);
if ( v11 == 4 )
{
if ( a4[2] == v5 )
{
v12 = 12LL * a3[2 * j];
*((_BYTE *)a2 + v12 + 4) = *((_BYTE *)a2 + v12 + 4) & 0xD8 | 0x24;
v13 = 12LL * a3[2 * j + 1];
*((_BYTE *)a2 + v13 + 4) = *((_BYTE *)a2 + v13 + 4) & 0xD8 | 0x24;
}
}
else
{
v14 = 2LL;
while ( v14 < v11 - 2 )
{
if ( a4[v14] == v5 )
{
if ( a4[v14 - 1] == a4[1] )
{
v15 = 12LL * a3[2 * j];
*((_BYTE *)a2 + v15 + 4) = *((_BYTE *)a2 + v15 + 4) & 0xD8 | 0x24;
}
v16 = a4[++v14];
if ( v16 == a4[v11 - 1] )
{
v17 = 12LL * a3[2 * j + 1];
*((_BYTE *)a2 + v17 + 4) = *((_BYTE *)a2 + v17 + 4) & 0xD8 | 0x24;
}
}
else
{
++v14;
}
}
}
a4 += v11;
}
}
}
}
| markDuplicateEdges:
MOVZX R9D,word ptr [RDI + 0x9c]
CMP R9W,0x3
JZ 0x00197490
MOV EAX,dword ptr [RCX]
MOVZX R8D,word ptr [RDI + 0x2]
XOR R10D,R10D
TEST R8W,R8W
CMOVG R10D,R8D
MOVZX R8D,R10W
CMP R9W,0x4
JNZ 0x00197384
SHL R8D,0x2
XOR EDI,EDI
LAB_00197338:
CMP R8,RDI
JZ 0x00197490
CMP dword ptr [RCX + RDI*0x4 + 0x8],EAX
JNZ 0x0019737e
MOVSX R9,word ptr [RDX + RDI*0x1]
IMUL R9,R9,0xc
MOV R10B,byte ptr [RSI + R9*0x1 + 0x4]
AND R10B,0xd8
OR R10B,0x24
MOV byte ptr [RSI + R9*0x1 + 0x4],R10B
MOVSX R9,word ptr [RDX + RDI*0x1 + 0x2]
IMUL R9,R9,0xc
MOV R10B,byte ptr [RSI + R9*0x1 + 0x4]
AND R10B,0xd8
OR R10B,0x24
MOV byte ptr [RSI + R9*0x1 + 0x4],R10B
LAB_0019737e:
ADD RDI,0x4
JMP 0x00197338
LAB_00197384:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
XOR R9D,R9D
LAB_00197391:
CMP R9,R8
JZ 0x00197486
MOVSX R11D,word ptr [RDI + 0x9c]
TEST R11D,R11D
JNZ 0x001973b4
MOV RBX,qword ptr [RDI + 0x60]
MOV R11D,dword ptr [RBX + R9*0x4 + 0x4]
SUB R11D,dword ptr [RBX + R9*0x4]
LAB_001973b4:
CMP R11D,0x4
JNZ 0x00197402
CMP dword ptr [RCX + 0x8],EAX
JNZ 0x001973f6
MOVSX RBX,word ptr [RDX + R9*0x4]
IMUL RBX,RBX,0xc
MOV BPL,byte ptr [RSI + RBX*0x1 + 0x4]
AND BPL,0xd8
OR BPL,0x24
MOV byte ptr [RSI + RBX*0x1 + 0x4],BPL
MOVSX RBX,word ptr [RDX + R9*0x4 + 0x2]
IMUL RBX,RBX,0xc
MOV BPL,byte ptr [RSI + RBX*0x1 + 0x4]
AND BPL,0xd8
OR BPL,0x24
MOV byte ptr [RSI + RBX*0x1 + 0x4],BPL
LAB_001973f6:
MOVSXD R10,R11D
LEA RCX,[RCX + R10*0x4]
INC R9
JMP 0x00197391
LAB_00197402:
LEA EBP,[R11 + -0x2]
LEA RBX,[R9 + R9*0x1]
LEA R14D,[R11 + -0x1]
MOVSXD R14,R14D
LEA R15,[0x1 + R9*0x2]
MOVSXD R12,EBP
MOV R13,0x2
LAB_00197426:
CMP R13,R12
JGE 0x001973f6
CMP dword ptr [RCX + R13*0x4],EAX
JNZ 0x00197481
MOV EBP,dword ptr [RCX + R13*0x4 + -0x4]
CMP EBP,dword ptr [RCX + 0x4]
JNZ 0x00197456
MOVSX RBP,word ptr [RDX + RBX*0x2]
IMUL RBP,RBP,0xc
MOV R10B,byte ptr [RSI + RBP*0x1 + 0x4]
AND R10B,0xd8
OR R10B,0x24
MOV byte ptr [RSI + RBP*0x1 + 0x4],R10B
LAB_00197456:
MOV R10D,dword ptr [RCX + R13*0x4 + 0x4]
INC R13
CMP R10D,dword ptr [RCX + R14*0x4]
JNZ 0x00197426
MOVSX R10,word ptr [RDX + R15*0x2]
IMUL R10,R10,0xc
MOV BPL,byte ptr [RSI + R10*0x1 + 0x4]
AND BPL,0xd8
OR BPL,0x24
MOV byte ptr [RSI + R10*0x1 + 0x4],BPL
JMP 0x00197426
LAB_00197481:
INC R13
JMP 0x00197426
LAB_00197486:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_00197490:
RET
|
/* OpenSubdiv::v3_6_0::Bfr::FaceVertex::markDuplicateEdges(OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge*,
short const*, int const*) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::FaceVertex::markDuplicateEdges
(FaceVertex *this,Edge *param_1,short *param_2,int *param_3)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
ushort uVar5;
int iVar6;
if (*(short *)(this + 0x9c) != 3) {
iVar1 = *param_3;
uVar5 = 0;
if (0 < (short)*(ushort *)(this + 2)) {
uVar5 = *(ushort *)(this + 2);
}
if (*(short *)(this + 0x9c) == 4) {
for (lVar2 = 0; (ulong)uVar5 * 4 != lVar2; lVar2 = lVar2 + 4) {
if (param_3[lVar2 + 2] == iVar1) {
lVar3 = (long)*(short *)((long)param_2 + lVar2) * 0xc;
param_1[lVar3 + 4] = (Edge)((byte)param_1[lVar3 + 4] & 0xd8 | 0x24);
lVar3 = (long)*(short *)((long)param_2 + lVar2 + 2) * 0xc;
param_1[lVar3 + 4] = (Edge)((byte)param_1[lVar3 + 4] & 0xd8 | 0x24);
}
}
}
else {
for (uVar4 = 0; uVar4 != uVar5; uVar4 = uVar4 + 1) {
iVar6 = (int)*(short *)(this + 0x9c);
if (*(short *)(this + 0x9c) == 0) {
iVar6 = *(int *)(*(long *)(this + 0x60) + 4 + uVar4 * 4) -
*(int *)(*(long *)(this + 0x60) + uVar4 * 4);
}
if (iVar6 == 4) {
if (param_3[2] == iVar1) {
param_1[(long)param_2[uVar4 * 2] * 0xc + 4] =
(Edge)((byte)param_1[(long)param_2[uVar4 * 2] * 0xc + 4] & 0xd8 | 0x24);
param_1[(long)param_2[uVar4 * 2 + 1] * 0xc + 4] =
(Edge)((byte)param_1[(long)param_2[uVar4 * 2 + 1] * 0xc + 4] & 0xd8 | 0x24);
}
}
else {
lVar2 = 2;
while (lVar2 < iVar6 + -2) {
if (param_3[lVar2] == iVar1) {
if (param_3[lVar2 + -1] == param_3[1]) {
param_1[(long)param_2[uVar4 * 2] * 0xc + 4] =
(Edge)((byte)param_1[(long)param_2[uVar4 * 2] * 0xc + 4] & 0xd8 | 0x24);
}
lVar3 = lVar2 + 1;
lVar2 = lVar2 + 1;
if (param_3[lVar3] == param_3[iVar6 + -1]) {
param_1[(long)param_2[uVar4 * 2 + 1] * 0xc + 4] =
(Edge)((byte)param_1[(long)param_2[uVar4 * 2 + 1] * 0xc + 4] & 0xd8 | 0x24);
}
}
else {
lVar2 = lVar2 + 1;
}
}
}
param_3 = param_3 + iVar6;
}
}
}
return;
}
| |
32,698 | ma_crypt_post_write_hook | eloqsql/storage/maria/ma_crypt.c | static void ma_crypt_post_write_hook(int res,
PAGECACHE_IO_HOOK_ARGS *args)
{
if (args->crypt_buf != NULL)
{
uchar *tmp= args->page;
args->page= args->crypt_buf;
args->crypt_buf= NULL;
my_free(tmp);
}
maria_page_write_failure(res, args);
} | O3 | c | ma_crypt_post_write_hook:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %r14d
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0x67496
movq (%rbx), %rdi
movq %rax, (%rbx)
movq $0x0, 0x18(%rbx)
callq 0x9ff7e
movl %r14d, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3e11e
| ma_crypt_post_write_hook:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14d, edi
mov rax, [rsi+18h]
test rax, rax
jz short loc_67496
mov rdi, [rbx]
mov [rbx], rax
mov qword ptr [rbx+18h], 0
call my_free
loc_67496:
mov edi, r14d
mov rsi, rbx
pop rbx
pop r14
pop rbp
jmp maria_page_write_failure
| long long ma_crypt_post_write_hook(int a1, long long *a2)
{
long long v3; // rax
long long v4; // rdi
v3 = a2[3];
if ( v3 )
{
v4 = *a2;
*a2 = v3;
a2[3] = 0LL;
my_free(v4);
}
return maria_page_write_failure(a1, (long long)a2);
}
| ma_crypt_post_write_hook:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14D,EDI
MOV RAX,qword ptr [RSI + 0x18]
TEST RAX,RAX
JZ 0x00167496
MOV RDI,qword ptr [RBX]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x18],0x0
CALL 0x0019ff7e
LAB_00167496:
MOV EDI,R14D
MOV RSI,RBX
POP RBX
POP R14
POP RBP
JMP 0x0013e11e
|
void ma_crypt_post_write_hook(int4 param_1,long *param_2)
{
long lVar1;
if (param_2[3] != 0) {
lVar1 = *param_2;
*param_2 = param_2[3];
param_2[3] = 0;
my_free(lVar1);
}
maria_page_write_failure(param_1,param_2);
return;
}
| |
32,699 | ModelLoader::load_tensors(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>&, ggml_backend*, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>) | 7CodeWizard[P]stablediffusion/model.cpp | bool ModelLoader::load_tensors(std::map<std::string, struct ggml_tensor*>& tensors,
ggml_backend_t backend,
std::set<std::string> ignore_tensors) {
std::set<std::string> tensor_names_in_file;
auto on_new_tensor_cb = [&](const TensorStorage& tensor_storage, ggml_tensor** dst_tensor) -> bool {
const std::string& name = tensor_storage.name;
tensor_names_in_file.insert(name);
struct ggml_tensor* real;
if (tensors.find(name) != tensors.end()) {
real = tensors[name];
} else {
if (ignore_tensors.find(name) == ignore_tensors.end()) {
LOG_WARN("unknown tensor '%s' in model file", name.c_str());
}
return true;
}
if (
real->ne[0] != tensor_storage.ne[0] ||
real->ne[1] != tensor_storage.ne[1] ||
real->ne[2] != tensor_storage.ne[2] ||
real->ne[3] != tensor_storage.ne[3]) {
LOG_ERROR(
"tensor '%s' has wrong shape in model file: "
"got [%d, %d, %d, %d], expected [%d, %d, %d, %d]",
name.c_str(),
(int)tensor_storage.ne[0], (int)tensor_storage.ne[1], (int)tensor_storage.ne[2], (int)tensor_storage.ne[3],
(int)real->ne[0], (int)real->ne[1], (int)real->ne[2], (int)real->ne[3]);
return false;
}
*dst_tensor = real;
return true;
};
bool success = load_tensors(on_new_tensor_cb, backend);
if (!success) {
LOG_ERROR("load tensors from file failed");
return false;
}
bool some_tensor_not_init = false;
for (auto pair : tensors) {
if (pair.first.find("cond_stage_model.transformer.text_model.encoder.layers.23") != std::string::npos) {
continue;
}
if (pair.first.find("alphas_cumprod") != std::string::npos) {
continue;
}
if (pair.first.find("alphas_cumprod") != std::string::npos) {
continue;
}
if (tensor_names_in_file.find(pair.first) == tensor_names_in_file.end()) {
LOG_ERROR("tensor '%s' not in model file", pair.first.c_str());
some_tensor_not_init = true;
}
}
if (some_tensor_not_init) {
return false;
}
return true;
} | O2 | cpp | ModelLoader::load_tensors(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>&, ggml_backend*, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x28(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
pushq $0x18
popq %rdi
callq 0xa5f0
leaq 0x20(%rsp), %rcx
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x649(%rip), %rax # 0x49a0c
movq %rax, 0x18(%rsi)
leaq 0x760(%rip), %rax # 0x49b2e
movq %rax, 0x10(%rsi)
movq %r12, %rdi
movq %r14, %rdx
callq 0x48c16
movl %eax, %ebp
movq %rsp, %rdi
callq 0x3937c
testb %bpl, %bpl
je 0x494b0
movq 0x18(%rbx), %r15
addq $0x8, %rbx
xorl %r14d, %r14d
leaq 0x50(%rsp), %r12
leaq 0x54dd4(%rip), %r13 # 0x9e1db
leaq 0x53a52(%rip), %rbp # 0x9ce60
cmpq %rbx, %r15
je 0x494d2
leaq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0x2cf9c
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0xac20
cmpq $-0x1, %rax
jne 0x49498
movq %r12, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0xac20
cmpq $-0x1, %rax
jne 0x49498
movq %r12, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0xac20
cmpq $-0x1, %rax
jne 0x49498
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x3113a
leaq 0x28(%rsp), %rcx
cmpq %rcx, %rax
jne 0x49498
movb $0x1, %r14b
movq 0x50(%rsp), %r8
pushq $0x3
popq %rdi
leaq 0x5485e(%rip), %rsi # 0x9dce3
movl $0x5aa, %edx # imm = 0x5AA
leaq 0x54d84(%rip), %rcx # 0x9e215
xorl %eax, %eax
callq 0x55f59
movq %r12, %rdi
callq 0xac60
movq %r15, %rdi
callq 0xa3d0
movq %rax, %r15
jmp 0x4940e
xorl %r14d, %r14d
leaq 0x54829(%rip), %rsi # 0x9dce3
leaq 0x54cfc(%rip), %rcx # 0x9e1bd
pushq $0x3
popq %rdi
movl $0x597, %edx # imm = 0x597
xorl %eax, %eax
callq 0x55f59
jmp 0x494d6
xorb $0x1, %r14b
leaq 0x20(%rsp), %rdi
callq 0x2d1a4
andb $0x1, %r14b
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x494fa
jmp 0x49518
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xac60
jmp 0x4951b
jmp 0x4950b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3937c
jmp 0x4951b
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2d1a4
movq %rbx, %rdi
callq 0xaab0
nop
| _ZN11ModelLoader12load_tensorsERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEEP12ggml_backendSt3setIS6_SA_SaIS6_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r15, rcx
mov r14, rdx
mov rbx, rsi
lea rax, [rsp+0A8h+var_80]
and dword ptr [rax], 0
and qword ptr [rax+8], 0
mov [rax+10h], rax
mov [rax+18h], rax
and qword ptr [rax+20h], 0
mov r12, rdi
xorps xmm0, xmm0
movaps [rsp+0A8h+var_A8], xmm0
movaps [rsp+0A8h+var_98], xmm0
push 18h
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, [rsp+0A8h+var_88]
mov [rax], rcx
mov [rax+8], rbx
mov [rax+10h], r15
mov rsi, rsp
mov [rsi], rax
lea rax, _ZNSt17_Function_handlerIFbRK13TensorStoragePP11ggml_tensorEZN11ModelLoader12load_tensorsERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_St4lessISE_ESaISt4pairIKSE_S4_EEEP12ggml_backendSt3setISE_SG_SaISE_EEE3$_0E9_M_invokeERKSt9_Any_dataS2_OS5_; std::_Function_handler<bool ()(TensorStorage const&,ggml_tensor **),ModelLoader::load_tensors(std::map<std::string,ggml_tensor *> &,ggml_backend *,std::set<std::string>)::$_0>::_M_invoke(std::_Any_data const&,TensorStorage const&,ggml_tensor **&&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFbRK13TensorStoragePP11ggml_tensorEZN11ModelLoader12load_tensorsERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_St4lessISE_ESaISt4pairIKSE_S4_EEEP12ggml_backendSt3setISE_SG_SaISE_EEE3$_0E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<bool ()(TensorStorage const&,ggml_tensor **),ModelLoader::load_tensors(std::map<std::string,ggml_tensor *> &,ggml_backend *,std::set<std::string>)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
mov rdi, r12; int
mov rdx, r14
call _ZN11ModelLoader12load_tensorsESt8functionIFbRK13TensorStoragePP11ggml_tensorEEP12ggml_backend; ModelLoader::load_tensors(std::function<bool ()(TensorStorage const&,ggml_tensor **)>,ggml_backend *)
mov ebp, eax
mov rdi, rsp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
test bpl, bpl
jz loc_494B0
mov r15, [rbx+18h]
add rbx, 8
xor r14d, r14d
lea r12, [rsp+0A8h+var_58]
lea r13, aCondStageModel_6; "cond_stage_model.transformer.text_model"...
lea rbp, aSqrtRecipm1Alp+0Dh; "alphas_cumprod"
loc_4940E:
cmp r15, rbx
jz loc_494D2
lea rsi, [r15+20h]
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorEC2ERKS9_; std::pair<std::string const,ggml_tensor *>::pair(std::pair<std::string const,ggml_tensor *> const&)
mov rdi, r12
mov rsi, r13
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_49498
mov rdi, r12
mov rsi, rbp
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_49498
mov rdi, r12
mov rsi, rbp
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_49498
lea rdi, [rsp+0A8h+var_88]
mov rsi, r12
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE4findERKS5_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::find(std::string const&)
lea rcx, [rsp+0A8h+var_80]
cmp rax, rcx
jnz short loc_49498
mov r14b, 1
mov r8, [rsp+0A8h+var_58]
push 3
pop rdi
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov edx, 5AAh
lea rcx, aTensorSNotInMo; "tensor '%s' not in model file"
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
loc_49498:
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15
call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *)
mov r15, rax
jmp loc_4940E
loc_494B0:
xor r14d, r14d
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aLoadTensorsFro_0; "load tensors from file failed"
push 3
pop rdi
mov edx, 597h
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
jmp short loc_494D6
loc_494D2:
xor r14b, 1
loc_494D6:
lea rdi, [rsp+0A8h+var_88]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
and r14b, 1
mov eax, r14d
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_494FA
jmp short loc_49518
loc_494FA:
mov rbx, rax
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_4951B
jmp short $+2
loc_4950B:
mov rbx, rax
mov rdi, rsp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
jmp short loc_4951B
loc_49518:
mov rbx, rax
loc_4951B:
lea rdi, [rsp+arg_18]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
| long long ModelLoader::load_tensors(long long a1, long long a2, long long a3, long long a4)
{
_QWORD *v6; // rax
char tensors; // bp
int v8; // r8d
int v9; // r9d
long long v10; // r15
unsigned int v11; // r14d
int v12; // r9d
__int128 v14; // [rsp+0h] [rbp-A8h] BYREF
long long ( *v15)(); // [rsp+10h] [rbp-98h]
long long ( *v16)(); // [rsp+18h] [rbp-90h]
_BYTE v17[8]; // [rsp+20h] [rbp-88h] BYREF
int v18; // [rsp+28h] [rbp-80h] BYREF
long long v19; // [rsp+30h] [rbp-78h]
int *v20; // [rsp+38h] [rbp-70h]
int *v21; // [rsp+40h] [rbp-68h]
long long v22; // [rsp+48h] [rbp-60h]
_DWORD v23[22]; // [rsp+50h] [rbp-58h] BYREF
v18 = 0;
v19 = 0LL;
v20 = &v18;
v21 = &v18;
v22 = 0LL;
v14 = 0LL;
v6 = (_QWORD *)operator new(0x18uLL);
*v6 = v17;
v6[1] = a2;
v6[2] = a4;
*(_QWORD *)&v14 = v6;
v16 = std::_Function_handler<bool ()(TensorStorage const&,ggml_tensor **),ModelLoader::load_tensors(std::map<std::string,ggml_tensor *> &,ggml_backend *,std::set<std::string>)::$_0>::_M_invoke;
v15 = std::_Function_handler<bool ()(TensorStorage const&,ggml_tensor **),ModelLoader::load_tensors(std::map<std::string,ggml_tensor *> &,ggml_backend *,std::set<std::string>)::$_0>::_M_manager;
tensors = ModelLoader::load_tensors(a1, (long long)&v14, a3);
std::_Function_base::~_Function_base((std::_Function_base *)&v14);
if ( tensors )
{
v10 = *(_QWORD *)(a2 + 24);
v11 = 0;
while ( v10 != a2 + 8 )
{
std::pair<std::string const,ggml_tensor *>::pair((long long)v23, v10 + 32);
if ( std::string::find(v23, "cond_stage_model.transformer.text_model.encoder.layers.23", 0LL) == -1
&& std::string::find(v23, "alphas_cumprod", 0LL) == -1
&& std::string::find(v23, "alphas_cumprod", 0LL) == -1
&& (int *)std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::find(
(long long)v17,
(long long)v23) == &v18 )
{
LOBYTE(v11) = 1;
log_printf(
3,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp",
1450,
(unsigned int)"tensor '%s' not in model file",
v23[0],
v12);
}
std::string::~string(v23);
v10 = std::_Rb_tree_increment(v10);
}
LOBYTE(v11) = v11 ^ 1;
}
else
{
v11 = 0;
log_printf(
3,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp",
1431,
(unsigned int)"load tensors from file failed",
v8,
v9);
}
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree((long long)v17);
LOBYTE(v11) = v11 & 1;
return v11;
}
| load_tensors:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R15,RCX
MOV R14,RDX
MOV RBX,RSI
LEA RAX,[RSP + 0x28]
AND dword ptr [RAX],0x0
AND qword ptr [RAX + 0x8],0x0
MOV qword ptr [RAX + 0x10],RAX
MOV qword ptr [RAX + 0x18],RAX
AND qword ptr [RAX + 0x20],0x0
MOV R12,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
LAB_0014939e:
PUSH 0x18
POP RDI
CALL 0x0010a5f0
LEA RCX,[RSP + 0x20]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],RBX
MOV qword ptr [RAX + 0x10],R15
MOV RSI,RSP
MOV qword ptr [RSI],RAX
LEA RAX,[0x149a0c]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x149b2e]
MOV qword ptr [RSI + 0x10],RAX
LAB_001493d2:
MOV RDI,R12
MOV RDX,R14
CALL 0x00148c16
MOV EBP,EAX
MOV RDI,RSP
CALL 0x0013937c
TEST BPL,BPL
JZ 0x001494b0
MOV R15,qword ptr [RBX + 0x18]
ADD RBX,0x8
XOR R14D,R14D
LEA R12,[RSP + 0x50]
LEA R13,[0x19e1db]
LEA RBP,[0x19ce60]
LAB_0014940e:
CMP R15,RBX
JZ 0x001494d2
LEA RSI,[R15 + 0x20]
LAB_0014941b:
MOV RDI,R12
CALL 0x0012cf9c
MOV RDI,R12
MOV RSI,R13
XOR EDX,EDX
CALL 0x0010ac20
CMP RAX,-0x1
JNZ 0x00149498
MOV RDI,R12
MOV RSI,RBP
XOR EDX,EDX
CALL 0x0010ac20
CMP RAX,-0x1
JNZ 0x00149498
MOV RDI,R12
MOV RSI,RBP
XOR EDX,EDX
CALL 0x0010ac20
CMP RAX,-0x1
JNZ 0x00149498
LAB_0014945c:
LEA RDI,[RSP + 0x20]
MOV RSI,R12
CALL 0x0013113a
LEA RCX,[RSP + 0x28]
CMP RAX,RCX
JNZ 0x00149498
MOV R14B,0x1
MOV R8,qword ptr [RSP + 0x50]
LAB_0014947b:
PUSH 0x3
POP RDI
LEA RSI,[0x19dce3]
MOV EDX,0x5aa
LEA RCX,[0x19e215]
XOR EAX,EAX
CALL 0x00155f59
LAB_00149498:
MOV RDI,R12
CALL 0x0010ac60
MOV RDI,R15
CALL 0x0010a3d0
MOV R15,RAX
JMP 0x0014940e
LAB_001494b0:
XOR R14D,R14D
LAB_001494b3:
LEA RSI,[0x19dce3]
LEA RCX,[0x19e1bd]
PUSH 0x3
POP RDI
MOV EDX,0x597
XOR EAX,EAX
CALL 0x00155f59
LAB_001494d0:
JMP 0x001494d6
LAB_001494d2:
XOR R14B,0x1
LAB_001494d6:
LEA RDI,[RSP + 0x20]
CALL 0x0012d1a4
AND R14B,0x1
MOV EAX,R14D
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ModelLoader::load_tensors(std::map<std::__cxx11::string, ggml_tensor*,
std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const,
ggml_tensor*> > >&, ggml_backend*, std::set<std::__cxx11::string, std::less<std::__cxx11::string
>, std::allocator<std::__cxx11::string > >) */
ulong __thiscall
ModelLoader::load_tensors(ModelLoader *this,long param_1,int8 param_2,long param_4)
{
char cVar1;
long lVar2;
int4 *puVar3;
_Rb_tree_node_base *p_Var4;
ulong uVar5;
long *local_a8;
int8 uStack_a0;
code *local_98;
code *pcStack_90;
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
local_88 [8];
int4 local_80 [2];
int8 local_78;
int4 *local_70;
int4 *local_68;
int8 local_60;
int8 local_58 [5];
local_70 = local_80;
local_80[0] = 0;
local_78 = 0;
local_60 = 0;
local_a8 = (long *)0x0;
uStack_a0 = 0;
local_98 = (code *)0x0;
pcStack_90 = (code *)0x0;
local_68 = local_70;
/* try { // try from 0014939e to 001493a5 has its CatchHandler @ 0014950b */
local_a8 = (long *)operator_new(0x18);
*local_a8 = (long)local_88;
local_a8[1] = param_1;
local_a8[2] = param_4;
pcStack_90 = std::
_Function_handler<bool(TensorStorage_const&,ggml_tensor**),ModelLoader::load_tensors(std::map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>&,ggml_backend*,std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>)::$_0>
::_M_invoke;
local_98 = std::
_Function_handler<bool(TensorStorage_const&,ggml_tensor**),ModelLoader::load_tensors(std::map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>&,ggml_backend*,std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>)::$_0>
::_M_manager;
/* try { // try from 001493d2 to 001493dc has its CatchHandler @ 00149509 */
cVar1 = load_tensors(this,&local_a8,param_2);
std::_Function_base::~_Function_base((_Function_base *)&local_a8);
if (cVar1 == '\0') {
uVar5 = 0;
/* try { // try from 001494b3 to 001494cf has its CatchHandler @ 001494f8 */
log_printf(3,"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp",
0x597,"load tensors from file failed");
}
else {
uVar5 = 0;
for (p_Var4 = *(_Rb_tree_node_base **)(param_1 + 0x18);
p_Var4 != (_Rb_tree_node_base *)(param_1 + 8);
p_Var4 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var4)) {
/* try { // try from 0014941b to 00149422 has its CatchHandler @ 00149518 */
std::pair<std::__cxx11::string_const,ggml_tensor*>::pair
((pair<std::__cxx11::string_const,ggml_tensor*> *)local_58,(pair *)(p_Var4 + 0x20));
lVar2 = std::__cxx11::string::find((char *)local_58,0x19e1db);
if (lVar2 == -1) {
lVar2 = std::__cxx11::string::find((char *)local_58,0x19ce60);
if (lVar2 == -1) {
lVar2 = std::__cxx11::string::find((char *)local_58,0x19ce60);
if (lVar2 == -1) {
/* try { // try from 0014945c to 00149468 has its CatchHandler @ 001494fa */
puVar3 = (int4 *)
std::
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::find(local_88,(string *)local_58);
if (puVar3 == local_80) {
uVar5 = 1;
/* try { // try from 0014947b to 00149497 has its CatchHandler @ 001494f6 */
log_printf(3,
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp"
,0x5aa,"tensor \'%s\' not in model file",local_58[0]);
}
}
}
}
std::__cxx11::string::~string((string *)local_58);
}
uVar5 = uVar5 ^ 1;
}
std::
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::~_Rb_tree(local_88);
return uVar5;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.