index
int64 0
66.5k
| func_name
stringlengths 2
5.36k
| func_dep
stringlengths 16
2.19k
| func
stringlengths 8
55.3k
| test
stringlengths 0
7.07k
| opt
stringclasses 4
values | language
stringclasses 2
values | asm
stringlengths 0
45.4k
| ida_asm
stringlengths 0
44.7k
| ida_pseudo
stringlengths 0
44.3k
| ghidra_asm
stringlengths 0
49.1k
| ghidra_pseudo
stringlengths 0
64.7k
|
---|---|---|---|---|---|---|---|---|---|---|---|
5,600 | js_global_escape | bluesky950520[P]quickjs/quickjs.c | static JSValue js_global_escape(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str;
StringBuffer b_s, *b = &b_s;
JSString *p;
int i, len, c;
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return str;
p = JS_VALUE_GET_STRING(str);
string_buffer_init(ctx, b, p->len);
for (i = 0, len = p->len; i < len; i++) {
c = string_get(p, i);
if (isUnescaped(c)) {
string_buffer_putc16(b, c);
} else {
encodeURI_hex(b, c);
}
}
JS_FreeValue(ctx, str);
return string_buffer_end(b);
} | O1 | c | js_global_escape:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq (%r8), %rsi
movq 0x8(%r8), %rdx
xorl %ecx, %ecx
callq 0x27add
movq %rax, (%rsp)
cmpl $0x6, %edx
je 0x79b3e
movq %rdx, 0x30(%rsp)
movq (%rsp), %r13
movl $0x7fffffff, %esi # imm = 0x7FFFFFFF
andl 0x4(%r13), %esi
movq %rbx, 0x8(%rsp)
movl %esi, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movq %rbx, %rdi
xorl %edx, %edx
callq 0x20b73
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x79b4d
movq 0x4(%r13), %r14
testl $0x7fffffff, %r14d # imm = 0x7FFFFFFF
je 0x79b1d
andl $0x7fffffff, %r14d # imm = 0x7FFFFFFF
xorl %ebx, %ebx
leaq 0x24be7(%rip), %r15 # 0x9e6b0
leaq 0x8(%rsp), %r12
testb $-0x80, 0x7(%r13)
jne 0x79add
movzbl 0x18(%r13,%rbx), %ebp
jmp 0x79ae3
movzwl 0x18(%r13,%rbx,2), %ebp
cmpl $0xff, %ebp
ja 0x79b0b
movl $0x45, %edx
movq %r15, %rdi
movl %ebp, %esi
callq 0xe440
testq %rax, %rax
je 0x79b0b
movq %r12, %rdi
movl %ebp, %esi
callq 0x477df
jmp 0x79b15
movq %r12, %rdi
movl %ebp, %esi
callq 0x79e81
incq %rbx
cmpq %rbx, %r14
jne 0x79ace
movq (%rsp), %rsi
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x30(%rsp), %rdx
callq 0x1d8c6
leaq 0x8(%rsp), %rdi
callq 0x33444
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x1c(%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x79aac
| js_global_escape:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov rsi, [r8]
mov rdx, [r8+8]
xor ecx, ecx
call JS_ToStringInternal
mov [rsp+68h+var_68], rax
cmp edx, 6
jz loc_79B3E
mov [rsp+68h+var_38], rdx
mov r13, [rsp+68h+var_68]
mov esi, 7FFFFFFFh
and esi, [r13+4]
mov [rsp+68h+var_60], rbx
mov [rsp+68h+var_4C], esi
mov [rsp+68h+var_50], 0
mov [rsp+68h+var_48], 0
mov [rsp+68h+var_40], rbx
mov rdi, rbx
xor edx, edx
call js_alloc_string
mov [rsp+68h+var_58], rax
test rax, rax
jz loc_79B4D
loc_79AAC:
mov r14, [r13+4]
test r14d, 7FFFFFFFh
jz short loc_79B1D
and r14d, 7FFFFFFFh
xor ebx, ebx
lea r15, isUnescaped_unescaped_chars; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"...
lea r12, [rsp+68h+var_60]
loc_79ACE:
test byte ptr [r13+7], 80h
jnz short loc_79ADD
movzx ebp, byte ptr [r13+rbx+18h]
jmp short loc_79AE3
loc_79ADD:
movzx ebp, word ptr [r13+rbx*2+18h]
loc_79AE3:
cmp ebp, 0FFh
ja short loc_79B0B
mov edx, 45h ; 'E'
mov rdi, r15
mov esi, ebp
call _memchr
test rax, rax
jz short loc_79B0B
mov rdi, r12
mov esi, ebp
call string_buffer_putc16
jmp short loc_79B15
loc_79B0B:
mov rdi, r12
mov esi, ebp
call encodeURI_hex
loc_79B15:
inc rbx
cmp r14, rbx
jnz short loc_79ACE
loc_79B1D:
mov rsi, [rsp+68h+var_68]
mov rax, [rsp+68h+var_40]
mov rdi, [rax+18h]
mov rdx, [rsp+68h+var_38]
call JS_FreeValueRT
lea rdi, [rsp+68h+var_60]
call string_buffer_end
loc_79B3E:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_79B4D:
mov [rsp+68h+var_4C], 0
mov dword ptr [rsp+68h+var_48+4], 0FFFFFFFFh
jmp loc_79AAC
| _DWORD * js_global_escape(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
_DWORD *result; // rax
long long v15; // rdx
long long v16; // rsi
long long v17; // r14
long long v18; // rbx
unsigned int v19; // ebp
_DWORD *v20; // [rsp+0h] [rbp-68h]
long long v21; // [rsp+8h] [rbp-60h] BYREF
int v23; // [rsp+18h] [rbp-50h]
int v24; // [rsp+1Ch] [rbp-4Ch]
long long v25; // [rsp+20h] [rbp-48h]
long long v26; // [rsp+28h] [rbp-40h]
long long v27; // [rsp+30h] [rbp-38h]
result = (_DWORD *)JS_ToStringInternal(a1, *a13, a13[1], 0, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9);
v20 = result;
if ( (_DWORD)v15 != 6 )
{
v27 = v15;
v16 = result[1] & 0x7FFFFFFF;
v21 = a1;
v24 = v16;
v23 = 0;
v25 = 0LL;
v26 = a1;
if ( !js_alloc_string(a1, v16, 0) )
{
v24 = 0;
HIDWORD(v25) = -1;
}
if ( (*(_QWORD *)(v20 + 1) & 0x7FFFFFFF) != 0 )
{
v17 = *(_QWORD *)(v20 + 1) & 0x7FFFFFFFLL;
v18 = 0LL;
do
{
if ( *((char *)v20 + 7) < 0 )
v19 = *((unsigned __int16 *)v20 + v18 + 12);
else
v19 = *((unsigned __int8 *)v20 + v18 + 24);
if ( v19 <= 0xFF && memchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@*_+-./", v19, 69LL) )
string_buffer_putc16((long long)&v21, v19);
else
encodeURI_hex(&v21, v19);
++v18;
}
while ( v17 != v18 );
}
JS_FreeValueRT(*(_QWORD *)(v26 + 24), v20, v27);
return string_buffer_end((long long)&v21);
}
return result;
}
| |||
5,601 | js_global_escape | bluesky950520[P]quickjs/quickjs.c | static JSValue js_global_escape(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str;
StringBuffer b_s, *b = &b_s;
JSString *p;
int i, len, c;
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return str;
p = JS_VALUE_GET_STRING(str);
string_buffer_init(ctx, b, p->len);
for (i = 0, len = p->len; i < len; i++) {
c = string_get(p, i);
if (isUnescaped(c)) {
string_buffer_putc16(b, c);
} else {
encodeURI_hex(b, c);
}
}
JS_FreeValue(ctx, str);
return string_buffer_end(b);
} | O3 | c | js_global_escape:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
movq (%r8), %rsi
movq 0x8(%r8), %rdx
xorl %ecx, %ecx
callq 0x28154
movq %rax, %rbx
cmpl $0x6, %edx
je 0x7c4c5
movq %rdx, 0x30(%rsp)
movl $0x7fffffff, %esi # imm = 0x7FFFFFFF
andl 0x4(%rbx), %esi
movq %r14, 0x8(%rsp)
movl %esi, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq %r14, %rdi
xorl %edx, %edx
callq 0x212c2
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x7c4d7
movq 0x4(%rbx), %r15
testl $0x7fffffff, %r15d # imm = 0x7FFFFFFF
je 0x7c491
andl $0x7fffffff, %r15d # imm = 0x7FFFFFFF
xorl %r14d, %r14d
leaq 0x251f2(%rip), %r12 # 0xa1630
leaq 0x8(%rsp), %r13
testb $-0x80, 0x7(%rbx)
jne 0x7c451
movzbl 0x18(%rbx,%r14), %ebp
jmp 0x7c45f
movzwl 0x18(%rbx,%r14,2), %ebp
cmpl $0xff, %ebp
ja 0x7c47f
movl $0x45, %edx
movq %r12, %rdi
movl %ebp, %esi
callq 0xe440
testq %rax, %rax
je 0x7c47f
movq %r13, %rdi
movl %ebp, %esi
callq 0x494a9
jmp 0x7c489
movq %r13, %rdi
movl %ebp, %esi
callq 0x7c814
incq %r14
cmpq %r14, %r15
jne 0x7c443
movq 0x30(%rsp), %rdx
cmpl $-0x9, %edx
jb 0x7c4b8
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movl (%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbx)
cmpl $0x1, %eax
jg 0x7c4b8
movq %rbx, %rsi
callq 0x219cc
leaq 0x8(%rsp), %rdi
callq 0x342b1
movq %rax, %rbx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x1c(%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x7c420
| js_global_escape:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rdi
mov rsi, [r8]
mov rdx, [r8+8]
xor ecx, ecx
call JS_ToStringInternal
mov rbx, rax
cmp edx, 6
jz loc_7C4C5
mov [rsp+68h+var_38], rdx
mov esi, 7FFFFFFFh
and esi, [rbx+4]
mov [rsp+68h+var_60], r14
mov [rsp+68h+var_4C], esi
mov [rsp+68h+var_50], 0
mov [rsp+68h+var_48], 0
mov [rsp+68h+var_40], r14
mov rdi, r14
xor edx, edx
call js_alloc_string
mov [rsp+68h+var_58], rax
test rax, rax
jz loc_7C4D7
loc_7C420:
mov r15, [rbx+4]
test r15d, 7FFFFFFFh
jz short loc_7C491
and r15d, 7FFFFFFFh
xor r14d, r14d
lea r12, isUnescaped_unescaped_chars; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"...
lea r13, [rsp+68h+var_60]
loc_7C443:
test byte ptr [rbx+7], 80h
jnz short loc_7C451
movzx ebp, byte ptr [rbx+r14+18h]
jmp short loc_7C45F
loc_7C451:
movzx ebp, word ptr [rbx+r14*2+18h]
cmp ebp, 0FFh
ja short loc_7C47F
loc_7C45F:
mov edx, 45h ; 'E'
mov rdi, r12
mov esi, ebp
call _memchr
test rax, rax
jz short loc_7C47F
mov rdi, r13
mov esi, ebp
call string_buffer_putc16
jmp short loc_7C489
loc_7C47F:
mov rdi, r13
mov esi, ebp
call encodeURI_hex
loc_7C489:
inc r14
cmp r15, r14
jnz short loc_7C443
loc_7C491:
mov rdx, [rsp+68h+var_38]
cmp edx, 0FFFFFFF7h
jb short loc_7C4B8
mov rax, [rsp+68h+var_40]
mov rdi, [rax+18h]
mov eax, [rbx]
lea ecx, [rax-1]
mov [rbx], ecx
cmp eax, 1
jg short loc_7C4B8
mov rsi, rbx
call js_free_value_rt
loc_7C4B8:
lea rdi, [rsp+68h+var_60]
call string_buffer_end
mov rbx, rax
loc_7C4C5:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7C4D7:
mov [rsp+68h+var_4C], 0
mov dword ptr [rsp+68h+var_48+4], 0FFFFFFFFh
jmp loc_7C420
| long long js_global_escape(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
unsigned long long v14; // rax
long long v15; // rdx
unsigned long long v16; // rbx
long long v17; // rsi
long long v18; // r15
long long i; // r14
unsigned int v20; // ebp
int v21; // edx
long long v22; // rdi
int v23; // eax
long long v25; // [rsp+8h] [rbp-60h] BYREF
int v27; // [rsp+18h] [rbp-50h]
int v28; // [rsp+1Ch] [rbp-4Ch]
long long v29; // [rsp+20h] [rbp-48h]
long long v30; // [rsp+28h] [rbp-40h]
long long v31; // [rsp+30h] [rbp-38h]
v14 = JS_ToStringInternal(a1, *(_DWORD **)a13, *(_QWORD *)(a13 + 8), 0LL, a13, a14, a2, a3, a4, a5, a6, a7, a8, a9);
v16 = v14;
if ( (_DWORD)v15 != 6 )
{
v31 = v15;
v17 = *(_DWORD *)(v14 + 4) & 0x7FFFFFFF;
v25 = a1;
v28 = v17;
v27 = 0;
v29 = 0LL;
v30 = a1;
if ( !js_alloc_string(a1, v17, 0) )
{
v28 = 0;
HIDWORD(v29) = -1;
}
if ( (*(_QWORD *)(v16 + 4) & 0x7FFFFFFF) != 0 )
{
v18 = *(_QWORD *)(v16 + 4) & 0x7FFFFFFFLL;
for ( i = 0LL; v18 != i; ++i )
{
if ( *(char *)(v16 + 7) < 0 )
{
v20 = *(unsigned __int16 *)(v16 + 2 * i + 24);
if ( v20 > 0xFF )
goto LABEL_11;
}
else
{
v20 = *(unsigned __int8 *)(v16 + i + 24);
}
if ( !memchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@*_+-./", v20, 69LL) )
{
LABEL_11:
encodeURI_hex(&v25, v20);
continue;
}
string_buffer_putc16((long long)&v25, v20);
}
}
v21 = v31;
if ( (unsigned int)v31 >= 0xFFFFFFF7 )
{
v22 = *(_QWORD *)(v30 + 24);
v23 = (*(_DWORD *)v16)--;
if ( v23 <= 1 )
js_free_value_rt(v22, (_QWORD *)v16, v21);
}
return string_buffer_end(&v25);
}
return v16;
}
| js_global_escape:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
XOR ECX,ECX
CALL 0x00128154
MOV RBX,RAX
CMP EDX,0x6
JZ 0x0017c4c5
MOV qword ptr [RSP + 0x30],RDX
MOV ESI,0x7fffffff
AND ESI,dword ptr [RBX + 0x4]
MOV qword ptr [RSP + 0x8],R14
MOV dword ptr [RSP + 0x1c],ESI
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],R14
MOV RDI,R14
XOR EDX,EDX
CALL 0x001212c2
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x0017c4d7
LAB_0017c420:
MOV R15,qword ptr [RBX + 0x4]
TEST R15D,0x7fffffff
JZ 0x0017c491
AND R15D,0x7fffffff
XOR R14D,R14D
LEA R12,[0x1a1630]
LEA R13,[RSP + 0x8]
LAB_0017c443:
TEST byte ptr [RBX + 0x7],0x80
JNZ 0x0017c451
MOVZX EBP,byte ptr [RBX + R14*0x1 + 0x18]
JMP 0x0017c45f
LAB_0017c451:
MOVZX EBP,word ptr [RBX + R14*0x2 + 0x18]
CMP EBP,0xff
JA 0x0017c47f
LAB_0017c45f:
MOV EDX,0x45
MOV RDI,R12
MOV ESI,EBP
CALL 0x0010e440
TEST RAX,RAX
JZ 0x0017c47f
MOV RDI,R13
MOV ESI,EBP
CALL 0x001494a9
JMP 0x0017c489
LAB_0017c47f:
MOV RDI,R13
MOV ESI,EBP
CALL 0x0017c814
LAB_0017c489:
INC R14
CMP R15,R14
JNZ 0x0017c443
LAB_0017c491:
MOV RDX,qword ptr [RSP + 0x30]
CMP EDX,-0x9
JC 0x0017c4b8
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [RBX]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBX],ECX
CMP EAX,0x1
JG 0x0017c4b8
MOV RSI,RBX
CALL 0x001219cc
LAB_0017c4b8:
LEA RDI,[RSP + 0x8]
CALL 0x001342b1
MOV RBX,RAX
LAB_0017c4c5:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017c4d7:
MOV dword ptr [RSP + 0x1c],0x0
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x0017c420
|
int * js_global_escape(long param_1)
{
ushort uVar1;
int iVar2;
ulong uVar3;
int8 uVar4;
void *pvVar5;
int *piVar6;
uint __c;
int8 *in_R8;
ulong uVar7;
int1 auVar8 [16];
long local_60;
long local_58;
int4 local_50;
uint local_4c;
int8 local_48;
long local_40;
int8 local_38;
auVar8 = JS_ToStringInternal(param_1,*in_R8,in_R8[1],0);
local_38 = auVar8._8_8_;
piVar6 = auVar8._0_8_;
if (auVar8._8_4_ != 6) {
local_4c = piVar6[1] & 0x7fffffff;
local_50 = 0;
local_48 = 0;
local_60 = param_1;
local_40 = param_1;
local_58 = js_alloc_string(param_1,local_4c,0);
if (local_58 == 0) {
local_4c = 0;
local_48 = CONCAT44(0xffffffff,(int4)local_48);
}
uVar3 = *(ulong *)(piVar6 + 1);
if ((uVar3 & 0x7fffffff) != 0) {
uVar7 = 0;
do {
if ((*(byte *)((long)piVar6 + 7) & 0x80) == 0) {
__c = (uint)*(byte *)((long)piVar6 + uVar7 + 0x18);
LAB_0017c45f:
pvVar5 = memchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@*_+-./",
__c,0x45);
if (pvVar5 == (void *)0x0) goto LAB_0017c47f;
string_buffer_putc16(&local_60,__c);
}
else {
uVar1 = *(ushort *)((long)piVar6 + uVar7 * 2 + 0x18);
__c = (uint)uVar1;
if (uVar1 < 0x100) goto LAB_0017c45f;
LAB_0017c47f:
encodeURI_hex(&local_60,__c);
}
uVar7 = uVar7 + 1;
} while (((uint)uVar3 & 0x7fffffff) != uVar7);
}
if (0xfffffff6 < (uint)local_38) {
uVar4 = *(int8 *)(local_40 + 0x18);
iVar2 = *piVar6;
*piVar6 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar4,piVar6);
}
}
piVar6 = (int *)string_buffer_end(&local_60);
}
return piVar6;
}
|
|
5,602 | ggml_compute_forward_get_rel_pos | monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c | static void ggml_compute_forward_get_rel_pos(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F16:
case GGML_TYPE_BF16:
{
ggml_compute_forward_get_rel_pos_f16(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O0 | c | ggml_compute_forward_get_rel_pos:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
subl $0x1, %eax
je 0x1938c
jmp 0x19381
movl 0xc(%rsp), %eax
subl $0x1e, %eax
jne 0x1939d
jmp 0x1938c
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x3de20
jmp 0x193b7
leaq 0x987b6(%rip), %rdi # 0xb1b5a
movl $0x2e0b, %esi # imm = 0x2E0B
leaq 0x98917(%rip), %rdx # 0xb1cc7
movb $0x0, %al
callq 0xd030
addq $0x28, %rsp
retq
nopl (%rax)
| ggml_compute_forward_get_rel_pos:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_10]
mov rax, [rax+98h]
mov [rsp+28h+var_18], rax
mov rax, [rsp+28h+var_18]
mov eax, [rax]
mov [rsp+28h+var_1C], eax
sub eax, 1
jz short loc_1938C
jmp short $+2
loc_19381:
mov eax, [rsp+28h+var_1C]
sub eax, 1Eh
jnz short loc_1939D
jmp short $+2
loc_1938C:
mov rdi, [rsp+28h+var_8]
mov rsi, [rsp+28h+var_10]
call ggml_compute_forward_get_rel_pos_f16
jmp short loc_193B7
loc_1939D:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 2E0Bh
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_193B7:
add rsp, 28h
retn
| double ggml_compute_forward_get_rel_pos(long long a1, long long a2)
{
double result; // xmm0_8
int v3; // [rsp+Ch] [rbp-1Ch]
v3 = **(_DWORD **)(a2 + 152);
if ( v3 != 1 && v3 != 30 )
return ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c",
11787LL,
"fatal error");
ggml_compute_forward_get_rel_pos_f16(a1, a2);
return result;
}
| ggml_compute_forward_get_rel_pos:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0xc],EAX
SUB EAX,0x1
JZ 0x0011938c
JMP 0x00119381
LAB_00119381:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x1e
JNZ 0x0011939d
JMP 0x0011938c
LAB_0011938c:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x0013de20
JMP 0x001193b7
LAB_0011939d:
LEA RDI,[0x1b1b5a]
MOV ESI,0x2e0b
LEA RDX,[0x1b1cc7]
MOV AL,0x0
CALL 0x0010d030
LAB_001193b7:
ADD RSP,0x28
RET
|
void ggml_compute_forward_get_rel_pos(int8 param_1,long param_2)
{
if ((**(int **)(param_2 + 0x98) != 1) && (**(int **)(param_2 + 0x98) != 0x1e)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c"
,0x2e0b,"fatal error");
}
ggml_compute_forward_get_rel_pos_f16(param_1,param_2);
return;
}
|
|
5,603 | translog_purge_at_flush | eloqsql/storage/maria/ma_loghandler.c | my_bool translog_purge_at_flush()
{
uint32 i, min_file;
int rc= 0;
DBUG_ENTER("translog_purge_at_flush");
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
if (unlikely(translog_status == TRANSLOG_READONLY))
{
DBUG_PRINT("info", ("The log is read only => exit"));
DBUG_RETURN(0);
}
if (log_purge_type != TRANSLOG_PURGE_ONDEMAND)
{
DBUG_PRINT("info", ("It is not \"at_flush\" => exit"));
DBUG_RETURN(0);
}
mysql_mutex_lock(&log_descriptor.purger_lock);
if (unlikely(log_descriptor.min_need_file == 0 || log_purge_disabled))
{
DBUG_PRINT("info", ("No info about min need file => exit"));
mysql_mutex_unlock(&log_descriptor.purger_lock);
DBUG_RETURN(0);
}
min_file= translog_first_file(translog_get_horizon(), 1);
DBUG_ASSERT(min_file != 0); /* log is already started */
for(i= min_file; i < log_descriptor.min_need_file && rc == 0; i++)
{
char path[FN_REFLEN], *file_name;
DBUG_PRINT("info", ("purge file %lu\n", (ulong) i));
file_name= translog_filename_by_fileno(i, path);
rc= MY_TEST(mysql_file_delete(key_file_translog,
file_name, MYF(MY_WME)));
}
mysql_mutex_unlock(&log_descriptor.purger_lock);
DBUG_RETURN(rc);
} | O0 | c | translog_purge_at_flush:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp # imm = 0x230
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl $0x0, -0x220(%rbp)
jmp 0x8f6c4
cmpl $0x2, 0x3f3bb5(%rip) # 0x483280
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x8f6f8
jmp 0x8f6e8
jmp 0x8f6ea
jmp 0x8f6ec
movb $0x0, -0x211(%rbp)
jmp 0x8f879
cmpq $0x2, 0x3f3b68(%rip) # 0x483268
je 0x8f714
jmp 0x8f704
jmp 0x8f706
jmp 0x8f708
movb $0x0, -0x211(%rbp)
jmp 0x8f879
leaq 0x3f4d75(%rip), %rdi # 0x484490
addq $0x800e80, %rdi # imm = 0x800E80
leaq 0xcb88c(%rip), %rsi # 0x15afb5
movl $0x2234, %edx # imm = 0x2234
callq 0x87970
movb $0x1, %al
cmpl $0x0, 0xbf5bcc(%rip) # 0xc85308
movb %al, -0x229(%rbp)
je 0x8f754
cmpl $0x0, 0x3f3b15(%rip) # 0x483260
setne %al
movb %al, -0x229(%rbp)
movb -0x229(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x8f795
jmp 0x8f774
jmp 0x8f776
leaq 0x3f4d13(%rip), %rdi # 0x484490
addq $0x800e80, %rdi # imm = 0x800E80
callq 0x879e0
movb $0x0, -0x211(%rbp)
jmp 0x8f879
callq 0x8c810
movq %rax, %rdi
movl $0x1, %esi
callq 0x89b50
movl %eax, -0x21c(%rbp)
jmp 0x8f7af
movl -0x21c(%rbp), %eax
movl %eax, -0x218(%rbp)
movl -0x218(%rbp), %ecx
xorl %eax, %eax
cmpl 0xbf5b3f(%rip), %ecx # 0xc85308
movb %al, -0x22a(%rbp)
jae 0x8f7e1
cmpl $0x0, -0x220(%rbp)
sete %al
movb %al, -0x22a(%rbp)
movb -0x22a(%rbp), %al
testb $0x1, %al
jne 0x8f7ed
jmp 0x8f85a
jmp 0x8f7ef
jmp 0x8f7f1
movl -0x218(%rbp), %edi
leaq -0x210(%rbp), %rsi
callq 0x87470
movq %rax, -0x228(%rbp)
leaq 0x3f35d3(%rip), %rax # 0x482de4
movl (%rax), %edi
movq -0x228(%rbp), %rcx
leaq 0xcb794(%rip), %rsi # 0x15afb5
movl $0x2245, %edx # imm = 0x2245
movl $0x10, %r8d
callq 0x8f5c0
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x220(%rbp)
movl -0x218(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x218(%rbp)
jmp 0x8f7bb
leaq 0x3f4c2f(%rip), %rdi # 0x484490
addq $0x800e80, %rdi # imm = 0x800E80
callq 0x879e0
movl -0x220(%rbp), %eax
movb %al, -0x211(%rbp)
movb -0x211(%rbp), %al
movb %al, -0x22b(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x8f8a6
movb -0x22b(%rbp), %al
addq $0x230, %rsp # imm = 0x230
popq %rbp
retq
callq 0x2a260
nopl (%rax,%rax)
| translog_purge_at_flush:
push rbp
mov rbp, rsp
sub rsp, 230h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_220], 0
jmp short $+2
loc_8F6C4:
cmp cs:translog_status, 2
setz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_8F6F8
jmp short $+2
loc_8F6E8:
jmp short $+2
loc_8F6EA:
jmp short $+2
loc_8F6EC:
mov [rbp+var_211], 0
jmp loc_8F879
loc_8F6F8:
cmp cs:log_purge_type, 2
jz short loc_8F714
jmp short $+2
loc_8F704:
jmp short $+2
loc_8F706:
jmp short $+2
loc_8F708:
mov [rbp+var_211], 0
jmp loc_8F879
loc_8F714:
lea rdi, log_descriptor
add rdi, 800E80h
lea rsi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 2234h
call inline_mysql_mutex_lock_11
mov al, 1
cmp cs:dword_C85308, 0
mov [rbp+var_229], al
jz short loc_8F754
cmp cs:log_purge_disabled, 0
setnz al
mov [rbp+var_229], al
loc_8F754:
mov al, [rbp+var_229]
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_8F795
jmp short $+2
loc_8F774:
jmp short $+2
loc_8F776:
lea rdi, log_descriptor
add rdi, 800E80h
call inline_mysql_mutex_unlock_12
mov [rbp+var_211], 0
jmp loc_8F879
loc_8F795:
call translog_get_horizon
mov rdi, rax
mov esi, 1
call translog_first_file
mov [rbp+var_21C], eax
jmp short $+2
loc_8F7AF:
mov eax, [rbp+var_21C]
mov [rbp+var_218], eax
loc_8F7BB:
mov ecx, [rbp+var_218]
xor eax, eax
cmp ecx, cs:dword_C85308
mov [rbp+var_22A], al
jnb short loc_8F7E1
cmp [rbp+var_220], 0
setz al
mov [rbp+var_22A], al
loc_8F7E1:
mov al, [rbp+var_22A]
test al, 1
jnz short loc_8F7ED
jmp short loc_8F85A
loc_8F7ED:
jmp short $+2
loc_8F7EF:
jmp short $+2
loc_8F7F1:
mov edi, [rbp+var_218]
lea rsi, [rbp+var_210]
call translog_filename_by_fileno
mov [rbp+var_228], rax
lea rax, key_file_translog
mov edi, [rax]
mov rcx, [rbp+var_228]
lea rsi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 2245h
mov r8d, 10h
call inline_mysql_file_delete_0
mov edx, eax
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
mov [rbp+var_220], eax
mov eax, [rbp+var_218]
add eax, 1
mov [rbp+var_218], eax
jmp loc_8F7BB
loc_8F85A:
lea rdi, log_descriptor
add rdi, 800E80h
call inline_mysql_mutex_unlock_12
mov eax, [rbp+var_220]
mov [rbp+var_211], al
loc_8F879:
mov al, [rbp+var_211]
mov [rbp+var_22B], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_8F8A6
mov al, [rbp+var_22B]
add rsp, 230h
pop rbp
retn
loc_8F8A6:
call ___stack_chk_fail
| bool translog_purge_at_flush()
{
long long horizon; // rax
long long v1; // rdx
int v2; // r8d
int v3; // r9d
bool v5; // [rsp+6h] [rbp-22Ah]
bool v6; // [rsp+7h] [rbp-229h]
long long v7; // [rsp+8h] [rbp-228h]
BOOL v8; // [rsp+10h] [rbp-220h]
unsigned int i; // [rsp+18h] [rbp-218h]
_BYTE v11[520]; // [rsp+20h] [rbp-210h] BYREF
unsigned long long v12; // [rsp+228h] [rbp-8h]
v12 = __readfsqword(0x28u);
v8 = 0;
if ( translog_status == 2 )
return 0;
if ( log_purge_type != 2 )
return 0;
inline_mysql_mutex_lock_11(
(long long)&log_descriptor[1049040],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x2234u);
v6 = 1;
if ( dword_C85308 )
v6 = log_purge_disabled != 0;
if ( v6 )
{
inline_mysql_mutex_unlock_12((long long)&log_descriptor[1049040]);
return 0;
}
else
{
horizon = translog_get_horizon();
for ( i = translog_first_file(horizon, 1); ; ++i )
{
v5 = 0;
if ( i < dword_C85308 )
v5 = !v8;
if ( !v5 )
break;
v7 = translog_filename_by_fileno(i, (long long)v11, v1, i, v2, v3);
v1 = (unsigned int)inline_mysql_file_delete_0(
key_file_translog,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x2245u,
v7,
16LL);
v8 = v1 != 0;
}
inline_mysql_mutex_unlock_12((long long)&log_descriptor[1049040]);
return v8;
}
}
| translog_purge_at_flush:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x230
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x220],0x0
JMP 0x0018f6c4
LAB_0018f6c4:
CMP dword ptr [0x00583280],0x2
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0018f6f8
JMP 0x0018f6e8
LAB_0018f6e8:
JMP 0x0018f6ea
LAB_0018f6ea:
JMP 0x0018f6ec
LAB_0018f6ec:
MOV byte ptr [RBP + -0x211],0x0
JMP 0x0018f879
LAB_0018f6f8:
CMP qword ptr [0x00583268],0x2
JZ 0x0018f714
JMP 0x0018f704
LAB_0018f704:
JMP 0x0018f706
LAB_0018f706:
JMP 0x0018f708
LAB_0018f708:
MOV byte ptr [RBP + -0x211],0x0
JMP 0x0018f879
LAB_0018f714:
LEA RDI,[0x584490]
ADD RDI,0x800e80
LEA RSI,[0x25afb5]
MOV EDX,0x2234
CALL 0x00187970
MOV AL,0x1
CMP dword ptr [0x00d85308],0x0
MOV byte ptr [RBP + -0x229],AL
JZ 0x0018f754
CMP dword ptr [0x00583260],0x0
SETNZ AL
MOV byte ptr [RBP + -0x229],AL
LAB_0018f754:
MOV AL,byte ptr [RBP + -0x229]
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0018f795
JMP 0x0018f774
LAB_0018f774:
JMP 0x0018f776
LAB_0018f776:
LEA RDI,[0x584490]
ADD RDI,0x800e80
CALL 0x001879e0
MOV byte ptr [RBP + -0x211],0x0
JMP 0x0018f879
LAB_0018f795:
CALL 0x0018c810
MOV RDI,RAX
MOV ESI,0x1
CALL 0x00189b50
MOV dword ptr [RBP + -0x21c],EAX
JMP 0x0018f7af
LAB_0018f7af:
MOV EAX,dword ptr [RBP + -0x21c]
MOV dword ptr [RBP + -0x218],EAX
LAB_0018f7bb:
MOV ECX,dword ptr [RBP + -0x218]
XOR EAX,EAX
CMP ECX,dword ptr [0x00d85308]
MOV byte ptr [RBP + -0x22a],AL
JNC 0x0018f7e1
CMP dword ptr [RBP + -0x220],0x0
SETZ AL
MOV byte ptr [RBP + -0x22a],AL
LAB_0018f7e1:
MOV AL,byte ptr [RBP + -0x22a]
TEST AL,0x1
JNZ 0x0018f7ed
JMP 0x0018f85a
LAB_0018f7ed:
JMP 0x0018f7ef
LAB_0018f7ef:
JMP 0x0018f7f1
LAB_0018f7f1:
MOV EDI,dword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x00187470
MOV qword ptr [RBP + -0x228],RAX
LEA RAX,[0x582de4]
MOV EDI,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x228]
LEA RSI,[0x25afb5]
MOV EDX,0x2245
MOV R8D,0x10
CALL 0x0018f5c0
MOV EDX,EAX
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x220],EAX
MOV EAX,dword ptr [RBP + -0x218]
ADD EAX,0x1
MOV dword ptr [RBP + -0x218],EAX
JMP 0x0018f7bb
LAB_0018f85a:
LEA RDI,[0x584490]
ADD RDI,0x800e80
CALL 0x001879e0
MOV EAX,dword ptr [RBP + -0x220]
MOV byte ptr [RBP + -0x211],AL
LAB_0018f879:
MOV AL,byte ptr [RBP + -0x211]
MOV byte ptr [RBP + -0x22b],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0018f8a6
MOV AL,byte ptr [RBP + -0x22b]
ADD RSP,0x230
POP RBP
RET
LAB_0018f8a6:
CALL 0x0012a260
|
int8 translog_purge_at_flush(void)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
uint local_220;
bool local_219;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_219 = false;
if (translog_status == 2) {
local_219 = false;
}
else if (log_purge_type == 2) {
inline_mysql_mutex_lock
(&DAT_00d85310,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x2234);
if (DAT_00d85308 == 0 || log_purge_disabled != 0) {
inline_mysql_mutex_unlock(&DAT_00d85310);
local_219 = false;
}
else {
uVar2 = translog_get_horizon();
for (local_220 = translog_first_file(uVar2,1); local_220 < DAT_00d85308 && !local_219;
local_220 = local_220 + 1) {
uVar2 = translog_filename_by_fileno(local_220,local_218);
iVar1 = inline_mysql_file_delete
(key_file_translog,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x2245,uVar2,0x10);
local_219 = iVar1 != 0;
}
inline_mysql_mutex_unlock(&DAT_00d85310);
}
}
else {
local_219 = false;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_219);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
5,604 | mul_fp6x2 | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/fp12_tower.c | static void mul_fp6x2(vec768fp6 ret, const vec384fp6 a, const vec384fp6 b)
{
vec768x t0, t1, t2;
vec384x aa, bb;
mul_fp2x2(t0, a[0], b[0]);
mul_fp2x2(t1, a[1], b[1]);
mul_fp2x2(t2, a[2], b[2]);
/* ret[0] = ((a1 + a2)*(b1 + b2) - a1*b1 - a2*b2)*(u+1) + a0*b0
= (a1*b2 + a2*b1)*(u+1) + a0*b0 */
add_fp2(aa, a[1], a[2]);
add_fp2(bb, b[1], b[2]);
mul_fp2x2(ret[0], aa, bb);
sub_fp2x2(ret[0], ret[0], t1);
sub_fp2x2(ret[0], ret[0], t2);
mul_by_u_plus_1_fp2x2(ret[1], ret[0]); /* borrow ret[1] for a moment */
add_fp2x2(ret[0], ret[1], t0);
/* ret[1] = (a0 + a1)*(b0 + b1) - a0*b0 - a1*b1 + a2*b2*(u+1)
= a0*b1 + a1*b0 + a2*b2*(u+1) */
add_fp2(aa, a[0], a[1]);
add_fp2(bb, b[0], b[1]);
mul_fp2x2(ret[1], aa, bb);
sub_fp2x2(ret[1], ret[1], t0);
sub_fp2x2(ret[1], ret[1], t1);
mul_by_u_plus_1_fp2x2(ret[2], t2); /* borrow ret[2] for a moment */
add_fp2x2(ret[1], ret[1], ret[2]);
/* ret[2] = (a0 + a2)*(b0 + b2) - a0*b0 - a2*b2 + a1*b1
= a0*b2 + a2*b0 + a1*b1 */
add_fp2(aa, a[0], a[2]);
add_fp2(bb, b[0], b[2]);
mul_fp2x2(ret[2], aa, bb);
sub_fp2x2(ret[2], ret[2], t0);
sub_fp2x2(ret[2], ret[2], t2);
add_fp2x2(ret[2], ret[2], t1);
} | O1 | c | mul_fp6x2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x338, %rsp # imm = 0x338
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0x18079(%rip), %r13 # 0x3fb20
leaq -0x300(%rbp), %rdi
movq %r13, %rcx
callq 0x33b60
leaq 0x60(%r12), %rsi
movq %rsi, -0x30(%rbp)
movq %r12, -0x40(%rbp)
leaq 0x60(%r15), %rdx
movq %rdx, -0x38(%rbp)
movq %r15, -0x48(%rbp)
leaq -0x240(%rbp), %rdi
movq %r13, %rcx
callq 0x33b60
movl $0xc0, %r13d
leaq (%r12,%r13), %rsi
leaq (%r15,%r13), %r12
leaq -0x180(%rbp), %rdi
movq %rsi, %r15
movq %rsi, -0x58(%rbp)
movq %r12, %rdx
movq %r12, -0x50(%rbp)
leaq 0x18018(%rip), %rbx # 0x3fb20
movq %rbx, %rcx
callq 0x33b60
leaq -0xc0(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2f460
leaq -0x360(%rbp), %r15
movq %r15, %rdi
movq -0x38(%rbp), %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2f460
movq %r14, %rdi
leaq -0xc0(%rbp), %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x33b60
movq %r14, %rdi
movq %r14, %rsi
leaq -0x240(%rbp), %rdx
movq %rbx, %rcx
callq 0x30840
leaq 0x60(%r14), %r12
leaq -0x1e0(%rbp), %rdx
movq %r12, %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq 0x30840
movq %r14, %rdi
movq %r14, %rsi
leaq -0x180(%rbp), %rdx
movq %rbx, %rcx
callq 0x30840
leaq -0x120(%rbp), %rdx
movq %r12, %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq 0x30840
addq %r14, %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x30840
leaq 0x120(%r14), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x30720
movq %r14, %rdi
movq %r13, %rsi
leaq -0x300(%rbp), %rdx
movq %rbx, %rcx
callq 0x30720
leaq -0x2a0(%rbp), %rdx
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x30720
leaq -0xc0(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq %rbx, %rcx
callq 0x2f460
leaq -0x360(%rbp), %r12
movq %r12, %rdi
movq -0x48(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq %rbx, %rcx
callq 0x2f460
movq %r13, %rdi
leaq -0xc0(%rbp), %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x33b60
movq %r13, %rdi
movq %r13, %rsi
leaq -0x300(%rbp), %rdx
movq %rbx, %rcx
callq 0x30840
movq %r15, %rdi
movq %r15, %rsi
leaq -0x2a0(%rbp), %rdx
movq %rbx, %rcx
callq 0x30840
movq %r13, %rdi
movq %r13, %rsi
leaq -0x240(%rbp), %rdx
movq %rbx, %rcx
callq 0x30840
movq %r15, %rdi
movq %r15, %rsi
leaq -0x1e0(%rbp), %rdx
movq %rbx, %rcx
callq 0x30840
leaq 0x180(%r14), %r12
movq %r12, %rdi
leaq -0x180(%rbp), %rsi
leaq -0x120(%rbp), %rdx
movq %rbx, %rcx
callq 0x30840
addq $0x1e0, %r14 # imm = 0x1E0
movq %r14, %rdi
leaq -0x180(%rbp), %rsi
leaq -0x120(%rbp), %rdx
movq %rbx, %rcx
callq 0x30720
movq %r13, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x30720
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x30720
leaq -0xc0(%rbp), %r13
movq %r13, %rdi
movq -0x40(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %rbx, %rcx
callq 0x2f460
leaq -0x360(%rbp), %r15
movq %r15, %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %rbx, %rcx
callq 0x2f460
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x33b60
movq %r12, %rdi
movq %r12, %rsi
leaq -0x300(%rbp), %rdx
movq %rbx, %rcx
callq 0x30840
movq %r14, %rdi
movq %r14, %rsi
leaq -0x2a0(%rbp), %rdx
movq %rbx, %rcx
callq 0x30840
movq %r12, %rdi
movq %r12, %rsi
leaq -0x180(%rbp), %rdx
movq %rbx, %rcx
callq 0x30840
movq %r14, %rdi
movq %r14, %rsi
leaq -0x120(%rbp), %rdx
movq %rbx, %rcx
callq 0x30840
movq %r12, %rdi
movq %r12, %rsi
leaq -0x240(%rbp), %rdx
movq %rbx, %rcx
callq 0x30720
movq %r14, %rdi
movq %r14, %rsi
leaq -0x1e0(%rbp), %rdx
movq %rbx, %rcx
callq 0x30720
addq $0x338, %rsp # imm = 0x338
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mul_fp6x2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 338h
mov r15, rdx
mov r12, rsi
mov r14, rdi
lea r13, BLS12_381_P
lea rdi, [rbp+var_300]
mov rcx, r13
call mul_382x
lea rsi, [r12+60h]
mov [rbp+var_30], rsi
mov [rbp+var_40], r12
lea rdx, [r15+60h]
mov [rbp+var_38], rdx
mov [rbp+var_48], r15
lea rdi, [rbp+var_240]
mov rcx, r13
call mul_382x
mov r13d, 0C0h
lea rsi, [r12+r13]
lea r12, [r15+r13]
lea rdi, [rbp+var_180]
mov r15, rsi
mov [rbp+var_58], rsi
mov rdx, r12
mov [rbp+var_50], r12
lea rbx, BLS12_381_P
mov rcx, rbx
call mul_382x
lea rdi, [rbp+var_C0]
mov rsi, [rbp+var_30]
mov rdx, r15
mov rcx, rbx
call add_mod_384x
lea r15, [rbp+var_360]
mov rdi, r15
mov rsi, [rbp+var_38]
mov rdx, r12
mov rcx, rbx
call add_mod_384x
mov rdi, r14
lea rsi, [rbp+var_C0]
mov rdx, r15
mov rcx, rbx
call mul_382x
mov rdi, r14
mov rsi, r14
lea rdx, [rbp+var_240]
mov rcx, rbx
call _sub_mod_384x384
lea r12, [r14+60h]
lea rdx, [rbp+var_1E0]
mov rdi, r12
mov rsi, r12
mov rcx, rbx
call _sub_mod_384x384
mov rdi, r14
mov rsi, r14
lea rdx, [rbp+var_180]
mov rcx, rbx
call _sub_mod_384x384
lea rdx, [rbp+var_120]
mov rdi, r12
mov rsi, r12
mov rcx, rbx
call _sub_mod_384x384
add r13, r14
mov rdi, r13
mov rsi, r14
mov rdx, r12
mov rcx, rbx
call _sub_mod_384x384
lea r15, [r14+120h]
mov rdi, r15
mov rsi, r14
mov rdx, r12
mov rcx, rbx
call add_mod_384x384
mov rdi, r14
mov rsi, r13
lea rdx, [rbp+var_300]
mov rcx, rbx
call add_mod_384x384
lea rdx, [rbp+var_2A0]
mov rdi, r12
mov rsi, r15
mov rcx, rbx
call add_mod_384x384
lea rdi, [rbp+var_C0]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_30]
mov rcx, rbx
call add_mod_384x
lea r12, [rbp+var_360]
mov rdi, r12
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_38]
mov rcx, rbx
call add_mod_384x
mov rdi, r13
lea rsi, [rbp+var_C0]
mov rdx, r12
mov rcx, rbx
call mul_382x
mov rdi, r13
mov rsi, r13
lea rdx, [rbp+var_300]
mov rcx, rbx
call _sub_mod_384x384
mov rdi, r15
mov rsi, r15
lea rdx, [rbp+var_2A0]
mov rcx, rbx
call _sub_mod_384x384
mov rdi, r13
mov rsi, r13
lea rdx, [rbp+var_240]
mov rcx, rbx
call _sub_mod_384x384
mov rdi, r15
mov rsi, r15
lea rdx, [rbp+var_1E0]
mov rcx, rbx
call _sub_mod_384x384
lea r12, [r14+180h]
mov rdi, r12
lea rsi, [rbp+var_180]
lea rdx, [rbp+var_120]
mov rcx, rbx
call _sub_mod_384x384
add r14, 1E0h
mov rdi, r14
lea rsi, [rbp+var_180]
lea rdx, [rbp+var_120]
mov rcx, rbx
call add_mod_384x384
mov rdi, r13
mov rsi, r13
mov rdx, r12
mov rcx, rbx
call add_mod_384x384
mov rdi, r15
mov rsi, r15
mov rdx, r14
mov rcx, rbx
call add_mod_384x384
lea r13, [rbp+var_C0]
mov rdi, r13
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_58]
mov rcx, rbx
call add_mod_384x
lea r15, [rbp+var_360]
mov rdi, r15
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_50]
mov rcx, rbx
call add_mod_384x
mov rdi, r12
mov rsi, r13
mov rdx, r15
mov rcx, rbx
call mul_382x
mov rdi, r12
mov rsi, r12
lea rdx, [rbp+var_300]
mov rcx, rbx
call _sub_mod_384x384
mov rdi, r14
mov rsi, r14
lea rdx, [rbp+var_2A0]
mov rcx, rbx
call _sub_mod_384x384
mov rdi, r12
mov rsi, r12
lea rdx, [rbp+var_180]
mov rcx, rbx
call _sub_mod_384x384
mov rdi, r14
mov rsi, r14
lea rdx, [rbp+var_120]
mov rcx, rbx
call _sub_mod_384x384
mov rdi, r12
mov rsi, r12
lea rdx, [rbp+var_240]
mov rcx, rbx
call add_mod_384x384
mov rdi, r14
mov rsi, r14
lea rdx, [rbp+var_1E0]
mov rcx, rbx
call add_mod_384x384
add rsp, 338h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mul_fp6x2(long long a1, long long a2, long long a3)
{
long long v5; // r13
long long v6; // r12
long long v7; // r14
_BYTE v9[96]; // [rsp+0h] [rbp-360h] BYREF
_BYTE v10[96]; // [rsp+60h] [rbp-300h] BYREF
_BYTE v11[96]; // [rsp+C0h] [rbp-2A0h] BYREF
_BYTE v12[96]; // [rsp+120h] [rbp-240h] BYREF
_BYTE v13[96]; // [rsp+180h] [rbp-1E0h] BYREF
_BYTE v14[96]; // [rsp+1E0h] [rbp-180h] BYREF
_BYTE v15[96]; // [rsp+240h] [rbp-120h] BYREF
_BYTE v16[104]; // [rsp+2A0h] [rbp-C0h] BYREF
long long v17; // [rsp+308h] [rbp-58h]
long long v18; // [rsp+310h] [rbp-50h]
long long v19; // [rsp+318h] [rbp-48h]
long long v20; // [rsp+320h] [rbp-40h]
long long v21; // [rsp+328h] [rbp-38h]
long long v22; // [rsp+330h] [rbp-30h]
mul_382x(v10, a2, a3, &BLS12_381_P);
v22 = a2 + 96;
v20 = a2;
v21 = a3 + 96;
v19 = a3;
mul_382x(v12, a2 + 96, a3 + 96, &BLS12_381_P);
v17 = a2 + 192;
v18 = a3 + 192;
mul_382x(v14, a2 + 192, a3 + 192, &BLS12_381_P);
add_mod_384x(v16, v22, a2 + 192, &BLS12_381_P);
add_mod_384x(v9, v21, a3 + 192, &BLS12_381_P);
mul_382x(a1, v16, v9, &BLS12_381_P);
sub_mod_384x384(a1, a1, v12, &BLS12_381_P);
sub_mod_384x384(a1 + 96, a1 + 96, v13, &BLS12_381_P);
sub_mod_384x384(a1, a1, v14, &BLS12_381_P);
sub_mod_384x384(a1 + 96, a1 + 96, v15, &BLS12_381_P);
v5 = a1 + 192;
sub_mod_384x384(a1 + 192, a1, a1 + 96, &BLS12_381_P);
add_mod_384x384(a1 + 288, a1, a1 + 96, &BLS12_381_P);
add_mod_384x384(a1, a1 + 192, v10, &BLS12_381_P);
add_mod_384x384(a1 + 96, a1 + 288, v11, &BLS12_381_P);
add_mod_384x(v16, v20, v22, &BLS12_381_P);
add_mod_384x(v9, v19, v21, &BLS12_381_P);
mul_382x(a1 + 192, v16, v9, &BLS12_381_P);
sub_mod_384x384(v5, v5, v10, &BLS12_381_P);
sub_mod_384x384(a1 + 288, a1 + 288, v11, &BLS12_381_P);
sub_mod_384x384(v5, v5, v12, &BLS12_381_P);
sub_mod_384x384(a1 + 288, a1 + 288, v13, &BLS12_381_P);
v6 = a1 + 384;
sub_mod_384x384(a1 + 384, v14, v15, &BLS12_381_P);
v7 = a1 + 480;
add_mod_384x384(a1 + 480, v14, v15, &BLS12_381_P);
add_mod_384x384(v5, v5, a1 + 384, &BLS12_381_P);
add_mod_384x384(a1 + 288, a1 + 288, a1 + 480, &BLS12_381_P);
add_mod_384x(v16, v20, v17, &BLS12_381_P);
add_mod_384x(v9, v19, v18, &BLS12_381_P);
mul_382x(a1 + 384, v16, v9, &BLS12_381_P);
sub_mod_384x384(v6, v6, v10, &BLS12_381_P);
sub_mod_384x384(v7, v7, v11, &BLS12_381_P);
sub_mod_384x384(v6, v6, v14, &BLS12_381_P);
sub_mod_384x384(v7, v7, v15, &BLS12_381_P);
add_mod_384x384(v6, v6, v12, &BLS12_381_P);
return add_mod_384x384(v7, v7, v13, &BLS12_381_P);
}
| mul_fp6x2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x338
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
LEA R13,[0x13fb20]
LEA RDI,[RBP + -0x300]
MOV RCX,R13
CALL 0x00133b60
LEA RSI,[R12 + 0x60]
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x40],R12
LEA RDX,[R15 + 0x60]
MOV qword ptr [RBP + -0x38],RDX
MOV qword ptr [RBP + -0x48],R15
LEA RDI,[RBP + -0x240]
MOV RCX,R13
CALL 0x00133b60
MOV R13D,0xc0
LEA RSI,[R12 + R13*0x1]
LEA R12,[R15 + R13*0x1]
LEA RDI,[RBP + -0x180]
MOV R15,RSI
MOV qword ptr [RBP + -0x58],RSI
MOV RDX,R12
MOV qword ptr [RBP + -0x50],R12
LEA RBX,[0x13fb20]
MOV RCX,RBX
CALL 0x00133b60
LEA RDI,[RBP + -0xc0]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,R15
MOV RCX,RBX
CALL 0x0012f460
LEA R15,[RBP + -0x360]
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R12
MOV RCX,RBX
CALL 0x0012f460
MOV RDI,R14
LEA RSI,[RBP + -0xc0]
MOV RDX,R15
MOV RCX,RBX
CALL 0x00133b60
MOV RDI,R14
MOV RSI,R14
LEA RDX,[RBP + -0x240]
MOV RCX,RBX
CALL 0x00130840
LEA R12,[R14 + 0x60]
LEA RDX,[RBP + -0x1e0]
MOV RDI,R12
MOV RSI,R12
MOV RCX,RBX
CALL 0x00130840
MOV RDI,R14
MOV RSI,R14
LEA RDX,[RBP + -0x180]
MOV RCX,RBX
CALL 0x00130840
LEA RDX,[RBP + -0x120]
MOV RDI,R12
MOV RSI,R12
MOV RCX,RBX
CALL 0x00130840
ADD R13,R14
MOV RDI,R13
MOV RSI,R14
MOV RDX,R12
MOV RCX,RBX
CALL 0x00130840
LEA R15,[R14 + 0x120]
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
MOV RCX,RBX
CALL 0x00130720
MOV RDI,R14
MOV RSI,R13
LEA RDX,[RBP + -0x300]
MOV RCX,RBX
CALL 0x00130720
LEA RDX,[RBP + -0x2a0]
MOV RDI,R12
MOV RSI,R15
MOV RCX,RBX
CALL 0x00130720
LEA RDI,[RBP + -0xc0]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,RBX
CALL 0x0012f460
LEA R12,[RBP + -0x360]
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,RBX
CALL 0x0012f460
MOV RDI,R13
LEA RSI,[RBP + -0xc0]
MOV RDX,R12
MOV RCX,RBX
CALL 0x00133b60
MOV RDI,R13
MOV RSI,R13
LEA RDX,[RBP + -0x300]
MOV RCX,RBX
CALL 0x00130840
MOV RDI,R15
MOV RSI,R15
LEA RDX,[RBP + -0x2a0]
MOV RCX,RBX
CALL 0x00130840
MOV RDI,R13
MOV RSI,R13
LEA RDX,[RBP + -0x240]
MOV RCX,RBX
CALL 0x00130840
MOV RDI,R15
MOV RSI,R15
LEA RDX,[RBP + -0x1e0]
MOV RCX,RBX
CALL 0x00130840
LEA R12,[R14 + 0x180]
MOV RDI,R12
LEA RSI,[RBP + -0x180]
LEA RDX,[RBP + -0x120]
MOV RCX,RBX
CALL 0x00130840
ADD R14,0x1e0
MOV RDI,R14
LEA RSI,[RBP + -0x180]
LEA RDX,[RBP + -0x120]
MOV RCX,RBX
CALL 0x00130720
MOV RDI,R13
MOV RSI,R13
MOV RDX,R12
MOV RCX,RBX
CALL 0x00130720
MOV RDI,R15
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
CALL 0x00130720
LEA R13,[RBP + -0xc0]
MOV RDI,R13
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x58]
MOV RCX,RBX
CALL 0x0012f460
LEA R15,[RBP + -0x360]
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x50]
MOV RCX,RBX
CALL 0x0012f460
MOV RDI,R12
MOV RSI,R13
MOV RDX,R15
MOV RCX,RBX
CALL 0x00133b60
MOV RDI,R12
MOV RSI,R12
LEA RDX,[RBP + -0x300]
MOV RCX,RBX
CALL 0x00130840
MOV RDI,R14
MOV RSI,R14
LEA RDX,[RBP + -0x2a0]
MOV RCX,RBX
CALL 0x00130840
MOV RDI,R12
MOV RSI,R12
LEA RDX,[RBP + -0x180]
MOV RCX,RBX
CALL 0x00130840
MOV RDI,R14
MOV RSI,R14
LEA RDX,[RBP + -0x120]
MOV RCX,RBX
CALL 0x00130840
MOV RDI,R12
MOV RSI,R12
LEA RDX,[RBP + -0x240]
MOV RCX,RBX
CALL 0x00130720
MOV RDI,R14
MOV RSI,R14
LEA RDX,[RBP + -0x1e0]
MOV RCX,RBX
CALL 0x00130720
ADD RSP,0x338
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void mul_fp6x2(long param_1,long param_2,long param_3)
{
long lVar1;
long lVar2;
long lVar3;
int1 local_368 [96];
int1 local_308 [96];
int1 local_2a8 [96];
int1 local_248 [96];
int1 local_1e8 [96];
int1 local_188 [96];
int1 local_128 [96];
int1 local_c8 [104];
long local_60;
long local_58;
long local_50;
long local_48;
long local_40;
long local_38;
mul_382x(local_308,param_2,param_3,BLS12_381_P);
local_38 = param_2 + 0x60;
local_40 = param_3 + 0x60;
local_50 = param_3;
local_48 = param_2;
mul_382x(local_248,local_38,local_40,BLS12_381_P);
param_2 = param_2 + 0xc0;
param_3 = param_3 + 0xc0;
local_60 = param_2;
local_58 = param_3;
mul_382x(local_188,param_2,param_3,BLS12_381_P);
add_mod_384x(local_c8,local_38,param_2,BLS12_381_P);
add_mod_384x(local_368,local_40,param_3,BLS12_381_P);
mul_382x(param_1,local_c8,local_368,BLS12_381_P);
sub_mod_384x384(param_1,param_1,local_248,BLS12_381_P);
lVar1 = param_1 + 0x60;
sub_mod_384x384(lVar1,lVar1,local_1e8,BLS12_381_P);
sub_mod_384x384(param_1,param_1,local_188,BLS12_381_P);
sub_mod_384x384(lVar1,lVar1,local_128,BLS12_381_P);
lVar3 = param_1 + 0xc0;
sub_mod_384x384(lVar3,param_1,lVar1,BLS12_381_P);
lVar2 = param_1 + 0x120;
add_mod_384x384(lVar2,param_1,lVar1,BLS12_381_P);
add_mod_384x384(param_1,lVar3,local_308,BLS12_381_P);
add_mod_384x384(lVar1,lVar2,local_2a8,BLS12_381_P);
add_mod_384x(local_c8,local_48,local_38,BLS12_381_P);
add_mod_384x(local_368,local_50,local_40,BLS12_381_P);
mul_382x(lVar3,local_c8,local_368,BLS12_381_P);
sub_mod_384x384(lVar3,lVar3,local_308,BLS12_381_P);
sub_mod_384x384(lVar2,lVar2,local_2a8,BLS12_381_P);
sub_mod_384x384(lVar3,lVar3,local_248,BLS12_381_P);
sub_mod_384x384(lVar2,lVar2,local_1e8,BLS12_381_P);
lVar1 = param_1 + 0x180;
sub_mod_384x384(lVar1,local_188,local_128,BLS12_381_P);
param_1 = param_1 + 0x1e0;
add_mod_384x384(param_1,local_188,local_128,BLS12_381_P);
add_mod_384x384(lVar3,lVar3,lVar1,BLS12_381_P);
add_mod_384x384(lVar2,lVar2,param_1,BLS12_381_P);
add_mod_384x(local_c8,local_48,local_60,BLS12_381_P);
add_mod_384x(local_368,local_50,local_58,BLS12_381_P);
mul_382x(lVar1,local_c8,local_368,BLS12_381_P);
sub_mod_384x384(lVar1,lVar1,local_308,BLS12_381_P);
sub_mod_384x384(param_1,param_1,local_2a8,BLS12_381_P);
sub_mod_384x384(lVar1,lVar1,local_188,BLS12_381_P);
sub_mod_384x384(param_1,param_1,local_128,BLS12_381_P);
add_mod_384x384(lVar1,lVar1,local_248,BLS12_381_P);
add_mod_384x384(param_1,param_1,local_1e8,BLS12_381_P);
return;
}
|
|
5,605 | ma_ft_parse | eloqsql/storage/maria/ma_ft_update.c | uint _ma_ft_parse(TREE *parsed, MARIA_HA *info, uint keynr, const uchar *record,
MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root)
{
FT_SEG_ITERATOR ftsi;
struct st_mysql_ftparser *parser;
DBUG_ENTER("_ma_ft_parse");
_ma_ft_segiterator_init(info, keynr, record, &ftsi);
maria_ft_parse_init(parsed, info->s->keyinfo[keynr].seg->charset);
parser= info->s->keyinfo[keynr].parser;
while (_ma_ft_segiterator(&ftsi))
{
/** @todo this casts ftsi.pos (const) to non-const */
if (ftsi.pos)
if (maria_ft_parse(parsed, (uchar *)ftsi.pos, ftsi.len, parser, param,
mem_root))
DBUG_RETURN(1);
}
DBUG_RETURN(0);
} | O3 | c | ma_ft_parse:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rsi, -0x30(%rbp)
movq %rdi, %r15
movq (%rsi), %rax
movq 0x570(%rax), %rax
movl %edx, %edx
imulq $0x118, %rdx, %r13 # imm = 0x118
movzwl 0xa0(%rax,%r13), %edx
leaq -0x50(%rbp), %r12
movl %edx, (%r12)
movq 0xc0(%rax,%r13), %rax
movq %rax, 0x8(%r12)
movq %rcx, 0x10(%r12)
movq $0x0, 0x18(%r12)
movl $0x0, 0x4(%r12)
movq (%rax), %rsi
callq 0x5ea22
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movq 0xd0(%rax,%r13), %r13
movq %r12, %rdi
callq 0x5ee0b
xorl %ecx, %ecx
testl %eax, %eax
je 0x5ef8b
movq -0x38(%rbp), %rsi
testq %rsi, %rsi
je 0x5ef76
movl -0x4c(%rbp), %edx
movq %r15, %rdi
movq %r13, %rcx
movq %r14, %r8
movq %rbx, %r9
callq 0x5ea72
testl %eax, %eax
jne 0x5ef86
movq %r12, %rdi
callq 0x5ee0b
testl %eax, %eax
jne 0x5ef55
xorl %ecx, %ecx
jmp 0x5ef8b
movl $0x1, %ecx
movl %ecx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_ft_parse:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, r9
mov r14, r8
mov [rbp+var_30], rsi
mov r15, rdi
mov rax, [rsi]
mov rax, [rax+570h]
mov edx, edx
imul r13, rdx, 118h
movzx edx, word ptr [rax+r13+0A0h]
lea r12, [rbp+var_50]
mov [r12], edx
mov rax, [rax+r13+0C0h]
mov [r12+8], rax
mov [r12+10h], rcx
mov qword ptr [r12+18h], 0
mov dword ptr [r12+4], 0
mov rsi, [rax]
call maria_ft_parse_init
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax+570h]
mov r13, [rax+r13+0D0h]
mov rdi, r12
call _ma_ft_segiterator
xor ecx, ecx
test eax, eax
jz short loc_5EF8B
loc_5EF55:
mov rsi, [rbp+var_38]
test rsi, rsi
jz short loc_5EF76
mov edx, [rbp+var_4C]
mov rdi, r15
mov rcx, r13
mov r8, r14
mov r9, rbx
call maria_ft_parse
test eax, eax
jnz short loc_5EF86
loc_5EF76:
mov rdi, r12
call _ma_ft_segiterator
test eax, eax
jnz short loc_5EF55
xor ecx, ecx
jmp short loc_5EF8B
loc_5EF86:
mov ecx, 1
loc_5EF8B:
mov eax, ecx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_ft_parse(_QWORD *a1, long long a2, unsigned int a3, long long a4, long long a5, long long a6)
{
long long v8; // rax
long long v9; // r13
long long v10; // r13
int v11; // eax
unsigned int v12; // ecx
int v14; // [rsp+0h] [rbp-50h] BYREF
int v15; // [rsp+4h] [rbp-4Ch]
long long *v16; // [rsp+8h] [rbp-48h]
long long v17; // [rsp+10h] [rbp-40h]
long long v18; // [rsp+18h] [rbp-38h]
long long v19; // [rsp+20h] [rbp-30h]
v19 = a2;
v8 = *(_QWORD *)(*(_QWORD *)a2 + 1392LL);
v9 = 280LL * a3;
v14 = *(unsigned __int16 *)(v8 + v9 + 160);
v16 = *(long long **)(v8 + v9 + 192);
v17 = a4;
v18 = 0LL;
v15 = 0;
maria_ft_parse_init(a1, *v16);
v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a2 + 1392LL) + v9 + 208);
v11 = ma_ft_segiterator((long long)&v14);
v12 = 0;
if ( v11 )
{
while ( !v18 || !(unsigned int)maria_ft_parse((long long)a1, v18, v15, v10, a5, a6) )
{
if ( !(unsigned int)ma_ft_segiterator((long long)&v14) )
return 0;
}
return 1;
}
return v12;
}
| _ma_ft_parse:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,R9
MOV R14,R8
MOV qword ptr [RBP + -0x30],RSI
MOV R15,RDI
MOV RAX,qword ptr [RSI]
MOV RAX,qword ptr [RAX + 0x570]
MOV EDX,EDX
IMUL R13,RDX,0x118
MOVZX EDX,word ptr [RAX + R13*0x1 + 0xa0]
LEA R12,[RBP + -0x50]
MOV dword ptr [R12],EDX
MOV RAX,qword ptr [RAX + R13*0x1 + 0xc0]
MOV qword ptr [R12 + 0x8],RAX
MOV qword ptr [R12 + 0x10],RCX
MOV qword ptr [R12 + 0x18],0x0
MOV dword ptr [R12 + 0x4],0x0
MOV RSI,qword ptr [RAX]
CALL 0x0015ea22
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV R13,qword ptr [RAX + R13*0x1 + 0xd0]
MOV RDI,R12
CALL 0x0015ee0b
XOR ECX,ECX
TEST EAX,EAX
JZ 0x0015ef8b
LAB_0015ef55:
MOV RSI,qword ptr [RBP + -0x38]
TEST RSI,RSI
JZ 0x0015ef76
MOV EDX,dword ptr [RBP + -0x4c]
MOV RDI,R15
MOV RCX,R13
MOV R8,R14
MOV R9,RBX
CALL 0x0015ea72
TEST EAX,EAX
JNZ 0x0015ef86
LAB_0015ef76:
MOV RDI,R12
CALL 0x0015ee0b
TEST EAX,EAX
JNZ 0x0015ef55
XOR ECX,ECX
JMP 0x0015ef8b
LAB_0015ef86:
MOV ECX,0x1
LAB_0015ef8b:
MOV EAX,ECX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_ma_ft_parse(int8 param_1,long *param_2,uint param_3,int8 param_4,int8 param_5,
int8 param_6)
{
int8 uVar1;
int iVar2;
long lVar3;
uint local_58;
int4 local_54;
int8 *local_50;
int8 local_48;
long local_40;
long *local_38;
lVar3 = (ulong)param_3 * 0x118;
local_58 = (uint)*(ushort *)(*(long *)(*param_2 + 0x570) + 0xa0 + lVar3);
local_50 = *(int8 **)(*(long *)(*param_2 + 0x570) + 0xc0 + lVar3);
local_40 = 0;
local_54 = 0;
local_48 = param_4;
local_38 = param_2;
maria_ft_parse_init(param_1,*local_50);
uVar1 = *(int8 *)(*(long *)(*local_38 + 0x570) + 0xd0 + lVar3);
iVar2 = _ma_ft_segiterator(&local_58);
while( true ) {
if (iVar2 == 0) {
return 0;
}
if ((local_40 != 0) &&
(iVar2 = maria_ft_parse(param_1,local_40,local_54,uVar1,param_5,param_6), iVar2 != 0)) break;
iVar2 = _ma_ft_segiterator(&local_58);
}
return 1;
}
|
|
5,606 | void ggml::cpu::aarch64::gemv<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void const*, int, int) | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp | void gemv<block_iq4_nl, 4, 4>(int n, float * s, size_t bs, const void * vx, const void * vy, int nr, int nc) {
ggml_gemv_iq4_nl_4x4_q8_0(n, s, bs, vx, vy, nr, nc);
} | O2 | cpp | void ggml::cpu::aarch64::gemv<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void const*, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
pushq $0x20
popq %r9
movl %edi, %eax
cltd
idivl %r9d
movq %rcx, (%rsp)
movq %r8, 0x8(%rsp)
testb $0x1f, %dil
jne 0x28316
movl 0xb0(%rsp), %ecx
testb $0x3, %cl
jne 0x28335
movl %ecx, %edx
sarl $0x2, %edx
movl %eax, %edi
sarl $0x1f, %edi
andnl %eax, %edi, %edi
movq %rdi, 0x68(%rsp)
movslq %eax, %rdi
sarl $0x1f, %ecx
andnl %edx, %ecx, %eax
movq %rax, 0x40(%rsp)
movq 0x8(%rsp), %rax
addq $0x12, %rax
movq %rax, 0x30(%rsp)
movq (%rsp), %rax
leaq 0x8(%rax), %r10
movq %rdi, 0x38(%rsp)
imulq $0x48, %rdi, %rax
movq %rax, 0x28(%rsp)
xorl %edx, %edx
movq 0x1ddbf(%rip), %r14 # 0x45f68
leaq 0xe530(%rip), %r15 # 0x366e0
cmpq 0x40(%rsp), %rdx
je 0x28307
xorl %eax, %eax
cmpq $0x4, %rax
je 0x281cd
andl $0x0, 0x10(%rsp,%rax,4)
incq %rax
jmp 0x281bd
movq %rsi, 0x58(%rsp)
movq %rdx, 0x48(%rsp)
movq %rdx, %rax
imulq 0x38(%rsp), %rax
imulq $0x48, %rax, %rax
addq (%rsp), %rax
movq %rax, 0x60(%rsp)
movq %r10, 0x50(%rsp)
movq 0x30(%rsp), %r9
xorl %eax, %eax
cmpq 0x68(%rsp), %rax
je 0x282cf
imulq $0x48, %rax, %rcx
addq 0x60(%rsp), %rcx
imulq $0x22, %rax, %rdx
movq 0x8(%rsp), %rsi
movzwl (%rsi,%rdx), %edx
vmovss (%r14,%rdx,4), %xmm0
movq %r10, 0x70(%rsp)
movq %r9, %rbp
xorl %edi, %edi
cmpq $0x4, %rdi
je 0x282ba
movq %r10, %r13
xorl %ebx, %ebx
cmpq $0x4, %rbx
je 0x282aa
xorl %edx, %edx
xorl %r11d, %r11d
cmpq $0x4, %rdx
je 0x28285
movzbl (%r13,%rdx), %r12d
movl %r12d, %esi
andl $0xf, %esi
movsbl (%rsi,%r15), %esi
shrl $0x4, %r12d
movsbl (%r12,%r15), %r12d
movsbl -0x10(%rbp,%rdx), %r8d
imull %esi, %r8d
movsbl (%rbp,%rdx), %esi
imull %r12d, %esi
addl %r11d, %r8d
addl %esi, %r8d
incq %rdx
movl %r8d, %r11d
jmp 0x28244
vcvtsi2ss %r11d, %xmm2, %xmm1
movzwl (%rcx,%rbx,2), %edx
vmulss (%r14,%rdx,4), %xmm1, %xmm1
vfmadd213ss 0x10(%rsp,%rbx,4), %xmm0, %xmm1 # xmm1 = (xmm0 * xmm1) + mem
vmovss %xmm1, 0x10(%rsp,%rbx,4)
incq %rbx
addq $0x4, %r13
jmp 0x28239
incq %rdi
addq $0x4, %rbp
addq $0x10, %r10
jmp 0x2822a
incq %rax
addq $0x22, %r9
movq 0x70(%rsp), %r10
addq $0x48, %r10
jmp 0x281f9
xorl %eax, %eax
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %r10
movq 0x48(%rsp), %rdx
cmpq $0x4, %rax
je 0x282f6
vmovss 0x10(%rsp,%rax,4), %xmm0
vmovss %xmm0, (%rsi,%rax,4)
incq %rax
jmp 0x282e0
incq %rdx
addq 0x28(%rsp), %r10
addq $0x10, %rsi
jmp 0x281b0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe62b(%rip), %rdi # 0x36948
leaq 0xe4f2(%rip), %rsi # 0x36816
leaq 0xe7aa(%rip), %rcx # 0x36ad5
movl $0x3eb, %edx # imm = 0x3EB
callq 0x8460
leaq 0xe68f(%rip), %rdi # 0x369cb
leaq 0xe4d3(%rip), %rsi # 0x36816
leaq 0xe78b(%rip), %rcx # 0x36ad5
movl $0x3ec, %edx # imm = 0x3EC
callq 0x8460
| _ZN4ggml3cpu7aarch644gemvI12block_iq4_nlLl4ELl4EEEviPfmPKvS6_ii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
push 20h ; ' '
pop r9
mov eax, edi
cdq
idiv r9d
mov [rsp+0A8h+var_A8], rcx
mov [rsp+0A8h+var_A0], r8
test dil, 1Fh
jnz loc_28316
mov ecx, [rsp+0A8h+arg_0]
test cl, 3
jnz loc_28335
mov edx, ecx
sar edx, 2
mov edi, eax
sar edi, 1Fh
andn edi, edi, eax
mov [rsp+0A8h+var_40], rdi
movsxd rdi, eax
sar ecx, 1Fh
andn eax, ecx, edx
mov [rsp+0A8h+var_68], rax
mov rax, [rsp+0A8h+var_A0]
add rax, 12h
mov [rsp+0A8h+var_78], rax
mov rax, [rsp+0A8h+var_A8]
lea r10, [rax+8]
mov [rsp+0A8h+var_70], rdi
imul rax, rdi, 48h ; 'H'
mov [rsp+0A8h+var_80], rax
xor edx, edx
mov r14, cs:ggml_table_f32_f16_ptr
lea r15, kvalues_iq4nl
loc_281B0:
cmp rdx, [rsp+0A8h+var_68]
jz loc_28307
xor eax, eax
loc_281BD:
cmp rax, 4
jz short loc_281CD
and [rsp+rax*4+0A8h+var_98], 0
inc rax
jmp short loc_281BD
loc_281CD:
mov [rsp+0A8h+var_50], rsi
mov [rsp+0A8h+var_60], rdx
mov rax, rdx
imul rax, [rsp+0A8h+var_70]
imul rax, 48h ; 'H'
add rax, [rsp+0A8h+var_A8]
mov [rsp+0A8h+var_48], rax
mov [rsp+0A8h+var_58], r10
mov r9, [rsp+0A8h+var_78]
xor eax, eax
loc_281F9:
cmp rax, [rsp+0A8h+var_40]
jz loc_282CF
imul rcx, rax, 48h ; 'H'
add rcx, [rsp+0A8h+var_48]
imul rdx, rax, 22h ; '"'
mov rsi, [rsp+0A8h+var_A0]
movzx edx, word ptr [rsi+rdx]
vmovss xmm0, dword ptr [r14+rdx*4]
mov [rsp+0A8h+var_38], r10
mov rbp, r9
xor edi, edi
loc_2822A:
cmp rdi, 4
jz loc_282BA
mov r13, r10
xor ebx, ebx
loc_28239:
cmp rbx, 4
jz short loc_282AA
xor edx, edx
xor r11d, r11d
loc_28244:
cmp rdx, 4
jz short loc_28285
movzx r12d, byte ptr [r13+rdx+0]
mov esi, r12d
and esi, 0Fh
movsx esi, byte ptr [rsi+r15]
shr r12d, 4
movsx r12d, byte ptr [r12+r15]
movsx r8d, byte ptr [rbp+rdx-10h]
imul r8d, esi
movsx esi, byte ptr [rbp+rdx+0]
imul esi, r12d
add r8d, r11d
add r8d, esi
inc rdx
mov r11d, r8d
jmp short loc_28244
loc_28285:
vcvtsi2ss xmm1, xmm2, r11d
movzx edx, word ptr [rcx+rbx*2]
vmulss xmm1, xmm1, dword ptr [r14+rdx*4]
vfmadd213ss xmm1, xmm0, [rsp+rbx*4+0A8h+var_98]
vmovss [rsp+rbx*4+0A8h+var_98], xmm1
inc rbx
add r13, 4
jmp short loc_28239
loc_282AA:
inc rdi
add rbp, 4
add r10, 10h
jmp loc_2822A
loc_282BA:
inc rax
add r9, 22h ; '"'
mov r10, [rsp+0A8h+var_38]
add r10, 48h ; 'H'
jmp loc_281F9
loc_282CF:
xor eax, eax
mov rsi, [rsp+0A8h+var_50]
mov r10, [rsp+0A8h+var_58]
mov rdx, [rsp+0A8h+var_60]
loc_282E0:
cmp rax, 4
jz short loc_282F6
vmovss xmm0, [rsp+rax*4+0A8h+var_98]
vmovss dword ptr [rsi+rax*4], xmm0
inc rax
jmp short loc_282E0
loc_282F6:
inc rdx
add r10, [rsp+0A8h+var_80]
add rsi, 10h
jmp loc_281B0
loc_28307:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_28316:
lea rdi, aNQk0; "n % qk == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemvIq; "void ggml_gemv_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 3EBh
call ___assert_fail
loc_28335:
lea rdi, aNcNcolsInterle; "nc % ncols_interleaved == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemvIq; "void ggml_gemv_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 3ECh
call ___assert_fail
| long long ggml::cpu::aarch64::gemv<block_iq4_nl,4l,4l>(
int a1,
long long a2,
double a3,
double a4,
__m128 _XMM2,
long long a6,
long long a7,
long long a8,
long long a9,
int a10)
{
int v10; // eax
long long v11; // r10
long long result; // rax
long long v13; // rdx
long long i; // rax
long long v16; // r9
long long j; // rax
long long v20; // rbp
long long k; // rdi
long long v22; // r13
long long v24; // rdx
int v25; // r11d
int v26; // esi
int v27; // r8d
long long v32; // r10
long long v33; // rdx
_DWORD v36[6]; // [rsp+10h] [rbp-98h] BYREF
long long v37; // [rsp+28h] [rbp-80h]
long long v38; // [rsp+30h] [rbp-78h]
long long v39; // [rsp+38h] [rbp-70h]
long long v40; // [rsp+40h] [rbp-68h]
long long v41; // [rsp+48h] [rbp-60h]
long long v42; // [rsp+50h] [rbp-58h]
long long v43; // [rsp+58h] [rbp-50h]
long long v44; // [rsp+60h] [rbp-48h]
long long v45; // [rsp+68h] [rbp-40h]
long long v46; // [rsp+70h] [rbp-38h]
v10 = a1 / 32;
if ( (a1 & 0x1F) != 0 )
__assert_fail(
"n % qk == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
1003LL,
"void ggml_gemv_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)");
if ( (a10 & 3) != 0 )
__assert_fail(
"nc % ncols_interleaved == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp");
v45 = v10 & (unsigned int)~(v10 >> 31);
v40 = (a10 >> 2) & (unsigned int)~(a10 >> 31);
v38 = a8 + 18;
v11 = a7 + 8;
v39 = v10;
result = 72LL * v10;
v37 = result;
v13 = 0LL;
_R14 = &ggml_table_f32_f16;
while ( v13 != v40 )
{
for ( i = 0LL; i != 4; ++i )
v36[i] = 0;
v43 = a2;
v41 = v13;
v44 = a7 + 72 * v39 * v13;
v42 = v11;
v16 = v38;
for ( j = 0LL; j != v45; ++j )
{
_RDX = *(unsigned __int16 *)(a8 + 34 * j);
__asm { vmovss xmm0, dword ptr [r14+rdx*4] }
v46 = v11;
v20 = v16;
for ( k = 0LL; k != 4; ++k )
{
v22 = v11;
for ( _RBX = 0LL; _RBX != 4; ++_RBX )
{
v24 = 0LL;
v25 = 0;
while ( v24 != 4 )
{
v26 = *((char *)&kvalues_iq4nl + (*(unsigned __int8 *)(v22 + v24) >> 4)) * *(char *)(v20 + v24);
v27 = v25 + *((char *)&kvalues_iq4nl + (*(_BYTE *)(v22 + v24) & 0xF)) * *(char *)(v20 + v24 - 16);
++v24;
v25 = v26 + v27;
}
__asm
{
vcvtsi2ss xmm1, xmm2, r11d
vmulss xmm1, xmm1, dword ptr [r14+rdx*4]
vfmadd213ss xmm1, xmm0, [rsp+rbx*4+0A8h+var_98]
vmovss [rsp+rbx*4+0A8h+var_98], xmm1
}
v22 += 4LL;
}
v20 += 4LL;
v11 += 16LL;
}
v16 += 34LL;
v11 = v46 + 72;
}
result = 0LL;
_RSI = v43;
v32 = v42;
v33 = v41;
while ( result != 4 )
{
__asm
{
vmovss xmm0, [rsp+rax*4+0A8h+var_98]
vmovss dword ptr [rsi+rax*4], xmm0
}
++result;
}
v13 = v33 + 1;
v11 = v37 + v32;
a2 = _RSI + 16;
}
return result;
}
| gemv<block_iq4_nl,4l,4l>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
PUSH 0x20
POP R9
MOV EAX,EDI
CDQ
IDIV R9D
MOV qword ptr [RSP],RCX
MOV qword ptr [RSP + 0x8],R8
TEST DIL,0x1f
JNZ 0x00128316
MOV ECX,dword ptr [RSP + 0xb0]
TEST CL,0x3
JNZ 0x00128335
MOV EDX,ECX
SAR EDX,0x2
MOV EDI,EAX
SAR EDI,0x1f
ANDN EDI,EDI,EAX
MOV qword ptr [RSP + 0x68],RDI
MOVSXD RDI,EAX
SAR ECX,0x1f
ANDN EAX,ECX,EDX
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x12
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP]
LEA R10,[RAX + 0x8]
MOV qword ptr [RSP + 0x38],RDI
IMUL RAX,RDI,0x48
MOV qword ptr [RSP + 0x28],RAX
XOR EDX,EDX
MOV R14,qword ptr [0x00145f68]
LEA R15,[0x1366e0]
LAB_001281b0:
CMP RDX,qword ptr [RSP + 0x40]
JZ 0x00128307
XOR EAX,EAX
LAB_001281bd:
CMP RAX,0x4
JZ 0x001281cd
AND dword ptr [RSP + RAX*0x4 + 0x10],0x0
INC RAX
JMP 0x001281bd
LAB_001281cd:
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x48],RDX
MOV RAX,RDX
IMUL RAX,qword ptr [RSP + 0x38]
IMUL RAX,RAX,0x48
ADD RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x50],R10
MOV R9,qword ptr [RSP + 0x30]
XOR EAX,EAX
LAB_001281f9:
CMP RAX,qword ptr [RSP + 0x68]
JZ 0x001282cf
IMUL RCX,RAX,0x48
ADD RCX,qword ptr [RSP + 0x60]
IMUL RDX,RAX,0x22
MOV RSI,qword ptr [RSP + 0x8]
MOVZX EDX,word ptr [RSI + RDX*0x1]
VMOVSS XMM0,dword ptr [R14 + RDX*0x4]
MOV qword ptr [RSP + 0x70],R10
MOV RBP,R9
XOR EDI,EDI
LAB_0012822a:
CMP RDI,0x4
JZ 0x001282ba
MOV R13,R10
XOR EBX,EBX
LAB_00128239:
CMP RBX,0x4
JZ 0x001282aa
XOR EDX,EDX
XOR R11D,R11D
LAB_00128244:
CMP RDX,0x4
JZ 0x00128285
MOVZX R12D,byte ptr [R13 + RDX*0x1]
MOV ESI,R12D
AND ESI,0xf
MOVSX ESI,byte ptr [RSI + R15*0x1]
SHR R12D,0x4
MOVSX R12D,byte ptr [R12 + R15*0x1]
MOVSX R8D,byte ptr [RBP + RDX*0x1 + -0x10]
IMUL R8D,ESI
MOVSX ESI,byte ptr [RBP + RDX*0x1]
IMUL ESI,R12D
ADD R8D,R11D
ADD R8D,ESI
INC RDX
MOV R11D,R8D
JMP 0x00128244
LAB_00128285:
VCVTSI2SS XMM1,XMM2,R11D
MOVZX EDX,word ptr [RCX + RBX*0x2]
VMULSS XMM1,XMM1,dword ptr [R14 + RDX*0x4]
VFMADD213SS XMM1,XMM0,dword ptr [RSP + RBX*0x4 + 0x10]
VMOVSS dword ptr [RSP + RBX*0x4 + 0x10],XMM1
INC RBX
ADD R13,0x4
JMP 0x00128239
LAB_001282aa:
INC RDI
ADD RBP,0x4
ADD R10,0x10
JMP 0x0012822a
LAB_001282ba:
INC RAX
ADD R9,0x22
MOV R10,qword ptr [RSP + 0x70]
ADD R10,0x48
JMP 0x001281f9
LAB_001282cf:
XOR EAX,EAX
MOV RSI,qword ptr [RSP + 0x58]
MOV R10,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x48]
LAB_001282e0:
CMP RAX,0x4
JZ 0x001282f6
VMOVSS XMM0,dword ptr [RSP + RAX*0x4 + 0x10]
VMOVSS dword ptr [RSI + RAX*0x4],XMM0
INC RAX
JMP 0x001282e0
LAB_001282f6:
INC RDX
ADD R10,qword ptr [RSP + 0x28]
ADD RSI,0x10
JMP 0x001281b0
LAB_00128307:
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00128316:
LEA RDI,[0x136948]
LEA RSI,[0x136816]
LEA RCX,[0x136ad5]
MOV EDX,0x3eb
CALL 0x00108460
LAB_00128335:
LEA RDI,[0x1369cb]
LEA RSI,[0x136816]
LEA RCX,[0x136ad5]
MOV EDX,0x3ec
CALL 0x00108460
|
/* void ggml::cpu::aarch64::gemv<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void
const*, int, int) */
void ggml::cpu::aarch64::gemv<block_iq4_nl,4l,4l>
(int param_1,float *param_2,ulong param_3,void *param_4,void *param_5,int param_6,
int param_7)
{
int1 auVar1 [16];
int *puVar2;
void *pvVar3;
uint uVar4;
long lVar5;
ulong uVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
int iVar11;
long lVar12;
long lVar13;
float afStack_98 [6];
long local_80;
long local_78;
long local_70;
ulong local_68;
ulong local_60;
long local_58;
float *local_50;
void *local_48;
ulong local_40;
long local_38;
puVar2 = PTR_ggml_table_f32_f16_00145f68;
uVar4 = param_1 / 0x20;
if ((param_1 & 0x1fU) != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("n % qk == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0x3eb,
"void ggml_gemv_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
if ((param_7 & 3U) == 0) {
local_40 = (ulong)(~((int)uVar4 >> 0x1f) & uVar4);
local_68 = (ulong)(uint)(~(param_7 >> 0x1f) & param_7 >> 2);
local_78 = (long)param_5 + 0x12;
lVar12 = (long)param_4 + 8;
local_70 = (long)(int)uVar4;
local_80 = (long)(int)uVar4 * 0x48;
uVar6 = 0;
while (uVar6 != local_68) {
for (lVar5 = 0; lVar5 != 4; lVar5 = lVar5 + 1) {
afStack_98[lVar5] = 0.0;
}
local_50 = param_2;
local_60 = uVar6;
local_48 = (void *)(uVar6 * local_70 * 0x48 + (long)param_4);
local_58 = lVar12;
lVar5 = local_78;
for (uVar6 = 0; pvVar3 = local_48, uVar6 != local_40; uVar6 = uVar6 + 1) {
uVar4 = *(uint *)(puVar2 + (ulong)*(ushort *)((long)param_5 + uVar6 * 0x22) * 4);
local_38 = lVar12;
lVar9 = lVar5;
for (lVar10 = 0; lVar10 != 4; lVar10 = lVar10 + 1) {
lVar13 = lVar12;
for (lVar8 = 0; lVar8 != 4; lVar8 = lVar8 + 1) {
iVar11 = 0;
for (lVar7 = 0; lVar7 != 4; lVar7 = lVar7 + 1) {
iVar11 = (int)*(char *)(lVar9 + -0x10 + lVar7) *
(int)(char)kvalues_iq4nl[*(byte *)(lVar13 + lVar7) & 0xf] + iVar11 +
(int)*(char *)(lVar9 + lVar7) *
(int)(char)kvalues_iq4nl[*(byte *)(lVar13 + lVar7) >> 4];
}
auVar1 = vfmadd213ss_fma(ZEXT416((uint)((float)iVar11 *
*(float *)(puVar2 + (ulong)*(ushort *)
((long)pvVar3 +
lVar8 * 2 +
uVar6 * 0x48) * 4))),
ZEXT416(uVar4),ZEXT416((uint)afStack_98[lVar8]));
afStack_98[lVar8] = auVar1._0_4_;
lVar13 = lVar13 + 4;
}
lVar9 = lVar9 + 4;
lVar12 = lVar12 + 0x10;
}
lVar5 = lVar5 + 0x22;
lVar12 = local_38 + 0x48;
}
for (lVar12 = 0; lVar12 != 4; lVar12 = lVar12 + 1) {
local_50[lVar12] = afStack_98[lVar12];
}
lVar12 = local_58 + local_80;
param_2 = local_50 + 4;
uVar6 = local_60 + 1;
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("nc % ncols_interleaved == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0x3ec,
"void ggml_gemv_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
|
|
5,607 | void ggml::cpu::aarch64::gemv<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void const*, int, int) | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp | void gemv<block_iq4_nl, 4, 4>(int n, float * s, size_t bs, const void * vx, const void * vy, int nr, int nc) {
ggml_gemv_iq4_nl_4x4_q8_0(n, s, bs, vx, vy, nr, nc);
} | O3 | cpp | void ggml::cpu::aarch64::gemv<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void const*, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, (%rsp)
movq %rsi, 0x38(%rsp)
leal 0x1f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movq %rdi, 0x30(%rsp)
testb $0x1f, %dil
jne 0x2acca
movl 0x80(%rsp), %edx
testb $0x3, %dl
jne 0x2ace9
sarl $0x2, %edx
testl %edx, %edx
jle 0x2acb8
sarl $0x5, %eax
movslq %eax, %rsi
movl %edx, %eax
movq %rax, 0x28(%rsp)
movl %esi, %edx
movq (%rsp), %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
shlq $0x3, %rsi
leaq (%rsi,%rsi,8), %rax
movq %rax, 0x20(%rsp)
xorl %ecx, %ecx
vxorps %xmm0, %xmm0, %xmm0
movq 0x1e444(%rip), %rbx # 0x48f68
vpbroadcastd 0xebc3(%rip), %xmm1 # 0x396f0
leaq 0xebfc(%rip), %r14 # 0x39730
movq %rcx, 0x40(%rsp)
vmovaps %xmm0, 0x10(%rsp)
cmpl $0x20, 0x30(%rsp)
jl 0x2ac81
movq (%rsp), %r15
movq 0x8(%rsp), %r9
xorl %r13d, %r13d
movq %r13, %rsi
shlq $0x5, %rsi
leaq (%rsi,%r13,2), %rbp
movzwl (%r8,%rbp), %esi
vmovss (%rbx,%rsi,4), %xmm2
addq %r8, %rbp
movq %r9, %r12
xorl %esi, %esi
vpmovsxbd 0x2(%rbp,%rsi,4), %xmm3
vpmovsxbd 0x12(%rbp,%rsi,4), %xmm4
xorl %r10d, %r10d
vpmovzxbd (%r12,%r10,4), %xmm5
vpand %xmm1, %xmm5, %xmm6
vpmovzxdq %xmm6, %ymm6 # ymm6 = xmm6[0],zero,xmm6[1],zero,xmm6[2],zero,xmm6[3],zero
vmovq %xmm6, %rdi
vpextrq $0x1, %xmm6, %rax
vextracti128 $0x1, %ymm6, %xmm6
vmovq %xmm6, %rcx
vpextrq $0x1, %xmm6, %r11
movzbl (%rdi,%r14), %edi
vmovd %edi, %xmm6
vpinsrb $0x1, (%rax,%r14), %xmm6, %xmm6
vpinsrb $0x2, (%rcx,%r14), %xmm6, %xmm6
vpinsrb $0x3, (%r11,%r14), %xmm6, %xmm6
vpmovsxbd %xmm6, %xmm6
vpmulld %xmm6, %xmm3, %xmm6
vpsrld $0x4, %xmm5, %xmm5
vpmovzxdq %xmm5, %ymm5 # ymm5 = xmm5[0],zero,xmm5[1],zero,xmm5[2],zero,xmm5[3],zero
vmovq %xmm5, %rax
vpextrq $0x1, %xmm5, %rcx
vextracti128 $0x1, %ymm5, %xmm5
vmovq %xmm5, %rdi
vpextrq $0x1, %xmm5, %r11
movzbl (%rax,%r14), %eax
vmovd %eax, %xmm5
vpinsrb $0x1, (%rcx,%r14), %xmm5, %xmm5
vpinsrb $0x2, (%rdi,%r14), %xmm5, %xmm5
vpinsrb $0x3, (%r11,%r14), %xmm5, %xmm5
vpmovsxbd %xmm5, %xmm5
vpmulld %xmm5, %xmm4, %xmm5
vpaddd %xmm5, %xmm6, %xmm5
vphaddd %xmm5, %xmm5, %xmm5
vphaddd %xmm5, %xmm5, %xmm5
vcvtdq2ps %xmm5, %xmm5
movzwl (%r15,%r10,2), %eax
vmulss (%rbx,%rax,4), %xmm5, %xmm5
vfmadd213ss 0x10(%rsp,%r10,4), %xmm2, %xmm5 # xmm5 = (xmm2 * xmm5) + mem
vmovss %xmm5, 0x10(%rsp,%r10,4)
incq %r10
cmpq $0x4, %r10
jne 0x2ab84
incq %rsi
addq $0x10, %r12
cmpq $0x4, %rsi
jne 0x2ab73
incq %r13
addq $0x48, %r9
addq $0x48, %r15
cmpq %rdx, %r13
jne 0x2ab56
movq 0x40(%rsp), %rcx
movq %rcx, %rsi
shlq $0x4, %rsi
addq 0x38(%rsp), %rsi
vmovaps 0x10(%rsp), %xmm2
vmovups %xmm2, (%rsi)
incq %rcx
movq 0x20(%rsp), %rax
addq %rax, 0x8(%rsp)
addq %rax, (%rsp)
cmpq 0x28(%rsp), %rcx
jne 0x2ab34
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
leaq 0xed71(%rip), %rdi # 0x39a42
leaq 0xec38(%rip), %rsi # 0x39910
leaq 0xeef0(%rip), %rcx # 0x39bcf
movl $0x3eb, %edx # imm = 0x3EB
callq 0x83b0
leaq 0xedd5(%rip), %rdi # 0x39ac5
leaq 0xec19(%rip), %rsi # 0x39910
leaq 0xeed1(%rip), %rcx # 0x39bcf
movl $0x3ec, %edx # imm = 0x3EC
callq 0x83b0
| _ZN4ggml3cpu7aarch644gemvI12block_iq4_nlLl4ELl4EEEviPfmPKvS6_ii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_78], rcx
mov [rsp+78h+var_40], rsi
lea eax, [rdi+1Fh]
test edi, edi
cmovns eax, edi
mov [rsp+78h+var_48], rdi
test dil, 1Fh
jnz loc_2ACCA
mov edx, [rsp+78h+arg_0]
test dl, 3
jnz loc_2ACE9
sar edx, 2
test edx, edx
jle loc_2ACB8
sar eax, 5
movsxd rsi, eax
mov eax, edx
mov [rsp+78h+var_50], rax
mov edx, esi
mov rax, [rsp+78h+var_78]
add rax, 8
mov [rsp+78h+var_70], rax
shl rsi, 3
lea rax, [rsi+rsi*8]
mov [rsp+78h+var_58], rax
xor ecx, ecx
vxorps xmm0, xmm0, xmm0
mov rbx, cs:ggml_table_f32_f16_ptr
vpbroadcastd xmm1, cs:dword_396F0
lea r14, kvalues_iq4nl
loc_2AB34:
mov [rsp+78h+var_38], rcx
vmovaps [rsp+78h+var_68], xmm0
cmp dword ptr [rsp+78h+var_48], 20h ; ' '
jl loc_2AC81
mov r15, [rsp+78h+var_78]
mov r9, [rsp+78h+var_70]
xor r13d, r13d
loc_2AB56:
mov rsi, r13
shl rsi, 5
lea rbp, [rsi+r13*2]
movzx esi, word ptr [r8+rbp]
vmovss xmm2, dword ptr [rbx+rsi*4]
add rbp, r8
mov r12, r9
xor esi, esi
loc_2AB73:
vpmovsxbd xmm3, dword ptr [rbp+rsi*4+2]
vpmovsxbd xmm4, dword ptr [rbp+rsi*4+12h]
xor r10d, r10d
loc_2AB84:
vpmovzxbd xmm5, dword ptr [r12+r10*4]
vpand xmm6, xmm5, xmm1
vpmovzxdq ymm6, xmm6
vmovq rdi, xmm6
vpextrq rax, xmm6, 1
vextracti128 xmm6, ymm6, 1
vmovq rcx, xmm6
vpextrq r11, xmm6, 1
movzx edi, byte ptr [rdi+r14]
vmovd xmm6, edi
vpinsrb xmm6, xmm6, byte ptr [rax+r14], 1
vpinsrb xmm6, xmm6, byte ptr [rcx+r14], 2
vpinsrb xmm6, xmm6, byte ptr [r11+r14], 3
vpmovsxbd xmm6, xmm6
vpmulld xmm6, xmm3, xmm6
vpsrld xmm5, xmm5, 4
vpmovzxdq ymm5, xmm5
vmovq rax, xmm5
vpextrq rcx, xmm5, 1
vextracti128 xmm5, ymm5, 1
vmovq rdi, xmm5
vpextrq r11, xmm5, 1
movzx eax, byte ptr [rax+r14]
vmovd xmm5, eax
vpinsrb xmm5, xmm5, byte ptr [rcx+r14], 1
vpinsrb xmm5, xmm5, byte ptr [rdi+r14], 2
vpinsrb xmm5, xmm5, byte ptr [r11+r14], 3
vpmovsxbd xmm5, xmm5
vpmulld xmm5, xmm4, xmm5
vpaddd xmm5, xmm6, xmm5
vphaddd xmm5, xmm5, xmm5
vphaddd xmm5, xmm5, xmm5
vcvtdq2ps xmm5, xmm5
movzx eax, word ptr [r15+r10*2]
vmulss xmm5, xmm5, dword ptr [rbx+rax*4]
vfmadd213ss xmm5, xmm2, dword ptr [rsp+r10*4+78h+var_68]
vmovss dword ptr [rsp+r10*4+78h+var_68], xmm5
inc r10
cmp r10, 4
jnz loc_2AB84
inc rsi
add r12, 10h
cmp rsi, 4
jnz loc_2AB73
inc r13
add r9, 48h ; 'H'
add r15, 48h ; 'H'
cmp r13, rdx
jnz loc_2AB56
loc_2AC81:
mov rcx, [rsp+78h+var_38]
mov rsi, rcx
shl rsi, 4
add rsi, [rsp+78h+var_40]
vmovaps xmm2, [rsp+78h+var_68]
vmovups xmmword ptr [rsi], xmm2
inc rcx
mov rax, [rsp+78h+var_58]
add [rsp+78h+var_70], rax
add [rsp+78h+var_78], rax
cmp rcx, [rsp+78h+var_50]
jnz loc_2AB34
loc_2ACB8:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
vzeroupper
retn
loc_2ACCA:
lea rdi, aNQk0; "n % qk == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemvIq; "void ggml_gemv_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 3EBh
call ___assert_fail
loc_2ACE9:
lea rdi, aNcNcolsInterle; "nc % ncols_interleaved == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemvIq; "void ggml_gemv_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 3ECh
call ___assert_fail
| long long ggml::cpu::aarch64::gemv<block_iq4_nl,4l,4l>(
long long a1,
long long a2,
__m128 _XMM0,
long long a4,
long long a5,
long long a6,
long long a7,
int a8)
{
long long result; // rax
long long v9; // rdx
long long v10; // rcx
long long v14; // r15
long long v15; // r9
long long v16; // r13
long long v58; // rcx
long long v61; // [rsp+0h] [rbp-78h]
long long v62; // [rsp+8h] [rbp-70h]
long long v64; // [rsp+20h] [rbp-58h]
long long v65; // [rsp+28h] [rbp-50h]
long long v66; // [rsp+30h] [rbp-48h]
long long v67; // [rsp+38h] [rbp-40h]
long long v68; // [rsp+40h] [rbp-38h]
v61 = a5;
v67 = a2;
result = (unsigned int)(a1 + 31);
if ( (int)a1 >= 0 )
result = (unsigned int)a1;
v66 = a1;
if ( (a1 & 0x1F) != 0 )
__assert_fail(
"n % qk == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
1003LL,
"void ggml_gemv_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)");
if ( (a8 & 3) != 0 )
__assert_fail(
"nc % ncols_interleaved == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp");
if ( a8 >> 2 > 0 )
{
v65 = (unsigned int)(a8 >> 2);
v9 = (unsigned int)((int)result >> 5);
v62 = a5 + 8;
v64 = 72LL * ((int)result >> 5);
v10 = 0LL;
__asm { vxorps xmm0, xmm0, xmm0 }
_RBX = &ggml_table_f32_f16;
__asm { vpbroadcastd xmm1, cs:dword_396F0 }
do
{
v68 = v10;
__asm { vmovaps [rsp+78h+var_68], xmm0 }
if ( (int)v66 >= 32 )
{
v14 = v61;
v15 = v62;
v16 = 0LL;
do
{
_RSI = *(unsigned __int16 *)(a6 + 34 * v16);
__asm { vmovss xmm2, dword ptr [rbx+rsi*4] }
_RBP = a6 + 34 * v16;
_R12 = v15;
for ( _RSI = 0LL; _RSI != 4; ++_RSI )
{
__asm
{
vpmovsxbd xmm3, dword ptr [rbp+rsi*4+2]
vpmovsxbd xmm4, dword ptr [rbp+rsi*4+12h]
}
for ( _R10 = 0LL; _R10 != 4; ++_R10 )
{
__asm
{
vpmovzxbd xmm5, dword ptr [r12+r10*4]
vpand xmm6, xmm5, xmm1
vpmovzxdq ymm6, xmm6
vmovq rdi, xmm6
vpextrq rax, xmm6, 1
vextracti128 xmm6, ymm6, 1
vmovq rcx, xmm6
vpextrq r11, xmm6, 1
}
LODWORD(_RDI) = *((unsigned __int8 *)&kvalues_iq4nl + _RDI);
__asm
{
vmovd xmm6, edi
vpinsrb xmm6, xmm6, byte ptr [rax+r14], 1
vpinsrb xmm6, xmm6, byte ptr [rcx+r14], 2
vpinsrb xmm6, xmm6, byte ptr [r11+r14], 3
vpmovsxbd xmm6, xmm6
vpmulld xmm6, xmm3, xmm6
vpsrld xmm5, xmm5, 4
vpmovzxdq ymm5, xmm5
vmovq rax, xmm5
vpextrq rcx, xmm5, 1
vextracti128 xmm5, ymm5, 1
vmovq rdi, xmm5
vpextrq r11, xmm5, 1
}
LODWORD(_RAX) = *((unsigned __int8 *)&kvalues_iq4nl + _RAX);
__asm
{
vmovd xmm5, eax
vpinsrb xmm5, xmm5, byte ptr [rcx+r14], 1
vpinsrb xmm5, xmm5, byte ptr [rdi+r14], 2
vpinsrb xmm5, xmm5, byte ptr [r11+r14], 3
vpmovsxbd xmm5, xmm5
vpmulld xmm5, xmm4, xmm5
vpaddd xmm5, xmm6, xmm5
vphaddd xmm5, xmm5, xmm5
vphaddd xmm5, xmm5, xmm5
vcvtdq2ps xmm5, xmm5
vmulss xmm5, xmm5, dword ptr [rbx+rax*4]
vfmadd213ss xmm5, xmm2, dword ptr [rsp+r10*4+78h+var_68]
vmovss dword ptr [rsp+r10*4+78h+var_68], xmm5
}
}
_R12 += 16LL;
}
++v16;
v15 += 72LL;
v14 += 72LL;
}
while ( v16 != v9 );
}
v58 = v68;
_RSI = v67 + 16 * v68;
__asm
{
vmovaps xmm2, [rsp+78h+var_68]
vmovups xmmword ptr [rsi], xmm2
}
v10 = v58 + 1;
result = v64;
v62 += v64;
v61 += v64;
}
while ( v10 != v65 );
}
__asm { vzeroupper }
return result;
}
| gemv<block_iq4_nl,4l,4l>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP],RCX
MOV qword ptr [RSP + 0x38],RSI
LEA EAX,[RDI + 0x1f]
TEST EDI,EDI
CMOVNS EAX,EDI
MOV qword ptr [RSP + 0x30],RDI
TEST DIL,0x1f
JNZ 0x0012acca
MOV EDX,dword ptr [RSP + 0x80]
TEST DL,0x3
JNZ 0x0012ace9
SAR EDX,0x2
TEST EDX,EDX
JLE 0x0012acb8
SAR EAX,0x5
MOVSXD RSI,EAX
MOV EAX,EDX
MOV qword ptr [RSP + 0x28],RAX
MOV EDX,ESI
MOV RAX,qword ptr [RSP]
ADD RAX,0x8
MOV qword ptr [RSP + 0x8],RAX
SHL RSI,0x3
LEA RAX,[RSI + RSI*0x8]
MOV qword ptr [RSP + 0x20],RAX
XOR ECX,ECX
VXORPS XMM0,XMM0,XMM0
MOV RBX,qword ptr [0x00148f68]
VPBROADCASTD XMM1,dword ptr [0x001396f0]
LEA R14,[0x139730]
LAB_0012ab34:
MOV qword ptr [RSP + 0x40],RCX
VMOVAPS xmmword ptr [RSP + 0x10],XMM0
CMP dword ptr [RSP + 0x30],0x20
JL 0x0012ac81
MOV R15,qword ptr [RSP]
MOV R9,qword ptr [RSP + 0x8]
XOR R13D,R13D
LAB_0012ab56:
MOV RSI,R13
SHL RSI,0x5
LEA RBP,[RSI + R13*0x2]
MOVZX ESI,word ptr [R8 + RBP*0x1]
VMOVSS XMM2,dword ptr [RBX + RSI*0x4]
ADD RBP,R8
MOV R12,R9
XOR ESI,ESI
LAB_0012ab73:
VPMOVSXBD XMM3,dword ptr [RBP + RSI*0x4 + 0x2]
VPMOVSXBD XMM4,dword ptr [RBP + RSI*0x4 + 0x12]
XOR R10D,R10D
LAB_0012ab84:
VPMOVZXBD XMM5,dword ptr [R12 + R10*0x4]
VPAND XMM6,XMM5,XMM1
VPMOVZXDQ YMM6,XMM6
VMOVQ RDI,XMM6
VPEXTRQ RAX,XMM6,0x1
VEXTRACTI128 XMM6,YMM6,0x1
VMOVQ RCX,XMM6
VPEXTRQ R11,XMM6,0x1
MOVZX EDI,byte ptr [RDI + R14*0x1]
VMOVD XMM6,EDI
VPINSRB XMM6,XMM6,byte ptr [RAX + R14*0x1],0x1
VPINSRB XMM6,XMM6,byte ptr [RCX + R14*0x1],0x2
VPINSRB XMM6,XMM6,byte ptr [R11 + R14*0x1],0x3
VPMOVSXBD XMM6,XMM6
VPMULLD XMM6,XMM3,XMM6
VPSRLD XMM5,XMM5,0x4
VPMOVZXDQ YMM5,XMM5
VMOVQ RAX,XMM5
VPEXTRQ RCX,XMM5,0x1
VEXTRACTI128 XMM5,YMM5,0x1
VMOVQ RDI,XMM5
VPEXTRQ R11,XMM5,0x1
MOVZX EAX,byte ptr [RAX + R14*0x1]
VMOVD XMM5,EAX
VPINSRB XMM5,XMM5,byte ptr [RCX + R14*0x1],0x1
VPINSRB XMM5,XMM5,byte ptr [RDI + R14*0x1],0x2
VPINSRB XMM5,XMM5,byte ptr [R11 + R14*0x1],0x3
VPMOVSXBD XMM5,XMM5
VPMULLD XMM5,XMM4,XMM5
VPADDD XMM5,XMM6,XMM5
VPHADDD XMM5,XMM5,XMM5
VPHADDD XMM5,XMM5,XMM5
VCVTDQ2PS XMM5,XMM5
MOVZX EAX,word ptr [R15 + R10*0x2]
VMULSS XMM5,XMM5,dword ptr [RBX + RAX*0x4]
VFMADD213SS XMM5,XMM2,dword ptr [RSP + R10*0x4 + 0x10]
VMOVSS dword ptr [RSP + R10*0x4 + 0x10],XMM5
INC R10
CMP R10,0x4
JNZ 0x0012ab84
INC RSI
ADD R12,0x10
CMP RSI,0x4
JNZ 0x0012ab73
INC R13
ADD R9,0x48
ADD R15,0x48
CMP R13,RDX
JNZ 0x0012ab56
LAB_0012ac81:
MOV RCX,qword ptr [RSP + 0x40]
MOV RSI,RCX
SHL RSI,0x4
ADD RSI,qword ptr [RSP + 0x38]
VMOVAPS XMM2,xmmword ptr [RSP + 0x10]
VMOVUPS xmmword ptr [RSI],XMM2
INC RCX
MOV RAX,qword ptr [RSP + 0x20]
ADD qword ptr [RSP + 0x8],RAX
ADD qword ptr [RSP],RAX
CMP RCX,qword ptr [RSP + 0x28]
JNZ 0x0012ab34
LAB_0012acb8:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
VZEROUPPER
RET
LAB_0012acca:
LEA RDI,[0x139a42]
LEA RSI,[0x139910]
LEA RCX,[0x139bcf]
MOV EDX,0x3eb
CALL 0x001083b0
LAB_0012ace9:
LEA RDI,[0x139ac5]
LEA RSI,[0x139910]
LEA RCX,[0x139bcf]
MOV EDX,0x3ec
CALL 0x001083b0
|
/* void ggml::cpu::aarch64::gemv<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void
const*, int, int) */
void ggml::cpu::aarch64::gemv<block_iq4_nl,4l,4l>
(int param_1,float *param_2,ulong param_3,void *param_4,void *param_5,int param_6,
int param_7)
{
uint uVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [32];
long lVar7;
long lVar8;
int *puVar9;
int iVar10;
long lVar11;
ulong uVar12;
long lVar13;
int4 in_register_0000003c;
long lVar14;
long lVar15;
long lVar16;
long lVar17;
ulong uVar18;
void *pvVar19;
int1 auVar20 [16];
int1 auVar21 [16];
void *local_78;
long local_70;
int8 local_68;
int8 uStack_60;
int8 local_48;
float *local_40;
puVar9 = PTR_ggml_table_f32_f16_00148f68;
local_48 = CONCAT44(in_register_0000003c,param_1);
iVar10 = param_1 + 0x1f;
if (-1 < param_1) {
iVar10 = param_1;
}
local_40 = param_2;
if ((param_1 & 0x1fU) == 0) {
if ((param_7 & 3U) == 0) {
if (0 < param_7 >> 2) {
local_70 = (long)param_4 + 8;
lVar7 = (long)(iVar10 >> 5) * 0x48;
uVar12 = 0;
auVar20._4_4_ = DAT_001396f0;
auVar20._0_4_ = DAT_001396f0;
auVar20._8_4_ = DAT_001396f0;
auVar20._12_4_ = DAT_001396f0;
local_78 = param_4;
do {
local_68 = 0;
uStack_60 = 0;
if (0x1f < param_1) {
uVar18 = 0;
lVar14 = local_70;
pvVar19 = local_78;
do {
lVar8 = uVar18 * 0x22;
uVar1 = *(uint *)(puVar9 + (ulong)*(ushort *)((long)param_5 + lVar8) * 4);
lVar13 = 0;
lVar17 = lVar14;
do {
auVar2 = vpmovsxbd_avx(ZEXT416(*(uint *)((long)param_5 + lVar13 * 4 + lVar8 + 2)));
auVar3 = vpmovsxbd_avx(ZEXT416(*(uint *)((long)param_5 + lVar13 * 4 + lVar8 + 0x12))
);
lVar15 = 0;
do {
auVar4 = vpmovzxbd_avx(ZEXT416(*(uint *)(lVar17 + lVar15 * 4)));
auVar21 = vpand_avx(auVar4,auVar20);
auVar6 = vpmovzxdq_avx2(auVar21);
lVar11 = vpextrq_avx(auVar6._0_16_,1);
lVar16 = vpextrq_avx(auVar6._16_16_,1);
auVar21 = vpinsrb_avx(ZEXT116((byte)kvalues_iq4nl[auVar6._0_8_]),
(uint)(byte)kvalues_iq4nl[lVar11],1);
auVar21 = vpinsrb_avx(auVar21,(uint)(byte)kvalues_iq4nl[auVar6._16_8_],2);
auVar21 = vpinsrb_avx(auVar21,(uint)(byte)kvalues_iq4nl[lVar16],3);
auVar21 = vpmovsxbd_avx(auVar21);
auVar5 = vpmulld_avx(auVar2,auVar21);
auVar21 = vpsrld_avx(auVar4,4);
auVar6 = vpmovzxdq_avx2(auVar21);
lVar11 = vpextrq_avx(auVar6._0_16_,1);
lVar16 = vpextrq_avx(auVar6._16_16_,1);
auVar21 = vpinsrb_avx(ZEXT116((byte)kvalues_iq4nl[auVar6._0_8_]),
(uint)(byte)kvalues_iq4nl[lVar11],1);
auVar21 = vpinsrb_avx(auVar21,(uint)(byte)kvalues_iq4nl[auVar6._16_8_],2);
auVar21 = vpinsrb_avx(auVar21,(uint)(byte)kvalues_iq4nl[lVar16],3);
auVar21 = vpmovsxbd_avx(auVar21);
auVar21 = vpmulld_avx(auVar3,auVar21);
auVar21 = vpaddd_avx(auVar5,auVar21);
auVar21 = vphaddd_avx(auVar21,auVar21);
auVar21 = vphaddd_avx(auVar21,auVar21);
auVar21 = vcvtdq2ps_avx(auVar21);
auVar21 = vfmadd213ss_fma(ZEXT416((uint)(auVar21._0_4_ *
*(float *)(puVar9 + (ulong)*(ushort *)
((long)pvVar19
+ lVar15 * 2)
* 4))),ZEXT416(uVar1),
ZEXT416(*(uint *)((long)&local_68 + lVar15 * 4)));
*(int *)((long)&local_68 + lVar15 * 4) = auVar21._0_4_;
lVar15 = lVar15 + 1;
} while (lVar15 != 4);
lVar13 = lVar13 + 1;
lVar17 = lVar17 + 0x10;
} while (lVar13 != 4);
uVar18 = uVar18 + 1;
lVar14 = lVar14 + 0x48;
pvVar19 = (void *)((long)pvVar19 + 0x48);
} while (uVar18 != (uint)(iVar10 >> 5));
}
*(int8 *)(param_2 + uVar12 * 4) = local_68;
*(int8 *)(param_2 + uVar12 * 4 + 2) = uStack_60;
uVar12 = uVar12 + 1;
local_70 = local_70 + lVar7;
local_78 = (void *)((long)local_78 + lVar7);
} while (uVar12 != (uint)(param_7 >> 2));
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("nc % ncols_interleaved == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0x3ec,
"void ggml_gemv_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
/* WARNING: Subroutine does not return */
__assert_fail("n % qk == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0x3eb,
"void ggml_gemv_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
|
|
5,608 | exchange_bytes | bluesky950520[P]quickjs/cutils.c | static void exchange_bytes(void *a, void *b, size_t size) {
uint8_t *ap = (uint8_t *)a;
uint8_t *bp = (uint8_t *)b;
while (size-- != 0) {
uint8_t t = *ap;
*ap++ = *bp;
*bp++ = t;
}
} | O0 | c | exchange_bytes:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rsp)
cmpq $0x0, %rax
je 0x215d8
movq -0x20(%rsp), %rax
movb (%rax), %al
movb %al, -0x29(%rsp)
movq -0x28(%rsp), %rax
movb (%rax), %cl
movq -0x20(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rsp)
movb %cl, (%rax)
movb -0x29(%rsp), %cl
movq -0x28(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rsp)
movb %cl, (%rax)
jmp 0x21583
retq
nopl (%rax)
| exchange_bytes:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov [rsp+var_18], rdx
mov rax, [rsp+var_8]
mov [rsp+var_20], rax
mov rax, [rsp+var_10]
mov [rsp+var_28], rax
loc_21583:
mov rax, [rsp+var_18]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_18], rcx
cmp rax, 0
jz short locret_215D8
mov rax, [rsp+var_20]
mov al, [rax]
mov [rsp+var_29], al
mov rax, [rsp+var_28]
mov cl, [rax]
mov rax, [rsp+var_20]
mov rdx, rax
add rdx, 1
mov [rsp+var_20], rdx
mov [rax], cl
mov cl, [rsp+var_29]
mov rax, [rsp+var_28]
mov rdx, rax
add rdx, 1
mov [rsp+var_28], rdx
mov [rax], cl
jmp short loc_21583
locret_215D8:
retn
| long long exchange_bytes(char *a1, char *a2, long long a3)
{
long long result; // rax
char *v4; // rax
char *v5; // rax
char v6; // [rsp+1h] [rbp-29h]
while ( 1 )
{
result = a3--;
if ( !result )
break;
v6 = *a1;
v4 = a1++;
*v4 = *a2;
v5 = a2++;
*v5 = v6;
}
return result;
}
| exchange_bytes:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV qword ptr [RSP + -0x18],RDX
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x28],RAX
LAB_00121583:
MOV RAX,qword ptr [RSP + -0x18]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RSP + -0x18],RCX
CMP RAX,0x0
JZ 0x001215d8
MOV RAX,qword ptr [RSP + -0x20]
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + -0x29],AL
MOV RAX,qword ptr [RSP + -0x28]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RSP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RSP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV CL,byte ptr [RSP + -0x29]
MOV RAX,qword ptr [RSP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RSP + -0x28],RDX
MOV byte ptr [RAX],CL
JMP 0x00121583
LAB_001215d8:
RET
|
void exchange_bytes(int1 *param_1,int1 *param_2,long param_3)
{
int1 uVar1;
int1 *local_28;
int1 *local_20;
long local_18;
local_28 = param_2;
local_20 = param_1;
local_18 = param_3;
while (local_18 != 0) {
uVar1 = *local_20;
*local_20 = *local_28;
*local_28 = uVar1;
local_28 = local_28 + 1;
local_20 = local_20 + 1;
local_18 = local_18 + -1;
}
return;
}
|
|
5,609 | exchange_bytes | bluesky950520[P]quickjs/cutils.c | static void exchange_bytes(void *a, void *b, size_t size) {
uint8_t *ap = (uint8_t *)a;
uint8_t *bp = (uint8_t *)b;
while (size-- != 0) {
uint8_t t = *ap;
*ap++ = *bp;
*bp++ = t;
}
} | O1 | c | exchange_bytes:
testq %rdx, %rdx
je 0x1c990
xorl %eax, %eax
movb (%rdi,%rax), %cl
movb (%rsi,%rax), %r8b
movb %r8b, (%rdi,%rax)
movb %cl, (%rsi,%rax)
incq %rax
cmpq %rax, %rdx
jne 0x1c97a
retq
nopl (%rax)
| exchange_bytes:
test rdx, rdx
jz short locret_1C990
xor eax, eax
loc_1C97A:
mov cl, [rdi+rax]
mov r8b, [rsi+rax]
mov [rdi+rax], r8b
mov [rsi+rax], cl
inc rax
cmp rdx, rax
jnz short loc_1C97A
locret_1C990:
retn
| void exchange_bytes(long long a1, long long a2, long long a3)
{
long long i; // rax
char v4; // cl
if ( a3 )
{
for ( i = 0LL; i != a3; ++i )
{
v4 = *(_BYTE *)(a1 + i);
*(_BYTE *)(a1 + i) = *(_BYTE *)(a2 + i);
*(_BYTE *)(a2 + i) = v4;
}
}
}
| |||
5,610 | testing::Message::Message(testing::Message const&) | AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/gtest-message.h | Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT
*ss_ << msg.GetString();
} | O0 | c | testing::Message::Message(testing::Message const&):
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movl $0x188, %edi # imm = 0x188
callq 0x16700
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x20(%rsp)
callq 0x164a0
jmp 0xf3dc9
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0xedc40
movq 0x18(%rsp), %rdi
callq 0x32930
movq %rax, 0x8(%rsp)
jmp 0xf3de9
movq 0x8(%rsp), %rax
addq $0x10, %rax
movq %rax, (%rsp)
movq 0x58(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0xbad90
jmp 0xf3e07
movq (%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x16620
jmp 0xf3e17
leaq 0x28(%rsp), %rdi
callq 0x1dfd0
addq $0x68, %rsp
retq
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl $0x188, %esi # imm = 0x188
callq 0x16720
jmp 0xf3e77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xf3e6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x1dfd0
movq 0x10(%rsp), %rdi
callq 0x1f2a0
movq 0x50(%rsp), %rdi
callq 0x16cf0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN7testing7MessageC2ERKS0_:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov qword ptr [rsp+68h+var_10], rsi
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_58], rax
mov [rsp+68h+var_50], rax
mov edi, 188h; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
mov rax, rdi
mov [rsp+68h+var_48], rax
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
jmp short $+2
loc_F3DC9:
mov rsi, [rsp+68h+var_48]
mov rdi, [rsp+68h+var_58]
call _ZNSt10unique_ptrINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEC2IS7_vEEPS5_; std::unique_ptr<std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>>::unique_ptr<std::default_delete<std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>>,void>(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>*)
mov rdi, [rsp+68h+var_50]
call _ZNKSt10unique_ptrINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEdeEv; std::unique_ptr<std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>>::operator*(void)
mov [rsp+68h+var_60], rax
jmp short $+2
loc_F3DE9:
mov rax, [rsp+68h+var_60]
add rax, 10h
mov [rsp+68h+var_68], rax
mov rsi, qword ptr [rsp+68h+var_10]; int
lea rdi, [rsp+68h+var_40]; int
call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void)
jmp short $+2
loc_F3E07:
mov rdi, [rsp+68h+var_68]
lea rsi, [rsp+68h+var_40]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_F3E17:
lea rdi, [rsp+68h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 68h
retn
mov rdi, [rsp+arg_18]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_48], rcx
mov [rsp+arg_44], eax
mov esi, 188h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_F3E77
mov rcx, rax
mov eax, edx
mov [rsp+arg_48], rcx
mov [rsp+arg_44], eax
jmp short loc_F3E6D
mov rcx, rax
mov eax, edx
mov [rsp+arg_48], rcx
mov [rsp+arg_44], eax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_F3E6D:
mov rdi, [rsp+arg_8]
call _ZNSt10unique_ptrINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>>::~unique_ptr()
loc_F3E77:
mov rdi, [rsp+arg_48]
call __Unwind_Resume
| void testing::Message::Message(testing::Message *this, const testing::Message *a2)
{
long long v2; // [rsp+0h] [rbp-68h]
long long v3; // [rsp+20h] [rbp-48h]
int v4[12]; // [rsp+28h] [rbp-40h] BYREF
int v5[2]; // [rsp+58h] [rbp-10h]
testing::Message *v6; // [rsp+60h] [rbp-8h]
v6 = this;
*(_QWORD *)v5 = a2;
v3 = operator new(0x188uLL);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v3);
std::unique_ptr<std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>>::unique_ptr<std::default_delete<std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>>,void>();
v2 = std::unique_ptr<std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>>::operator*((long long)this)
+ 16;
testing::Message::GetString[abi:cxx11]((int)v4, (int)a2);
std::operator<<<char>(v2, v4);
std::string::~string(v4);
}
| Message:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RAX
MOV EDI,0x188
CALL 0x00116700
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x20],RAX
LAB_001f3dc2:
CALL 0x001164a0
JMP 0x001f3dc9
LAB_001f3dc9:
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001edc40
MOV RDI,qword ptr [RSP + 0x18]
LAB_001f3ddd:
CALL 0x00132930
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001f3de9
LAB_001f3de9:
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x10
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RSP + 0x58]
LEA RDI,[RSP + 0x28]
CALL 0x001bad90
JMP 0x001f3e07
LAB_001f3e07:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x28]
CALL 0x00116620
LAB_001f3e15:
JMP 0x001f3e17
LAB_001f3e17:
LEA RDI,[RSP + 0x28]
CALL 0x0011dfd0
ADD RSP,0x68
RET
|
/* testing::Message::Message(testing::Message const&) */
void __thiscall testing::Message::Message(Message *this,Message *param_1)
{
stringstream *this_00;
long lVar1;
string local_40 [48];
Message *local_10;
Message *local_8;
local_10 = param_1;
local_8 = this;
this_00 = (stringstream *)operator_new(0x188);
/* try { // try from 001f3dc2 to 001f3dc6 has its CatchHandler @ 001f3e26 */
std::__cxx11::stringstream::stringstream(this_00);
std::unique_ptr<std::__cxx11::stringstream,std::default_delete<std::__cxx11::stringstream>>::
unique_ptr<std::default_delete<std::__cxx11::stringstream>,void>
((unique_ptr<std::__cxx11::stringstream,std::default_delete<std::__cxx11::stringstream>>
*)this,this_00);
/* try { // try from 001f3ddd to 001f3e04 has its CatchHandler @ 001f3e45 */
lVar1 = std::
unique_ptr<std::__cxx11::stringstream,std::default_delete<std::__cxx11::stringstream>>::
operator*((unique_ptr<std::__cxx11::stringstream,std::default_delete<std::__cxx11::stringstream>>
*)this);
GetString_abi_cxx11_();
/* try { // try from 001f3e07 to 001f3e14 has its CatchHandler @ 001f3e55 */
std::operator<<((ostream *)(lVar1 + 0x10),local_40);
std::__cxx11::string::~string(local_40);
return;
}
|
|
5,611 | gguf_kv::gguf_kv<unsigned char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char) | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | gguf_kv(const std::string & key, const T value)
: key(key), is_array(false), type(type_to_gguf_type<T>::value) {
GGML_ASSERT(!key.empty());
data.resize(sizeof(T));
memcpy(data.data(), &value, sizeof(T));
} | O1 | cpp | gguf_kv::gguf_kv<unsigned char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r13
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
movq %rbx, (%rdi)
movq (%rsi), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
callq 0x17620
movb $0x0, 0x20(%r14)
movl $0xc, 0x24(%r14)
leaq 0x28(%r14), %r15
leaq 0x40(%r14), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x38(%r14)
movups %xmm0, 0x48(%r14)
cmpq $0x0, 0x8(%r13)
je 0x49ac1
movl $0x8, %esi
movq %r15, %rdi
callq 0x17130
movq (%r15), %rax
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x13525(%rip), %rdi # 0x5cfed
leaq 0x2af2(%rip), %rdx # 0x4c5c1
leaq 0x13d45(%rip), %rcx # 0x5d81b
movl $0x84, %esi
xorl %eax, %eax
callq 0x18ce0
movq %rax, %r13
movq %r12, %rdi
callq 0x17c90
movq (%r15), %rdi
testq %rdi, %rdi
je 0x49b01
movq 0x38(%r14), %rsi
subq %rdi, %rsi
callq 0x180e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1a74e
movq %r13, %rdi
callq 0x18ea0
| _ZN7gguf_kvC2IdEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
movsd [rsp+38h+var_30], xmm0
mov r13, rsi
mov r14, rdi
lea rbx, [rdi+10h]
mov [rdi], rbx
mov rsi, [rsi]
mov rdx, [r13+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 byte ptr [r14+20h], 0
mov dword ptr [r14+24h], 0Ch
lea r15, [r14+28h]
lea r12, [r14+40h]
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
movups xmmword ptr [r14+38h], xmm0
movups xmmword ptr [r14+48h], xmm0
cmp qword ptr [r13+8], 0
jz short loc_49AC1
mov esi, 8
mov rdi, r15
call __ZNSt6vectorIaSaIaEE6resizeEm; std::vector<signed char>::resize(ulong)
mov rax, [r15]
movsd xmm0, [rsp+38h+var_30]
movsd qword ptr [rax], xmm0
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_49AC1:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyEmpty; "!key.empty()"
mov esi, 84h
xor eax, eax
call _ggml_abort
mov r13, rax
mov rdi, r12
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [r15]; void *
test rdi, rdi
jz short loc_49B01
mov rsi, [r14+38h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_49B01:
mov rdi, r14
mov rsi, rbx
call _ZN7gguf_kvC2IdEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET__cold_1; gguf_kv::gguf_kv<double>(std::string const&,double) [clone]
mov rdi, r13
call __Unwind_Resume
| double * gguf_kv::gguf_kv<double>(long long a1, _QWORD *a2, double a3)
{
int v3; // r8d
int v4; // r9d
double **v5; // r15
double *result; // rax
*(_QWORD *)a1 = a1 + 16;
std::string::_M_construct<char *>(a1, *a2, *a2 + a2[1]);
*(_BYTE *)(a1 + 32) = 0;
*(_DWORD *)(a1 + 36) = 12;
v5 = (double **)(a1 + 40);
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = 0LL;
if ( !a2[1] )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
132,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"!key.empty()",
v3,
v4);
std::vector<signed char>::resize(a1 + 40, 8LL);
result = *v5;
**v5 = a3;
return result;
}
| gguf_kv<double>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOVSD qword ptr [RSP + 0x8],XMM0
MOV R13,RSI
MOV R14,RDI
LEA RBX,[RDI + 0x10]
MOV qword ptr [RDI],RBX
MOV RSI,qword ptr [RSI]
MOV RDX,qword ptr [R13 + 0x8]
ADD RDX,RSI
CALL 0x00117620
MOV byte ptr [R14 + 0x20],0x0
MOV dword ptr [R14 + 0x24],0xc
LEA R15,[R14 + 0x28]
LEA R12,[R14 + 0x40]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x28],XMM0
MOVUPS xmmword ptr [R14 + 0x38],XMM0
MOVUPS xmmword ptr [R14 + 0x48],XMM0
CMP qword ptr [R13 + 0x8],0x0
JZ 0x00149ac1
LAB_00149a99:
MOV ESI,0x8
MOV RDI,R15
CALL 0x00117130
MOV RAX,qword ptr [R15]
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVSD qword ptr [RAX],XMM0
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00149ac1:
LEA RDI,[0x15cfed]
LEA RDX,[0x14c5c1]
LEA RCX,[0x15d81b]
MOV ESI,0x84
XOR EAX,EAX
CALL 0x00118ce0
|
/* gguf_kv::gguf_kv<double>(std::__cxx11::string const&, double) */
void __thiscall gguf_kv::gguf_kv<double>(gguf_kv *this,string *param_1,double param_2)
{
*(gguf_kv **)this = this + 0x10;
std::__cxx11::string::_M_construct<char*>
(this,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
this[0x20] = (gguf_kv)0x0;
*(int4 *)(this + 0x24) = 0xc;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
if (*(long *)(param_1 + 8) != 0) {
/* try { // try from 00149a99 to 00149ae1 has its CatchHandler @ 00149ae2 */
std::vector<signed_char,std::allocator<signed_char>>::resize
((vector<signed_char,std::allocator<signed_char>> *)(this + 0x28),8);
**(double **)(this + 0x28) = param_2;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
0x84,"GGML_ASSERT(%s) failed","!key.empty()");
}
|
|
5,612 | gguf_kv::gguf_kv<unsigned char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char) | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | gguf_kv(const std::string & key, const T value)
: key(key), is_array(false), type(type_to_gguf_type<T>::value) {
GGML_ASSERT(!key.empty());
data.resize(sizeof(T));
memcpy(data.data(), &value, sizeof(T));
} | O2 | cpp | gguf_kv::gguf_kv<unsigned char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x1e2a0
movb $0x0, 0x20(%rbx)
movl $0x7, 0x24(%rbx)
leaq 0x28(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
cmpq $0x0, 0x8(%r15)
je 0x49891
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x1d230
movq (%r14), %rax
movb %bpl, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x159b5(%rip), %rdi # 0x5f24d
leaq 0x4d36(%rip), %rdx # 0x4e5d5
leaq 0x162b7(%rip), %rcx # 0x5fb5d
movl $0x84, %esi
xorl %eax, %eax
callq 0x1f9b0
movq %rax, %r15
leaq 0x40(%rbx), %rdi
callq 0x1e1b0
movq %r14, %rdi
callq 0x1f8c0
movq %rbx, %rdi
callq 0x1eab0
movq %r15, %rdi
callq 0x1fc10
| _ZN7gguf_kvC2IbEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, edx
mov r15, rsi
mov rbx, rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov byte ptr [rbx+20h], 0
mov dword ptr [rbx+24h], 7
lea r14, [rbx+28h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+28h], xmm0
movups xmmword ptr [rbx+38h], xmm0
movups xmmword ptr [rbx+48h], xmm0
cmp qword ptr [r15+8], 0
jz short loc_49891
push 1
pop rsi
mov rdi, r14
call __ZNSt6vectorIaSaIaEE6resizeEm; std::vector<signed char>::resize(ulong)
mov rax, [r14]
mov [rax], bpl
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_49891:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyEmpty; "!key.empty()"
mov esi, 84h
xor eax, eax
call _ggml_abort
mov r15, rax
lea rdi, [rbx+40h]
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __ZNSt12_Vector_baseIaSaIaEED2Ev; std::_Vector_base<signed char>::~_Vector_base()
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15
call __Unwind_Resume
| _BYTE * gguf_kv::gguf_kv<bool>(
long long a1,
long long a2,
char a3,
double a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
char v11; // al
long long v13; // r8
long long v14; // r9
__m128 v15; // xmm4
__m128 v16; // xmm5
_QWORD *v17; // r14
_BYTE *result; // rax
char v19; // [rsp-8h] [rbp-28h]
v19 = v11;
std::string::basic_string();
*(_BYTE *)(a1 + 32) = 0;
*(_DWORD *)(a1 + 36) = 7;
v17 = (_QWORD *)(a1 + 40);
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = 0LL;
if ( !*(_QWORD *)(a2 + 8) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
132,
(long long)"GGML_ASSERT(%s) failed",
(long long)"!key.empty()",
v13,
v14,
(__m128)0LL,
a5,
a6,
a7,
v15,
v16,
a10,
a11,
v19);
std::vector<signed char>::resize(a1 + 40, 1LL);
result = (_BYTE *)*v17;
*(_BYTE *)*v17 = a3;
return result;
}
| gguf_kv<bool>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,EDX
MOV R15,RSI
MOV RBX,RDI
CALL 0x0011e2a0
MOV byte ptr [RBX + 0x20],0x0
MOV dword ptr [RBX + 0x24],0x7
LEA R14,[RBX + 0x28]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x28],XMM0
MOVUPS xmmword ptr [RBX + 0x38],XMM0
MOVUPS xmmword ptr [RBX + 0x48],XMM0
CMP qword ptr [R15 + 0x8],0x0
JZ 0x00149891
LAB_00149875:
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x0011d230
MOV RAX,qword ptr [R14]
MOV byte ptr [RAX],BPL
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00149891:
LEA RDI,[0x15f24d]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15fb5d]
MOV ESI,0x84
XOR EAX,EAX
CALL 0x0011f9b0
|
/* gguf_kv::gguf_kv<bool>(std::__cxx11::string const&, bool) */
void __thiscall gguf_kv::gguf_kv<bool>(gguf_kv *this,string *param_1,bool param_2)
{
std::__cxx11::string::string((string *)this,param_1);
this[0x20] = (gguf_kv)0x0;
*(int4 *)(this + 0x24) = 7;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
if (*(long *)(param_1 + 8) != 0) {
/* try { // try from 00149875 to 001498b1 has its CatchHandler @ 001498b2 */
std::vector<signed_char,std::allocator<signed_char>>::resize
((vector<signed_char,std::allocator<signed_char>> *)(this + 0x28),1);
*(bool *)*(int8 *)(this + 0x28) = param_2;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
0x84,"GGML_ASSERT(%s) failed","!key.empty()");
}
|
|
5,613 | gguf_kv::gguf_kv<unsigned char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char) | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | gguf_kv(const std::string & key, const T value)
: key(key), is_array(false), type(type_to_gguf_type<T>::value) {
GGML_ASSERT(!key.empty());
data.resize(sizeof(T));
memcpy(data.data(), &value, sizeof(T));
} | O3 | cpp | gguf_kv::gguf_kv<unsigned char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r13
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
movq %rbx, (%rdi)
movq (%rsi), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
callq 0x16620
movb $0x0, 0x20(%r14)
movl $0xc, 0x24(%r14)
leaq 0x28(%r14), %r15
leaq 0x40(%r14), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x38(%r14)
movups %xmm0, 0x48(%r14)
cmpq $0x0, 0x8(%r13)
je 0x492fd
movl $0x8, %esi
movq %r15, %rdi
callq 0x16130
movq (%r15), %rax
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x141d9(%rip), %rdi # 0x5d4dd
leaq 0x335a(%rip), %rdx # 0x4c665
leaq 0x149f9(%rip), %rcx # 0x5dd0b
movl $0x84, %esi
xorl %eax, %eax
callq 0x17cd0
movq %rax, %r13
movq %r12, %rdi
callq 0x16c90
movq (%r15), %rdi
testq %rdi, %rdi
je 0x4933d
movq 0x38(%r14), %rsi
subq %rdi, %rsi
callq 0x170d0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x19425
movq %r13, %rdi
callq 0x17e90
| _ZN7gguf_kvC2IdEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
movsd [rsp+38h+var_30], xmm0
mov r13, rsi
mov r14, rdi
lea rbx, [rdi+10h]
mov [rdi], rbx
mov rsi, [rsi]
mov rdx, [r13+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 byte ptr [r14+20h], 0
mov dword ptr [r14+24h], 0Ch
lea r15, [r14+28h]
lea r12, [r14+40h]
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
movups xmmword ptr [r14+38h], xmm0
movups xmmword ptr [r14+48h], xmm0
cmp qword ptr [r13+8], 0
jz short loc_492FD
mov esi, 8
mov rdi, r15
call __ZNSt6vectorIaSaIaEE6resizeEm; std::vector<signed char>::resize(ulong)
mov rax, [r15]
movsd xmm0, [rsp+38h+var_30]
movsd qword ptr [rax], xmm0
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_492FD:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyEmpty; "!key.empty()"
mov esi, 84h
xor eax, eax
call _ggml_abort
mov r13, rax
mov rdi, r12
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [r15]; void *
test rdi, rdi
jz short loc_4933D
mov rsi, [r14+38h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4933D:
mov rdi, r14
mov rsi, rbx
call _ZN7gguf_kvC2IdEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET__cold_1; gguf_kv::gguf_kv<double>(std::string const&,double) [clone]
mov rdi, r13
call __Unwind_Resume
| double * gguf_kv::gguf_kv<double>(long long a1, _QWORD *a2, double a3)
{
int v3; // r8d
int v4; // r9d
double **v5; // r15
double *result; // rax
*(_QWORD *)a1 = a1 + 16;
std::string::_M_construct<char *>(a1, *a2, *a2 + a2[1]);
*(_BYTE *)(a1 + 32) = 0;
*(_DWORD *)(a1 + 36) = 12;
v5 = (double **)(a1 + 40);
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = 0LL;
if ( !a2[1] )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
132,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"!key.empty()",
v3,
v4);
std::vector<signed char>::resize(a1 + 40, 8LL);
result = *v5;
**v5 = a3;
return result;
}
| gguf_kv<double>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOVSD qword ptr [RSP + 0x8],XMM0
MOV R13,RSI
MOV R14,RDI
LEA RBX,[RDI + 0x10]
MOV qword ptr [RDI],RBX
MOV RSI,qword ptr [RSI]
MOV RDX,qword ptr [R13 + 0x8]
ADD RDX,RSI
CALL 0x00116620
MOV byte ptr [R14 + 0x20],0x0
MOV dword ptr [R14 + 0x24],0xc
LEA R15,[R14 + 0x28]
LEA R12,[R14 + 0x40]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x28],XMM0
MOVUPS xmmword ptr [R14 + 0x38],XMM0
MOVUPS xmmword ptr [R14 + 0x48],XMM0
CMP qword ptr [R13 + 0x8],0x0
JZ 0x001492fd
LAB_001492d5:
MOV ESI,0x8
MOV RDI,R15
CALL 0x00116130
MOV RAX,qword ptr [R15]
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVSD qword ptr [RAX],XMM0
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001492fd:
LEA RDI,[0x15d4dd]
LEA RDX,[0x14c665]
LEA RCX,[0x15dd0b]
MOV ESI,0x84
XOR EAX,EAX
CALL 0x00117cd0
|
/* gguf_kv::gguf_kv<double>(std::__cxx11::string const&, double) */
void __thiscall gguf_kv::gguf_kv<double>(gguf_kv *this,string *param_1,double param_2)
{
*(gguf_kv **)this = this + 0x10;
std::__cxx11::string::_M_construct<char*>
(this,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
this[0x20] = (gguf_kv)0x0;
*(int4 *)(this + 0x24) = 0xc;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
if (*(long *)(param_1 + 8) != 0) {
/* try { // try from 001492d5 to 0014931d has its CatchHandler @ 0014931e */
std::vector<signed_char,std::allocator<signed_char>>::resize
((vector<signed_char,std::allocator<signed_char>> *)(this + 0x28),8);
**(double **)(this + 0x28) = param_2;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
0x84,"GGML_ASSERT(%s) failed","!key.empty()");
}
|
|
5,614 | minja::Context::at(minja::Value const&) | llama.cpp/common/minja/minja.hpp | virtual Value & at(const Value & key) {
if (values_.contains(key)) return values_.at(key);
if (parent_) return parent_->at(key);
throw std::runtime_error("Undefined variable: " + key.dump());
} | O3 | cpp | minja::Context::at(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0xc0332
testb %al, %al
je 0xc01f5
movq %r15, %rdi
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xc057e
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0xc0214
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movl $0x10, %edi
callq 0x20650
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb6330
leaq 0x5fe97(%rip), %rsi # 0x1200d3
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xafbd0
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x20480
xorl %ebp, %ebp
movq 0xa2d5c(%rip), %rsi # 0x162fc0
movq 0xa2d15(%rip), %rdx # 0x162f80
movq %rbx, %rdi
callq 0x20a50
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc0291
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x20180
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc02ac
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0xc02d6
jmp 0xc02de
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc02d6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xc02d6
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f00
movq %r14, %rdi
callq 0x20af0
| _ZN5minja7Context2atERKNS_5ValueE:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+18h]
mov rdi, r15; this
call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&)
test al, al
jz short loc_C01F5
mov rdi, r15; this
mov rsi, r14; minja::Value *
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
loc_C01F5:
mov rdi, [rbx+68h]
test rdi, rdi
jz short loc_C0214
mov rax, [rdi]
mov rax, [rax+18h]
mov rsi, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp rax
loc_C0214:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUndefinedVaria; "Undefined variable: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C0291
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C0291:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C02AC
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C02AC:
test bpl, bpl
jnz short loc_C02D6
jmp short loc_C02DE
mov r14, rax
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C02D6
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C02D6
mov r14, rax
loc_C02D6:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C02DE:
mov rdi, r14
call __Unwind_Resume
| long long minja::Context::at(minja::Context *this, const minja::Value *a2)
{
long long v3; // rdi
void *exception; // rbx
_BYTE v5[16]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v6[2]; // [rsp+28h] [rbp-40h] BYREF
if ( (unsigned __int8)minja::Value::contains((minja::Context *)((char *)this + 24), a2) )
return minja::Value::at((minja::Context *)((char *)this + 24), a2);
v3 = *((_QWORD *)this + 13);
if ( !v3 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v5, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>(v6, (long long)"Undefined variable: ", (long long)v5);
std::runtime_error::runtime_error(exception, v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return (*(long long ( **)(long long, const minja::Value *))(*(_QWORD *)v3 + 24LL))(v3, a2);
}
| at:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x18]
MOV RDI,R15
CALL 0x001c0332
TEST AL,AL
JZ 0x001c01f5
MOV RDI,R15
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001c057e
LAB_001c01f5:
MOV RDI,qword ptr [RBX + 0x68]
TEST RDI,RDI
JZ 0x001c0214
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x18]
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP RAX
LAB_001c0214:
MOV EDI,0x10
CALL 0x00120650
MOV RBX,RAX
LAB_001c0221:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b6330
LAB_001c0235:
LEA RSI,[0x2200d3]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x001afbd0
MOV BPL,0x1
LAB_001c024e:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00120480
XOR EBP,EBP
MOV RSI,qword ptr [0x00262fc0]
MOV RDX,qword ptr [0x00262f80]
MOV RDI,RBX
CALL 0x00120a50
|
/* minja::Context::at(minja::Value const&) */
void __thiscall minja::Context::at(Context *this,Value *param_1)
{
long *plVar1;
char cVar2;
runtime_error *this_00;
int1 local_60 [32];
string local_40 [32];
cVar2 = Value::contains((Value *)(this + 0x18),param_1);
if (cVar2 != '\0') {
Value::at((Value *)(this + 0x18),param_1);
return;
}
plVar1 = *(long **)(this + 0x68);
if (plVar1 != (long *)0x0) {
/* WARNING: Could not recover jumptable at 0x001c0212. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*plVar1 + 0x18))(plVar1,param_1);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001c0221 to 001c0234 has its CatchHandler @ 001c02d3 */
Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0));
/* try { // try from 001c0235 to 001c024a has its CatchHandler @ 001c02b3 */
std::operator+((char *)local_40,(string *)"Undefined variable: ");
/* try { // try from 001c024e to 001c0272 has its CatchHandler @ 001c0273 */
std::runtime_error::runtime_error(this_00,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00262fc0,PTR__runtime_error_00262f80);
}
|
|
5,615 | my_snprintf_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n, const char* fmt, ...)
{
size_t ret;
va_list args;
va_start(args,fmt);
ret= my_vsnprintf_mb2(to, n, fmt, args);
va_end(args);
return ret;
} | O0 | c | my_snprintf_mb2:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0x5935b
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x20, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x5c7d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
| my_snprintf_mb2:
push rbp
mov rbp, rsp
sub rsp, 0F0h
test al, al
jz short loc_5935B
movaps [rbp+var_C0], xmm0
movaps [rbp+var_B0], xmm1
movaps [rbp+var_A0], xmm2
movaps [rbp+var_90], xmm3
movaps [rbp+var_80], xmm4
movaps [rbp+var_70], xmm5
movaps [rbp+var_60], xmm6
movaps [rbp+var_50], xmm7
loc_5935B:
mov [rbp+var_C8], r9
mov [rbp+var_D0], r8
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
lea rax, [rbp+var_F0]
mov [rbp+var_30], rax
lea rax, [rbp+arg_0]
mov [rbp+var_38], rax
mov [rbp+var_3C], 30h ; '0'
mov [rbp+var_40], 20h ; ' '
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_40]
call my_vsnprintf_mb2
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 0F0h
pop rbp
retn
| long long my_snprintf_mb2(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-F0h] BYREF
long long v17; // [rsp+20h] [rbp-D0h]
long long v18; // [rsp+28h] [rbp-C8h]
__m128 v19; // [rsp+30h] [rbp-C0h]
__m128 v20; // [rsp+40h] [rbp-B0h]
__m128 v21; // [rsp+50h] [rbp-A0h]
__m128 v22; // [rsp+60h] [rbp-90h]
__m128 v23; // [rsp+70h] [rbp-80h]
__m128 v24; // [rsp+80h] [rbp-70h]
__m128 v25; // [rsp+90h] [rbp-60h]
__m128 v26; // [rsp+A0h] [rbp-50h]
_DWORD v27[2]; // [rsp+B0h] [rbp-40h] BYREF
char *v28; // [rsp+B8h] [rbp-38h]
char *v29; // [rsp+C0h] [rbp-30h]
long long v30; // [rsp+D0h] [rbp-20h]
long long v31; // [rsp+D8h] [rbp-18h]
long long v32; // [rsp+E0h] [rbp-10h]
long long v33; // [rsp+E8h] [rbp-8h]
v19 = a7;
v20 = a8;
v21 = a9;
v22 = a10;
v23 = a11;
v24 = a12;
v25 = a13;
v26 = a14;
v18 = a6;
v17 = a5;
v33 = a1;
v32 = a2;
v31 = a3;
v30 = a4;
v29 = &v16;
v28 = &a15;
v27[1] = 48;
v27[0] = 32;
return my_vsnprintf_mb2(a2, a3, a4, v27);
}
| my_snprintf_mb2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
TEST AL,AL
JZ 0x0015935b
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM1
MOVAPS xmmword ptr [RBP + -0xa0],XMM2
MOVAPS xmmword ptr [RBP + -0x90],XMM3
MOVAPS xmmword ptr [RBP + -0x80],XMM4
MOVAPS xmmword ptr [RBP + -0x70],XMM5
MOVAPS xmmword ptr [RBP + -0x60],XMM6
MOVAPS xmmword ptr [RBP + -0x50],XMM7
LAB_0015935b:
MOV qword ptr [RBP + -0xc8],R9
MOV qword ptr [RBP + -0xd0],R8
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[RBP + -0xf0]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x30
MOV dword ptr [RBP + -0x40],0x20
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x40]
CALL 0x0015c7d0
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0xf0
POP RBP
RET
|
int8
my_snprintf_mb2(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int8 uVar1;
int1 local_f8 [32];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
int8 local_28;
int8 local_20;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_c8 = param_1;
local_b8 = param_2;
local_a8 = param_3;
local_98 = param_4;
local_88 = param_5;
local_78 = param_6;
local_68 = param_7;
local_58 = param_8;
}
local_38 = local_f8;
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x20;
local_d8 = param_13;
local_d0 = param_14;
local_28 = param_12;
local_20 = param_11;
local_18 = param_10;
local_10 = param_9;
uVar1 = my_vsnprintf_mb2(param_10,param_11,param_12,&local_48);
return uVar1;
}
|
|
5,616 | my_delete | eloqsql/mysys/my_delete.c | int my_delete(const char *name, myf MyFlags)
{
int err;
DBUG_ENTER("my_delete");
DBUG_PRINT("my",("name %s MyFlags %lu", name, MyFlags));
#ifdef _WIN32
err = my_win_unlink(name);
#else
if (MyFlags & MY_NOSYMLINKS)
err= unlink_nosymlinks(name);
else
err= unlink(name);
#endif
if ((MyFlags & MY_IGNORE_ENOENT) && errno == ENOENT)
DBUG_RETURN(0);
if (err)
{
my_errno= errno;
if (MyFlags & (MY_FAE+MY_WME))
my_error(EE_DELETE, MYF(ME_BELL), name, errno);
}
else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(name, MyFlags))
err= -1;
DBUG_RETURN(err);
} | O3 | c | my_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
btl $0x9, %r14d
jb 0xbab2c
movq %rbx, %rdi
callq 0x2a1d0
movl %eax, %r15d
jmp 0xbab61
leaq -0x2c(%rbp), %rsi
movq %rbx, %rdi
callq 0xc08b4
testq %rax, %rax
je 0xbab5b
movl -0x2c(%rbp), %edi
movq %rax, %rsi
xorl %edx, %edx
callq 0x2aa90
movl %eax, %r15d
movl -0x2c(%rbp), %edi
testl %edi, %edi
js 0xbab61
callq 0x2a1c0
jmp 0xbab61
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
testb $0x20, %r14b
je 0xbab71
callq 0x2a870
cmpl $0x2, (%rax)
je 0xbabaf
testl %r15d, %r15d
je 0xbaba9
callq 0x2a870
movq %rax, %r12
movl (%rax), %r13d
callq 0xc14ee
movl %r13d, (%rax)
testb $0x18, %r14b
je 0xbabc7
movl (%r12), %ecx
movl $0x4, %esi
movl $0x6, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xbad7b
jmp 0xbabc7
testw %r14w, %r14w
js 0xbabb4
xorl %r15d, %r15d
jmp 0xbabc7
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc100f
xorl %r15d, %r15d
negl %eax
sbbl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
bt r14d, 9
jb short loc_BAB2C
mov rdi, rbx
call _unlink
mov r15d, eax
jmp short loc_BAB61
loc_BAB2C:
lea rsi, [rbp+var_2C]
mov rdi, rbx
call my_open_parent_dir_nosymlinks
test rax, rax
jz short loc_BAB5B
mov edi, [rbp+var_2C]
mov rsi, rax
xor edx, edx
call _unlinkat
mov r15d, eax
mov edi, [rbp+var_2C]
test edi, edi
js short loc_BAB61
call _close
jmp short loc_BAB61
loc_BAB5B:
mov r15d, 0FFFFFFFFh
loc_BAB61:
test r14b, 20h
jz short loc_BAB71
call ___errno_location
cmp dword ptr [rax], 2
jz short loc_BABAF
loc_BAB71:
test r15d, r15d
jz short loc_BABA9
call ___errno_location
mov r12, rax
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r14b, 18h
jz short loc_BABC7
mov ecx, [r12]
mov esi, 4
mov edi, 6
mov rdx, rbx
xor eax, eax
call my_error
jmp short loc_BABC7
loc_BABA9:
test r14w, r14w
js short loc_BABB4
loc_BABAF:
xor r15d, r15d
jmp short loc_BABC7
loc_BABB4:
mov rdi, rbx
mov rsi, r14
call my_sync_dir_by_file
xor r15d, r15d
neg eax
sbb r15d, r15d
loc_BABC7:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_delete(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rbx
unsigned int v4; // r15d
long long v5; // rax
_DWORD *v6; // r12
int v7; // r13d
int v8; // r8d
int v9; // r9d
unsigned int v11[11]; // [rsp+0h] [rbp-2Ch] BYREF
v11[0] = HIDWORD(v2);
v3 = a1;
if ( (a2 & 0x200) != 0 )
{
v5 = my_open_parent_dir_nosymlinks(a1, v11);
if ( v5 )
{
v4 = unlinkat(v11[0], v5, 0LL);
a1 = v11[0];
if ( (v11[0] & 0x80000000) == 0 )
close(v11[0]);
}
else
{
v4 = -1;
}
}
else
{
v4 = unlink(a1);
}
if ( (a2 & 0x20) != 0 && *(_DWORD *)__errno_location(a1) == 2 )
return 0;
if ( !v4 )
{
if ( (a2 & 0x8000u) != 0LL )
return (unsigned int)-((unsigned int)my_sync_dir_by_file(v3, a2) != 0);
return 0;
}
v6 = (_DWORD *)__errno_location(a1);
v7 = *v6;
*(_DWORD *)my_thread_var(a1) = v7;
if ( (a2 & 0x18) != 0 )
my_error(6, 4, v3, *v6, v8, v9);
return v4;
}
| my_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
BT R14D,0x9
JC 0x001bab2c
MOV RDI,RBX
CALL 0x0012a1d0
MOV R15D,EAX
JMP 0x001bab61
LAB_001bab2c:
LEA RSI,[RBP + -0x2c]
MOV RDI,RBX
CALL 0x001c08b4
TEST RAX,RAX
JZ 0x001bab5b
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,RAX
XOR EDX,EDX
CALL 0x0012aa90
MOV R15D,EAX
MOV EDI,dword ptr [RBP + -0x2c]
TEST EDI,EDI
JS 0x001bab61
CALL 0x0012a1c0
JMP 0x001bab61
LAB_001bab5b:
MOV R15D,0xffffffff
LAB_001bab61:
TEST R14B,0x20
JZ 0x001bab71
CALL 0x0012a870
CMP dword ptr [RAX],0x2
JZ 0x001babaf
LAB_001bab71:
TEST R15D,R15D
JZ 0x001baba9
CALL 0x0012a870
MOV R12,RAX
MOV R13D,dword ptr [RAX]
CALL 0x001c14ee
MOV dword ptr [RAX],R13D
TEST R14B,0x18
JZ 0x001babc7
MOV ECX,dword ptr [R12]
MOV ESI,0x4
MOV EDI,0x6
MOV RDX,RBX
XOR EAX,EAX
CALL 0x001bad7b
JMP 0x001babc7
LAB_001baba9:
TEST R14W,R14W
JS 0x001babb4
LAB_001babaf:
XOR R15D,R15D
JMP 0x001babc7
LAB_001babb4:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001c100f
XOR R15D,R15D
NEG EAX
SBB R15D,R15D
LAB_001babc7:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_delete(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
int8 in_RAX;
char *__name;
int *piVar3;
int *piVar4;
int local_34;
local_34 = (int)((ulong)in_RAX >> 0x20);
if (((uint)param_2 >> 9 & 1) == 0) {
iVar2 = unlink(param_1);
}
else {
__name = (char *)my_open_parent_dir_nosymlinks(param_1,&local_34);
if (__name == (char *)0x0) {
iVar2 = -1;
}
else {
iVar2 = unlinkat(local_34,__name,0);
if (-1 < local_34) {
close(local_34);
}
}
}
if (((param_2 & 0x20) == 0) || (piVar3 = __errno_location(), *piVar3 != 2)) {
if (iVar2 != 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if ((param_2 & 0x18) == 0) {
return iVar2;
}
my_error(6,4,param_1,*piVar3);
return iVar2;
}
if ((short)param_2 < 0) {
iVar2 = my_sync_dir_by_file(param_1,param_2);
return -(uint)(iVar2 != 0);
}
}
return 0;
}
|
|
5,617 | nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>, nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::scan_number() | 7CodeWizard[P]stablediffusion/thirdparty/json.hpp | token_type scan_number() // lgtm [cpp/use-of-goto]
{
// reset token_buffer to store the number's bytes
reset();
// the type of the parsed number; initially set to unsigned; will be
// changed if minus sign, decimal point or exponent is read
token_type number_type = token_type::value_unsigned;
// state (init): we just found out we need to scan a number
switch (current)
{
case '-':
{
add(current);
goto scan_number_minus;
}
case '0':
{
add(current);
goto scan_number_zero;
}
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
// all other characters are rejected outside scan_number()
default: // LCOV_EXCL_LINE
JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE
}
scan_number_minus:
// state: we just parsed a leading minus sign
number_type = token_type::value_integer;
switch (get())
{
case '0':
{
add(current);
goto scan_number_zero;
}
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
default:
{
error_message = "invalid number; expected digit after '-'";
return token_type::parse_error;
}
}
scan_number_zero:
// state: we just parse a zero (maybe with a leading minus sign)
switch (get())
{
case '.':
{
add(decimal_point_char);
goto scan_number_decimal1;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_any1:
// state: we just parsed a number 0-9 (maybe with a leading minus sign)
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
case '.':
{
add(decimal_point_char);
goto scan_number_decimal1;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_decimal1:
// state: we just parsed a decimal point
number_type = token_type::value_float;
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_decimal2;
}
default:
{
error_message = "invalid number; expected digit after '.'";
return token_type::parse_error;
}
}
scan_number_decimal2:
// we just parsed at least one number after a decimal point
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_decimal2;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_exponent:
// we just parsed an exponent
number_type = token_type::value_float;
switch (get())
{
case '+':
case '-':
{
add(current);
goto scan_number_sign;
}
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
{
error_message =
"invalid number; expected '+', '-', or digit after exponent";
return token_type::parse_error;
}
}
scan_number_sign:
// we just parsed an exponent sign
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
{
error_message = "invalid number; expected digit after exponent sign";
return token_type::parse_error;
}
}
scan_number_any2:
// we just parsed a number after the exponent or exponent sign
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
goto scan_number_done;
}
scan_number_done:
// unget the character after the number (we only read it to know that
// we are done scanning a number)
unget();
char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
errno = 0;
// try to parse integers first and fall back to floats
if (number_type == token_type::value_unsigned)
{
const auto x = std::strtoull(token_buffer.data(), &endptr, 10);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
if (errno == 0)
{
value_unsigned = static_cast<number_unsigned_t>(x);
if (value_unsigned == x)
{
return token_type::value_unsigned;
}
}
}
else if (number_type == token_type::value_integer)
{
const auto x = std::strtoll(token_buffer.data(), &endptr, 10);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
if (errno == 0)
{
value_integer = static_cast<number_integer_t>(x);
if (value_integer == x)
{
return token_type::value_integer;
}
}
}
// this code is reached if we parse a floating-point number or if an
// integer conversion above failed
strtof(value_float, token_buffer.data(), &endptr);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
return token_type::value_float;
} | O0 | cpp | nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>, nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::scan_number():
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq 0x58(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xd4c30
movq 0x28(%rsp), %rax
movl $0x5, 0x54(%rsp)
movl 0x14(%rax), %eax
movl %eax, 0x34(%rsp)
subl $0x2d, %eax
je 0xd453c
jmp 0xd4523
movl 0x34(%rsp), %eax
subl $0x30, %eax
je 0xd454b
jmp 0xd452e
movl 0x34(%rsp), %eax
addl $-0x31, %eax
subl $0x9, %eax
jb 0xd455a
jmp 0xd456c
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd4570
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd45d8
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd462e
jmp 0xd456e
jmp 0xd4570
movq 0x28(%rsp), %rdi
movl $0x6, 0x54(%rsp)
callq 0xd4930
movl %eax, %ecx
movl %ecx, 0x24(%rsp)
subl $0x30, %eax
je 0xd459d
jmp 0xd458f
movl 0x24(%rsp), %eax
addl $-0x31, %eax
subl $0x9, %eax
jb 0xd45ac
jmp 0xd45bb
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd45d8
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd462e
movq 0x28(%rsp), %rax
leaq 0xb0a3b(%rip), %rcx # 0x185002
movq %rcx, 0x70(%rax)
movl $0xe, 0x64(%rsp)
jmp 0xd4922
movq 0x28(%rsp), %rdi
callq 0xd4930
movl %eax, %ecx
movl %ecx, 0x20(%rsp)
subl $0x2e, %eax
je 0xd4605
jmp 0xd45ef
movl 0x20(%rsp), %eax
subl $0x45, %eax
je 0xd4617
jmp 0xd45fa
movl 0x20(%rsp), %eax
subl $0x65, %eax
je 0xd4617
jmp 0xd4629
movq 0x28(%rsp), %rdi
movl 0x90(%rdi), %esi
callq 0xd4c90
jmp 0xd4694
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd4731
jmp 0xd4809
movq 0x28(%rsp), %rdi
callq 0xd4930
addl $-0x2e, %eax
movl %eax, %ecx
movq %rcx, 0x18(%rsp)
subl $0x37, %eax
ja 0xd468f
movq 0x18(%rsp), %rax
leaq 0xae5e9(%rip), %rcx # 0x182c3c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd462e
movq 0x28(%rsp), %rdi
movl 0x90(%rdi), %esi
callq 0xd4c90
jmp 0xd4694
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd4731
jmp 0xd4809
movq 0x28(%rsp), %rdi
movl $0x7, 0x54(%rsp)
callq 0xd4930
addl $-0x30, %eax
subl $0x9, %eax
ja 0xd46bf
jmp 0xd46b0
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd46dc
movq 0x28(%rsp), %rax
leaq 0xb0960(%rip), %rcx # 0x18502b
movq %rcx, 0x70(%rax)
movl $0xe, 0x64(%rsp)
jmp 0xd4922
movq 0x28(%rsp), %rdi
callq 0xd4930
movl %eax, %ecx
movl %ecx, %eax
addl $-0x30, %eax
movl %ecx, 0x14(%rsp)
subl $0xa, %eax
jb 0xd470e
jmp 0xd46f8
movl 0x14(%rsp), %eax
subl $0x45, %eax
je 0xd471d
jmp 0xd4703
movl 0x14(%rsp), %eax
subl $0x65, %eax
je 0xd471d
jmp 0xd472c
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd46dc
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd4731
jmp 0xd4809
movq 0x28(%rsp), %rdi
movl $0x7, 0x54(%rsp)
callq 0xd4930
movl %eax, %ecx
movl %ecx, 0x10(%rsp)
subl $0x2b, %eax
je 0xd4769
jmp 0xd4750
movl 0x10(%rsp), %eax
subl $0x2d, %eax
je 0xd4769
jmp 0xd475b
movl 0x10(%rsp), %eax
addl $-0x30, %eax
subl $0xa, %eax
jb 0xd4778
jmp 0xd4787
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd47a4
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd47e4
movq 0x28(%rsp), %rax
leaq 0xb08c1(%rip), %rcx # 0x185054
movq %rcx, 0x70(%rax)
movl $0xe, 0x64(%rsp)
jmp 0xd4922
movq 0x28(%rsp), %rdi
callq 0xd4930
addl $-0x30, %eax
subl $0x9, %eax
ja 0xd47c7
jmp 0xd47b8
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd47e4
movq 0x28(%rsp), %rax
leaq 0xb08bc(%rip), %rcx # 0x18508f
movq %rcx, 0x70(%rax)
movl $0xe, 0x64(%rsp)
jmp 0xd4922
movq 0x28(%rsp), %rdi
callq 0xd4930
addl $-0x30, %eax
subl $0x9, %eax
ja 0xd4807
jmp 0xd47f8
movq 0x28(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xd4c90
jmp 0xd47e4
jmp 0xd4809
movq 0x28(%rsp), %rdi
callq 0xd4a10
movq $0x0, 0x48(%rsp)
callq 0xb090
movl $0x0, (%rax)
cmpl $0x5, 0x54(%rsp)
jne 0xd488d
movq 0x28(%rsp), %rdi
addq $0x50, %rdi
callq 0xb3d0
movq %rax, %rdi
leaq 0x48(%rsp), %rsi
movl $0xa, %edx
callq 0xba10
movq %rax, 0x40(%rsp)
callq 0xb090
cmpl $0x0, (%rax)
jne 0xd488b
movq 0x28(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x80(%rax)
movq 0x80(%rax), %rax
cmpq 0x40(%rsp), %rax
jne 0xd4889
movl $0x5, 0x64(%rsp)
jmp 0xd4922
jmp 0xd488b
jmp 0xd48ec
cmpl $0x6, 0x54(%rsp)
jne 0xd48ea
movq 0x28(%rsp), %rdi
addq $0x50, %rdi
callq 0xb3d0
movq %rax, %rdi
leaq 0x48(%rsp), %rsi
movl $0xa, %edx
callq 0xbef0
movq %rax, 0x38(%rsp)
callq 0xb090
cmpl $0x0, (%rax)
jne 0xd48e8
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rcx
movq %rcx, 0x78(%rax)
movq 0x78(%rax), %rax
cmpq 0x38(%rsp), %rax
jne 0xd48e6
movl $0x6, 0x64(%rsp)
jmp 0xd4922
jmp 0xd48e8
jmp 0xd48ea
jmp 0xd48ec
movq 0x28(%rsp), %rdi
movq %rdi, %rax
addq $0x88, %rax
movq %rax, 0x8(%rsp)
addq $0x50, %rdi
callq 0xb3d0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
leaq 0x48(%rsp), %rdx
callq 0xd4f50
movl $0x7, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE11scan_numberEv:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov rdi, [rsp+68h+var_10]
mov [rsp+68h+var_40], rdi
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE5resetEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::reset(void)
mov rax, [rsp+68h+var_40]
mov [rsp+68h+var_14], 5
mov eax, [rax+14h]
mov [rsp+68h+var_34], eax
sub eax, 2Dh ; '-'
jz short loc_D453C
jmp short $+2
loc_D4523:
mov eax, [rsp+68h+var_34]
sub eax, 30h ; '0'
jz short loc_D454B
jmp short $+2
loc_D452E:
mov eax, [rsp+68h+var_34]
add eax, 0FFFFFFCFh
sub eax, 9
jb short loc_D455A
jmp short loc_D456C
loc_D453C:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D4570
loc_D454B:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D45D8
loc_D455A:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp loc_D462E
loc_D456C:
jmp short $+2
loc_D456E:
jmp short $+2
loc_D4570:
mov rdi, [rsp+68h+var_40]
mov [rsp+68h+var_14], 6
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
mov ecx, eax
mov [rsp+68h+var_44], ecx
sub eax, 30h ; '0'
jz short loc_D459D
jmp short $+2
loc_D458F:
mov eax, [rsp+68h+var_44]
add eax, 0FFFFFFCFh
sub eax, 9
jb short loc_D45AC
jmp short loc_D45BB
loc_D459D:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D45D8
loc_D45AC:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D462E
loc_D45BB:
mov rax, [rsp+68h+var_40]
lea rcx, aInvalidNumberE; "invalid number; expected digit after '-"...
mov [rax+70h], rcx
mov [rsp+68h+var_4], 0Eh
jmp loc_D4922
loc_D45D8:
mov rdi, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
mov ecx, eax
mov [rsp+68h+var_48], ecx
sub eax, 2Eh ; '.'
jz short loc_D4605
jmp short $+2
loc_D45EF:
mov eax, [rsp+68h+var_48]
sub eax, 45h ; 'E'
jz short loc_D4617
jmp short $+2
loc_D45FA:
mov eax, [rsp+68h+var_48]
sub eax, 65h ; 'e'
jz short loc_D4617
jmp short loc_D4629
loc_D4605:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+90h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D4694
loc_D4617:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp loc_D4731
loc_D4629:
jmp loc_D4809
loc_D462E:
mov rdi, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
add eax, 0FFFFFFD2h; switch 56 cases
mov ecx, eax
mov [rsp+68h+var_50], rcx
sub eax, 37h
ja short def_D465A; jumptable 00000000000D465A default case, cases 47,58-68,70-100
mov rax, [rsp+68h+var_50]
lea rcx, jpt_D465A
movsxd rax, ds:(jpt_D465A - 182C3Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_D465C:
mov rdi, [rsp+68h+var_40]; jumptable 00000000000D465A cases 48-57
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D462E
loc_D466B:
mov rdi, [rsp+68h+var_40]; jumptable 00000000000D465A case 46
mov esi, [rdi+90h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D4694
loc_D467D:
mov rdi, [rsp+68h+var_40]; jumptable 00000000000D465A cases 69,101
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp loc_D4731
def_D465A:
jmp loc_D4809; jumptable 00000000000D465A default case, cases 47,58-68,70-100
loc_D4694:
mov rdi, [rsp+68h+var_40]
mov [rsp+68h+var_14], 7
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
add eax, 0FFFFFFD0h
sub eax, 9
ja short loc_D46BF
jmp short $+2
loc_D46B0:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D46DC
loc_D46BF:
mov rax, [rsp+68h+var_40]
lea rcx, aInvalidNumberE_0; "invalid number; expected digit after '."...
mov [rax+70h], rcx
mov [rsp+68h+var_4], 0Eh
jmp loc_D4922
loc_D46DC:
mov rdi, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
mov ecx, eax
mov eax, ecx
add eax, 0FFFFFFD0h
mov [rsp+68h+var_54], ecx
sub eax, 0Ah
jb short loc_D470E
jmp short $+2
loc_D46F8:
mov eax, [rsp+68h+var_54]
sub eax, 45h ; 'E'
jz short loc_D471D
jmp short $+2
loc_D4703:
mov eax, [rsp+68h+var_54]
sub eax, 65h ; 'e'
jz short loc_D471D
jmp short loc_D472C
loc_D470E:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D46DC
loc_D471D:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D4731
loc_D472C:
jmp loc_D4809
loc_D4731:
mov rdi, [rsp+68h+var_40]
mov [rsp+68h+var_14], 7
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
mov ecx, eax
mov [rsp+68h+var_58], ecx
sub eax, 2Bh ; '+'
jz short loc_D4769
jmp short $+2
loc_D4750:
mov eax, [rsp+68h+var_58]
sub eax, 2Dh ; '-'
jz short loc_D4769
jmp short $+2
loc_D475B:
mov eax, [rsp+68h+var_58]
add eax, 0FFFFFFD0h
sub eax, 0Ah
jb short loc_D4778
jmp short loc_D4787
loc_D4769:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D47A4
loc_D4778:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D47E4
loc_D4787:
mov rax, [rsp+68h+var_40]
lea rcx, aInvalidNumberE_1; "invalid number; expected '+', '-', or d"...
mov [rax+70h], rcx
mov [rsp+68h+var_4], 0Eh
jmp loc_D4922
loc_D47A4:
mov rdi, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
add eax, 0FFFFFFD0h
sub eax, 9
ja short loc_D47C7
jmp short $+2
loc_D47B8:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D47E4
loc_D47C7:
mov rax, [rsp+68h+var_40]
lea rcx, aInvalidNumberE_2; "invalid number; expected digit after ex"...
mov [rax+70h], rcx
mov [rsp+68h+var_4], 0Eh
jmp loc_D4922
loc_D47E4:
mov rdi, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
add eax, 0FFFFFFD0h
sub eax, 9
ja short loc_D4807
jmp short $+2
loc_D47F8:
mov rdi, [rsp+68h+var_40]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3addEi; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(int)
jmp short loc_D47E4
loc_D4807:
jmp short $+2
loc_D4809:
mov rdi, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE5ungetEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::unget(void)
mov [rsp+68h+var_20], 0
call ___errno_location
mov dword ptr [rax], 0
cmp [rsp+68h+var_14], 5
jnz short loc_D488D
mov rdi, [rsp+68h+var_40]
add rdi, 50h ; 'P'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void)
mov rdi, rax
lea rsi, [rsp+68h+var_20]
mov edx, 0Ah
call _strtoull
mov [rsp+68h+var_28], rax
call ___errno_location
cmp dword ptr [rax], 0
jnz short loc_D488B
mov rax, [rsp+68h+var_40]
mov rcx, [rsp+68h+var_28]
mov [rax+80h], rcx
mov rax, [rax+80h]
cmp rax, [rsp+68h+var_28]
jnz short loc_D4889
mov [rsp+68h+var_4], 5
jmp loc_D4922
loc_D4889:
jmp short $+2
loc_D488B:
jmp short loc_D48EC
loc_D488D:
cmp [rsp+68h+var_14], 6
jnz short loc_D48EA
mov rdi, [rsp+68h+var_40]
add rdi, 50h ; 'P'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void)
mov rdi, rax
lea rsi, [rsp+68h+var_20]
mov edx, 0Ah
call strtoll
mov [rsp+68h+var_30], rax
call ___errno_location
cmp dword ptr [rax], 0
jnz short loc_D48E8
mov rax, [rsp+68h+var_40]
mov rcx, [rsp+68h+var_30]
mov [rax+78h], rcx
mov rax, [rax+78h]
cmp rax, [rsp+68h+var_30]
jnz short loc_D48E6
mov [rsp+68h+var_4], 6
jmp short loc_D4922
loc_D48E6:
jmp short $+2
loc_D48E8:
jmp short $+2
loc_D48EA:
jmp short $+2
loc_D48EC:
mov rdi, [rsp+68h+var_40]
mov rax, rdi
add rax, 88h
mov [rsp+68h+var_60], rax
add rdi, 50h ; 'P'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void)
mov rdi, [rsp+68h+var_60]
mov rsi, rax
lea rdx, [rsp+68h+var_20]
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE6strtofERdSI_PPc; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::strtof(double &,char const*,char **)
mov [rsp+68h+var_4], 7
loc_D4922:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
| long long nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::scan_number(
long long a1)
{
int v1; // eax
long long v2; // rax
long long v3; // rax
long long v4; // rax
int v6; // [rsp+10h] [rbp-58h]
int v7; // [rsp+14h] [rbp-54h]
int v8; // [rsp+20h] [rbp-48h]
int v9; // [rsp+24h] [rbp-44h]
int v10; // [rsp+34h] [rbp-34h]
long long v11; // [rsp+38h] [rbp-30h]
long long v12; // [rsp+40h] [rbp-28h]
long long v13; // [rsp+48h] [rbp-20h] BYREF
int v14; // [rsp+54h] [rbp-14h]
long long v15; // [rsp+58h] [rbp-10h]
v15 = a1;
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::reset();
v14 = 5;
v10 = *(_DWORD *)(a1 + 20);
if ( v10 == 45 )
{
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(
a1,
*(unsigned int *)(a1 + 20));
}
else
{
if ( v10 == 48 )
{
LABEL_6:
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(
a1,
*(unsigned int *)(a1 + 20));
v8 = nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(a1);
if ( v8 == 46 )
{
LABEL_17:
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(
a1,
*(unsigned int *)(a1 + 144));
v14 = 7;
if ( (unsigned int)nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(a1)
- 48 > 9 )
{
*(_QWORD *)(a1 + 112) = "invalid number; expected digit after '.'";
return 14;
}
do
{
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(
a1,
*(unsigned int *)(a1 + 20));
v7 = nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(a1);
}
while ( (unsigned int)(v7 - 48) < 0xA );
if ( v7 != 69 && v7 != 101 )
{
LABEL_39:
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::unget(a1);
v13 = 0LL;
*(_DWORD *)__errno_location() = 0;
if ( v14 == 5 )
{
v2 = std::string::data(a1 + 80);
v12 = strtoull(v2, &v13, 10LL);
if ( !*(_DWORD *)__errno_location() )
{
*(_QWORD *)(a1 + 128) = v12;
if ( *(_QWORD *)(a1 + 128) == v12 )
return 5;
}
}
else if ( v14 == 6 )
{
v3 = std::string::data(a1 + 80);
v11 = strtoll(v3, &v13, 10LL);
if ( !*(_DWORD *)__errno_location() )
{
*(_QWORD *)(a1 + 120) = v11;
if ( *(_QWORD *)(a1 + 120) == v11 )
return 6;
}
}
v4 = std::string::data(a1 + 80);
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::strtof(
a1 + 136,
v4,
&v13);
return 7;
}
}
else if ( v8 != 69 && v8 != 101 )
{
goto LABEL_39;
}
LABEL_29:
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(
a1,
*(unsigned int *)(a1 + 20));
v14 = 7;
v6 = nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(a1);
if ( v6 == 43 || v6 == 45 )
{
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(
a1,
*(unsigned int *)(a1 + 20));
v1 = nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(a1);
if ( (unsigned int)(v1 - 48) > 9 )
{
*(_QWORD *)(a1 + 112) = "invalid number; expected digit after exponent sign";
return 14;
}
}
else if ( (unsigned int)(v6 - 48) >= 0xA )
{
*(_QWORD *)(a1 + 112) = "invalid number; expected '+', '-', or digit after exponent";
return 14;
}
do
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(
a1,
*(unsigned int *)(a1 + 20));
while ( (unsigned int)nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(a1)
- 48 <= 9 );
goto LABEL_39;
}
if ( (unsigned int)(v10 - 49) < 9 )
{
LABEL_20:
while ( 2 )
{
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::add(
a1,
*(unsigned int *)(a1 + 20));
switch ( (unsigned int)nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(a1) )
{
case '.':
goto LABEL_17;
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
continue;
case 'E':
case 'e':
goto LABEL_29;
default:
goto LABEL_39;
}
}
}
}
v14 = 6;
v9 = nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(a1);
if ( v9 == 48 )
goto LABEL_6;
if ( (unsigned int)(v9 - 49) < 9 )
goto LABEL_20;
*(_QWORD *)(a1 + 112) = "invalid number; expected digit after '-'";
return 14;
}
| scan_number:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV RDI,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x001d4c30
MOV RAX,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x54],0x5
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RSP + 0x34],EAX
SUB EAX,0x2d
JZ 0x001d453c
JMP 0x001d4523
LAB_001d4523:
MOV EAX,dword ptr [RSP + 0x34]
SUB EAX,0x30
JZ 0x001d454b
JMP 0x001d452e
LAB_001d452e:
MOV EAX,dword ptr [RSP + 0x34]
ADD EAX,-0x31
SUB EAX,0x9
JC 0x001d455a
JMP 0x001d456c
LAB_001d453c:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d4570
LAB_001d454b:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d45d8
LAB_001d455a:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d462e
LAB_001d456c:
JMP 0x001d456e
LAB_001d456e:
JMP 0x001d4570
LAB_001d4570:
MOV RDI,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x54],0x6
CALL 0x001d4930
MOV ECX,EAX
MOV dword ptr [RSP + 0x24],ECX
SUB EAX,0x30
JZ 0x001d459d
JMP 0x001d458f
LAB_001d458f:
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,-0x31
SUB EAX,0x9
JC 0x001d45ac
JMP 0x001d45bb
LAB_001d459d:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d45d8
LAB_001d45ac:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d462e
LAB_001d45bb:
MOV RAX,qword ptr [RSP + 0x28]
LEA RCX,[0x285002]
MOV qword ptr [RAX + 0x70],RCX
MOV dword ptr [RSP + 0x64],0xe
JMP 0x001d4922
LAB_001d45d8:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001d4930
MOV ECX,EAX
MOV dword ptr [RSP + 0x20],ECX
SUB EAX,0x2e
JZ 0x001d4605
JMP 0x001d45ef
LAB_001d45ef:
MOV EAX,dword ptr [RSP + 0x20]
SUB EAX,0x45
JZ 0x001d4617
JMP 0x001d45fa
LAB_001d45fa:
MOV EAX,dword ptr [RSP + 0x20]
SUB EAX,0x65
JZ 0x001d4617
JMP 0x001d4629
LAB_001d4605:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x90]
CALL 0x001d4c90
JMP 0x001d4694
LAB_001d4617:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d4731
LAB_001d4629:
JMP 0x001d4809
LAB_001d462e:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001d4930
ADD EAX,-0x2e
MOV ECX,EAX
MOV qword ptr [RSP + 0x18],RCX
SUB EAX,0x37
JA 0x001d468f
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[0x282c3c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_30:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d462e
caseD_2e:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x90]
CALL 0x001d4c90
JMP 0x001d4694
caseD_45:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d4731
caseD_2f:
JMP 0x001d4809
LAB_001d4694:
MOV RDI,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x54],0x7
CALL 0x001d4930
ADD EAX,-0x30
SUB EAX,0x9
JA 0x001d46bf
JMP 0x001d46b0
LAB_001d46b0:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d46dc
LAB_001d46bf:
MOV RAX,qword ptr [RSP + 0x28]
LEA RCX,[0x28502b]
MOV qword ptr [RAX + 0x70],RCX
MOV dword ptr [RSP + 0x64],0xe
JMP 0x001d4922
LAB_001d46dc:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001d4930
MOV ECX,EAX
MOV EAX,ECX
ADD EAX,-0x30
MOV dword ptr [RSP + 0x14],ECX
SUB EAX,0xa
JC 0x001d470e
JMP 0x001d46f8
LAB_001d46f8:
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,0x45
JZ 0x001d471d
JMP 0x001d4703
LAB_001d4703:
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,0x65
JZ 0x001d471d
JMP 0x001d472c
LAB_001d470e:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d46dc
LAB_001d471d:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d4731
LAB_001d472c:
JMP 0x001d4809
LAB_001d4731:
MOV RDI,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x54],0x7
CALL 0x001d4930
MOV ECX,EAX
MOV dword ptr [RSP + 0x10],ECX
SUB EAX,0x2b
JZ 0x001d4769
JMP 0x001d4750
LAB_001d4750:
MOV EAX,dword ptr [RSP + 0x10]
SUB EAX,0x2d
JZ 0x001d4769
JMP 0x001d475b
LAB_001d475b:
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,-0x30
SUB EAX,0xa
JC 0x001d4778
JMP 0x001d4787
LAB_001d4769:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d47a4
LAB_001d4778:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d47e4
LAB_001d4787:
MOV RAX,qword ptr [RSP + 0x28]
LEA RCX,[0x285054]
MOV qword ptr [RAX + 0x70],RCX
MOV dword ptr [RSP + 0x64],0xe
JMP 0x001d4922
LAB_001d47a4:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001d4930
ADD EAX,-0x30
SUB EAX,0x9
JA 0x001d47c7
JMP 0x001d47b8
LAB_001d47b8:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d47e4
LAB_001d47c7:
MOV RAX,qword ptr [RSP + 0x28]
LEA RCX,[0x28508f]
MOV qword ptr [RAX + 0x70],RCX
MOV dword ptr [RSP + 0x64],0xe
JMP 0x001d4922
LAB_001d47e4:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001d4930
ADD EAX,-0x30
SUB EAX,0x9
JA 0x001d4807
JMP 0x001d47f8
LAB_001d47f8:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x001d4c90
JMP 0x001d47e4
LAB_001d4807:
JMP 0x001d4809
LAB_001d4809:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001d4a10
MOV qword ptr [RSP + 0x48],0x0
CALL 0x0010b090
MOV dword ptr [RAX],0x0
CMP dword ptr [RSP + 0x54],0x5
JNZ 0x001d488d
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x50
CALL 0x0010b3d0
MOV RDI,RAX
LEA RSI,[RSP + 0x48]
MOV EDX,0xa
CALL 0x0010ba10
MOV qword ptr [RSP + 0x40],RAX
CALL 0x0010b090
CMP dword ptr [RAX],0x0
JNZ 0x001d488b
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX + 0x80],RCX
MOV RAX,qword ptr [RAX + 0x80]
CMP RAX,qword ptr [RSP + 0x40]
JNZ 0x001d4889
MOV dword ptr [RSP + 0x64],0x5
JMP 0x001d4922
LAB_001d4889:
JMP 0x001d488b
LAB_001d488b:
JMP 0x001d48ec
LAB_001d488d:
CMP dword ptr [RSP + 0x54],0x6
JNZ 0x001d48ea
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x50
CALL 0x0010b3d0
MOV RDI,RAX
LEA RSI,[RSP + 0x48]
MOV EDX,0xa
CALL 0x0010bef0
MOV qword ptr [RSP + 0x38],RAX
CALL 0x0010b090
CMP dword ptr [RAX],0x0
JNZ 0x001d48e8
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x78],RCX
MOV RAX,qword ptr [RAX + 0x78]
CMP RAX,qword ptr [RSP + 0x38]
JNZ 0x001d48e6
MOV dword ptr [RSP + 0x64],0x6
JMP 0x001d4922
LAB_001d48e6:
JMP 0x001d48e8
LAB_001d48e8:
JMP 0x001d48ea
LAB_001d48ea:
JMP 0x001d48ec
LAB_001d48ec:
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,RDI
ADD RAX,0x88
MOV qword ptr [RSP + 0x8],RAX
ADD RDI,0x50
CALL 0x0010b3d0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
LEA RDX,[RSP + 0x48]
CALL 0x001d4f50
MOV dword ptr [RSP + 0x64],0x7
LAB_001d4922:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
/* nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> > >, nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>
>::scan_number() */
int4 __thiscall
nlohmann::json_abi_v3_11_2::detail::
lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char_const*>>
::scan_number(lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char_const*>>
*this)
{
int iVar1;
int4 uVar2;
int *piVar3;
char *pcVar4;
ulonglong uVar5;
longlong lVar6;
int iVar7;
char *local_20;
int local_14;
lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char_const*>>
*local_10;
local_10 = this;
reset(this);
local_14 = 5;
iVar1 = *(int *)(this + 0x14);
iVar7 = (int)this;
if (iVar1 == 0x2d) {
add(iVar7);
LAB_001d4570:
local_14 = 6;
iVar1 = get(this);
if (iVar1 != 0x30) {
if (8 < iVar1 - 0x31U) {
*(char **)(this + 0x70) = "invalid number; expected digit after \'-\'";
return 0xe;
}
add(iVar7);
LAB_001d462e:
do {
uVar2 = get(this);
switch(uVar2) {
case 0x2e:
goto switchD_001d465a_caseD_2e;
default:
goto LAB_001d4809;
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
add(iVar7);
break;
case 0x45:
case 0x65:
add(iVar7);
goto LAB_001d4731;
}
} while( true );
}
add(iVar7);
}
else {
if (iVar1 != 0x30) {
if (iVar1 - 0x31U < 9) {
add(iVar7);
goto LAB_001d462e;
}
goto LAB_001d4570;
}
add(iVar7);
}
iVar1 = get(this);
if (iVar1 == 0x2e) {
add(iVar7);
goto LAB_001d4694;
}
if ((iVar1 != 0x45) && (iVar1 != 0x65)) goto LAB_001d4809;
add(iVar7);
goto LAB_001d4731;
switchD_001d465a_caseD_2e:
add(iVar7);
LAB_001d4694:
local_14 = 7;
iVar1 = get(this);
if (9 < iVar1 - 0x30U) {
*(char **)(this + 0x70) = "invalid number; expected digit after \'.\'";
return 0xe;
}
add(iVar7);
while (iVar1 = get(this), iVar1 - 0x30U < 10) {
add(iVar7);
}
if ((iVar1 != 0x45) && (iVar1 != 0x65)) goto LAB_001d4809;
add(iVar7);
LAB_001d4731:
local_14 = 7;
iVar1 = get(this);
if ((iVar1 == 0x2b) || (iVar1 == 0x2d)) {
add(iVar7);
iVar1 = get(this);
if (9 < iVar1 - 0x30U) {
*(char **)(this + 0x70) = "invalid number; expected digit after exponent sign";
return 0xe;
}
add(iVar7);
}
else {
if (9 < iVar1 - 0x30U) {
*(char **)(this + 0x70) = "invalid number; expected \'+\', \'-\', or digit after exponent";
return 0xe;
}
add(iVar7);
}
while (iVar1 = get(this), iVar1 - 0x30U < 10) {
add(iVar7);
}
LAB_001d4809:
unget(this);
local_20 = (char *)0x0;
piVar3 = __errno_location();
*piVar3 = 0;
if (local_14 == 5) {
pcVar4 = (char *)std::__cxx11::string::data();
uVar5 = strtoull(pcVar4,&local_20,10);
piVar3 = __errno_location();
if ((*piVar3 == 0) &&
(*(ulonglong *)(this + 0x80) = uVar5, *(ulonglong *)(this + 0x80) == uVar5)) {
return 5;
}
}
else if (local_14 == 6) {
pcVar4 = (char *)std::__cxx11::string::data();
lVar6 = strtoll(pcVar4,&local_20,10);
piVar3 = __errno_location();
if ((*piVar3 == 0) && (*(longlong *)(this + 0x78) = lVar6, *(long *)(this + 0x78) == lVar6)) {
return 6;
}
}
pcVar4 = (char *)std::__cxx11::string::data();
strtof((double *)(this + 0x88),pcVar4,&local_20);
return 7;
}
|
|
5,618 | nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>, nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::scan_number() | 7CodeWizard[P]stablediffusion/thirdparty/json.hpp | token_type scan_number() // lgtm [cpp/use-of-goto]
{
// reset token_buffer to store the number's bytes
reset();
// the type of the parsed number; initially set to unsigned; will be
// changed if minus sign, decimal point or exponent is read
token_type number_type = token_type::value_unsigned;
// state (init): we just found out we need to scan a number
switch (current)
{
case '-':
{
add(current);
goto scan_number_minus;
}
case '0':
{
add(current);
goto scan_number_zero;
}
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
// all other characters are rejected outside scan_number()
default: // LCOV_EXCL_LINE
JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE
}
scan_number_minus:
// state: we just parsed a leading minus sign
number_type = token_type::value_integer;
switch (get())
{
case '0':
{
add(current);
goto scan_number_zero;
}
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
default:
{
error_message = "invalid number; expected digit after '-'";
return token_type::parse_error;
}
}
scan_number_zero:
// state: we just parse a zero (maybe with a leading minus sign)
switch (get())
{
case '.':
{
add(decimal_point_char);
goto scan_number_decimal1;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_any1:
// state: we just parsed a number 0-9 (maybe with a leading minus sign)
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
case '.':
{
add(decimal_point_char);
goto scan_number_decimal1;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_decimal1:
// state: we just parsed a decimal point
number_type = token_type::value_float;
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_decimal2;
}
default:
{
error_message = "invalid number; expected digit after '.'";
return token_type::parse_error;
}
}
scan_number_decimal2:
// we just parsed at least one number after a decimal point
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_decimal2;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_exponent:
// we just parsed an exponent
number_type = token_type::value_float;
switch (get())
{
case '+':
case '-':
{
add(current);
goto scan_number_sign;
}
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
{
error_message =
"invalid number; expected '+', '-', or digit after exponent";
return token_type::parse_error;
}
}
scan_number_sign:
// we just parsed an exponent sign
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
{
error_message = "invalid number; expected digit after exponent sign";
return token_type::parse_error;
}
}
scan_number_any2:
// we just parsed a number after the exponent or exponent sign
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
goto scan_number_done;
}
scan_number_done:
// unget the character after the number (we only read it to know that
// we are done scanning a number)
unget();
char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
errno = 0;
// try to parse integers first and fall back to floats
if (number_type == token_type::value_unsigned)
{
const auto x = std::strtoull(token_buffer.data(), &endptr, 10);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
if (errno == 0)
{
value_unsigned = static_cast<number_unsigned_t>(x);
if (value_unsigned == x)
{
return token_type::value_unsigned;
}
}
}
else if (number_type == token_type::value_integer)
{
const auto x = std::strtoll(token_buffer.data(), &endptr, 10);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
if (errno == 0)
{
value_integer = static_cast<number_integer_t>(x);
if (value_integer == x)
{
return token_type::value_integer;
}
}
}
// this code is reached if we parse a floating-point number or if an
// integer conversion above failed
strtof(value_float, token_buffer.data(), &endptr);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
return token_type::value_float;
} | O1 | cpp | nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>, nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::scan_number():
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x71c56
movl 0x14(%rbx), %eax
movl $0x5, %ebp
leal -0x31(%rax), %ecx
cmpl $0x9, %ecx
jae 0x71a38
leaq 0x50(%rbx), %r14
movsbl %al, %esi
movq %r14, %rdi
callq 0xa4f0
movq %rbx, %rdi
callq 0xbab2
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jae 0x719e7
movsbl 0x14(%rbx), %esi
jmp 0x719c9
cmpl $0x2e, %eax
je 0x71afe
cmpl $0x45, %eax
je 0x719fe
cmpl $0x65, %eax
jne 0x71b69
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0xa4f0
movq %rbx, %rdi
callq 0xbab2
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x71a7d
cmpl $0x2d, %eax
je 0x71c0e
cmpl $0x2b, %eax
je 0x71c0e
leaq 0x51551(%rip), %rax # 0xc2f84
jmp 0x71b28
cmpl $0x30, %eax
je 0x71acb
cmpl $0x2d, %eax
jne 0x71a54
leaq 0x50(%rbx), %rdi
movl $0x2d, %esi
callq 0xa4f0
movq %rbx, %rdi
callq 0xbab2
leal -0x31(%rax), %ecx
cmpl $0x9, %ecx
jb 0x71bf6
cmpl $0x30, %eax
je 0x71c3e
leaq 0x514ba(%rip), %rax # 0xc2f32
jmp 0x71b28
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0xa4f0
movq %rbx, %rdi
callq 0xbab2
addl $-0x30, %eax
movl $0x7, %ebp
cmpl $0x9, %eax
ja 0x71b69
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0xa4f0
movq %rbx, %rdi
callq 0xbab2
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x71aaa
jmp 0x71b69
leaq 0x50(%rbx), %rdi
movl $0x30, %esi
callq 0xa4f0
movl $0x5, %ebp
movq %rbx, %rdi
callq 0xbab2
cmpl $0x2e, %eax
je 0x71afe
cmpl $0x65, %eax
je 0x71af5
cmpl $0x45, %eax
jne 0x71b69
leaq 0x50(%rbx), %r14
jmp 0x719fe
movsbl 0x90(%rbx), %esi
leaq 0x50(%rbx), %r14
movq %r14, %rdi
callq 0xa4f0
movq %rbx, %rdi
callq 0xbab2
addl $-0x30, %eax
cmpl $0x9, %eax
jbe 0x71b36
leaq 0x51433(%rip), %rax # 0xc2f5b
movq %rax, 0x70(%rbx)
movl $0xe, %eax
jmp 0x71bed
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0xa4f0
movq %rbx, %rdi
callq 0xbab2
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x71b36
cmpl $0x65, %eax
je 0x719fe
cmpl $0x45, %eax
je 0x719fe
movl $0x7, %ebp
movq %rbx, %rdi
callq 0xbb22
movq $0x0, 0x8(%rsp)
callq 0xa070
movq %rax, %r14
movl $0x0, (%rax)
cmpl $0x6, %ebp
je 0x71bb9
cmpl $0x5, %ebp
jne 0x71bd2
movq 0x50(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0xa7d0
cmpl $0x0, (%r14)
jne 0x71bd2
movq %rax, 0x80(%rbx)
movl $0x5, %eax
jmp 0x71bed
movq 0x50(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0xa0b0
cmpl $0x0, (%r14)
je 0x71c03
movq 0x50(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xa470
movsd %xmm0, 0x88(%rbx)
movl $0x7, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl 0x14(%rbx), %eax
movl $0x6, %ebp
jmp 0x719c2
movq %rax, 0x78(%rbx)
movl $0x6, %eax
jmp 0x71bed
movsbl 0x14(%rbx), %esi
leaq 0x50(%rbx), %r14
movq %r14, %rdi
callq 0xa4f0
movq %rbx, %rdi
callq 0xbab2
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x71a81
leaq 0x51386(%rip), %rax # 0xc2fbf
jmp 0x71b28
movsbl 0x14(%rbx), %esi
leaq 0x50(%rbx), %rdi
callq 0xa4f0
movl $0x6, %ebp
jmp 0x71ade
nop
| _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE11scan_numberEv:
push rbp
push r14
push rbx
sub rsp, 10h
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE5resetEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::reset(void)
mov eax, [rbx+14h]
mov ebp, 5
lea ecx, [rax-31h]
cmp ecx, 9
jnb short loc_71A38
loc_719C2:
lea r14, [rbx+50h]
movsx esi, al
loc_719C9:
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jnb short loc_719E7
movsx esi, byte ptr [rbx+14h]
jmp short loc_719C9
loc_719E7:
cmp eax, 2Eh ; '.'
jz loc_71AFE
cmp eax, 45h ; 'E'
jz short loc_719FE
cmp eax, 65h ; 'e'
jnz loc_71B69
loc_719FE:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jb short loc_71A7D
cmp eax, 2Dh ; '-'
jz loc_71C0E
cmp eax, 2Bh ; '+'
jz loc_71C0E
lea rax, aInvalidNumberE; "invalid number; expected '+', '-', or d"...
jmp loc_71B28
loc_71A38:
cmp eax, 30h ; '0'
jz loc_71ACB
cmp eax, 2Dh ; '-'
jnz short loc_71A54
lea rdi, [rbx+50h]
mov esi, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
loc_71A54:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
lea ecx, [rax-31h]
cmp ecx, 9
jb loc_71BF6
cmp eax, 30h ; '0'
jz loc_71C3E
lea rax, aInvalidNumberE_0; "invalid number; expected digit after '-"...
jmp loc_71B28
loc_71A7D:
lea r14, [rbx+50h]
loc_71A81:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
add eax, 0FFFFFFD0h
mov ebp, 7
cmp eax, 9
ja loc_71B69
lea r14, [rbx+50h]
loc_71AAA:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 0Ah
jb short loc_71AAA
jmp loc_71B69
loc_71ACB:
lea rdi, [rbx+50h]
mov esi, 30h ; '0'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov ebp, 5
loc_71ADE:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
cmp eax, 2Eh ; '.'
jz short loc_71AFE
cmp eax, 65h ; 'e'
jz short loc_71AF5
cmp eax, 45h ; 'E'
jnz short loc_71B69
loc_71AF5:
lea r14, [rbx+50h]
jmp loc_719FE
loc_71AFE:
movsx esi, byte ptr [rbx+90h]
lea r14, [rbx+50h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 9
jbe short loc_71B36
lea rax, aInvalidNumberE_1; "invalid number; expected digit after '."...
loc_71B28:
mov [rbx+70h], rax
mov eax, 0Eh
jmp loc_71BED
loc_71B36:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jb short loc_71B36
cmp eax, 65h ; 'e'
jz loc_719FE
cmp eax, 45h ; 'E'
jz loc_719FE
mov ebp, 7
loc_71B69:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE5ungetEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::unget(void)
mov [rsp+28h+var_20], 0
call ___errno_location
mov r14, rax
mov dword ptr [rax], 0
cmp ebp, 6
jz short loc_71BB9
cmp ebp, 5
jnz short loc_71BD2
mov rdi, [rbx+50h]
lea rsi, [rsp+28h+var_20]
mov edx, 0Ah
call _strtoull
cmp dword ptr [r14], 0
jnz short loc_71BD2
mov [rbx+80h], rax
mov eax, 5
jmp short loc_71BED
loc_71BB9:
mov rdi, [rbx+50h]
lea rsi, [rsp+28h+var_20]
mov edx, 0Ah
call _strtoll
cmp dword ptr [r14], 0
jz short loc_71C03
loc_71BD2:
mov rdi, [rbx+50h]
lea rsi, [rsp+28h+var_20]
call _strtod
movsd qword ptr [rbx+88h], xmm0
mov eax, 7
loc_71BED:
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_71BF6:
mov eax, [rbx+14h]
mov ebp, 6
jmp loc_719C2
loc_71C03:
mov [rbx+78h], rax
mov eax, 6
jmp short loc_71BED
loc_71C0E:
movsx esi, byte ptr [rbx+14h]
lea r14, [rbx+50h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 0Ah
jb loc_71A81
lea rax, aInvalidNumberE_2; "invalid number; expected digit after ex"...
jmp loc_71B28
loc_71C3E:
movsx esi, byte ptr [rbx+14h]
lea rdi, [rbx+50h]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov ebp, 6
jmp loc_71ADE
| long long nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::scan_number(
long long a1)
{
int v1; // eax
int v2; // ebp
long long v3; // r14
long long i; // rsi
int v5; // eax
int v6; // eax
const char *v7; // rax
int v8; // eax
long long v9; // r14
int v10; // eax
int v12; // eax
_DWORD *v13; // r14
long long v14; // rax
long long v15; // rax
_QWORD v16[4]; // [rsp+8h] [rbp-20h] BYREF
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::reset();
v1 = *(_DWORD *)(a1 + 20);
v2 = 5;
if ( (unsigned int)(v1 - 49) < 9 )
{
LABEL_2:
v3 = a1 + 80;
for ( i = (unsigned int)(char)v1; ; i = (unsigned int)*(char *)(a1 + 20) )
{
std::string::push_back(a1 + 80, i);
v5 = nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1);
if ( (unsigned int)(v5 - 48) >= 0xA )
break;
}
if ( v5 != 46 )
{
if ( v5 != 69 && v5 != 101 )
goto LABEL_34;
goto LABEL_8;
}
goto LABEL_27;
}
if ( v1 == 48 )
{
std::string::push_back(a1 + 80, 48LL);
v2 = 5;
}
else
{
if ( v1 == 45 )
std::string::push_back(a1 + 80, 45LL);
v8 = nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1);
if ( (unsigned int)(v8 - 49) < 9 )
{
v1 = *(_DWORD *)(a1 + 20);
v2 = 6;
goto LABEL_2;
}
if ( v8 != 48 )
{
v7 = "invalid number; expected digit after '-'";
goto LABEL_29;
}
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
v2 = 6;
}
v10 = nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1);
if ( v10 == 46 )
{
LABEL_27:
v3 = a1 + 80;
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 144));
if ( (unsigned int)nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1)
- 48 > 9 )
{
v7 = "invalid number; expected digit after '.'";
goto LABEL_29;
}
do
{
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
v12 = nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1);
}
while ( (unsigned int)(v12 - 48) < 0xA );
if ( v12 != 101 && v12 != 69 )
{
v2 = 7;
goto LABEL_34;
}
goto LABEL_8;
}
if ( v10 != 101 && v10 != 69 )
goto LABEL_34;
v3 = a1 + 80;
LABEL_8:
std::string::push_back(v3, (unsigned int)*(char *)(a1 + 20));
v6 = nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1);
if ( (unsigned int)(v6 - 48) < 0xA )
{
v9 = a1 + 80;
}
else
{
if ( v6 != 45 && v6 != 43 )
{
v7 = "invalid number; expected '+', '-', or digit after exponent";
LABEL_29:
*(_QWORD *)(a1 + 112) = v7;
return 14LL;
}
v9 = a1 + 80;
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
if ( (unsigned int)nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1)
- 48 >= 0xA )
{
v7 = "invalid number; expected digit after exponent sign";
goto LABEL_29;
}
}
std::string::push_back(v9, (unsigned int)*(char *)(a1 + 20));
v2 = 7;
if ( (unsigned int)nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1)
- 48 <= 9 )
{
do
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
while ( (unsigned int)nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1)
- 48 < 0xA );
}
LABEL_34:
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::unget(a1);
v16[0] = 0LL;
v13 = (_DWORD *)__errno_location();
*v13 = 0;
if ( v2 != 6 )
{
if ( v2 == 5 )
{
v14 = strtoull(*(_QWORD *)(a1 + 80), v16, 10LL);
if ( !*v13 )
{
*(_QWORD *)(a1 + 128) = v14;
return 5LL;
}
}
goto LABEL_39;
}
v15 = strtoll(*(_QWORD *)(a1 + 80), v16, 10LL);
if ( *v13 )
{
LABEL_39:
*(double *)(a1 + 136) = strtod(*(_QWORD *)(a1 + 80), v16);
return 7LL;
}
*(_QWORD *)(a1 + 120) = v15;
return 6LL;
}
| |||
5,619 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [7], 0>(char const (&) [7]) const | monkey531[P]llama/common/./json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | 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> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [7], 0>(char const (&) [7]) const:
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq 0xc0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xa65b0
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x218c58
jmp 0x218d34
movb $0x1, 0x83(%rsp)
movl $0x20, %edi
callq 0x64880
movq 0x20(%rsp), %rdi
movq %rax, 0x18(%rsp)
callq 0xe1250
movq %rax, 0x90(%rsp)
leaq 0xca181(%rip), %rsi # 0x2e2e09
leaq 0x98(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x13dd10
jmp 0x218c9f
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x130, %esi # imm = 0x130
leaq 0x98(%rsp), %rdx
callq 0xe0ff0
jmp 0x218cbd
movq 0x18(%rsp), %rdi
movb $0x0, 0x83(%rsp)
leaq 0x19da2f(%rip), %rsi # 0x3b6700
leaq -0x1384f8(%rip), %rdx # 0xe07e0
callq 0x64d60
jmp 0x218eb1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x218d19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x65a60
testb $0x1, 0x83(%rsp)
jne 0x218d25
jmp 0x218d2f
movq 0x18(%rsp), %rdi
callq 0x652b0
jmp 0x218ea4
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0xb8(%rsp), %rsi
callq 0x221ab0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x78(%rsp)
movq 0x8(%rax), %rdi
callq 0xa6370
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x13ddc0
testb $0x1, %al
jne 0x218d7d
jmp 0x218e8e
movb $0x1, 0x2e(%rsp)
movl $0x20, %edi
callq 0x64880
movq %rax, (%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x2f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x654b0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x98e10
jmp 0x218dc2
leaq 0xca056(%rip), %rsi # 0x2e2e1f
leaq 0xca055(%rip), %rcx # 0x2e2e25
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x14e3c0
jmp 0x218de1
movq 0x20(%rsp), %rcx
movq (%rsp), %rdi
movl $0x193, %esi # imm = 0x193
leaq 0x50(%rsp), %rdx
callq 0x13de00
jmp 0x218dfb
movq (%rsp), %rdi
movb $0x0, 0x2e(%rsp)
leaq 0x19ddfd(%rip), %rsi # 0x3b6c08
leaq -0xdada2(%rip), %rdx # 0x13e070
callq 0x64d60
jmp 0x218eb1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x218e70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x218e66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x65a60
leaq 0x30(%rsp), %rdi
callq 0x65a60
leaq 0x2f(%rsp), %rdi
callq 0x65a30
testb $0x1, 0x2e(%rsp)
jne 0x218e83
jmp 0x218e8c
movq (%rsp), %rdi
callq 0x652b0
jmp 0x218ea4
leaq 0x78(%rsp), %rdi
callq 0xe40c0
addq $0x20, %rax
addq $0xc8, %rsp
retq
movq 0x88(%rsp), %rdi
callq 0x64e40
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
sub rsp, 0C8h
mov [rsp+0C8h+var_8], rdi
mov qword ptr [rsp+0C8h+var_10], rsi
mov rdi, [rsp+0C8h+var_8]
mov [rsp+0C8h+var_A8], rdi; int
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void)
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_218C58
jmp loc_218D34
loc_218C58:
mov [rsp+0C8h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rdi, [rsp+0C8h+var_A8]
mov [rsp+0C8h+var_B0], rax; char
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov qword ptr [rsp+0C8h+var_38], rax; char
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+0C8h+var_30]; int
lea rdx, [rsp+0C8h+var_38]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
jmp short $+2
loc_218C9F:
mov rcx, [rsp+0C8h+var_A8]
mov rdi, [rsp+0C8h+var_B0]; int
mov esi, 130h
lea rdx, [rsp+0C8h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
jmp short $+2
loc_218CBD:
mov rdi, [rsp+0C8h+var_B0]; void *
mov [rsp+0C8h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_218EB1
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
jmp short loc_218D19
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_218D19:
test [rsp+arg_7B], 1
jnz short loc_218D25
jmp short loc_218D2F
loc_218D25:
mov rdi, [rsp+arg_10]; void *
call ___cxa_free_exception
loc_218D2F:
jmp loc_218EA4
loc_218D34:
mov rax, [rsp+0C8h+var_A8]
mov rdi, [rax+8]
mov rsi, qword ptr [rsp+0C8h+var_10]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, rax
mov rax, [rsp+0C8h+var_A8]
mov qword ptr [rsp+0C8h+var_50], rcx; int
mov rdi, [rax+8]
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 qword ptr [rsp+0C8h+var_58], rax; char
lea rdi, [rsp+0C8h+var_50]
lea rsi, [rsp+0C8h+var_58]
call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__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_218D7D
jmp loc_218E8E
loc_218D7D:
mov [rsp+0C8h+var_9A], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+0C8h+var_C8], rax; int
mov rax, qword ptr [rsp+0C8h+var_10]
mov qword ptr [rsp+0C8h+var_C0], rax; int
lea rdi, [rsp+0C8h+var_99]
mov qword ptr [rsp+0C8h+var_B8], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, qword ptr [rsp+0C8h+var_C0]
mov rdx, qword ptr [rsp+0C8h+var_B8]
lea rdi, [rsp+0C8h+var_99+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_218DC2:
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+0C8h+var_78]; int
lea rdx, [rsp+0C8h+var_99+1]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
jmp short $+2
loc_218DE1:
mov rcx, [rsp+0C8h+var_A8]
mov rdi, [rsp+0C8h+var_C8]; int
mov esi, 193h
lea rdx, [rsp+0C8h+var_78]
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
jmp short $+2
loc_218DFB:
mov rdi, [rsp+0C8h+var_C8]; void *
mov [rsp+0C8h+var_9A], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_218EB1
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
jmp short loc_218E70
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
jmp short loc_218E66
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_218E66:
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_218E70:
lea rdi, [rsp+arg_27]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_26], 1
jnz short loc_218E83
jmp short loc_218E8C
loc_218E83:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_218E8C:
jmp short loc_218EA4
loc_218E8E:
lea rdi, [rsp+0C8h+var_50]
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)
add rax, 20h ; ' '
add rsp, 0C8h
retn
loc_218EA4:
mov rdi, [rsp+arg_80]
call __Unwind_Resume
loc_218EB1:
nop word ptr [rax+rax+00000000h]
nop dword ptr [rax+rax+00h]
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
long long a2)
{
long long v2; // rdx
nlohmann::json_abi_v3_11_3::detail::out_of_range *v4; // [rsp+0h] [rbp-C8h]
long long v5; // [rsp+8h] [rbp-C0h]
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // [rsp+18h] [rbp-B0h]
int v7[8]; // [rsp+2Fh] [rbp-99h] BYREF
int v8[8]; // [rsp+50h] [rbp-78h] BYREF
char v9[8]; // [rsp+70h] [rbp-58h] BYREF
int v10[2]; // [rsp+78h] [rbp-50h] BYREF
char v11; // [rsp+83h] [rbp-45h]
char v12[8]; // [rsp+90h] [rbp-38h] BYREF
int v13[8]; // [rsp+98h] [rbp-30h] BYREF
int v14[2]; // [rsp+B8h] [rbp-10h]
long long v15; // [rsp+C0h] [rbp-8h]
v15 = a1;
*(_QWORD *)v14 = a2;
if ( !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>::is_object((_BYTE *)a1) )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
*(_QWORD *)v12 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((_BYTE *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v13,
(long long)"cannot use at() with ",
(nlohmann::json_abi_v3_11_3::detail **)v12);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
(long long)v13,
a1);
v11 = 0;
__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::type_error::~type_error);
}
*(_QWORD *)v10 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(
*(_QWORD *)(a1 + 8),
*(_QWORD *)v14);
*(_QWORD *)v9 = 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(*(_QWORD *)(a1 + 8));
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)v10,
(long long)v9) )
{
v4 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
v5 = *(_QWORD *)v14;
std::allocator<char>::allocator(v7, v9, v2);
std::string::basic_string<std::allocator<char>>((long long)v7 + 1, v5, (long long)v7);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v8,
(long long)"key '",
(long long)v7 + 1,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v4,
403LL,
(long long)v8,
a1);
__cxa_throw(
v4,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range);
}
return __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)v10)
+ 32;
}
| |||
5,620 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [7], 0>(char const (&) [7]) const | monkey531[P]llama/common/./json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [7], 0>(char const (&) [7]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x8c412
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x8c3f7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1f2b0
testl %eax, %eax
je 0x8c3f4
addq $0x30, %rbx
jmp 0x8c3d5
movq %rbx, %rax
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x8c46e
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1f550
movq %rax, %rbx
movq %r14, %rdi
callq 0x578fc
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xc19be(%rip), %rsi # 0x14ddf4
movq %rsp, %rdi
callq 0x77215
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x576a8
xorl %ebp, %ebp
leaq 0x11c4f3(%rip), %rsi # 0x1a8950
leaq -0xd3d0(%rip), %rdx # 0x7f094
movq %rbx, %rdi
callq 0x202e0
jmp 0x8c4e7
movl $0x20, %edi
callq 0x1f550
movq %rax, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1f4d0
leaq (%rax,%r15), %rdx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x4c588
leaq 0xc1965(%rip), %rsi # 0x14de0a
leaq 0xc1964(%rip), %rcx # 0x14de10
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x7be69
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x7729e
xorl %ebp, %ebp
leaq 0x11c888(%rip), %rsi # 0x1a8d60
leaq -0xd44b(%rip), %rdx # 0x7f094
movq %rbx, %rdi
callq 0x202e0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8c50d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x8c50d
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x8c546
movq 0x30(%rsp), %rsi
jmp 0x8c536
jmp 0x8c540
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8c546
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x8c546
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x8c553
movq %rbx, %rdi
callq 0x1f7e0
movq %r14, %rdi
callq 0x20380
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_8C412
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
loc_8C3D5:
mov rax, [r12+8]
cmp rbx, rax
jz short loc_8C3F7
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_8C3F4
add rbx, 30h ; '0'
jmp short loc_8C3D5
loc_8C3F4:
mov rax, rbx
loc_8C3F7:
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_8C46E
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_8C412:
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+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_8C4E7
loc_8C46E:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_38]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
lea rdi, [rsp+68h+var_48]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound_0; "' not found"
mov rdi, rsp
lea rdx, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_8C4E7:
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8C50D
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8C50D
mov r14, rax
mov bpl, 1
loc_8C50D:
mov rdi, [rsp+68h+var_48]
cmp rdi, r12
jz short loc_8C546
mov rsi, [rsp+68h+var_38]
jmp short loc_8C536
jmp short loc_8C540
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8C546
mov rsi, [rsp+68h+var_58]
loc_8C536:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8C546
loc_8C540:
mov r14, rax
mov bpl, 1
loc_8C546:
test bpl, bpl
jz short loc_8C553
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8C553:
mov rdi, r14
call __Unwind_Resume
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long i; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
_QWORD v9[2]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v10[2]; // [rsp+20h] [rbp-48h] BYREF
long long v11; // [rsp+30h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v10[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v9,
(long long)"cannot use at() with ",
v10);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
v9);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
for ( i = *v2; ; i += 48LL )
{
v4 = v2[1];
if ( i == v4 )
break;
if ( !(unsigned int)std::string::compare(i, a2) )
{
v4 = i;
break;
}
}
if ( v4 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v10[0] = &v11;
v8 = strlen(a2);
std::string::_M_construct<char const*>(v10, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v9,
(long long)"key '",
v10,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v7,
403,
v9);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0018c412
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
LAB_0018c3d5:
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x0018c3f7
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011f2b0
TEST EAX,EAX
JZ 0x0018c3f4
ADD RBX,0x30
JMP 0x0018c3d5
LAB_0018c3f4:
MOV RAX,RBX
LAB_0018c3f7:
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0018c46e
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0018c412:
MOV EDI,0x20
CALL 0x0011f550
MOV RBX,RAX
MOV RDI,R14
CALL 0x001578fc
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_0018c42f:
LEA RSI,[0x24ddf4]
MOV RDI,RSP
CALL 0x00177215
MOV BPL,0x1
LAB_0018c441:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x001576a8
XOR EBP,EBP
LEA RSI,[0x2a8950]
LEA RDX,[0x17f094]
MOV RDI,RBX
CALL 0x001202e0
LAB_0018c46e:
MOV EDI,0x20
CALL 0x0011f550
MOV RBX,RAX
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011f4d0
LEA RDX,[RAX + R15*0x1]
LAB_0018c491:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x0014c588
LAB_0018c49e:
LEA RSI,[0x24de0a]
LEA RCX,[0x24de10]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x0017be69
MOV BPL,0x1
LAB_0018c4bc:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0017729e
XOR EBP,EBP
LEA RSI,[0x2a8d60]
LEA RDX,[0x17f094]
MOV RDI,RBX
CALL 0x001202e0
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
int8 *puVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
detail adStack_68 [32];
char *local_48 [2];
char local_38 [16];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0018c42f to 0018c43d has its CatchHandler @ 0018c540 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 0018c441 to 0018c46b has its CatchHandler @ 0018c520 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
puVar1 = *(int8 **)(param_1 + 8);
pcVar6 = (char *)*puVar1;
while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 &&
(iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) {
pcVar6 = pcVar6 + 0x30;
}
if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = local_38;
sVar5 = strlen(param_2);
/* try { // try from 0018c491 to 0018c49d has its CatchHandler @ 0018c51e */
std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5);
/* try { // try from 0018c49e to 0018c4b8 has its CatchHandler @ 0018c507 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(adStack_68,"key \'",(string *)local_48,"\' not found");
/* try { // try from 0018c4bc to 0018c4e6 has its CatchHandler @ 0018c4e7 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
|
5,621 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [7], 0>(char const (&) [7]) const | monkey531[P]llama/common/./json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [7], 0>(char const (&) [7]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x78351
movq %rsi, %r15
movq 0x8(%r14), %rdi
callq 0x78c08
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x783af
addq $0x20, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x28580
movq %rax, %rbx
movq %r14, %rdi
callq 0x4f280
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x7ba09(%rip), %rsi # 0xf3d7c
leaq 0x8(%rsp), %rdi
callq 0x68de3
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x4f134
xorl %ebp, %ebp
leaq 0xec612(%rip), %rsi # 0x1649b0
leaq -0x851f(%rip), %rdx # 0x6fe86
movq %rbx, %rdi
callq 0x29320
jmp 0x78419
pushq $0x20
popq %rdi
callq 0x28580
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x3bddc
leaq 0x7b9bf(%rip), %rsi # 0xf3d92
leaq 0x7b9be(%rip), %rcx # 0xf3d98
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x6d5cb
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x68e42
xorl %ebp, %ebp
leaq 0xec996(%rip), %rsi # 0x164da0
leaq -0x858b(%rip), %rdx # 0x6fe86
movq %rbx, %rdi
callq 0x29320
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x29678
jmp 0x7842e
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
jmp 0x7843f
jmp 0x7844b
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x29678
testb %bpl, %bpl
jne 0x7844e
jmp 0x78456
movq %rax, %r14
movq %rbx, %rdi
callq 0x28830
movq %r14, %rdi
callq 0x293c0
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_78351
mov r15, rsi
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_783AF
add rax, 20h ; ' '
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_78351:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_40]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_78419
loc_783AF:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_78419:
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7842E
mov r14, rax
mov bpl, 1
loc_7842E:
lea rdi, [rsp+68h+var_40]
jmp short loc_7843F
jmp short loc_7844B
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
loc_7843F:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7844E
jmp short loc_78456
loc_7844B:
mov r14, rax
loc_7844E:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_78456:
mov rdi, r14
call __Unwind_Resume
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx
_BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v6,
(long long)"cannot use at() with ",
v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
(long long)v6,
a1);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8));
if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::string::basic_string<std::allocator<char>>(v7, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v6,
(long long)"key '",
(long long)v7,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v5,
403,
(long long)v6);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v2 + 32;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x00178351
MOV R15,RSI
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x00178c08
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001783af
ADD RAX,0x20
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00178351:
PUSH 0x20
POP RDI
CALL 0x00128580
MOV RBX,RAX
MOV RDI,R14
CALL 0x0014f280
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_0017836c:
LEA RSI,[0x1f3d7c]
LEA RDI,[RSP + 0x8]
CALL 0x00168de3
MOV BPL,0x1
LAB_00178380:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0014f134
XOR EBP,EBP
LEA RSI,[0x2649b0]
LEA RDX,[0x16fe86]
MOV RDI,RBX
CALL 0x00129320
LAB_001783af:
PUSH 0x20
POP RDI
CALL 0x00128580
MOV RBX,RAX
LAB_001783ba:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
MOV RSI,R15
CALL 0x0013bddc
LAB_001783cc:
LEA RSI,[0x1f3d92]
LEA RCX,[0x1f3d98]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x0016d5cb
MOV BPL,0x1
LAB_001783ec:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x00168e42
XOR EBP,EBP
LEA RSI,[0x264da0]
LEA RDX,[0x16fe86]
MOV RDI,RBX
CALL 0x00129320
|
long _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long lVar1;
int8 uVar2;
allocator local_61;
detail local_60 [32];
char *local_40 [4];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0017836c to 0017837c has its CatchHandler @ 0017844b */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_60,"cannot use at() with ",local_40);
/* try { // try from 00178380 to 001783ac has its CatchHandler @ 00178437 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x130,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(*(int8 *)(param_1 + 8));
if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) {
return lVar1 + 0x20;
}
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 001783ba to 001783cb has its CatchHandler @ 00178435 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61);
/* try { // try from 001783cc to 001783e8 has its CatchHandler @ 00178428 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_60,"key \'",(string *)local_40,"\' not found");
/* try { // try from 001783ec to 00178418 has its CatchHandler @ 00178419 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x193,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
|
|
5,622 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [7], 0>(char const (&) [7]) const | monkey531[P]llama/common/./json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [7], 0>(char const (&) [7]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x8c29b
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x8c285
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1f2b0
testl %eax, %eax
je 0x8c27a
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0x8c25b
jmp 0x8c27d
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0x8c2f9
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1f550
movq %rax, %rbx
movq %r14, %rdi
callq 0x568fa
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xbba8c(%rip), %rsi # 0x147d49
leaq 0x20(%rsp), %rdi
callq 0x7543d
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x566a6
xorl %ebp, %ebp
leaq 0x1166c8(%rip), %rsi # 0x1a29b0
leaq -0xf331(%rip), %rdx # 0x7cfbe
movq %rbx, %rdi
callq 0x202e0
jmp 0x8c372
movl $0x20, %edi
callq 0x1f550
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1f4d0
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x4b514
leaq 0xbba31(%rip), %rsi # 0x147d5f
leaq 0xbba30(%rip), %rcx # 0x147d65
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x79f7f
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x754c6
xorl %ebp, %ebp
leaq 0x116a3d(%rip), %rsi # 0x1a2da0
leaq -0xf3ac(%rip), %rdx # 0x7cfbe
movq %rbx, %rdi
callq 0x202e0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8c390
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x8c3db
movq 0x10(%rsp), %rsi
jmp 0x8c3d3
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x8c3e5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x8c3e5
jmp 0x8c3e2
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8c3db
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1fae0
testb %bpl, %bpl
jne 0x8c3e5
jmp 0x8c3ed
movq %rax, %r14
movq %rbx, %rdi
callq 0x1f7e0
movq %r14, %rdi
callq 0x20380
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA7_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_8C29B
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_8C285
loc_8C25B:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_8C27A
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_8C25B
jmp short loc_8C27D
loc_8C27A:
mov rax, rbx
loc_8C27D:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_8C285:
cmp rax, rbx
jz short loc_8C2F9
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_8C29B:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_8C372
loc_8C2F9:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound_0; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_8C372:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8C390
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8C390:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_8C3DB
mov rsi, [rsp+68h+var_58]
jmp short loc_8C3D3
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_8C3E5
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8C3E5
jmp short loc_8C3E2
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8C3DB
mov rsi, [rsp+68h+var_38]
loc_8C3D3:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8C3DB:
test bpl, bpl
jnz short loc_8C3E5
jmp short loc_8C3ED
loc_8C3E2:
mov r14, rax
loc_8C3E5:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8C3ED:
mov rdi, r14
call __Unwind_Resume
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA7_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v11,
(long long)"cannot use at() with ",
v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v11,
(long long)"key '",
v9,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA7_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0018c29b
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x0018c285
LAB_0018c25b:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011f2b0
TEST EAX,EAX
JZ 0x0018c27a
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x0018c25b
JMP 0x0018c27d
LAB_0018c27a:
MOV RAX,RBX
LAB_0018c27d:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_0018c285:
CMP RAX,RBX
JZ 0x0018c2f9
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0018c29b:
MOV EDI,0x20
CALL 0x0011f550
MOV RBX,RAX
MOV RDI,R14
CALL 0x001568fa
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_0018c2b6:
LEA RSI,[0x247d49]
LEA RDI,[RSP + 0x20]
CALL 0x0017543d
MOV BPL,0x1
LAB_0018c2ca:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x001566a6
XOR EBP,EBP
LEA RSI,[0x2a29b0]
LEA RDX,[0x17cfbe]
MOV RDI,RBX
CALL 0x001202e0
LAB_0018c2f9:
MOV EDI,0x20
CALL 0x0011f550
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011f4d0
LEA RDX,[RAX + R15*0x1]
LAB_0018c31c:
MOV RDI,RSP
MOV RSI,R15
CALL 0x0014b514
LAB_0018c327:
LEA RSI,[0x247d5f]
LEA RCX,[0x247d65]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00179f7f
MOV BPL,0x1
LAB_0018c345:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001754c6
XOR EBP,EBP
LEA RSI,[0x2a2da0]
LEA RDX,[0x17cfbe]
MOV RDI,RBX
CALL 0x001202e0
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA7_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0018c2b6 to 0018c2c6 has its CatchHandler @ 0018c3e2 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 0018c2ca to 0018c2f6 has its CatchHandler @ 0018c3bd */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 0018c31c to 0018c326 has its CatchHandler @ 0018c3bb */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 0018c327 to 0018c341 has its CatchHandler @ 0018c3a0 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 0018c345 to 0018c371 has its CatchHandler @ 0018c372 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
|
5,623 | lf_alloc_new | eloqsql/mysys/lf_alloc-pin.c | void *lf_alloc_new(LF_PINS *pins)
{
LF_ALLOCATOR *allocator= (LF_ALLOCATOR *)(pins->pinbox->free_func_arg);
uchar *node;
for (;;)
{
do
{
node= allocator->top;
lf_pin(pins, 0, node);
} while (node != allocator->top && LF_BACKOFF());
if (!node)
{
node= (void *)my_malloc(key_memory_lf_node, allocator->element_size,
MYF(MY_WME));
if (allocator->constructor)
allocator->constructor(node);
#ifdef MY_LF_EXTRA_DEBUG
if (likely(node != 0))
my_atomic_add32(&allocator->mallocs, 1);
#endif
break;
}
if (my_atomic_casptr((void **)(char *)&allocator->top,
(void *)&node, anext_node(node)))
break;
}
lf_unpin(pins, 0);
return node;
} | O3 | c | lf_alloc_new:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movq 0x30(%rax), %r15
leaq 0x2e12e9(%rip), %rcx # 0x388018
movq 0x48(%r15), %r14
movq %r14, %rax
xchgq %rax, (%rbx)
cmpq 0x48(%r15), %r14
je 0xa6d4d
movl (%rcx), %eax
testl %eax, %eax
je 0xa6d2f
pause
decl %eax
jne 0xa6d45
jmp 0xa6d2f
testq %r14, %r14
je 0xa6d67
movl 0x38(%r15), %eax
movq (%r14,%rax), %rdx
movq %r14, %rax
lock
cmpxchgq %rdx, 0x48(%r15)
jne 0xa6d2f
jmp 0xa6d8f
leaq 0xb634c2(%rip), %rax # 0xc0a230
movl (%rax), %edi
movl 0x50(%r15), %esi
movl $0x10, %edx
callq 0xa11e5
movq %rax, %r14
movq 0x58(%r15), %rax
testq %rax, %rax
je 0xa6d8f
movq %r14, %rdi
callq *%rax
xorl %eax, %eax
xchgq %rax, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| lf_alloc_new:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rax, [rdi+20h]
mov r15, [rax+30h]
lea rcx, my_cpu_relax_multiplier
loc_A6D2F:
mov r14, [r15+48h]
mov rax, r14
xchg rax, [rbx]
cmp r14, [r15+48h]
jz short loc_A6D4D
mov eax, [rcx]
test eax, eax
jz short loc_A6D2F
loc_A6D45:
pause
dec eax
jnz short loc_A6D45
jmp short loc_A6D2F
loc_A6D4D:
test r14, r14
jz short loc_A6D67
mov eax, [r15+38h]
mov rdx, [r14+rax]
mov rax, r14
lock cmpxchg [r15+48h], rdx
jnz short loc_A6D2F
jmp short loc_A6D8F
loc_A6D67:
lea rax, key_memory_lf_node
mov edi, [rax]
mov esi, [r15+50h]
mov edx, 10h
call my_malloc
mov r14, rax
mov rax, [r15+58h]
test rax, rax
jz short loc_A6D8F
mov rdi, r14
call rax
loc_A6D8F:
xor eax, eax
xchg rax, [rbx]
mov rax, r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long lf_alloc_new(long long a1)
{
long long v1; // r15
long long v2; // r14
int i; // eax
void ( *v4)(long long); // rax
v1 = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 48LL);
while ( 1 )
{
while ( 1 )
{
v2 = *(_QWORD *)(v1 + 72);
_InterlockedExchange64((volatile long long *)a1, v2);
if ( v2 == *(_QWORD *)(v1 + 72) )
break;
for ( i = my_cpu_relax_multiplier; i; --i )
_mm_pause();
}
if ( !v2 )
break;
if ( v2 == _InterlockedCompareExchange64(
(volatile signed long long *)(v1 + 72),
*(_QWORD *)(v2 + *(unsigned int *)(v1 + 56)),
v2) )
goto LABEL_11;
}
v2 = my_malloc(key_memory_lf_node, *(unsigned int *)(v1 + 80), 16);
v4 = *(void ( **)(long long))(v1 + 88);
if ( v4 )
v4(v2);
LABEL_11:
_InterlockedExchange64((volatile long long *)a1, 0LL);
return v2;
}
| lf_alloc_new:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x20]
MOV R15,qword ptr [RAX + 0x30]
LEA RCX,[0x488018]
LAB_001a6d2f:
MOV R14,qword ptr [R15 + 0x48]
MOV RAX,R14
XCHG qword ptr [RBX],RAX
CMP R14,qword ptr [R15 + 0x48]
JZ 0x001a6d4d
MOV EAX,dword ptr [RCX]
TEST EAX,EAX
JZ 0x001a6d2f
LAB_001a6d45:
PAUSE
DEC EAX
JNZ 0x001a6d45
JMP 0x001a6d2f
LAB_001a6d4d:
TEST R14,R14
JZ 0x001a6d67
MOV EAX,dword ptr [R15 + 0x38]
MOV RDX,qword ptr [R14 + RAX*0x1]
MOV RAX,R14
CMPXCHG.LOCK qword ptr [R15 + 0x48],RDX
JNZ 0x001a6d2f
JMP 0x001a6d8f
LAB_001a6d67:
LEA RAX,[0xd0a230]
MOV EDI,dword ptr [RAX]
MOV ESI,dword ptr [R15 + 0x50]
MOV EDX,0x10
CALL 0x001a11e5
MOV R14,RAX
MOV RAX,qword ptr [R15 + 0x58]
TEST RAX,RAX
JZ 0x001a6d8f
MOV RDI,R14
CALL RAX
LAB_001a6d8f:
XOR EAX,EAX
XCHG qword ptr [RBX],RAX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
long lf_alloc_new(long *param_1)
{
long lVar1;
int iVar2;
long lVar3;
bool bVar4;
lVar1 = *(long *)(param_1[4] + 0x30);
do {
while( true ) {
lVar3 = *(long *)(lVar1 + 0x48);
LOCK();
*param_1 = lVar3;
UNLOCK();
iVar2 = my_cpu_relax_multiplier;
if (lVar3 == *(long *)(lVar1 + 0x48)) break;
for (; iVar2 != 0; iVar2 = iVar2 + -1) {
}
}
if (lVar3 == 0) {
lVar3 = my_malloc(key_memory_lf_node,*(int4 *)(lVar1 + 0x50),0x10);
if (*(code **)(lVar1 + 0x58) != (code *)0x0) {
(**(code **)(lVar1 + 0x58))(lVar3);
}
break;
}
LOCK();
bVar4 = lVar3 == *(long *)(lVar1 + 0x48);
if (bVar4) {
*(long *)(lVar1 + 0x48) = *(long *)(lVar3 + (ulong)*(uint *)(lVar1 + 0x38));
}
UNLOCK();
} while (!bVar4);
LOCK();
*param_1 = 0;
UNLOCK();
return lVar3;
}
|
|
5,624 | my_scan_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_scan_mb2(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *end, int sequence_type)
{
const char *str0= str;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int res;
switch (sequence_type)
{
case MY_SEQ_SPACES:
for (res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end);
res > 0 && wc == ' ';
str+= res,
res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end))
{
}
return (size_t) (str - str0);
case MY_SEQ_NONSPACES:
DBUG_ASSERT(0); /* Not implemented */
/* pass through */
default:
return 0;
}
} | O3 | c | my_scan_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x2, %ecx
jne 0xca560
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rbx
leaq -0x38(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *%rbx
movq %r12, -0x30(%rbp)
testl %eax, %eax
jle 0xca55a
cmpq $0x20, -0x38(%rbp)
movq -0x30(%rbp), %r12
jne 0xca55a
leaq -0x38(%rbp), %r13
movq -0x30(%rbp), %r12
movq %r12, %rcx
movl %eax, %r12d
addq %rcx, %r12
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *%rbx
testl %eax, %eax
jle 0xca55a
cmpq $0x20, -0x38(%rbp)
je 0xca538
subq -0x30(%rbp), %r12
jmp 0xca563
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_scan_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp ecx, 2
jnz short loc_CA560
mov r14, rdx
mov r12, rsi
mov r15, rdi
mov rax, [rdi+0B8h]
mov rbx, [rax+28h]
lea rsi, [rbp+var_38]
mov rdx, r12
mov rcx, r14
call rbx
mov [rbp+var_30], r12
test eax, eax
jle short loc_CA55A
cmp [rbp+var_38], 20h ; ' '
mov r12, [rbp+var_30]
jnz short loc_CA55A
lea r13, [rbp+var_38]
mov r12, [rbp+var_30]
loc_CA538:
mov rcx, r12
mov r12d, eax
add r12, rcx
mov rdi, r15
mov rsi, r13
mov rdx, r12
mov rcx, r14
call rbx
test eax, eax
jle short loc_CA55A
cmp [rbp+var_38], 20h ; ' '
jz short loc_CA538
loc_CA55A:
sub r12, [rbp+var_30]
jmp short loc_CA563
loc_CA560:
xor r12d, r12d
loc_CA563:
mov rax, r12
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_scan_mb2(long long a1, long long a2, long long a3, int a4)
{
long long v5; // r12
long long ( *v6)(long long, long long *, long long, long long); // rbx
int v7; // eax
long long v10; // [rsp+8h] [rbp-38h] BYREF
long long v11; // [rsp+10h] [rbp-30h]
if ( a4 != 2 )
return 0LL;
v5 = a2;
v6 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v7 = v6(a1, &v10, a2, a3);
v11 = a2;
if ( v7 > 0 )
{
v5 = v11;
if ( v10 == 32 )
{
v5 = v11;
do
{
v5 += (unsigned int)v7;
v7 = v6(a1, &v10, v5, a3);
}
while ( v7 > 0 && v10 == 32 );
}
}
return v5 - v11;
}
| my_scan_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP ECX,0x2
JNZ 0x001ca560
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOV RBX,qword ptr [RAX + 0x28]
LEA RSI,[RBP + -0x38]
MOV RDX,R12
MOV RCX,R14
CALL RBX
MOV qword ptr [RBP + -0x30],R12
TEST EAX,EAX
JLE 0x001ca55a
CMP qword ptr [RBP + -0x38],0x20
MOV R12,qword ptr [RBP + -0x30]
JNZ 0x001ca55a
LEA R13,[RBP + -0x38]
MOV R12,qword ptr [RBP + -0x30]
LAB_001ca538:
MOV RCX,R12
MOV R12D,EAX
ADD R12,RCX
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
MOV RCX,R14
CALL RBX
TEST EAX,EAX
JLE 0x001ca55a
CMP qword ptr [RBP + -0x38],0x20
JZ 0x001ca538
LAB_001ca55a:
SUB R12,qword ptr [RBP + -0x30]
JMP 0x001ca563
LAB_001ca560:
XOR R12D,R12D
LAB_001ca563:
MOV RAX,R12
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_scan_mb2(long param_1,long param_2,int8 param_3,int param_4)
{
code *pcVar1;
uint uVar2;
long local_40;
long local_38;
if (param_4 == 2) {
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3);
local_38 = param_2;
if ((0 < (int)uVar2) && (local_40 == 0x20)) {
do {
param_2 = (ulong)uVar2 + param_2;
uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3);
if ((int)uVar2 < 1) break;
} while (local_40 == 0x20);
}
param_2 = param_2 - local_38;
}
else {
param_2 = 0;
}
return param_2;
}
|
|
5,625 | vsort_sequential_int | davidesantangelo[P]vsort/vsort.c | static void vsort_sequential_int(int *arr, int size)
{
if (!arr || size <= 1)
return;
// Use insertion sort if nearly sorted (check only for modest sizes)
if (size < thresholds.parallel_threshold / 2 && // Avoid check on very large arrays where it's less likely
size < thresholds.radix_threshold && // Avoid if radix sort will be chosen anyway
vsort_is_nearly_sorted_int(arr, size))
{
vsort_log_info("Array (int, size %d) appears nearly sorted, using insertion sort.", size);
insertion_sort_int(arr, 0, size - 1);
return;
}
// Use radix sort for large integer arrays
if (size >= thresholds.radix_threshold)
{
vsort_log_info("Using radix sort for large int array (size: %d)", size);
radix_sort_int(arr, size);
return;
}
// Default to quicksort
quicksort_int(arr, 0, size - 1);
} | O0 | c | vsort_sequential_int:
subq $0x48, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x191c
cmpl $0x1, 0x14(%rsp)
jg 0x1921
jmp 0x1a9b
movl 0x14(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x67b9(%rip), %eax # 0x80e8
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jge 0x1a5a
movl 0x14(%rsp), %eax
cmpl 0x679d(%rip), %eax # 0x80ec
jge 0x1a5a
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x27d0
testb $0x1, %al
jne 0x196c
jmp 0x1a5a
movl 0x14(%rsp), %esi
leaq 0x3ce7(%rip), %rdi # 0x565e
movb $0x0, %al
callq 0x4390
movq 0x18(%rsp), %rcx
movl 0x14(%rsp), %eax
subl $0x1, %eax
movq %rcx, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movl %eax, 0x38(%rsp)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x38(%rsp), %eax
jg 0x1a58
movq 0x40(%rsp), %rax
movslq 0x34(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x30(%rsp)
movl 0x34(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x2c(%rsp)
movq 0x40(%rsp), %rax
movslq 0x2c(%rsp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movl 0x2c(%rsp), %ecx
xorl %eax, %eax
cmpl 0x3c(%rsp), %ecx
movb %al, 0xf(%rsp)
jl 0x1a08
movq 0x20(%rsp), %rax
movl (%rax), %eax
cmpl 0x30(%rsp), %eax
setg %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x1a12
jmp 0x1a3c
movq 0x20(%rsp), %rax
movl (%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0x4(%rax)
movl 0x2c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x2c(%rsp)
movq 0x20(%rsp), %rax
addq $-0x4, %rax
movq %rax, 0x20(%rsp)
jmp 0x19e6
movl 0x30(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0x4(%rax)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x19a6
jmp 0x1a9b
movl 0x14(%rsp), %eax
cmpl 0x6688(%rip), %eax # 0x80ec
jl 0x1a88
movl 0x14(%rsp), %esi
leaq 0x3c2f(%rip), %rdi # 0x56a0
movb $0x0, %al
callq 0x4390
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x2970
jmp 0x1a9b
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x2e80
addq $0x48, %rsp
retq
| vsort_sequential_int:
sub rsp, 48h
mov [rsp+48h+var_30], rdi
mov [rsp+48h+var_34], esi
cmp [rsp+48h+var_30], 0
jz short loc_191C
cmp [rsp+48h+var_34], 1
jg short loc_1921
loc_191C:
jmp loc_1A9B
loc_1921:
mov eax, [rsp+48h+var_34]
mov [rsp+48h+var_38], eax
mov eax, cs:dword_80E8
mov ecx, 2
cdq
idiv ecx
mov ecx, eax
mov eax, [rsp+48h+var_38]
cmp eax, ecx
jge loc_1A5A
mov eax, [rsp+48h+var_34]
cmp eax, cs:dword_80EC
jge loc_1A5A
mov rdi, [rsp+48h+var_30]
mov esi, [rsp+48h+var_34]
call vsort_is_nearly_sorted_int
test al, 1
jnz short loc_196C
jmp loc_1A5A
loc_196C:
mov esi, [rsp+48h+var_34]
lea rdi, aArrayIntSizeDA; "Array (int, size %d) appears nearly sor"...
mov al, 0
call vsort_log_info
mov rcx, [rsp+48h+var_30]
mov eax, [rsp+48h+var_34]
sub eax, 1
mov [rsp+48h+var_8], rcx
mov [rsp+48h+var_C], 0
mov [rsp+48h+var_10], eax
mov eax, [rsp+48h+var_C]
add eax, 1
mov [rsp+48h+var_14], eax
loc_19A6:
mov eax, [rsp+48h+var_14]
cmp eax, [rsp+48h+var_10]
jg loc_1A58
mov rax, [rsp+48h+var_8]
movsxd rcx, [rsp+48h+var_14]
mov eax, [rax+rcx*4]
mov [rsp+48h+var_18], eax
mov eax, [rsp+48h+var_14]
sub eax, 1
mov [rsp+48h+var_1C], eax
mov rax, [rsp+48h+var_8]
movsxd rcx, [rsp+48h+var_1C]
shl rcx, 2
add rax, rcx
mov [rsp+48h+var_28], rax
loc_19E6:
mov ecx, [rsp+48h+var_1C]
xor eax, eax
cmp ecx, [rsp+48h+var_C]
mov [rsp+48h+var_39], al
jl short loc_1A08
mov rax, [rsp+48h+var_28]
mov eax, [rax]
cmp eax, [rsp+48h+var_18]
setnle al
mov [rsp+48h+var_39], al
loc_1A08:
mov al, [rsp+48h+var_39]
test al, 1
jnz short loc_1A12
jmp short loc_1A3C
loc_1A12:
mov rax, [rsp+48h+var_28]
mov ecx, [rax]
mov rax, [rsp+48h+var_28]
mov [rax+4], ecx
mov eax, [rsp+48h+var_1C]
add eax, 0FFFFFFFFh
mov [rsp+48h+var_1C], eax
mov rax, [rsp+48h+var_28]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rsp+48h+var_28], rax
jmp short loc_19E6
loc_1A3C:
mov ecx, [rsp+48h+var_18]
mov rax, [rsp+48h+var_28]
mov [rax+4], ecx
mov eax, [rsp+48h+var_14]
add eax, 1
mov [rsp+48h+var_14], eax
jmp loc_19A6
loc_1A58:
jmp short loc_1A9B
loc_1A5A:
mov eax, [rsp+48h+var_34]
cmp eax, cs:dword_80EC
jl short loc_1A88
mov esi, [rsp+48h+var_34]
lea rdi, aUsingRadixSort; "Using radix sort for large int array (s"...
mov al, 0
call vsort_log_info
mov rdi, [rsp+48h+var_30]
mov esi, [rsp+48h+var_34]
call radix_sort_int
jmp short loc_1A9B
loc_1A88:
mov rdi, [rsp+48h+var_30]
mov edx, [rsp+48h+var_34]
sub edx, 1
xor esi, esi
call quicksort_int
loc_1A9B:
add rsp, 48h
retn
| void vsort_sequential_int(long long a1, int a2, long long a3, long long a4, int a5, int a6)
{
long long v6; // rdx
int v7; // ecx
bool v8; // [rsp+Fh] [rbp-39h]
_DWORD *j; // [rsp+20h] [rbp-28h]
int v10; // [rsp+2Ch] [rbp-1Ch]
int v11; // [rsp+30h] [rbp-18h]
int i; // [rsp+34h] [rbp-14h]
if ( a1 && a2 > 1 )
{
v6 = (unsigned int)(dword_80E8 >> 31);
LODWORD(v6) = dword_80E8 % 2;
v7 = dword_80E8 / 2;
if ( a2 < dword_80E8 / 2 && a2 < dword_80EC && (vsort_is_nearly_sorted_int(a1, (unsigned int)a2, v6) & 1) != 0 )
{
vsort_log_info(
(unsigned int)"Array (int, size %d) appears nearly sorted, using insertion sort.",
a2,
v6,
v7,
a5,
a6);
for ( i = 1; i <= a2 - 1; ++i )
{
v11 = *(_DWORD *)(a1 + 4LL * i);
v10 = i - 1;
for ( j = (_DWORD *)(4LL * (i - 1) + a1); ; --j )
{
v8 = 0;
if ( v10 >= 0 )
v8 = *j > v11;
if ( !v8 )
break;
j[1] = *j;
--v10;
}
j[1] = v11;
}
}
else if ( a2 < dword_80EC )
{
quicksort_int(a1, 0LL, (unsigned int)(a2 - 1));
}
else
{
vsort_log_info((unsigned int)"Using radix sort for large int array (size: %d)", a2, v6, v7, a5, a6);
radix_sort_int(a1, (unsigned int)a2);
}
}
}
| vsort_sequential_int:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV dword ptr [RSP + 0xc],ESI
CMP qword ptr [RSP + 0x10],0x0
JZ 0x0010191c
CMP dword ptr [RSP + 0xc],0x1
JG 0x00101921
LAB_0010191c:
JMP 0x001019c9
LAB_00101921:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x8],EAX
MOV EAX,dword ptr [0x001070c8]
MOV ECX,0x2
CDQ
IDIV ECX
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x8]
CMP EAX,ECX
JGE 0x00101988
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [0x001070cc]
JGE 0x00101988
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0xc]
CALL 0x00102620
TEST AL,0x1
JNZ 0x00101961
JMP 0x00101988
LAB_00101961:
MOV ESI,dword ptr [RSP + 0xc]
LEA RDI,[0x104644]
MOV AL,0x0
CALL 0x00103b60
MOV RDI,qword ptr [RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xc]
SUB EDX,0x1
XOR ESI,ESI
CALL 0x001027c0
JMP 0x001019c9
LAB_00101988:
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [0x001070cc]
JL 0x001019b6
MOV ESI,dword ptr [RSP + 0xc]
LEA RDI,[0x104686]
MOV AL,0x0
CALL 0x00103b60
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0xc]
CALL 0x00102890
JMP 0x001019c9
LAB_001019b6:
MOV RDI,qword ptr [RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xc]
SUB EDX,0x1
XOR ESI,ESI
CALL 0x00102da0
LAB_001019c9:
ADD RSP,0x18
RET
|
void vsort_sequential_int(long param_1,int param_2)
{
ulong uVar1;
if ((param_1 != 0) && (1 < param_2)) {
if ((param_2 < DAT_001070c8 / 2) &&
((param_2 < DAT_001070cc &&
(uVar1 = vsort_is_nearly_sorted_int(param_1,param_2,(long)DAT_001070c8 % 2 & 0xffffffff),
(uVar1 & 1) != 0)))) {
vsort_log_info("Array (int, size %d) appears nearly sorted, using insertion sort.",param_2);
insertion_sort_int(param_1,0,param_2 + -1);
}
else if (param_2 < DAT_001070cc) {
quicksort_int(param_1,0,param_2 + -1);
}
else {
vsort_log_info("Using radix sort for large int array (size: %d)",param_2);
radix_sort_int(param_1,param_2);
}
}
return;
}
|
|
5,626 | my_strnncoll_tis620 | eloqsql/strings/ctype-tis620.c | static
int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s1, size_t len1,
const uchar *s2, size_t len2,
my_bool s2_is_prefix)
{
uchar buf[80] ;
uchar *tc1, *tc2;
int i;
if (s2_is_prefix && len1 > len2)
len1= len2;
tc1= buf;
if ((len1 + len2 +2) > (int) sizeof(buf))
tc1= (uchar*) my_malloc(PSI_INSTRUMENT_ME, len1+len2+2, MYF(MY_FAE));
tc2= tc1 + len1+1;
memcpy((char*) tc1, (char*) s1, len1);
tc1[len1]= 0; /* if length(s1)> len1, need to put 'end of string' */
memcpy((char *)tc2, (char *)s2, len2);
tc2[len2]= 0; /* put end of string */
thai2sortable(tc1, len1);
thai2sortable(tc2, len2);
i= strcmp((char*)tc1, (char*)tc2);
if (tc1 != buf)
my_free(tc1);
return i;
} | O0 | c | my_strnncoll_tis620:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %r9b, %al
movq %fs:0x28, %r9
movq %r9, -0x8(%rbp)
movq %rdi, -0x68(%rbp)
movq %rsi, -0x70(%rbp)
movq %rdx, -0x78(%rbp)
movq %rcx, -0x80(%rbp)
movq %r8, -0x88(%rbp)
movb %al, -0x89(%rbp)
movsbl -0x89(%rbp), %eax
cmpl $0x0, %eax
je 0x4aabc
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jbe 0x4aabc
movq -0x88(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x78(%rbp), %rax
addq -0x88(%rbp), %rax
addq $0x2, %rax
cmpq $0x50, %rax
jbe 0x4aafe
movq -0x78(%rbp), %rsi
addq -0x88(%rbp), %rsi
addq $0x2, %rsi
xorl %edi, %edi
movl $0x8, %edx
callq 0x29a30
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
addq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0x24260
movq -0x98(%rbp), %rax
movq -0x78(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0xa0(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x24260
movq -0xa0(%rbp), %rax
movq -0x88(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x98(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x4afe0
movq -0xa0(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x4afe0
movq -0x98(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x24460
movl %eax, -0xa4(%rbp)
movq -0x98(%rbp), %rax
leaq -0x60(%rbp), %rcx
cmpq %rcx, %rax
je 0x4abb8
movq -0x98(%rbp), %rdi
callq 0x29db0
movl -0xa4(%rbp), %eax
movl %eax, -0xa8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4abe5
movl -0xa8(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
callq 0x24370
nopw (%rax,%rax)
| my_strnncoll_tis620:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov al, r9b
mov r9, fs:28h
mov [rbp+var_8], r9
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov [rbp+var_78], rdx
mov [rbp+var_80], rcx
mov [rbp+var_88], r8
mov [rbp+var_89], al
movsx eax, [rbp+var_89]
cmp eax, 0
jz short loc_4AABC
mov rax, [rbp+var_78]
cmp rax, [rbp+var_88]
jbe short loc_4AABC
mov rax, [rbp+var_88]
mov [rbp+var_78], rax
loc_4AABC:
lea rax, [rbp+var_60]
mov [rbp+var_98], rax
mov rax, [rbp+var_78]
add rax, [rbp+var_88]
add rax, 2
cmp rax, 50h ; 'P'
jbe short loc_4AAFE
mov rsi, [rbp+var_78]
add rsi, [rbp+var_88]
add rsi, 2
xor edi, edi
mov edx, 8
call my_malloc
mov [rbp+var_98], rax
loc_4AAFE:
mov rax, [rbp+var_98]
add rax, [rbp+var_78]
add rax, 1
mov [rbp+var_A0], rax
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_70]
mov rdx, [rbp+var_78]
call _memcpy
mov rax, [rbp+var_98]
mov rcx, [rbp+var_78]
mov byte ptr [rax+rcx], 0
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_88]
call _memcpy
mov rax, [rbp+var_A0]
mov rcx, [rbp+var_88]
mov byte ptr [rax+rcx], 0
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_78]
call thai2sortable
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_88]
call thai2sortable
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_A0]
call _strcmp
mov [rbp+var_A4], eax
mov rax, [rbp+var_98]
lea rcx, [rbp+var_60]
cmp rax, rcx
jz short loc_4ABB8
mov rdi, [rbp+var_98]
call my_free
loc_4ABB8:
mov eax, [rbp+var_A4]
mov [rbp+var_A8], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4ABE5
mov eax, [rbp+var_A8]
add rsp, 0B0h
pop rbp
retn
loc_4ABE5:
call ___stack_chk_fail
| long long my_strnncoll_tis620(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
unsigned int v7; // [rsp+Ch] [rbp-A4h]
long long v8; // [rsp+10h] [rbp-A0h]
_BYTE *v9; // [rsp+18h] [rbp-98h]
unsigned long long v12; // [rsp+38h] [rbp-78h]
_BYTE v13[88]; // [rsp+50h] [rbp-60h] BYREF
unsigned long long v14; // [rsp+A8h] [rbp-8h]
v14 = __readfsqword(0x28u);
v12 = a3;
if ( a6 && a3 > a5 )
v12 = a5;
v9 = v13;
if ( a5 + v12 + 2 > 0x50 )
v9 = (_BYTE *)my_malloc(0, a5 + v12 + 2, 8);
v8 = (long long)&v9[v12 + 1];
memcpy(v9, a2, v12);
v9[v12] = 0;
memcpy(v8, a4, a5);
*(_BYTE *)(v8 + a5) = 0;
thai2sortable(v9, v12);
thai2sortable(v8, a5);
v7 = strcmp(v9, v8);
if ( v9 != v13 )
my_free((long long)v9);
return v7;
}
| my_strnncoll_tis620:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV AL,R9B
MOV R9,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],R9
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV qword ptr [RBP + -0x78],RDX
MOV qword ptr [RBP + -0x80],RCX
MOV qword ptr [RBP + -0x88],R8
MOV byte ptr [RBP + -0x89],AL
MOVSX EAX,byte ptr [RBP + -0x89]
CMP EAX,0x0
JZ 0x0014aabc
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,qword ptr [RBP + -0x88]
JBE 0x0014aabc
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x78],RAX
LAB_0014aabc:
LEA RAX,[RBP + -0x60]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,qword ptr [RBP + -0x88]
ADD RAX,0x2
CMP RAX,0x50
JBE 0x0014aafe
MOV RSI,qword ptr [RBP + -0x78]
ADD RSI,qword ptr [RBP + -0x88]
ADD RSI,0x2
XOR EDI,EDI
MOV EDX,0x8
CALL 0x00129a30
MOV qword ptr [RBP + -0x98],RAX
LAB_0014aafe:
MOV RAX,qword ptr [RBP + -0x98]
ADD RAX,qword ptr [RBP + -0x78]
ADD RAX,0x1
MOV qword ptr [RBP + -0xa0],RAX
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x78]
CALL 0x00124260
MOV RAX,qword ptr [RBP + -0x98]
MOV RCX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x88]
CALL 0x00124260
MOV RAX,qword ptr [RBP + -0xa0]
MOV RCX,qword ptr [RBP + -0x88]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x78]
CALL 0x0014afe0
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x88]
CALL 0x0014afe0
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0xa0]
CALL 0x00124460
MOV dword ptr [RBP + -0xa4],EAX
MOV RAX,qword ptr [RBP + -0x98]
LEA RCX,[RBP + -0x60]
CMP RAX,RCX
JZ 0x0014abb8
MOV RDI,qword ptr [RBP + -0x98]
CALL 0x00129db0
LAB_0014abb8:
MOV EAX,dword ptr [RBP + -0xa4]
MOV dword ptr [RBP + -0xa8],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014abe5
MOV EAX,dword ptr [RBP + -0xa8]
ADD RSP,0xb0
POP RBP
RET
LAB_0014abe5:
CALL 0x00124370
|
int my_strnncoll_tis620(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
int iVar1;
char *__s2;
long in_FS_OFFSET;
char *local_a0;
size_t local_80;
char local_68 [88];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_80 = param_3;
if ((param_6 != '\0') && (param_5 < param_3)) {
local_80 = param_5;
}
local_a0 = local_68;
if (0x50 < local_80 + param_5 + 2) {
local_a0 = (char *)my_malloc(0,local_80 + param_5 + 2,8);
}
__s2 = local_a0 + local_80 + 1;
memcpy(local_a0,param_2,local_80);
local_a0[local_80] = '\0';
memcpy(__s2,param_4,param_5);
__s2[param_5] = '\0';
thai2sortable(local_a0,local_80);
thai2sortable(__s2,param_5);
iVar1 = strcmp(local_a0,__s2);
if (local_a0 != local_68) {
my_free(local_a0);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return iVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
5,627 | my_strnncoll_tis620 | eloqsql/strings/ctype-tis620.c | static
int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s1, size_t len1,
const uchar *s2, size_t len2,
my_bool s2_is_prefix)
{
uchar buf[80] ;
uchar *tc1, *tc2;
int i;
if (s2_is_prefix && len1 > len2)
len1= len2;
tc1= buf;
if ((len1 + len2 +2) > (int) sizeof(buf))
tc1= (uchar*) my_malloc(PSI_INSTRUMENT_ME, len1+len2+2, MYF(MY_FAE));
tc2= tc1 + len1+1;
memcpy((char*) tc1, (char*) s1, len1);
tc1[len1]= 0; /* if length(s1)> len1, need to put 'end of string' */
memcpy((char *)tc2, (char *)s2, len2);
tc2[len2]= 0; /* put end of string */
thai2sortable(tc1, len1);
thai2sortable(tc2, len2);
i= strcmp((char*)tc1, (char*)tc2);
if (tc1 != buf)
my_free(tc1);
return i;
} | O3 | c | my_strnncoll_tis620:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %rbx
movq %rcx, -0x88(%rbp)
movq %rsi, %rcx
movq %fs:0x28, %rax
cmpq %r8, %rdx
movq %r8, %r15
cmovbq %rdx, %r15
movq %rax, -0x30(%rbp)
testb %r9b, %r9b
cmoveq %rdx, %r15
leaq (%r8,%r15), %rsi
addq $0x2, %rsi
leaq -0x80(%rbp), %r14
cmpq $0x51, %rsi
jb 0x3c602
movl $0x8, %edx
xorl %edi, %edi
movq %rcx, %r14
callq 0x27f19
movq %r14, %rcx
movq %rax, %r14
leaq (%r14,%r15), %r13
leaq (%r14,%r15), %r12
incq %r12
movq %r14, %rdi
movq %rcx, %rsi
movq %r15, %rdx
callq 0x24270
xorl %eax, %eax
movb %al, -0x1(%r12)
movq %r12, %rdi
movq -0x88(%rbp), %rsi
movq %rbx, %rdx
callq 0x24270
xorl %eax, %eax
movb %al, 0x1(%rbx,%r13)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c88f
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3c88f
movq %r14, %rdi
movq %r12, %rsi
callq 0x244b0
movl %eax, %ebx
leaq -0x80(%rbp), %rax
cmpq %rax, %r14
je 0x3c66f
movq %r14, %rdi
callq 0x28146
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x3c68f
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x243b0
| my_strnncoll_tis620:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbx, r8
mov [rbp+var_88], rcx
mov rcx, rsi
mov rax, fs:28h
cmp rdx, r8
mov r15, r8
cmovb r15, rdx
mov [rbp+var_30], rax
test r9b, r9b
cmovz r15, rdx
lea rsi, [r8+r15]
add rsi, 2
lea r14, [rbp+var_80]
cmp rsi, 51h ; 'Q'
jb short loc_3C602
mov edx, 8
xor edi, edi
mov r14, rcx
call my_malloc
mov rcx, r14
mov r14, rax
loc_3C602:
lea r13, [r14+r15]
lea r12, [r14+r15]
inc r12
mov rdi, r14
mov rsi, rcx
mov rdx, r15
call _memcpy
xor eax, eax
mov [r12-1], al
mov rdi, r12
mov rsi, [rbp+var_88]
mov rdx, rbx
call _memcpy
xor eax, eax
mov [rbx+r13+1], al
mov rdi, r14
mov rsi, r15
call thai2sortable
mov rdi, r12
mov rsi, rbx
call thai2sortable
mov rdi, r14
mov rsi, r12
call _strcmp
mov ebx, eax
lea rax, [rbp+var_80]
cmp r14, rax
jz short loc_3C66F
mov rdi, r14
call my_free
loc_3C66F:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_3C68F
mov eax, ebx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3C68F:
call ___stack_chk_fail
| long long my_strnncoll_tis620(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
unsigned long long v8; // rax
unsigned long long v9; // r15
unsigned long long v10; // rsi
_BYTE *v11; // r14
long long v12; // r14
long long v13; // rax
unsigned int v14; // ebx
_BYTE v17[80]; // [rsp+10h] [rbp-80h] BYREF
unsigned long long v18; // [rsp+60h] [rbp-30h]
v8 = __readfsqword(0x28u);
v9 = a5;
if ( a3 < a5 )
v9 = a3;
v18 = v8;
if ( !a6 )
v9 = a3;
v10 = a5 + v9 + 2;
v11 = v17;
if ( v10 >= 0x51 )
{
v12 = a2;
v13 = my_malloc(0, v10, 8);
a2 = v12;
v11 = (_BYTE *)v13;
}
memcpy(v11, a2, v9);
v11[v9] = 0;
memcpy(&v11[v9 + 1], a4, a5);
v11[v9 + 1 + a5] = 0;
thai2sortable(v11, v9);
thai2sortable(&v11[v9 + 1], a5);
v14 = strcmp(v11, &v11[v9 + 1]);
if ( v11 != v17 )
my_free((long long)v11);
return v14;
}
| my_strnncoll_tis620:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,R8
MOV qword ptr [RBP + -0x88],RCX
MOV RCX,RSI
MOV RAX,qword ptr FS:[0x28]
CMP RDX,R8
MOV R15,R8
CMOVC R15,RDX
MOV qword ptr [RBP + -0x30],RAX
TEST R9B,R9B
CMOVZ R15,RDX
LEA RSI,[R8 + R15*0x1]
ADD RSI,0x2
LEA R14,[RBP + -0x80]
CMP RSI,0x51
JC 0x0013c602
MOV EDX,0x8
XOR EDI,EDI
MOV R14,RCX
CALL 0x00127f19
MOV RCX,R14
MOV R14,RAX
LAB_0013c602:
LEA R13,[R14 + R15*0x1]
LEA R12,[R14 + R15*0x1]
INC R12
MOV RDI,R14
MOV RSI,RCX
MOV RDX,R15
CALL 0x00124270
XOR EAX,EAX
MOV byte ptr [R12 + -0x1],AL
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0x88]
MOV RDX,RBX
CALL 0x00124270
XOR EAX,EAX
MOV byte ptr [RBX + R13*0x1 + 0x1],AL
MOV RDI,R14
MOV RSI,R15
CALL 0x0013c88f
MOV RDI,R12
MOV RSI,RBX
CALL 0x0013c88f
MOV RDI,R14
MOV RSI,R12
CALL 0x001244b0
MOV EBX,EAX
LEA RAX,[RBP + -0x80]
CMP R14,RAX
JZ 0x0013c66f
MOV RDI,R14
CALL 0x00128146
LAB_0013c66f:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0013c68f
MOV EAX,EBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013c68f:
CALL 0x001243b0
|
int my_strnncoll_tis620(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
int iVar1;
char *__s1;
ulong uVar2;
char *__s2;
ulong __n;
long in_FS_OFFSET;
char local_88 [80];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
__n = param_5;
if (param_3 < param_5) {
__n = param_3;
}
if (param_6 == '\0') {
__n = param_3;
}
uVar2 = param_5 + __n + 2;
__s1 = local_88;
if (0x50 < uVar2) {
__s1 = (char *)my_malloc(0,uVar2,8);
}
__s2 = __s1 + __n + 1;
memcpy(__s1,param_2,__n);
__s1[__n] = '\0';
memcpy(__s2,param_4,param_5);
__s1[param_5 + 1 + __n] = '\0';
thai2sortable(__s1,__n);
thai2sortable(__s2,param_5);
iVar1 = strcmp(__s1,__s2);
if (__s1 != local_88) {
my_free(__s1);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
5,628 | 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 0xd182d
testb $0x20, 0xd(%r12)
jne 0xd182d
movq %r14, (%rbx)
movl $0x3, %eax
testq %r14, %r14
je 0xd180d
movl $0x2000, %ecx # imm = 0x2000
andl 0xc(%r12), %ecx
jne 0xd1828
testq %r14, %r14
jle 0xd1823
addq %r15, %r14
cmpb $0x0, (%r15)
js 0xd1828
incq %r15
cmpq %r14, %r15
jb 0xd1815
movl $0x1, %eax
movl %eax, 0x8(%rbx)
jmp 0xd1897
movl $0x1, 0x8(%rbx)
movq $0x0, (%rbx)
testq %r14, %r14
jle 0xd1897
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 0xd1872
cmpq $0x80, -0x30(%rbp)
jb 0xd188a
orb $0x2, 0x8(%rbx)
jmp 0xd188a
je 0xd1881
orb $0x2, 0x8(%rbx)
cmpl $-0x64, %eax
jb 0xd1897
negl %eax
jmp 0xd188a
orb $0x2, 0x8(%rbx)
movl $0x1, %eax
movl %eax, %eax
addq %rax, %r15
incq (%rbx)
cmpq %r14, %r15
jb 0xd1847
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_D182D
test byte ptr [r12+0Dh], 20h
jnz short loc_D182D
mov [rbx], r14
mov eax, 3
test r14, r14
jz short loc_D180D
mov ecx, 2000h
and ecx, [r12+0Ch]
jnz short loc_D1828
loc_D180D:
test r14, r14
jle short loc_D1823
add r14, r15
loc_D1815:
cmp byte ptr [r15], 0
js short loc_D1828
inc r15
cmp r15, r14
jb short loc_D1815
loc_D1823:
mov eax, 1
loc_D1828:
mov [rbx+8], eax
jmp short loc_D1897
loc_D182D:
mov dword ptr [rbx+8], 1
mov qword ptr [rbx], 0
test r14, r14
jle short loc_D1897
add r14, r15
lea r13, [rbp+var_30]
loc_D1847:
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_D1872
cmp [rbp+var_30], 80h
jb short loc_D188A
or byte ptr [rbx+8], 2
jmp short loc_D188A
loc_D1872:
jz short loc_D1881
or byte ptr [rbx+8], 2
cmp eax, 0FFFFFF9Ch
jb short loc_D1897
neg eax
jmp short loc_D188A
loc_D1881:
or byte ptr [rbx+8], 2
mov eax, 1
loc_D188A:
mov eax, eax
add r15, rax
inc qword ptr [rbx]
cmp r15, r14
jb short loc_D1847
loc_D1897:
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 0x001d182d
TEST byte ptr [R12 + 0xd],0x20
JNZ 0x001d182d
MOV qword ptr [RBX],R14
MOV EAX,0x3
TEST R14,R14
JZ 0x001d180d
MOV ECX,0x2000
AND ECX,dword ptr [R12 + 0xc]
JNZ 0x001d1828
LAB_001d180d:
TEST R14,R14
JLE 0x001d1823
ADD R14,R15
LAB_001d1815:
CMP byte ptr [R15],0x0
JS 0x001d1828
INC R15
CMP R15,R14
JC 0x001d1815
LAB_001d1823:
MOV EAX,0x1
LAB_001d1828:
MOV dword ptr [RBX + 0x8],EAX
JMP 0x001d1897
LAB_001d182d:
MOV dword ptr [RBX + 0x8],0x1
MOV qword ptr [RBX],0x0
TEST R14,R14
JLE 0x001d1897
ADD R14,R15
LEA R13,[RBP + -0x30]
LAB_001d1847:
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 0x001d1872
CMP qword ptr [RBP + -0x30],0x80
JC 0x001d188a
OR byte ptr [RBX + 0x8],0x2
JMP 0x001d188a
LAB_001d1872:
JZ 0x001d1881
OR byte ptr [RBX + 0x8],0x2
CMP EAX,-0x64
JC 0x001d1897
NEG EAX
JMP 0x001d188a
LAB_001d1881:
OR byte ptr [RBX + 0x8],0x2
MOV EAX,0x1
LAB_001d188a:
MOV EAX,EAX
ADD R15,RAX
INC qword ptr [RBX]
CMP R15,R14
JC 0x001d1847
LAB_001d1897:
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_001d1828;
param_3 = param_3 + 1;
} while (param_3 < pcVar3);
}
uVar1 = 1;
}
LAB_001d1828:
*(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;
}
|
|
5,629 | my_setwd | eloqsql/mysys/my_getwd.c | int my_setwd(const char *dir, myf MyFlags)
{
int res;
size_t length;
char *start, *pos;
DBUG_ENTER("my_setwd");
DBUG_PRINT("my",("dir: '%s' MyFlags %lu", dir, MyFlags));
start=(char *) dir;
if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0))
dir=FN_ROOTDIR;
if ((res=chdir((char*) dir)) != 0)
{
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_SETWD,MYF(ME_BELL),start,errno);
}
else
{
if (test_if_hard_path(start))
{ /* Hard pathname */
pos= strmake(&curr_dir[0],start,(size_t) FN_REFLEN-1);
if (pos[-1] != FN_LIBCHAR)
{
length=(uint) (pos-(char*) curr_dir);
curr_dir[length]=FN_LIBCHAR; /* must end with '/' */
curr_dir[length+1]='\0';
}
}
else
curr_dir[0]='\0'; /* Don't save name */
}
DBUG_RETURN(res);
} | O0 | c | my_setwd:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x2f172
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x2f19c
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2f1a7
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x2f1a7
leaq 0x552cc(%rip), %rax # 0x8446f
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x24460
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x2f200
callq 0x24040
movl (%rax), %eax
movl %eax, -0x34(%rbp)
callq 0x316b0
movl -0x34(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x2f1fe
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x24040
movq -0x40(%rbp), %rdx
movl (%rax), %ecx
movl $0x11, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x3a890
jmp 0x2f275
movq -0x28(%rbp), %rdi
callq 0x2f290
cmpl $0x0, %eax
je 0x2f269
movq -0x28(%rbp), %rsi
leaq 0x3610d7(%rip), %rdi # 0x3902f0
movl $0x1ff, %edx # imm = 0x1FF
callq 0x7efc0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
je 0x2f267
movq -0x30(%rbp), %rax
leaq 0x3610b1(%rip), %rcx # 0x3902f0
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
leaq 0x36109d(%rip), %rax # 0x3902f0
movb $0x2f, (%rax,%rcx)
movq -0x20(%rbp), %rcx
leaq 0x36108e(%rip), %rax # 0x3902f0
movb $0x0, 0x1(%rax,%rcx)
jmp 0x2f273
leaq 0x361080(%rip), %rax # 0x3902f0
movb $0x0, (%rax)
jmp 0x2f275
jmp 0x2f277
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_setwd:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_2F172:
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
cmp byte ptr [rax], 0
jz short loc_2F19C
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_2F1A7
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+1]
cmp eax, 0
jnz short loc_2F1A7
loc_2F19C:
lea rax, unk_8446F
mov [rbp+var_8], rax
loc_2F1A7:
mov rdi, [rbp+var_8]
call _chdir
mov [rbp+var_14], eax
cmp eax, 0
jz short loc_2F200
call ___errno_location
mov eax, [rax]
mov [rbp+var_34], eax
call _my_thread_var
mov ecx, [rbp+var_34]
mov [rax], ecx
mov rax, [rbp+var_10]
and rax, 10h
cmp rax, 0
jz short loc_2F1FE
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
call ___errno_location
mov rdx, [rbp+var_40]
mov ecx, [rax]
mov edi, 11h
mov esi, 4
mov al, 0
call my_error
loc_2F1FE:
jmp short loc_2F275
loc_2F200:
mov rdi, [rbp+var_28]
call test_if_hard_path
cmp eax, 0
jz short loc_2F269
mov rsi, [rbp+var_28]
lea rdi, curr_dir
mov edx, 1FFh
call strmake
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jz short loc_2F267
mov rax, [rbp+var_30]
lea rcx, curr_dir
sub rax, rcx
mov eax, eax
mov [rbp+var_20], rax
mov rcx, [rbp+var_20]
lea rax, curr_dir
mov byte ptr [rax+rcx], 2Fh ; '/'
mov rcx, [rbp+var_20]
lea rax, curr_dir
mov byte ptr [rax+rcx+1], 0
loc_2F267:
jmp short loc_2F273
loc_2F269:
lea rax, curr_dir
mov byte ptr [rax], 0
loc_2F273:
jmp short $+2
loc_2F275:
jmp short $+2
loc_2F277:
mov eax, [rbp+var_14]
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
add rsp, 50h
pop rbp
retn
| long long my_setwd(_BYTE *a1, char a2)
{
_DWORD *v2; // rax
int v3; // r8d
int v4; // r9d
int v6; // [rsp+1Ch] [rbp-34h]
long long v7; // [rsp+20h] [rbp-30h]
unsigned int v8; // [rsp+3Ch] [rbp-14h]
void *v9; // [rsp+48h] [rbp-8h]
v9 = a1;
if ( !*a1 || *a1 == 47 && !a1[1] )
v9 = &unk_8446F;
v8 = chdir(v9);
if ( v8 )
{
v6 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v6;
if ( (a2 & 0x10) != 0 )
{
v2 = (_DWORD *)__errno_location();
my_error(17, 4, (_DWORD)a1, *v2, v3, v4);
}
}
else if ( (unsigned int)test_if_hard_path(a1) )
{
v7 = strmake(curr_dir, a1, 511LL);
if ( *(_BYTE *)(v7 - 1) != 47 )
{
curr_dir[(unsigned int)(v7 - (_QWORD)curr_dir)] = 47;
curr_dir[(unsigned int)(v7 - (_QWORD)curr_dir) + 1] = 0;
}
}
else
{
curr_dir[0] = 0;
}
return v8;
}
| my_setwd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x0012f172
LAB_0012f172:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX],0x0
JZ 0x0012f19c
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012f1a7
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
JNZ 0x0012f1a7
LAB_0012f19c:
LEA RAX,[0x18446f]
MOV qword ptr [RBP + -0x8],RAX
LAB_0012f1a7:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124460
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JZ 0x0012f200
CALL 0x00124040
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
CALL 0x001316b0
MOV ECX,dword ptr [RBP + -0x34]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x10
CMP RAX,0x0
JZ 0x0012f1fe
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
CALL 0x00124040
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RAX]
MOV EDI,0x11
MOV ESI,0x4
MOV AL,0x0
CALL 0x0013a890
LAB_0012f1fe:
JMP 0x0012f275
LAB_0012f200:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0012f290
CMP EAX,0x0
JZ 0x0012f269
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[0x4902f0]
MOV EDX,0x1ff
CALL 0x0017efc0
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JZ 0x0012f267
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x4902f0]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0x4902f0]
MOV byte ptr [RAX + RCX*0x1],0x2f
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0x4902f0]
MOV byte ptr [RAX + RCX*0x1 + 0x1],0x0
LAB_0012f267:
JMP 0x0012f273
LAB_0012f269:
LEA RAX,[0x4902f0]
MOV byte ptr [RAX],0x0
LAB_0012f273:
JMP 0x0012f275
LAB_0012f275:
JMP 0x0012f277
LAB_0012f277:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
ADD RSP,0x50
POP RBP
RET
|
int my_setwd(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
uint uVar3;
int *piVar4;
long lVar5;
char *local_10;
if ((*param_1 == '\0') || ((local_10 = param_1, *param_1 == '/' && (param_1[1] == '\0')))) {
local_10 = "/";
}
iVar1 = chdir(local_10);
if (iVar1 == 0) {
iVar2 = test_if_hard_path(param_1);
if (iVar2 == 0) {
curr_dir = 0;
}
else {
lVar5 = strmake(&curr_dir,param_1,0x1ff);
if (*(char *)(lVar5 + -1) != '/') {
uVar3 = (int)lVar5 - 0x4902f0;
(&curr_dir)[uVar3] = 0x2f;
(&DAT_004902f1)[uVar3] = 0;
}
}
}
else {
piVar4 = __errno_location();
iVar2 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar2;
if ((param_2 & 0x10) != 0) {
piVar4 = __errno_location();
my_error(0x11,4,param_1,*piVar4);
}
}
return iVar1;
}
|
|
5,630 | my_is_symlink | eloqsql/mysys/my_symlink.c | int my_is_symlink(const char *filename __attribute__((unused)))
{
#if defined (HAVE_LSTAT) && defined (S_ISLNK)
struct stat stat_buff;
if (lstat(filename, &stat_buff))
return 0;
MSAN_STAT_WORKAROUND(&stat_buff);
return !!S_ISLNK(stat_buff.st_mode);
#elif defined (_WIN32)
DWORD dwAttr = GetFileAttributes(filename);
return (dwAttr != INVALID_FILE_ATTRIBUTES) &&
(dwAttr & FILE_ATTRIBUTE_REPARSE_POINT);
#else /* No symlinks */
return 0;
#endif
} | O3 | c | my_is_symlink:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
leaq -0x98(%rbp), %rbx
movq %rbx, %rsi
callq 0x29530
movl 0x18(%rbx), %edx
andl $0xf000, %edx # imm = 0xF000
xorl $0xa000, %edx # imm = 0xA000
xorl %ecx, %ecx
orl %eax, %edx
sete %cl
movl %ecx, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
| my_is_symlink:
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
lea rbx, [rbp+var_98]
mov rsi, rbx
call _lstat64
mov edx, [rbx+18h]
and edx, 0F000h
xor edx, 0A000h
xor ecx, ecx
or edx, eax
setz cl
mov eax, ecx
add rsp, 98h
pop rbx
pop rbp
retn
| _BOOL8 my_is_symlink(long long a1)
{
int v1; // eax
_BYTE v3[24]; // [rsp+8h] [rbp-98h] BYREF
__int16 v4; // [rsp+20h] [rbp-80h]
v1 = lstat64(a1, v3);
return (v1 | v4 & 0xF000 ^ 0xA000) == 0;
}
| my_is_symlink:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
LEA RBX,[RBP + -0x98]
MOV RSI,RBX
CALL 0x00129530
MOV EDX,dword ptr [RBX + 0x18]
AND EDX,0xf000
XOR EDX,0xa000
XOR ECX,ECX
OR EDX,EAX
SETZ CL
MOV EAX,ECX
ADD RSP,0x98
POP RBX
POP RBP
RET
|
bool my_is_symlink(char *param_1)
{
int iVar1;
stat64 local_a0;
iVar1 = lstat64(param_1,&local_a0);
return (local_a0.st_mode & 0xf000) == 0xa000 && iVar1 == 0;
}
|
|
5,631 | int fmt::v8::detail::count_digits<4, unsigned long>(unsigned long) | aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR auto count_digits(UInt n) -> int {
#ifdef FMT_BUILTIN_CLZ
if (num_bits<UInt>() == 32)
return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1;
#endif
int num_digits = 0;
do {
++num_digits;
} while ((n >>= BITS) != 0);
return num_digits;
} | O0 | c | int fmt::v8::detail::count_digits<4, unsigned long>(unsigned long):
movq %rdi, -0x18(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x18(%rsp), %rax
movq -0x10(%rsp), %rcx
movq %rcx, -0x20(%rsp)
movq %rax, -0x28(%rsp)
movl $0x0, -0x2c(%rsp)
movl -0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rsp)
movq -0x28(%rsp), %rdx
movq -0x20(%rsp), %rcx
movq %rcx, %rax
shldq $0x3f, %rdx, %rax
shrq %rcx
movq %rcx, -0x20(%rsp)
movq %rax, -0x28(%rsp)
orq %rcx, %rax
jne 0xb0d86
jmp 0xb0db7
movl -0x2c(%rsp), %eax
retq
nopl (%rax)
| _ZN3fmt2v86detail12count_digitsILi1EoEEiT0_:
mov [rsp+var_18], rdi
mov [rsp+var_10], rsi
mov rax, [rsp+var_18]
mov rcx, [rsp+var_10]
mov [rsp+var_20], rcx
mov [rsp+var_28], rax
mov [rsp+var_2C], 0
loc_B0D86:
mov eax, [rsp+var_2C]
add eax, 1
mov [rsp+var_2C], eax
mov rdx, [rsp+var_28]
mov rcx, [rsp+var_20]
mov rax, rcx
shld rax, rdx, 3Fh
shr rcx, 1
mov [rsp+var_20], rcx
mov [rsp+var_28], rax
or rax, rcx
jnz short loc_B0D86
jmp short $+2
loc_B0DB7:
mov eax, [rsp+var_2C]
retn
| long long fmt::v8::detail::count_digits<1,unsigned __int128>(unsigned __int128 a1)
{
unsigned int v2; // [rsp+0h] [rbp-2Ch]
v2 = 0;
do
{
++v2;
a1 >>= 1;
}
while ( a1 != 0 );
return v2;
}
| count_digits<1,unsigned__int128>:
MOV qword ptr [RSP + -0x18],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV RAX,qword ptr [RSP + -0x18]
MOV RCX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x20],RCX
MOV qword ptr [RSP + -0x28],RAX
MOV dword ptr [RSP + -0x2c],0x0
LAB_001b0d86:
MOV EAX,dword ptr [RSP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RSP + -0x2c],EAX
MOV RDX,qword ptr [RSP + -0x28]
MOV RCX,qword ptr [RSP + -0x20]
MOV RAX,RCX
SHLD RAX,RDX,0x3f
SHR RCX,0x1
MOV qword ptr [RSP + -0x20],RCX
MOV qword ptr [RSP + -0x28],RAX
OR RAX,RCX
JNZ 0x001b0d86
JMP 0x001b0db7
LAB_001b0db7:
MOV EAX,dword ptr [RSP + -0x2c]
RET
|
/* int fmt::v8::detail::count_digits<1, unsigned __int128>(unsigned __int128) */
int __thiscall fmt::v8::detail::count_digits<1,unsigned__int128>(detail *this,uint param_1)
{
int4 in_register_00000034;
int4 local_2c;
int8 local_28;
int8 local_20;
local_20 = CONCAT44(in_register_00000034,param_1);
local_2c = 0;
local_28 = this;
do {
local_2c = local_2c + 1;
local_28 = (detail *)(local_20 << 0x3f | (ulong)local_28 >> 1);
local_20 = local_20 >> 1;
} while (local_28 != (detail *)0x0 || local_20 != 0);
return local_2c;
}
|
|
5,632 | long minja::Value::get<long>() const | llama.cpp/common/minja/minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O3 | cpp | long minja::Value::get<long>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0xc18c1
cmpq $0x0, 0x20(%r14)
jne 0xc18c1
cmpq $0x0, 0x30(%r14)
jne 0xc18c1
addq $0x40, %r14
leaq 0x20(%rsp), %rbx
movq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc198f
movq (%rbx), %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x20650
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb5b3c
leaq 0x5e0e3(%rip), %rsi # 0x11f9ca
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaf3dc
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x20470
xorl %ebp, %ebp
movq 0xa06b3(%rip), %rsi # 0x161fc0
movq 0xa066c(%rip), %rdx # 0x161f80
movq %rbx, %rdi
callq 0x20a50
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc193a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x20180
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc1955
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0xc197f
jmp 0xc1987
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc197f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xc197f
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f10
movq %r14, %rdi
callq 0x20af0
| _ZNK5minja5Value3getIlEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
cmp qword ptr [rdi+10h], 0
jnz short loc_C18C1
cmp qword ptr [r14+20h], 0
jnz short loc_C18C1
cmp qword ptr [r14+30h], 0
jnz short loc_C18C1
add r14, 40h ; '@'
lea rbx, [rsp+58h+var_38]
mov qword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _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_
mov rax, [rbx]
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_C18C1:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C193A
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C193A:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C1955
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C1955:
test bpl, bpl
jnz short loc_C197F
jmp short loc_C1987
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C197F
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C197F
mov r14, rax
loc_C197F:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C1987:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::get<long>(_QWORD *a1)
{
void *exception; // rbx
_BYTE v3[16]; // [rsp+0h] [rbp-58h] BYREF
_QWORD v4[2]; // [rsp+20h] [rbp-38h] BYREF
if ( a1[2] || a1[4] || a1[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0);
std::operator+<char>(v4, (long long)"get<T> not defined for this value type: ", (long long)v3);
std::runtime_error::runtime_error(exception, v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4[0] = 0LL;
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_(
a1 + 8,
v4);
return v4[0];
}
| get<long>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x001c18c1
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x001c18c1
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x001c18c1
ADD R14,0x40
LEA RBX,[RSP + 0x20]
MOV qword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x001c198f
MOV RAX,qword ptr [RBX]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_001c18c1:
MOV EDI,0x10
CALL 0x00120650
MOV RBX,RAX
LAB_001c18ce:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b5b3c
LAB_001c18e0:
LEA RSI,[0x21f9ca]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001af3dc
MOV BPL,0x1
LAB_001c18f7:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00120470
XOR EBP,EBP
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,RBX
CALL 0x00120a50
|
/* long minja::Value::get<long>() const */
long __thiscall minja::Value::get<long>(Value *this)
{
runtime_error *this_00;
int1 auStack_58 [32];
long local_38 [4];
if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) &&
(*(long *)(this + 0x30) == 0)) {
local_38[0] = 0;
_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_
(this + 0x40,local_38);
return local_38[0];
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001c18ce to 001c18df has its CatchHandler @ 001c197c */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 001c18e0 to 001c18f3 has its CatchHandler @ 001c195c */
std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: ");
/* try { // try from 001c18f7 to 001c191b has its CatchHandler @ 001c191c */
std::runtime_error::runtime_error(this_00,(string *)local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
|
|
5,633 | Settings::exitGame[abi:cxx11]() | 666mxvbee[P]BattleShip/lib/Settings/Settings.cpp | std::string Settings::exitGame() {
std::lock_guard<std::mutex> lock(settings_mutex);
if (exitFlag) {
return "game has already been exited";
}
exitFlag = true;
return "ok";
} | O3 | cpp | Settings::exitGame[abi:cxx11]():
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x5500
testl %eax, %eax
jne 0x6e1f
cmpb $0x1, 0x5a(%rbx)
jne 0x6deb
leaq 0x10(%r14), %rax
movq %rax, (%r14)
leaq 0x13618(%rip), %rsi # 0x1a3f2
leaq 0x1362d(%rip), %rdx # 0x1a40e
movq %r14, %rdi
callq 0x60b6
jmp 0x6e0c
movb $0x1, 0x5a(%rbx)
leaq 0x10(%r14), %rax
movq %rax, (%r14)
leaq 0x13438(%rip), %rsi # 0x1a235
leaq 0x13433(%rip), %rdx # 0x1a237
movq %r14, %rdi
callq 0x60b6
movq %rbx, %rdi
callq 0x52d0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl %eax, %edi
callq 0x5260
jmp 0x6e28
movq %rax, %r14
movq %rbx, %rdi
callq 0x52d0
movq %r14, %rdi
callq 0x55e0
nop
| _ZN8Settings8exitGameB5cxx11Ev:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rdi, rsi
call _pthread_mutex_lock
test eax, eax
jnz short loc_6E1F
cmp byte ptr [rbx+5Ah], 1
jnz short loc_6DEB
lea rax, [r14+10h]
mov [r14], rax
lea rsi, aGameHasAlready_1; "game has already been exited"
lea rdx, aGameHasAlready_1+1Ch; ""
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
jmp short loc_6E0C
loc_6DEB:
mov byte ptr [rbx+5Ah], 1
lea rax, [r14+10h]
mov [r14], rax
lea rsi, aOk; "ok"
lea rdx, aOk+2; ""
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_6E0C:
mov rdi, rbx
call _pthread_mutex_unlock
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
loc_6E1F:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
jmp short $+2
loc_6E28:
mov r14, rax
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| _QWORD * Settings::exitGame[abi:cxx11](_QWORD *a1, long long a2)
{
int v2; // eax
v2 = pthread_mutex_lock(a2);
if ( v2 )
std::__throw_system_error(v2);
if ( *(_BYTE *)(a2 + 90) == 1 )
{
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, "game has already been exited", (long long)"");
}
else
{
*(_BYTE *)(a2 + 90) = 1;
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, "ok", (long long)"");
}
pthread_mutex_unlock(a2);
return a1;
}
| exitGame[abi:cxx11]:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x00105500
TEST EAX,EAX
JNZ 0x00106e1f
CMP byte ptr [RBX + 0x5a],0x1
JNZ 0x00106deb
LEA RAX,[R14 + 0x10]
MOV qword ptr [R14],RAX
LAB_00106dd3:
LEA RSI,[0x11a3f2]
LEA RDX,[0x11a40e]
MOV RDI,R14
CALL 0x001060b6
JMP 0x00106e0c
LAB_00106deb:
MOV byte ptr [RBX + 0x5a],0x1
LEA RAX,[R14 + 0x10]
MOV qword ptr [R14],RAX
LAB_00106df6:
LEA RSI,[0x11a235]
LEA RDX,[0x11a237]
MOV RDI,R14
CALL 0x001060b6
LAB_00106e0c:
MOV RDI,RBX
CALL 0x001052d0
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00106e1f:
MOV EDI,EAX
CALL 0x00105260
|
/* Settings::exitGame[abi:cxx11]() */
void Settings::exitGame_abi_cxx11_(void)
{
int iVar1;
pthread_mutex_t *in_RSI;
long *in_RDI;
iVar1 = pthread_mutex_lock(in_RSI);
if (iVar1 == 0) {
if (*(char *)((long)in_RSI + 0x5a) == '\x01') {
*in_RDI = (long)(in_RDI + 2);
/* try { // try from 00106dd3 to 00106de8 has its CatchHandler @ 00106e28 */
std::__cxx11::string::_M_construct<char_const*>();
}
else {
*(int1 *)((long)in_RSI + 0x5a) = 1;
*in_RDI = (long)(in_RDI + 2);
/* try { // try from 00106df6 to 00106e0b has its CatchHandler @ 00106e26 */
std::__cxx11::string::_M_construct<char_const*>();
}
pthread_mutex_unlock(in_RSI);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar1);
}
|
|
5,634 | google::protobuf::compiler::java::ImmutableStringFieldLiteGenerator::GenerateBuilderMembers(google::protobuf::io::Printer*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/string_field_lite.cc | void ImmutableStringFieldLiteGenerator::GenerateBuilderMembers(
io::Printer* printer) const {
if (HasHazzer(descriptor_)) {
WriteFieldAccessorDocComment(printer, descriptor_, HAZZER);
printer->Print(
variables_,
"@java.lang.Override\n"
"$deprecation$public boolean ${$has$capitalized_name$$}$() {\n"
" return instance.has$capitalized_name$();\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
}
WriteFieldAccessorDocComment(printer, descriptor_, GETTER);
printer->Print(
variables_,
"@java.lang.Override\n"
"$deprecation$public java.lang.String ${$get$capitalized_name$$}$() {\n"
" return instance.get$capitalized_name$();\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER);
printer->Print(variables_,
"@java.lang.Override\n"
"$deprecation$public com.google.protobuf.ByteString\n"
" ${$get$capitalized_name$Bytes$}$() {\n"
" return instance.get$capitalized_name$Bytes();\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder ${$set$capitalized_name$$}$(\n"
" java.lang.String value) {\n"
" copyOnWrite();\n"
" instance.set$capitalized_name$(value);\n"
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n"
" copyOnWrite();\n"
" instance.clear$capitalized_name$();\n"
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldStringBytesAccessorDocComment(printer, descriptor_, SETTER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$set$capitalized_name$Bytes$}$(\n"
" com.google.protobuf.ByteString value) {\n"
" copyOnWrite();\n"
" instance.set$capitalized_name$Bytes(value);\n"
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
} | O3 | cpp | google::protobuf::compiler::java::ImmutableStringFieldLiteGenerator::GenerateBuilderMembers(google::protobuf::io::Printer*) const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r15
movb 0x1(%r15), %al
notb %al
testb $0x60, %al
je 0xe9bdf
movq %r15, %rdi
callq 0x11d7ce
testq %rax, %rax
jne 0xe9ba2
movb 0x1(%r15), %al
testb $0x2, %al
jne 0xe9ba2
movq 0x10(%r15), %rcx
cmpb $0x2, 0x3(%rcx)
jne 0xe9d16
movq 0x8(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xcff9a
leaq 0x10(%r14), %rsi
leaq 0xf3c07(%rip), %rdx # 0x1dd7c4
movq %rbx, %rdi
callq 0x16cd32
movq 0x8(%r14), %rcx
leaq 0x106509(%rip), %rsi # 0x1f00d9
leaq 0xf6af6(%rip), %rdx # 0x1e06cd
movq %rbx, %rdi
callq 0xafc7e
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0xcff9a
leaq 0x10(%r14), %r15
leaq 0xfa69f(%rip), %rdx # 0x1e429c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rcx
leaq 0x1064c6(%rip), %r12 # 0x1f00d9
leaq 0xf6ab3(%rip), %r13 # 0x1e06cd
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xafc7e
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0xd033e
leaq 0xfa6e1(%rip), %rdx # 0x1e4323
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xafc7e
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movl $0x2, %edx
movl $0x1, %ecx
callq 0xcff9a
leaq 0xfa74a(%rip), %rdx # 0x1e43c6
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xafc7e
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movl $0x3, %edx
movl $0x1, %ecx
callq 0xcff9a
leaq 0xf4187(%rip), %rdx # 0x1dde3d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xafc7e
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movl $0x2, %edx
movl $0x1, %ecx
callq 0xd033e
leaq 0xfa779(%rip), %rdx # 0x1e4469
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xafc7e
testb $0x10, %al
sete %cl
movq 0x28(%r15), %rax
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0xe9bdf
cmpl $0x1, 0x4(%rax)
jne 0xe9ba2
movq 0x20(%rax), %rax
testb $0x2, 0x1(%rax)
je 0xe9ba2
jmp 0xe9bdf
| _ZNK6google8protobuf8compiler4java33ImmutableStringFieldLiteGenerator22GenerateBuilderMembersEPNS0_2io7PrinterE:
push r15; int
push r14; int
push r13; char
push r12; int
push rbx; void *
mov rbx, rsi
mov r14, rdi
mov r15, [rdi+8]
mov al, [r15+1]
not al
test al, 60h
jz short loc_E9BDF
mov rdi, r15; this
call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void)
test rax, rax
jnz short loc_E9BA2
mov al, [r15+1]
test al, 2
jnz short loc_E9BA2
mov rcx, [r15+10h]
cmp byte ptr [rcx+3], 2
jnz loc_E9D16
loc_E9BA2:
mov rsi, [r14+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
xor edx, edx
xor ecx, ecx
call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rsi, [r14+10h]
lea rdx, aJavaLangOverri_71; "@java.lang.Override\n$deprecation$publi"...
mov rdi, rbx; this
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r14+8]
lea rsi, a0oneof1+0Bh; "{"
lea rdx, aKotlinJvmJvmsy_32+0E3h; "}"
mov rdi, rbx
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
loc_E9BDF:
mov rsi, [r14+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
mov edx, 1
xor ecx, ecx
call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea r15, [r14+10h]
lea rdx, aJavaLangOverri_89; "@java.lang.Override\n$deprecation$publi"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r14+8]
lea r12, a0oneof1+0Bh; "{"
lea r13, aKotlinJvmJvmsy_32+0E3h; "}"
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
mov rsi, [r14+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
mov edx, 1
xor ecx, ecx
call _ZN6google8protobuf8compiler4java39WriteFieldStringBytesAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldStringBytesAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rdx, aJavaLangOverri_90; "@java.lang.Override\n$deprecation$publi"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r14+8]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
mov rsi, [r14+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
mov edx, 2
mov ecx, 1
call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rdx, aDeprecationPub_92; "$deprecation$public Builder ${$set$capi"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r14+8]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
mov rsi, [r14+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
mov edx, 3
mov ecx, 1
call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rdx, aDeprecationPub_58; "$deprecation$public Builder ${$clear$ca"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r14+8]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
mov rsi, [r14+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
mov edx, 2
mov ecx, 1
call _ZN6google8protobuf8compiler4java39WriteFieldStringBytesAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldStringBytesAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rdx, aDeprecationPub_93; "$deprecation$public Builder ${$set$capi"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r14+8]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
loc_E9D16:
test al, 10h
setz cl
mov rax, [r15+28h]
test rax, rax
setz dl
or dl, cl
jnz loc_E9BDF
cmp dword ptr [rax+4], 1
jnz loc_E9BA2
mov rax, [rax+20h]
test byte ptr [rax+1], 2
jz loc_E9BA2
jmp loc_E9BDF
| GenerateBuilderMembers:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV R15,qword ptr [RDI + 0x8]
MOV AL,byte ptr [R15 + 0x1]
NOT AL
TEST AL,0x60
JZ 0x001e9bdf
MOV RDI,R15
CALL 0x0021d7ce
TEST RAX,RAX
JNZ 0x001e9ba2
MOV AL,byte ptr [R15 + 0x1]
TEST AL,0x2
JNZ 0x001e9ba2
MOV RCX,qword ptr [R15 + 0x10]
CMP byte ptr [RCX + 0x3],0x2
JNZ 0x001e9d16
LAB_001e9ba2:
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001cff9a
LEA RSI,[R14 + 0x10]
LEA RDX,[0x2dd7c4]
MOV RDI,RBX
CALL 0x0026cd32
MOV RCX,qword ptr [R14 + 0x8]
LEA RSI,[0x2f00d9]
LEA RDX,[0x2e06cd]
MOV RDI,RBX
CALL 0x001afc7e
LAB_001e9bdf:
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV EDX,0x1
XOR ECX,ECX
CALL 0x001cff9a
LEA R15,[R14 + 0x10]
LEA RDX,[0x2e429c]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RCX,qword ptr [R14 + 0x8]
LEA R12,[0x2f00d9]
LEA R13,[0x2e06cd]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x001afc7e
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV EDX,0x1
XOR ECX,ECX
CALL 0x001d033e
LEA RDX,[0x2e4323]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RCX,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x001afc7e
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV EDX,0x2
MOV ECX,0x1
CALL 0x001cff9a
LEA RDX,[0x2e43c6]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RCX,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x001afc7e
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV EDX,0x3
MOV ECX,0x1
CALL 0x001cff9a
LEA RDX,[0x2dde3d]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RCX,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x001afc7e
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV EDX,0x2
MOV ECX,0x1
CALL 0x001d033e
LEA RDX,[0x2e4469]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RCX,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x001afc7e
LAB_001e9d16:
TEST AL,0x10
SETZ CL
MOV RAX,qword ptr [R15 + 0x28]
TEST RAX,RAX
SETZ DL
OR DL,CL
JNZ 0x001e9bdf
CMP dword ptr [RAX + 0x4],0x1
JNZ 0x001e9ba2
MOV RAX,qword ptr [RAX + 0x20]
TEST byte ptr [RAX + 0x1],0x2
JZ 0x001e9ba2
JMP 0x001e9bdf
|
/* google::protobuf::compiler::java::ImmutableStringFieldLiteGenerator::GenerateBuilderMembers(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::java::ImmutableStringFieldLiteGenerator::GenerateBuilderMembers
(ImmutableStringFieldLiteGenerator *this,Printer *param_1)
{
map *pmVar1;
FieldDescriptor *this_00;
long lVar2;
this_00 = *(FieldDescriptor **)(this + 8);
if (((~(byte)this_00[1] & 0x60) != 0) &&
((((lVar2 = FieldDescriptor::message_type(this_00), lVar2 != 0 || (((byte)this_00[1] & 2) != 0)
) || (*(char *)(*(long *)(this_00 + 0x10) + 3) == '\x02')) ||
((lVar2 = *(long *)(this_00 + 0x28), lVar2 != 0 && ((byte)this_00[1] & 0x10) != 0 &&
((*(int *)(lVar2 + 4) != 1 || ((*(byte *)(*(long *)(lVar2 + 0x20) + 1) & 2) == 0)))))))) {
WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),0,0);
io::Printer::Print(param_1,(map *)(this + 0x10),
"@java.lang.Override\n$deprecation$public boolean ${$has$capitalized_name$$}$() {\n return instance.has$capitalized_name$();\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
}
WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),1,0);
pmVar1 = (map *)(this + 0x10);
io::Printer::Print(param_1,pmVar1,
"@java.lang.Override\n$deprecation$public java.lang.String ${$get$capitalized_name$$}$() {\n return instance.get$capitalized_name$();\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
WriteFieldStringBytesAccessorDocComment(param_1,*(int8 *)(this + 8),1,0);
io::Printer::Print(param_1,pmVar1,
"@java.lang.Override\n$deprecation$public com.google.protobuf.ByteString\n ${$get$capitalized_name$Bytes$}$() {\n return instance.get$capitalized_name$Bytes();\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),2,1);
io::Printer::Print(param_1,pmVar1,
"$deprecation$public Builder ${$set$capitalized_name$$}$(\n java.lang.String value) {\n copyOnWrite();\n instance.set$capitalized_name$(value);\n return this;\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),3,1);
io::Printer::Print(param_1,pmVar1,
"$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n copyOnWrite();\n instance.clear$capitalized_name$();\n return this;\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
WriteFieldStringBytesAccessorDocComment(param_1,*(int8 *)(this + 8),2,1);
io::Printer::Print(param_1,pmVar1,
"$deprecation$public Builder ${$set$capitalized_name$Bytes$}$(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.set$capitalized_name$Bytes(value);\n return this;\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
return;
}
|
||
5,635 | ma_ft_cmp | eloqsql/storage/maria/ma_ft_update.c | int _ma_ft_cmp(MARIA_HA *info, uint keynr, const uchar *rec1, const uchar *rec2)
{
FT_SEG_ITERATOR ftsi1, ftsi2;
CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset;
DBUG_ENTER("_ma_ft_cmp");
_ma_ft_segiterator_init(info, keynr, rec1, &ftsi1);
_ma_ft_segiterator_init(info, keynr, rec2, &ftsi2);
while (_ma_ft_segiterator(&ftsi1) && _ma_ft_segiterator(&ftsi2))
{
if ((ftsi1.pos != ftsi2.pos) &&
(!ftsi1.pos || !ftsi2.pos ||
ha_compare_text(cs, ftsi1.pos,ftsi1.len,
ftsi2.pos,ftsi2.len,0)))
DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT);
}
DBUG_RETURN(GEE_THEY_ARE_ABSOLUTELY_IDENTICAL);
} | O0 | c | ma_ft_cmp:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq 0xc0(%rax), %rax
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
leaq -0x48(%rbp), %rcx
callq 0x75be0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x28(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0x75be0
leaq -0x48(%rbp), %rdi
callq 0x75cb0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x71(%rbp)
je 0x760a2
leaq -0x68(%rbp), %rdi
callq 0x75cb0
cmpl $0x0, %eax
setne %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x760ab
jmp 0x760f4
movq -0x30(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x760f2
cmpq $0x0, -0x30(%rbp)
je 0x760e7
cmpq $0x0, -0x50(%rbp)
je 0x760e7
movq -0x70(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x44(%rbp), %eax
movl %eax, %edx
movq -0x50(%rbp), %rcx
movl -0x64(%rbp), %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0xf6640
cmpl $0x0, %eax
je 0x760f2
jmp 0x760e9
movl $0x1, -0x4(%rbp)
jmp 0x760fd
jmp 0x7607b
jmp 0x760f6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_ft_cmp:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_14]
imul rcx, 118h
add rax, rcx
mov rax, [rax+0C0h]
mov rax, [rax]
mov [rbp+var_70], rax
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_48]
call _ma_ft_segiterator_init
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_28]
lea rcx, [rbp+var_68]
call _ma_ft_segiterator_init
loc_7607B:
lea rdi, [rbp+var_48]
call _ma_ft_segiterator
mov ecx, eax
xor eax, eax
cmp ecx, 0
mov [rbp+var_71], al
jz short loc_760A2
lea rdi, [rbp+var_68]
call _ma_ft_segiterator
cmp eax, 0
setnz al
mov [rbp+var_71], al
loc_760A2:
mov al, [rbp+var_71]
test al, 1
jnz short loc_760AB
jmp short loc_760F4
loc_760AB:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_50]
jz short loc_760F2
cmp [rbp+var_30], 0
jz short loc_760E7
cmp [rbp+var_50], 0
jz short loc_760E7
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_30]
mov eax, [rbp+var_44]
mov edx, eax
mov rcx, [rbp+var_50]
mov eax, [rbp+var_64]
mov r8d, eax
xor r9d, r9d
call ha_compare_text
cmp eax, 0
jz short loc_760F2
loc_760E7:
jmp short $+2
loc_760E9:
mov [rbp+var_4], 1
jmp short loc_760FD
loc_760F2:
jmp short loc_7607B
loc_760F4:
jmp short $+2
loc_760F6:
mov [rbp+var_4], 0
loc_760FD:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long ma_ft_cmp(long long a1, unsigned int a2, long long a3, long long a4)
{
bool v5; // [rsp+Fh] [rbp-71h]
long long v6; // [rsp+10h] [rbp-70h]
_BYTE v7[4]; // [rsp+18h] [rbp-68h] BYREF
unsigned int v8; // [rsp+1Ch] [rbp-64h]
long long v9; // [rsp+30h] [rbp-50h]
_BYTE v10[4]; // [rsp+38h] [rbp-48h] BYREF
unsigned int v11; // [rsp+3Ch] [rbp-44h]
long long v12; // [rsp+50h] [rbp-30h]
long long v13; // [rsp+58h] [rbp-28h]
long long v14; // [rsp+60h] [rbp-20h]
unsigned int v15; // [rsp+6Ch] [rbp-14h]
long long v16; // [rsp+70h] [rbp-10h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v6 = **(_QWORD **)(280LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL) + 192);
ma_ft_segiterator_init(a1, a2, a3, (long long)v10);
ma_ft_segiterator_init(v16, v15, v13, (long long)v7);
while ( 1 )
{
v5 = 0;
if ( (unsigned int)ma_ft_segiterator((long long)v10) )
v5 = (unsigned int)ma_ft_segiterator((long long)v7) != 0;
if ( !v5 )
break;
if ( v12 != v9 && (!v12 || !v9 || (unsigned int)ha_compare_text(v6, v12, v11, v9, v8, 0LL)) )
return 1;
}
return 0;
}
| _ma_ft_cmp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x48]
CALL 0x00175be0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x28]
LEA RCX,[RBP + -0x68]
CALL 0x00175be0
LAB_0017607b:
LEA RDI,[RBP + -0x48]
CALL 0x00175cb0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x71],AL
JZ 0x001760a2
LEA RDI,[RBP + -0x68]
CALL 0x00175cb0
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x71],AL
LAB_001760a2:
MOV AL,byte ptr [RBP + -0x71]
TEST AL,0x1
JNZ 0x001760ab
JMP 0x001760f4
LAB_001760ab:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x50]
JZ 0x001760f2
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001760e7
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001760e7
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x44]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x64]
MOV R8D,EAX
XOR R9D,R9D
CALL 0x001f6640
CMP EAX,0x0
JZ 0x001760f2
LAB_001760e7:
JMP 0x001760e9
LAB_001760e9:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001760fd
LAB_001760f2:
JMP 0x0017607b
LAB_001760f4:
JMP 0x001760f6
LAB_001760f6:
MOV dword ptr [RBP + -0x4],0x0
LAB_001760fd:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4 _ma_ft_cmp(long *param_1,uint param_2,int8 param_3,int8 param_4)
{
int8 uVar1;
int iVar2;
bool bVar3;
int1 local_70 [4];
int4 local_6c;
long local_58;
int1 local_50 [4];
int4 local_4c;
long local_38;
int8 local_30;
int8 local_28;
uint local_1c;
long *local_18;
uVar1 = **(int8 **)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xc0);
local_30 = param_4;
local_28 = param_3;
local_1c = param_2;
local_18 = param_1;
_ma_ft_segiterator_init(param_1,param_2,param_3,local_50);
_ma_ft_segiterator_init(local_18,local_1c,local_30,local_70);
while( true ) {
iVar2 = _ma_ft_segiterator(local_50);
bVar3 = false;
if (iVar2 != 0) {
iVar2 = _ma_ft_segiterator(local_70);
bVar3 = iVar2 != 0;
}
if (!bVar3) break;
if ((local_38 != local_58) &&
(((local_38 == 0 || (local_58 == 0)) ||
(iVar2 = ha_compare_text(uVar1,local_38,local_4c,local_58,local_6c,0), iVar2 != 0)))) {
return 1;
}
}
return 0;
}
|
|
5,636 | pagecache_delete_by_link | eloqsql/storage/maria/ma_pagecache.c | my_bool pagecache_delete_by_link(PAGECACHE *pagecache,
PAGECACHE_BLOCK_LINK *block,
enum pagecache_page_lock lock,
my_bool flush)
{
my_bool error= 0;
enum pagecache_page_pin pin= PAGECACHE_PIN_LEFT_PINNED;
DBUG_ENTER("pagecache_delete_by_link");
DBUG_PRINT("enter", ("fd: %d block %p %s %s",
block->hash_link->file.file,
block,
page_cache_page_lock_str[lock],
page_cache_page_pin_str[pin]));
DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE ||
lock == PAGECACHE_LOCK_LEFT_WRITELOCKED);
DBUG_ASSERT(block->pins != 0); /* should be pinned */
if (pagecache->can_be_used)
{
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
if (!pagecache->can_be_used)
goto end;
/*
This block should be pinned (i.e. has not zero request counter) =>
Such block can't be chosen for eviction.
*/
DBUG_ASSERT((block->status &
(PCBLOCK_IN_SWITCH | PCBLOCK_REASSIGNED)) == 0);
/* This lock is deleted in pagecache_delete_internal() called below */
inc_counter_for_resize_op(pagecache);
/*
make_lock_and_pin() can't fail here, because we are keeping pin on the
block and it can't be evicted (which is cause of lock fail and retry)
*/
if (make_lock_and_pin(pagecache, block, lock, pin, FALSE))
DBUG_ASSERT(0);
/*
get_present_hash_link() side effect emulation before call
pagecache_delete_internal()
*/
block->hash_link->requests++;
error= pagecache_delete_internal(pagecache, block, block->hash_link,
flush);
end:
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
}
DBUG_RETURN(error);
} | O0 | c | pagecache_delete_by_link:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb %al, -0x15(%rbp)
movb $0x0, -0x16(%rbp)
movl $0x0, -0x1c(%rbp)
jmp 0x9cdc5
jmp 0x9cdc7
jmp 0x9cdc9
jmp 0x9cdcb
jmp 0x9cdcd
movq -0x8(%rbp), %rax
cmpb $0x0, 0x1aa(%rax)
je 0x9ce73
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
leaq 0xbd918(%rip), %rsi # 0x15a708
movl $0x1002, %edx # imm = 0x1002
callq 0x9a920
movq -0x8(%rbp), %rax
cmpb $0x0, 0x1aa(%rax)
jne 0x9ce09
jmp 0x9ce63
jmp 0x9ce0b
jmp 0x9ce0d
movq -0x8(%rbp), %rdi
callq 0x9acd0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x1c(%rbp), %ecx
xorl %r8d, %r8d
callq 0x9b6e0
cmpb $0x0, %al
je 0x9ce36
jmp 0x9ce32
jmp 0x9ce34
jmp 0x9ce36
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x68(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x68(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
movsbl -0x15(%rbp), %ecx
callq 0x9ce90
movb %al, -0x16(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
callq 0x9a990
jmp 0x9ce75
movb -0x16(%rbp), %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| pagecache_delete_by_link:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_15], al
mov [rbp+var_16], 0
mov [rbp+var_1C], 0
jmp short $+2
loc_9CDC5:
jmp short $+2
loc_9CDC7:
jmp short $+2
loc_9CDC9:
jmp short $+2
loc_9CDCB:
jmp short $+2
loc_9CDCD:
mov rax, [rbp+var_8]
cmp byte ptr [rax+1AAh], 0
jz loc_9CE73
mov rdi, [rbp+var_8]
add rdi, 0C8h
lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 1002h
call inline_mysql_mutex_lock_13
mov rax, [rbp+var_8]
cmp byte ptr [rax+1AAh], 0
jnz short loc_9CE09
jmp short loc_9CE63
loc_9CE09:
jmp short $+2
loc_9CE0B:
jmp short $+2
loc_9CE0D:
mov rdi, [rbp+var_8]
call inc_counter_for_resize_op
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
mov ecx, [rbp+var_1C]
xor r8d, r8d
call make_lock_and_pin
cmp al, 0
jz short loc_9CE36
jmp short $+2
loc_9CE32:
jmp short $+2
loc_9CE34:
jmp short $+2
loc_9CE36:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov ecx, [rax+68h]
add ecx, 1
mov [rax+68h], ecx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rdx, [rax+20h]
movsx ecx, [rbp+var_15]
call pagecache_delete_internal
mov [rbp+var_16], al
loc_9CE63:
mov rdi, [rbp+var_8]
add rdi, 0C8h
call inline_mysql_mutex_unlock_14
loc_9CE73:
jmp short $+2
loc_9CE75:
mov al, [rbp+var_16]
mov [rbp+var_1D], al
mov al, [rbp+var_1D]
add rsp, 20h
pop rbp
retn
| char pagecache_delete_by_link(long long a1, long long a2, int a3, char a4)
{
char v5; // [rsp+Ah] [rbp-16h]
v5 = 0;
if ( *(_BYTE *)(a1 + 426) )
{
inline_mysql_mutex_lock_13(
a1 + 200,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0x1002u);
if ( *(_BYTE *)(a1 + 426) )
{
inc_counter_for_resize_op(a1);
make_lock_and_pin(a1, a2, a3, 0, 0);
++*(_DWORD *)(*(_QWORD *)(a2 + 32) + 104LL);
v5 = pagecache_delete_internal(a1, a2, *(_QWORD *)(a2 + 32), (unsigned int)a4);
}
inline_mysql_mutex_unlock_14(a1 + 200);
}
return v5;
}
| pagecache_delete_by_link:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV byte ptr [RBP + -0x15],AL
MOV byte ptr [RBP + -0x16],0x0
MOV dword ptr [RBP + -0x1c],0x0
JMP 0x0019cdc5
LAB_0019cdc5:
JMP 0x0019cdc7
LAB_0019cdc7:
JMP 0x0019cdc9
LAB_0019cdc9:
JMP 0x0019cdcb
LAB_0019cdcb:
JMP 0x0019cdcd
LAB_0019cdcd:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x1aa],0x0
JZ 0x0019ce73
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc8
LEA RSI,[0x25a708]
MOV EDX,0x1002
CALL 0x0019a920
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x1aa],0x0
JNZ 0x0019ce09
JMP 0x0019ce63
LAB_0019ce09:
JMP 0x0019ce0b
LAB_0019ce0b:
JMP 0x0019ce0d
LAB_0019ce0d:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0019acd0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
MOV ECX,dword ptr [RBP + -0x1c]
XOR R8D,R8D
CALL 0x0019b6e0
CMP AL,0x0
JZ 0x0019ce36
JMP 0x0019ce32
LAB_0019ce32:
JMP 0x0019ce34
LAB_0019ce34:
JMP 0x0019ce36
LAB_0019ce36:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV ECX,dword ptr [RAX + 0x68]
ADD ECX,0x1
MOV dword ptr [RAX + 0x68],ECX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x20]
MOVSX ECX,byte ptr [RBP + -0x15]
CALL 0x0019ce90
MOV byte ptr [RBP + -0x16],AL
LAB_0019ce63:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc8
CALL 0x0019a990
LAB_0019ce73:
JMP 0x0019ce75
LAB_0019ce75:
MOV AL,byte ptr [RBP + -0x16]
MOV byte ptr [RBP + -0x1d],AL
MOV AL,byte ptr [RBP + -0x1d]
ADD RSP,0x20
POP RBP
RET
|
int1 pagecache_delete_by_link(long param_1,long param_2,int4 param_3,char param_4)
{
int1 local_1e;
local_1e = 0;
if (*(char *)(param_1 + 0x1aa) != '\0') {
inline_mysql_mutex_lock
(param_1 + 200,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c"
,0x1002);
if (*(char *)(param_1 + 0x1aa) != '\0') {
inc_counter_for_resize_op(param_1);
make_lock_and_pin(param_1,param_2,param_3,0,0);
*(int *)(*(long *)(param_2 + 0x20) + 0x68) = *(int *)(*(long *)(param_2 + 0x20) + 0x68) + 1;
local_1e = pagecache_delete_internal
(param_1,param_2,*(int8 *)(param_2 + 0x20),(int)param_4);
}
inline_mysql_mutex_unlock(param_1 + 200);
}
return local_1e;
}
|
|
5,637 | ma_net_safe_read | eloqsql/libmariadb/libmariadb/mariadb_lib.c | ulong
ma_net_safe_read(MYSQL *mysql)
{
NET *net= &mysql->net;
ulong len=0;
restart:
if (net->pvio != 0)
len=ma_net_read(net);
if (len == packet_error || len == 0)
{
end_server(mysql);
#ifdef HAVE_TLS
/* don't overwrite possible tls protocol errors */
if (net->last_errno != CR_SSL_CONNECTION_ERROR)
#endif
{
my_set_error(mysql, net->last_errno == ER_NET_PACKET_TOO_LARGE ?
CR_NET_PACKET_TOO_LARGE:
CR_SERVER_LOST,
SQLSTATE_UNKNOWN, 0, errno);
}
return(packet_error);
}
if (net->read_pos[0] == 255)
{
if (len > 3)
{
char *pos=(char*) net->read_pos+1;
uint last_errno=uint2korr(pos);
pos+=2;
len-=2;
if (last_errno== 65535 &&
((mariadb_connection(mysql) && (mysql->server_capabilities & CLIENT_PROGRESS)) ||
(!(mysql->extension->mariadb_server_capabilities & MARIADB_CLIENT_PROGRESS << 32))))
{
if (cli_report_progress(mysql, (uchar *)pos, (uint) (len-1)))
{
/* Wrong packet */
my_set_error(mysql, CR_MALFORMED_PACKET, SQLSTATE_UNKNOWN, 0);
return (packet_error);
}
goto restart;
}
net->last_errno= last_errno;
if (pos[0]== '#')
{
ma_strmake(net->sqlstate, pos+1, SQLSTATE_LENGTH);
pos+= SQLSTATE_LENGTH + 1;
}
else
{
strncpy(net->sqlstate, SQLSTATE_UNKNOWN, SQLSTATE_LENGTH);
}
ma_strmake(net->last_error,(char*) pos,
min(len,sizeof(net->last_error)-1));
}
else
{
my_set_error(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0);
}
mysql->server_status&= ~SERVER_MORE_RESULTS_EXIST;
return(packet_error);
}
return len;
} | O0 | c | ma_net_safe_read:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x16953
movq -0x18(%rbp), %rdi
callq 0x498e0
movq %rax, -0x20(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x20(%rbp)
je 0x16965
cmpq $0x0, -0x20(%rbp)
jne 0x169e0
movq -0x10(%rbp), %rdi
callq 0x16be0
movq -0x18(%rbp), %rax
cmpl $0x7ea, 0x90(%rax) # imm = 0x7EA
je 0x169d2
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl 0x90(%rax), %edx
movl $0x7dd, %eax # imm = 0x7DD
movl $0x7e4, %ecx # imm = 0x7E4
cmpl $0x481, %edx # imm = 0x481
cmovel %ecx, %eax
movl %eax, -0x3c(%rbp)
leaq 0x4c5c3(%rip), %rax # 0x62f70
movq (%rax), %rax
movq %rax, -0x38(%rbp)
callq 0x13050
movq -0x48(%rbp), %rdi
movl -0x3c(%rbp), %esi
movq -0x38(%rbp), %rdx
movl (%rax), %r8d
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x16c30
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x8(%rbp)
jmp 0x16bd3
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
jne 0x16bcb
cmpq $0x3, -0x20(%rbp)
jbe 0x16b8f
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x28(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
subq $0x2, %rax
movq %rax, -0x20(%rbp)
cmpl $0xffff, -0x2c(%rbp) # imm = 0xFFFF
jne 0x16ae4
movq -0x10(%rbp), %rdi
callq 0x16db0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x16a7e
movq -0x10(%rbp), %rax
movq 0x370(%rax), %rax
andq $0x20000000, %rax # imm = 0x20000000
cmpq $0x0, %rax
jne 0x16a97
movq -0x10(%rbp), %rax
movq 0x4f0(%rax), %rax
movq 0x70(%rax), %rax
andq $0x0, %rax
cmpq $0x0, %rax
jne 0x16ae4
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
subq $0x1, %rax
movl %eax, %edx
callq 0x16e10
cmpl $0x0, %eax
je 0x16adf
movq -0x10(%rbp), %rdi
leaq 0x4c4b2(%rip), %rax # 0x62f70
movq (%rax), %rdx
movl $0x7eb, %esi # imm = 0x7EB
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x16c30
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x8(%rbp)
jmp 0x16bd3
jmp 0x1693c
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x90(%rax)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x16b28
movq -0x18(%rbp), %rdi
addq $0x297, %rdi # imm = 0x297
movq -0x28(%rbp), %rsi
addq $0x1, %rsi
movl $0x5, %edx
callq 0x32ab0
movq -0x28(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x28(%rbp)
jmp 0x16b47
movq -0x18(%rbp), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x4c436(%rip), %rax # 0x62f70
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x18(%rbp), %rax
addq $0x97, %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x1ff, -0x20(%rbp) # imm = 0x1FF
jae 0x16b71
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x16b7c
movl $0x1ff, %eax # imm = 0x1FF
movq %rax, -0x60(%rbp)
jmp 0x16b7c
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rdx
callq 0x32ab0
jmp 0x16bad
movq -0x10(%rbp), %rdi
leaq 0x4c3d6(%rip), %rax # 0x62f70
movq (%rax), %rdx
movl $0x7d0, %esi # imm = 0x7D0
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x16c30
movq -0x10(%rbp), %rax
movl 0x380(%rax), %ecx
andl $-0x9, %ecx
movl %ecx, 0x380(%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x8(%rbp)
jmp 0x16bd3
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| ma_net_safe_read:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
mov [rbp+var_20], 0
loc_1693C:
mov rax, [rbp+var_18]
cmp qword ptr [rax], 0
jz short loc_16953
mov rdi, [rbp+var_18]
call ma_net_read
mov [rbp+var_20], rax
loc_16953:
mov eax, 0FFFFFFFFh
cmp [rbp+var_20], rax
jz short loc_16965
cmp [rbp+var_20], 0
jnz short loc_169E0
loc_16965:
mov rdi, [rbp+var_10]
call end_server
mov rax, [rbp+var_18]
cmp dword ptr [rax+90h], 7EAh
jz short loc_169D2
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
mov edx, [rax+90h]
mov eax, 7DDh
mov ecx, 7E4h
cmp edx, 481h
cmovz eax, ecx
mov [rbp+var_3C], eax
lea rax, SQLSTATE_UNKNOWN
mov rax, [rax]
mov [rbp+var_38], rax
call ___errno_location
mov rdi, [rbp+var_48]
mov esi, [rbp+var_3C]
mov rdx, [rbp+var_38]
mov r8d, [rax]
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
loc_169D2:
mov eax, 0FFFFFFFFh
mov [rbp+var_8], rax
jmp loc_16BD3
loc_169E0:
mov rax, [rbp+var_18]
mov rax, [rax+20h]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jnz loc_16BCB
cmp [rbp+var_20], 3
jbe loc_16B8F
mov rax, [rbp+var_18]
mov rax, [rax+20h]
add rax, 1
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_28]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx eax, ax
mov [rbp+var_2C], eax
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
sub rax, 2
mov [rbp+var_20], rax
cmp [rbp+var_2C], 0FFFFh
jnz loc_16AE4
mov rdi, [rbp+var_10]
call mariadb_connection
movsx eax, al
cmp eax, 0
jz short loc_16A7E
mov rax, [rbp+var_10]
mov rax, [rax+370h]
and rax, 20000000h
cmp rax, 0
jnz short loc_16A97
loc_16A7E:
mov rax, [rbp+var_10]
mov rax, [rax+4F0h]
mov rax, [rax+70h]
and rax, 0
cmp rax, 0
jnz short loc_16AE4
loc_16A97:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rax, [rbp+var_20]
sub rax, 1
mov edx, eax
call cli_report_progress
cmp eax, 0
jz short loc_16ADF
mov rdi, [rbp+var_10]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7EBh
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
mov eax, 0FFFFFFFFh
mov [rbp+var_8], rax
jmp loc_16BD3
loc_16ADF:
jmp loc_1693C
loc_16AE4:
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax+90h], ecx
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 23h ; '#'
jnz short loc_16B28
mov rdi, [rbp+var_18]
add rdi, 297h
mov rsi, [rbp+var_28]
add rsi, 1
mov edx, 5
call ma_strmake
mov rax, [rbp+var_28]
add rax, 6
mov [rbp+var_28], rax
jmp short loc_16B47
loc_16B28:
mov rdi, [rbp+var_18]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
loc_16B47:
mov rax, [rbp+var_18]
add rax, 97h
mov [rbp+var_58], rax
mov rax, [rbp+var_28]
mov [rbp+var_50], rax
cmp [rbp+var_20], 1FFh
jnb short loc_16B71
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
jmp short loc_16B7C
loc_16B71:
mov eax, 1FFh
mov [rbp+var_60], rax
jmp short $+2
loc_16B7C:
mov rsi, [rbp+var_50]
mov rdi, [rbp+var_58]
mov rdx, [rbp+var_60]
call ma_strmake
jmp short loc_16BAD
loc_16B8F:
mov rdi, [rbp+var_10]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D0h
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
loc_16BAD:
mov rax, [rbp+var_10]
mov ecx, [rax+380h]
and ecx, 0FFFFFFF7h
mov [rax+380h], ecx
mov eax, 0FFFFFFFFh
mov [rbp+var_8], rax
jmp short loc_16BD3
loc_16BCB:
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_16BD3:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
| long long ma_net_safe_read(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
int v6; // eax
_DWORD *v7; // rax
int v8; // r9d
long long v10; // [rsp+8h] [rbp-58h]
int v11; // [rsp+24h] [rbp-3Ch]
int v12; // [rsp+28h] [rbp-38h]
int v13; // [rsp+34h] [rbp-2Ch]
_BYTE *v14; // [rsp+38h] [rbp-28h]
unsigned long long v15; // [rsp+40h] [rbp-20h]
v15 = 0LL;
while ( 1 )
{
if ( *(_QWORD *)a1 )
v15 = ma_net_read(a1);
if ( v15 == 0xFFFFFFFF || !v15 )
break;
if ( **(unsigned __int8 **)(a1 + 32) != 255 )
return v15;
if ( v15 <= 3 )
{
my_set_error(a1, 2000, (_DWORD)SQLSTATE_UNKNOWN, 0, a5, a6);
LABEL_24:
*(_DWORD *)(a1 + 896) &= ~8u;
return 0xFFFFFFFFLL;
}
v13 = (unsigned __int16)((*(unsigned __int8 *)(*(_QWORD *)(a1 + 32) + 2LL) << 8)
+ *(unsigned __int8 *)(*(_QWORD *)(a1 + 32) + 1LL));
v14 = (_BYTE *)(*(_QWORD *)(a1 + 32) + 3LL);
v15 -= 2LL;
if ( v13 != 0xFFFF )
{
*(_DWORD *)(a1 + 144) = v13;
if ( *v14 == 35 )
{
ma_strmake(a1 + 663, v14 + 1, 5LL);
v14 += 6;
}
else
{
strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL);
}
v10 = a1 + 151;
if ( v15 >= 0x1FF )
ma_strmake(v10, v14, 511LL);
else
ma_strmake(v10, v14, v15);
goto LABEL_24;
}
mariadb_connection(a1);
if ( (unsigned int)cli_report_progress(a1, v14, (unsigned int)(v15 - 1)) )
{
my_set_error(a1, 2027, (_DWORD)SQLSTATE_UNKNOWN, 0, a5, a6);
return 0xFFFFFFFFLL;
}
}
end_server(a1);
if ( *(_DWORD *)(a1 + 144) != 2026 )
{
v6 = 2013;
if ( *(_DWORD *)(a1 + 144) == 1153 )
v6 = 2020;
v11 = v6;
v12 = (int)SQLSTATE_UNKNOWN;
v7 = (_DWORD *)__errno_location();
my_set_error(a1, v11, v12, 0, *v7, v8);
}
return 0xFFFFFFFFLL;
}
| ma_net_safe_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RBP + -0x20],0x0
LAB_0011693c:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX],0x0
JZ 0x00116953
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001498e0
MOV qword ptr [RBP + -0x20],RAX
LAB_00116953:
MOV EAX,0xffffffff
CMP qword ptr [RBP + -0x20],RAX
JZ 0x00116965
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001169e0
LAB_00116965:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00116be0
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x90],0x7ea
JZ 0x001169d2
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RAX + 0x90]
MOV EAX,0x7dd
MOV ECX,0x7e4
CMP EDX,0x481
CMOVZ EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
LEA RAX,[0x162f70]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CALL 0x00113050
MOV RDI,qword ptr [RBP + -0x48]
MOV ESI,dword ptr [RBP + -0x3c]
MOV RDX,qword ptr [RBP + -0x38]
MOV R8D,dword ptr [RAX]
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x00116c30
LAB_001169d2:
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00116bd3
LAB_001169e0:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JNZ 0x00116bcb
CMP qword ptr [RBP + -0x20],0x3
JBE 0x00116b8f
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
CMP dword ptr [RBP + -0x2c],0xffff
JNZ 0x00116ae4
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00116db0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00116a7e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x20000000
CMP RAX,0x0
JNZ 0x00116a97
LAB_00116a7e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RAX,qword ptr [RAX + 0x70]
AND RAX,0x0
CMP RAX,0x0
JNZ 0x00116ae4
LAB_00116a97:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,0x1
MOV EDX,EAX
CALL 0x00116e10
CMP EAX,0x0
JZ 0x00116adf
MOV RDI,qword ptr [RBP + -0x10]
LEA RAX,[0x162f70]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7eb
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x00116c30
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00116bd3
LAB_00116adf:
JMP 0x0011693c
LAB_00116ae4:
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x90],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x23
JNZ 0x00116b28
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x297
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x1
MOV EDX,0x5
CALL 0x00132ab0
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x6
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00116b47
LAB_00116b28:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x297
LEA RAX,[0x162f70]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
LAB_00116b47:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x97
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x20],0x1ff
JNC 0x00116b71
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00116b7c
LAB_00116b71:
MOV EAX,0x1ff
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00116b7c
LAB_00116b7c:
MOV RSI,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x60]
CALL 0x00132ab0
JMP 0x00116bad
LAB_00116b8f:
MOV RDI,qword ptr [RBP + -0x10]
LEA RAX,[0x162f70]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d0
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x00116c30
LAB_00116bad:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x380]
AND ECX,0xfffffff7
MOV dword ptr [RAX + 0x380],ECX
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00116bd3
LAB_00116bcb:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_00116bd3:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
ulong ma_net_safe_read(long *param_1)
{
long lVar1;
int *puVar2;
int4 uVar3;
uint uVar4;
int iVar5;
int *piVar6;
ulong local_68;
char *local_30;
ulong local_28;
local_28 = 0;
while( true ) {
if (*param_1 != 0) {
local_28 = ma_net_read(param_1);
}
if ((local_28 == 0xffffffff) || (local_28 == 0)) {
end_server(param_1);
puVar2 = SQLSTATE_UNKNOWN;
if ((int)param_1[0x12] != 0x7ea) {
uVar3 = 0x7dd;
if ((int)param_1[0x12] == 0x481) {
uVar3 = 0x7e4;
}
piVar6 = __errno_location();
my_set_error(param_1,uVar3,puVar2,0,*piVar6);
}
return 0xffffffff;
}
if (*(char *)param_1[4] != -1) {
return local_28;
}
if (local_28 < 4) break;
lVar1 = param_1[4];
uVar4 = (uint)*(byte *)(lVar1 + 1) + (uint)*(byte *)(lVar1 + 2) * 0x100 & 0xffff;
local_30 = (char *)(lVar1 + 3);
local_68 = local_28 - 2;
if (uVar4 != 0xffff) {
*(uint *)(param_1 + 0x12) = uVar4;
if (*local_30 == '#') {
ma_strmake((long)param_1 + 0x297,lVar1 + 4,5);
local_30 = (char *)(lVar1 + 9);
}
else {
strncpy((char *)((long)param_1 + 0x297),SQLSTATE_UNKNOWN,5);
}
if (0x1fe < local_68) {
local_68 = 0x1ff;
}
ma_strmake((long)param_1 + 0x97,local_30,local_68);
goto LAB_00116bad;
}
mariadb_connection(param_1);
iVar5 = cli_report_progress(param_1,local_30,(int)local_68 + -1);
local_28 = local_68;
if (iVar5 != 0) {
my_set_error(param_1,0x7eb,SQLSTATE_UNKNOWN,0);
return 0xffffffff;
}
}
my_set_error(param_1,2000,SQLSTATE_UNKNOWN,0);
LAB_00116bad:
*(uint *)(param_1 + 0x70) = *(uint *)(param_1 + 0x70) & 0xfffffff7;
return 0xffffffff;
}
|
|
5,638 | uf_intervall | eloqsql/storage/maria/ma_packrec.c | static void uf_intervall(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff,
uchar *to,
uchar *end)
{
reg1 uint field_length=(uint) (end-to);
memcpy(to,rec->huff_tree->intervalls+field_length*decode_pos(bit_buff,
rec->huff_tree),
(size_t) field_length);
} | O0 | c | uf_intervall:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x4e030
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdi
movl %eax, %ecx
movl -0x28(%rbp), %eax
imull %ecx, %eax
movl %eax, %eax
addq %rax, %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
callq 0x2a090
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| uf_intervall:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_24], eax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax+30h]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov eax, [rbp+var_24]
mov [rbp+var_28], eax
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rax+30h]
call decode_pos
mov rsi, [rbp+var_38]
mov rdi, [rbp+var_30]
mov ecx, eax
mov eax, [rbp+var_28]
imul eax, ecx
mov eax, eax
add rsi, rax
mov eax, [rbp+var_24]
mov edx, eax
call _memcpy
add rsp, 40h
pop rbp
retn
| long long uf_intervall(long long a1, long long a2, long long a3, int a4)
{
int v4; // eax
long long v6; // [rsp+8h] [rbp-38h]
int v8; // [rsp+18h] [rbp-28h]
unsigned int v9; // [rsp+1Ch] [rbp-24h]
v9 = a4 - a3;
v6 = *(_QWORD *)(*(_QWORD *)(a1 + 48) + 16LL);
v8 = a4 - a3;
v4 = decode_pos(a2, *(_QWORD *)(a1 + 48));
return memcpy(a3, (unsigned int)(v4 * v8) + v6, v9);
}
| uf_intervall:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x28],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x30]
CALL 0x0014e030
MOV RSI,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x28]
IMUL EAX,ECX
MOV EAX,EAX
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
CALL 0x0012a090
ADD RSP,0x40
POP RBP
RET
|
void uf_intervall(long param_1,int8 param_2,void *param_3,int param_4)
{
long lVar1;
uint uVar2;
int iVar3;
uVar2 = param_4 - (int)param_3;
lVar1 = *(long *)(*(long *)(param_1 + 0x30) + 0x10);
iVar3 = decode_pos(param_2,*(int8 *)(param_1 + 0x30));
memcpy(param_3,(void *)(lVar1 + (ulong)(uVar2 * iVar3)),(ulong)uVar2);
return;
}
|
|
5,639 | diff | eloqsql/strings/dtoa.c | static Bigint *diff(Bigint *a, Bigint *b, Stack_alloc *alloc)
{
Bigint *c;
int i, wa, wb;
ULong *xa, *xae, *xb, *xbe, *xc;
ULLong borrow, y;
i= cmp(a,b);
if (!i)
{
c= Balloc(0, alloc);
c->wds= 1;
c->p.x[0]= 0;
return c;
}
if (i < 0)
{
c= a;
a= b;
b= c;
i= 1;
}
else
i= 0;
c= Balloc(a->k, alloc);
c->sign= i;
wa= a->wds;
xa= a->p.x;
xae= xa + wa;
wb= b->wds;
xb= b->p.x;
xbe= xb + wb;
xc= c->p.x;
borrow= 0;
do
{
y= (ULLong)*xa++ - *xb++ - borrow;
borrow= y >> 32 & (ULong)1;
*xc++= (ULong) (y & FFFFFFFF);
}
while (xb < xbe);
while (xa < xae)
{
y= *xa++ - borrow;
borrow= y >> 32 & (ULong)1;
*xc++= (ULong) (y & FFFFFFFF);
}
while (!*--xc)
wa--;
c->wds= wa;
return c;
} | O0 | c | diff:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa9bf0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xa9a2e
movq -0x20(%rbp), %rsi
xorl %edi, %edi
callq 0xa9100
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl $0x1, 0x14(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa9bda
cmpl $0x0, -0x2c(%rbp)
jge 0xa9a55
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x1, -0x2c(%rbp)
jmp 0xa9a5c
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x20(%rbp), %rsi
callq 0xa9100
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x40(%rbp)
movl (%rax), %eax
movq -0x50(%rbp), %rcx
movq %rcx, %rdx
addq $0x4, %rdx
movq %rdx, -0x50(%rbp)
movl (%rcx), %ecx
subq %rcx, %rax
subq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
shrq $0x20, %rax
andq $0x1, %rax
movq %rax, -0x68(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x70(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x60(%rbp)
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jb 0xa9add
jmp 0xa9b47
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0xa9b9d
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x40(%rbp)
movl (%rax), %eax
subq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
shrq $0x20, %rax
andq $0x1, %rax
movq %rax, -0x68(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x70(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x60(%rbp)
movl %ecx, (%rax)
jmp 0xa9b47
jmp 0xa9b9f
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x60(%rbp)
cmpl $0x0, -0x4(%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa9bbd
jmp 0xa9bc8
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xa9b9f
movl -0x30(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| diff:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call cmp
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jnz short loc_A9A2E
mov rsi, [rbp+var_20]
xor edi, edi
call Balloc
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov dword ptr [rax+14h], 1
mov rax, [rbp+var_28]
mov rax, [rax]
mov dword ptr [rax], 0
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp loc_A9BDA
loc_A9A2E:
cmp [rbp+var_2C], 0
jge short loc_A9A55
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_10], rax
mov rax, [rbp+var_28]
mov [rbp+var_18], rax
mov [rbp+var_2C], 1
jmp short loc_A9A5C
loc_A9A55:
mov [rbp+var_2C], 0
loc_A9A5C:
mov rax, [rbp+var_10]
mov edi, [rax+8]
mov rsi, [rbp+var_20]
call Balloc
mov [rbp+var_28], rax
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_28]
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_30]
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
mov eax, [rax+14h]
mov [rbp+var_34], eax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movsxd rcx, [rbp+var_34]
shl rcx, 2
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_60], rax
mov [rbp+var_68], 0
loc_A9ADD:
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 4
mov [rbp+var_40], rcx
mov eax, [rax]
mov rcx, [rbp+var_50]
mov rdx, rcx
add rdx, 4
mov [rbp+var_50], rdx
mov ecx, [rcx]
sub rax, rcx
sub rax, [rbp+var_68]
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
shr rax, 20h
and rax, 1
mov [rbp+var_68], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_70]
mov ecx, eax
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 4
mov [rbp+var_60], rdx
mov [rax], ecx
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jb short loc_A9ADD
jmp short $+2
loc_A9B47:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_48]
jnb short loc_A9B9D
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 4
mov [rbp+var_40], rcx
mov eax, [rax]
sub rax, [rbp+var_68]
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
shr rax, 20h
and rax, 1
mov [rbp+var_68], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_70]
mov ecx, eax
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 4
mov [rbp+var_60], rdx
mov [rax], ecx
jmp short loc_A9B47
loc_A9B9D:
jmp short $+2
loc_A9B9F:
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_60], rcx
cmp dword ptr [rax-4], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_A9BBD
jmp short loc_A9BC8
loc_A9BBD:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
jmp short loc_A9B9F
loc_A9BC8:
mov ecx, [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax+14h], ecx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_A9BDA:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| long long diff(unsigned int **a1, unsigned int **a2, long long a3)
{
unsigned int *v3; // rax
unsigned int *v4; // rcx
_DWORD *v5; // rax
unsigned int *v6; // rax
_DWORD *v7; // rax
_DWORD *v8; // rax
unsigned long long v10; // [rsp+0h] [rbp-70h]
unsigned long long v11; // [rsp+0h] [rbp-70h]
long long v12; // [rsp+8h] [rbp-68h]
_DWORD *v13; // [rsp+10h] [rbp-60h]
unsigned long long v14; // [rsp+18h] [rbp-58h]
unsigned int *v15; // [rsp+20h] [rbp-50h]
unsigned long long v16; // [rsp+28h] [rbp-48h]
unsigned int *v17; // [rsp+30h] [rbp-40h]
int v18; // [rsp+40h] [rbp-30h]
int v19; // [rsp+44h] [rbp-2Ch]
int v20; // [rsp+44h] [rbp-2Ch]
long long v21; // [rsp+48h] [rbp-28h]
long long v22; // [rsp+48h] [rbp-28h]
unsigned int **v24; // [rsp+58h] [rbp-18h]
unsigned int **v25; // [rsp+60h] [rbp-10h]
v25 = a1;
v24 = a2;
v19 = cmp(a1, a2);
if ( v19 )
{
if ( v19 >= 0 )
{
v20 = 0;
}
else
{
v25 = a2;
v24 = a1;
v20 = 1;
}
v22 = Balloc(*((_DWORD *)v25 + 2), a3);
*(_DWORD *)(v22 + 16) = v20;
v18 = *((_DWORD *)v25 + 5);
v17 = *v25;
v16 = (unsigned long long)&(*v25)[v18];
v15 = *v24;
v14 = (unsigned long long)&(*v24)[*((int *)v24 + 5)];
v13 = *(_DWORD **)v22;
v12 = 0LL;
do
{
v3 = v17++;
v4 = v15++;
v10 = *v3 - (unsigned long long)*v4 - v12;
v12 = HIDWORD(v10) & 1;
v5 = v13++;
*v5 = v10;
}
while ( (unsigned long long)v15 < v14 );
while ( (unsigned long long)v17 < v16 )
{
v6 = v17++;
v11 = *v6 - v12;
v12 = HIDWORD(v11) & 1;
v7 = v13++;
*v7 = v11;
}
while ( 1 )
{
v8 = v13--;
if ( *(v8 - 1) )
break;
--v18;
}
*(_DWORD *)(v22 + 20) = v18;
return v22;
}
else
{
v21 = Balloc(0, a3);
*(_DWORD *)(v21 + 20) = 1;
**(_DWORD **)v21 = 0;
return v21;
}
}
| diff:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001a9bf0
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x001a9a2e
MOV RSI,qword ptr [RBP + -0x20]
XOR EDI,EDI
CALL 0x001a9100
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],0x1
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a9bda
LAB_001a9a2e:
CMP dword ptr [RBP + -0x2c],0x0
JGE 0x001a9a55
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x2c],0x1
JMP 0x001a9a5c
LAB_001a9a55:
MOV dword ptr [RBP + -0x2c],0x0
LAB_001a9a5c:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001a9100
MOV qword ptr [RBP + -0x28],RAX
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOVSXD RCX,dword ptr [RBP + -0x30]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVSXD RCX,dword ptr [RBP + -0x34]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV qword ptr [RBP + -0x68],0x0
LAB_001a9add:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x40],RCX
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x50]
MOV RDX,RCX
ADD RDX,0x4
MOV qword ptr [RBP + -0x50],RDX
MOV ECX,dword ptr [RCX]
SUB RAX,RCX
SUB RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x20
AND RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x70]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x60],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JC 0x001a9add
JMP 0x001a9b47
LAB_001a9b47:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x001a9b9d
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x40],RCX
MOV EAX,dword ptr [RAX]
SUB RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x20
AND RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x70]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x60],RDX
MOV dword ptr [RAX],ECX
JMP 0x001a9b47
LAB_001a9b9d:
JMP 0x001a9b9f
LAB_001a9b9f:
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x60],RCX
CMP dword ptr [RAX + -0x4],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x001a9bbd
JMP 0x001a9bc8
LAB_001a9bbd:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001a9b9f
LAB_001a9bc8:
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_001a9bda:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
int8 * diff(int8 *param_1,int8 *param_2,int8 param_3)
{
uint *puVar1;
uint *puVar2;
int iVar3;
ulong uVar4;
uint *puVar5;
uint *puVar6;
int4 *puVar7;
ulong local_70;
int4 *local_68;
uint *local_58;
uint *local_48;
int local_38;
uint local_34;
int8 *local_20;
int8 *local_18;
int8 *local_10;
iVar3 = cmp(param_1,param_2);
if (iVar3 == 0) {
local_10 = (int8 *)Balloc(0,param_3);
*(int4 *)((long)local_10 + 0x14) = 1;
*(int4 *)*local_10 = 0;
}
else {
local_20 = param_2;
local_18 = param_1;
if (iVar3 < 0) {
local_20 = param_1;
local_18 = param_2;
}
local_34 = (uint)(iVar3 < 0);
local_10 = (int8 *)Balloc(*(int4 *)(local_18 + 1),param_3);
*(uint *)(local_10 + 2) = local_34;
local_38 = *(int *)((long)local_18 + 0x14);
puVar1 = (uint *)*local_18;
iVar3 = *(int *)((long)local_20 + 0x14);
puVar2 = (uint *)*local_20;
local_70 = 0;
local_68 = (int4 *)*local_10;
local_58 = puVar2;
local_48 = puVar1;
do {
puVar5 = local_48 + 1;
puVar6 = local_58 + 1;
uVar4 = ((ulong)*local_48 - (ulong)*local_58) - local_70;
local_70 = uVar4 >> 0x20 & 1;
puVar7 = local_68 + 1;
*local_68 = (int)uVar4;
local_68 = puVar7;
local_58 = puVar6;
local_48 = puVar5;
} while (puVar6 < puVar2 + iVar3);
while (local_48 < puVar1 + local_38) {
uVar4 = *local_48 - local_70;
local_70 = uVar4 >> 0x20 & 1;
*local_68 = (int)uVar4;
local_68 = local_68 + 1;
local_48 = local_48 + 1;
}
while (local_68[-1] == 0) {
local_38 = local_38 + -1;
local_68 = local_68 + -1;
}
*(int *)((long)local_10 + 0x14) = local_38;
}
return local_10;
}
|
|
5,640 | httpparse_content | qoraal-tictactoe/build_O0/_deps/qoraal_http-src/src/httpparse.c | uint32_t
httpparse_content (char* data, int len, HTTP_HEADER_T* headers, int count, char** content, int32_t *content_length)
{
int32_t i ;
uint32_t chunk_length = 0 ;
uint32_t length = 0 ;
DBG_MESSAGE_HTTP_PARSE (DBG_MESSAGE_SEVERITY_DEBUG, "-->>httpparse_content") ;
if (content_length) *content_length = 0 ;
*content = 0 ;
for (i=0; i<count; i++) {
if (headers[i].value && (strcmp(headers[i].key, HTTP_HEADER_KEY_TRANSFER_ENCODING) == 0)) {
if (strncmp(headers[i].value, "chunked", strlen("chunked")) == 0) {
if (data && (len > 0)) {
if (sscanf(data, "%x\r\n", (unsigned int*)&chunk_length)) {
*content = strnchr (data,'\n', len) ;
if (*content) (*content)++ ;
}
}
DBG_MESSAGE_HTTP_PARSE (DBG_MESSAGE_SEVERITY_INFO,
"httpparse_content : for chunked %d", chunk_length) ;
break ;
}
}
}
for (i=0; i<count; i++) {
if (headers[i].value && (strcmp(headers[i].key, HTTP_HEADER_KEY_CONTENT_LENGTH) == 0)) {
if (sscanf(headers[i].value, "%u", (unsigned int*)&length)) {
if (*content == 0) {
*content = data ;
}
}
DBG_MESSAGE_HTTP_PARSE (DBG_MESSAGE_SEVERITY_INFO,
"httpparse_content : content length %d", *content_length) ;
break ;
break ;
}
}
if (!chunk_length) {
if (content_length) *content_length = length ;
return length ;
}
return chunk_length ;
} | O0 | c | httpparse_content:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x2bbbd
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x2bcb9
movq -0x20(%rbp), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x2bca9
movq -0x20(%rbp), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
leaq 0x14c52(%rip), %rsi # 0x40860
callq 0x6330
cmpl $0x0, %eax
jne 0x2bca9
movq -0x20(%rbp), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
leaq 0x14c3c(%rip), %rsi # 0x40872
movl $0x7, %edx
callq 0x60a0
cmpl $0x0, %eax
jne 0x2bca7
cmpq $0x0, -0x10(%rbp)
je 0x2bca5
cmpl $0x0, -0x14(%rbp)
jle 0x2bca5
movq -0x10(%rbp), %rdi
leaq 0x8791(%rip), %rsi # 0x343ee
leaq -0x40(%rbp), %rdx
movb $0x0, %al
callq 0x6400
cmpl $0x0, %eax
je 0x2bca3
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rdx
movl $0xa, %esi
callq 0x2b310
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2bca1
movq -0x30(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x2bca3
jmp 0x2bca5
jmp 0x2bcb9
jmp 0x2bca9
jmp 0x2bcab
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x2bbcf
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x2bd58
movq -0x20(%rbp), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x2bd48
movq -0x20(%rbp), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
leaq 0x14e9a(%rip), %rsi # 0x40b95
callq 0x6330
cmpl $0x0, %eax
jne 0x2bd48
movq -0x20(%rbp), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
leaq 0x74a0(%rip), %rsi # 0x331bf
leaq -0x44(%rbp), %rdx
movb $0x0, %al
callq 0x6400
cmpl $0x0, %eax
je 0x2bd46
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2bd44
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x2bd46
jmp 0x2bd58
jmp 0x2bd4a
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x2bcc0
cmpl $0x0, -0x40(%rbp)
jne 0x2bd76
cmpq $0x0, -0x38(%rbp)
je 0x2bd6e
movl -0x44(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2bd7c
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| httpparse_content:
push rbp
mov rbp, rsp
sub rsp, 50h
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 [rbp+var_38], r9
mov [rbp+var_40], 0
mov [rbp+var_44], 0
cmp [rbp+var_38], 0
jz short loc_2BBBD
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
loc_2BBBD:
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
mov [rbp+var_3C], 0
loc_2BBCF:
mov eax, [rbp+var_3C]
cmp eax, [rbp+var_24]
jge loc_2BCB9
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_3C]
shl rcx, 4
add rax, rcx
cmp qword ptr [rax+8], 0
jz loc_2BCA9
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_3C]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
lea rsi, aTransferEncodi; "Transfer-Encoding"
call _strcmp
cmp eax, 0
jnz loc_2BCA9
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_3C]
shl rcx, 4
add rax, rcx
mov rdi, [rax+8]
lea rsi, aChunked; "chunked"
mov edx, 7
call _strncmp
cmp eax, 0
jnz short loc_2BCA7
cmp [rbp+var_10], 0
jz short loc_2BCA5
cmp [rbp+var_14], 0
jle short loc_2BCA5
mov rdi, [rbp+var_10]
lea rsi, aEngineSetDLogg+2Eh; "%x\r\n"
lea rdx, [rbp+var_40]
mov al, 0
call ___isoc99_sscanf
cmp eax, 0
jz short loc_2BCA3
mov rdi, [rbp+var_10]
movsxd rdx, [rbp+var_14]
mov esi, 0Ah
call strnchr
mov rcx, rax
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_30]
cmp qword ptr [rax], 0
jz short loc_2BCA1
mov rax, [rbp+var_30]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
loc_2BCA1:
jmp short $+2
loc_2BCA3:
jmp short $+2
loc_2BCA5:
jmp short loc_2BCB9
loc_2BCA7:
jmp short $+2
loc_2BCA9:
jmp short $+2
loc_2BCAB:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp loc_2BBCF
loc_2BCB9:
mov [rbp+var_3C], 0
loc_2BCC0:
mov eax, [rbp+var_3C]
cmp eax, [rbp+var_24]
jge loc_2BD58
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_3C]
shl rcx, 4
add rax, rcx
cmp qword ptr [rax+8], 0
jz short loc_2BD48
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_3C]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
lea rsi, aContentLength; "Content-Length"
call _strcmp
cmp eax, 0
jnz short loc_2BD48
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_3C]
shl rcx, 4
add rax, rcx
mov rdi, [rax+8]
lea rsi, aU; "%u"
lea rdx, [rbp+var_44]
mov al, 0
call ___isoc99_sscanf
cmp eax, 0
jz short loc_2BD46
mov rax, [rbp+var_30]
cmp qword ptr [rax], 0
jnz short loc_2BD44
mov rcx, [rbp+var_10]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_2BD44:
jmp short $+2
loc_2BD46:
jmp short loc_2BD58
loc_2BD48:
jmp short $+2
loc_2BD4A:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp loc_2BCC0
loc_2BD58:
cmp [rbp+var_40], 0
jnz short loc_2BD76
cmp [rbp+var_38], 0
jz short loc_2BD6E
mov ecx, [rbp+var_44]
mov rax, [rbp+var_38]
mov [rax], ecx
loc_2BD6E:
mov eax, [rbp+var_44]
mov [rbp+var_4], eax
jmp short loc_2BD7C
loc_2BD76:
mov eax, [rbp+var_40]
mov [rbp+var_4], eax
loc_2BD7C:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long httpparse_content(char *a1, int a2, long long a3, int a4, char **a5, unsigned int *a6)
{
char *v6; // rax
unsigned int v8; // [rsp+Ch] [rbp-44h] BYREF
unsigned int v9; // [rsp+10h] [rbp-40h] BYREF
int i; // [rsp+14h] [rbp-3Ch]
unsigned int *v11; // [rsp+18h] [rbp-38h]
char **v12; // [rsp+20h] [rbp-30h]
int v13; // [rsp+2Ch] [rbp-24h]
long long v14; // [rsp+30h] [rbp-20h]
int v15; // [rsp+3Ch] [rbp-14h]
char *v16; // [rsp+40h] [rbp-10h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12 = a5;
v11 = a6;
v9 = 0;
v8 = 0;
if ( a6 )
*v11 = 0;
*v12 = 0LL;
for ( i = 0; i < v13; ++i )
{
if ( *(_QWORD *)(16LL * i + v14 + 8)
&& !(unsigned int)strcmp(*(_QWORD *)(16LL * i + v14), aTransferEncodi)
&& !(unsigned int)strncmp(*(_QWORD *)(16LL * i + v14 + 8), aChunked, 7LL) )
{
if ( v16 )
{
if ( v15 > 0 )
{
if ( (unsigned int)__isoc99_sscanf(v16, "%x\r\n", &v9) )
{
v6 = strnchr(v16, 10, v15);
*v12 = v6;
if ( *v12 )
++*v12;
}
}
}
break;
}
}
for ( i = 0; i < v13; ++i )
{
if ( *(_QWORD *)(16LL * i + v14 + 8) && !(unsigned int)strcmp(*(_QWORD *)(16LL * i + v14), aContentLength) )
{
if ( (unsigned int)__isoc99_sscanf(*(_QWORD *)(16LL * i + v14 + 8), "%u", &v8) && !*v12 )
*v12 = v16;
break;
}
}
if ( v9 )
{
return v9;
}
else
{
if ( v11 )
*v11 = v8;
return v8;
}
}
| httpparse_content:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
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 qword ptr [RBP + -0x38],R9
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x44],0x0
CMP qword ptr [RBP + -0x38],0x0
JZ 0x0012bbbd
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
LAB_0012bbbd:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
MOV dword ptr [RBP + -0x3c],0x0
LAB_0012bbcf:
MOV EAX,dword ptr [RBP + -0x3c]
CMP EAX,dword ptr [RBP + -0x24]
JGE 0x0012bcb9
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x3c]
SHL RCX,0x4
ADD RAX,RCX
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0012bca9
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x3c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
LEA RSI,[0x140860]
CALL 0x00106330
CMP EAX,0x0
JNZ 0x0012bca9
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x3c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[0x140872]
MOV EDX,0x7
CALL 0x001060a0
CMP EAX,0x0
JNZ 0x0012bca7
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0012bca5
CMP dword ptr [RBP + -0x14],0x0
JLE 0x0012bca5
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x1343ee]
LEA RDX,[RBP + -0x40]
MOV AL,0x0
CALL 0x00106400
CMP EAX,0x0
JZ 0x0012bca3
MOV RDI,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x14]
MOV ESI,0xa
CALL 0x0012b310
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX],0x0
JZ 0x0012bca1
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
LAB_0012bca1:
JMP 0x0012bca3
LAB_0012bca3:
JMP 0x0012bca5
LAB_0012bca5:
JMP 0x0012bcb9
LAB_0012bca7:
JMP 0x0012bca9
LAB_0012bca9:
JMP 0x0012bcab
LAB_0012bcab:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0012bbcf
LAB_0012bcb9:
MOV dword ptr [RBP + -0x3c],0x0
LAB_0012bcc0:
MOV EAX,dword ptr [RBP + -0x3c]
CMP EAX,dword ptr [RBP + -0x24]
JGE 0x0012bd58
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x3c]
SHL RCX,0x4
ADD RAX,RCX
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0012bd48
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x3c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
LEA RSI,[0x140b95]
CALL 0x00106330
CMP EAX,0x0
JNZ 0x0012bd48
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x3c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[0x1331bf]
LEA RDX,[RBP + -0x44]
MOV AL,0x0
CALL 0x00106400
CMP EAX,0x0
JZ 0x0012bd46
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX],0x0
JNZ 0x0012bd44
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0012bd44:
JMP 0x0012bd46
LAB_0012bd46:
JMP 0x0012bd58
LAB_0012bd48:
JMP 0x0012bd4a
LAB_0012bd4a:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0012bcc0
LAB_0012bd58:
CMP dword ptr [RBP + -0x40],0x0
JNZ 0x0012bd76
CMP qword ptr [RBP + -0x38],0x0
JZ 0x0012bd6e
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
LAB_0012bd6e:
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012bd7c
LAB_0012bd76:
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x4],EAX
LAB_0012bd7c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int httpparse_content(long param_1,int param_2,long param_3,int param_4,long *param_5,int *param_6)
{
int iVar1;
long lVar2;
int local_4c;
int local_48;
int local_44;
int *local_40;
long *local_38;
int local_2c;
long local_28;
int local_1c;
long local_18;
int local_c;
local_48 = 0;
local_4c = 0;
if (param_6 != (int *)0x0) {
*param_6 = 0;
}
*param_5 = 0;
local_40 = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_3;
local_1c = param_2;
local_18 = param_1;
for (local_44 = 0; local_44 < local_2c; local_44 = local_44 + 1) {
if (((*(long *)(local_28 + (long)local_44 * 0x10 + 8) != 0) &&
(iVar1 = strcmp(*(char **)(local_28 + (long)local_44 * 0x10),s_Transfer_Encoding_00140860),
iVar1 == 0)) &&
(iVar1 = strncmp(*(char **)(local_28 + (long)local_44 * 0x10 + 8),s_chunked_00140872,7),
iVar1 == 0)) {
if (((local_18 != 0) && (0 < local_1c)) &&
(iVar1 = __isoc99_sscanf(local_18,s_engine_set__d_logging_instance_0_001343c0 + 0x2e,
&local_48), iVar1 != 0)) {
lVar2 = strnchr(local_18,10,(long)local_1c);
*local_38 = lVar2;
if (*local_38 != 0) {
*local_38 = *local_38 + 1;
}
}
break;
}
}
local_44 = 0;
do {
if (local_2c <= local_44) {
LAB_0012bd58:
if (local_48 == 0) {
if (local_40 != (int *)0x0) {
*local_40 = local_4c;
}
local_c = local_4c;
}
else {
local_c = local_48;
}
return local_c;
}
if ((*(long *)(local_28 + (long)local_44 * 0x10 + 8) != 0) &&
(iVar1 = strcmp(*(char **)(local_28 + (long)local_44 * 0x10),s_Content_Length_00140b95),
iVar1 == 0)) {
iVar1 = __isoc99_sscanf(*(int8 *)(local_28 + (long)local_44 * 0x10 + 8),&DAT_001331bf,
&local_4c);
if ((iVar1 != 0) && (*local_38 == 0)) {
*local_38 = local_18;
}
goto LAB_0012bd58;
}
local_44 = local_44 + 1;
} while( true );
}
|
|
5,641 | js_proxy_get_own_property | bluesky950520[P]quickjs/quickjs.c | static int js_proxy_get_own_property(JSContext *ctx, JSPropertyDescriptor *pdesc,
JSValue obj, JSAtom prop)
{
JSProxyData *s;
JSValue method, trap_result_obj, prop_val;
int res, target_desc_ret, ret;
JSObject *p;
JSValue args[2];
JSPropertyDescriptor result_desc, target_desc;
s = get_proxy_method(ctx, &method, obj, JS_ATOM_getOwnPropertyDescriptor);
if (!s)
return -1;
p = JS_VALUE_GET_OBJ(s->target);
if (JS_IsUndefined(method)) {
return JS_GetOwnPropertyInternal(ctx, pdesc, p, prop);
}
prop_val = JS_AtomToValue(ctx, prop);
if (JS_IsException(prop_val)) {
JS_FreeValue(ctx, method);
return -1;
}
args[0] = s->target;
args[1] = prop_val;
trap_result_obj = JS_CallFree(ctx, method, s->handler, 2, args);
JS_FreeValue(ctx, prop_val);
if (JS_IsException(trap_result_obj))
return -1;
if (!JS_IsObject(trap_result_obj) && !JS_IsUndefined(trap_result_obj)) {
JS_FreeValue(ctx, trap_result_obj);
goto fail;
}
target_desc_ret = JS_GetOwnPropertyInternal(ctx, &target_desc, p, prop);
if (target_desc_ret < 0) {
JS_FreeValue(ctx, trap_result_obj);
return -1;
}
if (target_desc_ret)
js_free_desc(ctx, &target_desc);
if (JS_IsUndefined(trap_result_obj)) {
if (target_desc_ret) {
if (!(target_desc.flags & JS_PROP_CONFIGURABLE) || !p->extensible)
goto fail;
}
ret = FALSE;
} else {
int flags1, extensible_target;
extensible_target = JS_IsExtensible(ctx, s->target);
if (extensible_target < 0) {
JS_FreeValue(ctx, trap_result_obj);
return -1;
}
res = js_obj_to_desc(ctx, &result_desc, trap_result_obj);
JS_FreeValue(ctx, trap_result_obj);
if (res < 0)
return -1;
if (target_desc_ret) {
/* convert result_desc.flags to defineProperty flags */
flags1 = result_desc.flags | JS_PROP_HAS_CONFIGURABLE | JS_PROP_HAS_ENUMERABLE;
if (result_desc.flags & JS_PROP_GETSET)
flags1 |= JS_PROP_HAS_GET | JS_PROP_HAS_SET;
else
flags1 |= JS_PROP_HAS_VALUE | JS_PROP_HAS_WRITABLE;
/* XXX: not complete check: need to compare value &
getter/setter as in defineproperty */
if (!check_define_prop_flags(target_desc.flags, flags1))
goto fail1;
} else {
if (!extensible_target)
goto fail1;
}
if (!(result_desc.flags & JS_PROP_CONFIGURABLE)) {
if (!target_desc_ret || (target_desc.flags & JS_PROP_CONFIGURABLE))
goto fail1;
if ((result_desc.flags &
(JS_PROP_GETSET | JS_PROP_WRITABLE)) == 0 &&
target_desc_ret &&
(target_desc.flags & JS_PROP_WRITABLE) != 0) {
/* proxy-missing-checks */
fail1:
js_free_desc(ctx, &result_desc);
fail:
JS_ThrowTypeError(ctx, "proxy: inconsistent getOwnPropertyDescriptor");
return -1;
}
}
ret = TRUE;
if (pdesc) {
*pdesc = result_desc;
} else {
js_free_desc(ctx, &result_desc);
}
}
return ret;
} | O1 | c | js_proxy_get_own_property:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %r8d, %r13d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movl $0x67, %r8d
callq 0x3d3e0
movq %rax, %r12
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testq %r12, %r12
je 0x4e306
movq (%r12), %rdx
movq 0x28(%rsp), %r14
cmpl $0x3, %r14d
jne 0x4e1f1
movq %rbx, %rdi
movq %r15, %rsi
movl %r13d, %ecx
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x23bd9
movq %rdx, 0x18(%rsp)
movq %r15, 0x10(%rsp)
movq %rbx, %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0x2075a
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x4e226
movq 0x20(%rsp), %rsi
movq 0x18(%rbx), %rdi
movq %r14, %rdx
callq 0x1d8c6
jmp 0x4e301
movq %rax, %r15
movups (%r12), %xmm0
leaq 0xa0(%rsp), %rax
movaps %xmm0, (%rax)
movq %r15, 0x10(%rax)
movq %rbp, 0x18(%rax)
movq 0x20(%rsp), %rsi
movq 0x10(%r12), %rcx
movq 0x18(%r12), %r8
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r14, %rdx
movl $0x2, %r9d
callq 0x22c9d
movq %rax, 0x8(%rsp)
movq %rdx, %r14
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x1d8c6
cmpl $-0x1, %r14d
je 0x4e2a1
cmpl $0x3, %r14d
je 0x4e2a1
cmpl $0x6, %r14d
je 0x4e301
movq 0x18(%rbx), %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x1d8c6
jmp 0x4e2f0
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
movq 0x18(%rsp), %r15
movq %r15, %rdx
movl %r13d, %ecx
callq 0x23bd9
testl %eax, %eax
js 0x4e318
movl %eax, %r13d
movq %r14, %rbp
movl %r14d, %r14d
je 0x4e2d5
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x3d8c3
cmpl $0x3, %r14d
jne 0x4e326
xorl %eax, %eax
testl %r13d, %r13d
je 0x4e306
testb $0x1, 0x68(%rsp)
je 0x4e2f0
testb $0x1, 0x5(%r15)
jne 0x4e306
leaq 0x51c1c(%rip), %rsi # 0x9ff13
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rdi
movq 0x8(%rsp), %rsi
jmp 0x4e219
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
callq 0xf6fb
testl %eax, %eax
js 0x4e396
movl %eax, %r15d
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
movq 0x8(%rsp), %r12
movq %r12, %rdx
movq %rbp, %rcx
callq 0x4f47c
movl %eax, %r14d
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x1d8c6
testl %r14d, %r14d
js 0x4e301
testl %r13d, %r13d
je 0x4e3a7
movl 0x30(%rsp), %eax
testb $0x10, %al
movl $0x2700, %ecx # imm = 0x2700
movl $0x1d00, %esi # imm = 0x1D00
cmovel %ecx, %esi
orl %eax, %esi
movl 0x68(%rsp), %edi
callq 0x2616c
testl %eax, %eax
jne 0x4e3ac
jmp 0x4e400
movq 0x18(%rbx), %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
jmp 0x4e21c
testl %r15d, %r15d
je 0x4e400
movl 0x30(%rsp), %eax
testb $0x1, %al
jne 0x4e3d1
testl %r13d, %r13d
je 0x4e400
movl 0x68(%rsp), %ecx
testb $0x1, %cl
jne 0x4e400
testb $0x12, %al
setne %al
testb $0x2, %cl
sete %cl
orb %al, %cl
je 0x4e400
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
je 0x4e412
movq 0x60(%rsp), %rax
movq %rax, 0x30(%rcx)
movups 0x30(%rsp), %xmm0
movups 0x40(%rsp), %xmm1
movups 0x50(%rsp), %xmm2
movups %xmm2, 0x20(%rcx)
movups %xmm1, 0x10(%rcx)
movups %xmm0, (%rcx)
jmp 0x4e41f
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x3d8c3
jmp 0x4e2f0
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x3d8c3
movl $0x1, %eax
jmp 0x4e306
| js_proxy_get_own_property:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov r13d, r8d
mov r15, rsi
mov rbx, rdi
lea rsi, [rsp+0F8h+var_D8]
mov r8d, 67h ; 'g'
call get_proxy_method
mov r12, rax
mov eax, 0FFFFFFFFh
test r12, r12
jz loc_4E306
mov rdx, [r12]
mov r14, [rsp+0F8h+var_D0]
cmp r14d, 3
jnz short loc_4E1F1
mov rdi, rbx
mov rsi, r15
mov ecx, r13d
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_GetOwnPropertyInternal
loc_4E1F1:
mov [rsp+0F8h+var_E0], rdx
mov [rsp+0F8h+var_E8], r15
mov rdi, rbx
mov esi, r13d
xor edx, edx
call __JS_AtomToValue
mov rbp, rdx
cmp ebp, 6
jnz short loc_4E226
mov rsi, [rsp+0F8h+var_D8]
mov rdi, [rbx+18h]
loc_4E219:
mov rdx, r14
loc_4E21C:
call JS_FreeValueRT
jmp loc_4E301
loc_4E226:
mov r15, rax
movups xmm0, xmmword ptr [r12]
lea rax, [rsp+0F8h+var_58]
movaps xmmword ptr [rax], xmm0
mov [rax+10h], r15
mov [rax+18h], rbp
mov rsi, [rsp+0F8h+var_D8]
mov rcx, [r12+10h]
mov r8, [r12+18h]
mov [rsp+0F8h+var_F8], rax
mov rdi, rbx
mov rdx, r14
mov r9d, 2
call JS_CallFree
mov [rsp+0F8h+var_F0], rax
mov r14, rdx
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, rbp
call JS_FreeValueRT
cmp r14d, 0FFFFFFFFh
jz short loc_4E2A1
cmp r14d, 3
jz short loc_4E2A1
cmp r14d, 6
jz short loc_4E301
mov rdi, [rbx+18h]
mov rsi, [rsp+0F8h+var_F0]
mov rdx, r14
call JS_FreeValueRT
jmp short loc_4E2F0
loc_4E2A1:
lea rsi, [rsp+0F8h+var_90]
mov rdi, rbx
mov r15, [rsp+0F8h+var_E0]
mov rdx, r15
mov ecx, r13d
call JS_GetOwnPropertyInternal
test eax, eax
js short loc_4E318
mov r13d, eax
mov rbp, r14
mov r14d, r14d
jz short loc_4E2D5
lea rsi, [rsp+0F8h+var_90]
mov rdi, rbx
call js_free_desc
loc_4E2D5:
cmp r14d, 3
jnz short loc_4E326
xor eax, eax
test r13d, r13d
jz short loc_4E306
test byte ptr [rsp+0F8h+var_90], 1
jz short loc_4E2F0
test byte ptr [r15+5], 1
jnz short loc_4E306
loc_4E2F0:
lea rsi, aProxyInconsist_2; "proxy: inconsistent getOwnPropertyDescr"...
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_4E301:
mov eax, 0FFFFFFFFh
loc_4E306:
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4E318:
mov rdi, [rbx+18h]
mov rsi, [rsp+0F8h+var_F0]
jmp loc_4E219
loc_4E326:
mov rsi, [r12]
mov rdx, [r12+8]
mov rdi, rbx
call JS_IsExtensible
test eax, eax
js short loc_4E396
mov r15d, eax
lea rsi, [rsp+0F8h+var_C8]
mov rdi, rbx
mov r12, [rsp+0F8h+var_F0]
mov rdx, r12
mov rcx, rbp
call js_obj_to_desc
mov r14d, eax
mov rdi, [rbx+18h]
mov rsi, r12
mov rdx, rbp
call JS_FreeValueRT
test r14d, r14d
js short loc_4E301
test r13d, r13d
jz short loc_4E3A7
mov eax, dword ptr [rsp+0F8h+var_C8]
test al, 10h
mov ecx, 2700h
mov esi, 1D00h
cmovz esi, ecx
or esi, eax
mov edi, [rsp+0F8h+var_90]
call check_define_prop_flags
test eax, eax
jnz short loc_4E3AC
jmp short loc_4E400
loc_4E396:
mov rdi, [rbx+18h]
mov rsi, [rsp+0F8h+var_F0]
mov rdx, rbp
jmp loc_4E21C
loc_4E3A7:
test r15d, r15d
jz short loc_4E400
loc_4E3AC:
mov eax, dword ptr [rsp+0F8h+var_C8]
test al, 1
jnz short loc_4E3D1
test r13d, r13d
jz short loc_4E400
mov ecx, [rsp+0F8h+var_90]
test cl, 1
jnz short loc_4E400
test al, 12h
setnz al
test cl, 2
setz cl
or cl, al
jz short loc_4E400
loc_4E3D1:
mov rcx, [rsp+0F8h+var_E8]
test rcx, rcx
jz short loc_4E412
mov rax, [rsp+0F8h+var_98]
mov [rcx+30h], rax
movups xmm0, [rsp+0F8h+var_C8]
movups xmm1, [rsp+0F8h+var_B8]
movups xmm2, [rsp+0F8h+var_A8]
movups xmmword ptr [rcx+20h], xmm2
movups xmmword ptr [rcx+10h], xmm1
movups xmmword ptr [rcx], xmm0
jmp short loc_4E41F
loc_4E400:
lea rsi, [rsp+0F8h+var_C8]
mov rdi, rbx
call js_free_desc
jmp loc_4E2F0
loc_4E412:
lea rsi, [rsp+0F8h+var_C8]
mov rdi, rbx
call js_free_desc
loc_4E41F:
mov eax, 1
jmp loc_4E306
| long long js_proxy_get_own_property(
long long a1,
long long a2,
long long a3,
long long a4,
int a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long *proxy_method; // r12
long long result; // rax
long long v17; // r14
long long v18; // rax
long long v19; // rdx
long long v20; // rbp
_DWORD *v21; // rsi
long long v22; // rdi
long long v23; // rdx
_DWORD *v24; // r15
__m128 v25; // xmm0
long long v26; // rdx
long long v27; // rdx
long long v28; // rcx
long long v29; // r8
long long v30; // r9
__m128 v31; // xmm4
__m128 v32; // xmm5
int OwnPropertyInternal; // eax
int v34; // r13d
long long v35; // rbp
int IsExtensible; // eax
int v37; // r15d
int v38; // r14d
__int16 v39; // si
__int128 v40; // xmm0
__int128 v41; // xmm1
char v42; // [rsp+0h] [rbp-F8h]
_DWORD *v43; // [rsp+8h] [rbp-F0h]
long long v45; // [rsp+18h] [rbp-E0h]
_DWORD *v46; // [rsp+20h] [rbp-D8h] BYREF
long long v47; // [rsp+28h] [rbp-D0h]
_OWORD v48[3]; // [rsp+30h] [rbp-C8h] BYREF
long long v49; // [rsp+60h] [rbp-98h]
unsigned __int8 v50[56]; // [rsp+68h] [rbp-90h] BYREF
__m128 v51; // [rsp+A0h] [rbp-58h] BYREF
long long v52; // [rsp+B0h] [rbp-48h]
long long v53; // [rsp+B8h] [rbp-40h]
proxy_method = (long long *)get_proxy_method(
a1,
(unsigned long long *)&v46,
a3,
a4,
103LL,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14);
result = 0xFFFFFFFFLL;
if ( !proxy_method )
return result;
v17 = v47;
if ( (_DWORD)v47 == 3 )
return JS_GetOwnPropertyInternal(a1, a2, *proxy_method, a5);
v45 = *proxy_method;
v18 = _JS_AtomToValue(a1, a5, 0);
v20 = v19;
if ( (_DWORD)v19 == 6 )
{
v21 = v46;
v22 = *(_QWORD *)(a1 + 24);
LABEL_6:
v23 = v17;
LABEL_7:
JS_FreeValueRT(v22, v21, v23);
return 0xFFFFFFFFLL;
}
v24 = (_DWORD *)v18;
v25 = *(__m128 *)proxy_method;
v51 = *(__m128 *)proxy_method;
v52 = v18;
v53 = v19;
v43 = (_DWORD *)JS_CallFree(a1, v46, v17, proxy_method[2], proxy_method[3], 2, (long long)&v51);
v17 = v26;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v24, v20);
if ( (_DWORD)v17 != -1 && (_DWORD)v17 != 3 )
{
if ( (_DWORD)v17 == 6 )
return 0xFFFFFFFFLL;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v43, v17);
LABEL_19:
JS_ThrowTypeError(
a1,
(long long)"proxy: inconsistent getOwnPropertyDescriptor",
v27,
v28,
v29,
v30,
v25,
a8,
a9,
a10,
v31,
v32,
a13,
a14,
v42);
return 0xFFFFFFFFLL;
}
OwnPropertyInternal = JS_GetOwnPropertyInternal(a1, (long long)v50, v45, a5);
if ( OwnPropertyInternal < 0 )
{
v22 = *(_QWORD *)(a1 + 24);
v21 = v43;
goto LABEL_6;
}
v34 = OwnPropertyInternal;
v35 = v17;
if ( OwnPropertyInternal )
js_free_desc(a1, (long long)v50);
if ( (_DWORD)v17 != 3 )
{
IsExtensible = JS_IsExtensible(a1, *proxy_method, proxy_method[1]);
if ( IsExtensible < 0 )
{
v22 = *(_QWORD *)(a1 + 24);
v21 = v43;
v23 = v17;
goto LABEL_7;
}
v37 = IsExtensible;
v38 = js_obj_to_desc(a1, v48, v43, v17);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v43, v35);
if ( v38 < 0 )
return 0xFFFFFFFFLL;
if ( v34 )
{
v39 = 7424;
if ( (v48[0] & 0x10) == 0 )
v39 = 9984;
if ( !(unsigned int)check_define_prop_flags(v50[0], LOWORD(v48[0]) | v39) )
goto LABEL_38;
}
else if ( !v37 )
{
goto LABEL_38;
}
if ( (v48[0] & 1) != 0 || v34 && (v50[0] & 1) == 0 && ((v48[0] & 0x12) != 0 || (v50[0] & 2) == 0) )
{
if ( a2 )
{
*(_QWORD *)(a2 + 48) = v49;
v40 = v48[0];
v41 = v48[1];
*(_OWORD *)(a2 + 32) = v48[2];
*(_OWORD *)(a2 + 16) = v41;
*(_OWORD *)a2 = v40;
}
else
{
js_free_desc(a1, (long long)v48);
}
return 1LL;
}
LABEL_38:
js_free_desc(a1, (long long)v48);
goto LABEL_19;
}
result = 0LL;
if ( v34 && ((v50[0] & 1) == 0 || (*(_BYTE *)(v45 + 5) & 1) == 0) )
goto LABEL_19;
return result;
}
| js_proxy_get_own_property:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV R13D,R8D
MOV R15,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x20]
MOV R8D,0x67
CALL 0x0013d3e0
MOV R12,RAX
MOV EAX,0xffffffff
TEST R12,R12
JZ 0x0014e306
MOV RDX,qword ptr [R12]
MOV R14,qword ptr [RSP + 0x28]
CMP R14D,0x3
JNZ 0x0014e1f1
MOV RDI,RBX
MOV RSI,R15
MOV ECX,R13D
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00123bd9
LAB_0014e1f1:
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],R15
MOV RDI,RBX
MOV ESI,R13D
XOR EDX,EDX
CALL 0x0012075a
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x0014e226
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RBX + 0x18]
LAB_0014e219:
MOV RDX,R14
LAB_0014e21c:
CALL 0x0011d8c6
JMP 0x0014e301
LAB_0014e226:
MOV R15,RAX
MOVUPS XMM0,xmmword ptr [R12]
LEA RAX,[RSP + 0xa0]
MOVAPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],R15
MOV qword ptr [RAX + 0x18],RBP
MOV RSI,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [R12 + 0x10]
MOV R8,qword ptr [R12 + 0x18]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV RDX,R14
MOV R9D,0x2
CALL 0x00122c9d
MOV qword ptr [RSP + 0x8],RAX
MOV R14,RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,RBP
CALL 0x0011d8c6
CMP R14D,-0x1
JZ 0x0014e2a1
CMP R14D,0x3
JZ 0x0014e2a1
CMP R14D,0x6
JZ 0x0014e301
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R14
CALL 0x0011d8c6
JMP 0x0014e2f0
LAB_0014e2a1:
LEA RSI,[RSP + 0x68]
MOV RDI,RBX
MOV R15,qword ptr [RSP + 0x18]
MOV RDX,R15
MOV ECX,R13D
CALL 0x00123bd9
TEST EAX,EAX
JS 0x0014e318
MOV R13D,EAX
MOV RBP,R14
MOV R14D,R14D
JZ 0x0014e2d5
LEA RSI,[RSP + 0x68]
MOV RDI,RBX
CALL 0x0013d8c3
LAB_0014e2d5:
CMP R14D,0x3
JNZ 0x0014e326
XOR EAX,EAX
TEST R13D,R13D
JZ 0x0014e306
TEST byte ptr [RSP + 0x68],0x1
JZ 0x0014e2f0
TEST byte ptr [R15 + 0x5],0x1
JNZ 0x0014e306
LAB_0014e2f0:
LEA RSI,[0x19ff13]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00122567
LAB_0014e301:
MOV EAX,0xffffffff
LAB_0014e306:
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014e318:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
JMP 0x0014e219
LAB_0014e326:
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
MOV RDI,RBX
CALL 0x0010f6fb
TEST EAX,EAX
JS 0x0014e396
MOV R15D,EAX
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
MOV R12,qword ptr [RSP + 0x8]
MOV RDX,R12
MOV RCX,RBP
CALL 0x0014f47c
MOV R14D,EAX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R12
MOV RDX,RBP
CALL 0x0011d8c6
TEST R14D,R14D
JS 0x0014e301
TEST R13D,R13D
JZ 0x0014e3a7
MOV EAX,dword ptr [RSP + 0x30]
TEST AL,0x10
MOV ECX,0x2700
MOV ESI,0x1d00
CMOVZ ESI,ECX
OR ESI,EAX
MOV EDI,dword ptr [RSP + 0x68]
CALL 0x0012616c
TEST EAX,EAX
JNZ 0x0014e3ac
JMP 0x0014e400
LAB_0014e396:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,RBP
JMP 0x0014e21c
LAB_0014e3a7:
TEST R15D,R15D
JZ 0x0014e400
LAB_0014e3ac:
MOV EAX,dword ptr [RSP + 0x30]
TEST AL,0x1
JNZ 0x0014e3d1
TEST R13D,R13D
JZ 0x0014e400
MOV ECX,dword ptr [RSP + 0x68]
TEST CL,0x1
JNZ 0x0014e400
TEST AL,0x12
SETNZ AL
TEST CL,0x2
SETZ CL
OR CL,AL
JZ 0x0014e400
LAB_0014e3d1:
MOV RCX,qword ptr [RSP + 0x10]
TEST RCX,RCX
JZ 0x0014e412
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RCX + 0x30],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x30]
MOVUPS XMM1,xmmword ptr [RSP + 0x40]
MOVUPS XMM2,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RCX + 0x20],XMM2
MOVUPS xmmword ptr [RCX + 0x10],XMM1
MOVUPS xmmword ptr [RCX],XMM0
JMP 0x0014e41f
LAB_0014e400:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x0013d8c3
JMP 0x0014e2f0
LAB_0014e412:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x0013d8c3
LAB_0014e41f:
MOV EAX,0x1
JMP 0x0014e306
|
int8
js_proxy_get_own_property
(long param_1,int8 *param_2,int8 param_3,int8 param_4,int4 param_5
)
{
long lVar1;
int iVar2;
int iVar3;
int iVar4;
long *plVar5;
int8 uVar6;
uint uVar8;
int1 auVar9 [16];
int1 auVar10 [16];
int8 local_d8;
int8 local_d0;
uint local_c8;
int4 uStack_c4;
int8 uStack_c0;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
int8 uStack_a0;
int8 local_98;
uint local_90 [14];
int4 local_58;
int4 uStack_54;
int4 uStack_50;
int4 uStack_4c;
int1 local_48 [16];
int8 uVar7;
plVar5 = (long *)get_proxy_method(param_1,&local_d8,param_3,param_4,0x67);
if (plVar5 == (long *)0x0) {
return 0xffffffff;
}
lVar1 = *plVar5;
if ((int)local_d0 == 3) {
uVar6 = JS_GetOwnPropertyInternal(param_1,param_2,lVar1,param_5);
return uVar6;
}
auVar9 = __JS_AtomToValue(param_1,param_5,0);
auVar10._8_8_ = local_d0;
auVar10._0_8_ = local_d8;
if (auVar9._8_4_ == 6) {
uVar6 = *(int8 *)(param_1 + 0x18);
LAB_0014e21c:
JS_FreeValueRT(uVar6,auVar10._0_8_,auVar10._8_8_);
}
else {
local_58 = (int4)*plVar5;
uStack_54 = *(int4 *)((long)plVar5 + 4);
uStack_50 = (int4)plVar5[1];
uStack_4c = *(int4 *)((long)plVar5 + 0xc);
local_48 = auVar9;
auVar10 = JS_CallFree(param_1,local_d8,local_d0,plVar5[2],plVar5[3],2,&local_58);
uVar7 = auVar10._8_8_;
uVar6 = auVar10._0_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar9._0_8_,auVar9._8_8_);
iVar3 = auVar10._8_4_;
if ((iVar3 == -1) || (iVar3 == 3)) {
iVar2 = JS_GetOwnPropertyInternal(param_1,local_90,lVar1,param_5);
if (iVar2 < 0) {
uVar6 = *(int8 *)(param_1 + 0x18);
goto LAB_0014e21c;
}
if (iVar2 != 0) {
js_free_desc(param_1,local_90);
}
if (iVar3 == 3) {
if (iVar2 == 0) {
return 0;
}
if (((local_90[0] & 1) != 0) && ((*(byte *)(lVar1 + 5) & 1) != 0)) {
return 0;
}
}
else {
iVar3 = JS_IsExtensible(param_1,*plVar5,plVar5[1]);
if (iVar3 < 0) {
uVar6 = *(int8 *)(param_1 + 0x18);
goto LAB_0014e21c;
}
iVar4 = js_obj_to_desc(param_1,&local_c8,uVar6,uVar7);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar6,uVar7);
if (iVar4 < 0) {
return 0xffffffff;
}
if (iVar2 != 0) {
uVar8 = 0x1d00;
if ((local_c8 & 0x10) == 0) {
uVar8 = 0x2700;
}
iVar3 = check_define_prop_flags(local_90[0],uVar8 | local_c8);
}
if ((iVar3 != 0) &&
(((local_c8 & 1) != 0 ||
(((iVar2 != 0 && ((local_90[0] & 1) == 0)) &&
((local_90[0] & 2) == 0 || (local_c8 & 0x12) != 0)))))) {
if (param_2 == (int8 *)0x0) {
js_free_desc(param_1,&local_c8);
}
else {
param_2[6] = local_98;
param_2[4] = local_a8;
param_2[5] = uStack_a0;
param_2[2] = local_b8;
param_2[3] = uStack_b0;
*param_2 = CONCAT44(uStack_c4,local_c8);
param_2[1] = uStack_c0;
}
return 1;
}
js_free_desc(param_1,&local_c8);
}
}
else {
if (iVar3 == 6) {
return 0xffffffff;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar6,uVar7);
}
JS_ThrowTypeError(param_1,"proxy: inconsistent getOwnPropertyDescriptor");
}
return 0xffffffff;
}
|
|
5,642 | js_proxy_get_own_property | bluesky950520[P]quickjs/quickjs.c | static int js_proxy_get_own_property(JSContext *ctx, JSPropertyDescriptor *pdesc,
JSValue obj, JSAtom prop)
{
JSProxyData *s;
JSValue method, trap_result_obj, prop_val;
int res, target_desc_ret, ret;
JSObject *p;
JSValue args[2];
JSPropertyDescriptor result_desc, target_desc;
s = get_proxy_method(ctx, &method, obj, JS_ATOM_getOwnPropertyDescriptor);
if (!s)
return -1;
p = JS_VALUE_GET_OBJ(s->target);
if (JS_IsUndefined(method)) {
return JS_GetOwnPropertyInternal(ctx, pdesc, p, prop);
}
prop_val = JS_AtomToValue(ctx, prop);
if (JS_IsException(prop_val)) {
JS_FreeValue(ctx, method);
return -1;
}
args[0] = s->target;
args[1] = prop_val;
trap_result_obj = JS_CallFree(ctx, method, s->handler, 2, args);
JS_FreeValue(ctx, prop_val);
if (JS_IsException(trap_result_obj))
return -1;
if (!JS_IsObject(trap_result_obj) && !JS_IsUndefined(trap_result_obj)) {
JS_FreeValue(ctx, trap_result_obj);
goto fail;
}
target_desc_ret = JS_GetOwnPropertyInternal(ctx, &target_desc, p, prop);
if (target_desc_ret < 0) {
JS_FreeValue(ctx, trap_result_obj);
return -1;
}
if (target_desc_ret)
js_free_desc(ctx, &target_desc);
if (JS_IsUndefined(trap_result_obj)) {
if (target_desc_ret) {
if (!(target_desc.flags & JS_PROP_CONFIGURABLE) || !p->extensible)
goto fail;
}
ret = FALSE;
} else {
int flags1, extensible_target;
extensible_target = JS_IsExtensible(ctx, s->target);
if (extensible_target < 0) {
JS_FreeValue(ctx, trap_result_obj);
return -1;
}
res = js_obj_to_desc(ctx, &result_desc, trap_result_obj);
JS_FreeValue(ctx, trap_result_obj);
if (res < 0)
return -1;
if (target_desc_ret) {
/* convert result_desc.flags to defineProperty flags */
flags1 = result_desc.flags | JS_PROP_HAS_CONFIGURABLE | JS_PROP_HAS_ENUMERABLE;
if (result_desc.flags & JS_PROP_GETSET)
flags1 |= JS_PROP_HAS_GET | JS_PROP_HAS_SET;
else
flags1 |= JS_PROP_HAS_VALUE | JS_PROP_HAS_WRITABLE;
/* XXX: not complete check: need to compare value &
getter/setter as in defineproperty */
if (!check_define_prop_flags(target_desc.flags, flags1))
goto fail1;
} else {
if (!extensible_target)
goto fail1;
}
if (!(result_desc.flags & JS_PROP_CONFIGURABLE)) {
if (!target_desc_ret || (target_desc.flags & JS_PROP_CONFIGURABLE))
goto fail1;
if ((result_desc.flags &
(JS_PROP_GETSET | JS_PROP_WRITABLE)) == 0 &&
target_desc_ret &&
(target_desc.flags & JS_PROP_WRITABLE) != 0) {
/* proxy-missing-checks */
fail1:
js_free_desc(ctx, &result_desc);
fail:
JS_ThrowTypeError(ctx, "proxy: inconsistent getOwnPropertyDescriptor");
return -1;
}
}
ret = TRUE;
if (pdesc) {
*pdesc = result_desc;
} else {
js_free_desc(ctx, &result_desc);
}
}
return ret;
} | O2 | c | js_proxy_get_own_property:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %r8d, %r15d
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %rsi
pushq $0x67
popq %r8
callq 0x35d01
movq %rax, %r12
pushq $-0x1
popq %rax
testq %r12, %r12
je 0x43056
movq (%r12), %rdx
movq 0x28(%rsp), %rbp
cmpl $0x3, %ebp
jne 0x42f9d
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %ecx
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1db80
movq %rdx, 0x18(%rsp)
movq %rbx, 0x10(%rsp)
movq %r14, %rdi
movl %r15d, %esi
callq 0x1a91e
movq %rdx, %r13
cmpl $0x6, %r13d
jne 0x42fd0
movq 0x20(%rsp), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x1801e
jmp 0x43053
movq %rax, %rbx
movups (%r12), %xmm0
leaq 0xa0(%rsp), %rax
movaps %xmm0, (%rax)
movq %rbx, 0x10(%rax)
movq %r13, 0x18(%rax)
movq 0x20(%rsp), %rsi
movq 0x10(%r12), %rcx
movq 0x18(%r12), %r8
movq %rax, (%rsp)
pushq $0x2
popq %r9
movq %r14, %rdi
movq %rbp, %rdx
callq 0x1cd8e
movq %rax, 0x8(%rsp)
movq %rdx, %rbp
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1801e
cmpl $-0x1, %ebp
je 0x43068
cmpl $0x3, %ebp
je 0x43068
cmpl $0x6, %ebp
je 0x43053
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
callq 0x1801e
leaq 0x43e04(%rip), %rsi # 0x86e4d
movq %r14, %rdi
xorl %eax, %eax
callq 0x1c64d
pushq $-0x1
popq %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x68(%rsp), %rsi
movq %r14, %rdi
movq 0x18(%rsp), %r13
movq %r13, %rdx
movl %r15d, %ecx
callq 0x1db80
testl %eax, %eax
js 0x4314c
movl %eax, %r15d
movl %ebp, %ebx
je 0x430b1
leaq 0x68(%rsp), %rsi
movq %r14, %rdi
callq 0x360ed
cmpl $0x3, %ebx
jne 0x430ba
testb $0x1, 0x68(%rsp)
je 0x43042
testb $0x1, 0x5(%r13)
je 0x43042
jmp 0x430b6
cmpl $0x3, %ebx
jne 0x430ba
xorl %eax, %eax
jmp 0x43056
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r14, %rdi
callq 0x1de0a
testl %eax, %eax
js 0x4314c
movl %eax, %ebx
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
movq 0x8(%rsp), %r13
movq %r13, %rdx
movq %rbp, %rcx
callq 0x4413a
movl %eax, %r12d
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1801e
testl %r12d, %r12d
js 0x43053
testl %r15d, %r15d
je 0x43159
movl 0x30(%rsp), %ebp
testb $0x10, %bpl
movl $0x2700, %eax # imm = 0x2700
movl $0x1d00, %esi # imm = 0x1D00
cmovel %eax, %esi
orl %ebp, %esi
movl 0x68(%rsp), %ebx
movl %ebx, %edi
callq 0x1fc9a
testl %eax, %eax
je 0x43164
testb $0x1, %bpl
jne 0x43176
testb $0x1, %bl
jne 0x43164
testb $0x12, %bpl
setne %al
testb $0x2, %bl
sete %cl
orb %al, %cl
je 0x43164
jmp 0x43176
movq %r14, %rdi
movq 0x8(%rsp), %rsi
jmp 0x42fc3
testl %ebx, %ebx
je 0x43164
testb $0x1, 0x30(%rsp)
jne 0x43176
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x360ed
jmp 0x43042
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
je 0x431a5
movq 0x60(%rsp), %rax
movq %rax, 0x30(%rcx)
movups 0x30(%rsp), %xmm0
movups 0x40(%rsp), %xmm1
movups 0x50(%rsp), %xmm2
movups %xmm2, 0x20(%rcx)
movups %xmm1, 0x10(%rcx)
movups %xmm0, (%rcx)
jmp 0x431b2
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x360ed
pushq $0x1
jmp 0x43055
| js_proxy_get_own_property:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov r15d, r8d
mov rbx, rsi
mov r14, rdi
lea rsi, [rsp+0F8h+var_D8]
push 67h ; 'g'
pop r8
call get_proxy_method
mov r12, rax
push 0FFFFFFFFFFFFFFFFh
pop rax
test r12, r12
jz loc_43056
mov rdx, [r12]
mov rbp, [rsp+0F8h+var_D0]
cmp ebp, 3
jnz short loc_42F9D
mov rdi, r14
mov rsi, rbx
mov ecx, r15d
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_GetOwnPropertyInternal
loc_42F9D:
mov [rsp+0F8h+var_E0], rdx
mov [rsp+0F8h+var_E8], rbx
mov rdi, r14
mov esi, r15d
call JS_AtomToValue
mov r13, rdx
cmp r13d, 6
jnz short loc_42FD0
mov rsi, [rsp+0F8h+var_D8]
mov rdi, r14
loc_42FC3:
mov rdx, rbp
call JS_FreeValue
jmp loc_43053
loc_42FD0:
mov rbx, rax
movups xmm0, xmmword ptr [r12]
lea rax, [rsp+0F8h+var_58]
movaps xmmword ptr [rax], xmm0
mov [rax+10h], rbx
mov [rax+18h], r13
mov rsi, [rsp+0F8h+var_D8]
mov rcx, [r12+10h]
mov r8, [r12+18h]
mov [rsp+0F8h+var_F8], rax
push 2
pop r9
mov rdi, r14
mov rdx, rbp
call JS_CallFree
mov [rsp+0F8h+var_F0], rax
mov rbp, rdx
mov rdi, r14
mov rsi, rbx
mov rdx, r13
call JS_FreeValue
cmp ebp, 0FFFFFFFFh
jz short loc_43068
cmp ebp, 3
jz short loc_43068
cmp ebp, 6
jz short loc_43053
mov rdi, r14
mov rsi, [rsp+0F8h+var_F0]
mov rdx, rbp
call JS_FreeValue
loc_43042:
lea rsi, aProxyInconsist_2; "proxy: inconsistent getOwnPropertyDescr"...
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
loc_43053:
push 0FFFFFFFFFFFFFFFFh
loc_43055:
pop rax
loc_43056:
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_43068:
lea rsi, [rsp+0F8h+var_90]
mov rdi, r14
mov r13, [rsp+0F8h+var_E0]
mov rdx, r13
mov ecx, r15d
call JS_GetOwnPropertyInternal
test eax, eax
js loc_4314C
mov r15d, eax
mov ebx, ebp
jz short loc_430B1
lea rsi, [rsp+0F8h+var_90]
mov rdi, r14
call js_free_desc
cmp ebx, 3
jnz short loc_430BA
test byte ptr [rsp+0F8h+var_90], 1
jz short loc_43042
test byte ptr [r13+5], 1
jz short loc_43042
jmp short loc_430B6
loc_430B1:
cmp ebx, 3
jnz short loc_430BA
loc_430B6:
xor eax, eax
jmp short loc_43056
loc_430BA:
mov rsi, [r12]
mov rdx, [r12+8]
mov rdi, r14
call JS_IsExtensible
test eax, eax
js short loc_4314C
mov ebx, eax
lea rsi, [rsp+0F8h+var_C8]
mov rdi, r14
mov r13, [rsp+0F8h+var_F0]
mov rdx, r13
mov rcx, rbp
call js_obj_to_desc
mov r12d, eax
mov rdi, r14
mov rsi, r13
mov rdx, rbp
call JS_FreeValue
test r12d, r12d
js loc_43053
test r15d, r15d
jz short loc_43159
mov ebp, dword ptr [rsp+0F8h+var_C8]
test bpl, 10h
mov eax, 2700h
mov esi, 1D00h
cmovz esi, eax
or esi, ebp
mov ebx, [rsp+0F8h+var_90]
mov edi, ebx
call check_define_prop_flags
test eax, eax
jz short loc_43164
test bpl, 1
jnz short loc_43176
test bl, 1
jnz short loc_43164
test bpl, 12h
setnz al
test bl, 2
setz cl
or cl, al
jz short loc_43164
jmp short loc_43176
loc_4314C:
mov rdi, r14
mov rsi, [rsp+0F8h+var_F0]
jmp loc_42FC3
loc_43159:
test ebx, ebx
jz short loc_43164
test byte ptr [rsp+0F8h+var_C8], 1
jnz short loc_43176
loc_43164:
lea rsi, [rsp+0F8h+var_C8]
mov rdi, r14
call js_free_desc
jmp loc_43042
loc_43176:
mov rcx, [rsp+0F8h+var_E8]
test rcx, rcx
jz short loc_431A5
mov rax, [rsp+0F8h+var_98]
mov [rcx+30h], rax
movups xmm0, [rsp+0F8h+var_C8]
movups xmm1, [rsp+0F8h+var_B8]
movups xmm2, [rsp+0F8h+var_A8]
movups xmmword ptr [rcx+20h], xmm2
movups xmmword ptr [rcx+10h], xmm1
movups xmmword ptr [rcx], xmm0
jmp short loc_431B2
loc_431A5:
lea rsi, [rsp+0F8h+var_C8]
mov rdi, r14
call js_free_desc
loc_431B2:
push 1
jmp loc_43055
| char js_proxy_get_own_property(
long long a1,
long long a2,
long long a3,
int a4,
unsigned int a5,
double a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
unsigned int *v14; // r8
long long *proxy_method; // r12
char result; // al
long long v17; // rbp
long long v18; // rax
long long v19; // rdx
long long v20; // r13
long long v21; // rsi
long long v22; // rbx
__m128 v23; // xmm0
long long v24; // rdx
unsigned int *v25; // r8
long long v26; // rdx
long long v27; // rcx
long long v28; // r8
long long v29; // r9
__m128 v30; // xmm4
__m128 v31; // xmm5
int v32; // eax
int v33; // r15d
int IsExtensible; // eax
int v35; // ebx
int v36; // r12d
char v37; // bp
__int16 v38; // si
char v39; // bl
__int128 v40; // xmm0
__int128 v41; // xmm1
char v43; // [rsp+0h] [rbp-F8h]
long long v44; // [rsp+8h] [rbp-F0h]
long long v46; // [rsp+18h] [rbp-E0h]
long long v47; // [rsp+20h] [rbp-D8h] BYREF
long long v48; // [rsp+28h] [rbp-D0h]
_OWORD v49[3]; // [rsp+30h] [rbp-C8h] BYREF
long long v50; // [rsp+60h] [rbp-98h]
long long v51[7]; // [rsp+68h] [rbp-90h] BYREF
__m128 v52; // [rsp+A0h] [rbp-58h] BYREF
long long v53; // [rsp+B0h] [rbp-48h]
long long v54; // [rsp+B8h] [rbp-40h]
proxy_method = (long long *)get_proxy_method(a1, (unsigned long long *)&v47, a3, a4, 103);
result = -1;
if ( proxy_method )
{
v17 = v48;
if ( (_DWORD)v48 == 3 )
return JS_GetOwnPropertyInternal(a1, a2, *proxy_method, a5, v14);
v46 = *proxy_method;
v18 = JS_AtomToValue(a1, a5);
v20 = v19;
if ( (_DWORD)v19 == 6 )
{
v21 = v47;
LABEL_6:
JS_FreeValue(a1, v21, v17);
return -1;
}
v22 = v18;
v23 = *(__m128 *)proxy_method;
v52 = *(__m128 *)proxy_method;
v53 = v18;
v54 = v19;
v44 = JS_CallFree(a1, v47, v17, proxy_method[2], proxy_method[3], 2, (long long)&v52);
v17 = v24;
JS_FreeValue(a1, v22, v20);
if ( (_DWORD)v17 != -1 && (_DWORD)v17 != 3 )
{
if ( (_DWORD)v17 == 6 )
return -1;
JS_FreeValue(a1, v44, v17);
LABEL_11:
JS_ThrowTypeError(
a1,
(long long)"proxy: inconsistent getOwnPropertyDescriptor",
v26,
v27,
v28,
v29,
v23,
a7,
a8,
a9,
v30,
v31,
a12,
a13,
v43);
return -1;
}
LOBYTE(v32) = JS_GetOwnPropertyInternal(a1, (long long)v51, v46, a5, v25);
if ( v32 < 0 )
goto LABEL_33;
v33 = v32;
if ( v32 )
{
js_free_desc(a1, v51);
if ( (_DWORD)v17 == 3 )
{
if ( (v51[0] & 1) == 0 || (*(_BYTE *)(v46 + 5) & 1) == 0 )
goto LABEL_11;
return 0;
}
}
else if ( (_DWORD)v17 == 3 )
{
return 0;
}
IsExtensible = JS_IsExtensible(
a1,
*proxy_method,
proxy_method[1],
v23,
a7,
a8,
a9,
*(double *)v30.m128_u64,
*(double *)v31.m128_u64,
a12,
a13);
if ( IsExtensible < 0 )
{
LABEL_33:
v21 = v44;
goto LABEL_6;
}
v35 = IsExtensible;
v36 = js_obj_to_desc(a1, v49, v44, v17);
JS_FreeValue(a1, v44, v17);
if ( v36 < 0 )
return -1;
if ( v33 )
{
v37 = v49[0];
v38 = 7424;
if ( (v49[0] & 0x10) == 0 )
v38 = 9984;
v39 = v51[0];
if ( (unsigned int)check_define_prop_flags(v51[0], LOWORD(v49[0]) | v38)
&& ((v37 & 1) != 0 || (v39 & 1) == 0 && ((v37 & 0x12) != 0 || (v39 & 2) == 0)) )
{
goto LABEL_37;
}
}
else if ( v35 && (v49[0] & 1) != 0 )
{
LABEL_37:
if ( a2 )
{
*(_QWORD *)(a2 + 48) = v50;
v40 = v49[0];
v41 = v49[1];
*(_OWORD *)(a2 + 32) = v49[2];
*(_OWORD *)(a2 + 16) = v41;
*(_OWORD *)a2 = v40;
}
else
{
js_free_desc(a1, (long long *)v49);
}
return 1;
}
js_free_desc(a1, (long long *)v49);
goto LABEL_11;
}
return result;
}
| js_proxy_get_own_property:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV R15D,R8D
MOV RBX,RSI
MOV R14,RDI
LEA RSI,[RSP + 0x20]
PUSH 0x67
POP R8
CALL 0x00135d01
MOV R12,RAX
PUSH -0x1
POP RAX
TEST R12,R12
JZ 0x00143056
MOV RDX,qword ptr [R12]
MOV RBP,qword ptr [RSP + 0x28]
CMP EBP,0x3
JNZ 0x00142f9d
MOV RDI,R14
MOV RSI,RBX
MOV ECX,R15D
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0011db80
LAB_00142f9d:
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],RBX
MOV RDI,R14
MOV ESI,R15D
CALL 0x0011a91e
MOV R13,RDX
CMP R13D,0x6
JNZ 0x00142fd0
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,R14
LAB_00142fc3:
MOV RDX,RBP
CALL 0x0011801e
JMP 0x00143053
LAB_00142fd0:
MOV RBX,RAX
MOVUPS XMM0,xmmword ptr [R12]
LEA RAX,[RSP + 0xa0]
MOVAPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],RBX
MOV qword ptr [RAX + 0x18],R13
MOV RSI,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [R12 + 0x10]
MOV R8,qword ptr [R12 + 0x18]
MOV qword ptr [RSP],RAX
PUSH 0x2
POP R9
MOV RDI,R14
MOV RDX,RBP
CALL 0x0011cd8e
MOV qword ptr [RSP + 0x8],RAX
MOV RBP,RDX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R13
CALL 0x0011801e
CMP EBP,-0x1
JZ 0x00143068
CMP EBP,0x3
JZ 0x00143068
CMP EBP,0x6
JZ 0x00143053
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,RBP
CALL 0x0011801e
LAB_00143042:
LEA RSI,[0x186e4d]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011c64d
LAB_00143053:
PUSH -0x1
LAB_00143055:
POP RAX
LAB_00143056:
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00143068:
LEA RSI,[RSP + 0x68]
MOV RDI,R14
MOV R13,qword ptr [RSP + 0x18]
MOV RDX,R13
MOV ECX,R15D
CALL 0x0011db80
TEST EAX,EAX
JS 0x0014314c
MOV R15D,EAX
MOV EBX,EBP
JZ 0x001430b1
LEA RSI,[RSP + 0x68]
MOV RDI,R14
CALL 0x001360ed
CMP EBX,0x3
JNZ 0x001430ba
TEST byte ptr [RSP + 0x68],0x1
JZ 0x00143042
TEST byte ptr [R13 + 0x5],0x1
JZ 0x00143042
JMP 0x001430b6
LAB_001430b1:
CMP EBX,0x3
JNZ 0x001430ba
LAB_001430b6:
XOR EAX,EAX
JMP 0x00143056
LAB_001430ba:
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
MOV RDI,R14
CALL 0x0011de0a
TEST EAX,EAX
JS 0x0014314c
MOV EBX,EAX
LEA RSI,[RSP + 0x30]
MOV RDI,R14
MOV R13,qword ptr [RSP + 0x8]
MOV RDX,R13
MOV RCX,RBP
CALL 0x0014413a
MOV R12D,EAX
MOV RDI,R14
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011801e
TEST R12D,R12D
JS 0x00143053
TEST R15D,R15D
JZ 0x00143159
MOV EBP,dword ptr [RSP + 0x30]
TEST BPL,0x10
MOV EAX,0x2700
MOV ESI,0x1d00
CMOVZ ESI,EAX
OR ESI,EBP
MOV EBX,dword ptr [RSP + 0x68]
MOV EDI,EBX
CALL 0x0011fc9a
TEST EAX,EAX
JZ 0x00143164
TEST BPL,0x1
JNZ 0x00143176
TEST BL,0x1
JNZ 0x00143164
TEST BPL,0x12
SETNZ AL
TEST BL,0x2
SETZ CL
OR CL,AL
JZ 0x00143164
JMP 0x00143176
LAB_0014314c:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x8]
JMP 0x00142fc3
LAB_00143159:
TEST EBX,EBX
JZ 0x00143164
TEST byte ptr [RSP + 0x30],0x1
JNZ 0x00143176
LAB_00143164:
LEA RSI,[RSP + 0x30]
MOV RDI,R14
CALL 0x001360ed
JMP 0x00143042
LAB_00143176:
MOV RCX,qword ptr [RSP + 0x10]
TEST RCX,RCX
JZ 0x001431a5
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RCX + 0x30],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x30]
MOVUPS XMM1,xmmword ptr [RSP + 0x40]
MOVUPS XMM2,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RCX + 0x20],XMM2
MOVUPS xmmword ptr [RCX + 0x10],XMM1
MOVUPS xmmword ptr [RCX],XMM0
JMP 0x001431b2
LAB_001431a5:
LEA RSI,[RSP + 0x30]
MOV RDI,R14
CALL 0x001360ed
LAB_001431b2:
PUSH 0x1
JMP 0x00143055
|
int8
js_proxy_get_own_property
(int8 param_1,int8 *param_2,int8 param_3,int8 param_4,
int4 param_5)
{
long lVar1;
uint uVar2;
int iVar3;
int iVar4;
int iVar5;
long *plVar6;
int8 uVar7;
uint uVar9;
int1 auVar10 [16];
int1 auVar11 [16];
int8 local_d8;
int8 local_d0;
uint local_c8;
int4 uStack_c4;
int8 uStack_c0;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
int8 uStack_a0;
int8 local_98;
uint local_90 [14];
int4 local_58;
int4 uStack_54;
int4 uStack_50;
int4 uStack_4c;
int1 local_48 [16];
int8 uVar8;
plVar6 = (long *)get_proxy_method(param_1,&local_d8,param_3,param_4,0x67);
if (plVar6 == (long *)0x0) {
return 0xffffffffffffffff;
}
lVar1 = *plVar6;
if ((int)local_d0 == 3) {
uVar7 = JS_GetOwnPropertyInternal(param_1,param_2,lVar1,param_5);
return uVar7;
}
auVar10 = JS_AtomToValue(param_1,param_5);
auVar11._8_8_ = local_d0;
auVar11._0_8_ = local_d8;
if (auVar10._8_4_ != 6) {
local_58 = (int4)*plVar6;
uStack_54 = *(int4 *)((long)plVar6 + 4);
uStack_50 = (int4)plVar6[1];
uStack_4c = *(int4 *)((long)plVar6 + 0xc);
local_48 = auVar10;
auVar11 = JS_CallFree(param_1,local_d8,local_d0,plVar6[2],plVar6[3],2,&local_58);
uVar8 = auVar11._8_8_;
uVar7 = auVar11._0_8_;
JS_FreeValue(param_1,auVar10._0_8_,auVar10._8_8_);
iVar4 = auVar11._8_4_;
if ((iVar4 != -1) && (iVar4 != 3)) {
if (iVar4 == 6) {
return 0xffffffffffffffff;
}
JS_FreeValue(param_1,uVar7,uVar8);
LAB_00143042:
JS_ThrowTypeError(param_1,"proxy: inconsistent getOwnPropertyDescriptor");
return 0xffffffffffffffff;
}
iVar3 = JS_GetOwnPropertyInternal(param_1,local_90,lVar1,param_5);
if (-1 < iVar3) {
if (iVar3 == 0) {
if (iVar4 == 3) {
return 0;
}
}
else {
js_free_desc(param_1,local_90);
if (iVar4 == 3) {
if (((local_90[0] & 1) != 0) && ((*(byte *)(lVar1 + 5) & 1) != 0)) {
return 0;
}
goto LAB_00143042;
}
}
iVar4 = JS_IsExtensible(param_1,*plVar6,plVar6[1]);
if (-1 < iVar4) {
iVar5 = js_obj_to_desc(param_1,&local_c8,uVar7,uVar8);
JS_FreeValue(param_1,uVar7,uVar8);
uVar2 = local_c8;
if (iVar5 < 0) {
return 0xffffffffffffffff;
}
if (iVar3 == 0) {
if ((iVar4 != 0) && ((local_c8 & 1) != 0)) goto LAB_00143176;
}
else {
uVar9 = 0x1d00;
if ((local_c8 & 0x10) == 0) {
uVar9 = 0x2700;
}
iVar4 = check_define_prop_flags(local_90[0],uVar9 | local_c8);
if ((iVar4 != 0) &&
(((uVar2 & 1) != 0 ||
(((local_90[0] & 1) == 0 && ((local_90[0] & 2) == 0 || (uVar2 & 0x12) != 0)))))) {
LAB_00143176:
if (param_2 == (int8 *)0x0) {
js_free_desc(param_1,&local_c8);
}
else {
param_2[6] = local_98;
param_2[4] = local_a8;
param_2[5] = uStack_a0;
param_2[2] = local_b8;
param_2[3] = uStack_b0;
*param_2 = CONCAT44(uStack_c4,local_c8);
param_2[1] = uStack_c0;
}
return 1;
}
}
js_free_desc(param_1,&local_c8);
goto LAB_00143042;
}
}
}
JS_FreeValue(param_1,auVar11._0_8_,auVar11._8_8_);
return 0xffffffffffffffff;
}
|
|
5,643 | 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>, double, 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&, double&) | 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>, double, 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&, double&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0x6445a
cmpl $0x7, %eax
je 0x64452
cmpl $0x6, %eax
jne 0x6446d
movsd 0x8(%r14), %xmm1
unpcklps 0x502b4(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x502bc(%rip), %xmm1 # 0xb4700
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
jmp 0x64460
movsd 0x8(%r14), %xmm0
jmp 0x64460
cvtsi2sdq 0x8(%r14), %xmm0
movsd %xmm0, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x24460
movq %rax, %rbx
movq %r14, %rdi
callq 0x43ea6
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x51641(%rip), %rsi # 0xb5ad0
leaq 0x10(%rsp), %rdi
callq 0x63dd7
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x63cea
xorl %ebp, %ebp
leaq 0x9aa7e(%rip), %rsi # 0xfef38
leaq -0x23a8b(%rip), %rdx # 0x40a36
movq %rbx, %rdi
callq 0x24ef0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x251d8
testb %bpl, %bpl
jne 0x644e0
jmp 0x644e8
movq %rax, %r14
movq %rbx, %rdi
callq 0x24680
movq %r14, %rdi
callq 0x24f80
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_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_6445A
cmp eax, 7
jz short loc_64452
cmp eax, 6
jnz short loc_6446D
movsd xmm1, qword ptr [r14+8]
unpcklps xmm1, cs:xmmword_B46F0
subpd xmm1, cs:xmmword_B4700
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
jmp short loc_64460
loc_64452:
movsd xmm0, qword ptr [r14+8]
jmp short loc_64460
loc_6445A:
cvtsi2sd xmm0, qword ptr [r14+8]
loc_64460:
movsd qword ptr [rsi], xmm0
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_6446D:
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_644E0
jmp short loc_644E8
mov r14, rax
loc_644E0:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_644E8:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
double *a2)
{
long long result; // rax
__m128d v3; // xmm1
double v4; // xmm0_8
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v6; // [rsp+8h] [rbp-40h] BYREF
_BYTE v7[56]; // [rsp+10h] [rbp-38h] BYREF
result = *a1;
switch ( (_DWORD)result )
{
case 5:
v4 = (double)(int)*((_QWORD *)a1 + 1);
break;
case 7:
v4 = *((double *)a1 + 1);
break;
case 6:
v3 = _mm_sub_pd(
(__m128d)_mm_unpacklo_ps((__m128)*((unsigned long long *)a1 + 1), (__m128)xmmword_B46F0),
(__m128d)xmmword_B4700);
v4 = _mm_unpackhi_pd(v3, v3).m128d_f64[0] + v3.m128d_f64[0];
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v6 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v7,
(long long)"type must be number, but is ",
&v6);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
(long long)v7);
__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);
}
*a2 = v4;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_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 0x0016445a
CMP EAX,0x7
JZ 0x00164452
CMP EAX,0x6
JNZ 0x0016446d
MOVSD XMM1,qword ptr [R14 + 0x8]
UNPCKLPS XMM1,xmmword ptr [0x001b46f0]
SUBPD XMM1,xmmword ptr [0x001b4700]
MOVAPD XMM0,XMM1
UNPCKHPD XMM0,XMM1
ADDSD XMM0,XMM1
JMP 0x00164460
LAB_00164452:
MOVSD XMM0,qword ptr [R14 + 0x8]
JMP 0x00164460
LAB_0016445a:
CVTSI2SD XMM0,qword ptr [R14 + 0x8]
LAB_00164460:
MOVSD qword ptr [RSI],XMM0
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0016446d:
PUSH 0x20
POP RDI
CALL 0x00124460
MOV RBX,RAX
MOV RDI,R14
CALL 0x00143ea6
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00164488:
LEA RSI,[0x1b5ad0]
LEA RDI,[RSP + 0x10]
CALL 0x00163dd7
MOV BPL,0x1
LAB_0016449c:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00163cea
XOR EBP,EBP
LEA RSI,[0x1fef38]
LEA RDX,[0x140a36]
MOV RDI,RBX
CALL 0x00124ef0
|
/* 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_IhSaIhEEvEEdTnNSt9enable_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,double *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;
double dVar3;
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) {
dVar3 = (double)*(long *)(param_1 + 8);
}
else 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) {
dVar3 = *(double *)(param_1 + 8);
}
else {
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 00164488 to 00164498 has its CatchHandler @ 001644dd */
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 0016449c to 001644c8 has its CatchHandler @ 001644c9 */
_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);
}
dVar3 = ((double)CONCAT44(_UNK_001b46f4,(int)((ulong)*(int8 *)(param_1 + 8) >> 0x20)) -
_UNK_001b4708) +
((double)CONCAT44(_DAT_001b46f0,(int)*(int8 *)(param_1 + 8)) - _DAT_001b4700);
}
*param_2 = dVar3;
return;
}
|
|
5,644 | mysql_stmt_fetch_column | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, unsigned int column, unsigned long offset)
{
if (stmt->state < MYSQL_STMT_USER_FETCHING || column >= stmt->field_count ||
stmt->state == MYSQL_STMT_FETCH_DONE) {
SET_CLIENT_STMT_ERROR(stmt, CR_NO_DATA, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!stmt->bind[column].u.row_ptr)
{
/* we set row_ptr only for columns which contain data, so this must be a NULL column */
if (bind[0].is_null)
*bind[0].is_null= 1;
}
else
{
unsigned char *save_ptr;
if (bind[0].length)
*bind[0].length= *stmt->bind[column].length;
else
bind[0].length= &stmt->bind[column].length_value;
if (bind[0].is_null)
*bind[0].is_null= 0;
else
bind[0].is_null= &bind[0].is_null_value;
if (!bind[0].error)
bind[0].error= &bind[0].error_value;
*bind[0].error= 0;
bind[0].offset= offset;
save_ptr= stmt->bind[column].u.row_ptr;
mysql_ps_fetch_functions[stmt->fields[column].type].func(&bind[0], &stmt->fields[column], &stmt->bind[column].u.row_ptr);
stmt->bind[column].u.row_ptr= save_ptr;
}
return(0);
} | O0 | c | mysql_stmt_fetch_column:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x5, 0x50(%rax)
jb 0x29bd7
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x60(%rcx), %eax
jae 0x29bd7
movq -0x10(%rbp), %rax
cmpl $0x6, 0x50(%rax)
jne 0x29c4b
jmp 0x29bd9
movq -0x10(%rbp), %rax
movl $0x803, 0x108(%rax) # imm = 0x803
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x36317(%rip), %rax # 0x5ff10
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x362fd(%rip), %rax # 0x5ff20
movq 0x198(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x29db5
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x20(%rax)
jne 0x29c7f
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x29c7a
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movb $0x1, (%rax)
jmp 0x29dae
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x29cad
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
jmp 0x29cca
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rcx
movl -0x1c(%rbp), %eax
imulq $0x70, %rax, %rax
addq %rax, %rcx
addq $0x50, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x29ce2
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movb $0x0, (%rax)
jmp 0x29cf2
movq -0x18(%rbp), %rcx
addq $0x67, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x29d0d
movq -0x18(%rbp), %rcx
addq $0x64, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x1c(%rbp), %ecx
shlq $0x7, %rcx
addq %rcx, %rax
movl 0x70(%rax), %eax
movl %eax, %ecx
leaq 0x36764(%rip), %rax # 0x604c0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x58(%rcx), %rsi
movl -0x1c(%rbp), %ecx
shlq $0x7, %rcx
addq %rcx, %rsi
movq -0x10(%rbp), %rcx
movq 0x78(%rcx), %rdx
movl -0x1c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rdx
addq $0x20, %rdx
callq *%rax
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x1c(%rbp), %edx
imulq $0x70, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
| mysql_stmt_fetch_column:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 5
jb short loc_29BD7
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
cmp eax, [rcx+60h]
jnb short loc_29BD7
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 6
jnz short loc_29C4B
loc_29BD7:
jmp short $+2
loc_29BD9:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 803h
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+198h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_29DB5
loc_29C4B:
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov ecx, [rbp+var_1C]
imul rcx, 70h ; 'p'
add rax, rcx
cmp qword ptr [rax+20h], 0
jnz short loc_29C7F
mov rax, [rbp+var_18]
cmp qword ptr [rax+8], 0
jz short loc_29C7A
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov byte ptr [rax], 1
loc_29C7A:
jmp loc_29DAE
loc_29C7F:
mov rax, [rbp+var_18]
cmp qword ptr [rax], 0
jz short loc_29CAD
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov ecx, [rbp+var_1C]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rax], rcx
jmp short loc_29CCA
loc_29CAD:
mov rax, [rbp+var_10]
mov rcx, [rax+78h]
mov eax, [rbp+var_1C]
imul rax, 70h ; 'p'
add rcx, rax
add rcx, 50h ; 'P'
mov rax, [rbp+var_18]
mov [rax], rcx
loc_29CCA:
mov rax, [rbp+var_18]
cmp qword ptr [rax+8], 0
jz short loc_29CE2
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov byte ptr [rax], 0
jmp short loc_29CF2
loc_29CE2:
mov rcx, [rbp+var_18]
add rcx, 67h ; 'g'
mov rax, [rbp+var_18]
mov [rax+8], rcx
loc_29CF2:
mov rax, [rbp+var_18]
cmp qword ptr [rax+18h], 0
jnz short loc_29D0D
mov rcx, [rbp+var_18]
add rcx, 64h ; 'd'
mov rax, [rbp+var_18]
mov [rax+18h], rcx
loc_29D0D:
mov rax, [rbp+var_18]
mov rax, [rax+18h]
mov byte ptr [rax], 0
mov rcx, [rbp+var_28]
mov rax, [rbp+var_18]
mov [rax+48h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov ecx, [rbp+var_1C]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax+20h]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov ecx, [rbp+var_1C]
shl rcx, 7
add rax, rcx
mov eax, [rax+70h]
mov ecx, eax
lea rax, mysql_ps_fetch_functions
imul rcx, 18h
add rax, rcx
mov rax, [rax]
mov rdi, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rsi, [rcx+58h]
mov ecx, [rbp+var_1C]
shl rcx, 7
add rsi, rcx
mov rcx, [rbp+var_10]
mov rdx, [rcx+78h]
mov ecx, [rbp+var_1C]
imul rcx, 70h ; 'p'
add rdx, rcx
add rdx, 20h ; ' '
call rax
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov edx, [rbp+var_1C]
imul rdx, 70h ; 'p'
add rax, rdx
mov [rax+20h], rcx
loc_29DAE:
mov [rbp+var_4], 0
loc_29DB5:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long mysql_stmt_fetch_column(long long a1, long long a2, unsigned int a3, long long a4)
{
long long v5; // [rsp+0h] [rbp-30h]
if ( *(_DWORD *)(a1 + 80) < 5u || a3 >= *(_DWORD *)(a1 + 96) || *(_DWORD *)(a1 + 80) == 6 )
{
*(_DWORD *)(a1 + 264) = 2051;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[51], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
else
{
if ( *(_QWORD *)(112LL * a3 + *(_QWORD *)(a1 + 120) + 32) )
{
if ( *(_QWORD *)a2 )
**(_QWORD **)a2 = **(_QWORD **)(112LL * a3 + *(_QWORD *)(a1 + 120));
else
*(_QWORD *)a2 = 112LL * a3 + *(_QWORD *)(a1 + 120) + 80;
if ( *(_QWORD *)(a2 + 8) )
**(_BYTE **)(a2 + 8) = 0;
else
*(_QWORD *)(a2 + 8) = a2 + 103;
if ( !*(_QWORD *)(a2 + 24) )
*(_QWORD *)(a2 + 24) = a2 + 100;
**(_BYTE **)(a2 + 24) = 0;
*(_QWORD *)(a2 + 72) = a4;
v5 = *(_QWORD *)(112LL * a3 + *(_QWORD *)(a1 + 120) + 32);
(*(void ( **)(long long, unsigned long long, long long))&mysql_ps_fetch_functions[6
* *(unsigned int *)(((unsigned long long)a3 << 7) + *(_QWORD *)(a1 + 88) + 112)])(
a2,
((unsigned long long)a3 << 7) + *(_QWORD *)(a1 + 88),
112LL * a3 + *(_QWORD *)(a1 + 120) + 32);
*(_QWORD *)(112LL * a3 + *(_QWORD *)(a1 + 120) + 32) = v5;
}
else if ( *(_QWORD *)(a2 + 8) )
{
**(_BYTE **)(a2 + 8) = 1;
}
return 0;
}
}
| mysql_stmt_fetch_column:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x5
JC 0x00129bd7
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x60]
JNC 0x00129bd7
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x6
JNZ 0x00129c4b
LAB_00129bd7:
JMP 0x00129bd9
LAB_00129bd9:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x803
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x15ff10]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x15ff20]
MOV RSI,qword ptr [RAX + 0x198]
MOV EDX,0x200
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00129db5
LAB_00129c4b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
CMP qword ptr [RAX + 0x20],0x0
JNZ 0x00129c7f
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00129c7a
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV byte ptr [RAX],0x1
LAB_00129c7a:
JMP 0x00129dae
LAB_00129c7f:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX],0x0
JZ 0x00129cad
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
JMP 0x00129cca
LAB_00129cad:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x78]
MOV EAX,dword ptr [RBP + -0x1c]
IMUL RAX,RAX,0x70
ADD RCX,RAX
ADD RCX,0x50
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
LAB_00129cca:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00129ce2
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV byte ptr [RAX],0x0
JMP 0x00129cf2
LAB_00129ce2:
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x67
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RCX
LAB_00129cf2:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x00129d0d
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x64
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x18],RCX
LAB_00129d0d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV byte ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x48],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x58]
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x7
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x70]
MOV ECX,EAX
LEA RAX,[0x1604c0]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x58]
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x7
ADD RSI,RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x78]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x70
ADD RDX,RCX
ADD RDX,0x20
CALL RAX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV EDX,dword ptr [RBP + -0x1c]
IMUL RDX,RDX,0x70
ADD RAX,RDX
MOV qword ptr [RAX + 0x20],RCX
LAB_00129dae:
MOV dword ptr [RBP + -0x4],0x0
LAB_00129db5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 mysql_stmt_fetch_column(long param_1,long *param_2,uint param_3,long param_4)
{
int8 uVar1;
int4 local_c;
if (((*(uint *)(param_1 + 0x50) < 5) || (*(uint *)(param_1 + 0x60) <= param_3)) ||
(*(int *)(param_1 + 0x50) == 6)) {
*(int4 *)(param_1 + 0x108) = 0x803;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s__001600b8,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_c = 1;
}
else {
if (*(long *)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20) == 0) {
if (param_2[1] != 0) {
*(int1 *)param_2[1] = 1;
}
}
else {
if (*param_2 == 0) {
*param_2 = *(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x50;
}
else {
*(int8 *)*param_2 =
**(int8 **)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70);
}
if (param_2[1] == 0) {
param_2[1] = (long)param_2 + 0x67;
}
else {
*(int1 *)param_2[1] = 0;
}
if (param_2[3] == 0) {
param_2[3] = (long)param_2 + 100;
}
*(int1 *)param_2[3] = 0;
param_2[9] = param_4;
uVar1 = *(int8 *)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20);
(*(code *)(&mysql_ps_fetch_functions)
[(ulong)*(uint *)(*(long *)(param_1 + 0x58) + (ulong)param_3 * 0x80 + 0x70) * 3])
(param_2,*(long *)(param_1 + 0x58) + (ulong)param_3 * 0x80,
*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20);
*(int8 *)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20) = uVar1;
}
local_c = 0;
}
return local_c;
}
|
|
5,645 | mysql_stmt_fetch_column | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, unsigned int column, unsigned long offset)
{
if (stmt->state < MYSQL_STMT_USER_FETCHING || column >= stmt->field_count ||
stmt->state == MYSQL_STMT_FETCH_DONE) {
SET_CLIENT_STMT_ERROR(stmt, CR_NO_DATA, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!stmt->bind[column].u.row_ptr)
{
/* we set row_ptr only for columns which contain data, so this must be a NULL column */
if (bind[0].is_null)
*bind[0].is_null= 1;
}
else
{
unsigned char *save_ptr;
if (bind[0].length)
*bind[0].length= *stmt->bind[column].length;
else
bind[0].length= &stmt->bind[column].length_value;
if (bind[0].is_null)
*bind[0].is_null= 0;
else
bind[0].is_null= &bind[0].is_null_value;
if (!bind[0].error)
bind[0].error= &bind[0].error_value;
*bind[0].error= 0;
bind[0].offset= offset;
save_ptr= stmt->bind[column].u.row_ptr;
mysql_ps_fetch_functions[stmt->fields[column].type].func(&bind[0], &stmt->fields[column], &stmt->bind[column].u.row_ptr);
stmt->bind[column].u.row_ptr= save_ptr;
}
return(0);
} | O3 | c | mysql_stmt_fetch_column:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x50(%rdi), %eax
cmpl $0x5, %eax
jae 0x20848
movl $0x803, 0x108(%rbx) # imm = 0x803
leaq 0x30d(%rbx), %rdi
leaq 0x28265(%rip), %rax # 0x48a60
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x28250(%rip), %rax # 0x48a70
movq 0x198(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r14b, 0x30b(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x6, %eax
je 0x207e3
cmpl %edx, 0x60(%rbx)
jbe 0x207e3
movq 0x78(%rbx), %rax
movl %edx, %edi
imulq $0x70, %rdi, %r14
cmpq $0x0, 0x20(%rax,%r14)
je 0x2087a
addq %r14, %rax
movq (%rsi), %rdx
testq %rdx, %rdx
je 0x2088a
movq (%rax), %rax
movq (%rax), %rax
movq %rax, (%rdx)
jmp 0x20891
movq 0x8(%rsi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x2083d
movb $0x1, (%rcx)
jmp 0x2083d
addq $0x50, %rax
movq %rax, (%rsi)
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x2089f
movb $0x0, (%rax)
jmp 0x208a7
leaq 0x67(%rsi), %rax
movq %rax, 0x8(%rsi)
movq 0x18(%rsi), %rax
testq %rax, %rax
jne 0x208b8
leaq 0x64(%rsi), %rax
movq %rax, 0x18(%rsi)
movb $0x0, (%rax)
movq %rcx, 0x48(%rsi)
movq 0x58(%rbx), %rcx
movq 0x78(%rbx), %rax
leaq (%rax,%r14), %rdx
addq $0x20, %rdx
movq (%rdx), %r15
shlq $0x7, %rdi
leaq (%rcx,%rdi), %rax
movl 0x70(%rcx,%rdi), %ecx
leaq (%rcx,%rcx,2), %rcx
leaq 0x286e7(%rip), %r8 # 0x48fd0
movq %rsi, %rdi
movq %rax, %rsi
callq *(%r8,%rcx,8)
movq 0x78(%rbx), %rax
movq %r15, 0x20(%rax,%r14)
xorl %eax, %eax
jmp 0x2083d
| mysql_stmt_fetch_column:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+50h]
cmp eax, 5
jnb short loc_20848
loc_207E3:
mov dword ptr [rbx+108h], 803h
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+198h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov eax, 1
loc_2083D:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_20848:
cmp eax, 6
jz short loc_207E3
cmp [rbx+60h], edx
jbe short loc_207E3
mov rax, [rbx+78h]
mov edi, edx
imul r14, rdi, 70h ; 'p'
cmp qword ptr [rax+r14+20h], 0
jz short loc_2087A
add rax, r14
mov rdx, [rsi]
test rdx, rdx
jz short loc_2088A
mov rax, [rax]
mov rax, [rax]
mov [rdx], rax
jmp short loc_20891
loc_2087A:
mov rcx, [rsi+8]
xor eax, eax
test rcx, rcx
jz short loc_2083D
mov byte ptr [rcx], 1
jmp short loc_2083D
loc_2088A:
add rax, 50h ; 'P'
mov [rsi], rax
loc_20891:
mov rax, [rsi+8]
test rax, rax
jz short loc_2089F
mov byte ptr [rax], 0
jmp short loc_208A7
loc_2089F:
lea rax, [rsi+67h]
mov [rsi+8], rax
loc_208A7:
mov rax, [rsi+18h]
test rax, rax
jnz short loc_208B8
lea rax, [rsi+64h]
mov [rsi+18h], rax
loc_208B8:
mov byte ptr [rax], 0
mov [rsi+48h], rcx
mov rcx, [rbx+58h]
mov rax, [rbx+78h]
lea rdx, [rax+r14]
add rdx, 20h ; ' '
mov r15, [rdx]
shl rdi, 7
lea rax, [rcx+rdi]
mov ecx, [rcx+rdi+70h]
lea rcx, [rcx+rcx*2]
lea r8, mysql_ps_fetch_functions
mov rdi, rsi
mov rsi, rax
call qword ptr [r8+rcx*8]
mov rax, [rbx+78h]
mov [rax+r14+20h], r15
xor eax, eax
jmp loc_2083D
| long long mysql_stmt_fetch_column(long long a1, long long a2, unsigned int a3, long long a4)
{
unsigned int v4; // eax
long long result; // rax
long long v6; // rax
long long v7; // r14
_QWORD **v8; // rax
_BYTE *v9; // rcx
_BYTE *v10; // rax
_BYTE *v11; // rax
long long v12; // r15
v4 = *(_DWORD *)(a1 + 80);
if ( v4 < 5 || v4 == 6 || *(_DWORD *)(a1 + 96) <= a3 )
{
*(_DWORD *)(a1 + 264) = 2051;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[51], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1LL;
}
else
{
v6 = *(_QWORD *)(a1 + 120);
v7 = 112LL * a3;
if ( *(_QWORD *)(v6 + v7 + 32) )
{
v8 = (_QWORD **)(v7 + v6);
if ( *(_QWORD *)a2 )
**(_QWORD **)a2 = **v8;
else
*(_QWORD *)a2 = v8 + 10;
v10 = *(_BYTE **)(a2 + 8);
if ( v10 )
*v10 = 0;
else
*(_QWORD *)(a2 + 8) = a2 + 103;
v11 = *(_BYTE **)(a2 + 24);
if ( !v11 )
{
v11 = (_BYTE *)(a2 + 100);
*(_QWORD *)(a2 + 24) = a2 + 100;
}
*v11 = 0;
*(_QWORD *)(a2 + 72) = a4;
v12 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + v7 + 32);
(*(void ( **)(long long, unsigned long long))&mysql_ps_fetch_functions[6
* *(unsigned int *)(*(_QWORD *)(a1 + 88) + ((unsigned long long)a3 << 7) + 112)])(
a2,
*(_QWORD *)(a1 + 88) + ((unsigned long long)a3 << 7));
*(_QWORD *)(*(_QWORD *)(a1 + 120) + v7 + 32) = v12;
return 0LL;
}
else
{
v9 = *(_BYTE **)(a2 + 8);
result = 0LL;
if ( v9 )
*v9 = 1;
}
}
return result;
}
| mysql_stmt_fetch_column:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x50]
CMP EAX,0x5
JNC 0x00120848
LAB_001207e3:
MOV dword ptr [RBX + 0x108],0x803
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x148a60]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x148a70]
MOV RSI,qword ptr [RAX + 0x198]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R14B
MOV EAX,0x1
LAB_0012083d:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00120848:
CMP EAX,0x6
JZ 0x001207e3
CMP dword ptr [RBX + 0x60],EDX
JBE 0x001207e3
MOV RAX,qword ptr [RBX + 0x78]
MOV EDI,EDX
IMUL R14,RDI,0x70
CMP qword ptr [RAX + R14*0x1 + 0x20],0x0
JZ 0x0012087a
ADD RAX,R14
MOV RDX,qword ptr [RSI]
TEST RDX,RDX
JZ 0x0012088a
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDX],RAX
JMP 0x00120891
LAB_0012087a:
MOV RCX,qword ptr [RSI + 0x8]
XOR EAX,EAX
TEST RCX,RCX
JZ 0x0012083d
MOV byte ptr [RCX],0x1
JMP 0x0012083d
LAB_0012088a:
ADD RAX,0x50
MOV qword ptr [RSI],RAX
LAB_00120891:
MOV RAX,qword ptr [RSI + 0x8]
TEST RAX,RAX
JZ 0x0012089f
MOV byte ptr [RAX],0x0
JMP 0x001208a7
LAB_0012089f:
LEA RAX,[RSI + 0x67]
MOV qword ptr [RSI + 0x8],RAX
LAB_001208a7:
MOV RAX,qword ptr [RSI + 0x18]
TEST RAX,RAX
JNZ 0x001208b8
LEA RAX,[RSI + 0x64]
MOV qword ptr [RSI + 0x18],RAX
LAB_001208b8:
MOV byte ptr [RAX],0x0
MOV qword ptr [RSI + 0x48],RCX
MOV RCX,qword ptr [RBX + 0x58]
MOV RAX,qword ptr [RBX + 0x78]
LEA RDX,[RAX + R14*0x1]
ADD RDX,0x20
MOV R15,qword ptr [RDX]
SHL RDI,0x7
LEA RAX,[RCX + RDI*0x1]
MOV ECX,dword ptr [RCX + RDI*0x1 + 0x70]
LEA RCX,[RCX + RCX*0x2]
LEA R8,[0x148fd0]
MOV RDI,RSI
MOV RSI,RAX
CALL qword ptr [R8 + RCX*0x8]
MOV RAX,qword ptr [RBX + 0x78]
MOV qword ptr [RAX + R14*0x1 + 0x20],R15
XOR EAX,EAX
JMP 0x0012083d
|
int8 mysql_stmt_fetch_column(long param_1,long *param_2,uint param_3,long param_4)
{
int8 uVar1;
int8 *puVar2;
int1 *puVar3;
long lVar4;
long lVar5;
if (((*(uint *)(param_1 + 0x50) < 5) || (*(uint *)(param_1 + 0x50) == 6)) ||
(*(uint *)(param_1 + 0x60) <= param_3)) {
*(int4 *)(param_1 + 0x108) = 0x803;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s__00148c08,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar1 = 1;
}
else {
lVar5 = (ulong)param_3 * 0x70;
if (*(long *)(*(long *)(param_1 + 0x78) + 0x20 + lVar5) == 0) {
uVar1 = 0;
if ((int1 *)param_2[1] != (int1 *)0x0) {
*(int1 *)param_2[1] = 1;
}
}
else {
puVar2 = (int8 *)(*(long *)(param_1 + 0x78) + lVar5);
if ((int8 *)*param_2 == (int8 *)0x0) {
*param_2 = (long)(puVar2 + 10);
}
else {
*(int8 *)*param_2 = *(int8 *)*puVar2;
}
if ((int1 *)param_2[1] == (int1 *)0x0) {
param_2[1] = (long)param_2 + 0x67;
}
else {
*(int1 *)param_2[1] = 0;
}
puVar3 = (int1 *)param_2[3];
if (puVar3 == (int1 *)0x0) {
puVar3 = (int1 *)((long)param_2 + 100);
param_2[3] = (long)puVar3;
}
*puVar3 = 0;
param_2[9] = param_4;
uVar1 = *(int8 *)(*(long *)(param_1 + 0x78) + lVar5 + 0x20);
lVar4 = (ulong)param_3 * 0x80;
(*(code *)(&mysql_ps_fetch_functions)
[(ulong)*(uint *)(*(long *)(param_1 + 0x58) + 0x70 + lVar4) * 3])
(param_2,*(long *)(param_1 + 0x58) + lVar4);
*(int8 *)(*(long *)(param_1 + 0x78) + 0x20 + lVar5) = uVar1;
uVar1 = 0;
}
}
return uVar1;
}
|
|
5,646 | ma_unique_comp | eloqsql/storage/maria/ma_unique.c | my_bool _ma_unique_comp(MARIA_UNIQUEDEF *def, const uchar *a, const uchar *b,
my_bool null_are_equal)
{
const uchar *pos_a, *pos_b, *end;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
{
enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type;
uint a_length, b_length;
a_length= b_length= keyseg->length;
/* If part is NULL it's regarded as different */
if (keyseg->null_bit)
{
uint tmp;
if ((tmp=(a[keyseg->null_pos] & keyseg->null_bit)) !=
(uint) (b[keyseg->null_pos] & keyseg->null_bit))
return 1;
if (tmp)
{
if (!null_are_equal)
return 1;
continue;
}
}
pos_a= a+keyseg->start;
pos_b= b+keyseg->start;
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= keyseg->bit_start;
if (pack_length == 1)
{
a_length= (uint) *pos_a++;
b_length= (uint) *pos_b++;
}
else
{
a_length= uint2korr(pos_a);
b_length= uint2korr(pos_b);
pos_a+= 2; /* Skip VARCHAR length */
pos_b+= 2;
}
set_if_smaller(a_length, keyseg->length); /* Safety */
set_if_smaller(b_length, keyseg->length); /* safety */
}
else if (keyseg->flag & HA_BLOB_PART)
{
/* Only compare 'length' characters if length != 0 */
a_length= _ma_calc_blob_length(keyseg->bit_start,pos_a);
b_length= _ma_calc_blob_length(keyseg->bit_start,pos_b);
/* Check that a and b are of equal length */
if (keyseg->length)
{
/*
This is used in some cases when we are not interested in comparing
the whole length of the blob.
*/
set_if_smaller(a_length, keyseg->length);
set_if_smaller(b_length, keyseg->length);
}
memcpy((void*) &pos_a, pos_a+keyseg->bit_start, sizeof(char*));
memcpy((void*) &pos_b, pos_b+keyseg->bit_start, sizeof(char*));
}
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
type == HA_KEYTYPE_VARTEXT2)
{
if (ha_compare_text(keyseg->charset, pos_a, a_length,
pos_b, b_length, 0))
return 1;
}
else
{
if (a_length != b_length)
return 1;
end= pos_a+a_length;
while (pos_a != end)
{
if (*pos_a++ != *pos_b++)
return 1;
}
}
}
return 0;
} | O0 | c | ma_unique_comp:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x4309b
movq -0x48(%rbp), %rax
movzbl 0x18(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x54(%rbp)
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rax
cmpb $0x0, 0x19(%rax)
je 0x42e58
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x48(%rbp), %rcx
movzbl 0x19(%rcx), %ecx
andl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0x20(%rbp), %rcx
movq -0x48(%rbp), %rdx
movl 0xc(%rdx), %edx
movzbl (%rcx,%rdx), %ecx
movq -0x48(%rbp), %rdx
movzbl 0x19(%rdx), %edx
andl %edx, %ecx
cmpl %ecx, %eax
je 0x42e3c
movb $0x1, -0x1(%rbp)
jmp 0x4309f
cmpl $0x0, -0x58(%rbp)
je 0x42e56
cmpb $0x0, -0x21(%rbp)
jne 0x42e51
movb $0x1, -0x1(%rbp)
jmp 0x4309f
jmp 0x4308a
jmp 0x42e58
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
movl 0x8(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x48(%rbp), %rcx
movl 0x8(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x48(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x42f3a
movq -0x48(%rbp), %rax
movzbl 0x1a(%rax), %eax
movl %eax, -0x5c(%rbp)
cmpl $0x1, -0x5c(%rbp)
jne 0x42ecd
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movzbl (%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0x42ef9
movq -0x30(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
jmp 0x42efb
movl -0x50(%rbp), %eax
movq -0x48(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
cmpl %ecx, %eax
jbe 0x42f15
movq -0x48(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x50(%rbp)
jmp 0x42f17
jmp 0x42f19
movl -0x54(%rbp), %eax
movq -0x48(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
cmpl %ecx, %eax
jbe 0x42f33
movq -0x48(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0x42f35
jmp 0x42fef
movq -0x48(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x42fed
movq -0x48(%rbp), %rax
movzbl 0x1a(%rax), %edi
movq -0x30(%rbp), %rsi
callq 0x3c190
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movzbl 0x1a(%rax), %edi
movq -0x38(%rbp), %rsi
callq 0x3c190
movl %eax, -0x54(%rbp)
movq -0x48(%rbp), %rax
cmpw $0x0, 0x14(%rax)
je 0x42fbf
jmp 0x42f83
movl -0x50(%rbp), %eax
movq -0x48(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
cmpl %ecx, %eax
jbe 0x42f9d
movq -0x48(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x50(%rbp)
jmp 0x42f9f
jmp 0x42fa1
movl -0x54(%rbp), %eax
movq -0x48(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
cmpl %ecx, %eax
jbe 0x42fbb
movq -0x48(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0x42fbd
jmp 0x42fbf
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl 0x1a(%rcx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl 0x1a(%rcx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x38(%rbp)
jmp 0x42fef
cmpl $0x1, -0x4c(%rbp)
je 0x43001
cmpl $0xf, -0x4c(%rbp)
je 0x43001
cmpl $0x11, -0x4c(%rbp)
jne 0x43030
movq -0x48(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
movl -0x50(%rbp), %eax
movl %eax, %edx
movq -0x38(%rbp), %rcx
movl -0x54(%rbp), %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0xf4fa0
cmpl $0x0, %eax
je 0x4302e
movb $0x1, -0x1(%rbp)
jmp 0x4309f
jmp 0x43088
movl -0x50(%rbp), %eax
cmpl -0x54(%rbp), %eax
je 0x4303e
movb $0x1, -0x1(%rbp)
jmp 0x4309f
movq -0x30(%rbp), %rax
movl -0x50(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x43086
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movzbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x43084
movb $0x1, -0x1(%rbp)
jmp 0x4309f
jmp 0x4304c
jmp 0x43088
jmp 0x4308a
movq -0x48(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x48(%rbp)
jmp 0x42dc5
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ma_unique_comp:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_21], al
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_48], rax
loc_42DC5:
mov rax, [rbp+var_48]
mov rcx, [rbp+var_10]
cmp rax, [rcx+10h]
jnb loc_4309B
mov rax, [rbp+var_48]
movzx eax, byte ptr [rax+18h]
mov [rbp+var_4C], eax
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+14h]
mov [rbp+var_54], eax
mov [rbp+var_50], eax
mov rax, [rbp+var_48]
cmp byte ptr [rax+19h], 0
jz short loc_42E58
mov rax, [rbp+var_18]
mov rcx, [rbp+var_48]
mov ecx, [rcx+0Ch]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx+19h]
and eax, ecx
mov [rbp+var_58], eax
mov rcx, [rbp+var_20]
mov rdx, [rbp+var_48]
mov edx, [rdx+0Ch]
movzx ecx, byte ptr [rcx+rdx]
mov rdx, [rbp+var_48]
movzx edx, byte ptr [rdx+19h]
and ecx, edx
cmp eax, ecx
jz short loc_42E3C
mov [rbp+var_1], 1
jmp loc_4309F
loc_42E3C:
cmp [rbp+var_58], 0
jz short loc_42E56
cmp [rbp+var_21], 0
jnz short loc_42E51
mov [rbp+var_1], 1
jmp loc_4309F
loc_42E51:
jmp loc_4308A
loc_42E56:
jmp short $+2
loc_42E58:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_48]
mov ecx, [rcx+8]
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_48]
mov ecx, [rcx+8]
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+12h]
and eax, 8
cmp eax, 0
jz loc_42F3A
mov rax, [rbp+var_48]
movzx eax, byte ptr [rax+1Ah]
mov [rbp+var_5C], eax
cmp [rbp+var_5C], 1
jnz short loc_42ECD
mov rax, [rbp+var_30]
mov rcx, rax
add rcx, 1
mov [rbp+var_30], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_50], eax
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 1
mov [rbp+var_38], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_54], eax
jmp short loc_42EF9
loc_42ECD:
mov rax, [rbp+var_30]
movzx eax, word ptr [rax]
mov [rbp+var_50], eax
mov rax, [rbp+var_38]
movzx eax, word ptr [rax]
mov [rbp+var_54], eax
mov rax, [rbp+var_30]
add rax, 2
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
loc_42EF9:
jmp short $+2
loc_42EFB:
mov eax, [rbp+var_50]
mov rcx, [rbp+var_48]
movzx ecx, word ptr [rcx+14h]
cmp eax, ecx
jbe short loc_42F15
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+14h]
mov [rbp+var_50], eax
loc_42F15:
jmp short $+2
loc_42F17:
jmp short $+2
loc_42F19:
mov eax, [rbp+var_54]
mov rcx, [rbp+var_48]
movzx ecx, word ptr [rcx+14h]
cmp eax, ecx
jbe short loc_42F33
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+14h]
mov [rbp+var_54], eax
loc_42F33:
jmp short $+2
loc_42F35:
jmp loc_42FEF
loc_42F3A:
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+12h]
and eax, 20h
cmp eax, 0
jz loc_42FED
mov rax, [rbp+var_48]
movzx edi, byte ptr [rax+1Ah]
mov rsi, [rbp+var_30]
call _ma_calc_blob_length
mov [rbp+var_50], eax
mov rax, [rbp+var_48]
movzx edi, byte ptr [rax+1Ah]
mov rsi, [rbp+var_38]
call _ma_calc_blob_length
mov [rbp+var_54], eax
mov rax, [rbp+var_48]
cmp word ptr [rax+14h], 0
jz short loc_42FBF
jmp short $+2
loc_42F83:
mov eax, [rbp+var_50]
mov rcx, [rbp+var_48]
movzx ecx, word ptr [rcx+14h]
cmp eax, ecx
jbe short loc_42F9D
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+14h]
mov [rbp+var_50], eax
loc_42F9D:
jmp short $+2
loc_42F9F:
jmp short $+2
loc_42FA1:
mov eax, [rbp+var_54]
mov rcx, [rbp+var_48]
movzx ecx, word ptr [rcx+14h]
cmp eax, ecx
jbe short loc_42FBB
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+14h]
mov [rbp+var_54], eax
loc_42FBB:
jmp short $+2
loc_42FBD:
jmp short $+2
loc_42FBF:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx+1Ah]
movsxd rcx, ecx
mov rax, [rax+rcx]
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx+1Ah]
movsxd rcx, ecx
mov rax, [rax+rcx]
mov [rbp+var_38], rax
loc_42FED:
jmp short $+2
loc_42FEF:
cmp [rbp+var_4C], 1
jz short loc_43001
cmp [rbp+var_4C], 0Fh
jz short loc_43001
cmp [rbp+var_4C], 11h
jnz short loc_43030
loc_43001:
mov rax, [rbp+var_48]
mov rdi, [rax]
mov rsi, [rbp+var_30]
mov eax, [rbp+var_50]
mov edx, eax
mov rcx, [rbp+var_38]
mov eax, [rbp+var_54]
mov r8d, eax
xor r9d, r9d
call ha_compare_text
cmp eax, 0
jz short loc_4302E
mov [rbp+var_1], 1
jmp short loc_4309F
loc_4302E:
jmp short loc_43088
loc_43030:
mov eax, [rbp+var_50]
cmp eax, [rbp+var_54]
jz short loc_4303E
mov [rbp+var_1], 1
jmp short loc_4309F
loc_4303E:
mov rax, [rbp+var_30]
mov ecx, [rbp+var_50]
add rax, rcx
mov [rbp+var_40], rax
loc_4304C:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_40]
jz short loc_43086
mov rax, [rbp+var_30]
mov rcx, rax
add rcx, 1
mov [rbp+var_30], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_38]
mov rdx, rcx
add rdx, 1
mov [rbp+var_38], rdx
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_43084
mov [rbp+var_1], 1
jmp short loc_4309F
loc_43084:
jmp short loc_4304C
loc_43086:
jmp short $+2
loc_43088:
jmp short $+2
loc_4308A:
mov rax, [rbp+var_48]
add rax, 20h ; ' '
mov [rbp+var_48], rax
jmp loc_42DC5
loc_4309B:
mov [rbp+var_1], 0
loc_4309F:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| char ma_unique_comp(long long a1, long long a2, long long a3, char a4)
{
unsigned __int8 *v4; // rax
unsigned __int8 *v5; // rcx
unsigned int v7; // [rsp+Ch] [rbp-54h]
unsigned int v8; // [rsp+10h] [rbp-50h]
int v9; // [rsp+14h] [rbp-4Ch]
unsigned long long i; // [rsp+18h] [rbp-48h]
unsigned __int8 *v11; // [rsp+20h] [rbp-40h]
unsigned __int8 *v12; // [rsp+28h] [rbp-38h]
unsigned __int8 *v13; // [rsp+30h] [rbp-30h]
for ( i = *(_QWORD *)(a1 + 8); i < *(_QWORD *)(a1 + 16); i += 32LL )
{
v9 = *(unsigned __int8 *)(i + 24);
v7 = *(unsigned __int16 *)(i + 20);
v8 = v7;
if ( !*(_BYTE *)(i + 25) )
goto LABEL_10;
if ( (unsigned __int8)(*(_BYTE *)(i + 25) & *(_BYTE *)(a2 + *(unsigned int *)(i + 12))) != (unsigned __int8)(*(_BYTE *)(i + 25) & *(_BYTE *)(a3 + *(unsigned int *)(i + 12))) )
return 1;
if ( (*(_BYTE *)(i + 25) & *(_BYTE *)(a2 + *(unsigned int *)(i + 12))) != 0 )
{
if ( !a4 )
return 1;
}
else
{
LABEL_10:
v13 = (unsigned __int8 *)(*(unsigned int *)(i + 8) + a2);
v12 = (unsigned __int8 *)(*(unsigned int *)(i + 8) + a3);
if ( (*(_WORD *)(i + 18) & 8) != 0 )
{
if ( *(_BYTE *)(i + 26) == 1 )
{
++v13;
v8 = *(unsigned __int8 *)(*(unsigned int *)(i + 8) + a2);
++v12;
v7 = *(unsigned __int8 *)(*(unsigned int *)(i + 8) + a3);
}
else
{
v8 = *(unsigned __int16 *)v13;
v7 = *(unsigned __int16 *)v12;
v13 += 2;
v12 += 2;
}
if ( v8 > *(unsigned __int16 *)(i + 20) )
v8 = *(unsigned __int16 *)(i + 20);
if ( v7 > *(unsigned __int16 *)(i + 20) )
v7 = *(unsigned __int16 *)(i + 20);
}
else if ( (*(_WORD *)(i + 18) & 0x20) != 0 )
{
v8 = ma_calc_blob_length(*(unsigned __int8 *)(i + 26), v13);
v7 = ma_calc_blob_length(*(unsigned __int8 *)(i + 26), v12);
if ( *(_WORD *)(i + 20) )
{
if ( v8 > *(unsigned __int16 *)(i + 20) )
v8 = *(unsigned __int16 *)(i + 20);
if ( v7 > *(unsigned __int16 *)(i + 20) )
v7 = *(unsigned __int16 *)(i + 20);
}
v13 = *(unsigned __int8 **)&v13[*(unsigned __int8 *)(i + 26)];
v12 = *(unsigned __int8 **)&v12[*(unsigned __int8 *)(i + 26)];
}
if ( v9 == 1 || v9 == 15 || v9 == 17 )
{
if ( (unsigned int)ha_compare_text(*(_QWORD *)i, v13, v8, v12, v7, 0LL) )
return 1;
}
else
{
if ( v8 != v7 )
return 1;
v11 = &v13[v8];
while ( v13 != v11 )
{
v4 = v13++;
v5 = v12++;
if ( *v4 != *v5 )
return 1;
}
}
}
}
return 0;
}
| _ma_unique_comp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,CL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RBP + -0x21],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x48],RAX
LAB_00142dc5:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x0014309b
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,byte ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x54],EAX
MOV dword ptr [RBP + -0x50],EAX
MOV RAX,qword ptr [RBP + -0x48]
CMP byte ptr [RAX + 0x19],0x0
JZ 0x00142e58
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RCX + 0xc]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX + 0x19]
AND EAX,ECX
MOV dword ptr [RBP + -0x58],EAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RDX + 0xc]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
MOV RDX,qword ptr [RBP + -0x48]
MOVZX EDX,byte ptr [RDX + 0x19]
AND ECX,EDX
CMP EAX,ECX
JZ 0x00142e3c
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014309f
LAB_00142e3c:
CMP dword ptr [RBP + -0x58],0x0
JZ 0x00142e56
CMP byte ptr [RBP + -0x21],0x0
JNZ 0x00142e51
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014309f
LAB_00142e51:
JMP 0x0014308a
LAB_00142e56:
JMP 0x00142e58
LAB_00142e58:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RCX + 0x8]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RCX + 0x8]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00142f3a
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,byte ptr [RAX + 0x1a]
MOV dword ptr [RBP + -0x5c],EAX
CMP dword ptr [RBP + -0x5c],0x1
JNZ 0x00142ecd
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x30],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x50],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x38],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x00142ef9
LAB_00142ecd:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x50],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
LAB_00142ef9:
JMP 0x00142efb
LAB_00142efb:
MOV EAX,dword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,word ptr [RCX + 0x14]
CMP EAX,ECX
JBE 0x00142f15
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x50],EAX
LAB_00142f15:
JMP 0x00142f17
LAB_00142f17:
JMP 0x00142f19
LAB_00142f19:
MOV EAX,dword ptr [RBP + -0x54]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,word ptr [RCX + 0x14]
CMP EAX,ECX
JBE 0x00142f33
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x54],EAX
LAB_00142f33:
JMP 0x00142f35
LAB_00142f35:
JMP 0x00142fef
LAB_00142f3a:
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x20
CMP EAX,0x0
JZ 0x00142fed
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EDI,byte ptr [RAX + 0x1a]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x0013c190
MOV dword ptr [RBP + -0x50],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EDI,byte ptr [RAX + 0x1a]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x0013c190
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x48]
CMP word ptr [RAX + 0x14],0x0
JZ 0x00142fbf
JMP 0x00142f83
LAB_00142f83:
MOV EAX,dword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,word ptr [RCX + 0x14]
CMP EAX,ECX
JBE 0x00142f9d
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x50],EAX
LAB_00142f9d:
JMP 0x00142f9f
LAB_00142f9f:
JMP 0x00142fa1
LAB_00142fa1:
MOV EAX,dword ptr [RBP + -0x54]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,word ptr [RCX + 0x14]
CMP EAX,ECX
JBE 0x00142fbb
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x54],EAX
LAB_00142fbb:
JMP 0x00142fbd
LAB_00142fbd:
JMP 0x00142fbf
LAB_00142fbf:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX + 0x1a]
MOVSXD RCX,ECX
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX + 0x1a]
MOVSXD RCX,ECX
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x38],RAX
LAB_00142fed:
JMP 0x00142fef
LAB_00142fef:
CMP dword ptr [RBP + -0x4c],0x1
JZ 0x00143001
CMP dword ptr [RBP + -0x4c],0xf
JZ 0x00143001
CMP dword ptr [RBP + -0x4c],0x11
JNZ 0x00143030
LAB_00143001:
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x50]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RBP + -0x54]
MOV R8D,EAX
XOR R9D,R9D
CALL 0x001f4fa0
CMP EAX,0x0
JZ 0x0014302e
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014309f
LAB_0014302e:
JMP 0x00143088
LAB_00143030:
MOV EAX,dword ptr [RBP + -0x50]
CMP EAX,dword ptr [RBP + -0x54]
JZ 0x0014303e
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014309f
LAB_0014303e:
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x50]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_0014304c:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x40]
JZ 0x00143086
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x30],RCX
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x38],RDX
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x00143084
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014309f
LAB_00143084:
JMP 0x0014304c
LAB_00143086:
JMP 0x00143088
LAB_00143088:
JMP 0x0014308a
LAB_0014308a:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00142dc5
LAB_0014309b:
MOV byte ptr [RBP + -0x1],0x0
LAB_0014309f:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int1 _ma_unique_comp(long param_1,long param_2,long param_3,char param_4)
{
char cVar1;
byte bVar2;
ushort uVar3;
ushort uVar4;
int iVar5;
ushort *puVar6;
uint local_5c;
uint local_58;
int8 *local_50;
ushort *local_40;
ushort *local_38;
local_50 = *(int8 **)(param_1 + 8);
do {
if (*(int8 **)(param_1 + 0x10) <= local_50) {
return 0;
}
cVar1 = *(char *)(local_50 + 3);
local_5c = (uint)*(ushort *)((long)local_50 + 0x14);
if (*(char *)((long)local_50 + 0x19) == '\0') {
LAB_00142e58:
local_38 = (ushort *)(param_2 + (ulong)*(uint *)(local_50 + 1));
local_40 = (ushort *)(param_3 + (ulong)*(uint *)(local_50 + 1));
if ((*(ushort *)((long)local_50 + 0x12) & 8) == 0) {
local_58 = local_5c;
if ((*(ushort *)((long)local_50 + 0x12) & 0x20) != 0) {
local_58 = _ma_calc_blob_length(*(int1 *)((long)local_50 + 0x1a),local_38);
local_5c = _ma_calc_blob_length(*(int1 *)((long)local_50 + 0x1a),local_40);
if (*(short *)((long)local_50 + 0x14) != 0) {
if (*(ushort *)((long)local_50 + 0x14) < local_58) {
local_58 = (uint)*(ushort *)((long)local_50 + 0x14);
}
if (*(ushort *)((long)local_50 + 0x14) < local_5c) {
local_5c = (uint)*(ushort *)((long)local_50 + 0x14);
}
}
local_38 = *(ushort **)
((long)local_38 + (long)(int)(uint)*(byte *)((long)local_50 + 0x1a));
local_40 = *(ushort **)
((long)local_40 + (long)(int)(uint)*(byte *)((long)local_50 + 0x1a));
}
}
else {
if (*(char *)((long)local_50 + 0x1a) == '\x01') {
local_58 = (uint)(byte)*local_38;
local_5c = (uint)(byte)*local_40;
local_40 = (ushort *)((long)local_40 + 1);
local_38 = (ushort *)((long)local_38 + 1);
}
else {
local_58 = (uint)*local_38;
local_5c = (uint)*local_40;
local_38 = local_38 + 1;
local_40 = local_40 + 1;
}
if (*(ushort *)((long)local_50 + 0x14) < local_58) {
local_58 = (uint)*(ushort *)((long)local_50 + 0x14);
}
if (*(ushort *)((long)local_50 + 0x14) < local_5c) {
local_5c = (uint)*(ushort *)((long)local_50 + 0x14);
}
}
if (((cVar1 == '\x01') || (cVar1 == '\x0f')) || (cVar1 == '\x11')) {
iVar5 = ha_compare_text(*local_50,local_38,local_58,local_40,local_5c,0);
if (iVar5 != 0) {
return 1;
}
}
else {
if (local_58 != local_5c) {
return 1;
}
puVar6 = (ushort *)((long)local_38 + (ulong)local_58);
while (local_38 != puVar6) {
uVar3 = *local_38;
uVar4 = *local_40;
local_40 = (ushort *)((long)local_40 + 1);
local_38 = (ushort *)((long)local_38 + 1);
if ((byte)uVar3 != (byte)uVar4) {
return 1;
}
}
}
}
else {
bVar2 = *(byte *)(param_2 + (ulong)*(uint *)((long)local_50 + 0xc)) &
*(byte *)((long)local_50 + 0x19);
if (bVar2 != (*(byte *)(param_3 + (ulong)*(uint *)((long)local_50 + 0xc)) &
*(byte *)((long)local_50 + 0x19))) {
return 1;
}
if (bVar2 == 0) goto LAB_00142e58;
if (param_4 == '\0') {
return 1;
}
}
local_50 = local_50 + 4;
} while( true );
}
|
|
5,647 | read_to_buffer | eloqsql/storage/myisam/sort.c | static my_off_t read_to_buffer(IO_CACHE *fromfile, BUFFPEK *buffpek,
uint sort_length)
{
register ha_keys count;
size_t length;
if ((count= (ha_keys) MY_MIN((ha_rows) buffpek->max_keys,
(ha_rows) buffpek->count)))
{
if (my_b_pread(fromfile, (uchar*) buffpek->base,
(length= (size_t) (sort_length * count)),
buffpek->file_pos))
return(HA_OFFSET_ERROR);
buffpek->key=buffpek->base;
buffpek->file_pos+= length; /* New filepos */
buffpek->count-= count;
buffpek->mem_count= count;
}
return (((my_off_t) count) * sort_length);
} | O3 | c | read_to_buffer:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rsi), %r15
movq 0x28(%rsi), %rax
cmpq %r15, %rax
cmovbq %rax, %r15
testq %r15, %r15
je 0x59878
movq %rsi, %rbx
movq (%rsi), %rcx
movq 0x8(%rsi), %rsi
movl %edx, %r14d
imulq %r15, %r14
movq %r14, %rdx
callq 0x645d3
movl %eax, %ecx
movq $-0x1, %rax
testl %ecx, %ecx
jne 0x5987a
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
addq %r14, (%rbx)
subq %r15, 0x18(%rbx)
movq %r15, 0x20(%rbx)
movq %r14, %rax
jmp 0x5987a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| read_to_buffer:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r15, [rsi+18h]
mov rax, [rsi+28h]
cmp rax, r15
cmovb r15, rax
test r15, r15
jz short loc_59878
mov rbx, rsi
mov rcx, [rsi]
mov rsi, [rsi+8]
mov r14d, edx
imul r14, r15
mov rdx, r14
call my_b_pread
mov ecx, eax
mov rax, 0FFFFFFFFFFFFFFFFh
test ecx, ecx
jnz short loc_5987A
mov rax, [rbx+8]
mov [rbx+10h], rax
add [rbx], r14
sub [rbx+18h], r15
mov [rbx+20h], r15
mov rax, r14
jmp short loc_5987A
loc_59878:
xor eax, eax
loc_5987A:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long read_to_buffer(long long a1, _QWORD *a2, unsigned int a3)
{
unsigned long long v3; // r15
long long v4; // r14
int v5; // ecx
long long result; // rax
v3 = a2[3];
if ( a2[5] < v3 )
v3 = a2[5];
if ( !v3 )
return 0LL;
v4 = v3 * a3;
v5 = my_b_pread(a1, a2[1], v4, *a2);
result = -1LL;
if ( !v5 )
{
a2[2] = a2[1];
*a2 += v4;
a2[3] -= v3;
a2[4] = v3;
return v4;
}
return result;
}
| read_to_buffer:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15,qword ptr [RSI + 0x18]
MOV RAX,qword ptr [RSI + 0x28]
CMP RAX,R15
CMOVC R15,RAX
TEST R15,R15
JZ 0x00159878
MOV RBX,RSI
MOV RCX,qword ptr [RSI]
MOV RSI,qword ptr [RSI + 0x8]
MOV R14D,EDX
IMUL R14,R15
MOV RDX,R14
CALL 0x001645d3
MOV ECX,EAX
MOV RAX,-0x1
TEST ECX,ECX
JNZ 0x0015987a
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RAX
ADD qword ptr [RBX],R14
SUB qword ptr [RBX + 0x18],R15
MOV qword ptr [RBX + 0x20],R15
MOV RAX,R14
JMP 0x0015987a
LAB_00159878:
XOR EAX,EAX
LAB_0015987a:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
long read_to_buffer(int8 param_1,long *param_2,uint param_3)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
uVar4 = param_2[3];
if ((ulong)param_2[5] < (ulong)param_2[3]) {
uVar4 = param_2[5];
}
if (uVar4 == 0) {
lVar2 = 0;
}
else {
lVar3 = param_3 * uVar4;
iVar1 = my_b_pread(param_1,param_2[1],lVar3,*param_2);
lVar2 = -1;
if (iVar1 == 0) {
param_2[2] = param_2[1];
*param_2 = *param_2 + lVar3;
param_2[3] = param_2[3] - uVar4;
param_2[4] = uVar4;
lVar2 = lVar3;
}
}
return lVar2;
}
|
|
5,648 | write_hook_for_undo_key_delete | eloqsql/storage/maria/ma_key_recover.c | my_bool write_hook_for_undo_key_delete(enum translog_record_type type,
TRN *trn, MARIA_HA *tbl_info,
LSN *lsn, void *hook_arg)
{
struct st_msg_to_write_hook_for_undo_key *msg=
(struct st_msg_to_write_hook_for_undo_key *) hook_arg;
MARIA_SHARE *share= tbl_info->s;
if (msg->auto_increment > 0) /* If auto increment key */
{
/* Restore auto increment if no one has changed it in between */
if (share->last_auto_increment == tbl_info->last_auto_increment &&
tbl_info->last_auto_increment != ~(ulonglong) 0)
share->state.auto_increment= tbl_info->last_auto_increment;
}
return write_hook_for_undo_key(type, trn, tbl_info, lsn, hook_arg);
} | O3 | c | write_hook_for_undo_key_delete:
cmpq $0x0, 0x18(%r8)
je 0x59b36
pushq %rbp
movq %rsp, %rbp
movq (%rdx), %rax
movq 0x610(%rax), %r9
movq 0x3e8(%rdx), %r10
cmpq %r10, %r9
setne %r11b
cmpq $-0x1, %r10
sete %r10b
orb %r11b, %r10b
jne 0x59c14
movq %r9, 0xd8(%rax)
popq %rbp
jmp 0x59b36
| write_hook_for_undo_key_delete:
cmp qword ptr [r8+18h], 0
jz write_hook_for_undo_key
push rbp
mov rbp, rsp
mov rax, [rdx]
mov r9, [rax+610h]
mov r10, [rdx+3E8h]
cmp r9, r10
setnz r11b
cmp r10, 0FFFFFFFFFFFFFFFFh
setz r10b
or r10b, r11b
jnz short loc_59C14
mov [rax+0D8h], r9
loc_59C14:
pop rbp
jmp write_hook_for_undo_key
| long long write_hook_for_undo_key_delete(unsigned int a1, long long a2, long long a3, long long a4, long long a5)
{
long long v6; // r9
if ( *(_QWORD *)(a5 + 24) )
{
v6 = *(_QWORD *)(*(_QWORD *)a3 + 1552LL);
if ( v6 == *(_QWORD *)(a3 + 1000) && *(_QWORD *)(a3 + 1000) != -1LL )
*(_QWORD *)(*(_QWORD *)a3 + 216LL) = v6;
}
return write_hook_for_undo_key(a1, a2, a3, a4, a5);
}
| write_hook_for_undo_key_delete:
CMP qword ptr [R8 + 0x18],0x0
JZ 0x00159b36
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDX]
MOV R9,qword ptr [RAX + 0x610]
MOV R10,qword ptr [RDX + 0x3e8]
CMP R9,R10
SETNZ R11B
CMP R10,-0x1
SETZ R10B
OR R10B,R11B
JNZ 0x00159c14
MOV qword ptr [RAX + 0xd8],R9
LAB_00159c14:
POP RBP
JMP 0x00159b36
|
void write_hook_for_undo_key_delete
(int4 param_1,int8 param_2,long *param_3,int8 param_4,
int8 *param_5)
{
long lVar1;
if (param_5[3] != 0) {
lVar1 = *(long *)(*param_3 + 0x610);
if (param_3[0x7d] != -1 && lVar1 == param_3[0x7d]) {
*(long *)(*param_3 + 0xd8) = lVar1;
}
write_hook_for_undo_key();
return;
}
*(int8 *)*param_5 = param_5[1];
if (*(char *)((long)param_3 + 0x67e) != '\0') {
_ma_unlock_key_del(param_3);
}
write_hook_for_undo(param_1,param_2,param_3,param_4,0);
return;
}
|
|
5,649 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::end_object() | msxemulator/build_O3/_deps/picotool-src/lib/nlohmann_json/single_include/nlohmann/json.hpp | bool end_object()
{
if (ref_stack.back())
{
if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back()))
{
// discard object
*ref_stack.back() = discarded;
}
else
{
ref_stack.back()->set_parents();
}
}
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(!keep_stack.empty());
ref_stack.pop_back();
keep_stack.pop_back();
if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured())
{
// remove discarded value
for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it)
{
if (it->is_discarded())
{
ref_stack.back()->erase(it);
break;
}
}
}
return true;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::end_object():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq -0x8(%rax), %rcx
testq %rcx, %rcx
je 0x683ce
subq 0x8(%rbx), %rax
shrq $0x3, %rax
decl %eax
movl %eax, 0x8(%rsp)
movb $0x1, 0x28(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x6853d
leaq 0x80(%rbx), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq *0x98(%rbx)
testb %al, %al
jne 0x683ce
leaq 0xa8(%rbx), %rsi
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x3af30
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movb (%rax), %cl
movb (%r14), %dl
movb %dl, (%rax)
movb %cl, (%r14)
movq 0x8(%rax), %rcx
movq 0x8(%r14), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x8(%r14)
movq %r14, %rdi
callq 0x5c638
movq 0x10(%rbx), %rcx
leaq -0x8(%rcx), %rax
movq %rax, 0x10(%rbx)
subl $0x1, 0x38(%rbx)
jae 0x683ec
movl $0x3f, 0x38(%rbx)
addq $-0x8, 0x30(%rbx)
cmpq %rax, 0x8(%rbx)
je 0x6852c
movq -0x10(%rcx), %rcx
testq %rcx, %rcx
je 0x6852c
movb (%rcx), %dl
leal -0x1(%rdx), %esi
cmpb $0x1, %sil
ja 0x6852c
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
movq %rcx, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movq %r12, 0x20(%rsp)
movq 0x8(%rcx), %rcx
cmpb $0x1, %dl
jne 0x68442
movq 0x18(%rcx), %rcx
movq %rcx, 0x10(%rsp)
jmp 0x6844a
movq (%rcx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x10(%rsp), %r13
leaq 0x30(%rsp), %rbp
leaq 0x8(%rsp), %r14
leaq 0x28(%rsp), %r15
movq -0x8(%rax), %rax
movq %rax, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbp)
movq %r12, 0x40(%rsp)
movzbl (%rax), %ecx
cmpl $0x2, %ecx
je 0x6848f
cmpl $0x1, %ecx
jne 0x6849e
movq 0x8(%rax), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
jmp 0x684a7
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
jmp 0x684a7
movq $0x1, 0x40(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x707ca
testb %al, %al
jne 0x6852c
movq %r14, %rdi
callq 0x69216
cmpb $0x9, (%rax)
je 0x684fc
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x684e6
cmpl $0x1, %eax
jne 0x684ee
movq 0x10(%rsp), %rdi
callq 0xf320
movq %rax, 0x10(%rsp)
jmp 0x684f3
addq $0x10, 0x18(%rsp)
jmp 0x684f3
incq 0x20(%rsp)
movq 0x10(%rbx), %rax
jmp 0x6845e
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rsi
movq 0x8(%rsp), %rax
leaq 0x58(%rsp), %rdx
movq %rax, (%rdx)
movups (%r13), %xmm0
movups %xmm0, 0x8(%rdx)
movq 0x10(%r13), %rax
movq %rax, 0x18(%rdx)
leaq 0x28(%rsp), %rdi
callq 0x692e8
movb $0x1, %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xf1d0
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov rbx, rdi
mov rax, [rdi+10h]
mov rcx, [rax-8]
test rcx, rcx
jz short loc_683CE
sub rax, [rbx+8]
shr rax, 3
dec eax
mov dword ptr [rsp+0A8h+var_A0], eax
mov byte ptr [rsp+0A8h+var_80], 1
cmp qword ptr [rbx+90h], 0
jz loc_6853D
lea rdi, [rbx+80h]
lea rsi, [rsp+0A8h+var_A0]
lea rdx, [rsp+0A8h+var_80]
call qword ptr [rbx+98h]
test al, al
jnz short loc_683CE
lea rsi, [rbx+0A8h]
lea r14, [rsp+0A8h+var_60]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<std::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<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov cl, [rax]
mov dl, [r14]
mov [rax], dl
mov [r14], cl
mov rcx, [rax+8]
mov rdx, [r14+8]
mov [rax+8], rdx
mov [r14+8], rcx
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::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_683CE:
mov rcx, [rbx+10h]
lea rax, [rcx-8]
mov [rbx+10h], rax
sub dword ptr [rbx+38h], 1
jnb short loc_683EC
mov dword ptr [rbx+38h], 3Fh ; '?'
add qword ptr [rbx+30h], 0FFFFFFFFFFFFFFF8h
loc_683EC:
cmp [rbx+8], rax
jz loc_6852C
mov rcx, [rcx-10h]
test rcx, rcx
jz loc_6852C
mov dl, [rcx]
lea esi, [rdx-1]
cmp sil, 1
ja loc_6852C
mov r12, 8000000000000000h
mov [rsp+0A8h+var_A0], rcx
xorps xmm0, xmm0
movups [rsp+0A8h+var_98], xmm0
mov [rsp+0A8h+var_88], r12
mov rcx, [rcx+8]
cmp dl, 1
jnz short loc_68442
mov rcx, [rcx+18h]
mov qword ptr [rsp+0A8h+var_98], rcx
jmp short loc_6844A
loc_68442:
mov rcx, [rcx]
mov qword ptr [rsp+0A8h+var_98+8], rcx
loc_6844A:
lea r13, [rsp+0A8h+var_98]
lea rbp, [rsp+0A8h+var_78]
lea r14, [rsp+0A8h+var_A0]
lea r15, [rsp+0A8h+var_80]
loc_6845E:
mov rax, [rax-8]
mov [rsp+0A8h+var_80], rax
xorps xmm0, xmm0
movups xmmword ptr [rbp+0], xmm0
mov [rsp+0A8h+var_68], r12
movzx ecx, byte ptr [rax]
cmp ecx, 2
jz short loc_6848F
cmp ecx, 1
jnz short loc_6849E
mov rax, [rax+8]
add rax, 8
mov [rsp+0A8h+var_78], rax
jmp short loc_684A7
loc_6848F:
mov rax, [rax+8]
mov rax, [rax+8]
mov [rsp+0A8h+var_70], rax
jmp short loc_684A7
loc_6849E:
mov [rsp+0A8h+var_68], 1
loc_684A7:
mov rdi, r14
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
test al, al
jnz short loc_6852C
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::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)
cmp byte ptr [rax], 9
jz short loc_684FC
mov rax, [rsp+0A8h+var_A0]
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_684E6
cmp eax, 1
jnz short loc_684EE
mov rdi, qword ptr [rsp+0A8h+var_98]
call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *)
mov qword ptr [rsp+0A8h+var_98], rax
jmp short loc_684F3
loc_684E6:
add qword ptr [rsp+0A8h+var_98+8], 10h
jmp short loc_684F3
loc_684EE:
inc [rsp+0A8h+var_88]
loc_684F3:
mov rax, [rbx+10h]
jmp loc_6845E
loc_684FC:
mov rax, [rbx+10h]
mov rsi, [rax-8]
mov rax, [rsp+0A8h+var_A0]
lea rdx, [rsp+0A8h+var_50]
mov [rdx], rax
movups xmm0, xmmword ptr [r13+0]
movups xmmword ptr [rdx+8], xmm0
mov rax, [r13+10h]
mov [rdx+18h], rax
lea rdi, [rsp+0A8h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
loc_6852C:
mov al, 1
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6853D:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::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_object(
long long a1)
{
long long v1; // rax
char *v2; // rax
char v3; // cl
long long v4; // rcx
long long v5; // rcx
long long v6; // rax
unsigned __int8 *v8; // rcx
unsigned __int8 v9; // dl
_QWORD *v10; // rcx
unsigned __int8 *v11; // rax
int v12; // ecx
int v13; // eax
long long v14; // rsi
unsigned __int8 *v16; // [rsp+8h] [rbp-A0h] BYREF
__int128 v17; // [rsp+10h] [rbp-98h]
unsigned long long v18; // [rsp+20h] [rbp-88h]
unsigned __int8 *v19; // [rsp+28h] [rbp-80h] BYREF
__int128 v20; // [rsp+30h] [rbp-78h]
long long v21; // [rsp+40h] [rbp-68h]
_BYTE v22[8]; // [rsp+48h] [rbp-60h] BYREF
long long v23; // [rsp+50h] [rbp-58h]
unsigned __int8 *v24; // [rsp+58h] [rbp-50h]
__int128 v25; // [rsp+60h] [rbp-48h]
unsigned long long v26; // [rsp+70h] [rbp-38h]
v1 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v1 - 8) )
{
LODWORD(v16) = ((unsigned long long)(v1 - *(_QWORD *)(a1 + 8)) >> 3) - 1;
LOBYTE(v19) = 1;
if ( !*(_QWORD *)(a1 + 144) )
std::__throw_bad_function_call();
if ( !(*(unsigned __int8 ( **)(long long, unsigned __int8 **, unsigned __int8 **))(a1 + 152))(
a1 + 128,
&v16,
&v19) )
{
nlohmann::json_abi_v3_11_3::basic_json<std::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)v22,
(unsigned __int8 *)(a1 + 168));
v2 = *(char **)(*(_QWORD *)(a1 + 16) - 8LL);
v3 = *v2;
*v2 = v22[0];
v22[0] = v3;
v4 = *((_QWORD *)v2 + 1);
*((_QWORD *)v2 + 1) = v23;
v23 = v4;
nlohmann::json_abi_v3_11_3::basic_json<std::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(v22);
}
}
v5 = *(_QWORD *)(a1 + 16);
v6 = v5 - 8;
*(_QWORD *)(a1 + 16) = v5 - 8;
if ( (*(_DWORD *)(a1 + 56))-- == 0 )
{
*(_DWORD *)(a1 + 56) = 63;
*(_QWORD *)(a1 + 48) -= 8LL;
}
if ( *(_QWORD *)(a1 + 8) != v6 )
{
v8 = *(unsigned __int8 **)(v5 - 16);
if ( v8 )
{
v9 = *v8;
if ( (unsigned __int8)(*v8 - 1) <= 1u )
{
v16 = v8;
v17 = 0LL;
v18 = 0x8000000000000000LL;
v10 = (_QWORD *)*((_QWORD *)v8 + 1);
if ( v9 == 1 )
*(_QWORD *)&v17 = v10[3];
else
*((_QWORD *)&v17 + 1) = *v10;
while ( 1 )
{
v11 = *(unsigned __int8 **)(v6 - 8);
v19 = v11;
v20 = 0LL;
v21 = 0x8000000000000000LL;
v12 = *v11;
if ( v12 == 2 )
{
*((_QWORD *)&v20 + 1) = *(_QWORD *)(*((_QWORD *)v11 + 1) + 8LL);
}
else if ( v12 == 1 )
{
*(_QWORD *)&v20 = *((_QWORD *)v11 + 1) + 8LL;
}
else
{
v21 = 1LL;
}
if ( (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_(
&v16,
&v19) )
break;
if ( *(_BYTE *)nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::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->(&v16) == 9 )
{
v14 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL);
v24 = v16;
v25 = v17;
v26 = v18;
ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_(
&v19,
v14);
return 1;
}
v13 = *v16;
if ( v13 == 2 )
{
*((_QWORD *)&v17 + 1) += 16LL;
}
else if ( v13 == 1 )
{
*(_QWORD *)&v17 = std::_Rb_tree_increment(v17);
}
else
{
++v18;
}
v6 = *(_QWORD *)(a1 + 16);
}
}
}
}
return 1;
}
| end_object:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
TEST RCX,RCX
JZ 0x001683ce
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
DEC EAX
MOV dword ptr [RSP + 0x8],EAX
MOV byte ptr [RSP + 0x28],0x1
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0016853d
LEA RDI,[RBX + 0x80]
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JNZ 0x001683ce
LEA RSI,[RBX + 0xa8]
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x0013af30
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV CL,byte ptr [RAX]
MOV DL,byte ptr [R14]
MOV byte ptr [RAX],DL
MOV byte ptr [R14],CL
MOV RCX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [R14 + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [R14 + 0x8],RCX
MOV RDI,R14
CALL 0x0015c638
LAB_001683ce:
MOV RCX,qword ptr [RBX + 0x10]
LEA RAX,[RCX + -0x8]
MOV qword ptr [RBX + 0x10],RAX
SUB dword ptr [RBX + 0x38],0x1
JNC 0x001683ec
MOV dword ptr [RBX + 0x38],0x3f
ADD qword ptr [RBX + 0x30],-0x8
LAB_001683ec:
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0016852c
MOV RCX,qword ptr [RCX + -0x10]
TEST RCX,RCX
JZ 0x0016852c
MOV DL,byte ptr [RCX]
LEA ESI,[RDX + -0x1]
CMP SIL,0x1
JA 0x0016852c
MOV R12,-0x8000000000000000
MOV qword ptr [RSP + 0x8],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],R12
MOV RCX,qword ptr [RCX + 0x8]
CMP DL,0x1
JNZ 0x00168442
MOV RCX,qword ptr [RCX + 0x18]
MOV qword ptr [RSP + 0x10],RCX
JMP 0x0016844a
LAB_00168442:
MOV RCX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RCX
LAB_0016844a:
LEA R13,[RSP + 0x10]
LEA RBP,[RSP + 0x30]
LEA R14,[RSP + 0x8]
LEA R15,[RSP + 0x28]
LAB_0016845e:
MOV RAX,qword ptr [RAX + -0x8]
MOV qword ptr [RSP + 0x28],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP],XMM0
MOV qword ptr [RSP + 0x40],R12
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x2
JZ 0x0016848f
CMP ECX,0x1
JNZ 0x0016849e
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,0x8
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001684a7
LAB_0016848f:
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001684a7
LAB_0016849e:
MOV qword ptr [RSP + 0x40],0x1
LAB_001684a7:
MOV RDI,R14
MOV RSI,R15
CALL 0x001707ca
TEST AL,AL
JNZ 0x0016852c
MOV RDI,R14
CALL 0x00169216
CMP byte ptr [RAX],0x9
JZ 0x001684fc
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x001684e6
CMP EAX,0x1
JNZ 0x001684ee
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0010f320
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001684f3
LAB_001684e6:
ADD qword ptr [RSP + 0x18],0x10
JMP 0x001684f3
LAB_001684ee:
INC qword ptr [RSP + 0x20]
LAB_001684f3:
MOV RAX,qword ptr [RBX + 0x10]
JMP 0x0016845e
LAB_001684fc:
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x58]
MOV qword ptr [RDX],RAX
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS xmmword ptr [RDX + 0x8],XMM0
MOV RAX,qword ptr [R13 + 0x10]
MOV qword ptr [RDX + 0x18],RAX
LEA RDI,[RSP + 0x28]
CALL 0x001692e8
LAB_0016852c:
MOV AL,0x1
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016853d:
CALL 0x0010f1d0
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::end_object() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::end_object(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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)
{
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*pjVar1;
int iVar2;
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar3;
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*pbVar4;
int8 uVar5;
long lVar6;
char cVar7;
long lVar8;
char *pcVar9;
char *local_a0;
int8 local_98;
int8 uStack_90;
long local_88;
char *local_80;
long local_78;
int8 uStack_70;
int8 local_68;
basic_json<std::map,std::vector,std::__cxx11::string,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_60 [8];
int8 local_58;
char *local_50;
int4 local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
long local_38;
if (*(long *)(*(long *)(this + 0x10) + -8) != 0) {
local_a0 = (char *)CONCAT44(local_a0._4_4_,
(int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) +
-1);
local_80 = (char *)CONCAT71(local_80._1_7_,1);
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
cVar7 = (**(code **)(this + 0x98))(this + 0x80,&local_a0,&local_80);
if (cVar7 == '\0') {
basic_json<std::map,std::vector,std::__cxx11::string,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_60,(basic_json *)(this + 0xa8));
pbVar4 = *(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8);
bVar3 = *pbVar4;
*pbVar4 = local_60[0];
uVar5 = *(int8 *)(pbVar4 + 8);
*(int8 *)(pbVar4 + 8) = local_58;
local_60[0] = bVar3;
local_58 = uVar5;
basic_json<std::map,std::vector,std::__cxx11::string,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_60);
}
}
lVar6 = *(long *)(this + 0x10);
lVar8 = lVar6 + -8;
*(long *)(this + 0x10) = lVar8;
pjVar1 = this + 0x38;
iVar2 = *(int *)pjVar1;
*(int *)pjVar1 = *(int *)pjVar1 + -1;
if (iVar2 == 0) {
*(int4 *)(this + 0x38) = 0x3f;
*(long *)(this + 0x30) = *(long *)(this + 0x30) + -8;
}
if (((*(long *)(this + 8) != lVar8) &&
(local_a0 = *(char **)(lVar6 + -0x10), local_a0 != (char *)0x0)) &&
((byte)(*local_a0 - 1U) < 2)) {
local_98 = (_Rb_tree_node_base *)0x0;
uStack_90 = 0;
local_88 = -0x8000000000000000;
if (*local_a0 == '\x01') {
local_98 = (_Rb_tree_node_base *)(*(long **)(local_a0 + 8))[3];
}
else {
uStack_90 = **(long **)(local_a0 + 8);
}
while( true ) {
local_80 = *(char **)(lVar8 + -8);
local_78 = 0;
uStack_70 = 0;
local_68 = 0x8000000000000000;
if (*local_80 == '\x02') {
uStack_70 = *(int8 *)(*(long *)(local_80 + 8) + 8);
}
else if (*local_80 == '\x01') {
local_78 = *(long *)(local_80 + 8) + 8;
}
else {
local_68 = 1;
}
cVar7 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_a0,&local_80);
if (cVar7 != '\0') {
return 1;
}
pcVar9 = (char *)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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->((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_a0);
if (*pcVar9 == '\t') break;
if (*local_a0 == '\x02') {
uStack_90 = uStack_90 + 0x10;
}
else if (*local_a0 == '\x01') {
local_98 = (_Rb_tree_node_base *)std::_Rb_tree_increment(local_98);
}
else {
local_88 = local_88 + 1;
}
lVar8 = *(long *)(this + 0x10);
}
local_50 = local_a0;
local_48 = (int4)local_98;
uStack_44 = local_98._4_4_;
uStack_40 = (int4)uStack_90;
uStack_3c = uStack_90._4_4_;
local_38 = local_88;
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
(&local_80,*(int8 *)(*(long *)(this + 0x10) + -8));
}
return 1;
}
|
|
5,650 | minja::Parser::parseArray() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseArray() {
if (consumeToken("[").empty()) return nullptr;
std::vector<std::shared_ptr<Expression>> elements;
if (!consumeToken("]").empty()) {
return std::make_shared<ArrayExpr>(get_location(), std::move(elements));
}
auto first_expr = parseExpression();
if (!first_expr) throw std::runtime_error("Expected first expression in array");
elements.push_back(std::move(first_expr));
while (it != end) {
if (!consumeToken(",").empty()) {
auto expr = parseExpression();
if (!expr) throw std::runtime_error("Expected expression in array");
elements.push_back(std::move(expr));
} else if (!consumeToken("]").empty()) {
return std::make_shared<ArrayExpr>(get_location(), std::move(elements));
} else {
throw std::runtime_error("Expected comma or closing bracket in array");
}
}
throw std::runtime_error("Expected closing bracket");
} | O2 | cpp | minja::Parser::parseArray():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4e068(%rip), %rsi # 0xb43d0
leaq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x2746a
movq %rbx, 0x58(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x60acc
leaq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rbx
callq 0x241b8
leaq 0x30(%rsp), %rdi
callq 0x241b8
xorps %xmm0, %xmm0
testq %rbx, %rbx
je 0x66452
movaps %xmm0, 0x60(%rsp)
andq $0x0, 0x70(%rsp)
leaq 0x4b93c(%rip), %rsi # 0xb1d03
leaq 0x30(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0x2746a
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x60acc
leaq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rbx
callq 0x241b8
leaq 0x30(%rsp), %rdi
callq 0x241b8
testq %rbx, %rbx
je 0x6645f
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x6009c
movq 0x58(%rsp), %rbx
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x68d4f
leaq 0x38(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x4f578
leaq 0x18(%rsp), %rdi
jmp 0x665b9
movq 0x58(%rsp), %rbx
movups %xmm0, (%rbx)
jmp 0x665c8
leaq 0x78(%rsp), %rdi
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x602da
cmpq $0x0, 0x78(%rsp)
je 0x6663d
leaq 0x60(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x648f2
leaq 0x30(%rsp), %r13
leaq 0x10(%rsp), %rbx
pushq $0x1
popq %r15
leaq 0x60(%rsp), %r12
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x665dd
movq %r13, %rdi
leaq 0x4cd01(%rip), %rsi # 0xb31b6
leaq 0xf(%rsp), %rdx
callq 0x2746a
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl %r15d, %ecx
callq 0x60acc
movq 0x18(%rsp), %rbp
movq %rbx, %rdi
callq 0x241b8
movq %r13, %rdi
callq 0x241b8
testq %rbp, %rbp
je 0x6651b
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x602da
cmpq $0x0, 0x10(%rsp)
je 0x6660d
movq %r12, %rdi
movq %rbx, %rsi
callq 0x648f2
leaq 0x18(%rsp), %rdi
callq 0x4f578
jmp 0x6649d
leaq 0x4b7e1(%rip), %rsi # 0xb1d03
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2746a
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x60acc
leaq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rbx
callq 0x241b8
leaq 0x30(%rsp), %rdi
callq 0x241b8
testq %rbx, %rbx
je 0x66659
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x6009c
movq 0x58(%rsp), %rbx
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x68d4f
leaq 0x38(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x4f578
leaq 0x18(%rsp), %rdi
callq 0x4f578
leaq 0x80(%rsp), %rdi
callq 0x4f578
leaq 0x60(%rsp), %rdi
callq 0x64958
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
leaq 0x4ccb4(%rip), %rsi # 0xb32a3
movq %rax, %rdi
callq 0x23310
movq 0x959f2(%rip), %rsi # 0xfbff0
movq 0x95953(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23ef0
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
leaq 0x4cc3c(%rip), %rsi # 0xb325b
movq %rax, %rdi
callq 0x23310
movq 0x959c2(%rip), %rsi # 0xfbff0
movq 0x95923(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23ef0
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
leaq 0x4cbe9(%rip), %rsi # 0xb3238
movq %rax, %rdi
callq 0x23310
jmp 0x665f7
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
leaq 0x4cc0d(%rip), %rsi # 0xb3278
movq %rax, %rdi
callq 0x23310
jmp 0x665f7
jmp 0x666c6
jmp 0x666c6
jmp 0x666d5
jmp 0x666e6
jmp 0x666eb
jmp 0x666e6
jmp 0x6669e
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
jmp 0x66700
jmp 0x6669e
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x241b8
jmp 0x66705
movq %rax, %rbx
jmp 0x66705
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x241b8
jmp 0x6670f
movq %rax, %rbx
jmp 0x6670f
jmp 0x666d5
movq %rax, %rbx
movq %r14, %rdi
callq 0x23680
jmp 0x666d8
movq %rax, %rbx
movq %r14, %rdi
callq 0x23680
jmp 0x666f8
jmp 0x666e6
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x4f578
jmp 0x666f8
jmp 0x666e6
movq %rax, %rbx
jmp 0x666f8
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x241b8
leaq 0x80(%rsp), %rdi
callq 0x4f578
leaq 0x60(%rsp), %rdi
callq 0x64958
movq %rbx, %rdi
callq 0x23f80
nop
| _ZN5minja6Parser10parseArrayEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14, rsi
mov rbx, rdi
lea rsi, aBytes+9; "["
lea rdi, [rsp+0B8h+var_88]
lea rdx, [rsp+0B8h+var_58]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov [rsp+0B8h+var_60], rbx
lea rdi, [rsp+0B8h+var_A8]
lea rdx, [rsp+0B8h+var_88]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
lea rdi, [rsp+0B8h+var_A8]; void *
mov rbx, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0B8h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
xorps xmm0, xmm0
test rbx, rbx
jz loc_66452
movaps [rsp+0B8h+var_58], xmm0
and [rsp+0B8h+var_48], 0
lea rsi, asc_B1D02+1; "]"
lea rdi, [rsp+0B8h+var_88]
lea rdx, [rsp+0B8h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0B8h+var_A8]
lea rdx, [rsp+0B8h+var_88]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
lea rdi, [rsp+0B8h+var_A8]; void *
mov rbx, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0B8h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test rbx, rbx
jz short loc_6645F
lea rdi, [rsp+0B8h+var_A8]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
mov rbx, [rsp+0B8h+var_60]
lea rdi, [rsp+0B8h+var_88]
lea rsi, [rsp+0B8h+var_A8]
lea rdx, [rsp+0B8h+var_58]
call _ZSt11make_sharedIN5minja9ArrayExprEJNS0_8LocationESt6vectorISt10shared_ptrINS0_10ExpressionEESaIS6_EEEES4_IT_EDpOT0_; std::make_shared<minja::ArrayExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>>>(minja::Location,std::vector<std::shared_ptr<minja::Expression>> &&)
lea rdi, [rsp+0B8h+var_80]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_A0]
jmp loc_665B9
loc_66452:
mov rbx, [rsp+0B8h+var_60]
movups xmmword ptr [rbx], xmm0
jmp loc_665C8
loc_6645F:
lea rdi, [rsp+0B8h+var_40]; this
push 1
pop rdx
mov rsi, r14; bool
call _ZN5minja6Parser15parseExpressionEb; minja::Parser::parseExpression(bool)
cmp [rsp+0B8h+var_40], 0
jz loc_6663D
lea rdi, [rsp+0B8h+var_58]
lea rsi, [rsp+0B8h+var_40]
call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(std::shared_ptr<minja::Expression> &&)
lea r13, [rsp+0B8h+var_88]
lea rbx, [rsp+0B8h+var_A8]
push 1
pop r15
lea r12, [rsp+0B8h+var_58]
loc_6649D:
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz loc_665DD
mov rdi, r13
lea rsi, asc_B31B6; ","
lea rdx, [rsp+0B8h+var_A9]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r14
mov rdx, r13
mov ecx, r15d
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rbp, [rsp+0B8h+var_A0]
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test rbp, rbp
jz short loc_6651B
mov rdi, rbx; this
mov rsi, r14; bool
mov edx, r15d
call _ZN5minja6Parser15parseExpressionEb; minja::Parser::parseExpression(bool)
cmp [rsp+0B8h+var_A8], 0
jz loc_6660D
mov rdi, r12
mov rsi, rbx
call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(std::shared_ptr<minja::Expression> &&)
lea rdi, [rsp+0B8h+var_A0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_6649D
loc_6651B:
lea rsi, asc_B1D02+1; "]"
lea rdi, [rsp+0B8h+var_88]
lea rdx, [rsp+0B8h+var_A9]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0B8h+var_A8]
lea rdx, [rsp+0B8h+var_88]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
lea rdi, [rsp+0B8h+var_A8]; void *
mov rbx, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0B8h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test rbx, rbx
jz loc_66659
lea rdi, [rsp+0B8h+var_A8]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
mov rbx, [rsp+0B8h+var_60]
lea rdi, [rsp+0B8h+var_88]
lea rsi, [rsp+0B8h+var_A8]
lea rdx, [rsp+0B8h+var_58]
call _ZSt11make_sharedIN5minja9ArrayExprEJNS0_8LocationESt6vectorISt10shared_ptrINS0_10ExpressionEESaIS6_EEEES4_IT_EDpOT0_; std::make_shared<minja::ArrayExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>>>(minja::Location,std::vector<std::shared_ptr<minja::Expression>> &&)
lea rdi, [rsp+0B8h+var_80]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_A0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_38]
loc_665B9:
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_58]
call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EED2Ev; std::vector<std::shared_ptr<minja::Expression>>::~vector()
loc_665C8:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_665DD:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedClosin_4; "Expected closing bracket"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_665F7:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_6660D:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExpres_5; "Expected expression in array"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_6663D:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedFirstE; "Expected first expression in array"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_665F7
loc_66659:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedCommaO; "Expected comma or closing bracket in ar"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_665F7
jmp short loc_666C6
jmp short loc_666C6
jmp short loc_666D5
jmp short loc_666E6
jmp short loc_666EB
jmp short loc_666E6
jmp short loc_6669E
mov rbx, rax
lea rdi, [rsp+arg_10]
jmp short loc_66700
jmp short loc_6669E
mov rbx, rax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_66705
loc_6669E:
mov rbx, rax
jmp short loc_66705
mov rbx, rax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6670F
mov rbx, rax
jmp short loc_6670F
jmp short loc_666D5
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_666D8
loc_666C6:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_666F8
jmp short loc_666E6
loc_666D5:
mov rbx, rax
loc_666D8:
lea rdi, [rsp+arg_10]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_666F8
jmp short $+2
loc_666E6:
mov rbx, rax
jmp short loc_666F8
loc_666EB:
mov rbx, rax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_666F8:
lea rdi, [rsp+arg_78]
loc_66700:
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_66705:
lea rdi, [rsp+arg_58]
call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EED2Ev; std::vector<std::shared_ptr<minja::Expression>>::~vector()
loc_6670F:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseArray(minja::Parser *this, _QWORD *a2)
{
long long v2; // rbx
long long v3; // rbx
minja::Parser *v4; // rbx
__int128 v5; // xmm0
char *v6; // rdi
long long v7; // rbp
long long v8; // rbx
__int128 v9; // xmm0
std::runtime_error *exception; // r14
std::runtime_error *v12; // r14
__int128 v13[2]; // [rsp+10h] [rbp-A8h] BYREF
_OWORD v14[2]; // [rsp+30h] [rbp-88h] BYREF
minja::Parser *v15; // [rsp+58h] [rbp-60h]
__int128 v16; // [rsp+60h] [rbp-58h] BYREF
long long v17; // [rsp+70h] [rbp-48h]
__int128 v18[4]; // [rsp+78h] [rbp-40h] BYREF
std::string::basic_string<std::allocator<char>>(v14, (long long)"[");
v15 = this;
minja::Parser::consumeToken(v13, (long long)a2, v14, 1u);
v2 = *((_QWORD *)&v13[0] + 1);
std::string::~string(v13);
std::string::~string(v14);
if ( !v2 )
{
v4 = v15;
*(_OWORD *)v15 = 0LL;
return v4;
}
v16 = 0LL;
v17 = 0LL;
std::string::basic_string<std::allocator<char>>(v14, (long long)"]");
minja::Parser::consumeToken(v13, (long long)a2, v14, 1u);
v3 = *((_QWORD *)&v13[0] + 1);
std::string::~string(v13);
std::string::~string(v14);
if ( v3 )
{
minja::Parser::get_location((minja::Parser *)v13, a2);
v4 = v15;
std::make_shared<minja::ArrayExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>>>(v14, v13, &v16);
v5 = v14[0];
*((_QWORD *)&v14[0] + 1) = 0LL;
*(_OWORD *)v4 = v5;
*(_QWORD *)&v14[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v14 + 1);
v6 = (char *)v13 + 8;
goto LABEL_13;
}
minja::Parser::parseExpression((minja::Parser *)v18, a2, 1);
if ( !*(_QWORD *)&v18[0] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected first expression in array");
goto LABEL_16;
}
std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>((long long)&v16, v18);
while ( 1 )
{
if ( a2[4] == a2[3] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected closing bracket");
goto LABEL_16;
}
std::string::basic_string<std::allocator<char>>(v14, (long long)",");
minja::Parser::consumeToken(v13, (long long)a2, v14, 1u);
v7 = *((_QWORD *)&v13[0] + 1);
std::string::~string(v13);
std::string::~string(v14);
if ( !v7 )
break;
minja::Parser::parseExpression((minja::Parser *)v13, a2, 1);
if ( !*(_QWORD *)&v13[0] )
{
v12 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v12, "Expected expression in array");
__cxa_throw(
v12,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(
(long long)&v16,
v13);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v13 + 1);
}
std::string::basic_string<std::allocator<char>>(v14, (long long)"]");
minja::Parser::consumeToken(v13, (long long)a2, v14, 1u);
v8 = *((_QWORD *)&v13[0] + 1);
std::string::~string(v13);
std::string::~string(v14);
if ( !v8 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected comma or closing bracket in array");
LABEL_16:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Parser::get_location((minja::Parser *)v13, a2);
v4 = v15;
std::make_shared<minja::ArrayExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>>>(v14, v13, &v16);
v9 = v14[0];
*((_QWORD *)&v14[0] + 1) = 0LL;
*(_OWORD *)v4 = v9;
*(_QWORD *)&v14[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v14 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v13 + 1);
v6 = (char *)v18 + 8;
LABEL_13:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v6);
std::vector<std::shared_ptr<minja::Expression>>::~vector(&v16);
return v4;
}
| parseArray:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RSI
MOV RBX,RDI
LAB_00166361:
LEA RSI,[0x1b43d0]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x60]
CALL 0x0012746a
LAB_00166377:
MOV qword ptr [RSP + 0x58],RBX
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x30]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x00160acc
LEA RDI,[RSP + 0x10]
MOV RBX,qword ptr [RDI + 0x8]
CALL 0x001241b8
LEA RDI,[RSP + 0x30]
CALL 0x001241b8
XORPS XMM0,XMM0
TEST RBX,RBX
JZ 0x00166452
MOVAPS xmmword ptr [RSP + 0x60],XMM0
AND qword ptr [RSP + 0x70],0x0
LAB_001663c0:
LEA RSI,[0x1b1d03]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x78]
CALL 0x0012746a
LAB_001663d6:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x30]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x00160acc
LEA RDI,[RSP + 0x10]
MOV RBX,qword ptr [RDI + 0x8]
CALL 0x001241b8
LEA RDI,[RSP + 0x30]
CALL 0x001241b8
TEST RBX,RBX
JZ 0x0016645f
LAB_00166408:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x0016009c
MOV RBX,qword ptr [RSP + 0x58]
LAB_0016641a:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x60]
CALL 0x00168d4f
LEA RDI,[RSP + 0x38]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x0014f578
LEA RDI,[RSP + 0x18]
JMP 0x001665b9
LAB_00166452:
MOV RBX,qword ptr [RSP + 0x58]
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x001665c8
LAB_0016645f:
LEA RDI,[RSP + 0x78]
PUSH 0x1
POP RDX
MOV RSI,R14
CALL 0x001602da
CMP qword ptr [RSP + 0x78],0x0
JZ 0x0016663d
LAB_0016647b:
LEA RDI,[RSP + 0x60]
LEA RSI,[RSP + 0x78]
CALL 0x001648f2
LEA R13,[RSP + 0x30]
LEA RBX,[RSP + 0x10]
PUSH 0x1
POP R15
LEA R12,[RSP + 0x60]
LAB_0016649d:
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x001665dd
LAB_001664ab:
MOV RDI,R13
LEA RSI,[0x1b31b6]
LEA RDX,[RSP + 0xf]
CALL 0x0012746a
LAB_001664bf:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
MOV ECX,R15D
CALL 0x00160acc
MOV RBP,qword ptr [RSP + 0x18]
MOV RDI,RBX
CALL 0x001241b8
MOV RDI,R13
CALL 0x001241b8
TEST RBP,RBP
JZ 0x0016651b
LAB_001664ea:
MOV RDI,RBX
MOV RSI,R14
MOV EDX,R15D
CALL 0x001602da
CMP qword ptr [RSP + 0x10],0x0
JZ 0x0016660d
LAB_00166504:
MOV RDI,R12
MOV RSI,RBX
CALL 0x001648f2
LEA RDI,[RSP + 0x18]
CALL 0x0014f578
JMP 0x0016649d
LAB_0016651b:
LEA RSI,[0x1b1d03]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0xf]
CALL 0x0012746a
LAB_00166531:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x30]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x00160acc
LEA RDI,[RSP + 0x10]
MOV RBX,qword ptr [RDI + 0x8]
CALL 0x001241b8
LEA RDI,[RSP + 0x30]
CALL 0x001241b8
TEST RBX,RBX
JZ 0x00166659
LAB_00166567:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x0016009c
MOV RBX,qword ptr [RSP + 0x58]
LAB_00166579:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x60]
CALL 0x00168d4f
LAB_0016658d:
LEA RDI,[RSP + 0x38]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x0014f578
LEA RDI,[RSP + 0x18]
CALL 0x0014f578
LEA RDI,[RSP + 0x80]
LAB_001665b9:
CALL 0x0014f578
LEA RDI,[RSP + 0x60]
CALL 0x00164958
LAB_001665c8:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001665dd:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_001665e8:
LEA RSI,[0x1b32a3]
MOV RDI,RAX
CALL 0x00123310
LAB_001665f7:
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R14
CALL 0x00123ef0
LAB_0016660d:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_00166618:
LEA RSI,[0x1b325b]
MOV RDI,RAX
CALL 0x00123310
LAB_00166627:
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R14
CALL 0x00123ef0
LAB_0016663d:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_00166648:
LEA RSI,[0x1b3238]
MOV RDI,RAX
CALL 0x00123310
LAB_00166657:
JMP 0x001665f7
LAB_00166659:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_00166664:
LEA RSI,[0x1b3278]
MOV RDI,RAX
CALL 0x00123310
LAB_00166673:
JMP 0x001665f7
|
/* minja::Parser::parseArray() */
int8 * minja::Parser::parseArray(void)
{
long lVar1;
int8 uVar2;
runtime_error *prVar3;
long in_RSI;
int8 *in_RDI;
__shared_count<(__gnu_cxx::_Lock_policy)2> *this;
allocator local_a9;
long local_a8;
long local_a0 [3];
int8 local_88;
int8 auStack_80 [4];
int8 *local_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
long local_40;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_38 [8];
/* try { // try from 00166361 to 00166376 has its CatchHandler @ 001666b2 */
std::__cxx11::string::string<std::allocator<char>>((string *)&local_88,"[",(allocator *)&local_58)
;
/* try { // try from 00166377 to 00166390 has its CatchHandler @ 001666a3 */
local_60 = in_RDI;
consumeToken(&local_a8);
lVar1 = local_a0[0];
std::__cxx11::string::~string((string *)&local_a8);
std::__cxx11::string::~string((string *)&local_88);
if (lVar1 == 0) {
*local_60 = 0;
local_60[1] = 0;
}
else {
local_58 = 0;
uStack_50 = 0;
local_48 = 0;
/* try { // try from 001663c0 to 001663d5 has its CatchHandler @ 0016669e */
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_88,"]",(allocator *)&local_40);
/* try { // try from 001663d6 to 001663ea has its CatchHandler @ 0016668f */
consumeToken(&local_a8);
lVar1 = local_a0[0];
std::__cxx11::string::~string((string *)&local_a8);
std::__cxx11::string::~string((string *)&local_88);
if (lVar1 == 0) {
/* try { // try from 0016645f to 0016646e has its CatchHandler @ 00166681 */
parseExpression(SUB81(&local_40,0));
if (local_40 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00166648 to 00166656 has its CatchHandler @ 00166677 */
std::runtime_error::runtime_error(prVar3,"Expected first expression in array");
}
else {
/* try { // try from 0016647b to 00166489 has its CatchHandler @ 001666d3 */
std::
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
::emplace_back<std::shared_ptr<minja::Expression>>
((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
*)&local_58,(shared_ptr *)&local_40);
while (*(long *)(in_RSI + 0x20) != *(long *)(in_RSI + 0x18)) {
/* try { // try from 001664ab to 001664be has its CatchHandler @ 001666e6 */
std::__cxx11::string::string<std::allocator<char>>((string *)&local_88,",",&local_a9);
/* try { // try from 001664bf to 001664cf has its CatchHandler @ 001666eb */
consumeToken((string *)&local_a8);
lVar1 = local_a0[0];
std::__cxx11::string::~string((string *)&local_a8);
std::__cxx11::string::~string((string *)&local_88);
if (lVar1 == 0) {
/* try { // try from 0016651b to 00166530 has its CatchHandler @ 0016667f */
std::__cxx11::string::string<std::allocator<char>>((string *)&local_88,"]",&local_a9);
/* try { // try from 00166531 to 00166545 has its CatchHandler @ 0016667d */
consumeToken(&local_a8);
std::__cxx11::string::~string((string *)&local_a8);
std::__cxx11::string::~string((string *)&local_88);
if (local_a0[0] != 0) {
/* try { // try from 00166567 to 00166573 has its CatchHandler @ 0016667b */
get_location();
/* try { // try from 00166579 to 0016658c has its CatchHandler @ 00166679 */
std::
make_shared<minja::ArrayExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>>
((Location *)&local_88,(vector *)&local_a8);
uVar2 = auStack_80[0];
auStack_80[0] = 0;
*local_60 = local_88;
local_60[1] = uVar2;
local_88 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_80);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_a0);
this = local_38;
goto LAB_001665b9;
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00166664 to 00166672 has its CatchHandler @ 00166675 */
std::runtime_error::runtime_error(prVar3,"Expected comma or closing bracket in array");
goto LAB_001665f7;
}
/* try { // try from 001664ea to 001664f7 has its CatchHandler @ 001666e4 */
parseExpression(SUB81((string *)&local_a8,0));
if (local_a8 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00166618 to 00166626 has its CatchHandler @ 001666b9 */
std::runtime_error::runtime_error(prVar3,"Expected expression in array");
/* try { // try from 00166627 to 0016663c has its CatchHandler @ 001666b7 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
/* try { // try from 00166504 to 0016650e has its CatchHandler @ 001666d5 */
std::
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
::emplace_back<std::shared_ptr<minja::Expression>>
((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
*)&local_58,(string *)&local_a8);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_a0);
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001665e8 to 001665f6 has its CatchHandler @ 001666c6 */
std::runtime_error::runtime_error(prVar3,"Expected closing bracket");
}
LAB_001665f7:
/* try { // try from 001665f7 to 0016660c has its CatchHandler @ 001666d3 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
/* try { // try from 00166408 to 00166414 has its CatchHandler @ 0016668d */
get_location();
/* try { // try from 0016641a to 0016642d has its CatchHandler @ 00166683 */
std::
make_shared<minja::ArrayExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>>
((Location *)&local_88,(vector *)&local_a8);
uVar2 = auStack_80[0];
auStack_80[0] = 0;
*local_60 = local_88;
local_60[1] = uVar2;
local_88 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_80);
this = (__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_a0;
LAB_001665b9:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(this);
std::
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>::
~vector((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
*)&local_58);
}
return local_60;
}
|
|
5,651 | JS_RegExpExec | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_RegExpExec(JSContext *ctx, JSValue r, JSValue s)
{
JSValue method, ret;
method = JS_GetProperty(ctx, r, JS_ATOM_exec);
if (JS_IsException(method))
return method;
if (JS_IsFunction(ctx, method)) {
ret = JS_CallFree(ctx, method, r, 1, &s);
if (JS_IsException(ret))
return ret;
if (!JS_IsObject(ret) && !JS_IsNull(ret)) {
JS_FreeValue(ctx, ret);
return JS_ThrowTypeError(ctx, "RegExp exec method must return an object or null");
}
return ret;
}
JS_FreeValue(ctx, method);
return js_regexp_exec(ctx, r, 1, &s);
} | O0 | c | JS_RegExpExec:
subq $0x88, %rsp
movq %rsi, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x60(%rsp)
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movl $0x87, %ecx
callq 0x29d80
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x843d7
movq 0x40(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x84525
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x2e510
cmpl $0x0, %eax
je 0x844e6
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %r8
movl $0x1, %r9d
leaq 0x58(%rsp), %rax
movq %rax, (%rsp)
callq 0x2e280
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x8446f
movq 0x30(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x84525
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x2af70
cmpl $0x0, %eax
jne 0x844cd
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x2e240
cmpl $0x0, %eax
jne 0x844cd
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x23c90
movq 0x50(%rsp), %rdi
leaq 0x8a778(%rip), %rsi # 0x10ec2f
movb $0x0, %al
callq 0x2d300
movq %rax, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
jmp 0x84525
movq 0x30(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x84525
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x23c90
movq 0x50(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movl $0x1, %ecx
leaq 0x58(%rsp), %r8
callq 0x7f220
movq %rax, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rdx
addq $0x88, %rsp
retq
nopw (%rax,%rax)
| JS_RegExpExec:
sub rsp, 88h
mov [rsp+88h+var_20], rsi
mov [rsp+88h+var_18], rdx
mov [rsp+88h+var_30], rcx
mov [rsp+88h+var_28], r8
mov [rsp+88h+var_38], rdi
mov rdi, [rsp+88h+var_38]
mov rsi, [rsp+88h+var_20]
mov rdx, [rsp+88h+var_18]
mov ecx, 87h
call JS_GetProperty
mov [rsp+88h+var_68], rax
mov [rsp+88h+var_60], rdx
mov rax, [rsp+88h+var_68]
mov [rsp+88h+var_48], rax
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_40], rax
mov rdi, [rsp+88h+var_48]
mov rsi, [rsp+88h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_843D7
mov rax, [rsp+88h+var_48]
mov [rsp+88h+var_10], rax
mov rax, [rsp+88h+var_40]
mov [rsp+88h+var_8], rax
jmp loc_84525
loc_843D7:
mov rdi, [rsp+88h+var_38]
mov rsi, [rsp+88h+var_48]
mov rdx, [rsp+88h+var_40]
call JS_IsFunction
cmp eax, 0
jz loc_844E6
mov rdi, [rsp+88h+var_38]
mov rsi, [rsp+88h+var_48]
mov rdx, [rsp+88h+var_40]
mov rcx, [rsp+88h+var_20]
mov r8, [rsp+88h+var_18]
mov r9d, 1
lea rax, [rsp+88h+var_30]
mov [rsp+88h+var_88], rax
call JS_CallFree
mov [rsp+88h+var_78], rax
mov [rsp+88h+var_70], rdx
mov rax, [rsp+88h+var_78]
mov [rsp+88h+var_58], rax
mov rax, [rsp+88h+var_70]
mov [rsp+88h+var_50], rax
mov rdi, [rsp+88h+var_58]
mov rsi, [rsp+88h+var_50]
call JS_IsException_1
cmp eax, 0
jz short loc_8446F
mov rax, [rsp+88h+var_58]
mov [rsp+88h+var_10], rax
mov rax, [rsp+88h+var_50]
mov [rsp+88h+var_8], rax
jmp loc_84525
loc_8446F:
mov rdi, [rsp+88h+var_58]
mov rsi, [rsp+88h+var_50]
call JS_IsObject
cmp eax, 0
jnz short loc_844CD
mov rdi, [rsp+88h+var_58]
mov rsi, [rsp+88h+var_50]
call JS_IsNull_0
cmp eax, 0
jnz short loc_844CD
mov rdi, [rsp+88h+var_38]
mov rsi, [rsp+88h+var_58]
mov rdx, [rsp+88h+var_50]
call JS_FreeValue
mov rdi, [rsp+88h+var_38]
lea rsi, aRegexpExecMeth; "RegExp exec method must return an objec"...
mov al, 0
call JS_ThrowTypeError
mov [rsp+88h+var_10], rax
mov [rsp+88h+var_8], rdx
jmp short loc_84525
loc_844CD:
mov rax, [rsp+88h+var_58]
mov [rsp+88h+var_10], rax
mov rax, [rsp+88h+var_50]
mov [rsp+88h+var_8], rax
jmp short loc_84525
loc_844E6:
mov rdi, [rsp+88h+var_38]
mov rsi, [rsp+88h+var_48]
mov rdx, [rsp+88h+var_40]
call JS_FreeValue
mov rdi, [rsp+88h+var_38]
mov rsi, [rsp+88h+var_20]
mov rdx, [rsp+88h+var_18]
mov ecx, 1
lea r8, [rsp+88h+var_30]
call js_regexp_exec
mov [rsp+88h+var_10], rax
mov [rsp+88h+var_8], rdx
loc_84525:
mov rax, [rsp+88h+var_10]
mov rdx, [rsp+88h+var_8]
add rsp, 88h
retn
| long long JS_RegExpExec(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v13; // rdx
long long v14; // rdx
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
double v22; // xmm4_8
double v23; // xmm5_8
long long v24; // rdx
char v26; // [rsp+0h] [rbp-88h]
long long v27; // [rsp+10h] [rbp-78h]
long long Property; // [rsp+20h] [rbp-68h]
long long v29; // [rsp+38h] [rbp-50h]
long long v30; // [rsp+48h] [rbp-40h]
long long v31[2]; // [rsp+58h] [rbp-30h] BYREF
long long v32; // [rsp+68h] [rbp-20h]
long long v33; // [rsp+70h] [rbp-18h]
long long v34; // [rsp+78h] [rbp-10h]
long long v35; // [rsp+80h] [rbp-8h]
v32 = a2;
v33 = a3;
v31[0] = a4;
v31[1] = a5;
Property = JS_GetProperty(a1, a2, a3, 135);
v30 = v13;
if ( JS_IsException_1(Property, v13) )
{
v34 = Property;
v35 = v30;
}
else if ( (unsigned int)JS_IsFunction(a1, Property, v30) )
{
v27 = JS_CallFree(a1, Property, v30, v32, v33, 1, (long long)v31);
v29 = v14;
if ( JS_IsException_1(v27, v14) )
{
v34 = v27;
v35 = v29;
}
else if ( JS_IsObject(v27, v29) || JS_IsNull_0(v27, v29) )
{
v34 = v27;
v35 = v29;
}
else
{
JS_FreeValue(a1, v27, v29);
v34 = JS_ThrowTypeError(
a1,
(long long)"RegExp exec method must return an object or null",
v15,
v16,
v17,
v18,
a6,
a7,
a8,
a9,
v19,
v20,
a12,
a13,
v26);
v35 = v21;
}
}
else
{
JS_FreeValue(a1, Property, v30);
v34 = js_regexp_exec(a1, v32, v33, 1, v31, a6, a7, a8, a9, v22, v23, a12, a13);
v35 = v24;
}
return v34;
}
| JS_RegExpExec:
SUB RSP,0x88
MOV qword ptr [RSP + 0x68],RSI
MOV qword ptr [RSP + 0x70],RDX
MOV qword ptr [RSP + 0x58],RCX
MOV qword ptr [RSP + 0x60],R8
MOV qword ptr [RSP + 0x50],RDI
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
MOV ECX,0x87
CALL 0x00129d80
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001843d7
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x80],RAX
JMP 0x00184525
LAB_001843d7:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x0012e510
CMP EAX,0x0
JZ 0x001844e6
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x68]
MOV R8,qword ptr [RSP + 0x70]
MOV R9D,0x1
LEA RAX,[RSP + 0x58]
MOV qword ptr [RSP],RAX
CALL 0x0012e280
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x0018446f
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x80],RAX
JMP 0x00184525
LAB_0018446f:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x0012af70
CMP EAX,0x0
JNZ 0x001844cd
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x0012e240
CMP EAX,0x0
JNZ 0x001844cd
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x50]
LEA RSI,[0x20ec2f]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x78],RAX
MOV qword ptr [RSP + 0x80],RDX
JMP 0x00184525
LAB_001844cd:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x80],RAX
JMP 0x00184525
LAB_001844e6:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
MOV ECX,0x1
LEA R8,[RSP + 0x58]
CALL 0x0017f220
MOV qword ptr [RSP + 0x78],RAX
MOV qword ptr [RSP + 0x80],RDX
LAB_00184525:
MOV RAX,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
ADD RSP,0x88
RET
|
int1 [16]
JS_RegExpExec(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int1 auVar4 [16];
int8 local_30;
int8 local_28;
int8 local_20;
int8 local_18;
local_30 = param_4;
local_28 = param_5;
local_20 = param_2;
local_18 = param_3;
auVar4 = JS_GetProperty(param_1,param_2,param_3,0x87);
uVar3 = auVar4._8_8_;
uVar2 = auVar4._0_8_;
iVar1 = JS_IsException(uVar2,uVar3);
if (iVar1 == 0) {
iVar1 = JS_IsFunction(param_1,uVar2,uVar3);
if (iVar1 == 0) {
JS_FreeValue(param_1,uVar2,uVar3);
auVar4 = js_regexp_exec(param_1,local_20,local_18,1,&local_30);
}
else {
auVar4 = JS_CallFree(param_1,uVar2,uVar3,local_20,local_18,1,&local_30);
uVar3 = auVar4._8_8_;
uVar2 = auVar4._0_8_;
iVar1 = JS_IsException(uVar2,uVar3);
if (((iVar1 == 0) && (iVar1 = JS_IsObject(uVar2,uVar3), iVar1 == 0)) &&
(iVar1 = JS_IsNull(uVar2,uVar3), iVar1 == 0)) {
JS_FreeValue(param_1,uVar2,uVar3);
auVar4 = JS_ThrowTypeError(param_1,"RegExp exec method must return an object or null");
}
}
}
return auVar4;
}
|
|
5,652 | JS_RegExpExec | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_RegExpExec(JSContext *ctx, JSValue r, JSValue s)
{
JSValue method, ret;
method = JS_GetProperty(ctx, r, JS_ATOM_exec);
if (JS_IsException(method))
return method;
if (JS_IsFunction(ctx, method)) {
ret = JS_CallFree(ctx, method, r, 1, &s);
if (JS_IsException(ret))
return ret;
if (!JS_IsObject(ret) && !JS_IsNull(ret)) {
JS_FreeValue(ctx, ret);
return JS_ThrowTypeError(ctx, "RegExp exec method must return an object or null");
}
return ret;
}
JS_FreeValue(ctx, method);
return js_regexp_exec(ctx, r, 1, &s);
} | O1 | c | JS_RegExpExec:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movq %rcx, (%rsp)
movq %r8, 0x8(%rsp)
movl $0x87, %ecx
movq %rsi, %r8
movq %rdx, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rax, %r14
movq %rdx, %r15
cmpl $0x6, %r15d
je 0x4b84d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x22dbe
testl %eax, %eax
je 0x4b827
subq $0x8, %rsp
leaq 0x8(%rsp), %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %r12, %r8
movl $0x1, %r9d
pushq %rax
callq 0x22c9d
addq $0x10, %rsp
movq %rax, %r14
movq %rdx, %r15
movl %r15d, %eax
incl %eax
cmpl $0x7, %eax
ja 0x4b7fc
movl $0x89, %ecx
btl %eax, %ecx
jb 0x4b84d
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1d8c6
leaq 0x543b9(%rip), %rsi # 0x9fbcb
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %r15d
jmp 0x4b84d
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1d8c6
movq %rsp, %r8
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x47da9
movq %rax, %r14
movq %rdx, %r15
movq %r14, %rax
movq %r15, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| JS_RegExpExec:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r12, rdx
mov r13, rsi
mov rbx, rdi
mov [rsp+38h+var_38], rcx
mov [rsp+38h+var_30], r8
mov ecx, 87h
mov r8, rsi
mov r9, rdx
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r14, rax
mov r15, rdx
cmp r15d, 6
jz loc_4B84D
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_IsFunction
test eax, eax
jz short loc_4B827
sub rsp, 8
lea rax, [rsp+40h+var_38]
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov rcx, r13
mov r8, r12
mov r9d, 1
push rax
call JS_CallFree
add rsp, 10h
mov r14, rax
mov r15, rdx
mov eax, r15d
inc eax
cmp eax, 7
ja short loc_4B7FC
mov ecx, 89h
bt ecx, eax
jb short loc_4B84D
loc_4B7FC:
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r15
call JS_FreeValueRT
lea rsi, aRegexpExecMeth; "RegExp exec method must return an objec"...
xor r14d, r14d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r15d, 6
jmp short loc_4B84D
loc_4B827:
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r15
call JS_FreeValueRT
mov r8, rsp
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call js_regexp_exec
mov r14, rax
mov r15, rdx
loc_4B84D:
mov rax, r14
mov rdx, r15
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long JS_RegExpExec(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
unsigned long long PropertyInternal2; // rax
long long v15; // rdx
_DWORD *v16; // r14
long long v17; // r15
long long v18; // rdx
int v19; // ecx
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long v26; // rcx
long long v27; // r9
__m128 v28; // xmm4
__m128 v29; // xmm5
long long v31[7]; // [rsp+0h] [rbp-38h] BYREF
v31[0] = a4;
v31[1] = a5;
PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, 0x87u, a2, a3, 0LL, 0);
v16 = (_DWORD *)PropertyInternal2;
v17 = v15;
if ( (_DWORD)v15 != 6 )
{
if ( (unsigned int)JS_IsFunction(a1, PropertyInternal2, v15) )
{
v16 = (_DWORD *)JS_CallFree(a1, v16, v17, a2, a3, 1, (long long)v31);
if ( (unsigned int)(v18 + 1) > 7 || (v19 = 137, !_bittest(&v19, v18 + 1)) )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v16, v18);
v16 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"RegExp exec method must return an object or null",
v20,
v21,
v22,
v23,
a6,
a7,
a8,
a9,
v24,
v25,
a12,
a13,
v31[0]);
}
}
else
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v16, v17);
return js_regexp_exec(a1, a2, a3, a6, a7, a8, a9, v28, v29, a12, a13, v26, v31, v27);
}
}
return (long long)v16;
}
| |||
5,653 | my_hrtime | eloqsql/mysys/my_getsystime.c | my_hrtime_t my_hrtime()
{
my_hrtime_t hrtime;
#if defined(_WIN32)
ulonglong newtime;
GetSystemTimePreciseAsFileTime((FILETIME*)&newtime);
hrtime.val= (newtime - OFFSET_TO_EPOC)/10;
#elif defined(HAVE_CLOCK_GETTIME)
struct timespec tp;
clock_gettime(CLOCK_REALTIME, &tp);
hrtime.val= tp.tv_sec*1000000ULL+tp.tv_nsec/1000ULL;
#else
struct timeval t;
/* The following loop is here because gettimeofday may fail */
while (gettimeofday(&t, NULL) != 0) {}
hrtime.val= t.tv_sec*1000000ULL + t.tv_usec;
#endif
DBUG_EXECUTE_IF("system_time_plus_one_hour", hrtime.val += 3600*1000000ULL;);
DBUG_EXECUTE_IF("system_time_minus_one_hour", hrtime.val -= 3600*1000000ULL;);
return hrtime;
} | O0 | c | my_hrtime:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
xorl %edi, %edi
leaq -0x18(%rbp), %rsi
callq 0x27340
imulq $0xf4240, -0x18(%rbp), %rax # imm = 0xF4240
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0xbaead
jmp 0xbaeaf
jmp 0xbaeb1
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_hrtime:
push rbp
mov rbp, rsp
sub rsp, 20h
xor edi, edi
lea rsi, [rbp+var_18]
call _clock_gettime
imul rax, [rbp+var_18], 0F4240h
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov ecx, 3E8h
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_20]
add rax, rcx
mov [rbp+var_8], rax
jmp short $+2
loc_BAEAD:
jmp short $+2
loc_BAEAF:
jmp short $+2
loc_BAEB1:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| unsigned long long my_hrtime()
{
long long v1; // [rsp+8h] [rbp-18h] BYREF
unsigned long long v2; // [rsp+10h] [rbp-10h]
clock_gettime(0LL, &v1);
return v2 / 0x3E8 + 1000000 * v1;
}
| my_hrtime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
XOR EDI,EDI
LEA RSI,[RBP + -0x18]
CALL 0x00127340
IMUL RAX,qword ptr [RBP + -0x18],0xf4240
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x3e8
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001baead
LAB_001baead:
JMP 0x001baeaf
LAB_001baeaf:
JMP 0x001baeb1
LAB_001baeb1:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long my_hrtime(void)
{
timespec local_20;
clock_gettime(0,&local_20);
return local_20.tv_sec * 1000000 + (ulong)local_20.tv_nsec / 1000;
}
|
|
5,654 | js_os_realpath | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_realpath(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *path;
char buf[PATH_MAX], *res;
int err;
path = JS_ToCString(ctx, argv[0]);
if (!path)
return JS_EXCEPTION;
res = realpath(path, buf);
JS_FreeCString(ctx, path);
if (!res) {
buf[0] = '\0';
err = errno;
} else {
err = 0;
}
return make_string_error(ctx, buf, err);
} | O0 | c | js_os_realpath:
subq $0x1058, %rsp # imm = 0x1058
movq %rsi, 0x1038(%rsp)
movq %rdx, 0x1040(%rsp)
movq %rdi, 0x1030(%rsp)
movl %ecx, 0x102c(%rsp)
movq %r8, 0x1020(%rsp)
movq 0x1030(%rsp), %rdi
movq 0x1020(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x147e0
movq %rax, 0x1018(%rsp)
cmpq $0x0, 0x1018(%rsp)
jne 0x1b486
movl $0x0, 0x1048(%rsp)
movq $0x6, 0x1050(%rsp)
jmp 0x1b4fa
movq 0x1018(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xe5a0
movq %rax, 0x8(%rsp)
movq 0x1030(%rsp), %rdi
movq 0x1018(%rsp), %rsi
callq 0x29e50
cmpq $0x0, 0x8(%rsp)
jne 0x1b4cc
movb $0x0, 0x10(%rsp)
callq 0xe0b0
movl (%rax), %eax
movl %eax, 0x4(%rsp)
jmp 0x1b4d4
movl $0x0, 0x4(%rsp)
movq 0x1030(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl 0x4(%rsp), %edx
callq 0x1cef0
movq %rax, 0x1048(%rsp)
movq %rdx, 0x1050(%rsp)
movq 0x1048(%rsp), %rax
movq 0x1050(%rsp), %rdx
addq $0x1058, %rsp # imm = 0x1058
retq
nopw %cs:(%rax,%rax)
| js_os_realpath:
sub rsp, 1058h
mov [rsp+1058h+var_20], rsi
mov [rsp+1058h+var_18], rdx
mov [rsp+1058h+var_28], rdi
mov [rsp+1058h+var_2C], ecx
mov [rsp+1058h+var_38], r8
mov rdi, [rsp+1058h+var_28]
mov rax, [rsp+1058h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+1058h+var_40], rax
cmp [rsp+1058h+var_40], 0
jnz short loc_1B486
mov dword ptr [rsp+1058h+var_10], 0
mov [rsp+1058h+var_8], 6
jmp short loc_1B4FA
loc_1B486:
mov rdi, [rsp+1058h+var_40]
lea rsi, [rsp+1058h+var_1048]
call _realpath
mov [rsp+1058h+var_1050], rax
mov rdi, [rsp+1058h+var_28]
mov rsi, [rsp+1058h+var_40]
call JS_FreeCString
cmp [rsp+1058h+var_1050], 0
jnz short loc_1B4CC
mov [rsp+1058h+var_1048], 0
call ___errno_location
mov eax, [rax]
mov [rsp+1058h+var_1054], eax
jmp short loc_1B4D4
loc_1B4CC:
mov [rsp+1058h+var_1054], 0
loc_1B4D4:
mov rdi, [rsp+1058h+var_28]
lea rsi, [rsp+1058h+var_1048]
mov edx, [rsp+1058h+var_1054]
call make_string_error
mov [rsp+1058h+var_10], rax
mov [rsp+1058h+var_8], rdx
loc_1B4FA:
mov rax, [rsp+1058h+var_10]
mov rdx, [rsp+1058h+var_8]
add rsp, 1058h
retn
| long long js_os_realpath(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v5; // rdx
long long v7; // [rsp+4h] [rbp-1054h]
long long v8; // [rsp+8h] [rbp-1050h]
_BYTE v9[4104]; // [rsp+10h] [rbp-1048h] BYREF
long long v10; // [rsp+1018h] [rbp-40h]
long long *v11; // [rsp+1020h] [rbp-38h]
int v12; // [rsp+102Ch] [rbp-2Ch]
long long v13; // [rsp+1030h] [rbp-28h]
long long v14; // [rsp+1038h] [rbp-20h]
long long v15; // [rsp+1040h] [rbp-18h]
long long string_error; // [rsp+1048h] [rbp-10h]
long long v17; // [rsp+1050h] [rbp-8h]
v14 = a2;
v15 = a3;
v13 = a1;
v12 = a4;
v11 = a5;
v10 = JS_ToCString(a1, *a5, a5[1]);
if ( v10 )
{
v8 = realpath(v10, v9);
JS_FreeCString(v13, v10);
if ( v8 )
{
LODWORD(v7) = 0;
}
else
{
v9[0] = 0;
v7 = *(unsigned int *)__errno_location();
}
string_error = make_string_error(v13, v9, (unsigned int)v7);
v17 = v5;
}
else
{
LODWORD(string_error) = 0;
v17 = 6LL;
}
return string_error;
}
| js_os_realpath:
SUB RSP,0x1058
MOV qword ptr [RSP + 0x1038],RSI
MOV qword ptr [RSP + 0x1040],RDX
MOV qword ptr [RSP + 0x1030],RDI
MOV dword ptr [RSP + 0x102c],ECX
MOV qword ptr [RSP + 0x1020],R8
MOV RDI,qword ptr [RSP + 0x1030]
MOV RAX,qword ptr [RSP + 0x1020]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001147e0
MOV qword ptr [RSP + 0x1018],RAX
CMP qword ptr [RSP + 0x1018],0x0
JNZ 0x0011b486
MOV dword ptr [RSP + 0x1048],0x0
MOV qword ptr [RSP + 0x1050],0x6
JMP 0x0011b4fa
LAB_0011b486:
MOV RDI,qword ptr [RSP + 0x1018]
LEA RSI,[RSP + 0x10]
CALL 0x0010e5a0
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x1030]
MOV RSI,qword ptr [RSP + 0x1018]
CALL 0x00129e50
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x0011b4cc
MOV byte ptr [RSP + 0x10],0x0
CALL 0x0010e0b0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x4],EAX
JMP 0x0011b4d4
LAB_0011b4cc:
MOV dword ptr [RSP + 0x4],0x0
LAB_0011b4d4:
MOV RDI,qword ptr [RSP + 0x1030]
LEA RSI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0x4]
CALL 0x0011cef0
MOV qword ptr [RSP + 0x1048],RAX
MOV qword ptr [RSP + 0x1050],RDX
LAB_0011b4fa:
MOV RAX,qword ptr [RSP + 0x1048]
MOV RDX,qword ptr [RSP + 0x1050]
ADD RSP,0x1058
RET
|
int1 [16]
js_os_realpath(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
char *pcVar1;
int *piVar2;
int1 auVar3 [16];
int local_1054;
char local_1048 [4104];
char *local_40;
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_40 = (char *)JS_ToCString(param_1,*param_5,param_5[1]);
if (local_40 == (char *)0x0) {
local_10 = 0;
local_8 = 6;
}
else {
pcVar1 = realpath(local_40,local_1048);
JS_FreeCString(local_28,local_40);
if (pcVar1 == (char *)0x0) {
local_1048[0] = '\0';
piVar2 = __errno_location();
local_1054 = *piVar2;
}
else {
local_1054 = 0;
}
auVar3 = make_string_error(local_28,local_1048,local_1054);
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
|
|
5,655 | js_os_realpath | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_realpath(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *path;
char buf[PATH_MAX], *res;
int err;
path = JS_ToCString(ctx, argv[0]);
if (!path)
return JS_EXCEPTION;
res = realpath(path, buf);
JS_FreeCString(ctx, path);
if (!res) {
buf[0] = '\0';
err = errno;
} else {
err = 0;
}
return make_string_error(ctx, buf, err);
} | O1 | c | js_os_realpath:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1008, %rsp # imm = 0x1008
movq %rdi, %r14
movq (%r8), %rdx
movq 0x8(%r8), %rcx
xorl %ebx, %ebx
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x20bf7
testq %rax, %rax
je 0x19e72
movq %rax, %r15
movq %rsp, %rsi
movq %rax, %rdi
callq 0xe5a0
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x20edd
testq %r12, %r12
jne 0x19e60
movb $0x0, (%rsp)
callq 0xe0b0
movl (%rax), %ebx
movq %rsp, %rsi
movq %r14, %rdi
movl %ebx, %edx
callq 0x1ab1b
movq %rax, %rbx
jmp 0x19e77
movl $0x6, %edx
movq %rbx, %rax
addq $0x1008, %rsp # imm = 0x1008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_os_realpath:
push r15
push r14
push r12
push rbx
sub rsp, 1008h
mov r14, rdi
mov rdx, [r8]
mov rcx, [r8+8]
xor ebx, ebx
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_19E72
mov r15, rax
mov rsi, rsp
mov rdi, rax
call _realpath
mov r12, rax
mov rdi, r14
mov rsi, r15
call JS_FreeCString
test r12, r12
jnz short loc_19E60
mov [rsp+1028h+var_1028], 0
call ___errno_location
mov ebx, [rax]
loc_19E60:
mov rsi, rsp
mov rdi, r14
mov edx, ebx
call make_string_error
mov rbx, rax
jmp short loc_19E77
loc_19E72:
mov edx, 6
loc_19E77:
mov rax, rbx
add rsp, 1008h
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_os_realpath(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v5; // rbx
long long v6; // rax
long long v7; // r15
long long v8; // r12
_BYTE v10[4136]; // [rsp+0h] [rbp-1028h] BYREF
v5 = 0LL;
v6 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( v6 )
{
v7 = v6;
v8 = realpath(v6, v10);
JS_FreeCString(a1, v7);
if ( !v8 )
{
v10[0] = 0;
LODWORD(v5) = *(_DWORD *)__errno_location(a1);
}
return make_string_error(a1, v10, (unsigned int)v5);
}
return v5;
}
| |||
5,656 | fill_buffer | eloqsql/storage/maria/ma_packrec.c | static void fill_buffer(MARIA_BIT_BUFF *bit_buff)
{
if (bit_buff->pos >= bit_buff->end)
{
bit_buff->error= 1;
bit_buff->current_byte=0;
return;
}
#if BITS_SAVED == 64
bit_buff->current_byte= ((((uint) ((uchar) bit_buff->pos[7]))) |
(((uint) ((uchar) bit_buff->pos[6])) << 8) |
(((uint) ((uchar) bit_buff->pos[5])) << 16) |
(((uint) ((uchar) bit_buff->pos[4])) << 24) |
((ulonglong)
((((uint) ((uchar) bit_buff->pos[3]))) |
(((uint) ((uchar) bit_buff->pos[2])) << 8) |
(((uint) ((uchar) bit_buff->pos[1])) << 16) |
(((uint) ((uchar) bit_buff->pos[0])) << 24)) << 32));
bit_buff->pos+=8;
#else
#if BITS_SAVED == 32
bit_buff->current_byte= (((uint) ((uchar) bit_buff->pos[3])) |
(((uint) ((uchar) bit_buff->pos[2])) << 8) |
(((uint) ((uchar) bit_buff->pos[1])) << 16) |
(((uint) ((uchar) bit_buff->pos[0])) << 24));
bit_buff->pos+=4;
#else
bit_buff->current_byte= (uint) (((uint) ((uchar) bit_buff->pos[1])) |
(((uint) ((uchar) bit_buff->pos[0])) << 8));
bit_buff->pos+=2;
#endif
#endif
} | O3 | c | fill_buffer:
movq 0x8(%rdi), %rcx
cmpq 0x10(%rdi), %rcx
jae 0x43a09
pushq %rbp
movq %rsp, %rbp
movl (%rcx), %eax
bswapl %eax
addq $0x4, %rcx
movq %rcx, 0x8(%rdi)
popq %rbp
jmp 0x43a12
movl $0x1, 0x28(%rdi)
xorl %eax, %eax
movl %eax, (%rdi)
retq
| fill_buffer:
mov rcx, [rdi+8]
cmp rcx, [rdi+10h]
jnb short loc_43A09
push rbp
mov rbp, rsp
mov eax, [rcx]
bswap eax
add rcx, 4
mov [rdi+8], rcx
pop rbp
jmp short loc_43A12
loc_43A09:
mov dword ptr [rdi+28h], 1
xor eax, eax
loc_43A12:
mov [rdi], eax
retn
| long long fill_buffer(long long a1)
{
unsigned int *v1; // rcx
long long result; // rax
v1 = *(unsigned int **)(a1 + 8);
if ( (unsigned long long)v1 >= *(_QWORD *)(a1 + 16) )
{
*(_DWORD *)(a1 + 40) = 1;
result = 0LL;
}
else
{
result = _byteswap_ulong(*v1);
*(_QWORD *)(a1 + 8) = v1 + 1;
}
*(_DWORD *)a1 = result;
return result;
}
| fill_buffer:
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,qword ptr [RDI + 0x10]
JNC 0x00143a09
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RCX]
BSWAP EAX
ADD RCX,0x4
MOV qword ptr [RDI + 0x8],RCX
POP RBP
JMP 0x00143a12
LAB_00143a09:
MOV dword ptr [RDI + 0x28],0x1
XOR EAX,EAX
LAB_00143a12:
MOV dword ptr [RDI],EAX
RET
|
void fill_buffer(uint *param_1)
{
uint *puVar1;
uint uVar2;
puVar1 = *(uint **)(param_1 + 2);
if (puVar1 < *(uint **)(param_1 + 4)) {
uVar2 = *puVar1;
uVar2 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;
*(uint **)(param_1 + 2) = puVar1 + 1;
}
else {
param_1[10] = 1;
uVar2 = 0;
}
*param_1 = uVar2;
return;
}
|
|
5,657 | coro::thread_pool::schedule_impl(std::__n4861::coroutine_handle<void>) | AlayaLite/build_O3/_deps/libcoro-src/src/thread_pool.cpp | auto thread_pool::schedule_impl(std::coroutine_handle<> handle) noexcept -> void
{
if (handle == nullptr || handle.done())
{
return;
}
{
std::scoped_lock lk{m_wait_mutex};
m_queue.emplace_back(handle);
m_wait_cv.notify_one();
}
} | O3 | cpp | coro::thread_pool::schedule_impl(std::__n4861::coroutine_handle<void>):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
testq %rsi, %rsi
je 0x3e08
cmpq $0x0, (%rsi)
je 0x3e08
movq %rdi, %rbx
leaq 0x68(%rdi), %r14
movq %r14, %rdi
callq 0x21f0
testl %eax, %eax
jne 0x3e10
leaq 0xd0(%rbx), %rdi
movq %rsp, %rsi
callq 0x47c8
addq $0x90, %rbx
movq %rbx, %rdi
callq 0x4816
movq %r14, %rdi
callq 0x2120
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl %eax, %edi
callq 0x20f0
movq %rax, %rdi
callq 0x3184
nop
| _ZN4coro11thread_pool13schedule_implENSt7__n486116coroutine_handleIvEE:
push r14
push rbx
push rax
mov [rsp+18h+var_18], rsi
test rsi, rsi
jz short loc_3E08
cmp qword ptr [rsi], 0
jz short loc_3E08
mov rbx, rdi
lea r14, [rdi+68h]
mov rdi, r14
call _pthread_mutex_lock
test eax, eax
jnz short loc_3E10
lea rdi, [rbx+0D0h]
mov rsi, rsp
call _ZNSt5dequeINSt7__n486116coroutine_handleIvEESaIS2_EE12emplace_backIJRS2_EEES6_DpOT_; std::deque<std::__n4861::coroutine_handle<void>>::emplace_back<std::__n4861::coroutine_handle<void>&>(std::__n4861::coroutine_handle<void>&)
add rbx, 90h
mov rdi, rbx; this
call _ZNSt3_V222condition_variable_any10notify_oneEv; std::_V2::condition_variable_any::notify_one(void)
mov rdi, r14
call _pthread_mutex_unlock
loc_3E08:
add rsp, 8
pop rbx
pop r14
retn
loc_3E10:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rdi, rax
call __clang_call_terminate
| void coro::thread_pool::schedule_impl(long long a1, _QWORD *a2)
{
int v2; // eax
_QWORD *v3; // [rsp+0h] [rbp-18h] BYREF
v3 = a2;
if ( a2 && *a2 )
{
v2 = pthread_mutex_lock(a1 + 104);
if ( v2 )
std::__throw_system_error(v2);
std::deque<std::__n4861::coroutine_handle<void>>::emplace_back<std::__n4861::coroutine_handle<void>&>(a1 + 208, &v3);
std::_V2::condition_variable_any::notify_one((std::_V2::condition_variable_any *)(a1 + 144));
pthread_mutex_unlock(a1 + 104);
}
}
| schedule_impl:
PUSH R14
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RSI
TEST RSI,RSI
JZ 0x00103e08
CMP qword ptr [RSI],0x0
JZ 0x00103e08
MOV RBX,RDI
LEA R14,[RDI + 0x68]
MOV RDI,R14
CALL 0x001021f0
TEST EAX,EAX
JNZ 0x00103e10
LEA RDI,[RBX + 0xd0]
LAB_00103de9:
MOV RSI,RSP
CALL 0x001047c8
ADD RBX,0x90
MOV RDI,RBX
CALL 0x00104816
MOV RDI,R14
CALL 0x00102120
LAB_00103e08:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00103e10:
MOV EDI,EAX
CALL 0x001020f0
LAB_00103e17:
MOV RDI,RAX
CALL 0x00103184
|
/* coro::thread_pool::schedule_impl(std::__n4861::coroutine_handle<void>) */
void __thiscall coro::thread_pool::schedule_impl(thread_pool *this,long *param_2)
{
int iVar1;
int8 uVar2;
long *local_18;
if ((param_2 != (long *)0x0) && (*param_2 != 0)) {
local_18 = param_2;
iVar1 = pthread_mutex_lock((pthread_mutex_t *)(this + 0x68));
if (iVar1 != 0) {
uVar2 = std::__throw_system_error(iVar1);
/* catch(type#1 @ 00000000) { ... } // from try @ 00103de9 with catch @ 00103e17
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar2);
}
/* try { // try from 00103de9 to 00103e16 has its CatchHandler @ 00103e17 */
std::
deque<std::__n4861::coroutine_handle<void>,std::allocator<std::__n4861::coroutine_handle<void>>>
::emplace_back<std::__n4861::coroutine_handle<void>&>
((deque<std::__n4861::coroutine_handle<void>,std::allocator<std::__n4861::coroutine_handle<void>>>
*)(this + 0xd0),(coroutine_handle *)&local_18);
std::_V2::condition_variable_any::notify_one((condition_variable_any *)(this + 0x90));
pthread_mutex_unlock((pthread_mutex_t *)(this + 0x68));
}
return;
}
|
|
5,658 | nglog::tools::ProgramInvocationShortName() | ng-log[P]ng-log/src/utilities.cc | const char* ProgramInvocationShortName() {
if (g_program_invocation_short_name != nullptr) {
return g_program_invocation_short_name;
}
#if defined(HAVE_PROGRAM_INVOCATION_SHORT_NAME)
return program_invocation_short_name;
#elif defined(HAVE_GETPROGNAME)
return getprogname();
#elif defined(HAVE___PROGNAME)
return __progname;
#elif defined(HAVE___ARGV)
return const_basename(__argv[0]);
#else
return "UNKNOWN";
#endif
} | O3 | cpp | nglog::tools::ProgramInvocationShortName():
movq 0x1ea0e(%rip), %rax # 0x49eb0
testq %rax, %rax
jne 0x2b4b1
movq 0xda72(%rip), %rax # 0x38f20
movq (%rax), %rax
retq
| _ZN5nglog5tools26ProgramInvocationShortNameEv:
mov rax, cs:_ZN5nglogL31g_program_invocation_short_nameE; nglog::g_program_invocation_short_name
test rax, rax
jnz short locret_2B4B1
mov rax, cs:program_invocation_short_name_ptr
mov rax, [rax]
locret_2B4B1:
retn
| long long nglog::tools::ProgramInvocationShortName(nglog::tools *this)
{
long long result; // rax
result = nglog::g_program_invocation_short_name;
if ( !nglog::g_program_invocation_short_name )
return program_invocation_short_name;
return result;
}
| ProgramInvocationShortName:
MOV RAX,qword ptr [0x00149eb0]
TEST RAX,RAX
JNZ 0x0012b4b1
MOV RAX,qword ptr [0x00138f20]
MOV RAX,qword ptr [RAX]
LAB_0012b4b1:
RET
|
/* nglog::tools::ProgramInvocationShortName() */
long nglog::tools::ProgramInvocationShortName(void)
{
long lVar1;
lVar1 = g_program_invocation_short_name;
if (g_program_invocation_short_name == 0) {
lVar1 = *(long *)PTR_program_invocation_short_name_00138f20;
}
return lVar1;
}
|
|
5,659 | mysql_stmt_fetch_cont | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_stmt_fetch_cont(int *ret, MYSQL_STMT *stmt, int ready_status)
{
MK_ASYNC_CONT_BODY(
stmt->mysql,
1,
r_int)
} | O3 | c | mysql_stmt_fetch_cont:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rsi), %rax
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %r15
cmpb $0x0, 0x15(%r15)
je 0x4d0d5
movb $0x1, 0x14(%r15)
movl %edx, 0x4(%r15)
leaq 0x38(%r15), %rdi
callq 0x4e777
movb $0x0, 0x14(%r15)
testl %eax, %eax
jle 0x4d13b
movl (%r15), %r15d
jmp 0x4d1b4
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x2e08d1(%rip), %rax # 0x32d9c0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x35110
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x2e08b6(%rip), %rax # 0x32d9d0
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x35110
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movl $0x1, (%rbx)
jmp 0x4d1b4
movb $0x0, 0x15(%r15)
js 0x4d148
movl 0x8(%r15), %eax
jmp 0x4d1af
movq 0x38(%r14), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x2e085a(%rip), %rax # 0x32d9c0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x35110
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x2e083f(%rip), %rax # 0x32d9d0
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x35110
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movl $0x1, %eax
movl %eax, (%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mysql_stmt_fetch_cont:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+38h]
mov rcx, [rax+480h]
mov r15, [rcx+28h]
cmp byte ptr [r15+15h], 0
jz short loc_4D0D5
mov byte ptr [r15+14h], 1
mov [r15+4], edx
lea rdi, [r15+38h]
call my_context_continue
mov byte ptr [r15+14h], 0
test eax, eax
jle short loc_4D13B
mov r15d, [r15]
jmp loc_4D1B4
loc_4D0D5:
mov dword ptr [rax+90h], 7DEh
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov dword ptr [rbx], 1
jmp short loc_4D1B4
loc_4D13B:
mov byte ptr [r15+15h], 0
js short loc_4D148
mov eax, [r15+8]
jmp short loc_4D1AF
loc_4D148:
mov rax, [r14+38h]
mov dword ptr [rax+90h], 7D8h
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov eax, 1
loc_4D1AF:
mov [rbx], eax
xor r15d, r15d
loc_4D1B4:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mysql_stmt_fetch_cont(int *a1, long long a2, unsigned int a3)
{
long long v3; // rax
unsigned int *v4; // r15
int v5; // eax
unsigned int v6; // r15d
int v7; // eax
v3 = *(_QWORD *)(a2 + 56);
v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL);
if ( *((_BYTE *)v4 + 21) )
{
*((_BYTE *)v4 + 20) = 1;
v4[1] = a3;
v5 = my_context_continue(v4 + 14);
*((_BYTE *)v4 + 20) = 0;
if ( v5 <= 0 )
{
*((_BYTE *)v4 + 21) = 0;
if ( v5 < 0 )
{
*(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
v7 = 1;
}
else
{
v7 = v4[2];
}
*a1 = v7;
return 0;
}
else
{
return *v4;
}
}
else
{
*(_DWORD *)(v3 + 144) = 2014;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
v6 = 0;
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
*a1 = 1;
}
return v6;
}
| mysql_stmt_fetch_cont:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x38]
MOV RCX,qword ptr [RAX + 0x480]
MOV R15,qword ptr [RCX + 0x28]
CMP byte ptr [R15 + 0x15],0x0
JZ 0x0014d0d5
MOV byte ptr [R15 + 0x14],0x1
MOV dword ptr [R15 + 0x4],EDX
LEA RDI,[R15 + 0x38]
CALL 0x0014e777
MOV byte ptr [R15 + 0x14],0x0
TEST EAX,EAX
JLE 0x0014d13b
MOV R15D,dword ptr [R15]
JMP 0x0014d1b4
LAB_0014d0d5:
MOV dword ptr [RAX + 0x90],0x7de
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x42d9c0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00135110
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x42d9d0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00135110
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV dword ptr [RBX],0x1
JMP 0x0014d1b4
LAB_0014d13b:
MOV byte ptr [R15 + 0x15],0x0
JS 0x0014d148
MOV EAX,dword ptr [R15 + 0x8]
JMP 0x0014d1af
LAB_0014d148:
MOV RAX,qword ptr [R14 + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x42d9c0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00135110
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x42d9d0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00135110
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV EAX,0x1
LAB_0014d1af:
MOV dword ptr [RBX],EAX
XOR R15D,R15D
LAB_0014d1b4:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 mysql_stmt_fetch_cont(int4 *param_1,long param_2,int4 param_3)
{
int4 *puVar1;
int iVar2;
int4 uVar3;
puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
if (*(char *)((long)puVar1 + 0x15) == '\0') {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
uVar3 = 0;
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_0042da40,0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
*param_1 = 1;
}
else {
*(int1 *)(puVar1 + 5) = 1;
puVar1[1] = param_3;
iVar2 = my_context_continue(puVar1 + 0xe);
*(int1 *)(puVar1 + 5) = 0;
if (iVar2 < 1) {
*(int1 *)((long)puVar1 + 0x15) = 0;
if (iVar2 < 0) {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0042da10,
0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
uVar3 = 1;
}
else {
uVar3 = puVar1[2];
}
*param_1 = uVar3;
uVar3 = 0;
}
else {
uVar3 = *puVar1;
}
}
return uVar3;
}
|
|
5,660 | my_hash_sort_utf8mb4_nopad | eloqsql/strings/ctype-utf8.c | static void
my_hash_sort_utf8mb4_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
const uchar *e= s + slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((res= my_mb_wc_utf8mb4(cs, &wc, (uchar*) s, (uchar*) e)) > 0)
{
my_tosort_unicode(uni_plane, &wc, cs->state);
MY_HASH_ADD_16(m1, m2, (uint) (wc & 0xFFFF));
if (wc > 0xFFFF)
{
/*
Put the highest byte only if it is non-zero,
to make hash functions for utf8mb3 and utf8mb4
compatible for BMP characters.
This is useful to keep order of records in
test results, e.g. for "SHOW GRANTS".
*/
MY_HASH_ADD(m1, m2, (uint) ((wc >> 16) & 0xFF));
}
s+= res;
}
*nr1= m1;
*nr2= m2;
} | O0 | c | my_hash_sort_utf8mb4_nopad:
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 -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x67fa0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x6d01a
movq -0x48(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edx
leaq -0x30(%rbp), %rsi
callq 0x686c0
jmp 0x6cf31
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
andq $0xffff, %rcx # imm = 0xFFFF
andl $0xff, %ecx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x6cf75
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
andq $0xffff, %rcx # imm = 0xFFFF
shrl $0x8, %ecx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x6cfb6
cmpq $0xffff, -0x30(%rbp) # imm = 0xFFFF
jbe 0x6d004
jmp 0x6cfc2
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
shrq $0x10, %rcx
andq $0xff, %rcx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x6d004
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x6cefa
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_sort_utf8mb4_nopad:
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_8]
mov rax, [rax+78h]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_58], rax
loc_6CEFA:
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_mb_wc_utf8mb4
mov [rbp+var_34], eax
cmp eax, 0
jle loc_6D01A
mov rdi, [rbp+var_48]
mov rax, [rbp+var_8]
mov edx, [rax+0Ch]
lea rsi, [rbp+var_30]
call my_tosort_unicode
jmp short $+2
loc_6CF31:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
and rcx, 0FFFFh
and ecx, 0FFh
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_6CF75:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
and rcx, 0FFFFh
shr ecx, 8
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_6CFB6:
cmp [rbp+var_30], 0FFFFh
jbe short loc_6D004
jmp short $+2
loc_6CFC2:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
shr rcx, 10h
and rcx, 0FFh
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_6D004:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp loc_6CEFA
loc_6D01A:
mov rcx, [rbp+var_50]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_58]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 60h
pop rbp
retn
| _QWORD * my_hash_sort_utf8mb4_nopad(long long a1, long long a2, long long a3, long long *a4, _QWORD *a5, long long a6)
{
_QWORD *result; // rax
long long v7; // [rsp+8h] [rbp-58h]
long long v8; // [rsp+8h] [rbp-58h]
long long v9; // [rsp+10h] [rbp-50h]
long long v10; // [rsp+10h] [rbp-50h]
_QWORD *v11; // [rsp+18h] [rbp-48h]
long long v12; // [rsp+20h] [rbp-40h]
int v13; // [rsp+2Ch] [rbp-34h]
unsigned long long v14; // [rsp+30h] [rbp-30h] BYREF
_QWORD *v15; // [rsp+38h] [rbp-28h]
long long *v16; // [rsp+40h] [rbp-20h]
long long v17; // [rsp+48h] [rbp-18h]
long long v18; // [rsp+50h] [rbp-10h]
long long v19; // [rsp+58h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
v12 = a3 + a2;
v11 = *(_QWORD **)(a1 + 120);
v9 = *a4;
v7 = *a5;
while ( 1 )
{
v13 = my_mb_wc_utf8mb4(v19, (long long)&v14, v18, v12, (long long)a5, a6);
if ( v13 <= 0 )
break;
my_tosort_unicode(v11, &v14, *(_DWORD *)(v19 + 12));
v10 = v9 ^ ((v9 << 8) + (unsigned __int8)v14 * (v7 + (v9 & 0x3F)));
v8 = v7 + 3;
v9 = v10 ^ ((v10 << 8) + BYTE1(v14) * (v8 + (v10 & 0x3F)));
v7 = v8 + 3;
if ( v14 > 0xFFFF )
{
v9 ^= (v9 << 8) + BYTE2(v14) * (v7 + (v9 & 0x3F));
v7 += 3LL;
}
v18 += v13;
}
*v16 = v9;
result = v15;
*v15 = v7;
return result;
}
| my_hash_sort_utf8mb4_nopad:
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 + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
LAB_0016cefa:
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x00167fa0
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x0016d01a
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0xc]
LEA RSI,[RBP + -0x30]
CALL 0x001686c0
JMP 0x0016cf31
LAB_0016cf31:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
AND RCX,0xffff
AND ECX,0xff
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0016cf75
LAB_0016cf75:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
AND RCX,0xffff
SHR ECX,0x8
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0016cfb6
LAB_0016cfb6:
CMP qword ptr [RBP + -0x30],0xffff
JBE 0x0016d004
JMP 0x0016cfc2
LAB_0016cfc2:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
SHR RCX,0x10
AND RCX,0xff
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0016d004
LAB_0016d004:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0016cefa
LAB_0016d01a:
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
ADD RSP,0x60
POP RBP
RET
|
void my_hash_sort_utf8mb4_nopad(long param_1,long param_2,long param_3,ulong *param_4,long *param_5)
{
int8 uVar1;
long lVar2;
int iVar3;
long local_60;
ulong local_58;
ulong local_38;
long *local_30;
ulong *local_28;
long local_20;
long local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_58 = *param_4;
local_60 = *param_5;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
iVar3 = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3);
if (iVar3 < 1) break;
my_tosort_unicode(uVar1,&local_38,*(int4 *)(local_10 + 0xc));
local_58 = ((local_58 & 0x3f) + local_60) * (ulong)((uint)local_38 & 0xff) + local_58 * 0x100 ^
local_58;
local_58 = ((local_58 & 0x3f) + local_60 + 3) * (ulong)(((uint)local_38 & 0xffff) >> 8) +
local_58 * 0x100 ^ local_58;
lVar2 = local_60 + 6;
if (0xffff < local_38) {
local_58 = ((local_58 & 0x3f) + local_60 + 6) * (ulong)((uint)(local_38 >> 0x10) & 0xff) +
local_58 * 0x100 ^ local_58;
lVar2 = local_60 + 9;
}
local_60 = lVar2;
local_18 = local_18 + iVar3;
}
*local_28 = local_58;
*local_30 = local_60;
return;
}
|
|
5,661 | get_charset | eloqsql/mysys/charset.c | CHARSET_INFO *get_charset(uint cs_number, myf flags)
{
CHARSET_INFO *cs= NULL;
if (cs_number == default_charset_info->number)
return default_charset_info;
my_pthread_once(&charsets_initialized, init_available_charsets);
if (cs_number < array_elements(all_charsets))
{
MY_CHARSET_LOADER loader;
my_charset_loader_init_mysys(&loader);
cs= get_internal_charset(&loader, cs_number, flags);
}
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
cs_string[0]='#';
int10_to_str(cs_number, cs_string+1, 10);
my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file);
}
return cs;
} | O0 | c | get_charset:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp # imm = 0x320
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x2fc(%rbp)
movq %rsi, -0x308(%rbp)
movq $0x0, -0x310(%rbp)
movl -0x2fc(%rbp), %eax
leaq 0x1a484b(%rip), %rcx # 0x1ce908
movq (%rcx), %rcx
cmpl (%rcx), %eax
jne 0x2a0da
leaq 0x1a483d(%rip), %rax # 0x1ce908
movq (%rax), %rax
movq %rax, -0x2f8(%rbp)
jmp 0x2a1ac
leaq 0x364603(%rip), %rdi # 0x38e6e4
leaq -0x548(%rip), %rsi # 0x29ba0
callq 0x242a0
cmpl $0x800, -0x2fc(%rbp) # imm = 0x800
jae 0x2a125
leaq -0xb8(%rbp), %rdi
callq 0x291c0
movl -0x2fc(%rbp), %esi
movq -0x308(%rbp), %rdx
leaq -0xb8(%rbp), %rdi
callq 0x2a1f0
movq %rax, -0x310(%rbp)
cmpq $0x0, -0x310(%rbp)
jne 0x2a19e
movq -0x308(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x2a19e
leaq -0x2d0(%rbp), %rdi
callq 0x29860
movq %rax, %rdi
leaq 0x4f76a(%rip), %rsi # 0x798c0
callq 0x242f0
movb $0x23, -0x2f0(%rbp)
movl -0x2fc(%rbp), %eax
movl %eax, %edi
leaq -0x2f0(%rbp), %rsi
addq $0x1, %rsi
movl $0xa, %edx
callq 0x73c40
leaq -0x2f0(%rbp), %rdx
leaq -0x2d0(%rbp), %rcx
movl $0x16, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x2e6e0
movq -0x310(%rbp), %rax
movq %rax, -0x2f8(%rbp)
movq -0x2f8(%rbp), %rax
movq %rax, -0x318(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2a1dc
movq -0x318(%rbp), %rax
addq $0x320, %rsp # imm = 0x320
popq %rbp
retq
callq 0x24320
nopw %cs:(%rax,%rax)
| get_charset:
push rbp
mov rbp, rsp
sub rsp, 320h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2FC], edi
mov [rbp+var_308], rsi
mov [rbp+var_310], 0
mov eax, [rbp+var_2FC]
lea rcx, default_charset_info
mov rcx, [rcx]
cmp eax, [rcx]
jnz short loc_2A0DA
lea rax, default_charset_info
mov rax, [rax]
mov [rbp+var_2F8], rax
jmp loc_2A1AC
loc_2A0DA:
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
cmp [rbp+var_2FC], 800h
jnb short loc_2A125
lea rdi, [rbp+var_B8]
call my_charset_loader_init_mysys
mov esi, [rbp+var_2FC]
mov rdx, [rbp+var_308]
lea rdi, [rbp+var_B8]
call get_internal_charset
mov [rbp+var_310], rax
loc_2A125:
cmp [rbp+var_310], 0
jnz short loc_2A19E
mov rax, [rbp+var_308]
and rax, 10h
cmp rax, 0
jz short loc_2A19E
lea rdi, [rbp+var_2D0]
call get_charsets_dir
mov rdi, rax
lea rsi, aIndexXml; "Index.xml"
call _stpcpy
mov [rbp+var_2F0], 23h ; '#'
mov eax, [rbp+var_2FC]
mov edi, eax
lea rsi, [rbp+var_2F0]
add rsi, 1
mov edx, 0Ah
call int10_to_str
lea rdx, [rbp+var_2F0]
lea rcx, [rbp+var_2D0]
mov edi, 16h
mov esi, 4
mov al, 0
call my_error
loc_2A19E:
mov rax, [rbp+var_310]
mov [rbp+var_2F8], rax
loc_2A1AC:
mov rax, [rbp+var_2F8]
mov [rbp+var_318], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2A1DC
mov rax, [rbp+var_318]
add rsp, 320h
pop rbp
retn
loc_2A1DC:
call ___stack_chk_fail
| void * get_charset(unsigned int a1, long long a2)
{
long long charsets_dir; // rax
int v3; // r8d
int v4; // r9d
long long internal_charset; // [rsp+10h] [rbp-310h]
char v8; // [rsp+30h] [rbp-2F0h] BYREF
_BYTE v9[7]; // [rsp+31h] [rbp-2EFh] BYREF
_BYTE v10[536]; // [rsp+50h] [rbp-2D0h] BYREF
_BYTE v11[176]; // [rsp+268h] [rbp-B8h] BYREF
unsigned long long v12; // [rsp+318h] [rbp-8h]
v12 = __readfsqword(0x28u);
internal_charset = 0LL;
if ( a1 == *(_DWORD *)default_charset_info )
return default_charset_info;
pthread_once(&charsets_initialized, init_available_charsets);
if ( a1 < 0x800 )
{
my_charset_loader_init_mysys((long long)v11);
internal_charset = get_internal_charset(v11, a1, a2);
}
if ( !internal_charset && (a2 & 0x10) != 0 )
{
charsets_dir = get_charsets_dir((long long)v10);
stpcpy(charsets_dir, "Index.xml");
v8 = 35;
int10_to_str(a1, v9, 10LL);
my_error(22, 4, (unsigned int)&v8, (unsigned int)v10, v3, v4);
}
return (void *)internal_charset;
}
| get_charset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x320
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x2fc],EDI
MOV qword ptr [RBP + -0x308],RSI
MOV qword ptr [RBP + -0x310],0x0
MOV EAX,dword ptr [RBP + -0x2fc]
LEA RCX,[0x2ce908]
MOV RCX,qword ptr [RCX]
CMP EAX,dword ptr [RCX]
JNZ 0x0012a0da
LEA RAX,[0x2ce908]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x2f8],RAX
JMP 0x0012a1ac
LAB_0012a0da:
LEA RDI,[0x48e6e4]
LEA RSI,[0x129ba0]
CALL 0x001242a0
CMP dword ptr [RBP + -0x2fc],0x800
JNC 0x0012a125
LEA RDI,[RBP + -0xb8]
CALL 0x001291c0
MOV ESI,dword ptr [RBP + -0x2fc]
MOV RDX,qword ptr [RBP + -0x308]
LEA RDI,[RBP + -0xb8]
CALL 0x0012a1f0
MOV qword ptr [RBP + -0x310],RAX
LAB_0012a125:
CMP qword ptr [RBP + -0x310],0x0
JNZ 0x0012a19e
MOV RAX,qword ptr [RBP + -0x308]
AND RAX,0x10
CMP RAX,0x0
JZ 0x0012a19e
LEA RDI,[RBP + -0x2d0]
CALL 0x00129860
MOV RDI,RAX
LEA RSI,[0x1798c0]
CALL 0x001242f0
MOV byte ptr [RBP + -0x2f0],0x23
MOV EAX,dword ptr [RBP + -0x2fc]
MOV EDI,EAX
LEA RSI,[RBP + -0x2f0]
ADD RSI,0x1
MOV EDX,0xa
CALL 0x00173c40
LEA RDX,[RBP + -0x2f0]
LEA RCX,[RBP + -0x2d0]
MOV EDI,0x16
MOV ESI,0x4
MOV AL,0x0
CALL 0x0012e6e0
LAB_0012a19e:
MOV RAX,qword ptr [RBP + -0x310]
MOV qword ptr [RBP + -0x2f8],RAX
LAB_0012a1ac:
MOV RAX,qword ptr [RBP + -0x2f8]
MOV qword ptr [RBP + -0x318],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012a1dc
MOV RAX,qword ptr [RBP + -0x318]
ADD RSP,0x320
POP RBP
RET
LAB_0012a1dc:
CALL 0x00124320
|
int * get_charset(uint param_1,ulong param_2)
{
char *__dest;
long in_FS_OFFSET;
int *local_318;
int *local_300;
int1 local_2f8;
int1 auStack_2f7 [31];
int1 local_2d8 [536];
int1 local_c0 [176];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_318 = (int *)0x0;
if (param_1 == *(uint *)default_charset_info) {
local_300 = default_charset_info;
}
else {
pthread_once(&charsets_initialized,init_available_charsets);
if (param_1 < 0x800) {
my_charset_loader_init_mysys(local_c0);
local_318 = (int *)get_internal_charset(local_c0,param_1,param_2);
}
if ((local_318 == (int *)0x0) && ((param_2 & 0x10) != 0)) {
__dest = (char *)get_charsets_dir(local_2d8);
stpcpy(__dest,"Index.xml");
local_2f8 = 0x23;
int10_to_str(param_1,auStack_2f7,10);
my_error(0x16,4,&local_2f8,local_2d8);
}
local_300 = local_318;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_300;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
5,662 | get_charset | eloqsql/mysys/charset.c | CHARSET_INFO *get_charset(uint cs_number, myf flags)
{
CHARSET_INFO *cs= NULL;
if (cs_number == default_charset_info->number)
return default_charset_info;
my_pthread_once(&charsets_initialized, init_available_charsets);
if (cs_number < array_elements(all_charsets))
{
MY_CHARSET_LOADER loader;
my_charset_loader_init_mysys(&loader);
cs= get_internal_charset(&loader, cs_number, flags);
}
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
cs_string[0]='#';
int10_to_str(cs_number, cs_string+1, 10);
my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file);
}
return cs;
} | O3 | c | get_charset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x238, %rsp # imm = 0x238
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq 0x2c7246(%rip), %rax # 0x2ef838
movq (%rax), %r15
cmpl %edi, (%r15)
je 0x286f9
movq %rsi, %r14
movl %edi, %ebx
leaq 0x3464b6(%rip), %rdi # 0x36eac0
leaq -0x382(%rip), %rsi # 0x2828f
callq 0x242c0
cmpl $0x7ff, %ebx # imm = 0x7FF
ja 0x2868e
leaq -0x230(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0xb6d(%rip), %rax # 0x27ac2
movq %rax, 0x80(%rdi)
leaq -0xb6c(%rip), %rax # 0x27ad1
movq %rax, 0x88(%rdi)
leaq -0xb5f(%rip), %rax # 0x27aec
movq %rax, 0x90(%rdi)
leaq 0x316d(%rip), %rax # 0x2b7c6
movq %rax, 0x98(%rdi)
leaq 0x2c71c9(%rip), %rax # 0x2ef830
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0xb6e(%rip), %rax # 0x27b0a
movq %rax, 0xa8(%rdi)
movl %ebx, %esi
movq %r14, %rdx
callq 0x2871e
movq %rax, %r15
jmp 0x28691
xorl %r15d, %r15d
testq %r15, %r15
setne %al
testb $0x10, %r14b
sete %cl
orb %al, %cl
jne 0x286f9
leaq -0x230(%rbp), %r14
movq %r14, %rdi
callq 0x2804f
movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49
movq %rcx, (%rax)
movw $0x6c, 0x8(%rax)
leaq -0x24f(%rbp), %rsi
movb $0x23, -0x1(%rsi)
movl %ebx, %edi
movl $0xa, %edx
callq 0x58c56
xorl %r15d, %r15d
leaq -0x250(%rbp), %rdx
movl $0x4, %esi
movl $0x16, %edi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2ac53
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x28719
movq %r15, %rax
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x24360
| get_charset:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 238h
mov rax, fs:28h
mov [rbp+var_20], rax
lea rax, default_charset_info
mov r15, [rax]
cmp [r15], edi
jz loc_286F9
mov r14, rsi
mov ebx, edi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
cmp ebx, 7FFh
ja short loc_2868E
lea rdi, [rbp+var_230]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
mov esi, ebx
mov rdx, r14
call get_internal_charset
mov r15, rax
jmp short loc_28691
loc_2868E:
xor r15d, r15d
loc_28691:
test r15, r15
setnz al
test r14b, 10h
setz cl
or cl, al
jnz short loc_286F9
lea r14, [rbp+var_230]
mov rdi, r14
call get_charsets_dir
mov rcx, 6D782E7865646E49h
mov [rax], rcx
mov word ptr [rax+8], 6Ch ; 'l'
lea rsi, [rbp+var_24F]
mov byte ptr [rsi-1], 23h ; '#'
mov edi, ebx
mov edx, 0Ah
call int10_to_str
xor r15d, r15d
lea rdx, [rbp+var_250]
mov esi, 4
mov edi, 16h
mov rcx, r14
xor eax, eax
call my_error
loc_286F9:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_28719
mov rax, r15
add rsp, 238h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_28719:
call ___stack_chk_fail
| void * get_charset(unsigned int a1, long long a2)
{
void *internal_charset; // r15
int v3; // r8d
int v4; // r9d
char v6; // [rsp+0h] [rbp-250h] BYREF
_BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF
_BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF
long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h]
long long ( *v10)(long long); // [rsp+A8h] [rbp-1A8h]
long long ( *v11)(long long, long long); // [rsp+B0h] [rbp-1A0h]
long long ( *v12)(); // [rsp+B8h] [rbp-198h]
long long ( *v13)(); // [rsp+C0h] [rbp-190h]
long long ( *v14)(unsigned int *); // [rsp+C8h] [rbp-188h]
unsigned long long v15; // [rsp+230h] [rbp-20h]
v15 = __readfsqword(0x28u);
internal_charset = default_charset_info;
if ( *(_DWORD *)default_charset_info != a1 )
{
pthread_once(&charsets_initialized, init_available_charsets);
if ( a1 > 0x7FF )
{
internal_charset = 0LL;
}
else
{
v8[0] = 0;
v9 = my_once_alloc_c;
v10 = my_malloc_c;
v11 = my_realloc_c;
v12 = my_free;
v13 = my_charset_error_reporter;
v14 = add_collation;
internal_charset = (void *)get_internal_charset(v8, a1, a2);
}
if ( internal_charset == 0LL && (a2 & 0x10) != 0 )
{
strcpy((char *)get_charsets_dir((long long)v8), "Index.xml");
int10_to_str(a1, v7, 10LL);
internal_charset = 0LL;
my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4, 35);
}
}
return internal_charset;
}
| get_charset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x238
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x3ef838]
MOV R15,qword ptr [RAX]
CMP dword ptr [R15],EDI
JZ 0x001286f9
MOV R14,RSI
MOV EBX,EDI
LEA RDI,[0x46eac0]
LEA RSI,[0x12828f]
CALL 0x001242c0
CMP EBX,0x7ff
JA 0x0012868e
LEA RDI,[RBP + -0x230]
MOV byte ptr [RDI],0x0
LEA RAX,[0x127ac2]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x127ad1]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x127aec]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x12b7c6]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x3ef830]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x127b0a]
MOV qword ptr [RDI + 0xa8],RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0012871e
MOV R15,RAX
JMP 0x00128691
LAB_0012868e:
XOR R15D,R15D
LAB_00128691:
TEST R15,R15
SETNZ AL
TEST R14B,0x10
SETZ CL
OR CL,AL
JNZ 0x001286f9
LEA R14,[RBP + -0x230]
MOV RDI,R14
CALL 0x0012804f
MOV RCX,0x6d782e7865646e49
MOV qword ptr [RAX],RCX
MOV word ptr [RAX + 0x8],0x6c
LEA RSI,[RBP + -0x24f]
MOV byte ptr [RSI + -0x1],0x23
MOV EDI,EBX
MOV EDX,0xa
CALL 0x00158c56
XOR R15D,R15D
LEA RDX,[RBP + -0x250]
MOV ESI,0x4
MOV EDI,0x16
MOV RCX,R14
XOR EAX,EAX
CALL 0x0012ac53
LAB_001286f9:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00128719
MOV RAX,R15
ADD RSP,0x238
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00128719:
CALL 0x00124360
|
int * get_charset(uint param_1,ulong param_2)
{
int *puVar1;
int8 *puVar2;
long in_FS_OFFSET;
int1 local_258;
int1 local_257 [31];
int1 local_238 [128];
code *local_1b8;
code *local_1b0;
code *local_1a8;
code *local_1a0;
int *local_198;
code *local_190;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
puVar1 = default_charset_info;
if (*(uint *)default_charset_info != param_1) {
pthread_once(&charsets_initialized,init_available_charsets);
if (param_1 < 0x800) {
local_238[0] = 0;
local_1b8 = my_once_alloc_c;
local_1b0 = my_malloc_c;
local_1a8 = my_realloc_c;
local_1a0 = my_free;
local_198 = my_charset_error_reporter;
local_190 = add_collation;
puVar1 = (int *)get_internal_charset(local_238,param_1,param_2);
}
else {
puVar1 = (int *)0x0;
}
if ((param_2 & 0x10) != 0 && puVar1 == (int *)0x0) {
puVar2 = (int8 *)get_charsets_dir(local_238);
*puVar2 = 0x6d782e7865646e49;
*(int2 *)(puVar2 + 1) = 0x6c;
local_258 = 0x23;
int10_to_str(param_1,local_257,10);
puVar1 = (int *)0x0;
my_error(0x16,4,&local_258,local_238);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return puVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
5,663 | my_hash_delete | eloqsql/mysys/hash.c | my_bool my_hash_delete(HASH *hash, uchar *record)
{
uint pos2,idx,empty_index;
my_hash_value_type pos_hashnr, lastpos_hashnr;
size_t blength;
HASH_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty;
DBUG_ENTER("my_hash_delete");
if (!hash->records)
DBUG_RETURN(1);
blength=hash->blength;
data=dynamic_element(&hash->array,0,HASH_LINK*);
/* Search after record with key */
pos= data + my_hash_mask(rec_hashnr(hash, record), blength, hash->records);
gpos = 0;
while (pos->data != record)
{
gpos=pos;
if (pos->next == NO_RECORD)
DBUG_RETURN(1); /* Key not found */
pos=data+pos->next;
}
if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1;
lastpos=data+hash->records;
/* Remove link to record */
empty=pos; empty_index=(uint) (empty-data);
if (gpos)
gpos->next=pos->next; /* unlink current ptr */
else if (pos->next != NO_RECORD)
{
empty=data+(empty_index=pos->next);
pos[0]= empty[0];
}
if (empty == lastpos) /* last key at wrong pos or no next link */
goto exit;
/* Move the last key (lastpos) */
lastpos_hashnr= lastpos->hash_nr;
/* pos is where lastpos should be */
pos= data + my_hash_mask(lastpos_hashnr, hash->blength, hash->records);
if (pos == empty) /* Move to empty position. */
{
empty[0]=lastpos[0];
goto exit;
}
pos_hashnr= pos->hash_nr;
/* pos3 is where the pos should be */
pos3= data + my_hash_mask(pos_hashnr, hash->blength, hash->records);
if (pos != pos3)
{ /* pos is on wrong posit */
empty[0]=pos[0]; /* Save it here */
pos[0]=lastpos[0]; /* This should be here */
movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index);
goto exit;
}
pos2= my_hash_mask(lastpos_hashnr, blength, hash->records + 1);
if (pos2 == my_hash_mask(pos_hashnr, blength, hash->records + 1))
{ /* Identical key-positions */
if (pos2 != hash->records)
{
empty[0]=lastpos[0];
movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index);
goto exit;
}
idx= (uint) (pos-data); /* Link pos->next after lastpos */
}
else idx= NO_RECORD; /* Different positions merge */
empty[0]=lastpos[0];
movelink(data,idx,empty_index,pos->next);
pos->next=empty_index;
exit:
(void) pop_dynamic(&hash->array);
if (hash->free)
(*hash->free)((uchar*) record);
DBUG_RETURN(0);
} | O0 | c | my_hash_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xe0939
jmp 0xe0930
movb $0x1, -0x1(%rbp)
jmp 0xe0cb2
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xe0cc0
movl %eax, %edi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0xe0140
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
je 0xe09d5
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0xe09be
jmp 0xe09b5
movb $0x1, -0x1(%rbp)
jmp 0xe0cb2
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0xe0994
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rcx)
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0xe0a04
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
shrq %rcx
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xe0a4a
movq -0x58(%rbp), %rax
movl (%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
jmp 0xe0a85
movq -0x58(%rbp), %rax
cmpl $-0x1, (%rax)
je 0xe0a83
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, -0x24(%rbp)
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x58(%rbp), %rax
movq -0x68(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0xe0a85
movq -0x68(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0xe0a94
jmp 0xe0c86
movq -0x48(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x2c(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0xe0140
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0xe0af6
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0xe0c86
movq -0x58(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x28(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0xe0140
movl %eax, %ecx
movq -0x80(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
je 0xe0b9c
movq -0x68(%rbp), %rax
movq -0x58(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %esi
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %edx
movl -0x24(%rbp), %ecx
callq 0xe08d0
jmp 0xe0c86
movl -0x2c(%rbp), %edi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
addq $0x1, %rdx
callq 0xe0140
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x28(%rbp), %edi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
addq $0x1, %rdx
callq 0xe0140
movl %eax, %ecx
movl -0x84(%rbp), %eax
cmpl %ecx, %eax
jne 0xe0c4b
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0xe0c37
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %esi
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %edx
movl -0x24(%rbp), %ecx
callq 0xe08d0
jmp 0xe0c86
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, -0x20(%rbp)
jmp 0xe0c52
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movl -0x20(%rbp), %esi
movl -0x24(%rbp), %edx
movq -0x58(%rbp), %rax
movl (%rax), %ecx
callq 0xe08d0
movl -0x24(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0xda500
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xe0cac
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
jmp 0xe0cae
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x90, %rsp
popq %rbp
retq
nop
| my_hash_delete:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp qword ptr [rax+18h], 0
jnz short loc_E0939
jmp short $+2
loc_E0930:
mov [rbp+var_1], 1
jmp loc_E0CB2
loc_E0939:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_70], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call rec_hashnr
mov edi, eax
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov ecx, eax
mov rax, [rbp+var_70]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
mov [rbp+var_50], 0
loc_E0994:
mov rax, [rbp+var_58]
mov rax, [rax+8]
cmp rax, [rbp+var_18]
jz short loc_E09D5
mov rax, [rbp+var_58]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
cmp dword ptr [rax], 0FFFFFFFFh
jnz short loc_E09BE
jmp short $+2
loc_E09B5:
mov [rbp+var_1], 1
jmp loc_E0CB2
loc_E09BE:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_58]
mov ecx, [rcx]
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
jmp short loc_E0994
loc_E09D5:
mov rcx, [rbp+var_10]
mov rax, [rcx+18h]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rcx+18h], rax
mov rcx, [rbp+var_10]
mov rcx, [rcx+10h]
shr rcx, 1
cmp rax, rcx
jnb short loc_E0A04
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
shr rcx, 1
mov [rax+10h], rcx
loc_E0A04:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
mov rcx, [rcx+18h]
shl rcx, 4
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_58]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov [rbp+var_24], eax
cmp [rbp+var_50], 0
jz short loc_E0A4A
mov rax, [rbp+var_58]
mov ecx, [rax]
mov rax, [rbp+var_50]
mov [rax], ecx
jmp short loc_E0A85
loc_E0A4A:
mov rax, [rbp+var_58]
cmp dword ptr [rax], 0FFFFFFFFh
jz short loc_E0A83
mov rax, [rbp+var_40]
mov rcx, [rbp+var_58]
mov ecx, [rcx]
mov [rbp+var_24], ecx
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_68], rax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_68]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
loc_E0A83:
jmp short $+2
loc_E0A85:
mov rax, [rbp+var_68]
cmp rax, [rbp+var_48]
jnz short loc_E0A94
jmp loc_E0C86
loc_E0A94:
mov rax, [rbp+var_48]
mov eax, [rax+4]
mov [rbp+var_2C], eax
mov rax, [rbp+var_40]
mov [rbp+var_78], rax
mov edi, [rbp+var_2C]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov ecx, eax
mov rax, [rbp+var_78]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
cmp rax, [rbp+var_68]
jnz short loc_E0AF6
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
jmp loc_E0C86
loc_E0AF6:
mov rax, [rbp+var_58]
mov eax, [rax+4]
mov [rbp+var_28], eax
mov rax, [rbp+var_40]
mov [rbp+var_80], rax
mov edi, [rbp+var_28]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov ecx, eax
mov rax, [rbp+var_80]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_60], rax
mov rax, [rbp+var_58]
cmp rax, [rbp+var_60]
jz short loc_E0B9C
mov rax, [rbp+var_68]
mov rcx, [rbp+var_58]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rax, [rbp+var_58]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_40]
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov esi, eax
mov rax, [rbp+var_60]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov edx, eax
mov ecx, [rbp+var_24]
call movelink
jmp loc_E0C86
loc_E0B9C:
mov edi, [rbp+var_2C]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
add rdx, 1
call my_hash_mask
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
mov [rbp+var_84], eax
mov edi, [rbp+var_28]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
add rdx, 1
call my_hash_mask
mov ecx, eax
mov eax, [rbp+var_84]
cmp eax, ecx
jnz short loc_E0C4B
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
cmp rax, [rcx+18h]
jz short loc_E0C37
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_40]
mov rax, [rbp+var_48]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov esi, eax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov edx, eax
mov ecx, [rbp+var_24]
call movelink
jmp short loc_E0C86
loc_E0C37:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov [rbp+var_20], eax
jmp short loc_E0C52
loc_E0C4B:
mov [rbp+var_20], 0FFFFFFFFh
loc_E0C52:
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_40]
mov esi, [rbp+var_20]
mov edx, [rbp+var_24]
mov rax, [rbp+var_58]
mov ecx, [rax]
call movelink
mov ecx, [rbp+var_24]
mov rax, [rbp+var_58]
mov [rax], ecx
loc_E0C86:
mov rdi, [rbp+var_10]
add rdi, 28h ; '('
call pop_dynamic
mov rax, [rbp+var_10]
cmp qword ptr [rax+60h], 0
jz short loc_E0CAC
mov rax, [rbp+var_10]
mov rax, [rax+60h]
mov rdi, [rbp+var_18]
call rax
loc_E0CAC:
jmp short $+2
loc_E0CAE:
mov [rbp+var_1], 0
loc_E0CB2:
mov al, [rbp+var_1]
add rsp, 90h
pop rbp
retn
| char my_hash_delete(long long a1, long long a2)
{
unsigned int v2; // eax
unsigned long long v3; // rax
_QWORD *v5; // [rsp+28h] [rbp-68h]
long long v6; // [rsp+30h] [rbp-60h]
unsigned int *v7; // [rsp+38h] [rbp-58h]
long long v8; // [rsp+38h] [rbp-58h]
_DWORD *v9; // [rsp+40h] [rbp-50h]
long long v10; // [rsp+48h] [rbp-48h]
long long v11; // [rsp+50h] [rbp-40h]
unsigned long long v12; // [rsp+58h] [rbp-38h]
unsigned int v13; // [rsp+64h] [rbp-2Ch]
unsigned int v14; // [rsp+68h] [rbp-28h]
unsigned int v15; // [rsp+6Ch] [rbp-24h]
int v16; // [rsp+70h] [rbp-20h]
int v17; // [rsp+74h] [rbp-1Ch]
if ( !*(_QWORD *)(a1 + 24) )
return 1;
v12 = *(_QWORD *)(a1 + 16);
v11 = *(_QWORD *)(a1 + 40);
v2 = rec_hashnr(a1, a2);
v7 = (unsigned int *)(16LL * (unsigned int)my_hash_mask(v2, v12, *(_QWORD *)(a1 + 24)) + v11);
v9 = 0LL;
while ( *((_QWORD *)v7 + 1) != a2 )
{
v9 = v7;
if ( *v7 == -1 )
return 1;
v7 = (unsigned int *)(16LL * *v7 + v11);
}
v3 = *(_QWORD *)(a1 + 24) - 1LL;
*(_QWORD *)(a1 + 24) = v3;
if ( v3 < *(_QWORD *)(a1 + 16) >> 1 )
*(_QWORD *)(a1 + 16) >>= 1;
v10 = 16LL * *(_QWORD *)(a1 + 24) + v11;
v5 = v7;
v15 = ((long long)v7 - v11) >> 4;
if ( v9 )
{
*v9 = *v7;
}
else if ( *v7 != -1 )
{
v15 = *v7;
v5 = (_QWORD *)(16LL * *v7 + v11);
*(_QWORD *)v7 = *v5;
*((_QWORD *)v7 + 1) = v5[1];
}
if ( v5 != (_QWORD *)v10 )
{
v13 = *(_DWORD *)(v10 + 4);
v8 = 16LL * (unsigned int)my_hash_mask(v13, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11;
if ( (_QWORD *)v8 == v5 )
{
*v5 = *(_QWORD *)v10;
v5[1] = *(_QWORD *)(v10 + 8);
}
else
{
v14 = *(_DWORD *)(v8 + 4);
v6 = 16LL * (unsigned int)my_hash_mask(v14, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11;
if ( v8 == v6 )
{
v17 = my_hash_mask(v13, v12, *(_QWORD *)(a1 + 24) + 1LL);
if ( v17 == (unsigned int)my_hash_mask(v14, v12, *(_QWORD *)(a1 + 24) + 1LL) )
{
if ( v17 != *(_QWORD *)(a1 + 24) )
{
*v5 = *(_QWORD *)v10;
v5[1] = *(_QWORD *)(v10 + 8);
movelink(v11, (v10 - v11) >> 4, (v8 - v11) >> 4, v15);
goto LABEL_25;
}
v16 = (v8 - v11) >> 4;
}
else
{
v16 = -1;
}
*v5 = *(_QWORD *)v10;
v5[1] = *(_QWORD *)(v10 + 8);
movelink(v11, v16, v15, *(_DWORD *)v8);
*(_DWORD *)v8 = v15;
goto LABEL_25;
}
*v5 = *(_QWORD *)v8;
v5[1] = *(_QWORD *)(v8 + 8);
*(_QWORD *)v8 = *(_QWORD *)v10;
*(_QWORD *)(v8 + 8) = *(_QWORD *)(v10 + 8);
movelink(v11, (v8 - v11) >> 4, (v6 - v11) >> 4, v15);
}
}
LABEL_25:
pop_dynamic((long long *)(a1 + 40));
if ( *(_QWORD *)(a1 + 96) )
(*(void ( **)(long long))(a1 + 96))(a2);
return 0;
}
| my_hash_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x001e0939
JMP 0x001e0930
LAB_001e0930:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001e0cb2
LAB_001e0939:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
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 qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001e0cc0
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x001e0140
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV qword ptr [RBP + -0x50],0x0
LAB_001e0994:
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x001e09d5
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP dword ptr [RAX],-0x1
JNZ 0x001e09be
JMP 0x001e09b5
LAB_001e09b5:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001e0cb2
LAB_001e09be:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RCX]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001e0994
LAB_001e09d5:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RCX + 0x18]
ADD RAX,-0x1
MOV qword ptr [RCX + 0x18],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x10]
SHR RCX,0x1
CMP RAX,RCX
JNC 0x001e0a04
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
SHR RCX,0x1
MOV qword ptr [RAX + 0x10],RCX
LAB_001e0a04:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x18]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV dword ptr [RBP + -0x24],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001e0a4a
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
JMP 0x001e0a85
LAB_001e0a4a:
MOV RAX,qword ptr [RBP + -0x58]
CMP dword ptr [RAX],-0x1
JZ 0x001e0a83
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RBP + -0x24],ECX
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
LAB_001e0a83:
JMP 0x001e0a85
LAB_001e0a85:
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x001e0a94
JMP 0x001e0c86
LAB_001e0a94:
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x78],RAX
MOV EDI,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x001e0140
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x001e0af6
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001e0c86
LAB_001e0af6:
MOV RAX,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x80],RAX
MOV EDI,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x001e0140
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x80]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x60]
JZ 0x001e0b9c
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV EDX,EAX
MOV ECX,dword ptr [RBP + -0x24]
CALL 0x001e08d0
JMP 0x001e0c86
LAB_001e0b9c:
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
ADD RDX,0x1
CALL 0x001e0140
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x84],EAX
MOV EDI,dword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
ADD RDX,0x1
CALL 0x001e0140
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x84]
CMP EAX,ECX
JNZ 0x001e0c4b
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x18]
JZ 0x001e0c37
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV EDX,EAX
MOV ECX,dword ptr [RBP + -0x24]
CALL 0x001e08d0
JMP 0x001e0c86
LAB_001e0c37:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001e0c52
LAB_001e0c4b:
MOV dword ptr [RBP + -0x20],0xffffffff
LAB_001e0c52:
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RAX]
CALL 0x001e08d0
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x58]
MOV dword ptr [RAX],ECX
LAB_001e0c86:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x28
CALL 0x001da500
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x001e0cac
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x60]
MOV RDI,qword ptr [RBP + -0x18]
CALL RAX
LAB_001e0cac:
JMP 0x001e0cae
LAB_001e0cae:
MOV byte ptr [RBP + -0x1],0x0
LAB_001e0cb2:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x90
POP RBP
RET
|
int1 my_hash_delete(long param_1,long param_2)
{
int8 uVar1;
long lVar2;
int4 uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
uint *puVar8;
uint *puVar9;
uint *puVar10;
uint *local_70;
uint *local_60;
uint *local_58;
uint local_2c;
int4 local_28;
if (*(long *)(param_1 + 0x18) == 0) {
return 1;
}
uVar1 = *(int8 *)(param_1 + 0x10);
lVar2 = *(long *)(param_1 + 0x28);
uVar3 = rec_hashnr(param_1,param_2);
uVar4 = my_hash_mask(uVar3,uVar1,*(int8 *)(param_1 + 0x18));
local_58 = (uint *)0x0;
while (local_60 = (uint *)(lVar2 + (ulong)uVar4 * 0x10), *(long *)(local_60 + 2) != param_2) {
local_58 = local_60;
if (*local_60 == 0xffffffff) {
return 1;
}
uVar4 = *local_60;
}
uVar7 = *(long *)(param_1 + 0x18) - 1;
*(ulong *)(param_1 + 0x18) = uVar7;
if (uVar7 < *(ulong *)(param_1 + 0x10) >> 1) {
*(ulong *)(param_1 + 0x10) = *(ulong *)(param_1 + 0x10) >> 1;
}
puVar8 = (uint *)(lVar2 + *(long *)(param_1 + 0x18) * 0x10);
local_70 = local_60;
local_2c = (uint)((long)local_60 - lVar2 >> 4);
if (local_58 == (uint *)0x0) {
if (*local_60 != 0xffffffff) {
local_2c = *local_60;
local_70 = (uint *)(lVar2 + (ulong)local_2c * 0x10);
*(int8 *)local_60 = *(int8 *)local_70;
*(int8 *)(local_60 + 2) = *(int8 *)(local_70 + 2);
}
}
else {
*local_58 = *local_60;
}
if (local_70 != puVar8) {
uVar4 = puVar8[1];
uVar5 = my_hash_mask(uVar4,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18));
puVar9 = (uint *)(lVar2 + (ulong)uVar5 * 0x10);
if (puVar9 == local_70) {
*(int8 *)local_70 = *(int8 *)puVar8;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2);
}
else {
uVar5 = puVar9[1];
uVar6 = my_hash_mask(uVar5,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18));
puVar10 = (uint *)(lVar2 + (ulong)uVar6 * 0x10);
if (puVar9 == puVar10) {
uVar4 = my_hash_mask(uVar4,uVar1,*(long *)(param_1 + 0x18) + 1);
uVar5 = my_hash_mask(uVar5,uVar1,*(long *)(param_1 + 0x18) + 1);
if (uVar4 == uVar5) {
if ((ulong)uVar4 != *(ulong *)(param_1 + 0x18)) {
*(int8 *)local_70 = *(int8 *)puVar8;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,(long)puVar8 - lVar2 >> 4 & 0xffffffff,
(long)puVar9 - lVar2 >> 4 & 0xffffffff,local_2c);
goto LAB_001e0c86;
}
local_28 = (int4)((long)puVar9 - lVar2 >> 4);
}
else {
local_28 = 0xffffffff;
}
*(int8 *)local_70 = *(int8 *)puVar8;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,local_28,local_2c,*puVar9);
*puVar9 = local_2c;
}
else {
*(int8 *)local_70 = *(int8 *)puVar9;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar9 + 2);
*(int8 *)puVar9 = *(int8 *)puVar8;
*(int8 *)(puVar9 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,(long)puVar9 - lVar2 >> 4 & 0xffffffff,
(long)puVar10 - lVar2 >> 4 & 0xffffffff,local_2c);
}
}
}
LAB_001e0c86:
pop_dynamic(param_1 + 0x28);
if (*(long *)(param_1 + 0x60) != 0) {
(**(code **)(param_1 + 0x60))(param_2);
}
return 0;
}
|
|
5,664 | maria_page_crc_set_index | eloqsql/storage/maria/ma_pagecrc.c | my_bool maria_page_crc_set_index(PAGECACHE_IO_HOOK_ARGS *args)
{
uchar *page= args->page;
pgcache_page_no_t page_no= args->pageno;
MARIA_SHARE *share= (MARIA_SHARE *)args->data;
int data_length= _ma_get_page_used(share, page);
uint32 crc= maria_page_crc((uint32) page_no, page, data_length);
DBUG_ENTER("maria_page_crc_set_index");
DBUG_PRINT("info", ("Page %lu crc: %lu",
(ulong) page_no, (ulong) crc));
DBUG_ASSERT((uint)data_length <= share->block_size - CRC_SIZE);
/* crc is on the stack so it is aligned, pagecache buffer is aligned, too */
int4store_aligned(page + share->block_size - CRC_SIZE, crc);
DBUG_RETURN(0);
} | O3 | c | maria_page_crc_set_index:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rbx
movl 0x8(%rdi), %eax
movq 0x10(%rdi), %r14
movl 0x744(%r14), %ecx
movzwl -0x2(%rbx,%rcx), %ecx
rolw $0x8, %cx
movzwl %cx, %edx
movl %eax, %edi
movq %rbx, %rsi
callq 0xa93a8
cmpl $-0x3, %eax
movl $0xfffffffd, %ecx # imm = 0xFFFFFFFD
cmovbl %eax, %ecx
movl 0x7bc(%r14), %eax
movl %ecx, -0x4(%rbx,%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| maria_page_crc_set_index:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, [rdi]
mov eax, [rdi+8]
mov r14, [rdi+10h]
mov ecx, [r14+744h]
movzx ecx, word ptr [rbx+rcx-2]
rol cx, 8
movzx edx, cx
mov edi, eax
mov rsi, rbx
call my_checksum
cmp eax, 0FFFFFFFDh
mov ecx, 0FFFFFFFDh
cmovb ecx, eax
mov eax, [r14+7BCh]
mov [rbx+rax-4], ecx
xor eax, eax
pop rbx
pop r14
pop rbp
retn
| long long maria_page_crc_set_index(long long *a1)
{
long long v1; // rbx
long long v2; // r14
unsigned int v3; // eax
int v4; // ecx
v1 = *a1;
v2 = a1[2];
v3 = my_checksum(
*((unsigned int *)a1 + 2),
*a1,
(unsigned __int16)__ROL2__(*(_WORD *)(*a1 + *(unsigned int *)(v2 + 1860) - 2), 8));
v4 = -3;
if ( v3 < 0xFFFFFFFD )
v4 = v3;
*(_DWORD *)(v1 + *(unsigned int *)(v2 + 1980) - 4) = v4;
return 0LL;
}
| maria_page_crc_set_index:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,qword ptr [RDI]
MOV EAX,dword ptr [RDI + 0x8]
MOV R14,qword ptr [RDI + 0x10]
MOV ECX,dword ptr [R14 + 0x744]
MOVZX ECX,word ptr [RBX + RCX*0x1 + -0x2]
ROL CX,0x8
MOVZX EDX,CX
MOV EDI,EAX
MOV RSI,RBX
CALL 0x001a93a8
CMP EAX,-0x3
MOV ECX,0xfffffffd
CMOVC ECX,EAX
MOV EAX,dword ptr [R14 + 0x7bc]
MOV dword ptr [RBX + RAX*0x1 + -0x4],ECX
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 maria_page_crc_set_index(long *param_1)
{
ushort uVar1;
long lVar2;
long lVar3;
uint uVar4;
uint uVar5;
lVar2 = *param_1;
lVar3 = param_1[2];
uVar1 = *(ushort *)(lVar2 + -2 + (ulong)*(uint *)(lVar3 + 0x744));
uVar4 = my_checksum((int)param_1[1],lVar2,uVar1 << 8 | uVar1 >> 8);
uVar5 = 0xfffffffd;
if (uVar4 < 0xfffffffd) {
uVar5 = uVar4;
}
*(uint *)(lVar2 + -4 + (ulong)*(uint *)(lVar3 + 0x7bc)) = uVar5;
return 0;
}
|
|
5,665 | JS_SetPropertyInternalWithIC | bluesky950520[P]quickjs/quickjs.c | static int JS_SetPropertyInternalWithIC(JSContext *ctx, JSValue this_obj,
JSAtom prop, JSValue val, int flags,
JSInlineCacheUpdate *icu) {
uint32_t tag, offset;
JSObject *p;
tag = JS_VALUE_GET_TAG(this_obj);
if (unlikely(tag != JS_TAG_OBJECT))
goto slow_path;
p = JS_VALUE_GET_OBJ(this_obj);
offset = get_ic_prop_offset(icu, p->shape);
if (likely(offset != INLINE_CACHE_MISS)) {
set_value(ctx, &p->prop[offset].u.value, val);
return TRUE;
}
slow_path:
return JS_SetPropertyInternal2(ctx, this_obj, prop, val, this_obj,
flags, icu);
} | O0 | c | JS_SetPropertyInternalWithIC:
pushq %rbx
subq $0x70, %rsp
movq 0x88(%rsp), %rax
movl 0x80(%rsp), %eax
movq %rsi, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq %r8, 0x48(%rsp)
movq %r9, 0x50(%rsp)
movq %rdi, 0x40(%rsp)
movl %ecx, 0x3c(%rsp)
movq 0x60(%rsp), %rax
movl %eax, 0x38(%rsp)
cmpl $-0x1, 0x38(%rsp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x67135
jmp 0x671a6
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x88(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x6e1f0
movl %eax, 0x34(%rsp)
cmpl $-0x1, 0x34(%rsp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x671a4
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rsi
movl 0x34(%rsp), %eax
shlq $0x4, %rax
addq %rax, %rsi
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rcx
callq 0x26780
movl $0x1, 0x6c(%rsp)
jmp 0x671fb
jmp 0x671a6
movq 0x40(%rsp), %rdi
movl 0x3c(%rsp), %ecx
movl 0x80(%rsp), %r10d
movq 0x88(%rsp), %rax
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x48(%rsp), %r8
movq 0x50(%rsp), %r9
leaq 0x58(%rsp), %r11
movq (%r11), %rbx
movq %rbx, (%rsp)
movq 0x8(%r11), %r11
movq %r11, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x30cc0
movl %eax, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
addq $0x70, %rsp
popq %rbx
retq
nopw %cs:(%rax,%rax)
| JS_SetPropertyInternalWithIC:
push rbx
sub rsp, 70h
mov rax, [rsp+78h+arg_8]
mov eax, [rsp+78h+arg_0]
mov [rsp+78h+var_20], rsi
mov [rsp+78h+var_18], rdx
mov [rsp+78h+var_30], r8
mov [rsp+78h+var_28], r9
mov [rsp+78h+var_38], rdi
mov [rsp+78h+var_3C], ecx
mov rax, [rsp+78h+var_18]
mov [rsp+78h+var_40], eax
cmp [rsp+78h+var_40], 0FFFFFFFFh
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_67135
jmp short loc_671A6
loc_67135:
mov rax, [rsp+78h+var_20]
mov [rsp+78h+var_50], rax
mov rdi, [rsp+78h+arg_8]
mov rax, [rsp+78h+var_50]
mov rsi, [rax+18h]
call get_ic_prop_offset
mov [rsp+78h+var_44], eax
cmp [rsp+78h+var_44], 0FFFFFFFFh
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_671A4
mov rdi, [rsp+78h+var_38]
mov rax, [rsp+78h+var_50]
mov rsi, [rax+20h]
mov eax, [rsp+78h+var_44]
shl rax, 4
add rsi, rax
mov rdx, [rsp+78h+var_30]
mov rcx, [rsp+78h+var_28]
call set_value
mov [rsp+78h+var_C], 1
jmp short loc_671FB
loc_671A4:
jmp short $+2
loc_671A6:
mov rdi, [rsp+78h+var_38]
mov ecx, [rsp+78h+var_3C]
mov r10d, [rsp+78h+arg_0]
mov rax, [rsp+78h+arg_8]
mov rsi, [rsp+78h+var_20]
mov rdx, [rsp+78h+var_18]
mov r8, [rsp+78h+var_30]
mov r9, [rsp+78h+var_28]
lea r11, [rsp+78h+var_20]
mov rbx, [r11]
mov [rsp+78h+var_78], rbx
mov r11, [r11+8]
mov [rsp+78h+var_70], r11
mov [rsp+78h+var_68], r10d
mov [rsp+78h+var_60], rax
call JS_SetPropertyInternal2
mov [rsp+78h+var_C], eax
loc_671FB:
mov eax, [rsp+78h+var_C]
add rsp, 70h
pop rbx
retn
| long long JS_SetPropertyInternalWithIC(
long long a1,
long long a2,
long long a3,
unsigned int a4,
long long a5,
long long a6,
unsigned int a7,
long long a8)
{
unsigned int ic_prop_offset; // [rsp+34h] [rbp-44h]
if ( (_DWORD)a3 != -1 )
return (unsigned int)JS_SetPropertyInternal2(a1, (_DWORD *)a2, a3, a4, a5, a6, a2, a3, a7, a8);
ic_prop_offset = get_ic_prop_offset(a8, *(_QWORD *)(a2 + 24));
if ( ic_prop_offset == -1 )
{
return (unsigned int)JS_SetPropertyInternal2(a1, (_DWORD *)a2, a3, a4, a5, a6, a2, a3, a7, a8);
}
else
{
set_value(a1, (long long *)(16LL * ic_prop_offset + *(_QWORD *)(a2 + 32)), a5, a6);
return 1;
}
}
| JS_SetPropertyInternalWithIC:
PUSH RBX
SUB RSP,0x70
MOV RAX,qword ptr [RSP + 0x88]
MOV EAX,dword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x48],R8
MOV qword ptr [RSP + 0x50],R9
MOV qword ptr [RSP + 0x40],RDI
MOV dword ptr [RSP + 0x3c],ECX
MOV RAX,qword ptr [RSP + 0x60]
MOV dword ptr [RSP + 0x38],EAX
CMP dword ptr [RSP + 0x38],-0x1
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00167135
JMP 0x001671a6
LAB_00167135:
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x88]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x18]
CALL 0x0016e1f0
MOV dword ptr [RSP + 0x34],EAX
CMP dword ptr [RSP + 0x34],-0x1
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001671a4
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x20]
MOV EAX,dword ptr [RSP + 0x34]
SHL RAX,0x4
ADD RSI,RAX
MOV RDX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x50]
CALL 0x00126780
MOV dword ptr [RSP + 0x6c],0x1
JMP 0x001671fb
LAB_001671a4:
JMP 0x001671a6
LAB_001671a6:
MOV RDI,qword ptr [RSP + 0x40]
MOV ECX,dword ptr [RSP + 0x3c]
MOV R10D,dword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
MOV R8,qword ptr [RSP + 0x48]
MOV R9,qword ptr [RSP + 0x50]
LEA R11,[RSP + 0x58]
MOV RBX,qword ptr [R11]
MOV qword ptr [RSP],RBX
MOV R11,qword ptr [R11 + 0x8]
MOV qword ptr [RSP + 0x8],R11
MOV dword ptr [RSP + 0x10],R10D
MOV qword ptr [RSP + 0x18],RAX
CALL 0x00130cc0
MOV dword ptr [RSP + 0x6c],EAX
LAB_001671fb:
MOV EAX,dword ptr [RSP + 0x6c]
ADD RSP,0x70
POP RBX
RET
|
int4
JS_SetPropertyInternalWithIC
(int8 param_1,long param_2,int8 param_3,int4 param_4,int8 param_5,
int8 param_6,int4 param_7,int8 param_8)
{
uint uVar1;
int4 local_c;
if (((int)param_3 == -1) &&
(uVar1 = get_ic_prop_offset(param_8,*(int8 *)(param_2 + 0x18)), uVar1 != 0xffffffff)) {
set_value(param_1,*(long *)(param_2 + 0x20) + (ulong)uVar1 * 0x10,param_5,param_6);
local_c = 1;
}
else {
local_c = JS_SetPropertyInternal2
(param_1,param_2,param_3,param_4,param_5,param_6,param_2,param_3,param_7,
param_8);
}
return local_c;
}
|
|
5,666 | ggml_pool_1d | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | struct ggml_tensor * ggml_pool_1d(
struct ggml_context * ctx,
struct ggml_tensor * a,
enum ggml_op_pool op,
int k0,
int s0,
int p0) {
bool is_node = false;
if (a->grad) {
GGML_ASSERT(false); // TODO: implement backward
is_node = true;
}
const int64_t ne[2] = {
ggml_calc_pool_output_size(a->ne[0], k0, s0, p0),
a->ne[1],
};
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 2, ne);
int32_t params[] = { op, k0, s0, p0 };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_POOL_1D;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
return result;
} | O0 | c | ggml_pool_1d:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl %edx, 0x54(%rsp)
movl %ecx, 0x50(%rsp)
movl %r8d, 0x4c(%rsp)
movl %r9d, 0x48(%rsp)
movb $0x0, 0x47(%rsp)
movq 0x58(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x12601a
jmp 0x125fd6
movq 0xb1f4b(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xb1fbc(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x59c24(%rip), %rsi # 0x17fc1a
leaq 0x63671(%rip), %rdx # 0x18966e
movl $0x155b, %ecx # imm = 0x155B
leaq 0x579dc(%rip), %r8 # 0x17d9e5
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
movl 0x50(%rsp), %esi
movl 0x4c(%rsp), %edx
vcvtsi2ssl 0x48(%rsp), %xmm0, %xmm0
callq 0x126100
movq %rax, 0x30(%rsp)
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rdi
leaq 0x30(%rsp), %rcx
xorl %esi, %esi
movl $0x2, %edx
callq 0x11c2c0
movq %rax, 0x28(%rsp)
movl 0x54(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x48(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x10, %edx
callq 0x120a30
movq 0x28(%rsp), %rax
movl $0x30, 0x50(%rax)
testb $0x1, 0x47(%rsp)
je 0x1260c1
movq 0x60(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x11cfc0
movq %rax, 0x8(%rsp)
jmp 0x1260ca
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x1260ca
movq 0x8(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x58(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0xa0(%rax)
movq 0x28(%rsp), %rax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| ggml_pool_1d:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov [rsp+68h+var_14], edx
mov [rsp+68h+var_18], ecx
mov [rsp+68h+var_1C], r8d
mov [rsp+68h+var_20], r9d
mov [rsp+68h+var_21], 0
mov rax, [rsp+68h+var_10]
cmp qword ptr [rax+98h], 0
jz short loc_12601A
jmp short $+2
loc_125FD6:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 155Bh
lea r8, aFalse; "false"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_12601A:
mov rax, [rsp+68h+var_10]
mov rdi, [rax+10h]
mov esi, [rsp+68h+var_18]
mov edx, [rsp+68h+var_1C]
vcvtsi2ss xmm0, xmm0, [rsp+68h+var_20]
call ggml_calc_pool_output_size
mov [rsp+68h+var_38], rax
mov rax, [rsp+68h+var_10]
mov rax, [rax+18h]
mov [rsp+68h+var_30], rax
mov rdi, [rsp+68h+var_8]
lea rcx, [rsp+68h+var_38]
xor esi, esi
mov edx, 2
call ggml_new_tensor
mov [rsp+68h+var_40], rax
mov eax, [rsp+68h+var_14]
mov [rsp+68h+var_58], eax
mov eax, [rsp+68h+var_18]
mov [rsp+68h+var_54], eax
mov eax, [rsp+68h+var_1C]
mov [rsp+68h+var_50], eax
mov eax, [rsp+68h+var_20]
mov [rsp+68h+var_4C], eax
mov rdi, [rsp+68h+var_40]
lea rsi, [rsp+68h+var_58]
mov edx, 10h
call ggml_set_op_params
mov rax, [rsp+68h+var_40]
mov dword ptr [rax+50h], 30h ; '0'
test [rsp+68h+var_21], 1
jz short loc_1260C1
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_40]
call ggml_dup_tensor
mov [rsp+68h+var_60], rax
jmp short loc_1260CA
loc_1260C1:
xor eax, eax
mov [rsp+68h+var_60], rax
jmp short $+2
loc_1260CA:
mov rcx, [rsp+68h+var_60]
mov rax, [rsp+68h+var_40]
mov [rax+98h], rcx
mov rcx, [rsp+68h+var_10]
mov rax, [rsp+68h+var_40]
mov [rax+0A0h], rcx
mov rax, [rsp+68h+var_40]
add rsp, 68h
retn
| unsigned int * ggml_pool_1d(
long long a1,
long long a2,
int a3,
unsigned int a4,
unsigned int a5,
int a6,
__m128 _XMM0)
{
long long v7; // rdi
long long v10; // [rsp+8h] [rbp-60h]
_DWORD v11[6]; // [rsp+10h] [rbp-58h] BYREF
unsigned int *v12; // [rsp+28h] [rbp-40h]
_QWORD v13[2]; // [rsp+30h] [rbp-38h] BYREF
char v14; // [rsp+47h] [rbp-21h]
int v15; // [rsp+48h] [rbp-20h]
unsigned int v16; // [rsp+4Ch] [rbp-1Ch]
unsigned int v17; // [rsp+50h] [rbp-18h]
int v18; // [rsp+54h] [rbp-14h]
long long v19; // [rsp+58h] [rbp-10h]
long long v20; // [rsp+60h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v15 = a6;
v14 = 0;
if ( *(_QWORD *)(a2 + 152) )
{
fflush(stdout);
v7 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
5467,
"false");
ggml_print_backtrace();
abort(v7);
}
__asm { vcvtsi2ss xmm0, xmm0, [rsp+68h+var_20] }
v13[0] = ggml_calc_pool_output_size(*(_QWORD *)(v19 + 16), v17, v16, *(double *)&_XMM0);
v13[1] = *(_QWORD *)(v19 + 24);
v12 = (unsigned int *)ggml_new_tensor(v20, 0, 2u, (long long)v13);
v11[0] = v18;
v11[1] = v17;
v11[2] = v16;
v11[3] = v15;
ggml_set_op_params((long long)v12, (long long)v11, 16LL);
v12[20] = 48;
if ( (v14 & 1) != 0 )
v10 = ggml_dup_tensor(v20, v12);
else
v10 = 0LL;
*((_QWORD *)v12 + 19) = v10;
*((_QWORD *)v12 + 20) = v19;
return v12;
}
| |||
5,667 | ggml_pool_1d | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | struct ggml_tensor * ggml_pool_1d(
struct ggml_context * ctx,
struct ggml_tensor * a,
enum ggml_op_pool op,
int k0,
int s0,
int p0) {
bool is_node = false;
if (a->grad) {
GGML_ASSERT(false); // TODO: implement backward
is_node = true;
}
const int64_t ne[2] = {
ggml_calc_pool_output_size(a->ne[0], k0, s0, p0),
a->ne[1],
};
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 2, ne);
int32_t params[] = { op, k0, s0, p0 };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_POOL_1D;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
return result;
} | O1 | c | ggml_pool_1d:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpq $0x0, 0x98(%rsi)
jne 0x9472a
movl %r9d, %ebp
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %rbx
vcvtsi2ss %r9d, %xmm0, %xmm0
vcvtsi2ssq 0x10(%rsi), %xmm1, %xmm1
vfmadd231ss 0x29263(%rip), %xmm0, %xmm1 # xmm1 = (xmm0 * mem) + xmm1
vcvtsi2ss %ecx, %xmm2, %xmm0
vsubss %xmm0, %xmm1, %xmm0
vcvtsi2ss %r8d, %xmm2, %xmm1
vdivss %xmm1, %xmm0, %xmm0
vaddss 0x26952(%rip), %xmm0, %xmm0 # 0xbb008
vcvttss2si %xmm0, %rax
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq 0x18(%rsi), %rax
movq %rax, 0x8(%rcx)
xorl %esi, %esi
movl $0x2, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8e8b7
movq %rax, %r13
movq %rsp, %rsi
movl %r12d, (%rsi)
movl %r15d, 0x4(%rsi)
movl %r14d, 0x8(%rsi)
movl %ebp, 0xc(%rsi)
movl $0x10, %edx
movq %rax, %rdi
callq 0x91e91
movl $0x30, 0x50(%r13)
movq $0x0, 0x98(%r13)
movq %rbx, 0xa0(%r13)
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xe4a4
| ggml_pool_1d:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
cmp qword ptr [rsi+98h], 0
jnz loc_9472A
mov ebp, r9d
mov r14d, r8d
mov r15d, ecx
mov r12d, edx
mov rbx, rsi
vcvtsi2ss xmm0, xmm0, r9d
vcvtsi2ss xmm1, xmm1, qword ptr [rsi+10h]
vfmadd231ss xmm1, xmm0, cs:flt_BD900
vcvtsi2ss xmm0, xmm2, ecx
vsubss xmm0, xmm1, xmm0
vcvtsi2ss xmm1, xmm2, r8d
vdivss xmm0, xmm0, xmm1
vaddss xmm0, xmm0, cs:dword_BB008
vcvttss2si rax, xmm0
lea rcx, [rsp+58h+var_48]
mov [rcx], rax
mov rax, [rsi+18h]
mov [rcx+8], rax
xor esi, esi
mov edx, 2
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov r13, rax
mov rsi, rsp
mov [rsi], r12d
mov [rsi+4], r15d
mov [rsi+8], r14d
mov [rsi+0Ch], ebp
mov edx, 10h
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r13+50h], 30h ; '0'
mov qword ptr [r13+98h], 0
mov [r13+0A0h], rbx
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9472A:
call ggml_pool_1d_cold_1
| long long ggml_pool_1d(
long long a1,
long long a2,
int a3,
int a4,
int a5,
int a6,
__m128 _XMM0,
__m128 _XMM1,
__m128 _XMM2)
{
long long v22; // r13
_DWORD v24[4]; // [rsp+0h] [rbp-58h] BYREF
_QWORD v25[9]; // [rsp+10h] [rbp-48h] BYREF
if ( *(_QWORD *)(a2 + 152) )
ggml_pool_1d_cold_1();
__asm
{
vcvtsi2ss xmm0, xmm0, r9d
vcvtsi2ss xmm1, xmm1, qword ptr [rsi+10h]
vfmadd231ss xmm1, xmm0, cs:flt_BD900
vcvtsi2ss xmm0, xmm2, ecx
vsubss xmm0, xmm1, xmm0
vcvtsi2ss xmm1, xmm2, r8d
vdivss xmm0, xmm0, xmm1
vaddss xmm0, xmm0, cs:dword_BB008
vcvttss2si rax, xmm0
}
v25[0] = _RAX;
v25[1] = *(_QWORD *)(a2 + 24);
v22 = ggml_new_tensor_impl(a1, 0, 2, v25, 0LL, 0LL, _XMM0, _XMM1);
v24[0] = a3;
v24[1] = a4;
v24[2] = a5;
v24[3] = a6;
ggml_set_op_params(v22, (long long)v24, 16LL);
*(_DWORD *)(v22 + 80) = 48;
*(_QWORD *)(v22 + 152) = 0LL;
*(_QWORD *)(v22 + 160) = a2;
return v22;
}
| |||
5,668 | ggml_pool_1d | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | struct ggml_tensor * ggml_pool_1d(
struct ggml_context * ctx,
struct ggml_tensor * a,
enum ggml_op_pool op,
int k0,
int s0,
int p0) {
bool is_node = false;
if (a->grad) {
GGML_ASSERT(false); // TODO: implement backward
is_node = true;
}
const int64_t ne[2] = {
ggml_calc_pool_output_size(a->ne[0], k0, s0, p0),
a->ne[1],
};
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 2, ne);
int32_t params[] = { op, k0, s0, p0 };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_POOL_1D;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
return result;
} | O2 | c | ggml_pool_1d:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpq $0x0, 0x98(%rsi)
jne 0x6dcf7
movl %r9d, %ebp
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %rbx
vcvtsi2ss %r9d, %xmm0, %xmm0
vcvtsi2ssq 0x10(%rsi), %xmm1, %xmm1
vfmadd231ss 0x2bbc5(%rip), %xmm0, %xmm1 # xmm1 = (xmm0 * mem) + xmm1
vcvtsi2ss %ecx, %xmm2, %xmm0
vsubss %xmm0, %xmm1, %xmm0
vcvtsi2ss %r8d, %xmm2, %xmm1
vdivss %xmm1, %xmm0, %xmm0
vaddss 0x29378(%rip), %xmm0, %xmm0 # 0x97008
vcvttss2si %xmm0, %rax
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq 0x18(%rsi), %rax
movq %rax, 0x8(%rcx)
pushq $0x2
popq %rdx
xorl %esi, %esi
callq 0x6835b
movq %rax, %r13
movq %rsp, %rsi
movl %r12d, (%rsi)
movl %r15d, 0x4(%rsi)
movl %r14d, 0x8(%rsi)
movl %ebp, 0xc(%rsi)
pushq $0x10
popq %rdx
movq %rax, %rdi
callq 0x6ab3d
movl $0x30, 0x50(%r13)
andq $0x0, 0x98(%r13)
movq %rbx, 0xa0(%r13)
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6824a(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x6829b(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2c507(%rip), %rsi # 0x9a21e
leaq 0x33b60(%rip), %rdx # 0xa187e
leaq 0x2a31a(%rip), %r8 # 0x9803f
movl $0x155b, %ecx # imm = 0x155B
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
| ggml_pool_1d:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
cmp qword ptr [rsi+98h], 0
jnz loc_6DCF7
mov ebp, r9d
mov r14d, r8d
mov r15d, ecx
mov r12d, edx
mov rbx, rsi
vcvtsi2ss xmm0, xmm0, r9d
vcvtsi2ss xmm1, xmm1, qword ptr [rsi+10h]
vfmadd231ss xmm1, xmm0, cs:flt_9983C
vcvtsi2ss xmm0, xmm2, ecx
vsubss xmm0, xmm1, xmm0
vcvtsi2ss xmm1, xmm2, r8d
vdivss xmm0, xmm0, xmm1
vaddss xmm0, xmm0, cs:dword_97008
vcvttss2si rax, xmm0
lea rcx, [rsp+58h+var_48]
mov [rcx], rax
mov rax, [rsi+18h]
mov [rcx+8], rax
push 2
pop rdx
xor esi, esi
call ggml_new_tensor
mov r13, rax
mov rsi, rsp
mov [rsi], r12d
mov [rsi+4], r15d
mov [rsi+8], r14d
mov [rsi+0Ch], ebp
push 10h
pop rdx
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r13+50h], 30h ; '0'
and qword ptr [r13+98h], 0
mov [r13+0A0h], rbx
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6DCF7:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aFalse; "false"
mov ecx, 155Bh
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
| long long ggml_pool_1d(
long long a1,
long long a2,
int a3,
int a4,
int a5,
int a6,
__m128 _XMM0,
__m128 _XMM1,
__m128 _XMM2)
{
long long v22; // r13
long long v24; // rdi
_DWORD v25[4]; // [rsp+0h] [rbp-58h] BYREF
_QWORD v26[9]; // [rsp+10h] [rbp-48h] BYREF
if ( *(_QWORD *)(a2 + 152) )
{
fflush(stdout);
v24 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
5467,
"false");
ggml_print_backtrace();
abort(v24);
}
__asm
{
vcvtsi2ss xmm0, xmm0, r9d
vcvtsi2ss xmm1, xmm1, qword ptr [rsi+10h]
vfmadd231ss xmm1, xmm0, cs:flt_9983C
vcvtsi2ss xmm0, xmm2, ecx
vsubss xmm0, xmm1, xmm0
vcvtsi2ss xmm1, xmm2, r8d
vdivss xmm0, xmm0, xmm1
vaddss xmm0, xmm0, cs:dword_97008
vcvttss2si rax, xmm0
}
v26[0] = _RAX;
v26[1] = *(_QWORD *)(a2 + 24);
v22 = ggml_new_tensor(a1, 0LL, 2LL, (long long)v26);
v25[0] = a3;
v25[1] = a4;
v25[2] = a5;
v25[3] = a6;
ggml_set_op_params(v22, (long long)v25, 16LL);
*(_DWORD *)(v22 + 80) = 48;
*(_QWORD *)(v22 + 152) = 0LL;
*(_QWORD *)(v22 + 160) = a2;
return v22;
}
| ggml_pool_1d:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
CMP qword ptr [RSI + 0x98],0x0
JNZ 0x0016dcf7
MOV EBP,R9D
MOV R14D,R8D
MOV R15D,ECX
MOV R12D,EDX
MOV RBX,RSI
VCVTSI2SS XMM0,XMM0,R9D
VCVTSI2SS XMM1,XMM1,qword ptr [RSI + 0x10]
VFMADD231SS XMM1,XMM0,dword ptr [0x0019983c]
VCVTSI2SS XMM0,XMM2,ECX
VSUBSS XMM0,XMM1,XMM0
VCVTSI2SS XMM1,XMM2,R8D
VDIVSS XMM0,XMM0,XMM1
VADDSS XMM0,XMM0,dword ptr [0x00197008]
VCVTTSS2SI RAX,XMM0
LEA RCX,[RSP + 0x10]
MOV qword ptr [RCX],RAX
MOV RAX,qword ptr [RSI + 0x18]
MOV qword ptr [RCX + 0x8],RAX
PUSH 0x2
POP RDX
XOR ESI,ESI
CALL 0x0016835b
MOV R13,RAX
MOV RSI,RSP
MOV dword ptr [RSI],R12D
MOV dword ptr [RSI + 0x4],R15D
MOV dword ptr [RSI + 0x8],R14D
MOV dword ptr [RSI + 0xc],EBP
PUSH 0x10
POP RDX
MOV RDI,RAX
CALL 0x0016ab3d
MOV dword ptr [R13 + 0x50],0x30
AND qword ptr [R13 + 0x98],0x0
MOV qword ptr [R13 + 0xa0],RBX
MOV RAX,R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016dcf7:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x19803f]
MOV ECX,0x155b
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
long ggml_pool_1d(int8 param_1,long param_2,int4 param_3,int param_4,int param_5,
int param_6)
{
long lVar1;
int1 auVar2 [16];
int1 in_ZMM0 [64];
int1 auVar3 [16];
int1 in_ZMM1 [64];
int4 local_58;
int local_54;
int local_50;
int local_4c;
long local_48;
int8 local_40;
if (*(long *)(param_2 + 0x98) == 0) {
auVar2._0_4_ = (float)param_6;
auVar2._4_12_ = in_ZMM0._4_12_;
auVar3._0_4_ = (float)*(long *)(param_2 + 0x10);
auVar3._4_12_ = in_ZMM1._4_12_;
auVar2 = vfmadd231ss_fma(auVar3,auVar2,ZEXT416(DAT_0019983c));
local_48 = (long)((auVar2._0_4_ - (float)param_4) / (float)param_5 + DAT_00197008);
local_40 = *(int8 *)(param_2 + 0x18);
lVar1 = ggml_new_tensor(param_1,0,2);
local_58 = param_3;
local_54 = param_4;
local_50 = param_5;
local_4c = param_6;
ggml_set_op_params(lVar1,&local_58,0x10);
*(int4 *)(lVar1 + 0x50) = 0x30;
*(int8 *)(lVar1 + 0x98) = 0;
*(long *)(lVar1 + 0xa0) = param_2;
return lVar1;
}
fflush(*(FILE **)PTR_stdout_001d5f48);
fprintf(*(FILE **)PTR_stderr_001d5fa8,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
0x155b,"false");
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
|
|
5,669 | ggml_pool_1d | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | struct ggml_tensor * ggml_pool_1d(
struct ggml_context * ctx,
struct ggml_tensor * a,
enum ggml_op_pool op,
int k0,
int s0,
int p0) {
bool is_node = false;
if (a->grad) {
GGML_ASSERT(false); // TODO: implement backward
is_node = true;
}
const int64_t ne[2] = {
ggml_calc_pool_output_size(a->ne[0], k0, s0, p0),
a->ne[1],
};
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 2, ne);
int32_t params[] = { op, k0, s0, p0 };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_POOL_1D;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
return result;
} | O3 | c | ggml_pool_1d:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpq $0x0, 0x98(%rsi)
jne 0x93577
movl %r9d, %ebp
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %rbx
vcvtsi2ss %r9d, %xmm0, %xmm0
vcvtsi2ssq 0x10(%rsi), %xmm1, %xmm1
vfmadd231ss 0x29426(%rip), %xmm0, %xmm1 # xmm1 = (xmm0 * mem) + xmm1
vcvtsi2ss %ecx, %xmm2, %xmm0
vsubss %xmm0, %xmm1, %xmm0
vcvtsi2ss %r8d, %xmm2, %xmm1
vdivss %xmm1, %xmm0, %xmm0
vaddss 0x26b05(%rip), %xmm0, %xmm0 # 0xba008
vcvttss2si %xmm0, %rax
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq 0x18(%rsi), %rax
movq %rax, 0x8(%rcx)
xorl %esi, %esi
movl $0x2, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8d64f
movq %rax, %r13
movq %rsp, %rsi
movl %r12d, (%rsi)
movl %r15d, 0x4(%rsi)
movl %r14d, 0x8(%rsi)
movl %ebp, 0xc(%rsi)
movl $0x10, %edx
movq %rax, %rdi
callq 0x90cc8
movl $0x30, 0x50(%r13)
movq $0x0, 0x98(%r13)
movq %rbx, 0xa0(%r13)
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xe3c5
| ggml_pool_1d:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
cmp qword ptr [rsi+98h], 0
jnz loc_93577
mov ebp, r9d
mov r14d, r8d
mov r15d, ecx
mov r12d, edx
mov rbx, rsi
vcvtsi2ss xmm0, xmm0, r9d
vcvtsi2ss xmm1, xmm1, qword ptr [rsi+10h]
vfmadd231ss xmm1, xmm0, cs:flt_BC910
vcvtsi2ss xmm0, xmm2, ecx
vsubss xmm0, xmm1, xmm0
vcvtsi2ss xmm1, xmm2, r8d
vdivss xmm0, xmm0, xmm1
vaddss xmm0, xmm0, cs:dword_BA008
vcvttss2si rax, xmm0
lea rcx, [rsp+58h+var_48]
mov [rcx], rax
mov rax, [rsi+18h]
mov [rcx+8], rax
xor esi, esi
mov edx, 2
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov r13, rax
mov rsi, rsp
mov [rsi], r12d
mov [rsi+4], r15d
mov [rsi+8], r14d
mov [rsi+0Ch], ebp
mov edx, 10h
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r13+50h], 30h ; '0'
mov qword ptr [r13+98h], 0
mov [r13+0A0h], rbx
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_93577:
call ggml_pool_1d_cold_1
| long long ggml_pool_1d(
long long a1,
long long a2,
int a3,
int a4,
int a5,
int a6,
__m128 _XMM0,
__m128 _XMM1,
__m128 _XMM2)
{
long long v22; // r13
_DWORD v24[4]; // [rsp+0h] [rbp-58h] BYREF
_QWORD v25[9]; // [rsp+10h] [rbp-48h] BYREF
if ( *(_QWORD *)(a2 + 152) )
ggml_pool_1d_cold_1();
__asm
{
vcvtsi2ss xmm0, xmm0, r9d
vcvtsi2ss xmm1, xmm1, qword ptr [rsi+10h]
vfmadd231ss xmm1, xmm0, cs:flt_BC910
vcvtsi2ss xmm0, xmm2, ecx
vsubss xmm0, xmm1, xmm0
vcvtsi2ss xmm1, xmm2, r8d
vdivss xmm0, xmm0, xmm1
vaddss xmm0, xmm0, cs:dword_BA008
vcvttss2si rax, xmm0
}
v25[0] = _RAX;
v25[1] = *(_QWORD *)(a2 + 24);
v22 = ggml_new_tensor_impl(a1, 0, 2, v25, 0LL, 0LL, _XMM0, _XMM1);
v24[0] = a3;
v24[1] = a4;
v24[2] = a5;
v24[3] = a6;
ggml_set_op_params(v22, (long long)v24, 16LL);
*(_DWORD *)(v22 + 80) = 48;
*(_QWORD *)(v22 + 152) = 0LL;
*(_QWORD *)(v22 + 160) = a2;
return v22;
}
| |||
5,670 | nglog::LogDestination::RemoveLogSink(nglog::LogSink*) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::RemoveLogSink(LogSink* destination) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
SinkLock l{sink_mutex_};
// This doesn't keep the sinks in order, but who cares?
if (sinks_) {
sinks_->erase(std::remove(sinks_->begin(), sinks_->end(), destination),
sinks_->end());
}
} | O0 | cpp | nglog::LogDestination::RemoveLogSink(nglog::LogSink*):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x10(%rbp), %rdi
leaq 0x5983e(%rip), %rsi # 0x77e68
callq 0x1d530
leaq 0x5982a(%rip), %rdi # 0x77e60
callq 0x21230
testb $0x1, %al
jne 0x1e644
jmp 0x1e70b
leaq 0x59815(%rip), %rdi # 0x77e60
movq %rdi, -0x68(%rbp)
callq 0x21260
movq -0x68(%rbp), %rdi
movq %rax, -0x70(%rbp)
callq 0x21260
movq %rax, %rdi
callq 0x22a10
movq -0x68(%rbp), %rdi
movq %rax, -0x28(%rbp)
callq 0x21260
movq %rax, %rdi
callq 0x228a0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x8(%rbp), %rdx
callq 0x22e10
movq %rax, -0x60(%rbp)
jmp 0x1e699
movq -0x60(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x22e60
leaq 0x597ab(%rip), %rdi # 0x77e60
callq 0x21260
movq %rax, %rdi
callq 0x228a0
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x22e60
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x22d80
movq %rax, -0x78(%rbp)
jmp 0x1e6ea
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x1e70b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x1d590
jmp 0x1e71d
leaq -0x10(%rbp), %rdi
callq 0x1d590
addq $0x80, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x9d40
nopw %cs:(%rax,%rax)
| _ZN5nglog14LogDestination13RemoveLogSinkEPNS_7LogSinkE:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
lea rdi, [rbp+var_10]
lea rsi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _ZNSt10lock_guardISt12shared_mutexEC2ERS0_; std::lock_guard<std::shared_mutex>::lock_guard(std::shared_mutex&)
lea rdi, _ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
call _ZNKSt10unique_ptrISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EEcvbEv; std::unique_ptr<std::vector<nglog::LogSink *>>::operator bool(void)
test al, 1
jnz short loc_1E644
jmp loc_1E70B
loc_1E644:
lea rdi, _ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
mov [rbp+var_68], rdi
call _ZNKSt10unique_ptrISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EEptEv; std::unique_ptr<std::vector<nglog::LogSink *>>::operator->(void)
mov rdi, [rbp+var_68]
mov [rbp+var_70], rax
call _ZNKSt10unique_ptrISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EEptEv; std::unique_ptr<std::vector<nglog::LogSink *>>::operator->(void)
mov rdi, rax
call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE5beginEv; std::vector<nglog::LogSink *>::begin(void)
mov rdi, [rbp+var_68]
mov [rbp+var_28], rax
call _ZNKSt10unique_ptrISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EEptEv; std::unique_ptr<std::vector<nglog::LogSink *>>::operator->(void)
mov rdi, rax
call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE3endEv; std::vector<nglog::LogSink *>::end(void)
mov [rbp+var_30], rax
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_30]
lea rdx, [rbp+var_8]
call _ZSt6removeIN9__gnu_cxx17__normal_iteratorIPPN5nglog7LogSinkESt6vectorIS4_SaIS4_EEEES4_ET_SA_SA_RKT0_; std::remove<__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,nglog::LogSink *>(__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,nglog::LogSink * const&)
mov [rbp+var_60], rax
jmp short $+2
loc_1E699:
mov rax, [rbp+var_60]
mov [rbp+var_20], rax
lea rdi, [rbp+var_18]
lea rsi, [rbp+var_20]
call _ZN9__gnu_cxx17__normal_iteratorIPKPN5nglog7LogSinkESt6vectorIS3_SaIS3_EEEC2IPS3_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE
lea rdi, _ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
call _ZNKSt10unique_ptrISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EEptEv; std::unique_ptr<std::vector<nglog::LogSink *>>::operator->(void)
mov rdi, rax
call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE3endEv; std::vector<nglog::LogSink *>::end(void)
mov [rbp+var_50], rax
lea rdi, [rbp+var_48]
lea rsi, [rbp+var_50]
call _ZN9__gnu_cxx17__normal_iteratorIPKPN5nglog7LogSinkESt6vectorIS3_SaIS3_EEEC2IPS3_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_48]
call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS2_S4_EES9_; std::vector<nglog::LogSink *>::erase(__gnu_cxx::__normal_iterator<nglog::LogSink * const*,std::vector<nglog::LogSink *>>,__gnu_cxx::__normal_iterator<nglog::LogSink * const*,std::vector<nglog::LogSink *>>)
mov [rbp+var_78], rax
jmp short $+2
loc_1E6EA:
mov rax, [rbp+var_78]
mov [rbp+var_58], rax
jmp short loc_1E70B
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_10]
call _ZNSt10lock_guardISt12shared_mutexED2Ev; std::lock_guard<std::shared_mutex>::~lock_guard()
jmp short loc_1E71D
loc_1E70B:
lea rdi, [rbp+var_10]
call _ZNSt10lock_guardISt12shared_mutexED2Ev; std::lock_guard<std::shared_mutex>::~lock_guard()
add rsp, 80h
pop rbp
retn
loc_1E71D:
mov rdi, [rbp+var_38]
call __Unwind_Resume
| long long nglog::LogDestination::RemoveLogSink(nglog::LogDestination *this, nglog::LogSink *a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rax
long long v6; // [rsp+10h] [rbp-70h]
long long v7; // [rsp+30h] [rbp-50h] BYREF
long long v8; // [rsp+38h] [rbp-48h] BYREF
long long v9; // [rsp+50h] [rbp-30h]
long long v10; // [rsp+58h] [rbp-28h]
long long v11; // [rsp+60h] [rbp-20h] BYREF
long long v12; // [rsp+68h] [rbp-18h] BYREF
std::shared_mutex *v13; // [rsp+70h] [rbp-10h] BYREF
nglog::LogDestination *v14; // [rsp+78h] [rbp-8h] BYREF
v14 = this;
std::lock_guard<std::shared_mutex>::lock_guard(&v13, (std::shared_mutex *)&nglog::LogDestination::sink_mutex_);
if ( (std::unique_ptr<std::vector<nglog::LogSink *>>::operator bool(&nglog::LogDestination::sinks_) & 1) != 0 )
{
v6 = std::unique_ptr<std::vector<nglog::LogSink *>>::operator->(&nglog::LogDestination::sinks_);
v2 = std::unique_ptr<std::vector<nglog::LogSink *>>::operator->(&nglog::LogDestination::sinks_);
v10 = std::vector<nglog::LogSink *>::begin(v2);
v3 = std::unique_ptr<std::vector<nglog::LogSink *>>::operator->(&nglog::LogDestination::sinks_);
v9 = std::vector<nglog::LogSink *>::end(v3);
v11 = std::remove<__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,nglog::LogSink *>(
v10,
v9,
&v14);
__gnu_cxx::__normal_iterator<nglog::LogSink * const*,std::vector<nglog::LogSink *>>::__normal_iterator<nglog::LogSink **>(
&v12,
&v11);
v4 = std::unique_ptr<std::vector<nglog::LogSink *>>::operator->(&nglog::LogDestination::sinks_);
v7 = std::vector<nglog::LogSink *>::end(v4);
__gnu_cxx::__normal_iterator<nglog::LogSink * const*,std::vector<nglog::LogSink *>>::__normal_iterator<nglog::LogSink **>(
&v8,
&v7);
std::vector<nglog::LogSink *>::erase(v6, v12, v8);
}
return std::lock_guard<std::shared_mutex>::~lock_guard(&v13);
}
| RemoveLogSink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[RBP + -0x10]
LEA RSI,[0x177e68]
CALL 0x0011d530
LEA RDI,[0x177e60]
CALL 0x00121230
TEST AL,0x1
JNZ 0x0011e644
JMP 0x0011e70b
LAB_0011e644:
LEA RDI,[0x177e60]
MOV qword ptr [RBP + -0x68],RDI
CALL 0x00121260
MOV RDI,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x70],RAX
CALL 0x00121260
MOV RDI,RAX
CALL 0x00122a10
MOV RDI,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x28],RAX
CALL 0x00121260
MOV RDI,RAX
CALL 0x001228a0
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x30]
LAB_0011e68a:
LEA RDX,[RBP + -0x8]
CALL 0x00122e10
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0011e699
LAB_0011e699:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[RBP + -0x18]
LEA RSI,[RBP + -0x20]
CALL 0x00122e60
LEA RDI,[0x177e60]
CALL 0x00121260
MOV RDI,RAX
CALL 0x001228a0
MOV qword ptr [RBP + -0x50],RAX
LEA RDI,[RBP + -0x48]
LEA RSI,[RBP + -0x50]
CALL 0x00122e60
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00122d80
LAB_0011e6e4:
MOV qword ptr [RBP + -0x78],RAX
JMP 0x0011e6ea
LAB_0011e6ea:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0011e70b
LAB_0011e70b:
LEA RDI,[RBP + -0x10]
CALL 0x0011d590
ADD RSP,0x80
POP RBP
RET
|
/* nglog::LogDestination::RemoveLogSink(nglog::LogSink*) */
void nglog::LogDestination::RemoveLogSink(LogSink *param_1)
{
bool bVar1;
vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *pvVar2;
vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *pvVar3;
int8 local_58;
int8 local_50 [3];
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
lock_guard<std::shared_mutex> local_18 [8];
LogSink *local_10;
local_10 = param_1;
std::lock_guard<std::shared_mutex>::lock_guard(local_18,(shared_mutex *)sink_mutex_);
bVar1 = std::unique_ptr::operator_cast_to_bool((unique_ptr *)&sinks_);
if (bVar1) {
pvVar2 = (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)
std::
unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
::operator->((unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
*)&sinks_);
pvVar3 = (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)
std::
unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
::operator->((unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
*)&sinks_);
local_30 = std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>::begin(pvVar3);
pvVar3 = (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)
std::
unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
::operator->((unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
*)&sinks_);
local_38 = std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>::end(pvVar3);
/* try { // try from 0011e68a to 0011e6e3 has its CatchHandler @ 0011e6f4 */
local_28 = std::
remove<__gnu_cxx::__normal_iterator<nglog::LogSink**,std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>,nglog::LogSink*>
(local_30,local_38,&local_10);
__gnu_cxx::
__normal_iterator<nglog::LogSink*const*,std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>
::__normal_iterator<nglog::LogSink**>
((__normal_iterator<nglog::LogSink*const*,std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>
*)&local_20,(__normal_iterator *)&local_28);
pvVar3 = (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)
std::
unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
::operator->((unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
*)&sinks_);
local_58 = std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>::end(pvVar3);
__gnu_cxx::
__normal_iterator<nglog::LogSink*const*,std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>
::__normal_iterator<nglog::LogSink**>
((__normal_iterator<nglog::LogSink*const*,std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>
*)local_50,(__normal_iterator *)&local_58);
std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>::erase(pvVar2,local_20,local_50[0])
;
}
std::lock_guard<std::shared_mutex>::~lock_guard(local_18);
return;
}
|
|
5,671 | nglog::LogDestination::RemoveLogSink(nglog::LogSink*) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::RemoveLogSink(LogSink* destination) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
SinkLock l{sink_mutex_};
// This doesn't keep the sinks in order, but who cares?
if (sinks_) {
sinks_->erase(std::remove(sinks_->begin(), sinks_->end(), destination),
sinks_->end());
}
} | O2 | cpp | nglog::LogDestination::RemoveLogSink(nglog::LogSink*):
pushq %rbx
subq $0x10, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x21521(%rip), %rdi # 0x31cb8
callq 0x1cc72
movq 0x2150d(%rip), %rbx # 0x31cb0
testq %rbx, %rbx
je 0x107cf
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdx
callq 0x115ac
movq 0x214f0(%rip), %rcx # 0x31cb0
movq 0x8(%rcx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11558
leaq 0x214e2(%rip), %rdi # 0x31cb8
callq 0x87a0
addq $0x10, %rsp
popq %rbx
retq
jmp 0x107e3
movq %rax, %rbx
leaq 0x214cb(%rip), %rdi # 0x31cb8
callq 0x87a0
movq %rbx, %rdi
callq 0x8a40
| _ZN5nglog14LogDestination13RemoveLogSinkEPNS_7LogSinkE:
push rbx
sub rsp, 10h
mov [rsp+18h+var_10], rdi
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this
call _ZNSt22__shared_mutex_pthread4lockEv; std::__shared_mutex_pthread::lock(void)
mov rbx, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
test rbx, rbx
jz short loc_107CF
mov rdi, [rbx]
mov rsi, [rbx+8]
lea rdx, [rsp+18h+var_10]
call _ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPPN5nglog7LogSinkESt6vectorIS4_SaIS4_EEEENS0_5__ops16_Iter_equals_valIKS4_EEET_SE_SE_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>>(__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>)
mov rcx, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
mov rdx, [rcx+8]
mov rdi, rbx
mov rsi, rax
call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS2_S4_EES9_; std::vector<nglog::LogSink *>::erase(__gnu_cxx::__normal_iterator<nglog::LogSink * const*,std::vector<nglog::LogSink *>>,__gnu_cxx::__normal_iterator<nglog::LogSink * const*,std::vector<nglog::LogSink *>>)
loc_107CF:
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
add rsp, 10h
pop rbx
retn
jmp short $+2
loc_107E3:
mov rbx, rax
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::RemoveLogSink(nglog::LogDestination *this, nglog::LogSink *a2)
{
long long v2; // rbx
long long v3; // rax
nglog::LogDestination *v5; // [rsp+8h] [rbp-10h] BYREF
v5 = this;
std::__shared_mutex_pthread::lock((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_);
v2 = nglog::LogDestination::sinks_;
if ( nglog::LogDestination::sinks_ )
{
v3 = std::__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>>(
*(_QWORD *)nglog::LogDestination::sinks_,
*(_QWORD *)(nglog::LogDestination::sinks_ + 8),
&v5);
std::vector<nglog::LogSink *>::erase(v2, v3, *(_QWORD *)(nglog::LogDestination::sinks_ + 8));
}
return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_);
}
| RemoveLogSink:
PUSH RBX
SUB RSP,0x10
MOV qword ptr [RSP + 0x8],RDI
LEA RDI,[0x131cb8]
CALL 0x0011cc72
MOV RBX,qword ptr [0x00131cb0]
TEST RBX,RBX
JZ 0x001107cf
MOV RDI,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x8]
LAB_001107af:
LEA RDX,[RSP + 0x8]
CALL 0x001115ac
MOV RCX,qword ptr [0x00131cb0]
MOV RDX,qword ptr [RCX + 0x8]
LAB_001107c4:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00111558
LAB_001107cf:
LEA RDI,[0x131cb8]
CALL 0x001087a0
ADD RSP,0x10
POP RBX
RET
|
/* nglog::LogDestination::RemoveLogSink(nglog::LogSink*) */
void nglog::LogDestination::RemoveLogSink(LogSink *param_1)
{
int8 uVar1;
vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *pvVar2;
LogSink *local_10;
local_10 = param_1;
std::__shared_mutex_pthread::lock((__shared_mutex_pthread *)sink_mutex_);
pvVar2 = sinks_;
if (sinks_ != (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)0x0) {
/* try { // try from 001107af to 001107b8 has its CatchHandler @ 001107e3 */
uVar1 = std::
__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink**,std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink*const>>
(*(int8 *)sinks_,*(int8 *)(sinks_ + 8),&local_10);
/* try { // try from 001107c4 to 001107ce has its CatchHandler @ 001107e1 */
std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>::erase
(pvVar2,uVar1,*(int8 *)(sinks_ + 8));
}
pthread_rwlock_unlock((pthread_rwlock_t *)sink_mutex_);
return;
}
|
|
5,672 | evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*) | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/vm.cpp | evmc_set_option_result set_option(evmc_vm* c_vm, char const* c_name, char const* c_value) noexcept
{
const auto name = (c_name != nullptr) ? std::string_view{c_name} : std::string_view{};
const auto value = (c_value != nullptr) ? std::string_view{c_value} : std::string_view{};
auto& vm = *static_cast<VM*>(c_vm);
if (name == "advanced")
{
c_vm->execute = evmone::advanced::execute;
return EVMC_SET_OPTION_SUCCESS;
}
else if (name == "cgoto")
{
#if EVMONE_CGOTO_SUPPORTED
if (value == "no")
{
vm.cgoto = false;
return EVMC_SET_OPTION_SUCCESS;
}
return EVMC_SET_OPTION_INVALID_VALUE;
#else
return EVMC_SET_OPTION_INVALID_NAME;
#endif
}
else if (name == "trace")
{
vm.add_tracer(create_instruction_tracer(std::clog));
return EVMC_SET_OPTION_SUCCESS;
}
else if (name == "histogram")
{
vm.add_tracer(create_histogram_tracer(std::clog));
return EVMC_SET_OPTION_SUCCESS;
}
else if (name == "validate_eof")
{
vm.validate_eof = true;
return EVMC_SET_OPTION_SUCCESS;
}
return EVMC_SET_OPTION_INVALID_NAME;
} | O0 | cpp | evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3724d
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x38d70
jmp 0x37256
leaq -0x30(%rbp), %rdi
callq 0x38dc0
cmpq $0x0, -0x20(%rbp)
je 0x3726c
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x38d70
jmp 0x37275
leaq -0x40(%rbp), %rdi
callq 0x38dc0
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x68(%rbp), %rdi
leaq 0xa4bda(%rip), %rsi # 0xdbe72
callq 0x38d70
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq 0x38de0
testb $0x1, %al
jne 0x372b8
jmp 0x372d3
movq -0x10(%rbp), %rax
leaq 0x534d(%rip), %rcx # 0x3c610
movq %rcx, 0x20(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x37527
movq -0x30(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x88(%rbp), %rdi
leaq 0xa4b8a(%rip), %rsi # 0xdbe7b
callq 0x38d70
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq -0x80(%rbp), %rcx
callq 0x38de0
testb $0x1, %al
jne 0x37314
jmp 0x37384
movq -0x40(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0xa8(%rbp), %rdi
leaq 0xa4b49(%rip), %rsi # 0xdbe81
callq 0x38d70
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq -0xa0(%rbp), %rcx
callq 0x38de0
testb $0x1, %al
jne 0x37364
jmp 0x37378
movq -0x48(%rbp), %rax
movb $0x0, 0x38(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x37527
movl $0x2, -0x4(%rbp)
jmp 0x37527
movq -0x30(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq 0xa4adc(%rip), %rsi # 0xdbe84
callq 0x38d70
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
movq -0xc0(%rbp), %rcx
callq 0x38de0
testb $0x1, %al
jne 0x373d4
jmp 0x3741f
movq -0x48(%rbp), %rax
movq %rax, -0x120(%rbp)
movq 0xffbaa(%rip), %rsi # 0x136f90
leaq -0xd0(%rbp), %rdi
callq 0x894f0
jmp 0x373f4
movq -0x120(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x38e60
leaq -0xd0(%rbp), %rdi
callq 0x378b0
movl $0x0, -0x4(%rbp)
jmp 0x37527
movq -0x30(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0xf0(%rbp), %rdi
leaq 0xa4a47(%rip), %rsi # 0xdbe8a
callq 0x38d70
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
movq -0xe8(%rbp), %rcx
callq 0x38de0
testb $0x1, %al
jne 0x3746f
jmp 0x374b7
movq -0x48(%rbp), %rax
movq %rax, -0x128(%rbp)
movq 0xffb0f(%rip), %rsi # 0x136f90
leaq -0xf8(%rbp), %rdi
callq 0x893a0
jmp 0x3748f
movq -0x128(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x38e60
leaq -0xf8(%rbp), %rdi
callq 0x378b0
movl $0x0, -0x4(%rbp)
jmp 0x37527
movq -0x30(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq -0x118(%rbp), %rdi
leaq 0xa49b9(%rip), %rsi # 0xdbe94
callq 0x38d70
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rsi
movq -0x118(%rbp), %rdx
movq -0x110(%rbp), %rcx
callq 0x38de0
testb $0x1, %al
jne 0x37507
jmp 0x37518
movq -0x48(%rbp), %rax
movb $0x1, 0x39(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x37527
jmp 0x3751a
jmp 0x3751c
jmp 0x3751e
jmp 0x37520
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
movq %rax, %rdi
callq 0x36420
nopl (%rax,%rax)
| _ZN6evmone12_GLOBAL__N_110set_optionEP7evmc_vmPKcS4_:
push rbp
mov rbp, rsp
sub rsp, 130h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_18], 0
jz short loc_3724D
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_30]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
jmp short loc_37256
loc_3724D:
lea rdi, [rbp+var_30]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2Ev; std::string_view::basic_string_view(void)
loc_37256:
cmp [rbp+var_20], 0
jz short loc_3726C
mov rsi, [rbp+var_20]
lea rdi, [rbp+var_40]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
jmp short loc_37275
loc_3726C:
lea rdi, [rbp+var_40]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2Ev; std::string_view::basic_string_view(void)
loc_37275:
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
mov rax, [rbp+var_28]
mov [rbp+var_50], rax
lea rdi, [rbp+var_68]
lea rsi, aAdvanced; "advanced"
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_68]
mov rcx, [rbp+var_60]
call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type)
test al, 1
jnz short loc_372B8
jmp short loc_372D3
loc_372B8:
mov rax, [rbp+var_10]
lea rcx, _ZN6evmone8advanced7executeEP7evmc_vmPK19evmc_host_interfaceP17evmc_host_context13evmc_revisionPK12evmc_messagePKhm; evmone::advanced::execute(evmc_vm *,evmc_host_interface const*,evmc_host_context *,evmc_revision,evmc_message const*,uchar const*,ulong)
mov [rax+20h], rcx
mov [rbp+var_4], 0
jmp loc_37527
loc_372D3:
mov rax, [rbp+var_30]
mov [rbp+var_78], rax
mov rax, [rbp+var_28]
mov [rbp+var_70], rax
lea rdi, [rbp+var_88]
lea rsi, aCgoto; "cgoto"
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rdi, [rbp+var_78]
mov rsi, [rbp+var_70]
mov rdx, [rbp+var_88]
mov rcx, [rbp+var_80]
call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type)
test al, 1
jnz short loc_37314
jmp short loc_37384
loc_37314:
mov rax, [rbp+var_40]
mov [rbp+var_98], rax
mov rax, [rbp+var_38]
mov [rbp+var_90], rax
lea rdi, [rbp+var_A8]
lea rsi, aNo; "no"
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_90]
mov rdx, [rbp+var_A8]
mov rcx, [rbp+var_A0]
call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type)
test al, 1
jnz short loc_37364
jmp short loc_37378
loc_37364:
mov rax, [rbp+var_48]
mov byte ptr [rax+38h], 0
mov [rbp+var_4], 0
jmp loc_37527
loc_37378:
mov [rbp+var_4], 2
jmp loc_37527
loc_37384:
mov rax, [rbp+var_30]
mov [rbp+var_B8], rax
mov rax, [rbp+var_28]
mov [rbp+var_B0], rax
lea rdi, [rbp+var_C8]
lea rsi, aTrace; "trace"
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rdi, [rbp+var_B8]
mov rsi, [rbp+var_B0]
mov rdx, [rbp+var_C8]
mov rcx, [rbp+var_C0]
call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type)
test al, 1
jnz short loc_373D4
jmp short loc_3741F
loc_373D4:
mov rax, [rbp+var_48]
mov [rbp+var_120], rax
mov rsi, cs:_ZSt4clog_ptr
lea rdi, [rbp+var_D0]
call _ZN6evmone25create_instruction_tracerERSo; evmone::create_instruction_tracer(std::ostream &)
jmp short $+2
loc_373F4:
mov rdi, [rbp+var_120]
lea rsi, [rbp+var_D0]
call _ZN6evmone2VM10add_tracerESt10unique_ptrINS_6TracerESt14default_deleteIS2_EE; evmone::VM::add_tracer(std::unique_ptr<evmone::Tracer>)
lea rdi, [rbp+var_D0]
call _ZNSt10unique_ptrIN6evmone6TracerESt14default_deleteIS1_EED2Ev; std::unique_ptr<evmone::Tracer>::~unique_ptr()
mov [rbp+var_4], 0
jmp loc_37527
loc_3741F:
mov rax, [rbp+var_30]
mov [rbp+var_E0], rax
mov rax, [rbp+var_28]
mov [rbp+var_D8], rax
lea rdi, [rbp+var_F0]
lea rsi, aHistogram; "histogram"
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rdi, [rbp+var_E0]
mov rsi, [rbp+var_D8]
mov rdx, [rbp+var_F0]
mov rcx, [rbp+var_E8]
call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type)
test al, 1
jnz short loc_3746F
jmp short loc_374B7
loc_3746F:
mov rax, [rbp+var_48]
mov [rbp+var_128], rax
mov rsi, cs:_ZSt4clog_ptr
lea rdi, [rbp+var_F8]
call _ZN6evmone23create_histogram_tracerERSo; evmone::create_histogram_tracer(std::ostream &)
jmp short $+2
loc_3748F:
mov rdi, [rbp+var_128]
lea rsi, [rbp+var_F8]
call _ZN6evmone2VM10add_tracerESt10unique_ptrINS_6TracerESt14default_deleteIS2_EE; evmone::VM::add_tracer(std::unique_ptr<evmone::Tracer>)
lea rdi, [rbp+var_F8]
call _ZNSt10unique_ptrIN6evmone6TracerESt14default_deleteIS1_EED2Ev; std::unique_ptr<evmone::Tracer>::~unique_ptr()
mov [rbp+var_4], 0
jmp short loc_37527
loc_374B7:
mov rax, [rbp+var_30]
mov [rbp+var_108], rax
mov rax, [rbp+var_28]
mov [rbp+var_100], rax
lea rdi, [rbp+var_118]
lea rsi, aValidateEof; "validate_eof"
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rdi, [rbp+var_108]
mov rsi, [rbp+var_100]
mov rdx, [rbp+var_118]
mov rcx, [rbp+var_110]
call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type)
test al, 1
jnz short loc_37507
jmp short loc_37518
loc_37507:
mov rax, [rbp+var_48]
mov byte ptr [rax+39h], 1
mov [rbp+var_4], 0
jmp short loc_37527
loc_37518:
jmp short $+2
loc_3751A:
jmp short $+2
loc_3751C:
jmp short $+2
loc_3751E:
jmp short $+2
loc_37520:
mov [rbp+var_4], 1
loc_37527:
mov eax, [rbp+var_4]
add rsp, 130h
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
| long long evmone::`anonymous namespace'::set_option(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+8h] [rbp-128h]
long long v5; // [rsp+10h] [rbp-120h]
_QWORD v6[2]; // [rsp+18h] [rbp-118h] BYREF
long long v7; // [rsp+28h] [rbp-108h]
long long v8; // [rsp+30h] [rbp-100h]
_BYTE v9[8]; // [rsp+38h] [rbp-F8h] BYREF
_QWORD v10[2]; // [rsp+40h] [rbp-F0h] BYREF
long long v11; // [rsp+50h] [rbp-E0h]
long long v12; // [rsp+58h] [rbp-D8h]
_BYTE v13[8]; // [rsp+60h] [rbp-D0h] BYREF
_QWORD v14[2]; // [rsp+68h] [rbp-C8h] BYREF
long long v15; // [rsp+78h] [rbp-B8h]
long long v16; // [rsp+80h] [rbp-B0h]
_QWORD v17[2]; // [rsp+88h] [rbp-A8h] BYREF
long long v18; // [rsp+98h] [rbp-98h]
long long v19; // [rsp+A0h] [rbp-90h]
_QWORD v20[2]; // [rsp+A8h] [rbp-88h] BYREF
long long v21; // [rsp+B8h] [rbp-78h]
long long v22; // [rsp+C0h] [rbp-70h]
_QWORD v23[2]; // [rsp+C8h] [rbp-68h] BYREF
long long v24; // [rsp+D8h] [rbp-58h]
long long v25; // [rsp+E0h] [rbp-50h]
long long v26; // [rsp+E8h] [rbp-48h]
_QWORD v27[2]; // [rsp+F0h] [rbp-40h] BYREF
long long v28; // [rsp+100h] [rbp-30h] BYREF
long long v29; // [rsp+108h] [rbp-28h]
long long v30; // [rsp+110h] [rbp-20h]
long long v31; // [rsp+118h] [rbp-18h]
long long v32; // [rsp+120h] [rbp-10h]
v32 = a1;
v31 = a2;
v30 = a3;
if ( a2 )
std::string_view::basic_string_view(&v28, v31);
else
std::string_view::basic_string_view(&v28);
if ( v30 )
std::string_view::basic_string_view(v27, v30);
else
std::string_view::basic_string_view(v27);
v26 = v32;
v24 = v28;
v25 = v29;
std::string_view::basic_string_view(v23, "advanced");
if ( (std::operator==<char,std::char_traits<char>>(v24, v25, v23[0], v23[1]) & 1) != 0 )
{
*(_QWORD *)(v32 + 32) = evmone::advanced::execute;
return 0;
}
else
{
v21 = v28;
v22 = v29;
std::string_view::basic_string_view(v20, "cgoto");
if ( (std::operator==<char,std::char_traits<char>>(v21, v22, v20[0], v20[1]) & 1) != 0 )
{
v18 = v27[0];
v19 = v27[1];
std::string_view::basic_string_view(v17, "no");
if ( (std::operator==<char,std::char_traits<char>>(v18, v19, v17[0], v17[1]) & 1) != 0 )
{
*(_BYTE *)(v26 + 56) = 0;
return 0;
}
else
{
return 2;
}
}
else
{
v15 = v28;
v16 = v29;
std::string_view::basic_string_view(v14, "trace");
if ( (std::operator==<char,std::char_traits<char>>(v15, v16, v14[0], v14[1]) & 1) != 0 )
{
v5 = v26;
evmone::create_instruction_tracer(v13, &std::clog);
evmone::VM::add_tracer(v5, v13);
std::unique_ptr<evmone::Tracer>::~unique_ptr(v13);
return 0;
}
else
{
v11 = v28;
v12 = v29;
std::string_view::basic_string_view(v10, "histogram");
if ( (std::operator==<char,std::char_traits<char>>(v11, v12, v10[0], v10[1]) & 1) != 0 )
{
v4 = v26;
evmone::create_histogram_tracer(v9, &std::clog);
evmone::VM::add_tracer(v4, v9);
std::unique_ptr<evmone::Tracer>::~unique_ptr(v9);
return 0;
}
else
{
v7 = v28;
v8 = v29;
std::string_view::basic_string_view(v6, "validate_eof");
if ( (std::operator==<char,std::char_traits<char>>(v7, v8, v6[0], v6[1]) & 1) != 0 )
{
*(_BYTE *)(v26 + 57) = 1;
return 0;
}
else
{
return 1;
}
}
}
}
}
}
| set_option:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x130
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 0x0013724d
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x30]
CALL 0x00138d70
JMP 0x00137256
LAB_0013724d:
LEA RDI,[RBP + -0x30]
CALL 0x00138dc0
LAB_00137256:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0013726c
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x40]
CALL 0x00138d70
JMP 0x00137275
LAB_0013726c:
LEA RDI,[RBP + -0x40]
CALL 0x00138dc0
LAB_00137275:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x50],RAX
LEA RDI,[RBP + -0x68]
LEA RSI,[0x1dbe72]
CALL 0x00138d70
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x60]
CALL 0x00138de0
TEST AL,0x1
JNZ 0x001372b8
JMP 0x001372d3
LAB_001372b8:
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x13c610]
MOV qword ptr [RAX + 0x20],RCX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00137527
LAB_001372d3:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x70],RAX
LEA RDI,[RBP + -0x88]
LEA RSI,[0x1dbe7b]
CALL 0x00138d70
MOV RDI,qword ptr [RBP + -0x78]
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x80]
CALL 0x00138de0
TEST AL,0x1
JNZ 0x00137314
JMP 0x00137384
LAB_00137314:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x90],RAX
LEA RDI,[RBP + -0xa8]
LEA RSI,[0x1dbe81]
CALL 0x00138d70
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x90]
MOV RDX,qword ptr [RBP + -0xa8]
MOV RCX,qword ptr [RBP + -0xa0]
CALL 0x00138de0
TEST AL,0x1
JNZ 0x00137364
JMP 0x00137378
LAB_00137364:
MOV RAX,qword ptr [RBP + -0x48]
MOV byte ptr [RAX + 0x38],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00137527
LAB_00137378:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00137527
LAB_00137384:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0xb0],RAX
LEA RDI,[RBP + -0xc8]
LEA RSI,[0x1dbe84]
CALL 0x00138d70
MOV RDI,qword ptr [RBP + -0xb8]
MOV RSI,qword ptr [RBP + -0xb0]
MOV RDX,qword ptr [RBP + -0xc8]
MOV RCX,qword ptr [RBP + -0xc0]
CALL 0x00138de0
TEST AL,0x1
JNZ 0x001373d4
JMP 0x0013741f
LAB_001373d4:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x120],RAX
LAB_001373df:
MOV RSI,qword ptr [0x00236f90]
LEA RDI,[RBP + -0xd0]
CALL 0x001894f0
JMP 0x001373f4
LAB_001373f4:
MOV RDI,qword ptr [RBP + -0x120]
LEA RSI,[RBP + -0xd0]
CALL 0x00138e60
LEA RDI,[RBP + -0xd0]
CALL 0x001378b0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00137527
LAB_0013741f:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0xe0],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0xd8],RAX
LEA RDI,[RBP + -0xf0]
LEA RSI,[0x1dbe8a]
CALL 0x00138d70
MOV RDI,qword ptr [RBP + -0xe0]
MOV RSI,qword ptr [RBP + -0xd8]
MOV RDX,qword ptr [RBP + -0xf0]
MOV RCX,qword ptr [RBP + -0xe8]
CALL 0x00138de0
TEST AL,0x1
JNZ 0x0013746f
JMP 0x001374b7
LAB_0013746f:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x128],RAX
MOV RSI,qword ptr [0x00236f90]
LEA RDI,[RBP + -0xf8]
CALL 0x001893a0
JMP 0x0013748f
LAB_0013748f:
MOV RDI,qword ptr [RBP + -0x128]
LEA RSI,[RBP + -0xf8]
CALL 0x00138e60
LEA RDI,[RBP + -0xf8]
CALL 0x001378b0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00137527
LAB_001374b7:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x108],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x100],RAX
LEA RDI,[RBP + -0x118]
LEA RSI,[0x1dbe94]
CALL 0x00138d70
MOV RDI,qword ptr [RBP + -0x108]
MOV RSI,qword ptr [RBP + -0x100]
MOV RDX,qword ptr [RBP + -0x118]
MOV RCX,qword ptr [RBP + -0x110]
CALL 0x00138de0
TEST AL,0x1
JNZ 0x00137507
JMP 0x00137518
LAB_00137507:
MOV RAX,qword ptr [RBP + -0x48]
MOV byte ptr [RAX + 0x39],0x1
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00137527
LAB_00137518:
JMP 0x0013751a
LAB_0013751a:
JMP 0x0013751c
LAB_0013751c:
JMP 0x0013751e
LAB_0013751e:
JMP 0x00137520
LAB_00137520:
MOV dword ptr [RBP + -0x4],0x1
LAB_00137527:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x130
POP RBP
RET
|
/* evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*) */
int4 evmone::(anonymous_namespace)::set_option(evmc_vm *param_1,char *param_2,char *param_3)
{
evmc_vm *peVar1;
bool bVar2;
int8 local_120;
int8 local_118;
int8 local_110;
int8 local_108;
evmone local_100 [8];
int8 local_f8;
int8 local_f0;
int8 local_e8;
int8 local_e0;
evmone local_d8 [8];
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_a0;
int8 local_98;
int8 local_90;
int8 local_88;
int8 local_80;
int8 local_78;
int8 local_70;
int8 local_68;
int8 local_60;
int8 local_58;
evmc_vm *local_50;
int8 local_48;
int8 local_40;
int8 local_38;
int8 local_30;
char *local_28;
char *local_20;
evmc_vm *local_18;
int4 local_c;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if (param_2 == (char *)0x0) {
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_38);
}
else {
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_38,param_2);
}
if (local_28 == (char *)0x0) {
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_48);
}
else {
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_48,local_28);
}
local_50 = local_18;
local_60 = local_38;
local_58 = local_30;
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_70,"advanced");
bVar2 = std::operator==(local_60,local_58,local_70,local_68);
if (bVar2) {
*(code **)(local_18 + 0x20) = advanced::execute;
local_c = 0;
}
else {
local_80 = local_38;
local_78 = local_30;
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_90,"cgoto");
bVar2 = std::operator==(local_80,local_78,local_90,local_88);
if (bVar2) {
local_a0 = local_48;
local_98 = local_40;
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_b0,"no");
bVar2 = std::operator==(local_a0,local_98,local_b0,local_a8);
if (bVar2) {
local_50[0x38] = (evmc_vm)0x0;
local_c = 0;
}
else {
local_c = 2;
}
}
else {
local_c0 = local_38;
local_b8 = local_30;
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_d0,"trace");
bVar2 = std::operator==(local_c0,local_b8,local_d0,local_c8);
peVar1 = local_50;
if (bVar2) {
/* try { // try from 001373df to 0013748c has its CatchHandler @ 00137533 */
create_instruction_tracer(local_d8,(ostream *)PTR_clog_00236f90);
VM::add_tracer((VM *)peVar1,local_d8);
std::unique_ptr<evmone::Tracer,std::default_delete<evmone::Tracer>>::~unique_ptr
((unique_ptr<evmone::Tracer,std::default_delete<evmone::Tracer>> *)local_d8);
local_c = 0;
}
else {
local_e8 = local_38;
local_e0 = local_30;
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_f8,"histogram");
bVar2 = std::operator==(local_e8,local_e0,local_f8,local_f0);
peVar1 = local_50;
if (bVar2) {
create_histogram_tracer(local_100,(ostream *)PTR_clog_00236f90);
VM::add_tracer((VM *)peVar1,local_100);
std::unique_ptr<evmone::Tracer,std::default_delete<evmone::Tracer>>::~unique_ptr
((unique_ptr<evmone::Tracer,std::default_delete<evmone::Tracer>> *)local_100);
local_c = 0;
}
else {
local_110 = local_38;
local_108 = local_30;
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_120,"validate_eof");
bVar2 = std::operator==(local_110,local_108,local_120,local_118);
if (bVar2) {
*(VM *)(local_50 + 0x39) = (VM)0x1;
local_c = 0;
}
else {
local_c = 1;
}
}
}
}
}
return local_c;
}
|
|
5,673 | ggml_log_internal_v | monkey531[P]llama/ggml/src/ggml.c | static void ggml_log_internal_v(enum ggml_log_level level, const char * format, va_list args) {
if (format == NULL) {
return;
}
va_list args_copy;
va_copy(args_copy, args);
char buffer[128];
int len = vsnprintf(buffer, 128, format, args);
if (len < 128) {
g_logger_state.log_callback(level, buffer, g_logger_state.log_callback_user_data);
} else {
char * buffer2 = (char *) calloc(len + 1, sizeof(char));
vsnprintf(buffer2, len + 1, format, args_copy);
buffer2[len] = 0;
g_logger_state.log_callback(level, buffer2, g_logger_state.log_callback_user_data);
free(buffer2);
}
va_end(args_copy);
} | O0 | c | ggml_log_internal_v:
subq $0xc8, %rsp
movl %edi, 0xc4(%rsp)
movq %rsi, 0xb8(%rsp)
movq %rdx, 0xb0(%rsp)
cmpq $0x0, 0xb8(%rsp)
jne 0x4825e
jmp 0x4833b
leaq 0x90(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
leaq 0x10(%rsp), %rdi
movq 0xb8(%rsp), %rdx
movq 0xb0(%rsp), %rcx
movl $0x80, %esi
callq 0x425b0
movl %eax, 0xc(%rsp)
cmpl $0x80, 0xc(%rsp)
jge 0x482c7
movq 0x97158(%rip), %rax # 0xdf408
movl 0xc4(%rsp), %edi
leaq 0x10(%rsp), %rsi
movq 0x9714d(%rip), %rdx # 0xdf410
callq *%rax
jmp 0x48333
movl 0xc(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x42810
movq %rax, (%rsp)
movq (%rsp), %rdi
movl 0xc(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq 0xb8(%rsp), %rdx
leaq 0x90(%rsp), %rcx
callq 0x425b0
movq (%rsp), %rax
movslq 0xc(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x970f2(%rip), %rax # 0xdf408
movl 0xc4(%rsp), %edi
movq (%rsp), %rsi
movq 0x970e8(%rip), %rdx # 0xdf410
callq *%rax
movq (%rsp), %rdi
callq 0x448e0
leaq 0x90(%rsp), %rax
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
| ggml_log_internal_v:
sub rsp, 0C8h
mov [rsp+0C8h+var_4], edi
mov [rsp+0C8h+var_10], rsi
mov [rsp+0C8h+var_18], rdx
cmp [rsp+0C8h+var_10], 0
jnz short loc_4825E
jmp loc_4833B
loc_4825E:
lea rax, [rsp+0C8h+var_38]
mov rcx, [rsp+0C8h+var_18]
mov rdx, [rcx+10h]
mov [rax+10h], rdx
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rax], xmm0
lea rdi, [rsp+0C8h+var_B8]
mov rdx, [rsp+0C8h+var_10]
mov rcx, [rsp+0C8h+var_18]
mov esi, 80h
call _vsnprintf
mov [rsp+0C8h+var_BC], eax
cmp [rsp+0C8h+var_BC], 80h
jge short loc_482C7
mov rax, cs:g_logger_state
mov edi, [rsp+0C8h+var_4]
lea rsi, [rsp+0C8h+var_B8]
mov rdx, cs:qword_DF410
call rax ; ggml_log_callback_default
jmp short loc_48333
loc_482C7:
mov eax, [rsp+0C8h+var_BC]
add eax, 1
movsxd rdi, eax
mov esi, 1
call _calloc
mov [rsp+0C8h+var_C8], rax
mov rdi, [rsp+0C8h+var_C8]
mov eax, [rsp+0C8h+var_BC]
add eax, 1
movsxd rsi, eax
mov rdx, [rsp+0C8h+var_10]
lea rcx, [rsp+0C8h+var_38]
call _vsnprintf
mov rax, [rsp+0C8h+var_C8]
movsxd rcx, [rsp+0C8h+var_BC]
mov byte ptr [rax+rcx], 0
mov rax, cs:g_logger_state
mov edi, [rsp+0C8h+var_4]
mov rsi, [rsp+0C8h+var_C8]
mov rdx, cs:qword_DF410
call rax ; ggml_log_callback_default
mov rdi, [rsp+0C8h+var_C8]
call _free
loc_48333:
lea rax, [rsp+0C8h+var_38]
loc_4833B:
add rsp, 0C8h
retn
| void ggml_log_internal_v(int a1, long long a2, __int128 *a3)
{
long long v3; // [rsp+0h] [rbp-C8h]
int v4; // [rsp+Ch] [rbp-BCh]
_BYTE v5[128]; // [rsp+10h] [rbp-B8h] BYREF
__int128 v6; // [rsp+90h] [rbp-38h] BYREF
long long v7; // [rsp+A0h] [rbp-28h]
__int128 *v8; // [rsp+B0h] [rbp-18h]
long long v9; // [rsp+B8h] [rbp-10h]
int v10; // [rsp+C4h] [rbp-4h]
v10 = a1;
v9 = a2;
v8 = a3;
if ( a2 )
{
v7 = *((_QWORD *)v8 + 2);
v6 = *v8;
v4 = vsnprintf(v5, 128LL, v9, v8);
if ( v4 >= 128 )
{
v3 = calloc(v4 + 1, 1LL);
vsnprintf(v3, v4 + 1, v9, &v6);
*(_BYTE *)(v3 + v4) = 0;
g_logger_state();
free(v3, v3);
}
else
{
g_logger_state();
}
}
}
| ggml_log_internal_v:
SUB RSP,0xc8
MOV dword ptr [RSP + 0xc4],EDI
MOV qword ptr [RSP + 0xb8],RSI
MOV qword ptr [RSP + 0xb0],RDX
CMP qword ptr [RSP + 0xb8],0x0
JNZ 0x0014825e
JMP 0x0014833b
LAB_0014825e:
LEA RAX,[RSP + 0x90]
MOV RCX,qword ptr [RSP + 0xb0]
MOV RDX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x10],RDX
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RAX],XMM0
LEA RDI,[RSP + 0x10]
MOV RDX,qword ptr [RSP + 0xb8]
MOV RCX,qword ptr [RSP + 0xb0]
MOV ESI,0x80
CALL 0x001425b0
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x80
JGE 0x001482c7
MOV RAX,qword ptr [0x001df408]
MOV EDI,dword ptr [RSP + 0xc4]
LEA RSI,[RSP + 0x10]
MOV RDX,qword ptr [0x001df410]
CALL RAX
JMP 0x00148333
LAB_001482c7:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOVSXD RDI,EAX
MOV ESI,0x1
CALL 0x00142810
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP]
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOVSXD RSI,EAX
MOV RDX,qword ptr [RSP + 0xb8]
LEA RCX,[RSP + 0x90]
CALL 0x001425b0
MOV RAX,qword ptr [RSP]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RAX,qword ptr [0x001df408]
MOV EDI,dword ptr [RSP + 0xc4]
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [0x001df410]
CALL RAX
MOV RDI,qword ptr [RSP]
CALL 0x001448e0
LAB_00148333:
LEA RAX,[RSP + 0x90]
LAB_0014833b:
ADD RSP,0xc8
RET
|
void ggml_log_internal_v(int4 param_1,char *param_2,int8 *param_3)
{
int iVar1;
char *__s;
char local_b8 [128];
int8 local_38;
int8 uStack_30;
int8 local_28;
int8 *local_18;
char *local_10;
int4 local_4;
if (param_2 != (char *)0x0) {
local_28 = param_3[2];
local_38 = *param_3;
uStack_30 = param_3[1];
local_18 = param_3;
local_10 = param_2;
local_4 = param_1;
iVar1 = vsnprintf(local_b8,0x80,param_2,param_3);
if (iVar1 < 0x80) {
(*(code *)g_logger_state)(local_4,local_b8,DAT_001df410);
}
else {
__s = (char *)calloc((long)(iVar1 + 1),1);
vsnprintf(__s,(long)(iVar1 + 1),local_10,&local_38);
__s[iVar1] = '\0';
(*(code *)g_logger_state)(local_4,__s,DAT_001df410);
free(__s);
}
}
return;
}
|
|
5,674 | my_filename | eloqsql/mysys/my_div.c | char * my_filename(File fd)
{
DBUG_ENTER("my_filename");
if ((uint) fd >= (uint) my_file_limit || !my_file_info[fd].name)
DBUG_RETURN((char*) "UNKNOWN");
if (fd >= 0 && my_file_info[fd].type != UNOPEN)
{
DBUG_RETURN(my_file_info[fd].name);
}
else
DBUG_RETURN((char*) "UNOPENED"); /* Debug message */
} | O3 | c | my_filename:
pushq %rbp
movq %rsp, %rbp
leaq 0x2dcbd1(%rip), %rcx # 0x385b10
leaq 0x3417c(%rip), %rax # 0xdd0c2
cmpl %edi, (%rcx)
jbe 0xa8f7b
leaq 0x2dcbc7(%rip), %rcx # 0x385b18
movq (%rcx), %rcx
movslq %edi, %rdx
shlq $0x4, %rdx
movq (%rcx,%rdx), %rsi
testq %rsi, %rsi
je 0xa8f7b
testl %edi, %edi
js 0xa8f74
addq %rdx, %rcx
cmpl $0x0, 0x8(%rcx)
movq %rsi, %rax
jne 0xa8f7b
leaq 0x3414f(%rip), %rax # 0xdd0ca
popq %rbp
retq
nopl (%rax)
| my_filename:
push rbp
mov rbp, rsp
lea rcx, my_file_limit
lea rax, aUnknown_1; "UNKNOWN"
cmp [rcx], edi
jbe short loc_A8F7B
lea rcx, my_file_info
mov rcx, [rcx]
movsxd rdx, edi
shl rdx, 4
mov rsi, [rcx+rdx]
test rsi, rsi
jz short loc_A8F7B
test edi, edi
js short loc_A8F74
add rcx, rdx
cmp dword ptr [rcx+8], 0
mov rax, rsi
jnz short loc_A8F7B
loc_A8F74:
lea rax, aUnopened; "UNOPENED"
loc_A8F7B:
pop rbp
retn
| const char * my_filename(int a1)
{
const char *result; // rax
long long v2; // rdx
result = "UNKNOWN";
if ( my_file_limit[0] > (unsigned int)a1 )
{
v2 = 16LL * a1;
if ( *(_QWORD *)((char *)my_file_info + v2) )
{
if ( a1 < 0 )
return "UNOPENED";
result = (const char *)*((_QWORD *)my_file_info + 2 * a1);
if ( !*(_DWORD *)((char *)my_file_info + v2 + 8) )
return "UNOPENED";
}
}
return result;
}
| my_filename:
PUSH RBP
MOV RBP,RSP
LEA RCX,[0x485b10]
LEA RAX,[0x1dd0c2]
CMP dword ptr [RCX],EDI
JBE 0x001a8f7b
LEA RCX,[0x485b18]
MOV RCX,qword ptr [RCX]
MOVSXD RDX,EDI
SHL RDX,0x4
MOV RSI,qword ptr [RCX + RDX*0x1]
TEST RSI,RSI
JZ 0x001a8f7b
TEST EDI,EDI
JS 0x001a8f74
ADD RCX,RDX
CMP dword ptr [RCX + 0x8],0x0
MOV RAX,RSI
JNZ 0x001a8f7b
LAB_001a8f74:
LEA RAX,[0x1dd0ca]
LAB_001a8f7b:
POP RBP
RET
|
char * my_filename(uint param_1)
{
char *pcVar1;
pcVar1 = "UNKNOWN";
if (param_1 < my_file_limit) {
if ((*(char **)(my_file_info + (long)(int)param_1 * 0x10) != (char *)0x0) &&
(((int)param_1 < 0 ||
(pcVar1 = *(char **)(my_file_info + (long)(int)param_1 * 0x10),
*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) == 0)))) {
pcVar1 = "UNOPENED";
}
}
return pcVar1;
}
|
|
5,675 | 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>::push_back(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>> const&) | monkey531[P]llama/common/json.hpp | void push_back(const typename object_t::value_type& val)
{
// push_back only works for null objects or objects
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value = value_t::object;
assert_invariant();
}
// add element to object
auto res = m_data.m_value.object->insert(val);
set_parent(res.first->second);
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(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>> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
jne 0x8cff5
movb $0x1, (%r14)
callq 0x4218a
movq %rax, 0x8(%r14)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x42092
jmp 0x8cffa
cmpl $0x1, %eax
jne 0x8d00e
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x8d184
pushq $0x20
popq %rdi
callq 0x24480
movq %rax, %rbx
movq %r14, %rdi
callq 0x479ee
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x2c490(%rip), %rsi # 0xb94c0
leaq 0x10(%rsp), %rdi
callq 0x67813
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x478a2
xorl %ebp, %ebp
leaq 0x73eed(%rip), %rsi # 0x100f48
leaq -0x48ae4(%rip), %rdx # 0x4457e
movq %rbx, %rdi
callq 0x24fa0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x25288
testb %bpl, %bpl
jne 0x8d081
jmp 0x8d089
movq %rax, %r14
movq %rbx, %rdi
callq 0x246c0
movq %r14, %rdi
callq 0x25020
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jnz short loc_8CFF5
mov byte ptr [r14], 1
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_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<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>()
mov [r14+8], rax
push 1
pop rsi
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
jmp short loc_8CFFA
loc_8CFF5:
cmp eax, 1
jnz short loc_8D00E
loc_8CFFA:
mov rdi, [r14+8]
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::insert(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&)
loc_8D00E:
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, aCannotUsePushB; "cannot use push_back() with "
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, 134h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_8D081
jmp short loc_8D089
mov r14, rax
loc_8D081:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8D089:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"cannot use push_back() with ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
308,
(long long)v5);
__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);
}
}
else
{
*(_BYTE *)a1 = 1;
*(_QWORD *)(a1 + 8) = 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>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>>();
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
return nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert(
*(_QWORD *)(a1 + 8),
a2);
}
| push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JNZ 0x0018cff5
MOV byte ptr [R14],0x1
CALL 0x0014218a
MOV qword ptr [R14 + 0x8],RAX
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x00142092
JMP 0x0018cffa
LAB_0018cff5:
CMP EAX,0x1
JNZ 0x0018d00e
LAB_0018cffa:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x0018d184
LAB_0018d00e:
PUSH 0x20
POP RDI
CALL 0x00124480
MOV RBX,RAX
MOV RDI,R14
CALL 0x001479ee
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0018d029:
LEA RSI,[0x1b94c0]
LEA RDI,[RSP + 0x10]
CALL 0x00167813
MOV BPL,0x1
LAB_0018d03d:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x001478a2
XOR EBP,EBP
LEA RSI,[0x200f48]
LEA RDX,[0x14457e]
MOV RDI,RBX
CALL 0x00124fa0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::push_back(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> > const&) */
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>
::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,pair *param_1)
{
ordered_map *poVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1;
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 + 8) = poVar1;
assert_invariant(SUB81(this,0));
}
else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 0018d029 to 0018d039 has its CatchHandler @ 0018d07e */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 0018d03d to 0018d069 has its CatchHandler @ 0018d06a */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
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>>>>
::insert(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8),param_1);
return;
}
|
|
5,676 | 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>::push_back(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>> const&) | monkey531[P]llama/common/json.hpp | void push_back(const typename object_t::value_type& val)
{
// push_back only works for null objects or objects
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value = value_t::object;
assert_invariant();
}
// add element to object
auto res = m_data.m_value.object->insert(val);
set_parent(res.first->second);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(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>> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
jne 0xbd49c
movb $0x1, (%r14)
movl $0x20, %edi
callq 0x1b8f0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x5d774
jmp 0xbd4a1
cmpl $0x1, %eax
jne 0xbd4b5
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xbd6b6
movl $0x20, %edi
callq 0x1b460
movq %rax, %rbx
movq %r14, %rdi
callq 0x63c4a
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x37ff7(%rip), %rsi # 0xf54d0
leaq 0x10(%rsp), %rdi
callq 0x8b5e9
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x639f2
xorl %ebp, %ebp
leaq 0x71a44(%rip), %rsi # 0x12ef48
leaq -0x5d68b(%rip), %rdx # 0x5fe80
movq %rbx, %rdi
callq 0x1bfb0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbd531
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b910
testb %bpl, %bpl
jne 0xbd53b
jmp 0xbd543
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b6a0
movq %r14, %rdi
callq 0x1c030
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jnz short loc_BD49C
mov byte ptr [r14], 1
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
jmp short loc_BD4A1
loc_BD49C:
cmp eax, 1
jnz short loc_BD4B5
loc_BD4A1:
mov rdi, [r14+8]
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::insert(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&)
loc_BD4B5:
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, aCannotUsePushB; "cannot use push_back() with "
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, 134h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BD531
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BD531:
test bpl, bpl
jnz short loc_BD53B
jmp short loc_BD543
mov r14, rax
loc_BD53B:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_BD543:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back(
long long a1,
long long a2)
{
long long v2; // 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
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 1 )
{
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)"cannot use push_back() with ",
&v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
308,
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);
}
}
else
{
*(_BYTE *)a1 = 1;
v2 = operator new(0x20uLL);
*(_OWORD *)v2 = 0LL;
*(_QWORD *)(v2 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v2;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
return nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert(
*(_QWORD *)(a1 + 8),
a2);
}
| push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JNZ 0x001bd49c
MOV byte ptr [R14],0x1
MOV EDI,0x20
CALL 0x0011b8f0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015d774
JMP 0x001bd4a1
LAB_001bd49c:
CMP EAX,0x1
JNZ 0x001bd4b5
LAB_001bd4a1:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x001bd6b6
LAB_001bd4b5:
MOV EDI,0x20
CALL 0x0011b460
MOV RBX,RAX
MOV RDI,R14
CALL 0x00163c4a
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001bd4d2:
LEA RSI,[0x1f54d0]
LEA RDI,[RSP + 0x10]
CALL 0x0018b5e9
MOV BPL,0x1
LAB_001bd4e6:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x001639f2
XOR EBP,EBP
LEA RSI,[0x22ef48]
LEA RDX,[0x15fe80]
MOV RDI,RBX
CALL 0x0011bfb0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::push_back(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> > const&) */
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>
::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,pair *param_1)
{
int8 *puVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1;
puVar1 = (int8 *)operator_new(0x20);
*puVar1 = 0;
puVar1[1] = 0;
puVar1[2] = 0;
*(int8 **)(this + 8) = puVar1;
assert_invariant(SUB81(this,0));
}
else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001bd4d2 to 001bd4e2 has its CatchHandler @ 001bd538 */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 001bd4e6 to 001bd512 has its CatchHandler @ 001bd513 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
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>>>>
::insert(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8),param_1);
return;
}
|
|
5,677 | stbtt__csctx_v | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-truetype.h | static void stbtt__csctx_v(stbtt__csctx *c, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx, stbtt_int32 cy, stbtt_int32 cx1, stbtt_int32 cy1)
{
if (c->bounds) {
stbtt__track_vertex(c, x, y);
if (type == STBTT_vcubic) {
stbtt__track_vertex(c, cx, cy);
stbtt__track_vertex(c, cx1, cy1);
}
} else {
stbtt_setvertex(&c->pvertices[c->num_vertices], type, x, y, cx, cy);
c->pvertices[c->num_vertices].cx1 = (stbtt_int16) cx1;
c->pvertices[c->num_vertices].cy1 = (stbtt_int16) cy1;
}
c->num_vertices++;
} | O0 | c | stbtt__csctx_v:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movl 0x18(%rbp), %esi
movl 0x10(%rbp), %esi
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
je 0x5c3f7
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x5c480
movzbl -0x9(%rbp), %eax
cmpl $0x4, %eax
jne 0x5c3f5
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x5c480
movq -0x8(%rbp), %rdi
movl 0x10(%rbp), %esi
movl 0x18(%rbp), %edx
callq 0x5c480
jmp 0x5c469
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x30(%rax), %rax
imulq $0xe, %rax, %rax
addq %rax, %rdi
movb -0x9(%rbp), %al
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %r8d
movl -0x1c(%rbp), %r9d
movzbl %al, %esi
callq 0x5adc0
movl 0x10(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rdx
movslq 0x30(%rdx), %rdx
imulq $0xe, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0x8(%rax)
movl 0x18(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rdx
movslq 0x30(%rdx), %rdx
imulq $0xe, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0xa(%rax)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x30(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| stbtt__csctx_v:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov esi, [rbp+arg_8]
mov esi, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov [rbp+var_10], edx
mov [rbp+var_14], ecx
mov [rbp+var_18], r8d
mov [rbp+var_1C], r9d
mov rax, [rbp+var_8]
cmp dword ptr [rax], 0
jz short loc_5C3F7
mov rdi, [rbp+var_8]
mov esi, [rbp+var_10]
mov edx, [rbp+var_14]
call stbtt__track_vertex
movzx eax, [rbp+var_9]
cmp eax, 4
jnz short loc_5C3F5
mov rdi, [rbp+var_8]
mov esi, [rbp+var_18]
mov edx, [rbp+var_1C]
call stbtt__track_vertex
mov rdi, [rbp+var_8]
mov esi, [rbp+arg_0]
mov edx, [rbp+arg_8]
call stbtt__track_vertex
loc_5C3F5:
jmp short loc_5C469
loc_5C3F7:
mov rax, [rbp+var_8]
mov rdi, [rax+28h]
mov rax, [rbp+var_8]
movsxd rax, dword ptr [rax+30h]
imul rax, 0Eh
add rdi, rax
mov al, [rbp+var_9]
mov edx, [rbp+var_10]
mov ecx, [rbp+var_14]
mov r8d, [rbp+var_18]
mov r9d, [rbp+var_1C]
movzx esi, al
call stbtt_setvertex
mov eax, [rbp+arg_0]
mov cx, ax
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rdx, [rbp+var_8]
movsxd rdx, dword ptr [rdx+30h]
imul rdx, 0Eh
add rax, rdx
mov [rax+8], cx
mov eax, [rbp+arg_8]
mov cx, ax
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rdx, [rbp+var_8]
movsxd rdx, dword ptr [rdx+30h]
imul rdx, 0Eh
add rax, rdx
mov [rax+0Ah], cx
loc_5C469:
mov rax, [rbp+var_8]
mov ecx, [rax+30h]
add ecx, 1
mov [rax+30h], ecx
add rsp, 20h
pop rbp
retn
| long long stbtt__csctx_v(
long long a1,
char a2,
unsigned int a3,
unsigned int a4,
unsigned int a5,
unsigned int a6,
unsigned int a7,
unsigned int a8)
{
long long result; // rax
if ( *(_DWORD *)a1 )
{
stbtt__track_vertex(a1, a3, a4);
if ( a2 == 4 )
{
stbtt__track_vertex(a1, a5, a6);
stbtt__track_vertex(a1, a7, a8);
}
}
else
{
stbtt_setvertex(14LL * *(int *)(a1 + 48) + *(_QWORD *)(a1 + 40), a2, a3, a4, a5, a6);
*(_WORD *)(14LL * *(int *)(a1 + 48) + *(_QWORD *)(a1 + 40) + 8) = a7;
*(_WORD *)(14LL * *(int *)(a1 + 48) + *(_QWORD *)(a1 + 40) + 10) = a8;
}
result = a1;
++*(_DWORD *)(a1 + 48);
return result;
}
| stbtt__csctx_v:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV ESI,dword ptr [RBP + 0x18]
MOV ESI,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV dword ptr [RBP + -0x10],EDX
MOV dword ptr [RBP + -0x14],ECX
MOV dword ptr [RBP + -0x18],R8D
MOV dword ptr [RBP + -0x1c],R9D
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX],0x0
JZ 0x0015c3f7
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL 0x0015c480
MOVZX EAX,byte ptr [RBP + -0x9]
CMP EAX,0x4
JNZ 0x0015c3f5
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x0015c480
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + 0x10]
MOV EDX,dword ptr [RBP + 0x18]
CALL 0x0015c480
LAB_0015c3f5:
JMP 0x0015c469
LAB_0015c3f7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX + 0x30]
IMUL RAX,RAX,0xe
ADD RDI,RAX
MOV AL,byte ptr [RBP + -0x9]
MOV EDX,dword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
MOV R8D,dword ptr [RBP + -0x18]
MOV R9D,dword ptr [RBP + -0x1c]
MOVZX ESI,AL
CALL 0x0015adc0
MOV EAX,dword ptr [RBP + 0x10]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RDX + 0x30]
IMUL RDX,RDX,0xe
ADD RAX,RDX
MOV word ptr [RAX + 0x8],CX
MOV EAX,dword ptr [RBP + 0x18]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RDX + 0x30]
IMUL RDX,RDX,0xe
ADD RAX,RDX
MOV word ptr [RAX + 0xa],CX
LAB_0015c469:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x30]
ADD ECX,0x1
MOV dword ptr [RAX + 0x30],ECX
ADD RSP,0x20
POP RBP
RET
|
void stbtt__csctx_v(int *param_1,char param_2,int4 param_3,int4 param_4,
int4 param_5,int4 param_6,int4 param_7,int4 param_8)
{
if (*param_1 == 0) {
stbtt_setvertex(*(long *)(param_1 + 10) + (long)param_1[0xc] * 0xe,param_2,param_3,param_4,
param_5,param_6);
*(short *)(*(long *)(param_1 + 10) + (long)param_1[0xc] * 0xe + 8) = (short)param_7;
*(short *)(*(long *)(param_1 + 10) + (long)param_1[0xc] * 0xe + 10) = (short)param_8;
}
else {
stbtt__track_vertex(param_1,param_3,param_4);
if (param_2 == '\x04') {
stbtt__track_vertex(param_1,param_5,param_6);
stbtt__track_vertex(param_1,param_7,param_8);
}
}
param_1[0xc] = param_1[0xc] + 1;
return;
}
|
|
5,678 | stbtt__csctx_v | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-truetype.h | static void stbtt__csctx_v(stbtt__csctx *c, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx, stbtt_int32 cy, stbtt_int32 cx1, stbtt_int32 cy1)
{
if (c->bounds) {
stbtt__track_vertex(c, x, y);
if (type == STBTT_vcubic) {
stbtt__track_vertex(c, cx, cy);
stbtt__track_vertex(c, cx1, cy1);
}
} else {
stbtt_setvertex(&c->pvertices[c->num_vertices], type, x, y, cx, cy);
c->pvertices[c->num_vertices].cx1 = (stbtt_int16) cx1;
c->pvertices[c->num_vertices].cy1 = (stbtt_int16) cy1;
}
c->num_vertices++;
} | O1 | c | stbtt__csctx_v:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r14d
movl %r8d, %r12d
movl %esi, %r13d
movq %rdi, %rbx
movl 0x48(%rsp), %ebp
movl 0x40(%rsp), %r15d
cmpl $0x0, (%rdi)
je 0x27b9b
movq %rbx, %rdi
movl %edx, %esi
movl %ecx, %edx
callq 0x27be5
cmpb $0x4, %r13b
jne 0x27bd3
movq %rbx, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0x27be5
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x27be5
jmp 0x27bd3
movq 0x28(%rbx), %rax
movslq 0x30(%rbx), %rsi
leaq (%rsi,%rsi), %rdi
shlq $0x4, %rsi
subq %rdi, %rsi
movb %r13b, 0xc(%rax,%rsi)
movw %dx, (%rax,%rsi)
movw %cx, 0x2(%rax,%rsi)
movw %r12w, 0x4(%rax,%rsi)
movw %r14w, 0x6(%rax,%rsi)
movw %r15w, 0x8(%rax,%rsi)
movw %bp, 0xa(%rax,%rsi)
incl 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| stbtt__csctx_v:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14d, r9d
mov r12d, r8d
mov r13d, esi
mov rbx, rdi
mov ebp, [rsp+38h+arg_8]
mov r15d, [rsp+38h+arg_0]
cmp dword ptr [rdi], 0
jz short loc_27B9B
mov rdi, rbx
mov esi, edx
mov edx, ecx
call stbtt__track_vertex
cmp r13b, 4
jnz short loc_27BD3
mov rdi, rbx
mov esi, r12d
mov edx, r14d
call stbtt__track_vertex
mov rdi, rbx
mov esi, r15d
mov edx, ebp
call stbtt__track_vertex
jmp short loc_27BD3
loc_27B9B:
mov rax, [rbx+28h]
movsxd rsi, dword ptr [rbx+30h]
lea rdi, [rsi+rsi]
shl rsi, 4
sub rsi, rdi
mov [rax+rsi+0Ch], r13b
mov [rax+rsi], dx
mov [rax+rsi+2], cx
mov [rax+rsi+4], r12w
mov [rax+rsi+6], r14w
mov [rax+rsi+8], r15w
mov [rax+rsi+0Ah], bp
loc_27BD3:
inc dword ptr [rbx+30h]
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long stbtt__csctx_v(
long long a1,
char a2,
unsigned int a3,
unsigned int a4,
unsigned int a5,
unsigned int a6,
unsigned int a7,
unsigned int a8)
{
long long result; // rax
long long v12; // rsi
if ( *(_DWORD *)a1 )
{
result = stbtt__track_vertex(a1, a3, a4);
if ( a2 == 4 )
{
stbtt__track_vertex(a1, a5, a6);
result = stbtt__track_vertex(a1, a7, a8);
}
}
else
{
result = *(_QWORD *)(a1 + 40);
v12 = 14LL * *(int *)(a1 + 48);
*(_BYTE *)(result + v12 + 12) = a2;
*(_WORD *)(result + v12) = a3;
*(_WORD *)(result + v12 + 2) = a4;
*(_WORD *)(result + v12 + 4) = a5;
*(_WORD *)(result + v12 + 6) = a6;
*(_WORD *)(result + v12 + 8) = a7;
*(_WORD *)(result + v12 + 10) = a8;
}
++*(_DWORD *)(a1 + 48);
return result;
}
| stbtt__csctx_v:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14D,R9D
MOV R12D,R8D
MOV R13D,ESI
MOV RBX,RDI
MOV EBP,dword ptr [RSP + 0x48]
MOV R15D,dword ptr [RSP + 0x40]
CMP dword ptr [RDI],0x0
JZ 0x00127b9b
MOV RDI,RBX
MOV ESI,EDX
MOV EDX,ECX
CALL 0x00127be5
CMP R13B,0x4
JNZ 0x00127bd3
MOV RDI,RBX
MOV ESI,R12D
MOV EDX,R14D
CALL 0x00127be5
MOV RDI,RBX
MOV ESI,R15D
MOV EDX,EBP
CALL 0x00127be5
JMP 0x00127bd3
LAB_00127b9b:
MOV RAX,qword ptr [RBX + 0x28]
MOVSXD RSI,dword ptr [RBX + 0x30]
LEA RDI,[RSI + RSI*0x1]
SHL RSI,0x4
SUB RSI,RDI
MOV byte ptr [RAX + RSI*0x1 + 0xc],R13B
MOV word ptr [RAX + RSI*0x1],DX
MOV word ptr [RAX + RSI*0x1 + 0x2],CX
MOV word ptr [RAX + RSI*0x1 + 0x4],R12W
MOV word ptr [RAX + RSI*0x1 + 0x6],R14W
MOV word ptr [RAX + RSI*0x1 + 0x8],R15W
MOV word ptr [RAX + RSI*0x1 + 0xa],BP
LAB_00127bd3:
INC dword ptr [RBX + 0x30]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void stbtt__csctx_v(int *param_1,char param_2,int4 param_3,int4 param_4,
int4 param_5,int4 param_6,int4 param_7,int4 param_8)
{
long lVar1;
long lVar2;
if (*param_1 == 0) {
lVar1 = *(long *)(param_1 + 10);
lVar2 = (long)param_1[0xc] * 0xe;
*(char *)(lVar1 + 0xc + lVar2) = param_2;
*(short *)(lVar1 + lVar2) = (short)param_3;
*(short *)(lVar1 + 2 + lVar2) = (short)param_4;
*(short *)(lVar1 + 4 + lVar2) = (short)param_5;
*(short *)(lVar1 + 6 + lVar2) = (short)param_6;
*(short *)(lVar1 + 8 + lVar2) = (short)param_7;
*(short *)(lVar1 + 10 + lVar2) = (short)param_8;
}
else {
stbtt__track_vertex(param_1,param_3,param_4);
if (param_2 == '\x04') {
stbtt__track_vertex(param_1,param_5,param_6);
stbtt__track_vertex(param_1,param_7,param_8);
}
}
param_1[0xc] = param_1[0xc] + 1;
return;
}
|
|
5,679 | ft_stroker_inside | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-stroker.c | static PVG_FT_Error ft_stroker_inside(PVG_FT_Stroker stroker, PVG_FT_Int side,
PVG_FT_Fixed line_length)
{
PVG_FT_StrokeBorder border = stroker->borders + side;
PVG_FT_Angle phi, theta, rotate;
PVG_FT_Fixed length;
PVG_FT_Vector sigma = {0, 0};
PVG_FT_Vector delta;
PVG_FT_Error error = 0;
PVG_FT_Bool intersect; /* use intersection of lines? */
rotate = PVG_FT_SIDE_TO_ROTATE(side);
theta = PVG_FT_Angle_Diff(stroker->angle_in, stroker->angle_out) / 2;
/* Only intersect borders if between two lineto's and both */
/* lines are long enough (line_length is zero for curves). */
if (!border->movable || line_length == 0 ||
theta > 0x59C000 || theta < -0x59C000 )
intersect = FALSE;
else {
/* compute minimum required length of lines */
PVG_FT_Fixed min_length;
PVG_FT_Vector_Unit( &sigma, theta );
min_length =
ft_pos_abs( PVG_FT_MulDiv( stroker->radius, sigma.y, sigma.x ) );
intersect = PVG_FT_BOOL( min_length &&
stroker->line_length >= min_length &&
line_length >= min_length );
}
if (!intersect) {
PVG_FT_Vector_From_Polar(&delta, stroker->radius,
stroker->angle_out + rotate);
delta.x += stroker->center.x;
delta.y += stroker->center.y;
border->movable = FALSE;
} else {
/* compute median angle */
phi = stroker->angle_in + theta + rotate;
length = PVG_FT_DivFix( stroker->radius, sigma.x );
PVG_FT_Vector_From_Polar( &delta, length, phi );
delta.x += stroker->center.x;
delta.y += stroker->center.y;
}
error = ft_stroke_border_lineto(border, &delta, FALSE);
return error;
} | O0 | c | ft_stroker_inside:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rax
movslq -0xc(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xb1d0
movl $0x0, -0x64(%rbp)
movslq -0xc(%rbp), %rax
imulq $0xb40000, %rax, %rcx # imm = 0xB40000
movl $0x5a0000, %eax # imm = 0x5A0000
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x8b5b0
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x18(%rax)
je 0x85b92
cmpq $0x0, -0x18(%rbp)
je 0x85b92
cmpq $0x59c000, -0x30(%rbp) # imm = 0x59C000
jg 0x85b92
cmpq $-0x59c000, -0x30(%rbp) # imm = 0xFFA64000
jge 0x85b98
movb $0x0, -0x65(%rbp)
jmp 0x85bfe
movq -0x30(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x8b1d0
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x8aac0
movq %rax, %rdi
callq 0x842a0
movq %rax, -0x70(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x70(%rbp)
movb %al, -0x71(%rbp)
je 0x85bf3
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
xorl %eax, %eax
cmpq -0x70(%rbp), %rcx
movb %al, -0x71(%rbp)
jl 0x85bf3
movq -0x18(%rbp), %rax
cmpq -0x70(%rbp), %rax
setge %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x65(%rbp)
cmpb $0x0, -0x65(%rbp)
jne 0x85c4b
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
addq -0x38(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x8b570
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movb $0x0, 0x18(%rax)
jmp 0x85ca4
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x50(%rbp), %rsi
callq 0x8ab90
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x8b570
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rsi
xorl %edx, %edx
callq 0x836b0
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ft_stroker_inside:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
add rax, 70h ; 'p'
movsxd rcx, [rbp+var_C]
imul rcx, 28h ; '('
add rax, rcx
mov [rbp+var_20], rax
lea rdi, [rbp+var_50]
xor esi, esi
mov edx, 10h
call _memset
mov [rbp+var_64], 0
movsxd rax, [rbp+var_C]
imul rcx, rax, 0B40000h
mov eax, 5A0000h
sub rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
mov rdi, [rax]
mov rax, [rbp+var_8]
mov rsi, [rax+8]
call PVG_FT_Angle_Diff
mov ecx, 2
cqo
idiv rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
cmp byte ptr [rax+18h], 0
jz short loc_85B92
cmp [rbp+var_18], 0
jz short loc_85B92
cmp [rbp+var_30], 59C000h
jg short loc_85B92
cmp [rbp+var_30], 0FFFFFFFFFFA64000h
jge short loc_85B98
loc_85B92:
mov [rbp+var_65], 0
jmp short loc_85BFE
loc_85B98:
mov rsi, [rbp+var_30]
lea rdi, [rbp+var_50]
call PVG_FT_Vector_Unit
mov rax, [rbp+var_8]
mov rdi, [rax+68h]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_50]
call PVG_FT_MulDiv
mov rdi, rax
call ft_pos_abs
mov [rbp+var_70], rax
xor eax, eax
cmp [rbp+var_70], 0
mov [rbp+var_71], al
jz short loc_85BF3
mov rax, [rbp+var_8]
mov rcx, [rax+20h]
xor eax, eax
cmp rcx, [rbp+var_70]
mov [rbp+var_71], al
jl short loc_85BF3
mov rax, [rbp+var_18]
cmp rax, [rbp+var_70]
setnl al
mov [rbp+var_71], al
loc_85BF3:
mov al, [rbp+var_71]
and al, 1
movzx eax, al
mov [rbp+var_65], al
loc_85BFE:
cmp [rbp+var_65], 0
jnz short loc_85C4B
mov rax, [rbp+var_8]
mov rsi, [rax+68h]
mov rax, [rbp+var_8]
mov rdx, [rax+8]
add rdx, [rbp+var_38]
lea rdi, [rbp+var_60]
call PVG_FT_Vector_From_Polar
mov rax, [rbp+var_8]
mov rax, [rax+10h]
add rax, [rbp+var_60]
mov [rbp+var_60], rax
mov rax, [rbp+var_8]
mov rax, [rax+18h]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
mov rax, [rbp+var_20]
mov byte ptr [rax+18h], 0
jmp short loc_85CA4
loc_85C4B:
mov rax, [rbp+var_8]
mov rax, [rax]
add rax, [rbp+var_30]
add rax, [rbp+var_38]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov rdi, [rax+68h]
mov rsi, [rbp+var_50]
call PVG_FT_DivFix
mov [rbp+var_40], rax
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_28]
lea rdi, [rbp+var_60]
call PVG_FT_Vector_From_Polar
mov rax, [rbp+var_8]
mov rax, [rax+10h]
add rax, [rbp+var_60]
mov [rbp+var_60], rax
mov rax, [rbp+var_8]
mov rax, [rax+18h]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
loc_85CA4:
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_60]
xor edx, edx
call ft_stroke_border_lineto
mov [rbp+var_64], eax
mov eax, [rbp+var_64]
add rsp, 80h
pop rbp
retn
| long long ft_stroker_inside(_QWORD *a1, int a2, long long a3)
{
long long v3; // rax
long long v4; // rax
bool v6; // [rsp+Fh] [rbp-71h]
long long v7; // [rsp+10h] [rbp-70h]
bool v8; // [rsp+1Bh] [rbp-65h]
long long v9; // [rsp+20h] [rbp-60h] BYREF
long long v10; // [rsp+28h] [rbp-58h]
_QWORD v11[2]; // [rsp+30h] [rbp-50h] BYREF
long long v12; // [rsp+40h] [rbp-40h]
long long v13; // [rsp+48h] [rbp-38h]
long long v14; // [rsp+50h] [rbp-30h]
long long v15; // [rsp+58h] [rbp-28h]
unsigned int *v16; // [rsp+60h] [rbp-20h]
long long v17; // [rsp+68h] [rbp-18h]
int v18; // [rsp+74h] [rbp-Ch]
_QWORD *v19; // [rsp+78h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = (unsigned int *)&a1[5 * a2 + 14];
memset(v11, 0LL, sizeof(v11));
v13 = 5898240 - 11796480LL * v18;
v3 = PVG_FT_Angle_Diff(*v19, v19[1]);
v14 = v3 / 2;
if ( *((_BYTE *)v16 + 24) && v17 && v14 <= 5881856 && v14 >= -5881856 )
{
PVG_FT_Vector_Unit(v11, v14, v3 % 2);
v4 = PVG_FT_MulDiv(v19[13], v11[1], v11[0]);
v7 = ft_pos_abs(v4);
v6 = 0;
if ( v7 )
{
v6 = 0;
if ( v19[4] >= v7 )
v6 = v17 >= v7;
}
v8 = v6;
}
else
{
v8 = 0;
}
if ( v8 )
{
v15 = v13 + v14 + *v19;
v12 = PVG_FT_DivFix(v19[13], v11[0]);
PVG_FT_Vector_From_Polar(&v9, v12, v15);
v9 += v19[2];
v10 += v19[3];
}
else
{
PVG_FT_Vector_From_Polar(&v9, v19[13], v13 + v19[1]);
v9 += v19[2];
v10 += v19[3];
*((_BYTE *)v16 + 24) = 0;
}
return (unsigned int)ft_stroke_border_lineto(v16, &v9, 0);
}
| ft_stroker_inside:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x70
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x28
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[RBP + -0x50]
XOR ESI,ESI
MOV EDX,0x10
CALL 0x0010b1d0
MOV dword ptr [RBP + -0x64],0x0
MOVSXD RAX,dword ptr [RBP + -0xc]
IMUL RCX,RAX,0xb40000
MOV EAX,0x5a0000
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x0018b5b0
MOV ECX,0x2
CQO
IDIV RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x18],0x0
JZ 0x00185b92
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00185b92
CMP qword ptr [RBP + -0x30],0x59c000
JG 0x00185b92
CMP qword ptr [RBP + -0x30],-0x59c000
JGE 0x00185b98
LAB_00185b92:
MOV byte ptr [RBP + -0x65],0x0
JMP 0x00185bfe
LAB_00185b98:
MOV RSI,qword ptr [RBP + -0x30]
LEA RDI,[RBP + -0x50]
CALL 0x0018b1d0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x68]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x0018aac0
MOV RDI,RAX
CALL 0x001842a0
MOV qword ptr [RBP + -0x70],RAX
XOR EAX,EAX
CMP qword ptr [RBP + -0x70],0x0
MOV byte ptr [RBP + -0x71],AL
JZ 0x00185bf3
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x20]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x70]
MOV byte ptr [RBP + -0x71],AL
JL 0x00185bf3
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x70]
SETGE AL
MOV byte ptr [RBP + -0x71],AL
LAB_00185bf3:
MOV AL,byte ptr [RBP + -0x71]
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x65],AL
LAB_00185bfe:
CMP byte ptr [RBP + -0x65],0x0
JNZ 0x00185c4b
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RAX + 0x8]
ADD RDX,qword ptr [RBP + -0x38]
LEA RDI,[RBP + -0x60]
CALL 0x0018b570
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
ADD RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x18],0x0
JMP 0x00185ca4
LAB_00185c4b:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
ADD RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x68]
MOV RSI,qword ptr [RBP + -0x50]
CALL 0x0018ab90
MOV qword ptr [RBP + -0x40],RAX
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x60]
CALL 0x0018b570
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
ADD RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
LAB_00185ca4:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x60]
XOR EDX,EDX
CALL 0x001836b0
MOV dword ptr [RBP + -0x64],EAX
MOV EAX,dword ptr [RBP + -0x64]
ADD RSP,0x80
POP RBP
RET
|
int4 ft_stroker_inside(long *param_1,int param_2,long param_3)
{
bool bVar1;
int4 uVar2;
long lVar3;
int8 uVar4;
long local_68;
long local_60;
int8 local_58;
int8 local_50;
int8 local_48;
long local_40;
long local_38;
long local_30;
long *local_28;
long local_20;
int local_14;
long *local_10;
local_28 = param_1 + (long)param_2 * 5 + 0xe;
local_20 = param_3;
local_14 = param_2;
local_10 = param_1;
memset(&local_58,0,0x10);
local_40 = (long)local_14 * -0xb40000 + 0x5a0000;
lVar3 = PVG_FT_Angle_Diff(*local_10,local_10[1]);
local_38 = lVar3 / 2;
if (((((char)local_28[3] == '\0') || (local_20 == 0)) || (0x59c000 < local_38)) ||
(local_38 < -0x59c000)) {
bVar1 = false;
}
else {
PVG_FT_Vector_Unit(&local_58,local_38,lVar3 % 2);
uVar4 = PVG_FT_MulDiv(local_10[0xd],local_50,local_58);
lVar3 = ft_pos_abs(uVar4);
bVar1 = false;
if ((lVar3 != 0) && (bVar1 = false, lVar3 <= local_10[4])) {
bVar1 = lVar3 <= local_20;
}
}
if (bVar1) {
local_30 = *local_10 + local_38 + local_40;
local_48 = PVG_FT_DivFix(local_10[0xd],local_58);
PVG_FT_Vector_From_Polar(&local_68,local_48,local_30);
local_68 = local_10[2] + local_68;
local_60 = local_10[3] + local_60;
}
else {
PVG_FT_Vector_From_Polar(&local_68,local_10[0xd],local_10[1] + local_40);
local_68 = local_10[2] + local_68;
local_60 = local_10[3] + local_60;
*(int1 *)(local_28 + 3) = 0;
}
uVar2 = ft_stroke_border_lineto(local_28,&local_68,0);
return uVar2;
}
|
|
5,680 | ft_stroker_inside | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-stroker.c | static PVG_FT_Error ft_stroker_inside(PVG_FT_Stroker stroker, PVG_FT_Int side,
PVG_FT_Fixed line_length)
{
PVG_FT_StrokeBorder border = stroker->borders + side;
PVG_FT_Angle phi, theta, rotate;
PVG_FT_Fixed length;
PVG_FT_Vector sigma = {0, 0};
PVG_FT_Vector delta;
PVG_FT_Error error = 0;
PVG_FT_Bool intersect; /* use intersection of lines? */
rotate = PVG_FT_SIDE_TO_ROTATE(side);
theta = PVG_FT_Angle_Diff(stroker->angle_in, stroker->angle_out) / 2;
/* Only intersect borders if between two lineto's and both */
/* lines are long enough (line_length is zero for curves). */
if (!border->movable || line_length == 0 ||
theta > 0x59C000 || theta < -0x59C000 )
intersect = FALSE;
else {
/* compute minimum required length of lines */
PVG_FT_Fixed min_length;
PVG_FT_Vector_Unit( &sigma, theta );
min_length =
ft_pos_abs( PVG_FT_MulDiv( stroker->radius, sigma.y, sigma.x ) );
intersect = PVG_FT_BOOL( min_length &&
stroker->line_length >= min_length &&
line_length >= min_length );
}
if (!intersect) {
PVG_FT_Vector_From_Polar(&delta, stroker->radius,
stroker->angle_out + rotate);
delta.x += stroker->center.x;
delta.y += stroker->center.y;
border->movable = FALSE;
} else {
/* compute median angle */
phi = stroker->angle_in + theta + rotate;
length = PVG_FT_DivFix( stroker->radius, sigma.x );
PVG_FT_Vector_From_Polar( &delta, length, phi );
delta.x += stroker->center.x;
delta.y += stroker->center.y;
}
error = ft_stroke_border_lineto(border, &delta, FALSE);
return error;
} | O1 | c | ft_stroker_inside:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rdi, %r14
movl %esi, %eax
leaq (%rax,%rax,4), %rcx
leaq (%rdi,%rcx,8), %rbx
addq $0x70, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
imulq $-0xb40000, %rax, %r15 # imm = 0xFF4C0000
addq $0x5a0000, %r15 # imm = 0x5A0000
movq (%rdi), %rdi
movq 0x8(%r14), %rsi
callq 0x42815
cmpb $0x0, 0x18(%rbx)
sete %cl
testq %r12, %r12
sete %dl
orb %cl, %dl
leaq -0xb38002(%rax), %rcx
cmpq $-0x1670003, %rcx # imm = 0xFE98FFFD
setb %cl
orb %dl, %cl
jne 0x3e640
movq %rax, %r13
shrq $0x3f, %r13
addq %rax, %r13
sarq %r13
movq %rsp, %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x424ca
movq 0x68(%r14), %rdi
movq (%rbp), %rdx
movq 0x8(%rbp), %rsi
callq 0x42142
testq %rax, %rax
je 0x3e640
movq %rax, %rcx
negq %rcx
cmovsq %rax, %rcx
cmpq %r12, %rcx
jg 0x3e640
cmpq %rcx, 0x20(%r14)
jl 0x3e640
addq %r15, %r13
addq (%r14), %r13
movq 0x68(%r14), %rdi
movq (%rsp), %rsi
callq 0x421a5
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x42802
movq 0x10(%r14), %rax
addq %rax, (%r15)
movq 0x18(%r14), %rax
addq %rax, 0x8(%r15)
jmp 0x3e66d
movq 0x68(%r14), %rsi
addq 0x8(%r14), %r15
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0x42802
movq 0x10(%r14), %rax
addq %rax, (%r12)
movq 0x18(%r14), %rax
addq %rax, 0x8(%r12)
movb $0x0, 0x18(%rbx)
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3d138
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ft_stroker_inside:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, rdx
mov r14, rdi
mov eax, esi
lea rcx, [rax+rax*4]
lea rbx, [rdi+rcx*8]
add rbx, 70h ; 'p'
xorps xmm0, xmm0
movaps [rsp+58h+var_58], xmm0
imul r15, rax, 0FFFFFFFFFF4C0000h
add r15, 5A0000h
mov rdi, [rdi]
mov rsi, [r14+8]
call PVG_FT_Angle_Diff
cmp byte ptr [rbx+18h], 0
setz cl
test r12, r12
setz dl
or dl, cl
lea rcx, [rax-0B38002h]
cmp rcx, 0FFFFFFFFFE98FFFDh
setb cl
or cl, dl
jnz short loc_3E640
mov r13, rax
shr r13, 3Fh
add r13, rax
sar r13, 1
mov rbp, rsp
mov rdi, rbp
mov rsi, r13
call PVG_FT_Vector_Unit
mov rdi, [r14+68h]
mov rdx, [rbp+0]
mov rsi, [rbp+8]
call PVG_FT_MulDiv
test rax, rax
jz short loc_3E640
mov rcx, rax
neg rcx
cmovs rcx, rax
cmp rcx, r12
jg short loc_3E640
cmp [r14+20h], rcx
jl short loc_3E640
add r13, r15
add r13, [r14]
mov rdi, [r14+68h]
mov rsi, qword ptr [rsp+58h+var_58]
call PVG_FT_DivFix
lea r15, [rsp+58h+var_40]
mov rdi, r15
mov rsi, rax
mov rdx, r13
call PVG_FT_Vector_From_Polar
mov rax, [r14+10h]
add [r15], rax
mov rax, [r14+18h]
add [r15+8], rax
jmp short loc_3E66D
loc_3E640:
mov rsi, [r14+68h]
add r15, [r14+8]
lea r12, [rsp+58h+var_40]
mov rdi, r12
mov rdx, r15
call PVG_FT_Vector_From_Polar
mov rax, [r14+10h]
add [r12], rax
mov rax, [r14+18h]
add [r12+8], rax
mov byte ptr [rbx+18h], 0
loc_3E66D:
lea rsi, [rsp+58h+var_40]
mov rdi, rbx
xor edx, edx
call ft_stroke_border_lineto
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long ft_stroker_inside(_QWORD *a1, unsigned int a2, long long a3)
{
long long v4; // r15
long long v5; // rax
long long v6; // r13
long long v7; // rax
long long v8; // rcx
long long v9; // r13
long long v10; // rax
__int128 v12; // [rsp+0h] [rbp-58h] BYREF
long long v13; // [rsp+18h] [rbp-40h] BYREF
long long v14; // [rsp+20h] [rbp-38h]
v12 = 0LL;
v4 = -11796480LL * a2 + 5898240;
v5 = PVG_FT_Angle_Diff(*a1, a1[1]);
if ( LOBYTE(a1[5 * a2 + 17]) == 0 || a3 == 0 || (unsigned long long)(v5 - 11763714) < 0xFFFFFFFFFE98FFFDLL )
goto LABEL_8;
v6 = v5 / 2;
PVG_FT_Vector_Unit(&v12, v5 / 2);
v7 = PVG_FT_MulDiv(a1[13], *((_QWORD *)&v12 + 1), v12);
if ( !v7 )
goto LABEL_8;
v8 = -v7;
if ( v7 > 0 )
v8 = v7;
if ( v8 > a3 || a1[4] < v8 )
{
LABEL_8:
PVG_FT_Vector_From_Polar(&v13, a1[13], a1[1] + v4);
v13 += a1[2];
v14 += a1[3];
LOBYTE(a1[5 * a2 + 17]) = 0;
}
else
{
v9 = *a1 + v4 + v6;
v10 = PVG_FT_DivFix(a1[13], v12);
PVG_FT_Vector_From_Polar(&v13, v10, v9);
v13 += a1[2];
v14 += a1[3];
}
return ft_stroke_border_lineto((int *)&a1[5 * a2 + 14], (long long)&v13, 0);
}
| ft_stroker_inside:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,RDX
MOV R14,RDI
MOV EAX,ESI
LEA RCX,[RAX + RAX*0x4]
LEA RBX,[RDI + RCX*0x8]
ADD RBX,0x70
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
IMUL R15,RAX,-0xb40000
ADD R15,0x5a0000
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [R14 + 0x8]
CALL 0x00142815
CMP byte ptr [RBX + 0x18],0x0
SETZ CL
TEST R12,R12
SETZ DL
OR DL,CL
LEA RCX,[RAX + -0xb38002]
CMP RCX,-0x1670003
SETC CL
OR CL,DL
JNZ 0x0013e640
MOV R13,RAX
SHR R13,0x3f
ADD R13,RAX
SAR R13,0x1
MOV RBP,RSP
MOV RDI,RBP
MOV RSI,R13
CALL 0x001424ca
MOV RDI,qword ptr [R14 + 0x68]
MOV RDX,qword ptr [RBP]
MOV RSI,qword ptr [RBP + 0x8]
CALL 0x00142142
TEST RAX,RAX
JZ 0x0013e640
MOV RCX,RAX
NEG RCX
CMOVS RCX,RAX
CMP RCX,R12
JG 0x0013e640
CMP qword ptr [R14 + 0x20],RCX
JL 0x0013e640
ADD R13,R15
ADD R13,qword ptr [R14]
MOV RDI,qword ptr [R14 + 0x68]
MOV RSI,qword ptr [RSP]
CALL 0x001421a5
LEA R15,[RSP + 0x18]
MOV RDI,R15
MOV RSI,RAX
MOV RDX,R13
CALL 0x00142802
MOV RAX,qword ptr [R14 + 0x10]
ADD qword ptr [R15],RAX
MOV RAX,qword ptr [R14 + 0x18]
ADD qword ptr [R15 + 0x8],RAX
JMP 0x0013e66d
LAB_0013e640:
MOV RSI,qword ptr [R14 + 0x68]
ADD R15,qword ptr [R14 + 0x8]
LEA R12,[RSP + 0x18]
MOV RDI,R12
MOV RDX,R15
CALL 0x00142802
MOV RAX,qword ptr [R14 + 0x10]
ADD qword ptr [R12],RAX
MOV RAX,qword ptr [R14 + 0x18]
ADD qword ptr [R12 + 0x8],RAX
MOV byte ptr [RBX + 0x18],0x0
LAB_0013e66d:
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0013d138
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ft_stroker_inside(long *param_1,ulong param_2,long param_3)
{
long lVar1;
long lVar2;
int8 uVar3;
long lVar4;
long lVar5;
int8 local_58;
int8 uStack_50;
long local_40;
long local_38;
param_2 = param_2 & 0xffffffff;
local_58 = 0;
uStack_50 = 0;
lVar5 = param_2 * -0xb40000 + 0x5a0000;
lVar1 = PVG_FT_Angle_Diff(*param_1,param_1[1]);
if (0xfffffffffe98fffc < lVar1 - 0xb38002U &&
(param_3 != 0 && (char)param_1[param_2 * 5 + 0x11] != '\0')) {
PVG_FT_Vector_Unit(&local_58,lVar1 / 2);
lVar2 = PVG_FT_MulDiv(param_1[0xd],uStack_50,local_58);
if (lVar2 != 0) {
lVar4 = -lVar2;
if (0 < lVar2) {
lVar4 = lVar2;
}
if ((lVar4 <= param_3) && (lVar4 <= param_1[4])) {
lVar2 = *param_1;
uVar3 = PVG_FT_DivFix(param_1[0xd],local_58);
PVG_FT_Vector_From_Polar(&local_40,uVar3,lVar1 / 2 + lVar5 + lVar2);
local_40 = local_40 + param_1[2];
local_38 = local_38 + param_1[3];
goto LAB_0013e66d;
}
}
}
PVG_FT_Vector_From_Polar(&local_40,param_1[0xd],lVar5 + param_1[1]);
local_40 = local_40 + param_1[2];
local_38 = local_38 + param_1[3];
*(int1 *)(param_1 + param_2 * 5 + 0x11) = 0;
LAB_0013e66d:
ft_stroke_border_lineto(param_1 + param_2 * 5 + 0xe,&local_40,0);
return;
}
|
|
5,681 | mp_sqrtrem_rec_dec | bluesky950520[P]quickjs/libbf.c | static limb_t mp_sqrtrem_rec_dec(limb_t *tabs, limb_t *taba, limb_t n,
limb_t *tmp_buf)
{
limb_t l, h, rh, ql, qh, c, i;
if (n == 1)
return mp_sqrtrem2_dec(tabs, taba);
#ifdef DEBUG_SQRTREM_DEC
mp_print_str_dec("a", taba, 2 * n);
#endif
l = n / 2;
h = n - l;
qh = mp_sqrtrem_rec_dec(tabs + l, taba + 2 * l, h, tmp_buf);
#ifdef DEBUG_SQRTREM_DEC
mp_print_str_dec("s1", tabs + l, h);
mp_print_str_h_dec("r1", taba + 2 * l, h, qh);
mp_print_str_h_dec("r2", taba + l, n, qh);
#endif
/* the remainder is in taba + 2 * l. Its high bit is in qh */
if (qh) {
mp_sub_dec(taba + 2 * l, taba + 2 * l, tabs + l, h, 0);
}
/* instead of dividing by 2*s, divide by s (which is normalized)
and update q and r */
mp_div_dec(NULL, tmp_buf, taba + l, n, tabs + l, h);
qh += tmp_buf[l];
for(i = 0; i < l; i++)
tabs[i] = tmp_buf[i];
ql = mp_div1_dec(tabs, tabs, l, 2, qh & 1);
qh = qh >> 1; /* 0 or 1 */
if (ql)
rh = mp_add_dec(taba + l, taba + l, tabs + l, h, 0);
else
rh = 0;
#ifdef DEBUG_SQRTREM_DEC
mp_print_str_h_dec("q", tabs, l, qh);
mp_print_str_h_dec("u", taba + l, h, rh);
#endif
mp_add_ui_dec(tabs + l, qh, h);
#ifdef DEBUG_SQRTREM_DEC
mp_print_str_dec("s2", tabs, n);
#endif
/* q = qh, tabs[l - 1 ... 0], r = taba[n - 1 ... l] */
/* subtract q^2. if qh = 1 then q = B^l, so we can take shortcuts */
if (qh) {
c = qh;
} else {
mp_mul_basecase_dec(taba + n, tabs, l, tabs, l);
c = mp_sub_dec(taba, taba, taba + n, 2 * l, 0);
}
rh -= mp_sub_ui_dec(taba + 2 * l, c, n - 2 * l);
if ((slimb_t)rh < 0) {
mp_sub_ui_dec(tabs, 1, n);
rh += mp_add_mul1_dec(taba, tabs, n, 2);
rh += mp_add_ui_dec(taba, 1, n);
}
return rh;
} | O1 | c | mp_sqrtrem_rec_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x1, %rdx
jne 0x8d33d
movabsq $-0x7538dcfb76180000, %rax # imm = 0x8AC7230489E80000
mulq 0x8(%rbx)
movq %rdx, %r15
movq %rax, %r12
addq (%rbx), %r12
adcq $0x0, %r15
je 0x8d466
bsrq %r15, %rbp
xorq $0x3f, %rbp
jmp 0x8d46b
movq %rcx, %rbp
movq %rdx, %rax
shrq %rax
movq %rdx, %r15
subq %rax, %r15
movq %rax, 0x10(%rsp)
leaq (%r14,%rax,8), %r13
movq %rdx, 0x8(%rsp)
andq $-0x2, %rdx
movq %rdx, 0x18(%rsp)
leaq (%rbx,%rdx,8), %r12
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x8d2f5
movabsq $-0x7538dcfb76180000, %rdi # imm = 0x8AC7230489E80000
movq %rax, 0x20(%rsp)
testq %rax, %rax
sete %al
testq %r15, %r15
setle %cl
orb %al, %cl
jne 0x8d3c1
xorl %eax, %eax
xorl %ecx, %ecx
movq (%r12,%rax,8), %rdx
addq (%r13,%rax,8), %rcx
xorl %esi, %esi
subq %rcx, %rdx
setb %sil
leaq (%rdx,%rdi), %rcx
cmovaeq %rdx, %rcx
movq %rcx, (%r12,%rax,8)
incq %rax
movq %rsi, %rcx
cmpq %rax, %r15
jne 0x8d398
movq 0x10(%rsp), %rax
leaq (%rbx,%rax,8), %rdx
xorl %edi, %edi
movq %rbp, %rsi
movq 0x8(%rsp), %rcx
movq %r13, %r8
movq %r15, %r9
callq 0x91e72
movq 0x10(%rsp), %r11
movq 0x8(%rsp), %rdx
movq (%rbp,%r11,8), %rax
addq 0x20(%rsp), %rax
testq %rdx, %rdx
je 0x8d416
cmpq $0x1, %r11
movq %r11, %rcx
adcq $0x0, %rcx
xorl %edi, %edi
movq (%rbp,%rdi,8), %rsi
movq %rsi, (%r14,%rdi,8)
incq %rdi
cmpq %rdi, %rcx
jne 0x8d405
movabsq $0x4563918244f40000, %rcx # imm = 0x4563918244F40000
movl %eax, %edi
andl $0x1, %edi
negq %rdi
andq %rcx, %rdi
testq %rdx, %rdx
je 0x8d540
leaq 0x1(%r11), %rsi
movq -0x10(%r14,%rsi,8), %r9
movq %r9, %r8
shrq %r8
addq %rdi, %r8
movq %r8, -0x10(%r14,%rsi,8)
andl $0x1, %r9d
negq %r9
andq %rcx, %r9
decq %rsi
movq %r9, %rdi
cmpq $0x1, %rsi
jg 0x8d438
jmp 0x8d543
movl $0x40, %ebp
movl %ebp, %ecx
andb $0x7e, %cl
movq %r15, %rax
shldq %cl, %r12, %rax
movl %ebp, %ecx
andb $0x3e, %cl
movq %r12, %rdx
shlq %cl, %rdx
xorl %ecx, %ecx
testb $0x40, %bpl
cmovneq %rdx, %rax
cmoveq %rdx, %rcx
leaq 0x30(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, 0x8(%rsi)
leaq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0x8f7c8
shrl %ebp
movq (%r13), %rsi
movl %ebp, %ecx
shrq %cl, %rsi
movq %rsi, (%r13)
movq %rsi, %rax
mulq %rsi
subq %rax, %r12
sbbq %rdx, %r15
movq %r15, %rax
shldq $0x1, %r12, %rax
movabsq $-0x13e1b582496a9e5b, %rcx # imm = 0xEC1E4A7DB69561A5
mulq %rcx
movq %rdx, %rcx
movq %rdx, %rax
movabsq $-0x7538dcfb76180000, %rdx # imm = 0x8AC7230489E80000
mulq %rdx
subq %rax, %r12
sbbq %rdx, %r15
movabsq $0x158e460913d00000, %rax # imm = 0x158E460913D00000
subq %rax, %r12
movq $-0x1, %rax
sbbq $0x0, %rax
leaq (%r15,%rax), %rdx
sarq %rdx
addq %rdx, %rcx
movabsq $-0x7538dcfb76180000, %rdi # imm = 0x8AC7230489E80000
andq %rdi, %rdx
addq %r12, %rdx
adcq %r15, %rax
leaq (%rax,%rcx), %rbp
addq $0x2, %rbp
andq %rdi, %rax
addq %rdx, %rax
movq %rax, (%rbx)
movq %rsi, (%r14)
jmp 0x8d701
movq %rdi, %r9
movabsq $0x7538dcfb76180000, %r13 # imm = 0x7538DCFB76180000
xorl %ebp, %ebp
testq %r15, %r15
jle 0x8d58a
testq %r9, %r9
je 0x8d58a
xorl %r8d, %r8d
movq %r11, %rcx
movq (%rbx,%rcx,8), %rsi
addq %rsi, %r8
addq (%r14,%rcx,8), %r8
leaq (%r8,%r13), %rdi
xorl %ebp, %ebp
cmpq %rsi, %rdi
setbe %bpl
cmovbeq %rdi, %r8
movq %r8, (%rbx,%rcx,8)
incq %rcx
movq %rbp, %r8
cmpq %rcx, %rdx
jne 0x8d55f
movq %rax, %rcx
shrq %rcx
testq %r15, %r15
jle 0x8d5c8
leaq -0x1(%rdx), %r10
movq %r11, %rsi
movq %rcx, %rdi
movq (%r14,%rsi,8), %r8
addq %r8, %rdi
leaq (%rdi,%r13), %r9
cmpq %r8, %r9
cmovbeq %r9, %rdi
movq %rdi, (%r14,%rsi,8)
ja 0x8d5c8
leaq 0x1(%rsi), %r8
movl $0x1, %edi
cmpq %rsi, %r10
movq %r8, %rsi
jne 0x8d59f
cmpq $0x1, %rax
movabsq $-0x7538dcfb76180000, %rdi # imm = 0x8AC7230489E80000
ja 0x8d648
leaq (%rbx,%rdx,8), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r11, %rdx
movq %r14, %rcx
movq %r11, %r8
callq 0x8cf86
movq 0x18(%rsp), %r9
testq %r9, %r9
jle 0x8d637
xorl %eax, %eax
xorl %r8d, %r8d
movabsq $-0x7538dcfb76180000, %rdi # imm = 0x8AC7230489E80000
movq 0x8(%rsp), %rdx
movq (%rbx,%rax,8), %rsi
addq (%r15,%rax,8), %r8
xorl %ecx, %ecx
subq %r8, %rsi
setb %cl
leaq (%rsi,%rdi), %r8
cmovaeq %rsi, %r8
movq %r8, (%rbx,%rax,8)
incq %rax
movq %rcx, %r8
cmpq %rax, %r9
jne 0x8d60e
jmp 0x8d648
xorl %ecx, %ecx
movabsq $-0x7538dcfb76180000, %rdi # imm = 0x8AC7230489E80000
movq 0x8(%rsp), %rdx
testb $0x1, %dl
je 0x8d669
movq (%r12), %rax
xorl %esi, %esi
subq %rcx, %rax
setb %sil
leaq (%rax,%rdi), %rcx
cmovaeq %rax, %rcx
movq %rcx, (%r12)
movq %rsi, %rcx
subq %rcx, %rbp
jns 0x8d701
testq %rdx, %rdx
jle 0x8d69e
leaq -0x1(%rdx), %rax
xorl %ecx, %ecx
decq %rdi
movq (%r14,%rcx,8), %rsi
addq $-0x1, %rsi
cmovaeq %rdi, %rsi
movq %rsi, (%r14,%rcx,8)
jb 0x8d69e
leaq 0x1(%rcx), %rsi
cmpq %rcx, %rax
movq %rsi, %rcx
jne 0x8d680
movl $0x2, %ecx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8ce0b
movq 0x8(%rsp), %r10
addq %rbp, %rax
testq %r10, %r10
jle 0x8d6f6
xorl %ecx, %ecx
movabsq $-0x7538dcfb76180000, %r9 # imm = 0x8AC7230489E80000
decq %r9
incq %r13
movl $0x1, %edx
xorl %esi, %esi
movq (%rbx,%rsi,8), %rdi
cmpq %r9, %rdi
movq %r13, %r8
cmovbq %rdx, %r8
addq %rdi, %r8
movq %r8, (%rbx,%rsi,8)
cmpq %r9, %rdi
jb 0x8d6fb
incq %rsi
cmpq %rsi, %r10
jne 0x8d6d4
movl $0x1, %ecx
addq %rcx, %rax
movq %rax, %rbp
movq %rbp, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mp_sqrtrem_rec_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rsi
mov r14, rdi
cmp rdx, 1
jnz short loc_8D33D
mov rax, 8AC7230489E80000h
mul qword ptr [rbx+8]
mov r15, rdx
mov r12, rax
add r12, [rbx]
adc r15, 0
jz loc_8D466
bsr rbp, r15
xor rbp, 3Fh
jmp loc_8D46B
loc_8D33D:
mov rbp, rcx
mov rax, rdx
shr rax, 1
mov r15, rdx
sub r15, rax
mov [rsp+78h+var_68], rax
lea r13, [r14+rax*8]
mov [rsp+78h+var_70], rdx
and rdx, 0FFFFFFFFFFFFFFFEh
mov [rsp+78h+var_60], rdx
lea r12, [rbx+rdx*8]
mov rdi, r13
mov rsi, r12
mov rdx, r15
call mp_sqrtrem_rec_dec
mov rdi, 8AC7230489E80000h
mov [rsp+78h+var_58], rax
test rax, rax
setz al
test r15, r15
setle cl
or cl, al
jnz short loc_8D3C1
xor eax, eax
xor ecx, ecx
loc_8D398:
mov rdx, [r12+rax*8]
add rcx, [r13+rax*8+0]
xor esi, esi
sub rdx, rcx
setb sil
lea rcx, [rdx+rdi]
cmovnb rcx, rdx
mov [r12+rax*8], rcx
inc rax
mov rcx, rsi
cmp r15, rax
jnz short loc_8D398
loc_8D3C1:
mov rax, [rsp+78h+var_68]
lea rdx, [rbx+rax*8]
xor edi, edi
mov rsi, rbp
mov rcx, [rsp+78h+var_70]
mov r8, r13
mov r9, r15
call mp_div_dec
mov r11, [rsp+78h+var_68]
mov rdx, [rsp+78h+var_70]
mov rax, [rbp+r11*8+0]
add rax, [rsp+78h+var_58]
test rdx, rdx
jz short loc_8D416
cmp r11, 1
mov rcx, r11
adc rcx, 0
xor edi, edi
loc_8D405:
mov rsi, [rbp+rdi*8+0]
mov [r14+rdi*8], rsi
inc rdi
cmp rcx, rdi
jnz short loc_8D405
loc_8D416:
mov rcx, 4563918244F40000h
mov edi, eax
and edi, 1
neg rdi
and rdi, rcx
test rdx, rdx
jz loc_8D540
lea rsi, [r11+1]
loc_8D438:
mov r9, [r14+rsi*8-10h]
mov r8, r9
shr r8, 1
add r8, rdi
mov [r14+rsi*8-10h], r8
and r9d, 1
neg r9
and r9, rcx
dec rsi
mov rdi, r9
cmp rsi, 1
jg short loc_8D438
jmp loc_8D543
loc_8D466:
mov ebp, 40h ; '@'
loc_8D46B:
mov ecx, ebp
and cl, 7Eh
mov rax, r15
shld rax, r12, cl
mov ecx, ebp
and cl, 3Eh
mov rdx, r12
shl rdx, cl
xor ecx, ecx
test bpl, 40h
cmovnz rax, rdx
cmovz rcx, rdx
lea rsi, [rsp+78h+var_48]
mov [rsi], rcx
mov [rsi+8], rax
lea r13, [rsp+78h+var_50]
mov rdi, r13
call mp_sqrtrem2
shr ebp, 1
mov rsi, [r13+0]
mov ecx, ebp
shr rsi, cl
mov [r13+0], rsi
mov rax, rsi
mul rsi
sub r12, rax
sbb r15, rdx
mov rax, r15
shld rax, r12, 1
mov rcx, 0EC1E4A7DB69561A5h
mul rcx
mov rcx, rdx
mov rax, rdx
mov rdx, 8AC7230489E80000h
mul rdx
sub r12, rax
sbb r15, rdx
mov rax, 158E460913D00000h
sub r12, rax
mov rax, 0FFFFFFFFFFFFFFFFh
sbb rax, 0
lea rdx, [r15+rax]
sar rdx, 1
add rcx, rdx
mov rdi, 8AC7230489E80000h
and rdx, rdi
add rdx, r12
adc rax, r15
lea rbp, [rax+rcx]
add rbp, 2
and rax, rdi
add rax, rdx
mov [rbx], rax
mov [r14], rsi
jmp loc_8D701
loc_8D540:
mov r9, rdi
loc_8D543:
mov r13, 7538DCFB76180000h
xor ebp, ebp
test r15, r15
jle short loc_8D58A
test r9, r9
jz short loc_8D58A
xor r8d, r8d
mov rcx, r11
loc_8D55F:
mov rsi, [rbx+rcx*8]
add r8, rsi
add r8, [r14+rcx*8]
lea rdi, [r8+r13]
xor ebp, ebp
cmp rdi, rsi
setbe bpl
cmovbe r8, rdi
mov [rbx+rcx*8], r8
inc rcx
mov r8, rbp
cmp rdx, rcx
jnz short loc_8D55F
loc_8D58A:
mov rcx, rax
shr rcx, 1
test r15, r15
jle short loc_8D5C8
lea r10, [rdx-1]
mov rsi, r11
mov rdi, rcx
loc_8D59F:
mov r8, [r14+rsi*8]
add rdi, r8
lea r9, [rdi+r13]
cmp r9, r8
cmovbe rdi, r9
mov [r14+rsi*8], rdi
ja short loc_8D5C8
lea r8, [rsi+1]
mov edi, 1
cmp r10, rsi
mov rsi, r8
jnz short loc_8D59F
loc_8D5C8:
cmp rax, 1
mov rdi, 8AC7230489E80000h
ja short loc_8D648
lea r15, [rbx+rdx*8]
mov rdi, r15
mov rsi, r14
mov rdx, r11
mov rcx, r14
mov r8, r11
call mp_mul_basecase_dec
mov r9, [rsp+78h+var_60]
test r9, r9
jle short loc_8D637
xor eax, eax
xor r8d, r8d
mov rdi, 8AC7230489E80000h
mov rdx, [rsp+78h+var_70]
loc_8D60E:
mov rsi, [rbx+rax*8]
add r8, [r15+rax*8]
xor ecx, ecx
sub rsi, r8
setb cl
lea r8, [rsi+rdi]
cmovnb r8, rsi
mov [rbx+rax*8], r8
inc rax
mov r8, rcx
cmp r9, rax
jnz short loc_8D60E
jmp short loc_8D648
loc_8D637:
xor ecx, ecx
mov rdi, 8AC7230489E80000h
mov rdx, [rsp+78h+var_70]
loc_8D648:
test dl, 1
jz short loc_8D669
mov rax, [r12]
xor esi, esi
sub rax, rcx
setb sil
lea rcx, [rax+rdi]
cmovnb rcx, rax
mov [r12], rcx
mov rcx, rsi
loc_8D669:
sub rbp, rcx
jns loc_8D701
test rdx, rdx
jle short loc_8D69E
lea rax, [rdx-1]
xor ecx, ecx
dec rdi
loc_8D680:
mov rsi, [r14+rcx*8]
add rsi, 0FFFFFFFFFFFFFFFFh
cmovnb rsi, rdi
mov [r14+rcx*8], rsi
jb short loc_8D69E
lea rsi, [rcx+1]
cmp rax, rcx
mov rcx, rsi
jnz short loc_8D680
loc_8D69E:
mov ecx, 2
mov rdi, rbx
mov rsi, r14
call mp_add_mul1_dec
mov r10, [rsp+78h+var_70]
add rax, rbp
test r10, r10
jle short loc_8D6F6
xor ecx, ecx
mov r9, 8AC7230489E80000h
dec r9
inc r13
mov edx, 1
xor esi, esi
loc_8D6D4:
mov rdi, [rbx+rsi*8]
cmp rdi, r9
mov r8, r13
cmovb r8, rdx
add r8, rdi
mov [rbx+rsi*8], r8
cmp rdi, r9
jb short loc_8D6FB
inc rsi
cmp r10, rsi
jnz short loc_8D6D4
loc_8D6F6:
mov ecx, 1
loc_8D6FB:
add rax, rcx
mov rbp, rax
loc_8D701:
mov rax, rbp
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mp_sqrtrem_rec_dec(unsigned long long *a1, unsigned long long *a2, unsigned long long a3, long long a4)
{
unsigned __int128 v6; // kr00_16
unsigned long long v7; // rbp
unsigned int v8; // ebp
long long v10; // r15
unsigned long long *v11; // r13
unsigned long long *v12; // r12
long long v13; // rax
_BOOL8 v14; // rcx
unsigned long long v15; // rdx
unsigned long long v16; // rcx
bool v17; // cf
unsigned long long v18; // rdx
unsigned long long v19; // rcx
long long v20; // rdx
unsigned long long v21; // rax
long long v22; // rdi
long long v23; // rdi
long long v24; // rsi
unsigned long long v25; // r9
long long v26; // r9
unsigned long long v27; // rax
long long v28; // rcx
unsigned long long v29; // rsi
__int128 v30; // kr10_16
unsigned long long v31; // rcx
unsigned long long v32; // r15
unsigned __int128 v33; // kr30_16
long long v34; // rdx
long long v35; // rbp
_BOOL8 v36; // rbp
_BOOL8 v37; // r8
long long v38; // rcx
unsigned long long v39; // rsi
unsigned long long v40; // r8
unsigned long long v41; // rcx
long long v42; // rsi
long long v43; // rdi
unsigned long long v44; // r8
unsigned long long v45; // rdi
bool v46; // cc
bool v47; // zf
long long v48; // rax
_BOOL8 v49; // r8
unsigned long long v50; // rsi
unsigned long long v51; // r8
bool v52; // cf
unsigned long long v53; // rsi
unsigned long long v54; // r8
bool v55; // cf
unsigned long long v56; // rax
unsigned long long v57; // rcx
long long v58; // rcx
unsigned long long v59; // rsi
bool v60; // cf
unsigned long long v61; // rsi
long long v62; // rax
long long v63; // rcx
long long v64; // rsi
unsigned long long v65; // rdi
long long v66; // r8
long long v69; // [rsp+10h] [rbp-68h]
signed long long v70; // [rsp+18h] [rbp-60h]
long long v71; // [rsp+20h] [rbp-58h]
unsigned long long v72; // [rsp+28h] [rbp-50h] BYREF
_QWORD v73[9]; // [rsp+30h] [rbp-48h] BYREF
if ( a3 == 1 )
{
v6 = *a2 + a2[1] * (unsigned __int128)0x8AC7230489E80000LL;
if ( *((_QWORD *)&v6 + 1) )
{
_BitScanReverse64(&v7, *((unsigned long long *)&v6 + 1));
v8 = v7 ^ 0x3F;
}
else
{
v8 = 64;
}
v27 = (*((_QWORD *)&v6 + 1) << (v8 & 0x7E)) | ((unsigned long long)v6 >> (64 - (v8 & 0x7E)));
v28 = 0LL;
if ( (v8 & 0x40) != 0 )
v27 = (*a2 - 0x7538DCFB76180000LL * a2[1]) << (v8 & 0x3E);
else
v28 = (*a2 - 0x7538DCFB76180000LL * a2[1]) << (v8 & 0x3E);
v73[0] = v28;
v73[1] = v27;
mp_sqrtrem2(&v72, v73);
v29 = v72 >> (v8 >> 1);
v72 = v29;
v30 = v6 - v29 * (unsigned __int128)v29;
v31 = (0xEC1E4A7DB69561A5LL * (unsigned __int128)(unsigned long long)(v30 >> 63)) >> 64;
v32 = (v30 - 0x8AC7230489E80000LL * (unsigned __int128)v31) >> 64;
v33 = __PAIR128__(-1LL, (unsigned long long)v30 - 0x8AC7230489E80000LL * v31) - 0x158E460913D00000LL;
v34 = (long long)(v32 + *((_QWORD *)&v33 + 1)) >> 1;
v35 = ((v33 + __PAIR128__(v32, v34 & 0x8AC7230489E80000LL)) >> 64) + v34 + v31 + 2;
*a2 = v33
+ (v34 & 0x8AC7230489E80000LL)
+ (((v33 + __PAIR128__(v32, v34 & 0x8AC7230489E80000LL)) >> 64) & 0x8AC7230489E80000LL);
*a1 = v29;
}
else
{
v10 = a3 - (a3 >> 1);
v69 = a3 >> 1;
v11 = &a1[a3 >> 1];
v70 = a3 & 0xFFFFFFFFFFFFFFFELL;
v12 = &a2[a3 & 0xFFFFFFFFFFFFFFFELL];
v71 = mp_sqrtrem_rec_dec(v11, v12, v10, a4);
if ( v71 != 0 && v10 > 0 )
{
v13 = 0LL;
v14 = 0LL;
do
{
v15 = v12[v13];
v16 = v11[v13] + v14;
v17 = v15 < v16;
v18 = v15 - v16;
v19 = v18 - 0x7538DCFB76180000LL;
if ( !v17 )
v19 = v18;
v12[v13++] = v19;
v14 = v17;
}
while ( v10 != v13 );
}
mp_div_dec(0LL, a4, &a2[v69], a3, v11, v10);
v20 = a3;
v21 = v71 + *(_QWORD *)(a4 + 8 * v69);
if ( a3 )
{
v22 = 0LL;
do
{
a1[v22] = *(_QWORD *)(a4 + 8 * v22);
++v22;
}
while ( (v69 == 0) + v69 != v22 );
}
v23 = -(long long)(v21 & 1) & 0x4563918244F40000LL;
if ( a3 )
{
v24 = v69 + 1;
do
{
v25 = a1[v24 - 2];
a1[v24 - 2] = v23 + (v25 >> 1);
v26 = -(long long)(v25 & 1) & 0x4563918244F40000LL;
--v24;
v23 = v26;
}
while ( v24 > 1 );
}
else
{
v26 = -(long long)(v21 & 1) & 0x4563918244F40000LL;
}
v36 = 0LL;
if ( v10 > 0 && v26 )
{
v37 = 0LL;
v38 = v69;
do
{
v39 = a2[v38];
v40 = a1[v38] + v39 + v37;
v36 = v40 + 0x7538DCFB76180000LL <= v39;
if ( v40 + 0x7538DCFB76180000LL <= v39 )
v40 += 0x7538DCFB76180000LL;
a2[v38++] = v40;
v37 = v36;
}
while ( a3 != v38 );
}
v41 = v21 >> 1;
if ( v10 > 0 )
{
v42 = v69;
v43 = v21 >> 1;
do
{
v44 = a1[v42];
v45 = v44 + v43;
v46 = v45 + 0x7538DCFB76180000LL <= v44;
if ( v45 + 0x7538DCFB76180000LL <= v44 )
v45 += 0x7538DCFB76180000LL;
a1[v42] = v45;
if ( !v46 )
break;
v43 = 1LL;
v47 = a3 - 1 == v42++;
}
while ( !v47 );
}
if ( v21 <= 1 )
{
mp_mul_basecase_dec((long long)&a2[a3], (long long)a1, v69, a1, v69);
if ( v70 <= 0 )
{
v41 = 0LL;
v20 = a3;
}
else
{
v48 = 0LL;
v49 = 0LL;
v20 = a3;
do
{
v50 = a2[v48];
v51 = a2[a3 + v48] + v49;
v52 = v50 < v51;
v53 = v50 - v51;
v41 = v52;
v54 = v53 - 0x7538DCFB76180000LL;
if ( !v52 )
v54 = v53;
a2[v48++] = v54;
v49 = v52;
}
while ( v70 != v48 );
}
}
if ( (v20 & 1) != 0 )
{
v55 = *v12 < v41;
v56 = *v12 - v41;
v57 = v56 - 0x7538DCFB76180000LL;
if ( !v55 )
v57 = v56;
*v12 = v57;
v41 = v55;
}
v35 = v36 - v41;
if ( v35 < 0 )
{
if ( v20 > 0 )
{
v58 = 0LL;
do
{
v59 = a1[v58];
v60 = v59 != 0;
v61 = v59 - 1;
if ( !v60 )
v61 = 0x8AC7230489E7FFFFLL;
a1[v58] = v61;
if ( v60 )
break;
v47 = v20 - 1 == v58++;
}
while ( !v47 );
}
v62 = v35 + mp_add_mul1_dec((long long)a2, (long long)a1, v20, 2uLL);
if ( (long long)a3 <= 0 )
{
LABEL_59:
v63 = 1LL;
}
else
{
v63 = 0LL;
v64 = 0LL;
while ( 1 )
{
v65 = a2[v64];
v66 = 0x7538DCFB76180001LL;
if ( v65 < 0x8AC7230489E7FFFFLL )
v66 = 1LL;
a2[v64] = v65 + v66;
if ( v65 < 0x8AC7230489E7FFFFLL )
break;
if ( a3 == ++v64 )
goto LABEL_59;
}
}
return v63 + v62;
}
}
return v35;
}
| mp_sqrtrem_rec_dec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
MOV R14,RDI
CMP RDX,0x1
JNZ 0x0018d33d
MOV RAX,-0x7538dcfb76180000
MUL qword ptr [RBX + 0x8]
MOV R15,RDX
MOV R12,RAX
ADD R12,qword ptr [RBX]
ADC R15,0x0
JZ 0x0018d466
BSR RBP,R15
XOR RBP,0x3f
JMP 0x0018d46b
LAB_0018d33d:
MOV RBP,RCX
MOV RAX,RDX
SHR RAX,0x1
MOV R15,RDX
SUB R15,RAX
MOV qword ptr [RSP + 0x10],RAX
LEA R13,[R14 + RAX*0x8]
MOV qword ptr [RSP + 0x8],RDX
AND RDX,-0x2
MOV qword ptr [RSP + 0x18],RDX
LEA R12,[RBX + RDX*0x8]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL 0x0018d2f5
MOV RDI,-0x7538dcfb76180000
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
SETZ AL
TEST R15,R15
SETLE CL
OR CL,AL
JNZ 0x0018d3c1
XOR EAX,EAX
XOR ECX,ECX
LAB_0018d398:
MOV RDX,qword ptr [R12 + RAX*0x8]
ADD RCX,qword ptr [R13 + RAX*0x8]
XOR ESI,ESI
SUB RDX,RCX
SETC SIL
LEA RCX,[RDX + RDI*0x1]
CMOVNC RCX,RDX
MOV qword ptr [R12 + RAX*0x8],RCX
INC RAX
MOV RCX,RSI
CMP R15,RAX
JNZ 0x0018d398
LAB_0018d3c1:
MOV RAX,qword ptr [RSP + 0x10]
LEA RDX,[RBX + RAX*0x8]
XOR EDI,EDI
MOV RSI,RBP
MOV RCX,qword ptr [RSP + 0x8]
MOV R8,R13
MOV R9,R15
CALL 0x00191e72
MOV R11,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RBP + R11*0x8]
ADD RAX,qword ptr [RSP + 0x20]
TEST RDX,RDX
JZ 0x0018d416
CMP R11,0x1
MOV RCX,R11
ADC RCX,0x0
XOR EDI,EDI
LAB_0018d405:
MOV RSI,qword ptr [RBP + RDI*0x8]
MOV qword ptr [R14 + RDI*0x8],RSI
INC RDI
CMP RCX,RDI
JNZ 0x0018d405
LAB_0018d416:
MOV RCX,0x4563918244f40000
MOV EDI,EAX
AND EDI,0x1
NEG RDI
AND RDI,RCX
TEST RDX,RDX
JZ 0x0018d540
LEA RSI,[R11 + 0x1]
LAB_0018d438:
MOV R9,qword ptr [R14 + RSI*0x8 + -0x10]
MOV R8,R9
SHR R8,0x1
ADD R8,RDI
MOV qword ptr [R14 + RSI*0x8 + -0x10],R8
AND R9D,0x1
NEG R9
AND R9,RCX
DEC RSI
MOV RDI,R9
CMP RSI,0x1
JG 0x0018d438
JMP 0x0018d543
LAB_0018d466:
MOV EBP,0x40
LAB_0018d46b:
MOV ECX,EBP
AND CL,0x7e
MOV RAX,R15
SHLD RAX,R12,CL
MOV ECX,EBP
AND CL,0x3e
MOV RDX,R12
SHL RDX,CL
XOR ECX,ECX
TEST BPL,0x40
CMOVNZ RAX,RDX
CMOVZ RCX,RDX
LEA RSI,[RSP + 0x30]
MOV qword ptr [RSI],RCX
MOV qword ptr [RSI + 0x8],RAX
LEA R13,[RSP + 0x28]
MOV RDI,R13
CALL 0x0018f7c8
SHR EBP,0x1
MOV RSI,qword ptr [R13]
MOV ECX,EBP
SHR RSI,CL
MOV qword ptr [R13],RSI
MOV RAX,RSI
MUL RSI
SUB R12,RAX
SBB R15,RDX
MOV RAX,R15
SHLD RAX,R12,0x1
MOV RCX,-0x13e1b582496a9e5b
MUL RCX
MOV RCX,RDX
MOV RAX,RDX
MOV RDX,-0x7538dcfb76180000
MUL RDX
SUB R12,RAX
SBB R15,RDX
MOV RAX,0x158e460913d00000
SUB R12,RAX
MOV RAX,-0x1
SBB RAX,0x0
LEA RDX,[R15 + RAX*0x1]
SAR RDX,0x1
ADD RCX,RDX
MOV RDI,-0x7538dcfb76180000
AND RDX,RDI
ADD RDX,R12
ADC RAX,R15
LEA RBP,[RAX + RCX*0x1]
ADD RBP,0x2
AND RAX,RDI
ADD RAX,RDX
MOV qword ptr [RBX],RAX
MOV qword ptr [R14],RSI
JMP 0x0018d701
LAB_0018d540:
MOV R9,RDI
LAB_0018d543:
MOV R13,0x7538dcfb76180000
XOR EBP,EBP
TEST R15,R15
JLE 0x0018d58a
TEST R9,R9
JZ 0x0018d58a
XOR R8D,R8D
MOV RCX,R11
LAB_0018d55f:
MOV RSI,qword ptr [RBX + RCX*0x8]
ADD R8,RSI
ADD R8,qword ptr [R14 + RCX*0x8]
LEA RDI,[R8 + R13*0x1]
XOR EBP,EBP
CMP RDI,RSI
SETBE BPL
CMOVBE R8,RDI
MOV qword ptr [RBX + RCX*0x8],R8
INC RCX
MOV R8,RBP
CMP RDX,RCX
JNZ 0x0018d55f
LAB_0018d58a:
MOV RCX,RAX
SHR RCX,0x1
TEST R15,R15
JLE 0x0018d5c8
LEA R10,[RDX + -0x1]
MOV RSI,R11
MOV RDI,RCX
LAB_0018d59f:
MOV R8,qword ptr [R14 + RSI*0x8]
ADD RDI,R8
LEA R9,[RDI + R13*0x1]
CMP R9,R8
CMOVBE RDI,R9
MOV qword ptr [R14 + RSI*0x8],RDI
JA 0x0018d5c8
LEA R8,[RSI + 0x1]
MOV EDI,0x1
CMP R10,RSI
MOV RSI,R8
JNZ 0x0018d59f
LAB_0018d5c8:
CMP RAX,0x1
MOV RDI,-0x7538dcfb76180000
JA 0x0018d648
LEA R15,[RBX + RDX*0x8]
MOV RDI,R15
MOV RSI,R14
MOV RDX,R11
MOV RCX,R14
MOV R8,R11
CALL 0x0018cf86
MOV R9,qword ptr [RSP + 0x18]
TEST R9,R9
JLE 0x0018d637
XOR EAX,EAX
XOR R8D,R8D
MOV RDI,-0x7538dcfb76180000
MOV RDX,qword ptr [RSP + 0x8]
LAB_0018d60e:
MOV RSI,qword ptr [RBX + RAX*0x8]
ADD R8,qword ptr [R15 + RAX*0x8]
XOR ECX,ECX
SUB RSI,R8
SETC CL
LEA R8,[RSI + RDI*0x1]
CMOVNC R8,RSI
MOV qword ptr [RBX + RAX*0x8],R8
INC RAX
MOV R8,RCX
CMP R9,RAX
JNZ 0x0018d60e
JMP 0x0018d648
LAB_0018d637:
XOR ECX,ECX
MOV RDI,-0x7538dcfb76180000
MOV RDX,qword ptr [RSP + 0x8]
LAB_0018d648:
TEST DL,0x1
JZ 0x0018d669
MOV RAX,qword ptr [R12]
XOR ESI,ESI
SUB RAX,RCX
SETC SIL
LEA RCX,[RAX + RDI*0x1]
CMOVNC RCX,RAX
MOV qword ptr [R12],RCX
MOV RCX,RSI
LAB_0018d669:
SUB RBP,RCX
JNS 0x0018d701
TEST RDX,RDX
JLE 0x0018d69e
LEA RAX,[RDX + -0x1]
XOR ECX,ECX
DEC RDI
LAB_0018d680:
MOV RSI,qword ptr [R14 + RCX*0x8]
ADD RSI,-0x1
CMOVNC RSI,RDI
MOV qword ptr [R14 + RCX*0x8],RSI
JC 0x0018d69e
LEA RSI,[RCX + 0x1]
CMP RAX,RCX
MOV RCX,RSI
JNZ 0x0018d680
LAB_0018d69e:
MOV ECX,0x2
MOV RDI,RBX
MOV RSI,R14
CALL 0x0018ce0b
MOV R10,qword ptr [RSP + 0x8]
ADD RAX,RBP
TEST R10,R10
JLE 0x0018d6f6
XOR ECX,ECX
MOV R9,-0x7538dcfb76180000
DEC R9
INC R13
MOV EDX,0x1
XOR ESI,ESI
LAB_0018d6d4:
MOV RDI,qword ptr [RBX + RSI*0x8]
CMP RDI,R9
MOV R8,R13
CMOVC R8,RDX
ADD R8,RDI
MOV qword ptr [RBX + RSI*0x8],R8
CMP RDI,R9
JC 0x0018d6fb
INC RSI
CMP R10,RSI
JNZ 0x0018d6d4
LAB_0018d6f6:
MOV ECX,0x1
LAB_0018d6fb:
ADD RAX,RCX
MOV RBP,RAX
LAB_0018d701:
MOV RAX,RBP
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long mp_sqrtrem_rec_dec(ulong *param_1,ulong *param_2,ulong param_3,long param_4)
{
ulong *puVar1;
ulong *puVar2;
ulong uVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
int1 auVar8 [16];
byte bVar9;
ulong uVar10;
long lVar11;
ulong uVar12;
ulong uVar13;
ulong uVar14;
ulong uVar15;
long lVar16;
ulong uVar17;
ulong uVar18;
ulong uVar19;
long lVar20;
long lVar21;
bool bVar22;
ulong uStack_50;
ulong uStack_48;
ulong uStack_40;
if (param_3 == 1) {
auVar7._8_8_ = 0;
auVar7._0_8_ = param_2[1];
uVar10 = SUB168(ZEXT816(10000000000000000000) * auVar7,0);
uVar17 = uVar10 + *param_2;
uVar10 = SUB168(ZEXT816(10000000000000000000) * auVar7,8) + (ulong)CARRY8(uVar10,*param_2);
if (uVar10 == 0) {
uVar13 = 0x40;
}
else {
uVar13 = 0x3f;
if (uVar10 != 0) {
for (; uVar10 >> uVar13 == 0; uVar13 = uVar13 - 1) {
}
}
uVar13 = uVar13 ^ 0x3f;
}
bVar9 = (byte)uVar13 & 0x3e;
uStack_40 = uVar17 << ((byte)uVar13 & 0x3e);
uStack_48 = 0;
if ((uVar13 & 0x40) == 0) {
uStack_48 = uStack_40;
uStack_40 = uVar10 << bVar9 | uVar17 >> 0x40 - bVar9;
}
mp_sqrtrem2(&uStack_50);
uStack_50 = uStack_50 >> ((byte)((uint)uVar13 >> 1) & 0x3f);
auVar4._8_8_ = 0;
auVar4._0_8_ = uStack_50;
auVar8._8_8_ = 0;
auVar8._0_8_ = uStack_50;
uVar13 = SUB168(auVar4 * auVar8,0);
uVar18 = uVar17 - uVar13;
lVar20 = (uVar10 - SUB168(auVar4 * auVar8,8)) - (ulong)(uVar17 < uVar13);
auVar5._8_8_ = 0;
auVar5._0_8_ = lVar20 * 2 | uVar18 >> 0x3f;
uVar17 = SUB168(auVar5 * ZEXT816(0xec1e4a7db69561a5),8);
auVar6._8_8_ = 0;
auVar6._0_8_ = uVar17;
uVar10 = SUB168(auVar6 * ZEXT816(10000000000000000000),0);
uVar13 = uVar18 - uVar10;
lVar21 = (lVar20 - SUB168(auVar6 * ZEXT816(10000000000000000000),8)) - (ulong)(uVar18 < uVar10);
uVar19 = uVar13 + 0xea71b9f6ec300000;
lVar20 = -1 - (ulong)(uVar13 < 0x158e460913d00000);
uVar13 = lVar21 + lVar20 >> 1;
uVar18 = uVar13 & 10000000000000000000;
uVar10 = lVar20 + lVar21 + (ulong)CARRY8(uVar18,uVar19);
lVar20 = uVar10 + uVar17 + uVar13 + 2;
*param_2 = (uVar10 & 10000000000000000000) + uVar18 + uVar19;
*param_1 = uStack_50;
}
else {
uVar10 = param_3 >> 1;
lVar21 = param_3 - uVar10;
puVar1 = param_1 + uVar10;
uVar17 = param_3 & 0xfffffffffffffffe;
puVar2 = param_2 + uVar17;
lVar20 = mp_sqrtrem_rec_dec(puVar1,puVar2,lVar21);
if (0 < lVar21 && lVar20 != 0) {
lVar11 = 0;
uVar13 = 0;
do {
uVar18 = puVar2[lVar11];
uVar12 = uVar13 + puVar1[lVar11];
uVar13 = (ulong)(uVar18 < uVar12);
uVar19 = (uVar18 - uVar12) + 10000000000000000000;
if (uVar18 >= uVar12) {
uVar19 = uVar18 - uVar12;
}
puVar2[lVar11] = uVar19;
lVar11 = lVar11 + 1;
} while (lVar21 != lVar11);
}
mp_div_dec(0,param_4,param_2 + uVar10,param_3,puVar1,lVar21);
uVar13 = *(long *)(param_4 + uVar10 * 8) + lVar20;
if (param_3 != 0) {
lVar20 = 0;
do {
param_1[lVar20] = *(ulong *)(param_4 + lVar20 * 8);
lVar20 = lVar20 + 1;
} while (uVar10 + (uVar10 == 0) != lVar20);
}
uVar18 = -(ulong)((uint)uVar13 & 1) & 5000000000000000000;
if (param_3 != 0) {
lVar20 = uVar10 + 1;
do {
uVar19 = param_1[lVar20 + -2];
param_1[lVar20 + -2] = (uVar19 >> 1) + uVar18;
uVar18 = -(ulong)((uint)uVar19 & 1) & 5000000000000000000;
lVar20 = lVar20 + -1;
} while (1 < lVar20);
}
uVar19 = 0;
if ((0 < lVar21) && (uVar18 != 0)) {
uVar19 = 0;
uVar18 = uVar10;
do {
uVar14 = param_2[uVar18];
uVar15 = uVar19 + uVar14 + param_1[uVar18];
uVar12 = uVar15 + 0x7538dcfb76180000;
uVar19 = (ulong)(uVar12 <= uVar14);
if (uVar12 <= uVar14) {
uVar15 = uVar12;
}
param_2[uVar18] = uVar15;
uVar18 = uVar18 + 1;
} while (param_3 != uVar18);
}
uVar18 = uVar13 >> 1;
if (0 < lVar21) {
uVar12 = uVar10;
uVar14 = uVar18;
do {
uVar3 = param_1[uVar12];
uVar15 = uVar14 + uVar3 + 0x7538dcfb76180000;
uVar14 = uVar14 + uVar3;
if (uVar15 <= uVar3) {
uVar14 = uVar15;
}
param_1[uVar12] = uVar14;
if (uVar3 < uVar15) break;
uVar14 = 1;
bVar22 = param_3 - 1 != uVar12;
uVar12 = uVar12 + 1;
} while (bVar22);
}
if (uVar13 < 2) {
mp_mul_basecase_dec(param_2 + param_3,param_1,uVar10);
if ((long)uVar17 < 1) {
uVar18 = 0;
}
else {
uVar10 = 0;
uVar18 = 0;
do {
uVar13 = param_2[uVar10];
uVar14 = uVar18 + (param_2 + param_3)[uVar10];
uVar18 = (ulong)(uVar13 < uVar14);
uVar12 = (uVar13 - uVar14) + 10000000000000000000;
if (uVar13 >= uVar14) {
uVar12 = uVar13 - uVar14;
}
param_2[uVar10] = uVar12;
uVar10 = uVar10 + 1;
} while (uVar17 != uVar10);
}
}
if ((param_3 & 1) != 0) {
uVar10 = *puVar2;
bVar22 = uVar10 < uVar18;
uVar10 = uVar10 - uVar18;
uVar18 = (ulong)bVar22;
uVar17 = uVar10 + 10000000000000000000;
if (!bVar22) {
uVar17 = uVar10;
}
*puVar2 = uVar17;
}
lVar20 = uVar19 - uVar18;
if (lVar20 < 0) {
if (0 < (long)param_3) {
lVar21 = 0;
do {
uVar10 = param_1[lVar21];
uVar17 = uVar10 - 1;
if (uVar10 == 0) {
uVar17 = 9999999999999999999;
}
param_1[lVar21] = uVar17;
} while ((uVar10 == 0) && (bVar22 = param_3 - 1 != lVar21, lVar21 = lVar21 + 1, bVar22));
}
lVar21 = mp_add_mul1_dec(param_2,param_1,param_3,2);
if (0 < (long)param_3) {
lVar11 = 0;
uVar10 = 0;
do {
uVar17 = param_2[uVar10];
lVar16 = 0x7538dcfb76180001;
if (uVar17 < 9999999999999999999) {
lVar16 = 1;
}
param_2[uVar10] = lVar16 + uVar17;
if (uVar17 < 9999999999999999999) goto LAB_0018d6fb;
uVar10 = uVar10 + 1;
} while (param_3 != uVar10);
}
lVar11 = 1;
LAB_0018d6fb:
lVar20 = lVar21 + lVar20 + lVar11;
}
}
return lVar20;
}
|
|
5,682 | mp_sqrtrem_rec_dec | bluesky950520[P]quickjs/libbf.c | static limb_t mp_sqrtrem_rec_dec(limb_t *tabs, limb_t *taba, limb_t n,
limb_t *tmp_buf)
{
limb_t l, h, rh, ql, qh, c, i;
if (n == 1)
return mp_sqrtrem2_dec(tabs, taba);
#ifdef DEBUG_SQRTREM_DEC
mp_print_str_dec("a", taba, 2 * n);
#endif
l = n / 2;
h = n - l;
qh = mp_sqrtrem_rec_dec(tabs + l, taba + 2 * l, h, tmp_buf);
#ifdef DEBUG_SQRTREM_DEC
mp_print_str_dec("s1", tabs + l, h);
mp_print_str_h_dec("r1", taba + 2 * l, h, qh);
mp_print_str_h_dec("r2", taba + l, n, qh);
#endif
/* the remainder is in taba + 2 * l. Its high bit is in qh */
if (qh) {
mp_sub_dec(taba + 2 * l, taba + 2 * l, tabs + l, h, 0);
}
/* instead of dividing by 2*s, divide by s (which is normalized)
and update q and r */
mp_div_dec(NULL, tmp_buf, taba + l, n, tabs + l, h);
qh += tmp_buf[l];
for(i = 0; i < l; i++)
tabs[i] = tmp_buf[i];
ql = mp_div1_dec(tabs, tabs, l, 2, qh & 1);
qh = qh >> 1; /* 0 or 1 */
if (ql)
rh = mp_add_dec(taba + l, taba + l, tabs + l, h, 0);
else
rh = 0;
#ifdef DEBUG_SQRTREM_DEC
mp_print_str_h_dec("q", tabs, l, qh);
mp_print_str_h_dec("u", taba + l, h, rh);
#endif
mp_add_ui_dec(tabs + l, qh, h);
#ifdef DEBUG_SQRTREM_DEC
mp_print_str_dec("s2", tabs, n);
#endif
/* q = qh, tabs[l - 1 ... 0], r = taba[n - 1 ... l] */
/* subtract q^2. if qh = 1 then q = B^l, so we can take shortcuts */
if (qh) {
c = qh;
} else {
mp_mul_basecase_dec(taba + n, tabs, l, tabs, l);
c = mp_sub_dec(taba, taba, taba + n, 2 * l, 0);
}
rh -= mp_sub_ui_dec(taba + 2 * l, c, n - 2 * l);
if ((slimb_t)rh < 0) {
mp_sub_ui_dec(tabs, 1, n);
rh += mp_add_mul1_dec(taba, tabs, n, 2);
rh += mp_add_ui_dec(taba, 1, n);
}
return rh;
} | O3 | c | mp_sqrtrem_rec_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x1, %rdx
jne 0x8fd7a
movabsq $-0x7538dcfb76180000, %rax # imm = 0x8AC7230489E80000
mulq 0x8(%rbx)
movq %rdx, %r15
movq %rax, %r12
addq (%rbx), %r12
adcq $0x0, %r15
je 0x8fed1
bsrq %r15, %rbp
xorq $0x3f, %rbp
jmp 0x8fed6
movq %rcx, %r13
movq %rdx, %rax
shrq %rax
movq %rdx, %r15
subq %rax, %r15
movq %rax, 0x8(%rsp)
leaq (%r14,%rax,8), %rbp
movq %rdx, 0x20(%rsp)
andq $-0x2, %rdx
movq %rdx, 0x10(%rsp)
leaq (%rbx,%rdx,8), %r12
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x8fd32
movabsq $-0x7538dcfb76180000, %rdi # imm = 0x8AC7230489E80000
movq %rax, 0x18(%rsp)
testq %rax, %rax
sete %al
testq %r15, %r15
setle %cl
orb %al, %cl
jne 0x8fdfe
xorl %eax, %eax
xorl %ecx, %ecx
movq (%r12,%rax,8), %rdx
addq (%rbp,%rax,8), %rcx
xorl %esi, %esi
subq %rcx, %rdx
setb %sil
leaq (%rdx,%rdi), %rcx
cmovaeq %rdx, %rcx
movq %rcx, (%r12,%rax,8)
incq %rax
movq %rsi, %rcx
cmpq %rax, %r15
jne 0x8fdd5
movq 0x8(%rsp), %rax
leaq (%rbx,%rax,8), %rdx
xorl %edi, %edi
movq %r13, %rsi
movq 0x20(%rsp), %rcx
movq %rbp, %r8
movq %rcx, %rbp
movq %r15, %r9
callq 0x948c1
movq 0x8(%rsp), %rdx
movq (%r13,%rdx,8), %rax
addq 0x18(%rsp), %rax
testq %rbp, %rbp
je 0x8ffa7
cmpq $0x1, %rdx
movq %rdx, %rcx
adcq $0x0, %rcx
xorl %edi, %edi
movq (%r13,%rdi,8), %rsi
movq %rsi, (%r14,%rdi,8)
incq %rdi
cmpq %rdi, %rcx
jne 0x8fe44
testb $0x1, %al
sete %dil
testq %rbp, %rbp
movabsq $-0x7538dcfb76180000, %r10 # imm = 0x8AC7230489E80000
movabsq $0x7538dcfb76180000, %r11 # imm = 0x7538DCFB76180000
je 0x8feba
movl %eax, %esi
andl $0x1, %esi
negq %rsi
movabsq $0x4563918244f40000, %rcx # imm = 0x4563918244F40000
andq %rcx, %rsi
leaq 0x1(%rdx), %r9
movq -0x10(%r14,%r9,8), %r8
movq %r8, %rdi
shrq %rdi
addq %rsi, %rdi
movq %rdi, -0x10(%r14,%r9,8)
andl $0x1, %r8d
negq %r8
setae %dil
andq %rcx, %r8
decq %r9
movq %r8, %rsi
cmpq $0x1, %r9
ja 0x8fe8d
movq %rax, %rcx
shrq %rcx
testb %dil, %dil
je 0x8ffde
xorl %r13d, %r13d
jmp 0x90015
movl $0x40, %ebp
movl %ebp, %ecx
andb $0x7e, %cl
movq %r15, %rax
shldq %cl, %r12, %rax
movl %ebp, %ecx
andb $0x3e, %cl
movq %r12, %rdx
shlq %cl, %rdx
xorl %ecx, %ecx
testb $0x40, %bpl
cmovneq %rdx, %rax
cmoveq %rdx, %rcx
leaq 0x30(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, 0x8(%rsi)
leaq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0x9227a
shrl %ebp
movq (%r13), %rsi
movl %ebp, %ecx
shrq %cl, %rsi
movq %rsi, %rax
mulq %rsi
subq %rax, %r12
sbbq %rdx, %r15
movq %r15, %rax
shldq $0x1, %r12, %rax
movabsq $-0x13e1b582496a9e5b, %rcx # imm = 0xEC1E4A7DB69561A5
mulq %rcx
movq %rdx, %rcx
movq %rdx, %rax
movabsq $-0x7538dcfb76180000, %rdx # imm = 0x8AC7230489E80000
mulq %rdx
subq %rax, %r12
sbbq %rdx, %r15
movabsq $0x158e460913d00000, %rax # imm = 0x158E460913D00000
subq %rax, %r12
movq $-0x1, %rax
sbbq $0x0, %rax
leaq (%r15,%rax), %rdx
sarq %rdx
addq %rdx, %rcx
movabsq $-0x7538dcfb76180000, %rdi # imm = 0x8AC7230489E80000
andq %rdi, %rdx
addq %r12, %rdx
adcq %r15, %rax
leaq (%rax,%rcx), %r13
addq $0x2, %r13
andq %rdi, %rax
addq %rdx, %rax
movq %rax, (%rbx)
movq %rsi, (%r14)
jmp 0x90185
movq %rax, %rcx
shrq %rcx
testb $0x1, %al
jne 0x8ffca
xorl %r13d, %r13d
movabsq $-0x7538dcfb76180000, %r10 # imm = 0x8AC7230489E80000
movabsq $0x7538dcfb76180000, %r11 # imm = 0x7538DCFB76180000
jmp 0x90015
movabsq $-0x7538dcfb76180000, %r10 # imm = 0x8AC7230489E80000
movabsq $0x7538dcfb76180000, %r11 # imm = 0x7538DCFB76180000
xorl %r13d, %r13d
testq %r15, %r15
jle 0x90052
movq %rdx, %r9
movq (%rbx,%r9,8), %rsi
addq %rsi, %r13
movq %r13, %rdi
addq (%r14,%r9,8), %rdi
leaq (%rdi,%r11), %r8
xorl %r13d, %r13d
cmpq %rsi, %r8
setbe %r13b
cmovbeq %r8, %rdi
movq %rdi, (%rbx,%r9,8)
incq %r9
cmpq %r9, %rbp
jne 0x8ffe9
testq %r15, %r15
jle 0x90052
leaq -0x1(%rbp), %r15
movq %rdx, %rsi
movq %rcx, %rdi
movq (%r14,%rsi,8), %r8
addq %r8, %rdi
leaq (%rdi,%r11), %r9
cmpq %r8, %r9
cmovbeq %r9, %rdi
movq %rdi, (%r14,%rsi,8)
ja 0x9004d
leaq 0x1(%rsi), %r8
movl $0x1, %edi
cmpq %rsi, %r15
movq %r8, %rsi
jne 0x90024
movq 0x8(%rsp), %rdx
cmpq $0x1, %rax
ja 0x900ba
leaq (%rbx,%rbp,8), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rcx
movq %rdx, %r8
callq 0x8f9b4
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
jle 0x900ae
xorl %eax, %eax
xorl %edx, %edx
movabsq $-0x7538dcfb76180000, %r10 # imm = 0x8AC7230489E80000
movq (%rbx,%rax,8), %rsi
addq (%r15,%rax,8), %rdx
xorl %ecx, %ecx
subq %rdx, %rsi
setb %cl
leaq (%rsi,%r10), %rdx
cmovaeq %rsi, %rdx
movq %rdx, (%rbx,%rax,8)
incq %rax
movq %rcx, %rdx
cmpq %rax, %rdi
jne 0x90085
jmp 0x900ba
xorl %ecx, %ecx
movabsq $-0x7538dcfb76180000, %r10 # imm = 0x8AC7230489E80000
testb $0x1, %bpl
je 0x900db
movq (%r12), %rax
xorl %edx, %edx
subq %rcx, %rax
setb %dl
leaq (%rax,%r10), %rcx
cmovaeq %rax, %rcx
movq %rcx, (%r12)
movq %rdx, %rcx
subq %rcx, %r13
jns 0x90185
testq %rbp, %rbp
jle 0x90164
movl $0x1, %eax
decq %r10
movq -0x8(%r14,%rax,8), %rcx
addq $-0x1, %rcx
cmovaeq %r10, %rcx
movq %rcx, -0x8(%r14,%rax,8)
jb 0x90111
leaq 0x1(%rax), %rcx
cmpq %rax, %rbp
movq %rcx, %rax
jne 0x900f1
movl $0x2, %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r10, %r14
callq 0x8f839
movq %r14, %r9
xorl %ecx, %ecx
movabsq $0x7538dcfb76180000, %r10 # imm = 0x7538DCFB76180000
incq %r10
movl $0x1, %edx
xorl %esi, %esi
movq (%rbx,%rsi,8), %rdi
cmpq %r9, %rdi
movq %r10, %r8
cmovbq %rdx, %r8
addq %rdi, %r8
movq %r8, (%rbx,%rsi,8)
cmpq %r9, %rdi
jb 0x9017c
incq %rsi
cmpq %rsi, %rbp
jne 0x90140
jmp 0x90177
movl $0x2, %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x8f839
movl $0x1, %ecx
addq %r13, %rax
addq %rcx, %rax
movq %rax, %r13
movq %r13, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mp_sqrtrem_rec_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rsi
mov r14, rdi
cmp rdx, 1
jnz short loc_8FD7A
mov rax, 8AC7230489E80000h
mul qword ptr [rbx+8]
mov r15, rdx
mov r12, rax
add r12, [rbx]
adc r15, 0
jz loc_8FED1
bsr rbp, r15
xor rbp, 3Fh
jmp loc_8FED6
loc_8FD7A:
mov r13, rcx
mov rax, rdx
shr rax, 1
mov r15, rdx
sub r15, rax
mov [rsp+78h+var_70], rax
lea rbp, [r14+rax*8]
mov [rsp+78h+var_58], rdx
and rdx, 0FFFFFFFFFFFFFFFEh
mov [rsp+78h+var_68], rdx
lea r12, [rbx+rdx*8]
mov rdi, rbp
mov rsi, r12
mov rdx, r15
call mp_sqrtrem_rec_dec
mov rdi, 8AC7230489E80000h
mov [rsp+78h+var_60], rax
test rax, rax
setz al
test r15, r15
setle cl
or cl, al
jnz short loc_8FDFE
xor eax, eax
xor ecx, ecx
loc_8FDD5:
mov rdx, [r12+rax*8]
add rcx, [rbp+rax*8+0]
xor esi, esi
sub rdx, rcx
setb sil
lea rcx, [rdx+rdi]
cmovnb rcx, rdx
mov [r12+rax*8], rcx
inc rax
mov rcx, rsi
cmp r15, rax
jnz short loc_8FDD5
loc_8FDFE:
mov rax, [rsp+78h+var_70]
lea rdx, [rbx+rax*8]
xor edi, edi
mov rsi, r13
mov rcx, [rsp+78h+var_58]
mov r8, rbp
mov rbp, rcx
mov r9, r15
call mp_div_dec
mov rdx, [rsp+78h+var_70]
mov rax, [r13+rdx*8+0]
add rax, [rsp+78h+var_60]
test rbp, rbp
jz loc_8FFA7
cmp rdx, 1
mov rcx, rdx
adc rcx, 0
xor edi, edi
loc_8FE44:
mov rsi, [r13+rdi*8+0]
mov [r14+rdi*8], rsi
inc rdi
cmp rcx, rdi
jnz short loc_8FE44
test al, 1
setz dil
test rbp, rbp
mov r10, 8AC7230489E80000h
mov r11, 7538DCFB76180000h
jz short loc_8FEBA
mov esi, eax
and esi, 1
neg rsi
mov rcx, 4563918244F40000h
and rsi, rcx
lea r9, [rdx+1]
loc_8FE8D:
mov r8, [r14+r9*8-10h]
mov rdi, r8
shr rdi, 1
add rdi, rsi
mov [r14+r9*8-10h], rdi
and r8d, 1
neg r8
setnb dil
and r8, rcx
dec r9
mov rsi, r8
cmp r9, 1
ja short loc_8FE8D
loc_8FEBA:
mov rcx, rax
shr rcx, 1
test dil, dil
jz loc_8FFDE
xor r13d, r13d
jmp loc_90015
loc_8FED1:
mov ebp, 40h ; '@'
loc_8FED6:
mov ecx, ebp
and cl, 7Eh
mov rax, r15
shld rax, r12, cl
mov ecx, ebp
and cl, 3Eh
mov rdx, r12
shl rdx, cl
xor ecx, ecx
test bpl, 40h
cmovnz rax, rdx
cmovz rcx, rdx
lea rsi, [rsp+78h+var_48]
mov [rsi], rcx
mov [rsi+8], rax
lea r13, [rsp+78h+var_50]
mov rdi, r13
call mp_sqrtrem2
shr ebp, 1
mov rsi, [r13+0]
mov ecx, ebp
shr rsi, cl
mov rax, rsi
mul rsi
sub r12, rax
sbb r15, rdx
mov rax, r15
shld rax, r12, 1
mov rcx, 0EC1E4A7DB69561A5h
mul rcx
mov rcx, rdx
mov rax, rdx
mov rdx, 8AC7230489E80000h
mul rdx
sub r12, rax
sbb r15, rdx
mov rax, 158E460913D00000h
sub r12, rax
mov rax, 0FFFFFFFFFFFFFFFFh
sbb rax, 0
lea rdx, [r15+rax]
sar rdx, 1
add rcx, rdx
mov rdi, 8AC7230489E80000h
and rdx, rdi
add rdx, r12
adc rax, r15
lea r13, [rax+rcx]
add r13, 2
and rax, rdi
add rax, rdx
mov [rbx], rax
mov [r14], rsi
jmp loc_90185
loc_8FFA7:
mov rcx, rax
shr rcx, 1
test al, 1
jnz short loc_8FFCA
xor r13d, r13d
mov r10, 8AC7230489E80000h
mov r11, 7538DCFB76180000h
jmp short loc_90015
loc_8FFCA:
mov r10, 8AC7230489E80000h
mov r11, 7538DCFB76180000h
loc_8FFDE:
xor r13d, r13d
test r15, r15
jle short loc_90052
mov r9, rdx
loc_8FFE9:
mov rsi, [rbx+r9*8]
add r13, rsi
mov rdi, r13
add rdi, [r14+r9*8]
lea r8, [rdi+r11]
xor r13d, r13d
cmp r8, rsi
setbe r13b
cmovbe rdi, r8
mov [rbx+r9*8], rdi
inc r9
cmp rbp, r9
jnz short loc_8FFE9
loc_90015:
test r15, r15
jle short loc_90052
lea r15, [rbp-1]
mov rsi, rdx
mov rdi, rcx
loc_90024:
mov r8, [r14+rsi*8]
add rdi, r8
lea r9, [rdi+r11]
cmp r9, r8
cmovbe rdi, r9
mov [r14+rsi*8], rdi
ja short loc_9004D
lea r8, [rsi+1]
mov edi, 1
cmp r15, rsi
mov rsi, r8
jnz short loc_90024
loc_9004D:
mov rdx, [rsp+78h+var_70]
loc_90052:
cmp rax, 1
ja short loc_900BA
lea r15, [rbx+rbp*8]
mov rdi, r15
mov rsi, r14
mov rcx, r14
mov r8, rdx
call mp_mul_basecase_dec
mov rdi, [rsp+78h+var_68]
test rdi, rdi
jle short loc_900AE
xor eax, eax
xor edx, edx
mov r10, 8AC7230489E80000h
loc_90085:
mov rsi, [rbx+rax*8]
add rdx, [r15+rax*8]
xor ecx, ecx
sub rsi, rdx
setb cl
lea rdx, [rsi+r10]
cmovnb rdx, rsi
mov [rbx+rax*8], rdx
inc rax
mov rdx, rcx
cmp rdi, rax
jnz short loc_90085
jmp short loc_900BA
loc_900AE:
xor ecx, ecx
mov r10, 8AC7230489E80000h
loc_900BA:
test bpl, 1
jz short loc_900DB
mov rax, [r12]
xor edx, edx
sub rax, rcx
setb dl
lea rcx, [rax+r10]
cmovnb rcx, rax
mov [r12], rcx
mov rcx, rdx
loc_900DB:
sub r13, rcx
jns loc_90185
test rbp, rbp
jle short loc_90164
mov eax, 1
dec r10
loc_900F1:
mov rcx, [r14+rax*8-8]
add rcx, 0FFFFFFFFFFFFFFFFh
cmovnb rcx, r10
mov [r14+rax*8-8], rcx
jb short loc_90111
lea rcx, [rax+1]
cmp rbp, rax
mov rax, rcx
jnz short loc_900F1
loc_90111:
mov ecx, 2
mov rdi, rbx
mov rsi, r14
mov rdx, rbp
mov r14, r10
call mp_add_mul1_dec
mov r9, r14
xor ecx, ecx
mov r10, 7538DCFB76180000h
inc r10
mov edx, 1
xor esi, esi
loc_90140:
mov rdi, [rbx+rsi*8]
cmp rdi, r9
mov r8, r10
cmovb r8, rdx
add r8, rdi
mov [rbx+rsi*8], r8
cmp rdi, r9
jb short loc_9017C
inc rsi
cmp rbp, rsi
jnz short loc_90140
jmp short loc_90177
loc_90164:
mov ecx, 2
mov rdi, rbx
mov rsi, r14
mov rdx, rbp
call mp_add_mul1_dec
loc_90177:
mov ecx, 1
loc_9017C:
add rax, r13
add rax, rcx
mov r13, rax
loc_90185:
mov rax, r13
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mp_sqrtrem_rec_dec(unsigned long long *a1, unsigned long long *a2, unsigned long long a3, long long a4)
{
unsigned __int128 v6; // kr00_16
unsigned long long v7; // rbp
unsigned int v8; // ebp
long long v10; // r15
unsigned long long *v11; // rbp
unsigned long long *v12; // r12
long long v13; // rax
_BOOL8 v14; // rcx
unsigned long long v15; // rdx
unsigned long long v16; // rcx
bool v17; // cf
unsigned long long v18; // rdx
unsigned long long v19; // rcx
long long v20; // rdx
unsigned long long v21; // rax
long long v22; // rdi
long long v23; // rsi
unsigned long long v24; // r9
unsigned long long v25; // r8
long long v26; // r8
unsigned long long v27; // rcx
_BOOL8 v28; // r13
unsigned long long v29; // rax
long long v30; // rcx
unsigned long long v31; // rsi
__int128 v32; // kr10_16
unsigned long long v33; // rcx
unsigned long long v34; // r15
unsigned __int128 v35; // kr30_16
long long v36; // rdx
long long v37; // r13
unsigned long long v38; // r9
unsigned long long v39; // rsi
unsigned long long v40; // rdi
unsigned long long v41; // rsi
long long v42; // rdi
unsigned long long v43; // r8
unsigned long long v44; // rdi
bool v45; // cc
bool v46; // zf
long long v47; // rax
_BOOL8 v48; // rdx
unsigned long long v49; // rsi
unsigned long long v50; // rdx
bool v51; // cf
unsigned long long v52; // rsi
unsigned long long v53; // rdx
bool v54; // cf
unsigned long long v55; // rax
unsigned long long v56; // rcx
long long v57; // rax
unsigned long long v58; // rcx
bool v59; // cf
unsigned long long v60; // rcx
long long v61; // rax
long long v62; // rcx
long long v63; // rsi
unsigned long long v64; // rdi
long long v65; // r8
unsigned long long v67; // [rsp+8h] [rbp-70h]
signed long long v68; // [rsp+10h] [rbp-68h]
long long v69; // [rsp+18h] [rbp-60h]
unsigned long long v71; // [rsp+28h] [rbp-50h] BYREF
_QWORD v72[9]; // [rsp+30h] [rbp-48h] BYREF
if ( a3 == 1 )
{
v6 = *a2 + a2[1] * (unsigned __int128)0x8AC7230489E80000LL;
if ( *((_QWORD *)&v6 + 1) )
{
_BitScanReverse64(&v7, *((unsigned long long *)&v6 + 1));
v8 = v7 ^ 0x3F;
}
else
{
v8 = 64;
}
v29 = (*((_QWORD *)&v6 + 1) << (v8 & 0x7E)) | ((unsigned long long)v6 >> (64 - (v8 & 0x7E)));
v30 = 0LL;
if ( (v8 & 0x40) != 0 )
v29 = (*a2 - 0x7538DCFB76180000LL * a2[1]) << (v8 & 0x3E);
else
v30 = (*a2 - 0x7538DCFB76180000LL * a2[1]) << (v8 & 0x3E);
v72[0] = v30;
v72[1] = v29;
mp_sqrtrem2(&v71, v72);
v31 = v71 >> (v8 >> 1);
v32 = v6 - v31 * (unsigned __int128)v31;
v33 = (0xEC1E4A7DB69561A5LL * (unsigned __int128)(unsigned long long)(v32 >> 63)) >> 64;
v34 = (v32 - 0x8AC7230489E80000LL * (unsigned __int128)v33) >> 64;
v35 = __PAIR128__(-1LL, (unsigned long long)v32 - 0x8AC7230489E80000LL * v33) - 0x158E460913D00000LL;
v36 = (long long)(v34 + *((_QWORD *)&v35 + 1)) >> 1;
v37 = ((v35 + __PAIR128__(v34, v36 & 0x8AC7230489E80000LL)) >> 64) + v36 + v33 + 2;
*a2 = v35
+ (v36 & 0x8AC7230489E80000LL)
+ (((v35 + __PAIR128__(v34, v36 & 0x8AC7230489E80000LL)) >> 64) & 0x8AC7230489E80000LL);
*a1 = v31;
return v37;
}
v10 = a3 - (a3 >> 1);
v67 = a3 >> 1;
v11 = &a1[a3 >> 1];
v68 = a3 & 0xFFFFFFFFFFFFFFFELL;
v12 = &a2[a3 & 0xFFFFFFFFFFFFFFFELL];
v69 = mp_sqrtrem_rec_dec(v11, v12, v10, a4);
if ( v69 != 0 && v10 > 0 )
{
v13 = 0LL;
v14 = 0LL;
do
{
v15 = v12[v13];
v16 = v11[v13] + v14;
v17 = v15 < v16;
v18 = v15 - v16;
v19 = v18 - 0x7538DCFB76180000LL;
if ( !v17 )
v19 = v18;
v12[v13++] = v19;
v14 = v17;
}
while ( v10 != v13 );
}
mp_div_dec(0LL, a4, &a2[v67], a3, v11, v10);
v20 = v67;
v21 = v69 + *(_QWORD *)(a4 + 8 * v67);
if ( a3 )
{
v22 = 0LL;
do
{
a1[v22] = *(_QWORD *)(a4 + 8 * v22);
++v22;
}
while ( (v67 == 0) + v67 != v22 );
v23 = -(long long)(v21 & 1) & 0x4563918244F40000LL;
v24 = v67 + 1;
do
{
v25 = a1[v24 - 2];
a1[v24 - 2] = v23 + (v25 >> 1);
v26 = -(long long)(v25 & 1);
--v24;
v23 = v26 & 0x4563918244F40000LL;
}
while ( v24 > 1 );
v27 = v21 >> 1;
if ( !v26 )
{
v28 = 0LL;
goto LABEL_28;
}
}
else
{
v27 = v21 >> 1;
if ( (v21 & 1) == 0 )
{
v28 = 0LL;
goto LABEL_28;
}
}
v28 = 0LL;
if ( v10 <= 0 )
goto LABEL_35;
v38 = v67;
do
{
v39 = a2[v38];
v40 = a1[v38] + v39 + v28;
v28 = v40 + 0x7538DCFB76180000LL <= v39;
if ( v40 + 0x7538DCFB76180000LL <= v39 )
v40 += 0x7538DCFB76180000LL;
a2[v38++] = v40;
}
while ( a3 != v38 );
LABEL_28:
if ( v10 > 0 )
{
v41 = v67;
v42 = v27;
do
{
v43 = a1[v41];
v44 = v43 + v42;
v45 = v44 + 0x7538DCFB76180000LL <= v43;
if ( v44 + 0x7538DCFB76180000LL <= v43 )
v44 += 0x7538DCFB76180000LL;
a1[v41] = v44;
if ( !v45 )
break;
v42 = 1LL;
v46 = a3 - 1 == v41++;
}
while ( !v46 );
v20 = v67;
}
LABEL_35:
if ( v21 <= 1 )
{
mp_mul_basecase_dec((long long)&a2[a3], (long long)a1, v20, a1, v20);
if ( v68 <= 0 )
{
v27 = 0LL;
}
else
{
v47 = 0LL;
v48 = 0LL;
do
{
v49 = a2[v47];
v50 = a2[a3 + v47] + v48;
v51 = v49 < v50;
v52 = v49 - v50;
v27 = v51;
v53 = v52 - 0x7538DCFB76180000LL;
if ( !v51 )
v53 = v52;
a2[v47++] = v53;
v48 = v51;
}
while ( v68 != v47 );
}
}
if ( (a3 & 1) != 0 )
{
v54 = *v12 < v27;
v55 = *v12 - v27;
v56 = v55 - 0x7538DCFB76180000LL;
if ( !v54 )
v56 = v55;
*v12 = v56;
v27 = v54;
}
v37 = v28 - v27;
if ( v37 < 0 )
{
if ( (long long)a3 <= 0 )
{
v61 = mp_add_mul1_dec((long long)a2, (long long)a1, a3, 2uLL);
LABEL_61:
v62 = 1LL;
}
else
{
v57 = 1LL;
do
{
v58 = a1[v57 - 1];
v59 = v58 != 0;
v60 = v58 - 1;
if ( !v59 )
v60 = 0x8AC7230489E7FFFFLL;
a1[v57 - 1] = v60;
if ( v59 )
break;
v46 = a3 == v57++;
}
while ( !v46 );
v61 = mp_add_mul1_dec((long long)a2, (long long)a1, a3, 2uLL);
v62 = 0LL;
v63 = 0LL;
while ( 1 )
{
v64 = a2[v63];
v65 = 0x7538DCFB76180001LL;
if ( v64 < 0x8AC7230489E7FFFFLL )
v65 = 1LL;
a2[v63] = v64 + v65;
if ( v64 < 0x8AC7230489E7FFFFLL )
break;
if ( a3 == ++v63 )
goto LABEL_61;
}
}
v37 += v62 + v61;
}
return v37;
}
| mp_sqrtrem_rec_dec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
MOV R14,RDI
CMP RDX,0x1
JNZ 0x0018fd7a
MOV RAX,-0x7538dcfb76180000
MUL qword ptr [RBX + 0x8]
MOV R15,RDX
MOV R12,RAX
ADD R12,qword ptr [RBX]
ADC R15,0x0
JZ 0x0018fed1
BSR RBP,R15
XOR RBP,0x3f
JMP 0x0018fed6
LAB_0018fd7a:
MOV R13,RCX
MOV RAX,RDX
SHR RAX,0x1
MOV R15,RDX
SUB R15,RAX
MOV qword ptr [RSP + 0x8],RAX
LEA RBP,[R14 + RAX*0x8]
MOV qword ptr [RSP + 0x20],RDX
AND RDX,-0x2
MOV qword ptr [RSP + 0x10],RDX
LEA R12,[RBX + RDX*0x8]
MOV RDI,RBP
MOV RSI,R12
MOV RDX,R15
CALL 0x0018fd32
MOV RDI,-0x7538dcfb76180000
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
SETZ AL
TEST R15,R15
SETLE CL
OR CL,AL
JNZ 0x0018fdfe
XOR EAX,EAX
XOR ECX,ECX
LAB_0018fdd5:
MOV RDX,qword ptr [R12 + RAX*0x8]
ADD RCX,qword ptr [RBP + RAX*0x8]
XOR ESI,ESI
SUB RDX,RCX
SETC SIL
LEA RCX,[RDX + RDI*0x1]
CMOVNC RCX,RDX
MOV qword ptr [R12 + RAX*0x8],RCX
INC RAX
MOV RCX,RSI
CMP R15,RAX
JNZ 0x0018fdd5
LAB_0018fdfe:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RBX + RAX*0x8]
XOR EDI,EDI
MOV RSI,R13
MOV RCX,qword ptr [RSP + 0x20]
MOV R8,RBP
MOV RBP,RCX
MOV R9,R15
CALL 0x001948c1
MOV RDX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [R13 + RDX*0x8]
ADD RAX,qword ptr [RSP + 0x18]
TEST RBP,RBP
JZ 0x0018ffa7
CMP RDX,0x1
MOV RCX,RDX
ADC RCX,0x0
XOR EDI,EDI
LAB_0018fe44:
MOV RSI,qword ptr [R13 + RDI*0x8]
MOV qword ptr [R14 + RDI*0x8],RSI
INC RDI
CMP RCX,RDI
JNZ 0x0018fe44
TEST AL,0x1
SETZ DIL
TEST RBP,RBP
MOV R10,-0x7538dcfb76180000
MOV R11,0x7538dcfb76180000
JZ 0x0018feba
MOV ESI,EAX
AND ESI,0x1
NEG RSI
MOV RCX,0x4563918244f40000
AND RSI,RCX
LEA R9,[RDX + 0x1]
LAB_0018fe8d:
MOV R8,qword ptr [R14 + R9*0x8 + -0x10]
MOV RDI,R8
SHR RDI,0x1
ADD RDI,RSI
MOV qword ptr [R14 + R9*0x8 + -0x10],RDI
AND R8D,0x1
NEG R8
SETNC DIL
AND R8,RCX
DEC R9
MOV RSI,R8
CMP R9,0x1
JA 0x0018fe8d
LAB_0018feba:
MOV RCX,RAX
SHR RCX,0x1
TEST DIL,DIL
JZ 0x0018ffde
XOR R13D,R13D
JMP 0x00190015
LAB_0018fed1:
MOV EBP,0x40
LAB_0018fed6:
MOV ECX,EBP
AND CL,0x7e
MOV RAX,R15
SHLD RAX,R12,CL
MOV ECX,EBP
AND CL,0x3e
MOV RDX,R12
SHL RDX,CL
XOR ECX,ECX
TEST BPL,0x40
CMOVNZ RAX,RDX
CMOVZ RCX,RDX
LEA RSI,[RSP + 0x30]
MOV qword ptr [RSI],RCX
MOV qword ptr [RSI + 0x8],RAX
LEA R13,[RSP + 0x28]
MOV RDI,R13
CALL 0x0019227a
SHR EBP,0x1
MOV RSI,qword ptr [R13]
MOV ECX,EBP
SHR RSI,CL
MOV RAX,RSI
MUL RSI
SUB R12,RAX
SBB R15,RDX
MOV RAX,R15
SHLD RAX,R12,0x1
MOV RCX,-0x13e1b582496a9e5b
MUL RCX
MOV RCX,RDX
MOV RAX,RDX
MOV RDX,-0x7538dcfb76180000
MUL RDX
SUB R12,RAX
SBB R15,RDX
MOV RAX,0x158e460913d00000
SUB R12,RAX
MOV RAX,-0x1
SBB RAX,0x0
LEA RDX,[R15 + RAX*0x1]
SAR RDX,0x1
ADD RCX,RDX
MOV RDI,-0x7538dcfb76180000
AND RDX,RDI
ADD RDX,R12
ADC RAX,R15
LEA R13,[RAX + RCX*0x1]
ADD R13,0x2
AND RAX,RDI
ADD RAX,RDX
MOV qword ptr [RBX],RAX
MOV qword ptr [R14],RSI
JMP 0x00190185
LAB_0018ffa7:
MOV RCX,RAX
SHR RCX,0x1
TEST AL,0x1
JNZ 0x0018ffca
XOR R13D,R13D
MOV R10,-0x7538dcfb76180000
MOV R11,0x7538dcfb76180000
JMP 0x00190015
LAB_0018ffca:
MOV R10,-0x7538dcfb76180000
MOV R11,0x7538dcfb76180000
LAB_0018ffde:
XOR R13D,R13D
TEST R15,R15
JLE 0x00190052
MOV R9,RDX
LAB_0018ffe9:
MOV RSI,qword ptr [RBX + R9*0x8]
ADD R13,RSI
MOV RDI,R13
ADD RDI,qword ptr [R14 + R9*0x8]
LEA R8,[RDI + R11*0x1]
XOR R13D,R13D
CMP R8,RSI
SETBE R13B
CMOVBE RDI,R8
MOV qword ptr [RBX + R9*0x8],RDI
INC R9
CMP RBP,R9
JNZ 0x0018ffe9
LAB_00190015:
TEST R15,R15
JLE 0x00190052
LEA R15,[RBP + -0x1]
MOV RSI,RDX
MOV RDI,RCX
LAB_00190024:
MOV R8,qword ptr [R14 + RSI*0x8]
ADD RDI,R8
LEA R9,[RDI + R11*0x1]
CMP R9,R8
CMOVBE RDI,R9
MOV qword ptr [R14 + RSI*0x8],RDI
JA 0x0019004d
LEA R8,[RSI + 0x1]
MOV EDI,0x1
CMP R15,RSI
MOV RSI,R8
JNZ 0x00190024
LAB_0019004d:
MOV RDX,qword ptr [RSP + 0x8]
LAB_00190052:
CMP RAX,0x1
JA 0x001900ba
LEA R15,[RBX + RBP*0x8]
MOV RDI,R15
MOV RSI,R14
MOV RCX,R14
MOV R8,RDX
CALL 0x0018f9b4
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JLE 0x001900ae
XOR EAX,EAX
XOR EDX,EDX
MOV R10,-0x7538dcfb76180000
LAB_00190085:
MOV RSI,qword ptr [RBX + RAX*0x8]
ADD RDX,qword ptr [R15 + RAX*0x8]
XOR ECX,ECX
SUB RSI,RDX
SETC CL
LEA RDX,[RSI + R10*0x1]
CMOVNC RDX,RSI
MOV qword ptr [RBX + RAX*0x8],RDX
INC RAX
MOV RDX,RCX
CMP RDI,RAX
JNZ 0x00190085
JMP 0x001900ba
LAB_001900ae:
XOR ECX,ECX
MOV R10,-0x7538dcfb76180000
LAB_001900ba:
TEST BPL,0x1
JZ 0x001900db
MOV RAX,qword ptr [R12]
XOR EDX,EDX
SUB RAX,RCX
SETC DL
LEA RCX,[RAX + R10*0x1]
CMOVNC RCX,RAX
MOV qword ptr [R12],RCX
MOV RCX,RDX
LAB_001900db:
SUB R13,RCX
JNS 0x00190185
TEST RBP,RBP
JLE 0x00190164
MOV EAX,0x1
DEC R10
LAB_001900f1:
MOV RCX,qword ptr [R14 + RAX*0x8 + -0x8]
ADD RCX,-0x1
CMOVNC RCX,R10
MOV qword ptr [R14 + RAX*0x8 + -0x8],RCX
JC 0x00190111
LEA RCX,[RAX + 0x1]
CMP RBP,RAX
MOV RAX,RCX
JNZ 0x001900f1
LAB_00190111:
MOV ECX,0x2
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RBP
MOV R14,R10
CALL 0x0018f839
MOV R9,R14
XOR ECX,ECX
MOV R10,0x7538dcfb76180000
INC R10
MOV EDX,0x1
XOR ESI,ESI
LAB_00190140:
MOV RDI,qword ptr [RBX + RSI*0x8]
CMP RDI,R9
MOV R8,R10
CMOVC R8,RDX
ADD R8,RDI
MOV qword ptr [RBX + RSI*0x8],R8
CMP RDI,R9
JC 0x0019017c
INC RSI
CMP RBP,RSI
JNZ 0x00190140
JMP 0x00190177
LAB_00190164:
MOV ECX,0x2
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RBP
CALL 0x0018f839
LAB_00190177:
MOV ECX,0x1
LAB_0019017c:
ADD RAX,R13
ADD RAX,RCX
MOV R13,RAX
LAB_00190185:
MOV RAX,R13
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long mp_sqrtrem_rec_dec(ulong *param_1,ulong *param_2,ulong param_3,long param_4)
{
ulong *puVar1;
ulong *puVar2;
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
byte bVar8;
ulong uVar9;
long lVar10;
ulong uVar11;
ulong uVar12;
ulong uVar13;
ulong uVar14;
long lVar15;
ulong uVar16;
ulong uVar17;
ulong uVar18;
long lVar19;
long lVar20;
bool bVar21;
ulong uStack_50;
ulong uStack_48;
ulong uStack_40;
if (param_3 == 1) {
auVar6._8_8_ = 0;
auVar6._0_8_ = param_2[1];
uVar9 = SUB168(ZEXT816(10000000000000000000) * auVar6,0);
uVar16 = uVar9 + *param_2;
uVar9 = SUB168(ZEXT816(10000000000000000000) * auVar6,8) + (ulong)CARRY8(uVar9,*param_2);
if (uVar9 == 0) {
uVar13 = 0x40;
}
else {
uVar13 = 0x3f;
if (uVar9 != 0) {
for (; uVar9 >> uVar13 == 0; uVar13 = uVar13 - 1) {
}
}
uVar13 = uVar13 ^ 0x3f;
}
bVar8 = (byte)uVar13 & 0x3e;
uStack_40 = uVar16 << ((byte)uVar13 & 0x3e);
uStack_48 = 0;
if ((uVar13 & 0x40) == 0) {
uStack_48 = uStack_40;
uStack_40 = uVar9 << bVar8 | uVar16 >> 0x40 - bVar8;
}
mp_sqrtrem2(&uStack_50);
uStack_50 = uStack_50 >> ((byte)((uint)uVar13 >> 1) & 0x3f);
auVar3._8_8_ = 0;
auVar3._0_8_ = uStack_50;
auVar7._8_8_ = 0;
auVar7._0_8_ = uStack_50;
uVar13 = SUB168(auVar3 * auVar7,0);
uVar17 = uVar16 - uVar13;
lVar19 = (uVar9 - SUB168(auVar3 * auVar7,8)) - (ulong)(uVar16 < uVar13);
auVar4._8_8_ = 0;
auVar4._0_8_ = lVar19 * 2 | uVar17 >> 0x3f;
uVar16 = SUB168(auVar4 * ZEXT816(0xec1e4a7db69561a5),8);
auVar5._8_8_ = 0;
auVar5._0_8_ = uVar16;
uVar9 = SUB168(auVar5 * ZEXT816(10000000000000000000),0);
uVar13 = uVar17 - uVar9;
lVar20 = (lVar19 - SUB168(auVar5 * ZEXT816(10000000000000000000),8)) - (ulong)(uVar17 < uVar9);
uVar18 = uVar13 + 0xea71b9f6ec300000;
lVar19 = -1 - (ulong)(uVar13 < 0x158e460913d00000);
uVar13 = lVar20 + lVar19 >> 1;
uVar17 = uVar13 & 10000000000000000000;
uVar9 = lVar19 + lVar20 + (ulong)CARRY8(uVar17,uVar18);
*param_2 = (uVar9 & 10000000000000000000) + uVar17 + uVar18;
*param_1 = uStack_50;
return uVar9 + uVar16 + uVar13 + 2;
}
uVar9 = param_3 >> 1;
lVar20 = param_3 - uVar9;
puVar1 = param_1 + uVar9;
uVar16 = param_3 & 0xfffffffffffffffe;
puVar2 = param_2 + uVar16;
lVar19 = mp_sqrtrem_rec_dec(puVar1,puVar2,lVar20);
if (0 < lVar20 && lVar19 != 0) {
lVar10 = 0;
uVar13 = 0;
do {
uVar17 = puVar2[lVar10];
uVar11 = uVar13 + puVar1[lVar10];
uVar13 = (ulong)(uVar17 < uVar11);
uVar18 = (uVar17 - uVar11) + 10000000000000000000;
if (uVar17 >= uVar11) {
uVar18 = uVar17 - uVar11;
}
puVar2[lVar10] = uVar18;
lVar10 = lVar10 + 1;
} while (lVar20 != lVar10);
}
mp_div_dec(0,param_4,param_2 + uVar9,param_3,puVar1,lVar20);
uVar13 = *(long *)(param_4 + uVar9 * 8) + lVar19;
if (param_3 == 0) {
if ((uVar13 & 1) != 0) goto LAB_0018ffde;
uVar17 = 0;
}
else {
lVar19 = 0;
do {
param_1[lVar19] = *(ulong *)(param_4 + lVar19 * 8);
lVar19 = lVar19 + 1;
} while (uVar9 + (uVar9 == 0) != lVar19);
uVar17 = uVar13 & 1;
if (param_3 != 0) {
uVar17 = (ulong)((uint)uVar13 & 1);
uVar18 = uVar9 + 1;
do {
uVar11 = param_1[uVar18 - 2];
param_1[uVar18 - 2] = (uVar11 >> 1) + (-uVar17 & 5000000000000000000);
uVar17 = (ulong)((uint)uVar11 & 1);
uVar18 = uVar18 - 1;
} while (1 < uVar18);
}
if (uVar17 == 0) {
uVar17 = 0;
}
else {
LAB_0018ffde:
uVar17 = 0;
uVar18 = uVar9;
if (lVar20 < 1) goto LAB_00190052;
do {
uVar12 = param_2[uVar18];
uVar14 = uVar17 + uVar12 + param_1[uVar18];
uVar11 = uVar14 + 0x7538dcfb76180000;
uVar17 = (ulong)(uVar11 <= uVar12);
if (uVar11 <= uVar12) {
uVar14 = uVar11;
}
param_2[uVar18] = uVar14;
uVar18 = uVar18 + 1;
} while (param_3 != uVar18);
}
}
uVar18 = uVar13 >> 1;
if (0 < lVar20) {
uVar11 = uVar9;
do {
uVar14 = param_1[uVar11];
uVar12 = uVar18 + uVar14 + 0x7538dcfb76180000;
uVar18 = uVar18 + uVar14;
if (uVar12 <= uVar14) {
uVar18 = uVar12;
}
param_1[uVar11] = uVar18;
if (uVar14 < uVar12) break;
uVar18 = 1;
bVar21 = param_3 - 1 != uVar11;
uVar11 = uVar11 + 1;
} while (bVar21);
}
LAB_00190052:
uVar18 = uVar13 >> 1;
if (uVar13 < 2) {
mp_mul_basecase_dec(param_2 + param_3,param_1,uVar9,param_1,uVar9);
if ((long)uVar16 < 1) {
uVar18 = 0;
}
else {
uVar9 = 0;
uVar18 = 0;
do {
uVar13 = param_2[uVar9];
uVar12 = uVar18 + (param_2 + param_3)[uVar9];
uVar18 = (ulong)(uVar13 < uVar12);
uVar11 = (uVar13 - uVar12) + 10000000000000000000;
if (uVar13 >= uVar12) {
uVar11 = uVar13 - uVar12;
}
param_2[uVar9] = uVar11;
uVar9 = uVar9 + 1;
} while (uVar16 != uVar9);
}
}
if ((param_3 & 1) != 0) {
uVar9 = *puVar2;
bVar21 = uVar9 < uVar18;
uVar9 = uVar9 - uVar18;
uVar18 = (ulong)bVar21;
uVar16 = uVar9 + 10000000000000000000;
if (!bVar21) {
uVar16 = uVar9;
}
*puVar2 = uVar16;
}
lVar19 = uVar17 - uVar18;
if (lVar19 < 0) {
if ((long)param_3 < 1) {
lVar20 = mp_add_mul1_dec(param_2,param_1,param_3,2);
}
else {
uVar9 = 1;
do {
uVar16 = param_1[uVar9 - 1];
uVar13 = uVar16 - 1;
if (uVar16 == 0) {
uVar13 = 9999999999999999999;
}
param_1[uVar9 - 1] = uVar13;
} while ((uVar16 == 0) && (bVar21 = param_3 != uVar9, uVar9 = uVar9 + 1, bVar21));
lVar20 = mp_add_mul1_dec(param_2,param_1,param_3,2);
lVar10 = 0;
uVar9 = 0;
do {
uVar16 = param_2[uVar9];
lVar15 = 0x7538dcfb76180001;
if (uVar16 < 9999999999999999999) {
lVar15 = 1;
}
param_2[uVar9] = lVar15 + uVar16;
if (uVar16 < 9999999999999999999) goto LAB_0019017c;
uVar9 = uVar9 + 1;
} while (param_3 != uVar9);
}
lVar10 = 1;
LAB_0019017c:
lVar19 = lVar20 + lVar19 + lVar10;
}
return lVar19;
}
|
|
5,683 | my_fill_mb2 | eloqsql/strings/ctype-ucs2.c | static void
my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
{
char buf[10], *last;
size_t buflen, remainder;
DBUG_ASSERT((slen % 2) == 0);
buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
/*
"last" in the last position where a sequence of "buflen" bytes can start.
*/
for (last= s + slen - buflen; s <= last; s+= buflen)
{
/* Enough space for the character */
memcpy(s, buf, buflen);
}
/*
If there are some more space which is not enough
for the whole multibyte character, then add trailing zeros.
*/
if ((remainder= last + buflen - s) > 0)
bzero(s, (size_t) remainder);
} | O0 | c | my_fill_mb2:
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)
jmp 0x5f4d6
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rsi
leaq -0x12(%rbp), %rdx
leaq -0x12(%rbp), %rcx
addq $0xa, %rcx
callq *%rax
cltq
movq %rax, -0x48(%rbp)
jmp 0x5f503
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
xorl %ecx, %ecx
subq -0x48(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x5f541
movq -0x28(%rbp), %rdi
leaq -0x12(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x24200
movq -0x48(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x5f518
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
jbe 0x5f569
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rdx
xorl %esi, %esi
callq 0x24180
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5f581
addq $0x50, %rsp
popq %rbp
retq
callq 0x24300
nopw %cs:(%rax,%rax)
| my_fill_mb2:
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
jmp short $+2
loc_5F4D6:
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
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
cdqe
mov [rbp+var_48], rax
jmp short $+2
loc_5F503:
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
xor ecx, ecx
sub rcx, [rbp+var_48]
add rax, rcx
mov [rbp+var_40], rax
loc_5F518:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_40]
ja short loc_5F541
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_12]
mov rdx, [rbp+var_48]
call _memcpy
mov rax, [rbp+var_48]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
jmp short loc_5F518
loc_5F541:
mov rax, [rbp+var_40]
add rax, [rbp+var_48]
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_50], rax
cmp rax, 0
jbe short loc_5F569
mov rdi, [rbp+var_28]
mov rdx, [rbp+var_50]
xor esi, esi
call _memset
loc_5F569:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5F581
add rsp, 50h
pop rbp
retn
loc_5F581:
call ___stack_chk_fail
| unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4)
{
long long i; // [rsp+8h] [rbp-48h]
unsigned long long v7; // [rsp+28h] [rbp-28h]
_BYTE v8[10]; // [rsp+3Eh] [rbp-12h] BYREF
unsigned long long v9; // [rsp+48h] [rbp-8h] BYREF
v9 = __readfsqword(0x28u);
v7 = a2;
for ( i = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a4,
v8,
&v9); v7 <= a3 + a2 - i; v7 += i )
memcpy(v7, v8, i);
if ( a3 + a2 != v7 )
memset(v7, 0LL, a3 + a2 - v7);
return __readfsqword(0x28u);
}
| my_fill_mb2:
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
JMP 0x0015f4d6
LAB_0015f4d6:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
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
CDQE
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0015f503
LAB_0015f503:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
XOR ECX,ECX
SUB RCX,qword ptr [RBP + -0x48]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_0015f518:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x0015f541
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x12]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00124200
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0015f518
LAB_0015f541:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JBE 0x0015f569
MOV RDI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x50]
XOR ESI,ESI
CALL 0x00124180
LAB_0015f569:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015f581
ADD RSP,0x50
POP RBP
RET
LAB_0015f581:
CALL 0x00124300
|
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4)
{
int iVar1;
size_t sVar2;
void *pvVar3;
long in_FS_OFFSET;
void *local_30;
int1 local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_1a);
sVar2 = (size_t)iVar1;
pvVar3 = (void *)((long)param_2 + (param_3 - sVar2));
for (local_30 = param_2; local_30 <= pvVar3; local_30 = (void *)(sVar2 + (long)local_30)) {
memcpy(local_30,local_1a,sVar2);
}
sVar2 = (long)pvVar3 + (sVar2 - (long)local_30);
if (sVar2 != 0) {
memset(local_30,0,sVar2);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
5,684 | my_thread_end | eloqsql/mysys/my_thr_init.c | void my_thread_end(void)
{
struct st_my_thread_var *tmp;
tmp= my_thread_var;
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_end(): tmp: %p pthread_self: %p thread_id: %ld\n",
tmp, pthread_self(), tmp ? (long) tmp->id : 0L);
#endif
/*
Remove the instrumentation for this thread.
This must be done before trashing st_my_thread_var,
because the LF_HASH depends on it.
*/
PSI_CALL_delete_current_thread();
/*
We need to disable DBUG early for this thread to ensure that the
the mutex calls doesn't enable it again
To this we have to both do DBUG_POP() and also reset THR_KEY_mysys
as the key is used by DBUG.
*/
DBUG_POP();
set_mysys_var(NULL);
if (tmp && tmp->init)
{
#if !defined(DBUG_OFF)
/* tmp->dbug is allocated inside DBUG library */
if (tmp->dbug)
{
free(tmp->dbug);
tmp->dbug=0;
}
#endif
my_thread_destory_thr_mutex(tmp);
/*
Decrement counter for number of running threads. We are using this
in my_thread_global_end() to wait until all threads have called
my_thread_end and thus freed all memory they have allocated in
my_thread_init() and DBUG_xxxx
*/
mysql_mutex_lock(&THR_LOCK_threads);
DBUG_ASSERT(THR_thread_count != 0);
if (--THR_thread_count == 0)
mysql_cond_signal(&THR_COND_threads);
mysql_mutex_unlock(&THR_LOCK_threads);
/* Trash variable so that we can detect false accesses to my_thread_var */
tmp->init= 2;
free(tmp);
}
} | O0 | c | my_thread_end:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0xf55f0
movq %rax, -0x8(%rbp)
leaq 0x1c95b0(%rip), %rax # 0x2bf098
movq (%rax), %rax
callq *0x138(%rax)
jmp 0xf5af3
xorl %eax, %eax
movl %eax, %edi
callq 0xf5aa0
cmpq $0x0, -0x8(%rbp)
je 0xf5b7c
movq -0x8(%rbp), %rax
movsbl 0xe8(%rax), %eax
cmpl $0x0, %eax
je 0xf5b7c
movq -0x8(%rbp), %rdi
callq 0xf5610
leaq 0xb8c395(%rip), %rdi # 0xc81eb8
leaq 0x5d971(%rip), %rsi # 0x15349b
movl $0x175, %edx # imm = 0x175
callq 0xf5950
jmp 0xf5b36
leaq 0xb8c17b(%rip), %rax # 0xc81cb8
movl (%rax), %eax
addl $-0x1, %eax
leaq 0xb8c16f(%rip), %rcx # 0xc81cb8
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0xf5b5c
leaq 0xb8c3f1(%rip), %rdi # 0xc81f48
callq 0xf5b90
leaq 0xb8c355(%rip), %rdi # 0xc81eb8
callq 0xf5a40
movq -0x8(%rbp), %rax
movb $0x2, 0xe8(%rax)
movq -0x8(%rbp), %rdi
callq 0x2a170
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_thread_end:
push rbp
mov rbp, rsp
sub rsp, 10h
call _my_thread_var
mov [rbp+var_8], rax
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+138h]
jmp short $+2
loc_F5AF3:
xor eax, eax
mov edi, eax
call set_mysys_var
cmp [rbp+var_8], 0
jz short loc_F5B7C
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+0E8h]
cmp eax, 0
jz short loc_F5B7C
mov rdi, [rbp+var_8]
call my_thread_destory_thr_mutex
lea rdi, THR_LOCK_threads
lea rsi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 175h
call inline_mysql_mutex_lock_26
jmp short $+2
loc_F5B36:
lea rax, THR_thread_count
mov eax, [rax]
add eax, 0FFFFFFFFh
lea rcx, THR_thread_count
mov [rcx], eax
cmp eax, 0
jnz short loc_F5B5C
lea rdi, THR_COND_threads
call inline_mysql_cond_signal_3
loc_F5B5C:
lea rdi, THR_LOCK_threads
call inline_mysql_mutex_unlock_27
mov rax, [rbp+var_8]
mov byte ptr [rax+0E8h], 2
mov rdi, [rbp+var_8]
call _free
loc_F5B7C:
add rsp, 10h
pop rbp
retn
| long long my_thread_end(double a1)
{
long long result; // rax
long long v2; // [rsp+8h] [rbp-8h]
v2 = my_thread_var();
PSI_server[39]();
result = set_mysys_var(0LL);
if ( v2 )
{
result = (unsigned int)*(char *)(v2 + 232);
if ( *(_BYTE *)(v2 + 232) )
{
my_thread_destory_thr_mutex(v2, a1);
inline_mysql_mutex_lock_26(
(long long)&THR_LOCK_threads,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
0x175u);
if ( !--THR_thread_count )
inline_mysql_cond_signal_3(&THR_COND_threads);
inline_mysql_mutex_unlock_27((long long)&THR_LOCK_threads);
*(_BYTE *)(v2 + 232) = 2;
return free(v2);
}
}
return result;
}
| my_thread_end:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
CALL 0x001f55f0
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[0x3bf098]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x138]
JMP 0x001f5af3
LAB_001f5af3:
XOR EAX,EAX
MOV EDI,EAX
CALL 0x001f5aa0
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001f5b7c
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0xe8]
CMP EAX,0x0
JZ 0x001f5b7c
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001f5610
LEA RDI,[0xd81eb8]
LEA RSI,[0x25349b]
MOV EDX,0x175
CALL 0x001f5950
JMP 0x001f5b36
LAB_001f5b36:
LEA RAX,[0xd81cb8]
MOV EAX,dword ptr [RAX]
ADD EAX,-0x1
LEA RCX,[0xd81cb8]
MOV dword ptr [RCX],EAX
CMP EAX,0x0
JNZ 0x001f5b5c
LEA RDI,[0xd81f48]
CALL 0x001f5b90
LAB_001f5b5c:
LEA RDI,[0xd81eb8]
CALL 0x001f5a40
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0xe8],0x2
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a170
LAB_001f5b7c:
ADD RSP,0x10
POP RBP
RET
|
void my_thread_end(void)
{
void *__ptr;
__ptr = (void *)_my_thread_var();
(**(code **)(PSI_server + 0x138))();
set_mysys_var(0);
if ((__ptr != (void *)0x0) && (*(char *)((long)__ptr + 0xe8) != '\0')) {
my_thread_destory_thr_mutex(__ptr);
inline_mysql_mutex_lock
(THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0x175
);
THR_thread_count = THR_thread_count + -1;
if (THR_thread_count == 0) {
inline_mysql_cond_signal(THR_COND_threads);
}
inline_mysql_mutex_unlock(THR_LOCK_threads);
*(int1 *)((long)__ptr + 0xe8) = 2;
free(__ptr);
}
return;
}
|
|
5,685 | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5]) | llama.cpp/common/json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xb5d6b
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xb5d55
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20f60
testl %eax, %eax
je 0xb5d4a
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xb5d2b
jmp 0xb5d4d
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xb5dc9
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x20660
movq %rax, %rbx
movq %r14, %rdi
callq 0x896c0
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x640ce(%rip), %rsi # 0x119e5b
leaq 0x20(%rsp), %rdi
callq 0x7ec3d
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x894e8
xorl %ebp, %ebp
leaq 0xa9288(%rip), %rsi # 0x15f040
leaq -0x407af(%rip), %rdx # 0x75610
movq %rbx, %rdi
callq 0x20a60
jmp 0xb5e42
movl $0x20, %edi
callq 0x20660
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x20690
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x27960
leaq 0x64073(%rip), %rsi # 0x119e71
leaq 0x64072(%rip), %rcx # 0x119e77
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7ecc5
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x87c4c
xorl %ebp, %ebp
leaq 0xa918d(%rip), %rsi # 0x15efc0
leaq -0x4082a(%rip), %rdx # 0x75610
movq %rbx, %rdi
callq 0x20a60
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb5e60
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x20190
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xb5eab
movq 0x10(%rsp), %rsi
jmp 0xb5ea3
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xb5eb5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20190
jmp 0xb5eb5
jmp 0xb5eb2
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb5eab
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x20190
testb %bpl, %bpl
jne 0xb5eb5
jmp 0xb5ebd
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f00
movq %r14, %rdi
callq 0x20b00
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; void *
push r15; int
push r14; __int64
push r12; int
push rbx; void *
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_B5D6B
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_B5D55
loc_B5D2B:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_B5D4A
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_B5D2B
jmp short loc_B5D4D
loc_B5D4A:
mov rax, rbx
loc_B5D4D:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_B5D55:
cmp rax, rbx
jz short loc_B5DC9
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_B5D6B:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_B5E42
loc_B5DC9:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_B5E42:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B5E60
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B5E60:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_B5EAB
mov rsi, [rsp+68h+var_58]
jmp short loc_B5EA3
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_B5EB5
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B5EB5
jmp short loc_B5EB2
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B5EAB
mov rsi, [rsp+68h+var_38]
loc_B5EA3:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B5EAB:
test bpl, bpl
jnz short loc_B5EB5
jmp short loc_B5EBD
loc_B5EB2:
mov r14, rax
loc_B5EB5:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B5EBD:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v11,
(long long)"cannot use at() with ",
v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v11,
(long long)"key '",
v9,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001b5d6b
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001b5d55
LAB_001b5d2b:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00120f60
TEST EAX,EAX
JZ 0x001b5d4a
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001b5d2b
JMP 0x001b5d4d
LAB_001b5d4a:
MOV RAX,RBX
LAB_001b5d4d:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001b5d55:
CMP RAX,RBX
JZ 0x001b5dc9
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001b5d6b:
MOV EDI,0x20
CALL 0x00120660
MOV RBX,RAX
MOV RDI,R14
CALL 0x001896c0
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001b5d86:
LEA RSI,[0x219e5b]
LEA RDI,[RSP + 0x20]
CALL 0x0017ec3d
MOV BPL,0x1
LAB_001b5d9a:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x001894e8
XOR EBP,EBP
LEA RSI,[0x25f040]
LEA RDX,[0x175610]
MOV RDI,RBX
CALL 0x00120a60
LAB_001b5dc9:
MOV EDI,0x20
CALL 0x00120660
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00120690
LEA RDX,[RAX + R15*0x1]
LAB_001b5dec:
MOV RDI,RSP
MOV RSI,R15
CALL 0x00127960
LAB_001b5df7:
LEA RSI,[0x219e71]
LEA RCX,[0x219e77]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017ecc5
MOV BPL,0x1
LAB_001b5e15:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x00187c4c
XOR EBP,EBP
LEA RSI,[0x25efc0]
LEA RDX,[0x175610]
MOV RDI,RBX
CALL 0x00120a60
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001b5d86 to 001b5d96 has its CatchHandler @ 001b5eb2 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001b5d9a to 001b5dc6 has its CatchHandler @ 001b5e8d */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001b5dec to 001b5df6 has its CatchHandler @ 001b5e8b */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001b5df7 to 001b5e11 has its CatchHandler @ 001b5e70 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001b5e15 to 001b5e41 has its CatchHandler @ 001b5e42 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
|
5,686 | minja::Value& 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>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json.hpp | T & operator[](KeyType && key)
{
return emplace(std::forward<KeyType>(key), T{}).first->second;
} | O3 | cpp | minja::Value& 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>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x40(%rsp), %r14
movq $0x0, 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%r14)
movaps %xmm0, -0x30(%r14)
movaps %xmm0, -0x20(%r14)
movaps %xmm0, -0x10(%r14)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x5834c
movq %r14, %rdi
movl $0x1, %esi
callq 0x5834c
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8ccec
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x5834c
movq %r14, %rdi
callq 0x5d83a
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x8c3d1
callq 0x6d25e
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x8c3e0
callq 0x6d25e
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x8c3ef
callq 0x6d25e
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8c425
movq 0x9eb88(%rip), %rax # 0x12af88
cmpb $0x0, (%rax)
je 0x8c410
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x8c41a
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x8c425
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x10, %rbx
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x85de8
movq %rbx, %rdi
callq 0x1af80
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r15, rdi
lea r14, [rsp+68h+var_28]
mov qword ptr [r14+8], 0
xorps xmm0, xmm0
movaps xmmword ptr [r14-40h], xmm0
movaps xmmword ptr [r14-30h], xmm0
movaps xmmword ptr [r14-20h], xmm0
movaps xmmword ptr [r14-10h], xmm0
mov byte ptr [r14], 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)
mov rdx, rsp
mov rdi, r15
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_
mov rbx, rax
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, [rsp+68h+var_30]
test rdi, rdi
jz short loc_8C3D1
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C3D1:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_8C3E0
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C3E0:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_8C3EF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C3EF:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_8C425
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_8C410
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_8C41A
loc_8C410:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_8C41A:
cmp eax, 1
jnz short loc_8C425
mov rax, [rdi]
call qword ptr [rax+18h]
loc_8C425:
add rbx, 10h
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_(
long long a1,
long long a2)
{
long long v2; // rbx
long long v3; // rdi
signed __int32 v4; // eax
__int128 v6; // [rsp+0h] [rbp-68h] BYREF
__int128 v7; // [rsp+10h] [rbp-58h]
__int128 v8; // [rsp+20h] [rbp-48h]
__int128 v9; // [rsp+30h] [rbp-38h]
char v10[8]; // [rsp+40h] [rbp-28h] BYREF
long long v11; // [rsp+48h] [rbp-20h]
v11 = 0LL;
v6 = 0LL;
v7 = 0LL;
v8 = 0LL;
v9 = 0LL;
v10[0] = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
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(v10);
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_(
a1,
a2,
&v6);
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(v10);
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(v10);
if ( *((_QWORD *)&v9 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1));
if ( *((_QWORD *)&v8 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1));
if ( *((_QWORD *)&v7 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v7 + 1));
v3 = *((_QWORD *)&v6 + 1);
if ( *((_QWORD *)&v6 + 1) )
{
if ( _libc_single_threaded )
{
v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1;
}
else
{
v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v4 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL);
}
return v2 + 16;
}
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RSP + 0x40]
MOV qword ptr [R14 + 0x8],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x40],XMM0
MOVAPS xmmword ptr [R14 + -0x30],XMM0
MOVAPS xmmword ptr [R14 + -0x20],XMM0
MOVAPS xmmword ptr [R14 + -0x10],XMM0
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015834c
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015834c
LAB_0018c39f:
MOV RDX,RSP
MOV RDI,R15
MOV RSI,RBX
CALL 0x0018ccec
LAB_0018c3ad:
MOV RBX,RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015834c
MOV RDI,R14
CALL 0x0015d83a
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x0018c3d1
CALL 0x0016d25e
LAB_0018c3d1:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x0018c3e0
CALL 0x0016d25e
LAB_0018c3e0:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0018c3ef
CALL 0x0016d25e
LAB_0018c3ef:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0018c425
MOV RAX,qword ptr [0x0022af88]
CMP byte ptr [RAX],0x0
JZ 0x0018c410
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0018c41a
LAB_0018c410:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0018c41a:
CMP EAX,0x1
JNZ 0x0018c425
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0018c425:
ADD RBX,0x10
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
long _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_
(int8 param_1,int8 param_2)
{
int *piVar1;
int iVar2;
long lVar3;
bool bVar4;
int8 local_68;
long *plStack_60;
int8 local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50;
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40;
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30;
data local_28 [8];
int8 local_20;
local_20 = 0;
local_68 = 0;
plStack_60 = (long *)0x0;
local_58 = 0;
p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_48 = 0;
p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_28[0] = (data)0x0;
bVar4 = SUB81(local_28,0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
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(bVar4);
/* try { // try from 0018c39f to 0018c3ac has its CatchHandler @ 0018c436 */
lVar3 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_
(param_1,param_2,&local_68);
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(bVar4);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30);
}
if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40);
}
if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50);
}
if (plStack_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022af88 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_60 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)plStack_60 + 0xc);
*(int *)((long)plStack_60 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*plStack_60 + 0x18))();
}
}
return lVar3 + 0x10;
}
|
|
5,687 | 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 0x252c0
cmpl $0x0, %eax
je 0x3c865
movq $0x0, -0x8(%rbp)
jmp 0x3c88d
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_3C865
mov [rbp+var_8], 0
jmp short loc_3C88D
loc_3C865:
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_3C88D:
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 0x001252c0
CMP EAX,0x0
JZ 0x0013c865
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0013c88d
LAB_0013c865:
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_0013c88d:
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;
}
|
|
5,688 | mysql_close_slow_part | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void mysql_close_slow_part(MYSQL *mysql)
{
if (mysql->net.pvio)
{
free_old_query(mysql);
mysql->status=MYSQL_STATUS_READY; /* Force command */
mysql->options.reconnect=0;
if (mysql->net.pvio && mysql->net.buff)
ma_simple_command(mysql, COM_QUIT,NullS,0,1,0);
end_server(mysql);
}
/* there is an ongoing async operation */
else if (mysql->options.extension && mysql->options.extension->async_context)
{
if (mysql->options.extension->async_context->pending_gai_res)
{
freeaddrinfo(mysql->options.extension->async_context->pending_gai_res);
mysql->options.extension->async_context->pending_gai_res = 0;
}
if (mysql->options.extension->async_context->pvio)
{
ma_pvio_close(mysql->options.extension->async_context->pvio);
mysql->options.extension->async_context->pvio = 0;
}
}
} | O0 | c | mysql_close_slow_part:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x25f98
movq -0x8(%rbp), %rdi
callq 0x26060
movq -0x8(%rbp), %rax
movl $0x0, 0x488(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x43b(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x25f8a
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x25f8a
movq -0x8(%rbp), %rdi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %esi
movq %r9, %rdx
movq %r9, %rcx
callq 0x1ed10
movq -0x8(%rbp), %rdi
callq 0x1de70
jmp 0x2604e
movq -0x8(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x2604c
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x2604c
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x30(%rax)
je 0x26005
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq 0x30(%rax), %rdi
callq 0x13590
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x2604a
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x2ba60
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq $0x0, 0x18(%rax)
jmp 0x2604c
jmp 0x2604e
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_close_slow_part:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_25F98
mov rdi, [rbp+var_8]
call free_old_query
mov rax, [rbp+var_8]
mov dword ptr [rax+488h], 0
mov rax, [rbp+var_8]
mov byte ptr [rax+43Bh], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_25F8A
mov rax, [rbp+var_8]
cmp qword ptr [rax+8], 0
jz short loc_25F8A
mov rdi, [rbp+var_8]
mov r8d, 1
xor eax, eax
mov r9d, eax
mov esi, r8d
mov rdx, r9
mov rcx, r9
call ma_simple_command
loc_25F8A:
mov rdi, [rbp+var_8]
call end_server
jmp loc_2604E
loc_25F98:
mov rax, [rbp+var_8]
cmp qword ptr [rax+480h], 0
jz loc_2604C
mov rax, [rbp+var_8]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz loc_2604C
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
cmp qword ptr [rax+30h], 0
jz short loc_26005
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov rdi, [rax+30h]
call _freeaddrinfo
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov qword ptr [rax+30h], 0
loc_26005:
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
cmp qword ptr [rax+18h], 0
jz short loc_2604A
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov rdi, [rax+18h]
call ma_pvio_close
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov qword ptr [rax+18h], 0
loc_2604A:
jmp short $+2
loc_2604C:
jmp short $+2
loc_2604E:
add rsp, 10h
pop rbp
retn
| long long mysql_close_slow_part(long long a1)
{
long long result; // rax
if ( *(_QWORD *)a1 )
{
free_old_query(a1);
*(_DWORD *)(a1 + 1160) = 0;
*(_BYTE *)(a1 + 1083) = 0;
if ( *(_QWORD *)a1 )
{
if ( *(_QWORD *)(a1 + 8) )
ma_simple_command(a1, 1u, 0LL, 0LL, 1, 0LL);
}
return end_server((_QWORD *)a1);
}
else
{
result = a1;
if ( *(_QWORD *)(a1 + 1152) )
{
result = *(_QWORD *)(a1 + 1152);
if ( *(_QWORD *)(result + 40) )
{
if ( *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 48LL) )
{
freeaddrinfo(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 48LL));
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 48LL) = 0LL;
}
result = *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL);
if ( *(_QWORD *)(result + 24) )
{
ma_pvio_close(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 24LL));
result = *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL);
*(_QWORD *)(result + 24) = 0LL;
}
}
}
}
return result;
}
| mysql_close_slow_part:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x00125f98
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00126060
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x488],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x43b],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x00125f8a
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00125f8a
MOV RDI,qword ptr [RBP + -0x8]
MOV R8D,0x1
XOR EAX,EAX
MOV R9D,EAX
MOV ESI,R8D
MOV RDX,R9
MOV RCX,R9
CALL 0x0011ed10
LAB_00125f8a:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0011de70
JMP 0x0012604e
LAB_00125f98:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0012604c
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x0012604c
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
CMP qword ptr [RAX + 0x30],0x0
JZ 0x00126005
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RAX + 0x30]
CALL 0x00113590
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x30],0x0
LAB_00126005:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0012604a
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0012ba60
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x18],0x0
LAB_0012604a:
JMP 0x0012604c
LAB_0012604c:
JMP 0x0012604e
LAB_0012604e:
ADD RSP,0x10
POP RBP
RET
|
void mysql_close_slow_part(long *param_1)
{
if (*param_1 == 0) {
if ((param_1[0x90] != 0) && (*(long *)(param_1[0x90] + 0x28) != 0)) {
if (*(long *)(*(long *)(param_1[0x90] + 0x28) + 0x30) != 0) {
freeaddrinfo(*(addrinfo **)(*(long *)(param_1[0x90] + 0x28) + 0x30));
*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x30) = 0;
}
if (*(long *)(*(long *)(param_1[0x90] + 0x28) + 0x18) != 0) {
ma_pvio_close(*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18));
*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18) = 0;
}
}
}
else {
free_old_query(param_1);
*(int4 *)(param_1 + 0x91) = 0;
*(int1 *)((long)param_1 + 0x43b) = 0;
if ((*param_1 != 0) && (param_1[1] != 0)) {
ma_simple_command(param_1,1,0,0);
}
end_server(param_1);
}
return;
}
|
|
5,689 | mysql_close_slow_part | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void mysql_close_slow_part(MYSQL *mysql)
{
if (mysql->net.pvio)
{
free_old_query(mysql);
mysql->status=MYSQL_STATUS_READY; /* Force command */
mysql->options.reconnect=0;
if (mysql->net.pvio && mysql->net.buff)
ma_simple_command(mysql, COM_QUIT,NullS,0,1,0);
end_server(mysql);
}
/* there is an ongoing async operation */
else if (mysql->options.extension && mysql->options.extension->async_context)
{
if (mysql->options.extension->async_context->pending_gai_res)
{
freeaddrinfo(mysql->options.extension->async_context->pending_gai_res);
mysql->options.extension->async_context->pending_gai_res = 0;
}
if (mysql->options.extension->async_context->pvio)
{
ma_pvio_close(mysql->options.extension->async_context->pvio);
mysql->options.extension->async_context->pvio = 0;
}
}
} | O3 | c | mysql_close_slow_part:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x1f531
movq %rbx, %rdi
callq 0x1f59a
movl $0x0, 0x488(%rbx)
movb $0x0, 0x43b(%rbx)
cmpq $0x0, (%rbx)
je 0x1f523
cmpq $0x0, 0x8(%rbx)
je 0x1f523
movq 0x4d0(%rbx), %rax
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq *0x10(%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1a8aa
movq 0x480(%rbx), %rax
testq %rax, %rax
je 0x1f593
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x1f593
movq 0x30(%rax), %rdi
testq %rdi, %rdi
je 0x1f572
callq 0x135e0
movq 0x480(%rbx), %rax
movq 0x28(%rax), %rax
movq $0x0, 0x30(%rax)
movq 0x480(%rbx), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x1f593
callq 0x22797
movq 0x480(%rbx), %rax
movq 0x28(%rax), %rax
movq $0x0, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_close_slow_part:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
cmp qword ptr [rdi], 0
jz short loc_1F531
mov rdi, rbx
call free_old_query
mov dword ptr [rbx+488h], 0
mov byte ptr [rbx+43Bh], 0
cmp qword ptr [rbx], 0
jz short loc_1F523
cmp qword ptr [rbx+8], 0
jz short loc_1F523
mov rax, [rbx+4D0h]
mov rdi, rbx
mov esi, 1
xor edx, edx
xor ecx, ecx
mov r8d, 1
xor r9d, r9d
call qword ptr [rax+10h]
loc_1F523:
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp end_server
loc_1F531:
mov rax, [rbx+480h]
test rax, rax
jz short loc_1F593
mov rax, [rax+28h]
test rax, rax
jz short loc_1F593
mov rdi, [rax+30h]
test rdi, rdi
jz short loc_1F572
call _freeaddrinfo
mov rax, [rbx+480h]
mov rax, [rax+28h]
mov qword ptr [rax+30h], 0
mov rax, [rbx+480h]
mov rax, [rax+28h]
loc_1F572:
mov rdi, [rax+18h]
test rdi, rdi
jz short loc_1F593
call ma_pvio_close
mov rax, [rbx+480h]
mov rax, [rax+28h]
mov qword ptr [rax+18h], 0
loc_1F593:
add rsp, 8
pop rbx
pop rbp
retn
| _QWORD * mysql_close_slow_part(long long a1)
{
long long v1; // rax
_QWORD *result; // rax
long long v4; // rdi
long long v5; // rdi
long long v6; // [rsp-8h] [rbp-10h]
v6 = v1;
if ( *(_QWORD *)a1 )
{
free_old_query(a1);
*(_DWORD *)(a1 + 1160) = 0;
*(_BYTE *)(a1 + 1083) = 0;
if ( *(_QWORD *)a1 )
{
if ( *(_QWORD *)(a1 + 8) )
(*(void ( **)(long long, long long, _QWORD, _QWORD, long long, _QWORD, long long))(*(_QWORD *)(a1 + 1232)
+ 16LL))(
a1,
1LL,
0LL,
0LL,
1LL,
0LL,
v6);
}
return (_QWORD *)end_server((long long *)a1);
}
else
{
result = *(_QWORD **)(a1 + 1152);
if ( result )
{
result = (_QWORD *)result[5];
if ( result )
{
v4 = result[6];
if ( v4 )
{
freeaddrinfo(v4);
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 48LL) = 0LL;
result = *(_QWORD **)(*(_QWORD *)(a1 + 1152) + 40LL);
}
v5 = result[3];
if ( v5 )
{
ma_pvio_close(v5);
result = *(_QWORD **)(*(_QWORD *)(a1 + 1152) + 40LL);
result[3] = 0LL;
}
}
}
}
return result;
}
| mysql_close_slow_part:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP qword ptr [RDI],0x0
JZ 0x0011f531
MOV RDI,RBX
CALL 0x0011f59a
MOV dword ptr [RBX + 0x488],0x0
MOV byte ptr [RBX + 0x43b],0x0
CMP qword ptr [RBX],0x0
JZ 0x0011f523
CMP qword ptr [RBX + 0x8],0x0
JZ 0x0011f523
MOV RAX,qword ptr [RBX + 0x4d0]
MOV RDI,RBX
MOV ESI,0x1
XOR EDX,EDX
XOR ECX,ECX
MOV R8D,0x1
XOR R9D,R9D
CALL qword ptr [RAX + 0x10]
LAB_0011f523:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x0011a8aa
LAB_0011f531:
MOV RAX,qword ptr [RBX + 0x480]
TEST RAX,RAX
JZ 0x0011f593
MOV RAX,qword ptr [RAX + 0x28]
TEST RAX,RAX
JZ 0x0011f593
MOV RDI,qword ptr [RAX + 0x30]
TEST RDI,RDI
JZ 0x0011f572
CALL 0x001135e0
MOV RAX,qword ptr [RBX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
LAB_0011f572:
MOV RDI,qword ptr [RAX + 0x18]
TEST RDI,RDI
JZ 0x0011f593
CALL 0x00122797
MOV RAX,qword ptr [RBX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x18],0x0
LAB_0011f593:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_close_slow_part(long *param_1)
{
long lVar1;
if (*param_1 != 0) {
free_old_query(param_1);
*(int4 *)(param_1 + 0x91) = 0;
*(int1 *)((long)param_1 + 0x43b) = 0;
if ((*param_1 != 0) && (param_1[1] != 0)) {
(**(code **)(param_1[0x9a] + 0x10))(param_1,1,0,0,1,0);
}
end_server(param_1);
return;
}
if ((param_1[0x90] != 0) && (lVar1 = *(long *)(param_1[0x90] + 0x28), lVar1 != 0)) {
if (*(addrinfo **)(lVar1 + 0x30) != (addrinfo *)0x0) {
freeaddrinfo(*(addrinfo **)(lVar1 + 0x30));
*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x30) = 0;
lVar1 = *(long *)(param_1[0x90] + 0x28);
}
if (*(long *)(lVar1 + 0x18) != 0) {
ma_pvio_close();
*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18) = 0;
}
}
return;
}
|
|
5,690 | evmone::instr::core::byte(evmone::StackTop) | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp | inline void byte(StackTop stack) noexcept
{
const auto& n = stack.pop();
auto& x = stack.top();
const bool n_valid = n < 32;
const uint64_t byte_mask = (n_valid ? 0xff : 0);
const auto index = 31 - static_cast<unsigned>(n[0] % 32);
const auto word = x[index / 8];
const auto byte_index = index % 8;
const auto byte = (word >> (byte_index * 8)) & byte_mask;
x = byte;
} | O0 | cpp | evmone::instr::core::byte(evmone::StackTop):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x5fb60
movq %rax, -0x10(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x5fb80
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x20, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x66010
andb $0x1, %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %dl
xorl %eax, %eax
movl $0xff, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cltq
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5fde0
movq (%rax), %rax
andq $0x1f, %rax
movl %eax, %ecx
movl $0x1f, %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %eax
shrl $0x3, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x5fe00
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x3, %ecx
movl %ecx, %ecx
shrq %cl, %rax
andq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x61020
movq -0x18(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, (%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x18(%rax)
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN6evmone5instr4core4byteENS_8StackTopE:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
lea rdi, [rbp+var_8]; this
call _ZN6evmone8StackTop3popEv; evmone::StackTop::pop(void)
mov [rbp+var_10], rax
lea rdi, [rbp+var_8]; this
call _ZN6evmone8StackTop3topEv; evmone::StackTop::top(void)
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
mov [rbp+var_20], 20h ; ' '
lea rsi, [rbp+var_20]
call _ZN4intxltILj256EivEEbRKNS_4uintIXT_EEERKT0_; intx::operator<<256u,int,void>(intx::uint<256u> const&,int const&)
and al, 1
mov [rbp+var_19], al
mov dl, [rbp+var_19]
xor eax, eax
mov ecx, 0FFh
test dl, 1
cmovnz eax, ecx
cdqe
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
xor eax, eax
mov esi, eax
call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong)
mov rax, [rax]
and rax, 1Fh
mov ecx, eax
mov eax, 1Fh
sub eax, ecx
mov [rbp+var_2C], eax
mov rdi, [rbp+var_18]
mov eax, [rbp+var_2C]
shr eax, 3
mov eax, eax
mov esi, eax
call _ZN4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong)
mov rax, [rax]
mov [rbp+var_38], rax
mov eax, [rbp+var_2C]
and eax, 7
mov [rbp+var_3C], eax
mov rax, [rbp+var_38]
mov ecx, [rbp+var_3C]
shl ecx, 3
mov ecx, ecx
shr rax, cl
and rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rsi, [rbp+var_48]
lea rdi, [rbp+var_68]
call _ZN4intx4uintILj256EEC2IJmEvEEDpT_; intx::uint<256u>::uint<ulong,void>(ulong)
mov rax, [rbp+var_18]
mov rcx, [rbp+var_68]
mov [rax], rcx
mov rcx, [rbp+var_60]
mov [rax+8], rcx
mov rcx, [rbp+var_58]
mov [rax+10h], rcx
mov rcx, [rbp+var_50]
mov [rax+18h], rcx
add rsp, 70h
pop rbp
retn
| _QWORD * evmone::instr::core::byte(long long a1)
{
int v1; // eax
_QWORD *result; // rax
_QWORD v3[4]; // [rsp+8h] [rbp-68h] BYREF
unsigned long long v4; // [rsp+28h] [rbp-48h]
int v5; // [rsp+34h] [rbp-3Ch]
unsigned long long v6; // [rsp+38h] [rbp-38h]
unsigned int v7; // [rsp+44h] [rbp-2Ch]
long long v8; // [rsp+48h] [rbp-28h]
int v9; // [rsp+50h] [rbp-20h] BYREF
char v10; // [rsp+57h] [rbp-19h]
_QWORD *v11; // [rsp+58h] [rbp-18h]
long long v12; // [rsp+60h] [rbp-10h]
long long v13; // [rsp+68h] [rbp-8h] BYREF
v13 = a1;
v12 = evmone::StackTop::pop((evmone::StackTop *)&v13);
v11 = (_QWORD *)evmone::StackTop::top((evmone::StackTop *)&v13);
v9 = 32;
v10 = intx::operator<<256u,int,void>(v12, &v9) & 1;
v1 = 0;
if ( (v10 & 1) != 0 )
v1 = 255;
v8 = v1;
v7 = 31 - (*(_DWORD *)intx::uint<256u>::operator[](v12, 0LL) & 0x1F);
v6 = *(_QWORD *)intx::uint<256u>::operator[]((long long)v11, v7 >> 3);
v5 = v7 & 7;
v4 = v8 & (v6 >> (8 * (v7 & 7)));
intx::uint<256u>::uint<unsigned long,void>(v3, v4);
result = v11;
*v11 = v3[0];
result[1] = v3[1];
result[2] = v3[2];
result[3] = v3[3];
return result;
}
| byte:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[RBP + -0x8]
CALL 0x0015fb60
MOV qword ptr [RBP + -0x10],RAX
LEA RDI,[RBP + -0x8]
CALL 0x0015fb80
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x20],0x20
LEA RSI,[RBP + -0x20]
CALL 0x00166010
AND AL,0x1
MOV byte ptr [RBP + -0x19],AL
MOV DL,byte ptr [RBP + -0x19]
XOR EAX,EAX
MOV ECX,0xff
TEST DL,0x1
CMOVNZ EAX,ECX
CDQE
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0015fde0
MOV RAX,qword ptr [RAX]
AND RAX,0x1f
MOV ECX,EAX
MOV EAX,0x1f
SUB EAX,ECX
MOV dword ptr [RBP + -0x2c],EAX
MOV RDI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x2c]
SHR EAX,0x3
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0015fe00
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0x7
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x3c]
SHL ECX,0x3
MOV ECX,ECX
SHR RAX,CL
AND RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RSI,qword ptr [RBP + -0x48]
LEA RDI,[RBP + -0x68]
CALL 0x00161020
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x18],RCX
ADD RSP,0x70
POP RBP
RET
|
/* evmone::instr::core::byte(evmone::StackTop) */
void evmone::instr::core::byte(int8 param_1)
{
int iVar1;
int8 *puVar2;
ulong *puVar3;
int8 local_70;
int8 local_68;
int8 local_60;
int8 local_58;
ulong local_50;
uint local_44;
ulong local_40;
uint local_34;
ulong local_30;
int local_28;
int1 local_21;
uint<256u> *local_20;
uint *local_18;
int8 local_10;
local_10 = param_1;
local_18 = (uint *)StackTop::pop((StackTop *)&local_10);
local_20 = (uint<256u> *)StackTop::top((StackTop *)&local_10);
local_28 = 0x20;
local_21 = intx::operator<(local_18,&local_28);
iVar1 = 0;
if ((bool)local_21) {
iVar1 = 0xff;
}
local_30 = (ulong)iVar1;
puVar2 = (int8 *)intx::uint<256u>::operator[]((uint<256u> *)local_18,0);
local_34 = 0x1f - ((uint)*puVar2 & 0x1f);
puVar3 = (ulong *)intx::uint<256u>::operator[](local_20,(ulong)(local_34 >> 3));
local_40 = *puVar3;
local_44 = local_34 & 7;
local_50 = local_40 >> (sbyte)(local_44 << 3) & local_30;
intx::uint<256u>::uint<unsigned_long,void>((uint<256u> *)&local_70,local_50);
*(int8 *)local_20 = local_70;
*(int8 *)(local_20 + 8) = local_68;
*(int8 *)(local_20 + 0x10) = local_60;
*(int8 *)(local_20 + 0x18) = local_58;
return;
}
|
|
5,691 | ma_send_connect_attr | eloqsql/libmariadb/libmariadb/mariadb_lib.c | char *ma_send_connect_attr(MYSQL *mysql, unsigned char *buffer)
{
if (mysql->server_capabilities & CLIENT_CONNECT_ATTRS)
{
buffer= (unsigned char *)mysql_net_store_length((unsigned char *)buffer, (mysql->options.extension) ?
mysql->options.extension->connect_attrs_len : 0);
if (mysql->options.extension &&
ma_hashtbl_inited(&mysql->options.extension->connect_attrs))
{
uint i;
for (i=0; i < mysql->options.extension->connect_attrs.records; i++)
{
size_t len;
uchar *p= ma_hashtbl_element(&mysql->options.extension->connect_attrs, i);
len= strlen((char *)p);
buffer= mysql_net_store_length(buffer, len);
memcpy(buffer, p, len);
buffer+= (len);
p+= (len + 1);
len= strlen((char *)p);
buffer= mysql_net_store_length(buffer, len);
memcpy(buffer, p, len);
buffer+= len;
}
}
}
return (char *)buffer;
} | O0 | c | ma_send_connect_attr:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x370(%rax), %rax
andq $0x100000, %rax # imm = 0x100000
cmpq $0x0, %rax
je 0x1eed8
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x1edc6
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x78(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x1edce
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x1edce
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2a810
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x1eed6
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x48(%rax)
je 0x1eed6
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x480(%rcx), %rcx
cmpl 0x38(%rcx), %eax
jae 0x1eed4
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rdi
addq $0x30, %rdi
movl -0x14(%rbp), %esi
callq 0x49920
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x131a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2a810
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x13360
movq -0x20(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x131a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2a810
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x13360
movq -0x20(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1ee0e
jmp 0x1eed6
jmp 0x1eed8
movq -0x10(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_send_connect_attr:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax+370h]
and rax, 100000h
cmp rax, 0
jz loc_1EED8
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+480h], 0
jz short loc_1EDC6
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+78h]
mov [rbp+var_38], rax
jmp short loc_1EDCE
loc_1EDC6:
xor eax, eax
mov [rbp+var_38], rax
jmp short $+2
loc_1EDCE:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
call mysql_net_store_length
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+480h], 0
jz loc_1EED6
mov rax, [rbp+var_8]
mov rax, [rax+480h]
cmp qword ptr [rax+48h], 0
jz loc_1EED6
mov [rbp+var_14], 0
loc_1EE0E:
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
mov rcx, [rcx+480h]
cmp eax, [rcx+38h]
jnb loc_1EED4
mov rax, [rbp+var_8]
mov rdi, [rax+480h]
add rdi, 30h ; '0'
mov esi, [rbp+var_14]
call ma_hashtbl_element
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
call _strlen
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call mysql_net_store_length
mov [rbp+var_10], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_20]
call _memcpy
mov rax, [rbp+var_20]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
add rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
call _strlen
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call mysql_net_store_length
mov [rbp+var_10], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_20]
call _memcpy
mov rax, [rbp+var_20]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp loc_1EE0E
loc_1EED4:
jmp short $+2
loc_1EED6:
jmp short $+2
loc_1EED8:
mov rax, [rbp+var_10]
add rsp, 40h
pop rbp
retn
| long long ma_send_connect_attr(long long a1, long long a2)
{
long long v2; // rax
long long v4; // [rsp+18h] [rbp-28h]
long long v5; // [rsp+18h] [rbp-28h]
long long v6; // [rsp+20h] [rbp-20h]
long long v7; // [rsp+20h] [rbp-20h]
unsigned int i; // [rsp+2Ch] [rbp-14h]
long long v9; // [rsp+30h] [rbp-10h]
long long v10; // [rsp+30h] [rbp-10h]
long long v11; // [rsp+30h] [rbp-10h]
long long v12; // [rsp+30h] [rbp-10h]
v9 = a2;
if ( (*(_QWORD *)(a1 + 880) & 0x100000LL) != 0 )
{
if ( *(_QWORD *)(a1 + 1152) )
v2 = mysql_net_store_length(a2, *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 120LL));
else
v2 = mysql_net_store_length(a2, 0LL);
v9 = v2;
if ( *(_QWORD *)(a1 + 1152) && *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 72LL) )
{
for ( i = 0; i < *(_DWORD *)(*(_QWORD *)(a1 + 1152) + 56LL); ++i )
{
v4 = ma_hashtbl_element(*(_QWORD *)(a1 + 1152) + 48LL, i);
v6 = strlen(v4);
v10 = mysql_net_store_length(v9, v6);
memcpy(v10, v4, v6);
v11 = v10 + v6;
v5 = v4 + v6 + 1;
v7 = strlen(v5);
v12 = mysql_net_store_length(v11, v7);
memcpy(v12, v5, v7);
v9 = v12 + v7;
}
}
}
return v9;
}
| ma_send_connect_attr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x100000
CMP RAX,0x0
JZ 0x0011eed8
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0011edc6
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0011edce
LAB_0011edc6:
XOR EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0011edce
LAB_0011edce:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x0012a810
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0011eed6
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x48],0x0
JZ 0x0011eed6
MOV dword ptr [RBP + -0x14],0x0
LAB_0011ee0e:
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x480]
CMP EAX,dword ptr [RCX + 0x38]
JNC 0x0011eed4
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x480]
ADD RDI,0x30
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x00149920
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001131a0
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0012a810
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00113360
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001131a0
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0012a810
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00113360
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0011ee0e
LAB_0011eed4:
JMP 0x0011eed6
LAB_0011eed6:
JMP 0x0011eed8
LAB_0011eed8:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x40
POP RBP
RET
|
long ma_send_connect_attr(long param_1,long param_2)
{
char *__s;
size_t __n;
void *pvVar1;
size_t __n_00;
int8 local_40;
uint local_1c;
long local_18;
local_18 = param_2;
if ((*(ulong *)(param_1 + 0x370) & 0x100000) != 0) {
if (*(long *)(param_1 + 0x480) == 0) {
local_40 = 0;
}
else {
local_40 = *(int8 *)(*(long *)(param_1 + 0x480) + 0x78);
}
local_18 = mysql_net_store_length(param_2,local_40);
if ((*(long *)(param_1 + 0x480) != 0) && (*(long *)(*(long *)(param_1 + 0x480) + 0x48) != 0)) {
for (local_1c = 0; local_1c < *(uint *)(*(long *)(param_1 + 0x480) + 0x38);
local_1c = local_1c + 1) {
__s = (char *)ma_hashtbl_element(*(long *)(param_1 + 0x480) + 0x30,local_1c);
__n = strlen(__s);
pvVar1 = (void *)mysql_net_store_length(local_18,__n);
memcpy(pvVar1,__s,__n);
__n_00 = strlen(__s + __n + 1);
pvVar1 = (void *)mysql_net_store_length(__n + (long)pvVar1,__n_00);
memcpy(pvVar1,__s + __n + 1,__n_00);
local_18 = __n_00 + (long)pvVar1;
}
}
}
return local_18;
}
|
|
5,692 | mbedtls_pkcs12_derivation | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/pkcs12.c | int mbedtls_pkcs12_derivation(unsigned char *data, size_t datalen,
const unsigned char *pwd, size_t pwdlen,
const unsigned char *salt, size_t saltlen,
mbedtls_md_type_t md_type, int id, int iterations)
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
unsigned int j;
unsigned char diversifier[128];
unsigned char salt_block[128], pwd_block[128], hash_block[128];
unsigned char hash_output[MBEDTLS_MD_MAX_SIZE];
unsigned char *p;
unsigned char c;
int use_password = 0;
int use_salt = 0;
size_t hlen, use_len, v, i;
const mbedtls_md_info_t *md_info;
mbedtls_md_context_t md_ctx;
// This version only allows max of 64 bytes of password or salt
if (datalen > 128 || pwdlen > 64 || saltlen > 64) {
return MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA;
}
if (pwd == NULL && pwdlen != 0) {
return MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA;
}
if (salt == NULL && saltlen != 0) {
return MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA;
}
use_password = (pwd && pwdlen != 0);
use_salt = (salt && saltlen != 0);
md_info = mbedtls_md_info_from_type(md_type);
if (md_info == NULL) {
return MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE;
}
mbedtls_md_init(&md_ctx);
if ((ret = mbedtls_md_setup(&md_ctx, md_info, 0)) != 0) {
return ret;
}
hlen = mbedtls_md_get_size(md_info);
if (hlen <= 32) {
v = 64;
} else {
v = 128;
}
memset(diversifier, (unsigned char) id, v);
if (use_salt != 0) {
pkcs12_fill_buffer(salt_block, v, salt, saltlen);
}
if (use_password != 0) {
pkcs12_fill_buffer(pwd_block, v, pwd, pwdlen);
}
p = data;
while (datalen > 0) {
// Calculate hash( diversifier || salt_block || pwd_block )
if ((ret = mbedtls_md_starts(&md_ctx)) != 0) {
goto exit;
}
if ((ret = mbedtls_md_update(&md_ctx, diversifier, v)) != 0) {
goto exit;
}
if (use_salt != 0) {
if ((ret = mbedtls_md_update(&md_ctx, salt_block, v)) != 0) {
goto exit;
}
}
if (use_password != 0) {
if ((ret = mbedtls_md_update(&md_ctx, pwd_block, v)) != 0) {
goto exit;
}
}
if ((ret = mbedtls_md_finish(&md_ctx, hash_output)) != 0) {
goto exit;
}
// Perform remaining ( iterations - 1 ) recursive hash calculations
for (i = 1; i < (size_t) iterations; i++) {
if ((ret = mbedtls_md(md_info, hash_output, hlen, hash_output)) != 0) {
goto exit;
}
}
use_len = (datalen > hlen) ? hlen : datalen;
memcpy(p, hash_output, use_len);
datalen -= use_len;
p += use_len;
if (datalen == 0) {
break;
}
// Concatenating copies of hash_output into hash_block (B)
pkcs12_fill_buffer(hash_block, v, hash_output, hlen);
// B += 1
for (i = v; i > 0; i--) {
if (++hash_block[i - 1] != 0) {
break;
}
}
if (use_salt != 0) {
// salt_block += B
c = 0;
for (i = v; i > 0; i--) {
j = salt_block[i - 1] + hash_block[i - 1] + c;
c = MBEDTLS_BYTE_1(j);
salt_block[i - 1] = MBEDTLS_BYTE_0(j);
}
}
if (use_password != 0) {
// pwd_block += B
c = 0;
for (i = v; i > 0; i--) {
j = pwd_block[i - 1] + hash_block[i - 1] + c;
c = MBEDTLS_BYTE_1(j);
pwd_block[i - 1] = MBEDTLS_BYTE_0(j);
}
}
}
ret = 0;
exit:
mbedtls_platform_zeroize(salt_block, sizeof(salt_block));
mbedtls_platform_zeroize(pwd_block, sizeof(pwd_block));
mbedtls_platform_zeroize(hash_block, sizeof(hash_block));
mbedtls_platform_zeroize(hash_output, sizeof(hash_output));
mbedtls_md_free(&md_ctx);
return ret;
} | O3 | c | mbedtls_pkcs12_derivation:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp # imm = 0x298
movq %rcx, %r13
cmpq $0x81, %rsi
setae %al
cmpq $0x41, %rcx
setae %cl
orb %al, %cl
cmpq $0x41, %r9
setae %al
orb %cl, %al
movl $0xffffe080, %r15d # imm = 0xFFFFE080
jne 0x9934c
testq %rdx, %rdx
sete %al
testq %r13, %r13
setne %cl
testb %cl, %al
jne 0x9934c
movq %r9, %rbx
movq %r8, %r14
testq %r8, %r8
sete %al
testq %r9, %r9
setne %cl
testb %cl, %al
jne 0x9934c
movq %rsi, %rbp
movq %rdi, 0x30(%rsp)
movl 0x2d0(%rsp), %edi
testq %rbx, %rbx
setne %r15b
testq %r13, %r13
setne 0x10(%rsp)
movq %rdx, 0x28(%rsp)
testq %rdx, %rdx
setne 0xe(%rsp)
testq %r14, %r14
setne 0xd(%rsp)
callq 0x8a34c
testq %rax, %rax
je 0x99128
movq %rax, %r12
movb %r15b, 0x20(%rsp)
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x8a365
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x8a4a1
movl %eax, %r15d
testl %eax, %eax
jne 0x9934c
movq %rbp, 0x18(%rsp)
movl 0x2d8(%rsp), %r15d
movb 0x10(%rsp), %al
andb %al, 0xe(%rsp)
movb 0xd(%rsp), %bpl
andb 0x20(%rsp), %bpl
movq %r12, 0x20(%rsp)
movq %r12, %rdi
callq 0x8abb4
xorl %edx, %edx
movb %al, 0xf(%rsp)
cmpb $0x21, %al
setae %dl
shll $0x6, %edx
addq $0x40, %rdx
leaq 0x210(%rsp), %rdi
movl %r15d, %esi
movq %rdx, 0x10(%rsp)
callq 0xf2b0
movb %bpl, 0xd(%rsp)
testb %bpl, %bpl
je 0x990ca
leaq 0x150(%rsp), %r15
movq 0x10(%rsp), %rbp
cmpq %rbx, %rbp
movq %rbx, %r12
cmovbq %rbp, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xf3a0
addq %r12, %r15
subq %r12, %rbp
jne 0x990aa
movb 0xe(%rsp), %r12b
testb %r12b, %r12b
movq 0x28(%rsp), %rbp
je 0x99106
leaq 0xd0(%rsp), %r14
movq 0x10(%rsp), %r15
cmpq %r13, %r15
movq %r13, %rbx
cmovbq %r15, %rbx
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0xf3a0
addq %rbx, %r14
subq %rbx, %r15
jne 0x990e6
cmpq $0x0, 0x18(%rsp)
je 0x992fa
leaq 0x38(%rsp), %rdi
callq 0x8a5e0
testl %eax, %eax
je 0x99133
movl %eax, %r15d
jmp 0x992fd
movl $0xffffe100, %r15d # imm = 0xFFFFE100
jmp 0x9934c
movzbl 0xf(%rsp), %r13d
movslq 0x2e0(%rsp), %rax
decq %rax
movq %rax, 0x28(%rsp)
leaq 0x38(%rsp), %rbx
leaq 0x210(%rsp), %r14
leaq 0x1d0(%rsp), %rbp
movq %rbx, %rdi
movq %r14, %rsi
movq 0x10(%rsp), %rdx
callq 0x8a65b
testl %eax, %eax
jne 0x99120
cmpb $0x0, 0xd(%rsp)
je 0x99192
movq %rbx, %rdi
leaq 0x150(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x8a65b
testl %eax, %eax
jne 0x99120
testb %r12b, %r12b
je 0x991b4
movq %rbx, %rdi
leaq 0xd0(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x8a65b
testl %eax, %eax
jne 0x99120
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x8a6b6
testl %eax, %eax
jne 0x99120
movq 0x28(%rsp), %rbx
cmpl $0x2, 0x2e0(%rsp)
movq 0x20(%rsp), %r14
jb 0x991f9
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x8a711
testl %eax, %eax
jne 0x99120
decq %rbx
jne 0x991db
movq 0x18(%rsp), %rbx
cmpq %r13, %rbx
movq %r13, %r14
cmovbq %rbx, %r14
movq 0x30(%rsp), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0xf3a0
subq %r14, %rbx
movq %rbx, 0x18(%rsp)
je 0x992fa
testb %r13b, %r13b
je 0x99255
leaq 0x50(%rsp), %r15
movq 0x10(%rsp), %r12
cmpq %r13, %r12
movq %r13, %rbx
cmovbq %r12, %rbx
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0xf3a0
addq %rbx, %r15
subq %rbx, %r12
jne 0x99235
movq 0x30(%rsp), %rsi
addq %r14, %rsi
movq 0x10(%rsp), %rcx
movq %rcx, %rax
subq $0x1, %rax
jb 0x99274
incb 0x4f(%rsp,%rcx)
movq %rax, %rcx
je 0x99265
cmpb $0x0, 0xd(%rsp)
movb 0xe(%rsp), %r12b
leaq 0x38(%rsp), %rbx
leaq 0x210(%rsp), %r14
je 0x992b4
xorl %ecx, %ecx
movq 0x10(%rsp), %rax
movzbl 0x14f(%rsp,%rax), %edx
addl %ecx, %edx
movzbl 0x4f(%rsp,%rax), %ecx
addl %edx, %ecx
movb %cl, 0x14f(%rsp,%rax)
shrl $0x8, %ecx
decq %rax
jne 0x99294
movq %rsi, 0x30(%rsp)
testb %r12b, %r12b
je 0x992e5
xorl %ecx, %ecx
movq 0x10(%rsp), %rax
movzbl 0xcf(%rsp,%rax), %edx
addl %ecx, %edx
movzbl 0x4f(%rsp,%rax), %ecx
addl %edx, %ecx
movb %cl, 0xcf(%rsp,%rax)
shrl $0x8, %ecx
decq %rax
jne 0x992c5
movq %rbx, %rdi
callq 0x8a5e0
movl %eax, %r15d
testl %eax, %eax
je 0x9915e
jmp 0x992fd
xorl %r15d, %r15d
leaq 0x150(%rsp), %rdi
movl $0x80, %esi
callq 0x8db8c
leaq 0xd0(%rsp), %rdi
movl $0x80, %esi
callq 0x8db8c
leaq 0x50(%rsp), %rdi
movl $0x80, %esi
callq 0x8db8c
leaq 0x1d0(%rsp), %rdi
movl $0x40, %esi
callq 0x8db8c
leaq 0x38(%rsp), %rdi
callq 0x8a374
movl %r15d, %eax
addq $0x298, %rsp # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
| mbedtls_pkcs12_derivation:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 298h
mov r13, rcx
cmp rsi, 81h
setnb al
cmp rcx, 41h ; 'A'
setnb cl
or cl, al
cmp r9, 41h ; 'A'
setnb al
or al, cl
mov r15d, 0FFFFE080h
jnz loc_9934C
test rdx, rdx
setz al
test r13, r13
setnz cl
test al, cl
jnz loc_9934C
mov rbx, r9
mov r14, r8
test r8, r8
setz al
test r9, r9
setnz cl
test al, cl
jnz loc_9934C
mov rbp, rsi
mov [rsp+2C8h+var_298], rdi
mov edi, [rsp+2C8h+arg_0]
test rbx, rbx
setnz r15b
test r13, r13
setnz byte ptr [rsp+2C8h+var_2B8]
mov [rsp+2C8h+var_2A0], rdx
test rdx, rdx
setnz [rsp+2C8h+var_2BA]
test r14, r14
setnz [rsp+2C8h+var_2BB]
call mbedtls_md_info_from_type
test rax, rax
jz loc_99128
mov r12, rax
mov byte ptr [rsp+2C8h+var_2A8], r15b
lea r15, [rsp+2C8h+var_290]
mov rdi, r15
call mbedtls_md_init
mov rdi, r15
mov rsi, r12
xor edx, edx
call mbedtls_md_setup
mov r15d, eax
test eax, eax
jnz loc_9934C
mov [rsp+2C8h+var_2B0], rbp
mov r15d, [rsp+2C8h+arg_8]
mov al, byte ptr [rsp+2C8h+var_2B8]
and [rsp+2C8h+var_2BA], al
mov bpl, [rsp+2C8h+var_2BB]
and bpl, byte ptr [rsp+2C8h+var_2A8]
mov [rsp+2C8h+var_2A8], r12
mov rdi, r12
call mbedtls_md_get_size
xor edx, edx
mov [rsp+2C8h+var_2B9], al
cmp al, 21h ; '!'
setnb dl
shl edx, 6
add rdx, 40h ; '@'
lea rdi, [rsp+2C8h+var_B8]
mov esi, r15d
mov [rsp+2C8h+var_2B8], rdx
call _memset
mov [rsp+2C8h+var_2BB], bpl
test bpl, bpl
jz short loc_990CA
lea r15, [rsp+2C8h+var_178]
mov rbp, [rsp+2C8h+var_2B8]
loc_990AA:
cmp rbp, rbx
mov r12, rbx
cmovb r12, rbp
mov rdi, r15
mov rsi, r14
mov rdx, r12
call _memcpy
add r15, r12
sub rbp, r12
jnz short loc_990AA
loc_990CA:
mov r12b, [rsp+2C8h+var_2BA]
test r12b, r12b
mov rbp, [rsp+2C8h+var_2A0]
jz short loc_99106
lea r14, [rsp+2C8h+var_1F8]
mov r15, [rsp+2C8h+var_2B8]
loc_990E6:
cmp r15, r13
mov rbx, r13
cmovb rbx, r15
mov rdi, r14
mov rsi, rbp
mov rdx, rbx
call _memcpy
add r14, rbx
sub r15, rbx
jnz short loc_990E6
loc_99106:
cmp [rsp+2C8h+var_2B0], 0
jz loc_992FA
lea rdi, [rsp+2C8h+var_290]
call mbedtls_md_starts
test eax, eax
jz short loc_99133
loc_99120:
mov r15d, eax
jmp loc_992FD
loc_99128:
mov r15d, 0FFFFE100h
jmp loc_9934C
loc_99133:
movzx r13d, [rsp+2C8h+var_2B9]
movsxd rax, [rsp+2C8h+arg_10]
dec rax
mov [rsp+2C8h+var_2A0], rax
lea rbx, [rsp+2C8h+var_290]
lea r14, [rsp+2C8h+var_B8]
lea rbp, [rsp+2C8h+var_F8]
loc_9915E:
mov rdi, rbx
mov rsi, r14
mov rdx, [rsp+2C8h+var_2B8]
call mbedtls_md_update
test eax, eax
jnz short loc_99120
cmp [rsp+2C8h+var_2BB], 0
jz short loc_99192
mov rdi, rbx
lea rsi, [rsp+2C8h+var_178]
mov rdx, [rsp+2C8h+var_2B8]
call mbedtls_md_update
test eax, eax
jnz short loc_99120
loc_99192:
test r12b, r12b
jz short loc_991B4
mov rdi, rbx
lea rsi, [rsp+2C8h+var_1F8]
mov rdx, [rsp+2C8h+var_2B8]
call mbedtls_md_update
test eax, eax
jnz loc_99120
loc_991B4:
mov rdi, rbx
mov rsi, rbp
call mbedtls_md_finish
test eax, eax
jnz loc_99120
mov rbx, [rsp+2C8h+var_2A0]
cmp [rsp+2C8h+arg_10], 2
mov r14, [rsp+2C8h+var_2A8]
jb short loc_991F9
loc_991DB:
mov rdi, r14
mov rsi, rbp
mov rdx, r13
mov rcx, rbp
call mbedtls_md
test eax, eax
jnz loc_99120
dec rbx
jnz short loc_991DB
loc_991F9:
mov rbx, [rsp+2C8h+var_2B0]
cmp rbx, r13
mov r14, r13
cmovb r14, rbx
mov rdi, [rsp+2C8h+var_298]
mov rsi, rbp
mov rdx, r14
call _memcpy
sub rbx, r14
mov [rsp+2C8h+var_2B0], rbx
jz loc_992FA
test r13b, r13b
jz short loc_99255
lea r15, [rsp+2C8h+var_278]
mov r12, [rsp+2C8h+var_2B8]
loc_99235:
cmp r12, r13
mov rbx, r13
cmovb rbx, r12
mov rdi, r15
mov rsi, rbp
mov rdx, rbx
call _memcpy
add r15, rbx
sub r12, rbx
jnz short loc_99235
loc_99255:
mov rsi, [rsp+2C8h+var_298]
add rsi, r14
mov rcx, [rsp+2C8h+var_2B8]
mov rax, rcx
loc_99265:
sub rax, 1
jb short loc_99274
inc [rsp+rcx+2C8h+var_279]
mov rcx, rax
jz short loc_99265
loc_99274:
cmp [rsp+2C8h+var_2BB], 0
mov r12b, [rsp+2C8h+var_2BA]
lea rbx, [rsp+2C8h+var_290]
lea r14, [rsp+2C8h+var_B8]
jz short loc_992B4
xor ecx, ecx
mov rax, [rsp+2C8h+var_2B8]
loc_99294:
movzx edx, [rsp+rax+2C8h+var_179]
add edx, ecx
movzx ecx, [rsp+rax+2C8h+var_279]
add ecx, edx
mov [rsp+rax+2C8h+var_179], cl
shr ecx, 8
dec rax
jnz short loc_99294
loc_992B4:
mov [rsp+2C8h+var_298], rsi
test r12b, r12b
jz short loc_992E5
xor ecx, ecx
mov rax, [rsp+2C8h+var_2B8]
loc_992C5:
movzx edx, [rsp+rax+2C8h+var_1F9]
add edx, ecx
movzx ecx, [rsp+rax+2C8h+var_279]
add ecx, edx
mov [rsp+rax+2C8h+var_1F9], cl
shr ecx, 8
dec rax
jnz short loc_992C5
loc_992E5:
mov rdi, rbx
call mbedtls_md_starts
mov r15d, eax
test eax, eax
jz loc_9915E
jmp short loc_992FD
loc_992FA:
xor r15d, r15d
loc_992FD:
lea rdi, [rsp+2C8h+var_178]
mov esi, 80h
call mbedtls_platform_zeroize
lea rdi, [rsp+2C8h+var_1F8]
mov esi, 80h
call mbedtls_platform_zeroize
lea rdi, [rsp+2C8h+var_278]
mov esi, 80h
call mbedtls_platform_zeroize
lea rdi, [rsp+2C8h+var_F8]
mov esi, 40h ; '@'
call mbedtls_platform_zeroize
lea rdi, [rsp+2C8h+var_290]
call mbedtls_md_free
loc_9934C:
mov eax, r15d
add rsp, 298h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mbedtls_pkcs12_derivation(
long long a1,
unsigned long long a2,
long long a3,
unsigned long long a4,
long long a5,
unsigned long long a6,
int a7,
unsigned int a8,
unsigned int a9)
{
unsigned int v10; // r15d
_UNKNOWN **v13; // rax
long long v14; // r12
_BYTE *v15; // r15
unsigned long long v16; // rbp
unsigned long long v17; // r12
char v18; // r12
_BYTE *v19; // r14
unsigned long long v20; // r15
unsigned long long v21; // rbx
unsigned int v22; // eax
unsigned long long v23; // r13
long long v24; // rdx
long long v25; // rcx
long long v26; // r8
long long v27; // r9
long long v28; // rbx
unsigned long long v29; // rbx
unsigned long long v30; // r14
_BYTE *v31; // r15
unsigned long long v32; // r12
unsigned long long v33; // rbx
long long v34; // rcx
long long v35; // rax
bool v37; // zf
unsigned int v38; // ecx
long long v39; // rax
unsigned int v40; // ecx
unsigned int v41; // ecx
long long v42; // rax
unsigned int v43; // ecx
long long v45; // [rsp+0h] [rbp-2C8h]
long long v46; // [rsp+8h] [rbp-2C0h]
bool v47; // [rsp+Dh] [rbp-2BBh]
bool v48; // [rsp+Eh] [rbp-2BAh]
bool v49; // [rsp+10h] [rbp-2B8h]
long long v50; // [rsp+10h] [rbp-2B8h]
long long v51; // [rsp+18h] [rbp-2B0h]
unsigned long long v52; // [rsp+18h] [rbp-2B0h]
long long v53; // [rsp+20h] [rbp-2A8h]
long long v55; // [rsp+28h] [rbp-2A0h]
long long v57; // [rsp+30h] [rbp-298h]
long long v58[3]; // [rsp+38h] [rbp-290h] BYREF
_BYTE v59[128]; // [rsp+50h] [rbp-278h] BYREF
_BYTE v60[128]; // [rsp+D0h] [rbp-1F8h] BYREF
_BYTE v61[128]; // [rsp+150h] [rbp-178h] BYREF
_BYTE v62[64]; // [rsp+1D0h] [rbp-F8h] BYREF
_BYTE v63[184]; // [rsp+210h] [rbp-B8h] BYREF
v10 = -8064;
if ( a2 < 0x81 && a4 < 0x41 && a6 < 0x41 && (a4 == 0 || a3 != 0) && (a6 == 0 || a5 != 0) )
{
v49 = a4 != 0;
v48 = a3 != 0;
v47 = a5 != 0;
v13 = mbedtls_md_info_from_type(a7);
if ( v13 )
{
v14 = (long long)v13;
mbedtls_md_init((long long)v58);
v10 = mbedtls_md_setup(v58, v14, 0);
if ( !v10 )
{
v51 = a2;
BYTE6(v46) = v49 && v48;
v53 = v14;
HIBYTE(v46) = mbedtls_md_get_size(v14);
v50 = ((unsigned __int8)(HIBYTE(v46) >= 0x21u) << 6) + 64LL;
memset(v63, a8, v50);
BYTE5(v46) = a6 != 0 && v47;
if ( BYTE5(v46) )
{
v15 = v61;
v16 = ((unsigned __int8)(HIBYTE(v46) >= 0x21u) << 6) + 64LL;
do
{
v17 = a6;
if ( v16 < a6 )
v17 = v16;
memcpy(v15, a5, v17);
v15 += v17;
v16 -= v17;
}
while ( v16 );
}
v18 = BYTE6(v46);
if ( BYTE6(v46) )
{
v19 = v60;
v20 = ((unsigned __int8)(HIBYTE(v46) >= 0x21u) << 6) + 64LL;
do
{
v21 = a4;
if ( v20 < a4 )
v21 = v20;
memcpy(v19, a3, v21);
v19 += v21;
v20 -= v21;
}
while ( v20 );
}
if ( a2 )
{
v22 = mbedtls_md_starts(v58);
if ( !v22 )
{
v23 = HIBYTE(v46);
v55 = (int)a9 - 1LL;
while ( 1 )
{
v22 = mbedtls_md_update(v58, (long long)v63, v50);
if ( v22 )
break;
if ( BYTE5(v46) )
{
v22 = mbedtls_md_update(v58, (long long)v61, v50);
if ( v22 )
break;
}
if ( v18 )
{
v22 = mbedtls_md_update(v58, (long long)v60, v50);
if ( v22 )
break;
}
v22 = mbedtls_md_finish(v58, (long long)v62, v24, v25, v26, v27, v45, v46, v50, v51, v53, v55, a1, v58[0]);
if ( v22 )
break;
v28 = v55;
if ( a9 >= 2 )
{
do
{
v22 = mbedtls_md(v53, (long long)v62, v23, (long long)v62);
if ( v22 )
goto LABEL_18;
}
while ( --v28 );
}
v29 = v52;
v30 = v23;
if ( v52 < v23 )
v30 = v52;
memcpy(v57, v62, v30);
v51 = v52 - v30;
if ( v29 == v30 )
goto LABEL_49;
if ( (_BYTE)v23 )
{
v31 = v59;
v32 = v50;
do
{
v33 = v23;
if ( v32 < v23 )
v33 = v32;
memcpy(v31, v62, v33);
v31 += v33;
v32 -= v33;
}
while ( v32 );
}
v34 = v50;
v35 = v50;
do
{
if ( v35-- == 0 )
break;
v37 = (*((_BYTE *)&v58[2] + v34 + 7))++ == 0xFF;
v34 = v35;
}
while ( v37 );
v18 = BYTE6(v46);
if ( BYTE5(v46) )
{
v38 = 0;
v39 = v50;
do
{
v40 = v38 + (unsigned __int8)v60[v39 + 127] + *((unsigned __int8 *)&v58[2] + v39 + 7);
v60[v39 + 127] = v40;
v38 = v40 >> 8;
--v39;
}
while ( v39 );
}
a1 = v30 + v57;
if ( BYTE6(v46) )
{
v41 = 0;
v42 = v50;
do
{
v43 = v41 + (unsigned __int8)v59[v42 + 127] + *((unsigned __int8 *)&v58[2] + v42 + 7);
v59[v42 + 127] = v43;
v41 = v43 >> 8;
--v42;
}
while ( v42 );
}
v10 = mbedtls_md_starts(v58);
if ( v10 )
goto LABEL_50;
}
}
LABEL_18:
v10 = v22;
}
else
{
LABEL_49:
v10 = 0;
}
LABEL_50:
mbedtls_platform_zeroize((long long)v61, 128LL);
mbedtls_platform_zeroize((long long)v60, 128LL);
mbedtls_platform_zeroize((long long)v59, 128LL);
mbedtls_platform_zeroize((long long)v62, 64LL);
mbedtls_md_free(v58);
}
}
else
{
return (unsigned int)-7936;
}
}
return v10;
}
| mbedtls_pkcs12_derivation:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x298
MOV R13,RCX
CMP RSI,0x81
SETNC AL
CMP RCX,0x41
SETNC CL
OR CL,AL
CMP R9,0x41
SETNC AL
OR AL,CL
MOV R15D,0xffffe080
JNZ 0x0019934c
TEST RDX,RDX
SETZ AL
TEST R13,R13
SETNZ CL
TEST AL,CL
JNZ 0x0019934c
MOV RBX,R9
MOV R14,R8
TEST R8,R8
SETZ AL
TEST R9,R9
SETNZ CL
TEST AL,CL
JNZ 0x0019934c
MOV RBP,RSI
MOV qword ptr [RSP + 0x30],RDI
MOV EDI,dword ptr [RSP + 0x2d0]
TEST RBX,RBX
SETNZ R15B
TEST R13,R13
SETNZ byte ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RDX
TEST RDX,RDX
SETNZ byte ptr [RSP + 0xe]
TEST R14,R14
SETNZ byte ptr [RSP + 0xd]
CALL 0x0018a34c
TEST RAX,RAX
JZ 0x00199128
MOV R12,RAX
MOV byte ptr [RSP + 0x20],R15B
LEA R15,[RSP + 0x38]
MOV RDI,R15
CALL 0x0018a365
MOV RDI,R15
MOV RSI,R12
XOR EDX,EDX
CALL 0x0018a4a1
MOV R15D,EAX
TEST EAX,EAX
JNZ 0x0019934c
MOV qword ptr [RSP + 0x18],RBP
MOV R15D,dword ptr [RSP + 0x2d8]
MOV AL,byte ptr [RSP + 0x10]
AND byte ptr [RSP + 0xe],AL
MOV BPL,byte ptr [RSP + 0xd]
AND BPL,byte ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x20],R12
MOV RDI,R12
CALL 0x0018abb4
XOR EDX,EDX
MOV byte ptr [RSP + 0xf],AL
CMP AL,0x21
SETNC DL
SHL EDX,0x6
ADD RDX,0x40
LEA RDI,[RSP + 0x210]
MOV ESI,R15D
MOV qword ptr [RSP + 0x10],RDX
CALL 0x0010f2b0
MOV byte ptr [RSP + 0xd],BPL
TEST BPL,BPL
JZ 0x001990ca
LEA R15,[RSP + 0x150]
MOV RBP,qword ptr [RSP + 0x10]
LAB_001990aa:
CMP RBP,RBX
MOV R12,RBX
CMOVC R12,RBP
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
CALL 0x0010f3a0
ADD R15,R12
SUB RBP,R12
JNZ 0x001990aa
LAB_001990ca:
MOV R12B,byte ptr [RSP + 0xe]
TEST R12B,R12B
MOV RBP,qword ptr [RSP + 0x28]
JZ 0x00199106
LEA R14,[RSP + 0xd0]
MOV R15,qword ptr [RSP + 0x10]
LAB_001990e6:
CMP R15,R13
MOV RBX,R13
CMOVC RBX,R15
MOV RDI,R14
MOV RSI,RBP
MOV RDX,RBX
CALL 0x0010f3a0
ADD R14,RBX
SUB R15,RBX
JNZ 0x001990e6
LAB_00199106:
CMP qword ptr [RSP + 0x18],0x0
JZ 0x001992fa
LEA RDI,[RSP + 0x38]
CALL 0x0018a5e0
TEST EAX,EAX
JZ 0x00199133
LAB_00199120:
MOV R15D,EAX
JMP 0x001992fd
LAB_00199128:
MOV R15D,0xffffe100
JMP 0x0019934c
LAB_00199133:
MOVZX R13D,byte ptr [RSP + 0xf]
MOVSXD RAX,dword ptr [RSP + 0x2e0]
DEC RAX
MOV qword ptr [RSP + 0x28],RAX
LEA RBX,[RSP + 0x38]
LEA R14,[RSP + 0x210]
LEA RBP,[RSP + 0x1d0]
LAB_0019915e:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0018a65b
TEST EAX,EAX
JNZ 0x00199120
CMP byte ptr [RSP + 0xd],0x0
JZ 0x00199192
MOV RDI,RBX
LEA RSI,[RSP + 0x150]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0018a65b
TEST EAX,EAX
JNZ 0x00199120
LAB_00199192:
TEST R12B,R12B
JZ 0x001991b4
MOV RDI,RBX
LEA RSI,[RSP + 0xd0]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0018a65b
TEST EAX,EAX
JNZ 0x00199120
LAB_001991b4:
MOV RDI,RBX
MOV RSI,RBP
CALL 0x0018a6b6
TEST EAX,EAX
JNZ 0x00199120
MOV RBX,qword ptr [RSP + 0x28]
CMP dword ptr [RSP + 0x2e0],0x2
MOV R14,qword ptr [RSP + 0x20]
JC 0x001991f9
LAB_001991db:
MOV RDI,R14
MOV RSI,RBP
MOV RDX,R13
MOV RCX,RBP
CALL 0x0018a711
TEST EAX,EAX
JNZ 0x00199120
DEC RBX
JNZ 0x001991db
LAB_001991f9:
MOV RBX,qword ptr [RSP + 0x18]
CMP RBX,R13
MOV R14,R13
CMOVC R14,RBX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,RBP
MOV RDX,R14
CALL 0x0010f3a0
SUB RBX,R14
MOV qword ptr [RSP + 0x18],RBX
JZ 0x001992fa
TEST R13B,R13B
JZ 0x00199255
LEA R15,[RSP + 0x50]
MOV R12,qword ptr [RSP + 0x10]
LAB_00199235:
CMP R12,R13
MOV RBX,R13
CMOVC RBX,R12
MOV RDI,R15
MOV RSI,RBP
MOV RDX,RBX
CALL 0x0010f3a0
ADD R15,RBX
SUB R12,RBX
JNZ 0x00199235
LAB_00199255:
MOV RSI,qword ptr [RSP + 0x30]
ADD RSI,R14
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,RCX
LAB_00199265:
SUB RAX,0x1
JC 0x00199274
INC byte ptr [RSP + RCX*0x1 + 0x4f]
MOV RCX,RAX
JZ 0x00199265
LAB_00199274:
CMP byte ptr [RSP + 0xd],0x0
MOV R12B,byte ptr [RSP + 0xe]
LEA RBX,[RSP + 0x38]
LEA R14,[RSP + 0x210]
JZ 0x001992b4
XOR ECX,ECX
MOV RAX,qword ptr [RSP + 0x10]
LAB_00199294:
MOVZX EDX,byte ptr [RSP + RAX*0x1 + 0x14f]
ADD EDX,ECX
MOVZX ECX,byte ptr [RSP + RAX*0x1 + 0x4f]
ADD ECX,EDX
MOV byte ptr [RSP + RAX*0x1 + 0x14f],CL
SHR ECX,0x8
DEC RAX
JNZ 0x00199294
LAB_001992b4:
MOV qword ptr [RSP + 0x30],RSI
TEST R12B,R12B
JZ 0x001992e5
XOR ECX,ECX
MOV RAX,qword ptr [RSP + 0x10]
LAB_001992c5:
MOVZX EDX,byte ptr [RSP + RAX*0x1 + 0xcf]
ADD EDX,ECX
MOVZX ECX,byte ptr [RSP + RAX*0x1 + 0x4f]
ADD ECX,EDX
MOV byte ptr [RSP + RAX*0x1 + 0xcf],CL
SHR ECX,0x8
DEC RAX
JNZ 0x001992c5
LAB_001992e5:
MOV RDI,RBX
CALL 0x0018a5e0
MOV R15D,EAX
TEST EAX,EAX
JZ 0x0019915e
JMP 0x001992fd
LAB_001992fa:
XOR R15D,R15D
LAB_001992fd:
LEA RDI,[RSP + 0x150]
MOV ESI,0x80
CALL 0x0018db8c
LEA RDI,[RSP + 0xd0]
MOV ESI,0x80
CALL 0x0018db8c
LEA RDI,[RSP + 0x50]
MOV ESI,0x80
CALL 0x0018db8c
LEA RDI,[RSP + 0x1d0]
MOV ESI,0x40
CALL 0x0018db8c
LEA RDI,[RSP + 0x38]
CALL 0x0018a374
LAB_0019934c:
MOV EAX,R15D
ADD RSP,0x298
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int mbedtls_pkcs12_derivation
(void *param_1,ulong param_2,void *param_3,ulong param_4,void *param_5,ulong param_6,
int4 param_7,int param_8,uint param_9)
{
bool bVar1;
byte bVar2;
int iVar3;
long lVar4;
uint uVar5;
size_t __n;
ulong uVar6;
long lVar7;
ulong __n_00;
bool bVar8;
size_t sVar9;
ulong __n_01;
byte *pbVar10;
ulong local_2b0;
void *local_298;
int1 local_290 [23];
byte abStack_279 [128];
byte abStack_1f9 [128];
byte abStack_179 [129];
int1 local_f8 [64];
int1 local_b8 [136];
iVar3 = -0x1f80;
if (((param_6 < 0x41 && (param_4 < 0x41 && param_2 < 0x81)) &&
(param_3 != (void *)0x0 || param_4 == 0)) && (param_5 != (void *)0x0 || param_6 == 0)) {
lVar4 = mbedtls_md_info_from_type(param_7);
if (lVar4 == 0) {
iVar3 = -0x1f00;
}
else {
mbedtls_md_init(local_290);
iVar3 = mbedtls_md_setup(local_290,lVar4,0);
if (iVar3 == 0) {
bVar1 = param_3 != (void *)0x0 && param_4 != 0;
bVar8 = param_5 != (void *)0x0 && param_6 != 0;
bVar2 = mbedtls_md_get_size(lVar4);
__n = (ulong)(0x20 < bVar2) * 0x40 + 0x40;
memset(local_b8,param_8,__n);
if (bVar8) {
pbVar10 = abStack_179 + 1;
sVar9 = __n;
do {
uVar6 = param_6;
if (sVar9 < param_6) {
uVar6 = sVar9;
}
memcpy(pbVar10,param_5,uVar6);
pbVar10 = pbVar10 + uVar6;
sVar9 = sVar9 - uVar6;
} while (sVar9 != 0);
}
if (bVar1) {
pbVar10 = abStack_1f9 + 1;
sVar9 = __n;
do {
uVar6 = param_4;
if (sVar9 < param_4) {
uVar6 = sVar9;
}
memcpy(pbVar10,param_3,uVar6);
pbVar10 = pbVar10 + uVar6;
sVar9 = sVar9 - uVar6;
} while (sVar9 != 0);
}
if (param_2 == 0) {
LAB_001992fa:
iVar3 = 0;
}
else {
iVar3 = mbedtls_md_starts(local_290);
if (iVar3 == 0) {
uVar6 = (ulong)bVar2;
local_2b0 = param_2;
local_298 = param_1;
do {
iVar3 = mbedtls_md_update(local_290,local_b8,__n);
if ((((iVar3 != 0) ||
((bVar8 && (iVar3 = mbedtls_md_update(local_290,abStack_179 + 1,__n), iVar3 != 0)
))) || ((bVar1 && (iVar3 = mbedtls_md_update(local_290,abStack_1f9 + 1,__n),
iVar3 != 0)))) ||
(iVar3 = mbedtls_md_finish(local_290,local_f8), iVar3 != 0)) break;
lVar7 = (long)(int)param_9 + -1;
if (1 < param_9) {
do {
iVar3 = mbedtls_md(lVar4,local_f8,uVar6,local_f8);
if (iVar3 != 0) goto LAB_001992fd;
lVar7 = lVar7 + -1;
} while (lVar7 != 0);
}
__n_01 = uVar6;
if (local_2b0 < uVar6) {
__n_01 = local_2b0;
}
memcpy(local_298,local_f8,__n_01);
local_2b0 = local_2b0 - __n_01;
if (local_2b0 == 0) goto LAB_001992fa;
if (bVar2 != 0) {
pbVar10 = abStack_279 + 1;
sVar9 = __n;
do {
__n_00 = uVar6;
if (sVar9 < uVar6) {
__n_00 = sVar9;
}
memcpy(pbVar10,local_f8,__n_00);
pbVar10 = pbVar10 + __n_00;
sVar9 = sVar9 - __n_00;
} while (sVar9 != 0);
}
local_298 = (void *)((long)local_298 + __n_01);
sVar9 = __n;
do {
if (sVar9 == 0) break;
pbVar10 = abStack_279 + sVar9;
*pbVar10 = *pbVar10 + 1;
sVar9 = sVar9 - 1;
} while (*pbVar10 == 0);
if (bVar8) {
uVar5 = 0;
sVar9 = __n;
do {
uVar5 = (uint)abStack_279[sVar9] + abStack_179[sVar9] + uVar5;
abStack_179[sVar9] = (byte)uVar5;
uVar5 = uVar5 >> 8;
sVar9 = sVar9 - 1;
} while (sVar9 != 0);
}
if (bVar1) {
uVar5 = 0;
sVar9 = __n;
do {
uVar5 = (uint)abStack_279[sVar9] + abStack_1f9[sVar9] + uVar5;
abStack_1f9[sVar9] = (byte)uVar5;
uVar5 = uVar5 >> 8;
sVar9 = sVar9 - 1;
} while (sVar9 != 0);
}
iVar3 = mbedtls_md_starts(local_290);
} while (iVar3 == 0);
}
}
LAB_001992fd:
mbedtls_platform_zeroize(abStack_179 + 1,0x80);
mbedtls_platform_zeroize(abStack_1f9 + 1,0x80);
mbedtls_platform_zeroize(abStack_279 + 1,0x80);
mbedtls_platform_zeroize(local_f8,0x40);
mbedtls_md_free(local_290);
}
}
}
return iVar3;
}
|
|
5,693 | mi_keydef_read | eloqsql/storage/myisam/mi_open.c | uchar *mi_keydef_read(uchar *ptr, MI_KEYDEF *keydef)
{
keydef->keysegs = (uint) *ptr++;
keydef->key_alg = *ptr++; /* Rtree or Btree */
keydef->flag = mi_uint2korr(ptr); ptr +=2;
keydef->block_length = mi_uint2korr(ptr); ptr +=2;
keydef->keylength = mi_uint2korr(ptr); ptr +=2;
keydef->minlength = mi_uint2korr(ptr); ptr +=2;
keydef->maxlength = mi_uint2korr(ptr); ptr +=2;
keydef->block_size_index= keydef->block_length/MI_MIN_KEY_BLOCK_LENGTH-1;
keydef->underflow_block_length=keydef->block_length/3;
keydef->version = 0; /* Not saved */
keydef->parser = &ft_default_parser;
keydef->ftkey_nr = 0;
return ptr;
} | O0 | c | mi_keydef_read:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movzbl (%rax), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0xc(%rax)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0xa(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0xe(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x12(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x14(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x16(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xe(%rax), %eax
movl $0x400, %ecx # imm = 0x400
cltd
idivl %ecx
subl $0x1, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x18(%rax)
movq -0x10(%rbp), %rax
movzwl 0xe(%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x10(%rbp), %rax
leaq 0x2083ab(%rip), %rcx # 0x2be180
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
| mi_keydef_read:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movzx eax, byte ptr [rax]
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+8], cx
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov [rax+0Ch], cl
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+0Ah], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+0Eh], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+12h], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+14h], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+16h], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+0Eh]
mov ecx, 400h
cdq
idiv ecx
sub eax, 1
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+18h], cx
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+0Eh]
mov ecx, 3
cdq
idiv ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+10h], cx
mov rax, [rbp+var_10]
mov dword ptr [rax+1Ch], 0
mov rax, [rbp+var_10]
lea rcx, ft_default_parser
mov [rax+38h], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+20h], 0
mov rax, [rbp+var_8]
pop rbp
retn
| unsigned __int8 * mi_keydef_read(unsigned __int8 *a1, long long a2)
{
*(_WORD *)(a2 + 8) = *a1;
*(_BYTE *)(a2 + 12) = a1[1];
*(_WORD *)(a2 + 10) = _byteswap_ushort(*((_WORD *)a1 + 1));
*(_WORD *)(a2 + 14) = _byteswap_ushort(*((_WORD *)a1 + 2));
*(_WORD *)(a2 + 18) = _byteswap_ushort(*((_WORD *)a1 + 3));
*(_WORD *)(a2 + 20) = _byteswap_ushort(*((_WORD *)a1 + 4));
*(_WORD *)(a2 + 22) = _byteswap_ushort(*((_WORD *)a1 + 5));
*(_WORD *)(a2 + 24) = *(unsigned __int16 *)(a2 + 14) / 1024 - 1;
*(_WORD *)(a2 + 16) = *(unsigned __int16 *)(a2 + 14) / 3;
*(_DWORD *)(a2 + 28) = 0;
*(_QWORD *)(a2 + 56) = &ft_default_parser;
*(_DWORD *)(a2 + 32) = 0;
return a1 + 12;
}
| mi_keydef_read:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVZX EAX,byte ptr [RAX]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x8],CX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xc],CL
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0xa],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0xe],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x12],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x14],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x16],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0xe]
MOV ECX,0x400
CDQ
IDIV ECX
SUB EAX,0x1
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x18],CX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0xe]
MOV ECX,0x3
CDQ
IDIV ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x10],CX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1c],0x0
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x3be180]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x20],0x0
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
int1 [16] mi_keydef_read(byte *param_1,long param_2)
{
int1 auVar1 [16];
*(ushort *)(param_2 + 8) = (ushort)*param_1;
*(byte *)(param_2 + 0xc) = param_1[1];
*(ushort *)(param_2 + 10) = CONCAT11(param_1[2],param_1[3]);
*(ushort *)(param_2 + 0xe) = CONCAT11(param_1[4],param_1[5]);
*(ushort *)(param_2 + 0x12) = CONCAT11(param_1[6],param_1[7]);
*(ushort *)(param_2 + 0x14) = CONCAT11(param_1[8],param_1[9]);
*(ushort *)(param_2 + 0x16) = CONCAT11(param_1[10],param_1[0xb]);
auVar1._0_8_ = param_1 + 0xc;
*(ushort *)(param_2 + 0x18) = *(ushort *)(param_2 + 0xe) / 0x400 - 1;
*(ushort *)(param_2 + 0x10) = *(ushort *)(param_2 + 0xe) / 3;
*(int4 *)(param_2 + 0x1c) = 0;
*(int1 **)(param_2 + 0x38) = ft_default_parser;
*(int4 *)(param_2 + 0x20) = 0;
auVar1._8_8_ = (ulong)*(ushort *)(param_2 + 0xe) % 3;
return auVar1;
}
|
|
5,694 | link_into_queue | eloqsql/mysys/mf_keycache.c | static void link_into_queue(KEYCACHE_WQUEUE *wqueue,
struct st_my_thread_var *thread)
{
struct st_my_thread_var *last;
DBUG_ASSERT(!thread->next && !thread->prev);
if (! (last= wqueue->last_thread))
{
/* Queue is empty */
thread->next= thread;
thread->prev= &thread->next;
}
else
{
DBUG_ASSERT(last->next->prev == &last->next);
/* Add backlink to previous element */
thread->prev= last->next->prev;
/* Fix first in list to point backwords to current */
last->next->prev= &thread->next;
/* Next should point to the first element in list */
thread->next= last->next;
/* Fix old element to point to new one */
last->next= thread;
}
wqueue->last_thread= thread;
} | O0 | c | link_into_queue:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0xe528e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0xe52c6
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rcx
addq $0x88, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
jmp 0xe5329
jmp 0xe52c8
jmp 0xe52ca
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x90(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x10(%rbp), %rcx
addq $0x88, %rcx
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rax
movq %rcx, 0x90(%rax)
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
| link_into_queue:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_E528E:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_E52C6
mov rcx, [rbp+var_10]
mov rax, [rbp+var_10]
mov [rax+88h], rcx
mov rcx, [rbp+var_10]
add rcx, 88h
mov rax, [rbp+var_10]
mov [rax+90h], rcx
jmp short loc_E5329
loc_E52C6:
jmp short $+2
loc_E52C8:
jmp short $+2
loc_E52CA:
mov rax, [rbp+var_18]
mov rax, [rax+88h]
mov rcx, [rax+90h]
mov rax, [rbp+var_10]
mov [rax+90h], rcx
mov rcx, [rbp+var_10]
add rcx, 88h
mov rax, [rbp+var_18]
mov rax, [rax+88h]
mov [rax+90h], rcx
mov rax, [rbp+var_18]
mov rcx, [rax+88h]
mov rax, [rbp+var_10]
mov [rax+88h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_18]
mov [rax+88h], rcx
loc_E5329:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax], rcx
pop rbp
retn
| _QWORD * link_into_queue(_QWORD *a1, long long a2)
{
_QWORD *result; // rax
long long v3; // [rsp+0h] [rbp-18h]
v3 = *a1;
if ( *a1 )
{
*(_QWORD *)(a2 + 144) = *(_QWORD *)(*(_QWORD *)(v3 + 136) + 144LL);
*(_QWORD *)(*(_QWORD *)(v3 + 136) + 144LL) = a2 + 136;
*(_QWORD *)(a2 + 136) = *(_QWORD *)(v3 + 136);
*(_QWORD *)(v3 + 136) = a2;
}
else
{
*(_QWORD *)(a2 + 136) = a2;
*(_QWORD *)(a2 + 144) = a2 + 136;
}
result = a1;
*a1 = a2;
return result;
}
| link_into_queue:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x001e528e
LAB_001e528e:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x001e52c6
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x88],RCX
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x88
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x90],RCX
JMP 0x001e5329
LAB_001e52c6:
JMP 0x001e52c8
LAB_001e52c8:
JMP 0x001e52ca
LAB_001e52ca:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x88]
MOV RCX,qword ptr [RAX + 0x90]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x90],RCX
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x88
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x88]
MOV qword ptr [RAX + 0x90],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x88]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x88],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x88],RCX
LAB_001e5329:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
POP RBP
RET
|
void link_into_queue(long *param_1,long param_2)
{
long lVar1;
lVar1 = *param_1;
if (lVar1 == 0) {
*(long *)(param_2 + 0x88) = param_2;
*(long *)(param_2 + 0x90) = param_2 + 0x88;
}
else {
*(int8 *)(param_2 + 0x90) = *(int8 *)(*(long *)(lVar1 + 0x88) + 0x90);
*(long *)(*(long *)(lVar1 + 0x88) + 0x90) = param_2 + 0x88;
*(int8 *)(param_2 + 0x88) = *(int8 *)(lVar1 + 0x88);
*(long *)(lVar1 + 0x88) = param_2;
}
*param_1 = param_2;
return;
}
|
|
5,695 | js_async_generator_await | bluesky950520[P]quickjs/quickjs.c | static int js_async_generator_await(JSContext *ctx,
JSAsyncGeneratorData *s,
JSValue value)
{
JSValue promise, resolving_funcs[2], resolving_funcs1[2];
int i, res;
promise = js_promise_resolve(ctx, ctx->promise_ctor,
1, &value, 0);
if (JS_IsException(promise))
goto fail;
if (js_async_generator_resolve_function_create(ctx, JS_MKPTR(JS_TAG_OBJECT, s->generator),
resolving_funcs, FALSE)) {
JS_FreeValue(ctx, promise);
goto fail;
}
/* Note: no need to create 'thrownawayCapability' as in
the spec */
for(i = 0; i < 2; i++)
resolving_funcs1[i] = JS_UNDEFINED;
res = perform_promise_then(ctx, promise,
resolving_funcs,
resolving_funcs1);
JS_FreeValue(ctx, promise);
for(i = 0; i < 2; i++)
JS_FreeValue(ctx, resolving_funcs[i]);
if (res)
goto fail;
return 0;
fail:
return -1;
} | O0 | c | js_async_generator_await:
subq $0xb8, %rsp
movq %rdx, 0xa0(%rsp)
movq %rcx, 0xa8(%rsp)
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq 0x98(%rsp), %rdi
movq 0x98(%rsp), %rax
movq 0x88(%rax), %rsi
movq 0x90(%rax), %rdx
movl $0x1, %ecx
leaq 0xa0(%rsp), %r8
xorl %r9d, %r9d
callq 0x92af0
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x9756d
jmp 0x976ba
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq $-0x1, 0x20(%rsp)
leaq 0x60(%rsp), %rcx
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
xorl %r8d, %r8d
callq 0x97810
cmpl $0x0, %eax
je 0x975cc
movq 0x98(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0x23c90
jmp 0x976ba
movl $0x0, 0x3c(%rsp)
cmpl $0x2, 0x3c(%rsp)
jge 0x9761b
movslq 0x3c(%rsp), %rcx
leaq 0x40(%rsp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rsp)
movq $0x3, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x975d4
movq 0x98(%rsp), %rdi
leaq 0x60(%rsp), %rcx
leaq 0x40(%rsp), %r8
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0x74a60
movl %eax, 0x38(%rsp)
movq 0x98(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0x23c90
movl $0x0, 0x3c(%rsp)
cmpl $0x2, 0x3c(%rsp)
jge 0x976a4
movq 0x98(%rsp), %rdi
movslq 0x3c(%rsp), %rcx
leaq 0x60(%rsp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x23c90
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x9766b
cmpl $0x0, 0x38(%rsp)
je 0x976ad
jmp 0x976ba
movl $0x0, 0xb4(%rsp)
jmp 0x976c5
movl $0xffffffff, 0xb4(%rsp) # imm = 0xFFFFFFFF
movl 0xb4(%rsp), %eax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
| js_async_generator_await:
sub rsp, 0B8h
mov [rsp+0B8h+var_18], rdx
mov [rsp+0B8h+var_10], rcx
mov [rsp+0B8h+var_20], rdi
mov [rsp+0B8h+var_28], rsi
mov rdi, [rsp+0B8h+var_20]
mov rax, [rsp+0B8h+var_20]
mov rsi, [rax+88h]
mov rdx, [rax+90h]
mov ecx, 1
lea r8, [rsp+0B8h+var_18]
xor r9d, r9d
call js_promise_resolve
mov [rsp+0B8h+var_90], rax
mov [rsp+0B8h+var_88], rdx
mov rax, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_38], rax
mov rax, [rsp+0B8h+var_88]
mov [rsp+0B8h+var_30], rax
mov rdi, [rsp+0B8h+var_38]
mov rsi, [rsp+0B8h+var_30]
call JS_IsException_1
cmp eax, 0
jz short loc_9756D
jmp loc_976BA
loc_9756D:
mov rdi, [rsp+0B8h+var_20]
mov rax, [rsp+0B8h+var_28]
mov rax, [rax]
mov [rsp+0B8h+var_A0], rax
mov [rsp+0B8h+var_98], 0FFFFFFFFFFFFFFFFh
lea rcx, [rsp+0B8h+var_58]
mov rsi, [rsp+0B8h+var_A0]
mov rdx, [rsp+0B8h+var_98]
xor r8d, r8d
call js_async_generator_resolve_function_create
cmp eax, 0
jz short loc_975CC
mov rdi, [rsp+0B8h+var_20]
mov rsi, [rsp+0B8h+var_38]
mov rdx, [rsp+0B8h+var_30]
call JS_FreeValue
jmp loc_976BA
loc_975CC:
mov [rsp+0B8h+var_7C], 0
loc_975D4:
cmp [rsp+0B8h+var_7C], 2
jge short loc_9761B
movsxd rcx, [rsp+0B8h+var_7C]
lea rax, [rsp+0B8h+var_78]
shl rcx, 4
add rax, rcx
mov dword ptr [rsp+0B8h+var_B0], 0
mov [rsp+0B8h+var_A8], 3
mov rcx, [rsp+0B8h+var_B0]
mov [rax], rcx
mov rcx, [rsp+0B8h+var_A8]
mov [rax+8], rcx
mov eax, [rsp+0B8h+var_7C]
add eax, 1
mov [rsp+0B8h+var_7C], eax
jmp short loc_975D4
loc_9761B:
mov rdi, [rsp+0B8h+var_20]
lea rcx, [rsp+0B8h+var_58]
lea r8, [rsp+0B8h+var_78]
mov rsi, [rsp+0B8h+var_38]
mov rdx, [rsp+0B8h+var_30]
call perform_promise_then
mov [rsp+0B8h+var_80], eax
mov rdi, [rsp+0B8h+var_20]
mov rsi, [rsp+0B8h+var_38]
mov rdx, [rsp+0B8h+var_30]
call JS_FreeValue
mov [rsp+0B8h+var_7C], 0
loc_9766B:
cmp [rsp+0B8h+var_7C], 2
jge short loc_976A4
mov rdi, [rsp+0B8h+var_20]
movsxd rcx, [rsp+0B8h+var_7C]
lea rax, [rsp+0B8h+var_58]
shl rcx, 4
add rax, rcx
mov rsi, [rax]
mov rdx, [rax+8]
call JS_FreeValue
mov eax, [rsp+0B8h+var_7C]
add eax, 1
mov [rsp+0B8h+var_7C], eax
jmp short loc_9766B
loc_976A4:
cmp [rsp+0B8h+var_80], 0
jz short loc_976AD
jmp short loc_976BA
loc_976AD:
mov [rsp+0B8h+var_4], 0
jmp short loc_976C5
loc_976BA:
mov [rsp+0B8h+var_4], 0FFFFFFFFh
loc_976C5:
mov eax, [rsp+0B8h+var_4]
add rsp, 0B8h
retn
| long long js_async_generator_await(
long long a1,
_QWORD *a2,
long long a3,
long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
_QWORD *v13; // rax
long long v15; // [rsp+8h] [rbp-B0h]
int v16; // [rsp+38h] [rbp-80h]
int i; // [rsp+3Ch] [rbp-7Ch]
int j; // [rsp+3Ch] [rbp-7Ch]
_OWORD v19[2]; // [rsp+40h] [rbp-78h] BYREF
_QWORD v20[4]; // [rsp+60h] [rbp-58h] BYREF
long long v21; // [rsp+80h] [rbp-38h]
long long v22; // [rsp+88h] [rbp-30h]
_QWORD *v23; // [rsp+90h] [rbp-28h]
long long v24; // [rsp+98h] [rbp-20h]
long long v25[2]; // [rsp+A0h] [rbp-18h] BYREF
v25[0] = a3;
v25[1] = a4;
v24 = a1;
v23 = a2;
v21 = js_promise_resolve(
a1,
*(_DWORD **)(a1 + 136),
*(_QWORD *)(a1 + 144),
1,
v25,
0,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12);
v22 = v12;
if ( JS_IsException_1(v21, v12) )
return (unsigned int)-1;
if ( (unsigned int)js_async_generator_resolve_function_create(v24, *v23, -1LL, v20, 0LL) )
{
JS_FreeValue(v24, v21, v22);
return (unsigned int)-1;
}
for ( i = 0; i < 2; ++i )
{
v13 = &v19[i];
LODWORD(v15) = 0;
*v13 = v15;
v13[1] = 3LL;
}
v16 = perform_promise_then(v24, v21, v22, (long long)v20, (long long)v19);
JS_FreeValue(v24, v21, v22);
for ( j = 0; j < 2; ++j )
JS_FreeValue(v24, v20[2 * j], v20[2 * j + 1]);
if ( v16 )
return (unsigned int)-1;
return 0;
}
| js_async_generator_await:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xa0],RDX
MOV qword ptr [RSP + 0xa8],RCX
MOV qword ptr [RSP + 0x98],RDI
MOV qword ptr [RSP + 0x90],RSI
MOV RDI,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RAX + 0x88]
MOV RDX,qword ptr [RAX + 0x90]
MOV ECX,0x1
LEA R8,[RSP + 0xa0]
XOR R9D,R9D
CALL 0x00192af0
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x88]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x0019756d
JMP 0x001976ba
LAB_0019756d:
MOV RDI,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RSP + 0x90]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],-0x1
LEA RCX,[RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
XOR R8D,R8D
CALL 0x00197810
CMP EAX,0x0
JZ 0x001975cc
MOV RDI,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
CALL 0x00123c90
JMP 0x001976ba
LAB_001975cc:
MOV dword ptr [RSP + 0x3c],0x0
LAB_001975d4:
CMP dword ptr [RSP + 0x3c],0x2
JGE 0x0019761b
MOVSXD RCX,dword ptr [RSP + 0x3c]
LEA RAX,[RSP + 0x40]
SHL RCX,0x4
ADD RAX,RCX
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x3
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RSP + 0x3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x001975d4
LAB_0019761b:
MOV RDI,qword ptr [RSP + 0x98]
LEA RCX,[RSP + 0x60]
LEA R8,[RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
CALL 0x00174a60
MOV dword ptr [RSP + 0x38],EAX
MOV RDI,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
CALL 0x00123c90
MOV dword ptr [RSP + 0x3c],0x0
LAB_0019766b:
CMP dword ptr [RSP + 0x3c],0x2
JGE 0x001976a4
MOV RDI,qword ptr [RSP + 0x98]
MOVSXD RCX,dword ptr [RSP + 0x3c]
LEA RAX,[RSP + 0x60]
SHL RCX,0x4
ADD RAX,RCX
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00123c90
MOV EAX,dword ptr [RSP + 0x3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x0019766b
LAB_001976a4:
CMP dword ptr [RSP + 0x38],0x0
JZ 0x001976ad
JMP 0x001976ba
LAB_001976ad:
MOV dword ptr [RSP + 0xb4],0x0
JMP 0x001976c5
LAB_001976ba:
MOV dword ptr [RSP + 0xb4],0xffffffff
LAB_001976c5:
MOV EAX,dword ptr [RSP + 0xb4]
ADD RSP,0xb8
RET
|
int4
js_async_generator_await(long param_1,int8 *param_2,int8 param_3,int8 param_4)
{
int iVar1;
uint uStack_ac;
int local_7c;
long local_78 [4];
long local_58;
int8 auStack_50 [3];
int1 local_38 [16];
int8 *local_28;
long local_20;
int8 local_18;
int8 local_10;
local_28 = param_2;
local_20 = param_1;
local_18 = param_3;
local_10 = param_4;
local_38 = js_promise_resolve(param_1,*(int8 *)(param_1 + 0x88),
*(int8 *)(param_1 + 0x90),1,&local_18,0);
iVar1 = JS_IsException(local_38._0_8_,local_38._8_8_);
if (iVar1 == 0) {
iVar1 = js_async_generator_resolve_function_create
(local_20,*local_28,0xffffffffffffffff,local_78 + 4,0);
if (iVar1 == 0) {
for (local_7c = 0; local_7c < 2; local_7c = local_7c + 1) {
local_78[(long)local_7c * 2] = (ulong)uStack_ac << 0x20;
local_78[(long)local_7c * 2 + 1] = 3;
}
iVar1 = perform_promise_then(local_20,local_38._0_8_,local_38._8_8_,local_78 + 4,local_78);
JS_FreeValue(local_20,local_38._0_8_,local_38._8_8_);
for (local_7c = 0; local_7c < 2; local_7c = local_7c + 1) {
JS_FreeValue(local_20,local_78[(long)local_7c * 2 + 4],
*(int8 *)(local_38 + (long)local_7c * 0x10 + -0x18));
}
if (iVar1 == 0) {
return 0;
}
}
else {
JS_FreeValue(local_20,local_38._0_8_,local_38._8_8_);
}
}
return 0xffffffff;
}
|
|
5,696 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&) | monkey531[P]llama/common/json.hpp | inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
} | O1 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x1d4f0
addq 0x8(%r14), %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1e360
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1e860
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x1d310
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0xdc907
movq (%r12), %rsi
incq %rsi
callq 0x1dc40
movq %r14, %rdi
callq 0x1e650
| _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA39_KcS8_EEET_DpOT0_:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
add rax, [r14+8]
mov rdi, rbx
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_DC907
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DC907:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[39],std::string>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = strlen(a2);
std::string::reserve(a1, a3[1] + v4);
std::string::append(a1, a2);
std::string::_M_append(a1, *a3, a3[1]);
return a1;
}
| concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
CALL 0x0011d4f0
ADD RAX,qword ptr [R14 + 0x8]
LAB_001dc8bc:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011e360
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011e860
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x0011d310
LAB_001dc8e1:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [39], std::__cxx11::string >(char const (&) [39], std::__cxx11::string&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string>
(detail *this,char *param_1,string *param_2)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
strlen(param_1);
/* try { // try from 001dc8bc to 001dc8e0 has its CatchHandler @ 001dc8f0 */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::_M_append((char *)this,*(ulong *)param_2);
return this;
}
|
|
5,697 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&) | monkey531[P]llama/common/json.hpp | inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
} | O2 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x9a2c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x27380
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x9a2e7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x27998
movq %r14, %rdi
callq 0x27660
| _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA13_KcS8_RA17_S9_EEET_DpOT0_:
push r15
push r14
push r12
push rbx
push rax
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
and qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
mov rsi, rdx
mov rdx, rcx
call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA17_cEEEmPKcDpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char [17]>(char const*,std::string,char [17] const&)
mov rdi, rbx
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA13_KcJS8_RA17_S9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[13],std::string,char const(&)[17]>(
long long a1,
long long a2,
long long a3,
long long a4)
{
long long v6; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v6 = nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char [17]>(a2, a3, a4);
std::string::reserve(a1, v6);
ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA13_KcJS8_RA17_S9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_(
a1,
a2,
a3,
a4);
return a1;
}
| concat<std::__cxx11::string,char_const(&)[13],std::__cxx11::string,char_const(&)[17]>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_0019a1f5:
MOV RDI,RSI
MOV RSI,RDX
MOV RDX,RCX
CALL 0x0019a2c0
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00127380
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
CALL 0x0019a2e7
LAB_0019a21f:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [13], std::__cxx11::string, char const (&) [17]>(char const (&) [13], std::__cxx11::string&&,
char const (&) [17]) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[13],std::__cxx11::string,char_const(&)[17]>
(detail *this,char *param_1,string *param_2,char *param_3)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
/* try { // try from 0019a1f5 to 0019a21e has its CatchHandler @ 0019a22e */
concat_length<std::__cxx11::string,char[17]>(param_1,param_2,param_3);
std::__cxx11::string::reserve((ulong)this);
_ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA13_KcJS8_RA17_S9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_
(this,param_1,param_2,param_3);
return this;
}
|
|
5,698 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&) | monkey531[P]llama/common/json.hpp | inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
} | O3 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x1d4f0
movq %rax, %r12
movq (%r14), %rdi
callq 0x1d4f0
addq %rax, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1e370
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1e870
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x1e870
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0xcf09a
movq (%r13), %rsi
incq %rsi
callq 0x1dc50
movq %r14, %rdi
callq 0x1e660
| _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcPS9_EEET_DpOT0_:
push r15
push r14
push r13
push r12
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r13, [rdi+10h]
mov [rdi], r13
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
mov r12, rax
mov rdi, [r14]
call _strlen
add r12, rax
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r14]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_CF09A
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF09A:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // r12
long long v5; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = strlen(a2);
v5 = strlen(*a3);
std::string::reserve(a1, v5 + v4);
std::string::append(a1, a2);
std::string::append(a1, *a3);
return a1;
}
| concat<std::__cxx11::string,char_const(&)[26],char_const*>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R13,[RDI + 0x10]
MOV qword ptr [RDI],R13
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
CALL 0x0011d4f0
MOV R12,RAX
MOV RDI,qword ptr [R14]
CALL 0x0011d4f0
ADD R12,RAX
LAB_001cf055:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0011e370
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011e870
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x0011e870
LAB_001cf076:
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [26], char const*>(char const (&) [26], char const*&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[26],char_const*>
(detail *this,char *param_1,char **param_2)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
strlen(param_1);
strlen(*param_2);
/* try { // try from 001cf055 to 001cf075 has its CatchHandler @ 001cf083 */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::append((char *)this);
return this;
}
|
|
5,699 | inline_mysql_cond_init | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_init(
#ifdef HAVE_PSI_COND_INTERFACE
PSI_cond_key key,
#endif
mysql_cond_t *that,
const pthread_condattr_t *attr)
{
#ifdef HAVE_PSI_COND_INTERFACE
that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond);
#else
that->m_psi= NULL;
#endif
return pthread_cond_init(&that->m_cond, attr);
} | O0 | c | inline_mysql_cond_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1ba066(%rip), %rax # 0x217310
movq (%rax), %rax
movq 0x60(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x263f0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| inline_mysql_cond_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+60h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+30h], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_cond_init
add rsp, 20h
pop rbp
retn
| long long inline_mysql_cond_init(unsigned int a1, long long a2, long long a3)
{
*(_QWORD *)(a2 + 48) = ((long long ( *)(_QWORD, long long))PSI_server[12])(a1, a2);
return pthread_cond_init(a2, a3);
}
| inline_mysql_cond_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x317310]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x60]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001263f0
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3)
{
longlong lVar1;
lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2);
param_2[1].__align = lVar1;
pthread_cond_init(param_2,param_3);
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.