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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
48,800 | strlength | eloqsql/mysys/mf_format.c | size_t strlength(const char *str)
{
reg1 const char * pos;
reg2 const char * found;
DBUG_ENTER("strlength");
pos= found= str;
while (*pos)
{
if (*pos != ' ')
{
while (*++pos && *pos != ' ') {};
if (!*pos)
{
found=pos; /* String ends here */
break;
}
}
found=pos;
while (*++pos == ' ') {};
}
DBUG_RETURN((size_t) (found - str));
} | O3 | c | strlength:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %dl
movq %rdi, %rax
movq %rdi, %rcx
cmpb $0x20, %dl
je 0x96c35
movzbl %dl, %edx
testl %edx, %edx
je 0x96c4e
movzbl 0x1(%rcx), %eax
incq %rcx
testl %eax, %eax
je 0x96c4b
cmpl $0x20, %eax
jne 0x96c25
movq %rcx, %rsi
movb 0x1(%rsi), %dl
incq %rsi
cmpb $0x20, %dl
je 0x96c38
movq %rcx, %rax
movq %rsi, %rcx
jmp 0x96c19
movq %rcx, %rax
subq %rdi, %rax
popq %rbp
retq
nop
| strlength:
push rbp
mov rbp, rsp
mov dl, [rdi]
mov rax, rdi
mov rcx, rdi
loc_96C19:
cmp dl, 20h ; ' '
jz short loc_96C35
movzx edx, dl
test edx, edx
jz short loc_96C4E
loc_96C25:
movzx eax, byte ptr [rcx+1]
inc rcx
test eax, eax
jz short loc_96C4B
cmp eax, 20h ; ' '
jnz short loc_96C25
loc_96C35:
mov rsi, rcx
loc_96C38:
mov dl, [rsi+1]
inc rsi
cmp dl, 20h ; ' '
jz short loc_96C38
mov rax, rcx
mov rcx, rsi
jmp short loc_96C19
loc_96C4B:
mov rax, rcx
loc_96C4E:
sub rax, rdi
pop rbp
retn
| long long strlength(_BYTE *a1)
{
char v1; // dl
_BYTE *v2; // rax
_BYTE *v3; // rcx
int v4; // eax
_BYTE *v5; // rsi
v1 = *a1;
v2 = a1;
v3 = a1;
while ( v1 == 32 )
{
LABEL_6:
v5 = v3;
do
v1 = *++v5;
while ( v1 == 32 );
v2 = v3;
v3 = v5;
}
if ( v1 )
{
while ( 1 )
{
v4 = (unsigned __int8)*++v3;
if ( !v4 )
break;
if ( v4 == 32 )
goto LABEL_6;
}
v2 = v3;
}
return v2 - a1;
}
| strlength:
PUSH RBP
MOV RBP,RSP
MOV DL,byte ptr [RDI]
MOV RAX,RDI
MOV RCX,RDI
LAB_00196c19:
CMP DL,0x20
JZ 0x00196c35
MOVZX EDX,DL
TEST EDX,EDX
JZ 0x00196c4e
LAB_00196c25:
MOVZX EAX,byte ptr [RCX + 0x1]
INC RCX
TEST EAX,EAX
JZ 0x00196c4b
CMP EAX,0x20
JNZ 0x00196c25
LAB_00196c35:
MOV RSI,RCX
LAB_00196c38:
MOV DL,byte ptr [RSI + 0x1]
INC RSI
CMP DL,0x20
JZ 0x00196c38
MOV RAX,RCX
MOV RCX,RSI
JMP 0x00196c19
LAB_00196c4b:
MOV RAX,RCX
LAB_00196c4e:
SUB RAX,RDI
POP RBP
RET
|
long strlength(char *param_1)
{
char *pcVar1;
char *pcVar2;
char *pcVar3;
char cVar4;
char *pcVar5;
cVar4 = *param_1;
pcVar3 = param_1;
pcVar5 = param_1;
do {
pcVar2 = pcVar5;
if (cVar4 != ' ') {
if (cVar4 == '\0') {
LAB_00196c4e:
return (long)pcVar3 - (long)param_1;
}
do {
pcVar1 = pcVar5 + 1;
pcVar3 = pcVar5 + 1;
if (*pcVar1 == '\0') goto LAB_00196c4e;
pcVar5 = pcVar3;
pcVar2 = pcVar3;
} while (*pcVar1 != ' ');
}
do {
pcVar3 = pcVar2;
cVar4 = pcVar5[1];
pcVar5 = pcVar5 + 1;
pcVar2 = pcVar3;
} while (cVar4 == ' ');
} while( true );
}
| |
48,801 | js_global_unescape | bluesky950520[P]quickjs/quickjs.c | static JSValue js_global_unescape(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str;
StringBuffer b_s, *b = &b_s;
JSString *p;
int i, len, c, n;
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return str;
string_buffer_init(ctx, b, 0);
p = JS_VALUE_GET_STRING(str);
for (i = 0, len = p->len; i < len; i++) {
c = string_get(p, i);
if (c == '%') {
if (i + 6 <= len
&& string_get(p, i + 1) == 'u'
&& (n = string_get_hex(p, i + 2, 4)) >= 0) {
c = n;
i += 6 - 1;
} else
if (i + 3 <= len
&& (n = string_get_hex(p, i + 1, 2)) >= 0) {
c = n;
i += 3 - 1;
}
}
string_buffer_putc16(b, c);
}
JS_FreeValue(ctx, str);
return string_buffer_end(b);
} | O1 | c | js_global_unescape:
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 0x79c98
movq %rdx, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rsp)
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x20b73
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x79ca7
movq (%rsp), %r15
movl $0x7fffffff, %r13d # imm = 0x7FFFFFFF
andl 0x4(%r15), %r13d
je 0x79c77
leal -0x6(%r13), %ebp
leal -0x3(%r13), %r14d
xorl %ebx, %ebx
leaq 0x18(%rsp), %r12
movq 0x4(%r15), %rcx
movslq %ebx, %rax
testl %ecx, %ecx
js 0x79bf5
movzbl 0x18(%r15,%rax), %esi
jmp 0x79bfb
movzwl 0x18(%r15,%rax,2), %esi
cmpl $0x25, %esi
jne 0x79c64
cmpl %ebp, %ebx
jg 0x79c36
testl %ecx, %ecx
js 0x79c10
movzbl 0x19(%r15,%rax), %eax
jmp 0x79c16
movzwl 0x1a(%r15,%rax,2), %eax
cmpl $0x75, %eax
jne 0x79c36
leal 0x2(%rbx), %esi
movq %r15, %rdi
movl $0x4, %edx
callq 0x79e0e
testl %eax, %eax
js 0x79c36
movl %eax, %esi
addl $0x5, %ebx
jmp 0x79c64
movl $0x25, %esi
cmpl %r14d, %ebx
jg 0x79c64
leal 0x1(%rbx), %esi
movq %r15, %rdi
movl $0x2, %edx
callq 0x79e0e
movl %eax, %esi
leal 0x2(%rbx), %eax
testl %esi, %esi
cmovsl %ebx, %eax
movl $0x25, %ecx
cmovsl %ecx, %esi
movl %eax, %ebx
movq %r12, %rdi
callq 0x477df
incl %ebx
cmpl %r13d, %ebx
jl 0x79be2
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rsp), %rdx
callq 0x1d8c6
leaq 0x18(%rsp), %rdi
callq 0x33444
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x2c(%rsp)
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x79bbf
| js_global_unescape:
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_79C98
mov [rsp+68h+var_58], rdx
mov [rsp+68h+var_50], rbx
xorps xmm0, xmm0
movups [rsp+68h+var_40], xmm0
mov [rsp+68h+var_60], rbx
mov rdi, rbx
xor esi, esi
xor edx, edx
call js_alloc_string
mov [rsp+68h+var_48], rax
test rax, rax
jz loc_79CA7
loc_79BBF:
mov r15, [rsp+68h+var_68]
mov r13d, 7FFFFFFFh
and r13d, [r15+4]
jz loc_79C77
lea ebp, [r13-6]
lea r14d, [r13-3]
xor ebx, ebx
lea r12, [rsp+68h+var_50]
loc_79BE2:
mov rcx, [r15+4]
movsxd rax, ebx
test ecx, ecx
js short loc_79BF5
movzx esi, byte ptr [r15+rax+18h]
jmp short loc_79BFB
loc_79BF5:
movzx esi, word ptr [r15+rax*2+18h]
loc_79BFB:
cmp esi, 25h ; '%'
jnz short loc_79C64
cmp ebx, ebp
jg short loc_79C36
test ecx, ecx
js short loc_79C10
movzx eax, byte ptr [r15+rax+19h]
jmp short loc_79C16
loc_79C10:
movzx eax, word ptr [r15+rax*2+1Ah]
loc_79C16:
cmp eax, 75h ; 'u'
jnz short loc_79C36
lea esi, [rbx+2]
mov rdi, r15
mov edx, 4
call string_get_hex
test eax, eax
js short loc_79C36
mov esi, eax
add ebx, 5
jmp short loc_79C64
loc_79C36:
mov esi, 25h ; '%'
cmp ebx, r14d
jg short loc_79C64
lea esi, [rbx+1]
mov rdi, r15
mov edx, 2
call string_get_hex
mov esi, eax
lea eax, [rbx+2]
test esi, esi
cmovs eax, ebx
mov ecx, 25h ; '%'
cmovs esi, ecx
mov ebx, eax
loc_79C64:
mov rdi, r12
call string_buffer_putc16
inc ebx
cmp ebx, r13d
jl loc_79BE2
loc_79C77:
mov rsi, [rsp+68h+var_68]
mov rax, [rsp+68h+var_60]
mov rdi, [rax+18h]
mov rdx, [rsp+68h+var_58]
call JS_FreeValueRT
lea rdi, [rsp+68h+var_50]
call string_buffer_end
loc_79C98:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_79CA7:
mov dword ptr [rsp+68h+var_40+4], 0
mov dword ptr [rsp+68h+var_40+0Ch], 0FFFFFFFFh
jmp loc_79BBF
| _DWORD * js_global_unescape(
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
int v16; // r13d
int i; // ebx
long long v18; // rcx
signed int hex; // esi
int v20; // eax
int v21; // eax
int v22; // eax
_DWORD *v23; // [rsp+0h] [rbp-68h]
long long v24; // [rsp+10h] [rbp-58h]
long long v25; // [rsp+18h] [rbp-50h] BYREF
__int128 v27; // [rsp+28h] [rbp-40h]
result = (_DWORD *)JS_ToStringInternal(a1, *a13, a13[1], 0, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9);
v23 = result;
if ( (_DWORD)v15 != 6 )
{
v24 = v15;
v25 = a1;
v27 = 0LL;
if ( !js_alloc_string(a1, 0LL, 0) )
{
DWORD1(v27) = 0;
HIDWORD(v27) = -1;
}
v16 = v23[1] & 0x7FFFFFFF;
if ( v16 )
{
for ( i = 0; i < v16; ++i )
{
v18 = *(_QWORD *)(v23 + 1);
if ( (int)v18 < 0 )
hex = *((unsigned __int16 *)v23 + i + 12);
else
hex = *((unsigned __int8 *)v23 + i + 24);
if ( hex == 37 )
{
if ( i <= v16 - 6
&& ((int)v18 < 0 ? (v20 = *((unsigned __int16 *)v23 + i + 13)) : (v20 = *((unsigned __int8 *)v23 + i + 25)),
v20 == 117 && (v21 = string_get_hex(v23, (unsigned int)(i + 2), 4LL), v21 >= 0)) )
{
hex = v21;
i += 5;
}
else
{
hex = 37;
if ( i <= v16 - 3 )
{
hex = string_get_hex(v23, (unsigned int)(i + 1), 2LL);
v22 = i + 2;
if ( hex < 0 )
{
v22 = i;
hex = 37;
}
i = v22;
}
}
}
string_buffer_putc16((long long)&v25, hex);
}
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v23, v24);
return string_buffer_end((long long)&v25);
}
return result;
}
| |||
48,802 | js_global_unescape | bluesky950520[P]quickjs/quickjs.c | static JSValue js_global_unescape(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str;
StringBuffer b_s, *b = &b_s;
JSString *p;
int i, len, c, n;
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return str;
string_buffer_init(ctx, b, 0);
p = JS_VALUE_GET_STRING(str);
for (i = 0, len = p->len; i < len; i++) {
c = string_get(p, i);
if (c == '%') {
if (i + 6 <= len
&& string_get(p, i + 1) == 'u'
&& (n = string_get_hex(p, i + 2, 4)) >= 0) {
c = n;
i += 6 - 1;
} else
if (i + 3 <= len
&& (n = string_get_hex(p, i + 1, 2)) >= 0) {
c = n;
i += 3 - 1;
}
}
string_buffer_putc16(b, c);
}
JS_FreeValue(ctx, str);
return string_buffer_end(b);
} | O2 | c | js_global_unescape:
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
callq 0x1b03c
movq %rax, %rbx
cmpl $0x6, %edx
je 0x66571
movq %rdx, 0x10(%rsp)
leaq 0x18(%rsp), %r12
xorl %r13d, %r13d
movq %r14, 0x8(%rsp)
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x2e042
movl $0x7fffffff, %ebp # imm = 0x7FFFFFFF
andl 0x4(%rbx), %ebp
leal -0x6(%rbp), %r15d
leal -0x3(%rbp), %r14d
cmpl %ebp, %r13d
jge 0x66552
movq 0x4(%rbx), %rcx
movslq %r13d, %rax
testl %ecx, %ecx
js 0x664d5
movzbl 0x18(%rbx,%rax), %esi
jmp 0x664da
movzwl 0x18(%rbx,%rax,2), %esi
cmpl $0x25, %esi
jne 0x66542
cmpl %r15d, %r13d
jg 0x66514
testl %ecx, %ecx
js 0x664ef
movzbl 0x19(%rbx,%rax), %eax
jmp 0x664f4
movzwl 0x1a(%rbx,%rax,2), %eax
cmpl $0x75, %eax
jne 0x66514
leal 0x2(%r13), %esi
movq %rbx, %rdi
pushq $0x4
popq %rdx
callq 0x666c3
testl %eax, %eax
js 0x66514
movl %eax, %esi
addl $0x5, %r13d
jmp 0x66542
cmpl %r14d, %r13d
jle 0x6651e
pushq $0x25
popq %rsi
jmp 0x66542
leal 0x1(%r13), %esi
movq %rbx, %rdi
pushq $0x2
popq %rdx
callq 0x666c3
movl %eax, %esi
leal 0x2(%r13), %eax
testl %esi, %esi
cmovsl %r13d, %eax
pushq $0x25
popq %rcx
cmovsl %ecx, %esi
movl %eax, %r13d
movq %r12, %rdi
callq 0x3dcf6
incl %r13d
jmp 0x664ba
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq 0x10(%rsp), %rdx
callq 0x1801e
leaq 0x18(%rsp), %rdi
callq 0x2cad4
movq %rax, %rbx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_global_unescape:
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]
call JS_ToString
mov rbx, rax
cmp edx, 6
jz loc_66571
mov [rsp+68h+var_58], rdx
lea r12, [rsp+68h+var_50]
xor r13d, r13d
mov [rsp+68h+var_60], r14
mov rdi, r14
mov rsi, r12
xor edx, edx
call string_buffer_init
mov ebp, 7FFFFFFFh
and ebp, [rbx+4]
lea r15d, [rbp-6]
lea r14d, [rbp-3]
loc_664BA:
cmp r13d, ebp
jge loc_66552
mov rcx, [rbx+4]
movsxd rax, r13d
test ecx, ecx
js short loc_664D5
movzx esi, byte ptr [rbx+rax+18h]
jmp short loc_664DA
loc_664D5:
movzx esi, word ptr [rbx+rax*2+18h]
loc_664DA:
cmp esi, 25h ; '%'
jnz short loc_66542
cmp r13d, r15d
jg short loc_66514
test ecx, ecx
js short loc_664EF
movzx eax, byte ptr [rbx+rax+19h]
jmp short loc_664F4
loc_664EF:
movzx eax, word ptr [rbx+rax*2+1Ah]
loc_664F4:
cmp eax, 75h ; 'u'
jnz short loc_66514
lea esi, [r13+2]
mov rdi, rbx
push 4
pop rdx
call string_get_hex
test eax, eax
js short loc_66514
mov esi, eax
add r13d, 5
jmp short loc_66542
loc_66514:
cmp r13d, r14d
jle short loc_6651E
push 25h ; '%'
pop rsi
jmp short loc_66542
loc_6651E:
lea esi, [r13+1]
mov rdi, rbx
push 2
pop rdx
call string_get_hex
mov esi, eax
lea eax, [r13+2]
test esi, esi
cmovs eax, r13d
push 25h ; '%'
pop rcx
cmovs esi, ecx
mov r13d, eax
loc_66542:
mov rdi, r12
call string_buffer_putc16
inc r13d
jmp loc_664BA
loc_66552:
mov rdi, [rsp+68h+var_60]
mov rsi, rbx
mov rdx, [rsp+68h+var_58]
call JS_FreeValue
lea rdi, [rsp+68h+var_50]
call string_buffer_end
mov rbx, rax
loc_66571:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_global_unescape(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
long long v5; // rdx
long long v6; // rbx
int v7; // r13d
int v8; // ebp
long long v9; // rcx
signed int hex; // esi
int v11; // eax
int v12; // eax
int v13; // eax
long long v15; // [rsp+10h] [rbp-58h]
long long v16[10]; // [rsp+18h] [rbp-50h] BYREF
v6 = JS_ToString(a1, *a5, a5[1]);
if ( (_DWORD)v5 != 6 )
{
v15 = v5;
v7 = 0;
string_buffer_init(a1, (long long)v16, 0);
v8 = *(_DWORD *)(v6 + 4) & 0x7FFFFFFF;
while ( v7 < v8 )
{
v9 = *(_QWORD *)(v6 + 4);
if ( (int)v9 < 0 )
hex = *(unsigned __int16 *)(v6 + 2LL * v7 + 24);
else
hex = *(unsigned __int8 *)(v6 + v7 + 24);
if ( hex == 37 )
{
if ( v7 <= v8 - 6
&& ((int)v9 < 0
? (v11 = *(unsigned __int16 *)(v6 + 2LL * v7 + 26))
: (v11 = *(unsigned __int8 *)(v6 + v7 + 25)),
v11 == 117 && (v12 = string_get_hex(v6, (unsigned int)(v7 + 2), 4LL), v12 >= 0)) )
{
hex = v12;
v7 += 5;
}
else if ( v7 <= v8 - 3 )
{
hex = string_get_hex(v6, (unsigned int)(v7 + 1), 2LL);
v13 = v7 + 2;
if ( hex < 0 )
{
v13 = v7;
hex = 37;
}
v7 = v13;
}
else
{
hex = 37;
}
}
string_buffer_putc16((long long)v16, hex);
++v7;
}
JS_FreeValue(a1, v6, v15);
return string_buffer_end(v16);
}
return v6;
}
| js_global_unescape:
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]
CALL 0x0011b03c
MOV RBX,RAX
CMP EDX,0x6
JZ 0x00166571
MOV qword ptr [RSP + 0x10],RDX
LEA R12,[RSP + 0x18]
XOR R13D,R13D
MOV qword ptr [RSP + 0x8],R14
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
CALL 0x0012e042
MOV EBP,0x7fffffff
AND EBP,dword ptr [RBX + 0x4]
LEA R15D,[RBP + -0x6]
LEA R14D,[RBP + -0x3]
LAB_001664ba:
CMP R13D,EBP
JGE 0x00166552
MOV RCX,qword ptr [RBX + 0x4]
MOVSXD RAX,R13D
TEST ECX,ECX
JS 0x001664d5
MOVZX ESI,byte ptr [RBX + RAX*0x1 + 0x18]
JMP 0x001664da
LAB_001664d5:
MOVZX ESI,word ptr [RBX + RAX*0x2 + 0x18]
LAB_001664da:
CMP ESI,0x25
JNZ 0x00166542
CMP R13D,R15D
JG 0x00166514
TEST ECX,ECX
JS 0x001664ef
MOVZX EAX,byte ptr [RBX + RAX*0x1 + 0x19]
JMP 0x001664f4
LAB_001664ef:
MOVZX EAX,word ptr [RBX + RAX*0x2 + 0x1a]
LAB_001664f4:
CMP EAX,0x75
JNZ 0x00166514
LEA ESI,[R13 + 0x2]
MOV RDI,RBX
PUSH 0x4
POP RDX
CALL 0x001666c3
TEST EAX,EAX
JS 0x00166514
MOV ESI,EAX
ADD R13D,0x5
JMP 0x00166542
LAB_00166514:
CMP R13D,R14D
JLE 0x0016651e
PUSH 0x25
POP RSI
JMP 0x00166542
LAB_0016651e:
LEA ESI,[R13 + 0x1]
MOV RDI,RBX
PUSH 0x2
POP RDX
CALL 0x001666c3
MOV ESI,EAX
LEA EAX,[R13 + 0x2]
TEST ESI,ESI
CMOVS EAX,R13D
PUSH 0x25
POP RCX
CMOVS ESI,ECX
MOV R13D,EAX
LAB_00166542:
MOV RDI,R12
CALL 0x0013dcf6
INC R13D
JMP 0x001664ba
LAB_00166552:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RBX
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0011801e
LEA RDI,[RSP + 0x18]
CALL 0x0012cad4
MOV RBX,RAX
LAB_00166571:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long js_global_unescape(int8 param_1)
{
ushort uVar1;
uint uVar2;
long lVar3;
long lVar4;
int iVar5;
uint uVar6;
int8 *in_R8;
int iVar7;
int iVar8;
int1 auVar9 [16];
int1 local_50 [32];
auVar9 = JS_ToString(param_1,*in_R8,in_R8[1]);
lVar4 = auVar9._0_8_;
if (auVar9._8_4_ != 6) {
string_buffer_init(param_1,local_50,0);
uVar6 = *(uint *)(lVar4 + 4) & 0x7fffffff;
iVar8 = 0;
while (iVar8 < (int)uVar6) {
lVar3 = (long)iVar8;
iVar5 = (int)*(int8 *)(lVar4 + 4);
if (iVar5 < 0) {
uVar2 = (uint)*(ushort *)(lVar4 + 0x18 + lVar3 * 2);
}
else {
uVar2 = (uint)*(byte *)(lVar4 + 0x18 + lVar3);
}
iVar7 = iVar8;
if (uVar2 == 0x25) {
if (iVar8 <= (int)(uVar6 - 6)) {
if (iVar5 < 0) {
uVar1 = *(ushort *)(lVar4 + 0x1a + lVar3 * 2);
}
else {
uVar1 = (ushort)*(byte *)(lVar4 + 0x19 + lVar3);
}
if ((uVar1 == 0x75) && (uVar2 = string_get_hex(lVar4,iVar8 + 2,4), -1 < (int)uVar2)) {
iVar7 = iVar8 + 5;
goto LAB_00166542;
}
}
if ((int)(uVar6 - 3) < iVar8) {
uVar2 = 0x25;
}
else {
uVar2 = string_get_hex(lVar4,iVar8 + 1,2);
iVar7 = iVar8 + 2;
if ((int)uVar2 < 0) {
uVar2 = 0x25;
iVar7 = iVar8;
}
}
}
LAB_00166542:
string_buffer_putc16(local_50,uVar2);
iVar8 = iVar7 + 1;
}
JS_FreeValue(param_1,lVar4,auVar9._8_8_);
lVar4 = string_buffer_end(local_50);
}
return lVar4;
}
| |
48,803 | flush_log_for_bitmap | eloqsql/storage/maria/ma_bitmap.c | static my_bool
flush_log_for_bitmap(PAGECACHE_IO_HOOK_ARGS *args __attribute__ ((unused)))
{
#ifdef DBUG_ASSERT_EXISTS
const MARIA_SHARE *share= (MARIA_SHARE*)args->data;
#endif
DBUG_ENTER("flush_log_for_bitmap");
DBUG_ASSERT(share->now_transactional);
/*
WAL imposes that UNDOs reach disk before bitmap is flushed. We don't know
the LSN of the last UNDO about this bitmap page, so we flush whole log.
*/
DBUG_RETURN(translog_flush(translog_get_horizon()));
} | O3 | c | flush_log_for_bitmap:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
callq 0x67570
movq %rax, %rdi
popq %rbp
jmp 0x68763
| flush_log_for_bitmap:
push rbp
mov rbp, rsp
xor eax, eax
call translog_get_horizon
mov rdi, rax
pop rbp
jmp translog_flush
| long long flush_log_for_bitmap(long long a1)
{
long long horizon; // rax
horizon = translog_get_horizon(a1);
return translog_flush(horizon);
}
| flush_log_for_bitmap:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
CALL 0x00167570
MOV RDI,RAX
POP RBP
JMP 0x00168763
|
void flush_log_for_bitmap(void)
{
int8 uVar1;
uVar1 = translog_get_horizon();
translog_flush(uVar1);
return;
}
| |
48,804 | mthd_my_read_query_result | eloqsql/libmariadb/libmariadb/mariadb_lib.c | int mthd_my_read_query_result(MYSQL *mysql)
{
uchar *pos;
ulong field_count;
MYSQL_DATA *fields;
ulong length;
const uchar *end;
uchar has_metadata;
my_bool can_local_infile= (mysql->options.extension) && (mysql->extension->auto_local_infile != WAIT_FOR_QUERY);
if (mysql->options.extension && mysql->extension->auto_local_infile == ACCEPT_FILE_REQUEST)
mysql->extension->auto_local_infile= WAIT_FOR_QUERY;
if ((length = ma_net_safe_read(mysql)) == packet_error)
{
return(1);
}
free_old_query(mysql); /* Free old result */
get_info:
pos=(uchar*) mysql->net.read_pos;
end= pos + length;
if ((field_count= net_field_length(&pos)) == 0)
return ma_read_ok_packet(mysql, pos, length);
if (field_count == NULL_LENGTH) /* LOAD DATA LOCAL INFILE */
{
int error=mysql_handle_local_infile(mysql, (char *)pos, can_local_infile);
if ((length=ma_net_safe_read(mysql)) == packet_error || error)
return(-1);
goto get_info; /* Get info packet */
}
has_metadata= 1;
if (ma_supports_cache_metadata(mysql))
{
assert(mysql->fields == NULL);
if (pos < end)
{
has_metadata= *pos;
pos++;
}
}
if (!(mysql->server_status & SERVER_STATUS_AUTOCOMMIT))
mysql->server_status|= SERVER_STATUS_IN_TRANS;
if (has_metadata)
{
if (!(fields= mysql->methods->db_read_rows(mysql, (MYSQL_FIELD *) 0,
ma_result_set_rows(mysql))))
return (-1);
if (!(mysql->fields= unpack_fields(mysql, fields, &mysql->field_alloc,
(uint) field_count, 1)))
return (-1);
}
else
{
/* Read EOF, to get the status and warning count. */
if ((length= ma_net_safe_read(mysql)) == packet_error)
{
return -1;
}
pos= (uchar *) mysql->net.read_pos;
if (length != 5 || pos[0] != 0xfe)
{
return -1;
}
mysql->warning_count= uint2korr(pos + 1);
mysql->server_status= uint2korr(pos + 3);
}
mysql->status=MYSQL_STATUS_GET_RESULT;
mysql->field_count=field_count;
return(0);
} | O3 | c | mthd_my_read_query_result:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x480(%rdi)
je 0x1e19a
movq 0x4f0(%rbx), %rax
movb 0x78(%rax), %cl
cmpb $0x1, %cl
setne %r14b
cmpb $0x2, %cl
jne 0x1e19d
movb $0x1, 0x78(%rax)
movb $0x1, %r14b
jmp 0x1e19d
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x18533
movq %rax, %r15
movl $0x1, %r12d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %r15
jne 0x1e1ca
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x1d48a
movzbl %r14b, %r13d
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
movq 0x20(%rbx), %rsi
movzbl (%rsi), %r14d
cmpq $0xfa, %r14
jbe 0x1e24b
cmpq $0xfb, %r14
jne 0x1e223
incq %rsi
movq %rbx, %rdi
movl %r13d, %edx
callq 0x25b7f
movl %eax, %r14d
movq %rbx, %rdi
callq 0x18533
movq %rax, %r15
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %r15
je 0x1e1b8
testb %r14b, %r14b
je 0x1e1dc
jmp 0x1e1b8
cmpl $0xfc, %r14d
je 0x1e251
cmpl $0xfd, %r14d
jne 0x1e25c
leaq 0x4(%rsi), %rax
movzwl 0x1(%rsi), %ecx
movzbl 0x3(%rsi), %r14d
shll $0x10, %r14d
orq %rcx, %r14
jmp 0x1e264
leaq 0x1(%rsi), %rax
jmp 0x1e264
leaq 0x3(%rsi), %rax
movzwl 0x1(%rsi), %r14d
jmp 0x1e264
leaq 0x9(%rsi), %rax
movl 0x1(%rsi), %r14d
testq %r14, %r14
je 0x1e2e6
movq 0x4f0(%rbx), %rcx
xorl %edx, %edx
testb $0x10, 0x70(%rcx)
je 0x1e286
addq %r15, %rsi
cmpq %rsi, %rax
jae 0x1e286
cmpb $0x0, (%rax)
sete %dl
movl 0x380(%rbx), %eax
testb $0x2, %al
jne 0x1e299
orl $0x1, %eax
movl %eax, 0x380(%rbx)
testb %dl, %dl
je 0x1e302
movq %rbx, %rdi
callq 0x18533
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0x1e1b8
cmpq $0x5, %rax
jne 0x1e1b8
movq 0x20(%rbx), %rax
cmpb $-0x2, (%rax)
jne 0x1e1b8
movzwl 0x1(%rax), %ecx
movl %ecx, 0x388(%rbx)
movzwl 0x3(%rax), %eax
movl %eax, 0x380(%rbx)
jmp 0x1e35e
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1d81a
movq 0x4d0(%rbx), %rax
movq 0x70(%rcx), %rcx
andl $0x8, %ecx
cmpq $0x1, %rcx
movl $0x9, %edx
sbbl $0x0, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq *0x28(%rax)
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x1e1b8
leaq 0x300(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
movl %r14d, %ecx
movl $0x1, %r8d
callq 0x1aa5c
movq %rax, 0x2f8(%rbx)
testq %rax, %rax
je 0x1e1b8
movl $0x1, 0x488(%rbx)
movl %r14d, 0x37c(%rbx)
xorl %r12d, %r12d
jmp 0x1e1b8
| mthd_my_read_query_result:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
cmp qword ptr [rdi+480h], 0
jz short loc_1E19A
mov rax, [rbx+4F0h]
mov cl, [rax+78h]
cmp cl, 1
setnz r14b
cmp cl, 2
jnz short loc_1E19D
mov byte ptr [rax+78h], 1
mov r14b, 1
jmp short loc_1E19D
loc_1E19A:
xor r14d, r14d
loc_1E19D:
mov rdi, rbx
call ma_net_safe_read
mov r15, rax
mov r12d, 1
mov eax, 0FFFFFFFFh
cmp r15, rax
jnz short loc_1E1CA
loc_1E1B8:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1E1CA:
mov rdi, rbx
call free_old_query
movzx r13d, r14b
mov r12d, 0FFFFFFFFh
loc_1E1DC:
mov rsi, [rbx+20h]
movzx r14d, byte ptr [rsi]
cmp r14, 0FAh
jbe short loc_1E24B
cmp r14, 0FBh
jnz short loc_1E223
inc rsi
mov rdi, rbx
mov edx, r13d
call mysql_handle_local_infile
mov r14d, eax
mov rdi, rbx
call ma_net_safe_read
mov r15, rax
mov eax, 0FFFFFFFFh
cmp r15, rax
jz short loc_1E1B8
test r14b, r14b
jz short loc_1E1DC
jmp short loc_1E1B8
loc_1E223:
cmp r14d, 0FCh
jz short loc_1E251
cmp r14d, 0FDh
jnz short loc_1E25C
lea rax, [rsi+4]
movzx ecx, word ptr [rsi+1]
movzx r14d, byte ptr [rsi+3]
shl r14d, 10h
or r14, rcx
jmp short loc_1E264
loc_1E24B:
lea rax, [rsi+1]
jmp short loc_1E264
loc_1E251:
lea rax, [rsi+3]
movzx r14d, word ptr [rsi+1]
jmp short loc_1E264
loc_1E25C:
lea rax, [rsi+9]
mov r14d, [rsi+1]
loc_1E264:
test r14, r14
jz short loc_1E2E6
mov rcx, [rbx+4F0h]
xor edx, edx
test byte ptr [rcx+70h], 10h
jz short loc_1E286
add rsi, r15
cmp rax, rsi
jnb short loc_1E286
cmp byte ptr [rax], 0
setz dl
loc_1E286:
mov eax, [rbx+380h]
test al, 2
jnz short loc_1E299
or eax, 1
mov [rbx+380h], eax
loc_1E299:
test dl, dl
jz short loc_1E302
mov rdi, rbx
call ma_net_safe_read
mov r12d, 0FFFFFFFFh
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jz loc_1E1B8
cmp rax, 5
jnz loc_1E1B8
mov rax, [rbx+20h]
cmp byte ptr [rax], 0FEh
jnz loc_1E1B8
movzx ecx, word ptr [rax+1]
mov [rbx+388h], ecx
movzx eax, word ptr [rax+3]
mov [rbx+380h], eax
jmp short loc_1E35E
loc_1E2E6:
mov rdi, rbx
mov rsi, rax
mov rdx, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp ma_read_ok_packet
loc_1E302:
mov rax, [rbx+4D0h]
mov rcx, [rcx+70h]
and ecx, 8
cmp rcx, 1
mov edx, 9
sbb edx, 0
mov rdi, rbx
xor esi, esi
call qword ptr [rax+28h]
mov r12d, 0FFFFFFFFh
test rax, rax
jz loc_1E1B8
lea rdx, [rbx+300h]
mov rdi, rbx
mov rsi, rax
mov ecx, r14d
mov r8d, 1
call unpack_fields
mov [rbx+2F8h], rax
test rax, rax
jz loc_1E1B8
loc_1E35E:
mov dword ptr [rbx+488h], 1
mov [rbx+37Ch], r14d
xor r12d, r12d
jmp loc_1E1B8
| long long mthd_my_read_query_result(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned long long a5,
int a6)
{
long long v6; // rax
bool v7; // r14
unsigned long long v8; // r15
unsigned int v9; // r12d
unsigned long long v11; // r8
int v12; // r9d
BOOL v13; // r13d
unsigned __int8 *v14; // rsi
unsigned long long v15; // r14
long long v16; // rsi
char v17; // r14
long long v18; // rdx
long long v19; // rcx
unsigned long long v20; // r8
int v21; // r9d
unsigned __int8 *v22; // rax
long long v23; // rcx
long long v24; // rdx
int v25; // eax
long long v26; // rax
_QWORD *v27; // rax
long long v28; // rax
if ( *(_QWORD *)(a1 + 1152) )
{
v6 = *(_QWORD *)(a1 + 1264);
LOBYTE(a4) = *(_BYTE *)(v6 + 120);
v7 = (_BYTE)a4 != 1;
if ( (_BYTE)a4 == 2 )
{
*(_BYTE *)(v6 + 120) = 1;
v7 = 1;
}
}
else
{
v7 = 0;
}
v8 = ma_net_safe_read(a1, a2, a3, a4, a5, a6);
v9 = 1;
if ( v8 == 0xFFFFFFFF )
return v9;
free_old_query(a1);
v13 = v7;
v9 = -1;
while ( 1 )
{
v14 = *(unsigned __int8 **)(a1 + 32);
v15 = *v14;
if ( v15 <= 0xFA )
{
v22 = v14 + 1;
goto LABEL_19;
}
if ( v15 != 251 )
break;
v16 = (long long)(v14 + 1);
v17 = mysql_handle_local_infile(a1, v16, v13);
v8 = ma_net_safe_read(a1, v16, v18, v19, v20, v21);
if ( v8 == 0xFFFFFFFF || v17 )
return v9;
}
if ( (_DWORD)v15 == 252 )
{
v22 = v14 + 3;
v15 = *(unsigned __int16 *)(v14 + 1);
}
else if ( (_DWORD)v15 == 253 )
{
v22 = v14 + 4;
v15 = *(unsigned __int16 *)(v14 + 1) | (unsigned long long)(v14[3] << 16);
}
else
{
v22 = v14 + 9;
v15 = *(unsigned int *)(v14 + 1);
}
LABEL_19:
if ( v15 )
{
v23 = *(_QWORD *)(a1 + 1264);
v24 = 0LL;
if ( (*(_BYTE *)(v23 + 112) & 0x10) != 0 )
{
v14 += v8;
if ( v22 < v14 )
LOBYTE(v24) = *v22 == 0;
}
v25 = *(_DWORD *)(a1 + 896);
if ( (v25 & 2) == 0 )
*(_DWORD *)(a1 + 896) = v25 | 1;
if ( (_BYTE)v24 )
{
v9 = -1;
if ( ma_net_safe_read(a1, (long long)v14, v24, v23, v11, v12) != 5 )
return v9;
v26 = *(_QWORD *)(a1 + 32);
if ( *(_BYTE *)v26 != 0xFE )
return v9;
*(_DWORD *)(a1 + 904) = *(unsigned __int16 *)(v26 + 1);
*(_DWORD *)(a1 + 896) = *(unsigned __int16 *)(v26 + 3);
}
else
{
v27 = (_QWORD *)(*(long long ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(a1 + 1232) + 40LL))(
a1,
0LL,
9 - (unsigned int)((*(_QWORD *)(v23 + 112) & 8LL) == 0));
v9 = -1;
if ( !v27 )
return v9;
v28 = unpack_fields(a1, v27, a1 + 768, v15, 1);
*(_QWORD *)(a1 + 760) = v28;
if ( !v28 )
return v9;
}
*(_DWORD *)(a1 + 1160) = 1;
*(_DWORD *)(a1 + 892) = v15;
return 0;
}
return ma_read_ok_packet(a1, v22, v8);
}
| mthd_my_read_query_result:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP qword ptr [RDI + 0x480],0x0
JZ 0x0011e19a
MOV RAX,qword ptr [RBX + 0x4f0]
MOV CL,byte ptr [RAX + 0x78]
CMP CL,0x1
SETNZ R14B
CMP CL,0x2
JNZ 0x0011e19d
MOV byte ptr [RAX + 0x78],0x1
MOV R14B,0x1
JMP 0x0011e19d
LAB_0011e19a:
XOR R14D,R14D
LAB_0011e19d:
MOV RDI,RBX
CALL 0x00118533
MOV R15,RAX
MOV R12D,0x1
MOV EAX,0xffffffff
CMP R15,RAX
JNZ 0x0011e1ca
LAB_0011e1b8:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011e1ca:
MOV RDI,RBX
CALL 0x0011d48a
MOVZX R13D,R14B
MOV R12D,0xffffffff
LAB_0011e1dc:
MOV RSI,qword ptr [RBX + 0x20]
MOVZX R14D,byte ptr [RSI]
CMP R14,0xfa
JBE 0x0011e24b
CMP R14,0xfb
JNZ 0x0011e223
INC RSI
MOV RDI,RBX
MOV EDX,R13D
CALL 0x00125b7f
MOV R14D,EAX
MOV RDI,RBX
CALL 0x00118533
MOV R15,RAX
MOV EAX,0xffffffff
CMP R15,RAX
JZ 0x0011e1b8
TEST R14B,R14B
JZ 0x0011e1dc
JMP 0x0011e1b8
LAB_0011e223:
CMP R14D,0xfc
JZ 0x0011e251
CMP R14D,0xfd
JNZ 0x0011e25c
LEA RAX,[RSI + 0x4]
MOVZX ECX,word ptr [RSI + 0x1]
MOVZX R14D,byte ptr [RSI + 0x3]
SHL R14D,0x10
OR R14,RCX
JMP 0x0011e264
LAB_0011e24b:
LEA RAX,[RSI + 0x1]
JMP 0x0011e264
LAB_0011e251:
LEA RAX,[RSI + 0x3]
MOVZX R14D,word ptr [RSI + 0x1]
JMP 0x0011e264
LAB_0011e25c:
LEA RAX,[RSI + 0x9]
MOV R14D,dword ptr [RSI + 0x1]
LAB_0011e264:
TEST R14,R14
JZ 0x0011e2e6
MOV RCX,qword ptr [RBX + 0x4f0]
XOR EDX,EDX
TEST byte ptr [RCX + 0x70],0x10
JZ 0x0011e286
ADD RSI,R15
CMP RAX,RSI
JNC 0x0011e286
CMP byte ptr [RAX],0x0
SETZ DL
LAB_0011e286:
MOV EAX,dword ptr [RBX + 0x380]
TEST AL,0x2
JNZ 0x0011e299
OR EAX,0x1
MOV dword ptr [RBX + 0x380],EAX
LAB_0011e299:
TEST DL,DL
JZ 0x0011e302
MOV RDI,RBX
CALL 0x00118533
MOV R12D,0xffffffff
MOV ECX,0xffffffff
CMP RAX,RCX
JZ 0x0011e1b8
CMP RAX,0x5
JNZ 0x0011e1b8
MOV RAX,qword ptr [RBX + 0x20]
CMP byte ptr [RAX],0xfe
JNZ 0x0011e1b8
MOVZX ECX,word ptr [RAX + 0x1]
MOV dword ptr [RBX + 0x388],ECX
MOVZX EAX,word ptr [RAX + 0x3]
MOV dword ptr [RBX + 0x380],EAX
JMP 0x0011e35e
LAB_0011e2e6:
MOV RDI,RBX
MOV RSI,RAX
MOV RDX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0011d81a
LAB_0011e302:
MOV RAX,qword ptr [RBX + 0x4d0]
MOV RCX,qword ptr [RCX + 0x70]
AND ECX,0x8
CMP RCX,0x1
MOV EDX,0x9
SBB EDX,0x0
MOV RDI,RBX
XOR ESI,ESI
CALL qword ptr [RAX + 0x28]
MOV R12D,0xffffffff
TEST RAX,RAX
JZ 0x0011e1b8
LEA RDX,[RBX + 0x300]
MOV RDI,RBX
MOV RSI,RAX
MOV ECX,R14D
MOV R8D,0x1
CALL 0x0011aa5c
MOV qword ptr [RBX + 0x2f8],RAX
TEST RAX,RAX
JZ 0x0011e1b8
LAB_0011e35e:
MOV dword ptr [RBX + 0x488],0x1
MOV dword ptr [RBX + 0x37c],R14D
XOR R12D,R12D
JMP 0x0011e1b8
|
int8 mthd_my_read_query_result(long param_1)
{
byte bVar1;
byte *pbVar2;
char *pcVar3;
char cVar4;
long lVar5;
byte *pbVar6;
int8 uVar7;
uint uVar8;
bool bVar9;
if (*(long *)(param_1 + 0x480) == 0) {
bVar9 = false;
}
else {
cVar4 = *(char *)(*(long *)(param_1 + 0x4f0) + 0x78);
bVar9 = cVar4 != '\x01';
if (cVar4 == '\x02') {
*(int1 *)(*(long *)(param_1 + 0x4f0) + 0x78) = 1;
bVar9 = true;
}
}
lVar5 = ma_net_safe_read(param_1);
if (lVar5 == 0xffffffff) {
return 1;
}
free_old_query(param_1);
do {
pbVar2 = *(byte **)(param_1 + 0x20);
bVar1 = *pbVar2;
uVar8 = (uint)bVar1;
if (uVar8 < 0xfb) {
pbVar6 = pbVar2 + 1;
LAB_0011e264:
if (uVar8 == 0) {
uVar7 = ma_read_ok_packet(param_1,pbVar6,lVar5);
return uVar7;
}
bVar9 = false;
if (((*(byte *)(*(long *)(param_1 + 0x4f0) + 0x70) & 0x10) != 0) && (pbVar6 < pbVar2 + lVar5))
{
bVar9 = *pbVar6 == 0;
}
if ((*(uint *)(param_1 + 0x380) & 2) == 0) {
*(uint *)(param_1 + 0x380) = *(uint *)(param_1 + 0x380) | 1;
}
if (bVar9) {
lVar5 = ma_net_safe_read(param_1);
if (lVar5 == 0xffffffff) {
return 0xffffffff;
}
if (lVar5 != 5) {
return 0xffffffff;
}
pcVar3 = *(char **)(param_1 + 0x20);
if (*pcVar3 != -2) {
return 0xffffffff;
}
*(uint *)(param_1 + 0x388) = (uint)*(ushort *)(pcVar3 + 1);
*(uint *)(param_1 + 0x380) = (uint)*(ushort *)(pcVar3 + 3);
}
else {
lVar5 = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x28))
(param_1,0,
9 - (uint)((*(ulong *)(*(long *)(param_1 + 0x4f0) + 0x70) & 8) == 0));
if (lVar5 == 0) {
return 0xffffffff;
}
lVar5 = unpack_fields(param_1,lVar5,param_1 + 0x300,uVar8,1);
*(long *)(param_1 + 0x2f8) = lVar5;
if (lVar5 == 0) {
return 0xffffffff;
}
}
*(int4 *)(param_1 + 0x488) = 1;
*(uint *)(param_1 + 0x37c) = uVar8;
return 0;
}
if (uVar8 != 0xfb) {
if (bVar1 == 0xfc) {
pbVar6 = pbVar2 + 3;
uVar8 = (uint)*(ushort *)(pbVar2 + 1);
}
else if (bVar1 == 0xfd) {
pbVar6 = pbVar2 + 4;
uVar8 = (uint)*(uint3 *)(pbVar2 + 1);
}
else {
pbVar6 = pbVar2 + 9;
uVar8 = *(uint *)(pbVar2 + 1);
}
goto LAB_0011e264;
}
cVar4 = mysql_handle_local_infile(param_1,pbVar2 + 1,bVar9);
lVar5 = ma_net_safe_read(param_1);
if (lVar5 == 0xffffffff) {
return 0xffffffff;
}
if (cVar4 != '\0') {
return 0xffffffff;
}
} while( true );
}
| |
48,805 | ft_init_nlq_search | eloqsql/storage/myisam/ft_nlq_search.c | FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, uchar *query,
uint query_len, uint flags, uchar *record)
{
TREE wtree;
ALL_IN_ONE aio;
FT_DOC *dptr;
FT_INFO *dlist=NULL;
my_off_t saved_lastpos=info->lastpos;
struct st_mysql_ftparser *parser;
MYSQL_FTPARSER_PARAM *ftparser_param;
DBUG_ENTER("ft_init_nlq_search");
/* black magic ON */
if ((int) (keynr = _mi_check_index(info,keynr)) < 0)
DBUG_RETURN(NULL);
if (_mi_readinfo(info,F_RDLCK,1))
DBUG_RETURN(NULL);
/* black magic OFF */
aio.info=info;
aio.keynr=keynr;
aio.charset=info->s->keyinfo[keynr].seg->charset;
aio.keybuff=info->lastkey+info->s->base.max_key_length;
parser= info->s->keyinfo[keynr].parser;
if (! (ftparser_param= ftparser_call_initializer(info, keynr, 0)))
goto err;
bzero(&wtree,sizeof(wtree));
init_tree(&aio.dtree,0,0,sizeof(FT_SUPERDOC),(qsort_cmp2)&FT_SUPERDOC_cmp,
NULL, NULL, MYF(0));
ft_parse_init(&wtree, aio.charset);
ftparser_param->flags= 0;
if (ft_parse(&wtree, query, query_len, parser, ftparser_param,
&wtree.mem_root))
goto err;
if (tree_walk(&wtree, (tree_walk_action)&walk_and_match, &aio,
left_root_right))
goto err;
if (flags & FT_EXPAND && ft_query_expansion_limit)
{
QUEUE best;
init_queue(&best,ft_query_expansion_limit,0,0, (queue_compare) &FT_DOC_cmp,
0, 0, 0);
tree_walk(&aio.dtree, (tree_walk_action) &walk_and_push,
&best, left_root_right);
while (best.elements)
{
my_off_t docid= ((FT_DOC *)queue_remove_top(&best))->dpos;
if (!(*info->read_record)(info,docid,record))
{
info->update|= HA_STATE_AKTIV;
ftparser_param->flags= MYSQL_FTFLAGS_NEED_COPY;
if (unlikely(_mi_ft_parse(&wtree, info, keynr, record, ftparser_param,
&wtree.mem_root)))
{
delete_queue(&best);
goto err;
}
}
}
delete_queue(&best);
reset_tree(&aio.dtree);
if (tree_walk(&wtree, (tree_walk_action)&walk_and_match, &aio,
left_root_right))
goto err;
}
/*
If ndocs == 0, this will not allocate RAM for FT_INFO.doc[],
so if ndocs == 0, FT_INFO.doc[] must not be accessed.
*/
dlist=(FT_INFO *)my_malloc(mi_key_memory_FT_INFO, sizeof(FT_INFO)+
sizeof(FT_DOC)*
(int)(aio.dtree.elements_in_tree-1),
MYF(0));
if (!dlist)
goto err;
dlist->please= (struct _ft_vft *) & _ft_vft_nlq;
dlist->ndocs=aio.dtree.elements_in_tree;
dlist->curdoc=-1;
dlist->info=aio.info;
dptr=dlist->doc;
tree_walk(&aio.dtree, (tree_walk_action) &walk_and_copy,
&dptr, left_root_right);
if (flags & FT_SORTED)
my_qsort2(dlist->doc, dlist->ndocs, sizeof(FT_DOC), (qsort2_cmp)&FT_DOC_cmp,
0);
err:
delete_tree(&aio.dtree, 0);
delete_tree(&wtree, 0);
info->lastpos=saved_lastpos;
DBUG_RETURN(dlist);
} | O3 | c | ft_init_nlq_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5b8, %rsp # imm = 0x5B8
movq %r9, -0x50(%rbp)
movl %r8d, -0x2c(%rbp)
movl %ecx, %r12d
movq %rdx, %r15
movq %rdi, %rbx
movq 0x170(%rdi), %r14
callq 0x84000
testl %eax, %eax
js 0x72e74
movl %eax, %r13d
movq %r14, -0x48(%rbp)
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x7c7fb
testl %eax, %eax
jne 0x72f3f
movq %rbx, -0x338(%rbp)
movl %r13d, -0x330(%rbp)
movq (%rbx), %rax
movq 0x218(%rax), %rcx
movl %r13d, %edx
imulq $0x70, %rdx, %rdx
movq 0x28(%rcx,%rdx), %rsi
movq (%rsi), %rsi
movq %rsi, -0x328(%rbp)
movl 0x194(%rax), %eax
addq 0x108(%rbx), %rax
movq %rax, -0x320(%rbp)
movq 0x38(%rcx,%rdx), %rax
movq %rax, -0x40(%rbp)
xorl %r14d, %r14d
movq %rbx, %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0x73ef5
testq %rax, %rax
je 0x72f18
leaq -0x5d0(%rbp), %rdi
xorl %r14d, %r14d
movl $0x298, %edx # imm = 0x298
xorl %esi, %esi
movq %rax, -0x38(%rbp)
callq 0x292c0
leaq -0x318(%rbp), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x275(%rip), %r8 # 0x72f62
xorl %esi, %esi
xorl %edx, %edx
movl $0x20, %ecx
xorl %r9d, %r9d
callq 0xa4618
leaq -0x318(%rbp), %rax
movq -0x10(%rax), %rsi
leaq -0x5d0(%rbp), %rdi
callq 0x73ce6
movq -0x38(%rbp), %rax
movl $0x0, 0x34(%rax)
leaq -0x398(%rbp), %r9
leaq -0x5d0(%rbp), %rdi
movq %r15, %rsi
movq %rax, %r15
movl %r12d, %edx
movq -0x40(%rbp), %rcx
movq %rax, %r8
callq 0x73d36
testl %eax, %eax
jne 0x72f18
leaq 0x229(%rip), %rsi # 0x72f7b
leaq -0x5d0(%rbp), %rdi
leaq -0x338(%rbp), %rdx
xorl %r14d, %r14d
xorl %ecx, %ecx
callq 0xa52a7
testl %eax, %eax
jne 0x72f18
movl -0x2c(%rbp), %eax
shrb $0x2, %al
leaq 0x311471(%rip), %rcx # 0x3841f0
movq (%rcx), %rsi
testq %rsi, %rsi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x72e7c
xorl %r12d, %r12d
movl %r12d, 0x8(%rsp)
movl %r12d, (%rsp)
leaq 0x77a(%rip), %r8 # 0x73520
leaq -0x80(%rbp), %r14
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0xa2028
leaq 0x78d(%rip), %rsi # 0x7354d
leaq -0x318(%rbp), %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xa52a7
cmpl %r12d, 0x10(%r14)
movq -0x50(%rbp), %r12
je 0x72e37
movq %r14, %rdi
movl $0x1, %esi
callq 0xa227a
movq (%rax), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq *0x140(%rbx)
testl %eax, %eax
jne 0x72e31
orb $0x2, 0x1d0(%rbx)
movq %r15, %r8
movl $0x1, 0x34(%r15)
leaq -0x5d0(%rbp), %rdi
movq %rbx, %rsi
movl %r13d, %edx
movq %r12, %rcx
leaq -0x398(%rbp), %r9
callq 0x74172
testl %eax, %eax
jne 0x72f54
cmpl $0x0, -0x70(%rbp)
jne 0x72ddb
leaq -0x80(%rbp), %rdi
callq 0xa2150
leaq -0x318(%rbp), %rdi
callq 0xa4819
leaq 0x128(%rip), %rsi # 0x72f7b
leaq -0x5d0(%rbp), %rdi
leaq -0x338(%rbp), %rdx
xorl %ecx, %ecx
callq 0xa52a7
testl %eax, %eax
je 0x72e7c
xorl %r14d, %r14d
jmp 0x72f18
xorl %r14d, %r14d
jmp 0x72f3f
leaq 0xb8cafd(%rip), %rax # 0xbff980
movl (%rax), %edi
movl -0x10c(%rbp), %eax
decl %eax
movslq %eax, %rsi
shlq $0x4, %rsi
addq $0x28, %rsi
xorl %r14d, %r14d
xorl %edx, %edx
callq 0x9fd89
testq %rax, %rax
leaq -0x318(%rbp), %rdi
je 0x72f18
movq %rax, %r15
leaq 0x308558(%rip), %rax # 0x37b410
movq %rax, (%r15)
movl -0x10c(%rbp), %eax
movl %eax, 0x10(%r15)
movl $0xffffffff, 0x14(%r15) # imm = 0xFFFFFFFF
movq -0x338(%rbp), %rax
movq %rax, 0x8(%r15)
movq %r15, %r14
addq $0x18, %r14
leaq -0x80(%rbp), %rdx
movq %r14, (%rdx)
leaq 0x6a3(%rip), %rsi # 0x73590
xorl %ecx, %ecx
callq 0xa52a7
testb $0x2, -0x2c(%rbp)
je 0x72f15
movslq 0x10(%r15), %rsi
leaq 0x61b(%rip), %rcx # 0x73520
movl $0x10, %edx
movq %r14, %rdi
xorl %r8d, %r8d
callq 0x9bf08
movq %r15, %r14
leaq -0x318(%rbp), %rdi
xorl %esi, %esi
callq 0xa4742
leaq -0x5d0(%rbp), %rdi
xorl %esi, %esi
callq 0xa4742
movq -0x48(%rbp), %rax
movq %rax, 0x170(%rbx)
movq %r14, %rax
addq $0x5b8, %rsp # imm = 0x5B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x80(%rbp), %rdi
callq 0xa2150
jmp 0x72e6c
| ft_init_nlq_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 5B8h
mov [rbp+var_50], r9
mov [rbp+var_2C], r8d
mov r12d, ecx
mov r15, rdx
mov rbx, rdi
mov r14, [rdi+170h]
call _mi_check_index
test eax, eax
js loc_72E74
mov r13d, eax
mov [rbp+var_48], r14
xor r14d, r14d
mov rdi, rbx
xor esi, esi
mov edx, 1
call _mi_readinfo
test eax, eax
jnz loc_72F3F
mov [rbp+var_338], rbx
mov [rbp+var_330], r13d
mov rax, [rbx]
mov rcx, [rax+218h]
mov edx, r13d
imul rdx, 70h ; 'p'
mov rsi, [rcx+rdx+28h]
mov rsi, [rsi]
mov [rbp+var_328], rsi
mov eax, [rax+194h]
add rax, [rbx+108h]
mov [rbp+var_320], rax
mov rax, [rcx+rdx+38h]
mov [rbp+var_40], rax
xor r14d, r14d
mov rdi, rbx
mov esi, r13d
xor edx, edx
call ftparser_call_initializer
test rax, rax
jz loc_72F18
lea rdi, [rbp+var_5D0]
xor r14d, r14d
mov edx, 298h
xor esi, esi
mov [rbp+var_38], rax
call _memset
lea rdi, [rbp+var_318]
xorps xmm0, xmm0
movups [rsp+5E0h+var_5E0], xmm0
lea r8, FT_SUPERDOC_cmp
xor esi, esi
xor edx, edx
mov ecx, 20h ; ' '
xor r9d, r9d
call init_tree
lea rax, [rbp+var_318]
mov rsi, [rax-10h]
lea rdi, [rbp+var_5D0]
call ft_parse_init
mov rax, [rbp+var_38]
mov dword ptr [rax+34h], 0
lea r9, [rbp+var_398]
lea rdi, [rbp+var_5D0]
mov rsi, r15
mov r15, rax
mov edx, r12d
mov rcx, [rbp+var_40]
mov r8, rax
call ft_parse
test eax, eax
jnz loc_72F18
lea rsi, walk_and_match
lea rdi, [rbp+var_5D0]
lea rdx, [rbp+var_338]
xor r14d, r14d
xor ecx, ecx
call tree_walk
test eax, eax
jnz loc_72F18
mov eax, [rbp+var_2C]
shr al, 2
lea rcx, ft_query_expansion_limit
mov rsi, [rcx]
test rsi, rsi
setnz cl
and cl, al
cmp cl, 1
jnz loc_72E7C
xor r12d, r12d
mov dword ptr [rsp+5E0h+var_5E0+8], r12d
mov dword ptr [rsp+5E0h+var_5E0], r12d
lea r8, FT_DOC_cmp
lea r14, [rbp+var_80]
mov rdi, r14
xor edx, edx
xor ecx, ecx
xor r9d, r9d
call init_queue
lea rsi, walk_and_push
lea rdi, [rbp+var_318]
mov rdx, r14
xor ecx, ecx
call tree_walk
cmp [r14+10h], r12d
mov r12, [rbp+var_50]
jz short loc_72E37
loc_72DDB:
mov rdi, r14
mov esi, 1
call queue_remove
mov rsi, [rax]
mov rdi, rbx
mov rdx, r12
call qword ptr [rbx+140h]
test eax, eax
jnz short loc_72E31
or byte ptr [rbx+1D0h], 2
mov r8, r15
mov dword ptr [r15+34h], 1
lea rdi, [rbp+var_5D0]
mov rsi, rbx
mov edx, r13d
mov rcx, r12
lea r9, [rbp+var_398]
call _mi_ft_parse
test eax, eax
jnz loc_72F54
loc_72E31:
cmp [rbp+var_70], 0
jnz short loc_72DDB
loc_72E37:
lea rdi, [rbp+var_80]
call delete_queue
lea rdi, [rbp+var_318]
call reset_tree
lea rsi, walk_and_match
lea rdi, [rbp+var_5D0]
lea rdx, [rbp+var_338]
xor ecx, ecx
call tree_walk
test eax, eax
jz short loc_72E7C
loc_72E6C:
xor r14d, r14d
jmp loc_72F18
loc_72E74:
xor r14d, r14d
jmp loc_72F3F
loc_72E7C:
lea rax, mi_key_memory_FT_INFO
mov edi, [rax]
mov eax, [rbp+var_10C]
dec eax
movsxd rsi, eax
shl rsi, 4
add rsi, 28h ; '('
xor r14d, r14d
xor edx, edx
call my_malloc
test rax, rax
lea rdi, [rbp+var_318]
jz short loc_72F18
mov r15, rax
lea rax, _ft_vft_nlq
mov [r15], rax
mov eax, [rbp+var_10C]
mov [r15+10h], eax
mov dword ptr [r15+14h], 0FFFFFFFFh
mov rax, [rbp+var_338]
mov [r15+8], rax
mov r14, r15
add r14, 18h
lea rdx, [rbp+var_80]
mov [rdx], r14
lea rsi, walk_and_copy_0
xor ecx, ecx
call tree_walk
test byte ptr [rbp+var_2C], 2
jz short loc_72F15
movsxd rsi, dword ptr [r15+10h]
lea rcx, FT_DOC_cmp
mov edx, 10h
mov rdi, r14
xor r8d, r8d
call my_qsort2
loc_72F15:
mov r14, r15
loc_72F18:
lea rdi, [rbp+var_318]
xor esi, esi
call delete_tree
lea rdi, [rbp+var_5D0]
xor esi, esi
call delete_tree
mov rax, [rbp+var_48]
mov [rbx+170h], rax
loc_72F3F:
mov rax, r14
add rsp, 5B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_72F54:
lea rdi, [rbp+var_80]
call delete_queue
jmp loc_72E6C
| long long ft_init_nlq_search(
long long *a1,
long long a2,
long long a3,
unsigned int a4,
int a5,
long long a6,
double a7)
{
long long v9; // r14
int v10; // eax
unsigned int v11; // r13d
long long v12; // r14
long long v13; // rax
long long v14; // rcx
long long v15; // rdx
long long v16; // rax
long long v17; // rax
long long v18; // rsi
long long v19; // r15
long long v20; // r12
_QWORD *v21; // rax
long long v22; // rax
long long v23; // r15
_BYTE v25[568]; // [rsp+10h] [rbp-5D0h] BYREF
_BYTE v26[96]; // [rsp+248h] [rbp-398h] BYREF
long long *v27; // [rsp+2A8h] [rbp-338h] BYREF
unsigned int v28; // [rsp+2B0h] [rbp-330h]
long long v29; // [rsp+2B8h] [rbp-328h]
long long v30; // [rsp+2C0h] [rbp-320h]
_BYTE v31[524]; // [rsp+2C8h] [rbp-318h] BYREF
int v32; // [rsp+4D4h] [rbp-10Ch]
_QWORD v33[2]; // [rsp+560h] [rbp-80h] BYREF
int v34; // [rsp+570h] [rbp-70h]
long long v35; // [rsp+590h] [rbp-50h]
long long v36; // [rsp+598h] [rbp-48h]
long long v37; // [rsp+5A0h] [rbp-40h]
long long v38; // [rsp+5A8h] [rbp-38h]
int v39; // [rsp+5B4h] [rbp-2Ch]
v35 = a6;
v39 = a5;
v9 = a1[46];
v10 = mi_check_index(a1, a2);
if ( v10 < 0 )
return 0LL;
v11 = v10;
v36 = v9;
v12 = 0LL;
if ( !(unsigned int)mi_readinfo(a1, 0LL, 1LL) )
{
v27 = a1;
v28 = v11;
v13 = *a1;
v14 = *(_QWORD *)(*a1 + 536);
v15 = 112LL * v11;
v29 = **(_QWORD **)(v14 + v15 + 40);
v30 = a1[33] + *(unsigned int *)(v13 + 404);
v37 = *(_QWORD *)(v14 + v15 + 56);
v12 = 0LL;
v16 = ftparser_call_initializer(a1, v11, 0LL, a7);
if ( !v16 )
goto LABEL_18;
v12 = 0LL;
v38 = v16;
memset(v25, 0LL, 664LL);
init_tree((unsigned int)v31, 0, 0, 32, (unsigned int)FT_SUPERDOC_cmp, 0, 0LL, 0LL);
ft_parse_init(v25, v29);
v17 = v38;
*(_DWORD *)(v38 + 52) = 0;
v18 = a3;
v19 = v17;
if ( (unsigned int)ft_parse(v25, v18, a4, v37, v17, v26) )
goto LABEL_18;
v12 = 0LL;
if ( (unsigned int)tree_walk(v25, walk_and_match, &v27, 0LL) )
goto LABEL_18;
if ( (((unsigned __int8)v39 >> 2) & (ft_query_expansion_limit != 0LL)) == 1 )
{
init_queue((unsigned int)v33, ft_query_expansion_limit, 0, 0, (unsigned int)FT_DOC_cmp, 0, 0, 0);
tree_walk(v31, walk_and_push, v33, 0LL);
v20 = v35;
if ( v34 )
{
while ( 1 )
{
v21 = (_QWORD *)queue_remove(v33, 1LL);
if ( !((unsigned int ( *)(long long *, _QWORD, long long))a1[40])(a1, *v21, v20) )
{
*((_BYTE *)a1 + 464) |= 2u;
*(_DWORD *)(v19 + 52) = 1;
if ( (unsigned int)mi_ft_parse(v25, a1, v11, v20, v19, v26) )
break;
}
if ( !v34 )
goto LABEL_11;
}
delete_queue(v33);
goto LABEL_12;
}
LABEL_11:
delete_queue(v33);
reset_tree(v31);
if ( (unsigned int)tree_walk(v25, walk_and_match, &v27, 0LL) )
{
LABEL_12:
v12 = 0LL;
LABEL_18:
delete_tree(v31, 0LL);
delete_tree(v25, 0LL);
a1[46] = v36;
return v12;
}
}
v12 = 0LL;
v22 = my_malloc(mi_key_memory_FT_INFO, 16LL * (v32 - 1) + 40, 0LL);
if ( v22 )
{
v23 = v22;
*(_QWORD *)v22 = ft_vft_nlq;
*(_DWORD *)(v22 + 16) = v32;
*(_DWORD *)(v22 + 20) = -1;
*(_QWORD *)(v22 + 8) = v27;
v33[0] = v22 + 24;
tree_walk(v31, walk_and_copy_0, v33, 0LL);
if ( (v39 & 2) != 0 )
my_qsort2(v23 + 24, *(int *)(v23 + 16), 16LL, FT_DOC_cmp, 0LL);
v12 = v23;
}
goto LABEL_18;
}
return v12;
}
| ft_init_nlq_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x5b8
MOV qword ptr [RBP + -0x50],R9
MOV dword ptr [RBP + -0x2c],R8D
MOV R12D,ECX
MOV R15,RDX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x170]
CALL 0x00184000
TEST EAX,EAX
JS 0x00172e74
MOV R13D,EAX
MOV qword ptr [RBP + -0x48],R14
XOR R14D,R14D
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x1
CALL 0x0017c7fb
TEST EAX,EAX
JNZ 0x00172f3f
MOV qword ptr [RBP + -0x338],RBX
MOV dword ptr [RBP + -0x330],R13D
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + 0x218]
MOV EDX,R13D
IMUL RDX,RDX,0x70
MOV RSI,qword ptr [RCX + RDX*0x1 + 0x28]
MOV RSI,qword ptr [RSI]
MOV qword ptr [RBP + -0x328],RSI
MOV EAX,dword ptr [RAX + 0x194]
ADD RAX,qword ptr [RBX + 0x108]
MOV qword ptr [RBP + -0x320],RAX
MOV RAX,qword ptr [RCX + RDX*0x1 + 0x38]
MOV qword ptr [RBP + -0x40],RAX
XOR R14D,R14D
MOV RDI,RBX
MOV ESI,R13D
XOR EDX,EDX
CALL 0x00173ef5
TEST RAX,RAX
JZ 0x00172f18
LEA RDI,[RBP + -0x5d0]
XOR R14D,R14D
MOV EDX,0x298
XOR ESI,ESI
MOV qword ptr [RBP + -0x38],RAX
CALL 0x001292c0
LEA RDI,[RBP + -0x318]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP],XMM0
LEA R8,[0x172f62]
XOR ESI,ESI
XOR EDX,EDX
MOV ECX,0x20
XOR R9D,R9D
CALL 0x001a4618
LEA RAX,[RBP + -0x318]
MOV RSI,qword ptr [RAX + -0x10]
LEA RDI,[RBP + -0x5d0]
CALL 0x00173ce6
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x34],0x0
LEA R9,[RBP + -0x398]
LEA RDI,[RBP + -0x5d0]
MOV RSI,R15
MOV R15,RAX
MOV EDX,R12D
MOV RCX,qword ptr [RBP + -0x40]
MOV R8,RAX
CALL 0x00173d36
TEST EAX,EAX
JNZ 0x00172f18
LEA RSI,[0x172f7b]
LEA RDI,[RBP + -0x5d0]
LEA RDX,[RBP + -0x338]
XOR R14D,R14D
XOR ECX,ECX
CALL 0x001a52a7
TEST EAX,EAX
JNZ 0x00172f18
MOV EAX,dword ptr [RBP + -0x2c]
SHR AL,0x2
LEA RCX,[0x4841f0]
MOV RSI,qword ptr [RCX]
TEST RSI,RSI
SETNZ CL
AND CL,AL
CMP CL,0x1
JNZ 0x00172e7c
XOR R12D,R12D
MOV dword ptr [RSP + 0x8],R12D
MOV dword ptr [RSP],R12D
LEA R8,[0x173520]
LEA R14,[RBP + -0x80]
MOV RDI,R14
XOR EDX,EDX
XOR ECX,ECX
XOR R9D,R9D
CALL 0x001a2028
LEA RSI,[0x17354d]
LEA RDI,[RBP + -0x318]
MOV RDX,R14
XOR ECX,ECX
CALL 0x001a52a7
CMP dword ptr [R14 + 0x10],R12D
MOV R12,qword ptr [RBP + -0x50]
JZ 0x00172e37
LAB_00172ddb:
MOV RDI,R14
MOV ESI,0x1
CALL 0x001a227a
MOV RSI,qword ptr [RAX]
MOV RDI,RBX
MOV RDX,R12
CALL qword ptr [RBX + 0x140]
TEST EAX,EAX
JNZ 0x00172e31
OR byte ptr [RBX + 0x1d0],0x2
MOV R8,R15
MOV dword ptr [R15 + 0x34],0x1
LEA RDI,[RBP + -0x5d0]
MOV RSI,RBX
MOV EDX,R13D
MOV RCX,R12
LEA R9,[RBP + -0x398]
CALL 0x00174172
TEST EAX,EAX
JNZ 0x00172f54
LAB_00172e31:
CMP dword ptr [RBP + -0x70],0x0
JNZ 0x00172ddb
LAB_00172e37:
LEA RDI,[RBP + -0x80]
CALL 0x001a2150
LEA RDI,[RBP + -0x318]
CALL 0x001a4819
LEA RSI,[0x172f7b]
LEA RDI,[RBP + -0x5d0]
LEA RDX,[RBP + -0x338]
XOR ECX,ECX
CALL 0x001a52a7
TEST EAX,EAX
JZ 0x00172e7c
LAB_00172e6c:
XOR R14D,R14D
JMP 0x00172f18
LAB_00172e74:
XOR R14D,R14D
JMP 0x00172f3f
LAB_00172e7c:
LEA RAX,[0xcff980]
MOV EDI,dword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x10c]
DEC EAX
MOVSXD RSI,EAX
SHL RSI,0x4
ADD RSI,0x28
XOR R14D,R14D
XOR EDX,EDX
CALL 0x0019fd89
TEST RAX,RAX
LEA RDI,[RBP + -0x318]
JZ 0x00172f18
MOV R15,RAX
LEA RAX,[0x47b410]
MOV qword ptr [R15],RAX
MOV EAX,dword ptr [RBP + -0x10c]
MOV dword ptr [R15 + 0x10],EAX
MOV dword ptr [R15 + 0x14],0xffffffff
MOV RAX,qword ptr [RBP + -0x338]
MOV qword ptr [R15 + 0x8],RAX
MOV R14,R15
ADD R14,0x18
LEA RDX,[RBP + -0x80]
MOV qword ptr [RDX],R14
LEA RSI,[0x173590]
XOR ECX,ECX
CALL 0x001a52a7
TEST byte ptr [RBP + -0x2c],0x2
JZ 0x00172f15
MOVSXD RSI,dword ptr [R15 + 0x10]
LEA RCX,[0x173520]
MOV EDX,0x10
MOV RDI,R14
XOR R8D,R8D
CALL 0x0019bf08
LAB_00172f15:
MOV R14,R15
LAB_00172f18:
LEA RDI,[RBP + -0x318]
XOR ESI,ESI
CALL 0x001a4742
LEA RDI,[RBP + -0x5d0]
XOR ESI,ESI
CALL 0x001a4742
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBX + 0x170],RAX
LAB_00172f3f:
MOV RAX,R14
ADD RSP,0x5b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00172f54:
LEA RDI,[RBP + -0x80]
CALL 0x001a2150
JMP 0x00172e6c
|
int8 *
ft_init_nlq_search(long *param_1,int8 param_2,int8 param_3,int4 param_4,
uint param_5,int8 param_6)
{
int8 uVar1;
uint uVar2;
int iVar3;
long lVar4;
int8 *puVar5;
int8 *puVar6;
ulong uVar7;
ulong uVar8;
int1 local_5d8 [568];
int1 local_3a0 [96];
long *local_340;
uint local_338;
int8 local_330;
long local_328;
int1 local_320 [524];
int local_114;
int8 *local_88 [2];
int local_78;
int8 local_58;
long local_50;
int8 local_48;
long local_40;
uint local_34;
lVar4 = param_1[0x2e];
local_58 = param_6;
local_34 = param_5;
uVar2 = _mi_check_index();
if ((int)uVar2 < 0) {
puVar5 = (int8 *)0x0;
}
else {
puVar5 = (int8 *)0x0;
local_50 = lVar4;
iVar3 = _mi_readinfo(param_1,0,1);
if (iVar3 == 0) {
lVar4 = *(long *)(*param_1 + 0x218);
local_330 = **(int8 **)(lVar4 + 0x28 + (ulong)uVar2 * 0x70);
local_328 = (ulong)*(uint *)(*param_1 + 0x194) + param_1[0x21];
local_48 = *(int8 *)(lVar4 + 0x38 + (ulong)uVar2 * 0x70);
local_340 = param_1;
local_338 = uVar2;
lVar4 = ftparser_call_initializer(param_1,uVar2,0);
puVar5 = (int8 *)0x0;
if (lVar4 != 0) {
local_40 = lVar4;
memset(local_5d8,0,0x298);
uVar7 = 0;
uVar8 = 0;
init_tree(local_320,0,0,0x20,FT_SUPERDOC_cmp,0,0,0);
ft_parse_init(local_5d8,local_330);
lVar4 = local_40;
*(int4 *)(local_40 + 0x34) = 0;
iVar3 = ft_parse(local_5d8,param_3,param_4,local_48,local_40,local_3a0);
puVar5 = (int8 *)0x0;
if (iVar3 == 0) {
iVar3 = tree_walk(local_5d8,walk_and_match,&local_340,0);
puVar5 = (int8 *)0x0;
if (iVar3 == 0) {
if ((ft_query_expansion_limit != 0 & (byte)local_34 >> 2) == 1) {
init_queue(local_88,ft_query_expansion_limit,0,0,FT_DOC_cmp,0,
uVar7 & 0xffffffff00000000,uVar8 & 0xffffffff00000000);
tree_walk(local_320,walk_and_push,local_88,0);
uVar1 = local_58;
do {
do {
if (local_78 == 0) {
delete_queue(local_88);
reset_tree(local_320);
iVar3 = tree_walk(local_5d8,walk_and_match,&local_340,0);
if (iVar3 == 0) goto LAB_00172e7c;
goto LAB_00172e6c;
}
puVar5 = (int8 *)queue_remove(local_88,1);
iVar3 = (*(code *)param_1[0x28])(param_1,*puVar5,uVar1);
} while (iVar3 != 0);
*(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 2;
*(int4 *)(lVar4 + 0x34) = 1;
iVar3 = _mi_ft_parse(local_5d8,param_1,uVar2,uVar1,lVar4,local_3a0);
} while (iVar3 == 0);
delete_queue(local_88);
LAB_00172e6c:
puVar5 = (int8 *)0x0;
}
else {
LAB_00172e7c:
puVar6 = (int8 *)
my_malloc(mi_key_memory_FT_INFO,(long)(local_114 + -1) * 0x10 + 0x28,0);
puVar5 = (int8 *)0x0;
if (puVar6 != (int8 *)0x0) {
*puVar6 = _ft_vft_nlq;
*(int *)(puVar6 + 2) = local_114;
*(int4 *)((long)puVar6 + 0x14) = 0xffffffff;
puVar6[1] = local_340;
local_88[0] = puVar6 + 3;
tree_walk(local_320,walk_and_copy,local_88,0);
puVar5 = puVar6;
if ((local_34 & 2) != 0) {
my_qsort2(puVar6 + 3,(long)*(int *)(puVar6 + 2),0x10,FT_DOC_cmp,0);
}
}
}
}
}
}
delete_tree(local_320,0);
delete_tree(local_5d8,0);
param_1[0x2e] = local_50;
}
}
return puVar5;
}
| |
48,806 | ma_scan_restore_block_record | eloqsql/storage/maria/ma_blockrec.c | int _ma_scan_restore_block_record(MARIA_HA *info,
MARIA_RECORD_POS lastpos)
{
uchar *bitmap_buff;
DBUG_ENTER("_ma_scan_restore_block_record");
info->cur_row.nextpos= lastpos;
bitmap_buff= info->scan.bitmap_buff;
memcpy(&info->scan, info->scan_save, sizeof(*info->scan_save));
info->scan.bitmap_buff= bitmap_buff;
memcpy(bitmap_buff, info->scan_save->bitmap_buff, info->s->block_size * 2);
if (info->scan.row_changes != info->row_changes)
{
/*
Table has been changed. We have to re-read the current page block as
data may have changed on it that we have to see.
*/
if (!(pagecache_read(info->s->pagecache,
&info->dfile,
ma_recordpos_to_page(info->scan.row_base_page),
0, info->scan.page_buff,
info->s->page_type,
PAGECACHE_LOCK_LEFT_UNLOCKED, 0)))
DBUG_RETURN(my_errno);
info->scan.number_of_rows=
(uint) (uchar) info->scan.page_buff[DIR_COUNT_OFFSET];
info->scan.dir_end= (info->scan.page_buff + info->s->block_size -
PAGE_SUFFIX_SIZE -
info->scan.number_of_rows * DIR_ENTRY_SIZE);
}
DBUG_RETURN(0);
} | O0 | c | ma_scan_restore_block_record:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
addq $0x220, %rdi # imm = 0x220
movq -0x10(%rbp), %rax
movq 0x280(%rax), %rsi
movl $0x60, %edx
callq 0x2a090
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x220(%rax)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x280(%rax), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x7bc(%rax), %eax
shll %eax
movl %eax, %eax
movl %eax, %edx
callq 0x2a090
movq -0x10(%rbp), %rax
movq 0x278(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3f0(%rcx), %rax
je 0x59690
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x600(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq $0x470, %rax # imm = 0x470
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x270(%rax), %rdi
callq 0x56710
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x238(%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x7d4(%rax), %r9d
xorl %ecx, %ecx
xorl %eax, %eax
movl $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x3d200
cmpq $0x0, %rax
jne 0x59634
jmp 0x59628
callq 0xf6280
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x59699
movq -0x10(%rbp), %rax
movq 0x238(%rax), %rax
movzbl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x268(%rax)
movq -0x10(%rbp), %rax
movq 0x238(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x7bc(%rax), %eax
addq %rax, %rcx
addq $-0x4, %rcx
movq -0x10(%rbp), %rax
movl 0x268(%rax), %eax
shll $0x2, %eax
movl %eax, %eax
movl %eax, %edx
xorl %eax, %eax
subq %rdx, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x248(%rax)
jmp 0x59692
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_scan_restore_block_record:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+0A0h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+220h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
add rdi, 220h
mov rax, [rbp+var_10]
mov rsi, [rax+280h]
mov edx, 60h ; '`'
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+220h], rcx
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rax, [rax+280h]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+7BCh]
shl eax, 1
mov eax, eax
mov edx, eax
call _memcpy
mov rax, [rbp+var_10]
mov rax, [rax+278h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+3F0h]
jz loc_59690
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+600h]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
add rax, 470h
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rdi, [rax+270h]
call ma_recordpos_to_page
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_28]
mov rdx, rax
mov rax, [rbp+var_10]
mov r8, [rax+238h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov r9d, [rax+7D4h]
xor ecx, ecx
xor eax, eax
mov [rsp+40h+var_40], 0
mov [rsp+40h+var_38], 0
call pagecache_read
cmp rax, 0
jnz short loc_59634
jmp short $+2
loc_59628:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_59699
loc_59634:
mov rax, [rbp+var_10]
mov rax, [rax+238h]
movzx ecx, byte ptr [rax+8]
mov rax, [rbp+var_10]
mov [rax+268h], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+238h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+7BCh]
add rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov rax, [rbp+var_10]
mov eax, [rax+268h]
shl eax, 2
mov eax, eax
mov edx, eax
xor eax, eax
sub rax, rdx
add rcx, rax
mov rax, [rbp+var_10]
mov [rax+248h], rcx
loc_59690:
jmp short $+2
loc_59692:
mov [rbp+var_4], 0
loc_59699:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long ma_scan_restore_block_record(_QWORD *a1, long long a2)
{
unsigned long long v2; // rax
_QWORD *v4; // [rsp+10h] [rbp-30h]
long long v5; // [rsp+20h] [rbp-20h]
a1[20] = a2;
v5 = a1[68];
memcpy(a1 + 68, a1[80], 96LL);
a1[68] = v5;
memcpy(v5, *(_QWORD *)a1[80], (unsigned int)(2 * *(_DWORD *)(*a1 + 1980LL)));
if ( a1[79] == a1[126] )
return 0;
v4 = *(_QWORD **)(*a1 + 1536LL);
v2 = ma_recordpos_to_page(a1[78]);
if ( pagecache_read(v4, (long long)(a1 + 142), v2, 0, a1[71], *(_DWORD *)(*a1 + 2004LL), 0, 0LL) )
{
*((_DWORD *)a1 + 154) = *(unsigned __int8 *)(a1[71] + 8LL);
a1[73] = *(unsigned int *)(*a1 + 1980LL) + a1[71] - 4LL - (unsigned int)(4 * *((_DWORD *)a1 + 154));
return 0;
}
return *(unsigned int *)my_thread_var();
}
| _ma_scan_restore_block_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x220]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x220
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x280]
MOV EDX,0x60
CALL 0x0012a090
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x220],RCX
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x280]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x7bc]
SHL EAX,0x1
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x278]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3f0]
JZ 0x00159690
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x600]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x470
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x270]
CALL 0x00156710
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x238]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV R9D,dword ptr [RAX + 0x7d4]
XOR ECX,ECX
XOR EAX,EAX
MOV dword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
CALL 0x0013d200
CMP RAX,0x0
JNZ 0x00159634
JMP 0x00159628
LAB_00159628:
CALL 0x001f6280
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00159699
LAB_00159634:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x238]
MOVZX ECX,byte ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x268],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x238]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x7bc]
ADD RCX,RAX
ADD RCX,-0x4
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x268]
SHL EAX,0x2
MOV EAX,EAX
MOV EDX,EAX
XOR EAX,EAX
SUB RAX,RDX
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x248],RCX
LAB_00159690:
JMP 0x00159692
LAB_00159692:
MOV dword ptr [RBP + -0x4],0x0
LAB_00159699:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 _ma_scan_restore_block_record(long *param_1,long param_2)
{
void *__dest;
int8 uVar1;
int8 uVar2;
long lVar3;
int4 *puVar4;
param_1[0x14] = param_2;
__dest = (void *)param_1[0x44];
memcpy(param_1 + 0x44,(void *)param_1[0x50],0x60);
param_1[0x44] = (long)__dest;
memcpy(__dest,*(void **)param_1[0x50],(ulong)(uint)(*(int *)(*param_1 + 0x7bc) << 1));
if (param_1[0x4f] != param_1[0x7e]) {
uVar1 = *(int8 *)(*param_1 + 0x600);
uVar2 = ma_recordpos_to_page(param_1[0x4e]);
lVar3 = pagecache_read(uVar1,param_1 + 0x8e,uVar2,0,param_1[0x47],
*(int4 *)(*param_1 + 0x7d4),0,0);
if (lVar3 == 0) {
puVar4 = (int4 *)_my_thread_var();
return *puVar4;
}
*(uint *)(param_1 + 0x4d) = (uint)*(byte *)(param_1[0x47] + 8);
param_1[0x49] =
(param_1[0x47] + (ulong)*(uint *)(*param_1 + 0x7bc) + -4) -
(ulong)(uint)((int)param_1[0x4d] << 2);
}
return 0;
}
| |
48,807 | my_casedn_utf32 | eloqsql/strings/ctype-ucs2.c | static size_t
my_casedn_utf32(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((res= my_utf32_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0)
{
my_tolower_utf32(uni_plane,&wc);
if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_casedn_utf32:
movq %rdx, %rax
cmpq $0x4, %rdx
jl 0xc45bd
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq (%rsi,%rax), %rdx
addq %rcx, %r8
movq 0x78(%rdi), %rdi
addq $0x4, %rcx
movzbl (%rsi), %r9d
shll $0x18, %r9d
movzbl 0x1(%rsi), %r10d
shll $0x10, %r10d
orl %r9d, %r10d
cmpl $0x10ffff, %r10d # imm = 0x10FFFF
ja 0xc45bb
movzbl 0x2(%rsi), %ebx
shll $0x8, %ebx
movzbl 0x3(%rsi), %r9d
orq %r9, %rbx
orq %r10, %rbx
cmpq (%rdi), %rbx
ja 0xc4584
movq 0x8(%rdi), %r10
movl %ebx, %r11d
shrl $0x8, %r11d
movq (%r10,%r11,8), %r10
testq %r10, %r10
je 0xc4584
leaq (%r9,%r9,2), %r9
movl 0x4(%r10,%r9,4), %ebx
cmpq %r8, %rcx
ja 0xc45bb
cmpl $0x10ffff, %ebx # imm = 0x10FFFF
ja 0xc45bb
movb $0x0, -0x4(%rcx)
movl %ebx, %r9d
shrl $0x10, %r9d
movb %r9b, -0x3(%rcx)
movb %bh, -0x2(%rcx)
movb %bl, -0x1(%rcx)
leaq 0x8(%rsi), %r9
addq $0x4, %rcx
addq $0x4, %rsi
cmpq %rdx, %r9
jbe 0xc4533
popq %rbx
popq %rbp
retq
| my_casedn_utf32:
mov rax, rdx
cmp rdx, 4
jl locret_C45BD
push rbp
mov rbp, rsp
push rbx
lea rdx, [rsi+rax]
add r8, rcx
mov rdi, [rdi+78h]
add rcx, 4
loc_C4533:
movzx r9d, byte ptr [rsi]
shl r9d, 18h
movzx r10d, byte ptr [rsi+1]
shl r10d, 10h
or r10d, r9d
cmp r10d, offset unk_10FFFF
ja short loc_C45BB
movzx ebx, byte ptr [rsi+2]
shl ebx, 8
movzx r9d, byte ptr [rsi+3]
or rbx, r9
or rbx, r10
cmp rbx, [rdi]
ja short loc_C4584
mov r10, [rdi+8]
mov r11d, ebx
shr r11d, 8
mov r10, [r10+r11*8]
test r10, r10
jz short loc_C4584
lea r9, [r9+r9*2]
mov ebx, [r10+r9*4+4]
loc_C4584:
cmp rcx, r8
ja short loc_C45BB
cmp ebx, offset unk_10FFFF
ja short loc_C45BB
mov byte ptr [rcx-4], 0
mov r9d, ebx
shr r9d, 10h
mov [rcx-3], r9b
mov [rcx-2], bh
mov [rcx-1], bl
lea r9, [rsi+8]
add rcx, 4
add rsi, 4
cmp r9, rdx
jbe loc_C4533
loc_C45BB:
pop rbx
pop rbp
locret_C45BD:
retn
| long long my_casedn_utf32(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5)
{
long long result; // rax
unsigned __int8 *v6; // rdx
unsigned long long v7; // r8
unsigned long long *v8; // rdi
unsigned long long v9; // rcx
long long v10; // r10
long long v11; // r9
unsigned long long v12; // rbx
long long v13; // r10
unsigned __int8 *v14; // r9
result = a3;
if ( a3 >= 4 )
{
v6 = &a2[a3];
v7 = a4 + a5;
v8 = *(unsigned long long **)(a1 + 120);
v9 = a4 + 4;
do
{
v10 = (*a2 << 24) | (a2[1] << 16);
if ( (unsigned int)v10 > (unsigned int)&unk_10FFFF )
break;
v11 = a2[3];
v12 = v10 | v11 | (a2[2] << 8);
if ( v12 <= *v8 )
{
v13 = *(_QWORD *)(v8[1] + 8LL * ((unsigned int)v12 >> 8));
if ( v13 )
LODWORD(v12) = *(_DWORD *)(v13 + 12 * v11 + 4);
}
if ( v9 > v7 )
break;
if ( (unsigned int)v12 > (unsigned int)&unk_10FFFF )
break;
*(_BYTE *)(v9 - 4) = 0;
*(_BYTE *)(v9 - 3) = BYTE2(v12);
*(_BYTE *)(v9 - 2) = BYTE1(v12);
*(_BYTE *)(v9 - 1) = v12;
v14 = a2 + 8;
v9 += 4LL;
a2 += 4;
}
while ( v14 <= v6 );
}
return result;
}
| my_casedn_utf32:
MOV RAX,RDX
CMP RDX,0x4
JL 0x001c45bd
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDX,[RSI + RAX*0x1]
ADD R8,RCX
MOV RDI,qword ptr [RDI + 0x78]
ADD RCX,0x4
LAB_001c4533:
MOVZX R9D,byte ptr [RSI]
SHL R9D,0x18
MOVZX R10D,byte ptr [RSI + 0x1]
SHL R10D,0x10
OR R10D,R9D
CMP R10D,0x10ffff
JA 0x001c45bb
MOVZX EBX,byte ptr [RSI + 0x2]
SHL EBX,0x8
MOVZX R9D,byte ptr [RSI + 0x3]
OR RBX,R9
OR RBX,R10
CMP RBX,qword ptr [RDI]
JA 0x001c4584
MOV R10,qword ptr [RDI + 0x8]
MOV R11D,EBX
SHR R11D,0x8
MOV R10,qword ptr [R10 + R11*0x8]
TEST R10,R10
JZ 0x001c4584
LEA R9,[R9 + R9*0x2]
MOV EBX,dword ptr [R10 + R9*0x4 + 0x4]
LAB_001c4584:
CMP RCX,R8
JA 0x001c45bb
CMP EBX,0x10ffff
JA 0x001c45bb
MOV byte ptr [RCX + -0x4],0x0
MOV R9D,EBX
SHR R9D,0x10
MOV byte ptr [RCX + -0x3],R9B
MOV byte ptr [RCX + -0x2],BH
MOV byte ptr [RCX + -0x1],BL
LEA R9,[RSI + 0x8]
ADD RCX,0x4
ADD RSI,0x4
CMP R9,RDX
JBE 0x001c4533
LAB_001c45bb:
POP RBX
POP RBP
LAB_001c45bd:
RET
|
void my_casedn_utf32(long param_1,byte *param_2,long param_3,long param_4,long param_5)
{
byte *pbVar1;
byte *pbVar2;
ulong *puVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
uint uVar7;
if (3 < param_3) {
pbVar2 = param_2 + param_3;
puVar3 = *(ulong **)(param_1 + 0x78);
uVar5 = param_4 + 4;
while (uVar7 = (uint)param_2[1] << 0x10 | (uint)*param_2 << 0x18, uVar7 < 0x110000) {
uVar6 = (ulong)CONCAT11(param_2[2],param_2[3]) | (ulong)uVar7;
if ((uVar6 <= *puVar3) && (lVar4 = *(long *)(puVar3[1] + (uVar6 >> 8) * 8), lVar4 != 0)) {
uVar6 = (ulong)*(uint *)(lVar4 + 4 + (ulong)param_2[3] * 0xc);
}
if ((ulong)(param_5 + param_4) < uVar5) {
return;
}
if (0x10ffff < (uint)uVar6) {
return;
}
*(int1 *)(uVar5 - 4) = 0;
*(char *)(uVar5 - 3) = (char)(uVar6 >> 0x10);
*(char *)(uVar5 - 2) = (char)(uVar6 >> 8);
*(char *)(uVar5 - 1) = (char)uVar6;
pbVar1 = param_2 + 8;
uVar5 = uVar5 + 4;
param_2 = param_2 + 4;
if (pbVar2 < pbVar1) {
return;
}
}
}
return;
}
| |
48,808 | translog_assign_id_to_share | eloqsql/storage/maria/ma_loghandler.c | int translog_assign_id_to_share(MARIA_HA *tbl_info, TRN *trn)
{
uint16 id;
MARIA_SHARE *share= tbl_info->s;
/*
If you give an id to a non-BLOCK_RECORD table, you also need to release
this id somewhere. Then you can change the assertion.
*/
DBUG_ASSERT(share->data_file_type == BLOCK_RECORD);
/* re-check under mutex to avoid having 2 ids for the same share */
mysql_mutex_lock(&share->intern_lock);
if (unlikely(share->id == 0))
{
LSN lsn;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2];
uchar log_data[FILEID_STORE_SIZE];
/* Inspired by set_short_trid() of trnman.c */
uint i= share->kfile.file % SHARE_ID_MAX + 1;
id= 0;
do
{
for ( ; i <= SHARE_ID_MAX ; i++) /* the range is [1..SHARE_ID_MAX] */
{
void *tmp= NULL;
if (id_to_share[i] == NULL &&
my_atomic_casptr((void **)&id_to_share[i], &tmp, share))
{
id= (uint16) i;
break;
}
}
i= 1; /* scan the whole array */
} while (id == 0);
DBUG_PRINT("info", ("id_to_share: %p -> %u", share, id));
fileid_store(log_data, id);
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data);
/*
open_file_name is an unresolved name (symlinks are not resolved, datadir
is not realpath-ed, etc) which is good: the log can be moved to another
directory and continue working.
*/
log_array[TRANSLOG_INTERNAL_PARTS + 1].str=
(uchar *)share->open_file_name.str;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length=
share->open_file_name.length + 1;
/*
We can't unlock share->intern_lock before the log entry is written to
ensure no one uses the id before it's logged.
*/
if (unlikely(translog_write_record(&lsn, LOGREC_FILE_ID, trn, tbl_info,
(translog_size_t)
(sizeof(log_data) +
log_array[TRANSLOG_INTERNAL_PARTS +
1].length),
sizeof(log_array)/sizeof(log_array[0]),
log_array, NULL, NULL)))
{
mysql_mutex_unlock(&share->intern_lock);
return 1;
}
/*
Now when translog record is done, we can set share->id.
If we set it before, then translog_write_record may pick up the id
before it's written to the log.
*/
share->id= id;
share->state.logrec_file_id= lsn;
}
mysql_mutex_unlock(&share->intern_lock);
return 0;
} | O3 | c | translog_assign_id_to_share:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %r12
leaq 0x8f0(%r12), %rbx
cmpq $0x0, 0x930(%r12)
jne 0x470c7
movq %rbx, %rdi
callq 0x29210
cmpw $0x0, 0x620(%r12)
je 0x470dd
movq 0x930(%r12), %rdi
testq %rdi, %rdi
jne 0x471c6
movq %rbx, %rdi
callq 0x291e0
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x91b9a(%rip), %rsi # 0xd8c68
movq %rbx, %rdi
movl $0x206a, %edx # imm = 0x206A
callq 0x2eb6f
jmp 0x47091
movslq 0x760(%r12), %rax
imulq $-0x7fff7fff, %rax, %rcx # imm = 0x80008001
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0xf, %ecx
addl %edx, %ecx
movl %ecx, %edx
shll $0x10, %edx
subl %edx, %ecx
addl %ecx, %eax
incl %eax
cmpl $0xffff, %eax # imm = 0xFFFF
ja 0x4713c
movl %eax, %r13d
movq 0xbb6f60(%rip), %rcx # 0xbfe078
cmpq $0x0, (%rcx,%r13,8)
jne 0x47130
xorl %eax, %eax
lock
cmpxchgq %r12, (%rcx,%r13,8)
je 0x4713f
movq 0xbb6f48(%rip), %rcx # 0xbfe078
incq %r13
cmpl $0x10000, %r13d # imm = 0x10000
jne 0x47118
xorl %r13d, %r13d
movl $0x1, %eax
testw %r13w, %r13w
je 0x47107
leaq -0x2a(%rbp), %rax
movw %r13w, (%rax)
leaq -0x80(%rbp), %rcx
movq %rax, 0x20(%rcx)
movq $0x2, 0x28(%rcx)
movq 0x5e0(%r12), %rax
movq %rax, 0x30(%rcx)
movq 0x5e8(%r12), %r8
leaq 0x1(%r8), %rax
movq %rax, 0x38(%rcx)
addl $0x3, %r8d
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movq %rcx, (%rsp)
leaq -0x38(%rbp), %rdi
movl $0x23, %esi
movq %r15, %rdx
movq %r14, %rcx
movl $0x4, %r9d
callq 0x2a88c
testb %al, %al
jne 0x471db
movw %r13w, 0x620(%r12)
movq -0x38(%rbp), %rax
movq %rax, 0x190(%r12)
jmp 0x4709d
leaq 0x33de43(%rip), %rax # 0x385010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x470ae
movq 0x930(%r12), %rdi
testq %rdi, %rdi
jne 0x471fa
movq %rbx, %rdi
callq 0x291e0
movl $0x1, %eax
jmp 0x470b8
leaq 0x33de0f(%rip), %rax # 0x385010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x471e8
| translog_assign_id_to_share:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r15, rsi
mov r14, rdi
mov r12, [rdi]
lea rbx, [r12+8F0h]
cmp qword ptr [r12+930h], 0
jnz short loc_470C7
mov rdi, rbx
call _pthread_mutex_lock
loc_47091:
cmp word ptr [r12+620h], 0
jz short loc_470DD
loc_4709D:
mov rdi, [r12+930h]
test rdi, rdi
jnz loc_471C6
loc_470AE:
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
loc_470B8:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_470C7:
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 206Ah
call psi_mutex_lock
jmp short loc_47091
loc_470DD:
movsxd rax, dword ptr [r12+760h]
imul rcx, rax, 0FFFFFFFF80008001h
shr rcx, 20h
add ecx, eax
mov edx, ecx
shr edx, 1Fh
sar ecx, 0Fh
add ecx, edx
mov edx, ecx
shl edx, 10h
sub ecx, edx
add eax, ecx
inc eax
loc_47107:
cmp eax, 0FFFFh
ja short loc_4713C
mov r13d, eax
mov rcx, cs:id_to_share
loc_47118:
cmp qword ptr [rcx+r13*8], 0
jnz short loc_47130
xor eax, eax
lock cmpxchg [rcx+r13*8], r12
jz short loc_4713F
mov rcx, cs:id_to_share
loc_47130:
inc r13
cmp r13d, 10000h
jnz short loc_47118
loc_4713C:
xor r13d, r13d
loc_4713F:
mov eax, 1
test r13w, r13w
jz short loc_47107
lea rax, [rbp+var_2A]
mov [rax], r13w
lea rcx, [rbp+var_80]
mov [rcx+20h], rax
mov qword ptr [rcx+28h], 2
mov rax, [r12+5E0h]
mov [rcx+30h], rax
mov r8, [r12+5E8h]
lea rax, [r8+1]
mov [rcx+38h], rax
add r8d, 3
xorps xmm0, xmm0
movups [rsp+0A0h+var_98], xmm0
mov [rsp+0A0h+var_A0], rcx
lea rdi, [rbp+var_38]
mov esi, 23h ; '#'
mov rdx, r15
mov rcx, r14
mov r9d, 4
call translog_write_record
test al, al
jnz short loc_471DB
mov [r12+620h], r13w
mov rax, [rbp+var_38]
mov [r12+190h], rax
jmp loc_4709D
loc_471C6:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_470AE
loc_471DB:
mov rdi, [r12+930h]
test rdi, rdi
jnz short loc_471FA
loc_471E8:
mov rdi, rbx
call _pthread_mutex_unlock
mov eax, 1
jmp loc_470B8
loc_471FA:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_471E8
| long long translog_assign_id_to_share(signed long long *a1, long long a2)
{
signed long long v2; // r12
long long v3; // rbx
unsigned int v5; // eax
long long v6; // r13
long long v7; // rcx
long long v8; // r8
__int128 v9; // [rsp+20h] [rbp-80h] BYREF
__int16 *v10; // [rsp+40h] [rbp-60h]
long long v11; // [rsp+48h] [rbp-58h]
long long v12; // [rsp+50h] [rbp-50h]
long long v13; // [rsp+58h] [rbp-48h]
long long v14; // [rsp+68h] [rbp-38h] BYREF
__int16 v15; // [rsp+76h] [rbp-2Ah] BYREF
v2 = *a1;
v3 = *a1 + 2288;
if ( *(_QWORD *)(*a1 + 2352) )
psi_mutex_lock(
*a1 + 2288,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x206Au);
else
pthread_mutex_lock(*a1 + 2288);
if ( *(_WORD *)(v2 + 1568) )
{
LABEL_4:
if ( *(_QWORD *)(v2 + 2352) )
PSI_server[44]();
pthread_mutex_unlock(v3);
return 0LL;
}
v5 = *(_DWORD *)(v2 + 1888) % 0xFFFF + 1;
do
{
if ( v5 <= 0xFFFF )
{
v6 = v5;
v7 = id_to_share;
do
{
if ( !*(_QWORD *)(v7 + 8 * v6) )
{
if ( !_InterlockedCompareExchange64((volatile signed long long *)(v7 + 8 * v6), v2, 0LL) )
goto LABEL_16;
v7 = id_to_share;
}
++v6;
}
while ( (_DWORD)v6 != 0x10000 );
}
LOWORD(v6) = 0;
LABEL_16:
v5 = 1;
}
while ( !(_WORD)v6 );
v15 = v6;
v10 = &v15;
v11 = 2LL;
v12 = *(_QWORD *)(v2 + 1504);
v8 = *(_QWORD *)(v2 + 1512);
v13 = v8 + 1;
if ( !(unsigned __int8)translog_write_record(
(unsigned long long)&v14,
(long long *)((char *)&qword_20 + 3),
a2,
a1,
(int)v8 + 3,
4,
&v9,
0LL,
0LL) )
{
*(_WORD *)(v2 + 1568) = v6;
*(_QWORD *)(v2 + 400) = v14;
goto LABEL_4;
}
if ( *(_QWORD *)(v2 + 2352) )
PSI_server[44]();
pthread_mutex_unlock(v3);
return 1LL;
}
| translog_assign_id_to_share:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R15,RSI
MOV R14,RDI
MOV R12,qword ptr [RDI]
LEA RBX,[R12 + 0x8f0]
CMP qword ptr [R12 + 0x930],0x0
JNZ 0x001470c7
MOV RDI,RBX
CALL 0x00129210
LAB_00147091:
CMP word ptr [R12 + 0x620],0x0
JZ 0x001470dd
LAB_0014709d:
MOV RDI,qword ptr [R12 + 0x930]
TEST RDI,RDI
JNZ 0x001471c6
LAB_001470ae:
MOV RDI,RBX
CALL 0x001291e0
XOR EAX,EAX
LAB_001470b8:
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001470c7:
LEA RSI,[0x1d8c68]
MOV RDI,RBX
MOV EDX,0x206a
CALL 0x0012eb6f
JMP 0x00147091
LAB_001470dd:
MOVSXD RAX,dword ptr [R12 + 0x760]
IMUL RCX,RAX,-0x7fff7fff
SHR RCX,0x20
ADD ECX,EAX
MOV EDX,ECX
SHR EDX,0x1f
SAR ECX,0xf
ADD ECX,EDX
MOV EDX,ECX
SHL EDX,0x10
SUB ECX,EDX
ADD EAX,ECX
INC EAX
LAB_00147107:
CMP EAX,0xffff
JA 0x0014713c
MOV R13D,EAX
MOV RCX,qword ptr [0x00cfe078]
LAB_00147118:
CMP qword ptr [RCX + R13*0x8],0x0
JNZ 0x00147130
XOR EAX,EAX
CMPXCHG.LOCK qword ptr [RCX + R13*0x8],R12
JZ 0x0014713f
MOV RCX,qword ptr [0x00cfe078]
LAB_00147130:
INC R13
CMP R13D,0x10000
JNZ 0x00147118
LAB_0014713c:
XOR R13D,R13D
LAB_0014713f:
MOV EAX,0x1
TEST R13W,R13W
JZ 0x00147107
LEA RAX,[RBP + -0x2a]
MOV word ptr [RAX],R13W
LEA RCX,[RBP + -0x80]
MOV qword ptr [RCX + 0x20],RAX
MOV qword ptr [RCX + 0x28],0x2
MOV RAX,qword ptr [R12 + 0x5e0]
MOV qword ptr [RCX + 0x30],RAX
MOV R8,qword ptr [R12 + 0x5e8]
LEA RAX,[R8 + 0x1]
MOV qword ptr [RCX + 0x38],RAX
ADD R8D,0x3
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x8],XMM0
MOV qword ptr [RSP],RCX
LEA RDI,[RBP + -0x38]
MOV ESI,0x23
MOV RDX,R15
MOV RCX,R14
MOV R9D,0x4
CALL 0x0012a88c
TEST AL,AL
JNZ 0x001471db
MOV word ptr [R12 + 0x620],R13W
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [R12 + 0x190],RAX
JMP 0x0014709d
LAB_001471c6:
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001470ae
LAB_001471db:
MOV RDI,qword ptr [R12 + 0x930]
TEST RDI,RDI
JNZ 0x001471fa
LAB_001471e8:
MOV RDI,RBX
CALL 0x001291e0
MOV EAX,0x1
JMP 0x001470b8
LAB_001471fa:
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001471e8
|
int8 translog_assign_id_to_share(long *param_1,int8 param_2)
{
long *plVar1;
pthread_mutex_t *__mutex;
long lVar2;
char cVar3;
long lVar4;
short sVar5;
ulong uVar6;
ulong uVar7;
bool bVar8;
int1 local_88 [32];
short *local_68;
int8 local_60;
int8 local_58;
long local_50;
int8 local_40;
short local_32;
lVar2 = *param_1;
__mutex = (pthread_mutex_t *)(lVar2 + 0x8f0);
if (*(long *)(lVar2 + 0x930) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x206a);
}
if (*(short *)(lVar2 + 0x620) == 0) {
uVar6 = (ulong)(*(int *)(lVar2 + 0x760) % 0xffff + 1);
do {
lVar4 = id_to_share;
if ((uint)uVar6 < 0x10000) {
do {
if (*(long *)(lVar4 + uVar6 * 8) == 0) {
plVar1 = (long *)(lVar4 + uVar6 * 8);
LOCK();
bVar8 = *plVar1 == 0;
if (bVar8) {
*plVar1 = lVar2;
}
UNLOCK();
lVar4 = id_to_share;
uVar7 = uVar6;
if (bVar8) goto LAB_0014713f;
}
uVar6 = uVar6 + 1;
} while ((int)uVar6 != 0x10000);
}
uVar7 = 0;
LAB_0014713f:
uVar6 = 1;
sVar5 = (short)uVar7;
} while (sVar5 == 0);
local_68 = &local_32;
local_60 = 2;
local_58 = *(int8 *)(lVar2 + 0x5e0);
local_50 = *(long *)(lVar2 + 0x5e8) + 1;
local_32 = sVar5;
cVar3 = translog_write_record
(&local_40,0x23,param_2,param_1,(int)*(long *)(lVar2 + 0x5e8) + 3,4,local_88,0
,0);
if (cVar3 != '\0') {
if (*(long *)(lVar2 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return 1;
}
*(short *)(lVar2 + 0x620) = sVar5;
*(int8 *)(lVar2 + 400) = local_40;
}
if (*(long *)(lVar2 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return 0;
}
| |
48,809 | test_selecttmp | eloqsql/tests/mysql_client_test.c | static void test_selecttmp()
{
MYSQL_STMT *stmt;
int rc, i;
const char *query= "select a, (select count(distinct t1.b) as sum from t1, t2 where t1.a=t2.a and t2.b > 0 and t1.a <= t3.b group by t1.a order by sum limit 1) from t3";
myheader("test_select_tmp");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1, t2, t3");
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE t1 (a int , b int);");
myquery(rc);
rc= mysql_query(mysql, "create table t2 (a int, b int);");
myquery(rc);
rc= mysql_query(mysql, "create table t3 (a int, b int);");
myquery(rc);
rc= mysql_query(mysql,
"insert into t1 values (0, 100), (1, 2), (1, 3), (2, 2), (2, 7), \
(2, -1), (3, 10);");
myquery(rc);
rc= mysql_query(mysql,
"insert into t2 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1);");
myquery(rc);
rc= mysql_query(mysql,
"insert into t3 values (3, 3), (2, 2), (1, 1);");
myquery(rc);
stmt= mysql_simple_prepare(mysql, query);
check_stmt(stmt);
for (i= 0; i < 3; i++)
{
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
DIE_UNLESS(rc == 3);
}
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP TABLE t1, t2, t3");
myquery(rc);
} | O0 | c | test_selecttmp:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0xd3b2b(%rip), %rax # 0x138a2a
movq %rax, -0x18(%rbp)
jmp 0x64f05
movsbl 0x4055c5(%rip), %eax # 0x46a4d1
cmpl $0x2, %eax
jge 0x64f8d
movq 0x24a0c0(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0xc9402(%rip), %rsi # 0x12e324
movb $0x0, %al
callq 0x3a1c0
movq 0x24a0a8(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
movl 0x4057e3(%rip), %edx # 0x46a71c
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x4057d8(%rip) # 0x46a71c
movl 0x4057ce(%rip), %ecx # 0x46a718
movl 0x4055ab(%rip), %r8d # 0x46a4fc
leaq 0xca6d4(%rip), %rsi # 0x12f62c
leaq 0xd3b5f(%rip), %r9 # 0x138abe
movb $0x0, %al
callq 0x3a1c0
movq 0x24a06b(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0xc93e5(%rip), %rsi # 0x12e35c
movb $0x0, %al
callq 0x3a1c0
movq 0x24a053(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
callq 0x3a4a0
movq 0x405544(%rip), %rdi # 0x46a4d8
leaq 0xd3b33(%rip), %rsi # 0x138ace
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x64fb8
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x1c(%rbp)
jne 0x64fc0
jmp 0x64fd8
leaq 0xc8c45(%rip), %rdi # 0x12dc0c
movl $0x25fa, %esi # imm = 0x25FA
leaq 0xdef9c(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x4054f9(%rip), %rdi # 0x46a4d8
leaq 0xd335c(%rip), %rsi # 0x138342
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x65003
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x20(%rbp)
jne 0x6500b
jmp 0x65023
leaq 0xc8bfa(%rip), %rdi # 0x12dc0c
movl $0x25fd, %esi # imm = 0x25FD
leaq 0xdef51(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x4054ae(%rip), %rdi # 0x46a4d8
leaq 0xd3abd(%rip), %rsi # 0x138aee
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x6504e
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x24(%rbp)
jne 0x65056
jmp 0x6506e
leaq 0xc8baf(%rip), %rdi # 0x12dc0c
movl $0x2600, %esi # imm = 0x2600
leaq 0xdef06(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x405463(%rip), %rdi # 0x46a4d8
leaq 0xd3a92(%rip), %rsi # 0x138b0e
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x65099
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x28(%rbp)
jne 0x650a1
jmp 0x650b9
leaq 0xc8b64(%rip), %rdi # 0x12dc0c
movl $0x2603, %esi # imm = 0x2603
leaq 0xdeebb(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x405418(%rip), %rdi # 0x46a4d8
leaq 0xd3a67(%rip), %rsi # 0x138b2e
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x650e4
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x2c(%rbp)
jne 0x650ec
jmp 0x65104
leaq 0xc8b19(%rip), %rdi # 0x12dc0c
movl $0x2608, %esi # imm = 0x2608
leaq 0xdee70(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x4053cd(%rip), %rdi # 0x46a4d8
leaq 0xd3a6e(%rip), %rsi # 0x138b80
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x6512f
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x30(%rbp)
jne 0x65137
jmp 0x6514f
leaq 0xc8ace(%rip), %rdi # 0x12dc0c
movl $0x260b, %esi # imm = 0x260B
leaq 0xdee25(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x405382(%rip), %rdi # 0x46a4d8
leaq 0xd3a61(%rip), %rsi # 0x138bbe
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x6517a
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x34(%rbp)
jne 0x65182
jmp 0x6519a
leaq 0xc8a83(%rip), %rdi # 0x12dc0c
movl $0x260e, %esi # imm = 0x260E
leaq 0xdedda(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x405337(%rip), %rdi # 0x46a4d8
movq -0x18(%rbp), %rsi
callq 0x3be90
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x651be
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpq $0x0, -0x8(%rbp)
je 0x651c7
jmp 0x651df
leaq 0xc8a3e(%rip), %rdi # 0x12dc0c
movl $0x2611, %esi # imm = 0x2611
leaq 0xc8790(%rip), %rdx # 0x12d96a
callq 0x3c010
movl $0x0, -0x10(%rbp)
cmpl $0x3, -0x10(%rbp)
jge 0x65262
movq -0x8(%rbp), %rdi
callq 0x3b8a0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x6520b
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xc(%rbp)
jne 0x65213
jmp 0x6522b
leaq 0xc89f2(%rip), %rdi # 0x12dc0c
movl $0x2615, %esi # imm = 0x2615
leaq 0xd45e6(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3c1c0
movl %eax, -0xc(%rbp)
cmpl $0x3, -0xc(%rbp)
jne 0x6523f
jmp 0x65257
leaq 0xc89c6(%rip), %rdi # 0x12dc0c
movl $0x2617, %esi # imm = 0x2617
leaq 0xcaf2b(%rip), %rdx # 0x13017d
callq 0x3c010
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x651e6
movq -0x8(%rbp), %rdi
callq 0x3b9f0
movq 0x405266(%rip), %rdi # 0x46a4d8
leaq 0xd3973(%rip), %rsi # 0x138bec
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
je 0x65296
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x38(%rbp)
jne 0x6529e
jmp 0x652b6
leaq 0xc8967(%rip), %rdi # 0x12dc0c
movl $0x261c, %esi # imm = 0x261C
leaq 0xdecbe(%rip), %rdx # 0x143f6f
callq 0x3c010
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| test_selecttmp:
push rbp
mov rbp, rsp
sub rsp, 40h
lea rax, aSelectASelectC; "select a, (select count(distinct t1.b) "...
mov [rbp+var_18], rax
jmp short $+2
loc_64F05:
movsx eax, cs:opt_silent
cmp eax, 2
jge short loc_64F8D
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E324; "\n\n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov edx, cs:test_count
mov eax, edx
add eax, 1
mov cs:test_count, eax
mov ecx, cs:iter_count
mov r8d, cs:opt_count
lea rsi, aUOfUUS; "%u of (%u/%u): %s"
lea r9, aTestSelectTmp; "test_select_tmp"
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E35C; " \n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
loc_64F8D:
mov rdi, cs:mysql
lea rsi, aDropTableIfExi_64; "DROP TABLE IF EXISTS t1, t2, t3"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_64FB8
xor eax, eax
mov edi, eax
call print_error
loc_64FB8:
cmp [rbp+var_1C], 0
jnz short loc_64FC0
jmp short loc_64FD8
loc_64FC0:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 25FAh
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_64FD8:
mov rdi, cs:mysql
lea rsi, aCreateTableT1A_4; "CREATE TABLE t1 (a int , b int);"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_20], eax
cmp [rbp+var_20], 0
jz short loc_65003
xor eax, eax
mov edi, eax
call print_error
loc_65003:
cmp [rbp+var_20], 0
jnz short loc_6500B
jmp short loc_65023
loc_6500B:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 25FDh
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_65023:
mov rdi, cs:mysql
lea rsi, aCreateTableT2A_0; "create table t2 (a int, b int);"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jz short loc_6504E
xor eax, eax
mov edi, eax
call print_error
loc_6504E:
cmp [rbp+var_24], 0
jnz short loc_65056
jmp short loc_6506E
loc_65056:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2600h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_6506E:
mov rdi, cs:mysql
lea rsi, aCreateTableT3A; "create table t3 (a int, b int);"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_28], eax
cmp [rbp+var_28], 0
jz short loc_65099
xor eax, eax
mov edi, eax
call print_error
loc_65099:
cmp [rbp+var_28], 0
jnz short loc_650A1
jmp short loc_650B9
loc_650A1:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2603h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_650B9:
mov rdi, cs:mysql
lea rsi, aInsertIntoT1Va_10; "insert into t1 values (0, 100), (1, 2),"...
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jz short loc_650E4
xor eax, eax
mov edi, eax
call print_error
loc_650E4:
cmp [rbp+var_2C], 0
jnz short loc_650EC
jmp short loc_65104
loc_650EC:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2608h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_65104:
mov rdi, cs:mysql
lea rsi, aInsertIntoT2Va_0; "insert into t2 values (0, 0), (1, 1), ("...
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_30], eax
cmp [rbp+var_30], 0
jz short loc_6512F
xor eax, eax
mov edi, eax
call print_error
loc_6512F:
cmp [rbp+var_30], 0
jnz short loc_65137
jmp short loc_6514F
loc_65137:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 260Bh
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_6514F:
mov rdi, cs:mysql
lea rsi, aInsertIntoT3Va; "insert into t3 values (3, 3), (2, 2), ("...
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jz short loc_6517A
xor eax, eax
mov edi, eax
call print_error
loc_6517A:
cmp [rbp+var_34], 0
jnz short loc_65182
jmp short loc_6519A
loc_65182:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 260Eh
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_6519A:
mov rdi, cs:mysql
mov rsi, [rbp+var_18]
call mysql_simple_prepare
mov [rbp+var_8], rax
cmp [rbp+var_8], 0
jnz short loc_651BE
xor eax, eax
mov edi, eax
call print_error
loc_651BE:
cmp [rbp+var_8], 0
jz short loc_651C7
jmp short loc_651DF
loc_651C7:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2611h
lea rdx, aStmt0; "stmt != 0"
call die
loc_651DF:
mov [rbp+var_10], 0
loc_651E6:
cmp [rbp+var_10], 3
jge short loc_65262
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_execute
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_6520B
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call print_st_error
loc_6520B:
cmp [rbp+var_C], 0
jnz short loc_65213
jmp short loc_6522B
loc_65213:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2615h
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_6522B:
mov rdi, [rbp+var_8]
call my_process_stmt_result
mov [rbp+var_C], eax
cmp [rbp+var_C], 3
jnz short loc_6523F
jmp short loc_65257
loc_6523F:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2617h
lea rdx, aRc3; "rc == 3"
call die
loc_65257:
mov eax, [rbp+var_10]
add eax, 1
mov [rbp+var_10], eax
jmp short loc_651E6
loc_65262:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_close
mov rdi, cs:mysql
lea rsi, aDropTableT1T2T; "DROP TABLE t1, t2, t3"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_38], eax
cmp [rbp+var_38], 0
jz short loc_65296
xor eax, eax
mov edi, eax
call print_error
loc_65296:
cmp [rbp+var_38], 0
jnz short loc_6529E
jmp short loc_652B6
loc_6529E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 261Ch
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_652B6:
add rsp, 40h
pop rbp
retn
| void test_selecttmp()
{
int v0; // edx
int i; // [rsp+30h] [rbp-10h]
long long v2; // [rsp+38h] [rbp-8h]
if ( opt_silent < 2 )
{
fprintf(stdout, "\n\n#####################################\n");
v0 = test_count++;
fprintf(stdout, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_select_tmp");
fprintf(stdout, " \n#####################################\n");
fflush(stdout);
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"DROP TABLE IF EXISTS t1, t2, t3") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9722, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"CREATE TABLE t1 (a int , b int);") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9725, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"create table t2 (a int, b int);") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9728, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"create table t3 (a int, b int);") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9731, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(
mysql,
(long long)"insert into t1 values (0, 100), (1, 2), (1, 3), (2, 2), (2, 7), (2, -1), (3, 10);") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9736, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"insert into t2 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1);") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9739, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"insert into t3 values (3, 3), (2, 2), (1, 1);") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9742, "r == 0");
}
v2 = mysql_simple_prepare(
mysql,
(long long)"select a, (select count(distinct t1.b) as sum from t1, t2 where t1.a=t2.a and t2.b > 0 and t1.a <= t3."
"b group by t1.a order by sum limit 1) from t3");
if ( !v2 )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9745, "stmt != 0");
}
for ( i = 0; i < 3; ++i )
{
if ( (unsigned int)wrap_mysql_stmt_execute(v2) )
{
print_st_error(v2, 0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9749, "rc == 0");
}
if ( (unsigned int)my_process_stmt_result(v2) != 3 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9751, "rc == 3");
}
wrap_mysql_stmt_close(v2);
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"DROP TABLE t1, t2, t3") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9756, "r == 0");
}
}
| test_selecttmp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
LEA RAX,[0x238a2a]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00164f05
LAB_00164f05:
MOVSX EAX,byte ptr [0x0056a4d1]
CMP EAX,0x2
JGE 0x00164f8d
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e324]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [0x0056a71c]
MOV EAX,EDX
ADD EAX,0x1
MOV dword ptr [0x0056a71c],EAX
MOV ECX,dword ptr [0x0056a718]
MOV R8D,dword ptr [0x0056a4fc]
LEA RSI,[0x22f62c]
LEA R9,[0x238abe]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e35c]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
CALL 0x0013a4a0
LAB_00164f8d:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x238ace]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00164fb8
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00164fb8:
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x00164fc0
JMP 0x00164fd8
LAB_00164fc0:
LEA RDI,[0x22dc0c]
MOV ESI,0x25fa
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00164fd8:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x238342]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x20],EAX
CMP dword ptr [RBP + -0x20],0x0
JZ 0x00165003
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00165003:
CMP dword ptr [RBP + -0x20],0x0
JNZ 0x0016500b
JMP 0x00165023
LAB_0016500b:
LEA RDI,[0x22dc0c]
MOV ESI,0x25fd
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00165023:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x238aee]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JZ 0x0016504e
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0016504e:
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x00165056
JMP 0x0016506e
LAB_00165056:
LEA RDI,[0x22dc0c]
MOV ESI,0x2600
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0016506e:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x238b0e]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x28],0x0
JZ 0x00165099
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00165099:
CMP dword ptr [RBP + -0x28],0x0
JNZ 0x001650a1
JMP 0x001650b9
LAB_001650a1:
LEA RDI,[0x22dc0c]
MOV ESI,0x2603
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_001650b9:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x238b2e]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x001650e4
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_001650e4:
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x001650ec
JMP 0x00165104
LAB_001650ec:
LEA RDI,[0x22dc0c]
MOV ESI,0x2608
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00165104:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x238b80]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x30],EAX
CMP dword ptr [RBP + -0x30],0x0
JZ 0x0016512f
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0016512f:
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x00165137
JMP 0x0016514f
LAB_00165137:
LEA RDI,[0x22dc0c]
MOV ESI,0x260b
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0016514f:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x238bbe]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x0
JZ 0x0016517a
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0016517a:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x00165182
JMP 0x0016519a
LAB_00165182:
LEA RDI,[0x22dc0c]
MOV ESI,0x260e
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0016519a:
MOV RDI,qword ptr [0x0056a4d8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0013be90
MOV qword ptr [RBP + -0x8],RAX
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x001651be
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_001651be:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001651c7
JMP 0x001651df
LAB_001651c7:
LEA RDI,[0x22dc0c]
MOV ESI,0x2611
LEA RDX,[0x22d96a]
CALL 0x0013c010
LAB_001651df:
MOV dword ptr [RBP + -0x10],0x0
LAB_001651e6:
CMP dword ptr [RBP + -0x10],0x3
JGE 0x00165262
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b8a0
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x0016520b
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_0016520b:
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x00165213
JMP 0x0016522b
LAB_00165213:
LEA RDI,[0x22dc0c]
MOV ESI,0x2615
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_0016522b:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013c1c0
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x3
JNZ 0x0016523f
JMP 0x00165257
LAB_0016523f:
LEA RDI,[0x22dc0c]
MOV ESI,0x2617
LEA RDX,[0x23017d]
CALL 0x0013c010
LAB_00165257:
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
JMP 0x001651e6
LAB_00165262:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b9f0
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x238bec]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x38],EAX
CMP dword ptr [RBP + -0x38],0x0
JZ 0x00165296
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00165296:
CMP dword ptr [RBP + -0x38],0x0
JNZ 0x0016529e
JMP 0x001652b6
LAB_0016529e:
LEA RDI,[0x22dc0c]
MOV ESI,0x261c
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_001652b6:
ADD RSP,0x40
POP RBP
RET
|
void test_selecttmp(void)
{
int iVar1;
long lVar2;
ulong uVar3;
int local_18;
if (opt_silent < '\x02') {
fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n");
uVar3 = (ulong)test_count;
test_count = test_count + 1;
fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar3,(ulong)iter_count,
(ulong)opt_count,"test_select_tmp");
fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n");
fflush(*(FILE **)PTR_stdout_003aefd8);
}
iVar1 = wrap_mysql_query(mysql,"DROP TABLE IF EXISTS t1, t2, t3");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x25fa,"r == 0");
}
iVar1 = wrap_mysql_query(mysql,"CREATE TABLE t1 (a int , b int);");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x25fd,"r == 0");
}
iVar1 = wrap_mysql_query(mysql,"create table t2 (a int, b int);");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2600,"r == 0");
}
iVar1 = wrap_mysql_query(mysql,"create table t3 (a int, b int);");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2603,"r == 0");
}
iVar1 = wrap_mysql_query(mysql,
"insert into t1 values (0, 100), (1, 2), (1, 3), (2, 2), (2, 7), (2, -1), (3, 10);"
);
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2608,"r == 0");
}
iVar1 = wrap_mysql_query(mysql,"insert into t2 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1);");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x260b,"r == 0");
}
iVar1 = wrap_mysql_query(mysql,"insert into t3 values (3, 3), (2, 2), (1, 1);");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x260e,"r == 0");
}
lVar2 = mysql_simple_prepare
(mysql,
"select a, (select count(distinct t1.b) as sum from t1, t2 where t1.a=t2.a and t2.b > 0 and t1.a <= t3.b group by t1.a order by sum limit 1) from t3"
);
if (lVar2 == 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2611,"stmt != 0");
}
for (local_18 = 0; local_18 < 3; local_18 = local_18 + 1) {
iVar1 = wrap_mysql_stmt_execute(lVar2);
if (iVar1 != 0) {
print_st_error(lVar2,0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2615,"rc == 0");
}
iVar1 = my_process_stmt_result(lVar2);
if (iVar1 != 3) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2617,"rc == 3");
}
}
wrap_mysql_stmt_close(lVar2);
iVar1 = wrap_mysql_query(mysql,"DROP TABLE t1, t2, t3");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x261c,"r == 0");
}
return;
}
| |
48,810 | my_aes_crypt_init | eloqsql/mysys_ssl/my_crypt.cc | int my_aes_crypt_init(void *ctx, enum my_aes_mode mode, int flags,
const unsigned char* key, unsigned int klen,
const unsigned char* iv, unsigned int ivlen)
{
#ifdef HAVE_EncryptAes128Ctr
#ifdef HAVE_EncryptAes128Gcm
if (mode == MY_AES_GCM)
if (flags & ENCRYPTION_FLAG_NOPAD)
return MY_AES_OPENSSL_ERROR;
else
new (ctx) MyCTX_gcm();
else
#endif
if (mode == MY_AES_CTR)
new (ctx) MyCTX();
else
#endif
if (flags & ENCRYPTION_FLAG_NOPAD)
new (ctx) MyCTX_nopad();
else
new (ctx) MyCTX();
return ((MyCTX*)ctx)->init(ciphers[mode](klen), flags & 1,
key, klen, iv, ivlen);
} | O3 | cpp | my_aes_crypt_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r14d
movl %edx, %r12d
movl %esi, %ebx
movq %rdi, %r13
cmpl $0x2, %esi
je 0x943d6
cmpl $0x3, %ebx
jne 0x94415
testb $0x2, %r12b
jne 0x944a6
movq %rcx, %r15
movq %r9, -0x30(%rbp)
leaq 0x2ea215(%rip), %rax # 0x37e5b0
addq $0x10, %rax
movq %rax, (%r13)
leaq 0x17(%r13), %rdi
andq $-0x10, %rdi
movq %rdi, 0xc8(%r13)
movl $0xb0, %edx
xorl %esi, %esi
callq 0x29270
movq 0xc8(%r13), %rdi
callq 0x29920
leaq 0x2ea17f(%rip), %rax # 0x37e550
jmp 0x9445f
movq %rcx, %r15
movq %r9, -0x30(%rbp)
leaq 0x2ea1cc(%rip), %rax # 0x37e5b0
addq $0x10, %rax
movq %rax, (%r13)
leaq 0x17(%r13), %rdi
andq $-0x10, %rdi
movq %rdi, 0xc8(%r13)
movl $0xb0, %edx
xorl %esi, %esi
callq 0x29270
movq 0xc8(%r13), %rdi
callq 0x29920
jmp 0x94467
movq %rcx, %r15
movq %r9, -0x30(%rbp)
leaq 0x2ea18d(%rip), %rax # 0x37e5b0
addq $0x10, %rax
movq %rax, (%r13)
leaq 0x17(%r13), %rdi
andq $-0x10, %rdi
movq %rdi, 0xc8(%r13)
movl $0xb0, %edx
xorl %esi, %esi
callq 0x29270
movq 0xc8(%r13), %rdi
callq 0x29920
testb $0x2, %r12b
je 0x94467
leaq 0x2ea189(%rip), %rax # 0x37e5e8
addq $0x10, %rax
movq %rax, (%r13)
movl %ebx, %eax
leaq 0x2f42a0(%rip), %rcx # 0x388710
movl %r14d, %edi
callq *(%rcx,%rax,8)
andl $0x1, %r12d
movq (%r13), %rcx
movq 0x10(%rcx), %r11
movq %r13, %rdi
movq %rax, %rsi
movl %r12d, %edx
movq %r15, %rcx
movl %r14d, %r8d
movq -0x30(%rbp), %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%r11
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_aes_crypt_init:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14d, r8d
mov r12d, edx
mov ebx, esi
mov r13, rdi
cmp esi, 2
jz short loc_943D6
cmp ebx, 3
jnz loc_94415
test r12b, 2
jnz loc_944A6
mov r15, rcx
mov [rbp+var_30], r9
lea rax, _ZTV5MyCTX; `vtable for'MyCTX
add rax, 10h
mov [r13+0], rax
lea rdi, [r13+17h]
and rdi, 0FFFFFFFFFFFFFFF0h
mov [r13+0C8h], rdi
mov edx, 0B0h
xor esi, esi
call _memset
mov rdi, [r13+0C8h]
call _EVP_CIPHER_CTX_reset
lea rax, _ZTV9MyCTX_gcm; `vtable for'MyCTX_gcm
jmp loc_9445F
loc_943D6:
mov r15, rcx
mov [rbp+var_30], r9
lea rax, _ZTV5MyCTX; `vtable for'MyCTX
add rax, 10h
mov [r13+0], rax
lea rdi, [r13+17h]
and rdi, 0FFFFFFFFFFFFFFF0h
mov [r13+0C8h], rdi
mov edx, 0B0h
xor esi, esi
call _memset
mov rdi, [r13+0C8h]
call _EVP_CIPHER_CTX_reset
jmp short loc_94467
loc_94415:
mov r15, rcx
mov [rbp+var_30], r9
lea rax, _ZTV5MyCTX; `vtable for'MyCTX
add rax, 10h
mov [r13+0], rax
lea rdi, [r13+17h]
and rdi, 0FFFFFFFFFFFFFFF0h
mov [r13+0C8h], rdi
mov edx, 0B0h
xor esi, esi
call _memset
mov rdi, [r13+0C8h]
call _EVP_CIPHER_CTX_reset
test r12b, 2
jz short loc_94467
lea rax, _ZTV11MyCTX_nopad; `vtable for'MyCTX_nopad
loc_9445F:
add rax, 10h
mov [r13+0], rax
loc_94467:
mov eax, ebx
lea rcx, ciphers
mov edi, r14d; unsigned int
call (ciphers - 388710h)[rcx+rax*8]; aes_ecb(uint)
and r12d, 1
mov rcx, [r13+0]
mov r11, [rcx+10h]
mov rdi, r13
mov rsi, rax
mov edx, r12d
mov rcx, r15
mov r8d, r14d
mov r9, [rbp+var_30]
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp r11
loc_944A6:
mov eax, 0FFFFFF9Bh
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_aes_crypt_init(_QWORD *a1, int a2, char a3, long long a4, unsigned int a5, long long a6)
{
long long v9; // r15
unsigned long long v10; // rdi
long long *v11; // rax
unsigned long long v12; // rdi
unsigned long long v13; // rdi
long long v14; // rax
long long v16; // [rsp+0h] [rbp-30h]
if ( a2 == 2 )
{
v9 = a4;
v16 = a6;
*a1 = &`vtable for'MyCTX + 2;
v12 = ((unsigned long long)a1 + 23) & 0xFFFFFFFFFFFFFFF0LL;
a1[25] = v12;
memset(v12, 0LL, 176LL);
EVP_CIPHER_CTX_reset(a1[25]);
goto LABEL_9;
}
if ( a2 != 3 )
{
v9 = a4;
v16 = a6;
*a1 = &`vtable for'MyCTX + 2;
v13 = ((unsigned long long)a1 + 23) & 0xFFFFFFFFFFFFFFF0LL;
a1[25] = v13;
memset(v13, 0LL, 176LL);
EVP_CIPHER_CTX_reset(a1[25]);
if ( (a3 & 2) != 0 )
{
v11 = &`vtable for'MyCTX_nopad;
goto LABEL_8;
}
LABEL_9:
v14 = ciphers[a2](a5);
return (*(long long ( **)(_QWORD *, long long, _QWORD, long long, _QWORD, long long))(*a1 + 16LL))(
a1,
v14,
a3 & 1,
v9,
a5,
v16);
}
if ( (a3 & 2) == 0 )
{
v9 = a4;
v16 = a6;
*a1 = &`vtable for'MyCTX + 2;
v10 = ((unsigned long long)a1 + 23) & 0xFFFFFFFFFFFFFFF0LL;
a1[25] = v10;
memset(v10, 0LL, 176LL);
EVP_CIPHER_CTX_reset(a1[25]);
v11 = &`vtable for'MyCTX_gcm;
LABEL_8:
*a1 = v11 + 2;
goto LABEL_9;
}
return 4294967195LL;
}
| my_aes_crypt_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14D,R8D
MOV R12D,EDX
MOV EBX,ESI
MOV R13,RDI
CMP ESI,0x2
JZ 0x001943d6
CMP EBX,0x3
JNZ 0x00194415
TEST R12B,0x2
JNZ 0x001944a6
MOV R15,RCX
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x47e5b0]
ADD RAX,0x10
MOV qword ptr [R13],RAX
LEA RDI,[R13 + 0x17]
AND RDI,-0x10
MOV qword ptr [R13 + 0xc8],RDI
MOV EDX,0xb0
XOR ESI,ESI
CALL 0x00129270
MOV RDI,qword ptr [R13 + 0xc8]
CALL 0x00129920
LEA RAX,[0x47e550]
JMP 0x0019445f
LAB_001943d6:
MOV R15,RCX
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x47e5b0]
ADD RAX,0x10
MOV qword ptr [R13],RAX
LEA RDI,[R13 + 0x17]
AND RDI,-0x10
MOV qword ptr [R13 + 0xc8],RDI
MOV EDX,0xb0
XOR ESI,ESI
CALL 0x00129270
MOV RDI,qword ptr [R13 + 0xc8]
CALL 0x00129920
JMP 0x00194467
LAB_00194415:
MOV R15,RCX
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x47e5b0]
ADD RAX,0x10
MOV qword ptr [R13],RAX
LEA RDI,[R13 + 0x17]
AND RDI,-0x10
MOV qword ptr [R13 + 0xc8],RDI
MOV EDX,0xb0
XOR ESI,ESI
CALL 0x00129270
MOV RDI,qword ptr [R13 + 0xc8]
CALL 0x00129920
TEST R12B,0x2
JZ 0x00194467
LEA RAX,[0x47e5e8]
LAB_0019445f:
ADD RAX,0x10
MOV qword ptr [R13],RAX
LAB_00194467:
MOV EAX,EBX
LEA RCX,[0x488710]
MOV EDI,R14D
CALL qword ptr [RCX + RAX*0x8]
AND R12D,0x1
MOV RCX,qword ptr [R13]
MOV R11,qword ptr [RCX + 0x10]
MOV RDI,R13
MOV RSI,RAX
MOV EDX,R12D
MOV RCX,R15
MOV R8D,R14D
MOV R9,qword ptr [RBP + -0x30]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP R11
LAB_001944a6:
MOV EAX,0xffffff9b
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
my_aes_crypt_init(long *param_1,uint param_2,uint param_3,int8 param_4,int4 param_5,
int8 param_6)
{
int *puVar1;
int8 uVar2;
void *pvVar3;
if (param_2 == 2) {
*param_1 = (long)&PTR__MyCTX_0047e5c0;
pvVar3 = (void *)((long)param_1 + 0x17U & 0xfffffffffffffff0);
param_1[0x19] = (long)pvVar3;
memset(pvVar3,0,0xb0);
EVP_CIPHER_CTX_reset(param_1[0x19]);
}
else {
if (param_2 == 3) {
if ((param_3 & 2) != 0) {
return 0xffffff9b;
}
*param_1 = (long)&PTR__MyCTX_0047e5c0;
pvVar3 = (void *)((long)param_1 + 0x17U & 0xfffffffffffffff0);
param_1[0x19] = (long)pvVar3;
memset(pvVar3,0,0xb0);
EVP_CIPHER_CTX_reset(param_1[0x19]);
puVar1 = &MyCTX_gcm::vtable;
}
else {
*param_1 = (long)&PTR__MyCTX_0047e5c0;
pvVar3 = (void *)((long)param_1 + 0x17U & 0xfffffffffffffff0);
param_1[0x19] = (long)pvVar3;
memset(pvVar3,0,0xb0);
EVP_CIPHER_CTX_reset(param_1[0x19]);
if ((param_3 & 2) == 0) goto LAB_00194467;
puVar1 = &MyCTX_nopad::vtable;
}
*param_1 = (long)(puVar1 + 0x10);
}
LAB_00194467:
uVar2 = (**(code **)(ciphers + (ulong)param_2 * 8))(param_5);
/* WARNING: Could not recover jumptable at 0x001944a3. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar2 = (**(code **)(*param_1 + 0x10))(param_1,uVar2,param_3 & 1,param_4,param_5,param_6);
return uVar2;
}
| |
48,811 | mysql_close_options | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void mysql_close_options(MYSQL *mysql)
{
if (mysql->options.init_command)
{
char **begin= (char **)mysql->options.init_command->buffer;
char **end= begin + mysql->options.init_command->elements;
for (;begin < end; begin++)
free(*begin);
ma_delete_dynamic(mysql->options.init_command);
free(mysql->options.init_command);
}
free(mysql->options.user);
free(mysql->options.host);
free(mysql->options.password);
free(mysql->options.unix_socket);
free(mysql->options.db);
free(mysql->options.my_cnf_file);
free(mysql->options.my_cnf_group);
free(mysql->options.charset_dir);
free(mysql->options.charset_name);
free(mysql->options.bind_address);
free(mysql->options.ssl_key);
free(mysql->options.ssl_cert);
free(mysql->options.ssl_ca);
free(mysql->options.ssl_capath);
free(mysql->options.ssl_cipher);
if (mysql->options.extension)
{
struct mysql_async_context *ctxt;
if ((ctxt = mysql->options.extension->async_context))
{
my_context_destroy(&ctxt->async_context);
free(ctxt);
mysql->options.extension->async_context= 0;
}
free(mysql->options.extension->plugin_dir);
free(mysql->options.extension->default_auth);
free(mysql->options.extension->db_driver);
free(mysql->options.extension->ssl_crl);
free(mysql->options.extension->ssl_crlpath);
free(mysql->options.extension->tls_fp);
free(mysql->options.extension->tls_fp_list);
free(mysql->options.extension->tls_pw);
free(mysql->options.extension->tls_version);
free(mysql->options.extension->url);
free(mysql->options.extension->connection_handler);
free(mysql->options.extension->proxy_header);
if(ma_hashtbl_inited(&mysql->options.extension->connect_attrs))
ma_hashtbl_free(&mysql->options.extension->connect_attrs);
if (ma_hashtbl_inited(&mysql->options.extension->userdata))
ma_hashtbl_free(&mysql->options.extension->userdata);
free(mysql->options.extension->restricted_auth);
free(mysql->options.extension->rpl_host);
}
free(mysql->options.extension);
/* clear all pointer */
memset(&mysql->options, 0, sizeof(mysql->options));
} | O0 | c | mysql_close_options:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x3d8(%rax)
je 0x1e90d
movq -0x8(%rbp), %rax
movq 0x3d8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x3d8(%rcx), %rcx
movl 0x8(%rcx), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x1e8ed
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x13520
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x1e8c9
movq -0x8(%rbp), %rax
movq 0x3d8(%rax), %rdi
callq 0x44140
movq -0x8(%rbp), %rax
movq 0x3d8(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x3b8(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x3b0(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x3c0(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x3c8(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x3d0(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x3e0(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x3e8(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x3f0(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x3f8(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x448(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x400(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x408(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x410(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x418(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x420(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x1ebd8
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x1ea51
movq -0x20(%rbp), %rdi
addq $0x38, %rdi
callq 0x408d0
movq -0x20(%rbp), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq (%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x88(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x90(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x98(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0xa0(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0xc0(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0xb0(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0xd0(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x130(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x48(%rax)
je 0x1eb7e
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rdi
addq $0x30, %rdi
callq 0x45da0
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0xf8(%rax)
je 0x1ebaa
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rdi
addq $0xe0, %rdi
callq 0x45da0
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x150(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x158(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rdi
addq $0x390, %rdi # imm = 0x390
xorl %esi, %esi
movl $0xf8, %edx
callq 0x13250
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_close_options:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+3D8h], 0
jz short loc_1E90D
mov rax, [rbp+var_8]
mov rax, [rax+3D8h]
mov rax, [rax]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
mov rcx, [rcx+3D8h]
mov ecx, [rcx+8]
shl rcx, 3
add rax, rcx
mov [rbp+var_18], rax
loc_1E8C9:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jnb short loc_1E8ED
mov rax, [rbp+var_10]
mov rdi, [rax]
call _free
mov rax, [rbp+var_10]
add rax, 8
mov [rbp+var_10], rax
jmp short loc_1E8C9
loc_1E8ED:
mov rax, [rbp+var_8]
mov rdi, [rax+3D8h]
call ma_delete_dynamic
mov rax, [rbp+var_8]
mov rdi, [rax+3D8h]
call _free
loc_1E90D:
mov rax, [rbp+var_8]
mov rdi, [rax+3B8h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+3B0h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+3C0h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+3C8h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+3D0h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+3E0h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+3E8h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+3F0h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+3F8h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+448h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+400h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+408h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+410h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+418h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+420h]
call _free
mov rax, [rbp+var_8]
cmp qword ptr [rax+480h], 0
jz loc_1EBD8
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_1EA51
mov rdi, [rbp+var_20]
add rdi, 38h ; '8'
call my_context_destroy
mov rdi, [rbp+var_20]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov qword ptr [rax+28h], 0
loc_1EA51:
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+8]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+88h]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+10h]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+18h]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+90h]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+98h]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+0A0h]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+0C0h]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+0B0h]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+0D0h]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+130h]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
cmp qword ptr [rax+48h], 0
jz short loc_1EB7E
mov rax, [rbp+var_8]
mov rdi, [rax+480h]
add rdi, 30h ; '0'
call ma_hashtbl_free
loc_1EB7E:
mov rax, [rbp+var_8]
mov rax, [rax+480h]
cmp qword ptr [rax+0F8h], 0
jz short loc_1EBAA
mov rax, [rbp+var_8]
mov rdi, [rax+480h]
add rdi, 0E0h
call ma_hashtbl_free
loc_1EBAA:
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+150h]
call _free
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rdi, [rax+158h]
call _free
loc_1EBD8:
mov rax, [rbp+var_8]
mov rdi, [rax+480h]
call _free
mov rdi, [rbp+var_8]
add rdi, 390h
xor esi, esi
mov edx, 0F8h
call _memset
add rsp, 20h
pop rbp
retn
| long long mysql_close_options(long long a1)
{
long long v2; // [rsp+0h] [rbp-20h]
_QWORD *v3; // [rsp+8h] [rbp-18h]
_QWORD *v4; // [rsp+10h] [rbp-10h]
if ( *(_QWORD *)(a1 + 984) )
{
v4 = **(_QWORD ***)(a1 + 984);
v3 = &v4[*(unsigned int *)(*(_QWORD *)(a1 + 984) + 8LL)];
while ( v4 < v3 )
free(*v4++);
ma_delete_dynamic(*(_QWORD *)(a1 + 984));
free(*(_QWORD *)(a1 + 984));
}
free(*(_QWORD *)(a1 + 952));
free(*(_QWORD *)(a1 + 944));
free(*(_QWORD *)(a1 + 960));
free(*(_QWORD *)(a1 + 968));
free(*(_QWORD *)(a1 + 976));
free(*(_QWORD *)(a1 + 992));
free(*(_QWORD *)(a1 + 1000));
free(*(_QWORD *)(a1 + 1008));
free(*(_QWORD *)(a1 + 1016));
free(*(_QWORD *)(a1 + 1096));
free(*(_QWORD *)(a1 + 1024));
free(*(_QWORD *)(a1 + 1032));
free(*(_QWORD *)(a1 + 1040));
free(*(_QWORD *)(a1 + 1048));
free(*(_QWORD *)(a1 + 1056));
if ( *(_QWORD *)(a1 + 1152) )
{
v2 = *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL);
if ( v2 )
{
my_context_destroy(v2 + 56);
free(v2);
*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) = 0LL;
}
free(**(_QWORD **)(a1 + 1152));
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 8LL));
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 136LL));
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 16LL));
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 24LL));
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 144LL));
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 152LL));
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 160LL));
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 192LL));
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 176LL));
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 208LL));
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 304LL));
if ( *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 72LL) )
ma_hashtbl_free(*(_QWORD *)(a1 + 1152) + 48LL);
if ( *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 248LL) )
ma_hashtbl_free(*(_QWORD *)(a1 + 1152) + 224LL);
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 336LL));
free(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 344LL));
}
free(*(_QWORD *)(a1 + 1152));
return memset(a1 + 912, 0LL, 248LL);
}
| mysql_close_options:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x3d8],0x0
JZ 0x0011e90d
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x3d8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x3d8]
MOV ECX,dword ptr [RCX + 0x8]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_0011e8c9:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0011e8ed
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x8
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0011e8c9
LAB_0011e8ed:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3d8]
CALL 0x00144140
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3d8]
CALL 0x00113520
LAB_0011e90d:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3b8]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3b0]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3c0]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3c8]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3d0]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3e0]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3e8]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3f0]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3f8]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x448]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x400]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x408]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x410]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x418]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x420]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0011ebd8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x0011ea51
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x38
CALL 0x001408d0
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV qword ptr [RAX + 0x28],0x0
LAB_0011ea51:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0x88]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0x90]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0x98]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0xa0]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0xc0]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0xb0]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0xd0]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0x130]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x48],0x0
JZ 0x0011eb7e
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x480]
ADD RDI,0x30
CALL 0x00145da0
LAB_0011eb7e:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0xf8],0x0
JZ 0x0011ebaa
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x480]
ADD RDI,0xe0
CALL 0x00145da0
LAB_0011ebaa:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0x150]
CALL 0x00113520
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0x158]
CALL 0x00113520
LAB_0011ebd8:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x480]
CALL 0x00113520
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x390
XOR ESI,ESI
MOV EDX,0xf8
CALL 0x00113250
ADD RSP,0x20
POP RBP
RET
|
void mysql_close_options(long param_1)
{
void *__ptr;
int8 *puVar1;
int8 *local_18;
if (*(long *)(param_1 + 0x3d8) != 0) {
local_18 = (int8 *)**(long **)(param_1 + 0x3d8);
puVar1 = local_18 + *(uint *)(*(long *)(param_1 + 0x3d8) + 8);
for (; local_18 < puVar1; local_18 = local_18 + 1) {
free((void *)*local_18);
}
ma_delete_dynamic(*(int8 *)(param_1 + 0x3d8));
free(*(void **)(param_1 + 0x3d8));
}
free(*(void **)(param_1 + 0x3b8));
free(*(void **)(param_1 + 0x3b0));
free(*(void **)(param_1 + 0x3c0));
free(*(void **)(param_1 + 0x3c8));
free(*(void **)(param_1 + 0x3d0));
free(*(void **)(param_1 + 0x3e0));
free(*(void **)(param_1 + 1000));
free(*(void **)(param_1 + 0x3f0));
free(*(void **)(param_1 + 0x3f8));
free(*(void **)(param_1 + 0x448));
free(*(void **)(param_1 + 0x400));
free(*(void **)(param_1 + 0x408));
free(*(void **)(param_1 + 0x410));
free(*(void **)(param_1 + 0x418));
free(*(void **)(param_1 + 0x420));
if (*(long *)(param_1 + 0x480) != 0) {
__ptr = *(void **)(*(long *)(param_1 + 0x480) + 0x28);
if (__ptr != (void *)0x0) {
my_context_destroy((long)__ptr + 0x38);
free(__ptr);
*(int8 *)(*(long *)(param_1 + 0x480) + 0x28) = 0;
}
free((void *)**(int8 **)(param_1 + 0x480));
free(*(void **)(*(long *)(param_1 + 0x480) + 8));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x88));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x10));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x18));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x90));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x98));
free(*(void **)(*(long *)(param_1 + 0x480) + 0xa0));
free(*(void **)(*(long *)(param_1 + 0x480) + 0xc0));
free(*(void **)(*(long *)(param_1 + 0x480) + 0xb0));
free(*(void **)(*(long *)(param_1 + 0x480) + 0xd0));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x130));
if (*(long *)(*(long *)(param_1 + 0x480) + 0x48) != 0) {
ma_hashtbl_free(*(long *)(param_1 + 0x480) + 0x30);
}
if (*(long *)(*(long *)(param_1 + 0x480) + 0xf8) != 0) {
ma_hashtbl_free(*(long *)(param_1 + 0x480) + 0xe0);
}
free(*(void **)(*(long *)(param_1 + 0x480) + 0x150));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x158));
}
free(*(void **)(param_1 + 0x480));
memset((void *)(param_1 + 0x390),0,0xf8);
return;
}
| |
48,812 | fmt::v10::appender fmt::v10::detail::write_significand<fmt::v10::appender, char, unsigned long, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, unsigned long, int, int, char, fmt::v10::detail::digit_grouping<char> const&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR20 auto write_significand(OutputIt out, T significand,
int significand_size, int integral_size,
Char decimal_point,
const Grouping& grouping) -> OutputIt {
if (!grouping.has_separator()) {
return write_significand(out, significand, significand_size, integral_size,
decimal_point);
}
auto buffer = basic_memory_buffer<Char>();
write_significand(buffer_appender<Char>(buffer), significand,
significand_size, integral_size, decimal_point);
grouping.apply(
out, basic_string_view<Char>(buffer.data(), to_unsigned(integral_size)));
return detail::copy_str_noinline<Char>(buffer.data() + integral_size,
buffer.end(), out);
} | O0 | c | fmt::v10::appender fmt::v10::detail::write_significand<fmt::v10::appender, char, unsigned long, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, unsigned long, int, int, char, fmt::v10::detail::digit_grouping<char> const&):
subq $0x2e8, %rsp # imm = 0x2E8
movb %r8b, %al
movq %rdi, 0x2d0(%rsp)
movq %rsi, 0x2c8(%rsp)
movl %edx, 0x2c4(%rsp)
movl %ecx, 0x2c0(%rsp)
movb %al, 0x2bf(%rsp)
movq %r9, 0x2b0(%rsp)
movq 0x2b0(%rsp), %rdi
callq 0xae420
testb $0x1, %al
jne 0xb2203
movq 0x2d0(%rsp), %rax
movq %rax, 0x2a8(%rsp)
movq 0x2c8(%rsp), %rsi
movl 0x2c4(%rsp), %edx
movl 0x2c0(%rsp), %ecx
movb 0x2bf(%rsp), %al
movq 0x2a8(%rsp), %rdi
movsbl %al, %r8d
callq 0xb1650
movq %rax, 0x2d8(%rsp)
jmp 0xb23b3
leaq 0x8f(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x94520
movq 0x38(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0x9e380
jmp 0xb2229
leaq 0x8f(%rsp), %rdi
callq 0x96fa0
leaq 0x70(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x9f3a0
jmp 0xb224a
movq 0x2c8(%rsp), %rsi
movl 0x2c4(%rsp), %edx
movl 0x2c0(%rsp), %ecx
movsbl 0x2bf(%rsp), %r8d
movq 0x70(%rsp), %rdi
callq 0xb1650
movq %rax, 0x30(%rsp)
jmp 0xb227a
movq 0x30(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x2b0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x2d0(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x9efd0
movq %rax, 0x18(%rsp)
movl 0x2c0(%rsp), %edi
callq 0xa5690
movq 0x18(%rsp), %rsi
movl %eax, %eax
movl %eax, %edx
leaq 0x50(%rsp), %rdi
callq 0x9fc80
movq 0x20(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x58(%rsp), %rcx
callq 0xa7160
movq %rax, 0x28(%rsp)
jmp 0xb22ef
movq 0x28(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x90(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x9efd0
movq %rax, %rdi
movq 0x8(%rsp), %rax
movslq 0x2c0(%rsp), %rcx
addq %rcx, %rdi
movq %rax, 0x2e0(%rsp)
movq 0x2e0(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rax
addq %rax, %rsi
movq 0x2d0(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdx
callq 0xa04f0
movq %rax, 0x10(%rsp)
jmp 0xb2357
movq 0x10(%rsp), %rax
movq %rax, 0x2d8(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x9ed50
jmp 0xb23b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x8f(%rsp), %rdi
callq 0x96fa0
jmp 0xb23c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x9ed50
jmp 0xb23c3
movq 0x2d8(%rsp), %rax
addq $0x2e8, %rsp # imm = 0x2E8
retq
movq 0x80(%rsp), %rdi
callq 0x90db0
| _ZN3fmt3v106detail17write_significandINS0_8appenderEcmNS1_14digit_groupingIcEEEET_S6_T1_iiT0_RKT2_:
sub rsp, 2E8h
mov al, r8b
mov [rsp+2E8h+var_18], rdi
mov [rsp+2E8h+var_20], rsi
mov [rsp+2E8h+var_24], edx
mov [rsp+2E8h+var_28], ecx
mov [rsp+2E8h+var_29], al
mov [rsp+2E8h+var_38], r9
mov rdi, [rsp+2E8h+var_38]
call _ZNK3fmt3v106detail14digit_groupingIcE13has_separatorEv; fmt::v10::detail::digit_grouping<char>::has_separator(void)
test al, 1
jnz short loc_B2203
mov rax, [rsp+2E8h+var_18]
mov [rsp+2E8h+var_40], rax
mov rsi, [rsp+2E8h+var_20]
mov edx, [rsp+2E8h+var_24]
mov ecx, [rsp+2E8h+var_28]
mov al, [rsp+2E8h+var_29]
mov rdi, [rsp+2E8h+var_40]
movsx r8d, al
call _ZN3fmt3v106detail17write_significandINS0_8appenderEmcTnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEE5valueEiE4typeELi0EEES7_S7_T0_iiT1_
mov [rsp+2E8h+var_10], rax
jmp loc_B23B3
loc_B2203:
lea rdi, [rsp+2E8h+var_259]
mov [rsp+2E8h+var_2B0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+2E8h+var_2B0]
lea rdi, [rsp+2E8h+var_258]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEEC2ERKS2_; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(std::allocator<char> const&)
jmp short $+2
loc_B2229:
lea rdi, [rsp+2E8h+var_259]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+2E8h+var_278]
lea rsi, [rsp+2E8h+var_258]
call _ZN3fmt3v108appenderCI2St20back_insert_iteratorINS0_6detail6bufferIcEEEERS5_
jmp short $+2
loc_B224A:
mov rsi, [rsp+2E8h+var_20]
mov edx, [rsp+2E8h+var_24]
mov ecx, [rsp+2E8h+var_28]
movsx r8d, [rsp+2E8h+var_29]
mov rdi, [rsp+2E8h+var_278]
call _ZN3fmt3v106detail17write_significandINS0_8appenderEmcTnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEE5valueEiE4typeELi0EEES7_S7_T0_iiT1_
mov [rsp+2E8h+var_2B8], rax
jmp short $+2
loc_B227A:
mov rax, [rsp+2E8h+var_2B8]
mov [rsp+2E8h+var_280], rax
mov rax, [rsp+2E8h+var_38]
mov [rsp+2E8h+var_2C8], rax
mov rax, [rsp+2E8h+var_18]
mov [rsp+2E8h+var_288], rax
lea rdi, [rsp+2E8h+var_258]
call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void)
mov [rsp+2E8h+var_2D0], rax
mov edi, [rsp+2E8h+var_28]
call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int)
mov rsi, [rsp+2E8h+var_2D0]
mov eax, eax
mov edx, eax
lea rdi, [rsp+2E8h+var_298]
call _ZN3fmt3v1017basic_string_viewIcEC2EPKcm; fmt::v10::basic_string_view<char>::basic_string_view(char const*,ulong)
mov rdi, [rsp+2E8h+var_2C8]
mov rsi, [rsp+2E8h+var_288]
mov rdx, [rsp+2E8h+var_298]
mov rcx, [rsp+2E8h+var_290]
call _ZNK3fmt3v106detail14digit_groupingIcE5applyINS0_8appenderEcEET_S6_NS0_17basic_string_viewIT0_EE; fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>(fmt::v10::appender,fmt::v10::basic_string_view<char>)
mov [rsp+2E8h+var_2C0], rax
jmp short $+2
loc_B22EF:
mov rax, [rsp+2E8h+var_2C0]
mov [rsp+2E8h+var_2A0], rax
lea rdi, [rsp+2E8h+var_258]
mov [rsp+2E8h+var_2E0], rdi
call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void)
mov rdi, rax
mov rax, [rsp+2E8h+var_2E0]
movsxd rcx, [rsp+2E8h+var_28]
add rdi, rcx
mov [rsp+2E8h+var_8], rax
mov rax, [rsp+2E8h+var_8]
mov rsi, [rax+8]
mov rax, [rax+10h]
add rsi, rax
mov rax, [rsp+2E8h+var_18]
mov [rsp+2E8h+var_2A8], rax
mov rdx, [rsp+2E8h+var_2A8]
call _ZN3fmt3v106detail17copy_str_noinlineIcPcNS0_8appenderEEET1_T0_S6_S5_; fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>(char *,char *,fmt::v10::appender)
mov [rsp+2E8h+var_2D8], rax
jmp short $+2
loc_B2357:
mov rax, [rsp+2E8h+var_2D8]
mov [rsp+2E8h+var_10], rax
lea rdi, [rsp+2E8h+var_258]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer()
jmp short loc_B23B3
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
lea rdi, [rsp+arg_87]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_B23C3
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
lea rdi, [rsp+arg_88]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer()
jmp short loc_B23C3
loc_B23B3:
mov rax, [rsp+2E8h+var_10]
add rsp, 2E8h
retn
loc_B23C3:
mov rdi, [rsp+arg_78]
call __Unwind_Resume
| long long fmt::v10::detail::write_significand<fmt::v10::appender,char,unsigned long,fmt::v10::detail::digit_grouping<char>>(
long long a1,
long long a2,
unsigned int a3,
signed int a4,
char a5,
long long a6)
{
unsigned int v6; // eax
long long v7; // rax
long long v8; // r8
long long v9; // r9
long long v11; // [rsp+18h] [rbp-2D0h]
long long v12; // [rsp+20h] [rbp-2C8h]
long long v13[2]; // [rsp+50h] [rbp-298h] BYREF
long long v14; // [rsp+60h] [rbp-288h]
long long v15; // [rsp+68h] [rbp-280h]
long long v16[3]; // [rsp+70h] [rbp-278h] BYREF
char v17; // [rsp+8Fh] [rbp-259h] BYREF
_QWORD v18[68]; // [rsp+90h] [rbp-258h] BYREF
long long v19; // [rsp+2B0h] [rbp-38h]
char v20; // [rsp+2BFh] [rbp-29h]
signed int v21; // [rsp+2C0h] [rbp-28h]
unsigned int v22; // [rsp+2C4h] [rbp-24h]
long long v23; // [rsp+2C8h] [rbp-20h]
long long v24; // [rsp+2D0h] [rbp-18h]
long long v25; // [rsp+2D8h] [rbp-10h]
_QWORD *v26; // [rsp+2E0h] [rbp-8h]
v24 = a1;
v23 = a2;
v22 = a3;
v21 = a4;
v20 = a5;
v19 = a6;
if ( fmt::v10::detail::digit_grouping<char>::has_separator(a6) )
{
std::allocator<char>::allocator();
fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(v18, (long long)&v17);
std::allocator<char>::~allocator(&v17);
ZN3fmt3v108appenderCI2St20back_insert_iteratorINS0_6detail6bufferIcEEEERS5_((long long)v16, (long long)v18);
v15 = ZN3fmt3v106detail17write_significandINS0_8appenderEmcTnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEE5valueEiE4typeELi0EEES7_S7_T0_iiT1_(
v16[0],
v23,
v22,
v21,
v20);
v12 = v19;
v14 = v24;
v11 = fmt::v10::detail::buffer<char>::data((long long)v18);
v6 = fmt::v10::detail::to_unsigned<int>(v21);
fmt::v10::basic_string_view<char>::basic_string_view(v13, v11, v6);
fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>(v12, v14, v13[0], v13[1]);
v7 = fmt::v10::detail::buffer<char>::data((long long)v18);
v26 = v18;
v25 = fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>(
v21 + v7,
v18[2] + v18[1],
v24,
v21,
v8,
v9);
fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer((long long)v18);
}
else
{
v18[67] = v24;
return ZN3fmt3v106detail17write_significandINS0_8appenderEmcTnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEE5valueEiE4typeELi0EEES7_S7_T0_iiT1_(
v24,
v23,
v22,
v21,
v20);
}
return v25;
}
| write_significand<fmt::v10::appender,char,unsigned_long,fmt::v10::detail::digit_grouping<char>>:
SUB RSP,0x2e8
MOV AL,R8B
MOV qword ptr [RSP + 0x2d0],RDI
MOV qword ptr [RSP + 0x2c8],RSI
MOV dword ptr [RSP + 0x2c4],EDX
MOV dword ptr [RSP + 0x2c0],ECX
MOV byte ptr [RSP + 0x2bf],AL
MOV qword ptr [RSP + 0x2b0],R9
MOV RDI,qword ptr [RSP + 0x2b0]
CALL 0x001ae420
TEST AL,0x1
JNZ 0x001b2203
MOV RAX,qword ptr [RSP + 0x2d0]
MOV qword ptr [RSP + 0x2a8],RAX
MOV RSI,qword ptr [RSP + 0x2c8]
MOV EDX,dword ptr [RSP + 0x2c4]
MOV ECX,dword ptr [RSP + 0x2c0]
MOV AL,byte ptr [RSP + 0x2bf]
MOV RDI,qword ptr [RSP + 0x2a8]
MOVSX R8D,AL
CALL 0x001b1650
MOV qword ptr [RSP + 0x2d8],RAX
JMP 0x001b23b3
LAB_001b2203:
LEA RDI,[RSP + 0x8f]
MOV qword ptr [RSP + 0x38],RDI
CALL 0x00194520
MOV RSI,qword ptr [RSP + 0x38]
LAB_001b221a:
LEA RDI,[RSP + 0x90]
CALL 0x0019e380
JMP 0x001b2229
LAB_001b2229:
LEA RDI,[RSP + 0x8f]
CALL 0x00196fa0
LAB_001b2236:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x90]
CALL 0x0019f3a0
JMP 0x001b224a
LAB_001b224a:
MOV RSI,qword ptr [RSP + 0x2c8]
MOV EDX,dword ptr [RSP + 0x2c4]
MOV ECX,dword ptr [RSP + 0x2c0]
MOVSX R8D,byte ptr [RSP + 0x2bf]
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x001b1650
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001b227a
LAB_001b227a:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x2b0]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x2d0]
MOV qword ptr [RSP + 0x60],RAX
LEA RDI,[RSP + 0x90]
CALL 0x0019efd0
MOV qword ptr [RSP + 0x18],RAX
MOV EDI,dword ptr [RSP + 0x2c0]
CALL 0x001a5690
MOV RSI,qword ptr [RSP + 0x18]
MOV EAX,EAX
MOV EDX,EAX
LEA RDI,[RSP + 0x50]
CALL 0x0019fc80
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x58]
CALL 0x001a7160
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001b22ef
LAB_001b22ef:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x48],RAX
LEA RDI,[RSP + 0x90]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0019efd0
MOV RDI,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOVSXD RCX,dword ptr [RSP + 0x2c0]
ADD RDI,RCX
MOV qword ptr [RSP + 0x2e0],RAX
MOV RAX,qword ptr [RSP + 0x2e0]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
ADD RSI,RAX
MOV RAX,qword ptr [RSP + 0x2d0]
MOV qword ptr [RSP + 0x40],RAX
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x001a04f0
LAB_001b2350:
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001b2357
LAB_001b2357:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x2d8],RAX
LEA RDI,[RSP + 0x90]
CALL 0x0019ed50
JMP 0x001b23b3
LAB_001b23b3:
MOV RAX,qword ptr [RSP + 0x2d8]
ADD RSP,0x2e8
RET
|
/* fmt::v10::appender fmt::v10::detail::write_significand<fmt::v10::appender, char, unsigned long,
fmt::v10::detail::digit_grouping<char> >(fmt::v10::appender, unsigned long, int, int, char,
fmt::v10::detail::digit_grouping<char> const&) */
int8
fmt::v10::detail::
write_significand<fmt::v10::appender,char,unsigned_long,fmt::v10::detail::digit_grouping<char>>
(int8 param_1,int8 param_2,int4 param_3,int param_4,char param_5,
digit_grouping<char> *param_6)
{
digit_grouping<char> *pdVar1;
uint uVar2;
ulong uVar3;
char *pcVar4;
long lVar5;
int8 local_298;
int8 local_290;
int8 local_288;
int8 local_280;
int8 local_278 [3];
allocator<char> local_259;
allocator local_258 [8];
long local_250;
long local_248;
int8 local_40;
digit_grouping<char> *local_38;
char local_29;
int local_28;
int4 local_24;
int8 local_20;
int8 local_18;
int8 local_10;
buffer<char> *local_8;
local_38 = param_6;
local_29 = param_5;
local_28 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
uVar3 = digit_grouping<char>::has_separator(param_6);
if ((uVar3 & 1) == 0) {
local_40 = local_18;
local_10 = _ZN3fmt3v106detail17write_significandINS0_8appenderEmcTnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEE5valueEiE4typeELi0EEES7_S7_T0_iiT1_
(local_18,local_20,local_24,local_28,(int)local_29);
}
else {
std::allocator<char>::allocator();
/* try { // try from 001b221a to 001b2226 has its CatchHandler @ 001b2373 */
basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(local_258);
std::allocator<char>::~allocator(&local_259);
/* try { // try from 001b2236 to 001b234f has its CatchHandler @ 001b2393 */
appender::back_insert_iterator((appender *)local_278,(buffer *)local_258);
local_280 = _ZN3fmt3v106detail17write_significandINS0_8appenderEmcTnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEE5valueEiE4typeELi0EEES7_S7_T0_iiT1_
(local_278[0],local_20,local_24,local_28,(int)local_29);
pdVar1 = local_38;
local_288 = local_18;
pcVar4 = (char *)buffer<char>::data((buffer<char> *)local_258);
uVar2 = to_unsigned<int>(local_28);
basic_string_view<char>::basic_string_view
((basic_string_view<char> *)&local_298,pcVar4,(ulong)uVar2);
digit_grouping<char>::apply<fmt::v10::appender,char>(pdVar1,local_288,local_298,local_290);
lVar5 = buffer<char>::data((buffer<char> *)local_258);
local_8 = (buffer<char> *)local_258;
local_10 = copy_str_noinline<char,char*,fmt::v10::appender>
(lVar5 + local_28,local_250 + local_248,local_18);
basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer
((basic_memory_buffer<char,500ul,std::allocator<char>> *)local_258);
}
return local_10;
}
| |
48,813 | testing::internal::CmpHelperSTREQ(char const*, char const*, char const*, char const*) | giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest.cc | AssertionResult CmpHelperSTREQ(const char* lhs_expression,
const char* rhs_expression, const char* lhs,
const char* rhs) {
if (String::CStringEquals(lhs, rhs)) {
return AssertionSuccess();
}
return EqFailure(lhs_expression, rhs_expression, PrintToString(lhs),
PrintToString(rhs), false);
} | O0 | cpp | testing::internal::CmpHelperSTREQ(char const*, char const*, char const*, char const*):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
movq %rax, -0x80(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x25e80
testb $0x1, %al
jne 0x284c0
jmp 0x284d1
movq -0x88(%rbp), %rdi
callq 0x17eb0
jmp 0x2856c
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x48ea0
leaq -0x68(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x48ea0
jmp 0x28503
movq -0x90(%rbp), %rdx
movq -0x98(%rbp), %rsi
movq -0x88(%rbp), %rdi
leaq -0x48(%rbp), %rcx
leaq -0x68(%rbp), %r8
xorl %r9d, %r9d
callq 0x277f0
jmp 0x2852a
leaq -0x68(%rbp), %rdi
callq 0xad98
leaq -0x48(%rbp), %rdi
callq 0xad98
jmp 0x2856c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x28561
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xad98
leaq -0x48(%rbp), %rdi
callq 0xad98
jmp 0x28579
movq -0x80(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0xac00
nopw %cs:(%rax,%rax)
| _ZN7testing8internal14CmpHelperSTREQEPKcS2_S2_S2_:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_88], rdi
mov rax, rdi
mov [rbp+var_80], rax
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 rdi, [rbp+var_20]; this
mov rsi, [rbp+var_28]; char *
call _ZN7testing8internal6String13CStringEqualsEPKcS3_; testing::internal::String::CStringEquals(char const*,char const*)
test al, 1
jnz short loc_284C0
jmp short loc_284D1
loc_284C0:
mov rdi, [rbp+var_88]; this
call _ZN7testing16AssertionSuccessEv; testing::AssertionSuccess(void)
jmp loc_2856C
loc_284D1:
mov rax, [rbp+var_10]
mov [rbp+var_98], rax
mov rax, [rbp+var_18]
mov [rbp+var_90], rax
lea rdi, [rbp+var_48]
lea rsi, [rbp+var_20]
call _ZN7testing13PrintToStringIPKcEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::PrintToString<char const*>(char const* const&)
lea rdi, [rbp+var_68]
lea rsi, [rbp+var_28]
call _ZN7testing13PrintToStringIPKcEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::PrintToString<char const*>(char const* const&)
jmp short $+2
loc_28503:
mov rdx, [rbp+var_90]
mov rsi, [rbp+var_98]
mov rdi, [rbp+var_88]
lea rcx, [rbp+var_48]
lea r8, [rbp+var_68]
xor r9d, r9d
call _ZN7testing8internal9EqFailureEPKcS2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_b; testing::internal::EqFailure(char const*,char const*,std::string const&,std::string const&,bool)
jmp short $+2
loc_2852A:
lea rdi, [rbp+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_2856C
mov rcx, rax
mov eax, edx
mov [rbp+var_70], rcx
mov [rbp+var_74], eax
jmp short loc_28561
mov rcx, rax
mov eax, edx
mov [rbp+var_70], rcx
mov [rbp+var_74], eax
lea rdi, [rbp+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_28561:
lea rdi, [rbp+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_28579
loc_2856C:
mov rax, [rbp+var_80]
add rsp, 0A0h
pop rbp
retn
loc_28579:
mov rdi, [rbp+var_70]
call __Unwind_Resume
| testing::internal * testing::internal::CmpHelperSTREQ(
testing::internal *this,
const char *a2,
const char *a3,
testing::internal::String *a4,
char *a5)
{
long long v6; // [rsp+8h] [rbp-98h]
long long v7; // [rsp+10h] [rbp-90h]
_BYTE v8[32]; // [rsp+38h] [rbp-68h] BYREF
_BYTE v9[32]; // [rsp+58h] [rbp-48h] BYREF
char *v10; // [rsp+78h] [rbp-28h] BYREF
testing::internal::String *v11; // [rsp+80h] [rbp-20h] BYREF
const char *v12; // [rsp+88h] [rbp-18h]
const char *v13; // [rsp+90h] [rbp-10h]
testing::internal *v14; // [rsp+98h] [rbp-8h]
v14 = this;
v13 = a2;
v12 = a3;
v11 = a4;
v10 = a5;
if ( testing::internal::String::CStringEquals(a4, a5, a3) )
{
testing::AssertionSuccess(this);
}
else
{
v6 = (long long)v13;
v7 = (long long)v12;
testing::PrintToString<char const*>(v9, &v11);
testing::PrintToString<char const*>(v8, &v10);
testing::internal::EqFailure(this, v6, v7, (long long)v9, (long long)v8, 0);
std::string::~string(v8);
std::string::~string(v9);
}
return this;
}
| CmpHelperSTREQ:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x88],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x80],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00125e80
TEST AL,0x1
JNZ 0x001284c0
JMP 0x001284d1
LAB_001284c0:
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00117eb0
JMP 0x0012856c
LAB_001284d1:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x90],RAX
LEA RDI,[RBP + -0x48]
LEA RSI,[RBP + -0x20]
CALL 0x00148ea0
LAB_001284f4:
LEA RDI,[RBP + -0x68]
LEA RSI,[RBP + -0x28]
CALL 0x00148ea0
JMP 0x00128503
LAB_00128503:
MOV RDX,qword ptr [RBP + -0x90]
MOV RSI,qword ptr [RBP + -0x98]
MOV RDI,qword ptr [RBP + -0x88]
LEA RCX,[RBP + -0x48]
LEA R8,[RBP + -0x68]
XOR R9D,R9D
CALL 0x001277f0
LAB_00128528:
JMP 0x0012852a
LAB_0012852a:
LEA RDI,[RBP + -0x68]
CALL 0x0010ad98
LEA RDI,[RBP + -0x48]
CALL 0x0010ad98
JMP 0x0012856c
LAB_0012856c:
MOV RAX,qword ptr [RBP + -0x80]
ADD RSP,0xa0
POP RBP
RET
|
/* testing::internal::CmpHelperSTREQ(char const*, char const*, char const*, char const*) */
internal * __thiscall
testing::internal::CmpHelperSTREQ
(internal *this,char *param_1,char *param_2,char *param_3,char *param_4)
{
char *pcVar1;
char *pcVar2;
ulong uVar3;
testing local_70 [32];
testing local_50 [32];
char *local_30;
char *local_28;
char *local_20;
char *local_18;
internal *local_10;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
uVar3 = String::CStringEquals(param_3,param_4);
pcVar2 = local_18;
pcVar1 = local_20;
if ((uVar3 & 1) == 0) {
PrintToString<char_const*>(local_50,&local_28);
/* try { // try from 001284f4 to 00128500 has its CatchHandler @ 0012853e */
PrintToString<char_const*>(local_70,&local_30);
/* try { // try from 00128503 to 00128527 has its CatchHandler @ 0012854c */
EqFailure(this,pcVar2,pcVar1,(string *)local_50,(string *)local_70,false);
std::__cxx11::string::~string((string *)local_70);
std::__cxx11::string::~string((string *)local_50);
}
else {
AssertionSuccess((testing *)this);
}
return this;
}
| |
48,814 | my_uca_copy_page | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_copy_page(MY_CHARSET_LOADER *loader,
const MY_UCA_WEIGHT_LEVEL *src,
MY_UCA_WEIGHT_LEVEL *dst,
size_t page)
{
uint chc, size= 256 * dst->lengths[page] * sizeof(uint16);
if (!(dst->weights[page]= (uint16 *) (loader->once_alloc)(size)))
return TRUE;
DBUG_ASSERT(src->lengths[page] <= dst->lengths[page]);
memset(dst->weights[page], 0, size);
for (chc=0 ; chc < 256; chc++)
{
memcpy(dst->weights[page] + chc * dst->lengths[page],
src->weights[page] + chc * src->lengths[page],
src->lengths[page] * sizeof(uint16));
}
return FALSE;
} | O0 | c | my_uca_copy_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
cltq
shlq %rax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %edi
callq *%rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x28(%rbp), %rdx
movq %rax, (%rcx,%rdx,8)
cmpq $0x0, %rax
jne 0xcf6a4
movb $0x1, -0x1(%rbp)
jmp 0xcf760
jmp 0xcf6a6
jmp 0xcf6a8
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x30(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a1f0
movl $0x0, -0x2c(%rbp)
cmpl $0x100, -0x2c(%rbp) # imm = 0x100
jae 0xcf75c
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x28(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
imull %ecx, %eax
movl %eax, %eax
shlq %rax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x28(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
imull %ecx, %eax
movl %eax, %eax
shlq %rax
addq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %edx
shlq %rdx
callq 0x2a2d0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xcf6cb
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_uca_copy_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
movzx eax, byte ptr [rax+rcx]
shl eax, 8
cdqe
shl rax, 1
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov ecx, [rbp+var_30]
mov edi, ecx
call rax
mov rcx, [rbp+var_20]
mov rcx, [rcx+10h]
mov rdx, [rbp+var_28]
mov [rcx+rdx*8], rax
cmp rax, 0
jnz short loc_CF6A4
mov [rbp+var_1], 1
jmp loc_CF760
loc_CF6A4:
jmp short $+2
loc_CF6A6:
jmp short $+2
loc_CF6A8:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rdi, [rax+rcx*8]
mov eax, [rbp+var_30]
mov edx, eax
xor esi, esi
call _memset
mov [rbp+var_2C], 0
loc_CF6CB:
cmp [rbp+var_2C], 100h
jnb loc_CF75C
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rdi, [rax+rcx*8]
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_20]
mov rcx, [rcx+8]
mov rdx, [rbp+var_28]
movzx ecx, byte ptr [rcx+rdx]
imul eax, ecx
mov eax, eax
shl rax, 1
add rdi, rax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rsi, [rax+rcx*8]
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
mov rdx, [rbp+var_28]
movzx ecx, byte ptr [rcx+rdx]
imul eax, ecx
mov eax, eax
shl rax, 1
add rsi, rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
movzx eax, byte ptr [rax+rcx]
mov edx, eax
shl rdx, 1
call _memcpy
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp loc_CF6CB
loc_CF75C:
mov [rbp+var_1], 0
loc_CF760:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_uca_copy_page(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
unsigned int v6; // [rsp+0h] [rbp-30h]
unsigned int i; // [rsp+4h] [rbp-2Ch]
v6 = *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) << 9;
v4 = (*(long long ( **)(_QWORD))(a1 + 128))(v6);
*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4) = v4;
if ( !v4 )
return 1;
memset(*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 0LL, v6);
for ( i = 0; i < 0x100; ++i )
memcpy(
2LL * *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4),
2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * a4),
2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4));
return 0;
}
| my_uca_copy_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SHL EAX,0x8
CDQE
SHL RAX,0x1
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RBP + -0x30]
MOV EDI,ECX
CALL RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV qword ptr [RCX + RDX*0x8],RAX
CMP RAX,0x0
JNZ 0x001cf6a4
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001cf760
LAB_001cf6a4:
JMP 0x001cf6a6
LAB_001cf6a6:
JMP 0x001cf6a8
LAB_001cf6a8:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x30]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a1f0
MOV dword ptr [RBP + -0x2c],0x0
LAB_001cf6cb:
CMP dword ptr [RBP + -0x2c],0x100
JNC 0x001cf75c
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
IMUL EAX,ECX
MOV EAX,EAX
SHL RAX,0x1
ADD RDI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
IMUL EAX,ECX
MOV EAX,EAX
SHL RAX,0x1
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV EDX,EAX
SHL RDX,0x1
CALL 0x0012a2d0
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001cf6cb
LAB_001cf75c:
MOV byte ptr [RBP + -0x1],0x0
LAB_001cf760:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_uca_copy_page(long param_1,long param_2,long param_3,long param_4)
{
size_t __n;
long lVar1;
int4 local_34;
int1 local_9;
__n = (long)(int)((uint)*(byte *)(*(long *)(param_3 + 8) + param_4) << 8) << 1;
lVar1 = (**(code **)(param_1 + 0x80))(__n);
*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) = lVar1;
if (lVar1 == 0) {
local_9 = 1;
}
else {
memset(*(void **)(*(long *)(param_3 + 0x10) + param_4 * 8),0,__n);
for (local_34 = 0; local_34 < 0x100; local_34 = local_34 + 1) {
memcpy((void *)(*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) +
(ulong)(local_34 * *(byte *)(*(long *)(param_3 + 8) + param_4)) * 2),
(void *)(*(long *)(*(long *)(param_2 + 0x10) + param_4 * 8) +
(ulong)(local_34 * *(byte *)(*(long *)(param_2 + 8) + param_4)) * 2),
(ulong)*(byte *)(*(long *)(param_2 + 8) + param_4) << 1);
}
local_9 = 0;
}
return local_9;
}
| |
48,815 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::start_array(unsigned long) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | bool start_array(std::size_t len)
{
ref_stack.push_back(handle_value(BasicJsonType::value_t::array));
#if JSON_DIAGNOSTIC_POSITIONS
// Manually set the start position of the array here.
// Ensure this is after the call to handle_value to ensure correct start position.
if (m_lexer_ref)
{
ref_stack.back()->start_position = m_lexer_ref->get_position() - 1;
}
#endif
if (JSON_HEDLEY_UNLIKELY(len != detail::unknown_size() && len > ref_stack.back()->max_size()))
{
JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back()));
}
return true;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::start_array(unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
addq $0x8, %rax
movq %rax, -0x80(%rbp)
movb $0x2, -0x19(%rbp)
leaq -0x19(%rbp), %rsi
callq 0x61440
movq -0x80(%rbp), %rdi
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x5c220
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
callq 0x5e610
movq -0x78(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x6e(%rbp)
je 0x8839b
movq -0x88(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
addq $0x8, %rdi
callq 0x60240
movq (%rax), %rdi
callq 0x5f6a0
movq %rax, %rcx
movq -0x90(%rbp), %rax
cmpq %rcx, %rax
seta %al
movb %al, -0x6e(%rbp)
movb -0x6e(%rbp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x883ab
jmp 0x8847f
movb $0x1, -0x6d(%rbp)
movl $0x20, %edi
callq 0x5c6c0
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x5c060
jmp 0x883cf
leaq 0x839b(%rip), %rsi # 0x90771
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x5e450
jmp 0x883e5
movq -0x88(%rbp), %rdi
addq $0x8, %rdi
callq 0x60240
movq -0x98(%rbp), %rdi
movq (%rax), %rcx
movl $0x198, %esi # imm = 0x198
leaq -0x40(%rbp), %rdx
callq 0x5d990
jmp 0x8840f
movq -0x98(%rbp), %rdi
movb $0x0, -0x6d(%rbp)
movq 0x1eb7f(%rip), %rsi # 0xa6fa0
movq 0x1eb10(%rip), %rdx # 0xa6f38
callq 0x60f20
jmp 0x88495
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x88469
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x88460
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5cfd0
leaq -0x60(%rbp), %rdi
callq 0x5cfd0
testb $0x1, -0x6d(%rbp)
jne 0x88471
jmp 0x8847d
movq -0x98(%rbp), %rdi
callq 0x5d520
jmp 0x8848c
movb $0x1, %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x611b0
nopw %cs:(%rax,%rax)
nop
| _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11start_arrayEm:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_88], rdi
mov rax, rdi
add rax, 8
mov [rbp+var_80], rax
mov [rbp+var_19], 2
lea rsi, [rbp+var_19]
call __ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12handle_valueINS1_7value_tEEEPSF_OT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&)
mov rdi, [rbp+var_80]; this
mov [rbp+var_18], rax
lea rsi, [rbp+var_18]
call __ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backEOSE_; std::vector<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> *,std::allocator<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> *>>::push_back(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> *&&)
mov rax, [rbp+var_10]
mov [rbp+var_78], rax
call __ZN8nlohmann16json_abi_v3_11_36detail12unknown_sizeEv; nlohmann::json_abi_v3_11_3::detail::unknown_size(void)
mov rcx, [rbp+var_78]
mov rdx, rax
xor eax, eax
cmp rcx, rdx
mov [rbp+var_6E], al
jz short loc_8839B
mov rdi, [rbp+var_88]
mov rax, [rbp+var_10]
mov [rbp+var_90], rax
add rdi, 8
call __ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<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> *,std::allocator<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> *>>::back(void)
mov rdi, [rax]
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; 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>::max_size(void)
mov rcx, rax
mov rax, [rbp+var_90]
cmp rax, rcx
setnbe al
mov [rbp+var_6E], al
loc_8839B:
mov al, [rbp+var_6E]
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_883AB
jmp loc_8847F
loc_883AB:
mov [rbp+var_6D], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rbp+var_98], rax
mov rsi, [rbp+var_10]; unsigned __int64
lea rdi, [rbp+var_60]; this
call __ZNSt7__cxx119to_stringEm; std::to_string(ulong)
jmp short $+2
loc_883CF:
lea rsi, aExcessiveArray; "excessive array size: "
lea rdi, [rbp+var_40]
lea rdx, [rbp+var_60]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA23_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(char const(&)[23],std::string &&)
jmp short $+2
loc_883E5:
mov rdi, [rbp+var_88]
add rdi, 8
call __ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<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> *,std::allocator<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> *>>::back(void)
mov rdi, [rbp+var_98]
mov rcx, [rax]
mov esi, 198h
lea rdx, [rbp+var_40]
call __ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_8840F:
mov rdi, [rbp+var_98]; void *
mov [rbp+var_6D], 0
mov rsi, cs:_ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE_ptr; lptinfo
mov rdx, cs:_ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp short loc_88495
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
jmp short loc_88469
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
jmp short loc_88460
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
lea rdi, [rbp+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_88460:
lea rdi, [rbp+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_88469:
test [rbp+var_6D], 1
jnz short loc_88471
jmp short loc_8847D
loc_88471:
mov rdi, [rbp+var_98]; void *
call ___cxa_free_exception
loc_8847D:
jmp short loc_8848C
loc_8847F:
mov al, 1
and al, 1
add rsp, 0A0h
pop rbp
retn
loc_8848C:
mov rdi, [rbp+var_68]
call __Unwind_Resume
loc_88495:
nop word ptr [rax+rax+00000000h]
nop
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::start_array(
long long a1,
unsigned long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail *v3; // rdi
_QWORD *v4; // rax
_QWORD *v5; // rax
void *exception; // [rsp+8h] [rbp-98h]
unsigned long long v8; // [rsp+10h] [rbp-90h]
unsigned long long v10; // [rsp+28h] [rbp-78h]
bool v11; // [rsp+32h] [rbp-6Eh]
_BYTE v12[32]; // [rsp+40h] [rbp-60h] BYREF
_BYTE v13[39]; // [rsp+60h] [rbp-40h] BYREF
char v14; // [rsp+87h] [rbp-19h] BYREF
long long v15; // [rsp+88h] [rbp-18h] BYREF
unsigned long long v16; // [rsp+90h] [rbp-10h]
long long v17; // [rsp+98h] [rbp-8h]
v17 = a1;
v16 = a2;
v14 = 2;
v2 = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(
a1,
&v14);
v3 = (nlohmann::json_abi_v3_11_3::detail *)(a1 + 8);
v15 = v2;
std::vector<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> *,std::allocator<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> *>>::push_back(
v3,
&v15);
v10 = v16;
v11 = 0;
if ( v10 != nlohmann::json_abi_v3_11_3::detail::unknown_size(v3) )
{
v8 = v16;
v4 = (_QWORD *)std::vector<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> *,std::allocator<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> *>>::back(a1 + 8);
v11 = v8 > 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>::max_size(*v4);
}
if ( v11 )
{
exception = __cxa_allocate_exception(0x20uLL);
std::to_string((std::__cxx11 *)v12, v16);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(
v13,
"excessive array size: ",
v12);
v5 = (_QWORD *)std::vector<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> *,std::allocator<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> *>>::back(a1 + 8);
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
408LL,
v13,
*v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range);
}
return 1;
}
| start_array:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x88],RDI
MOV RAX,RDI
ADD RAX,0x8
MOV qword ptr [RBP + -0x80],RAX
MOV byte ptr [RBP + -0x19],0x2
LEA RSI,[RBP + -0x19]
CALL 0x00161440
MOV RDI,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x18],RAX
LEA RSI,[RBP + -0x18]
CALL 0x0015c220
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x78],RAX
CALL 0x0015e610
MOV RCX,qword ptr [RBP + -0x78]
MOV RDX,RAX
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0x6e],AL
JZ 0x0018839b
MOV RDI,qword ptr [RBP + -0x88]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x90],RAX
ADD RDI,0x8
CALL 0x00160240
MOV RDI,qword ptr [RAX]
CALL 0x0015f6a0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x90]
CMP RAX,RCX
SETA AL
MOV byte ptr [RBP + -0x6e],AL
LAB_0018839b:
MOV AL,byte ptr [RBP + -0x6e]
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x001883ab
JMP 0x0018847f
LAB_001883ab:
MOV byte ptr [RBP + -0x6d],0x1
MOV EDI,0x20
CALL 0x0015c6c0
MOV qword ptr [RBP + -0x98],RAX
MOV RSI,qword ptr [RBP + -0x10]
LAB_001883c4:
LEA RDI,[RBP + -0x60]
CALL 0x0015c060
JMP 0x001883cf
LAB_001883cf:
LEA RSI,[0x190771]
LEA RDI,[RBP + -0x40]
LEA RDX,[RBP + -0x60]
CALL 0x0015e450
JMP 0x001883e5
LAB_001883e5:
MOV RDI,qword ptr [RBP + -0x88]
ADD RDI,0x8
CALL 0x00160240
MOV RDI,qword ptr [RBP + -0x98]
MOV RCX,qword ptr [RAX]
LAB_001883ff:
MOV ESI,0x198
LEA RDX,[RBP + -0x40]
CALL 0x0015d990
JMP 0x0018840f
LAB_0018840f:
MOV RDI,qword ptr [RBP + -0x98]
MOV byte ptr [RBP + -0x6d],0x0
MOV RSI,qword ptr [0x001a6fa0]
MOV RDX,qword ptr [0x001a6f38]
CALL 0x00160f20
LAB_0018847f:
MOV AL,0x1
AND AL,0x1
ADD RSP,0xa0
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::start_array(unsigned long) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::start_array(json_sax_dom_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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this,ulong param_1)
{
bool bVar1;
ulong uVar2;
ulong uVar3;
int8 *puVar4;
ulong uVar5;
int7 uVar7;
int8 uVar6;
__cxx11 local_68 [32];
detail local_48 [39];
value_t local_21;
basic_json *local_20;
ulong local_18;
json_sax_dom_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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*local_10;
local_21 = 2;
local_18 = param_1;
local_10 = this;
local_20 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,&local_21);
std::
vector<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>*,std::allocator<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>*>>
::push_back((vector<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>*,std::allocator<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 + 8),&local_20);
uVar5 = local_18;
uVar3 = unknown_size();
uVar2 = local_18;
uVar7 = 0;
bVar1 = false;
if (uVar5 != uVar3) {
puVar4 = (int8 *)
std::
vector<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>*,std::allocator<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>*>>
::back((vector<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>*,std::allocator<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 + 8));
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>
::max_size((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>
*)*puVar4);
bVar1 = uVar5 < uVar2;
uVar7 = (int7)(uVar2 >> 8);
}
if (!bVar1) {
return CONCAT71(uVar7,1);
}
uVar6 = __cxa_allocate_exception(0x20);
/* try { // try from 001883c4 to 001883cc has its CatchHandler @ 0018842f */
std::__cxx11::to_string(local_68,local_18);
/* try { // try from 001883cf to 001883e2 has its CatchHandler @ 0018843d */
concat<std::__cxx11::string,char_const(&)[23],std::__cxx11::string>
(local_48,"excessive array size: ",(string *)local_68);
puVar4 = (int8 *)
std::
vector<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>*,std::allocator<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>*>>
::back((vector<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>*,std::allocator<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 + 8));
/* try { // try from 001883ff to 0018842c has its CatchHandler @ 0018844b */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar6,0x198,local_48,*puVar4);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar6,PTR_typeinfo_001a6fa0,PTR__out_of_range_001a6f38);
}
| |
48,816 | ps_fetch_bin | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static
void ps_fetch_bin(MYSQL_BIND *r_param,
const MYSQL_FIELD *field,
unsigned char **row)
{
if (field->charsetnr == 63)
{
ulong field_length= *r_param->length= net_field_length(row);
uchar *current_pos= (*row) + r_param->offset,
*end= (*row) + field_length;
size_t copylen= 0;
if (current_pos < end)
{
copylen= end - current_pos;
if (r_param->buffer_length)
memcpy(r_param->buffer, current_pos, MIN(copylen, r_param->buffer_length));
}
if (copylen < r_param->buffer_length &&
(r_param->buffer_type == MYSQL_TYPE_STRING ||
r_param->buffer_type == MYSQL_TYPE_JSON))
((char *)r_param->buffer)[copylen]= 0;
*r_param->error= copylen > r_param->buffer_length;
(*row)+= field_length;
}
else
ps_fetch_string(r_param, field, row);
} | O0 | c | ps_fetch_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x3f, 0x6c(%rax)
jne 0xb7cfa
movq -0x18(%rbp), %rdi
callq 0x9e920
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq %rax, (%rcx)
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
addq 0x48(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xb7c92
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0xb7c90
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0xb7c73
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0xb7c7f
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rdx
callq 0x3a0b0
jmp 0xb7c92
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0xb7cca
movq -0x8(%rbp), %rax
cmpl $0xfe, 0x60(%rax)
je 0xb7cba
movq -0x8(%rbp), %rax
cmpl $0xf5, 0x60(%rax)
jne 0xb7cca
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x40(%rcx), %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0xb7d0b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xb7b70
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ps_fetch_bin:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
cmp dword ptr [rax+6Ch], 3Fh ; '?'
jnz loc_B7CFA
mov rdi, [rbp+var_18]
call net_field_length
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov [rcx], rax
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov rcx, [rbp+var_8]
add rax, [rcx+48h]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov rax, [rax]
add rax, [rbp+var_20]
mov [rbp+var_30], rax
mov [rbp+var_38], 0
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb short loc_B7C92
mov rax, [rbp+var_30]
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+40h], 0
jz short loc_B7C90
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
cmp rax, [rcx+40h]
jnb short loc_B7C73
mov rax, [rbp+var_38]
mov [rbp+var_50], rax
jmp short loc_B7C7F
loc_B7C73:
mov rax, [rbp+var_8]
mov rax, [rax+40h]
mov [rbp+var_50], rax
loc_B7C7F:
mov rsi, [rbp+var_40]
mov rdi, [rbp+var_48]
mov rdx, [rbp+var_50]
call _memcpy
loc_B7C90:
jmp short $+2
loc_B7C92:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
cmp rax, [rcx+40h]
jnb short loc_B7CCA
mov rax, [rbp+var_8]
cmp dword ptr [rax+60h], 0FEh
jz short loc_B7CBA
mov rax, [rbp+var_8]
cmp dword ptr [rax+60h], 0F5h
jnz short loc_B7CCA
loc_B7CBA:
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rcx, [rbp+var_38]
mov byte ptr [rax+rcx], 0
loc_B7CCA:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
cmp rax, [rcx+40h]
setnbe al
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rax], cl
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
add rcx, [rax]
mov [rax], rcx
jmp short loc_B7D0B
loc_B7CFA:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call ps_fetch_string
loc_B7D0B:
add rsp, 50h
pop rbp
retn
| unsigned __int8 ** ps_fetch_bin(long long a1, long long a2, unsigned __int8 **a3)
{
long long v3; // rax
unsigned __int8 **result; // rax
long long v5; // [rsp+8h] [rbp-48h]
unsigned long long v6; // [rsp+18h] [rbp-38h]
unsigned __int8 *v7; // [rsp+20h] [rbp-30h]
unsigned __int8 *v8; // [rsp+28h] [rbp-28h]
long long v9; // [rsp+30h] [rbp-20h]
if ( *(_DWORD *)(a2 + 108) != 63 )
return ps_fetch_string(a1, a2, a3);
v3 = net_field_length(a3);
**(_QWORD **)a1 = v3;
v9 = v3;
v8 = &(*a3)[*(_QWORD *)(a1 + 72)];
v7 = &(*a3)[v3];
v6 = 0LL;
if ( v8 < v7 )
{
v6 = v7 - v8;
if ( *(_QWORD *)(a1 + 64) )
{
v5 = *(_QWORD *)(a1 + 16);
if ( v6 >= *(_QWORD *)(a1 + 64) )
memcpy(v5, v8, *(_QWORD *)(a1 + 64));
else
memcpy(v5, v8, v6);
}
}
if ( v6 < *(_QWORD *)(a1 + 64) && (*(_DWORD *)(a1 + 96) == 254 || *(_DWORD *)(a1 + 96) == 245) )
*(_BYTE *)(*(_QWORD *)(a1 + 16) + v6) = 0;
**(_BYTE **)(a1 + 24) = v6 > *(_QWORD *)(a1 + 64);
result = a3;
*a3 += v9;
return result;
}
| ps_fetch_bin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x6c],0x3f
JNZ 0x001b7cfa
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0019e920
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RCX],RAX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RCX + 0x48]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001b7c92
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x001b7c90
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x40]
JNC 0x001b7c73
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001b7c7f
LAB_001b7c73:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x50],RAX
LAB_001b7c7f:
MOV RSI,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x0013a0b0
LAB_001b7c90:
JMP 0x001b7c92
LAB_001b7c92:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x40]
JNC 0x001b7cca
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x60],0xfe
JZ 0x001b7cba
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x60],0xf5
JNZ 0x001b7cca
LAB_001b7cba:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_001b7cca:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x40]
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
JMP 0x001b7d0b
LAB_001b7cfa:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001b7b70
LAB_001b7d0b:
ADD RSP,0x50
POP RBP
RET
|
void ps_fetch_bin(int8 *param_1,long param_2,long *param_3)
{
long lVar1;
void *__src;
size_t local_58;
ulong local_40;
if (*(int *)(param_2 + 0x6c) == 0x3f) {
lVar1 = net_field_length(param_3);
*(long *)*param_1 = lVar1;
__src = (void *)(*param_3 + param_1[9]);
local_40 = 0;
if ((__src < (void *)(*param_3 + lVar1)) &&
(local_40 = (*param_3 + lVar1) - (long)__src, param_1[8] != 0)) {
local_58 = local_40;
if ((ulong)param_1[8] <= local_40) {
local_58 = param_1[8];
}
memcpy((void *)param_1[2],__src,local_58);
}
if ((local_40 < (ulong)param_1[8]) &&
((*(int *)(param_1 + 0xc) == 0xfe || (*(int *)(param_1 + 0xc) == 0xf5)))) {
*(int1 *)(param_1[2] + local_40) = 0;
}
*(bool *)param_1[3] = (ulong)param_1[8] < local_40;
*param_3 = lVar1 + *param_3;
}
else {
ps_fetch_string(param_1,param_2,param_3);
}
return;
}
| |
48,817 | ma_apply_redo_bitmap_new_page | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_apply_redo_bitmap_new_page(MARIA_HA *info,
LSN lsn __attribute__ ((unused)),
const uchar *header)
{
MARIA_SHARE *share= info->s;
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
my_bool error;
pgcache_page_no_t from, to, min_from;
DBUG_ENTER("_ma_apply_redo_bitmap_new_page");
from= page_korr(header);
to= page_korr(header + PAGE_STORE_SIZE);
DBUG_PRINT("info", ("from: %lu to: %lu", (ulong)from, (ulong)to));
if ((from > to) ||
(from % bitmap->pages_covered) != 0 ||
(to % bitmap->pages_covered) != 0)
{
error= TRUE; /* corrupted log record */
goto err;
}
min_from= (share->state.state.data_file_length / bitmap->block_size - 1) /
bitmap->pages_covered + 1;
min_from*= bitmap->pages_covered;
if (from < min_from)
{
DBUG_PRINT("info", ("overwrite bitmap pages from %lu", (ulong)min_from));
/*
We have to overwrite. It could be that there was a bitmap page in
memory, covering a data page which went to disk, then crash: the
bitmap page is now full of zeros and is ==min_from, we have to overwrite
it with correct checksum.
*/
}
share->state.changed|= STATE_CHANGED;
bzero(info->buff, bitmap->block_size);
if (!(error=
_ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to,
info->buff)))
share->state.state.data_file_length= (to + 1) * bitmap->block_size;
err:
DBUG_RETURN(error);
} | O0 | c | ma_apply_redo_bitmap_new_page:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x64910
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
addq $0x5, %rdi
callq 0x64910
movq %rax, -0x40(%rbp)
jmp 0x64dcd
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x64e05
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
cmpq $0x0, %rdx
jne 0x64e05
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
cmpq $0x0, %rdx
je 0x64e0e
movb $0x1, -0x29(%rbp)
jmp 0x64eda
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rcx
movl 0x134(%rcx), %ecx
xorl %edx, %edx
divq %rcx
subq $0x1, %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x138(%rax), %rax
imulq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x64e62
jmp 0x64e5e
jmp 0x64e60
jmp 0x64e62
movq -0x20(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x170(%rax)
movq -0x8(%rbp), %rax
movq 0x378(%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x134(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2a0
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x378(%rax), %r8
callq 0x64ef0
movb %al, -0x29(%rbp)
cmpb $0x0, %al
jne 0x64ed8
movq -0x40(%rbp), %rcx
addq $0x1, %rcx
movq -0x28(%rbp), %rax
movl 0x134(%rax), %eax
imulq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
jmp 0x64eda
jmp 0x64edc
movb -0x29(%rbp), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ma_apply_redo_bitmap_new_page:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rax, 0A10h
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
call uint5korr_1
mov [rbp+var_38], rax
mov rdi, [rbp+var_18]
add rdi, 5
call uint5korr_1
mov [rbp+var_40], rax
jmp short $+2
loc_64DCD:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
ja short loc_64E05
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
cmp rdx, 0
jnz short loc_64E05
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
cmp rdx, 0
jz short loc_64E0E
loc_64E05:
mov [rbp+var_29], 1
jmp loc_64EDA
loc_64E0E:
mov rax, [rbp+var_20]
mov rax, [rax+40h]
mov rcx, [rbp+var_28]
mov ecx, [rcx+134h]
xor edx, edx
div rcx
sub rax, 1
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov rax, [rax+138h]
imul rax, [rbp+var_48]
mov [rbp+var_48], rax
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jnb short loc_64E62
jmp short $+2
loc_64E5E:
jmp short $+2
loc_64E60:
jmp short $+2
loc_64E62:
mov rax, [rbp+var_20]
mov ecx, [rax+170h]
or ecx, 1
mov [rax+170h], ecx
mov rax, [rbp+var_8]
mov rdi, [rax+378h]
mov rax, [rbp+var_28]
mov eax, [rax+134h]
mov edx, eax
xor esi, esi
call _memset
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_40]
mov rax, [rbp+var_8]
mov r8, [rax+378h]
call _ma_bitmap_create_missing_into_pagecache
mov [rbp+var_29], al
cmp al, 0
jnz short loc_64ED8
mov rcx, [rbp+var_40]
add rcx, 1
mov rax, [rbp+var_28]
mov eax, [rax+134h]
imul rcx, rax
mov rax, [rbp+var_20]
mov [rax+40h], rcx
loc_64ED8:
jmp short $+2
loc_64EDA:
jmp short $+2
loc_64EDC:
mov al, [rbp+var_29]
mov [rbp+var_49], al
mov al, [rbp+var_49]
add rsp, 50h
pop rbp
retn
| char ma_apply_redo_bitmap_new_page(long long *a1, long long a2, unsigned int *a3)
{
unsigned long long v4; // [rsp+10h] [rbp-40h]
unsigned long long v5; // [rsp+18h] [rbp-38h]
char missing_into_pagecache; // [rsp+27h] [rbp-29h]
long long v7; // [rsp+28h] [rbp-28h]
long long v8; // [rsp+30h] [rbp-20h]
v8 = *a1;
v7 = *a1 + 2576;
v5 = uint5korr_1(a3);
v4 = uint5korr_1((unsigned int *)((char *)a3 + 5));
if ( v5 > v4 || v5 % *(_QWORD *)(v7 + 312) || v4 % *(_QWORD *)(v7 + 312) )
return 1;
*(_DWORD *)(v8 + 368) |= 1u;
memset(a1[111], 0LL, *(unsigned int *)(v7 + 308));
missing_into_pagecache = ma_bitmap_create_missing_into_pagecache(v8, v7, v5, v4, a1[111]);
if ( !missing_into_pagecache )
*(_QWORD *)(v8 + 64) = *(unsigned int *)(v7 + 308) * (v4 + 1);
return missing_into_pagecache;
}
| _ma_apply_redo_bitmap_new_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0xa10
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00164910
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x5
CALL 0x00164910
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00164dcd
LAB_00164dcd:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x00164e05
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
CMP RDX,0x0
JNZ 0x00164e05
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
CMP RDX,0x0
JZ 0x00164e0e
LAB_00164e05:
MOV byte ptr [RBP + -0x29],0x1
JMP 0x00164eda
LAB_00164e0e:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x134]
XOR EDX,EDX
DIV RCX
SUB RAX,0x1
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x138]
IMUL RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x00164e62
JMP 0x00164e5e
LAB_00164e5e:
JMP 0x00164e60
LAB_00164e60:
JMP 0x00164e62
LAB_00164e62:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x1
MOV dword ptr [RAX + 0x170],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x378]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x134]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2a0
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x8]
MOV R8,qword ptr [RAX + 0x378]
CALL 0x00164ef0
MOV byte ptr [RBP + -0x29],AL
CMP AL,0x0
JNZ 0x00164ed8
MOV RCX,qword ptr [RBP + -0x40]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x134]
IMUL RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x40],RCX
LAB_00164ed8:
JMP 0x00164eda
LAB_00164eda:
JMP 0x00164edc
LAB_00164edc:
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x49],AL
MOV AL,byte ptr [RBP + -0x49]
ADD RSP,0x50
POP RBP
RET
|
char _ma_apply_redo_bitmap_new_page(long *param_1,int8 param_2,long param_3)
{
long lVar1;
ulong uVar2;
ulong uVar3;
char local_31;
lVar1 = *param_1;
uVar2 = uint5korr(param_3);
uVar3 = uint5korr(param_3 + 5);
if (((uVar3 < uVar2) || (uVar2 % *(ulong *)(lVar1 + 0xb48) != 0)) ||
(uVar3 % *(ulong *)(lVar1 + 0xb48) != 0)) {
local_31 = '\x01';
}
else {
*(uint *)(lVar1 + 0x170) = *(uint *)(lVar1 + 0x170) | 1;
memset((void *)param_1[0x6f],0,(ulong)*(uint *)(lVar1 + 0xb44));
local_31 = _ma_bitmap_create_missing_into_pagecache
(lVar1,lVar1 + 0xa10,uVar2,uVar3,param_1[0x6f]);
if (local_31 == '\0') {
*(ulong *)(lVar1 + 0x40) = (uVar3 + 1) * (ulong)*(uint *)(lVar1 + 0xb44);
}
}
return local_31;
}
| |
48,818 | testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolder* testing::internal::CheckedDowncastToActualType<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolder, testing::internal::ThreadLocalValueHolderBase>(testing::internal::ThreadLocalValueHolderBase*) | AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h | Derived* CheckedDowncastToActualType(Base* base) {
static_assert(std::is_base_of<Base, Derived>::value,
"target type not derived from source type");
#if GTEST_HAS_RTTI
GTEST_CHECK_(base == nullptr || dynamic_cast<Derived*>(base) != nullptr);
#endif
return static_cast<Derived*>(base);
} | O0 | c | testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolder* testing::internal::CheckedDowncastToActualType<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolder, testing::internal::ThreadLocalValueHolderBase>(testing::internal::ThreadLocalValueHolderBase*):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movb $0x1, %al
cmpq $0x0, 0x30(%rsp)
movb %al, 0x1b(%rsp)
je 0xfe8e3
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0xfe8ca
movq 0x10(%rsp), %rdi
leaq 0x78f85(%rip), %rsi # 0x177838
leaq 0x792b6(%rip), %rdx # 0x177b70
xorl %eax, %eax
movl %eax, %ecx
callq 0x147b0
movq %rax, 0x8(%rsp)
jmp 0xfe8d3
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0xfe8d3
movq 0x8(%rsp), %rax
cmpq $0x0, %rax
setne %al
movb %al, 0x1b(%rsp)
movb 0x1b(%rsp), %al
movzbl %al, %edi
andl $0x1, %edi
callq 0xb38e0
testb $0x1, %al
jne 0xfe8f8
jmp 0xfe8fa
jmp 0xfe959
leaq 0x15e3a(%rip), %rdx # 0x11473b
leaq 0x2c(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x3, %esi
movl $0x4aa, %ecx # imm = 0x4AA
callq 0xb9070
movq (%rsp), %rdi
callq 0x1ea10
movq %rax, %rdi
leaq 0x160fe(%rip), %rsi # 0x114a2a
callq 0x146a0
jmp 0xfe933
leaq 0x2c(%rsp), %rdi
callq 0xb91e0
jmp 0xfe959
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x2c(%rsp), %rdi
callq 0xb91e0
jmp 0xfe963
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x14c80
nopl (%rax)
| _ZN7testing8internal27CheckedDowncastToActualTypeINS0_11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE11ValueHolderENS0_26ThreadLocalValueHolderBaseEEEPT_PT0_:
sub rsp, 38h
mov qword ptr [rsp+38h+var_8], rdi; int
mov al, 1
cmp qword ptr [rsp+38h+var_8], 0
mov [rsp+38h+var_1D], al
jz short loc_FE8E3
mov rax, qword ptr [rsp+38h+var_8]
mov [rsp+38h+lpsrc], rax; int
cmp rax, 0
jz short loc_FE8CA
mov rdi, [rsp+38h+lpsrc]; lpsrc
lea rsi, _ZTIN7testing8internal26ThreadLocalValueHolderBaseE; bool
lea rdx, _ZTIN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE11ValueHolderE; lpdtype
xor eax, eax
mov ecx, eax; s2d
call ___dynamic_cast
mov qword ptr [rsp+38h+var_30], rax; int
jmp short loc_FE8D3
loc_FE8CA:
xor eax, eax
mov qword ptr [rsp+38h+var_30], rax
jmp short $+2
loc_FE8D3:
mov rax, qword ptr [rsp+38h+var_30]
cmp rax, 0
setnz al
mov [rsp+38h+var_1D], al
loc_FE8E3:
mov al, [rsp+38h+var_1D]
movzx edi, al
and edi, 1; this
call _ZN7testing8internal6IsTrueEb; testing::internal::IsTrue(bool)
test al, 1
jnz short loc_FE8F8
jmp short loc_FE8FA
loc_FE8F8:
jmp short loc_FE959
loc_FE8FA:
lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+38h+var_C]; int
mov [rsp+38h+var_38], rdi; int
mov esi, 3
mov ecx, 4AAh
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, [rsp+38h+var_38]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov rdi, rax
lea rsi, aConditionBaseN; "Condition base == nullptr || dynamic_ca"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_FE933:
lea rdi, [rsp+38h+var_C]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_FE959
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
lea rdi, [rsp+arg_24]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_FE963
loc_FE959:
mov rax, qword ptr [rsp+38h+var_8]
add rsp, 38h
retn
loc_FE963:
mov rdi, [rsp+arg_18]
call __Unwind_Resume
| long long testing::internal::CheckedDowncastToActualType<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::ValueHolder,testing::internal::ThreadLocalValueHolderBase>(
long long a1)
{
void *Stream; // rax
bool v3; // [rsp+1Bh] [rbp-1Dh]
int v4; // [rsp+2Ch] [rbp-Ch] BYREF
int v5[2]; // [rsp+30h] [rbp-8h]
*(_QWORD *)v5 = a1;
v3 = 1;
if ( a1 )
v3 = __dynamic_cast(
*(const void **)v5,
(const struct __class_type_info *)&`typeinfo for'testing::internal::ThreadLocalValueHolderBase,
(const struct __class_type_info *)&`typeinfo for'testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::ValueHolder,
0LL) != 0LL;
if ( (testing::internal::IsTrue((testing::internal *)v3) & 1) == 0 )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)&v4,
3,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h",
1194);
Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v4);
std::operator<<<std::char_traits<char>>(
Stream,
"Condition base == nullptr || dynamic_cast<Derived*>(base) != nullptr failed. ");
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v4);
}
return *(_QWORD *)v5;
}
| CheckedDowncastToActualType<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolder,testing::internal::ThreadLocalValueHolderBase>:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV AL,0x1
CMP qword ptr [RSP + 0x30],0x0
MOV byte ptr [RSP + 0x1b],AL
JZ 0x001fe8e3
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
CMP RAX,0x0
JZ 0x001fe8ca
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[0x277838]
LEA RDX,[0x277b70]
XOR EAX,EAX
MOV ECX,EAX
CALL 0x001147b0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001fe8d3
LAB_001fe8ca:
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001fe8d3
LAB_001fe8d3:
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0x1b],AL
LAB_001fe8e3:
MOV AL,byte ptr [RSP + 0x1b]
MOVZX EDI,AL
AND EDI,0x1
CALL 0x001b38e0
TEST AL,0x1
JNZ 0x001fe8f8
JMP 0x001fe8fa
LAB_001fe8f8:
JMP 0x001fe959
LAB_001fe8fa:
LEA RDX,[0x21473b]
LEA RDI,[RSP + 0x2c]
MOV qword ptr [RSP],RDI
MOV ESI,0x3
MOV ECX,0x4aa
CALL 0x001b9070
MOV RDI,qword ptr [RSP]
CALL 0x0011ea10
MOV RDI,RAX
LAB_001fe925:
LEA RSI,[0x214a2a]
CALL 0x001146a0
LAB_001fe931:
JMP 0x001fe933
LAB_001fe933:
LEA RDI,[RSP + 0x2c]
CALL 0x001b91e0
JMP 0x001fe959
LAB_001fe959:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
/* testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolder*
testing::internal::CheckedDowncastToActualType<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolder,
testing::internal::ThreadLocalValueHolderBase>(testing::internal::ThreadLocalValueHolderBase*) */
ValueHolder *
testing::internal::
CheckedDowncastToActualType<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolder,testing::internal::ThreadLocalValueHolderBase>
(ThreadLocalValueHolderBase *param_1)
{
ulong uVar1;
ostream *poVar2;
int8 in_R8;
int8 in_R9;
long local_30;
bool local_1d;
GTestLog local_c [4];
ValueHolder *local_8;
local_1d = true;
local_8 = (ValueHolder *)param_1;
if (param_1 != (ThreadLocalValueHolderBase *)0x0) {
if (param_1 == (ThreadLocalValueHolderBase *)0x0) {
local_30 = 0;
}
else {
local_30 = __dynamic_cast(param_1,&ThreadLocalValueHolderBase::typeinfo,
&ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolder
::typeinfo,0);
}
local_1d = local_30 != 0;
}
uVar1 = IsTrue(local_1d);
if ((uVar1 & 1) == 0) {
GTestLog::GTestLog(local_c,3,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h"
,0x4aa,in_R8,in_R9,local_c);
poVar2 = (ostream *)GTestLog::GetStream();
/* try { // try from 001fe925 to 001fe930 has its CatchHandler @ 001fe93f */
std::operator<<(poVar2,
"Condition base == nullptr || dynamic_cast<Derived*>(base) != nullptr failed. ")
;
GTestLog::~GTestLog(local_c);
}
return local_8;
}
| |
48,819 | clip_uhd_num_image_embeds_col | monkey531[P]llama/examples/llava/clip.cpp | int clip_uhd_num_image_embeds_col(struct clip_ctx * ctx_clip) {
const int max_slice_nums=9;
const int scale_resolution=448;
const int original_width = ctx_clip->load_image_size->width;
const int original_height = ctx_clip->load_image_size->height;
const float log_ratio = log(1.0*original_width/original_height);
const float ratio = 1.0 * original_width * original_height/ (scale_resolution * scale_resolution);
const int multiple = fmin(ceil(ratio), max_slice_nums);
std::pair<int, int> best_grid = uhd_best_grid(max_slice_nums, multiple, log_ratio);
return best_grid.first;
} | O3 | cpp | clip_uhd_num_image_embeds_col:
subq $0x38, %rsp
movq 0x3a0(%rdi), %rax
cvtdq2pd (%rax), %xmm0
movapd %xmm0, 0x20(%rsp)
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
movapd %xmm1, 0x10(%rsp)
divsd %xmm1, %xmm0
callq 0x1d9a0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
movapd 0x10(%rsp), %xmm0
mulsd 0x20(%rsp), %xmm0
divsd 0xd9590(%rip), %xmm0 # 0x10a4e8
cvtsd2ss %xmm0, %xmm0
callq 0x1d6b0
cvtss2sd %xmm0, %xmm0
minsd 0xd9583(%rip), %xmm0 # 0x10a4f0
cvttsd2si %xmm0, %edi
movss 0xc(%rsp), %xmm0
addq $0x38, %rsp
jmp 0x30f7d
| clip_uhd_num_image_embeds_col:
sub rsp, 38h
mov rax, [rdi+3A0h]
cvtdq2pd xmm0, qword ptr [rax]
movapd [rsp+38h+var_18], xmm0
movapd xmm1, xmm0
unpckhpd xmm1, xmm0
movapd [rsp+38h+var_28], xmm1
divsd xmm0, xmm1
call _log
cvtsd2ss xmm0, xmm0
movss [rsp+38h+var_2C], xmm0
movapd xmm0, [rsp+38h+var_28]
mulsd xmm0, qword ptr [rsp+38h+var_18]
divsd xmm0, cs:qword_10A4E8
cvtsd2ss xmm0, xmm0
call _ceilf
cvtss2sd xmm0, xmm0
minsd xmm0, cs:qword_10A4F0
cvttsd2si edi, xmm0; int
movss xmm0, [rsp+38h+var_2C]; float
add rsp, 38h
jmp short $+2; uhd_best_grid(int,int,float)
| long long clip_uhd_num_image_embeds_col(long long a1, int a2)
{
float v2; // xmm0_4
float v3; // xmm0_4
int v4; // edi
float v6; // [rsp+Ch] [rbp-2Ch]
double v7; // [rsp+10h] [rbp-28h]
__m128d v8; // [rsp+20h] [rbp-18h]
v8 = _mm_cvtepi32_pd((__m64)(*(__m64 **)(a1 + 928))->m64_u64);
v7 = _mm_unpackhi_pd(v8, v8).m128d_f64[0];
v2 = log(v8.m128d_f64[0] / v7);
v6 = v2;
v3 = v7 * v8.m128d_f64[0] / 200704.0;
v4 = (int)fmin(ceilf(v3), 9.0);
return uhd_best_grid(v4, a2, v6);
}
| clip_uhd_num_image_embeds_col:
SUB RSP,0x38
MOV RAX,qword ptr [RDI + 0x3a0]
CVTDQ2PD XMM0,qword ptr [RAX]
MOVAPD xmmword ptr [RSP + 0x20],XMM0
MOVAPD XMM1,XMM0
UNPCKHPD XMM1,XMM0
MOVAPD xmmword ptr [RSP + 0x10],XMM1
DIVSD XMM0,XMM1
CALL 0x0011d9a0
CVTSD2SS XMM0,XMM0
MOVSS dword ptr [RSP + 0xc],XMM0
MOVAPD XMM0,xmmword ptr [RSP + 0x10]
MULSD XMM0,qword ptr [RSP + 0x20]
DIVSD XMM0,qword ptr [0x0020a4e8]
CVTSD2SS XMM0,XMM0
CALL 0x0011d6b0
CVTSS2SD XMM0,XMM0
MINSD XMM0,qword ptr [0x0020a4f0]
CVTTSD2SI EDI,XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
ADD RSP,0x38
JMP 0x00130f7d
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void clip_uhd_num_image_embeds_col(long param_1,int param_2)
{
double dVar1;
double dVar2;
double dVar3;
float fVar4;
dVar1 = (double)(int)**(int8 **)(param_1 + 0x3a0);
dVar3 = (double)(int)((ulong)**(int8 **)(param_1 + 0x3a0) >> 0x20);
dVar2 = log(dVar1 / dVar3);
fVar4 = ceilf((float)((dVar3 * dVar1) / _DAT_0020a4e8));
dVar1 = (double)fVar4;
if (DAT_0020a4f0 <= (double)fVar4) {
dVar1 = DAT_0020a4f0;
}
uhd_best_grid((int)dVar1,param_2,(float)dVar2);
return;
}
| |
48,820 | my_hash_sort_utf16_nopad_bin | eloqsql/strings/ctype-ucs2.c | static void
my_hash_sort_utf16_nopad_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *pos, size_t len,
ulong *nr1, ulong *nr2)
{
const uchar *end= pos + len;
register ulong m1= *nr1, m2= *nr2;
for ( ; pos < end ; pos++)
{
MY_HASH_ADD(m1, m2, (uint)*pos);
}
*nr1= m1;
*nr2= m2;
} | O3 | c | my_hash_sort_utf16_nopad_bin:
movq (%rcx), %rax
movq (%r8), %rdi
testq %rdx, %rdx
jle 0x68f84
pushq %rbp
movq %rsp, %rbp
addq %rsi, %rdx
movl %eax, %r9d
andl $0x3f, %r9d
addq %rdi, %r9
movzbl (%rsi), %r10d
imulq %r9, %r10
movq %rax, %r9
shlq $0x8, %r9
addq %r10, %r9
xorq %r9, %rax
addq $0x3, %rdi
incq %rsi
cmpq %rdx, %rsi
jb 0x68f58
popq %rbp
movq %rax, (%rcx)
movq %rdi, (%r8)
retq
| my_hash_sort_utf16_nopad_bin:
mov rax, [rcx]
mov rdi, [r8]
test rdx, rdx
jle short loc_68F84
push rbp
mov rbp, rsp
add rdx, rsi
loc_68F58:
mov r9d, eax
and r9d, 3Fh
add r9, rdi
movzx r10d, byte ptr [rsi]
imul r10, r9
mov r9, rax
shl r9, 8
add r9, r10
xor rax, r9
add rdi, 3
inc rsi
cmp rsi, rdx
jb short loc_68F58
pop rbp
loc_68F84:
mov [rcx], rax
mov [r8], rdi
retn
| long long my_hash_sort_utf16_nopad_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5)
{
long long result; // rax
long long v6; // rdi
unsigned __int8 *v7; // rdx
result = *a4;
v6 = *a5;
if ( a3 > 0 )
{
v7 = &a2[a3];
do
{
result ^= (v6 + (result & 0x3F)) * *a2 + (result << 8);
v6 += 3LL;
++a2;
}
while ( a2 < v7 );
}
*a4 = result;
*a5 = v6;
return result;
}
| my_hash_sort_utf16_nopad_bin:
MOV RAX,qword ptr [RCX]
MOV RDI,qword ptr [R8]
TEST RDX,RDX
JLE 0x00168f84
PUSH RBP
MOV RBP,RSP
ADD RDX,RSI
LAB_00168f58:
MOV R9D,EAX
AND R9D,0x3f
ADD R9,RDI
MOVZX R10D,byte ptr [RSI]
IMUL R10,R9
MOV R9,RAX
SHL R9,0x8
ADD R9,R10
XOR RAX,R9
ADD RDI,0x3
INC RSI
CMP RSI,RDX
JC 0x00168f58
POP RBP
LAB_00168f84:
MOV qword ptr [RCX],RAX
MOV qword ptr [R8],RDI
RET
|
void my_hash_sort_utf16_nopad_bin
(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
ulong uVar1;
byte *pbVar2;
long lVar3;
uVar1 = *param_4;
lVar3 = *param_5;
if (0 < param_3) {
pbVar2 = param_2 + param_3;
do {
uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar1 & 0x3f) + lVar3);
lVar3 = lVar3 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar2);
}
*param_4 = uVar1;
*param_5 = lVar3;
return;
}
| |
48,821 | plutovg_gradient_create | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-paint.c | static plutovg_gradient_paint_t* plutovg_gradient_create(plutovg_gradient_type_t type, plutovg_spread_method_t spread, const plutovg_gradient_stop_t* stops, int nstops, const plutovg_matrix_t* matrix)
{
plutovg_gradient_paint_t* gradient = plutovg_paint_create(PLUTOVG_PAINT_TYPE_GRADIENT, sizeof(plutovg_gradient_paint_t) + nstops * sizeof(plutovg_gradient_stop_t));
gradient->type = type;
gradient->spread = spread;
gradient->matrix = matrix ? *matrix : PLUTOVG_IDENTITY_MATRIX;
gradient->stops = (plutovg_gradient_stop_t*)(gradient + 1);
gradient->nstops = nstops;
float prev_offset = 0.f;
for(int i = 0; i < nstops; ++i) {
const plutovg_gradient_stop_t* stop = stops + i;
gradient->stops[i].offset = plutovg_max(prev_offset, plutovg_clamp(stop->offset, 0.f, 1.f));
gradient->stops[i].color.r = plutovg_clamp(stop->color.r, 0.f, 1.f);
gradient->stops[i].color.g = plutovg_clamp(stop->color.g, 0.f, 1.f);
gradient->stops[i].color.b = plutovg_clamp(stop->color.b, 0.f, 1.f);
gradient->stops[i].color.a = plutovg_clamp(stop->color.a, 0.f, 1.f);
prev_offset = gradient->stops[i].offset;
}
return gradient;
} | O1 | c | plutovg_gradient_create:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %rbx
movl %esi, %r15d
movl %edi, %r12d
movslq %ecx, %rax
leaq (%rax,%rax,4), %rax
leaq 0x50(,%rax,4), %rdi
callq 0xa400
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, (%rax)
movl %r12d, 0x8(%rax)
movl %r15d, 0xc(%rax)
testq %r14, %r14
je 0x29f3f
leaq 0x10(%rax), %rcx
movq 0x10(%r14), %rdx
movq %rdx, 0x10(%rcx)
movups (%r14), %xmm0
movups %xmm0, (%rcx)
jmp 0x29f52
movaps 0x191ca(%rip), %xmm0 # 0x43110
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movq %rax, %rcx
addq $0x50, %rcx
movq %rcx, 0x28(%rax)
movl %ebp, 0x30(%rax)
testl %ebp, %ebp
jle 0x2a04c
movl %ebp, %ecx
shlq $0x2, %rcx
leaq (%rcx,%rcx,4), %rcx
xorps %xmm0, %xmm0
xorl %edx, %edx
movss 0x19175(%rip), %xmm1 # 0x430f4
xorps %xmm2, %xmm2
movss (%rbx,%rdx), %xmm3
ucomiss %xmm3, %xmm0
xorps %xmm4, %xmm4
ja 0x29f9a
ucomiss %xmm1, %xmm3
movaps %xmm1, %xmm4
ja 0x29f9a
movaps %xmm3, %xmm4
xorps %xmm5, %xmm5
ucomiss %xmm3, %xmm5
seta %sil
ucomiss %xmm4, %xmm2
seta %dil
ja 0x29fb0
xorps %xmm2, %xmm2
orb %dil, %sil
jne 0x29fc0
ucomiss %xmm1, %xmm3
movaps %xmm1, %xmm2
ja 0x29fc0
movaps %xmm3, %xmm2
movss %xmm2, 0x50(%rax,%rdx)
movss 0x4(%rbx,%rdx), %xmm4
xorps %xmm3, %xmm3
ucomiss %xmm4, %xmm3
ja 0x29fdf
ucomiss %xmm1, %xmm4
movaps %xmm1, %xmm5
ja 0x29fdf
movaps %xmm4, %xmm5
movss %xmm5, 0x54(%rax,%rdx)
movss 0x8(%rbx,%rdx), %xmm4
ucomiss %xmm4, %xmm3
ja 0x29ffb
ucomiss %xmm1, %xmm4
movaps %xmm1, %xmm3
ja 0x29ffb
movaps %xmm4, %xmm3
movss %xmm3, 0x58(%rax,%rdx)
movss 0xc(%rbx,%rdx), %xmm4
xorps %xmm3, %xmm3
ucomiss %xmm4, %xmm3
xorps %xmm5, %xmm5
ja 0x2a01d
ucomiss %xmm1, %xmm4
movaps %xmm1, %xmm5
ja 0x2a01d
movaps %xmm4, %xmm5
movss %xmm5, 0x5c(%rax,%rdx)
movss 0x10(%rbx,%rdx), %xmm4
ucomiss %xmm4, %xmm3
ja 0x2a039
ucomiss %xmm1, %xmm4
movaps %xmm1, %xmm3
ja 0x2a039
movaps %xmm4, %xmm3
movss %xmm3, 0x60(%rax,%rdx)
addq $0x14, %rdx
cmpq %rdx, %rcx
jne 0x29f82
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| plutovg_gradient_create:
push rbp
push r15
push r14
push r12
push rbx
mov r14, r8
mov ebp, ecx
mov rbx, rdx
mov r15d, esi
mov r12d, edi
movsxd rax, ecx
lea rax, [rax+rax*4]
lea rdi, ds:50h[rax*4]
call _malloc
mov rcx, 100000001h
mov [rax], rcx
mov [rax+8], r12d
mov [rax+0Ch], r15d
test r14, r14
jz short loc_29F3F
lea rcx, [rax+10h]
mov rdx, [r14+10h]
mov [rcx+10h], rdx
movups xmm0, xmmword ptr [r14]
movups xmmword ptr [rcx], xmm0
jmp short loc_29F52
loc_29F3F:
movaps xmm0, cs:xmmword_43110
movups xmmword ptr [rax+10h], xmm0
mov qword ptr [rax+20h], 0
loc_29F52:
mov rcx, rax
add rcx, 50h ; 'P'
mov [rax+28h], rcx
mov [rax+30h], ebp
test ebp, ebp
jle loc_2A04C
mov ecx, ebp
shl rcx, 2
lea rcx, [rcx+rcx*4]
xorps xmm0, xmm0
xor edx, edx
movss xmm1, cs:flt_430F4
xorps xmm2, xmm2
loc_29F82:
movss xmm3, dword ptr [rbx+rdx]
ucomiss xmm0, xmm3
xorps xmm4, xmm4
ja short loc_29F9A
ucomiss xmm3, xmm1
movaps xmm4, xmm1
ja short loc_29F9A
movaps xmm4, xmm3
loc_29F9A:
xorps xmm5, xmm5
ucomiss xmm5, xmm3
setnbe sil
ucomiss xmm2, xmm4
setnbe dil
ja short loc_29FB0
xorps xmm2, xmm2
loc_29FB0:
or sil, dil
jnz short loc_29FC0
ucomiss xmm3, xmm1
movaps xmm2, xmm1
ja short loc_29FC0
movaps xmm2, xmm3
loc_29FC0:
movss dword ptr [rax+rdx+50h], xmm2
movss xmm4, dword ptr [rbx+rdx+4]
xorps xmm3, xmm3
ucomiss xmm3, xmm4
ja short loc_29FDF
ucomiss xmm4, xmm1
movaps xmm5, xmm1
ja short loc_29FDF
movaps xmm5, xmm4
loc_29FDF:
movss dword ptr [rax+rdx+54h], xmm5
movss xmm4, dword ptr [rbx+rdx+8]
ucomiss xmm3, xmm4
ja short loc_29FFB
ucomiss xmm4, xmm1
movaps xmm3, xmm1
ja short loc_29FFB
movaps xmm3, xmm4
loc_29FFB:
movss dword ptr [rax+rdx+58h], xmm3
movss xmm4, dword ptr [rbx+rdx+0Ch]
xorps xmm3, xmm3
ucomiss xmm3, xmm4
xorps xmm5, xmm5
ja short loc_2A01D
ucomiss xmm4, xmm1
movaps xmm5, xmm1
ja short loc_2A01D
movaps xmm5, xmm4
loc_2A01D:
movss dword ptr [rax+rdx+5Ch], xmm5
movss xmm4, dword ptr [rbx+rdx+10h]
ucomiss xmm3, xmm4
ja short loc_2A039
ucomiss xmm4, xmm1
movaps xmm3, xmm1
ja short loc_2A039
movaps xmm3, xmm4
loc_2A039:
movss dword ptr [rax+rdx+60h], xmm3
add rdx, 14h
cmp rcx, rdx
jnz loc_29F82
loc_2A04C:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long plutovg_gradient_create(int a1, int a2, long long a3, int a4, long long a5)
{
long long result; // rax
long long v9; // rdx
float v10; // xmm2_4
float v11; // xmm3_4
float v12; // xmm4_4
int v13; // xmm5_4
bool v14; // di
float v15; // xmm4_4
int v16; // xmm3_4
float v17; // xmm4_4
float v18; // xmm4_4
int v19; // xmm3_4
int v20; // xmm5_4
float v21; // xmm4_4
result = malloc(20LL * a4 + 80);
*(_QWORD *)result = 0x100000001LL;
*(_DWORD *)(result + 8) = a1;
*(_DWORD *)(result + 12) = a2;
if ( a5 )
{
*(_QWORD *)(result + 32) = *(_QWORD *)(a5 + 16);
*(_OWORD *)(result + 16) = *(_OWORD *)a5;
}
else
{
*(_OWORD *)(result + 16) = xmmword_43110;
*(_QWORD *)(result + 32) = 0LL;
}
*(_QWORD *)(result + 40) = result + 80;
*(_DWORD *)(result + 48) = a4;
if ( a4 > 0 )
{
v9 = 0LL;
v10 = 0.0;
do
{
v11 = *(float *)(a3 + v9);
v12 = 0.0;
if ( v11 >= 0.0 )
{
v12 = 1.0;
if ( v11 <= 1.0 )
v12 = *(float *)(a3 + v9);
}
v13 = 0;
v14 = v10 > v12;
if ( v10 <= v12 )
v10 = 0.0;
if ( !v14 && v11 >= 0.0 )
{
v10 = 1.0;
if ( v11 <= 1.0 )
v10 = *(float *)(a3 + v9);
}
*(float *)(result + v9 + 80) = v10;
v15 = *(float *)(a3 + v9 + 4);
v16 = 0;
if ( v15 >= 0.0 )
{
v13 = 1065353216;
if ( v15 <= 1.0 )
v13 = *(_DWORD *)(a3 + v9 + 4);
}
*(_DWORD *)(result + v9 + 84) = v13;
v17 = *(float *)(a3 + v9 + 8);
if ( v17 >= 0.0 )
{
v16 = 1065353216;
if ( v17 <= 1.0 )
v16 = *(_DWORD *)(a3 + v9 + 8);
}
*(_DWORD *)(result + v9 + 88) = v16;
v18 = *(float *)(a3 + v9 + 12);
v19 = 0;
v20 = 0;
if ( v18 >= 0.0 )
{
v20 = 1065353216;
if ( v18 <= 1.0 )
v20 = *(_DWORD *)(a3 + v9 + 12);
}
*(_DWORD *)(result + v9 + 92) = v20;
v21 = *(float *)(a3 + v9 + 16);
if ( v21 >= 0.0 )
{
v19 = 1065353216;
if ( v21 <= 1.0 )
v19 = *(_DWORD *)(a3 + v9 + 16);
}
*(_DWORD *)(result + v9 + 96) = v19;
v9 += 20LL;
}
while ( 20LL * (unsigned int)a4 != v9 );
}
return result;
}
| plutovg_gradient_create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,R8
MOV EBP,ECX
MOV RBX,RDX
MOV R15D,ESI
MOV R12D,EDI
MOVSXD RAX,ECX
LEA RAX,[RAX + RAX*0x4]
LEA RDI,[0x50 + RAX*0x4]
CALL 0x0010a400
MOV RCX,0x100000001
MOV qword ptr [RAX],RCX
MOV dword ptr [RAX + 0x8],R12D
MOV dword ptr [RAX + 0xc],R15D
TEST R14,R14
JZ 0x00129f3f
LEA RCX,[RAX + 0x10]
MOV RDX,qword ptr [R14 + 0x10]
MOV qword ptr [RCX + 0x10],RDX
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS xmmword ptr [RCX],XMM0
JMP 0x00129f52
LAB_00129f3f:
MOVAPS XMM0,xmmword ptr [0x00143110]
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV qword ptr [RAX + 0x20],0x0
LAB_00129f52:
MOV RCX,RAX
ADD RCX,0x50
MOV qword ptr [RAX + 0x28],RCX
MOV dword ptr [RAX + 0x30],EBP
TEST EBP,EBP
JLE 0x0012a04c
MOV ECX,EBP
SHL RCX,0x2
LEA RCX,[RCX + RCX*0x4]
XORPS XMM0,XMM0
XOR EDX,EDX
MOVSS XMM1,dword ptr [0x001430f4]
XORPS XMM2,XMM2
LAB_00129f82:
MOVSS XMM3,dword ptr [RBX + RDX*0x1]
UCOMISS XMM0,XMM3
XORPS XMM4,XMM4
JA 0x00129f9a
UCOMISS XMM3,XMM1
MOVAPS XMM4,XMM1
JA 0x00129f9a
MOVAPS XMM4,XMM3
LAB_00129f9a:
XORPS XMM5,XMM5
UCOMISS XMM5,XMM3
SETA SIL
UCOMISS XMM2,XMM4
SETA DIL
JA 0x00129fb0
XORPS XMM2,XMM2
LAB_00129fb0:
OR SIL,DIL
JNZ 0x00129fc0
UCOMISS XMM3,XMM1
MOVAPS XMM2,XMM1
JA 0x00129fc0
MOVAPS XMM2,XMM3
LAB_00129fc0:
MOVSS dword ptr [RAX + RDX*0x1 + 0x50],XMM2
MOVSS XMM4,dword ptr [RBX + RDX*0x1 + 0x4]
XORPS XMM3,XMM3
UCOMISS XMM3,XMM4
JA 0x00129fdf
UCOMISS XMM4,XMM1
MOVAPS XMM5,XMM1
JA 0x00129fdf
MOVAPS XMM5,XMM4
LAB_00129fdf:
MOVSS dword ptr [RAX + RDX*0x1 + 0x54],XMM5
MOVSS XMM4,dword ptr [RBX + RDX*0x1 + 0x8]
UCOMISS XMM3,XMM4
JA 0x00129ffb
UCOMISS XMM4,XMM1
MOVAPS XMM3,XMM1
JA 0x00129ffb
MOVAPS XMM3,XMM4
LAB_00129ffb:
MOVSS dword ptr [RAX + RDX*0x1 + 0x58],XMM3
MOVSS XMM4,dword ptr [RBX + RDX*0x1 + 0xc]
XORPS XMM3,XMM3
UCOMISS XMM3,XMM4
XORPS XMM5,XMM5
JA 0x0012a01d
UCOMISS XMM4,XMM1
MOVAPS XMM5,XMM1
JA 0x0012a01d
MOVAPS XMM5,XMM4
LAB_0012a01d:
MOVSS dword ptr [RAX + RDX*0x1 + 0x5c],XMM5
MOVSS XMM4,dword ptr [RBX + RDX*0x1 + 0x10]
UCOMISS XMM3,XMM4
JA 0x0012a039
UCOMISS XMM4,XMM1
MOVAPS XMM3,XMM1
JA 0x0012a039
MOVAPS XMM3,XMM4
LAB_0012a039:
MOVSS dword ptr [RAX + RDX*0x1 + 0x60],XMM3
ADD RDX,0x14
CMP RCX,RDX
JNZ 0x00129f82
LAB_0012a04c:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void plutovg_gradient_create
(int4 param_1,int4 param_2,long param_3,uint param_4,int8 *param_5)
{
float fVar1;
bool bVar2;
int8 uVar3;
float fVar4;
int8 *puVar5;
long lVar6;
float fVar7;
float fVar8;
puVar5 = (int8 *)malloc((long)(int)param_4 * 0x14 + 0x50);
*puVar5 = 0x100000001;
*(int4 *)(puVar5 + 1) = param_1;
*(int4 *)((long)puVar5 + 0xc) = param_2;
uVar3 = _UNK_00143118;
if (param_5 == (int8 *)0x0) {
puVar5[2] = _DAT_00143110;
puVar5[3] = uVar3;
puVar5[4] = 0;
}
else {
puVar5[4] = param_5[2];
uVar3 = param_5[1];
puVar5[2] = *param_5;
puVar5[3] = uVar3;
}
puVar5[5] = puVar5 + 10;
*(uint *)(puVar5 + 6) = param_4;
fVar4 = DAT_001430f4;
if (0 < (int)param_4) {
lVar6 = 0;
fVar7 = 0.0;
do {
fVar1 = *(float *)(param_3 + lVar6);
fVar8 = 0.0;
if ((0.0 <= fVar1) && (fVar8 = fVar4, fVar1 <= fVar4)) {
fVar8 = fVar1;
}
bVar2 = fVar7 <= fVar8;
if (fVar7 <= fVar8) {
fVar7 = 0.0;
}
if ((0.0 <= fVar1 && bVar2) && (fVar7 = fVar4, fVar1 <= fVar4)) {
fVar7 = fVar1;
}
*(float *)((long)puVar5 + lVar6 + 0x50) = fVar7;
fVar1 = *(float *)(param_3 + 4 + lVar6);
fVar8 = 0.0;
if ((0.0 <= fVar1) && (fVar8 = fVar4, fVar1 <= fVar4)) {
fVar8 = fVar1;
}
*(float *)((long)puVar5 + lVar6 + 0x54) = fVar8;
fVar1 = *(float *)(param_3 + 8 + lVar6);
fVar8 = 0.0;
if ((0.0 <= fVar1) && (fVar8 = fVar4, fVar1 <= fVar4)) {
fVar8 = fVar1;
}
*(float *)((long)puVar5 + lVar6 + 0x58) = fVar8;
fVar1 = *(float *)(param_3 + 0xc + lVar6);
fVar8 = 0.0;
if ((0.0 <= fVar1) && (fVar8 = fVar4, fVar1 <= fVar4)) {
fVar8 = fVar1;
}
*(float *)((long)puVar5 + lVar6 + 0x5c) = fVar8;
fVar1 = *(float *)(param_3 + 0x10 + lVar6);
fVar8 = 0.0;
if ((0.0 <= fVar1) && (fVar8 = fVar4, fVar1 <= fVar4)) {
fVar8 = fVar1;
}
*(float *)((long)puVar5 + lVar6 + 0x60) = fVar8;
lVar6 = lVar6 + 0x14;
} while ((ulong)param_4 * 0x14 != lVar6);
}
return;
}
| |
48,822 | plutovg_gradient_create | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-paint.c | static plutovg_gradient_paint_t* plutovg_gradient_create(plutovg_gradient_type_t type, plutovg_spread_method_t spread, const plutovg_gradient_stop_t* stops, int nstops, const plutovg_matrix_t* matrix)
{
plutovg_gradient_paint_t* gradient = plutovg_paint_create(PLUTOVG_PAINT_TYPE_GRADIENT, sizeof(plutovg_gradient_paint_t) + nstops * sizeof(plutovg_gradient_stop_t));
gradient->type = type;
gradient->spread = spread;
gradient->matrix = matrix ? *matrix : PLUTOVG_IDENTITY_MATRIX;
gradient->stops = (plutovg_gradient_stop_t*)(gradient + 1);
gradient->nstops = nstops;
float prev_offset = 0.f;
for(int i = 0; i < nstops; ++i) {
const plutovg_gradient_stop_t* stop = stops + i;
gradient->stops[i].offset = plutovg_max(prev_offset, plutovg_clamp(stop->offset, 0.f, 1.f));
gradient->stops[i].color.r = plutovg_clamp(stop->color.r, 0.f, 1.f);
gradient->stops[i].color.g = plutovg_clamp(stop->color.g, 0.f, 1.f);
gradient->stops[i].color.b = plutovg_clamp(stop->color.b, 0.f, 1.f);
gradient->stops[i].color.a = plutovg_clamp(stop->color.a, 0.f, 1.f);
prev_offset = gradient->stops[i].offset;
}
return gradient;
} | O2 | c | plutovg_gradient_create:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r15
movl %ecx, %r14d
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r12d
movslq %ecx, %rax
imulq $0x14, %rax, %rsi
addq $0x50, %rsi
pushq $0x1
popq %rdi
callq 0x2515c
movl %r12d, 0x8(%rax)
movl %ebp, 0xc(%rax)
testq %r15, %r15
je 0x25232
leaq 0x10(%rax), %rcx
movq 0x10(%r15), %rdx
movq %rdx, 0x10(%rcx)
movups (%r15), %xmm0
movups %xmm0, (%rcx)
jmp 0x25242
movaps 0x14ea7(%rip), %xmm0 # 0x3a0e0
movups %xmm0, 0x10(%rax)
andq $0x0, 0x20(%rax)
movq %rax, %rcx
addq $0x50, %rcx
movq %rcx, 0x28(%rax)
movl %r14d, 0x30(%rax)
xorl %ecx, %ecx
testl %r14d, %r14d
cmovlel %ecx, %r14d
imulq $0x14, %r14, %rdx
xorps %xmm0, %xmm0
movss 0x14e5f(%rip), %xmm1 # 0x3a0c8
xorps %xmm2, %xmm2
cmpq %rcx, %rdx
je 0x25336
movss (%rbx,%rcx), %xmm3
ucomiss %xmm3, %xmm0
jbe 0x25289
ucomiss %xmm0, %xmm2
ja 0x252ab
xorps %xmm2, %xmm2
jmp 0x252ab
ucomiss %xmm1, %xmm3
seta %sil
movaps %xmm1, %xmm4
minss %xmm3, %xmm4
ucomiss %xmm4, %xmm2
seta %dil
ja 0x252a3
movaps %xmm1, %xmm2
orb %sil, %dil
jne 0x252ab
movaps %xmm3, %xmm2
movss %xmm2, 0x50(%rax,%rcx)
movss 0x4(%rbx,%rcx), %xmm4
xorps %xmm3, %xmm3
ucomiss %xmm4, %xmm3
xorps %xmm5, %xmm5
ja 0x252cd
ucomiss %xmm1, %xmm4
movaps %xmm1, %xmm5
ja 0x252cd
movaps %xmm4, %xmm5
movss %xmm5, 0x54(%rax,%rcx)
movss 0x8(%rbx,%rcx), %xmm4
ucomiss %xmm4, %xmm3
ja 0x252e9
ucomiss %xmm1, %xmm4
movaps %xmm1, %xmm3
ja 0x252e9
movaps %xmm4, %xmm3
movss %xmm3, 0x58(%rax,%rcx)
movss 0xc(%rbx,%rcx), %xmm4
xorps %xmm3, %xmm3
ucomiss %xmm4, %xmm3
xorps %xmm5, %xmm5
ja 0x2530b
ucomiss %xmm1, %xmm4
movaps %xmm1, %xmm5
ja 0x2530b
movaps %xmm4, %xmm5
movss %xmm5, 0x5c(%rax,%rcx)
movss 0x10(%rbx,%rcx), %xmm4
ucomiss %xmm4, %xmm3
ja 0x25327
ucomiss %xmm1, %xmm4
movaps %xmm1, %xmm3
ja 0x25327
movaps %xmm4, %xmm3
movss %xmm3, 0x60(%rax,%rcx)
addq $0x14, %rcx
jmp 0x2526c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| plutovg_gradient_create:
push rbp
push r15
push r14
push r12
push rbx
mov r15, r8
mov r14d, ecx
mov rbx, rdx
mov ebp, esi
mov r12d, edi
movsxd rax, ecx
imul rsi, rax, 14h
add rsi, 50h ; 'P'
push 1
pop rdi
call plutovg_paint_create
mov [rax+8], r12d
mov [rax+0Ch], ebp
test r15, r15
jz short loc_25232
lea rcx, [rax+10h]
mov rdx, [r15+10h]
mov [rcx+10h], rdx
movups xmm0, xmmword ptr [r15]
movups xmmword ptr [rcx], xmm0
jmp short loc_25242
loc_25232:
movaps xmm0, cs:xmmword_3A0E0
movups xmmword ptr [rax+10h], xmm0
and qword ptr [rax+20h], 0
loc_25242:
mov rcx, rax
add rcx, 50h ; 'P'
mov [rax+28h], rcx
mov [rax+30h], r14d
xor ecx, ecx
test r14d, r14d
cmovle r14d, ecx
imul rdx, r14, 14h
xorps xmm0, xmm0
movss xmm1, cs:flt_3A0C8
xorps xmm2, xmm2
loc_2526C:
cmp rdx, rcx
jz loc_25336
movss xmm3, dword ptr [rbx+rcx]
ucomiss xmm0, xmm3
jbe short loc_25289
ucomiss xmm2, xmm0
ja short loc_252AB
xorps xmm2, xmm2
jmp short loc_252AB
loc_25289:
ucomiss xmm3, xmm1
setnbe sil
movaps xmm4, xmm1
minss xmm4, xmm3
ucomiss xmm2, xmm4
setnbe dil
ja short loc_252A3
movaps xmm2, xmm1
loc_252A3:
or dil, sil
jnz short loc_252AB
movaps xmm2, xmm3
loc_252AB:
movss dword ptr [rax+rcx+50h], xmm2
movss xmm4, dword ptr [rbx+rcx+4]
xorps xmm3, xmm3
ucomiss xmm3, xmm4
xorps xmm5, xmm5
ja short loc_252CD
ucomiss xmm4, xmm1
movaps xmm5, xmm1
ja short loc_252CD
movaps xmm5, xmm4
loc_252CD:
movss dword ptr [rax+rcx+54h], xmm5
movss xmm4, dword ptr [rbx+rcx+8]
ucomiss xmm3, xmm4
ja short loc_252E9
ucomiss xmm4, xmm1
movaps xmm3, xmm1
ja short loc_252E9
movaps xmm3, xmm4
loc_252E9:
movss dword ptr [rax+rcx+58h], xmm3
movss xmm4, dword ptr [rbx+rcx+0Ch]
xorps xmm3, xmm3
ucomiss xmm3, xmm4
xorps xmm5, xmm5
ja short loc_2530B
ucomiss xmm4, xmm1
movaps xmm5, xmm1
ja short loc_2530B
movaps xmm5, xmm4
loc_2530B:
movss dword ptr [rax+rcx+5Ch], xmm5
movss xmm4, dword ptr [rbx+rcx+10h]
ucomiss xmm3, xmm4
ja short loc_25327
ucomiss xmm4, xmm1
movaps xmm3, xmm1
ja short loc_25327
movaps xmm3, xmm4
loc_25327:
movss dword ptr [rax+rcx+60h], xmm3
add rcx, 14h
jmp loc_2526C
loc_25336:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| _DWORD * plutovg_gradient_create(int a1, int a2, long long a3, unsigned int a4, long long a5)
{
long long v6; // r14
_DWORD *result; // rax
unsigned long long v9; // rcx
float v10; // xmm2_4
float v11; // xmm3_4
float v12; // xmm4_4
bool v13; // di
float v14; // xmm4_4
int v15; // xmm3_4
int v16; // xmm5_4
float v17; // xmm4_4
float v18; // xmm4_4
int v19; // xmm3_4
int v20; // xmm5_4
float v21; // xmm4_4
v6 = a4;
result = plutovg_paint_create(1, 20LL * (int)a4 + 80);
result[2] = a1;
result[3] = a2;
if ( a5 )
{
*((_QWORD *)result + 4) = *(_QWORD *)(a5 + 16);
*((_OWORD *)result + 1) = *(_OWORD *)a5;
}
else
{
*((_OWORD *)result + 1) = xmmword_3A0E0;
*((_QWORD *)result + 4) = 0LL;
}
*((_QWORD *)result + 5) = result + 20;
result[12] = v6;
v9 = 0LL;
if ( (int)v6 <= 0 )
v6 = 0LL;
v10 = 0.0;
while ( 20 * v6 != v9 )
{
v11 = *(float *)(a3 + v9);
if ( v11 >= 0.0 )
{
v12 = fminf(1.0, v11);
v13 = v10 > v12;
if ( v10 <= v12 )
v10 = 1.0;
if ( v11 <= 1.0 && !v13 )
v10 = *(float *)(a3 + v9);
}
else if ( v10 <= 0.0 )
{
v10 = 0.0;
}
*(float *)&result[v9 / 4 + 20] = v10;
v14 = *(float *)(a3 + v9 + 4);
v15 = 0;
v16 = 0;
if ( v14 >= 0.0 )
{
v16 = 1065353216;
if ( v14 <= 1.0 )
v16 = *(_DWORD *)(a3 + v9 + 4);
}
result[v9 / 4 + 21] = v16;
v17 = *(float *)(a3 + v9 + 8);
if ( v17 >= 0.0 )
{
v15 = 1065353216;
if ( v17 <= 1.0 )
v15 = *(_DWORD *)(a3 + v9 + 8);
}
result[v9 / 4 + 22] = v15;
v18 = *(float *)(a3 + v9 + 12);
v19 = 0;
v20 = 0;
if ( v18 >= 0.0 )
{
v20 = 1065353216;
if ( v18 <= 1.0 )
v20 = *(_DWORD *)(a3 + v9 + 12);
}
result[v9 / 4 + 23] = v20;
v21 = *(float *)(a3 + v9 + 16);
if ( v21 >= 0.0 )
{
v19 = 1065353216;
if ( v21 <= 1.0 )
v19 = *(_DWORD *)(a3 + v9 + 16);
}
result[v9 / 4 + 24] = v19;
v9 += 20LL;
}
return result;
}
| plutovg_gradient_create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,R8
MOV R14D,ECX
MOV RBX,RDX
MOV EBP,ESI
MOV R12D,EDI
MOVSXD RAX,ECX
IMUL RSI,RAX,0x14
ADD RSI,0x50
PUSH 0x1
POP RDI
CALL 0x0012515c
MOV dword ptr [RAX + 0x8],R12D
MOV dword ptr [RAX + 0xc],EBP
TEST R15,R15
JZ 0x00125232
LEA RCX,[RAX + 0x10]
MOV RDX,qword ptr [R15 + 0x10]
MOV qword ptr [RCX + 0x10],RDX
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS xmmword ptr [RCX],XMM0
JMP 0x00125242
LAB_00125232:
MOVAPS XMM0,xmmword ptr [0x0013a0e0]
MOVUPS xmmword ptr [RAX + 0x10],XMM0
AND qword ptr [RAX + 0x20],0x0
LAB_00125242:
MOV RCX,RAX
ADD RCX,0x50
MOV qword ptr [RAX + 0x28],RCX
MOV dword ptr [RAX + 0x30],R14D
XOR ECX,ECX
TEST R14D,R14D
CMOVLE R14D,ECX
IMUL RDX,R14,0x14
XORPS XMM0,XMM0
MOVSS XMM1,dword ptr [0x0013a0c8]
XORPS XMM2,XMM2
LAB_0012526c:
CMP RDX,RCX
JZ 0x00125336
MOVSS XMM3,dword ptr [RBX + RCX*0x1]
UCOMISS XMM0,XMM3
JBE 0x00125289
UCOMISS XMM2,XMM0
JA 0x001252ab
XORPS XMM2,XMM2
JMP 0x001252ab
LAB_00125289:
UCOMISS XMM3,XMM1
SETA SIL
MOVAPS XMM4,XMM1
MINSS XMM4,XMM3
UCOMISS XMM2,XMM4
SETA DIL
JA 0x001252a3
MOVAPS XMM2,XMM1
LAB_001252a3:
OR DIL,SIL
JNZ 0x001252ab
MOVAPS XMM2,XMM3
LAB_001252ab:
MOVSS dword ptr [RAX + RCX*0x1 + 0x50],XMM2
MOVSS XMM4,dword ptr [RBX + RCX*0x1 + 0x4]
XORPS XMM3,XMM3
UCOMISS XMM3,XMM4
XORPS XMM5,XMM5
JA 0x001252cd
UCOMISS XMM4,XMM1
MOVAPS XMM5,XMM1
JA 0x001252cd
MOVAPS XMM5,XMM4
LAB_001252cd:
MOVSS dword ptr [RAX + RCX*0x1 + 0x54],XMM5
MOVSS XMM4,dword ptr [RBX + RCX*0x1 + 0x8]
UCOMISS XMM3,XMM4
JA 0x001252e9
UCOMISS XMM4,XMM1
MOVAPS XMM3,XMM1
JA 0x001252e9
MOVAPS XMM3,XMM4
LAB_001252e9:
MOVSS dword ptr [RAX + RCX*0x1 + 0x58],XMM3
MOVSS XMM4,dword ptr [RBX + RCX*0x1 + 0xc]
XORPS XMM3,XMM3
UCOMISS XMM3,XMM4
XORPS XMM5,XMM5
JA 0x0012530b
UCOMISS XMM4,XMM1
MOVAPS XMM5,XMM1
JA 0x0012530b
MOVAPS XMM5,XMM4
LAB_0012530b:
MOVSS dword ptr [RAX + RCX*0x1 + 0x5c],XMM5
MOVSS XMM4,dword ptr [RBX + RCX*0x1 + 0x10]
UCOMISS XMM3,XMM4
JA 0x00125327
UCOMISS XMM4,XMM1
MOVAPS XMM3,XMM1
JA 0x00125327
MOVAPS XMM3,XMM4
LAB_00125327:
MOVSS dword ptr [RAX + RCX*0x1 + 0x60],XMM3
ADD RCX,0x14
JMP 0x0012526c
LAB_00125336:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void plutovg_gradient_create
(int4 param_1,int4 param_2,long param_3,uint param_4,int8 *param_5)
{
float fVar1;
bool bVar2;
int8 uVar3;
float fVar4;
long lVar5;
ulong uVar6;
ulong uVar7;
float fVar8;
float fVar9;
lVar5 = plutovg_paint_create(1,(long)(int)param_4 * 0x14 + 0x50);
*(int4 *)(lVar5 + 8) = param_1;
*(int4 *)(lVar5 + 0xc) = param_2;
uVar3 = _UNK_0013a0e8;
if (param_5 == (int8 *)0x0) {
*(int8 *)(lVar5 + 0x10) = _DAT_0013a0e0;
*(int8 *)(lVar5 + 0x18) = uVar3;
*(int8 *)(lVar5 + 0x20) = 0;
}
else {
*(int8 *)(lVar5 + 0x20) = param_5[2];
uVar3 = param_5[1];
*(int8 *)(lVar5 + 0x10) = *param_5;
*(int8 *)(lVar5 + 0x18) = uVar3;
}
*(long *)(lVar5 + 0x28) = lVar5 + 0x50;
*(uint *)(lVar5 + 0x30) = param_4;
fVar4 = DAT_0013a0c8;
uVar6 = 0;
uVar7 = (ulong)param_4;
if ((int)param_4 < 1) {
uVar7 = uVar6;
}
fVar8 = 0.0;
for (; uVar7 * 0x14 - uVar6 != 0; uVar6 = uVar6 + 0x14) {
fVar1 = *(float *)(param_3 + uVar6);
if (0.0 <= fVar1) {
fVar9 = fVar4;
if (fVar1 <= fVar4) {
fVar9 = fVar1;
}
bVar2 = fVar8 <= fVar9;
if (fVar8 <= fVar9) {
fVar8 = fVar4;
}
if (bVar2 && fVar1 <= fVar4) {
fVar8 = fVar1;
}
}
else if (fVar8 <= 0.0) {
fVar8 = 0.0;
}
*(float *)(lVar5 + 0x50 + uVar6) = fVar8;
fVar1 = *(float *)(param_3 + 4 + uVar6);
fVar9 = 0.0;
if ((0.0 <= fVar1) && (fVar9 = fVar4, fVar1 <= fVar4)) {
fVar9 = fVar1;
}
*(float *)(lVar5 + 0x54 + uVar6) = fVar9;
fVar1 = *(float *)(param_3 + 8 + uVar6);
fVar9 = 0.0;
if ((0.0 <= fVar1) && (fVar9 = fVar4, fVar1 <= fVar4)) {
fVar9 = fVar1;
}
*(float *)(lVar5 + 0x58 + uVar6) = fVar9;
fVar1 = *(float *)(param_3 + 0xc + uVar6);
fVar9 = 0.0;
if ((0.0 <= fVar1) && (fVar9 = fVar4, fVar1 <= fVar4)) {
fVar9 = fVar1;
}
*(float *)(lVar5 + 0x5c + uVar6) = fVar9;
fVar1 = *(float *)(param_3 + 0x10 + uVar6);
fVar9 = 0.0;
if ((0.0 <= fVar1) && (fVar9 = fVar4, fVar1 <= fVar4)) {
fVar9 = fVar1;
}
*(float *)(lVar5 + 0x60 + uVar6) = fVar9;
}
return;
}
| |
48,823 | R3D_SetLightOuterCutOff | r3d/src/r3d_lighting.c | void R3D_SetLightOuterCutOff(R3D_Light id, float degrees)
{
r3d_get_and_check_light(light, id);
light->outerCutOff = cosf(degrees * DEG2RAD);
} | O3 | c | R3D_SetLightOuterCutOff:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %edx
testl %edi, %edi
je 0xbf5f7
leaq 0xf2602(%rip), %rax # 0x1b1bc0
cmpl %edx, 0x168(%rax)
jbe 0xbf5f7
movq 0x128(%rax), %rcx
leal -0x1(%rdx), %ebx
cmpb $0x1, (%rcx,%rbx)
jne 0xbf5f7
movq 0x108(%rax), %r14
cmpq %rbx, 0x110(%rax)
setbe %cl
testq %r14, %r14
sete %sil
orb %cl, %sil
cmpb $0x1, %sil
jne 0xbf60e
leaq 0x53a13(%rip), %rsi # 0x113011
movl $0x5, %edi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0xaa495
imulq 0x120(%rax), %rbx
mulss 0x23a0e(%rip), %xmm0 # 0xe302c
callq 0x8270
movss %xmm0, 0xac(%r14,%rbx)
popq %rbx
popq %r14
popq %rbp
retq
| R3D_SetLightOuterCutOff:
push rbp
mov rbp, rsp
push r14
push rbx
mov edx, edi
test edi, edi
jz short loc_BF5F7
lea rax, R3D
cmp [rax+168h], edx
jbe short loc_BF5F7
mov rcx, [rax+128h]
lea ebx, [rdx-1]
cmp byte ptr [rcx+rbx], 1
jnz short loc_BF5F7
mov r14, [rax+108h]
cmp [rax+110h], rbx
setbe cl
test r14, r14
setz sil
or sil, cl
cmp sil, 1
jnz short loc_BF60E
loc_BF5F7:
lea rsi, aLightIdIIsNotV; "Light [ID %i] is not valid"
mov edi, 5
xor eax, eax
pop rbx
pop r14
pop rbp
jmp TraceLog
loc_BF60E:
imul rbx, [rax+120h]
mulss xmm0, cs:dword_E302C
call _cosf
movss dword ptr [r14+rbx+0ACh], xmm0
pop rbx
pop r14
pop rbp
retn
| void R3D_SetLightOuterCutOff(unsigned int a1, double a2)
{
unsigned long long v2; // rbx
long long v3; // r14
long long v4; // rbx
if ( a1
&& *((_DWORD *)&R3D + 90) > a1
&& (v2 = a1 - 1, *(_BYTE *)(*((_QWORD *)&R3D + 37) + v2) == 1)
&& (v3 = *((_QWORD *)&R3D + 33), *((_QWORD *)&R3D + 34) > v2 && v3 != 0) )
{
v4 = *((_QWORD *)&R3D + 36) * v2;
*(float *)&a2 = *(float *)&a2 * 0.017453292;
*(float *)(v3 + v4 + 172) = cosf(a2);
}
else
{
TraceLog(5, (long long)"Light [ID %i] is not valid", a1);
}
}
| R3D_SetLightOuterCutOff:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV EDX,EDI
TEST EDI,EDI
JZ 0x001bf5f7
LEA RAX,[0x2b1bc0]
CMP dword ptr [RAX + 0x168],EDX
JBE 0x001bf5f7
MOV RCX,qword ptr [RAX + 0x128]
LEA EBX,[RDX + -0x1]
CMP byte ptr [RCX + RBX*0x1],0x1
JNZ 0x001bf5f7
MOV R14,qword ptr [RAX + 0x108]
CMP qword ptr [RAX + 0x110],RBX
SETBE CL
TEST R14,R14
SETZ SIL
OR SIL,CL
CMP SIL,0x1
JNZ 0x001bf60e
LAB_001bf5f7:
LEA RSI,[0x213011]
MOV EDI,0x5
XOR EAX,EAX
POP RBX
POP R14
POP RBP
JMP 0x001aa495
LAB_001bf60e:
IMUL RBX,qword ptr [RAX + 0x120]
MULSS XMM0,dword ptr [0x001e302c]
CALL 0x00108270
MOVSS dword ptr [R14 + RBX*0x1 + 0xac],XMM0
POP RBX
POP R14
POP RBP
RET
|
void R3D_SetLightOuterCutOff(float param_1,uint param_2)
{
long lVar1;
ulong uVar2;
long lVar3;
float fVar4;
lVar1 = DAT_002b1cc8;
if ((param_2 != 0) && (param_2 < (uint)DAT_002b1d28)) {
uVar2 = (ulong)(param_2 - 1);
if (*(char *)(DAT_002b1ce8 + uVar2) == '\x01') {
if (DAT_002b1cc8 != 0 && uVar2 < DAT_002b1cd0) {
lVar3 = uVar2 * DAT_002b1ce0;
fVar4 = cosf(param_1 * DAT_001e302c);
*(float *)(lVar1 + 0xac + lVar3) = fVar4;
return;
}
}
}
TraceLog(5,"Light [ID %i] is not valid");
return;
}
| |
48,824 | void nglog::internal::MakeCheckOpValueString<char>(std::ostream*, char const&) | ng-log[P]ng-log/src/logging.cc | void MakeCheckOpValueString(std::ostream* os, const char& v) {
if (v >= 32 && v <= 126) {
(*os) << "'" << v << "'";
} else {
(*os) << "char value " << static_cast<short>(v);
}
} | O3 | cpp | void nglog::internal::MakeCheckOpValueString<char>(std::ostream*, char const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %al
addb $-0x7f, %al
cmpb $-0x5f, %al
jae 0xfc85
leaq 0x14d3a(%rip), %rsi # 0x2499d
movl $0xb, %edx
movq %rbx, %rdi
callq 0x75c0
movsbl (%r14), %esi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x7470
leaq 0x14b52(%rip), %r15 # 0x247de
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x75c0
movb (%r14), %al
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x75c0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x75c0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _ZN5nglog8internal22MakeCheckOpValueStringIcEEvPSoRKT_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
mov al, [rsi]
add al, 81h
cmp al, 0A1h
jnb short loc_FC85
lea rsi, aUnsignedCharVa+9; "char value "
mov edx, 0Bh
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
movsx esi, byte ptr [r14]
mov rdi, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
jmp __ZNSolsEs; std::ostream::operator<<(short)
loc_FC85:
lea r15, aDataNumCharsTo+59h; "'"
mov edx, 1
mov rdi, rbx
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov al, [r14]
lea rsi, [rsp+28h+var_19]
mov [rsi], al
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edx, 1
mov rdi, rax
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long nglog::internal::MakeCheckOpValueString<char>(long long a1, char *a2)
{
long long v3; // rax
_BYTE v4[25]; // [rsp+Fh] [rbp-19h] BYREF
if ( (unsigned __int8)(*a2 - 127) >= 0xA1u )
{
std::__ostream_insert<char,std::char_traits<char>>(a1, "'", 1LL);
v4[0] = *a2;
v3 = std::__ostream_insert<char,std::char_traits<char>>(a1, v4, 1LL);
return std::__ostream_insert<char,std::char_traits<char>>(v3, "'", 1LL);
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(a1, "char value ", 11LL);
return std::ostream::operator<<(a1, (unsigned int)*a2);
}
}
| MakeCheckOpValueString<char>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
MOV AL,byte ptr [RSI]
ADD AL,0x81
CMP AL,0xa1
JNC 0x0010fc85
LEA RSI,[0x12499d]
MOV EDX,0xb
MOV RDI,RBX
CALL 0x001075c0
MOVSX ESI,byte ptr [R14]
MOV RDI,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
JMP 0x00107470
LAB_0010fc85:
LEA R15,[0x1247de]
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R15
CALL 0x001075c0
MOV AL,byte ptr [R14]
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],AL
MOV EDX,0x1
MOV RDI,RBX
CALL 0x001075c0
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R15
CALL 0x001075c0
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* void nglog::internal::MakeCheckOpValueString<char>(std::ostream*, char const&) */
void nglog::internal::MakeCheckOpValueString<char>(ostream *param_1,char *param_2)
{
ostream *poVar1;
char local_19;
if ((byte)(*param_2 + 0x81U) < 0xa1) {
std::__ostream_insert<char,std::char_traits<char>>(param_1,"char value ",0xb);
std::ostream::operator<<(param_1,(short)*param_2);
return;
}
std::__ostream_insert<char,std::char_traits<char>>(param_1,"\'",1);
local_19 = *param_2;
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(param_1,&local_19,1);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\'",1);
return;
}
| |
48,825 | rtree_get_req | eloqsql/storage/myisam/rt_index.c | static int rtree_get_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint key_length,
my_off_t page, int level)
{
uchar *k;
uchar *last;
uint nod_flag;
int res;
uchar *page_buf;
uint k_len;
uint *saved_key = (uint*) (info->rtree_recursion_state) + level;
if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length)))
return -1;
if (!_mi_fetch_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf, 0))
goto err1;
nod_flag = mi_test_if_nod(page_buf);
k_len = keyinfo->keylength - info->s->base.rec_reflength;
if(info->rtree_recursion_depth >= level)
{
k = page_buf + *saved_key;
if (!nod_flag)
{
/* Only leaf pages contain data references. */
/* Need to check next key with data reference. */
k = rt_PAGE_NEXT_KEY(k, k_len, nod_flag);
}
}
else
{
k = rt_PAGE_FIRST_KEY(page_buf, nod_flag);
}
last = rt_PAGE_END(page_buf);
for (; k < last; k = rt_PAGE_NEXT_KEY(k, k_len, nod_flag))
{
if (nod_flag)
{
/* this is an internal node in the tree */
switch ((res = rtree_get_req(info, keyinfo, key_length,
_mi_kpos(nod_flag, k), level + 1)))
{
case 0: /* found - exit from recursion */
*saved_key = (uint) (k - page_buf);
goto ok;
case 1: /* not found - continue searching */
info->rtree_recursion_depth = level;
break;
default:
case -1: /* error */
goto err1;
}
}
else
{
/* this is a leaf */
uchar *after_key = rt_PAGE_NEXT_KEY(k, k_len, nod_flag);
info->lastpos = _mi_dpos(info, 0, after_key);
info->lastkey_length = k_len + info->s->base.rec_reflength;
memcpy(info->lastkey, k, info->lastkey_length);
info->rtree_recursion_depth = level;
*saved_key = (uint) (k - page_buf);
if (after_key < last)
{
info->int_keypos = (uchar*)saved_key;
memcpy(info->buff, page_buf, keyinfo->block_length);
info->int_maxpos = rt_PAGE_END(info->buff);
info->buff_used = 0;
}
else
{
info->buff_used = 1;
}
res = 0;
goto ok;
}
}
info->lastpos = HA_OFFSET_ERROR;
my_errno = HA_ERR_KEY_NOT_FOUND;
res = 1;
ok:
my_afree((uchar*)page_buf);
return res;
err1:
my_afree((uchar*)page_buf);
info->lastpos = HA_OFFSET_ERROR;
return -1;
} | O0 | c | rtree_get_req:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movq %rcx, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq 0x3b8(%rax), %rax
movslq -0x34(%rbp), %rcx
leaq (%rax,%rcx,4), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movzwl 0xe(%rax), %eax
addl $0xf, %eax
andl $-0x10, %eax
movl %eax, %ecx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
jne 0xca3b1
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
jmp 0xca78e
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x58(%rbp), %r8
movl $0x3, %ecx
xorl %r9d, %r9d
callq 0xbf3d0
cmpq $0x0, %rax
jne 0xca3d9
jmp 0xca778
movq -0x58(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xca3fc
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %eax
movl %eax, -0x74(%rbp)
jmp 0xca403
xorl %eax, %eax
movl %eax, -0x74(%rbp)
jmp 0xca403
movl -0x74(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
subl 0x178(%rcx), %eax
movl %eax, -0x5c(%rbp)
movq -0x18(%rbp), %rax
movl 0x3c0(%rax), %eax
cmpl -0x34(%rbp), %eax
jl 0xca48e
movq -0x58(%rbp), %rax
movq -0x68(%rbp), %rcx
movl (%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x4c(%rbp)
jne 0xca48c
movq -0x40(%rbp), %rax
movl -0x5c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0xca466
movl -0x4c(%rbp), %eax
movl %eax, -0x84(%rbp)
jmp 0xca479
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x178(%rax), %eax
movl %eax, -0x84(%rbp)
movq -0x80(%rbp), %rax
movl -0x84(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0xca4a0
movq -0x58(%rbp), %rax
addq $0x2, %rax
movl -0x4c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x58(%rbp), %rax
movq -0x58(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
movq -0x58(%rbp), %rdx
movzbl (%rdx), %edx
movzwl %dx, %edx
shll $0x8, %edx
orl %edx, %ecx
movzwl %cx, %ecx
andl $0x7fff, %ecx # imm = 0x7FFF
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0xca74f
cmpl $0x0, -0x4c(%rbp)
je 0xca594
movq -0x18(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0x4c(%rbp), %edi
movq -0x40(%rbp), %rsi
callq 0xc0340
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
movl -0x8c(%rbp), %edx
movq %rax, %rcx
movl -0x34(%rbp), %r8d
incl %r8d
callq 0xca340
movl %eax, -0x50(%rbp)
movl %eax, %ecx
movl %ecx, -0x88(%rbp)
subl $-0x1, %eax
je 0xca58a
jmp 0xca548
movl -0x88(%rbp), %eax
testl %eax, %eax
je 0xca561
jmp 0xca554
movl -0x88(%rbp), %eax
subl $0x1, %eax
je 0xca579
jmp 0xca588
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x68(%rbp), %rax
movl %ecx, (%rax)
jmp 0xca770
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x3c0(%rax)
jmp 0xca58f
jmp 0xca58a
jmp 0xca778
jmp 0xca6fd
movq -0x40(%rbp), %rax
movl -0x5c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0xca5b6
movl -0x4c(%rbp), %eax
movl %eax, -0xac(%rbp)
jmp 0xca5c9
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x178(%rax), %eax
movl %eax, -0xac(%rbp)
movq -0xa8(%rbp), %rax
movl -0xac(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
movq -0x70(%rbp), %rdx
xorl %esi, %esi
callq 0xc05c0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x170(%rax)
movl -0x5c(%rbp), %ecx
movq -0x18(%rbp), %rax
movq (%rax), %rax
addl 0x178(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1d8(%rax)
movq -0x18(%rbp), %rax
movq 0x108(%rax), %rdi
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x1d8(%rax), %eax
movl %eax, %edx
callq 0x2a090
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x3c0(%rax)
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x68(%rbp), %rax
movl %ecx, (%rax)
movq -0x70(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0xca6e9
movq -0x68(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x128(%rax)
movq -0x18(%rbp), %rax
movq 0x100(%rax), %rdi
movq -0x58(%rbp), %rsi
movq -0x20(%rbp), %rax
movzwl 0xe(%rax), %eax
movl %eax, %edx
callq 0x2a090
movq -0x18(%rbp), %rax
movq 0x100(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x100(%rax), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rdx
movq 0x100(%rdx), %rdx
movzbl (%rdx), %edx
movzwl %dx, %edx
shll $0x8, %edx
orl %edx, %eax
movzwl %ax, %eax
andl $0x7fff, %eax # imm = 0x7FFF
movl %eax, %eax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x130(%rax)
movq -0x18(%rbp), %rax
movb $0x0, 0x33d(%rax)
jmp 0xca6f4
movq -0x18(%rbp), %rax
movb $0x1, 0x33d(%rax)
movl $0x0, -0x50(%rbp)
jmp 0xca770
jmp 0xca6ff
movq -0x40(%rbp), %rax
movl -0x5c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0xca721
movl -0x4c(%rbp), %eax
movl %eax, -0xbc(%rbp)
jmp 0xca734
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x178(%rax), %eax
movl %eax, -0xbc(%rbp)
movq -0xb8(%rbp), %rax
movl -0xbc(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0xca4d0
movq -0x18(%rbp), %rax
movq $-0x1, 0x170(%rax)
callq 0xf7440
movl $0x78, (%rax)
movl $0x1, -0x50(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0xca78e
movq -0x18(%rbp), %rax
movq $-0x1, 0x170(%rax)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
movl -0xc(%rbp), %eax
movl %eax, -0xc0(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xca7b4
movl -0xc0(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax)
| rtree_get_req:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov [rbp+var_30], rcx
mov [rbp+var_34], r8d
mov rax, [rbp+var_18]
mov rax, [rax+3B8h]
movsxd rcx, [rbp+var_34]
lea rax, [rax+rcx*4]
mov [rbp+var_68], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0Eh]
add eax, 0Fh
and eax, 0FFFFFFF0h
mov ecx, eax
mov rax, rsp
sub rax, rcx
mov rsp, rax
mov [rbp+var_58], rax
cmp rax, 0
jnz short loc_CA3B1
mov [rbp+var_C], 0FFFFFFFFh
jmp loc_CA78E
loc_CA3B1:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_30]
mov r8, [rbp+var_58]
mov ecx, 3
xor r9d, r9d
call _mi_fetch_keypage
cmp rax, 0
jnz short loc_CA3D9
jmp loc_CA778
loc_CA3D9:
mov rax, [rbp+var_58]
movzx eax, byte ptr [rax]
and eax, 80h
cmp eax, 0
jz short loc_CA3FC
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax+17Ch]
mov [rbp+var_74], eax
jmp short loc_CA403
loc_CA3FC:
xor eax, eax
mov [rbp+var_74], eax
jmp short $+2
loc_CA403:
mov eax, [rbp+var_74]
mov [rbp+var_4C], eax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
sub eax, [rcx+178h]
mov [rbp+var_5C], eax
mov rax, [rbp+var_18]
mov eax, [rax+3C0h]
cmp eax, [rbp+var_34]
jl short loc_CA48E
mov rax, [rbp+var_58]
mov rcx, [rbp+var_68]
mov ecx, [rcx]
add rax, rcx
mov [rbp+var_40], rax
cmp [rbp+var_4C], 0
jnz short loc_CA48C
mov rax, [rbp+var_40]
mov ecx, [rbp+var_5C]
add rax, rcx
mov [rbp+var_80], rax
cmp [rbp+var_4C], 0
jz short loc_CA466
mov eax, [rbp+var_4C]
mov [rbp+var_84], eax
jmp short loc_CA479
loc_CA466:
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax+178h]
mov [rbp+var_84], eax
loc_CA479:
mov rax, [rbp+var_80]
mov ecx, [rbp+var_84]
mov ecx, ecx
add rax, rcx
mov [rbp+var_40], rax
loc_CA48C:
jmp short loc_CA4A0
loc_CA48E:
mov rax, [rbp+var_58]
add rax, 2
mov ecx, [rbp+var_4C]
add rax, rcx
mov [rbp+var_40], rax
loc_CA4A0:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_58]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
mov rdx, [rbp+var_58]
movzx edx, byte ptr [rdx]
movzx edx, dx
shl edx, 8
or ecx, edx
movzx ecx, cx
and ecx, 7FFFh
mov ecx, ecx
add rax, rcx
mov [rbp+var_48], rax
loc_CA4D0:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_48]
jnb loc_CA74F
cmp [rbp+var_4C], 0
jz loc_CA594
mov rax, [rbp+var_18]
mov [rbp+var_A0], rax
mov rax, [rbp+var_20]
mov [rbp+var_98], rax
mov eax, [rbp+var_24]
mov [rbp+var_8C], eax
mov edi, [rbp+var_4C]
mov rsi, [rbp+var_40]
call _mi_kpos
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_98]
mov edx, [rbp+var_8C]
mov rcx, rax
mov r8d, [rbp+var_34]
inc r8d
call rtree_get_req
mov [rbp+var_50], eax
mov ecx, eax
mov [rbp+var_88], ecx
sub eax, 0FFFFFFFFh
jz short loc_CA58A
jmp short $+2
loc_CA548:
mov eax, [rbp+var_88]
test eax, eax
jz short loc_CA561
jmp short $+2
loc_CA554:
mov eax, [rbp+var_88]
sub eax, 1
jz short loc_CA579
jmp short loc_CA588
loc_CA561:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_58]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_68]
mov [rax], ecx
jmp loc_CA770
loc_CA579:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_18]
mov [rax+3C0h], ecx
jmp short loc_CA58F
loc_CA588:
jmp short $+2
loc_CA58A:
jmp loc_CA778
loc_CA58F:
jmp loc_CA6FD
loc_CA594:
mov rax, [rbp+var_40]
mov ecx, [rbp+var_5C]
add rax, rcx
mov [rbp+var_A8], rax
cmp [rbp+var_4C], 0
jz short loc_CA5B6
mov eax, [rbp+var_4C]
mov [rbp+var_AC], eax
jmp short loc_CA5C9
loc_CA5B6:
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax+178h]
mov [rbp+var_AC], eax
loc_CA5C9:
mov rax, [rbp+var_A8]
mov ecx, [rbp+var_AC]
mov ecx, ecx
add rax, rcx
mov [rbp+var_70], rax
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_70]
xor esi, esi
call _mi_dpos
mov rcx, rax
mov rax, [rbp+var_18]
mov [rax+170h], rcx
mov ecx, [rbp+var_5C]
mov rax, [rbp+var_18]
mov rax, [rax]
add ecx, [rax+178h]
mov rax, [rbp+var_18]
mov [rax+1D8h], ecx
mov rax, [rbp+var_18]
mov rdi, [rax+108h]
mov rsi, [rbp+var_40]
mov rax, [rbp+var_18]
mov eax, [rax+1D8h]
mov edx, eax
call _memcpy
mov ecx, [rbp+var_34]
mov rax, [rbp+var_18]
mov [rax+3C0h], ecx
mov rax, [rbp+var_40]
mov rcx, [rbp+var_58]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_68]
mov [rax], ecx
mov rax, [rbp+var_70]
cmp rax, [rbp+var_48]
jnb loc_CA6E9
mov rcx, [rbp+var_68]
mov rax, [rbp+var_18]
mov [rax+128h], rcx
mov rax, [rbp+var_18]
mov rdi, [rax+100h]
mov rsi, [rbp+var_58]
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0Eh]
mov edx, eax
call _memcpy
mov rax, [rbp+var_18]
mov rcx, [rax+100h]
mov rax, [rbp+var_18]
mov rax, [rax+100h]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rdx, [rbp+var_18]
mov rdx, [rdx+100h]
movzx edx, byte ptr [rdx]
movzx edx, dx
shl edx, 8
or eax, edx
movzx eax, ax
and eax, 7FFFh
mov eax, eax
add rcx, rax
mov rax, [rbp+var_18]
mov [rax+130h], rcx
mov rax, [rbp+var_18]
mov byte ptr [rax+33Dh], 0
jmp short loc_CA6F4
loc_CA6E9:
mov rax, [rbp+var_18]
mov byte ptr [rax+33Dh], 1
loc_CA6F4:
mov [rbp+var_50], 0
jmp short loc_CA770
loc_CA6FD:
jmp short $+2
loc_CA6FF:
mov rax, [rbp+var_40]
mov ecx, [rbp+var_5C]
add rax, rcx
mov [rbp+var_B8], rax
cmp [rbp+var_4C], 0
jz short loc_CA721
mov eax, [rbp+var_4C]
mov [rbp+var_BC], eax
jmp short loc_CA734
loc_CA721:
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax+178h]
mov [rbp+var_BC], eax
loc_CA734:
mov rax, [rbp+var_B8]
mov ecx, [rbp+var_BC]
mov ecx, ecx
add rax, rcx
mov [rbp+var_40], rax
jmp loc_CA4D0
loc_CA74F:
mov rax, [rbp+var_18]
mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
mov [rbp+var_50], 1
loc_CA770:
mov eax, [rbp+var_50]
mov [rbp+var_C], eax
jmp short loc_CA78E
loc_CA778:
mov rax, [rbp+var_18]
mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_C], 0FFFFFFFFh
loc_CA78E:
mov eax, [rbp+var_C]
mov [rbp+var_C0], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_CA7B4
mov eax, [rbp+var_C0]
mov rsp, rbp
pop rbp
retn
loc_CA7B4:
call ___stack_chk_fail
| long long rtree_get_req(_QWORD *a1, long long a2, unsigned int a3, long long a4, int a5)
{
_QWORD *v5; // rdi
const char *v6; // rsi
long long v7; // rax
long long v8; // rax
int v10; // [rsp+0h] [rbp-C0h] BYREF
unsigned int v11; // [rsp+4h] [rbp-BCh]
unsigned long long v12; // [rsp+8h] [rbp-B8h]
unsigned int v13; // [rsp+14h] [rbp-ACh]
unsigned long long v14; // [rsp+18h] [rbp-A8h]
_QWORD *v15; // [rsp+20h] [rbp-A0h]
long long v16; // [rsp+28h] [rbp-98h]
unsigned int v17; // [rsp+34h] [rbp-8Ch]
unsigned int v18; // [rsp+38h] [rbp-88h]
unsigned int v19; // [rsp+3Ch] [rbp-84h]
unsigned long long v20; // [rsp+40h] [rbp-80h]
unsigned int v21; // [rsp+4Ch] [rbp-74h]
unsigned long long v22; // [rsp+50h] [rbp-70h]
_DWORD *v23; // [rsp+58h] [rbp-68h]
unsigned int v24; // [rsp+64h] [rbp-5Ch]
unsigned __int16 *v25; // [rsp+68h] [rbp-58h]
unsigned int req; // [rsp+70h] [rbp-50h]
unsigned int v27; // [rsp+74h] [rbp-4Ch]
unsigned long long v28; // [rsp+78h] [rbp-48h]
unsigned long long v29; // [rsp+80h] [rbp-40h]
int v30; // [rsp+8Ch] [rbp-34h]
long long v31; // [rsp+90h] [rbp-30h]
unsigned int v32; // [rsp+9Ch] [rbp-24h]
long long v33; // [rsp+A0h] [rbp-20h]
_QWORD *v34; // [rsp+A8h] [rbp-18h]
unsigned long long v36; // [rsp+B8h] [rbp-8h]
v36 = __readfsqword(0x28u);
v34 = a1;
v33 = a2;
v32 = a3;
v31 = a4;
v30 = a5;
v23 = (_DWORD *)(a1[119] + 4LL * a5);
v25 = (unsigned __int16 *)((char *)&v10 - ((*(unsigned __int16 *)(a2 + 14) + 15) & 0xFFFFFFF0));
if ( v25 )
{
v5 = v34;
v6 = (const char *)v33;
if ( mi_fetch_keypage(v34, v33, v31, 3, (int)v25, 0) )
{
if ( (*(_BYTE *)v25 & 0x80) != 0 )
v21 = *(_DWORD *)(*v34 + 380LL);
else
v21 = 0;
v27 = v21;
v24 = *(unsigned __int16 *)(v33 + 18) - *(_DWORD *)(*v34 + 376LL);
if ( *((_DWORD *)v34 + 240) < v30 )
{
v29 = (unsigned long long)v25 + v27 + 2;
}
else
{
v29 = (unsigned long long)v25 + (unsigned int)*v23;
if ( !v27 )
{
v20 = v24 + v29;
v19 = *(_DWORD *)(*v34 + 376LL);
v29 = v19 + v20;
}
}
v28 = (unsigned long long)v25 + (_byteswap_ushort(*v25) & 0x7FFF);
while ( 1 )
{
if ( v29 >= v28 )
{
v34[46] = -1LL;
*(_DWORD *)my_thread_var(v5, v6) = 120;
return 1;
}
if ( !v27 )
break;
v15 = v34;
v16 = v33;
v17 = v32;
v7 = mi_kpos(v27, v29);
v5 = v15;
v6 = (const char *)v16;
req = rtree_get_req(v15, v16, v17, v7, (unsigned int)(v30 + 1));
v18 = req;
if ( req == -1 )
goto LABEL_32;
if ( !v18 )
{
*v23 = v29 - (_DWORD)v25;
return req;
}
if ( v18 != 1 )
goto LABEL_32;
*((_DWORD *)v34 + 240) = v30;
v12 = v24 + v29;
if ( v27 )
v11 = v27;
else
v11 = *(_DWORD *)(*v34 + 376LL);
v29 = v11 + v12;
}
v14 = v24 + v29;
v13 = *(_DWORD *)(*v34 + 376LL);
v22 = v13 + v14;
v8 = mi_dpos((long long)v34, 0, v22);
v34[46] = v8;
*((_DWORD *)v34 + 118) = *(_DWORD *)(*v34 + 376LL) + v24;
memcpy(v34[33], v29, *((unsigned int *)v34 + 118));
*((_DWORD *)v34 + 240) = v30;
*v23 = v29 - (_DWORD)v25;
if ( v22 >= v28 )
{
*((_BYTE *)v34 + 829) = 1;
}
else
{
v34[37] = v23;
memcpy(v34[32], v25, *(unsigned __int16 *)(v33 + 14));
v34[38] = (_byteswap_ushort(*(_WORD *)v34[32]) & 0x7FFF) + v34[32];
*((_BYTE *)v34 + 829) = 0;
}
return 0;
}
else
{
LABEL_32:
v34[46] = -1LL;
return (unsigned int)-1;
}
}
else
{
return (unsigned int)-1;
}
}
| rtree_get_req:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV qword ptr [RBP + -0x30],RCX
MOV dword ptr [RBP + -0x34],R8D
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x3b8]
MOVSXD RCX,dword ptr [RBP + -0x34]
LEA RAX,[RAX + RCX*0x4]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xe]
ADD EAX,0xf
AND EAX,0xfffffff0
MOV ECX,EAX
MOV RAX,RSP
SUB RAX,RCX
MOV RSP,RAX
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JNZ 0x001ca3b1
MOV dword ptr [RBP + -0xc],0xffffffff
JMP 0x001ca78e
LAB_001ca3b1:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + -0x58]
MOV ECX,0x3
XOR R9D,R9D
CALL 0x001bf3d0
CMP RAX,0x0
JNZ 0x001ca3d9
JMP 0x001ca778
LAB_001ca3d9:
MOV RAX,qword ptr [RBP + -0x58]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001ca3fc
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x17c]
MOV dword ptr [RBP + -0x74],EAX
JMP 0x001ca403
LAB_001ca3fc:
XOR EAX,EAX
MOV dword ptr [RBP + -0x74],EAX
JMP 0x001ca403
LAB_001ca403:
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
SUB EAX,dword ptr [RCX + 0x178]
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x3c0]
CMP EAX,dword ptr [RBP + -0x34]
JL 0x001ca48e
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x68]
MOV ECX,dword ptr [RCX]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
CMP dword ptr [RBP + -0x4c],0x0
JNZ 0x001ca48c
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x5c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x80],RAX
CMP dword ptr [RBP + -0x4c],0x0
JZ 0x001ca466
MOV EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0x84],EAX
JMP 0x001ca479
LAB_001ca466:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x178]
MOV dword ptr [RBP + -0x84],EAX
LAB_001ca479:
MOV RAX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RBP + -0x84]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_001ca48c:
JMP 0x001ca4a0
LAB_001ca48e:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x2
MOV ECX,dword ptr [RBP + -0x4c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_001ca4a0:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x58]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
MOV RDX,qword ptr [RBP + -0x58]
MOVZX EDX,byte ptr [RDX]
MOVZX EDX,DX
SHL EDX,0x8
OR ECX,EDX
MOVZX ECX,CX
AND ECX,0x7fff
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
LAB_001ca4d0:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x001ca74f
CMP dword ptr [RBP + -0x4c],0x0
JZ 0x001ca594
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x98],RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x8c],EAX
MOV EDI,dword ptr [RBP + -0x4c]
MOV RSI,qword ptr [RBP + -0x40]
CALL 0x001c0340
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x98]
MOV EDX,dword ptr [RBP + -0x8c]
MOV RCX,RAX
MOV R8D,dword ptr [RBP + -0x34]
INC R8D
CALL 0x001ca340
MOV dword ptr [RBP + -0x50],EAX
MOV ECX,EAX
MOV dword ptr [RBP + -0x88],ECX
SUB EAX,-0x1
JZ 0x001ca58a
JMP 0x001ca548
LAB_001ca548:
MOV EAX,dword ptr [RBP + -0x88]
TEST EAX,EAX
JZ 0x001ca561
JMP 0x001ca554
LAB_001ca554:
MOV EAX,dword ptr [RBP + -0x88]
SUB EAX,0x1
JZ 0x001ca579
JMP 0x001ca588
LAB_001ca561:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x58]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x68]
MOV dword ptr [RAX],ECX
JMP 0x001ca770
LAB_001ca579:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x3c0],ECX
JMP 0x001ca58f
LAB_001ca588:
JMP 0x001ca58a
LAB_001ca58a:
JMP 0x001ca778
LAB_001ca58f:
JMP 0x001ca6fd
LAB_001ca594:
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x5c]
ADD RAX,RCX
MOV qword ptr [RBP + -0xa8],RAX
CMP dword ptr [RBP + -0x4c],0x0
JZ 0x001ca5b6
MOV EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0xac],EAX
JMP 0x001ca5c9
LAB_001ca5b6:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x178]
MOV dword ptr [RBP + -0xac],EAX
LAB_001ca5c9:
MOV RAX,qword ptr [RBP + -0xa8]
MOV ECX,dword ptr [RBP + -0xac]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x70]
XOR ESI,ESI
CALL 0x001c05c0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x170],RCX
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
ADD ECX,dword ptr [RAX + 0x178]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x1d8],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x108]
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x1d8]
MOV EDX,EAX
CALL 0x0012a090
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x3c0],ECX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x58]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x68]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x001ca6e9
MOV RCX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x128],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x100]
MOV RSI,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xe]
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x100]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x100]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RDX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RDX + 0x100]
MOVZX EDX,byte ptr [RDX]
MOVZX EDX,DX
SHL EDX,0x8
OR EAX,EDX
MOVZX EAX,AX
AND EAX,0x7fff
MOV EAX,EAX
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x130],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x33d],0x0
JMP 0x001ca6f4
LAB_001ca6e9:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x33d],0x1
LAB_001ca6f4:
MOV dword ptr [RBP + -0x50],0x0
JMP 0x001ca770
LAB_001ca6fd:
JMP 0x001ca6ff
LAB_001ca6ff:
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x5c]
ADD RAX,RCX
MOV qword ptr [RBP + -0xb8],RAX
CMP dword ptr [RBP + -0x4c],0x0
JZ 0x001ca721
MOV EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0xbc],EAX
JMP 0x001ca734
LAB_001ca721:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x178]
MOV dword ptr [RBP + -0xbc],EAX
LAB_001ca734:
MOV RAX,qword ptr [RBP + -0xb8]
MOV ECX,dword ptr [RBP + -0xbc]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001ca4d0
LAB_001ca74f:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x170],-0x1
CALL 0x001f7440
MOV dword ptr [RAX],0x78
MOV dword ptr [RBP + -0x50],0x1
LAB_001ca770:
MOV EAX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001ca78e
LAB_001ca778:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x170],-0x1
MOV dword ptr [RBP + -0xc],0xffffffff
LAB_001ca78e:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0xc0],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001ca7b4
MOV EAX,dword ptr [RBP + -0xc0]
MOV RSP,RBP
POP RBP
RET
LAB_001ca7b4:
CALL 0x0012a270
|
/* WARNING: Removing unreachable block (ram,0x001ca45b) */
/* WARNING: Removing unreachable block (ram,0x001ca5ab) */
int rtree_get_req(long *param_1,long param_2,int4 param_3,int8 param_4,int param_5)
{
ushort uVar1;
uint uVar2;
void *pvVar3;
long lVar4;
long *plVar5;
int4 uVar6;
long lVar7;
int8 uVar8;
byte *pbVar9;
int4 *puVar10;
int iVar11;
long in_FS_OFFSET;
int8 uStack_d0;
int local_c8;
uint local_c4;
byte *local_c0;
uint local_b4;
byte *local_b0;
long *local_a8;
long local_a0;
int4 local_94;
int local_90;
uint local_8c;
byte *local_88;
uint local_7c;
byte *local_78;
uint *local_70;
uint local_64;
byte *local_60;
int local_58;
uint local_54;
byte *local_50;
byte *local_48;
int local_3c;
int8 local_38;
int4 local_2c;
long local_28;
long *local_20;
int local_14;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_70 = (uint *)(param_1[0x77] + (long)param_5 * 4);
lVar4 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0xf & 0xfffffff0);
pbVar9 = (byte *)((long)&local_c8 + lVar4);
local_60 = pbVar9;
local_3c = param_5;
local_38 = param_4;
local_2c = param_3;
local_28 = param_2;
local_20 = param_1;
if (pbVar9 == (byte *)0x0) {
local_14 = -1;
}
else {
*(int8 *)((long)&uStack_d0 + lVar4) = 0x1ca3ce;
lVar7 = _mi_fetch_keypage(param_1,param_2,param_4,3,pbVar9,0);
if (lVar7 == 0) {
LAB_001ca778:
local_20[0x2e] = -1;
local_14 = -1;
}
else {
if ((*local_60 & 0x80) == 0) {
local_7c = 0;
}
else {
local_7c = *(uint *)(*local_20 + 0x17c);
}
local_54 = local_7c;
local_64 = (uint)*(ushort *)(local_28 + 0x12) - *(int *)(*local_20 + 0x178);
if ((int)local_20[0x78] < local_3c) {
local_48 = local_60 + (ulong)local_7c + 2;
}
else {
local_48 = local_60 + *local_70;
if (local_7c == 0) {
local_88 = local_48 + local_64;
local_8c = *(uint *)(*local_20 + 0x178);
local_48 = local_88 + local_8c;
}
}
local_50 = local_60 + ((uint)local_60[1] | (*local_60 & 0x7f) << 8);
while (plVar5 = local_20, pbVar9 = local_48, uVar2 = local_54, local_48 < local_50) {
if (local_54 == 0) {
local_b0 = local_48 + local_64;
local_b4 = *(uint *)(*local_20 + 0x178);
pbVar9 = local_b0 + local_b4;
local_78 = pbVar9;
*(int8 *)((long)&uStack_d0 + lVar4) = 0x1ca5ee;
lVar7 = _mi_dpos(plVar5,0,pbVar9);
pbVar9 = local_48;
local_20[0x2e] = lVar7;
*(uint *)(local_20 + 0x3b) = local_64 + *(int *)(*local_20 + 0x178);
pvVar3 = (void *)local_20[0x21];
uVar2 = *(uint *)(local_20 + 0x3b);
*(int8 *)((long)&uStack_d0 + lVar4) = 0x1ca636;
memcpy(pvVar3,pbVar9,(ulong)uVar2);
pbVar9 = local_60;
*(int *)(local_20 + 0x78) = local_3c;
*local_70 = (int)local_48 - (int)local_60;
if (local_78 < local_50) {
local_20[0x25] = (long)local_70;
pvVar3 = (void *)local_20[0x20];
uVar1 = *(ushort *)(local_28 + 0xe);
*(int8 *)((long)&uStack_d0 + lVar4) = 0x1ca691;
memcpy(pvVar3,pbVar9,(ulong)uVar1);
local_20[0x26] =
local_20[0x20] +
(ulong)((uint)*(byte *)(local_20[0x20] + 1) | (*(byte *)local_20[0x20] & 0x7f) << 8
);
*(int1 *)((long)local_20 + 0x33d) = 0;
}
else {
*(int1 *)((long)local_20 + 0x33d) = 1;
}
local_58 = 0;
goto LAB_001ca770;
}
local_a8 = local_20;
local_a0 = local_28;
local_94 = local_2c;
*(int8 *)((long)&uStack_d0 + lVar4) = 0x1ca513;
uVar8 = _mi_kpos(uVar2,pbVar9);
uVar6 = local_94;
lVar7 = local_a0;
plVar5 = local_a8;
iVar11 = local_3c + 1;
*(int8 *)((long)&uStack_d0 + lVar4) = 0x1ca536;
local_90 = rtree_get_req(plVar5,lVar7,uVar6,uVar8,iVar11);
local_58 = local_90;
if (local_90 == -1) goto LAB_001ca778;
if (local_90 == 0) {
*local_70 = (int)local_48 - (int)local_60;
goto LAB_001ca770;
}
if (local_90 != 1) goto LAB_001ca778;
*(int *)(local_20 + 0x78) = local_3c;
local_c0 = local_48 + local_64;
if (local_54 == 0) {
local_c4 = *(uint *)(*local_20 + 0x178);
}
else {
local_c4 = local_54;
}
local_58 = 1;
local_48 = local_c0 + local_c4;
}
local_20[0x2e] = -1;
*(int8 *)((long)&uStack_d0 + lVar4) = 0x1ca763;
puVar10 = (int4 *)_my_thread_var();
*puVar10 = 0x78;
local_58 = 1;
LAB_001ca770:
local_14 = local_58;
}
}
local_c8 = local_14;
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_14;
}
/* WARNING: Subroutine does not return */
*(int8 *)((long)&uStack_d0 + lVar4) = 0x1ca7b9;
__stack_chk_fail();
}
| |
48,826 | LefDefParser::defwViaRect(char const*, int, int, int, int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwViaRect(const char *layerNames,
int xl,
int yl,
int xh,
int yh,
int mask)
{
defwFunc = DEFW_VIA; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (defwState != DEFW_VIA)
return DEFW_BAD_ORDER;
if (!layerNames || !*layerNames) // required
return DEFW_BAD_DATA;
if (!mask) {
fprintf(defwFile, "\n + RECT %s ( %d %d ) ( %d %d )", layerNames,
xl, yl, xh, yh);
} else {
if (defVersionNum < 5.8) {
return DEFW_WRONG_VERSION;
}
fprintf(defwFile, "\n + RECT %s + MASK %d ( %d %d ) ( %d %d )",
layerNames, mask, xl, yl, xh, yh);
}
defwLines++;
defwState = DEFW_VIA;
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwViaRect(char const*, int, int, int, int, int):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movl %r8d, 0x18(%rsp)
movl %r9d, 0x14(%rsp)
leaq 0x17e42(%rip), %rax # 0x2b168
movl $0x19, (%rax)
leaq 0x17e25(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x13346
movl $0x1, 0x34(%rsp)
jmp 0x1343b
leaq 0x17e17(%rip), %rax # 0x2b164
cmpl $0x19, (%rax)
je 0x1335f
movl $0x2, 0x34(%rsp)
jmp 0x1343b
cmpq $0x0, 0x28(%rsp)
je 0x13371
movq 0x28(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x1337e
movl $0x3, 0x34(%rsp)
jmp 0x1343b
cmpl $0x0, 0x14(%rsp)
jne 0x133b9
leaq 0x17dcc(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x28(%rsp), %rdx
movl 0x24(%rsp), %ecx
movl 0x20(%rsp), %r8d
movl 0x1c(%rsp), %r9d
movl 0x18(%rsp), %eax
leaq 0x10eac(%rip), %rsi # 0x24259
movl %eax, (%rsp)
movb $0x0, %al
callq 0x10f0
jmp 0x13411
movsd 0xff67(%rip), %xmm0 # 0x23328
ucomisd 0x17ce7(%rip), %xmm0 # 0x2b0b0
jbe 0x133d5
movl $0x5, 0x34(%rsp)
jmp 0x1343b
leaq 0x17d7c(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x28(%rsp), %rdx
movl 0x14(%rsp), %ecx
movl 0x24(%rsp), %r8d
movl 0x20(%rsp), %r9d
movl 0x1c(%rsp), %r10d
movl 0x18(%rsp), %eax
leaq 0x10e7c(%rip), %rsi # 0x2427e
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x10f0
leaq 0x17d48(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x17d3c(%rip), %rax # 0x2b160
movl %ecx, (%rax)
leaq 0x17d37(%rip), %rax # 0x2b164
movl $0x19, (%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser11defwViaRectEPKciiiii:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_14], esi
mov [rsp+38h+var_18], edx
mov [rsp+38h+var_1C], ecx
mov [rsp+38h+var_20], r8d
mov [rsp+38h+var_24], r9d
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 19h
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_13346
mov [rsp+38h+var_4], 1
jmp loc_1343B
loc_13346:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 19h
jz short loc_1335F
mov [rsp+38h+var_4], 2
jmp loc_1343B
loc_1335F:
cmp [rsp+38h+var_10], 0
jz short loc_13371
mov rax, [rsp+38h+var_10]
cmp byte ptr [rax], 0
jnz short loc_1337E
loc_13371:
mov [rsp+38h+var_4], 3
jmp loc_1343B
loc_1337E:
cmp [rsp+38h+var_24], 0
jnz short loc_133B9
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+38h+var_10]
mov ecx, [rsp+38h+var_14]
mov r8d, [rsp+38h+var_18]
mov r9d, [rsp+38h+var_1C]
mov eax, [rsp+38h+var_20]
lea rsi, aRectSDDDD; "\n + RECT %s ( %d %d ) ( %d %d )"
mov [rsp+38h+var_38], eax
mov al, 0
call _fprintf
jmp short loc_13411
loc_133B9:
movsd xmm0, cs:qword_23328
ucomisd xmm0, cs:_ZN12LefDefParserL13defVersionNumE; LefDefParser::defVersionNum
jbe short loc_133D5
mov [rsp+38h+var_4], 5
jmp short loc_1343B
loc_133D5:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+38h+var_10]
mov ecx, [rsp+38h+var_24]
mov r8d, [rsp+38h+var_14]
mov r9d, [rsp+38h+var_18]
mov r10d, [rsp+38h+var_1C]
mov eax, [rsp+38h+var_20]
lea rsi, aRectSMaskDDDDD; "\n + RECT %s + MASK %d ( %d %d ) ("...
mov [rsp+38h+var_38], r10d
mov [rsp+38h+var_30], eax
mov al, 0
call _fprintf
loc_13411:
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 19h
mov [rsp+38h+var_4], 0
loc_1343B:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long LefDefParser::defwViaRect(LefDefParser *this, const char *a2, int a3, int a4, int a5, int a6)
{
LefDefParser::defwFunc = 25;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwState == 25 )
{
if ( this && *(_BYTE *)this )
{
if ( a6 )
{
if ( *(double *)&LefDefParser::defVersionNum < 5.8 )
return 5;
fprintf(
LefDefParser::defwFile,
"\n + RECT %s + MASK %d ( %d %d ) ( %d %d )",
(const char *)this,
a6,
(_DWORD)a2,
a3,
a4,
a5);
}
else
{
fprintf(
LefDefParser::defwFile,
"\n + RECT %s ( %d %d ) ( %d %d )",
(const char *)this,
(_DWORD)a2,
a3,
a4,
a5);
}
++LefDefParser::defwLines;
LefDefParser::defwState = 25;
return 0;
}
return 3;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| defwViaRect:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV dword ptr [RSP + 0x24],ESI
MOV dword ptr [RSP + 0x20],EDX
MOV dword ptr [RSP + 0x1c],ECX
MOV dword ptr [RSP + 0x18],R8D
MOV dword ptr [RSP + 0x14],R9D
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x19
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x00113346
MOV dword ptr [RSP + 0x34],0x1
JMP 0x0011343b
LAB_00113346:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x19
JZ 0x0011335f
MOV dword ptr [RSP + 0x34],0x2
JMP 0x0011343b
LAB_0011335f:
CMP qword ptr [RSP + 0x28],0x0
JZ 0x00113371
MOV RAX,qword ptr [RSP + 0x28]
CMP byte ptr [RAX],0x0
JNZ 0x0011337e
LAB_00113371:
MOV dword ptr [RSP + 0x34],0x3
JMP 0x0011343b
LAB_0011337e:
CMP dword ptr [RSP + 0x14],0x0
JNZ 0x001133b9
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x24]
MOV R8D,dword ptr [RSP + 0x20]
MOV R9D,dword ptr [RSP + 0x1c]
MOV EAX,dword ptr [RSP + 0x18]
LEA RSI,[0x124259]
MOV dword ptr [RSP],EAX
MOV AL,0x0
CALL 0x001010f0
JMP 0x00113411
LAB_001133b9:
MOVSD XMM0,qword ptr [0x00123328]
UCOMISD XMM0,qword ptr [0x0012b0b0]
JBE 0x001133d5
MOV dword ptr [RSP + 0x34],0x5
JMP 0x0011343b
LAB_001133d5:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x14]
MOV R8D,dword ptr [RSP + 0x24]
MOV R9D,dword ptr [RSP + 0x20]
MOV R10D,dword ptr [RSP + 0x1c]
MOV EAX,dword ptr [RSP + 0x18]
LEA RSI,[0x12427e]
MOV dword ptr [RSP],R10D
MOV dword ptr [RSP + 0x8],EAX
MOV AL,0x0
CALL 0x001010f0
LAB_00113411:
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x19
MOV dword ptr [RSP + 0x34],0x0
LAB_0011343b:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
/* LefDefParser::defwViaRect(char const*, int, int, int, int, int) */
int4
LefDefParser::defwViaRect(char *param_1,int param_2,int param_3,int param_4,int param_5,int param_6)
{
int4 local_4;
defwFunc = 0x19;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if (defwState == 0x19) {
if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {
local_4 = 3;
}
else {
if (param_6 == 0) {
fprintf(defwFile,"\n + RECT %s ( %d %d ) ( %d %d )",param_1,(ulong)(uint)param_2,
(ulong)(uint)param_3,(ulong)(uint)param_4,param_5);
}
else {
if (defVersionNum < DAT_00123328) {
defwFunc = 0x19;
return 5;
}
fprintf(defwFile,"\n + RECT %s + MASK %d ( %d %d ) ( %d %d )",param_1,
(ulong)(uint)param_6,(ulong)(uint)param_2,(ulong)(uint)param_3,param_4,param_5);
}
defwLines = defwLines + 1;
defwState = 0x19;
local_4 = 0;
}
}
else {
local_4 = 2;
}
return local_4;
}
| |
48,827 | hexlo | eloqsql/strings/ctype-utf8.c | static int hexlo(int x)
{
static const char hex_lo_digit[256]=
{
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* !"#$%&'()*+,-./ */
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1, /* 0123456789:;<=>? */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* @ABCDEFGHIJKLMNO */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* PQRSTUVWXYZ[\]^_ */
-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* `abcdefghijklmno */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* pqrstuvwxyz{|}~. */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
};
return hex_lo_digit[(unsigned int) x];
} | O0 | c | hexlo:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x14afcd(%rip), %rax # 0x1b4260
movsbl (%rax,%rcx), %eax
popq %rbp
retq
nopl (%rax)
| hexlo:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
mov ecx, eax
lea rax, hexlo_hex_lo_digit
movsx eax, byte ptr [rax+rcx]
pop rbp
retn
| long long hexlo(int a1)
{
return (unsigned int)hexlo_hex_lo_digit[a1];
}
| hexlo:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
MOV ECX,EAX
LEA RAX,[0x2b4260]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
POP RBP
RET
|
int hexlo(uint param_1)
{
return (int)(char)hexlo_hex_lo_digit[param_1];
}
| |
48,828 | alloc_dynamic | eloqsql/mysys/array.c | void *alloc_dynamic(DYNAMIC_ARRAY *array)
{
DBUG_ENTER("alloc_dynamic");
DBUG_ASSERT(array->size_of_element); /* Ensure init() is called */
if (array->elements == array->max_element)
{
char *new_ptr;
if (array->malloc_flags & MY_INIT_BUFFER_USED)
{
/*
In this scenario, the buffer is statically preallocated,
so we have to create an all-new malloc since we overflowed
*/
if (!(new_ptr= (char *) my_malloc(array->m_psi_key,
(array->max_element+
array->alloc_increment) *
array->size_of_element,
MYF(array->malloc_flags | MY_WME))))
DBUG_RETURN(0);
if (array->elements)
memcpy(new_ptr, array->buffer,
array->elements * array->size_of_element);
array->malloc_flags&= ~MY_INIT_BUFFER_USED;
}
else if (!(new_ptr=(char*)
my_realloc(array->m_psi_key, array->buffer,
(array->max_element+ array->alloc_increment) *
array->size_of_element,
MYF(MY_WME | MY_ALLOW_ZERO_PTR |
array->malloc_flags))))
DBUG_RETURN(0);
array->buffer= (uchar*) new_ptr;
array->max_element+=array->alloc_increment;
}
DBUG_RETURN(array->buffer+(array->elements++ * array->size_of_element));
} | O0 | c | alloc_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
jmp 0x348be
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jne 0x349e7
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
andq $0x100, %rax # imm = 0x100
cmpq $0x0, %rax
je 0x3497a
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x10(%rcx), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %esi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
orq $0x10, %rdx
callq 0x305e0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x34935
jmp 0x34928
movq $0x0, -0x8(%rbp)
jmp 0x34a10
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x34962
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x25310
movq -0x10(%rbp), %rax
movabsq $0xfffffeff, %rcx # imm = 0xFFFFFEFF
andq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
jmp 0x349cb
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x10(%rcx), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
orq $0x50, %rcx
callq 0x307b0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x349c9
jmp 0x349bf
movq $0x0, -0x8(%rbp)
jmp 0x34a10
jmp 0x349cb
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
jmp 0x349e9
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
movl 0x8(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x8(%rdx)
movq -0x10(%rbp), %rdx
imull 0x14(%rdx), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| alloc_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
jmp short $+2
loc_348BE:
mov rax, [rbp+var_10]
mov eax, [rax+8]
mov rcx, [rbp+var_10]
cmp eax, [rcx+0Ch]
jnz loc_349E7
mov rax, [rbp+var_10]
mov rax, [rax+20h]
and rax, 100h
cmp rax, 0
jz loc_3497A
mov rax, [rbp+var_10]
mov edi, [rax+18h]
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
mov rcx, [rbp+var_10]
add eax, [rcx+10h]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov esi, eax
mov rax, [rbp+var_10]
mov rdx, [rax+20h]
or rdx, 10h
call my_malloc
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_34935
jmp short $+2
loc_34928:
mov [rbp+var_8], 0
jmp loc_34A10
loc_34935:
mov rax, [rbp+var_10]
cmp dword ptr [rax+8], 0
jz short loc_34962
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+8]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
call _memcpy
loc_34962:
mov rax, [rbp+var_10]
mov rcx, 0FFFFFEFFh
and rcx, [rax+20h]
mov [rax+20h], rcx
jmp short loc_349CB
loc_3497A:
mov rax, [rbp+var_10]
mov edi, [rax+18h]
mov rax, [rbp+var_10]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
mov rcx, [rbp+var_10]
add eax, [rcx+10h]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
or rcx, 50h
call my_realloc
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_349C9
jmp short $+2
loc_349BF:
mov [rbp+var_8], 0
jmp short loc_34A10
loc_349C9:
jmp short $+2
loc_349CB:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+10h]
mov rax, [rbp+var_10]
add ecx, [rax+0Ch]
mov [rax+0Ch], ecx
loc_349E7:
jmp short $+2
loc_349E9:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+8]
mov esi, ecx
add esi, 1
mov [rdx+8], esi
mov rdx, [rbp+var_10]
imul ecx, [rdx+14h]
mov ecx, ecx
add rax, rcx
mov [rbp+var_8], rax
loc_34A10:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long alloc_dynamic(long long *a1)
{
long long v1; // rax
int v2; // ecx
long long v4; // [rsp+8h] [rbp-18h]
if ( *((_DWORD *)a1 + 2) != *((_DWORD *)a1 + 3) )
goto LABEL_11;
if ( (a1[4] & 0x100) == 0 )
{
v4 = my_realloc(
*((_DWORD *)a1 + 6),
*a1,
(unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + *((_DWORD *)a1 + 3))),
*((_BYTE *)a1 + 32) | 0x50u);
if ( !v4 )
return 0LL;
goto LABEL_10;
}
v4 = my_malloc(
*((_DWORD *)a1 + 6),
(unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + *((_DWORD *)a1 + 3))),
*((_DWORD *)a1 + 8) | 0x10u);
if ( v4 )
{
if ( *((_DWORD *)a1 + 2) )
memcpy(v4, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * *((_DWORD *)a1 + 2)));
a1[4] &= 0xFFFFFEFFuLL;
LABEL_10:
*a1 = v4;
*((_DWORD *)a1 + 3) += *((_DWORD *)a1 + 4);
LABEL_11:
v1 = *a1;
v2 = *((_DWORD *)a1 + 2);
*((_DWORD *)a1 + 2) = v2 + 1;
return (unsigned int)(*((_DWORD *)a1 + 5) * v2) + v1;
}
return 0LL;
}
| alloc_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
JMP 0x001348be
LAB_001348be:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0xc]
JNZ 0x001349e7
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
AND RAX,0x100
CMP RAX,0x0
JZ 0x0013497a
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
MOV RCX,qword ptr [RBP + -0x10]
ADD EAX,dword ptr [RCX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x20]
OR RDX,0x10
CALL 0x001305e0
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x00134935
JMP 0x00134928
LAB_00134928:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00134a10
LAB_00134935:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x8],0x0
JZ 0x00134962
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x00125310
LAB_00134962:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,0xfffffeff
AND RCX,qword ptr [RAX + 0x20]
MOV qword ptr [RAX + 0x20],RCX
JMP 0x001349cb
LAB_0013497a:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
MOV RCX,qword ptr [RBP + -0x10]
ADD EAX,dword ptr [RCX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
OR RCX,0x50
CALL 0x001307b0
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x001349c9
JMP 0x001349bf
LAB_001349bf:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00134a10
LAB_001349c9:
JMP 0x001349cb
LAB_001349cb:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
ADD ECX,dword ptr [RAX + 0xc]
MOV dword ptr [RAX + 0xc],ECX
LAB_001349e7:
JMP 0x001349e9
LAB_001349e9:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x8]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RDX + 0x8],ESI
MOV RDX,qword ptr [RBP + -0x10]
IMUL ECX,dword ptr [RDX + 0x14]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_00134a10:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long alloc_dynamic(long *param_1)
{
long lVar1;
void *local_20;
if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) {
if ((param_1[4] & 0x100U) == 0) {
local_20 = (void *)my_realloc((int)param_1[3],*param_1,
(*(int *)((long)param_1 + 0xc) + (int)param_1[2]) *
*(int *)((long)param_1 + 0x14),param_1[4] | 0x50);
if (local_20 == (void *)0x0) {
return 0;
}
}
else {
local_20 = (void *)my_malloc((int)param_1[3],
(*(int *)((long)param_1 + 0xc) + (int)param_1[2]) *
*(int *)((long)param_1 + 0x14),param_1[4] | 0x10);
if (local_20 == (void *)0x0) {
return 0;
}
if ((int)param_1[1] != 0) {
memcpy(local_20,(void *)*param_1,
(ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14)));
}
param_1[4] = param_1[4] & 0xfffffeff;
}
*param_1 = (long)local_20;
*(int *)((long)param_1 + 0xc) = (int)param_1[2] + *(int *)((long)param_1 + 0xc);
}
lVar1 = param_1[1];
*(int *)(param_1 + 1) = (int)lVar1 + 1;
return *param_1 + (ulong)(uint)((int)lVar1 * *(int *)((long)param_1 + 0x14));
}
| |
48,829 | my_error_unregister | eloqsql/mysys/my_error.c | my_bool my_error_unregister(uint first, uint last)
{
struct my_err_head *meh_p;
struct my_err_head **search_meh_pp;
/* Search for the registration in the list. */
for (search_meh_pp= &my_errmsgs_list;
*search_meh_pp;
search_meh_pp= &(*search_meh_pp)->meh_next)
{
if (((*search_meh_pp)->meh_first == first) &&
((*search_meh_pp)->meh_last == last))
break;
}
if (! *search_meh_pp)
return TRUE;
/* Remove header from the chain. */
meh_p= *search_meh_pp;
*search_meh_pp= meh_p->meh_next;
my_free(meh_p);
return FALSE;
} | O0 | c | my_error_unregister:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x19f6d3(%rip), %rax # 0x1cdb78
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2e4e2
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0x2e4d3
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x14(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x2e4d3
jmp 0x2e4e2
jmp 0x2e4d5
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2e4a9
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2e4f2
movb $0x1, -0x1(%rbp)
jmp 0x2e518
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
callq 0x2f350
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_error_unregister:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], edi
mov [rbp+var_C], esi
lea rax, my_errmsgs_list
mov [rbp+var_20], rax
loc_2E4A9:
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
jz short loc_2E4E2
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax+10h]
cmp eax, [rbp+var_8]
jnz short loc_2E4D3
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax+14h]
cmp eax, [rbp+var_C]
jnz short loc_2E4D3
jmp short loc_2E4E2
loc_2E4D3:
jmp short $+2
loc_2E4D5:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_20], rax
jmp short loc_2E4A9
loc_2E4E2:
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
jnz short loc_2E4F2
mov [rbp+var_1], 1
jmp short loc_2E518
loc_2E4F2:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rcx, [rax]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rdi, [rbp+var_18]
call my_free
mov [rbp+var_1], 0
loc_2E518:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char my_error_unregister(int a1, int a2)
{
long long **i; // [rsp+0h] [rbp-20h]
long long *v4; // [rsp+8h] [rbp-18h]
for ( i = &my_errmsgs_list; *i && (*((_DWORD *)*i + 4) != a1 || *((_DWORD *)*i + 5) != a2); i = (long long **)*i )
;
if ( !*i )
return 1;
v4 = *i;
*i = (long long *)**i;
my_free(v4);
return 0;
}
| my_error_unregister:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],ESI
LEA RAX,[0x2cdb78]
MOV qword ptr [RBP + -0x20],RAX
LAB_0012e4a9:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],0x0
JZ 0x0012e4e2
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x10]
CMP EAX,dword ptr [RBP + -0x8]
JNZ 0x0012e4d3
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x14]
CMP EAX,dword ptr [RBP + -0xc]
JNZ 0x0012e4d3
JMP 0x0012e4e2
LAB_0012e4d3:
JMP 0x0012e4d5
LAB_0012e4d5:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012e4a9
LAB_0012e4e2:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],0x0
JNZ 0x0012e4f2
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012e518
LAB_0012e4f2:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0012f350
MOV byte ptr [RBP + -0x1],0x0
LAB_0012e518:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
bool my_error_unregister(int param_1,int param_2)
{
long *plVar1;
int *puVar2;
int **local_28;
bool local_9;
for (local_28 = &my_errmsgs_list;
(*local_28 != (int *)0x0 &&
((*(int *)(*local_28 + 0x10) != param_1 || (*(int *)(*local_28 + 0x14) != param_2))));
local_28 = (int **)*local_28) {
}
puVar2 = *local_28;
if (puVar2 != (int *)0x0) {
plVar1 = (long *)*local_28;
*local_28 = (int *)*plVar1;
my_free(plVar1);
}
local_9 = puVar2 == (int *)0x0;
return local_9;
}
| |
48,830 | voxel_registry::find(char const*) | untodesu[P]voxelius/game/shared/voxel_registry.cc | VoxelInfo *voxel_registry::find(const char *name)
{
const auto it = voxel_registry::names.find(name);
if(it != voxel_registry::names.cend())
return voxel_registry::find(it->second);
return nullptr;
} | O1 | cpp | voxel_registry::find(char const*):
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rsi
leaq 0x10(%rsp), %rbx
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x1ccb6
leaq 0xbfa5a(%rip), %rdi # 0x10bb80
movq %rbx, %rsi
callq 0x4cd5a
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c14c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x176b0
testq %rbx, %rbx
je 0x4c174
movzwl 0x28(%rbx), %eax
testq %rax, %rax
je 0x4c174
movq 0xbfa5f(%rip), %rdx # 0x10bbc0
movq 0xbfa50(%rip), %rcx # 0x10bbb8
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq %rax, %rdx
jae 0x4c17c
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
retq
decl %eax
shlq $0x4, %rax
movq (%rcx,%rax), %rax
jmp 0x4c176
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c1a6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x176b0
movq %rbx, %rdi
callq 0x17c80
| _ZN14voxel_registry4findEPKc:
push rbx
sub rsp, 30h
mov rsi, rdi
lea rbx, [rsp+38h+var_28]
lea rdx, [rsp+38h+var_29]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, _ZN14voxel_registry5namesB5cxx11E; voxel_registry::names
mov rsi, rbx
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_tESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,ushort>,std::allocator<std::pair<std::string const,ushort>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
mov rbx, rax
lea rax, [rsp+38h+var_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4C14C
mov rsi, [rsp+38h+var_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4C14C:
test rbx, rbx
jz short loc_4C174
movzx eax, word ptr [rbx+28h]
test rax, rax
jz short loc_4C174
mov rdx, qword ptr cs:_ZN14voxel_registry6voxelsE+8; voxel_registry::voxels
mov rcx, qword ptr cs:_ZN14voxel_registry6voxelsE; voxel_registry::voxels
sub rdx, rcx
sar rdx, 4
cmp rdx, rax
jnb short loc_4C17C
loc_4C174:
xor eax, eax
loc_4C176:
add rsp, 30h
pop rbx
retn
loc_4C17C:
dec eax
shl rax, 4
mov rax, [rcx+rax]
jmp short loc_4C176
mov rbx, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4C1A6
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4C1A6:
mov rdi, rbx
call __Unwind_Resume
| long long voxel_registry::find(voxel_registry *this, const char *a2)
{
long long v2; // rbx
unsigned long long v3; // rax
void *v5[2]; // [rsp+10h] [rbp-28h] BYREF
long long v6; // [rsp+20h] [rbp-18h] BYREF
std::string::basic_string<std::allocator<char>>(v5, (long long)this);
v2 = std::_Hashtable<std::string,std::pair<std::string const,unsigned short>,std::allocator<std::pair<std::string const,unsigned short>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
&voxel_registry::names[abi:cxx11],
v5);
if ( v5[0] != &v6 )
operator delete(v5[0], v6 + 1);
if ( v2
&& (v3 = *(unsigned __int16 *)(v2 + 40), *(_WORD *)(v2 + 40))
&& (long long)(*((_QWORD *)&voxel_registry::voxels + 1) - voxel_registry::voxels) >> 4 >= v3 )
{
return *(_QWORD *)(voxel_registry::voxels + 16LL * (unsigned int)(v3 - 1));
}
else
{
return 0LL;
}
}
| find:
PUSH RBX
SUB RSP,0x30
MOV RSI,RDI
LEA RBX,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RDI,RBX
CALL 0x0011ccb6
LAB_0014c11f:
LEA RDI,[0x20bb80]
MOV RSI,RBX
CALL 0x0014cd5a
LAB_0014c12e:
MOV RBX,RAX
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0014c14c
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001176b0
LAB_0014c14c:
TEST RBX,RBX
JZ 0x0014c174
MOVZX EAX,word ptr [RBX + 0x28]
TEST RAX,RAX
JZ 0x0014c174
MOV RDX,qword ptr [0x0020bbc0]
MOV RCX,qword ptr [0x0020bbb8]
SUB RDX,RCX
SAR RDX,0x4
CMP RDX,RAX
JNC 0x0014c17c
LAB_0014c174:
XOR EAX,EAX
LAB_0014c176:
ADD RSP,0x30
POP RBX
RET
LAB_0014c17c:
DEC EAX
SHL RAX,0x4
MOV RAX,qword ptr [RCX + RAX*0x1]
JMP 0x0014c176
|
/* voxel_registry::find(char const*) */
int8 voxel_registry::find(char *param_1)
{
ushort uVar1;
long lVar2;
allocator local_29;
long *local_28 [2];
long local_18 [2];
std::__cxx11::string::string<std::allocator<char>>((string *)local_28,param_1,&local_29);
/* try { // try from 0014c11f to 0014c12d has its CatchHandler @ 0014c188 */
lVar2 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_short>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_short>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_short>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_short>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)names_abi_cxx11_,(string *)local_28);
if (local_28[0] != local_18) {
operator_delete(local_28[0],local_18[0] + 1);
}
if (lVar2 != 0) {
uVar1 = *(ushort *)(lVar2 + 0x28);
if (((ulong)uVar1 != 0) && ((ulong)uVar1 <= (ulong)(DAT_0020bbc0 - voxels >> 4))) {
return *(int8 *)(voxels + (ulong)(uVar1 - 1) * 0x10);
}
}
return 0;
}
| |
48,831 | voxel_registry::find(char const*) | untodesu[P]voxelius/game/shared/voxel_registry.cc | VoxelInfo *voxel_registry::find(const char *name)
{
const auto it = voxel_registry::names.find(name);
if(it != voxel_registry::names.cend())
return voxel_registry::find(it->second);
return nullptr;
} | O3 | cpp | voxel_registry::find(char const*):
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rsi
leaq 0x10(%rsp), %rbx
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x1b480
leaq 0xbe7e2(%rip), %rdi # 0x109b90
movq %rbx, %rsi
callq 0x4c018
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b3d4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x166c0
testq %rbx, %rbx
je 0x4b3fc
movzwl 0x28(%rbx), %eax
testq %rax, %rax
je 0x4b3fc
movq 0xbe7e7(%rip), %rdx # 0x109bd0
movq 0xbe7d8(%rip), %rcx # 0x109bc8
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq %rax, %rdx
jae 0x4b404
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
retq
decl %eax
shlq $0x4, %rax
movq (%rcx,%rax), %rax
jmp 0x4b3fe
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b42e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x166c0
movq %rbx, %rdi
callq 0x16c90
| _ZN14voxel_registry4findEPKc:
push rbx
sub rsp, 30h
mov rsi, rdi
lea rbx, [rsp+38h+var_28]
lea rdx, [rsp+38h+var_29]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, _ZN14voxel_registry5namesB5cxx11E; voxel_registry::names
mov rsi, rbx
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_tESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,ushort>,std::allocator<std::pair<std::string const,ushort>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
mov rbx, rax
lea rax, [rsp+38h+var_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4B3D4
mov rsi, [rsp+38h+var_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4B3D4:
test rbx, rbx
jz short loc_4B3FC
movzx eax, word ptr [rbx+28h]
test rax, rax
jz short loc_4B3FC
mov rdx, qword ptr cs:_ZN14voxel_registry6voxelsE+8; voxel_registry::voxels
mov rcx, qword ptr cs:_ZN14voxel_registry6voxelsE; voxel_registry::voxels
sub rdx, rcx
sar rdx, 4
cmp rdx, rax
jnb short loc_4B404
loc_4B3FC:
xor eax, eax
loc_4B3FE:
add rsp, 30h
pop rbx
retn
loc_4B404:
dec eax
shl rax, 4
mov rax, [rcx+rax]
jmp short loc_4B3FE
mov rbx, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4B42E
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4B42E:
mov rdi, rbx
call __Unwind_Resume
| long long voxel_registry::find(voxel_registry *this, const char *a2)
{
long long v2; // rbx
unsigned long long v3; // rax
void *v5[2]; // [rsp+10h] [rbp-28h] BYREF
long long v6; // [rsp+20h] [rbp-18h] BYREF
std::string::basic_string<std::allocator<char>>(v5, (long long)this);
v2 = std::_Hashtable<std::string,std::pair<std::string const,unsigned short>,std::allocator<std::pair<std::string const,unsigned short>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
&voxel_registry::names[abi:cxx11],
v5);
if ( v5[0] != &v6 )
operator delete(v5[0], v6 + 1);
if ( v2
&& (v3 = *(unsigned __int16 *)(v2 + 40), *(_WORD *)(v2 + 40))
&& (long long)(*((_QWORD *)&voxel_registry::voxels + 1) - voxel_registry::voxels) >> 4 >= v3 )
{
return *(_QWORD *)(voxel_registry::voxels + 16LL * (unsigned int)(v3 - 1));
}
else
{
return 0LL;
}
}
| find:
PUSH RBX
SUB RSP,0x30
MOV RSI,RDI
LEA RBX,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RDI,RBX
CALL 0x0011b480
LAB_0014b3a7:
LEA RDI,[0x209b90]
MOV RSI,RBX
CALL 0x0014c018
LAB_0014b3b6:
MOV RBX,RAX
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0014b3d4
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001166c0
LAB_0014b3d4:
TEST RBX,RBX
JZ 0x0014b3fc
MOVZX EAX,word ptr [RBX + 0x28]
TEST RAX,RAX
JZ 0x0014b3fc
MOV RDX,qword ptr [0x00209bd0]
MOV RCX,qword ptr [0x00209bc8]
SUB RDX,RCX
SAR RDX,0x4
CMP RDX,RAX
JNC 0x0014b404
LAB_0014b3fc:
XOR EAX,EAX
LAB_0014b3fe:
ADD RSP,0x30
POP RBX
RET
LAB_0014b404:
DEC EAX
SHL RAX,0x4
MOV RAX,qword ptr [RCX + RAX*0x1]
JMP 0x0014b3fe
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* voxel_registry::find(char const*) */
int8 voxel_registry::find(char *param_1)
{
ushort uVar1;
long lVar2;
allocator local_29;
long *local_28 [2];
long local_18 [2];
std::__cxx11::string::string<std::allocator<char>>((string *)local_28,param_1,&local_29);
/* try { // try from 0014b3a7 to 0014b3b5 has its CatchHandler @ 0014b410 */
lVar2 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_short>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_short>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_short>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_short>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)names_abi_cxx11_,(string *)local_28);
if (local_28[0] != local_18) {
operator_delete(local_28[0],local_18[0] + 1);
}
if (lVar2 != 0) {
uVar1 = *(ushort *)(lVar2 + 0x28);
if (((ulong)uVar1 != 0) && ((ulong)uVar1 <= (ulong)(_DAT_00209bd0 - voxels >> 4))) {
return *(int8 *)(voxels + (ulong)(uVar1 - 1) * 0x10);
}
}
return 0;
}
| |
48,832 | purge_account(PFS_thread*, PFS_account*) | eloqsql/storage/perfschema/pfs_account.cc | void purge_account(PFS_thread *thread, PFS_account *account)
{
LF_PINS *pins= get_account_hash_pins(thread);
if (unlikely(pins == NULL))
return;
PFS_account **entry;
entry= reinterpret_cast<PFS_account**>
(lf_hash_search(&account_hash, pins,
account->m_key.m_hash_key,
account->m_key.m_key_length));
if (entry && (entry != MY_ERRPTR))
{
assert(*entry == account);
if (account->get_refcount() == 0)
{
lf_hash_delete(&account_hash, pins,
account->m_key.m_hash_key,
account->m_key.m_key_length);
account->aggregate(false, account->m_user, account->m_host);
if (account->m_user != NULL)
{
account->m_user->release();
account->m_user= NULL;
}
if (account->m_host != NULL)
{
account->m_host->release();
account->m_host= NULL;
}
global_account_container.deallocate(account);
}
}
lf_hash_search_unpin(pins);
} | O3 | cpp | purge_account(PFS_thread*, PFS_account*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x838(%rdi), %rdi
testq %rdi, %rdi
je 0x457ee
movq %rbx, %rsi
callq 0x2b3ed
popq %rbx
popq %r14
popq %rbp
retq
cmpb $0x1, 0x39032b(%rip) # 0x3d5b20
jne 0x457e9
leaq 0x390282(%rip), %rdi # 0x3d5a80
callq 0x2ba18
movq %rax, 0x838(%r14)
testq %rax, %rax
je 0x457e9
movq %rax, %rdi
jmp 0x457e1
| _Z13purge_accountP10PFS_threadP11PFS_account:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov rdi, [rdi+838h]
test rdi, rdi
jz short loc_457EE
loc_457E1:
mov rsi, rbx
call _Z13purge_accountP10PFS_threadP11PFS_account_cold_1; purge_account(PFS_thread *,PFS_account *) [clone]
loc_457E9:
pop rbx
pop r14
pop rbp
retn
loc_457EE:
cmp cs:_ZL19account_hash_inited, 1; account_hash_inited
jnz short loc_457E9
lea rdi, unk_3D5A80
call lf_pinbox_get_pins
mov [r14+838h], rax
test rax, rax
jz short loc_457E9
mov rdi, rax
jmp short loc_457E1
| void purge_account(PFS_thread *a1, PFS_account *a2)
{
long long v3; // rdi
long long pins; // rax
v3 = *((_QWORD *)a1 + 263);
if ( v3 )
goto LABEL_2;
if ( account_hash_inited == 1 )
{
pins = lf_pinbox_get_pins((long long)&unk_3D5A80);
*((_QWORD *)a1 + 263) = pins;
if ( pins )
{
v3 = pins;
LABEL_2:
purge_account(v3, (long long)a2);
}
}
}
| purge_account:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x838]
TEST RDI,RDI
JZ 0x001457ee
LAB_001457e1:
MOV RSI,RBX
CALL 0x0012b3ed
LAB_001457e9:
POP RBX
POP R14
POP RBP
RET
LAB_001457ee:
CMP byte ptr [0x004d5b20],0x1
JNZ 0x001457e9
LEA RDI,[0x4d5a80]
CALL 0x0012ba18
MOV qword ptr [R14 + 0x838],RAX
TEST RAX,RAX
JZ 0x001457e9
MOV RDI,RAX
JMP 0x001457e1
|
/* purge_account(PFS_thread*, PFS_account*) */
void purge_account(PFS_thread *param_1,PFS_account *param_2)
{
PFS_thread *pPVar1;
pPVar1 = *(PFS_thread **)(param_1 + 0x838);
if (pPVar1 == (PFS_thread *)0x0) {
if (account_hash_inited != '\x01') {
return;
}
pPVar1 = (PFS_thread *)lf_pinbox_get_pins(0x4d5a80);
*(PFS_thread **)(param_1 + 0x838) = pPVar1;
if (pPVar1 == (PFS_thread *)0x0) {
return;
}
}
purge_account(pPVar1,param_2);
return;
}
| |
48,833 | httplib::detail::get_header_value_u64(std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long, bool&) | hkr04[P]cpp-mcp/common/httplib.h | inline uint64_t get_header_value_u64(const Headers &headers,
const std::string &key, uint64_t def,
size_t id, bool &is_invalid_value) {
is_invalid_value = false;
auto rng = headers.equal_range(key);
auto it = rng.first;
std::advance(it, static_cast<ssize_t>(id));
if (it != rng.second) {
if (is_numeric(it->second)) {
return std::strtoull(it->second.data(), nullptr, 10);
} else {
is_invalid_value = true;
}
}
return def;
} | O2 | c | httplib::detail::get_header_value_u64(std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long, bool&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbx
movb $0x0, (%r8)
callq 0x2b9c8
movq %rdx, %r12
leaq 0x8(%rsp), %r13
movq %rax, (%r13)
movq %r13, %rdi
movq %r15, %rsi
callq 0x2ba49
movq (%r13), %rdi
cmpq %r12, %rdi
je 0x2fec2
addq $0x28, %rdi
callq 0x2fed3
testb %al, %al
je 0x2febe
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0xa860
movq %rax, %rbx
jmp 0x2fec2
movb $0x1, (%r14)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| _ZN7httplib6detail20get_header_value_u64ERKSt18unordered_multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_NS0_11case_ignore4hashENS8_8equal_toESaISt4pairIKS7_S7_EEERSC_mmRb:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r14, r8
mov r15, rcx
mov rbx, rdx
mov byte ptr [r8], 0
call _ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE11equal_rangeERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::equal_range(std::string const&)
mov r12, rdx
lea r13, [rsp+38h+var_30]
mov [r13+0], rax
mov rdi, r13
mov rsi, r15
call _ZSt9__advanceINSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ELb0ELb1EEElEvRT_T0_St18input_iterator_tag; std::__advance<std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>,long>(std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true> &,long,std::input_iterator_tag)
mov rdi, [r13+0]
cmp rdi, r12
jz short loc_2FEC2
add rdi, 28h ; '('
call _ZN7httplib6detail10is_numericERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; httplib::detail::is_numeric(std::string const&)
test al, al
jz short loc_2FEBE
mov rax, [rsp+38h+var_30]
mov rdi, [rax+28h]
push 0Ah
pop rdx
xor esi, esi
call _strtoull
mov rbx, rax
jmp short loc_2FEC2
loc_2FEBE:
mov byte ptr [r14], 1
loc_2FEC2:
mov rax, rbx
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long httplib::detail::get_header_value_u64(long long a1, long long a2, long long a3, long long a4, _BYTE *a5)
{
_QWORD *v8; // rax
_QWORD *v9; // rdx
_QWORD *v10; // r12
_QWORD *v12; // [rsp+8h] [rbp-30h] BYREF
*a5 = 0;
v8 = (_QWORD *)std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::equal_range(a1);
v10 = v9;
v12 = v8;
std::__advance<std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>,long>(
&v12,
a4);
if ( v12 != v10 )
{
if ( (unsigned __int8)httplib::detail::is_numeric(v12 + 5) )
return strtoull(v12[5], 0LL, 10LL);
else
*a5 = 1;
}
return a3;
}
| get_header_value_u64:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14,R8
MOV R15,RCX
MOV RBX,RDX
MOV byte ptr [R8],0x0
CALL 0x0012b9c8
MOV R12,RDX
LEA R13,[RSP + 0x8]
MOV qword ptr [R13],RAX
MOV RDI,R13
MOV RSI,R15
CALL 0x0012ba49
MOV RDI,qword ptr [R13]
CMP RDI,R12
JZ 0x0012fec2
ADD RDI,0x28
CALL 0x0012fed3
TEST AL,AL
JZ 0x0012febe
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x28]
PUSH 0xa
POP RDX
XOR ESI,ESI
CALL 0x0010a860
MOV RBX,RAX
JMP 0x0012fec2
LAB_0012febe:
MOV byte ptr [R14],0x1
LAB_0012fec2:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* httplib::detail::get_header_value_u64(std::unordered_multimap<std::__cxx11::string,
std::__cxx11::string, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to,
std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > > const&,
std::__cxx11::string const&, unsigned long, unsigned long, bool&) */
ulonglong httplib::detail::get_header_value_u64
(unordered_multimap *param_1,string *param_2,ulong param_3,ulong param_4,
bool *param_5)
{
char cVar1;
int1 auVar2 [16];
long local_30;
*param_5 = false;
auVar2 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
::equal_range((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
*)param_1,param_2);
local_30 = auVar2._0_8_;
std::
__advance<std::__detail::_Node_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>,false,true>,long>
(&local_30);
if (local_30 != auVar2._8_8_) {
cVar1 = is_numeric((string *)(local_30 + 0x28));
if (cVar1 == '\0') {
*param_5 = true;
}
else {
param_3 = strtoull(*(char **)(local_30 + 0x28),(char **)0x0,10);
}
}
return param_3;
}
| |
48,834 | ggml_backend_registry::load_backend(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&, bool) | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend-reg.cpp | ggml_backend_reg_t load_backend(const std::wstring & path, bool silent) {
dl_handle_ptr handle { dl_load_library(path) };
if (!handle) {
if (!silent) {
GGML_LOG_ERROR("%s: failed to load %s\n", __func__, utf16_to_utf8(path).c_str());
}
return nullptr;
}
auto score_fn = (ggml_backend_score_t) dl_get_sym(handle.get(), "ggml_backend_score");
if (score_fn && score_fn() == 0) {
if (!silent) {
GGML_LOG_INFO("%s: backend %s is not supported on this system\n", __func__, utf16_to_utf8(path).c_str());
}
return nullptr;
}
auto backend_init_fn = (ggml_backend_init_t) dl_get_sym(handle.get(), "ggml_backend_init");
if (!backend_init_fn) {
if (!silent) {
GGML_LOG_ERROR("%s: failed to find ggml_backend_init in %s\n", __func__, utf16_to_utf8(path).c_str());
}
return nullptr;
}
ggml_backend_reg_t reg = backend_init_fn();
if (!reg || reg->api_version != GGML_BACKEND_API_VERSION) {
if (!silent) {
if (!reg) {
GGML_LOG_ERROR("%s: failed to initialize backend from %s: ggml_backend_init returned NULL\n", __func__, utf16_to_utf8(path).c_str());
} else {
GGML_LOG_ERROR("%s: failed to initialize backend from %s: incompatible API version (backend: %d, current: %d)\n",
__func__, utf16_to_utf8(path).c_str(), reg->api_version, GGML_BACKEND_API_VERSION);
}
}
return nullptr;
}
GGML_LOG_INFO("%s: loaded %s backend from %s\n", __func__, ggml_backend_reg_name(reg), utf16_to_utf8(path).c_str());
register_backend(reg, std::move(handle));
return reg;
} | O0 | cpp | ggml_backend_registry::load_backend(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp # imm = 0x160
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1c680
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x194c0
leaq -0x28(%rbp), %rdi
callq 0x18970
testb $0x1, %al
jne 0x1cfe2
testb $0x1, -0x19(%rbp)
jne 0x1cfce
movq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x1c6d0
jmp 0x1cf70
leaq -0x48(%rbp), %rdi
callq 0x1ab80
movq %rax, %rcx
leaq 0xc332(%rip), %rsi # 0x292b5
leaq 0xca07(%rip), %rdx # 0x29991
xorl %eax, %eax
movl $0x4, %edi
callq 0x189c0
jmp 0x1cf98
leaq -0x48(%rbp), %rdi
callq 0x19910
jmp 0x1cfce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1d3be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x19910
jmp 0x1d3be
movq $0x0, -0x8(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x1d3a8
leaq -0x28(%rbp), %rdi
callq 0x18a50
movq %rax, %rdi
leaq 0xc2d7(%rip), %rsi # 0x292cc
callq 0x1c760
movq %rax, -0x128(%rbp)
jmp 0x1d003
movq -0x128(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x1d0a8
movq -0x60(%rbp), %rax
callq *%rax
movl %eax, -0x12c(%rbp)
jmp 0x1d027
movl -0x12c(%rbp), %eax
cmpl $0x0, %eax
jne 0x1d0a8
testb $0x1, -0x19(%rbp)
jne 0x1d094
movq -0x18(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x1c6d0
jmp 0x1d047
leaq -0x80(%rbp), %rdi
callq 0x1ab80
movq %rax, %rcx
leaq 0xc285(%rip), %rsi # 0x292df
leaq 0xc930(%rip), %rdx # 0x29991
xorl %eax, %eax
movl $0x2, %edi
callq 0x189c0
jmp 0x1d06f
leaq -0x80(%rbp), %rdi
callq 0x19910
jmp 0x1d094
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x19910
jmp 0x1d3be
movq $0x0, -0x8(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x1d3a8
leaq -0x28(%rbp), %rdi
callq 0x18a50
movq %rax, %rdi
leaq 0xc254(%rip), %rsi # 0x2930f
callq 0x1c760
movq %rax, -0x138(%rbp)
jmp 0x1d0c9
movq -0x138(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
jne 0x1d167
testb $0x1, -0x19(%rbp)
jne 0x1d153
movq -0x18(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x1c6d0
jmp 0x1d0fd
leaq -0xa8(%rbp), %rdi
callq 0x1ab80
movq %rax, %rcx
leaq 0xc20e(%rip), %rsi # 0x29321
leaq 0xc877(%rip), %rdx # 0x29991
xorl %eax, %eax
movl $0x4, %edi
callq 0x189c0
jmp 0x1d128
leaq -0xa8(%rbp), %rdi
callq 0x19910
jmp 0x1d153
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x19910
jmp 0x1d3be
movq $0x0, -0x8(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x1d3a8
movq -0x88(%rbp), %rax
callq *%rax
movq %rax, -0x140(%rbp)
jmp 0x1d179
movq -0x140(%rbp), %rax
movq %rax, -0xb0(%rbp)
cmpq $0x0, -0xb0(%rbp)
je 0x1d1a1
movq -0xb0(%rbp), %rax
cmpl $0x1, (%rax)
je 0x1d2ae
testb $0x1, -0x19(%rbp)
jne 0x1d29a
cmpq $0x0, -0xb0(%rbp)
jne 0x1d220
movq -0x18(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x1c6d0
jmp 0x1d1c7
leaq -0xd0(%rbp), %rdi
callq 0x1ab80
movq %rax, %rcx
leaq 0xc170(%rip), %rsi # 0x2934d
leaq 0xc7ad(%rip), %rdx # 0x29991
xorl %eax, %eax
movl $0x4, %edi
callq 0x189c0
jmp 0x1d1f2
leaq -0xd0(%rbp), %rdi
callq 0x19910
jmp 0x1d298
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x19910
jmp 0x1d3be
movq -0x18(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x1c6d0
jmp 0x1d232
leaq -0xf0(%rbp), %rdi
callq 0x1ab80
movq %rax, %rcx
movq -0xb0(%rbp), %rax
movl (%rax), %r8d
leaq 0xc146(%rip), %rsi # 0x29398
leaq 0xc738(%rip), %rdx # 0x29991
xorl %eax, %eax
movl $0x4, %edi
movl $0x1, %r9d
callq 0x189c0
jmp 0x1d26d
leaq -0xf0(%rbp), %rdi
callq 0x19910
jmp 0x1d298
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x19910
jmp 0x1d3be
jmp 0x1d29a
movq $0x0, -0x8(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x1d3a8
movq -0xb0(%rbp), %rdi
callq 0x19ac0
movq %rax, -0x148(%rbp)
jmp 0x1d2c3
movq -0x18(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x1c6d0
jmp 0x1d2d5
leaq -0x110(%rbp), %rdi
callq 0x1ab80
movq -0x148(%rbp), %rcx
movq %rax, %r8
leaq 0xc105(%rip), %rsi # 0x293f7
leaq 0xc698(%rip), %rdx # 0x29991
xorl %eax, %eax
movl $0x2, %edi
callq 0x189c0
jmp 0x1d307
leaq -0x110(%rbp), %rdi
callq 0x19910
movq -0xb0(%rbp), %rax
movq %rax, -0x158(%rbp)
leaq -0x118(%rbp), %rdi
movq %rdi, -0x150(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x1a950
movq -0x120(%rbp), %rdi
movq -0x158(%rbp), %rsi
movq -0x150(%rbp), %rdx
callq 0x19d80
jmp 0x1d354
leaq -0x118(%rbp), %rdi
callq 0x1ac50
movq -0xb0(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x1d3a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x19910
jmp 0x1d3be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x1ac50
jmp 0x1d3be
leaq -0x28(%rbp), %rdi
callq 0x1ac50
movq -0x8(%rbp), %rax
addq $0x160, %rsp # imm = 0x160
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x1ac50
movq -0x50(%rbp), %rdi
callq 0x1a7a0
| _ZN21ggml_backend_registry12load_backendERKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEb:
push rbp
mov rbp, rsp
sub rsp, 160h
mov al, dl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
and al, 1
mov [rbp+var_19], al
mov rax, [rbp+var_10]
mov [rbp+var_120], rax
mov rdi, [rbp+var_18]
call _ZL15dl_load_libraryRKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; dl_load_library(std::wstring const&)
mov rsi, rax
lea rdi, [rbp+var_28]
call __ZNSt10unique_ptrIv17dl_handle_deleterEC2IS0_vEEPv; std::unique_ptr<void,dl_handle_deleter>::unique_ptr<dl_handle_deleter,void>(void *)
lea rdi, [rbp+var_28]
call __ZNKSt10unique_ptrIv17dl_handle_deleterEcvbEv; std::unique_ptr<void,dl_handle_deleter>::operator bool(void)
test al, 1
jnz loc_1CFE2
test [rbp+var_19], 1
jnz short loc_1CFCE
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_48]
call _ZL13utf16_to_utf8RKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; utf16_to_utf8(std::wstring const&)
jmp short $+2
loc_1CF70:
lea rdi, [rbp+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rcx, rax
lea rsi, aSFailedToLoadS; "%s: failed to load %s\n"
lea rdx, aUnloadBackend+2; "load_backend"
xor eax, eax
mov edi, 4
call _ggml_log_internal
jmp short $+2
loc_1CF98:
lea rdi, [rbp+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1CFCE
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp loc_1D3BE
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_1D3BE
loc_1CFCE:
mov [rbp+var_8], 0
mov [rbp+var_58], 1
jmp loc_1D3A8
loc_1CFE2:
lea rdi, [rbp+var_28]
call __ZNKSt10unique_ptrIv17dl_handle_deleterE3getEv; std::unique_ptr<void,dl_handle_deleter>::get(void)
mov rdi, rax; void *
lea rsi, aGgmlBackendSco; "ggml_backend_score"
call _ZL10dl_get_symPvPKc; dl_get_sym(void *,char const*)
mov [rbp+var_128], rax
jmp short $+2
loc_1D003:
mov rax, [rbp+var_128]
mov [rbp+var_60], rax
cmp [rbp+var_60], 0
jz loc_1D0A8
mov rax, [rbp+var_60]
call rax
mov [rbp+var_12C], eax
jmp short $+2
loc_1D027:
mov eax, [rbp+var_12C]
cmp eax, 0
jnz short loc_1D0A8
test [rbp+var_19], 1
jnz short loc_1D094
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_80]
call _ZL13utf16_to_utf8RKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; utf16_to_utf8(std::wstring const&)
jmp short $+2
loc_1D047:
lea rdi, [rbp+var_80]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rcx, rax
lea rsi, aSBackendSIsNot; "%s: backend %s is not supported on this"...
lea rdx, aUnloadBackend+2; "load_backend"
xor eax, eax
mov edi, 2
call _ggml_log_internal
jmp short $+2
loc_1D06F:
lea rdi, [rbp+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1D094
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_1D3BE
loc_1D094:
mov [rbp+var_8], 0
mov [rbp+var_58], 1
jmp loc_1D3A8
loc_1D0A8:
lea rdi, [rbp+var_28]
call __ZNKSt10unique_ptrIv17dl_handle_deleterE3getEv; std::unique_ptr<void,dl_handle_deleter>::get(void)
mov rdi, rax; void *
lea rsi, aGgmlBackendIni_2; "ggml_backend_init"
call _ZL10dl_get_symPvPKc; dl_get_sym(void *,char const*)
mov [rbp+var_138], rax
jmp short $+2
loc_1D0C9:
mov rax, [rbp+var_138]
mov [rbp+var_88], rax
cmp [rbp+var_88], 0
jnz loc_1D167
test [rbp+var_19], 1
jnz short loc_1D153
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_A8]
call _ZL13utf16_to_utf8RKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; utf16_to_utf8(std::wstring const&)
jmp short $+2
loc_1D0FD:
lea rdi, [rbp+var_A8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rcx, rax
lea rsi, aSFailedToFindG_0; "%s: failed to find ggml_backend_init in"...
lea rdx, aUnloadBackend+2; "load_backend"
xor eax, eax
mov edi, 4
call _ggml_log_internal
jmp short $+2
loc_1D128:
lea rdi, [rbp+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1D153
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_1D3BE
loc_1D153:
mov [rbp+var_8], 0
mov [rbp+var_58], 1
jmp loc_1D3A8
loc_1D167:
mov rax, [rbp+var_88]
call rax
mov [rbp+var_140], rax
jmp short $+2
loc_1D179:
mov rax, [rbp+var_140]
mov [rbp+var_B0], rax
cmp [rbp+var_B0], 0
jz short loc_1D1A1
mov rax, [rbp+var_B0]
cmp dword ptr [rax], 1
jz loc_1D2AE
loc_1D1A1:
test [rbp+var_19], 1
jnz loc_1D29A
cmp [rbp+var_B0], 0
jnz short loc_1D220
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_D0]
call _ZL13utf16_to_utf8RKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; utf16_to_utf8(std::wstring const&)
jmp short $+2
loc_1D1C7:
lea rdi, [rbp+var_D0]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rcx, rax
lea rsi, aSFailedToIniti; "%s: failed to initialize backend from %"...
lea rdx, aUnloadBackend+2; "load_backend"
xor eax, eax
mov edi, 4
call _ggml_log_internal
jmp short $+2
loc_1D1F2:
lea rdi, [rbp+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_1D298
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_1D3BE
loc_1D220:
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_F0]
call _ZL13utf16_to_utf8RKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; utf16_to_utf8(std::wstring const&)
jmp short $+2
loc_1D232:
lea rdi, [rbp+var_F0]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rcx, rax
mov rax, [rbp+var_B0]
mov r8d, [rax]
lea rsi, aSFailedToIniti_0; "%s: failed to initialize backend from %"...
lea rdx, aUnloadBackend+2; "load_backend"
xor eax, eax
mov edi, 4
mov r9d, 1
call _ggml_log_internal
jmp short $+2
loc_1D26D:
lea rdi, [rbp+var_F0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1D298
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_F0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_1D3BE
loc_1D298:
jmp short $+2
loc_1D29A:
mov [rbp+var_8], 0
mov [rbp+var_58], 1
jmp loc_1D3A8
loc_1D2AE:
mov rdi, [rbp+var_B0]
call _ggml_backend_reg_name
mov [rbp+var_148], rax
jmp short $+2
loc_1D2C3:
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_110]
call _ZL13utf16_to_utf8RKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; utf16_to_utf8(std::wstring const&)
jmp short $+2
loc_1D2D5:
lea rdi, [rbp+var_110]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rcx, [rbp+var_148]
mov r8, rax
lea rsi, aSLoadedSBacken; "%s: loaded %s backend from %s\n"
lea rdx, aUnloadBackend+2; "load_backend"
xor eax, eax
mov edi, 2
call _ggml_log_internal
jmp short $+2
loc_1D307:
lea rdi, [rbp+var_110]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, [rbp+var_B0]
mov [rbp+var_158], rax
lea rdi, [rbp+var_118]
mov [rbp+var_150], rdi
lea rsi, [rbp+var_28]
call __ZNSt10unique_ptrIv17dl_handle_deleterEC2EOS1_; std::unique_ptr<void,dl_handle_deleter>::unique_ptr(std::unique_ptr<void,dl_handle_deleter>&&)
mov rdi, [rbp+var_120]
mov rsi, [rbp+var_158]
mov rdx, [rbp+var_150]
call __ZN21ggml_backend_registry16register_backendEP16ggml_backend_regSt10unique_ptrIv17dl_handle_deleterE; ggml_backend_registry::register_backend(ggml_backend_reg *,std::unique_ptr<void,dl_handle_deleter>)
jmp short $+2
loc_1D354:
lea rdi, [rbp+var_118]
call __ZNSt10unique_ptrIv17dl_handle_deleterED2Ev; std::unique_ptr<void,dl_handle_deleter>::~unique_ptr()
mov rax, [rbp+var_B0]
mov [rbp+var_8], rax
mov [rbp+var_58], 1
jmp short loc_1D3A8
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_110]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1D3BE
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_118]
call __ZNSt10unique_ptrIv17dl_handle_deleterED2Ev; std::unique_ptr<void,dl_handle_deleter>::~unique_ptr()
jmp short loc_1D3BE
loc_1D3A8:
lea rdi, [rbp+var_28]
call __ZNSt10unique_ptrIv17dl_handle_deleterED2Ev; std::unique_ptr<void,dl_handle_deleter>::~unique_ptr()
mov rax, [rbp+var_8]
add rsp, 160h
pop rbp
retn
loc_1D3BE:
lea rdi, [rbp+var_28]
call __ZNSt10unique_ptrIv17dl_handle_deleterED2Ev; std::unique_ptr<void,dl_handle_deleter>::~unique_ptr()
mov rdi, [rbp+var_50]
call __Unwind_Resume
| _DWORD * ggml_backend_registry::load_backend(long long a1, long long a2, char a3)
{
long long library; // rax
const char *v4; // rax
void *v5; // rdi
const char *v6; // rax
void *v7; // rdi
const char *v8; // rax
const char *v9; // rax
const char *v10; // rax
const char *v11; // rax
_DWORD *v13; // [rsp+8h] [rbp-158h]
const char *v14; // [rsp+18h] [rbp-148h]
char v16[8]; // [rsp+48h] [rbp-118h] BYREF
_BYTE v17[32]; // [rsp+50h] [rbp-110h] BYREF
_BYTE v18[32]; // [rsp+70h] [rbp-F0h] BYREF
_BYTE v19[32]; // [rsp+90h] [rbp-D0h] BYREF
_DWORD *v20; // [rsp+B0h] [rbp-B0h]
_BYTE v21[32]; // [rsp+B8h] [rbp-A8h] BYREF
long long (*v22)(void); // [rsp+D8h] [rbp-88h]
_BYTE v23[32]; // [rsp+E0h] [rbp-80h] BYREF
unsigned int (*sym)(void); // [rsp+100h] [rbp-60h]
int v25; // [rsp+108h] [rbp-58h]
_BYTE v26[32]; // [rsp+118h] [rbp-48h] BYREF
_BYTE v27[15]; // [rsp+138h] [rbp-28h] BYREF
char v28; // [rsp+147h] [rbp-19h]
long long v29; // [rsp+148h] [rbp-18h]
long long v30; // [rsp+150h] [rbp-10h]
_DWORD *v31; // [rsp+158h] [rbp-8h]
v30 = a1;
v29 = a2;
v28 = a3 & 1;
library = dl_load_library(a2);
std::unique_ptr<void,dl_handle_deleter>::unique_ptr<dl_handle_deleter,void>(v27, library);
if ( (std::unique_ptr<void,dl_handle_deleter>::operator bool(v27) & 1) != 0 )
{
v5 = (void *)std::unique_ptr<void,dl_handle_deleter>::get(v27);
sym = (unsigned int (*)(void))dl_get_sym(v5, "ggml_backend_score");
if ( !sym || sym() )
{
v7 = (void *)std::unique_ptr<void,dl_handle_deleter>::get(v27);
v22 = (long long (*)(void))dl_get_sym(v7, "ggml_backend_init");
if ( v22 )
{
v20 = (_DWORD *)v22();
if ( v20 && *v20 == 1 )
{
v14 = (const char *)ggml_backend_reg_name(v20);
utf16_to_utf8((long long)v17, v29);
v11 = (const char *)std::string::c_str(v17);
ggml_log_internal(2LL, "%s: loaded %s backend from %s\n", "load_backend", v14, v11);
std::string::~string(v17);
v13 = v20;
std::unique_ptr<void,dl_handle_deleter>::unique_ptr(v16, v27);
ggml_backend_registry::register_backend(a1, v13, v16);
std::unique_ptr<void,dl_handle_deleter>::~unique_ptr(v16);
v31 = v20;
v25 = 1;
}
else
{
if ( (v28 & 1) == 0 )
{
if ( v20 )
{
utf16_to_utf8((long long)v18, v29);
v10 = (const char *)std::string::c_str(v18);
ggml_log_internal(
4LL,
"%s: failed to initialize backend from %s: incompatible API version (backend: %d, current: %d)\n",
"load_backend",
v10,
*v20,
1);
std::string::~string(v18);
}
else
{
utf16_to_utf8((long long)v19, v29);
v9 = (const char *)std::string::c_str(v19);
ggml_log_internal(
4LL,
"%s: failed to initialize backend from %s: ggml_backend_init returned NULL\n",
"load_backend",
v9);
std::string::~string(v19);
}
}
v31 = 0LL;
v25 = 1;
}
}
else
{
if ( (v28 & 1) == 0 )
{
utf16_to_utf8((long long)v21, v29);
v8 = (const char *)std::string::c_str(v21);
ggml_log_internal(4LL, "%s: failed to find ggml_backend_init in %s\n", "load_backend", v8);
std::string::~string(v21);
}
v31 = 0LL;
v25 = 1;
}
}
else
{
if ( (v28 & 1) == 0 )
{
utf16_to_utf8((long long)v23, v29);
v6 = (const char *)std::string::c_str(v23);
ggml_log_internal(2LL, "%s: backend %s is not supported on this system\n", "load_backend", v6);
std::string::~string(v23);
}
v31 = 0LL;
v25 = 1;
}
}
else
{
if ( (v28 & 1) == 0 )
{
utf16_to_utf8((long long)v26, v29);
v4 = (const char *)std::string::c_str(v26);
ggml_log_internal(4LL, "%s: failed to load %s\n", "load_backend", v4);
std::string::~string(v26);
}
v31 = 0LL;
v25 = 1;
}
std::unique_ptr<void,dl_handle_deleter>::~unique_ptr(v27);
return v31;
}
| load_backend:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x160
MOV AL,DL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
AND AL,0x1
MOV byte ptr [RBP + -0x19],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x120],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0011c680
MOV RSI,RAX
LEA RDI,[RBP + -0x28]
CALL 0x001194c0
LEA RDI,[RBP + -0x28]
CALL 0x00118970
TEST AL,0x1
JNZ 0x0011cfe2
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x0011cfce
MOV RSI,qword ptr [RBP + -0x18]
LAB_0011cf65:
LEA RDI,[RBP + -0x48]
CALL 0x0011c6d0
JMP 0x0011cf70
LAB_0011cf70:
LEA RDI,[RBP + -0x48]
CALL 0x0011ab80
MOV RCX,RAX
LAB_0011cf7c:
LEA RSI,[0x1292b5]
LEA RDX,[0x129991]
XOR EAX,EAX
MOV EDI,0x4
CALL 0x001189c0
JMP 0x0011cf98
LAB_0011cf98:
LEA RDI,[RBP + -0x48]
CALL 0x00119910
JMP 0x0011cfce
LAB_0011cfce:
MOV qword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x58],0x1
JMP 0x0011d3a8
LAB_0011cfe2:
LEA RDI,[RBP + -0x28]
CALL 0x00118a50
MOV RDI,RAX
LAB_0011cfee:
LEA RSI,[0x1292cc]
CALL 0x0011c760
MOV qword ptr [RBP + -0x128],RAX
JMP 0x0011d003
LAB_0011d003:
MOV RAX,qword ptr [RBP + -0x128]
MOV qword ptr [RBP + -0x60],RAX
CMP qword ptr [RBP + -0x60],0x0
JZ 0x0011d0a8
MOV RAX,qword ptr [RBP + -0x60]
CALL RAX
MOV dword ptr [RBP + -0x12c],EAX
JMP 0x0011d027
LAB_0011d027:
MOV EAX,dword ptr [RBP + -0x12c]
CMP EAX,0x0
JNZ 0x0011d0a8
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x0011d094
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x80]
CALL 0x0011c6d0
JMP 0x0011d047
LAB_0011d047:
LEA RDI,[RBP + -0x80]
CALL 0x0011ab80
MOV RCX,RAX
LAB_0011d053:
LEA RSI,[0x1292df]
LEA RDX,[0x129991]
XOR EAX,EAX
MOV EDI,0x2
CALL 0x001189c0
JMP 0x0011d06f
LAB_0011d06f:
LEA RDI,[RBP + -0x80]
CALL 0x00119910
JMP 0x0011d094
LAB_0011d094:
MOV qword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x58],0x1
JMP 0x0011d3a8
LAB_0011d0a8:
LEA RDI,[RBP + -0x28]
CALL 0x00118a50
MOV RDI,RAX
LAB_0011d0b4:
LEA RSI,[0x12930f]
CALL 0x0011c760
MOV qword ptr [RBP + -0x138],RAX
JMP 0x0011d0c9
LAB_0011d0c9:
MOV RAX,qword ptr [RBP + -0x138]
MOV qword ptr [RBP + -0x88],RAX
CMP qword ptr [RBP + -0x88],0x0
JNZ 0x0011d167
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x0011d153
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0xa8]
CALL 0x0011c6d0
JMP 0x0011d0fd
LAB_0011d0fd:
LEA RDI,[RBP + -0xa8]
CALL 0x0011ab80
MOV RCX,RAX
LAB_0011d10c:
LEA RSI,[0x129321]
LEA RDX,[0x129991]
XOR EAX,EAX
MOV EDI,0x4
CALL 0x001189c0
JMP 0x0011d128
LAB_0011d128:
LEA RDI,[RBP + -0xa8]
CALL 0x00119910
JMP 0x0011d153
LAB_0011d153:
MOV qword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x58],0x1
JMP 0x0011d3a8
LAB_0011d167:
MOV RAX,qword ptr [RBP + -0x88]
LAB_0011d16e:
CALL RAX
MOV qword ptr [RBP + -0x140],RAX
JMP 0x0011d179
LAB_0011d179:
MOV RAX,qword ptr [RBP + -0x140]
MOV qword ptr [RBP + -0xb0],RAX
CMP qword ptr [RBP + -0xb0],0x0
JZ 0x0011d1a1
MOV RAX,qword ptr [RBP + -0xb0]
CMP dword ptr [RAX],0x1
JZ 0x0011d2ae
LAB_0011d1a1:
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x0011d29a
CMP qword ptr [RBP + -0xb0],0x0
JNZ 0x0011d220
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0xd0]
CALL 0x0011c6d0
JMP 0x0011d1c7
LAB_0011d1c7:
LEA RDI,[RBP + -0xd0]
CALL 0x0011ab80
MOV RCX,RAX
LAB_0011d1d6:
LEA RSI,[0x12934d]
LEA RDX,[0x129991]
XOR EAX,EAX
MOV EDI,0x4
CALL 0x001189c0
JMP 0x0011d1f2
LAB_0011d1f2:
LEA RDI,[RBP + -0xd0]
CALL 0x00119910
JMP 0x0011d298
LAB_0011d220:
MOV RSI,qword ptr [RBP + -0x18]
LAB_0011d224:
LEA RDI,[RBP + -0xf0]
CALL 0x0011c6d0
JMP 0x0011d232
LAB_0011d232:
LEA RDI,[RBP + -0xf0]
CALL 0x0011ab80
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0xb0]
MOV R8D,dword ptr [RAX]
LAB_0011d24b:
LEA RSI,[0x129398]
LEA RDX,[0x129991]
XOR EAX,EAX
MOV EDI,0x4
MOV R9D,0x1
CALL 0x001189c0
JMP 0x0011d26d
LAB_0011d26d:
LEA RDI,[RBP + -0xf0]
CALL 0x00119910
JMP 0x0011d298
LAB_0011d298:
JMP 0x0011d29a
LAB_0011d29a:
MOV qword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x58],0x1
JMP 0x0011d3a8
LAB_0011d2ae:
MOV RDI,qword ptr [RBP + -0xb0]
LAB_0011d2b5:
CALL 0x00119ac0
MOV qword ptr [RBP + -0x148],RAX
JMP 0x0011d2c3
LAB_0011d2c3:
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x110]
CALL 0x0011c6d0
JMP 0x0011d2d5
LAB_0011d2d5:
LEA RDI,[RBP + -0x110]
CALL 0x0011ab80
MOV RCX,qword ptr [RBP + -0x148]
MOV R8,RAX
LAB_0011d2eb:
LEA RSI,[0x1293f7]
LEA RDX,[0x129991]
XOR EAX,EAX
MOV EDI,0x2
CALL 0x001189c0
JMP 0x0011d307
LAB_0011d307:
LEA RDI,[RBP + -0x110]
CALL 0x00119910
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RBP + -0x158],RAX
LEA RDI,[RBP + -0x118]
MOV qword ptr [RBP + -0x150],RDI
LEA RSI,[RBP + -0x28]
CALL 0x0011a950
MOV RDI,qword ptr [RBP + -0x120]
MOV RSI,qword ptr [RBP + -0x158]
MOV RDX,qword ptr [RBP + -0x150]
LAB_0011d34d:
CALL 0x00119d80
LAB_0011d352:
JMP 0x0011d354
LAB_0011d354:
LEA RDI,[RBP + -0x118]
CALL 0x0011ac50
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x58],0x1
JMP 0x0011d3a8
LAB_0011d3a8:
LEA RDI,[RBP + -0x28]
CALL 0x0011ac50
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x160
POP RBP
RET
|
/* ggml_backend_registry::load_backend(std::__cxx11::wstring const&, bool) */
int * __thiscall
ggml_backend_registry::load_backend(ggml_backend_registry *this,wstring *param_1,bool param_2)
{
int *piVar1;
bool bVar2;
int iVar3;
void *pvVar4;
int8 uVar5;
int8 uVar6;
unique_ptr<void,dl_handle_deleter> local_120 [8];
wstring local_118 [32];
wstring local_f8 [32];
wstring local_d8 [32];
int *local_b8;
wstring local_b0 [32];
code *local_90;
wstring local_88 [32];
code *local_68;
int4 local_60;
wstring local_50 [32];
unique_ptr<void,dl_handle_deleter> local_30 [15];
byte local_21;
wstring *local_20;
ggml_backend_registry *local_18;
int *local_10;
local_21 = param_2;
local_20 = param_1;
local_18 = this;
pvVar4 = (void *)dl_load_library(param_1);
std::unique_ptr<void,dl_handle_deleter>::unique_ptr<dl_handle_deleter,void>(local_30,pvVar4);
bVar2 = std::unique_ptr::operator_cast_to_bool((unique_ptr *)local_30);
if (bVar2) {
pvVar4 = (void *)std::unique_ptr<void,dl_handle_deleter>::get(local_30);
/* try { // try from 0011cfee to 0011d044 has its CatchHandler @ 0011cfa3 */
local_68 = (code *)dl_get_sym(pvVar4,"ggml_backend_score");
if ((local_68 == (code *)0x0) || (iVar3 = (*local_68)(), iVar3 != 0)) {
pvVar4 = (void *)std::unique_ptr<void,dl_handle_deleter>::get(local_30);
/* try { // try from 0011d0b4 to 0011d0fa has its CatchHandler @ 0011cfa3 */
local_90 = (code *)dl_get_sym(pvVar4,"ggml_backend_init");
if (local_90 == (code *)0x0) {
if ((local_21 & 1) == 0) {
utf16_to_utf8(local_b0);
uVar5 = std::__cxx11::string::c_str((string *)local_b0);
/* try { // try from 0011d10c to 0011d125 has its CatchHandler @ 0011d136 */
ggml_log_internal(4,"%s: failed to find ggml_backend_init in %s\n","load_backend",uVar5);
std::__cxx11::string::~string((string *)local_b0);
}
local_10 = (int *)0x0;
}
else {
/* try { // try from 0011d16e to 0011d1c4 has its CatchHandler @ 0011cfa3 */
local_b8 = (int *)(*local_90)();
if ((local_b8 == (int *)0x0) || (*local_b8 != 1)) {
if ((local_21 & 1) == 0) {
if (local_b8 == (int *)0x0) {
utf16_to_utf8(local_d8);
uVar5 = std::__cxx11::string::c_str((string *)local_d8);
/* try { // try from 0011d1d6 to 0011d1ef has its CatchHandler @ 0011d203 */
ggml_log_internal(4,
"%s: failed to initialize backend from %s: ggml_backend_init returned NULL\n"
,"load_backend",uVar5);
std::__cxx11::string::~string((string *)local_d8);
}
else {
/* try { // try from 0011d224 to 0011d22f has its CatchHandler @ 0011cfa3 */
utf16_to_utf8(local_f8);
uVar5 = std::__cxx11::string::c_str((string *)local_f8);
/* try { // try from 0011d24b to 0011d26a has its CatchHandler @ 0011d27b */
ggml_log_internal(4,
"%s: failed to initialize backend from %s: incompatible API version (backend: %d, current: %d)\n"
,"load_backend",uVar5,*local_b8,1);
std::__cxx11::string::~string((string *)local_f8);
}
}
local_10 = (int *)0x0;
}
else {
/* try { // try from 0011d2b5 to 0011d2d2 has its CatchHandler @ 0011cfa3 */
uVar5 = ggml_backend_reg_name(local_b8);
utf16_to_utf8(local_118);
uVar6 = std::__cxx11::string::c_str((string *)local_118);
/* try { // try from 0011d2eb to 0011d304 has its CatchHandler @ 0011d374 */
ggml_log_internal(2,"%s: loaded %s backend from %s\n","load_backend",uVar5,uVar6);
std::__cxx11::string::~string((string *)local_118);
piVar1 = local_b8;
std::unique_ptr<void,dl_handle_deleter>::unique_ptr(local_120,local_30);
/* try { // try from 0011d34d to 0011d351 has its CatchHandler @ 0011d38e */
register_backend(this,piVar1,local_120);
std::unique_ptr<void,dl_handle_deleter>::~unique_ptr(local_120);
local_10 = local_b8;
}
}
}
else {
if ((local_21 & 1) == 0) {
utf16_to_utf8(local_88);
uVar5 = std::__cxx11::string::c_str((string *)local_88);
/* try { // try from 0011d053 to 0011d06c has its CatchHandler @ 0011d07a */
ggml_log_internal(2,"%s: backend %s is not supported on this system\n","load_backend",uVar5)
;
std::__cxx11::string::~string((string *)local_88);
}
local_10 = (int *)0x0;
}
}
else {
if ((local_21 & 1) == 0) {
/* try { // try from 0011cf65 to 0011cf6d has its CatchHandler @ 0011cfa3 */
utf16_to_utf8(local_50);
uVar5 = std::__cxx11::string::c_str((string *)local_50);
/* try { // try from 0011cf7c to 0011cf95 has its CatchHandler @ 0011cfb4 */
ggml_log_internal(4,"%s: failed to load %s\n","load_backend",uVar5);
std::__cxx11::string::~string((string *)local_50);
}
local_10 = (int *)0x0;
}
local_60 = 1;
std::unique_ptr<void,dl_handle_deleter>::~unique_ptr(local_30);
return local_10;
}
| |
48,835 | ggml_backend_registry::load_backend(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&, bool) | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend-reg.cpp | ggml_backend_reg_t load_backend(const std::wstring & path, bool silent) {
dl_handle_ptr handle { dl_load_library(path) };
if (!handle) {
if (!silent) {
GGML_LOG_ERROR("%s: failed to load %s\n", __func__, utf16_to_utf8(path).c_str());
}
return nullptr;
}
auto score_fn = (ggml_backend_score_t) dl_get_sym(handle.get(), "ggml_backend_score");
if (score_fn && score_fn() == 0) {
if (!silent) {
GGML_LOG_INFO("%s: backend %s is not supported on this system\n", __func__, utf16_to_utf8(path).c_str());
}
return nullptr;
}
auto backend_init_fn = (ggml_backend_init_t) dl_get_sym(handle.get(), "ggml_backend_init");
if (!backend_init_fn) {
if (!silent) {
GGML_LOG_ERROR("%s: failed to find ggml_backend_init in %s\n", __func__, utf16_to_utf8(path).c_str());
}
return nullptr;
}
ggml_backend_reg_t reg = backend_init_fn();
if (!reg || reg->api_version != GGML_BACKEND_API_VERSION) {
if (!silent) {
if (!reg) {
GGML_LOG_ERROR("%s: failed to initialize backend from %s: ggml_backend_init returned NULL\n", __func__, utf16_to_utf8(path).c_str());
} else {
GGML_LOG_ERROR("%s: failed to initialize backend from %s: incompatible API version (backend: %d, current: %d)\n",
__func__, utf16_to_utf8(path).c_str(), reg->api_version, GGML_BACKEND_API_VERSION);
}
}
return nullptr;
}
GGML_LOG_INFO("%s: loaded %s backend from %s\n", __func__, ggml_backend_reg_name(reg), utf16_to_utf8(path).c_str());
register_backend(reg, std::move(handle));
return reg;
} | O1 | cpp | ggml_backend_registry::load_backend(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r15
movq %rsi, %rdi
callq 0x8787
movq %rax, %rbx
testq %rax, %rax
je 0x8a70
leaq 0x3907(%rip), %rsi # 0xc2ac
movq %rbx, %rdi
callq 0x6500
testq %rax, %rax
je 0x89bc
callq *%rax
testl %eax, %eax
je 0x8b24
leaq 0x392c(%rip), %rsi # 0xc2ef
movq %rbx, %rdi
callq 0x6500
testq %rax, %rax
je 0x8af0
callq *%rax
movq %rax, %r14
testq %rax, %rax
je 0x8aa7
cmpl $0x1, (%r14)
jne 0x8aa7
movq %r14, %rdi
callq 0x65c0
movq %rax, %r13
movq %rsp, %rdi
movq %r12, %rsi
callq 0x87d3
movq (%rsp), %r8
leaq 0x39ca(%rip), %rsi # 0xc3d7
leaq 0x3d2b(%rip), %rdx # 0xc73f
movl $0x2, %edi
movq %r13, %rcx
xorl %eax, %eax
callq 0x6220
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a3e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6540
leaq 0x20(%rsp), %rdx
movq %rbx, (%rdx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x6640
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8a60
callq 0x6420
movq $0x0, 0x20(%rsp)
xorl %ebx, %ebx
jmp 0x8b9b
testb %bpl, %bpl
jne 0x8b98
movq %rsp, %rdi
movq %r12, %rsi
callq 0x87d3
movq (%rsp), %rcx
leaq 0x3806(%rip), %rsi # 0xc295
leaq 0x3ca9(%rip), %rdx # 0xc73f
movl $0x4, %edi
xorl %eax, %eax
callq 0x6220
jmp 0x8b7d
testb %bpl, %bpl
jne 0x8b98
testq %r14, %r14
je 0x8b54
movq %rsp, %rdi
movq %r12, %rsi
callq 0x87d3
movq (%rsp), %rcx
movl (%r14), %r8d
leaq 0x38a6(%rip), %rsi # 0xc378
leaq 0x3c66(%rip), %rdx # 0xc73f
movl $0x4, %edi
movl $0x1, %r9d
xorl %eax, %eax
callq 0x6220
jmp 0x8b7d
testb %bpl, %bpl
jne 0x8b98
movq %rsp, %rdi
movq %r12, %rsi
callq 0x87d3
movq (%rsp), %rcx
leaq 0x37f2(%rip), %rsi # 0xc301
leaq 0x3c29(%rip), %rdx # 0xc73f
movl $0x4, %edi
xorl %eax, %eax
callq 0x6220
jmp 0x8b7d
testb %bpl, %bpl
jne 0x8b98
movq %rsp, %rdi
movq %r12, %rsi
callq 0x87d3
movq (%rsp), %rcx
leaq 0x3780(%rip), %rsi # 0xc2bf
leaq 0x3bf9(%rip), %rdx # 0xc73f
movl $0x2, %edi
xorl %eax, %eax
callq 0x6220
jmp 0x8b7d
movq %rsp, %rdi
movq %r12, %rsi
callq 0x87d3
movq (%rsp), %rcx
leaq 0x37c3(%rip), %rsi # 0xc32d
leaq 0x3bce(%rip), %rdx # 0xc73f
movl $0x4, %edi
xorl %eax, %eax
callq 0x6220
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8b98
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6540
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x8ba8
movq %rbx, %rdi
callq 0x6420
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8bed
jmp 0x8c11
jmp 0x8bed
jmp 0x8c11
jmp 0x8bed
jmp 0x8c11
jmp 0x8bed
jmp 0x8c11
movq %rax, %r14
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8bdc
callq 0x6420
movq $0x0, 0x20(%rsp)
xorl %ebx, %ebx
jmp 0x8c14
jmp 0x8bed
jmp 0x8c11
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8c14
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6540
jmp 0x8c14
jmp 0x8c11
jmp 0x8c11
movq %rax, %r14
testq %rbx, %rbx
je 0x8c21
movq %rbx, %rdi
callq 0x6420
movq %r14, %rdi
callq 0x67f0
nop
| _ZN21ggml_backend_registry12load_backendERKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, edx
mov r12, rsi
mov r15, rdi
mov rdi, rsi
call _ZL15dl_load_libraryRKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; dl_load_library(std::wstring const&)
mov rbx, rax
test rax, rax
jz loc_8A70
lea rsi, aGgmlBackendSco; "ggml_backend_score"
mov rdi, rbx
call _dlsym
test rax, rax
jz short loc_89BC
call rax
test eax, eax
jz loc_8B24
loc_89BC:
lea rsi, aGgmlBackendIni_2; "ggml_backend_init"
mov rdi, rbx
call _dlsym
test rax, rax
jz loc_8AF0
call rax
mov r14, rax
test rax, rax
jz loc_8AA7
cmp dword ptr [r14], 1
jnz loc_8AA7
mov rdi, r14
call _ggml_backend_reg_name
mov r13, rax
mov rdi, rsp
mov rsi, r12
call _ZL13utf16_to_utf8RKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; utf16_to_utf8(std::wstring const&)
mov r8, [rsp+58h+var_58]
lea rsi, aSLoadedSBacken; "%s: loaded %s backend from %s\n"
lea rdx, aUnloadBackend+2; "load_backend"
mov edi, 2
mov rcx, r13
xor eax, eax
call _ggml_log_internal
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8A3E
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8A3E:
lea rdx, [rsp+58h+var_38]
mov [rdx], rbx
mov rdi, r15
mov rsi, r14
call __ZN21ggml_backend_registry16register_backendEP16ggml_backend_regSt10unique_ptrIv17dl_handle_deleterE; ggml_backend_registry::register_backend(ggml_backend_reg *,std::unique_ptr<void,dl_handle_deleter>)
mov rdi, [rsp+58h+var_38]
test rdi, rdi
jz short loc_8A60
call _dlclose
loc_8A60:
mov [rsp+58h+var_38], 0
xor ebx, ebx
jmp loc_8B9B
loc_8A70:
test bpl, bpl
jnz loc_8B98
mov rdi, rsp
mov rsi, r12
call _ZL13utf16_to_utf8RKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; utf16_to_utf8(std::wstring const&)
mov rcx, [rsp+58h+var_58]
lea rsi, aSFailedToLoadS; "%s: failed to load %s\n"
lea rdx, aUnloadBackend+2; "load_backend"
mov edi, 4
xor eax, eax
call _ggml_log_internal
jmp loc_8B7D
loc_8AA7:
test bpl, bpl
jnz loc_8B98
test r14, r14
jz loc_8B54
mov rdi, rsp
mov rsi, r12
call _ZL13utf16_to_utf8RKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; utf16_to_utf8(std::wstring const&)
mov rcx, [rsp+58h+var_58]
mov r8d, [r14]
lea rsi, aSFailedToIniti; "%s: failed to initialize backend from %"...
lea rdx, aUnloadBackend+2; "load_backend"
mov edi, 4
mov r9d, 1
xor eax, eax
call _ggml_log_internal
jmp loc_8B7D
loc_8AF0:
test bpl, bpl
jnz loc_8B98
mov rdi, rsp
mov rsi, r12
call _ZL13utf16_to_utf8RKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; utf16_to_utf8(std::wstring const&)
mov rcx, [rsp+58h+var_58]
lea rsi, aSFailedToFindG_0; "%s: failed to find ggml_backend_init in"...
lea rdx, aUnloadBackend+2; "load_backend"
mov edi, 4
xor eax, eax
call _ggml_log_internal
jmp short loc_8B7D
loc_8B24:
test bpl, bpl
jnz short loc_8B98
mov rdi, rsp
mov rsi, r12
call _ZL13utf16_to_utf8RKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; utf16_to_utf8(std::wstring const&)
mov rcx, [rsp+58h+var_58]
lea rsi, aSBackendSIsNot; "%s: backend %s is not supported on this"...
lea rdx, aUnloadBackend+2; "load_backend"
mov edi, 2
xor eax, eax
call _ggml_log_internal
jmp short loc_8B7D
loc_8B54:
mov rdi, rsp
mov rsi, r12
call _ZL13utf16_to_utf8RKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; utf16_to_utf8(std::wstring const&)
mov rcx, [rsp+58h+var_58]
lea rsi, aSFailedToIniti_0; "%s: failed to initialize backend from %"...
lea rdx, aUnloadBackend+2; "load_backend"
mov edi, 4
xor eax, eax
call _ggml_log_internal
loc_8B7D:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8B98
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8B98:
xor r14d, r14d
loc_8B9B:
test rbx, rbx
jz short loc_8BA8
mov rdi, rbx
call _dlclose
loc_8BA8:
mov rax, r14
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_8BED
jmp short loc_8C11
jmp short loc_8BED
jmp short loc_8C11
jmp short loc_8BED
jmp short loc_8C11
jmp short loc_8BED
jmp short loc_8C11
mov r14, rax
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_8BDC
call _dlclose
loc_8BDC:
mov [rsp+arg_18], 0
xor ebx, ebx
jmp short loc_8C14
jmp short loc_8BED
jmp short loc_8C11
loc_8BED:
mov r14, rax
lea rax, [rsp+arg_8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8C14
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8C14
jmp short loc_8C11
jmp short $+2
loc_8C11:
mov r14, rax
loc_8C14:
test rbx, rbx
jz short loc_8C21
mov rdi, rbx
call _dlclose
loc_8C21:
mov rdi, r14
call __Unwind_Resume
| _DWORD * ggml_backend_registry::load_backend(int a1, _QWORD *a2, char a3)
{
long long library; // rax
long long v5; // rbx
unsigned int (*v6)(void); // rax
long long (*v7)(void); // rax
_DWORD *v8; // rax
_DWORD *v9; // r14
const char *v10; // r13
int v11; // ecx
int v12; // r8d
int v13; // r9d
void *v15[2]; // [rsp+0h] [rbp-58h] BYREF
_QWORD v16[2]; // [rsp+10h] [rbp-48h] BYREF
long long v17; // [rsp+20h] [rbp-38h] BYREF
library = dl_load_library((long long)a2);
v5 = library;
if ( !library )
{
if ( !a3 )
{
utf16_to_utf8((long long)v15, a2);
ggml_log_internal(4LL, "%s: failed to load %s\n", "load_backend", (const char *)v15[0]);
goto LABEL_22;
}
goto LABEL_24;
}
v6 = (unsigned int (*)(void))dlsym(library, "ggml_backend_score");
if ( v6 && !v6() )
{
if ( !a3 )
{
utf16_to_utf8((long long)v15, a2);
ggml_log_internal(2LL, "%s: backend %s is not supported on this system\n", "load_backend", (const char *)v15[0]);
goto LABEL_22;
}
LABEL_24:
v9 = 0LL;
goto LABEL_25;
}
v7 = (long long (*)(void))dlsym(v5, "ggml_backend_init");
if ( !v7 )
{
if ( !a3 )
{
utf16_to_utf8((long long)v15, a2);
ggml_log_internal(4LL, "%s: failed to find ggml_backend_init in %s\n", "load_backend", (const char *)v15[0]);
goto LABEL_22;
}
goto LABEL_24;
}
v8 = (_DWORD *)v7();
v9 = v8;
if ( !v8 || *v8 != 1 )
{
if ( !a3 )
{
if ( v8 )
{
utf16_to_utf8((long long)v15, a2);
ggml_log_internal(
4LL,
"%s: failed to initialize backend from %s: incompatible API version (backend: %d, current: %d)\n",
"load_backend",
(const char *)v15[0],
*v9,
1);
}
else
{
utf16_to_utf8((long long)v15, a2);
ggml_log_internal(
4LL,
"%s: failed to initialize backend from %s: ggml_backend_init returned NULL\n",
"load_backend",
(const char *)v15[0]);
}
LABEL_22:
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
goto LABEL_24;
}
goto LABEL_24;
}
v10 = (const char *)ggml_backend_reg_name(v8);
utf16_to_utf8((long long)v15, a2);
ggml_log_internal(2LL, "%s: loaded %s backend from %s\n", "load_backend", v10, (const char *)v15[0]);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
v17 = v5;
ggml_backend_registry::register_backend(a1, (_DWORD)v9, (unsigned int)&v17, v11, v12, v13);
if ( v17 )
dlclose(v17);
v17 = 0LL;
v5 = 0LL;
LABEL_25:
if ( v5 )
dlclose(v5);
return v9;
}
| load_backend:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,EDX
MOV R12,RSI
MOV R15,RDI
MOV RDI,RSI
CALL 0x00108787
MOV RBX,RAX
TEST RAX,RAX
JZ 0x00108a70
LEA RSI,[0x10c2ac]
MOV RDI,RBX
CALL 0x00106500
TEST RAX,RAX
JZ 0x001089bc
LAB_001089b2:
CALL RAX
TEST EAX,EAX
JZ 0x00108b24
LAB_001089bc:
LEA RSI,[0x10c2ef]
MOV RDI,RBX
CALL 0x00106500
TEST RAX,RAX
JZ 0x00108af0
LAB_001089d4:
CALL RAX
MOV R14,RAX
TEST RAX,RAX
JZ 0x00108aa7
CMP dword ptr [R14],0x1
JNZ 0x00108aa7
MOV RDI,R14
CALL 0x001065c0
LAB_001089f4:
MOV R13,RAX
MOV RDI,RSP
MOV RSI,R12
CALL 0x001087d3
MOV R8,qword ptr [RSP]
LAB_00108a06:
LEA RSI,[0x10c3d7]
LEA RDX,[0x10c73f]
MOV EDI,0x2
MOV RCX,R13
XOR EAX,EAX
CALL 0x00106220
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00108a3e
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00106540
LAB_00108a3e:
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RBX
LAB_00108a46:
MOV RDI,R15
MOV RSI,R14
CALL 0x00106640
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x00108a60
CALL 0x00106420
LAB_00108a60:
MOV qword ptr [RSP + 0x20],0x0
XOR EBX,EBX
JMP 0x00108b9b
LAB_00108a70:
TEST BPL,BPL
JNZ 0x00108b98
LAB_00108a79:
MOV RDI,RSP
MOV RSI,R12
CALL 0x001087d3
MOV RCX,qword ptr [RSP]
LAB_00108a88:
LEA RSI,[0x10c295]
LEA RDX,[0x10c73f]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x00106220
JMP 0x00108b7d
LAB_00108aa7:
TEST BPL,BPL
JNZ 0x00108b98
TEST R14,R14
JZ 0x00108b54
LAB_00108ab9:
MOV RDI,RSP
MOV RSI,R12
CALL 0x001087d3
MOV RCX,qword ptr [RSP]
MOV R8D,dword ptr [R14]
LAB_00108acb:
LEA RSI,[0x10c378]
LEA RDX,[0x10c73f]
MOV EDI,0x4
MOV R9D,0x1
XOR EAX,EAX
CALL 0x00106220
JMP 0x00108b7d
LAB_00108af0:
TEST BPL,BPL
JNZ 0x00108b98
LAB_00108af9:
MOV RDI,RSP
MOV RSI,R12
CALL 0x001087d3
MOV RCX,qword ptr [RSP]
LAB_00108b08:
LEA RSI,[0x10c301]
LEA RDX,[0x10c73f]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x00106220
JMP 0x00108b7d
LAB_00108b24:
TEST BPL,BPL
JNZ 0x00108b98
LAB_00108b29:
MOV RDI,RSP
MOV RSI,R12
CALL 0x001087d3
MOV RCX,qword ptr [RSP]
LAB_00108b38:
LEA RSI,[0x10c2bf]
LEA RDX,[0x10c73f]
MOV EDI,0x2
XOR EAX,EAX
CALL 0x00106220
JMP 0x00108b7d
LAB_00108b54:
MOV RDI,RSP
MOV RSI,R12
CALL 0x001087d3
MOV RCX,qword ptr [RSP]
LAB_00108b63:
LEA RSI,[0x10c32d]
LEA RDX,[0x10c73f]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x00106220
LAB_00108b7d:
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00108b98
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00106540
LAB_00108b98:
XOR R14D,R14D
LAB_00108b9b:
TEST RBX,RBX
JZ 0x00108ba8
MOV RDI,RBX
CALL 0x00106420
LAB_00108ba8:
MOV RAX,R14
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ggml_backend_registry::load_backend(std::__cxx11::wstring const&, bool) */
int * __thiscall
ggml_backend_registry::load_backend(ggml_backend_registry *this,wstring *param_1,bool param_2)
{
int iVar1;
long lVar2;
code *pcVar3;
int *piVar4;
int8 uVar5;
long *local_58 [2];
long local_48 [2];
long local_38;
lVar2 = dl_load_library(param_1);
if (lVar2 == 0) {
if (!param_2) {
/* try { // try from 00108a79 to 00108a83 has its CatchHandler @ 00108c0d */
utf16_to_utf8((wstring *)local_58);
/* try { // try from 00108a88 to 00108aa1 has its CatchHandler @ 00108bed */
ggml_log_internal(4,"%s: failed to load %s\n","load_backend",local_58[0]);
LAB_00108b7d:
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
}
}
else {
pcVar3 = (code *)dlsym(lVar2,"ggml_backend_score");
if (pcVar3 != (code *)0x0) {
/* try { // try from 001089b2 to 001089b3 has its CatchHandler @ 00108c0f */
iVar1 = (*pcVar3)();
if (iVar1 == 0) {
if (!param_2) {
/* try { // try from 00108b29 to 00108b33 has its CatchHandler @ 00108bc4 */
utf16_to_utf8((wstring *)local_58);
/* try { // try from 00108b38 to 00108b51 has its CatchHandler @ 00108bc2 */
ggml_log_internal(2,"%s: backend %s is not supported on this system\n","load_backend",
local_58[0]);
goto LAB_00108b7d;
}
goto LAB_00108b98;
}
}
pcVar3 = (code *)dlsym(lVar2,"ggml_backend_init");
if (pcVar3 == (code *)0x0) {
if (!param_2) {
/* try { // try from 00108af9 to 00108b03 has its CatchHandler @ 00108bc8 */
utf16_to_utf8((wstring *)local_58);
/* try { // try from 00108b08 to 00108b21 has its CatchHandler @ 00108bc6 */
ggml_log_internal(4,"%s: failed to find ggml_backend_init in %s\n","load_backend",
local_58[0]);
goto LAB_00108b7d;
}
}
else {
/* try { // try from 001089d4 to 001089f3 has its CatchHandler @ 00108c11 */
piVar4 = (int *)(*pcVar3)();
if ((piVar4 != (int *)0x0) && (*piVar4 == 1)) {
uVar5 = ggml_backend_reg_name(piVar4);
/* try { // try from 001089f4 to 00108a01 has its CatchHandler @ 00108beb */
utf16_to_utf8((wstring *)local_58);
/* try { // try from 00108a06 to 00108a22 has its CatchHandler @ 00108be9 */
ggml_log_internal(2,"%s: loaded %s backend from %s\n","load_backend",uVar5,local_58[0]);
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
local_38 = lVar2;
/* try { // try from 00108a46 to 00108a50 has its CatchHandler @ 00108bca */
register_backend(this,piVar4);
if (local_38 != 0) {
dlclose();
}
local_38 = 0;
lVar2 = 0;
goto LAB_00108b9b;
}
if (!param_2) {
if (piVar4 == (int *)0x0) {
/* try { // try from 00108b54 to 00108b5e has its CatchHandler @ 00108bbc */
utf16_to_utf8((wstring *)local_58);
/* try { // try from 00108b63 to 00108b7c has its CatchHandler @ 00108bba */
ggml_log_internal(4,
"%s: failed to initialize backend from %s: ggml_backend_init returned NULL\n"
,"load_backend",local_58[0]);
}
else {
/* try { // try from 00108ab9 to 00108ac3 has its CatchHandler @ 00108bc0 */
utf16_to_utf8((wstring *)local_58);
/* try { // try from 00108acb to 00108aea has its CatchHandler @ 00108bbe */
ggml_log_internal(4,
"%s: failed to initialize backend from %s: incompatible API version (backend: %d, current: %d)\n"
,"load_backend",local_58[0],*piVar4,1);
}
goto LAB_00108b7d;
}
}
}
LAB_00108b98:
piVar4 = (int *)0x0;
LAB_00108b9b:
if (lVar2 != 0) {
dlclose(lVar2);
}
return piVar4;
}
| |
48,836 | js_typed_array_fill | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_fill(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSObject *p;
int len, k, final, shift;
uint64_t v64;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (typed_array_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
len = p->u.array.count;
if (p->class_id == JS_CLASS_UINT8C_ARRAY) {
int32_t v;
if (JS_ToUint8ClampFree(ctx, &v, js_dup(argv[0])))
return JS_EXCEPTION;
v64 = v;
} else if (p->class_id <= JS_CLASS_UINT32_ARRAY) {
uint32_t v;
if (JS_ToUint32(ctx, &v, argv[0]))
return JS_EXCEPTION;
v64 = v;
} else
if (p->class_id <= JS_CLASS_BIG_UINT64_ARRAY) {
if (JS_ToBigInt64(ctx, (int64_t *)&v64, argv[0]))
return JS_EXCEPTION;
} else {
double d;
if (JS_ToFloat64(ctx, &d, argv[0]))
return JS_EXCEPTION;
if (p->class_id == JS_CLASS_FLOAT16_ARRAY) {
v64 = tofp16(d);
} else if (p->class_id == JS_CLASS_FLOAT32_ARRAY) {
union {
float f;
uint32_t u32;
} u;
u.f = d;
v64 = u.u32;
} else {
JSFloat64Union u;
u.d = d;
v64 = u.u64;
}
}
k = 0;
if (argc > 1) {
if (JS_ToInt32Clamp(ctx, &k, argv[1], 0, len, len))
return JS_EXCEPTION;
}
final = len;
if (argc > 2 && !JS_IsUndefined(argv[2])) {
if (JS_ToInt32Clamp(ctx, &final, argv[2], 0, len, len))
return JS_EXCEPTION;
}
if (typed_array_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
// RAB may have been resized by evil .valueOf method
final = min_int(final, p->u.array.count);
shift = typed_array_size_log2(p->class_id);
switch(shift) {
case 0:
if (k < final) {
memset(p->u.array.u.uint8_ptr + k, v64, final - k);
}
break;
case 1:
for(; k < final; k++) {
p->u.array.u.uint16_ptr[k] = v64;
}
break;
case 2:
for(; k < final; k++) {
p->u.array.u.uint32_ptr[k] = v64;
}
break;
case 3:
for(; k < final; k++) {
p->u.array.u.uint64_ptr[k] = v64;
}
break;
default:
abort();
}
return js_dup(this_val);
} | O1 | c | js_typed_array_fill:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r13
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq %rsi, 0x18(%rsp)
cmpl $-0x1, %ebx
jne 0x80fe8
movq 0x18(%rsp), %r15
movzwl 0x6(%r15), %eax
addl $-0x15, %eax
cmpw $0xc, %ax
jb 0x80ffc
leaq 0x21422(%rip), %rsi # 0xa2411
xorl %r15d, %r15d
movq %r12, %rdi
xorl %eax, %eax
callq 0x22567
testq %r15, %r15
je 0x811ee
movq %r15, %rdi
callq 0x396c4
testl %eax, %eax
je 0x81029
leaq 0x2140a(%rip), %rsi # 0xa2422
xorl %ebp, %ebp
movq %r12, %rdi
xorl %eax, %eax
callq 0x22567
jmp 0x811f0
movl 0x40(%r15), %eax
movl %eax, 0x2c(%rsp)
movzwl 0x6(%r15), %eax
cmpw $0x15, %ax
jne 0x81071
movq (%r13), %rdx
movq 0x8(%r13), %rcx
movq %rdx, 0x18(%rsp)
cmpl $-0x9, %ecx
jb 0x81055
movq 0x18(%rsp), %rax
incl (%rax)
leaq 0x14(%rsp), %rsi
movq %r12, %rdi
callq 0x3dc0c
testl %eax, %eax
jne 0x811ee
movslq 0x14(%rsp), %rax
jmp 0x810ad
cmpw $0x1b, %ax
ja 0x811a0
movq (%r13), %rdx
movq 0x8(%r13), %rcx
movq %rdx, 0x18(%rsp)
cmpl $-0x9, %ecx
jb 0x81094
movq 0x18(%rsp), %rax
incl (%rax)
leaq 0x14(%rsp), %rsi
movq %r12, %rdi
callq 0x279c3
testl %eax, %eax
jne 0x811ee
movl 0x14(%rsp), %eax
movq %rax, 0x20(%rsp)
movl $0x0, 0x14(%rsp)
movl %ebp, 0x34(%rsp)
cmpl $0x2, %ebp
jl 0x810ee
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
movl 0x2c(%rsp), %r9d
movl %r9d, (%rsp)
leaq 0x14(%rsp), %rsi
xorl %ebp, %ebp
movq %r12, %rdi
xorl %r8d, %r8d
callq 0x27756
testl %eax, %eax
jne 0x811f0
movl 0x2c(%rsp), %eax
movl %eax, 0x30(%rsp)
cmpl $0x3, 0x34(%rsp)
jl 0x8112d
movq 0x28(%r13), %rcx
cmpl $0x3, %ecx
je 0x8112d
movq 0x20(%r13), %rdx
movl 0x2c(%rsp), %r9d
movl %r9d, (%rsp)
leaq 0x30(%rsp), %rsi
xorl %ebp, %ebp
movq %r12, %rdi
xorl %r8d, %r8d
callq 0x27756
testl %eax, %eax
jne 0x811f0
movq %r15, %rdi
callq 0x396c4
testl %eax, %eax
jne 0x81011
movl 0x30(%rsp), %ecx
movl 0x40(%r15), %eax
cmpl %eax, %ecx
cmovll %ecx, %eax
movl %eax, 0x30(%rsp)
movzwl 0x6(%r15), %ecx
leaq 0x1c785(%rip), %rdx # 0x9d8df
movzbl -0x15(%rcx,%rdx), %ecx
cmpq $0x3, %rcx
ja 0x812e4
leaq 0x1c61c(%rip), %rdx # 0x9d78c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movslq 0x14(%rsp), %rcx
cmpl %ecx, %eax
jle 0x812a5
movq %rcx, %rdi
addq 0x38(%r15), %rdi
subl %ecx, %eax
movslq %eax, %rdx
movl 0x20(%rsp), %esi
callq 0xe350
jmp 0x812a5
cmpw $0x1d, %ax
ja 0x811d5
movq (%r13), %rdx
movq 0x8(%r13), %rcx
movq %rdx, 0x18(%rsp)
cmpl $-0x9, %ecx
jb 0x811bf
movq 0x18(%rsp), %rax
incl (%rax)
leaq 0x20(%rsp), %rsi
movq %r12, %rdi
callq 0x283d8
testl %eax, %eax
jne 0x811ee
jmp 0x810b2
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x18(%rsp), %rsi
movq %r12, %rdi
callq 0x27681
testl %eax, %eax
je 0x8120f
xorl %ebp, %ebp
xorl %eax, %eax
movl $0x6, %ebx
orq %rax, %rbp
movq %rbp, %rax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzwl 0x6(%r15), %eax
cmpl $0x1f, %eax
je 0x812cb
cmpl $0x1e, %eax
jne 0x812da
movsd 0x18(%rsp), %xmm0
callq 0x3dc9e
movzwl %ax, %eax
jmp 0x810ad
movl 0x14(%rsp), %ecx
cmpl %eax, %ecx
jge 0x812a1
movslq %ecx, %rcx
movl 0x20(%rsp), %edx
cltq
movq 0x38(%r15), %rsi
movl %edx, (%rsi,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x8124a
jmp 0x812a1
movl 0x14(%rsp), %ecx
cmpl %eax, %ecx
jge 0x812a1
movslq %ecx, %rcx
cltq
movq 0x20(%rsp), %rdx
movq 0x38(%r15), %rsi
movq %rdx, (%rsi,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x81268
jmp 0x812a1
movl 0x14(%rsp), %ecx
cmpl %eax, %ecx
jge 0x812a1
movslq %ecx, %rcx
movzwl 0x20(%rsp), %edx
cltq
movq 0x38(%r15), %rsi
movw %dx, (%rsi,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x81291
movl %ecx, 0x14(%rsp)
movq %r14, 0x18(%rsp)
cmpl $-0x9, %ebx
jb 0x812b6
movq 0x18(%rsp), %rax
incl (%rax)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %r14, %rax
movl %r14d, %ebp
jmp 0x811f7
cvtsd2ss 0x18(%rsp), %xmm0
movd %xmm0, %eax
jmp 0x810ad
movq 0x18(%rsp), %rax
jmp 0x810ad
callq 0xe090
| js_typed_array_fill:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13, r8
mov ebp, ecx
mov rbx, rdx
mov r14, rsi
mov r12, rdi
mov [rsp+68h+var_50], rsi
cmp ebx, 0FFFFFFFFh
jnz short loc_80FE8
mov r15, [rsp+68h+var_50]
movzx eax, word ptr [r15+6]
add eax, 0FFFFFFEBh
cmp ax, 0Ch
jb short loc_80FFC
loc_80FE8:
lea rsi, aNotATypedarray; "not a TypedArray"
xor r15d, r15d
mov rdi, r12
xor eax, eax
call JS_ThrowTypeError
loc_80FFC:
test r15, r15
jz loc_811EE
mov rdi, r15
call typed_array_is_oob
test eax, eax
jz short loc_81029
loc_81011:
lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized"
xor ebp, ebp
mov rdi, r12
xor eax, eax
call JS_ThrowTypeError
jmp loc_811F0
loc_81029:
mov eax, [r15+40h]
mov [rsp+68h+var_3C], eax
movzx eax, word ptr [r15+6]
cmp ax, 15h
jnz short loc_81071
mov rdx, [r13+0]
mov rcx, [r13+8]
mov [rsp+68h+var_50], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_81055
mov rax, [rsp+68h+var_50]
inc dword ptr [rax]
loc_81055:
lea rsi, [rsp+68h+var_54]
mov rdi, r12
call JS_ToUint8ClampFree
test eax, eax
jnz loc_811EE
movsxd rax, [rsp+68h+var_54]
jmp short loc_810AD
loc_81071:
cmp ax, 1Bh
ja loc_811A0
mov rdx, [r13+0]
mov rcx, [r13+8]
mov [rsp+68h+var_50], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_81094
mov rax, [rsp+68h+var_50]
inc dword ptr [rax]
loc_81094:
lea rsi, [rsp+68h+var_54]
mov rdi, r12
call JS_ToInt32Free
test eax, eax
jnz loc_811EE
mov eax, [rsp+68h+var_54]
loc_810AD:
mov [rsp+68h+var_48], rax
loc_810B2:
mov [rsp+68h+var_54], 0
mov [rsp+68h+var_34], ebp
cmp ebp, 2
jl short loc_810EE
mov rdx, [r13+10h]
mov rcx, [r13+18h]
mov r9d, [rsp+68h+var_3C]
mov [rsp+68h+var_68], r9d
lea rsi, [rsp+68h+var_54]
xor ebp, ebp
mov rdi, r12
xor r8d, r8d
call JS_ToInt32Clamp
test eax, eax
jnz loc_811F0
loc_810EE:
mov eax, [rsp+68h+var_3C]
mov [rsp+68h+var_38], eax
cmp [rsp+68h+var_34], 3
jl short loc_8112D
mov rcx, [r13+28h]
cmp ecx, 3
jz short loc_8112D
mov rdx, [r13+20h]
mov r9d, [rsp+68h+var_3C]
mov [rsp+68h+var_68], r9d
lea rsi, [rsp+68h+var_38]
xor ebp, ebp
mov rdi, r12
xor r8d, r8d
call JS_ToInt32Clamp
test eax, eax
jnz loc_811F0
loc_8112D:
mov rdi, r15
call typed_array_is_oob
test eax, eax
jnz loc_81011
mov ecx, [rsp+68h+var_38]
mov eax, [r15+40h]
cmp ecx, eax
cmovl eax, ecx
mov [rsp+68h+var_38], eax
movzx ecx, word ptr [r15+6]
lea rdx, typed_array_size_log2
movzx ecx, byte ptr [rcx+rdx-15h]
cmp rcx, 3
ja loc_812E4
lea rdx, jpt_81177
movsxd rcx, ds:(jpt_81177 - 9D78Ch)[rdx+rcx*4]; switch 4 cases
add rcx, rdx
jmp rcx; switch jump
loc_81179:
movsxd rcx, [rsp+68h+var_54]; jumptable 0000000000081177 case 0
cmp eax, ecx
jle loc_812A5
mov rdi, rcx
add rdi, [r15+38h]
sub eax, ecx
movsxd rdx, eax
mov esi, dword ptr [rsp+68h+var_48]
call _memset
jmp loc_812A5
loc_811A0:
cmp ax, 1Dh
ja short loc_811D5
mov rdx, [r13+0]
mov rcx, [r13+8]
mov [rsp+68h+var_50], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_811BF
mov rax, [rsp+68h+var_50]
inc dword ptr [rax]
loc_811BF:
lea rsi, [rsp+68h+var_48]
mov rdi, r12
call JS_ToBigInt64Free
test eax, eax
jnz short loc_811EE
jmp loc_810B2
loc_811D5:
mov rdx, [r13+0]
mov rcx, [r13+8]
lea rsi, [rsp+68h+var_50]
mov rdi, r12
call JS_ToFloat64
test eax, eax
jz short loc_8120F
loc_811EE:
xor ebp, ebp
loc_811F0:
xor eax, eax
mov ebx, 6
loc_811F7:
or rbp, rax
mov rax, rbp
mov rdx, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8120F:
movzx eax, word ptr [r15+6]
cmp eax, 1Fh
jz loc_812CB
cmp eax, 1Eh
jnz loc_812DA
movsd xmm0, [rsp+68h+var_50]
call tofp16
movzx eax, ax
jmp loc_810AD
loc_81239:
mov ecx, [rsp+68h+var_54]; jumptable 0000000000081177 case 2
cmp ecx, eax
jge short loc_812A1
movsxd rcx, ecx
mov edx, dword ptr [rsp+68h+var_48]
cdqe
loc_8124A:
mov rsi, [r15+38h]
mov [rsi+rcx*4], edx
inc rcx
cmp rax, rcx
jnz short loc_8124A
jmp short loc_812A1
loc_8125B:
mov ecx, [rsp+68h+var_54]; jumptable 0000000000081177 case 3
cmp ecx, eax
jge short loc_812A1
movsxd rcx, ecx
cdqe
loc_81268:
mov rdx, [rsp+68h+var_48]
mov rsi, [r15+38h]
mov [rsi+rcx*8], rdx
inc rcx
cmp rax, rcx
jnz short loc_81268
jmp short loc_812A1
loc_8127F:
mov ecx, [rsp+68h+var_54]; jumptable 0000000000081177 case 1
cmp ecx, eax
jge short loc_812A1
movsxd rcx, ecx
movzx edx, word ptr [rsp+68h+var_48]
cdqe
loc_81291:
mov rsi, [r15+38h]
mov [rsi+rcx*2], dx
inc rcx
cmp rax, rcx
jnz short loc_81291
loc_812A1:
mov [rsp+68h+var_54], ecx
loc_812A5:
mov [rsp+68h+var_50], r14
cmp ebx, 0FFFFFFF7h
jb short loc_812B6
mov rax, [rsp+68h+var_50]
inc dword ptr [rax]
loc_812B6:
mov rax, 0FFFFFFFF00000000h
and rax, r14
mov ebp, r14d
jmp loc_811F7
loc_812CB:
cvtsd2ss xmm0, [rsp+68h+var_50]
movd eax, xmm0
jmp loc_810AD
loc_812DA:
mov rax, [rsp+68h+var_50]
jmp loc_810AD
loc_812E4:
call _abort
| unsigned long long js_typed_array_fill(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v15; // ebp
unsigned int v16; // ebx
long long v17; // r15
long long v18; // rdx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
long long v24; // rbp
unsigned __int16 v25; // ax
double v26; // rdx
long long v27; // rcx
double v28; // rax
unsigned long long v29; // rdx
long long v30; // rcx
long long v31; // rcx
int v32; // eax
long long v33; // rcx
unsigned long long v34; // rax
int v36; // eax
long long v37; // rcx
int v38; // edx
__int16 v39; // dx
char v40; // [rsp+0h] [rbp-68h]
int v41; // [rsp+14h] [rbp-54h] BYREF
double v42; // [rsp+18h] [rbp-50h] BYREF
double v43; // [rsp+20h] [rbp-48h] BYREF
int v44; // [rsp+2Ch] [rbp-3Ch]
int v45; // [rsp+30h] [rbp-38h] BYREF
int v46; // [rsp+34h] [rbp-34h]
v15 = a4;
v16 = a3;
v42 = *(double *)&a2;
if ( (_DWORD)a3 != -1 || (v17 = *(_QWORD *)&v42, (unsigned __int16)(*(_WORD *)(*(_QWORD *)&v42 + 6LL) - 21) >= 0xCu) )
{
v17 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a TypedArray", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v40);
}
if ( !v17 )
goto LABEL_36;
if ( typed_array_is_oob(v17) )
{
LABEL_6:
v24 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"ArrayBuffer is detached or resized",
v18,
v19,
v20,
v21,
a7,
a8,
a9,
a10,
v22,
v23,
a13,
a14,
v40);
LABEL_37:
v34 = 0LL;
return v34 | v24;
}
v44 = *(_DWORD *)(v17 + 64);
v25 = *(_WORD *)(v17 + 6);
if ( v25 == 21 )
{
v26 = *(double *)a5;
v27 = *(_QWORD *)(a5 + 8);
v42 = *(double *)a5;
if ( (unsigned int)v27 >= 0xFFFFFFF7 )
++**(_DWORD **)&v42;
if ( !(unsigned int)JS_ToUint8ClampFree(a1, &v41, *(long long *)&v26, v27) )
{
*(_QWORD *)&v28 = v41;
LABEL_17:
v43 = v28;
goto LABEL_18;
}
goto LABEL_36;
}
if ( v25 <= 0x1Bu )
{
v29 = *(_QWORD *)a5;
v30 = *(_QWORD *)(a5 + 8);
v42 = *(double *)a5;
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
++**(_DWORD **)&v42;
if ( !(unsigned int)JS_ToInt32Free(a1, &v41, v29, v30) )
{
*(_QWORD *)&v28 = (unsigned int)v41;
goto LABEL_17;
}
LABEL_36:
v24 = 0LL;
goto LABEL_37;
}
if ( v25 > 0x1Du )
{
if ( !(unsigned int)JS_ToFloat64(a1, &v42, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
v36 = *(unsigned __int16 *)(v17 + 6);
if ( v36 == 31 )
{
a7.m128_f32[0] = v42;
*(_QWORD *)&v28 = (unsigned int)_mm_cvtsi128_si32((__m128i)a7);
}
else if ( v36 == 30 )
{
a7 = (__m128)*(unsigned long long *)&v42;
*(_QWORD *)&v28 = (unsigned __int16)tofp16(v42);
}
else
{
v28 = v42;
}
goto LABEL_17;
}
goto LABEL_36;
}
v33 = *(_QWORD *)(a5 + 8);
v42 = *(double *)a5;
if ( (unsigned int)v33 >= 0xFFFFFFF7 )
++**(_DWORD **)&v42;
if ( (unsigned int)JS_ToBigInt64Free(a1, &v43) )
goto LABEL_36;
LABEL_18:
v41 = 0;
v46 = v15;
if ( v15 >= 2 )
{
v24 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(a1, &v41, *(_DWORD **)(a5 + 16), *(_QWORD *)(a5 + 24), 0, v44, v44) )
goto LABEL_37;
}
v45 = v44;
if ( v46 >= 3 )
{
v31 = *(_QWORD *)(a5 + 40);
if ( (_DWORD)v31 != 3 )
{
v24 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(a1, &v45, *(_DWORD **)(a5 + 32), v31, 0, v44, v44) )
goto LABEL_37;
}
}
if ( typed_array_is_oob(v17) )
goto LABEL_6;
v32 = *(_DWORD *)(v17 + 64);
if ( v45 < v32 )
v32 = v45;
v45 = v32;
if ( (unsigned __int8)typed_array_size_log2[*(unsigned __int16 *)(v17 + 6) - 21] > 3uLL )
abort((const char *)v17);
switch ( typed_array_size_log2[*(unsigned __int16 *)(v17 + 6) - 21] )
{
case 0:
if ( v32 > v41 )
memset(*(_QWORD *)(v17 + 56) + v41, LODWORD(v43), v32 - v41);
goto LABEL_54;
case 1:
LODWORD(v37) = v41;
if ( v41 < v32 )
{
v37 = v41;
v39 = LOWORD(v43);
do
*(_WORD *)(*(_QWORD *)(v17 + 56) + 2 * v37++) = v39;
while ( v32 != v37 );
}
goto LABEL_53;
case 2:
LODWORD(v37) = v41;
if ( v41 < v32 )
{
v37 = v41;
v38 = LODWORD(v43);
do
*(_DWORD *)(*(_QWORD *)(v17 + 56) + 4 * v37++) = v38;
while ( v32 != v37 );
}
goto LABEL_53;
case 3:
LODWORD(v37) = v41;
if ( v41 < v32 )
{
v37 = v41;
do
*(double *)(*(_QWORD *)(v17 + 56) + 8 * v37++) = v43;
while ( v32 != v37 );
}
LABEL_53:
v41 = v37;
LABEL_54:
v42 = *(double *)&a2;
if ( v16 >= 0xFFFFFFF7 )
++**(_DWORD **)&v42;
v34 = a2 & 0xFFFFFFFF00000000LL;
v24 = (unsigned int)a2;
break;
}
return v34 | v24;
}
| js_typed_array_fill:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R13,R8
MOV EBP,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R12,RDI
MOV qword ptr [RSP + 0x18],RSI
CMP EBX,-0x1
JNZ 0x00180fe8
MOV R15,qword ptr [RSP + 0x18]
MOVZX EAX,word ptr [R15 + 0x6]
ADD EAX,-0x15
CMP AX,0xc
JC 0x00180ffc
LAB_00180fe8:
LEA RSI,[0x1a2411]
XOR R15D,R15D
MOV RDI,R12
XOR EAX,EAX
CALL 0x00122567
LAB_00180ffc:
TEST R15,R15
JZ 0x001811ee
MOV RDI,R15
CALL 0x001396c4
TEST EAX,EAX
JZ 0x00181029
LAB_00181011:
LEA RSI,[0x1a2422]
XOR EBP,EBP
MOV RDI,R12
XOR EAX,EAX
CALL 0x00122567
JMP 0x001811f0
LAB_00181029:
MOV EAX,dword ptr [R15 + 0x40]
MOV dword ptr [RSP + 0x2c],EAX
MOVZX EAX,word ptr [R15 + 0x6]
CMP AX,0x15
JNZ 0x00181071
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
MOV qword ptr [RSP + 0x18],RDX
CMP ECX,-0x9
JC 0x00181055
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
LAB_00181055:
LEA RSI,[RSP + 0x14]
MOV RDI,R12
CALL 0x0013dc0c
TEST EAX,EAX
JNZ 0x001811ee
MOVSXD RAX,dword ptr [RSP + 0x14]
JMP 0x001810ad
LAB_00181071:
CMP AX,0x1b
JA 0x001811a0
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
MOV qword ptr [RSP + 0x18],RDX
CMP ECX,-0x9
JC 0x00181094
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
LAB_00181094:
LEA RSI,[RSP + 0x14]
MOV RDI,R12
CALL 0x001279c3
TEST EAX,EAX
JNZ 0x001811ee
MOV EAX,dword ptr [RSP + 0x14]
LAB_001810ad:
MOV qword ptr [RSP + 0x20],RAX
LAB_001810b2:
MOV dword ptr [RSP + 0x14],0x0
MOV dword ptr [RSP + 0x34],EBP
CMP EBP,0x2
JL 0x001810ee
MOV RDX,qword ptr [R13 + 0x10]
MOV RCX,qword ptr [R13 + 0x18]
MOV R9D,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP],R9D
LEA RSI,[RSP + 0x14]
XOR EBP,EBP
MOV RDI,R12
XOR R8D,R8D
CALL 0x00127756
TEST EAX,EAX
JNZ 0x001811f0
LAB_001810ee:
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x30],EAX
CMP dword ptr [RSP + 0x34],0x3
JL 0x0018112d
MOV RCX,qword ptr [R13 + 0x28]
CMP ECX,0x3
JZ 0x0018112d
MOV RDX,qword ptr [R13 + 0x20]
MOV R9D,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP],R9D
LEA RSI,[RSP + 0x30]
XOR EBP,EBP
MOV RDI,R12
XOR R8D,R8D
CALL 0x00127756
TEST EAX,EAX
JNZ 0x001811f0
LAB_0018112d:
MOV RDI,R15
CALL 0x001396c4
TEST EAX,EAX
JNZ 0x00181011
MOV ECX,dword ptr [RSP + 0x30]
MOV EAX,dword ptr [R15 + 0x40]
CMP ECX,EAX
CMOVL EAX,ECX
MOV dword ptr [RSP + 0x30],EAX
MOVZX ECX,word ptr [R15 + 0x6]
LEA RDX,[0x19d8df]
MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x15]
CMP RCX,0x3
JA 0x001812e4
LEA RDX,[0x19d78c]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_0:
MOVSXD RCX,dword ptr [RSP + 0x14]
CMP EAX,ECX
JLE 0x001812a5
MOV RDI,RCX
ADD RDI,qword ptr [R15 + 0x38]
SUB EAX,ECX
MOVSXD RDX,EAX
MOV ESI,dword ptr [RSP + 0x20]
CALL 0x0010e350
JMP 0x001812a5
LAB_001811a0:
CMP AX,0x1d
JA 0x001811d5
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
MOV qword ptr [RSP + 0x18],RDX
CMP ECX,-0x9
JC 0x001811bf
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
LAB_001811bf:
LEA RSI,[RSP + 0x20]
MOV RDI,R12
CALL 0x001283d8
TEST EAX,EAX
JNZ 0x001811ee
JMP 0x001810b2
LAB_001811d5:
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
LEA RSI,[RSP + 0x18]
MOV RDI,R12
CALL 0x00127681
TEST EAX,EAX
JZ 0x0018120f
LAB_001811ee:
XOR EBP,EBP
LAB_001811f0:
XOR EAX,EAX
MOV EBX,0x6
LAB_001811f7:
OR RBP,RAX
MOV RAX,RBP
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018120f:
MOVZX EAX,word ptr [R15 + 0x6]
CMP EAX,0x1f
JZ 0x001812cb
CMP EAX,0x1e
JNZ 0x001812da
MOVSD XMM0,qword ptr [RSP + 0x18]
CALL 0x0013dc9e
MOVZX EAX,AX
JMP 0x001810ad
caseD_2:
MOV ECX,dword ptr [RSP + 0x14]
CMP ECX,EAX
JGE 0x001812a1
MOVSXD RCX,ECX
MOV EDX,dword ptr [RSP + 0x20]
CDQE
LAB_0018124a:
MOV RSI,qword ptr [R15 + 0x38]
MOV dword ptr [RSI + RCX*0x4],EDX
INC RCX
CMP RAX,RCX
JNZ 0x0018124a
JMP 0x001812a1
caseD_3:
MOV ECX,dword ptr [RSP + 0x14]
CMP ECX,EAX
JGE 0x001812a1
MOVSXD RCX,ECX
CDQE
LAB_00181268:
MOV RDX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [R15 + 0x38]
MOV qword ptr [RSI + RCX*0x8],RDX
INC RCX
CMP RAX,RCX
JNZ 0x00181268
JMP 0x001812a1
caseD_1:
MOV ECX,dword ptr [RSP + 0x14]
CMP ECX,EAX
JGE 0x001812a1
MOVSXD RCX,ECX
MOVZX EDX,word ptr [RSP + 0x20]
CDQE
LAB_00181291:
MOV RSI,qword ptr [R15 + 0x38]
MOV word ptr [RSI + RCX*0x2],DX
INC RCX
CMP RAX,RCX
JNZ 0x00181291
LAB_001812a1:
MOV dword ptr [RSP + 0x14],ECX
LAB_001812a5:
MOV qword ptr [RSP + 0x18],R14
CMP EBX,-0x9
JC 0x001812b6
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
LAB_001812b6:
MOV RAX,-0x100000000
AND RAX,R14
MOV EBP,R14D
JMP 0x001811f7
LAB_001812cb:
CVTSD2SS XMM0,qword ptr [RSP + 0x18]
MOVD EAX,XMM0
JMP 0x001810ad
LAB_001812da:
MOV RAX,qword ptr [RSP + 0x18]
JMP 0x001810ad
default:
CALL 0x0010e090
|
int1 [16]
js_typed_array_fill(int8 param_1,int *param_2,int8 param_3,int param_4,
int8 *param_5)
{
ushort uVar1;
int iVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
int *piVar6;
int1 auVar7 [16];
uint local_54;
int *local_50;
int *local_48;
int local_3c;
int local_38;
int local_34;
local_50 = param_2;
if (((uint)param_3 != 0xffffffff) ||
(piVar6 = param_2, 0xb < (ushort)(*(short *)((long)param_2 + 6) - 0x15U))) {
piVar6 = (int *)0x0;
JS_ThrowTypeError(param_1,"not a TypedArray");
}
if (piVar6 != (int *)0x0) {
iVar2 = typed_array_is_oob(piVar6);
if (iVar2 == 0) {
local_3c = piVar6[0x10];
uVar1 = *(ushort *)((long)piVar6 + 6);
if (uVar1 == 0x15) {
local_50 = (int *)*param_5;
if (0xfffffff6 < (uint)param_5[1]) {
*local_50 = *local_50 + 1;
}
iVar2 = JS_ToUint8ClampFree(param_1,&local_54);
if (iVar2 == 0) {
local_48 = (int *)(long)(int)local_54;
goto LAB_001810b2;
}
}
else if (uVar1 < 0x1c) {
local_50 = (int *)*param_5;
if (0xfffffff6 < (uint)param_5[1]) {
*local_50 = *local_50 + 1;
}
iVar2 = JS_ToInt32Free(param_1,&local_54);
if (iVar2 == 0) {
local_48 = (int *)(ulong)local_54;
goto LAB_001810b2;
}
}
else if (uVar1 < 0x1e) {
local_50 = (int *)*param_5;
if (0xfffffff6 < (uint)param_5[1]) {
*local_50 = *local_50 + 1;
}
iVar2 = JS_ToBigInt64Free(param_1,&local_48);
if (iVar2 == 0) {
LAB_001810b2:
local_54 = 0;
local_34 = param_4;
if (((param_4 < 2) ||
(iVar2 = JS_ToInt32Clamp(param_1,&local_54,param_5[2],param_5[3],0,local_3c,local_3c),
iVar2 == 0)) &&
((local_38 = local_3c, local_34 < 3 ||
(((int)param_5[5] == 3 ||
(iVar2 = JS_ToInt32Clamp(param_1,&local_38,param_5[4],param_5[5],0,local_3c,local_3c)
, iVar2 == 0)))))) {
iVar2 = typed_array_is_oob(piVar6);
if (iVar2 == 0) {
iVar2 = piVar6[0x10];
if (local_38 < piVar6[0x10]) {
iVar2 = local_38;
}
local_38 = iVar2;
switch("toSorted"[(ulong)*(ushort *)((long)piVar6 + 6) + 6]) {
case '\0':
if ((int)local_54 < iVar2) {
memset((void *)((long)(int)local_54 + *(long *)(piVar6 + 0xe)),(int)local_48,
(long)(int)(iVar2 - local_54));
}
break;
case '\x01':
if ((int)local_54 < iVar2) {
lVar4 = (long)(int)local_54;
do {
*(int2 *)(*(long *)(piVar6 + 0xe) + lVar4 * 2) = local_48._0_2_;
lVar4 = lVar4 + 1;
} while (iVar2 != lVar4);
}
break;
case '\x02':
if ((int)local_54 < iVar2) {
lVar4 = (long)(int)local_54;
do {
*(int *)(*(long *)(piVar6 + 0xe) + lVar4 * 4) = (int)local_48;
lVar4 = lVar4 + 1;
} while (iVar2 != lVar4);
}
break;
case '\x03':
if ((int)local_54 < iVar2) {
lVar4 = (long)(int)local_54;
do {
*(int **)(*(long *)(piVar6 + 0xe) + lVar4 * 8) = local_48;
lVar4 = lVar4 + 1;
} while (iVar2 != lVar4);
}
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
if (0xfffffff6 < (uint)param_3) {
*param_2 = *param_2 + 1;
}
uVar3 = (ulong)param_2 & 0xffffffff00000000;
uVar5 = (ulong)param_2 & 0xffffffff;
goto LAB_001811f7;
}
goto LAB_00181011;
}
}
}
else {
iVar2 = JS_ToFloat64(param_1,&local_50,*param_5,param_5[1]);
if (iVar2 == 0) {
if (*(short *)((long)piVar6 + 6) == 0x1f) {
local_48 = (int *)(ulong)(uint)(float)(double)local_50;
}
else {
local_48 = local_50;
if (*(short *)((long)piVar6 + 6) == 0x1e) {
uVar1 = tofp16((int)local_50);
local_48 = (int *)(ulong)uVar1;
}
}
goto LAB_001810b2;
}
}
}
else {
LAB_00181011:
JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized");
}
}
uVar5 = 0;
uVar3 = 0;
param_3 = 6;
LAB_001811f7:
auVar7._8_8_ = param_3;
auVar7._0_8_ = uVar5 | uVar3;
return auVar7;
}
| |
48,837 | bool CLI::detail::integral_conversion<int, (CLI::detail::enabler)0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&) | MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/TypeTools.hpp | bool lexical_cast(const std::string &input, T &output) {
typename T::value_type val;
if(lexical_cast(input, val)) {
output = val;
return true;
}
return from_stream(input, output);
} | O2 | cpp | bool CLI::detail::integral_conversion<int, (CLI::detail::enabler)0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x8(%rdi)
je 0xe2bd
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
andq $0x0, (%r15)
callq 0x7050
movq %rax, %r12
andl $0x0, (%rax)
movq (%r14), %rdi
xorl %ebp, %ebp
movq %r15, %rsi
xorl %edx, %edx
callq 0x7850
cmpl $0x22, (%r12)
je 0xe2bf
movl %eax, (%rbx)
movq (%r14), %rcx
addq 0x8(%r14), %rcx
xorq 0x8(%rsp), %rcx
movslq %eax, %rdx
xorq %rax, %rdx
movb $0x1, %bpl
orq %rcx, %rdx
je 0xe2bf
leaq 0x1b1be(%rip), %rsi # 0x29467
movq %r14, %rdi
callq 0x966c
testb %al, %al
je 0xe2bd
movl $0x1, (%rbx)
jmp 0xe2bf
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN3CLI6detail19integral_conversionIiTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueENS0_7enablerEE4typeELS4_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
cmp qword ptr [rdi+8], 0
jz short loc_E2BD
mov rbx, rsi
mov r14, rdi
lea r15, [rsp+38h+var_30]
and qword ptr [r15], 0
call ___errno_location
mov r12, rax
and dword ptr [rax], 0
mov rdi, [r14]
xor ebp, ebp
mov rsi, r15
xor edx, edx
call strtoll
cmp dword ptr [r12], 22h ; '"'
jz short loc_E2BF
mov [rbx], eax
mov rcx, [r14]
add rcx, [r14+8]
xor rcx, [rsp+38h+var_30]
movsxd rdx, eax
xor rdx, rax
mov bpl, 1
or rdx, rcx
jz short loc_E2BF
lea rsi, aTrue; "true"
mov rdi, r14
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_E2BD
mov dword ptr [rbx], 1
jmp short loc_E2BF
loc_E2BD:
xor ebp, ebp
loc_E2BF:
mov eax, ebp
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ZN3CLI6detail19integral_conversionIiTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueENS0_7enablerEE4typeELS4_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_(
_QWORD *a1,
_DWORD *a2)
{
_DWORD *v2; // r12
unsigned int v3; // ebp
long long v4; // rax
_QWORD v6[6]; // [rsp+8h] [rbp-30h] BYREF
if ( !a1[1] )
return 0;
v6[0] = 0LL;
v2 = (_DWORD *)__errno_location();
*v2 = 0;
v3 = 0;
v4 = strtoll(*a1, v6, 0LL);
if ( *v2 != 34 )
{
*a2 = v4;
LOBYTE(v3) = 1;
if ( v6[0] ^ (a1[1] + *a1) | v4 ^ (int)v4 )
{
if ( std::operator==<char>((long long)a1) )
{
*a2 = 1;
return v3;
}
return 0;
}
}
return v3;
}
| _ZN3CLI6detail19integral_conversionIiTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueENS0_7enablerEE4typeELS4_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
CMP qword ptr [RDI + 0x8],0x0
JZ 0x0010e2bd
MOV RBX,RSI
MOV R14,RDI
LEA R15,[RSP + 0x8]
AND qword ptr [R15],0x0
CALL 0x00107050
MOV R12,RAX
AND dword ptr [RAX],0x0
MOV RDI,qword ptr [R14]
XOR EBP,EBP
MOV RSI,R15
XOR EDX,EDX
CALL 0x00107850
CMP dword ptr [R12],0x22
JZ 0x0010e2bf
MOV dword ptr [RBX],EAX
MOV RCX,qword ptr [R14]
ADD RCX,qword ptr [R14 + 0x8]
XOR RCX,qword ptr [RSP + 0x8]
MOVSXD RDX,EAX
XOR RDX,RAX
MOV BPL,0x1
OR RDX,RCX
JZ 0x0010e2bf
LEA RSI,[0x129467]
MOV RDI,R14
CALL 0x0010966c
TEST AL,AL
JZ 0x0010e2bd
MOV dword ptr [RBX],0x1
JMP 0x0010e2bf
LAB_0010e2bd:
XOR EBP,EBP
LAB_0010e2bf:
MOV EAX,EBP
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8
_ZN3CLI6detail19integral_conversionIiTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueENS0_7enablerEE4typeELS4_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_
(string *param_1,int *param_2)
{
bool bVar1;
int *piVar2;
longlong lVar3;
char *local_30;
if (*(long *)(param_1 + 8) != 0) {
local_30 = (char *)0x0;
piVar2 = __errno_location();
*piVar2 = 0;
lVar3 = strtoll(*(char **)param_1,&local_30,0);
if (*piVar2 == 0x22) {
return 0;
}
*param_2 = (int)lVar3;
if ((int)lVar3 == lVar3 && (char *)(*(long *)param_1 + *(long *)(param_1 + 8)) == local_30) {
return 1;
}
bVar1 = std::operator==(param_1,"true");
if (bVar1) {
*param_2 = 1;
return 1;
}
}
return 0;
}
| |
48,838 | LefDefParser::defiNonDefault::layerWireExtVal(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | int defiNonDefault::layerWireExtVal(int index) const {
char msg[160];
if (index < 0 || index >= numLayers_) {
sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numLayers_);
defiError(0, 6090, msg, defData);
return 0;
}
return (int)wireExt_[index];
} | O0 | cpp | LefDefParser::defiNonDefault::layerWireExtVal(int) const:
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movl %esi, 0xb4(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0xb4(%rsp)
jl 0x484ce
movq 0x8(%rsp), %rcx
movl 0xb4(%rsp), %eax
cmpl 0xc(%rcx), %eax
jl 0x4851a
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0xb4(%rsp), %edx
movl 0xc(%rax), %ecx
leaq 0x2d696(%rip), %rsi # 0x75b7f
movb $0x0, %al
callq 0x7060
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdx
movq 0xb8(%rax), %rcx
xorl %edi, %edi
movl $0x17ca, %esi # imm = 0x17CA
callq 0x2a600
movl $0x0, 0xc4(%rsp)
jmp 0x48537
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movslq 0xb4(%rsp), %rcx
cvttsd2si (%rax,%rcx,8), %eax
movl %eax, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZNK12LefDefParser14defiNonDefault15layerWireExtValEi:
sub rsp, 0C8h
mov [rsp+0C8h+var_10], rdi
mov [rsp+0C8h+var_14], esi
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_C0], rax
cmp [rsp+0C8h+var_14], 0
jl short loc_484CE
mov rcx, [rsp+0C8h+var_C0]
mov eax, [rsp+0C8h+var_14]
cmp eax, [rcx+0Ch]
jl short loc_4851A
loc_484CE:
mov rax, [rsp+0C8h+var_C0]
lea rdi, [rsp+0C8h+var_B8]
mov edx, [rsp+0C8h+var_14]
mov ecx, [rax+0Ch]
lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "...
mov al, 0
call _sprintf
mov rax, [rsp+0C8h+var_C0]
lea rdx, [rsp+0C8h+var_B8]; int
mov rcx, [rax+0B8h]; char *
xor edi, edi; this
mov esi, 17CAh; int
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
mov [rsp+0C8h+var_4], 0
jmp short loc_48537
loc_4851A:
mov rax, [rsp+0C8h+var_C0]
mov rax, [rax+50h]
movsxd rcx, [rsp+0C8h+var_14]
cvttsd2si eax, qword ptr [rax+rcx*8]
mov [rsp+0C8h+var_4], eax
loc_48537:
mov eax, [rsp+0C8h+var_4]
add rsp, 0C8h
retn
| long long LefDefParser::defiNonDefault::layerWireExtVal(LefDefParser::defrData **this, int a2)
{
LefDefParser::defrData *v2; // r8
char v4[164]; // [rsp+10h] [rbp-B8h] BYREF
int v5; // [rsp+B4h] [rbp-14h]
LefDefParser::defiNonDefault *v6; // [rsp+B8h] [rbp-10h]
v6 = (LefDefParser::defiNonDefault *)this;
v5 = a2;
if ( a2 >= 0 && v5 < *((_DWORD *)this + 3) )
{
return (unsigned int)(int)*((double *)this[10] + v5);
}
else
{
sprintf(
v4,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
v5,
*((_DWORD *)this + 3));
LefDefParser::defiError(0LL, 6090, v4, this[23], v2);
return 0;
}
}
| layerWireExtVal:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xb8],RDI
MOV dword ptr [RSP + 0xb4],ESI
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0xb4],0x0
JL 0x001484ce
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0xb4]
CMP EAX,dword ptr [RCX + 0xc]
JL 0x0014851a
LAB_001484ce:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xb4]
MOV ECX,dword ptr [RAX + 0xc]
LEA RSI,[0x175b7f]
MOV AL,0x0
CALL 0x00107060
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x10]
MOV RCX,qword ptr [RAX + 0xb8]
XOR EDI,EDI
MOV ESI,0x17ca
CALL 0x0012a600
MOV dword ptr [RSP + 0xc4],0x0
JMP 0x00148537
LAB_0014851a:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x50]
MOVSXD RCX,dword ptr [RSP + 0xb4]
CVTTSD2SI EAX,qword ptr [RAX + RCX*0x8]
MOV dword ptr [RSP + 0xc4],EAX
LAB_00148537:
MOV EAX,dword ptr [RSP + 0xc4]
ADD RSP,0xc8
RET
|
/* LefDefParser::defiNonDefault::layerWireExtVal(int) const */
int __thiscall LefDefParser::defiNonDefault::layerWireExtVal(defiNonDefault *this,int param_1)
{
char local_b8 [164];
int local_14;
defiNonDefault *local_10;
int local_4;
if ((param_1 < 0) || (*(int *)(this + 0xc) <= param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_b8,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0xc));
defiError(0,0x17ca,local_b8,*(defrData **)(this + 0xb8));
local_4 = 0;
}
else {
local_4 = (int)*(double *)(*(long *)(this + 0x50) + (long)param_1 * 8);
}
return local_4;
}
| |
48,839 | LefDefParser::defiNonDefault::layerWireExtVal(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | int defiNonDefault::layerWireExtVal(int index) const {
char msg[160];
if (index < 0 || index >= numLayers_) {
sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numLayers_);
defiError(0, 6090, msg, defData);
return 0;
}
return (int)wireExt_[index];
} | O3 | cpp | LefDefParser::defiNonDefault::layerWireExtVal(int) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movl %esi, %edx
movq %rdi, %rbx
testl %esi, %esi
setns %al
movl 0xc(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x2be70
movq 0x50(%rbx), %rax
movl %edx, %ecx
cvttsd2si (%rax,%rcx,8), %ebp
jmp 0x2be9c
leaq 0x19b36(%rip), %rsi # 0x459ad
xorl %ebp, %ebp
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x7060
movq 0xb8(%rbx), %rcx
xorl %edi, %edi
movl $0x17ca, %esi # imm = 0x17CA
movq %r14, %rdx
callq 0x1bb18
movl %ebp, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| _ZNK12LefDefParser14defiNonDefault15layerWireExtValEi:
push rbp
push r14
push rbx
sub rsp, 0A0h
mov edx, esi
mov rbx, rdi
test esi, esi
setns al
mov ecx, [rdi+0Ch]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_2BE70
mov rax, [rbx+50h]
mov ecx, edx
cvttsd2si ebp, qword ptr [rax+rcx*8]
jmp short loc_2BE9C
loc_2BE70:
lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "...
xor ebp, ebp
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
mov rcx, [rbx+0B8h]; LefDefParser::defrData *
xor edi, edi; this
mov esi, 17CAh; int
mov rdx, r14; char *
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
loc_2BE9C:
mov eax, ebp
add rsp, 0A0h
pop rbx
pop r14
pop rbp
retn
| long long LefDefParser::defiNonDefault::layerWireExtVal(LefDefParser::defiNonDefault *this, signed int a2)
{
int v2; // ecx
unsigned int v3; // ebp
LefDefParser::defrData *v4; // r8
char v6[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 3);
if ( v2 > a2 && a2 >= 0 )
{
return (unsigned int)(int)*(double *)(*((_QWORD *)this + 10) + 8LL * (unsigned int)a2);
}
else
{
v3 = 0;
sprintf(
v6,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
a2,
v2);
LefDefParser::defiError(0LL, 6090, v6, *((LefDefParser::defrData **)this + 23), v4);
}
return v3;
}
| layerWireExtVal:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV EDX,ESI
MOV RBX,RDI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0xc]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0012be70
MOV RAX,qword ptr [RBX + 0x50]
MOV ECX,EDX
CVTTSD2SI EBP,qword ptr [RAX + RCX*0x8]
JMP 0x0012be9c
LAB_0012be70:
LEA RSI,[0x1459ad]
XOR EBP,EBP
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00107060
MOV RCX,qword ptr [RBX + 0xb8]
XOR EDI,EDI
MOV ESI,0x17ca
MOV RDX,R14
CALL 0x0011bb18
LAB_0012be9c:
MOV EAX,EBP
ADD RSP,0xa0
POP RBX
POP R14
POP RBP
RET
|
/* LefDefParser::defiNonDefault::layerWireExtVal(int) const */
int __thiscall LefDefParser::defiNonDefault::layerWireExtVal(defiNonDefault *this,int param_1)
{
int iVar1;
char acStack_b8 [160];
if (param_1 < 0 || *(int *)(this + 0xc) <= param_1) {
iVar1 = 0;
sprintf(acStack_b8,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
);
defiError(0,0x17ca,acStack_b8,*(defrData **)(this + 0xb8));
}
else {
iVar1 = (int)*(double *)(*(long *)(this + 0x50) + (ulong)(uint)param_1 * 8);
}
return iVar1;
}
| |
48,840 | fmt::v11::basic_appender<char> fmt::v11::detail::format_decimal<char, unsigned __int128, fmt::v11::basic_appender<char>, 0>(fmt::v11::basic_appender<char>, unsigned __int128, int) | zkingston[P]unknot/build_O1/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR auto format_decimal(OutputIt out, UInt value, int num_digits)
-> OutputIt {
if (auto ptr = to_pointer<Char>(out, to_unsigned(num_digits))) {
do_format_decimal(ptr, value, num_digits);
return out;
}
// Buffer is large enough to hold all digits (digits10 + 1).
char buffer[digits10<UInt>() + 1];
if (is_constant_evaluated()) fill_n(buffer, sizeof(buffer), '\0');
do_format_decimal(buffer, value, num_digits);
return copy_noinline<Char>(buffer, buffer + num_digits, out);
} | O1 | c | fmt::v11::basic_appender<char> fmt::v11::detail::format_decimal<char, unsigned __int128, fmt::v11::basic_appender<char>, 0>(fmt::v11::basic_appender<char>, unsigned __int128, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl %ecx, %esi
callq 0x3fec6
testq %rax, %rax
je 0x40354
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x40434
jmp 0x4037c
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x40434
movslq %ebp, %rax
leaq (%rsp,%rax), %rsi
movq %r12, %rdi
movq %rbx, %rdx
callq 0x3ffd9
movq %rax, %rbx
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN3fmt3v116detail14format_decimalIcoNS0_14basic_appenderIcEETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEES8_S8_T0_i:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 30h
mov ebp, ecx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, ecx
call _ZN3fmt3v116detail10to_pointerIcEEPT_NS0_14basic_appenderIS3_EEm; fmt::v11::detail::to_pointer<char>(fmt::v11::basic_appender<char>,ulong)
test rax, rax
jz short loc_40354
mov rdi, rax
mov rsi, r15
mov rdx, r14
mov ecx, ebp
call _ZN3fmt3v116detail17do_format_decimalIcoEEPT_S4_T0_i; fmt::v11::detail::do_format_decimal<char,unsigned __int128>(char *,unsigned __int128,int)
jmp short loc_4037C
loc_40354:
mov r12, rsp
mov rdi, r12
mov rsi, r15
mov rdx, r14
mov ecx, ebp
call _ZN3fmt3v116detail17do_format_decimalIcoEEPT_S4_T0_i; fmt::v11::detail::do_format_decimal<char,unsigned __int128>(char *,unsigned __int128,int)
movsxd rax, ebp
lea rsi, [rsp+rax+58h+var_58]
mov rdi, r12
mov rdx, rbx
call _ZN3fmt3v116detail13copy_noinlineIcPcNS0_14basic_appenderIcEEEET1_T0_S7_S6_; fmt::v11::detail::copy_noinline<char,char *,fmt::v11::basic_appender<char>>(char *,char *,fmt::v11::basic_appender<char>)
mov rbx, rax
loc_4037C:
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ZN3fmt3v116detail14format_decimalIcoNS0_14basic_appenderIcEETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEES8_S8_T0_i(
long long a1,
long long a2,
long long a3,
unsigned int a4)
{
long long v6; // rbx
long long v7; // rax
_BYTE v9[88]; // [rsp+0h] [rbp-58h] BYREF
v6 = a1;
v7 = fmt::v11::detail::to_pointer<char>(a1, a4);
if ( v7 )
{
fmt::v11::detail::do_format_decimal<char,unsigned __int128>(v7, a2, a3, a4);
}
else
{
fmt::v11::detail::do_format_decimal<char,unsigned __int128>(v9, a2, a3, a4);
return fmt::v11::detail::copy_noinline<char,char *,fmt::v11::basic_appender<char>>(
(long long)v9,
(long long)&v9[a4],
a1);
}
return v6;
}
| _ZN3fmt3v116detail14format_decimalIcoNS0_14basic_appenderIcEETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEES8_S8_T0_i:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV EBP,ECX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,ECX
CALL 0x0013fec6
TEST RAX,RAX
JZ 0x00140354
MOV RDI,RAX
MOV RSI,R15
MOV RDX,R14
MOV ECX,EBP
CALL 0x00140434
JMP 0x0014037c
LAB_00140354:
MOV R12,RSP
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV ECX,EBP
CALL 0x00140434
MOVSXD RAX,EBP
LEA RSI,[RSP + RAX*0x1]
MOV RDI,R12
MOV RDX,RBX
CALL 0x0013ffd9
MOV RBX,RAX
LAB_0014037c:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8
_ZN3fmt3v116detail14format_decimalIcoNS0_14basic_appenderIcEETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEES8_S8_T0_i
(int8 param_1,char *param_2,uint param_3,int param_4)
{
detail *this;
detail adStack_58 [48];
this = (detail *)fmt::v11::detail::to_pointer<char>(param_1,param_4);
if (this == (detail *)0x0) {
fmt::v11::detail::do_format_decimal<char,unsigned__int128>(adStack_58,param_2,param_3,param_4);
param_1 = fmt::v11::detail::copy_noinline<char,char*,fmt::v11::basic_appender<char>>
(adStack_58,adStack_58 + param_4,param_1);
}
else {
fmt::v11::detail::do_format_decimal<char,unsigned__int128>(this,param_2,param_3,param_4);
}
return param_1;
}
| |
48,841 | ModbusObjectPrivate::~ModbusObjectPrivate() | serhmarch[P]ModbusBridge/modbus/src/ModbusObject_p.h | virtual ~ModbusObjectPrivate()
{
} | O3 | c | ModbusObjectPrivate::~ModbusObjectPrivate():
pushq %rbx
movq %rdi, %rbx
leaq 0x187f5(%rip), %rax # 0x21460
movq %rax, (%rdi)
addq $0x28, %rdi
callq 0x8caa
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x8c90
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x5310
popq %rbx
retq
| _ZN19ModbusObjectPrivateD2Ev:
push rbx
mov rbx, rdi
lea rax, off_21460
mov [rdi], rax
add rdi, 28h ; '('
call _ZNSt10_HashtableIPvSt4pairIKS0_NSt7__cxx114listIS0_SaIS0_EEEESaIS7_ENSt8__detail10_Select1stESt8equal_toIS0_ESt4hashIS0_ENS9_18_Mod_range_hashingENS9_20_Default_ranged_hashENS9_20_Prime_rehash_policyENS9_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<void *,std::pair<void * const,std::list<void *>>,std::allocator<std::pair<void * const,std::list<void *>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
mov rdi, [rbx+8]; void *
add rbx, 18h
cmp rdi, rbx
jz short loc_8C90
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_8C90:
pop rbx
retn
| void ModbusObjectPrivate::~ModbusObjectPrivate(ModbusObjectPrivate *this)
{
_QWORD *v2; // rdi
_QWORD *v3; // rbx
*(_QWORD *)this = off_21460;
std::_Hashtable<void *,std::pair<void * const,std::list<void *>>,std::allocator<std::pair<void * const,std::list<void *>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((char *)this + 40);
v2 = (_QWORD *)*((_QWORD *)this + 1);
v3 = (_QWORD *)((char *)this + 24);
if ( v2 != v3 )
operator delete(v2, *v3 + 1LL);
}
| ~ModbusObjectPrivate:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x121460]
MOV qword ptr [RDI],RAX
ADD RDI,0x28
CALL 0x00108caa
MOV RDI,qword ptr [RBX + 0x8]
ADD RBX,0x18
CMP RDI,RBX
JZ 0x00108c90
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x00105310
LAB_00108c90:
POP RBX
RET
|
/* ModbusObjectPrivate::~ModbusObjectPrivate() */
void __thiscall ModbusObjectPrivate::~ModbusObjectPrivate(ModbusObjectPrivate *this)
{
*(int ***)this = &PTR__ModbusObjectPrivate_00121460;
std::
_Hashtable<void*,std::pair<void*const,std::__cxx11::list<void*,std::allocator<void*>>>,std::allocator<std::pair<void*const,std::__cxx11::list<void*,std::allocator<void*>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::~_Hashtable((_Hashtable<void*,std::pair<void*const,std::__cxx11::list<void*,std::allocator<void*>>>,std::allocator<std::pair<void*const,std::__cxx11::list<void*,std::allocator<void*>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)(this + 0x28));
if (*(ModbusObjectPrivate **)(this + 8) != this + 0x18) {
operator_delete(*(ModbusObjectPrivate **)(this + 8),*(long *)(this + 0x18) + 1);
return;
}
return;
}
| |
48,842 | mp_divnorm_large | bluesky950520[P]quickjs/libbf.c | static int mp_divnorm_large(bf_context_t *s,
limb_t *tabq, limb_t *taba, limb_t na,
const limb_t *tabb, limb_t nb)
{
limb_t *tabb_inv, nq, *tabt, i, n;
nq = na - nb;
#ifdef DEBUG_DIVNORM_LARGE
printf("na=%d nb=%d nq=%d\n", (int)na, (int)nb, (int)nq);
mp_print_str("a", taba, na);
mp_print_str("b", tabb, nb);
#endif
assert(nq >= 1);
n = nq;
if (nq < nb)
n++;
tabb_inv = bf_malloc(s, sizeof(limb_t) * (n + 1));
tabt = bf_malloc(s, sizeof(limb_t) * 2 * (n + 1));
if (!tabb_inv || !tabt)
goto fail;
if (n >= nb) {
for(i = 0; i < n - nb; i++)
tabt[i] = 0;
for(i = 0; i < nb; i++)
tabt[i + n - nb] = tabb[i];
} else {
/* truncate B: need to increment it so that the approximate
inverse is smaller that the exact inverse */
for(i = 0; i < n; i++)
tabt[i] = tabb[i + nb - n];
if (mp_add_ui(tabt, 1, n)) {
/* tabt = B^n : tabb_inv = B^n */
memset(tabb_inv, 0, n * sizeof(limb_t));
tabb_inv[n] = 1;
goto recip_done;
}
}
if (mp_recip(s, tabb_inv, tabt, n))
goto fail;
recip_done:
/* Q=A*B^-1 */
if (mp_mul(s, tabt, tabb_inv, n + 1, taba + na - (n + 1), n + 1))
goto fail;
for(i = 0; i < nq + 1; i++)
tabq[i] = tabt[i + 2 * (n + 1) - (nq + 1)];
#ifdef DEBUG_DIVNORM_LARGE
mp_print_str("q", tabq, nq + 1);
#endif
bf_free(s, tabt);
bf_free(s, tabb_inv);
tabb_inv = NULL;
/* R=A-B*Q */
tabt = bf_malloc(s, sizeof(limb_t) * (na + 1));
if (!tabt)
goto fail;
if (mp_mul(s, tabt, tabq, nq + 1, tabb, nb))
goto fail;
/* we add one more limb for the result */
mp_sub(taba, taba, tabt, nb + 1, 0);
bf_free(s, tabt);
/* the approximated quotient is smaller than than the exact one,
hence we may have to increment it */
#ifdef DEBUG_DIVNORM_LARGE2
int cnt = 0;
static int cnt_max;
#endif
for(;;) {
if (taba[nb] == 0 && mp_cmp(taba, tabb, nb) < 0)
break;
taba[nb] -= mp_sub(taba, taba, tabb, nb, 0);
mp_add_ui(tabq, 1, nq + 1);
#ifdef DEBUG_DIVNORM_LARGE2
cnt++;
#endif
}
#ifdef DEBUG_DIVNORM_LARGE2
if (cnt > cnt_max) {
cnt_max = cnt;
printf("\ncnt=%d nq=%d nb=%d\n", cnt_max, (int)nq, (int)nb);
}
#endif
return 0;
fail:
bf_free(s, tabb_inv);
bf_free(s, tabt);
return -1;
} | O0 | c | mp_divnorm_large:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movq %r8, 0x38(%rsp)
movq %r9, 0x30(%rsp)
movq 0x40(%rsp), %rax
subq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0xfc2c5
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x1, %rsi
shlq $0x3, %rsi
callq 0xee350
movq %rax, 0x28(%rsp)
movq 0x58(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x1, %rsi
shlq $0x4, %rsi
callq 0xee350
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0xfc30d
cmpq $0x0, 0x18(%rsp)
jne 0xfc312
jmp 0xfc657
movq 0x8(%rsp), %rax
cmpq 0x30(%rsp), %rax
jb 0xfc3b1
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
subq 0x30(%rsp), %rcx
cmpq %rcx, %rax
jae 0xfc361
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0xfc32b
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0xfc3ac
movq 0x38(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
addq 0x8(%rsp), %rcx
subq 0x30(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0xfc36a
jmp 0xfc441
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
jae 0xfc3fc
movq 0x38(%rsp), %rax
movq 0x10(%rsp), %rcx
addq 0x30(%rsp), %rcx
subq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0xfc3ba
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xed680
cmpq $0x0, %rax
je 0xfc43f
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0xe370
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rcx
movq $0x1, (%rax,%rcx,8)
jmp 0xfc466
jmp 0xfc441
movq 0x58(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq 0xedef0
cmpl $0x0, %eax
je 0xfc464
jmp 0xfc657
jmp 0xfc466
movq 0x58(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x8(%rsp), %rcx
addq $0x1, %rcx
movq 0x48(%rsp), %r8
movq 0x40(%rsp), %rax
shlq $0x3, %rax
addq %rax, %r8
movq 0x8(%rsp), %r9
addq $0x1, %r9
xorl %eax, %eax
subq %r9, %rax
shlq $0x3, %rax
addq %rax, %r8
movq 0x8(%rsp), %r9
addq $0x1, %r9
callq 0xed8a0
cmpl $0x0, %eax
je 0xfc4bc
jmp 0xfc657
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0xfc51f
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rdx
addq $0x1, %rdx
shlq %rdx
addq %rdx, %rcx
movq 0x20(%rsp), %rdx
addq $0x1, %rdx
subq %rdx, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x50(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0xfc4c5
movq 0x58(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xec6c0
movq 0x58(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xec6c0
movq $0x0, 0x28(%rsp)
movq 0x58(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq $0x1, %rsi
shlq $0x3, %rsi
callq 0xee350
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0xfc56f
jmp 0xfc657
movq 0x58(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x20(%rsp), %rcx
addq $0x1, %rcx
movq 0x38(%rsp), %r8
movq 0x30(%rsp), %r9
callq 0xed8a0
cmpl $0x0, %eax
je 0xfc5a0
jmp 0xfc657
movq 0x48(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rcx
addq $0x1, %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xed720
movq 0x58(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xec6c0
movq 0x48(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0xfc5fd
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0xfc740
cmpl $0x0, %eax
jge 0xfc5fd
jmp 0xfc64d
movq 0x48(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xed720
movq %rax, %rsi
movq 0x48(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
subq %rsi, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x50(%rsp), %rdi
movq 0x20(%rsp), %rdx
addq $0x1, %rdx
movl $0x1, %esi
callq 0xed680
jmp 0xfc5d1
movl $0x0, 0x64(%rsp)
jmp 0xfc67d
movq 0x58(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xec6c0
movq 0x58(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xec6c0
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| mp_divnorm_large:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_20], rdx
mov [rsp+68h+var_28], rcx
mov [rsp+68h+var_30], r8
mov [rsp+68h+var_38], r9
mov rax, [rsp+68h+var_28]
sub rax, [rsp+68h+var_38]
mov [rsp+68h+var_48], rax
mov rax, [rsp+68h+var_48]
mov [rsp+68h+var_60], rax
mov rax, [rsp+68h+var_48]
cmp rax, [rsp+68h+var_38]
jnb short loc_FC2C5
mov rax, [rsp+68h+var_60]
add rax, 1
mov [rsp+68h+var_60], rax
loc_FC2C5:
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_60]
add rsi, 1
shl rsi, 3
call bf_malloc
mov [rsp+68h+var_40], rax
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_60]
add rsi, 1
shl rsi, 4
call bf_malloc
mov [rsp+68h+var_50], rax
cmp [rsp+68h+var_40], 0
jz short loc_FC30D
cmp [rsp+68h+var_50], 0
jnz short loc_FC312
loc_FC30D:
jmp loc_FC657
loc_FC312:
mov rax, [rsp+68h+var_60]
cmp rax, [rsp+68h+var_38]
jb loc_FC3B1
mov [rsp+68h+var_58], 0
loc_FC32B:
mov rax, [rsp+68h+var_58]
mov rcx, [rsp+68h+var_60]
sub rcx, [rsp+68h+var_38]
cmp rax, rcx
jnb short loc_FC361
mov rax, [rsp+68h+var_50]
mov rcx, [rsp+68h+var_58]
mov qword ptr [rax+rcx*8], 0
mov rax, [rsp+68h+var_58]
add rax, 1
mov [rsp+68h+var_58], rax
jmp short loc_FC32B
loc_FC361:
mov [rsp+68h+var_58], 0
loc_FC36A:
mov rax, [rsp+68h+var_58]
cmp rax, [rsp+68h+var_38]
jnb short loc_FC3AC
mov rax, [rsp+68h+var_30]
mov rcx, [rsp+68h+var_58]
mov rdx, [rax+rcx*8]
mov rax, [rsp+68h+var_50]
mov rcx, [rsp+68h+var_58]
add rcx, [rsp+68h+var_60]
sub rcx, [rsp+68h+var_38]
mov [rax+rcx*8], rdx
mov rax, [rsp+68h+var_58]
add rax, 1
mov [rsp+68h+var_58], rax
jmp short loc_FC36A
loc_FC3AC:
jmp loc_FC441
loc_FC3B1:
mov [rsp+68h+var_58], 0
loc_FC3BA:
mov rax, [rsp+68h+var_58]
cmp rax, [rsp+68h+var_60]
jnb short loc_FC3FC
mov rax, [rsp+68h+var_30]
mov rcx, [rsp+68h+var_58]
add rcx, [rsp+68h+var_38]
sub rcx, [rsp+68h+var_60]
mov rdx, [rax+rcx*8]
mov rax, [rsp+68h+var_50]
mov rcx, [rsp+68h+var_58]
mov [rax+rcx*8], rdx
mov rax, [rsp+68h+var_58]
add rax, 1
mov [rsp+68h+var_58], rax
jmp short loc_FC3BA
loc_FC3FC:
mov rdi, [rsp+68h+var_50]
mov rdx, [rsp+68h+var_60]
mov esi, 1
call mp_add_ui
cmp rax, 0
jz short loc_FC43F
mov rdi, [rsp+68h+var_40]
mov rdx, [rsp+68h+var_60]
shl rdx, 3
xor esi, esi
call _memset
mov rax, [rsp+68h+var_40]
mov rcx, [rsp+68h+var_60]
mov qword ptr [rax+rcx*8], 1
jmp short loc_FC466
loc_FC43F:
jmp short $+2
loc_FC441:
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_40]
mov rdx, [rsp+68h+var_50]
mov rcx, [rsp+68h+var_60]
call mp_recip
cmp eax, 0
jz short loc_FC464
jmp loc_FC657
loc_FC464:
jmp short $+2
loc_FC466:
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_50]
mov rdx, [rsp+68h+var_40]
mov rcx, [rsp+68h+var_60]
add rcx, 1
mov r8, [rsp+68h+var_20]
mov rax, [rsp+68h+var_28]
shl rax, 3
add r8, rax
mov r9, [rsp+68h+var_60]
add r9, 1
xor eax, eax
sub rax, r9
shl rax, 3
add r8, rax
mov r9, [rsp+68h+var_60]
add r9, 1
call mp_mul
cmp eax, 0
jz short loc_FC4BC
jmp loc_FC657
loc_FC4BC:
mov [rsp+68h+var_58], 0
loc_FC4C5:
mov rax, [rsp+68h+var_58]
mov rcx, [rsp+68h+var_48]
add rcx, 1
cmp rax, rcx
jnb short loc_FC51F
mov rax, [rsp+68h+var_50]
mov rcx, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_60]
add rdx, 1
shl rdx, 1
add rcx, rdx
mov rdx, [rsp+68h+var_48]
add rdx, 1
sub rcx, rdx
mov rdx, [rax+rcx*8]
mov rax, [rsp+68h+var_18]
mov rcx, [rsp+68h+var_58]
mov [rax+rcx*8], rdx
mov rax, [rsp+68h+var_58]
add rax, 1
mov [rsp+68h+var_58], rax
jmp short loc_FC4C5
loc_FC51F:
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_50]
call bf_free_0
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_40]
call bf_free_0
mov [rsp+68h+var_40], 0
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_28]
add rsi, 1
shl rsi, 3
call bf_malloc
mov [rsp+68h+var_50], rax
cmp [rsp+68h+var_50], 0
jnz short loc_FC56F
jmp loc_FC657
loc_FC56F:
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_50]
mov rdx, [rsp+68h+var_18]
mov rcx, [rsp+68h+var_48]
add rcx, 1
mov r8, [rsp+68h+var_30]
mov r9, [rsp+68h+var_38]
call mp_mul
cmp eax, 0
jz short loc_FC5A0
jmp loc_FC657
loc_FC5A0:
mov rdi, [rsp+68h+var_20]
mov rsi, [rsp+68h+var_20]
mov rdx, [rsp+68h+var_50]
mov rcx, [rsp+68h+var_38]
add rcx, 1
xor eax, eax
mov r8d, eax
call mp_sub
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_50]
call bf_free_0
loc_FC5D1:
mov rax, [rsp+68h+var_20]
mov rcx, [rsp+68h+var_38]
cmp qword ptr [rax+rcx*8], 0
jnz short loc_FC5FD
mov rdi, [rsp+68h+var_20]
mov rsi, [rsp+68h+var_30]
mov rdx, [rsp+68h+var_38]
call mp_cmp
cmp eax, 0
jge short loc_FC5FD
jmp short loc_FC64D
loc_FC5FD:
mov rdi, [rsp+68h+var_20]
mov rsi, [rsp+68h+var_20]
mov rdx, [rsp+68h+var_30]
mov rcx, [rsp+68h+var_38]
xor eax, eax
mov r8d, eax
call mp_sub
mov rsi, rax
mov rax, [rsp+68h+var_20]
mov rcx, [rsp+68h+var_38]
mov rdx, [rax+rcx*8]
sub rdx, rsi
mov [rax+rcx*8], rdx
mov rdi, [rsp+68h+var_18]
mov rdx, [rsp+68h+var_48]
add rdx, 1
mov esi, 1
call mp_add_ui
jmp short loc_FC5D1
loc_FC64D:
mov [rsp+68h+var_4], 0
jmp short loc_FC67D
loc_FC657:
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_40]
call bf_free_0
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_50]
call bf_free_0
mov [rsp+68h+var_4], 0FFFFFFFFh
loc_FC67D:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
| long long mp_divnorm_large(long long a1, long long a2, long long a3, long long a4, long long a5, unsigned long long a6)
{
long long v6; // rdx
long long v7; // rcx
long long v8; // r8
long long v9; // r9
long long v10; // rdx
long long v11; // rcx
long long v12; // r8
long long v13; // r9
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
long long v18; // rdx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
long long v22; // rdx
long long v23; // rcx
long long v24; // r8
long long v25; // r9
long long v26; // rdx
long long v27; // rcx
long long v28; // r8
long long v29; // r9
unsigned long long v31; // [rsp+8h] [rbp-60h]
unsigned long long j; // [rsp+10h] [rbp-58h]
unsigned long long k; // [rsp+10h] [rbp-58h]
unsigned long long i; // [rsp+10h] [rbp-58h]
unsigned long long m; // [rsp+10h] [rbp-58h]
long long v36; // [rsp+18h] [rbp-50h]
unsigned long long v37; // [rsp+20h] [rbp-48h]
long long v38; // [rsp+28h] [rbp-40h]
v37 = a4 - a6;
v31 = a4 - a6;
if ( a4 - a6 < a6 )
++v31;
v38 = bf_malloc(a1, 8 * (v31 + 1), a3, a4, a5, a6);
v36 = bf_malloc(a1, 16 * (v31 + 1), v6, v7, v8, v9);
if ( !v38 || !v36 )
goto LABEL_31;
if ( v31 < a6 )
{
for ( i = 0LL; i < v31; ++i )
*(_QWORD *)(v36 + 8 * i) = *(_QWORD *)(a5 + 8 * (a6 + i - v31));
if ( mp_add_ui(v36, 1LL, v31) )
{
memset(v38, 0LL, 8 * v31);
*(_QWORD *)(v38 + 8 * v31) = 1LL;
goto LABEL_20;
}
}
else
{
for ( j = 0LL; j < v31 - a6; ++j )
*(_QWORD *)(v36 + 8 * j) = 0LL;
for ( k = 0LL; k < a6; ++k )
*(_QWORD *)(v36 + 8 * (v31 + k - a6)) = *(_QWORD *)(a5 + 8 * k);
}
if ( (unsigned int)mp_recip(a1, v38, v36, v31) )
{
LABEL_31:
bf_free_0(a1, v38, v10, v11, v12, v13);
bf_free_0(a1, v36, v26, v27, v28, v29);
return (unsigned int)-1;
}
LABEL_20:
if ( (unsigned int)mp_mul(a1, v36, v38, v31 + 1, -8LL * (v31 + 1) + 8 * a4 + a3, v31 + 1) )
goto LABEL_31;
for ( m = 0LL; m < v37 + 1; *(_QWORD *)(a2 + 8 * m++) = v10 )
v10 = *(_QWORD *)(v36 + 8 * (2 * (v31 + 1) + m - (v37 + 1)));
bf_free_0(a1, v36, v10, v37 + 1, v12, v13);
bf_free_0(a1, v38, v14, v15, v16, v17);
v38 = 0LL;
v36 = bf_malloc(a1, 8 * (a4 + 1), v18, v19, v20, v21);
if ( !v36 || (unsigned int)mp_mul(a1, v36, a2, v37 + 1, a5, a6) )
goto LABEL_31;
mp_sub(a3, a3, v36, a6 + 1, 0LL);
bf_free_0(a1, v36, v22, v23, v24, v25);
while ( *(_QWORD *)(a3 + 8 * a6) || (int)mp_cmp(a3, a5, a6) >= 0 )
{
*(_QWORD *)(a3 + 8 * a6) -= mp_sub(a3, a3, a5, a6, 0LL);
mp_add_ui(a2, 1LL, v37 + 1);
}
return 0;
}
| mp_divnorm_large:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV qword ptr [RSP + 0x50],RSI
MOV qword ptr [RSP + 0x48],RDX
MOV qword ptr [RSP + 0x40],RCX
MOV qword ptr [RSP + 0x38],R8
MOV qword ptr [RSP + 0x30],R9
MOV RAX,qword ptr [RSP + 0x40]
SUB RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,qword ptr [RSP + 0x30]
JNC 0x001fc2c5
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
LAB_001fc2c5:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x1
SHL RSI,0x3
CALL 0x001ee350
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x1
SHL RSI,0x4
CALL 0x001ee350
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x28],0x0
JZ 0x001fc30d
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x001fc312
LAB_001fc30d:
JMP 0x001fc657
LAB_001fc312:
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,qword ptr [RSP + 0x30]
JC 0x001fc3b1
MOV qword ptr [RSP + 0x10],0x0
LAB_001fc32b:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
SUB RCX,qword ptr [RSP + 0x30]
CMP RAX,RCX
JNC 0x001fc361
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + RCX*0x8],0x0
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001fc32b
LAB_001fc361:
MOV qword ptr [RSP + 0x10],0x0
LAB_001fc36a:
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,qword ptr [RSP + 0x30]
JNC 0x001fc3ac
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
ADD RCX,qword ptr [RSP + 0x8]
SUB RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001fc36a
LAB_001fc3ac:
JMP 0x001fc441
LAB_001fc3b1:
MOV qword ptr [RSP + 0x10],0x0
LAB_001fc3ba:
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,qword ptr [RSP + 0x8]
JNC 0x001fc3fc
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x10]
ADD RCX,qword ptr [RSP + 0x30]
SUB RCX,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001fc3ba
LAB_001fc3fc:
MOV RDI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x8]
MOV ESI,0x1
CALL 0x001ed680
CMP RAX,0x0
JZ 0x001fc43f
MOV RDI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x8]
SHL RDX,0x3
XOR ESI,ESI
CALL 0x0010e370
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + RCX*0x8],0x1
JMP 0x001fc466
LAB_001fc43f:
JMP 0x001fc441
LAB_001fc441:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x8]
CALL 0x001edef0
CMP EAX,0x0
JZ 0x001fc464
JMP 0x001fc657
LAB_001fc464:
JMP 0x001fc466
LAB_001fc466:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x8]
ADD RCX,0x1
MOV R8,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RSP + 0x40]
SHL RAX,0x3
ADD R8,RAX
MOV R9,qword ptr [RSP + 0x8]
ADD R9,0x1
XOR EAX,EAX
SUB RAX,R9
SHL RAX,0x3
ADD R8,RAX
MOV R9,qword ptr [RSP + 0x8]
ADD R9,0x1
CALL 0x001ed8a0
CMP EAX,0x0
JZ 0x001fc4bc
JMP 0x001fc657
LAB_001fc4bc:
MOV qword ptr [RSP + 0x10],0x0
LAB_001fc4c5:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x20]
ADD RCX,0x1
CMP RAX,RCX
JNC 0x001fc51f
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
ADD RDX,0x1
SHL RDX,0x1
ADD RCX,RDX
MOV RDX,qword ptr [RSP + 0x20]
ADD RDX,0x1
SUB RCX,RDX
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001fc4c5
LAB_001fc51f:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001ec6c0
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001ec6c0
MOV qword ptr [RSP + 0x28],0x0
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x40]
ADD RSI,0x1
SHL RSI,0x3
CALL 0x001ee350
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x001fc56f
JMP 0x001fc657
LAB_001fc56f:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x20]
ADD RCX,0x1
MOV R8,qword ptr [RSP + 0x38]
MOV R9,qword ptr [RSP + 0x30]
CALL 0x001ed8a0
CMP EAX,0x0
JZ 0x001fc5a0
JMP 0x001fc657
LAB_001fc5a0:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x30]
ADD RCX,0x1
XOR EAX,EAX
MOV R8D,EAX
CALL 0x001ed720
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001ec6c0
LAB_001fc5d1:
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x30]
CMP qword ptr [RAX + RCX*0x8],0x0
JNZ 0x001fc5fd
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x001fc740
CMP EAX,0x0
JGE 0x001fc5fd
JMP 0x001fc64d
LAB_001fc5fd:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x30]
XOR EAX,EAX
MOV R8D,EAX
CALL 0x001ed720
MOV RSI,RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RAX + RCX*0x8]
SUB RDX,RSI
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RDI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x20]
ADD RDX,0x1
MOV ESI,0x1
CALL 0x001ed680
JMP 0x001fc5d1
LAB_001fc64d:
MOV dword ptr [RSP + 0x64],0x0
JMP 0x001fc67d
LAB_001fc657:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001ec6c0
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001ec6c0
MOV dword ptr [RSP + 0x64],0xffffffff
LAB_001fc67d:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
int4
mp_divnorm_large(int8 param_1,long param_2,long param_3,long param_4,long param_5,
ulong param_6)
{
int iVar1;
ulong uVar2;
long lVar3;
ulong local_60;
ulong local_58;
long local_50;
void *local_40;
uVar2 = param_4 - param_6;
local_60 = uVar2;
if (uVar2 < param_6) {
local_60 = uVar2 + 1;
}
local_40 = (void *)bf_malloc(param_1,(local_60 + 1) * 8);
local_50 = bf_malloc(param_1,(local_60 + 1) * 0x10);
if ((local_40 == (void *)0x0) || (local_50 == 0)) goto LAB_001fc657;
if (local_60 < param_6) {
for (local_58 = 0; local_58 < local_60; local_58 = local_58 + 1) {
*(int8 *)(local_50 + local_58 * 8) =
*(int8 *)(param_5 + ((local_58 + param_6) - local_60) * 8);
}
lVar3 = mp_add_ui(local_50,1,local_60);
if (lVar3 == 0) goto LAB_001fc441;
memset(local_40,0,local_60 << 3);
*(int8 *)((long)local_40 + local_60 * 8) = 1;
}
else {
for (local_58 = 0; local_58 < local_60 - param_6; local_58 = local_58 + 1) {
*(int8 *)(local_50 + local_58 * 8) = 0;
}
for (local_58 = 0; local_58 < param_6; local_58 = local_58 + 1) {
*(int8 *)(local_50 + ((local_58 + local_60) - param_6) * 8) =
*(int8 *)(param_5 + local_58 * 8);
}
LAB_001fc441:
iVar1 = mp_recip(param_1,local_40,local_50,local_60);
if (iVar1 != 0) goto LAB_001fc657;
}
iVar1 = mp_mul(param_1,local_50,local_40,local_60 + 1,param_3 + param_4 * 8 + (local_60 + 1) * -8,
local_60 + 1);
if (iVar1 == 0) {
for (local_58 = 0; local_58 < uVar2 + 1; local_58 = local_58 + 1) {
*(int8 *)(param_2 + local_58 * 8) =
*(int8 *)(local_50 + ((local_58 + (local_60 + 1) * 2) - (uVar2 + 1)) * 8);
}
bf_free(param_1,local_50);
bf_free(param_1,local_40);
local_40 = (void *)0x0;
local_50 = bf_malloc(param_1,(param_4 + 1) * 8);
if ((local_50 != 0) &&
(iVar1 = mp_mul(param_1,local_50,param_2,uVar2 + 1,param_5,param_6), iVar1 == 0)) {
mp_sub(param_3,param_3,local_50,param_6 + 1,0);
bf_free(param_1,local_50);
while ((*(long *)(param_3 + param_6 * 8) != 0 ||
(iVar1 = mp_cmp(param_3,param_5,param_6), -1 < iVar1))) {
lVar3 = mp_sub(param_3,param_3,param_5,param_6,0);
*(long *)(param_3 + param_6 * 8) = *(long *)(param_3 + param_6 * 8) - lVar3;
mp_add_ui(param_2,1,uVar2 + 1);
}
return 0;
}
}
LAB_001fc657:
bf_free(param_1,local_40);
bf_free(param_1,local_50);
return 0xffffffff;
}
| |
48,843 | qdevtools::QRectEdit::setRect(QRect const&) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | void setRect(const QRect& value)
{
if (value == rect())
return;
x_->setValue(value.x());
y_->setValue(value.y());
w_->setValue(value.width());
h_->setValue(value.height());
emit valueChanged();
} | O0 | cpp | qdevtools::QRectEdit::setRect(QRect const&):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x32850
movq -0x28(%rbp), %rdi
movq %rax, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x32b30
testb $0x1, %al
jne 0x32be0
jmp 0x32be5
jmp 0x32c6e
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32cb0
movq -0x50(%rbp), %rdi
movl %eax, %esi
callq 0x100c0
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32cc0
movq -0x48(%rbp), %rdi
movl %eax, %esi
callq 0x100c0
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x292f0
movq -0x40(%rbp), %rdi
movl %eax, %esi
callq 0x100c0
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x22310
movq -0x38(%rbp), %rdi
movl %eax, %esi
callq 0x100c0
movq -0x30(%rbp), %rdi
callq 0x103a0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN9qdevtools9QRectEdit7setRectERK5QRect:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
mov [rbp+var_30], rdi
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
call _ZNK9qdevtools9QRectEdit4rectEv; qdevtools::QRectEdit::rect(void)
mov rdi, [rbp+var_28]
mov [rbp+var_20], rax
mov [rbp+var_18], rdx
lea rsi, [rbp+var_20]
call _ZeqRK5QRectS1_; operator==(QRect const&,QRect const&)
test al, 1
jnz short loc_32BE0
jmp short loc_32BE5
loc_32BE0:
jmp loc_32C6E
loc_32BE5:
mov rax, [rbp+var_30]
mov rax, [rax+28h]
mov [rbp+var_50], rax
mov rdi, [rbp+var_10]; this
call _ZNK5QRect1xEv; QRect::x(void)
mov rdi, [rbp+var_50]; this
mov esi, eax; int
call _ZN8QSpinBox8setValueEi; QSpinBox::setValue(int)
mov rax, [rbp+var_30]
mov rax, [rax+30h]
mov [rbp+var_48], rax
mov rdi, [rbp+var_10]; this
call _ZNK5QRect1yEv; QRect::y(void)
mov rdi, [rbp+var_48]; this
mov esi, eax; int
call _ZN8QSpinBox8setValueEi; QSpinBox::setValue(int)
mov rax, [rbp+var_30]
mov rax, [rax+38h]
mov [rbp+var_40], rax
mov rdi, [rbp+var_10]; this
call _ZNK5QRect5widthEv; QRect::width(void)
mov rdi, [rbp+var_40]; this
mov esi, eax; int
call _ZN8QSpinBox8setValueEi; QSpinBox::setValue(int)
mov rax, [rbp+var_30]
mov rax, [rax+40h]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]; this
call _ZNK5QRect6heightEv; QRect::height(void)
mov rdi, [rbp+var_38]; this
mov esi, eax; int
call _ZN8QSpinBox8setValueEi; QSpinBox::setValue(int)
mov rdi, [rbp+var_30]; this
call _ZN9qdevtools13BuiltinEditor12valueChangedEv; qdevtools::BuiltinEditor::valueChanged(void)
loc_32C6E:
add rsp, 50h
pop rbp
retn
| char qdevtools::QRectEdit::setRect(QSpinBox **this, const QRect *a2)
{
long long v2; // rdx
char result; // al
int v4; // eax
int v5; // eax
int v6; // eax
unsigned int v7; // eax
long long v8; // rsi
long long v9; // rdx
long long v10; // rcx
void **v11; // r8
QSpinBox *v12; // [rsp+0h] [rbp-50h]
QSpinBox *v13; // [rsp+8h] [rbp-48h]
QSpinBox *v14; // [rsp+10h] [rbp-40h]
QSpinBox *v15; // [rsp+18h] [rbp-38h]
_QWORD v16[2]; // [rsp+30h] [rbp-20h] BYREF
QRect *v17; // [rsp+40h] [rbp-10h]
qdevtools::QRectEdit *v18; // [rsp+48h] [rbp-8h]
v18 = (qdevtools::QRectEdit *)this;
v17 = a2;
v16[0] = qdevtools::QRectEdit::rect(this);
v16[1] = v2;
result = operator==(a2, v16);
if ( (result & 1) == 0 )
{
v12 = this[5];
v4 = QRect::x(v17);
QSpinBox::setValue(v12, v4);
v13 = this[6];
v5 = QRect::y(v17);
QSpinBox::setValue(v13, v5);
v14 = this[7];
v6 = QRect::width(v17);
QSpinBox::setValue(v14, v6);
v15 = this[8];
v7 = QRect::height(v17);
v8 = v7;
QSpinBox::setValue(v15, v7);
return qdevtools::BuiltinEditor::valueChanged((qdevtools::BuiltinEditor *)this, v8, v9, v10, v11);
}
return result;
}
| setRect:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
CALL 0x00132850
MOV RDI,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x18],RDX
LEA RSI,[RBP + -0x20]
CALL 0x00132b30
TEST AL,0x1
JNZ 0x00132be0
JMP 0x00132be5
LAB_00132be0:
JMP 0x00132c6e
LAB_00132be5:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00132cb0
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,EAX
CALL 0x001100c0
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00132cc0
MOV RDI,qword ptr [RBP + -0x48]
MOV ESI,EAX
CALL 0x001100c0
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001292f0
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,EAX
CALL 0x001100c0
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00122310
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,EAX
CALL 0x001100c0
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001103a0
LAB_00132c6e:
ADD RSP,0x50
POP RBP
RET
|
/* qdevtools::QRectEdit::setRect(QRect const&) */
void __thiscall qdevtools::QRectEdit::setRect(QRectEdit *this,QRect *param_1)
{
int8 uVar1;
ulong uVar2;
QRect local_28 [16];
QRect *local_18;
QRectEdit *local_10;
local_18 = param_1;
local_10 = this;
local_28 = (QRect [16])rect();
uVar2 = operator==(param_1,local_28);
if ((uVar2 & 1) == 0) {
uVar1 = *(int8 *)(this + 0x28);
QRect::x(local_18);
QSpinBox::setValue((int)uVar1);
uVar1 = *(int8 *)(this + 0x30);
QRect::y(local_18);
QSpinBox::setValue((int)uVar1);
uVar1 = *(int8 *)(this + 0x38);
QRect::width(local_18);
QSpinBox::setValue((int)uVar1);
uVar1 = *(int8 *)(this + 0x40);
QRect::height(local_18);
QSpinBox::setValue((int)uVar1);
BuiltinEditor::valueChanged((BuiltinEditor *)this);
}
return;
}
| |
48,844 | qdevtools::QRectEdit::setRect(QRect const&) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | void setRect(const QRect& value)
{
if (value == rect())
return;
x_->setValue(value.x());
y_->setValue(value.y());
w_->setValue(value.width());
h_->setValue(value.height());
emit valueChanged();
} | O2 | cpp | qdevtools::QRectEdit::setRect(QRect const&):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1ccba
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r14, %rdi
callq 0x1cda1
testb %al, %al
jne 0x1ce2a
movq 0x28(%rbx), %rdi
movl (%r14), %esi
callq 0xfcf0
movq 0x30(%rbx), %rdi
movl 0x4(%r14), %esi
callq 0xfcf0
movq 0x38(%rbx), %rdi
movl 0x8(%r14), %esi
subl (%r14), %esi
incl %esi
callq 0xfcf0
movq 0x40(%rbx), %rdi
movl 0xc(%r14), %esi
subl 0x4(%r14), %esi
incl %esi
callq 0xfcf0
movq %rbx, %rdi
callq 0x10290
addq $0x18, %rsp
popq %rbx
popq %r14
retq
| _ZN9qdevtools9QRectEdit7setRectERK5QRect:
push r14
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
call _ZNK9qdevtools9QRectEdit4rectEv; qdevtools::QRectEdit::rect(void)
lea rsi, [rsp+28h+var_20]
mov [rsi], rax
mov [rsi+8], rdx
mov rdi, r14
call _ZeqRK5QRectS1_; operator==(QRect const&,QRect const&)
test al, al
jnz short loc_1CE2A
mov rdi, [rbx+28h]; this
mov esi, [r14]; int
call __ZN8QSpinBox8setValueEi; QSpinBox::setValue(int)
mov rdi, [rbx+30h]; this
mov esi, [r14+4]; int
call __ZN8QSpinBox8setValueEi; QSpinBox::setValue(int)
mov rdi, [rbx+38h]; this
mov esi, [r14+8]
sub esi, [r14]
inc esi; int
call __ZN8QSpinBox8setValueEi; QSpinBox::setValue(int)
mov rdi, [rbx+40h]; this
mov esi, [r14+0Ch]
sub esi, [r14+4]
inc esi; int
call __ZN8QSpinBox8setValueEi; QSpinBox::setValue(int)
mov rdi, rbx; this
call _ZN9qdevtools13BuiltinEditor12valueChangedEv; qdevtools::BuiltinEditor::valueChanged(void)
loc_1CE2A:
add rsp, 18h
pop rbx
pop r14
retn
| char qdevtools::QRectEdit::setRect(QSpinBox **this, const __m128i *a2)
{
long long v2; // rdx
char result; // al
long long v4; // rsi
long long v5; // rdx
long long v6; // rcx
void **v7; // r8
__m128i v8; // [rsp+8h] [rbp-20h] BYREF
v8.m128i_i64[0] = qdevtools::QRectEdit::rect(this);
v8.m128i_i64[1] = v2;
result = operator==(a2, &v8);
if ( !result )
{
QSpinBox::setValue(this[5], a2->m128i_i32[0]);
QSpinBox::setValue(this[6], a2->m128i_i32[1]);
QSpinBox::setValue(this[7], a2->m128i_i32[2] - a2->m128i_i32[0] + 1);
v4 = (unsigned int)(a2->m128i_i32[3] - a2->m128i_i32[1] + 1);
QSpinBox::setValue(this[8], v4);
return qdevtools::BuiltinEditor::valueChanged((qdevtools::BuiltinEditor *)this, v4, v5, v6, v7);
}
return result;
}
| setRect:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
CALL 0x0011ccba
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
MOV qword ptr [RSI + 0x8],RDX
MOV RDI,R14
CALL 0x0011cda1
TEST AL,AL
JNZ 0x0011ce2a
MOV RDI,qword ptr [RBX + 0x28]
MOV ESI,dword ptr [R14]
CALL 0x0010fcf0
MOV RDI,qword ptr [RBX + 0x30]
MOV ESI,dword ptr [R14 + 0x4]
CALL 0x0010fcf0
MOV RDI,qword ptr [RBX + 0x38]
MOV ESI,dword ptr [R14 + 0x8]
SUB ESI,dword ptr [R14]
INC ESI
CALL 0x0010fcf0
MOV RDI,qword ptr [RBX + 0x40]
MOV ESI,dword ptr [R14 + 0xc]
SUB ESI,dword ptr [R14 + 0x4]
INC ESI
CALL 0x0010fcf0
MOV RDI,RBX
CALL 0x00110290
LAB_0011ce2a:
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* qdevtools::QRectEdit::setRect(QRect const&) */
void __thiscall qdevtools::QRectEdit::setRect(QRectEdit *this,QRect *param_1)
{
char cVar1;
int8 extraout_RDX;
int8 local_20;
int8 local_18;
local_20 = rect();
local_18 = extraout_RDX;
cVar1 = operator==(param_1,(QRect *)&local_20);
if (cVar1 == '\0') {
QSpinBox::setValue((int)*(int8 *)(this + 0x28));
QSpinBox::setValue((int)*(int8 *)(this + 0x30));
QSpinBox::setValue((int)*(int8 *)(this + 0x38));
QSpinBox::setValue((int)*(int8 *)(this + 0x40));
BuiltinEditor::valueChanged((BuiltinEditor *)this);
}
return;
}
| |
48,845 | qdevtools::QRectEdit::setRect(QRect const&) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | void setRect(const QRect& value)
{
if (value == rect())
return;
x_->setValue(value.x());
y_->setValue(value.y());
w_->setValue(value.width());
h_->setValue(value.height());
emit valueChanged();
} | O3 | cpp | qdevtools::QRectEdit::setRect(QRect const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1ee4e
movl (%r14), %esi
cmpl %eax, %esi
jne 0x1ef86
cmpl %edx, 0x8(%r14)
jne 0x1ef86
shrq $0x20, %rax
cmpl %eax, 0x4(%r14)
jne 0x1ef86
shrq $0x20, %rdx
cmpl %edx, 0xc(%r14)
jne 0x1ef86
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x28(%rbx), %rdi
callq 0xfcc0
movq 0x30(%rbx), %rdi
movl 0x4(%r14), %esi
callq 0xfcc0
movq 0x38(%rbx), %rdi
movl 0x8(%r14), %esi
subl (%r14), %esi
incl %esi
callq 0xfcc0
movq 0x40(%rbx), %rdi
movl 0xc(%r14), %esi
subl 0x4(%r14), %esi
incl %esi
callq 0xfcc0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10a0e
| _ZN9qdevtools9QRectEdit7setRectERK5QRect:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _ZNK9qdevtools9QRectEdit4rectEv; qdevtools::QRectEdit::rect(void)
mov esi, [r14]; int
cmp esi, eax
jnz short loc_1EF86
cmp [r14+8], edx
jnz short loc_1EF86
shr rax, 20h
cmp [r14+4], eax
jnz short loc_1EF86
shr rdx, 20h
cmp [r14+0Ch], edx
jnz short loc_1EF86
add rsp, 8
pop rbx
pop r14
retn
loc_1EF86:
mov rdi, [rbx+28h]; this
call __ZN8QSpinBox8setValueEi; QSpinBox::setValue(int)
mov rdi, [rbx+30h]; this
mov esi, [r14+4]; int
call __ZN8QSpinBox8setValueEi; QSpinBox::setValue(int)
mov rdi, [rbx+38h]; this
mov esi, [r14+8]
sub esi, [r14]
inc esi; int
call __ZN8QSpinBox8setValueEi; QSpinBox::setValue(int)
mov rdi, [rbx+40h]; this
mov esi, [r14+0Ch]
sub esi, [r14+4]
inc esi; int
call __ZN8QSpinBox8setValueEi; QSpinBox::setValue(int)
mov rdi, rbx; this
add rsp, 8
pop rbx
pop r14
jmp _ZN9qdevtools13BuiltinEditor12valueChangedEv; qdevtools::BuiltinEditor::valueChanged(void)
| unsigned long long qdevtools::QRectEdit::setRect(QSpinBox **this, int *a2)
{
unsigned long long v3; // rax
int v4; // edx
int v5; // rdx^4
int v6; // esi
unsigned long long result; // rax
long long v8; // rsi
long long v9; // rdx
long long v10; // rcx
void **v11; // r8
v3 = qdevtools::QRectEdit::rect(this);
v6 = *a2;
if ( v6 != (_DWORD)v3 || a2[2] != v4 || (result = HIDWORD(v3), a2[1] != (_DWORD)result) || a2[3] != v5 )
{
QSpinBox::setValue(this[5], v6);
QSpinBox::setValue(this[6], a2[1]);
QSpinBox::setValue(this[7], a2[2] - *a2 + 1);
v8 = (unsigned int)(a2[3] - a2[1] + 1);
QSpinBox::setValue(this[8], v8);
return qdevtools::BuiltinEditor::valueChanged((qdevtools::BuiltinEditor *)this, v8, v9, v10, v11);
}
return result;
}
| setRect:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0011ee4e
MOV ESI,dword ptr [R14]
CMP ESI,EAX
JNZ 0x0011ef86
CMP dword ptr [R14 + 0x8],EDX
JNZ 0x0011ef86
SHR RAX,0x20
CMP dword ptr [R14 + 0x4],EAX
JNZ 0x0011ef86
SHR RDX,0x20
CMP dword ptr [R14 + 0xc],EDX
JNZ 0x0011ef86
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0011ef86:
MOV RDI,qword ptr [RBX + 0x28]
CALL 0x0010fcc0
MOV RDI,qword ptr [RBX + 0x30]
MOV ESI,dword ptr [R14 + 0x4]
CALL 0x0010fcc0
MOV RDI,qword ptr [RBX + 0x38]
MOV ESI,dword ptr [R14 + 0x8]
SUB ESI,dword ptr [R14]
INC ESI
CALL 0x0010fcc0
MOV RDI,qword ptr [RBX + 0x40]
MOV ESI,dword ptr [R14 + 0xc]
SUB ESI,dword ptr [R14 + 0x4]
INC ESI
CALL 0x0010fcc0
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00110a0e
|
/* qdevtools::QRectEdit::setRect(QRect const&) */
void __thiscall qdevtools::QRectEdit::setRect(QRectEdit *this,QRect *param_1)
{
int1 auVar1 [16];
auVar1 = rect();
if ((((*(int *)param_1 == auVar1._0_4_) && (*(int *)(param_1 + 8) == auVar1._8_4_)) &&
(*(int *)(param_1 + 4) == auVar1._4_4_)) && (*(int *)(param_1 + 0xc) == auVar1._12_4_)) {
return;
}
QSpinBox::setValue((int)*(int8 *)(this + 0x28));
QSpinBox::setValue((int)*(int8 *)(this + 0x30));
QSpinBox::setValue((int)*(int8 *)(this + 0x38));
QSpinBox::setValue((int)*(int8 *)(this + 0x40));
BuiltinEditor::valueChanged((BuiltinEditor *)this);
return;
}
| |
48,846 | mi_munmap_file | eloqsql/storage/myisam/mi_dynrec.c | int mi_munmap_file(MI_INFO *info)
{
int ret;
DBUG_ENTER("mi_unmap_file");
if ((ret= my_munmap((void*) info->s->file_map, info->s->mmaped_length)))
DBUG_RETURN(ret);
info->s->file_read= mi_nommap_pread;
info->s->file_write= mi_nommap_pwrite;
info->s->file_map= 0;
info->s->mmaped_length= 0;
DBUG_RETURN(0);
} | O0 | c | mi_munmap_file:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x270(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x4d0(%rax), %rsi
callq 0x2a4a0
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0xa6d7f
jmp 0xa6d77
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa6dd4
movq -0x10(%rbp), %rax
movq (%rax), %rax
leaq 0x53(%rip), %rcx # 0xa6de0
movq %rcx, 0x2e0(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
leaq 0x9e(%rip), %rcx # 0xa6e40
movq %rcx, 0x2e8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq $0x0, 0x270(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq $0x0, 0x4d0(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| mi_munmap_file:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov rdi, [rax+270h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+4D0h]
call _munmap
mov [rbp+var_14], eax
cmp eax, 0
jz short loc_A6D7F
jmp short $+2
loc_A6D77:
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
jmp short loc_A6DD4
loc_A6D7F:
mov rax, [rbp+var_10]
mov rax, [rax]
lea rcx, mi_nommap_pread
mov [rax+2E0h], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
lea rcx, mi_nommap_pwrite
mov [rax+2E8h], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov qword ptr [rax+270h], 0
mov rax, [rbp+var_10]
mov rax, [rax]
mov qword ptr [rax+4D0h], 0
mov [rbp+var_4], 0
loc_A6DD4:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long mi_munmap_file(long long a1)
{
unsigned int v2; // [rsp+Ch] [rbp-14h]
v2 = munmap(*(_QWORD *)(*(_QWORD *)a1 + 624LL), *(_QWORD *)(*(_QWORD *)a1 + 1232LL));
if ( v2 )
{
return v2;
}
else
{
*(_QWORD *)(*(_QWORD *)a1 + 736LL) = mi_nommap_pread;
*(_QWORD *)(*(_QWORD *)a1 + 744LL) = mi_nommap_pwrite;
*(_QWORD *)(*(_QWORD *)a1 + 624LL) = 0LL;
*(_QWORD *)(*(_QWORD *)a1 + 1232LL) = 0LL;
return 0;
}
}
| mi_munmap_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x270]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x4d0]
CALL 0x0012a4a0
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JZ 0x001a6d7f
JMP 0x001a6d77
LAB_001a6d77:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001a6dd4
LAB_001a6d7f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
LEA RCX,[0x1a6de0]
MOV qword ptr [RAX + 0x2e0],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
LEA RCX,[0x1a6e40]
MOV qword ptr [RAX + 0x2e8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x270],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x4d0],0x0
MOV dword ptr [RBP + -0x4],0x0
LAB_001a6dd4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int mi_munmap_file(long *param_1)
{
int local_c;
local_c = munmap(*(void **)(*param_1 + 0x270),*(size_t *)(*param_1 + 0x4d0));
if (local_c == 0) {
*(code **)(*param_1 + 0x2e0) = mi_nommap_pread;
*(code **)(*param_1 + 0x2e8) = mi_nommap_pwrite;
*(int8 *)(*param_1 + 0x270) = 0;
*(int8 *)(*param_1 + 0x4d0) = 0;
local_c = 0;
}
return local_c;
}
| |
48,847 | mi_munmap_file | eloqsql/storage/myisam/mi_dynrec.c | int mi_munmap_file(MI_INFO *info)
{
int ret;
DBUG_ENTER("mi_unmap_file");
if ((ret= my_munmap((void*) info->s->file_map, info->s->mmaped_length)))
DBUG_RETURN(ret);
info->s->file_read= mi_nommap_pread;
info->s->file_write= mi_nommap_pwrite;
info->s->file_map= 0;
info->s->mmaped_length= 0;
DBUG_RETURN(0);
} | O3 | c | mi_munmap_file:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x270(%rax), %rdi
movq 0x4d0(%rax), %rsi
callq 0x294e0
testl %eax, %eax
jne 0x76a29
movq (%rbx), %rcx
leaq 0x35(%rip), %rdx # 0x76a30
movq %rdx, 0x2e0(%rcx)
movq (%rbx), %rcx
leaq 0xfe(%rip), %rdx # 0x76b0a
movq %rdx, 0x2e8(%rcx)
movq (%rbx), %rcx
xorl %edx, %edx
movq %rdx, 0x270(%rcx)
movq (%rbx), %rcx
movq %rdx, 0x4d0(%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mi_munmap_file:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rax, [rdi]
mov rdi, [rax+270h]
mov rsi, [rax+4D0h]
call _munmap
test eax, eax
jnz short loc_76A29
mov rcx, [rbx]
lea rdx, mi_nommap_pread
mov [rcx+2E0h], rdx
mov rcx, [rbx]
lea rdx, mi_nommap_pwrite
mov [rcx+2E8h], rdx
mov rcx, [rbx]
xor edx, edx
mov [rcx+270h], rdx
mov rcx, [rbx]
mov [rcx+4D0h], rdx
loc_76A29:
add rsp, 8
pop rbx
pop rbp
retn
| long long mi_munmap_file(long long a1)
{
long long result; // rax
result = munmap(*(_QWORD *)(*(_QWORD *)a1 + 624LL), *(_QWORD *)(*(_QWORD *)a1 + 1232LL));
if ( !(_DWORD)result )
{
*(_QWORD *)(*(_QWORD *)a1 + 736LL) = mi_nommap_pread;
*(_QWORD *)(*(_QWORD *)a1 + 744LL) = mi_nommap_pwrite;
*(_QWORD *)(*(_QWORD *)a1 + 624LL) = 0LL;
*(_QWORD *)(*(_QWORD *)a1 + 1232LL) = 0LL;
}
return result;
}
| mi_munmap_file:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV RDI,qword ptr [RAX + 0x270]
MOV RSI,qword ptr [RAX + 0x4d0]
CALL 0x001294e0
TEST EAX,EAX
JNZ 0x00176a29
MOV RCX,qword ptr [RBX]
LEA RDX,[0x176a30]
MOV qword ptr [RCX + 0x2e0],RDX
MOV RCX,qword ptr [RBX]
LEA RDX,[0x176b0a]
MOV qword ptr [RCX + 0x2e8],RDX
MOV RCX,qword ptr [RBX]
XOR EDX,EDX
MOV qword ptr [RCX + 0x270],RDX
MOV RCX,qword ptr [RBX]
MOV qword ptr [RCX + 0x4d0],RDX
LAB_00176a29:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mi_munmap_file(long *param_1)
{
int iVar1;
iVar1 = munmap(*(void **)(*param_1 + 0x270),*(size_t *)(*param_1 + 0x4d0));
if (iVar1 == 0) {
*(code **)(*param_1 + 0x2e0) = mi_nommap_pread;
*(code **)(*param_1 + 0x2e8) = mi_nommap_pwrite;
*(int8 *)(*param_1 + 0x270) = 0;
*(int8 *)(*param_1 + 0x4d0) = 0;
}
return;
}
| |
48,848 | ggml_backend_registry::~ggml_backend_registry() | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend-reg.cpp | ~ggml_backend_registry() {
// FIXME: backends cannot be safely unloaded without a function to destroy all the backend resources,
// since backend threads may still be running and accessing resources from the dynamic library
for (auto & entry : backends) {
if (entry.handle) {
entry.handle.release(); // NOLINT
}
}
} | O2 | cpp | ggml_backend_registry::~ggml_backend_registry():
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
je 0xc72e
cmpq $0x0, 0x8(%rax)
je 0xc728
andq $0x0, 0x8(%rax)
addq $0x10, %rax
jmp 0xc717
leaq 0x18(%rbx), %rdi
callq 0xa980
movq %rbx, %rdi
popq %rbx
jmp 0xaa50
| _ZN21ggml_backend_registryD2Ev:
push rbx
mov rbx, rdi
mov rax, [rdi]
mov rcx, [rdi+8]
loc_C717:
cmp rax, rcx
jz short loc_C72E
cmp qword ptr [rax+8], 0
jz short loc_C728
and qword ptr [rax+8], 0
loc_C728:
add rax, 10h
jmp short loc_C717
loc_C72E:
lea rdi, [rbx+18h]
call __ZNSt12_Vector_baseIP19ggml_backend_deviceSaIS1_EED2Ev; std::_Vector_base<ggml_backend_device *>::~_Vector_base()
mov rdi, rbx
pop rbx
jmp __ZNSt6vectorI22ggml_backend_reg_entrySaIS0_EED2Ev; std::vector<ggml_backend_reg_entry>::~vector()
| void ggml_backend_registry::~ggml_backend_registry(ggml_backend_registry *this)
{
long long v1; // rax
long long v2; // rcx
v1 = *(_QWORD *)this;
v2 = *((_QWORD *)this + 1);
while ( v1 != v2 )
{
if ( *(_QWORD *)(v1 + 8) )
*(_QWORD *)(v1 + 8) = 0LL;
v1 += 16LL;
}
std::_Vector_base<ggml_backend_device *>::~_Vector_base((char *)this + 24);
std::vector<ggml_backend_reg_entry>::~vector(this);
}
| ~ggml_backend_registry:
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
LAB_0010c717:
CMP RAX,RCX
JZ 0x0010c72e
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0010c728
AND qword ptr [RAX + 0x8],0x0
LAB_0010c728:
ADD RAX,0x10
JMP 0x0010c717
LAB_0010c72e:
LEA RDI,[RBX + 0x18]
CALL 0x0010a980
MOV RDI,RBX
POP RBX
JMP 0x0010aa50
|
/* ggml_backend_registry::~ggml_backend_registry() */
void __thiscall ggml_backend_registry::~ggml_backend_registry(ggml_backend_registry *this)
{
long lVar1;
long lVar2;
lVar1 = *(long *)(this + 8);
for (lVar2 = *(long *)this; lVar2 != lVar1; lVar2 = lVar2 + 0x10) {
if (*(long *)(lVar2 + 8) != 0) {
*(int8 *)(lVar2 + 8) = 0;
}
}
std::_Vector_base<ggml_backend_device*,std::allocator<ggml_backend_device*>>::~_Vector_base
((_Vector_base<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)
(this + 0x18));
std::vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>>::~vector
((vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>> *)this);
return;
}
| |
48,849 | ggml_backend_registry::~ggml_backend_registry() | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend-reg.cpp | ~ggml_backend_registry() {
// FIXME: backends cannot be safely unloaded without a function to destroy all the backend resources,
// since backend threads may still be running and accessing resources from the dynamic library
for (auto & entry : backends) {
if (entry.handle) {
entry.handle.release(); // NOLINT
}
}
} | O3 | cpp | ggml_backend_registry::~ggml_backend_registry():
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
je 0x8e39
cmpq $0x0, 0x8(%rax)
je 0x8e33
movq $0x0, 0x8(%rax)
addq $0x10, %rax
jmp 0x8e1f
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x8e4e
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x6540
movq %rbx, %rdi
popq %rbx
jmp 0x6610
nop
| _ZN21ggml_backend_registryD2Ev:
push rbx
mov rbx, rdi
mov rax, [rdi]
mov rcx, [rdi+8]
loc_8E1F:
cmp rax, rcx
jz short loc_8E39
cmp qword ptr [rax+8], 0
jz short loc_8E33
mov qword ptr [rax+8], 0
loc_8E33:
add rax, 10h
jmp short loc_8E1F
loc_8E39:
mov rdi, [rbx+18h]; void *
test rdi, rdi
jz short loc_8E4E
mov rsi, [rbx+28h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8E4E:
mov rdi, rbx
pop rbx
jmp __ZNSt6vectorI22ggml_backend_reg_entrySaIS0_EED2Ev; std::vector<ggml_backend_reg_entry>::~vector()
| void ggml_backend_registry::~ggml_backend_registry(ggml_backend_registry *this)
{
long long v2; // rax
long long v3; // rcx
void *v4; // rdi
v2 = *(_QWORD *)this;
v3 = *((_QWORD *)this + 1);
while ( v2 != v3 )
{
if ( *(_QWORD *)(v2 + 8) )
*(_QWORD *)(v2 + 8) = 0LL;
v2 += 16LL;
}
v4 = (void *)*((_QWORD *)this + 3);
if ( v4 )
operator delete(v4, *((_QWORD *)this + 5) - (_QWORD)v4);
std::vector<ggml_backend_reg_entry>::~vector(this);
}
| ~ggml_backend_registry:
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
LAB_00108e1f:
CMP RAX,RCX
JZ 0x00108e39
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00108e33
MOV qword ptr [RAX + 0x8],0x0
LAB_00108e33:
ADD RAX,0x10
JMP 0x00108e1f
LAB_00108e39:
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x00108e4e
MOV RSI,qword ptr [RBX + 0x28]
SUB RSI,RDI
CALL 0x00106540
LAB_00108e4e:
MOV RDI,RBX
POP RBX
JMP 0x00106610
|
/* ggml_backend_registry::~ggml_backend_registry() */
void __thiscall ggml_backend_registry::~ggml_backend_registry(ggml_backend_registry *this)
{
long lVar1;
void *pvVar2;
long lVar3;
lVar1 = *(long *)(this + 8);
for (lVar3 = *(long *)this; lVar3 != lVar1; lVar3 = lVar3 + 0x10) {
if (*(long *)(lVar3 + 8) != 0) {
*(int8 *)(lVar3 + 8) = 0;
}
}
pvVar2 = *(void **)(this + 0x18);
if (pvVar2 != (void *)0x0) {
operator_delete(pvVar2,*(long *)(this + 0x28) - (long)pvVar2);
}
std::vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>>::~vector
((vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>> *)this);
return;
}
| |
48,850 | has_path | eloqsql/mysys/my_getwd.c | my_bool has_path(const char *name)
{
return MY_TEST(strchr(name, FN_LIBCHAR))
#if FN_LIBCHAR != '/'
|| MY_TEST(strchr(name, '/'))
#endif
#ifdef FN_DEVCHAR
|| MY_TEST(strchr(name, FN_DEVCHAR))
#endif
;
} | O0 | c | has_path:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2f, %esi
callq 0x24100
movq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| has_path:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov esi, 2Fh ; '/'
call _strchr
mov rdx, rax
xor eax, eax
mov ecx, 1
cmp rdx, 0
cmovnz eax, ecx
add rsp, 10h
pop rbp
retn
| _BOOL8 has_path(long long a1)
{
return strchr(a1, 47LL) != 0;
}
| has_path:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x2f
CALL 0x00124100
MOV RDX,RAX
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,0x0
CMOVNZ EAX,ECX
ADD RSP,0x10
POP RBP
RET
|
bool has_path(char *param_1)
{
char *pcVar1;
pcVar1 = strchr(param_1,0x2f);
return pcVar1 != (char *)0x0;
}
| |
48,851 | psi_rwlock_trywrlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_rwlock_trywrlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_TRYWRITELOCK, file, line);
int result= rw_trywrlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
} | O0 | c | psi_rwlock_trywrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1b16ae(%rip), %rax # 0x1e4ca8
movq (%rax), %rax
movq 0x1b0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x3, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x33e90
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x33653
leaq 0x1b1668(%rip), %rax # 0x1e4ca8
movq (%rax), %rax
movq 0x1b8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| psi_rwlock_trywrlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+90h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 3
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call my_rw_trywrlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_33653
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_33653:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_rwlock_trywrlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 54))(
v6,
*(_QWORD *)(a1 + 144),
3LL,
a2,
a3);
v4 = my_rw_trywrlock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v5, v4);
return v4;
}
| psi_rwlock_trywrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x2e4ca8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x3
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00133e90
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00133653
LEA RAX,[0x2e4ca8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_00133653:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_trywrlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1b0))
(local_50,*(int8 *)(param_1 + 0x90),3,param_2,param_3);
uVar1 = my_rw_trywrlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
| |
48,852 | find_all_keys | eloqsql/storage/myisam/sort.c | static ha_rows find_all_keys(MI_SORT_PARAM *info, ha_rows keys,
uchar **sort_keys, DYNAMIC_ARRAY *buffpek,
uint *maxbuffer, IO_CACHE *tempfile,
IO_CACHE *tempfile_for_exceptions)
{
int error;
ha_rows idx;
DBUG_ENTER("find_all_keys");
idx=error=0;
sort_keys[0]=(uchar*) (sort_keys+keys);
while (!(error=(*info->key_read)(info,sort_keys[idx])))
{
if (info->real_key_length > info->key_length)
{
if (write_key(info,sort_keys[idx],tempfile_for_exceptions))
DBUG_RETURN(HA_POS_ERROR); /* purecov: inspected */
continue;
}
if (++idx == keys)
{
if (info->write_keys(info,sort_keys,idx-1,(BUFFPEK *)alloc_dynamic(buffpek),
tempfile))
DBUG_RETURN(HA_POS_ERROR); /* purecov: inspected */
sort_keys[0]=(uchar*) (sort_keys+keys);
memcpy(sort_keys[0],sort_keys[idx-1],(size_t) info->key_length);
idx=1;
}
sort_keys[idx]=sort_keys[idx-1]+info->key_length;
}
if (error > 0)
DBUG_RETURN(HA_POS_ERROR); /* Aborted by get_key */ /* purecov: inspected */
if (buffpek->elements)
{
if (info->write_keys(info,sort_keys,idx,(BUFFPEK *)alloc_dynamic(buffpek),
tempfile))
DBUG_RETURN(HA_POS_ERROR); /* purecov: inspected */
*maxbuffer=buffpek->elements-1;
}
else
*maxbuffer=0;
DBUG_RETURN((*maxbuffer)*(keys-1)+idx);
} | O0 | c | find_all_keys:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x668(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq -0x48(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
callq *%rax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x129bc2d
jmp 0x129bd5d
movq -0x10(%rbp), %rax
movl 0x638(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x634(%rcx), %eax
jbe 0x129bc72
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x10(%rbp), %rdx
callq 0x129dcb0
cmpl $0x0, %eax
je 0x129bc70
jmp 0x129bc63
movq $-0x1, -0x8(%rbp)
jmp 0x129be14
jmp 0x129bbfc
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
cmpq -0x18(%rbp), %rax
jne 0x129bd2f
movq -0x10(%rbp), %rax
movq 0x680(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x12a4240
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %r8
callq *%rax
cmpl $0x0, %eax
je 0x129bce9
jmp 0x129bcdc
movq $-0x1, -0x8(%rbp)
jmp 0x129be14
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq -0x48(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rsi
movq -0x10(%rbp), %rax
movl 0x634(%rax), %eax
movl %eax, %edx
callq 0x759350
movq $0x1, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq -0x48(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movl 0x634(%rax), %eax
addq %rax, %rdx
movq -0x20(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x129bbfc
cmpl $0x0, -0x3c(%rbp)
jle 0x129bd72
jmp 0x129bd65
movq $-0x1, -0x8(%rbp)
jmp 0x129be14
movq -0x28(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x129bdee
movq -0x10(%rbp), %rax
movq 0x680(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rdi
callq 0x12a4240
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq %rax, %rcx
movq -0x70(%rbp), %rax
movq -0x38(%rbp), %r8
callq *%rax
cmpl $0x0, %eax
je 0x129bddc
jmp 0x129bdd2
movq $-0x1, -0x8(%rbp)
jmp 0x129be14
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
subl $0x1, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
jmp 0x129bdf8
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
jmp 0x129bdfa
movq -0x30(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
imulq %rcx, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| find_all_keys_0:
push rbp
mov rbp, rsp
sub rsp, 90h
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov [rbp+var_3C], 0
mov [rbp+var_48], 0
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
shl rax, 3
add rcx, rax
mov rax, [rbp+var_20]
mov [rax], rcx
loc_129BBFC:
mov rax, [rbp+var_10]
mov rax, [rax+668h]
mov rdi, [rbp+var_10]
mov rcx, [rbp+var_20]
mov rdx, [rbp+var_48]
mov rsi, [rcx+rdx*8]
call rax
mov [rbp+var_3C], eax
cmp eax, 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_129BC2D
jmp loc_129BD5D
loc_129BC2D:
mov rax, [rbp+var_10]
mov eax, [rax+638h]
mov rcx, [rbp+var_10]
cmp eax, [rcx+634h]
jbe short loc_129BC72
mov rdi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rcx, [rbp+var_48]
mov rsi, [rax+rcx*8]
mov rdx, [rbp+arg_0]
call write_key_0
cmp eax, 0
jz short loc_129BC70
jmp short $+2
loc_129BC63:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_129BE14
loc_129BC70:
jmp short loc_129BBFC
loc_129BC72:
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
cmp rax, [rbp+var_18]
jnz loc_129BD2F
mov rax, [rbp+var_10]
mov rax, [rax+680h]
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
mov [rbp+var_68], rax
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_48]
sub rax, 1
mov [rbp+var_58], rax
mov rdi, [rbp+var_28]
call alloc_dynamic
mov rdi, [rbp+var_68]
mov rsi, [rbp+var_60]
mov rdx, [rbp+var_58]
mov rcx, rax
mov rax, [rbp+var_50]
mov r8, [rbp+var_38]
call rax
cmp eax, 0
jz short loc_129BCE9
jmp short $+2
loc_129BCDC:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_129BE14
loc_129BCE9:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
shl rax, 3
add rcx, rax
mov rax, [rbp+var_20]
mov [rax], rcx
mov rax, [rbp+var_20]
mov rdi, [rax]
mov rax, [rbp+var_20]
mov rcx, [rbp+var_48]
sub rcx, 1
mov rsi, [rax+rcx*8]
mov rax, [rbp+var_10]
mov eax, [rax+634h]
mov edx, eax
call _memcpy
mov [rbp+var_48], 1
loc_129BD2F:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_48]
sub rcx, 1
mov rdx, [rax+rcx*8]
mov rax, [rbp+var_10]
mov eax, [rax+634h]
add rdx, rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_48]
mov [rax+rcx*8], rdx
jmp loc_129BBFC
loc_129BD5D:
cmp [rbp+var_3C], 0
jle short loc_129BD72
jmp short $+2
loc_129BD65:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_129BE14
loc_129BD72:
mov rax, [rbp+var_28]
cmp dword ptr [rax+8], 0
jz short loc_129BDEE
mov rax, [rbp+var_10]
mov rax, [rax+680h]
mov [rbp+var_70], rax
mov rax, [rbp+var_10]
mov [rbp+var_88], rax
mov rax, [rbp+var_20]
mov [rbp+var_80], rax
mov rax, [rbp+var_48]
mov [rbp+var_78], rax
mov rdi, [rbp+var_28]
call alloc_dynamic
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_78]
mov rcx, rax
mov rax, [rbp+var_70]
mov r8, [rbp+var_38]
call rax
cmp eax, 0
jz short loc_129BDDC
jmp short $+2
loc_129BDD2:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_129BE14
loc_129BDDC:
mov rax, [rbp+var_28]
mov ecx, [rax+8]
sub ecx, 1
mov rax, [rbp+var_30]
mov [rax], ecx
jmp short loc_129BDF8
loc_129BDEE:
mov rax, [rbp+var_30]
mov dword ptr [rax], 0
loc_129BDF8:
jmp short $+2
loc_129BDFA:
mov rax, [rbp+var_30]
mov eax, [rax]
mov rcx, [rbp+var_18]
sub rcx, 1
imul rax, rcx
add rax, [rbp+var_48]
mov [rbp+var_8], rax
loc_129BE14:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
| long long find_all_keys_0(long long a1, long long a2, _QWORD *a3, long long a4, _DWORD *a5, long long a6, long long a7)
{
long long v7; // rax
long long v8; // rax
unsigned int ( *v10)(long long, _QWORD *, long long, long long, long long); // [rsp+20h] [rbp-70h]
unsigned int ( *v11)(long long, _QWORD *, long long, long long, long long); // [rsp+40h] [rbp-50h]
long long v12; // [rsp+48h] [rbp-48h]
int v13; // [rsp+54h] [rbp-3Ch]
v12 = 0LL;
*a3 = &a3[a2];
while ( 1 )
{
v13 = (*(long long ( **)(long long, _QWORD))(a1 + 1640))(a1, a3[v12]);
if ( v13 )
break;
if ( *(_DWORD *)(a1 + 1592) <= *(_DWORD *)(a1 + 1588) )
{
if ( ++v12 == a2 )
{
v11 = *(unsigned int ( **)(long long, _QWORD *, long long, long long, long long))(a1 + 1664);
v7 = alloc_dynamic(a4);
if ( v11(a1, a3, v12 - 1, v7, a6) )
return -1LL;
*a3 = &a3[a2];
memcpy(*a3, a3[v12 - 1], *(unsigned int *)(a1 + 1588));
v12 = 1LL;
}
a3[v12] = *(unsigned int *)(a1 + 1588) + a3[v12 - 1];
}
else if ( (unsigned int)write_key_0(a1, a3[v12], a7) )
{
return -1LL;
}
}
if ( v13 <= 0 )
{
if ( *(_DWORD *)(a4 + 8) )
{
v10 = *(unsigned int ( **)(long long, _QWORD *, long long, long long, long long))(a1 + 1664);
v8 = alloc_dynamic(a4);
if ( v10(a1, a3, v12, v8, a6) )
return -1LL;
*a5 = *(_DWORD *)(a4 + 8) - 1;
}
else
{
*a5 = 0;
}
return v12 + (a2 - 1) * (unsigned int)*a5;
}
return -1LL;
}
| load_sys_tables:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0129bbc6
LAB_0129bbc6:
MOV RDI,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x9],0x0
LEA RSI,[0x152f24b]
MOV EDX,0x51d
CALL 0x010c4310
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x2696fd0]
ADD RSI,0x40
MOV EDX,0x1
CALL 0x012b15c0
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX + 0x90],RAX
CMP RAX,0x0
JNZ 0x0129bc0b
JMP 0x0129bc7f
LAB_0129bc0b:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x90]
CMP qword ptr [RAX + 0x90],0x3
JNZ 0x0129bc50
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x90]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x2a
AND RAX,0x3ff
CMP EAX,0x7
JNZ 0x0129bc50
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RDI + 0x90]
CALL 0x0129ea10
JMP 0x0129bc7d
LAB_0129bc50:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x90],0x0
MOV byte ptr [RBP + -0x9],0x1
LEA RDI,[0x152f24b]
MOV ESI,0x527
LEA RDX,[0x152f2bc]
MOV AL,0x0
CALL 0x00e29700
LAB_0129bc7d:
JMP 0x0129bc7f
LAB_0129bc7f:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x2696fd0]
ADD RSI,0x50
MOV EDX,0x1
CALL 0x012b15c0
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX + 0x98],RAX
CMP RAX,0x0
JNZ 0x0129bcab
JMP 0x0129bd1f
LAB_0129bcab:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x98]
CMP qword ptr [RAX + 0x90],0x1
JNZ 0x0129bcf0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x98]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x2a
AND RAX,0x3ff
CMP EAX,0x7
JNZ 0x0129bcf0
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RDI + 0x98]
CALL 0x0129ea10
JMP 0x0129bd1d
LAB_0129bcf0:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x98],0x0
MOV byte ptr [RBP + -0x9],0x1
LEA RDI,[0x152f24b]
MOV ESI,0x533
LEA RDX,[0x152f2e6]
MOV AL,0x0
CALL 0x00e29700
LAB_0129bd1d:
JMP 0x0129bd1f
LAB_0129bd1f:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x2696fd0]
ADD RSI,0x60
MOV EDX,0x1
CALL 0x012b15c0
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX + 0xa0],RAX
CMP RAX,0x0
JNZ 0x0129bd4b
JMP 0x0129bdbf
LAB_0129bd4b:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0xa0]
CMP qword ptr [RAX + 0x90],0x1
JNZ 0x0129bd90
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0xa0]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x2a
AND RAX,0x3ff
CMP EAX,0x6
JNZ 0x0129bd90
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RDI + 0xa0]
CALL 0x0129ea10
JMP 0x0129bdbd
LAB_0129bd90:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0xa0],0x0
MOV byte ptr [RBP + -0x9],0x1
LEA RDI,[0x152f24b]
MOV ESI,0x53e
LEA RDX,[0x152f315]
MOV AL,0x0
CALL 0x00e29700
LAB_0129bdbd:
JMP 0x0129bdbf
LAB_0129bdbf:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0129eed0
MOV AL,byte ptr [RBP + -0x9]
AND AL,0x1
ADD RSP,0x20
POP RBP
RET
|
/* dict_sys_t::load_sys_tables() */
int1 __thiscall dict_sys_t::load_sys_tables(dict_sys_t *this)
{
long lVar1;
int1 local_11;
local_11 = 0;
lock(this,"/workspace/llm4binary/github2025/eloqsql/storage/innobase/dict/dict0crea.cc",0x51d);
lVar1 = load_table(this,0x2697010,1);
*(long *)(this + 0x90) = lVar1;
if (lVar1 != 0) {
if ((*(long *)(*(long *)(this + 0x90) + 0x90) == 3) &&
(((uint)((ulong)*(int8 *)(*(long *)(this + 0x90) + 0x40) >> 0x2a) & 0x3ff) == 7)) {
prevent_eviction(this,*(dict_table_t **)(this + 0x90));
}
else {
*(int8 *)(this + 0x90) = 0;
local_11 = 1;
glog_print_error("/workspace/llm4binary/github2025/eloqsql/storage/innobase/dict/dict0crea.cc"
,0x527,"InnoDB: Invalid definition of SYS_FOREIGN");
}
}
lVar1 = load_table(this,0x2697020,1);
*(long *)(this + 0x98) = lVar1;
if (lVar1 != 0) {
if ((*(long *)(*(long *)(this + 0x98) + 0x90) == 1) &&
(((uint)((ulong)*(int8 *)(*(long *)(this + 0x98) + 0x40) >> 0x2a) & 0x3ff) == 7)) {
prevent_eviction(this,*(dict_table_t **)(this + 0x98));
}
else {
*(int8 *)(this + 0x98) = 0;
local_11 = 1;
glog_print_error("/workspace/llm4binary/github2025/eloqsql/storage/innobase/dict/dict0crea.cc"
,0x533,"InnoDB: Invalid definition of SYS_FOREIGN_COLS");
}
}
lVar1 = load_table(this,0x2697030,1);
*(long *)(this + 0xa0) = lVar1;
if (lVar1 != 0) {
if ((*(long *)(*(long *)(this + 0xa0) + 0x90) == 1) &&
(((uint)((ulong)*(int8 *)(*(long *)(this + 0xa0) + 0x40) >> 0x2a) & 0x3ff) == 6)) {
prevent_eviction(this,*(dict_table_t **)(this + 0xa0));
}
else {
*(int8 *)(this + 0xa0) = 0;
local_11 = 1;
glog_print_error("/workspace/llm4binary/github2025/eloqsql/storage/innobase/dict/dict0crea.cc"
,0x53e,"InnoDB: Invalid definition of SYS_VIRTUAL");
}
}
unlock(this);
return local_11;
}
| |
48,853 | LlamaData::basename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/examples/run/run.cpp | std::string basename(const std::string & path) {
const size_t pos = path.find_last_of("/\\");
if (pos == std::string::npos) {
return path;
}
return path.substr(pos + 1);
} | O3 | cpp | LlamaData::basename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x8e4d5(%rip), %rsi # 0xafe54
movl $0x2, %ecx
movq %rdx, %rdi
movq $-0x1, %rdx
callq 0x19fe0
cmpq $-0x1, %rax
je 0x219b3
incq %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x19800
jmp 0x219cc
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x20da6
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN9LlamaData8basenameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
push rax
mov r14, rdx
mov rbx, rdi
lea rsi, asc_AFE54; "/\\"
mov ecx, 2
mov rdi, rdx
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEPKcmm; std::string::find_last_of(char const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_219B3
inc rax
mov rdi, rbx
mov rsi, r14
mov rdx, rax
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short loc_219CC
loc_219B3:
lea rax, [rbx+10h]
mov [rbx], rax
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
loc_219CC:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| _QWORD * LlamaData::basename(_QWORD *a1, long long a2, long long a3)
{
long long last_of; // rax
last_of = std::string::find_last_of(a3, "/\\", -1LL, 2LL);
if ( last_of == -1 )
{
*a1 = a1 + 2;
std::string::_M_construct<char *>((long long)a1, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
}
else
{
std::string::substr(a1, a3, last_of + 1, -1LL);
}
return a1;
}
| basename:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV RBX,RDI
LEA RSI,[0x1afe54]
MOV ECX,0x2
MOV RDI,RDX
MOV RDX,-0x1
CALL 0x00119fe0
CMP RAX,-0x1
JZ 0x001219b3
INC RAX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RAX
MOV RCX,-0x1
CALL 0x00119800
JMP 0x001219cc
LAB_001219b3:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
MOV RDI,RBX
CALL 0x00120da6
LAB_001219cc:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* LlamaData::basename(std::__cxx11::string const&) */
string * LlamaData::basename(string *param_1)
{
long lVar1;
long *in_RDX;
lVar1 = std::__cxx11::string::find_last_of((char *)in_RDX,0x1afe54,0xffffffffffffffff);
if (lVar1 == -1) {
*(string **)param_1 = param_1 + 0x10;
std::__cxx11::string::_M_construct<char*>(param_1,*in_RDX,in_RDX[1] + *in_RDX);
}
else {
std::__cxx11::string::substr((ulong)param_1,(ulong)in_RDX);
}
return param_1;
}
| |
48,854 | blst_deserialize_p1_affine | corpus-core[P]colibri-stateless/src/util/crypto.c | bytes_t blst_deserialize_p1_affine(uint8_t* compressed_pubkeys, int num_public_keys, uint8_t* out) {
blst_p1_affine* pubkeys = out ? (blst_p1_affine*) out : (blst_p1_affine*) safe_malloc(num_public_keys * sizeof(blst_p1_affine));
for (int i = 0; i < num_public_keys; i++) {
if (blst_p1_deserialize(pubkeys + i, compressed_pubkeys + i * 48) != BLST_SUCCESS) {
safe_free(pubkeys);
return NULL_BYTES;
}
}
return bytes((uint8_t*) pubkeys, num_public_keys * sizeof(blst_p1_affine));
} | O0 | c | blst_deserialize_p1_affine:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq %rdx, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xa4a74
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xa4a85
movslq -0x1c(%rbp), %rax
imulq $0x60, %rax, %rdi
callq 0x9da50
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xa4ae9
movq -0x30(%rbp), %rdi
movslq -0x34(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
imull $0x30, -0x34(%rbp), %eax
cltq
addq %rax, %rsi
callq 0xa93e0
cmpl $0x0, %eax
je 0xa4adc
movq -0x30(%rbp), %rdi
callq 0x9dbf0
movl $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0xa4afc
jmp 0xa4ade
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xa4a94
movslq -0x1c(%rbp), %rax
imulq $0x60, %rax, %rax
movl %eax, -0x10(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| blst_deserialize_p1_affine:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_28], rdx
cmp [rbp+var_28], 0
jz short loc_A4A74
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
jmp short loc_A4A85
loc_A4A74:
movsxd rax, [rbp+var_1C]
imul rdi, rax, 60h ; '`'
call safe_malloc
mov [rbp+var_40], rax
loc_A4A85:
mov rax, [rbp+var_40]
mov [rbp+var_30], rax
mov [rbp+var_34], 0
loc_A4A94:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_1C]
jge short loc_A4AE9
mov rdi, [rbp+var_30]
movsxd rax, [rbp+var_34]
imul rax, 60h ; '`'
add rdi, rax
mov rsi, [rbp+var_18]
imul eax, [rbp+var_34], 30h ; '0'
cdqe
add rsi, rax
call blst_p1_deserialize
cmp eax, 0
jz short loc_A4ADC
mov rdi, [rbp+var_30]
call safe_free
mov [rbp+var_10], 0
mov [rbp+var_8], 0
jmp short loc_A4AFC
loc_A4ADC:
jmp short $+2
loc_A4ADE:
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp short loc_A4A94
loc_A4AE9:
movsxd rax, [rbp+var_1C]
imul rax, 60h ; '`'
mov [rbp+var_10], eax
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_A4AFC:
mov eax, [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long blst_deserialize_p1_affine(long long a1, int a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-40h]
int i; // [rsp+Ch] [rbp-34h]
if ( a3 )
v4 = a3;
else
v4 = safe_malloc(96LL * a2);
for ( i = 0; i < a2; ++i )
{
if ( (unsigned int)blst_p1_deserialize(96LL * i + v4, 48 * i + a1) )
{
safe_free(v4);
return 0;
}
}
return (unsigned int)(96 * a2);
}
| blst_deserialize_p1_affine:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV qword ptr [RBP + -0x28],RDX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001a4a74
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001a4a85
LAB_001a4a74:
MOVSXD RAX,dword ptr [RBP + -0x1c]
IMUL RDI,RAX,0x60
CALL 0x0019da50
MOV qword ptr [RBP + -0x40],RAX
LAB_001a4a85:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x30],RAX
MOV dword ptr [RBP + -0x34],0x0
LAB_001a4a94:
MOV EAX,dword ptr [RBP + -0x34]
CMP EAX,dword ptr [RBP + -0x1c]
JGE 0x001a4ae9
MOV RDI,qword ptr [RBP + -0x30]
MOVSXD RAX,dword ptr [RBP + -0x34]
IMUL RAX,RAX,0x60
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
IMUL EAX,dword ptr [RBP + -0x34],0x30
CDQE
ADD RSI,RAX
CALL 0x001a93e0
CMP EAX,0x0
JZ 0x001a4adc
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0019dbf0
MOV dword ptr [RBP + -0x10],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001a4afc
LAB_001a4adc:
JMP 0x001a4ade
LAB_001a4ade:
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001a4a94
LAB_001a4ae9:
MOVSXD RAX,dword ptr [RBP + -0x1c]
IMUL RAX,RAX,0x60
MOV dword ptr [RBP + -0x10],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_001a4afc:
MOV EAX,dword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int1 [16] blst_deserialize_p1_affine(long param_1,int param_2,long param_3)
{
int iVar1;
int1 auVar2 [16];
int8 local_48;
int4 local_3c;
int4 local_18;
int8 local_10;
local_48 = param_3;
if (param_3 == 0) {
local_48 = safe_malloc((long)param_2 * 0x60);
}
local_3c = 0;
do {
if (param_2 <= local_3c) {
local_18 = param_2 * 0x60;
local_10 = local_48;
LAB_001a4afc:
auVar2._4_4_ = 0;
auVar2._0_4_ = local_18;
auVar2._8_8_ = local_10;
return auVar2;
}
iVar1 = blst_p1_deserialize(local_48 + (long)local_3c * 0x60,param_1 + local_3c * 0x30);
if (iVar1 != 0) {
safe_free(local_48);
local_18 = 0;
local_10 = 0;
goto LAB_001a4afc;
}
local_3c = local_3c + 1;
} while( true );
}
| |
48,855 | blst_deserialize_p1_affine | corpus-core[P]colibri-stateless/src/util/crypto.c | bytes_t blst_deserialize_p1_affine(uint8_t* compressed_pubkeys, int num_public_keys, uint8_t* out) {
blst_p1_affine* pubkeys = out ? (blst_p1_affine*) out : (blst_p1_affine*) safe_malloc(num_public_keys * sizeof(blst_p1_affine));
for (int i = 0; i < num_public_keys; i++) {
if (blst_p1_deserialize(pubkeys + i, compressed_pubkeys + i * 48) != BLST_SUCCESS) {
safe_free(pubkeys);
return NULL_BYTES;
}
}
return bytes((uint8_t*) pubkeys, num_public_keys * sizeof(blst_p1_affine));
} | O2 | c | blst_deserialize_p1_affine:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
movslq %esi, %r12
testq %rdx, %rdx
jne 0x4ecb3
imulq $0x60, %r12, %rdi
callq 0x4aee0
movq %rax, %r14
movq %r12, (%rsp)
xorl %ecx, %ecx
testl %ebx, %ebx
movl $0x0, %r13d
cmovgl %ebx, %r13d
movq %r14, %r12
movq %rcx, %rbp
cmpq %rcx, %r13
je 0x4ecf6
movq %r12, %rdi
movq %r15, %rsi
callq 0x51655
leaq 0x1(%rbp), %rcx
addq $0x60, %r12
addq $0x30, %r15
testl %eax, %eax
je 0x4ecc8
movq %r14, %rdi
callq 0x4aff8
xorl %r14d, %r14d
imull $0x60, %ebx, %ecx
xorl %eax, %eax
cmpq (%rsp), %rbp
cmovgel %ecx, %eax
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| blst_deserialize_p1_affine:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov ebx, esi
mov r15, rdi
movsxd r12, esi
test rdx, rdx
jnz short loc_4ECB3
imul rdi, r12, 60h ; '`'
call safe_malloc
mov r14, rax
loc_4ECB3:
mov [rsp+38h+var_38], r12
xor ecx, ecx
test ebx, ebx
mov r13d, 0
cmovg r13d, ebx
mov r12, r14
loc_4ECC8:
mov rbp, rcx
cmp r13, rcx
jz short loc_4ECF6
mov rdi, r12
mov rsi, r15
call blst_p1_deserialize
lea rcx, [rbp+1]
add r12, 60h ; '`'
add r15, 30h ; '0'
test eax, eax
jz short loc_4ECC8
mov rdi, r14
call safe_free
xor r14d, r14d
loc_4ECF6:
imul ecx, ebx, 60h ; '`'
xor eax, eax
cmp rbp, [rsp+38h+var_38]
cmovge eax, ecx
mov rdx, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long blst_deserialize_p1_affine(long long a1, int a2, long long a3)
{
long long v3; // r14
long long v5; // rcx
long long v6; // r13
long long v7; // r12
long long v8; // rbp
int v9; // eax
long long result; // rax
v3 = a3;
if ( !a3 )
v3 = safe_malloc(96LL * a2);
v5 = 0LL;
v6 = 0LL;
if ( a2 > 0 )
v6 = (unsigned int)a2;
v7 = v3;
while ( 1 )
{
v8 = v5;
if ( v6 == v5 )
break;
v9 = blst_p1_deserialize(v7, a1);
v5 = v8 + 1;
v7 += 96LL;
a1 += 48LL;
if ( v9 )
{
safe_free(v3);
break;
}
}
result = 0LL;
if ( v8 >= a2 )
return (unsigned int)(96 * a2);
return result;
}
| blst_deserialize_p1_affine:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV EBX,ESI
MOV R15,RDI
MOVSXD R12,ESI
TEST RDX,RDX
JNZ 0x0014ecb3
IMUL RDI,R12,0x60
CALL 0x0014aee0
MOV R14,RAX
LAB_0014ecb3:
MOV qword ptr [RSP],R12
XOR ECX,ECX
TEST EBX,EBX
MOV R13D,0x0
CMOVG R13D,EBX
MOV R12,R14
LAB_0014ecc8:
MOV RBP,RCX
CMP R13,RCX
JZ 0x0014ecf6
MOV RDI,R12
MOV RSI,R15
CALL 0x00151655
LEA RCX,[RBP + 0x1]
ADD R12,0x60
ADD R15,0x30
TEST EAX,EAX
JZ 0x0014ecc8
MOV RDI,R14
CALL 0x0014aff8
XOR R14D,R14D
LAB_0014ecf6:
IMUL ECX,EBX,0x60
XOR EAX,EAX
CMP RBP,qword ptr [RSP]
CMOVGE EAX,ECX
MOV RDX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] blst_deserialize_p1_affine(long param_1,uint param_2,long param_3)
{
int iVar1;
ulong uVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
int1 auVar6 [16];
if (param_3 == 0) {
param_3 = safe_malloc((long)(int)param_2 * 0x60);
}
uVar5 = 0;
uVar2 = 0;
lVar4 = param_3;
if (0 < (int)param_2) {
uVar5 = (ulong)param_2;
}
do {
uVar3 = uVar2;
if (uVar5 == uVar3) goto LAB_0014ecf6;
iVar1 = blst_p1_deserialize(lVar4,param_1);
param_1 = param_1 + 0x30;
uVar2 = uVar3 + 1;
lVar4 = lVar4 + 0x60;
} while (iVar1 == 0);
safe_free(param_3);
param_3 = 0;
LAB_0014ecf6:
uVar2 = 0;
if ((long)(int)param_2 <= (long)uVar3) {
uVar2 = (ulong)(param_2 * 0x60);
}
auVar6._8_8_ = param_3;
auVar6._0_8_ = uVar2;
return auVar6;
}
| |
48,856 | blst_deserialize_p1_affine | corpus-core[P]colibri-stateless/src/util/crypto.c | bytes_t blst_deserialize_p1_affine(uint8_t* compressed_pubkeys, int num_public_keys, uint8_t* out) {
blst_p1_affine* pubkeys = out ? (blst_p1_affine*) out : (blst_p1_affine*) safe_malloc(num_public_keys * sizeof(blst_p1_affine));
for (int i = 0; i < num_public_keys; i++) {
if (blst_p1_deserialize(pubkeys + i, compressed_pubkeys + i * 48) != BLST_SUCCESS) {
safe_free(pubkeys);
return NULL_BYTES;
}
}
return bytes((uint8_t*) pubkeys, num_public_keys * sizeof(blst_p1_affine));
} | O3 | c | blst_deserialize_p1_affine:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
testq %rdx, %rdx
jne 0x56e2c
movslq %r14d, %rax
shlq $0x5, %rax
leaq (%rax,%rax,2), %rdi
callq 0x52f18
movq %rax, %rbx
testl %r14d, %r14d
jle 0x56e99
movq %rbx, %rdi
movq %r15, %rsi
callq 0x59c56
movb $0x1, %bpl
testl %eax, %eax
jne 0x56e7f
movl %r14d, %eax
leaq 0x60(%rbx), %r12
addq $0x30, %r15
movq %rax, (%rsp)
leaq -0x1(%rax), %r13
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0x56e99
movq %r12, %rdi
movq %r15, %rsi
callq 0x59c56
addq $0x60, %r12
addq $0x30, %r15
incq %rbp
testl %eax, %eax
je 0x56e58
cmpq (%rsp), %rbp
setb %bpl
movq %rbx, %rdi
callq 0x52f98
shll $0x5, %r14d
leal (%r14,%r14,2), %eax
xorl %ebx, %ebx
testb %bpl, %bpl
cmovnel %ebx, %eax
jmp 0x56ea1
shll $0x5, %r14d
leal (%r14,%r14,2), %eax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| blst_deserialize_p1_affine:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14d, esi
mov r15, rdi
test rdx, rdx
jnz short loc_56E2C
movsxd rax, r14d
shl rax, 5
lea rdi, [rax+rax*2]
call safe_malloc
mov rbx, rax
loc_56E2C:
test r14d, r14d
jle short loc_56E99
mov rdi, rbx
mov rsi, r15
call blst_p1_deserialize
mov bpl, 1
test eax, eax
jnz short loc_56E7F
mov eax, r14d
lea r12, [rbx+60h]
add r15, 30h ; '0'
mov [rsp+38h+var_38], rax
lea r13, [rax-1]
xor ebp, ebp
loc_56E58:
cmp r13, rbp
jz short loc_56E99
mov rdi, r12
mov rsi, r15
call blst_p1_deserialize
add r12, 60h ; '`'
add r15, 30h ; '0'
inc rbp
test eax, eax
jz short loc_56E58
cmp rbp, [rsp+38h+var_38]
setb bpl
loc_56E7F:
mov rdi, rbx
call safe_free
shl r14d, 5
lea eax, [r14+r14*2]
xor ebx, ebx
test bpl, bpl
cmovnz eax, ebx
jmp short loc_56EA1
loc_56E99:
shl r14d, 5
lea eax, [r14+r14*2]
loc_56EA1:
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long blst_deserialize_p1_affine(long long a1, int a2, long long a3)
{
long long v3; // rbx
bool v4; // bp
long long v5; // r12
long long v6; // r15
unsigned long long v7; // rbp
int v8; // eax
long long result; // rax
v3 = a3;
if ( !a3 )
v3 = safe_malloc(96LL * a2);
if ( a2 <= 0 )
return (unsigned int)(96 * a2);
v4 = 1;
if ( !(unsigned int)blst_p1_deserialize(v3, a1) )
{
v5 = v3 + 96;
v6 = a1 + 48;
v7 = 0LL;
while ( (unsigned int)a2 - 1LL != v7 )
{
v8 = blst_p1_deserialize(v5, v6);
v5 += 96LL;
v6 += 48LL;
++v7;
if ( v8 )
{
v4 = v7 < (unsigned int)a2;
goto LABEL_9;
}
}
return (unsigned int)(96 * a2);
}
LABEL_9:
safe_free(v3);
result = (unsigned int)(96 * a2);
if ( v4 )
return 0LL;
return result;
}
| blst_deserialize_p1_affine:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14D,ESI
MOV R15,RDI
TEST RDX,RDX
JNZ 0x00156e2c
MOVSXD RAX,R14D
SHL RAX,0x5
LEA RDI,[RAX + RAX*0x2]
CALL 0x00152f18
MOV RBX,RAX
LAB_00156e2c:
TEST R14D,R14D
JLE 0x00156e99
MOV RDI,RBX
MOV RSI,R15
CALL 0x00159c56
MOV BPL,0x1
TEST EAX,EAX
JNZ 0x00156e7f
MOV EAX,R14D
LEA R12,[RBX + 0x60]
ADD R15,0x30
MOV qword ptr [RSP],RAX
LEA R13,[RAX + -0x1]
XOR EBP,EBP
LAB_00156e58:
CMP R13,RBP
JZ 0x00156e99
MOV RDI,R12
MOV RSI,R15
CALL 0x00159c56
ADD R12,0x60
ADD R15,0x30
INC RBP
TEST EAX,EAX
JZ 0x00156e58
CMP RBP,qword ptr [RSP]
SETC BPL
LAB_00156e7f:
MOV RDI,RBX
CALL 0x00152f98
SHL R14D,0x5
LEA EAX,[R14 + R14*0x2]
XOR EBX,EBX
TEST BPL,BPL
CMOVNZ EAX,EBX
JMP 0x00156ea1
LAB_00156e99:
SHL R14D,0x5
LEA EAX,[R14 + R14*0x2]
LAB_00156ea1:
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] blst_deserialize_p1_affine(long param_1,uint param_2,ulong param_3)
{
int iVar1;
ulong uVar2;
ulong uVar3;
bool bVar4;
int1 auVar5 [16];
if (param_3 == 0) {
param_3 = safe_malloc((long)(int)param_2 * 0x60);
}
if ((int)param_2 < 1) {
LAB_00156e99:
uVar3 = (ulong)(param_2 * 0x60);
}
else {
iVar1 = blst_p1_deserialize(param_3,param_1);
bVar4 = true;
if (iVar1 == 0) {
param_1 = param_1 + 0x30;
uVar2 = 0;
uVar3 = param_3;
do {
uVar3 = uVar3 + 0x60;
if ((ulong)param_2 - 1 == uVar2) goto LAB_00156e99;
iVar1 = blst_p1_deserialize(uVar3,param_1);
param_1 = param_1 + 0x30;
uVar2 = uVar2 + 1;
} while (iVar1 == 0);
bVar4 = uVar2 < param_2;
}
safe_free(param_3);
param_3 = 0;
uVar3 = (ulong)(param_2 * 0x60);
if (bVar4) {
uVar3 = param_3;
}
}
auVar5._8_8_ = param_3;
auVar5._0_8_ = uVar3;
return auVar5;
}
| |
48,857 | httplib::detail::stream_line_reader::getline() | monkey531[P]llama/examples/server/httplib.h | inline bool stream_line_reader::getline() {
fixed_buffer_used_size_ = 0;
glowable_buffer_.clear();
#ifndef CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR
char prev_byte = 0;
#endif
for (size_t i = 0;; i++) {
char byte;
auto n = strm_.read(&byte, 1);
if (n < 0) {
return false;
} else if (n == 0) {
if (i == 0) {
return false;
} else {
break;
}
}
append(byte);
#ifdef CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR
if (byte == '\n') { break; }
#else
if (prev_byte == '\r' && byte == '\n') { break; }
prev_byte = byte;
#endif
}
return true;
} | O2 | c | httplib::detail::stream_line_reader::getline():
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
andq $0x0, 0x18(%rdi)
andq $0x0, 0x28(%rdi)
movq 0x20(%rdi), %rax
movb $0x0, (%rax)
xorl %r12d, %r12d
leaq 0xf(%rsp), %r14
pushq $0x1
popq %r15
xorl %r13d, %r13d
movq (%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
movq %r15, %rdx
callq *0x20(%rax)
testq %rax, %rax
js 0x58027
je 0x5802b
movsbl 0xf(%rsp), %esi
movq %rbx, %rdi
callq 0x5957a
xorb $0xd, %r13b
movb 0xf(%rsp), %al
movl %eax, %ecx
xorb $0xa, %cl
orb %r13b, %cl
je 0x58033
decq %r12
movl %eax, %r13d
jmp 0x57fea
xorl %eax, %eax
jmp 0x58035
testq %r12, %r12
setne %al
jmp 0x58035
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| _ZN7httplib6detail18stream_line_reader7getlineEv:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov rbx, rdi
and qword ptr [rdi+18h], 0
and qword ptr [rdi+28h], 0
mov rax, [rdi+20h]
mov byte ptr [rax], 0
xor r12d, r12d
lea r14, [rsp+38h+var_29]
push 1
pop r15
xor r13d, r13d
loc_57FEA:
mov rdi, [rbx]
mov rax, [rdi]
mov rsi, r14
mov rdx, r15
call qword ptr [rax+20h]
test rax, rax
js short loc_58027
jz short loc_5802B
movsx esi, [rsp+38h+var_29]; char
mov rdi, rbx; this
call _ZN7httplib6detail18stream_line_reader6appendEc; httplib::detail::stream_line_reader::append(char)
xor r13b, 0Dh
mov al, [rsp+38h+var_29]
mov ecx, eax
xor cl, 0Ah
or cl, r13b
jz short loc_58033
dec r12
mov r13d, eax
jmp short loc_57FEA
loc_58027:
xor eax, eax
jmp short loc_58035
loc_5802B:
test r12, r12
setnz al
jmp short loc_58035
loc_58033:
mov al, 1
loc_58035:
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| bool httplib::detail::stream_line_reader::getline(httplib::detail::stream_line_reader *this)
{
long long v1; // r12
unsigned __int8 i; // r13
long long v3; // rax
char v5[41]; // [rsp+Fh] [rbp-29h] BYREF
*((_QWORD *)this + 3) = 0LL;
*((_QWORD *)this + 5) = 0LL;
**((_BYTE **)this + 4) = 0;
v1 = 0LL;
for ( i = 0; ; i = v5[0] )
{
v3 = (*(long long ( **)(_QWORD, char *, long long))(**(_QWORD **)this + 32LL))(*(_QWORD *)this, v5, 1LL);
if ( v3 < 0 )
return 0;
if ( !v3 )
return v1 != 0;
httplib::detail::stream_line_reader::append(this, v5[0]);
if ( !(i ^ 0xD | v5[0] ^ 0xA) )
break;
--v1;
}
return 1;
}
| getline:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
AND qword ptr [RDI + 0x18],0x0
AND qword ptr [RDI + 0x28],0x0
MOV RAX,qword ptr [RDI + 0x20]
MOV byte ptr [RAX],0x0
XOR R12D,R12D
LEA R14,[RSP + 0xf]
PUSH 0x1
POP R15
XOR R13D,R13D
LAB_00157fea:
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
MOV RSI,R14
MOV RDX,R15
CALL qword ptr [RAX + 0x20]
TEST RAX,RAX
JS 0x00158027
JZ 0x0015802b
MOVSX ESI,byte ptr [RSP + 0xf]
MOV RDI,RBX
CALL 0x0015957a
XOR R13B,0xd
MOV AL,byte ptr [RSP + 0xf]
MOV ECX,EAX
XOR CL,0xa
OR CL,R13B
JZ 0x00158033
DEC R12
MOV R13D,EAX
JMP 0x00157fea
LAB_00158027:
XOR EAX,EAX
JMP 0x00158035
LAB_0015802b:
TEST R12,R12
SETNZ AL
JMP 0x00158035
LAB_00158033:
MOV AL,0x1
LAB_00158035:
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* httplib::detail::stream_line_reader::getline() */
bool __thiscall httplib::detail::stream_line_reader::getline(stream_line_reader *this)
{
long lVar1;
long lVar2;
char cVar3;
char local_29;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x28) = 0;
**(int1 **)(this + 0x20) = 0;
lVar2 = 0;
cVar3 = '\0';
while( true ) {
lVar1 = (**(code **)(**(long **)this + 0x20))(*(long **)this,&local_29,1);
if (lVar1 < 0) {
return false;
}
if (lVar1 == 0) break;
append(this,local_29);
if (local_29 == '\n' && cVar3 == '\r') {
return true;
}
lVar2 = lVar2 + -1;
cVar3 = local_29;
}
return lVar2 != 0;
}
| |
48,858 | rtree_overlapping_area | eloqsql/storage/myisam/rt_mbr.c | double rtree_overlapping_area(HA_KEYSEG *keyseg, uchar* a, uchar* b,
uint key_length)
{
double res = 1;
for (; (int) key_length > 0 ; keyseg += 2)
{
uint32 keyseg_length;
switch ((enum ha_base_keytype) keyseg->type) {
case HA_KEYTYPE_INT8:
RT_OVL_AREA_KORR(int8, mi_sint1korr, 1);
break;
case HA_KEYTYPE_BINARY:
RT_OVL_AREA_KORR(uint8, mi_uint1korr, 1);
break;
case HA_KEYTYPE_SHORT_INT:
RT_OVL_AREA_KORR(int16, mi_sint2korr, 2);
break;
case HA_KEYTYPE_USHORT_INT:
RT_OVL_AREA_KORR(uint16, mi_uint2korr, 2);
break;
case HA_KEYTYPE_INT24:
RT_OVL_AREA_KORR(int32, mi_sint3korr, 3);
break;
case HA_KEYTYPE_UINT24:
RT_OVL_AREA_KORR(uint32, mi_uint3korr, 3);
break;
case HA_KEYTYPE_LONG_INT:
RT_OVL_AREA_KORR(int32, mi_sint4korr, 4);
break;
case HA_KEYTYPE_ULONG_INT:
RT_OVL_AREA_KORR(uint32, mi_uint4korr, 4);
break;
#ifdef HAVE_LONG_LONG
case HA_KEYTYPE_LONGLONG:
RT_OVL_AREA_KORR(longlong, mi_sint8korr, 8);
break;
case HA_KEYTYPE_ULONGLONG:
RT_OVL_AREA_KORR(longlong, mi_sint8korr, 8);
break;
#endif
case HA_KEYTYPE_FLOAT:
RT_OVL_AREA_GET(float, mi_float4get, 4);
break;
case HA_KEYTYPE_DOUBLE:
RT_OVL_AREA_GET(double, mi_float8get, 8);
break;
case HA_KEYTYPE_END:
return res;
default:
return -1;
}
keyseg_length= keyseg->length * 2;
key_length-= keyseg_length;
a+= keyseg_length;
b+= keyseg_length;
}
return res;
} | O3 | c | rtree_overlapping_area:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
testl %ecx, %ecx
jle 0x8cbc2
addq $0x18, %rdi
movsd 0x54725(%rip), %xmm0 # 0xe0ec8
movsd 0x54735(%rip), %xmm1 # 0xe0ee0
leaq 0x552de(%rip), %rax # 0xe1a90
movzbl (%rdi), %r8d
cmpq $0xe, %r8
ja 0x8cbd7
movslq (%rax,%r8,4), %r8
addq %rax, %r8
jmpq *%r8
movq (%rsi), %r9
movq 0x8(%rsi), %r10
bswapq %r9
movq (%rdx), %r11
movq 0x8(%rdx), %r8
bswapq %r11
bswapq %r10
bswapq %r8
cmpq %r11, %r9
cmovgq %r9, %r11
cmpq %r8, %r10
cmovlq %r10, %r8
subq %r11, %r8
jg 0x8c9bb
jmp 0x8cbcc
movzbl (%rsi), %r11d
movl %r11d, %r8d
shll $0x10, %r8d
movzbl 0x1(%rsi), %r9d
shll $0x8, %r9d
movzbl 0x2(%rsi), %r10d
testb %r11b, %r11b
js 0x8cae3
orl %r10d, %r8d
orl %r9d, %r8d
jmp 0x8caf0
movzwl 0x1(%rsi), %r8d
movzwl 0x4(%rsi), %r9d
rolw $0x8, %r8w
movzwl %r8w, %r10d
movzbl (%rsi), %r8d
shll $0x10, %r8d
orl %r10d, %r8d
movzwl 0x1(%rdx), %r10d
movzwl 0x4(%rdx), %r11d
rolw $0x8, %r10w
movzwl %r10w, %r10d
movzbl (%rdx), %ebx
shll $0x10, %ebx
orl %r10d, %ebx
rolw $0x8, %r9w
movzwl %r9w, %r9d
movzbl 0x3(%rsi), %r10d
shll $0x10, %r10d
orl %r9d, %r10d
rolw $0x8, %r11w
movzwl %r11w, %r11d
movzbl 0x3(%rdx), %r9d
shll $0x10, %r9d
orl %r11d, %r9d
cmpl %ebx, %r8d
cmoval %r8d, %ebx
cmpl %r9d, %r10d
cmovbl %r10d, %r9d
subl %ebx, %r9d
jbe 0x8cbcc
xorps %xmm2, %xmm2
cvtsi2sd %r9, %xmm2
jmp 0x8cba1
movq (%rsi), %r8
movq 0x8(%rsi), %r9
bswapq %r8
movq %r8, %xmm3
movq (%rdx), %r8
bswapq %r8
movq 0x8(%rdx), %r10
movq %r8, %xmm2
bswapq %r9
maxsd %xmm2, %xmm3
movq %r9, %xmm2
bswapq %r10
movq %r10, %xmm4
minsd %xmm4, %xmm2
ucomisd %xmm2, %xmm3
jae 0x8cbcc
subsd %xmm3, %xmm2
jmp 0x8cba1
movl (%rsi), %r9d
movl 0x4(%rsi), %r10d
bswapl %r9d
movl (%rdx), %r11d
movl 0x4(%rdx), %r8d
bswapl %r11d
bswapl %r10d
bswapl %r8d
cmpl %r11d, %r9d
cmovgl %r9d, %r11d
cmpl %r8d, %r10d
cmovll %r10d, %r8d
subl %r11d, %r8d
jg 0x8c97d
jmp 0x8cbcc
movzwl (%rsi), %r8d
movzwl 0x2(%rsi), %r9d
rolw $0x8, %r8w
movzwl %r8w, %r10d
movzwl (%rdx), %r8d
rolw $0x8, %r8w
movzwl 0x2(%rdx), %r11d
movzwl %r8w, %ebx
rolw $0x8, %r9w
movzwl %r9w, %r9d
rolw $0x8, %r11w
movzwl %r11w, %r8d
cmpl %ebx, %r10d
cmoval %r10d, %ebx
cmpl %r8d, %r9d
cmovbl %r9d, %r8d
subl %ebx, %r8d
jbe 0x8cbcc
xorps %xmm2, %xmm2
cvtsi2sd %r8d, %xmm2
jmp 0x8cba1
movl (%rsi), %r9d
movl 0x4(%rsi), %r10d
bswapl %r9d
movl (%rdx), %r11d
movl 0x4(%rdx), %r8d
bswapl %r11d
bswapl %r10d
bswapl %r8d
cmpl %r11d, %r9d
cmoval %r9d, %r11d
cmpl %r8d, %r10d
cmovbl %r10d, %r8d
subl %r11d, %r8d
jbe 0x8cbcc
xorps %xmm2, %xmm2
cvtsi2sd %r8, %xmm2
jmp 0x8cba1
movzbl (%rsi), %r9d
movzbl (%rdx), %r8d
leal 0x1(%r9), %r10d
leal 0x1(%r8), %r11d
cmpb %r8b, %r9b
cmovgl %r9d, %r8d
movzbl %r10b, %r10d
movzbl %r11b, %r9d
cmpb %r9b, %r10b
cmovll %r10d, %r9d
cmpb %r9b, %r8b
jge 0x8cbcc
movsbl %r9b, %r9d
movsbl %r8b, %r8d
jmp 0x8ca84
movzwl (%rsi), %r10d
movzwl 0x2(%rsi), %r11d
rolw $0x8, %r10w
movzwl (%rdx), %r8d
movzwl 0x2(%rdx), %r9d
rolw $0x8, %r8w
rolw $0x8, %r11w
rolw $0x8, %r9w
cmpw %r8w, %r10w
cmovgl %r10d, %r8d
cmpw %r9w, %r11w
cmovll %r11d, %r9d
cmpw %r9w, %r8w
jge 0x8cbcc
movswl %r9w, %r9d
movswl %r8w, %r8d
jmp 0x8ca84
movzbl (%rsi), %r9d
movzbl (%rdx), %r8d
leal 0x1(%r8), %r10d
cmpb %r8b, %r9b
cmoval %r9d, %r8d
incl %r9d
movzbl %r9b, %r11d
movzbl %r10b, %r9d
cmpb %r9b, %r11b
cmovbl %r11d, %r9d
cmpb %r9b, %r8b
jae 0x8cbcc
movzbl %r9b, %r9d
movzbl %r8b, %r8d
subl %r8d, %r9d
xorps %xmm2, %xmm2
cvtsi2sd %r9d, %xmm2
jmp 0x8cba1
movl (%rsi), %r8d
movl 0x4(%rsi), %r9d
bswapl %r8d
movd %r8d, %xmm2
movl (%rdx), %r8d
movl 0x4(%rdx), %r10d
bswapl %r8d
movd %r8d, %xmm3
maxss %xmm3, %xmm2
bswapl %r9d
movd %r9d, %xmm3
bswapl %r10d
movd %r10d, %xmm4
minss %xmm4, %xmm3
ucomiss %xmm3, %xmm2
jae 0x8cbcc
subss %xmm2, %xmm3
xorps %xmm2, %xmm2
cvtss2sd %xmm3, %xmm2
jmp 0x8cba1
orl %r10d, %r9d
addl %r9d, %r8d
addl $0xff000000, %r8d # imm = 0xFF000000
movzbl (%rdx), %ebx
movl %ebx, %r9d
shll $0x10, %r9d
movzbl 0x1(%rdx), %r10d
shll $0x8, %r10d
movzbl 0x2(%rdx), %r11d
testb %bl, %bl
js 0x8cb14
orl %r11d, %r9d
orl %r10d, %r9d
jmp 0x8cb21
orl %r11d, %r10d
addl %r10d, %r9d
addl $0xff000000, %r9d # imm = 0xFF000000
movzbl 0x3(%rsi), %r14d
movl %r14d, %r10d
shll $0x10, %r10d
movzbl 0x4(%rsi), %r11d
shll $0x8, %r11d
movzbl 0x5(%rsi), %ebx
testb %r14b, %r14b
js 0x8cb47
orl %ebx, %r10d
orl %r11d, %r10d
jmp 0x8cb54
orl %ebx, %r11d
addl %r11d, %r10d
addl $0xff000000, %r10d # imm = 0xFF000000
movzbl 0x3(%rdx), %r15d
movl %r15d, %r11d
shll $0x10, %r11d
movzbl 0x4(%rdx), %ebx
shll $0x8, %ebx
movzbl 0x5(%rdx), %r14d
testb %r15b, %r15b
js 0x8cb79
orl %r14d, %r11d
orl %ebx, %r11d
jmp 0x8cb86
orl %r14d, %ebx
addl %ebx, %r11d
addl $0xff000000, %r11d # imm = 0xFF000000
cmpl %r9d, %r8d
cmovgl %r8d, %r9d
cmpl %r11d, %r10d
cmovll %r10d, %r11d
subl %r9d, %r11d
jle 0x8cbcc
xorps %xmm2, %xmm2
cvtsi2sd %r11d, %xmm2
mulsd %xmm2, %xmm0
movzwl -0x4(%rdi), %r8d
addl %r8d, %r8d
addq %r8, %rsi
addq %r8, %rdx
addq $0x40, %rdi
subl %r8d, %ecx
jg 0x8c7b2
jmp 0x8cbd0
movsd 0x542fe(%rip), %xmm0 # 0xe0ec8
jmp 0x8cbd0
xorpd %xmm0, %xmm0
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movapd %xmm1, %xmm0
jmp 0x8cbd0
| rtree_overlapping_area:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
test ecx, ecx
jle loc_8CBC2
add rdi, 18h
movsd xmm0, cs:qword_E0EC8
movsd xmm1, cs:qword_E0EE0
lea rax, jpt_8C7C7
loc_8C7B2:
movzx r8d, byte ptr [rdi]
cmp r8, 0Eh; switch 15 cases
ja def_8C7C7; jumptable 000000000008C7C7 default case, cases 1,7
movsxd r8, ds:(jpt_8C7C7 - 0E1A90h)[rax+r8*4]
add r8, rax
jmp r8; switch jump
loc_8C7CA:
mov r9, [rsi]; jumptable 000000000008C7C7 cases 10,11
mov r10, [rsi+8]
bswap r9
mov r11, [rdx]
mov r8, [rdx+8]
bswap r11
bswap r10
bswap r8
cmp r9, r11
cmovg r11, r9
cmp r10, r8
cmovl r8, r10
sub r8, r11
jg loc_8C9BB
jmp loc_8CBCC
loc_8C800:
movzx r11d, byte ptr [rsi]; jumptable 000000000008C7C7 case 12
mov r8d, r11d
shl r8d, 10h
movzx r9d, byte ptr [rsi+1]
shl r9d, 8
movzx r10d, byte ptr [rsi+2]
test r11b, r11b
js loc_8CAE3
or r8d, r10d
or r8d, r9d
jmp loc_8CAF0
loc_8C82D:
movzx r8d, word ptr [rsi+1]; jumptable 000000000008C7C7 case 13
movzx r9d, word ptr [rsi+4]
rol r8w, 8
movzx r10d, r8w
movzx r8d, byte ptr [rsi]
shl r8d, 10h
or r8d, r10d
movzx r10d, word ptr [rdx+1]
movzx r11d, word ptr [rdx+4]
rol r10w, 8
movzx r10d, r10w
movzx ebx, byte ptr [rdx]
shl ebx, 10h
or ebx, r10d
rol r9w, 8
movzx r9d, r9w
movzx r10d, byte ptr [rsi+3]
shl r10d, 10h
or r10d, r9d
rol r11w, 8
movzx r11d, r11w
movzx r9d, byte ptr [rdx+3]
shl r9d, 10h
or r9d, r11d
cmp r8d, ebx
cmova ebx, r8d
cmp r10d, r9d
cmovb r9d, r10d
sub r9d, ebx
jbe loc_8CBCC
xorps xmm2, xmm2
cvtsi2sd xmm2, r9
jmp loc_8CBA1
loc_8C8B5:
mov r8, [rsi]; jumptable 000000000008C7C7 case 6
mov r9, [rsi+8]
bswap r8
movq xmm3, r8
mov r8, [rdx]
bswap r8
mov r10, [rdx+8]
movq xmm2, r8
bswap r9
maxsd xmm3, xmm2
movq xmm2, r9
bswap r10
movq xmm4, r10
minsd xmm2, xmm4
ucomisd xmm3, xmm2
jnb loc_8CBCC
subsd xmm2, xmm3
jmp loc_8CBA1
loc_8C8FE:
mov r9d, [rsi]; jumptable 000000000008C7C7 case 4
mov r10d, [rsi+4]
bswap r9d
mov r11d, [rdx]
mov r8d, [rdx+4]
bswap r11d
bswap r10d
bswap r8d
cmp r9d, r11d
cmovg r11d, r9d
cmp r10d, r8d
cmovl r8d, r10d
sub r8d, r11d
jg short loc_8C97D
jmp loc_8CBCC
loc_8C930:
movzx r8d, word ptr [rsi]; jumptable 000000000008C7C7 case 8
movzx r9d, word ptr [rsi+2]
rol r8w, 8
movzx r10d, r8w
movzx r8d, word ptr [rdx]
rol r8w, 8
movzx r11d, word ptr [rdx+2]
movzx ebx, r8w
rol r9w, 8
movzx r9d, r9w
rol r11w, 8
movzx r8d, r11w
cmp r10d, ebx
cmova ebx, r10d
cmp r9d, r8d
cmovb r8d, r9d
sub r8d, ebx
jbe loc_8CBCC
loc_8C97D:
xorps xmm2, xmm2
cvtsi2sd xmm2, r8d
jmp loc_8CBA1
loc_8C98A:
mov r9d, [rsi]; jumptable 000000000008C7C7 case 9
mov r10d, [rsi+4]
bswap r9d
mov r11d, [rdx]
mov r8d, [rdx+4]
bswap r11d
bswap r10d
bswap r8d
cmp r9d, r11d
cmova r11d, r9d
cmp r10d, r8d
cmovb r8d, r10d
sub r8d, r11d
jbe loc_8CBCC
loc_8C9BB:
xorps xmm2, xmm2
cvtsi2sd xmm2, r8
jmp loc_8CBA1
loc_8C9C8:
movzx r9d, byte ptr [rsi]; jumptable 000000000008C7C7 case 14
movzx r8d, byte ptr [rdx]
lea r10d, [r9+1]
lea r11d, [r8+1]
cmp r9b, r8b
cmovg r8d, r9d
movzx r10d, r10b
movzx r9d, r11b
cmp r10b, r9b
cmovl r9d, r10d
cmp r8b, r9b
jge loc_8CBCC
movsx r9d, r9b
movsx r8d, r8b
jmp loc_8CA84
loc_8CA04:
movzx r10d, word ptr [rsi]; jumptable 000000000008C7C7 case 3
movzx r11d, word ptr [rsi+2]
rol r10w, 8
movzx r8d, word ptr [rdx]
movzx r9d, word ptr [rdx+2]
rol r8w, 8
rol r11w, 8
rol r9w, 8
cmp r10w, r8w
cmovg r8d, r10d
cmp r11w, r9w
cmovl r9d, r11d
cmp r8w, r9w
jge loc_8CBCC
movsx r9d, r9w
movsx r8d, r8w
jmp short loc_8CA84
loc_8CA4E:
movzx r9d, byte ptr [rsi]; jumptable 000000000008C7C7 case 2
movzx r8d, byte ptr [rdx]
lea r10d, [r8+1]
cmp r9b, r8b
cmova r8d, r9d
inc r9d
movzx r11d, r9b
movzx r9d, r10b
cmp r11b, r9b
cmovb r9d, r11d
cmp r8b, r9b
jnb loc_8CBCC
movzx r9d, r9b
movzx r8d, r8b
loc_8CA84:
sub r9d, r8d
xorps xmm2, xmm2
cvtsi2sd xmm2, r9d
jmp loc_8CBA1
loc_8CA94:
mov r8d, [rsi]; jumptable 000000000008C7C7 case 5
mov r9d, [rsi+4]
bswap r8d
movd xmm2, r8d
mov r8d, [rdx]
mov r10d, [rdx+4]
bswap r8d
movd xmm3, r8d
maxss xmm2, xmm3
bswap r9d
movd xmm3, r9d
bswap r10d
movd xmm4, r10d
minss xmm3, xmm4
ucomiss xmm2, xmm3
jnb loc_8CBCC
subss xmm3, xmm2
xorps xmm2, xmm2
cvtss2sd xmm2, xmm3
jmp loc_8CBA1
loc_8CAE3:
or r9d, r10d
add r8d, r9d
add r8d, 0FF000000h
loc_8CAF0:
movzx ebx, byte ptr [rdx]
mov r9d, ebx
shl r9d, 10h
movzx r10d, byte ptr [rdx+1]
shl r10d, 8
movzx r11d, byte ptr [rdx+2]
test bl, bl
js short loc_8CB14
or r9d, r11d
or r9d, r10d
jmp short loc_8CB21
loc_8CB14:
or r10d, r11d
add r9d, r10d
add r9d, 0FF000000h
loc_8CB21:
movzx r14d, byte ptr [rsi+3]
mov r10d, r14d
shl r10d, 10h
movzx r11d, byte ptr [rsi+4]
shl r11d, 8
movzx ebx, byte ptr [rsi+5]
test r14b, r14b
js short loc_8CB47
or r10d, ebx
or r10d, r11d
jmp short loc_8CB54
loc_8CB47:
or r11d, ebx
add r10d, r11d
add r10d, 0FF000000h
loc_8CB54:
movzx r15d, byte ptr [rdx+3]
mov r11d, r15d
shl r11d, 10h
movzx ebx, byte ptr [rdx+4]
shl ebx, 8
movzx r14d, byte ptr [rdx+5]
test r15b, r15b
js short loc_8CB79
or r11d, r14d
or r11d, ebx
jmp short loc_8CB86
loc_8CB79:
or ebx, r14d
add r11d, ebx
add r11d, 0FF000000h
loc_8CB86:
cmp r8d, r9d
cmovg r9d, r8d
cmp r10d, r11d
cmovl r11d, r10d
sub r11d, r9d
jle short loc_8CBCC
xorps xmm2, xmm2
cvtsi2sd xmm2, r11d
loc_8CBA1:
mulsd xmm0, xmm2
movzx r8d, word ptr [rdi-4]
add r8d, r8d
add rsi, r8
add rdx, r8
add rdi, 40h ; '@'
sub ecx, r8d
jg loc_8C7B2
jmp short loc_8CBD0; jumptable 000000000008C7C7 case 0
loc_8CBC2:
movsd xmm0, cs:qword_E0EC8
jmp short loc_8CBD0; jumptable 000000000008C7C7 case 0
loc_8CBCC:
xorpd xmm0, xmm0
loc_8CBD0:
pop rbx; jumptable 000000000008C7C7 case 0
pop r14
pop r15
pop rbp
retn
def_8C7C7:
movapd xmm0, xmm1; jumptable 000000000008C7C7 default case, cases 1,7
jmp short loc_8CBD0; jumptable 000000000008C7C7 case 0
| double rtree_overlapping_area(long long a1, _WORD *a2, _WORD *a3, int a4)
{
_BYTE *v4; // rdi
double result; // xmm0_8
signed long long v6; // r9
signed long long v7; // r11
signed long long v8; // r10
signed long long v9; // r8
bool v10; // cc
int v11; // r8d
int v12; // r8d
int v13; // r9d
int v14; // r10d
int v15; // r8d
unsigned int v16; // r8d
unsigned int v17; // ebx
unsigned int v18; // r10d
unsigned int v19; // r9d
int v20; // r9d
double v21; // xmm2_8
double v22; // xmm3_8
double v23; // xmm2_8
signed __int32 v24; // r9d
signed __int32 v25; // r11d
signed __int32 v26; // r10d
signed __int32 v27; // r8d
int v28; // r8d
unsigned int v29; // r10d
unsigned int v30; // ebx
unsigned int v31; // r9d
unsigned int v32; // r8d
unsigned __int32 v33; // r9d
unsigned __int32 v34; // r11d
unsigned __int32 v35; // r10d
unsigned __int32 v36; // r8d
int v37; // r8d
int v38; // r9d
__int16 v39; // r10
__int16 v40; // r11
float v41; // xmm2_4
float v42; // xmm3_4
int v43; // r9d
int v44; // r10d
int v45; // r11d
int v46; // r9d
int v47; // r10d
int v48; // r11d
int v49; // ebx
int v50; // r10d
int v51; // r11d
int v52; // ebx
int v53; // r14d
int v54; // r11d
int v55; // r11d
long long v56; // r8
if ( a4 <= 0 )
return 1.0;
v4 = (_BYTE *)(a1 + 24);
result = 1.0;
while ( 2 )
{
switch ( *v4 )
{
case 0:
return result;
case 2:
LOBYTE(v37) = *(_BYTE *)a3;
if ( *(_BYTE *)a2 > *(_BYTE *)a3 )
LOBYTE(v37) = *(_BYTE *)a2;
LOBYTE(v38) = *(_BYTE *)a3 + 1;
if ( (unsigned __int8)(*(_BYTE *)a2 + 1) < (unsigned __int8)v38 )
LOBYTE(v38) = *(_BYTE *)a2 + 1;
if ( (unsigned __int8)v37 >= (unsigned __int8)v38 )
return 0.0;
v38 = (unsigned __int8)v38;
v37 = (unsigned __int8)v37;
goto LABEL_56;
case 3:
v39 = __ROL2__(*a2, 8);
LOWORD(v37) = __ROL2__(*a3, 8);
v40 = __ROL2__(a2[1], 8);
LOWORD(v38) = __ROL2__(a3[1], 8);
if ( v39 > (__int16)v37 )
LOWORD(v37) = v39;
if ( v40 < (__int16)v38 )
LOWORD(v38) = v40;
if ( (__int16)v37 >= (__int16)v38 )
return 0.0;
v38 = (__int16)v38;
v37 = (__int16)v37;
goto LABEL_56;
case 4:
v24 = _byteswap_ulong(*(_DWORD *)a2);
v25 = _byteswap_ulong(*(_DWORD *)a3);
v26 = _byteswap_ulong(*((_DWORD *)a2 + 1));
v27 = _byteswap_ulong(*((_DWORD *)a3 + 1));
if ( v24 > v25 )
v25 = v24;
if ( v26 < v27 )
v27 = v26;
v10 = v27 <= v25;
v28 = v27 - v25;
if ( v10 )
return 0.0;
goto LABEL_31;
case 5:
v41 = fmaxf(COERCE_FLOAT(_byteswap_ulong(*(_DWORD *)a2)), COERCE_FLOAT(_byteswap_ulong(*(_DWORD *)a3)));
v42 = fminf(
COERCE_FLOAT(_byteswap_ulong(*((_DWORD *)a2 + 1))),
COERCE_FLOAT(_byteswap_ulong(*((_DWORD *)a3 + 1))));
if ( v41 >= v42 )
return 0.0;
v21 = (float)(v42 - v41);
goto LABEL_75;
case 6:
v22 = fmax(COERCE_DOUBLE(_byteswap_uint64(*(_QWORD *)a2)), COERCE_DOUBLE(_byteswap_uint64(*(_QWORD *)a3)));
v23 = fmin(
COERCE_DOUBLE(_byteswap_uint64(*((_QWORD *)a2 + 1))),
COERCE_DOUBLE(_byteswap_uint64(*((_QWORD *)a3 + 1))));
if ( v22 >= v23 )
return 0.0;
v21 = v23 - v22;
goto LABEL_75;
case 8:
v29 = (unsigned __int16)__ROL2__(*a2, 8);
v30 = (unsigned __int16)__ROL2__(*a3, 8);
v31 = (unsigned __int16)__ROL2__(a2[1], 8);
v32 = (unsigned __int16)__ROL2__(a3[1], 8);
if ( v29 > v30 )
v30 = v29;
if ( v31 < v32 )
v32 = v31;
v10 = v32 <= v30;
v28 = v32 - v30;
if ( v10 )
return 0.0;
LABEL_31:
v21 = (double)v28;
goto LABEL_75;
case 9:
v33 = _byteswap_ulong(*(_DWORD *)a2);
v34 = _byteswap_ulong(*(_DWORD *)a3);
v35 = _byteswap_ulong(*((_DWORD *)a2 + 1));
v36 = _byteswap_ulong(*((_DWORD *)a3 + 1));
if ( v33 > v34 )
v34 = v33;
if ( v35 < v36 )
v36 = v35;
v10 = v36 <= v34;
v11 = v36 - v34;
if ( !v10 )
goto LABEL_37;
return 0.0;
case 0xA:
case 0xB:
v6 = _byteswap_uint64(*(_QWORD *)a2);
v7 = _byteswap_uint64(*(_QWORD *)a3);
v8 = _byteswap_uint64(*((_QWORD *)a2 + 1));
v9 = _byteswap_uint64(*((_QWORD *)a3 + 1));
if ( v6 > v7 )
v7 = v6;
if ( v8 < v9 )
v9 = v8;
v10 = v9 <= v7;
v11 = v9 - v7;
if ( v10 )
return 0.0;
LABEL_37:
v21 = (double)v11;
goto LABEL_75;
case 0xC:
v12 = *(unsigned __int8 *)a2 << 16;
v13 = *((unsigned __int8 *)a2 + 1) << 8;
v14 = *((unsigned __int8 *)a2 + 2);
if ( *(char *)a2 < 0 )
v15 = (v14 | v13) + v12 - 0x1000000;
else
v15 = v13 | v14 | v12;
v43 = *(unsigned __int8 *)a3 << 16;
v44 = *((unsigned __int8 *)a3 + 1) << 8;
v45 = *((unsigned __int8 *)a3 + 2);
if ( *(char *)a3 < 0 )
v46 = (v45 | v44) + v43 - 0x1000000;
else
v46 = v44 | v45 | v43;
v47 = *((unsigned __int8 *)a2 + 3) << 16;
v48 = *((unsigned __int8 *)a2 + 4) << 8;
v49 = *((unsigned __int8 *)a2 + 5);
if ( *((char *)a2 + 3) < 0 )
v50 = (v49 | v48) + v47 - 0x1000000;
else
v50 = v48 | v49 | v47;
v51 = *((unsigned __int8 *)a3 + 3) << 16;
v52 = *((unsigned __int8 *)a3 + 4) << 8;
v53 = *((unsigned __int8 *)a3 + 5);
if ( *((char *)a3 + 3) < 0 )
v54 = (v53 | v52) + v51 - 0x1000000;
else
v54 = v52 | v53 | v51;
if ( v15 > v46 )
v46 = v15;
if ( v50 < v54 )
v54 = v50;
v10 = v54 <= v46;
v55 = v54 - v46;
if ( v10 )
return 0.0;
v21 = (double)v55;
goto LABEL_75;
case 0xD:
v16 = (unsigned __int16)__ROL2__(*(_WORD *)((char *)a2 + 1), 8) | (*(unsigned __int8 *)a2 << 16);
v17 = (unsigned __int16)__ROL2__(*(_WORD *)((char *)a3 + 1), 8) | (*(unsigned __int8 *)a3 << 16);
v18 = (unsigned __int16)__ROL2__(a2[2], 8) | (*((unsigned __int8 *)a2 + 3) << 16);
v19 = (unsigned __int16)__ROL2__(a3[2], 8) | (*((unsigned __int8 *)a3 + 3) << 16);
if ( v16 > v17 )
v17 = v16;
if ( v18 < v19 )
v19 = v18;
v10 = v19 <= v17;
v20 = v19 - v17;
if ( v10 )
return 0.0;
v21 = (double)v20;
goto LABEL_75;
case 0xE:
LOBYTE(v37) = *(_BYTE *)a3;
if ( *(_BYTE *)a2 > *(_BYTE *)a3 )
LOBYTE(v37) = *(_BYTE *)a2;
LOBYTE(v38) = *(_BYTE *)a3 + 1;
if ( (char)(*(_BYTE *)a2 + 1) < (char)v38 )
LOBYTE(v38) = *(_BYTE *)a2 + 1;
if ( (char)v37 < (char)v38 )
{
v38 = (char)v38;
v37 = (char)v37;
LABEL_56:
v21 = (double)(v38 - v37);
LABEL_75:
result = result * v21;
v56 = 2 * (unsigned int)*((unsigned __int16 *)v4 - 2);
a2 = (_WORD *)((char *)a2 + v56);
a3 = (_WORD *)((char *)a3 + v56);
v4 += 64;
v10 = a4 <= (int)v56;
a4 -= v56;
if ( v10 )
return result;
continue;
}
return 0.0;
default:
return -1.0;
}
}
}
| rtree_overlapping_area:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
TEST ECX,ECX
JLE 0x0018cbc2
ADD RDI,0x18
MOVSD XMM0,qword ptr [0x001e0ec8]
MOVSD XMM1,qword ptr [0x001e0ee0]
LEA RAX,[0x1e1a90]
LAB_0018c7b2:
MOVZX R8D,byte ptr [RDI]
CMP R8,0xe
JA 0x0018cbd7
MOVSXD R8,dword ptr [RAX + R8*0x4]
ADD R8,RAX
switchD:
JMP R8
caseD_a:
MOV R9,qword ptr [RSI]
MOV R10,qword ptr [RSI + 0x8]
BSWAP R9
MOV R11,qword ptr [RDX]
MOV R8,qword ptr [RDX + 0x8]
BSWAP R11
BSWAP R10
BSWAP R8
CMP R9,R11
CMOVG R11,R9
CMP R10,R8
CMOVL R8,R10
SUB R8,R11
JG 0x0018c9bb
JMP 0x0018cbcc
caseD_c:
MOVZX R11D,byte ptr [RSI]
MOV R8D,R11D
SHL R8D,0x10
MOVZX R9D,byte ptr [RSI + 0x1]
SHL R9D,0x8
MOVZX R10D,byte ptr [RSI + 0x2]
TEST R11B,R11B
JS 0x0018cae3
OR R8D,R10D
OR R8D,R9D
JMP 0x0018caf0
caseD_d:
MOVZX R8D,word ptr [RSI + 0x1]
MOVZX R9D,word ptr [RSI + 0x4]
ROL R8W,0x8
MOVZX R10D,R8W
MOVZX R8D,byte ptr [RSI]
SHL R8D,0x10
OR R8D,R10D
MOVZX R10D,word ptr [RDX + 0x1]
MOVZX R11D,word ptr [RDX + 0x4]
ROL R10W,0x8
MOVZX R10D,R10W
MOVZX EBX,byte ptr [RDX]
SHL EBX,0x10
OR EBX,R10D
ROL R9W,0x8
MOVZX R9D,R9W
MOVZX R10D,byte ptr [RSI + 0x3]
SHL R10D,0x10
OR R10D,R9D
ROL R11W,0x8
MOVZX R11D,R11W
MOVZX R9D,byte ptr [RDX + 0x3]
SHL R9D,0x10
OR R9D,R11D
CMP R8D,EBX
CMOVA EBX,R8D
CMP R10D,R9D
CMOVC R9D,R10D
SUB R9D,EBX
JBE 0x0018cbcc
XORPS XMM2,XMM2
CVTSI2SD XMM2,R9
JMP 0x0018cba1
caseD_6:
MOV R8,qword ptr [RSI]
MOV R9,qword ptr [RSI + 0x8]
BSWAP R8
MOVQ XMM3,R8
MOV R8,qword ptr [RDX]
BSWAP R8
MOV R10,qword ptr [RDX + 0x8]
MOVQ XMM2,R8
BSWAP R9
MAXSD XMM3,XMM2
MOVQ XMM2,R9
BSWAP R10
MOVQ XMM4,R10
MINSD XMM2,XMM4
UCOMISD XMM3,XMM2
JNC 0x0018cbcc
SUBSD XMM2,XMM3
JMP 0x0018cba1
caseD_4:
MOV R9D,dword ptr [RSI]
MOV R10D,dword ptr [RSI + 0x4]
BSWAP R9D
MOV R11D,dword ptr [RDX]
MOV R8D,dword ptr [RDX + 0x4]
BSWAP R11D
BSWAP R10D
BSWAP R8D
CMP R9D,R11D
CMOVG R11D,R9D
CMP R10D,R8D
CMOVL R8D,R10D
SUB R8D,R11D
JG 0x0018c97d
JMP 0x0018cbcc
caseD_8:
MOVZX R8D,word ptr [RSI]
MOVZX R9D,word ptr [RSI + 0x2]
ROL R8W,0x8
MOVZX R10D,R8W
MOVZX R8D,word ptr [RDX]
ROL R8W,0x8
MOVZX R11D,word ptr [RDX + 0x2]
MOVZX EBX,R8W
ROL R9W,0x8
MOVZX R9D,R9W
ROL R11W,0x8
MOVZX R8D,R11W
CMP R10D,EBX
CMOVA EBX,R10D
CMP R9D,R8D
CMOVC R8D,R9D
SUB R8D,EBX
JBE 0x0018cbcc
LAB_0018c97d:
XORPS XMM2,XMM2
CVTSI2SD XMM2,R8D
JMP 0x0018cba1
caseD_9:
MOV R9D,dword ptr [RSI]
MOV R10D,dword ptr [RSI + 0x4]
BSWAP R9D
MOV R11D,dword ptr [RDX]
MOV R8D,dword ptr [RDX + 0x4]
BSWAP R11D
BSWAP R10D
BSWAP R8D
CMP R9D,R11D
CMOVA R11D,R9D
CMP R10D,R8D
CMOVC R8D,R10D
SUB R8D,R11D
JBE 0x0018cbcc
LAB_0018c9bb:
XORPS XMM2,XMM2
CVTSI2SD XMM2,R8
JMP 0x0018cba1
caseD_e:
MOVZX R9D,byte ptr [RSI]
MOVZX R8D,byte ptr [RDX]
LEA R10D,[R9 + 0x1]
LEA R11D,[R8 + 0x1]
CMP R9B,R8B
CMOVG R8D,R9D
MOVZX R10D,R10B
MOVZX R9D,R11B
CMP R10B,R9B
CMOVL R9D,R10D
CMP R8B,R9B
JGE 0x0018cbcc
MOVSX R9D,R9B
MOVSX R8D,R8B
JMP 0x0018ca84
caseD_3:
MOVZX R10D,word ptr [RSI]
MOVZX R11D,word ptr [RSI + 0x2]
ROL R10W,0x8
MOVZX R8D,word ptr [RDX]
MOVZX R9D,word ptr [RDX + 0x2]
ROL R8W,0x8
ROL R11W,0x8
ROL R9W,0x8
CMP R10W,R8W
CMOVG R8D,R10D
CMP R11W,R9W
CMOVL R9D,R11D
CMP R8W,R9W
JGE 0x0018cbcc
MOVSX R9D,R9W
MOVSX R8D,R8W
JMP 0x0018ca84
caseD_2:
MOVZX R9D,byte ptr [RSI]
MOVZX R8D,byte ptr [RDX]
LEA R10D,[R8 + 0x1]
CMP R9B,R8B
CMOVA R8D,R9D
INC R9D
MOVZX R11D,R9B
MOVZX R9D,R10B
CMP R11B,R9B
CMOVC R9D,R11D
CMP R8B,R9B
JNC 0x0018cbcc
MOVZX R9D,R9B
MOVZX R8D,R8B
LAB_0018ca84:
SUB R9D,R8D
XORPS XMM2,XMM2
CVTSI2SD XMM2,R9D
JMP 0x0018cba1
caseD_5:
MOV R8D,dword ptr [RSI]
MOV R9D,dword ptr [RSI + 0x4]
BSWAP R8D
MOVD XMM2,R8D
MOV R8D,dword ptr [RDX]
MOV R10D,dword ptr [RDX + 0x4]
BSWAP R8D
MOVD XMM3,R8D
MAXSS XMM2,XMM3
BSWAP R9D
MOVD XMM3,R9D
BSWAP R10D
MOVD XMM4,R10D
MINSS XMM3,XMM4
UCOMISS XMM2,XMM3
JNC 0x0018cbcc
SUBSS XMM3,XMM2
XORPS XMM2,XMM2
CVTSS2SD XMM2,XMM3
JMP 0x0018cba1
LAB_0018cae3:
OR R9D,R10D
ADD R8D,R9D
ADD R8D,0xff000000
LAB_0018caf0:
MOVZX EBX,byte ptr [RDX]
MOV R9D,EBX
SHL R9D,0x10
MOVZX R10D,byte ptr [RDX + 0x1]
SHL R10D,0x8
MOVZX R11D,byte ptr [RDX + 0x2]
TEST BL,BL
JS 0x0018cb14
OR R9D,R11D
OR R9D,R10D
JMP 0x0018cb21
LAB_0018cb14:
OR R10D,R11D
ADD R9D,R10D
ADD R9D,0xff000000
LAB_0018cb21:
MOVZX R14D,byte ptr [RSI + 0x3]
MOV R10D,R14D
SHL R10D,0x10
MOVZX R11D,byte ptr [RSI + 0x4]
SHL R11D,0x8
MOVZX EBX,byte ptr [RSI + 0x5]
TEST R14B,R14B
JS 0x0018cb47
OR R10D,EBX
OR R10D,R11D
JMP 0x0018cb54
LAB_0018cb47:
OR R11D,EBX
ADD R10D,R11D
ADD R10D,0xff000000
LAB_0018cb54:
MOVZX R15D,byte ptr [RDX + 0x3]
MOV R11D,R15D
SHL R11D,0x10
MOVZX EBX,byte ptr [RDX + 0x4]
SHL EBX,0x8
MOVZX R14D,byte ptr [RDX + 0x5]
TEST R15B,R15B
JS 0x0018cb79
OR R11D,R14D
OR R11D,EBX
JMP 0x0018cb86
LAB_0018cb79:
OR EBX,R14D
ADD R11D,EBX
ADD R11D,0xff000000
LAB_0018cb86:
CMP R8D,R9D
CMOVG R9D,R8D
CMP R10D,R11D
CMOVL R11D,R10D
SUB R11D,R9D
JLE 0x0018cbcc
XORPS XMM2,XMM2
CVTSI2SD XMM2,R11D
LAB_0018cba1:
MULSD XMM0,XMM2
MOVZX R8D,word ptr [RDI + -0x4]
ADD R8D,R8D
ADD RSI,R8
ADD RDX,R8
ADD RDI,0x40
SUB ECX,R8D
JG 0x0018c7b2
JMP 0x0018cbd0
LAB_0018cbc2:
MOVSD XMM0,qword ptr [0x001e0ec8]
JMP 0x0018cbd0
LAB_0018cbcc:
XORPD XMM0,XMM0
caseD_0:
POP RBX
POP R14
POP R15
POP RBP
RET
caseD_1:
MOVAPD XMM0,XMM1
JMP 0x0018cbd0
|
double rtree_overlapping_area(long param_1,ulong *param_2,ulong *param_3,int param_4)
{
ushort *puVar1;
byte bVar2;
byte bVar3;
ulong uVar4;
int1 *puVar5;
byte bVar6;
ushort uVar7;
uint uVar8;
int iVar9;
uint uVar10;
float fVar11;
float fVar12;
ulong uVar13;
double dVar14;
double dVar15;
char cVar16;
byte bVar17;
ushort uVar18;
uint uVar19;
ulong uVar20;
ushort uVar21;
uint uVar22;
uint uVar23;
float fVar24;
ulong uVar25;
ushort uVar26;
ulong uVar27;
bool bVar28;
double dVar29;
double dVar30;
dVar29 = DAT_001e0ec8;
if (param_4 < 1) {
switchD_0018c7c7_caseD_0:
return dVar29;
}
puVar5 = (int1 *)(param_1 + 0x18);
do {
switch(*puVar5) {
case 0:
goto switchD_0018c7c7_caseD_0;
default:
return DAT_001e0ee0;
case 2:
bVar2 = (byte)*param_2;
bVar3 = (byte)*param_3;
bVar6 = bVar3;
if (bVar3 < bVar2) {
bVar6 = bVar2;
}
bVar17 = bVar3 + 1;
if ((byte)(bVar2 + 1) < (byte)(bVar3 + 1)) {
bVar17 = bVar2 + 1;
}
if (bVar17 <= bVar6) {
return 0.0;
}
uVar19 = (uint)bVar17;
uVar10 = (uint)bVar6;
goto LAB_0018ca84;
case 3:
uVar21 = (ushort)*param_2 << 8 | (ushort)*param_2 >> 8;
uVar7 = (ushort)*param_3 << 8 | (ushort)*param_3 >> 8;
uVar26 = *(ushort *)((long)param_2 + 2) << 8 | *(ushort *)((long)param_2 + 2) >> 8;
uVar18 = *(ushort *)((long)param_3 + 2) << 8 | *(ushort *)((long)param_3 + 2) >> 8;
if ((short)uVar7 < (short)uVar21) {
uVar7 = uVar21;
}
if ((short)uVar26 < (short)uVar18) {
uVar18 = uVar26;
}
if ((short)uVar18 <= (short)uVar7) {
return 0.0;
}
uVar19 = (uint)(short)uVar18;
uVar10 = (uint)(short)uVar7;
goto LAB_0018ca84;
case 4:
uVar10 = (uint)*param_2;
uVar19 = *(uint *)((long)param_2 + 4);
uVar22 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 | uVar10 << 0x18;
uVar10 = (uint)*param_3;
uVar8 = *(uint *)((long)param_3 + 4);
uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 | uVar10 << 0x18;
uVar23 = uVar19 >> 0x18 | (uVar19 & 0xff0000) >> 8 | (uVar19 & 0xff00) << 8 | uVar19 << 0x18;
uVar19 = uVar8 >> 0x18 | (uVar8 & 0xff0000) >> 8 | (uVar8 & 0xff00) << 8 | uVar8 << 0x18;
if ((int)uVar10 < (int)uVar22) {
uVar10 = uVar22;
}
if ((int)uVar23 < (int)uVar19) {
uVar19 = uVar23;
}
iVar9 = uVar19 - uVar10;
if (iVar9 == 0 || (int)uVar19 < (int)uVar10) {
return 0.0;
}
goto LAB_0018c97d;
case 5:
uVar10 = (uint)*param_2;
uVar19 = *(uint *)((long)param_2 + 4);
fVar11 = (float)(uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |
uVar10 << 0x18);
uVar10 = (uint)*param_3;
uVar8 = *(uint *)((long)param_3 + 4);
fVar12 = (float)(uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |
uVar10 << 0x18);
if (fVar11 <= fVar12) {
fVar11 = fVar12;
}
fVar12 = (float)(uVar19 >> 0x18 | (uVar19 & 0xff0000) >> 8 | (uVar19 & 0xff00) << 8 |
uVar19 << 0x18);
fVar24 = (float)(uVar8 >> 0x18 | (uVar8 & 0xff0000) >> 8 | (uVar8 & 0xff00) << 8 |
uVar8 << 0x18);
if (fVar24 <= fVar12) {
fVar12 = fVar24;
}
if (fVar12 <= fVar11) {
return 0.0;
}
dVar30 = (double)(fVar12 - fVar11);
break;
case 6:
uVar13 = *param_2;
uVar25 = param_2[1];
dVar14 = (double)(uVar13 >> 0x38 | (uVar13 & 0xff000000000000) >> 0x28 |
(uVar13 & 0xff0000000000) >> 0x18 | (uVar13 & 0xff00000000) >> 8 |
(uVar13 & 0xff000000) << 8 | (uVar13 & 0xff0000) << 0x18 |
(uVar13 & 0xff00) << 0x28 | uVar13 << 0x38);
uVar13 = *param_3;
dVar15 = (double)(uVar13 >> 0x38 | (uVar13 & 0xff000000000000) >> 0x28 |
(uVar13 & 0xff0000000000) >> 0x18 | (uVar13 & 0xff00000000) >> 8 |
(uVar13 & 0xff000000) << 8 | (uVar13 & 0xff0000) << 0x18 |
(uVar13 & 0xff00) << 0x28 | uVar13 << 0x38);
uVar13 = param_3[1];
dVar30 = (double)(uVar25 >> 0x38 | (uVar25 & 0xff000000000000) >> 0x28 |
(uVar25 & 0xff0000000000) >> 0x18 | (uVar25 & 0xff00000000) >> 8 |
(uVar25 & 0xff000000) << 8 | (uVar25 & 0xff0000) << 0x18 |
(uVar25 & 0xff00) << 0x28 | uVar25 << 0x38);
if (dVar14 <= dVar15) {
dVar14 = dVar15;
}
dVar15 = (double)(uVar13 >> 0x38 | (uVar13 & 0xff000000000000) >> 0x28 |
(uVar13 & 0xff0000000000) >> 0x18 | (uVar13 & 0xff00000000) >> 8 |
(uVar13 & 0xff000000) << 8 | (uVar13 & 0xff0000) << 0x18 |
(uVar13 & 0xff00) << 0x28 | uVar13 << 0x38);
if (dVar15 <= dVar30) {
dVar30 = dVar15;
}
if (dVar30 <= dVar14) {
return 0.0;
}
dVar30 = dVar30 - dVar14;
break;
case 8:
uVar7 = (ushort)*param_3 << 8 | (ushort)*param_3 >> 8;
uVar19 = (uint)(ushort)((ushort)*param_2 << 8 | (ushort)*param_2 >> 8);
uVar10 = (uint)uVar7;
if (uVar7 < uVar19) {
uVar10 = uVar19;
}
uVar8 = (uint)(ushort)(*(ushort *)((long)param_2 + 2) << 8 |
*(ushort *)((long)param_2 + 2) >> 8);
uVar19 = (uint)(ushort)(*(ushort *)((long)param_3 + 2) << 8 |
*(ushort *)((long)param_3 + 2) >> 8);
if (uVar8 < uVar19) {
uVar19 = uVar8;
}
iVar9 = uVar19 - uVar10;
if (uVar19 < uVar10 || iVar9 == 0) {
return 0.0;
}
LAB_0018c97d:
dVar30 = (double)iVar9;
break;
case 9:
uVar10 = (uint)*param_2;
uVar19 = *(uint *)((long)param_2 + 4);
uVar22 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 | uVar10 << 0x18;
uVar10 = (uint)*param_3;
uVar8 = *(uint *)((long)param_3 + 4);
uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 | uVar10 << 0x18;
uVar23 = uVar19 >> 0x18 | (uVar19 & 0xff0000) >> 8 | (uVar19 & 0xff00) << 8 | uVar19 << 0x18;
uVar19 = uVar8 >> 0x18 | (uVar8 & 0xff0000) >> 8 | (uVar8 & 0xff00) << 8 | uVar8 << 0x18;
if (uVar10 < uVar22) {
uVar10 = uVar22;
}
if (uVar23 < uVar19) {
uVar19 = uVar23;
}
uVar25 = (ulong)(uVar19 - uVar10);
if (uVar19 < uVar10 || uVar19 - uVar10 == 0) {
return 0.0;
}
goto LAB_0018c9bb;
case 10:
case 0xb:
uVar13 = *param_2;
uVar25 = param_2[1];
uVar20 = uVar13 >> 0x38 | (uVar13 & 0xff000000000000) >> 0x28 |
(uVar13 & 0xff0000000000) >> 0x18 | (uVar13 & 0xff00000000) >> 8 |
(uVar13 & 0xff000000) << 8 | (uVar13 & 0xff0000) << 0x18 | (uVar13 & 0xff00) << 0x28
| uVar13 << 0x38;
uVar13 = *param_3;
uVar4 = param_3[1];
uVar27 = uVar13 >> 0x38 | (uVar13 & 0xff000000000000) >> 0x28 |
(uVar13 & 0xff0000000000) >> 0x18 | (uVar13 & 0xff00000000) >> 8 |
(uVar13 & 0xff000000) << 8 | (uVar13 & 0xff0000) << 0x18 | (uVar13 & 0xff00) << 0x28
| uVar13 << 0x38;
uVar25 = uVar25 >> 0x38 | (uVar25 & 0xff000000000000) >> 0x28 |
(uVar25 & 0xff0000000000) >> 0x18 | (uVar25 & 0xff00000000) >> 8 |
(uVar25 & 0xff000000) << 8 | (uVar25 & 0xff0000) << 0x18 | (uVar25 & 0xff00) << 0x28
| uVar25 << 0x38;
uVar13 = uVar4 >> 0x38 | (uVar4 & 0xff000000000000) >> 0x28 | (uVar4 & 0xff0000000000) >> 0x18
| (uVar4 & 0xff00000000) >> 8 | (uVar4 & 0xff000000) << 8 |
(uVar4 & 0xff0000) << 0x18 | (uVar4 & 0xff00) << 0x28 | uVar4 << 0x38;
if ((long)uVar27 < (long)uVar20) {
uVar27 = uVar20;
}
if ((long)uVar25 < (long)uVar13) {
uVar13 = uVar25;
}
uVar25 = uVar13 - uVar27;
if (uVar25 == 0 || (long)uVar13 < (long)uVar27) {
return 0.0;
}
LAB_0018c9bb:
dVar30 = (double)(long)uVar25;
break;
case 0xc:
uVar10 = (uint)(byte)*param_2 * 0x10000;
if ((char)(byte)*param_2 < '\0') {
uVar10 = (uVar10 + CONCAT11(*(byte *)((long)param_2 + 1),*(byte *)((long)param_2 + 2))) -
0x1000000;
}
else {
uVar10 = uVar10 | *(byte *)((long)param_2 + 2) | (uint)*(byte *)((long)param_2 + 1) << 8;
}
uVar19 = (uint)(byte)*param_3 * 0x10000;
if ((char)(byte)*param_3 < '\0') {
uVar19 = (uVar19 + CONCAT11(*(byte *)((long)param_3 + 1),*(byte *)((long)param_3 + 2))) -
0x1000000;
}
else {
uVar19 = uVar19 | *(byte *)((long)param_3 + 2) | (uint)*(byte *)((long)param_3 + 1) << 8;
}
uVar8 = (uint)*(byte *)((long)param_2 + 3) * 0x10000;
if ((char)*(byte *)((long)param_2 + 3) < '\0') {
uVar8 = (uVar8 + CONCAT11(*(byte *)((long)param_2 + 4),*(byte *)((long)param_2 + 5))) -
0x1000000;
}
else {
uVar8 = uVar8 | *(byte *)((long)param_2 + 5) | (uint)*(byte *)((long)param_2 + 4) << 8;
}
uVar22 = (uint)*(byte *)((long)param_3 + 3) * 0x10000;
if ((char)*(byte *)((long)param_3 + 3) < '\0') {
uVar22 = (uVar22 + CONCAT11(*(byte *)((long)param_3 + 4),*(byte *)((long)param_3 + 5))) -
0x1000000;
}
else {
uVar22 = uVar22 | *(byte *)((long)param_3 + 5) | (uint)*(byte *)((long)param_3 + 4) << 8;
}
if ((int)uVar19 < (int)uVar10) {
uVar19 = uVar10;
}
if ((int)uVar8 < (int)uVar22) {
uVar22 = uVar8;
}
if (uVar22 - uVar19 == 0 || (int)uVar22 < (int)uVar19) {
return 0.0;
}
dVar30 = (double)(int)(uVar22 - uVar19);
break;
case 0xd:
uVar8 = (uint)CONCAT12((byte)*param_2,
*(ushort *)((long)param_2 + 1) << 8 |
*(ushort *)((long)param_2 + 1) >> 8);
uVar10 = (uint)CONCAT12((byte)*param_3,
*(ushort *)((long)param_3 + 1) << 8 |
*(ushort *)((long)param_3 + 1) >> 8);
uVar22 = (uint)CONCAT12(*(byte *)((long)param_2 + 3),
*(ushort *)((long)param_2 + 4) << 8 |
*(ushort *)((long)param_2 + 4) >> 8);
uVar19 = (uint)CONCAT12(*(byte *)((long)param_3 + 3),
*(ushort *)((long)param_3 + 4) << 8 |
*(ushort *)((long)param_3 + 4) >> 8);
if (uVar10 < uVar8) {
uVar10 = uVar8;
}
if (uVar22 < uVar19) {
uVar19 = uVar22;
}
if (uVar19 < uVar10 || uVar19 - uVar10 == 0) {
return 0.0;
}
dVar30 = (double)(uVar19 - uVar10);
break;
case 0xe:
bVar2 = (byte)*param_2;
bVar3 = (byte)*param_3;
bVar6 = bVar3;
if ((char)bVar3 < (char)bVar2) {
bVar6 = bVar2;
}
cVar16 = bVar3 + 1;
if ((char)(bVar2 + 1) < (char)(bVar3 + 1)) {
cVar16 = bVar2 + 1;
}
if (cVar16 <= (char)bVar6) {
return 0.0;
}
uVar19 = (uint)cVar16;
uVar10 = (uint)(char)bVar6;
LAB_0018ca84:
dVar30 = (double)(int)(uVar19 - uVar10);
}
dVar29 = dVar29 * dVar30;
puVar1 = (ushort *)(puVar5 + -4);
uVar10 = (uint)*puVar1 * 2;
param_2 = (ulong *)((long)param_2 + (ulong)uVar10);
param_3 = (ulong *)((long)param_3 + (ulong)uVar10);
puVar5 = puVar5 + 0x40;
bVar28 = SBORROW4(param_4,uVar10);
param_4 = param_4 + (uint)*puVar1 * -2;
if (param_4 == 0 || bVar28 != param_4 < 0) {
return dVar29;
}
} while( true );
}
| |
48,859 | hash_string | bluesky950520[P]quickjs/quickjs.c | static uint32_t hash_string(const JSString *str, uint32_t h)
{
if (str->is_wide_char)
h = hash_string16(str->u.str16, str->len, h);
else
h = hash_string8(str->u.str8, str->len, h);
return h;
} | O1 | c | hash_string:
movl %esi, %eax
movq 0x4(%rdi), %rdx
movl %edx, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
testl %edx, %edx
js 0x3bb76
testq %rcx, %rcx
je 0x3bb92
xorl %edx, %edx
imull $0x107, %eax, %esi # imm = 0x107
movzbl 0x18(%rdi,%rdx), %eax
addl %esi, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x3bb5f
jmp 0x3bb92
testq %rcx, %rcx
je 0x3bb92
xorl %edx, %edx
imull $0x107, %eax, %esi # imm = 0x107
movzwl 0x18(%rdi,%rdx,2), %eax
addl %esi, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x3bb7d
retq
| hash_string:
mov eax, esi
mov rdx, [rdi+4]
mov ecx, edx
and ecx, 7FFFFFFFh
test edx, edx
js short loc_3BB76
test rcx, rcx
jz short locret_3BB92
xor edx, edx
loc_3BB5F:
imul esi, eax, 107h
movzx eax, byte ptr [rdi+rdx+18h]
add eax, esi
inc rdx
cmp rcx, rdx
jnz short loc_3BB5F
jmp short locret_3BB92
loc_3BB76:
test rcx, rcx
jz short locret_3BB92
xor edx, edx
loc_3BB7D:
imul esi, eax, 107h
movzx eax, word ptr [rdi+rdx*2+18h]
add eax, esi
inc rdx
cmp rcx, rdx
jnz short loc_3BB7D
locret_3BB92:
retn
| long long hash_string(long long a1, unsigned int a2)
{
long long result; // rax
long long v3; // rcx
long long j; // rdx
long long i; // rdx
result = a2;
v3 = *(_QWORD *)(a1 + 4) & 0x7FFFFFFFLL;
if ( (int)*(_QWORD *)(a1 + 4) < 0 )
{
if ( v3 )
{
for ( i = 0LL; i != v3; ++i )
result = 263 * (_DWORD)result + (unsigned int)*(unsigned __int16 *)(a1 + 2 * i + 24);
}
}
else if ( v3 )
{
for ( j = 0LL; j != v3; ++j )
result = 263 * (_DWORD)result + (unsigned int)*(unsigned __int8 *)(a1 + j + 24);
}
return result;
}
| hash_string:
MOV EAX,ESI
MOV RDX,qword ptr [RDI + 0x4]
MOV ECX,EDX
AND ECX,0x7fffffff
TEST EDX,EDX
JS 0x0013bb76
TEST RCX,RCX
JZ 0x0013bb92
XOR EDX,EDX
LAB_0013bb5f:
IMUL ESI,EAX,0x107
MOVZX EAX,byte ptr [RDI + RDX*0x1 + 0x18]
ADD EAX,ESI
INC RDX
CMP RCX,RDX
JNZ 0x0013bb5f
JMP 0x0013bb92
LAB_0013bb76:
TEST RCX,RCX
JZ 0x0013bb92
XOR EDX,EDX
LAB_0013bb7d:
IMUL ESI,EAX,0x107
MOVZX EAX,word ptr [RDI + RDX*0x2 + 0x18]
ADD EAX,ESI
INC RDX
CMP RCX,RDX
JNZ 0x0013bb7d
LAB_0013bb92:
RET
|
int hash_string(long param_1,int param_2)
{
ulong uVar1;
uint uVar2;
ulong uVar3;
uVar2 = (uint)*(int8 *)(param_1 + 4);
uVar1 = (ulong)(uVar2 & 0x7fffffff);
if ((int)uVar2 < 0) {
if (uVar1 != 0) {
uVar3 = 0;
do {
param_2 = (uint)*(ushort *)(param_1 + 0x18 + uVar3 * 2) + param_2 * 0x107;
uVar3 = uVar3 + 1;
} while (uVar1 != uVar3);
}
}
else if (uVar1 != 0) {
uVar3 = 0;
do {
param_2 = (uint)*(byte *)(param_1 + 0x18 + uVar3) + param_2 * 0x107;
uVar3 = uVar3 + 1;
} while (uVar1 != uVar3);
}
return param_2;
}
| |
48,860 | hash_string | bluesky950520[P]quickjs/quickjs.c | static uint32_t hash_string(const JSString *str, uint32_t h)
{
if (str->is_wide_char)
h = hash_string16(str->u.str16, str->len, h);
else
h = hash_string8(str->u.str8, str->len, h);
return h;
} | O2 | c | hash_string:
movl %esi, %eax
movq 0x4(%rdi), %rcx
addq $0x18, %rdi
movl %ecx, %esi
andl $0x7fffffff, %esi # imm = 0x7FFFFFFF
testl %ecx, %ecx
js 0x3497f
movl %eax, %edx
jmp 0x34631
xorl %ecx, %ecx
cmpq %rcx, %rsi
je 0x34997
imull $0x107, %eax, %edx # imm = 0x107
movzwl (%rdi,%rcx,2), %eax
addl %edx, %eax
incq %rcx
jmp 0x34981
retq
| hash_string:
mov eax, esi
mov rcx, [rdi+4]
add rdi, 18h
mov esi, ecx
and esi, 7FFFFFFFh
test ecx, ecx
js short loc_3497F
mov edx, eax
jmp hash_string8
loc_3497F:
xor ecx, ecx
loc_34981:
cmp rsi, rcx
jz short locret_34997
imul edx, eax, 107h
movzx eax, word ptr [rdi+rcx*2]
add eax, edx
inc rcx
jmp short loc_34981
locret_34997:
retn
| long long hash_string(long long a1, unsigned int a2)
{
long long result; // rax
long long v3; // rcx
long long v4; // rdi
long long v5; // rsi
long long i; // rcx
result = a2;
v3 = *(_QWORD *)(a1 + 4);
v4 = a1 + 24;
v5 = v3 & 0x7FFFFFFF;
if ( (int)v3 >= 0 )
return hash_string8(v4, v5, result);
for ( i = 0LL; v5 != i; ++i )
result = 263 * (_DWORD)result + (unsigned int)*(unsigned __int16 *)(v4 + 2 * i);
return result;
}
| hash_string:
MOV EAX,ESI
MOV RCX,qword ptr [RDI + 0x4]
ADD RDI,0x18
MOV ESI,ECX
AND ESI,0x7fffffff
TEST ECX,ECX
JS 0x0013497f
MOV EDX,EAX
JMP 0x00134631
LAB_0013497f:
XOR ECX,ECX
LAB_00134981:
CMP RSI,RCX
JZ 0x00134997
IMUL EDX,EAX,0x107
MOVZX EAX,word ptr [RDI + RCX*0x2]
ADD EAX,EDX
INC RCX
JMP 0x00134981
LAB_00134997:
RET
|
void hash_string(long param_1,int4 param_2)
{
uint uVar1;
ulong uVar2;
ulong uVar3;
uVar1 = (uint)*(int8 *)(param_1 + 4);
uVar3 = (ulong)(uVar1 & 0x7fffffff);
if (-1 < (int)uVar1) {
hash_string8(param_1 + 0x18,uVar3,param_2);
return;
}
for (uVar2 = 0; uVar3 != uVar2; uVar2 = uVar2 + 1) {
}
return;
}
| |
48,861 | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, minja::Value&&) | monkey531[P]llama/common/json.hpp | std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
} | O3 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, minja::Value&&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
cmpq 0x8(%rdi), %rbx
je 0x8e9f5
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8cd20
testb %al, %al
jne 0x8ea0f
addq $0x60, %rbx
cmpq 0x8(%r14), %rbx
jne 0x8e9dc
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x8ea20
movq 0x8(%r14), %rbx
addq $-0x60, %rbx
movb $0x1, %dl
jmp 0x8ea11
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_:
push r15
push r14
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
cmp rbx, [rdi+8]
jz short loc_8E9F5
loc_8E9DC:
mov rdi, rbx
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_8EA0F
add rbx, 60h ; '`'
cmp rbx, [r14+8]
jnz short loc_8E9DC
loc_8E9F5:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE12emplace_backIJRSF_SH_EEERSI_DpOT_; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value &&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFA0h
mov dl, 1
jmp short loc_8EA11
loc_8EA0F:
xor edx, edx
loc_8EA11:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace(
long long a1,
unsigned __int8 *a2,
long long a3,
__m128d a4)
{
unsigned __int8 *v5; // rbx
v5 = *(unsigned __int8 **)a1;
if ( *(_QWORD *)a1 == *(_QWORD *)(a1 + 8) )
{
LABEL_4:
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,minja::Value>(
a1,
a2,
a3);
return *(_QWORD *)(a1 + 8) - 96LL;
}
else
{
while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v5, a2, a4) )
{
v5 += 96;
if ( v5 == *(unsigned __int8 **)(a1 + 8) )
goto LABEL_4;
}
}
return (long long)v5;
}
| emplace:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
CMP RBX,qword ptr [RDI + 0x8]
JZ 0x0018e9f5
LAB_0018e9dc:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0018cd20
TEST AL,AL
JNZ 0x0018ea0f
ADD RBX,0x60
CMP RBX,qword ptr [R14 + 0x8]
JNZ 0x0018e9dc
LAB_0018e9f5:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x0018ea20
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x60
MOV DL,0x1
JMP 0x0018ea11
LAB_0018ea0f:
XOR EDX,EDX
LAB_0018ea11:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&, minja::Value&&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::emplace(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1,Value *param_2)
{
char cVar1;
int8 extraout_RDX;
int8 uVar2;
basic_json *pbVar3;
int1 auVar4 [16];
pbVar3 = *(basic_json **)this;
if (pbVar3 != *(basic_json **)(this + 8)) {
do {
cVar1 = operator==(pbVar3,param_1);
if (cVar1 != '\0') {
uVar2 = 0;
goto LAB_0018ea11;
}
pbVar3 = pbVar3 + 0x60;
} while (pbVar3 != *(basic_json **)(this + 8));
}
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&,minja::Value>
((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this,param_1,param_2);
pbVar3 = (basic_json *)(*(long *)(this + 8) + -0x60);
uVar2 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_0018ea11:
auVar4._8_8_ = uVar2;
auVar4._0_8_ = pbVar3;
return auVar4;
}
| |
48,862 | ggml_threadpool_params_from_cpu_params(cpu_params const&) | monkey531[P]llama/common/common.cpp | struct ggml_threadpool_params ggml_threadpool_params_from_cpu_params(const cpu_params & params) {
struct ggml_threadpool_params tpp;
ggml_threadpool_params_init(&tpp, params.n_threads); // setup the defaults
if (params.mask_valid) {
std::memcpy(&tpp.cpumask, ¶ms.cpumask, GGML_MAX_N_THREADS);
}
tpp.prio = params.priority;
tpp.poll = params.poll;
tpp.strict_cpu = params.strict_cpu;
return tpp;
} | O0 | cpp | ggml_threadpool_params_from_cpu_params(cpu_params const&):
subq $0x18, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl (%rax), %esi
callq 0x5b370
movq 0x10(%rsp), %rax
testb $0x1, 0x204(%rax)
je 0xf0ab6
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x4, %rsi
movl $0x200, %edx # imm = 0x200
callq 0x5a110
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
movq 0x10(%rsp), %rdx
movl 0x208(%rdx), %edx
movl %edx, 0x204(%rcx)
movq 0x10(%rsp), %rdx
movl 0x210(%rdx), %edx
movl %edx, 0x208(%rcx)
movq 0x10(%rsp), %rdx
movb 0x20c(%rdx), %dl
andb $0x1, %dl
movb %dl, 0x20c(%rcx)
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| _Z38ggml_threadpool_params_from_cpu_paramsRK10cpu_params:
sub rsp, 18h
mov [rsp+18h+var_18], rdi
mov rax, rdi
mov [rsp+18h+var_10], rax
mov [rsp+18h+var_8], rsi
mov rax, [rsp+18h+var_8]
mov esi, [rax]
call _ggml_threadpool_params_init
mov rax, [rsp+18h+var_8]
test byte ptr [rax+204h], 1
jz short loc_F0AB6
mov rdi, [rsp+18h+var_18]
mov rsi, [rsp+18h+var_8]
add rsi, 4
mov edx, 200h
call _memcpy
loc_F0AB6:
mov rax, [rsp+18h+var_10]
mov rcx, [rsp+18h+var_18]
mov rdx, [rsp+18h+var_8]
mov edx, [rdx+208h]
mov [rcx+204h], edx
mov rdx, [rsp+18h+var_8]
mov edx, [rdx+210h]
mov [rcx+208h], edx
mov rdx, [rsp+18h+var_8]
mov dl, [rdx+20Ch]
and dl, 1
mov [rcx+20Ch], dl
add rsp, 18h
retn
| const cpu_params * ggml_threadpool_params_from_cpu_params(const cpu_params *a1, unsigned int *a2)
{
const cpu_params *result; // rax
ggml_threadpool_params_init(a1, *a2);
if ( (a2[129] & 1) != 0 )
memcpy(a1, a2 + 1, 512LL);
result = a1;
*((_DWORD *)a1 + 129) = a2[130];
*((_DWORD *)a1 + 130) = a2[132];
*((_BYTE *)a1 + 524) = a2[131] & 1;
return result;
}
| ggml_threadpool_params_from_cpu_params:
SUB RSP,0x18
MOV qword ptr [RSP],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RSI
MOV RAX,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RAX]
CALL 0x0015b370
MOV RAX,qword ptr [RSP + 0x10]
TEST byte ptr [RAX + 0x204],0x1
JZ 0x001f0ab6
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x4
MOV EDX,0x200
CALL 0x0015a110
LAB_001f0ab6:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x10]
MOV EDX,dword ptr [RDX + 0x208]
MOV dword ptr [RCX + 0x204],EDX
MOV RDX,qword ptr [RSP + 0x10]
MOV EDX,dword ptr [RDX + 0x210]
MOV dword ptr [RCX + 0x208],EDX
MOV RDX,qword ptr [RSP + 0x10]
MOV DL,byte ptr [RDX + 0x20c]
AND DL,0x1
MOV byte ptr [RCX + 0x20c],DL
ADD RSP,0x18
RET
|
/* ggml_threadpool_params_from_cpu_params(cpu_params const&) */
cpu_params * ggml_threadpool_params_from_cpu_params(cpu_params *param_1)
{
int4 *in_RSI;
ggml_threadpool_params_init(param_1,*in_RSI);
if ((*(byte *)(in_RSI + 0x81) & 1) != 0) {
memcpy(param_1,in_RSI + 1,0x200);
}
*(int4 *)(param_1 + 0x204) = in_RSI[0x82];
*(int4 *)(param_1 + 0x208) = in_RSI[0x84];
param_1[0x20c] = (cpu_params)(*(byte *)(in_RSI + 0x83) & 1);
return param_1;
}
| |
48,863 | my_xml_error_lineno | eloqsql/strings/xml.c | uint my_xml_error_lineno(MY_XML_PARSER *p)
{
uint res=0;
const char *s;
for (s=p->beg ; s<p->cur; s++)
{
if (s[0] == '\n')
res++;
}
return res;
} | O3 | c | my_xml_error_lineno:
movq 0x128(%rdi), %rcx
movq 0x130(%rdi), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
jae 0xd7ea4
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %esi, %esi
cmpb $0xa, (%rcx)
sete %sil
addl %esi, %eax
incq %rcx
cmpq %rdx, %rcx
jne 0xd7e90
popq %rbp
retq
nopl (%rax)
| my_xml_error_lineno:
mov rcx, [rdi+128h]
mov rdx, [rdi+130h]
xor eax, eax
cmp rcx, rdx
jnb short locret_D7EA4
push rbp
mov rbp, rsp
xor eax, eax
loc_D7E90:
xor esi, esi
cmp byte ptr [rcx], 0Ah
setz sil
add eax, esi
inc rcx
cmp rcx, rdx
jnz short loc_D7E90
pop rbp
locret_D7EA4:
retn
| long long my_xml_error_lineno(long long a1)
{
_BYTE *v1; // rcx
_BYTE *v2; // rdx
long long result; // rax
v1 = *(_BYTE **)(a1 + 296);
v2 = *(_BYTE **)(a1 + 304);
result = 0LL;
if ( v1 < v2 )
{
LODWORD(result) = 0;
do
result = (*v1++ == 10) + (unsigned int)result;
while ( v1 != v2 );
}
return result;
}
| my_xml_error_lineno:
MOV RCX,qword ptr [RDI + 0x128]
MOV RDX,qword ptr [RDI + 0x130]
XOR EAX,EAX
CMP RCX,RDX
JNC 0x001d7ea4
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_001d7e90:
XOR ESI,ESI
CMP byte ptr [RCX],0xa
SETZ SIL
ADD EAX,ESI
INC RCX
CMP RCX,RDX
JNZ 0x001d7e90
POP RBP
LAB_001d7ea4:
RET
|
int my_xml_error_lineno(long param_1)
{
int iVar1;
char *pcVar2;
pcVar2 = *(char **)(param_1 + 0x128);
iVar1 = 0;
if (pcVar2 < *(char **)(param_1 + 0x130)) {
iVar1 = 0;
do {
iVar1 = iVar1 + (uint)(*pcVar2 == '\n');
pcVar2 = pcVar2 + 1;
} while (pcVar2 != *(char **)(param_1 + 0x130));
}
return iVar1;
}
| |
48,864 | ma_write_static_record | eloqsql/storage/maria/ma_statrec.c | my_bool _ma_write_static_record(MARIA_HA *info, const uchar *record)
{
uchar temp[8]; /* max pointer length */
if (info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end)
{
my_off_t filepos=info->s->state.dellink;
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_read(info, &temp[0],info->s->base.rec_reflength,
info->s->state.dellink+1,
MYF(MY_NABP)))
goto err;
info->s->state.dellink= _ma_rec_pos(info->s, temp);
info->state->del--;
info->state->empty-=info->s->base.pack_reclength;
if (info->s->file_write(info, record, info->s->base.reclength,
filepos, MYF(MY_NABP)))
goto err;
}
else
{
if (info->state->data_file_length > info->s->base.max_data_file_length-
info->s->base.pack_reclength)
{
my_errno=HA_ERR_RECORD_FILE_FULL;
return(2);
}
if (info->opt_flag & WRITE_CACHE_USED)
{ /* Cash in use */
if (my_b_write(&info->rec_cache, record,
info->s->base.reclength))
goto err;
if (info->s->base.pack_reclength != info->s->base.reclength)
{
uint length=info->s->base.pack_reclength - info->s->base.reclength;
bzero(temp,length);
if (my_b_write(&info->rec_cache, temp,length))
goto err;
}
}
else
{
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_write(info, record, info->s->base.reclength,
info->state->data_file_length,
info->s->write_flag))
goto err;
if (info->s->base.pack_reclength != info->s->base.reclength)
{
uint length=info->s->base.pack_reclength - info->s->base.reclength;
bzero(temp,length);
if (info->s->file_write(info, temp,length,
info->state->data_file_length+
info->s->base.reclength,
info->s->write_flag))
goto err;
}
}
info->state->data_file_length+=info->s->base.pack_reclength;
info->s->state.split++;
}
return 0;
err:
return 1;
} | O3 | c | ma_write_static_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq 0xc8(%rax), %r15
cmpq $-0x1, %r15
je 0x5b3a9
cmpb $0x0, 0x681(%rbx)
je 0x5b47c
movq 0x20(%rbx), %rcx
movq 0x368(%rax), %rdx
subq 0x3a0(%rax), %rdx
cmpq %rdx, 0x28(%rcx)
jbe 0x5b3d4
callq 0xa1b22
movl $0x87, (%rax)
movb $0x2, %r14b
jmp 0x5b5f1
testb $0x10, 0x61c(%rbx)
jne 0x5b50e
movl $0x1, 0x598(%rbx)
movq 0x398(%rax), %rdx
movq 0x28(%rcx), %rcx
movq 0x7c8(%rax), %r8
movq %rbx, %rdi
movq %r14, %rsi
callq *0x6e8(%rax)
movb $0x1, %r14b
testq %rax, %rax
jne 0x5b5f1
movq (%rbx), %r13
movq 0x398(%r13), %rax
movq 0x3a0(%r13), %r15
cmpq %rax, %r15
je 0x5b5d2
subl %eax, %r15d
leaq -0x38(%rbp), %r12
movl $0x8, %ecx
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x297f0
movq 0x20(%rbx), %rax
movq 0x398(%r13), %rcx
addq 0x28(%rax), %rcx
movq 0x7c8(%r13), %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0x6e8(%r13)
testq %rax, %rax
jne 0x5b5f1
jmp 0x5b5d2
movl $0x1, 0x598(%rbx)
movl 0x3e0(%rax), %edx
movq 0xc8(%rax), %rcx
incq %rcx
leaq -0x38(%rbp), %rsi
movl $0x4, %r8d
movq %rbx, %rdi
callq *0x6e0(%rax)
testq %rax, %rax
jne 0x5b506
movq (%rbx), %rdi
leaq -0x38(%rbp), %rsi
callq 0x57159
movq (%rbx), %rcx
movq %rax, 0xc8(%rcx)
movq 0x20(%rbx), %rax
decq 0x8(%rax)
movq (%rbx), %rax
movq 0x20(%rbx), %rcx
movq 0x3a0(%rax), %rax
subq %rax, 0x10(%rcx)
movq (%rbx), %rax
movq 0x398(%rax), %rdx
movl $0x4, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq *0x6e8(%rax)
testq %rax, %rax
je 0x5b5ee
movb $0x1, %r14b
jmp 0x5b5f1
leaq 0x4b8(%rbx), %r15
movq 0x398(%rax), %r12
movq 0x4f8(%rbx), %rdi
leaq (%rdi,%r12), %rax
cmpq 0x500(%rbx), %rax
jbe 0x5b54b
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x95823
movb $0x1, %r14b
testl %eax, %eax
jne 0x5b5f1
jmp 0x5b562
testq %r12, %r12
je 0x5b562
movq %r14, %rsi
movq %r12, %rdx
callq 0x29080
addq %r12, 0x4f8(%rbx)
movq (%rbx), %rcx
movq 0x398(%rcx), %rax
movq 0x3a0(%rcx), %r14
cmpq %rax, %r14
je 0x5b5d2
subl %eax, %r14d
leaq -0x38(%rbp), %rdi
movl $0x8, %ecx
xorl %esi, %esi
movq %r14, %rdx
callq 0x297f0
movq 0x4f8(%rbx), %rdi
leaq (%rdi,%r14), %rax
cmpq 0x500(%rbx), %rax
jbe 0x5b5ba
leaq -0x38(%rbp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x95823
movb $0x1, %r14b
testl %eax, %eax
jne 0x5b5f1
jmp 0x5b5d2
testq %r14, %r14
je 0x5b5d2
leaq -0x38(%rbp), %rsi
movq %r14, %rdx
callq 0x29080
addq %r14, 0x4f8(%rbx)
movq (%rbx), %rax
movq 0x20(%rbx), %rcx
movq 0x3a0(%rax), %rax
addq %rax, 0x28(%rcx)
movq (%rbx), %rax
incq 0xc0(%rax)
xorl %r14d, %r14d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5b612
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| _ma_write_static_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov r15, [rax+0C8h]
cmp r15, 0FFFFFFFFFFFFFFFFh
jz short loc_5B3A9
cmp byte ptr [rbx+681h], 0
jz loc_5B47C
loc_5B3A9:
mov rcx, [rbx+20h]
mov rdx, [rax+368h]
sub rdx, [rax+3A0h]
cmp [rcx+28h], rdx
jbe short loc_5B3D4
call _my_thread_var
mov dword ptr [rax], 87h
mov r14b, 2
jmp loc_5B5F1
loc_5B3D4:
test byte ptr [rbx+61Ch], 10h
jnz loc_5B50E
mov dword ptr [rbx+598h], 1
mov rdx, [rax+398h]
mov rcx, [rcx+28h]
mov r8, [rax+7C8h]
mov rdi, rbx
mov rsi, r14
call qword ptr [rax+6E8h]
mov r14b, 1
test rax, rax
jnz loc_5B5F1
mov r13, [rbx]
mov rax, [r13+398h]
mov r15, [r13+3A0h]
cmp r15, rax
jz loc_5B5D2
sub r15d, eax
lea r12, [rbp+var_38]
mov ecx, 8
mov rdi, r12
xor esi, esi
mov rdx, r15
call ___memset_chk
mov rax, [rbx+20h]
mov rcx, [r13+398h]
add rcx, [rax+28h]
mov r8, [r13+7C8h]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
call qword ptr [r13+6E8h]
test rax, rax
jnz loc_5B5F1
jmp loc_5B5D2
loc_5B47C:
mov dword ptr [rbx+598h], 1
mov edx, [rax+3E0h]
mov rcx, [rax+0C8h]
inc rcx
lea rsi, [rbp+var_38]
mov r8d, 4
mov rdi, rbx
call qword ptr [rax+6E0h]
test rax, rax
jnz short loc_5B506
mov rdi, [rbx]
lea rsi, [rbp+var_38]
call _ma_rec_pos
mov rcx, [rbx]
mov [rcx+0C8h], rax
mov rax, [rbx+20h]
dec qword ptr [rax+8]
mov rax, [rbx]
mov rcx, [rbx+20h]
mov rax, [rax+3A0h]
sub [rcx+10h], rax
mov rax, [rbx]
mov rdx, [rax+398h]
mov r8d, 4
mov rdi, rbx
mov rsi, r14
mov rcx, r15
call qword ptr [rax+6E8h]
test rax, rax
jz loc_5B5EE
loc_5B506:
mov r14b, 1
jmp loc_5B5F1
loc_5B50E:
lea r15, [rbx+4B8h]
mov r12, [rax+398h]
mov rdi, [rbx+4F8h]
lea rax, [rdi+r12]
cmp rax, [rbx+500h]
jbe short loc_5B54B
mov rdi, r15
mov rsi, r14
mov rdx, r12
call _my_b_write
mov r14b, 1
test eax, eax
jnz loc_5B5F1
jmp short loc_5B562
loc_5B54B:
test r12, r12
jz short loc_5B562
mov rsi, r14
mov rdx, r12
call _memcpy
add [rbx+4F8h], r12
loc_5B562:
mov rcx, [rbx]
mov rax, [rcx+398h]
mov r14, [rcx+3A0h]
cmp r14, rax
jz short loc_5B5D2
sub r14d, eax
lea rdi, [rbp+var_38]
mov ecx, 8
xor esi, esi
mov rdx, r14
call ___memset_chk
mov rdi, [rbx+4F8h]
lea rax, [rdi+r14]
cmp rax, [rbx+500h]
jbe short loc_5B5BA
lea rsi, [rbp+var_38]
mov rdi, r15
mov rdx, r14
call _my_b_write
mov r14b, 1
test eax, eax
jnz short loc_5B5F1
jmp short loc_5B5D2
loc_5B5BA:
test r14, r14
jz short loc_5B5D2
lea rsi, [rbp+var_38]
mov rdx, r14
call _memcpy
add [rbx+4F8h], r14
loc_5B5D2:
mov rax, [rbx]
mov rcx, [rbx+20h]
mov rax, [rax+3A0h]
add [rcx+28h], rax
mov rax, [rbx]
inc qword ptr [rax+0C0h]
loc_5B5EE:
xor r14d, r14d
loc_5B5F1:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_5B612
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5B612:
call ___stack_chk_fail
| long long ma_write_static_record(_DWORD *a1, const char *a2)
{
long long v2; // r14
long long v4; // rax
long long v5; // r15
long long v6; // rcx
long long v7; // r13
long long v8; // rax
long long v9; // r15
long long v10; // r15
long long v11; // rdx
long long v12; // r12
long long v13; // rdi
long long v14; // rax
long long v15; // r14
long long v16; // rdi
int v17; // eax
__int16 v19; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v20; // [rsp+10h] [rbp-30h]
LODWORD(v2) = (_DWORD)a2;
v20 = __readfsqword(0x28u);
v4 = *(_QWORD *)a1;
v5 = *(_QWORD *)(*(_QWORD *)a1 + 200LL);
if ( v5 != -1 && !*((_BYTE *)a1 + 1665) )
{
a1[358] = 1;
if ( (*(long long ( **)(_DWORD *, __int16 *, _QWORD, long long, long long))(v4 + 1760))(
a1,
&v19,
*(unsigned int *)(v4 + 992),
*(_QWORD *)(v4 + 200) + 1LL,
4LL)
|| (*(_QWORD *)(*(_QWORD *)a1 + 200LL) = ma_rec_pos(*(_QWORD *)a1, &v19, v11),
--*(_QWORD *)(*((_QWORD *)a1 + 4) + 8LL),
*(_QWORD *)(*((_QWORD *)a1 + 4) + 16LL) -= *(_QWORD *)(*(_QWORD *)a1 + 928LL),
(*(long long ( **)(_DWORD *, const char *, _QWORD, long long, long long))(*(_QWORD *)a1 + 1768LL))(
a1,
a2,
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
v5,
4LL)) )
{
LOBYTE(v2) = 1;
return (unsigned int)v2;
}
LABEL_25:
LODWORD(v2) = 0;
return (unsigned int)v2;
}
v6 = *((_QWORD *)a1 + 4);
if ( *(_QWORD *)(v6 + 40) > *(_QWORD *)(v4 + 872) - *(_QWORD *)(v4 + 928) )
{
*(_DWORD *)my_thread_var(a1, a2) = 135;
LOBYTE(v2) = 2;
return (unsigned int)v2;
}
if ( (a1[391] & 0x10) != 0 )
{
v12 = *(_QWORD *)(v4 + 920);
v13 = *((_QWORD *)a1 + 159);
if ( (unsigned long long)(v13 + v12) <= *((_QWORD *)a1 + 160) )
{
if ( v12 )
{
memcpy(v13, a2, v12);
*((_QWORD *)a1 + 159) += v12;
}
}
else
{
LOBYTE(v2) = 1;
if ( (unsigned int)my_b_write(a1 + 302, a2, v12) )
return (unsigned int)v2;
}
v14 = *(_QWORD *)(*(_QWORD *)a1 + 920LL);
v15 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
if ( v15 != v14 )
{
v2 = (unsigned int)(v15 - v14);
__memset_chk(&v19, 0LL, v2, 8LL);
v16 = *((_QWORD *)a1 + 159);
if ( (unsigned long long)(v16 + v2) <= *((_QWORD *)a1 + 160) )
{
if ( v2 )
{
memcpy(v16, &v19, v2);
*((_QWORD *)a1 + 159) += v2;
}
}
else
{
v17 = my_b_write(a1 + 302, &v19, v2);
LOBYTE(v2) = 1;
if ( v17 )
return (unsigned int)v2;
}
}
goto LABEL_24;
}
a1[358] = 1;
LOBYTE(v2) = 1;
if ( !(*(long long ( **)(_DWORD *, const char *, _QWORD, _QWORD, _QWORD))(v4 + 1768))(
a1,
a2,
*(_QWORD *)(v4 + 920),
*(_QWORD *)(v6 + 40),
*(_QWORD *)(v4 + 1992)) )
{
v7 = *(_QWORD *)a1;
v8 = *(_QWORD *)(*(_QWORD *)a1 + 920LL);
v9 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
if ( v9 == v8
|| (v10 = (unsigned int)(v9 - v8),
__memset_chk(&v19, 0LL, v10, 8LL),
!(*(long long ( **)(_DWORD *, __int16 *, long long, _QWORD, _QWORD))(v7 + 1768))(
a1,
&v19,
v10,
*(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) + *(_QWORD *)(v7 + 920),
*(_QWORD *)(v7 + 1992))) )
{
LABEL_24:
*(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) += *(_QWORD *)(*(_QWORD *)a1 + 928LL);
++*(_QWORD *)(*(_QWORD *)a1 + 192LL);
goto LABEL_25;
}
}
return (unsigned int)v2;
}
| _ma_write_static_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV R15,qword ptr [RAX + 0xc8]
CMP R15,-0x1
JZ 0x0015b3a9
CMP byte ptr [RBX + 0x681],0x0
JZ 0x0015b47c
LAB_0015b3a9:
MOV RCX,qword ptr [RBX + 0x20]
MOV RDX,qword ptr [RAX + 0x368]
SUB RDX,qword ptr [RAX + 0x3a0]
CMP qword ptr [RCX + 0x28],RDX
JBE 0x0015b3d4
CALL 0x001a1b22
MOV dword ptr [RAX],0x87
MOV R14B,0x2
JMP 0x0015b5f1
LAB_0015b3d4:
TEST byte ptr [RBX + 0x61c],0x10
JNZ 0x0015b50e
MOV dword ptr [RBX + 0x598],0x1
MOV RDX,qword ptr [RAX + 0x398]
MOV RCX,qword ptr [RCX + 0x28]
MOV R8,qword ptr [RAX + 0x7c8]
MOV RDI,RBX
MOV RSI,R14
CALL qword ptr [RAX + 0x6e8]
MOV R14B,0x1
TEST RAX,RAX
JNZ 0x0015b5f1
MOV R13,qword ptr [RBX]
MOV RAX,qword ptr [R13 + 0x398]
MOV R15,qword ptr [R13 + 0x3a0]
CMP R15,RAX
JZ 0x0015b5d2
SUB R15D,EAX
LEA R12,[RBP + -0x38]
MOV ECX,0x8
MOV RDI,R12
XOR ESI,ESI
MOV RDX,R15
CALL 0x001297f0
MOV RAX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [R13 + 0x398]
ADD RCX,qword ptr [RAX + 0x28]
MOV R8,qword ptr [R13 + 0x7c8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
CALL qword ptr [R13 + 0x6e8]
TEST RAX,RAX
JNZ 0x0015b5f1
JMP 0x0015b5d2
LAB_0015b47c:
MOV dword ptr [RBX + 0x598],0x1
MOV EDX,dword ptr [RAX + 0x3e0]
MOV RCX,qword ptr [RAX + 0xc8]
INC RCX
LEA RSI,[RBP + -0x38]
MOV R8D,0x4
MOV RDI,RBX
CALL qword ptr [RAX + 0x6e0]
TEST RAX,RAX
JNZ 0x0015b506
MOV RDI,qword ptr [RBX]
LEA RSI,[RBP + -0x38]
CALL 0x00157159
MOV RCX,qword ptr [RBX]
MOV qword ptr [RCX + 0xc8],RAX
MOV RAX,qword ptr [RBX + 0x20]
DEC qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x20]
MOV RAX,qword ptr [RAX + 0x3a0]
SUB qword ptr [RCX + 0x10],RAX
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RAX + 0x398]
MOV R8D,0x4
MOV RDI,RBX
MOV RSI,R14
MOV RCX,R15
CALL qword ptr [RAX + 0x6e8]
TEST RAX,RAX
JZ 0x0015b5ee
LAB_0015b506:
MOV R14B,0x1
JMP 0x0015b5f1
LAB_0015b50e:
LEA R15,[RBX + 0x4b8]
MOV R12,qword ptr [RAX + 0x398]
MOV RDI,qword ptr [RBX + 0x4f8]
LEA RAX,[RDI + R12*0x1]
CMP RAX,qword ptr [RBX + 0x500]
JBE 0x0015b54b
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
CALL 0x00195823
MOV R14B,0x1
TEST EAX,EAX
JNZ 0x0015b5f1
JMP 0x0015b562
LAB_0015b54b:
TEST R12,R12
JZ 0x0015b562
MOV RSI,R14
MOV RDX,R12
CALL 0x00129080
ADD qword ptr [RBX + 0x4f8],R12
LAB_0015b562:
MOV RCX,qword ptr [RBX]
MOV RAX,qword ptr [RCX + 0x398]
MOV R14,qword ptr [RCX + 0x3a0]
CMP R14,RAX
JZ 0x0015b5d2
SUB R14D,EAX
LEA RDI,[RBP + -0x38]
MOV ECX,0x8
XOR ESI,ESI
MOV RDX,R14
CALL 0x001297f0
MOV RDI,qword ptr [RBX + 0x4f8]
LEA RAX,[RDI + R14*0x1]
CMP RAX,qword ptr [RBX + 0x500]
JBE 0x0015b5ba
LEA RSI,[RBP + -0x38]
MOV RDI,R15
MOV RDX,R14
CALL 0x00195823
MOV R14B,0x1
TEST EAX,EAX
JNZ 0x0015b5f1
JMP 0x0015b5d2
LAB_0015b5ba:
TEST R14,R14
JZ 0x0015b5d2
LEA RSI,[RBP + -0x38]
MOV RDX,R14
CALL 0x00129080
ADD qword ptr [RBX + 0x4f8],R14
LAB_0015b5d2:
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x20]
MOV RAX,qword ptr [RAX + 0x3a0]
ADD qword ptr [RCX + 0x28],RAX
MOV RAX,qword ptr [RBX]
INC qword ptr [RAX + 0xc0]
LAB_0015b5ee:
XOR R14D,R14D
LAB_0015b5f1:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015b612
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015b612:
CALL 0x00129270
|
ulong _ma_write_static_record(long *param_1,void *param_2)
{
long lVar1;
size_t __n;
int4 *puVar2;
long lVar3;
int8 uVar4;
uint uVar5;
int7 uVar7;
ulong uVar6;
int iVar8;
long in_FS_OFFSET;
int1 local_40 [8];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar3 = *param_1;
lVar1 = *(long *)(lVar3 + 200);
uVar7 = (int7)((ulong)param_2 >> 8);
if ((lVar1 == -1) || (*(char *)((long)param_1 + 0x681) != '\0')) {
if ((ulong)(*(long *)(lVar3 + 0x368) - *(long *)(lVar3 + 0x3a0)) < *(ulong *)(param_1[4] + 0x28)
) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x87;
uVar6 = CONCAT71(uVar7,2);
goto LAB_0015b5f1;
}
if ((*(byte *)((long)param_1 + 0x61c) & 0x10) == 0) {
*(int4 *)(param_1 + 0xb3) = 1;
lVar3 = (**(code **)(lVar3 + 0x6e8))
(param_1,param_2,*(int8 *)(lVar3 + 0x398),
*(int8 *)(param_1[4] + 0x28),*(int8 *)(lVar3 + 0x7c8));
uVar6 = CONCAT71(uVar7,1);
if (lVar3 != 0) goto LAB_0015b5f1;
lVar3 = *param_1;
if (*(long *)(lVar3 + 0x3a0) != *(long *)(lVar3 + 0x398)) {
iVar8 = (int)*(long *)(lVar3 + 0x3a0) - (int)*(long *)(lVar3 + 0x398);
__memset_chk(local_40,0,iVar8,8);
lVar3 = (**(code **)(lVar3 + 0x6e8))
(param_1,local_40,iVar8,
*(long *)(lVar3 + 0x398) + *(long *)(param_1[4] + 0x28),
*(int8 *)(lVar3 + 0x7c8));
if (lVar3 != 0) goto LAB_0015b5f1;
}
}
else {
__n = *(size_t *)(lVar3 + 0x398);
if ((ulong)param_1[0xa0] < param_1[0x9f] + __n) {
iVar8 = _my_b_write(param_1 + 0x97,param_2,__n);
uVar6 = CONCAT71(uVar7,1);
if (iVar8 != 0) goto LAB_0015b5f1;
}
else if (__n != 0) {
memcpy((void *)param_1[0x9f],param_2,__n);
param_1[0x9f] = param_1[0x9f] + __n;
}
lVar3 = *(long *)(*param_1 + 0x398);
lVar1 = *(long *)(*param_1 + 0x3a0);
if (lVar1 != lVar3) {
uVar5 = (int)lVar1 - (int)lVar3;
uVar6 = (ulong)uVar5;
__memset_chk(local_40,0,uVar6,8);
if ((ulong)param_1[0xa0] < param_1[0x9f] + uVar6) {
iVar8 = _my_b_write(param_1 + 0x97,local_40,uVar6);
uVar6 = CONCAT71((uint7)(uint3)(uVar5 >> 8),1);
if (iVar8 != 0) goto LAB_0015b5f1;
}
else if (uVar6 != 0) {
memcpy((void *)param_1[0x9f],local_40,uVar6);
param_1[0x9f] = param_1[0x9f] + uVar6;
}
}
}
*(long *)(param_1[4] + 0x28) = *(long *)(param_1[4] + 0x28) + *(long *)(*param_1 + 0x3a0);
*(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + 1;
LAB_0015b5ee:
uVar6 = 0;
}
else {
*(int4 *)(param_1 + 0xb3) = 1;
lVar3 = (**(code **)(lVar3 + 0x6e0))
(param_1,local_40,*(int4 *)(lVar3 + 0x3e0),*(long *)(lVar3 + 200) + 1,4)
;
if (lVar3 == 0) {
uVar4 = _ma_rec_pos(*param_1,local_40);
*(int8 *)(*param_1 + 200) = uVar4;
*(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1;
*(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - *(long *)(*param_1 + 0x3a0);
lVar3 = (**(code **)(*param_1 + 0x6e8))
(param_1,param_2,*(int8 *)(*param_1 + 0x398),lVar1,4);
if (lVar3 == 0) goto LAB_0015b5ee;
}
uVar6 = CONCAT71(uVar7,1);
}
LAB_0015b5f1:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar6 & 0xffffffff;
}
| |
48,865 | Common::StrErrorWrapper(int, char*, unsigned long) | Dolphin-anty/Source/Core/Common/CommonFuncs.cpp | const char* StrErrorWrapper(int error, char* buffer, std::size_t length)
{
// We check defines in order to figure out which variant is in use.
#if (defined(__GLIBC__) || __ANDROID_API__ >= 23) && \
(_GNU_SOURCE || (_POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600))
return strerror_r(error, buffer, length);
#else
const int error_code = strerror_r(error, buffer, length);
return error_code == 0 ? buffer : "";
#endif
} | O3 | cpp | Common::StrErrorWrapper(int, char*, unsigned long):
jmp 0x7500
| _ZN6Common15StrErrorWrapperEiPcm:
jmp _strerror_r
| // attributes: thunk
long long Common::StrErrorWrapper(Common *this, int a2, char *a3, unsigned long long a4)
{
return strerror_r(this, a2, a3, a4);
}
| StrErrorWrapper:
JMP 0x00107500
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Common::StrErrorWrapper(int, char*, unsigned long) */
void Common::StrErrorWrapper(int param_1,char *param_2,ulong param_3)
{
(*(code *)PTR_strerror_r_00153280)();
return;
}
| |
48,866 | my_strnxfrm_tis620 | eloqsql/strings/ctype-tis620.c | static size_t
my_strnxfrm_tis620(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
size_t len, dstlen0= dstlen;
len= MY_MIN(dstlen, srclen);
memcpy(dst, src, len);
len= thai2sortable(dst, len);
set_if_smaller(dstlen, nweights);
set_if_smaller(len, dstlen);
len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen,
(uint)(dstlen - len), flags, 0);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0)
{
size_t fill_length= dstlen0 - len;
my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char);
len= dstlen0;
}
return len;
} | O0 | c | my_strnxfrm_tis620:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x7d07e
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x7d086
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x26280
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x7d170
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x7d0c3
movl -0x1c(%rbp), %eax
movq %rax, -0x18(%rbp)
jmp 0x7d0c5
jmp 0x7d0c7
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x7d0d9
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x7d0db
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rcx
addq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rax
subq -0x38(%rbp), %rax
movl %eax, %r8d
movl 0x10(%rbp), %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x77730
movq %rax, -0x38(%rbp)
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7d15f
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x7d15f
movq -0x40(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x8(%rbp), %rax
movzbl 0xb0(%rax), %ecx
callq 0x7d310
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| my_strnxfrm_tis620:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_30]
jnb short loc_7D07E
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
jmp short loc_7D086
loc_7D07E:
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
loc_7D086:
mov rax, [rbp+var_50]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
call _memcpy
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
call thai2sortable
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_1C]
cmp rax, rcx
jbe short loc_7D0C3
mov eax, [rbp+var_1C]
mov [rbp+var_18], rax
loc_7D0C3:
jmp short $+2
loc_7D0C5:
jmp short $+2
loc_7D0C7:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_18]
jbe short loc_7D0D9
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
loc_7D0D9:
jmp short $+2
loc_7D0DB:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, [rbp+var_38]
mov rcx, [rbp+var_10]
add rcx, [rbp+var_18]
mov rax, [rbp+var_18]
sub rax, [rbp+var_38]
mov r8d, eax
mov r9d, [rbp+arg_0]
xor eax, eax
mov [rsp+60h+var_60], 0
call my_strxfrm_pad_desc_and_reverse
mov [rbp+var_38], rax
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_7D15F
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
jnb short loc_7D15F
mov rax, [rbp+var_40]
sub rax, [rbp+var_38]
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
add rsi, [rbp+var_38]
mov rdx, [rbp+var_48]
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax+0B0h]
call my_ci_fill_1
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
loc_7D15F:
mov rax, [rbp+var_38]
add rsp, 60h
pop rbp
retn
| unsigned long long my_strnxfrm_tis620(
long long a1,
long long a2,
unsigned long long a3,
unsigned int a4,
long long a5,
unsigned long long a6,
unsigned int a7)
{
unsigned long long v8; // [rsp+10h] [rbp-50h]
unsigned long long v10; // [rsp+28h] [rbp-38h]
unsigned long long v11; // [rsp+28h] [rbp-38h]
unsigned long long v13; // [rsp+48h] [rbp-18h]
v13 = a3;
if ( a3 >= a6 )
v8 = a6;
else
v8 = a3;
memcpy(a2, a5, v8);
v10 = thai2sortable(a2, v8);
if ( v13 > a4 )
v13 = a4;
if ( v10 > v13 )
v10 = v13;
v11 = my_strxfrm_pad_desc_and_reverse(a1, a2, v10 + a2, v13 + a2, (int)v13 - (int)v10, a7, 0);
if ( (a7 & 0x80) != 0 && v11 < a3 )
{
my_ci_fill_1(a1, v11 + a2, a3 - v11, *(unsigned __int8 *)(a1 + 176));
return a3;
}
return v11;
}
| my_strnxfrm_tis620:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0017d07e
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0017d086
LAB_0017d07e:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x50],RAX
LAB_0017d086:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00126280
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x0017d170
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
CMP RAX,RCX
JBE 0x0017d0c3
MOV EAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x18],RAX
LAB_0017d0c3:
JMP 0x0017d0c5
LAB_0017d0c5:
JMP 0x0017d0c7
LAB_0017d0c7:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x0017d0d9
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
LAB_0017d0d9:
JMP 0x0017d0db
LAB_0017d0db:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RBP + -0x38]
MOV R8D,EAX
MOV R9D,dword ptr [RBP + 0x10]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x00177730
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0017d15f
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0017d15f
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0xb0]
CALL 0x0017d310
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
LAB_0017d15f:
MOV RAX,qword ptr [RBP + -0x38]
ADD RSP,0x60
POP RBP
RET
|
ulong my_strnxfrm_tis620(long param_1,void *param_2,ulong param_3,uint param_4,void *param_5,
ulong param_6,uint param_7)
{
size_t local_58;
ulong local_40;
ulong local_20;
local_58 = param_6;
if (param_3 < param_6) {
local_58 = param_3;
}
memcpy(param_2,param_5,local_58);
local_40 = thai2sortable(param_2,local_58);
local_20 = param_3;
if (param_4 < param_3) {
local_20 = (ulong)param_4;
}
if (local_20 < local_40) {
local_40 = local_20;
}
local_40 = my_strxfrm_pad_desc_and_reverse
(param_1,param_2,(long)param_2 + local_40,(long)param_2 + local_20,
(int)local_20 - (int)local_40,param_7,0);
if (((param_7 & 0x80) != 0) && (local_40 < param_3)) {
my_ci_fill(param_1,(long)param_2 + local_40,param_3 - local_40,*(int1 *)(param_1 + 0xb0));
local_40 = param_3;
}
return local_40;
}
| |
48,867 | resolve_pseudo_var | bluesky950520[P]quickjs/quickjs.c | static int resolve_pseudo_var(JSContext *ctx, JSFunctionDef *s,
JSAtom var_name)
{
int var_idx;
if (!s->has_this_binding)
return -1;
switch(var_name) {
case JS_ATOM_home_object:
/* 'home_object' pseudo variable */
if (s->home_object_var_idx < 0)
s->home_object_var_idx = add_var(ctx, s, var_name);
var_idx = s->home_object_var_idx;
break;
case JS_ATOM_this_active_func:
/* 'this.active_func' pseudo variable */
if (s->this_active_func_var_idx < 0)
s->this_active_func_var_idx = add_var(ctx, s, var_name);
var_idx = s->this_active_func_var_idx;
break;
case JS_ATOM_new_target:
/* 'new.target' pseudo variable */
if (s->new_target_var_idx < 0)
s->new_target_var_idx = add_var(ctx, s, var_name);
var_idx = s->new_target_var_idx;
break;
case JS_ATOM_this:
/* 'this' pseudo variable */
if (s->this_var_idx < 0)
s->this_var_idx = add_var_this(ctx, s);
var_idx = s->this_var_idx;
break;
default:
var_idx = -1;
break;
}
return var_idx;
} | O1 | c | resolve_pseudo_var:
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0x0, 0x64(%rsi)
je 0x6f088
pushq %rbx
movq %rsi, %rbx
cmpl $0x72, %edx
jg 0x6f018
cmpl $0x8, %edx
je 0x6f046
cmpl $0x72, %edx
jne 0x6f087
cmpl $0x0, 0xd8(%rbx)
jns 0x6f010
movq %rbx, %rsi
movl $0x72, %edx
callq 0x5de5e
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
jmp 0x6f087
cmpl $0x73, %edx
je 0x6f065
cmpl $0x74, %edx
jne 0x6f087
cmpl $0x0, 0xe0(%rbx)
jns 0x6f03e
movq %rbx, %rsi
movl $0x74, %edx
callq 0x5de5e
movl %eax, 0xe0(%rbx)
movl 0xe0(%rbx), %eax
jmp 0x6f087
cmpl $0x0, 0xd4(%rbx)
jns 0x6f05d
movq %rbx, %rsi
callq 0x6dab6
movl %eax, 0xd4(%rbx)
movl 0xd4(%rbx), %eax
jmp 0x6f087
cmpl $0x0, 0xdc(%rbx)
jns 0x6f081
movq %rbx, %rsi
movl $0x73, %edx
callq 0x5de5e
movl %eax, 0xdc(%rbx)
movl 0xdc(%rbx), %eax
popq %rbx
retq
| resolve_pseudo_var:
mov eax, 0FFFFFFFFh
cmp dword ptr [rsi+64h], 0
jz locret_6F088
push rbx
mov rbx, rsi
cmp edx, 72h ; 'r'
jg short loc_6F018
cmp edx, 8
jz short loc_6F046
cmp edx, 72h ; 'r'
jnz loc_6F087
cmp dword ptr [rbx+0D8h], 0
jns short loc_6F010
mov rsi, rbx
mov edx, 72h ; 'r'
call add_var
mov [rbx+0D8h], eax
loc_6F010:
mov eax, [rbx+0D8h]
jmp short loc_6F087
loc_6F018:
cmp edx, 73h ; 's'
jz short loc_6F065
cmp edx, 74h ; 't'
jnz short loc_6F087
cmp dword ptr [rbx+0E0h], 0
jns short loc_6F03E
mov rsi, rbx
mov edx, 74h ; 't'
call add_var
mov [rbx+0E0h], eax
loc_6F03E:
mov eax, [rbx+0E0h]
jmp short loc_6F087
loc_6F046:
cmp dword ptr [rbx+0D4h], 0
jns short loc_6F05D
mov rsi, rbx
call add_var_this
mov [rbx+0D4h], eax
loc_6F05D:
mov eax, [rbx+0D4h]
jmp short loc_6F087
loc_6F065:
cmp dword ptr [rbx+0DCh], 0
jns short loc_6F081
mov rsi, rbx
mov edx, 73h ; 's'
call add_var
mov [rbx+0DCh], eax
loc_6F081:
mov eax, [rbx+0DCh]
loc_6F087:
pop rbx
locret_6F088:
retn
| long long resolve_pseudo_var(
long long a1,
_DWORD *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long result; // rax
result = 0xFFFFFFFFLL;
if ( a2[25] )
{
if ( (int)a3 > 114 )
{
if ( (_DWORD)a3 == 115 )
{
if ( (int)a2[55] < 0 )
a2[55] = add_var(a1, (long long)a2, 115, a4, a7, a8, a9, a10, a11, a12, a13, a14, a5, a6);
return (unsigned int)a2[55];
}
else if ( (_DWORD)a3 == 116 )
{
if ( (int)a2[56] < 0 )
a2[56] = add_var(a1, (long long)a2, 116, a4, a7, a8, a9, a10, a11, a12, a13, a14, a5, a6);
return (unsigned int)a2[56];
}
}
else if ( (_DWORD)a3 == 8 )
{
if ( (int)a2[53] < 0 )
a2[53] = add_var_this(a1, (long long)a2, a7, a8, a9, a10, a11, a12, a13, a14, a3, a4, a5, a6);
return (unsigned int)a2[53];
}
else if ( (_DWORD)a3 == 114 )
{
if ( (int)a2[54] < 0 )
a2[54] = add_var(a1, (long long)a2, 114, a4, a7, a8, a9, a10, a11, a12, a13, a14, a5, a6);
return (unsigned int)a2[54];
}
}
return result;
}
| resolve_pseudo_var:
MOV EAX,0xffffffff
CMP dword ptr [RSI + 0x64],0x0
JZ 0x0016f088
PUSH RBX
MOV RBX,RSI
CMP EDX,0x72
JG 0x0016f018
CMP EDX,0x8
JZ 0x0016f046
CMP EDX,0x72
JNZ 0x0016f087
CMP dword ptr [RBX + 0xd8],0x0
JNS 0x0016f010
MOV RSI,RBX
MOV EDX,0x72
CALL 0x0015de5e
MOV dword ptr [RBX + 0xd8],EAX
LAB_0016f010:
MOV EAX,dword ptr [RBX + 0xd8]
JMP 0x0016f087
LAB_0016f018:
CMP EDX,0x73
JZ 0x0016f065
CMP EDX,0x74
JNZ 0x0016f087
CMP dword ptr [RBX + 0xe0],0x0
JNS 0x0016f03e
MOV RSI,RBX
MOV EDX,0x74
CALL 0x0015de5e
MOV dword ptr [RBX + 0xe0],EAX
LAB_0016f03e:
MOV EAX,dword ptr [RBX + 0xe0]
JMP 0x0016f087
LAB_0016f046:
CMP dword ptr [RBX + 0xd4],0x0
JNS 0x0016f05d
MOV RSI,RBX
CALL 0x0016dab6
MOV dword ptr [RBX + 0xd4],EAX
LAB_0016f05d:
MOV EAX,dword ptr [RBX + 0xd4]
JMP 0x0016f087
LAB_0016f065:
CMP dword ptr [RBX + 0xdc],0x0
JNS 0x0016f081
MOV RSI,RBX
MOV EDX,0x73
CALL 0x0015de5e
MOV dword ptr [RBX + 0xdc],EAX
LAB_0016f081:
MOV EAX,dword ptr [RBX + 0xdc]
LAB_0016f087:
POP RBX
LAB_0016f088:
RET
|
int4 resolve_pseudo_var(int8 param_1,long param_2,int param_3)
{
int4 uVar1;
uVar1 = 0xffffffff;
if (*(int *)(param_2 + 100) != 0) {
if (param_3 < 0x73) {
if (param_3 == 8) {
if (*(int *)(param_2 + 0xd4) < 0) {
uVar1 = add_var_this(param_1,param_2);
*(int4 *)(param_2 + 0xd4) = uVar1;
}
uVar1 = *(int4 *)(param_2 + 0xd4);
}
else if (param_3 == 0x72) {
if (*(int *)(param_2 + 0xd8) < 0) {
uVar1 = add_var(param_1,param_2,0x72);
*(int4 *)(param_2 + 0xd8) = uVar1;
}
uVar1 = *(int4 *)(param_2 + 0xd8);
}
}
else if (param_3 == 0x73) {
if (*(int *)(param_2 + 0xdc) < 0) {
uVar1 = add_var(param_1,param_2,0x73);
*(int4 *)(param_2 + 0xdc) = uVar1;
}
uVar1 = *(int4 *)(param_2 + 0xdc);
}
else if (param_3 == 0x74) {
if (*(int *)(param_2 + 0xe0) < 0) {
uVar1 = add_var(param_1,param_2,0x74);
*(int4 *)(param_2 + 0xe0) = uVar1;
}
uVar1 = *(int4 *)(param_2 + 0xe0);
}
}
return uVar1;
}
| |
48,868 | ma_SHA1Init | eloqsql/libmariadb/libmariadb/ma_sha1.c | void ma_SHA1Init(_MA_SHA1_CTX * context)
{
context->count[0] = context->count[1] = 0;
/* Load magic initialization constants.
*/
context->state[0] = 0x67452301;
context->state[1] = 0xefcdab89;
context->state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
context->state[4] = 0xc3d2e1f0;
} | O3 | c | ma_SHA1Init:
pushq %rbp
movq %rsp, %rbp
movl $0x0, 0x18(%rdi)
movaps 0x42dee(%rip), %xmm0 # 0xb8e20
movups %xmm0, (%rdi)
movl $0xc3d2e1f0, %eax # imm = 0xC3D2E1F0
movq %rax, 0x10(%rdi)
popq %rbp
retq
| ma_SHA1Init:
push rbp
mov rbp, rsp
mov dword ptr [rdi+18h], 0
movaps xmm0, cs:xmmword_B8E20
movups xmmword ptr [rdi], xmm0
mov eax, 0C3D2E1F0h
mov [rdi+10h], rax
pop rbp
retn
| long long ma_SHA1Init(long long a1)
{
long long result; // rax
*(_DWORD *)(a1 + 24) = 0;
*(_OWORD *)a1 = xmmword_B8E20;
result = 3285377520LL;
*(_QWORD *)(a1 + 16) = 3285377520LL;
return result;
}
| ma_SHA1Init:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RDI + 0x18],0x0
MOVAPS XMM0,xmmword ptr [0x001b8e20]
MOVUPS xmmword ptr [RDI],XMM0
MOV EAX,0xc3d2e1f0
MOV qword ptr [RDI + 0x10],RAX
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ma_SHA1Init(int8 *param_1)
{
int8 uVar1;
*(int4 *)(param_1 + 3) = 0;
uVar1 = _UNK_001b8e28;
*param_1 = _DAT_001b8e20;
param_1[1] = uVar1;
param_1[2] = 0xc3d2e1f0;
return;
}
| |
48,869 | rw_pr_init | eloqsql/mysys/thr_rwlock.c | int rw_pr_init(rw_pr_lock_t *rwlock)
{
pthread_mutex_init(&rwlock->lock, NULL);
pthread_cond_init(&rwlock->no_active_readers, NULL);
rwlock->active_readers= 0;
rwlock->writers_waiting_readers= 0;
rwlock->active_writer= FALSE;
#ifdef SAFE_MUTEX
rwlock->writer_thread= 0;
#endif
return 0;
} | O0 | c | rw_pr_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x24460
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x24350
movq -0x8(%rbp), %rax
movl $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x5c(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x60(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
| rw_pr_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call _pthread_mutex_init
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
xor eax, eax
mov esi, eax
call _pthread_cond_init
mov rax, [rbp+var_8]
mov dword ptr [rax+58h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+5Ch], 0
mov rax, [rbp+var_8]
mov byte ptr [rax+60h], 0
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long rw_pr_init(long long a1)
{
pthread_mutex_init(a1, 0LL);
pthread_cond_init(a1 + 40, 0LL);
*(_DWORD *)(a1 + 88) = 0;
*(_DWORD *)(a1 + 92) = 0;
*(_BYTE *)(a1 + 96) = 0;
return 0LL;
}
| rw_pr_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00124460
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00124350
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x58],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x5c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x60],0x0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 rw_pr_init(pthread_mutex_t *param_1)
{
pthread_mutex_init(param_1,(pthread_mutexattr_t *)0x0);
pthread_cond_init((pthread_cond_t *)(param_1 + 1),(pthread_condattr_t *)0x0);
*(int4 *)((long)param_1 + 0x58) = 0;
*(int4 *)((long)param_1 + 0x5c) = 0;
*(int1 *)((long)param_1 + 0x60) = 0;
return 0;
}
| |
48,870 | rw_pr_init | eloqsql/mysys/thr_rwlock.c | int rw_pr_init(rw_pr_lock_t *rwlock)
{
pthread_mutex_init(&rwlock->lock, NULL);
pthread_cond_init(&rwlock->no_active_readers, NULL);
rwlock->active_readers= 0;
rwlock->writers_waiting_readers= 0;
rwlock->active_writer= FALSE;
#ifdef SAFE_MUTEX
rwlock->writer_thread= 0;
#endif
return 0;
} | O3 | c | rw_pr_init:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x24490
leaq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0x24390
movq $0x0, 0x58(%rbx)
movb $0x0, 0x60(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| rw_pr_init:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
xor esi, esi
call _pthread_mutex_init
lea rdi, [rbx+28h]
xor esi, esi
call _pthread_cond_init
mov qword ptr [rbx+58h], 0
mov byte ptr [rbx+60h], 0
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
| long long rw_pr_init(long long a1)
{
pthread_mutex_init(a1, 0LL);
pthread_cond_init(a1 + 40, 0LL);
*(_QWORD *)(a1 + 88) = 0LL;
*(_BYTE *)(a1 + 96) = 0;
return 0LL;
}
| rw_pr_init:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR ESI,ESI
CALL 0x00124490
LEA RDI,[RBX + 0x28]
XOR ESI,ESI
CALL 0x00124390
MOV qword ptr [RBX + 0x58],0x0
MOV byte ptr [RBX + 0x60],0x0
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 rw_pr_init(pthread_mutex_t *param_1)
{
pthread_mutex_init(param_1,(pthread_mutexattr_t *)0x0);
pthread_cond_init((pthread_cond_t *)(param_1 + 1),(pthread_condattr_t *)0x0);
*(int8 *)((long)param_1 + 0x58) = 0;
*(int1 *)((long)param_1 + 0x60) = 0;
return 0;
}
| |
48,871 | arena_destroy | tsotchke[P]eshkol/src/core/memory/arena.c | void arena_destroy(Arena* arena) {
assert(arena != NULL);
// Free all blocks
Block* block = arena->first;
while (block) {
Block* next = block->next;
free(block);
block = next;
}
// Free arena control structure
free(arena);
} | O0 | c | arena_destroy:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x45a5
jmp 0x45c4
leaq 0x2f14(%rip), %rdi # 0x74c0
leaq 0x34e9(%rip), %rsi # 0x7a9c
movl $0xba, %edx
leaq 0x35fc(%rip), %rcx # 0x7bbb
callq 0x2170
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x45f5
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2040
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x45d0
movq -0x8(%rbp), %rdi
callq 0x2040
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| arena_destroy:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
cmp [rbp+var_8], 0
jz short loc_45A5
jmp short loc_45C4
loc_45A5:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0BAh
lea rcx, aVoidArenaDestr; "void arena_destroy(Arena *)"
call ___assert_fail
loc_45C4:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_10], rax
loc_45D0:
cmp [rbp+var_10], 0
jz short loc_45F5
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
call _free
mov rax, [rbp+var_18]
mov [rbp+var_10], rax
jmp short loc_45D0
loc_45F5:
mov rdi, [rbp+var_8]
call _free
add rsp, 20h
pop rbp
retn
| long long arena_destroy(long long a1)
{
_QWORD *v2; // [rsp+8h] [rbp-18h]
_QWORD *i; // [rsp+10h] [rbp-10h]
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
186LL,
"void arena_destroy(Arena *)");
for ( i = *(_QWORD **)(a1 + 8); i; i = v2 )
{
v2 = (_QWORD *)*i;
free(i);
}
return free(a1);
}
| arena_destroy:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001045a5
JMP 0x001045c4
LAB_001045a5:
LEA RDI,[0x1074ae]
LEA RSI,[0x107a8a]
MOV EDX,0xba
LEA RCX,[0x107b97]
CALL 0x00102170
LAB_001045c4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x10],RAX
LAB_001045d0:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001045f5
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00102040
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001045d0
LAB_001045f5:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00102040
ADD RSP,0x20
POP RBP
RET
|
void arena_destroy(void *param_1)
{
int8 *puVar1;
int8 *local_18;
if (param_1 != (void *)0x0) {
local_18 = *(int8 **)((long)param_1 + 8);
while (local_18 != (int8 *)0x0) {
puVar1 = (int8 *)*local_18;
free(local_18);
local_18 = puVar1;
}
free(param_1);
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",
0xba,"void arena_destroy(Arena *)");
}
| |
48,872 | frobenius_map_fp12 | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/fp12_tower.c | static void frobenius_map_fp12(vec384fp12 ret, const vec384fp12 a, size_t n)
{
static const vec384x coeffs[] = { /* (u + 1)^((P^n - 1) / 6) */
{ { TO_LIMB_T(0x07089552b319d465), TO_LIMB_T(0xc6695f92b50a8313),
TO_LIMB_T(0x97e83cccd117228f), TO_LIMB_T(0xa35baecab2dc29ee),
TO_LIMB_T(0x1ce393ea5daace4d), TO_LIMB_T(0x08f2220fb0fb66eb) },
{ TO_LIMB_T(0xb2f66aad4ce5d646), TO_LIMB_T(0x5842a06bfc497cec),
TO_LIMB_T(0xcf4895d42599d394), TO_LIMB_T(0xc11b9cba40a8e8d0),
TO_LIMB_T(0x2e3813cbe5a0de89), TO_LIMB_T(0x110eefda88847faf) } },
{ { TO_LIMB_T(0xecfb361b798dba3a), TO_LIMB_T(0xc100ddb891865a2c),
TO_LIMB_T(0x0ec08ff1232bda8e), TO_LIMB_T(0xd5c13cc6f1ca4721),
TO_LIMB_T(0x47222a47bf7b5c04), TO_LIMB_T(0x0110f184e51c5f59) } },
{ { TO_LIMB_T(0x3e2f585da55c9ad1), TO_LIMB_T(0x4294213d86c18183),
TO_LIMB_T(0x382844c88b623732), TO_LIMB_T(0x92ad2afd19103e18),
TO_LIMB_T(0x1d794e4fac7cf0b9), TO_LIMB_T(0x0bd592fc7d825ec8) },
{ TO_LIMB_T(0x7bcfa7a25aa30fda), TO_LIMB_T(0xdc17dec12a927e7c),
TO_LIMB_T(0x2f088dd86b4ebef1), TO_LIMB_T(0xd1ca2087da74d4a7),
TO_LIMB_T(0x2da2596696cebc1d), TO_LIMB_T(0x0e2b7eedbbfd87d2) } },
};
frobenius_map_fp6(ret[0], a[0], n);
frobenius_map_fp6(ret[1], a[1], n);
--n; /* implied ONE_MONT_P at index 0 */
mul_fp2(ret[1][0], ret[1][0], coeffs[n]);
mul_fp2(ret[1][1], ret[1][1], coeffs[n]);
mul_fp2(ret[1][2], ret[1][2], coeffs[n]);
} | O1 | c | frobenius_map_fp12:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x284fa
movl $0x120, %eax # imm = 0x120
leaq (%rbx,%rax), %r12
addq %rax, %r15
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x284fa
leaq (%r14,%r14,2), %rax
shlq $0x5, %rax
leaq 0x211d9(%rip), %rcx # 0x41410
leaq (%rax,%rcx), %r14
addq $-0x60, %r14
leaq 0x1f8da(%rip), %r15 # 0x3fb20
movabsq $-0x760c000300030003, %r13 # imm = 0x89F3FFFCFFFCFFFD
movq %r12, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r13, %r8
callq 0x338e0
leaq 0x180(%rbx), %rdi
movq %rdi, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r13, %r8
callq 0x338e0
addq $0x1e0, %rbx # imm = 0x1E0
movq %rbx, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r13, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x338e0
| frobenius_map_fp12:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
call frobenius_map_fp6
mov eax, 120h
lea r12, [rbx+rax]
add r15, rax
mov rdi, r12
mov rsi, r15
mov rdx, r14
call frobenius_map_fp6
lea rax, [r14+r14*2]
shl rax, 5
lea rcx, frobenius_map_fp12_coeffs
lea r14, [rax+rcx]
add r14, 0FFFFFFFFFFFFFFA0h
lea r15, BLS12_381_P
mov r13, 89F3FFFCFFFCFFFDh
mov rdi, r12
mov rsi, r12
mov rdx, r14
mov rcx, r15
mov r8, r13
call mul_mont_384x
lea rdi, [rbx+180h]
mov rsi, rdi
mov rdx, r14
mov rcx, r15
mov r8, r13
call mul_mont_384x
add rbx, 1E0h
mov rdi, rbx
mov rsi, rbx
mov rdx, r14
mov rcx, r15
mov r8, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp mul_mont_384x
| long long frobenius_map_fp12(long long a1, long long a2, long long a3)
{
char *v5; // r14
frobenius_map_fp6(a1);
frobenius_map_fp6(a1 + 288);
v5 = (char *)&frobenius_map_fp12_coeffs + 96 * a3 - 96;
mul_mont_384x(a1 + 288, a1 + 288, v5, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(a1 + 384, a1 + 384, v5, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
return mul_mont_384x(a1 + 480, a1 + 480, v5, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
}
| frobenius_map_fp12:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
CALL 0x001284fa
MOV EAX,0x120
LEA R12,[RBX + RAX*0x1]
ADD R15,RAX
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x001284fa
LEA RAX,[R14 + R14*0x2]
SHL RAX,0x5
LEA RCX,[0x141410]
LEA R14,[RAX + RCX*0x1]
ADD R14,-0x60
LEA R15,[0x13fb20]
MOV R13,-0x760c000300030003
MOV RDI,R12
MOV RSI,R12
MOV RDX,R14
MOV RCX,R15
MOV R8,R13
CALL 0x001338e0
LEA RDI,[RBX + 0x180]
MOV RSI,RDI
MOV RDX,R14
MOV RCX,R15
MOV R8,R13
CALL 0x001338e0
ADD RBX,0x1e0
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R14
MOV RCX,R15
MOV R8,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001338e0
|
void frobenius_map_fp12(long param_1,long param_2,long param_3)
{
long lVar1;
long lVar2;
frobenius_map_fp6();
lVar1 = param_1 + 0x120;
frobenius_map_fp6(lVar1,param_2 + 0x120,param_3);
lVar2 = param_3 * 0x60 + 0x1413b0;
mul_mont_384x(lVar1,lVar1,lVar2,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(param_1 + 0x180,param_1 + 0x180,lVar2,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(param_1 + 0x1e0,param_1 + 0x1e0,lVar2,BLS12_381_P,0x89f3fffcfffcfffd);
return;
}
| |
48,873 | ttt::game::FieldBitmap::set(int, int, ttt::game::Sign) | vsennov[P]tictactoe-course/src/core/state.cpp | void FieldBitmap::set(int x, int y, Sign s) {
if (!is_valid(x, y))
return;
const int bit_no = (x + y * m_cols) * 2;
const int offset = bit_no % 8;
char &byte = m_bitmap[bit_no / 8];
byte &= ~(0b11 << offset);
if (Sign::NONE == s)
return;
const int value = s == Sign::X ? 1 : 2;
byte |= value << offset;
} | O0 | cpp | ttt::game::FieldBitmap::set(int, int, ttt::game::Sign):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x4010
testb $0x1, %al
jne 0x40a1
jmp 0x4137
movq -0x38(%rbp), %rdx
movl -0xc(%rbp), %eax
movl -0x10(%rbp), %ecx
imull 0xc(%rdx), %ecx
addl %ecx, %eax
shll %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movq -0x38(%rbp), %rax
movl %edx, -0x1c(%rbp)
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl -0x18(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %ecx
movl $0x3, %edx
shll %cl, %edx
xorl $-0x1, %edx
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
andl %edx, %ecx
movb %cl, (%rax)
movl $0x2, %eax
cmpl -0x14(%rbp), %eax
jne 0x410e
jmp 0x4137
movl -0x14(%rbp), %edx
movl $0x2, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %edx
movl -0x1c(%rbp), %ecx
shll %cl, %edx
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
orl %edx, %ecx
movb %cl, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN3ttt4game11FieldBitmap3setEiiNS0_4SignE:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_14], ecx
mov rdi, [rbp+var_8]; this
mov [rbp+var_38], rdi
mov esi, [rbp+var_C]; int
mov edx, [rbp+var_10]; int
call _ZNK3ttt4game11FieldBitmap8is_validEii; ttt::game::FieldBitmap::is_valid(int,int)
test al, 1
jnz short loc_40A1
jmp loc_4137
loc_40A1:
mov rdx, [rbp+var_38]
mov eax, [rbp+var_C]
mov ecx, [rbp+var_10]
imul ecx, [rdx+0Ch]
add eax, ecx
shl eax, 1
mov [rbp+var_18], eax
mov eax, [rbp+var_18]
mov ecx, 8
cdq
idiv ecx
mov rax, [rbp+var_38]
mov [rbp+var_1C], edx
mov rax, [rax]
mov [rbp+var_40], rax
mov eax, [rbp+var_18]
mov ecx, 8
cdq
idiv ecx
mov ecx, eax
mov rax, [rbp+var_40]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov ecx, [rbp+var_1C]
mov edx, 3
shl edx, cl
xor edx, 0FFFFFFFFh
mov rax, [rbp+var_28]
movsx ecx, byte ptr [rax]
and ecx, edx
mov [rax], cl
mov eax, 2
cmp eax, [rbp+var_14]
jnz short loc_410E
jmp short loc_4137
loc_410E:
mov edx, [rbp+var_14]
mov eax, 2
mov ecx, 1
cmp edx, 0
cmovz eax, ecx
mov [rbp+var_2C], eax
mov edx, [rbp+var_2C]
mov ecx, [rbp+var_1C]
shl edx, cl
mov rax, [rbp+var_28]
movsx ecx, byte ptr [rax]
or ecx, edx
mov [rax], cl
loc_4137:
add rsp, 40h
pop rbp
retn
| char ttt::game::FieldBitmap::set(ttt::game::FieldBitmap *a1, int a2, int a3, int a4)
{
char result; // al
int v5; // eax
int v6; // edx
_BYTE *v7; // [rsp+18h] [rbp-28h]
int v8; // [rsp+28h] [rbp-18h]
result = ttt::game::FieldBitmap::is_valid(a1, a2, a3);
if ( (result & 1) != 0 )
{
v8 = 2 * (*((_DWORD *)a1 + 3) * a3 + a2);
v7 = (_BYTE *)(v8 / 8 + *(_QWORD *)a1);
*v7 &= ~(3 << (v8 % 8));
result = 2;
if ( a4 != 2 )
{
v5 = 2;
if ( !a4 )
v5 = 1;
v6 = v5 << (v8 % 8);
result = (char)v7;
*v7 |= v6;
}
}
return result;
}
| set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV dword ptr [RBP + -0x14],ECX
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RDI
MOV ESI,dword ptr [RBP + -0xc]
MOV EDX,dword ptr [RBP + -0x10]
CALL 0x00104010
TEST AL,0x1
JNZ 0x001040a1
JMP 0x00104137
LAB_001040a1:
MOV RDX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,dword ptr [RBP + -0x10]
IMUL ECX,dword ptr [RDX + 0xc]
ADD EAX,ECX
SHL EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x18]
MOV ECX,0x8
CDQ
IDIV ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0x18]
MOV ECX,0x8
CDQ
IDIV ECX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV ECX,dword ptr [RBP + -0x1c]
MOV EDX,0x3
SHL EDX,CL
XOR EDX,0xffffffff
MOV RAX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RAX]
AND ECX,EDX
MOV byte ptr [RAX],CL
MOV EAX,0x2
CMP EAX,dword ptr [RBP + -0x14]
JNZ 0x0010410e
JMP 0x00104137
LAB_0010410e:
MOV EDX,dword ptr [RBP + -0x14]
MOV EAX,0x2
MOV ECX,0x1
CMP EDX,0x0
CMOVZ EAX,ECX
MOV dword ptr [RBP + -0x2c],EAX
MOV EDX,dword ptr [RBP + -0x2c]
MOV ECX,dword ptr [RBP + -0x1c]
SHL EDX,CL
MOV RAX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RAX]
OR ECX,EDX
MOV byte ptr [RAX],CL
LAB_00104137:
ADD RSP,0x40
POP RBP
RET
|
/* ttt::game::FieldBitmap::set(int, int, ttt::game::Sign) */
void __thiscall ttt::game::FieldBitmap::set(FieldBitmap *this,int param_1,int param_2,int param_4)
{
int iVar1;
ulong uVar2;
byte *pbVar3;
byte bVar4;
uVar2 = is_valid(this,param_1,param_2);
if ((uVar2 & 1) != 0) {
iVar1 = (param_1 + param_2 * *(int *)(this + 0xc)) * 2;
pbVar3 = (byte *)(*(long *)this + (long)(iVar1 / 8));
bVar4 = (byte)(iVar1 % 8);
*pbVar3 = *pbVar3 & ((byte)(3 << (bVar4 & 0x1f)) ^ 0xff);
if (param_4 != 2) {
iVar1 = 2;
if (param_4 == 0) {
iVar1 = 1;
}
*pbVar3 = *pbVar3 | (byte)(iVar1 << (bVar4 & 0x1f));
}
}
return;
}
| |
48,874 | js_map_set | bluesky950520[P]quickjs/quickjs.c | static JSValue js_map_set(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic);
JSMapRecord *mr;
JSValue key, value;
int is_set;
if (!s)
return JS_EXCEPTION;
is_set = (magic & MAGIC_SET);
key = map_normalize_key(ctx, argv[0]);
if (s->is_weak && !is_valid_weakref_target(key))
return JS_ThrowTypeError(ctx, "invalid value used as %s key", is_set ? "WeakSet" : "WeakMap");
if (is_set)
value = JS_UNDEFINED;
else
value = argv[1];
mr = map_find_record(ctx, s, key);
if (mr) {
JS_FreeValue(ctx, mr->value);
} else {
mr = map_add_record(ctx, s, key);
if (!mr)
return JS_EXCEPTION;
}
mr->value = js_dup(value);
return js_dup(this_val);
} | O0 | c | js_map_set:
subq $0xb8, %rsp
movq %rsi, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rdi, 0x90(%rsp)
movl %ecx, 0x8c(%rsp)
movq %r8, 0x80(%rsp)
movl %r9d, 0x7c(%rsp)
movq 0x90(%rsp), %rdi
movl 0x7c(%rsp), %ecx
addl $0x23, %ecx
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x383b0
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
jne 0x7d9b0
movl $0x0, 0xa8(%rsp)
movq $0x6, 0xb0(%rsp)
jmp 0x7db8a
movl 0x7c(%rsp), %eax
andl $0x1, %eax
movl %eax, 0x44(%rsp)
movq 0x90(%rsp), %rdi
movq 0x80(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x7dbb0
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x70(%rsp), %rax
cmpl $0x0, (%rax)
je 0x7da57
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x7dc20
cmpl $0x0, %eax
jne 0x7da57
movq 0x90(%rsp), %rdi
movl 0x44(%rsp), %ecx
leaq 0x910b1(%rip), %rdx # 0x10ead7
leaq 0x910a2(%rip), %rax # 0x10eacf
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0x91077(%rip), %rsi # 0x10eab2
movb $0x0, %al
callq 0x2d300
movq %rax, 0xa8(%rsp)
movq %rdx, 0xb0(%rsp)
jmp 0x7db8a
cmpl $0x0, 0x44(%rsp)
je 0x7da85
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x7da9f
movq 0x80(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x48(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x90(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rcx
callq 0x7dc80
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0x7dae4
movq 0x90(%rsp), %rdi
movq 0x68(%rsp), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
callq 0x23c90
jmp 0x7db28
movq 0x90(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rcx
callq 0x7dd60
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x7db26
movl $0x0, 0xa8(%rsp)
movq $0x6, 0xb0(%rsp)
jmp 0x7db8a
jmp 0x7db28
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x216d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, 0x40(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x48(%rax)
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x216d0
movq %rax, 0xa8(%rsp)
movq %rdx, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
movq 0xb0(%rsp), %rdx
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
| js_map_set:
sub rsp, 0B8h
mov [rsp+0B8h+var_20], rsi
mov [rsp+0B8h+var_18], rdx
mov [rsp+0B8h+var_28], rdi
mov [rsp+0B8h+var_2C], ecx
mov [rsp+0B8h+var_38], r8
mov [rsp+0B8h+var_3C], r9d
mov rdi, [rsp+0B8h+var_28]
mov ecx, [rsp+0B8h+var_3C]
add ecx, 23h ; '#'
mov rsi, [rsp+0B8h+var_20]
mov rdx, [rsp+0B8h+var_18]
call JS_GetOpaque2
mov [rsp+0B8h+var_48], rax
cmp [rsp+0B8h+var_48], 0
jnz short loc_7D9B0
mov dword ptr [rsp+0B8h+var_10], 0
mov [rsp+0B8h+var_8], 6
jmp loc_7DB8A
loc_7D9B0:
mov eax, [rsp+0B8h+var_3C]
and eax, 1
mov [rsp+0B8h+var_74], eax
mov rdi, [rsp+0B8h+var_28]
mov rax, [rsp+0B8h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call map_normalize_key
mov [rsp+0B8h+var_88], rax
mov [rsp+0B8h+var_80], rdx
mov rax, [rsp+0B8h+var_88]
mov [rsp+0B8h+var_60], rax
mov rax, [rsp+0B8h+var_80]
mov [rsp+0B8h+var_58], rax
mov rax, [rsp+0B8h+var_48]
cmp dword ptr [rax], 0
jz short loc_7DA57
mov rdi, [rsp+0B8h+var_60]
mov rsi, [rsp+0B8h+var_58]
call is_valid_weakref_target
cmp eax, 0
jnz short loc_7DA57
mov rdi, [rsp+0B8h+var_28]
mov ecx, [rsp+0B8h+var_74]
lea rdx, aWeakmap; "WeakMap"
lea rax, aWeakset; "WeakSet"
cmp ecx, 0
cmovnz rdx, rax
lea rsi, aInvalidValueUs; "invalid value used as %s key"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0B8h+var_10], rax
mov [rsp+0B8h+var_8], rdx
jmp loc_7DB8A
loc_7DA57:
cmp [rsp+0B8h+var_74], 0
jz short loc_7DA85
mov dword ptr [rsp+0B8h+var_98], 0
mov [rsp+0B8h+var_90], 3
mov rax, [rsp+0B8h+var_98]
mov [rsp+0B8h+var_70], rax
mov rax, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_68], rax
jmp short loc_7DA9F
loc_7DA85:
mov rax, [rsp+0B8h+var_38]
mov rcx, [rax+10h]
mov [rsp+0B8h+var_70], rcx
mov rax, [rax+18h]
mov [rsp+0B8h+var_68], rax
loc_7DA9F:
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_60]
mov rcx, [rsp+0B8h+var_58]
call map_find_record
mov [rsp+0B8h+var_50], rax
cmp [rsp+0B8h+var_50], 0
jz short loc_7DAE4
mov rdi, [rsp+0B8h+var_28]
mov rax, [rsp+0B8h+var_50]
mov rsi, [rax+40h]
mov rdx, [rax+48h]
call JS_FreeValue
jmp short loc_7DB28
loc_7DAE4:
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_60]
mov rcx, [rsp+0B8h+var_58]
call map_add_record
mov [rsp+0B8h+var_50], rax
cmp [rsp+0B8h+var_50], 0
jnz short loc_7DB26
mov dword ptr [rsp+0B8h+var_10], 0
mov [rsp+0B8h+var_8], 6
jmp short loc_7DB8A
loc_7DB26:
jmp short $+2
loc_7DB28:
mov rax, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_B0], rax
mov rdi, [rsp+0B8h+var_70]
mov rsi, [rsp+0B8h+var_68]
call js_dup
mov rcx, rax
mov rax, [rsp+0B8h+var_B0]
mov [rsp+0B8h+var_A8], rcx
mov [rsp+0B8h+var_A0], rdx
mov rcx, [rsp+0B8h+var_A8]
mov [rax+40h], rcx
mov rcx, [rsp+0B8h+var_A0]
mov [rax+48h], rcx
mov rdi, [rsp+0B8h+var_20]
mov rsi, [rsp+0B8h+var_18]
call js_dup
mov [rsp+0B8h+var_10], rax
mov [rsp+0B8h+var_8], rdx
loc_7DB8A:
mov rax, [rsp+0B8h+var_10]
mov rdx, [rsp+0B8h+var_8]
add rsp, 0B8h
retn
| _DWORD * js_map_set(
long long a1,
_DWORD *a2,
unsigned int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
_QWORD *a13,
int a14)
{
long long v14; // rdx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
const char *v19; // rdx
long long v20; // rdx
char v22; // [rsp+0h] [rbp-B8h]
_DWORD *v23; // [rsp+20h] [rbp-98h]
long long v24; // [rsp+30h] [rbp-88h]
_DWORD *v25; // [rsp+48h] [rbp-70h]
long long v26; // [rsp+50h] [rbp-68h]
long long v27; // [rsp+60h] [rbp-58h]
long long record; // [rsp+68h] [rbp-50h]
_DWORD *Opaque2; // [rsp+70h] [rbp-48h]
char v30; // [rsp+7Ch] [rbp-3Ch]
long long v33; // [rsp+A8h] [rbp-10h]
v30 = a14;
Opaque2 = (_DWORD *)JS_GetOpaque2(a1, (long long)a2, a3, a14 + 35);
if ( Opaque2 )
{
v24 = map_normalize_key(a1, *a13, a13[1]);
v27 = v14;
if ( !*Opaque2 || (unsigned int)is_valid_weakref_target(v24, v14) )
{
if ( (v30 & 1) != 0 )
{
LODWORD(v23) = 0;
v25 = v23;
LODWORD(v26) = 3;
}
else
{
v25 = (_DWORD *)a13[2];
v26 = a13[3];
}
record = map_find_record(a1, Opaque2, v24, v27);
if ( record )
{
JS_FreeValue(a1, *(_QWORD *)(record + 64), *(_QWORD *)(record + 72));
}
else
{
record = map_add_record(a1, Opaque2, v24, v27);
if ( !record )
{
LODWORD(v33) = 0;
return (_DWORD *)v33;
}
}
*(_QWORD *)(record + 64) = js_dup(v25, v26);
*(_QWORD *)(record + 72) = v20;
return js_dup(a2, a3);
}
v19 = "WeakMap";
if ( (v30 & 1) != 0 )
v19 = "WeakSet";
return (_DWORD *)JS_ThrowTypeError(
a1,
(long long)"invalid value used as %s key",
(long long)v19,
v30 & 1,
v15,
v16,
a4,
a5,
a6,
a7,
v17,
v18,
a10,
a11,
v22);
}
else
{
LODWORD(v33) = 0;
}
return (_DWORD *)v33;
}
| js_map_set:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0xa0],RDX
MOV qword ptr [RSP + 0x90],RDI
MOV dword ptr [RSP + 0x8c],ECX
MOV qword ptr [RSP + 0x80],R8
MOV dword ptr [RSP + 0x7c],R9D
MOV RDI,qword ptr [RSP + 0x90]
MOV ECX,dword ptr [RSP + 0x7c]
ADD ECX,0x23
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x001383b0
MOV qword ptr [RSP + 0x70],RAX
CMP qword ptr [RSP + 0x70],0x0
JNZ 0x0017d9b0
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x6
JMP 0x0017db8a
LAB_0017d9b0:
MOV EAX,dword ptr [RSP + 0x7c]
AND EAX,0x1
MOV dword ptr [RSP + 0x44],EAX
MOV RDI,qword ptr [RSP + 0x90]
MOV RAX,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0017dbb0
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x70]
CMP dword ptr [RAX],0x0
JZ 0x0017da57
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x0017dc20
CMP EAX,0x0
JNZ 0x0017da57
MOV RDI,qword ptr [RSP + 0x90]
MOV ECX,dword ptr [RSP + 0x44]
LEA RDX,[0x20ead7]
LEA RAX,[0x20eacf]
CMP ECX,0x0
CMOVNZ RDX,RAX
LEA RSI,[0x20eab2]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0xa8],RAX
MOV qword ptr [RSP + 0xb0],RDX
JMP 0x0017db8a
LAB_0017da57:
CMP dword ptr [RSP + 0x44],0x0
JZ 0x0017da85
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x3
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x50],RAX
JMP 0x0017da9f
LAB_0017da85:
MOV RAX,qword ptr [RSP + 0x80]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x48],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x50],RAX
LAB_0017da9f:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x60]
CALL 0x0017dc80
MOV qword ptr [RSP + 0x68],RAX
CMP qword ptr [RSP + 0x68],0x0
JZ 0x0017dae4
MOV RDI,qword ptr [RSP + 0x90]
MOV RAX,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RAX + 0x40]
MOV RDX,qword ptr [RAX + 0x48]
CALL 0x00123c90
JMP 0x0017db28
LAB_0017dae4:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x60]
CALL 0x0017dd60
MOV qword ptr [RSP + 0x68],RAX
CMP qword ptr [RSP + 0x68],0x0
JNZ 0x0017db26
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x6
JMP 0x0017db8a
LAB_0017db26:
JMP 0x0017db28
LAB_0017db28:
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x001216d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x18],RDX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x48],RCX
MOV RDI,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x001216d0
MOV qword ptr [RSP + 0xa8],RAX
MOV qword ptr [RSP + 0xb0],RDX
LAB_0017db8a:
MOV RAX,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0xb0]
ADD RSP,0xb8
RET
|
int1 [16]
js_map_set(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5,uint param_6)
{
int iVar1;
int *piVar2;
char *pcVar5;
int1 auVar6 [16];
uint uStack_94;
long local_70;
int8 local_68;
long local_50;
int4 local_10;
int4 uStack_c;
int8 local_8;
int8 uVar3;
int8 uVar4;
piVar2 = (int *)JS_GetOpaque2(param_1,param_2,param_3,param_6 + 0x23);
if (piVar2 == (int *)0x0) {
local_10 = 0;
local_8 = 6;
}
else {
auVar6 = map_normalize_key(param_1,*param_5,param_5[1]);
uVar4 = auVar6._8_8_;
uVar3 = auVar6._0_8_;
if ((*piVar2 == 0) || (iVar1 = is_valid_weakref_target(uVar3,uVar4), iVar1 != 0)) {
if ((param_6 & 1) == 0) {
local_70 = param_5[2];
local_68 = param_5[3];
}
else {
local_70 = (ulong)uStack_94 << 0x20;
local_68 = 3;
}
local_50 = map_find_record(param_1,piVar2,uVar3,uVar4);
if (local_50 == 0) {
local_50 = map_add_record(param_1,piVar2,uVar3,uVar4);
if (local_50 == 0) {
local_10 = 0;
local_8 = 6;
goto LAB_0017db8a;
}
}
else {
JS_FreeValue(param_1,*(int8 *)(local_50 + 0x40),*(int8 *)(local_50 + 0x48));
}
auVar6 = js_dup(local_70,local_68);
*(int1 (*) [16])(local_50 + 0x40) = auVar6;
auVar6 = js_dup(param_2,param_3);
local_8 = auVar6._8_8_;
local_10 = auVar6._0_4_;
uStack_c = auVar6._4_4_;
}
else {
pcVar5 = "WeakMap";
if ((param_6 & 1) != 0) {
pcVar5 = "WeakSet";
}
auVar6 = JS_ThrowTypeError(param_1,"invalid value used as %s key",pcVar5);
local_8 = auVar6._8_8_;
local_10 = auVar6._0_4_;
uStack_c = auVar6._4_4_;
}
}
LAB_0017db8a:
auVar6._4_4_ = uStack_c;
auVar6._0_4_ = local_10;
auVar6._8_8_ = local_8;
return auVar6;
}
| |
48,875 | js_map_set | bluesky950520[P]quickjs/quickjs.c | static JSValue js_map_set(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic);
JSMapRecord *mr;
JSValue key, value;
int is_set;
if (!s)
return JS_EXCEPTION;
is_set = (magic & MAGIC_SET);
key = map_normalize_key(ctx, argv[0]);
if (s->is_weak && !is_valid_weakref_target(key))
return JS_ThrowTypeError(ctx, "invalid value used as %s key", is_set ? "WeakSet" : "WeakMap");
if (is_set)
value = JS_UNDEFINED;
else
value = argv[1];
mr = map_find_record(ctx, s, key);
if (mr) {
JS_FreeValue(ctx, mr->value);
} else {
mr = map_add_record(ctx, s, key);
if (!mr)
return JS_EXCEPTION;
}
mr->value = js_dup(value);
return js_dup(this_val);
} | O1 | c | js_map_set:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r14d
movq %r8, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbp
leal 0x23(%r14), %ecx
callq 0x275b5
movl $0x6, %edx
testq %rax, %rax
je 0x473b4
movq %rax, %r13
movq %rbp, %rdi
movq %r12, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq (%rbx), %rbp
movq 0x8(%rbx), %r15
movl %r15d, %eax
xorq $0x7, %rax
movq %rbp, %rcx
btrq $0x3f, %rcx
xorl %edx, %edx
orq %rax, %rcx
cmoveq %rdx, %rbp
cmoveq %rdx, %r15
cmpl $0x0, (%r13)
je 0x4738a
movq %rbp, (%rsp)
cmpl $-0x1, %r15d
je 0x4738a
cmpl $-0x8, %r15d
jne 0x4735d
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq (%rsp), %rcx
movabsq $-0x4000000000000000, %rdx # imm = 0xC000000000000000
andq 0x4(%rcx), %rdx
incq %rax
cmpq %rax, %rdx
jne 0x4738a
testb $0x1, %r14b
leaq 0x5870b(%rip), %rax # 0x9fa73
leaq 0x586fc(%rip), %rdx # 0x9fa6b
cmoveq %rax, %rdx
leaq 0x586d4(%rip), %rsi # 0x9fa4e
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22567
movl $0x6, %edx
jmp 0x473b6
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
testb $0x1, %r14b
jne 0x473bd
movq 0x10(%rbx), %r14
movq 0x18(%rbx), %rcx
movq %rcx, 0x10(%rsp)
movl %r14d, %ecx
movq %rcx, 0x8(%rsp)
andq %rax, %r14
jmp 0x473d3
xorl %ebx, %ebx
xorl %eax, %eax
jmp 0x4744a
movl $0x3, %eax
movq %rax, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
xorl %r14d, %r14d
movq %rdi, %r12
movq %r13, %rsi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x4748d
testq %rax, %rax
je 0x4745f
movq %rax, %rbx
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
movq 0x18(%r12), %rdi
callq 0x1d8c6
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdx
orq 0x8(%rsp), %r14
movq %r14, (%rsp)
movq 0x10(%rsp), %rsi
cmpl $-0x9, %esi
jb 0x47421
movq (%rsp), %rax
incl (%rax)
movq %r14, 0x40(%rbx)
movq %rsi, 0x48(%rbx)
movq %rdx, (%rsp)
cmpl $-0x9, %ecx
jb 0x47438
movq (%rsp), %rax
incl (%rax)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rdx, %rax
movl %edx, %ebx
movq %rcx, %rdx
orq %rax, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x115cc
movq %rax, %rbx
testq %rax, %rax
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdx
jne 0x47408
xorl %ebx, %ebx
xorl %eax, %eax
movl $0x6, %edx
jmp 0x4744a
| js_map_set:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14d, r9d
mov rbx, r8
mov r15, rdx
mov r12, rsi
mov rbp, rdi
lea ecx, [r14+23h]
call JS_GetOpaque2
mov edx, 6
test rax, rax
jz loc_473B4
mov r13, rax
mov rdi, rbp
mov [rsp+58h+var_40], r12
mov [rsp+58h+var_38], r15
mov rbp, [rbx]
mov r15, [rbx+8]
mov eax, r15d
xor rax, 7
mov rcx, rbp
btr rcx, 3Fh ; '?'
xor edx, edx
or rcx, rax
cmovz rbp, rdx
cmovz r15, rdx
cmp dword ptr [r13+0], 0
jz short loc_4738A
mov [rsp+58h+var_58], rbp
cmp r15d, 0FFFFFFFFh
jz short loc_4738A
cmp r15d, 0FFFFFFF8h
jnz short loc_4735D
mov rax, 7FFFFFFFFFFFFFFFh
mov rcx, [rsp+58h+var_58]
mov rdx, 0C000000000000000h
and rdx, [rcx+4]
inc rax
cmp rdx, rax
jnz short loc_4738A
loc_4735D:
test r14b, 1
lea rax, aWeakmap; "WeakMap"
lea rdx, aWeakset; "WeakSet"
cmovz rdx, rax
lea rsi, aInvalidValueUs; "invalid value used as %s key"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
jmp short loc_473B6
loc_4738A:
mov rax, 0FFFFFFFF00000000h
test r14b, 1
jnz short loc_473BD
mov r14, [rbx+10h]
mov rcx, [rbx+18h]
mov [rsp+58h+var_48], rcx
mov ecx, r14d
mov [rsp+58h+var_50], rcx
and r14, rax
jmp short loc_473D3
loc_473B4:
xor ebx, ebx
loc_473B6:
xor eax, eax
jmp loc_4744A
loc_473BD:
mov eax, 3
mov [rsp+58h+var_48], rax
mov [rsp+58h+var_50], 0
xor r14d, r14d
loc_473D3:
mov r12, rdi
mov rsi, r13
mov rdx, rbp
mov rcx, r15
call map_find_record
test rax, rax
jz short loc_4745F
mov rbx, rax
mov rsi, [rax+40h]
mov rdx, [rax+48h]
mov rdi, [r12+18h]
call JS_FreeValueRT
mov rcx, [rsp+58h+var_38]
mov rdx, [rsp+58h+var_40]
loc_47408:
or r14, [rsp+58h+var_50]
mov [rsp+58h+var_58], r14
mov rsi, [rsp+58h+var_48]
cmp esi, 0FFFFFFF7h
jb short loc_47421
mov rax, [rsp+58h+var_58]
inc dword ptr [rax]
loc_47421:
mov [rbx+40h], r14
mov [rbx+48h], rsi
mov [rsp+58h+var_58], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_47438
mov rax, [rsp+58h+var_58]
inc dword ptr [rax]
loc_47438:
mov rax, 0FFFFFFFF00000000h
and rax, rdx
mov ebx, edx
mov rdx, rcx
loc_4744A:
or rbx, rax
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4745F:
mov rdi, r12
mov rsi, r13
mov rdx, rbp
mov rcx, r15
call map_add_record
mov rbx, rax
test rax, rax
mov rcx, [rsp+58h+var_38]
mov rdx, [rsp+58h+var_40]
jnz short loc_47408
xor ebx, ebx
xor eax, eax
mov edx, 6
jmp short loc_4744A
| unsigned long long js_map_set(
long long a1,
long long a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
long long *a13,
int a14)
{
char v14; // r14
_DWORD *Opaque2; // rax
long long v18; // r8
long long v19; // r9
__m128 v20; // xmm4
__m128 v21; // xmm5
long long v22; // r13
long long v23; // rbp
long long v24; // r15
long long v25; // rcx
const char *v26; // rdx
long long v27; // rbx
long long v28; // r14
unsigned long long v29; // r14
unsigned long long v30; // rax
long long record; // rax
_QWORD *v32; // rbx
unsigned int v33; // ecx
long long v34; // rdx
_DWORD *v35; // r14
long long v37; // [rsp+8h] [rbp-50h]
long long v38; // [rsp+10h] [rbp-48h]
unsigned int v39; // [rsp+20h] [rbp-38h]
v14 = a14;
Opaque2 = (_DWORD *)JS_GetOpaque2(a1, a2, a3, a14 + 35);
if ( !Opaque2 )
{
v27 = 0LL;
LABEL_14:
v30 = 0LL;
return v30 | v27;
}
v22 = (long long)Opaque2;
v39 = a3;
v23 = *a13;
v24 = a13[1];
v25 = (unsigned int)v24 ^ 7LL | *a13 & 0x7FFFFFFFFFFFFFFFLL;
if ( !v25 )
{
v23 = 0LL;
v24 = 0LL;
}
if ( *Opaque2 )
{
if ( (_DWORD)v24 != -1 )
{
if ( (_DWORD)v24 != -8 || (v25 = v23, (*(_QWORD *)(v23 + 4) & 0xC000000000000000LL) == 0x8000000000000000LL) )
{
v26 = "WeakSet";
if ( (v14 & 1) == 0 )
v26 = "WeakMap";
v27 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"invalid value used as %s key",
(long long)v26,
v25,
v18,
v19,
a4,
a5,
a6,
a7,
v20,
v21,
a10,
a11,
v23);
goto LABEL_14;
}
}
}
if ( (v14 & 1) != 0 )
{
v38 = 3LL;
v37 = 0LL;
v29 = 0LL;
}
else
{
v28 = a13[2];
v38 = a13[3];
v37 = (unsigned int)v28;
v29 = v28 & 0xFFFFFFFF00000000LL;
}
record = map_find_record(a1, Opaque2, v23, v24);
if ( record )
{
v32 = (_QWORD *)record;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), *(_DWORD **)(record + 64), *(_QWORD *)(record + 72));
v33 = v39;
v34 = a2;
}
else
{
v32 = map_add_record(a1, v22, (_DWORD *)v23, v24);
v33 = v39;
v34 = a2;
if ( !v32 )
{
v27 = 0LL;
v30 = 0LL;
return v30 | v27;
}
}
v35 = (_DWORD *)(v37 | v29);
if ( (unsigned int)v38 >= 0xFFFFFFF7 )
++*v35;
v32[8] = v35;
v32[9] = v38;
if ( v33 >= 0xFFFFFFF7 )
++*(_DWORD *)v34;
v30 = v34 & 0xFFFFFFFF00000000LL;
v27 = (unsigned int)v34;
return v30 | v27;
}
| |||
48,876 | std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char) | monkey531[P]llama/common/common.h | std::vector<std::string> string_split<std::string>(const std::string & input, char separator)
{
std::vector<std::string> parts;
size_t begin_pos = 0;
size_t separator_pos = input.find(separator);
while (separator_pos != std::string::npos) {
std::string part = input.substr(begin_pos, separator_pos - begin_pos);
parts.emplace_back(part);
begin_pos = separator_pos + 1;
separator_pos = input.find(separator, begin_pos);
}
parts.emplace_back(input.substr(begin_pos, separator_pos - begin_pos));
return parts;
} | O1 | c | std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
xorl %r15d, %r15d
movq %rsi, %rdi
movl %edx, %esi
xorl %edx, %edx
callq 0x1bb50
cmpq $-0x1, %rax
je 0x4f223
movq %rax, %r12
xorl %r15d, %r15d
leaq 0x8(%rsp), %r13
movsbl %bpl, %ebp
movq %r12, %rcx
subq %r15, %rcx
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1b940
movq %rbx, %rdi
movq %r13, %rsi
callq 0x56260
movq %r12, %r15
incq %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x1bb50
movq %rax, %r12
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4f21d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8f0
cmpq $-0x1, %r12
jne 0x4f1cc
movq %r15, %rcx
notq %rcx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1b940
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x562a6
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f261
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x4f295
jmp 0x4f283
movq %rax, %r14
jmp 0x4f2a7
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4f2a7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq %rbx, %rdi
callq 0x21c44
movq %r14, %rdi
callq 0x1bfb0
nop
| _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
xor r15d, r15d
mov rdi, rsi
mov esi, edx
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_4F223
mov r12, rax
xor r15d, r15d
lea r13, [rsp+58h+var_50]
movsx ebp, bpl
loc_4F1CC:
mov rcx, r12
sub rcx, r15
mov rdi, r13
mov rsi, r14
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRS5_EEES9_DpOT_; std::vector<std::string>::emplace_back<std::string&>(std::string&)
mov r15, r12
inc r15
mov rdi, r14
mov esi, ebp
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r12, rax
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_4F21D
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F21D:
cmp r12, 0FFFFFFFFFFFFFFFFh
jnz short loc_4F1CC
loc_4F223:
mov rcx, r15
not rcx
lea rdi, [rsp+58h+var_50]
mov rsi, r14
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4F261
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F261:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]
jmp short loc_4F295
jmp short $+2
loc_4F283:
mov r14, rax
jmp short loc_4F2A7
mov r14, rax
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
loc_4F295:
cmp rdi, rax
jz short loc_4F2A7
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F2A7:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
| long long string_split<std::string>(long long a1, long long a2, unsigned int a3)
{
char v3; // bp
long long v4; // r15
long long v5; // rax
long long v6; // r12
void *v8[2]; // [rsp+8h] [rbp-50h] BYREF
_QWORD v9[8]; // [rsp+18h] [rbp-40h] BYREF
v3 = a3;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v4 = 0LL;
v5 = std::string::find(a2, a3, 0LL);
if ( v5 != -1 )
{
v6 = v5;
v4 = 0LL;
do
{
std::string::substr(v8, a2, v4, v6 - v4);
std::vector<std::string>::emplace_back<std::string&>(a1, v8);
v4 = v6 + 1;
v6 = std::string::find(a2, (unsigned int)v3, v6 + 1);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
}
while ( v6 != -1 );
}
std::string::substr(v8, a2, v4, ~v4);
std::vector<std::string>::emplace_back<std::string>(a1, v8);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
return a1;
}
| string_split<std::__cxx11::string>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
XOR R15D,R15D
MOV RDI,RSI
MOV ESI,EDX
XOR EDX,EDX
CALL 0x0011bb50
CMP RAX,-0x1
JZ 0x0014f223
MOV R12,RAX
XOR R15D,R15D
LEA R13,[RSP + 0x8]
MOVSX EBP,BPL
LAB_0014f1cc:
MOV RCX,R12
SUB RCX,R15
LAB_0014f1d2:
MOV RDI,R13
MOV RSI,R14
MOV RDX,R15
CALL 0x0011b940
LAB_0014f1e0:
MOV RDI,RBX
MOV RSI,R13
CALL 0x00156260
MOV R15,R12
INC R15
MOV RDI,R14
MOV ESI,EBP
MOV RDX,R15
CALL 0x0011bb50
MOV R12,RAX
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x0014f21d
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8f0
LAB_0014f21d:
CMP R12,-0x1
JNZ 0x0014f1cc
LAB_0014f223:
MOV RCX,R15
NOT RCX
LAB_0014f229:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RDX,R15
CALL 0x0011b940
LAB_0014f239:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x001562a6
LAB_0014f246:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0014f261
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8f0
LAB_0014f261:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >
string_split<std::__cxx11::string >(std::__cxx11::string const&, char) */
string * string_split<std::__cxx11::string>(string *param_1,char param_2)
{
long lVar1;
uint in_EDX;
int7 in_register_00000031;
long *local_50 [2];
long local_40 [2];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
lVar1 = std::__cxx11::string::find(param_2,(ulong)in_EDX);
if (lVar1 != -1) {
do {
/* try { // try from 0014f1d2 to 0014f1df has its CatchHandler @ 0014f283 */
std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2));
/* try { // try from 0014f1e0 to 0014f1ea has its CatchHandler @ 0014f288 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string&>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)local_50);
lVar1 = std::__cxx11::string::find(param_2,(ulong)(uint)(int)(char)in_EDX);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
} while (lVar1 != -1);
}
/* try { // try from 0014f229 to 0014f238 has its CatchHandler @ 0014f281 */
std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2));
/* try { // try from 0014f239 to 0014f245 has its CatchHandler @ 0014f273 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return param_1;
}
| |
48,877 | js_function_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_function_constructor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv, int magic)
{
JSFunctionKindEnum func_kind = magic;
int i, n, ret;
JSValue s, proto, obj = JS_UNDEFINED;
StringBuffer b_s, *b = &b_s;
string_buffer_init(ctx, b, 0);
string_buffer_putc8(b, '(');
if (func_kind == JS_FUNC_ASYNC || func_kind == JS_FUNC_ASYNC_GENERATOR) {
string_buffer_puts8(b, "async ");
}
string_buffer_puts8(b, "function");
if (func_kind == JS_FUNC_GENERATOR || func_kind == JS_FUNC_ASYNC_GENERATOR) {
string_buffer_putc8(b, '*');
}
string_buffer_puts8(b, " anonymous(");
n = argc - 1;
for(i = 0; i < n; i++) {
if (i != 0) {
string_buffer_putc8(b, ',');
}
if (string_buffer_concat_value(b, argv[i]))
goto fail;
}
string_buffer_puts8(b, "\n) {\n");
if (n >= 0) {
if (string_buffer_concat_value(b, argv[n]))
goto fail;
}
string_buffer_puts8(b, "\n})");
s = string_buffer_end(b);
if (JS_IsException(s))
goto fail1;
obj = JS_EvalObject(ctx, ctx->global_obj, s, JS_EVAL_TYPE_INDIRECT, -1);
JS_FreeValue(ctx, s);
if (JS_IsException(obj))
goto fail1;
if (!JS_IsUndefined(new_target)) {
/* set the prototype */
proto = JS_GetProperty(ctx, new_target, JS_ATOM_prototype);
if (JS_IsException(proto))
goto fail1;
if (!JS_IsObject(proto)) {
JSContext *realm;
JS_FreeValue(ctx, proto);
realm = JS_GetFunctionRealm(ctx, new_target);
if (!realm)
goto fail1;
proto = js_dup(realm->class_proto[func_kind_to_class_id[func_kind]]);
}
ret = JS_SetPrototypeInternal(ctx, obj, proto, TRUE);
JS_FreeValue(ctx, proto);
if (ret < 0)
goto fail1;
}
return obj;
fail:
string_buffer_free(b);
fail1:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O1 | c | js_function_constructor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, %ebp
movq %r8, %r12
movl %ecx, %r13d
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdi, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
xorl %esi, %esi
xorl %edx, %edx
callq 0x20b73
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x36ca3
leaq 0x8(%rsp), %rdi
movl $0x28, %esi
callq 0x4b861
movl %ebp, %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x369eb
leaq 0x69986(%rip), %rsi # 0xa0362
leaq 0x8(%rsp), %rdi
movl $0x6, %edx
callq 0x42038
movq %r15, 0x40(%rsp)
movq %r14, 0x48(%rsp)
movq %rbx, 0x28(%rsp)
leaq 0x69577(%rip), %rsi # 0x9ff78
leaq 0x8(%rsp), %rdi
movl $0x8, %edx
callq 0x42038
movl %ebp, 0x34(%rsp)
andl $-0x3, %ebp
cmpl $0x1, %ebp
jne 0x36a2b
leaq 0x8(%rsp), %rdi
movl $0x2a, %esi
callq 0x4b861
leaq 0x69937(%rip), %rsi # 0xa0369
leaq 0x8(%rsp), %rdi
movl $0xb, %edx
callq 0x42038
leal -0x1(%r13), %r14d
cmpl $0x2, %r13d
jl 0x36a89
movl %r14d, %ebp
shlq $0x4, %rbp
xorl %ebx, %ebx
leaq 0x8(%rsp), %r15
testq %rbx, %rbx
je 0x36a6b
movq %r15, %rdi
movl $0x2c, %esi
callq 0x4b861
movq (%r12,%rbx), %rsi
movq 0x8(%r12,%rbx), %rdx
movq %r15, %rdi
callq 0x4c4a3
testl %eax, %eax
jne 0x36ac2
addq $0x10, %rbx
cmpq %rbx, %rbp
jne 0x36a59
leaq 0x698e5(%rip), %rsi # 0xa0375
leaq 0x8(%rsp), %rdi
movl $0x5, %edx
callq 0x42038
testl %r13d, %r13d
jle 0x36adc
movl %r14d, %eax
shlq $0x4, %rax
movq (%r12,%rax), %rsi
movq 0x8(%r12,%rax), %rdx
leaq 0x8(%rsp), %rdi
callq 0x4c4a3
testl %eax, %eax
je 0x36adc
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1cb99
movq $0x0, 0x10(%rsp)
jmp 0x36b06
leaq 0x69898(%rip), %rsi # 0xa037b
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x3, %edx
callq 0x42038
movq %r14, %rdi
callq 0x33444
movq %rdx, %r14
cmpl $0x6, %r14d
jne 0x36b42
movl $0x3, %r12d
xorl %r13d, %r13d
movq 0x28(%rsp), %rbx
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1d8c6
movl $0x6, %r12d
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %r12, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq 0x28(%rsp), %rbx
movq 0x1a0(%rbx), %rsi
movq 0x1a8(%rbx), %rdx
subq $0x8, %rsp
movq %rbx, %rdi
movq %rax, %rcx
movq %r14, %r8
movl $0x3, %r9d
pushq $-0x1
callq 0x3f448
addq $0x10, %rsp
movq %rax, %r13
movq %rdx, %r12
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1d8c6
cmpl $0x6, %r12d
je 0x36b14
movq 0x48(%rsp), %r14
cmpl $0x3, %r14d
je 0x36c82
movq %rbx, %rdi
movq 0x40(%rsp), %r15
movq %r15, %rsi
movq %r14, %rdx
movl $0x3c, %ecx
movq %r15, %r8
movq %r14, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rax, %rbp
movq %rdx, %r8
cmpl $-0x1, %r8d
je 0x36c4f
cmpl $0x6, %r8d
je 0x36b14
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
movq %r8, %rdx
movq %r8, 0x38(%rsp)
callq 0x1d8c6
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x54e81
testq %rax, %rax
je 0x36c38
movq 0x40(%rax), %rax
movl 0x34(%rsp), %ecx
leaq 0x67d4e(%rip), %rdx # 0x9e960
movzwl (%rdx,%rcx,2), %ecx
shll $0x4, %ecx
movq (%rax,%rcx), %rbp
movq 0x8(%rax,%rcx), %r8
movq %rbp, 0x50(%rsp)
cmpl $-0x9, %r8d
jb 0x36c34
movq 0x50(%rsp), %rax
incl (%rax)
xorl %eax, %eax
jmp 0x36c42
movl $0x6, %eax
movq 0x38(%rsp), %r8
cmpl $0x6, %eax
je 0x36b14
testl %eax, %eax
jne 0x36c9a
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbp, %rcx
movq %r8, %r14
movl $0x1, %r9d
callq 0x22731
movq %rbp, %rsi
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movq %r14, %rdx
callq 0x1d8c6
testl %ebp, %ebp
js 0x36b14
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r13, %rcx
andq %rax, %rcx
movl %r13d, %eax
jmp 0x36b2d
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x36b2d
movl $0x0, 0x1c(%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x369bc
| js_function_constructor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov ebp, r9d
mov r12, r8
mov r13d, ecx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov [rsp+88h+var_80], rdi
xorps xmm0, xmm0
movups [rsp+88h+var_70], xmm0
xor esi, esi
xor edx, edx
call js_alloc_string
mov [rsp+88h+var_78], rax
test rax, rax
jz loc_36CA3
loc_369BC:
lea rdi, [rsp+88h+var_80]
mov esi, 28h ; '('
call string_buffer_putc8
mov eax, ebp
and eax, 0FFFFFFFEh
cmp eax, 2
jnz short loc_369EB
lea rsi, aAsync_0; "async "
lea rdi, [rsp+88h+var_80]
mov edx, 6
call string_buffer_write8
loc_369EB:
mov [rsp+88h+var_48], r15
mov [rsp+88h+var_40], r14
mov [rsp+88h+var_60], rbx
lea rsi, aGetterMustBeAF+11h; "function"
lea rdi, [rsp+88h+var_80]
mov edx, 8
call string_buffer_write8
mov [rsp+88h+var_54], ebp
and ebp, 0FFFFFFFDh
cmp ebp, 1
jnz short loc_36A2B
lea rdi, [rsp+88h+var_80]
mov esi, 2Ah ; '*'
call string_buffer_putc8
loc_36A2B:
lea rsi, aAnonymous_0; " anonymous("
lea rdi, [rsp+88h+var_80]
mov edx, 0Bh
call string_buffer_write8
lea r14d, [r13-1]
cmp r13d, 2
jl short loc_36A89
mov ebp, r14d
shl rbp, 4
xor ebx, ebx
lea r15, [rsp+88h+var_80]
loc_36A59:
test rbx, rbx
jz short loc_36A6B
mov rdi, r15
mov esi, 2Ch ; ','
call string_buffer_putc8
loc_36A6B:
mov rsi, [r12+rbx]
mov rdx, [r12+rbx+8]
mov rdi, r15
call string_buffer_concat_value
test eax, eax
jnz short loc_36AC2
add rbx, 10h
cmp rbp, rbx
jnz short loc_36A59
loc_36A89:
lea rsi, asc_A0375; "\n) {\n"
lea rdi, [rsp+88h+var_80]
mov edx, 5
call string_buffer_write8
test r13d, r13d
jle short loc_36ADC
mov eax, r14d
shl rax, 4
mov rsi, [r12+rax]
mov rdx, [r12+rax+8]
lea rdi, [rsp+88h+var_80]
call string_buffer_concat_value
test eax, eax
jz short loc_36ADC
loc_36AC2:
mov rdi, [rsp+88h+var_80]
mov rsi, [rsp+88h+var_78]
call js_free
mov [rsp+88h+var_78], 0
jmp short loc_36B06
loc_36ADC:
lea rsi, asc_A037B; "\n})"
lea r14, [rsp+88h+var_80]
mov rdi, r14
mov edx, 3
call string_buffer_write8
mov rdi, r14
call string_buffer_end
mov r14, rdx
cmp r14d, 6
jnz short loc_36B42
loc_36B06:
mov r12d, 3
xor r13d, r13d
mov rbx, [rsp+88h+var_60]
loc_36B14:
mov rdi, [rbx+18h]
mov rsi, r13
mov rdx, r12
call JS_FreeValueRT
mov r12d, 6
xor eax, eax
xor ecx, ecx
loc_36B2D:
or rax, rcx
mov rdx, r12
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_36B42:
mov r15, rax
mov rbx, [rsp+88h+var_60]
mov rsi, [rbx+1A0h]
mov rdx, [rbx+1A8h]
sub rsp, 8
mov rdi, rbx
mov rcx, rax
mov r8, r14
mov r9d, 3
push 0FFFFFFFFFFFFFFFFh
call JS_EvalObject
add rsp, 10h
mov r13, rax
mov r12, rdx
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call JS_FreeValueRT
cmp r12d, 6
jz short loc_36B14
mov r14, [rsp+88h+var_40]
cmp r14d, 3
jz loc_36C82
mov rdi, rbx
mov r15, [rsp+88h+var_48]
mov rsi, r15
mov rdx, r14
mov ecx, 3Ch ; '<'
mov r8, r15
mov r9, r14
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov rbp, rax
mov r8, rdx
cmp r8d, 0FFFFFFFFh
jz short loc_36C4F
cmp r8d, 6
jz loc_36B14
mov rdi, [rbx+18h]
mov rsi, rbp
mov rdx, r8
mov [rsp+88h+var_50], r8
call JS_FreeValueRT
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_GetFunctionRealm
test rax, rax
jz short loc_36C38
mov rax, [rax+40h]
mov ecx, [rsp+88h+var_54]
lea rdx, func_kind_to_class_id
movzx ecx, word ptr [rdx+rcx*2]
shl ecx, 4
mov rbp, [rax+rcx]
mov r8, [rax+rcx+8]
mov [rsp+88h+var_38], rbp
cmp r8d, 0FFFFFFF7h
jb short loc_36C34
mov rax, [rsp+88h+var_38]
inc dword ptr [rax]
loc_36C34:
xor eax, eax
jmp short loc_36C42
loc_36C38:
mov eax, 6
mov r8, [rsp+88h+var_50]
loc_36C42:
cmp eax, 6
jz loc_36B14
test eax, eax
jnz short loc_36C9A
loc_36C4F:
mov rdi, rbx
mov rsi, r13
mov rdx, r12
mov rcx, rbp
mov r14, r8
mov r9d, 1
call JS_SetPrototypeInternal
mov rsi, rbp
mov ebp, eax
mov rdi, [rbx+18h]
mov rdx, r14
call JS_FreeValueRT
test ebp, ebp
js loc_36B14
loc_36C82:
mov rax, 0FFFFFFFF00000000h
mov rcx, r13
and rcx, rax
mov eax, r13d
jmp loc_36B2D
loc_36C9A:
xor eax, eax
xor ecx, ecx
jmp loc_36B2D
loc_36CA3:
mov dword ptr [rsp+88h+var_70+4], 0
mov dword ptr [rsp+88h+var_70+0Ch], 0FFFFFFFFh
jmp loc_369BC
| unsigned long long js_function_constructor(
long long a1,
long long a2,
long long a3,
int a4,
long long a5,
int a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
unsigned int v18; // r14d
long long v19; // rbx
_DWORD *v20; // rax
long long v21; // rdx
long long v22; // r14
long long v23; // r12
long long v24; // r13
long long v25; // rbx
long long v26; // rax
unsigned long long v27; // rcx
_DWORD *v29; // r15
long long v30; // rdx
long long v31; // r14
long long v32; // r15
_DWORD *PropertyInternal2; // rax
long long v34; // rdx
__m128 v35; // xmm4
__m128 v36; // xmm5
_DWORD *v37; // rbp
long long v38; // r8
long long v39; // rdi
long long FunctionRealm; // rax
long long v41; // rax
long long v42; // rcx
int v43; // eax
long long v44; // r14
_DWORD *v45; // rsi
int v46; // ebp
long long v47; // [rsp+8h] [rbp-80h] BYREF
long long v48; // [rsp+10h] [rbp-78h]
__int128 v49; // [rsp+18h] [rbp-70h]
long long v50; // [rsp+28h] [rbp-60h]
int v51; // [rsp+34h] [rbp-54h]
long long v52; // [rsp+38h] [rbp-50h]
long long v53; // [rsp+40h] [rbp-48h]
long long v54; // [rsp+48h] [rbp-40h]
_DWORD *v55; // [rsp+50h] [rbp-38h]
v47 = a1;
v49 = 0LL;
v48 = js_alloc_string(a1, 0LL, 0);
if ( !v48 )
{
DWORD1(v49) = 0;
HIDWORD(v49) = -1;
}
string_buffer_putc8(&v47, 40LL);
if ( (a6 & 0xFFFFFFFE) == 2 )
string_buffer_write8(&v47, "async ", 6LL);
v53 = a2;
v54 = a3;
v50 = a1;
string_buffer_write8(&v47, "function", 8LL);
v51 = a6;
if ( (a6 & 0xFFFFFFFD) == 1 )
string_buffer_putc8(&v47, 42LL);
string_buffer_write8(&v47, " anonymous(", 11LL);
v18 = a4 - 1;
if ( a4 >= 2 )
{
v19 = 0LL;
do
{
if ( v19 )
string_buffer_putc8(&v47, 44LL);
if ( (unsigned int)string_buffer_concat_value(&v47, *(_QWORD *)(a5 + v19), *(_QWORD *)(a5 + v19 + 8)) )
goto LABEL_15;
v19 += 16LL;
}
while ( 16LL * v18 != v19 );
}
string_buffer_write8(&v47, "\n) {\n", 5LL);
if ( a4 > 0
&& (unsigned int)string_buffer_concat_value(&v47, *(_QWORD *)(a5 + 16LL * v18), *(_QWORD *)(a5 + 16LL * v18 + 8)) )
{
LABEL_15:
js_free(v47, v48);
v48 = 0LL;
LABEL_17:
v23 = 3LL;
v24 = 0LL;
v25 = v50;
goto LABEL_18;
}
string_buffer_write8(&v47, "\n})", 3LL);
v20 = string_buffer_end((long long)&v47);
v22 = v21;
if ( (_DWORD)v21 == 6 )
goto LABEL_17;
v29 = v20;
v25 = v50;
v24 = JS_EvalObject(v50, *(_QWORD *)(v50 + 416), *(_QWORD *)(v50 + 424), (_DWORD)v20, v21, 3, -1);
v23 = v30;
JS_FreeValueRT(*(_QWORD *)(v25 + 24), v29, v22);
if ( (_DWORD)v23 != 6 )
{
v31 = v54;
if ( (_DWORD)v54 == 3 )
goto LABEL_31;
v32 = v53;
PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(v25, v53, v54, 0x3Cu, v53, v54, 0LL, 0);
v37 = PropertyInternal2;
v38 = v34;
if ( (_DWORD)v34 == -1 )
goto LABEL_34;
if ( (_DWORD)v34 != 6 )
{
v39 = *(_QWORD *)(v25 + 24);
v52 = v34;
JS_FreeValueRT(v39, PropertyInternal2, v34);
FunctionRealm = JS_GetFunctionRealm(v25, v32, v31);
if ( FunctionRealm )
{
v41 = *(_QWORD *)(FunctionRealm + 64);
v42 = 16 * (unsigned int)func_kind_to_class_id[v51];
v37 = *(_DWORD **)(v41 + v42);
v38 = *(_QWORD *)(v41 + v42 + 8);
v55 = v37;
if ( (unsigned int)v38 >= 0xFFFFFFF7 )
++*v55;
v43 = 0;
}
else
{
v43 = 6;
v38 = v52;
}
if ( v43 != 6 )
{
LABEL_34:
v44 = v38;
v45 = v37;
v46 = JS_SetPrototypeInternal(v25, v24, v23, v37, v38, 1LL, (__m128)0LL, a8, a9, a10, v35, v36, a13, a14);
JS_FreeValueRT(*(_QWORD *)(v25 + 24), v45, v44);
if ( v46 >= 0 )
{
LABEL_31:
v27 = v24 & 0xFFFFFFFF00000000LL;
v26 = (unsigned int)v24;
return v27 | v26;
}
}
}
}
LABEL_18:
JS_FreeValueRT(*(_QWORD *)(v25 + 24), (_DWORD *)v24, v23);
v26 = 0LL;
v27 = 0LL;
return v27 | v26;
}
| |||
48,878 | js_function_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_function_constructor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv, int magic)
{
JSFunctionKindEnum func_kind = magic;
int i, n, ret;
JSValue s, proto, obj = JS_UNDEFINED;
StringBuffer b_s, *b = &b_s;
string_buffer_init(ctx, b, 0);
string_buffer_putc8(b, '(');
if (func_kind == JS_FUNC_ASYNC || func_kind == JS_FUNC_ASYNC_GENERATOR) {
string_buffer_puts8(b, "async ");
}
string_buffer_puts8(b, "function");
if (func_kind == JS_FUNC_GENERATOR || func_kind == JS_FUNC_ASYNC_GENERATOR) {
string_buffer_putc8(b, '*');
}
string_buffer_puts8(b, " anonymous(");
n = argc - 1;
for(i = 0; i < n; i++) {
if (i != 0) {
string_buffer_putc8(b, ',');
}
if (string_buffer_concat_value(b, argv[i]))
goto fail;
}
string_buffer_puts8(b, "\n) {\n");
if (n >= 0) {
if (string_buffer_concat_value(b, argv[n]))
goto fail;
}
string_buffer_puts8(b, "\n})");
s = string_buffer_end(b);
if (JS_IsException(s))
goto fail1;
obj = JS_EvalObject(ctx, ctx->global_obj, s, JS_EVAL_TYPE_INDIRECT, -1);
JS_FreeValue(ctx, s);
if (JS_IsException(obj))
goto fail1;
if (!JS_IsUndefined(new_target)) {
/* set the prototype */
proto = JS_GetProperty(ctx, new_target, JS_ATOM_prototype);
if (JS_IsException(proto))
goto fail1;
if (!JS_IsObject(proto)) {
JSContext *realm;
JS_FreeValue(ctx, proto);
realm = JS_GetFunctionRealm(ctx, new_target);
if (!realm)
goto fail1;
proto = js_dup(realm->class_proto[func_kind_to_class_id[func_kind]]);
}
ret = JS_SetPrototypeInternal(ctx, obj, proto, TRUE);
JS_FreeValue(ctx, proto);
if (ret < 0)
goto fail1;
}
return obj;
fail:
string_buffer_free(b);
fail1:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O2 | c | js_function_constructor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, %ebp
movq %r8, %r12
movl %ecx, %r13d
movq %rdx, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rsi
xorl %edx, %edx
callq 0x2e042
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0x41425
movl %ebp, %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x30198
leaq 0x5710e(%rip), %rsi # 0x8729c
leaq 0x20(%rsp), %rdi
callq 0x41ca2
movq %rbx, 0x10(%rsp)
leaq 0x56d0e(%rip), %rsi # 0x86eb2
leaq 0x20(%rsp), %rdi
callq 0x41ca2
movl %ebp, 0x1c(%rsp)
andl $-0x3, %ebp
cmpl $0x1, %ebp
jne 0x301c7
leaq 0x20(%rsp), %rdi
pushq $0x2a
popq %rsi
callq 0x41425
leaq 0x570d5(%rip), %rsi # 0x872a3
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x41ca2
movq %r13, 0x50(%rsp)
leal -0x1(%r13), %ebx
xorl %ebp, %ebp
testl %ebx, %ebx
movl $0x0, %r13d
cmovgl %ebx, %r13d
shlq $0x4, %r13
pushq $0x2c
popq %r14
cmpq %rbp, %r13
je 0x3022a
testq %rbp, %rbp
je 0x3020f
movq %r15, %rdi
movl %r14d, %esi
callq 0x41425
movq (%r12,%rbp), %rsi
movq 0x8(%r12,%rbp), %rdx
movq %r15, %rdi
callq 0x4194c
addq $0x10, %rbp
testl %eax, %eax
je 0x301fa
jmp 0x3025f
leaq 0x5707e(%rip), %rsi # 0x872af
leaq 0x20(%rsp), %rdi
callq 0x41ca2
cmpl $0x0, 0x50(%rsp)
jle 0x3029f
movl %ebx, %eax
shlq $0x4, %rax
movq (%r12,%rax), %rsi
movq 0x8(%r12,%rax), %rdx
leaq 0x20(%rsp), %rdi
callq 0x4194c
testl %eax, %eax
je 0x3029f
leaq 0x20(%rsp), %rdi
callq 0x2ef01
pushq $0x3
popq %r12
xorl %r13d, %r13d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1801e
pushq $0x6
popq %r12
xorl %r13d, %r13d
movq %r13, %rax
movq %r12, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5700f(%rip), %rsi # 0x872b5
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x41ca2
movq %r14, %rdi
callq 0x2cad4
movq %rdx, %r15
cmpl $0x6, %r15d
je 0x30269
movq %rax, %r14
movq 0x10(%rsp), %rbx
movq 0x1a0(%rbx), %rsi
movq 0x1a8(%rbx), %rdx
orl $-0x1, (%rsp)
pushq $0x3
popq %r9
movq %rbx, %rdi
movq %rax, %rcx
movq %r15, %r8
callq 0x377ad
movq %rax, %r13
movq %rdx, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1801e
cmpl $0x6, %r12d
je 0x30275
movq 0x48(%rsp), %r14
cmpl $0x3, %r14d
je 0x3028a
pushq $0x3c
popq %rcx
movq %rbx, %rdi
movq 0x40(%rsp), %rbp
movq %rbp, %rsi
movq %r14, %rdx
callq 0x1b043
movq %rdx, %r15
cmpl $-0x1, %r15d
je 0x30392
cmpl $0x6, %r15d
je 0x30275
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1801e
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x48cd3
testq %rax, %rax
je 0x30275
movq 0x40(%rax), %rsi
movl 0x1c(%rsp), %ecx
leaq 0x55536(%rip), %rdx # 0x858b0
movzwl (%rdx,%rcx,2), %ecx
shll $0x4, %ecx
movq (%rsi,%rcx), %rax
movq 0x8(%rsi,%rcx), %r15
cmpl $-0x9, %r15d
jb 0x30392
incl (%rax)
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rax, %rcx
movq %rax, %r14
movq %r15, %r8
callq 0x1c809
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1801e
testl %ebp, %ebp
jns 0x3028a
jmp 0x30275
| js_function_constructor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov ebp, r9d
mov r12, r8
mov r13d, ecx
mov [rsp+88h+var_40], rdx
mov [rsp+88h+var_48], rsi
mov rbx, rdi
lea r14, [rsp+88h+var_68]
mov rsi, r14
xor edx, edx
call string_buffer_init
push 28h ; '('
pop rsi
mov rdi, r14
call string_buffer_putc8
mov eax, ebp
and eax, 0FFFFFFFEh
cmp eax, 2
jnz short loc_30198
lea rsi, aAsync_0; "async "
lea rdi, [rsp+88h+var_68]
call string_buffer_puts8
loc_30198:
mov [rsp+88h+var_78], rbx
lea rsi, aGetterMustBeAF+11h; "function"
lea rdi, [rsp+88h+var_68]
call string_buffer_puts8
mov [rsp+88h+var_6C], ebp
and ebp, 0FFFFFFFDh
cmp ebp, 1
jnz short loc_301C7
lea rdi, [rsp+88h+var_68]
push 2Ah ; '*'
pop rsi
call string_buffer_putc8
loc_301C7:
lea rsi, aAnonymous_0; " anonymous("
lea r15, [rsp+88h+var_68]
mov rdi, r15
call string_buffer_puts8
mov [rsp+88h+var_38], r13
lea ebx, [r13-1]
xor ebp, ebp
test ebx, ebx
mov r13d, 0
cmovg r13d, ebx
shl r13, 4
push 2Ch ; ','
pop r14
loc_301FA:
cmp r13, rbp
jz short loc_3022A
test rbp, rbp
jz short loc_3020F
mov rdi, r15
mov esi, r14d
call string_buffer_putc8
loc_3020F:
mov rsi, [r12+rbp]
mov rdx, [r12+rbp+8]
mov rdi, r15
call string_buffer_concat_value
add rbp, 10h
test eax, eax
jz short loc_301FA
jmp short loc_3025F
loc_3022A:
lea rsi, asc_872AF; "\n) {\n"
lea rdi, [rsp+88h+var_68]
call string_buffer_puts8
cmp dword ptr [rsp+88h+var_38], 0
jle short loc_3029F
mov eax, ebx
shl rax, 4
mov rsi, [r12+rax]
mov rdx, [r12+rax+8]
lea rdi, [rsp+88h+var_68]
call string_buffer_concat_value
test eax, eax
jz short loc_3029F
loc_3025F:
lea rdi, [rsp+88h+var_68]
call string_buffer_free
loc_30269:
push 3
pop r12
xor r13d, r13d
mov rbx, [rsp+88h+var_78]
loc_30275:
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_FreeValue
push 6
pop r12
xor r13d, r13d
loc_3028A:
mov rax, r13
mov rdx, r12
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3029F:
lea rsi, asc_872B5; "\n})"
lea r14, [rsp+88h+var_68]
mov rdi, r14
call string_buffer_puts8
mov rdi, r14
call string_buffer_end
mov r15, rdx
cmp r15d, 6
jz short loc_30269
mov r14, rax
mov rbx, [rsp+88h+var_78]
mov rsi, [rbx+1A0h]
mov rdx, [rbx+1A8h]
or [rsp+88h+var_88], 0FFFFFFFFh
push 3
pop r9
mov rdi, rbx
mov rcx, rax
mov r8, r15
call JS_EvalObject
mov r13, rax
mov r12, rdx
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_FreeValue
cmp r12d, 6
jz loc_30275
mov r14, [rsp+88h+var_40]
cmp r14d, 3
jz loc_3028A
push 3Ch ; '<'
pop rcx
mov rdi, rbx
mov rbp, [rsp+88h+var_48]
mov rsi, rbp
mov rdx, r14
call JS_GetProperty
mov r15, rdx
cmp r15d, 0FFFFFFFFh
jz short loc_30392
cmp r15d, 6
jz loc_30275
mov rdi, rbx
mov rsi, rax
mov rdx, r15
call JS_FreeValue
mov rdi, rbx
mov rsi, rbp
mov rdx, r14
call JS_GetFunctionRealm
test rax, rax
jz loc_30275
mov rsi, [rax+40h]
mov ecx, [rsp+88h+var_6C]
lea rdx, func_kind_to_class_id
movzx ecx, word ptr [rdx+rcx*2]
shl ecx, 4
mov rax, [rsi+rcx]
mov r15, [rsi+rcx+8]
cmp r15d, 0FFFFFFF7h
jb short loc_30392
inc dword ptr [rax]
loc_30392:
push 1
pop r9
mov rdi, rbx
mov rsi, r13
mov rdx, r12
mov rcx, rax
mov r14, rax
mov r8, r15
call JS_SetPrototypeInternal
mov ebp, eax
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_FreeValue
test ebp, ebp
jns loc_3028A
jmp loc_30275
| long long js_function_constructor(
long long a1,
long long a2,
long long a3,
unsigned int a4,
long long a5,
int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
long long v16; // r13
unsigned int v17; // ebx
long long v18; // rbp
bool v19; // zf
long long v20; // r13
long long v21; // r13
int v22; // eax
long long v23; // r12
long long v24; // r13
long long v25; // rbx
long long v27; // rax
long long v28; // rdx
long long v29; // r15
long long v30; // r14
long long v31; // rdx
long long v32; // r14
long long v33; // rbp
_DWORD *Property; // rax
long long v35; // rdx
__m128 v36; // xmm4
__m128 v37; // xmm5
long long v38; // r15
long long FunctionRealm; // rax
long long v40; // rsi
long long v41; // rcx
long long v42; // r14
int v43; // ebp
int v44; // [rsp+1Ch] [rbp-6Ch]
long long v45[4]; // [rsp+20h] [rbp-68h] BYREF
long long v46; // [rsp+40h] [rbp-48h]
long long v47; // [rsp+48h] [rbp-40h]
long long v48; // [rsp+50h] [rbp-38h]
v16 = a4;
v47 = a3;
v46 = a2;
string_buffer_init(a1, (long long)v45, 0);
string_buffer_putc8(v45, 40LL);
if ( (a6 & 0xFFFFFFFE) == 2 )
string_buffer_puts8(v45, "async ");
string_buffer_puts8(v45, "function");
v44 = a6;
if ( (a6 & 0xFFFFFFFD) == 1 )
string_buffer_putc8(v45, 42LL);
string_buffer_puts8(v45, " anonymous(");
v48 = v16;
v17 = v16 - 1;
v18 = 0LL;
v19 = (_DWORD)v16 == 1;
v20 = 0LL;
if ( (v17 & 0x80000000) == 0 && !v19 )
v20 = v17;
v21 = 16 * v20;
while ( v21 != v18 )
{
if ( v18 )
string_buffer_putc8(v45, 44LL);
v22 = string_buffer_concat_value(v45, *(_QWORD *)(a5 + v18), *(_QWORD *)(a5 + v18 + 8));
v18 += 16LL;
if ( v22 )
goto LABEL_15;
}
string_buffer_puts8(v45, "\n) {\n");
if ( (int)v48 > 0
&& (unsigned int)string_buffer_concat_value(v45, *(_QWORD *)(a5 + 16LL * v17), *(_QWORD *)(a5 + 16LL * v17 + 8)) )
{
LABEL_15:
string_buffer_free(v45);
LABEL_16:
v23 = 3LL;
v24 = 0LL;
v25 = a1;
goto LABEL_17;
}
string_buffer_puts8(v45, "\n})");
v27 = string_buffer_end(v45);
v29 = v28;
if ( (_DWORD)v28 == 6 )
goto LABEL_16;
v30 = v27;
v25 = a1;
v24 = JS_EvalObject(a1, *(_QWORD *)(a1 + 416), *(_QWORD *)(a1 + 424), v27, v28, 3, -1);
v23 = v31;
JS_FreeValue(a1, v30, v29);
if ( (_DWORD)v23 == 6 )
goto LABEL_17;
v32 = v47;
if ( (_DWORD)v47 != 3 )
{
v33 = v46;
Property = (_DWORD *)JS_GetProperty(a1, v46, v47, 60);
v38 = v35;
if ( (_DWORD)v35 != -1 )
{
if ( (_DWORD)v35 == 6 )
goto LABEL_17;
JS_FreeValue(a1, (long long)Property, v35);
FunctionRealm = JS_GetFunctionRealm(a1, v33, v32);
if ( !FunctionRealm )
goto LABEL_17;
v40 = *(_QWORD *)(FunctionRealm + 64);
v41 = 16 * (unsigned int)func_kind_to_class_id[v44];
Property = *(_DWORD **)(v40 + v41);
v38 = *(_QWORD *)(v40 + v41 + 8);
if ( (unsigned int)v38 >= 0xFFFFFFF7 )
++*Property;
}
v42 = (long long)Property;
v43 = JS_SetPrototypeInternal(a1, v24, v23, Property, v38, 1LL, a7, a8, a9, a10, v36, v37, a13, a14);
JS_FreeValue(a1, v42, v38);
if ( v43 < 0 )
{
LABEL_17:
JS_FreeValue(v25, v24, v23);
return 0LL;
}
}
return v24;
}
| js_function_constructor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV EBP,R9D
MOV R12,R8
MOV R13D,ECX
MOV qword ptr [RSP + 0x48],RDX
MOV qword ptr [RSP + 0x40],RSI
MOV RBX,RDI
LEA R14,[RSP + 0x20]
MOV RSI,R14
XOR EDX,EDX
CALL 0x0012e042
PUSH 0x28
POP RSI
MOV RDI,R14
CALL 0x00141425
MOV EAX,EBP
AND EAX,0xfffffffe
CMP EAX,0x2
JNZ 0x00130198
LEA RSI,[0x18729c]
LEA RDI,[RSP + 0x20]
CALL 0x00141ca2
LAB_00130198:
MOV qword ptr [RSP + 0x10],RBX
LEA RSI,[0x186eb2]
LEA RDI,[RSP + 0x20]
CALL 0x00141ca2
MOV dword ptr [RSP + 0x1c],EBP
AND EBP,0xfffffffd
CMP EBP,0x1
JNZ 0x001301c7
LEA RDI,[RSP + 0x20]
PUSH 0x2a
POP RSI
CALL 0x00141425
LAB_001301c7:
LEA RSI,[0x1872a3]
LEA R15,[RSP + 0x20]
MOV RDI,R15
CALL 0x00141ca2
MOV qword ptr [RSP + 0x50],R13
LEA EBX,[R13 + -0x1]
XOR EBP,EBP
TEST EBX,EBX
MOV R13D,0x0
CMOVG R13D,EBX
SHL R13,0x4
PUSH 0x2c
POP R14
LAB_001301fa:
CMP R13,RBP
JZ 0x0013022a
TEST RBP,RBP
JZ 0x0013020f
MOV RDI,R15
MOV ESI,R14D
CALL 0x00141425
LAB_0013020f:
MOV RSI,qword ptr [R12 + RBP*0x1]
MOV RDX,qword ptr [R12 + RBP*0x1 + 0x8]
MOV RDI,R15
CALL 0x0014194c
ADD RBP,0x10
TEST EAX,EAX
JZ 0x001301fa
JMP 0x0013025f
LAB_0013022a:
LEA RSI,[0x1872af]
LEA RDI,[RSP + 0x20]
CALL 0x00141ca2
CMP dword ptr [RSP + 0x50],0x0
JLE 0x0013029f
MOV EAX,EBX
SHL RAX,0x4
MOV RSI,qword ptr [R12 + RAX*0x1]
MOV RDX,qword ptr [R12 + RAX*0x1 + 0x8]
LEA RDI,[RSP + 0x20]
CALL 0x0014194c
TEST EAX,EAX
JZ 0x0013029f
LAB_0013025f:
LEA RDI,[RSP + 0x20]
CALL 0x0012ef01
LAB_00130269:
PUSH 0x3
POP R12
XOR R13D,R13D
MOV RBX,qword ptr [RSP + 0x10]
LAB_00130275:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x0011801e
PUSH 0x6
POP R12
XOR R13D,R13D
LAB_0013028a:
MOV RAX,R13
MOV RDX,R12
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013029f:
LEA RSI,[0x1872b5]
LEA R14,[RSP + 0x20]
MOV RDI,R14
CALL 0x00141ca2
MOV RDI,R14
CALL 0x0012cad4
MOV R15,RDX
CMP R15D,0x6
JZ 0x00130269
MOV R14,RAX
MOV RBX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RBX + 0x1a0]
MOV RDX,qword ptr [RBX + 0x1a8]
OR dword ptr [RSP],0xffffffff
PUSH 0x3
POP R9
MOV RDI,RBX
MOV RCX,RAX
MOV R8,R15
CALL 0x001377ad
MOV R13,RAX
MOV R12,RDX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0011801e
CMP R12D,0x6
JZ 0x00130275
MOV R14,qword ptr [RSP + 0x48]
CMP R14D,0x3
JZ 0x0013028a
PUSH 0x3c
POP RCX
MOV RDI,RBX
MOV RBP,qword ptr [RSP + 0x40]
MOV RSI,RBP
MOV RDX,R14
CALL 0x0011b043
MOV R15,RDX
CMP R15D,-0x1
JZ 0x00130392
CMP R15D,0x6
JZ 0x00130275
MOV RDI,RBX
MOV RSI,RAX
MOV RDX,R15
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R14
CALL 0x00148cd3
TEST RAX,RAX
JZ 0x00130275
MOV RSI,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RSP + 0x1c]
LEA RDX,[0x1858b0]
MOVZX ECX,word ptr [RDX + RCX*0x2]
SHL ECX,0x4
MOV RAX,qword ptr [RSI + RCX*0x1]
MOV R15,qword ptr [RSI + RCX*0x1 + 0x8]
CMP R15D,-0x9
JC 0x00130392
INC dword ptr [RAX]
LAB_00130392:
PUSH 0x1
POP R9
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
MOV RCX,RAX
MOV R14,RAX
MOV R8,R15
CALL 0x0011c809
MOV EBP,EAX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0011801e
TEST EBP,EBP
JNS 0x0013028a
JMP 0x00130275
|
int1 [16]
js_function_constructor
(long param_1,int8 param_2,int8 param_3,uint param_4,long param_5,uint param_6
)
{
int *piVar1;
int8 uVar2;
int1 auVar3 [16];
int8 uVar4;
int iVar5;
long lVar6;
uint uVar7;
long lVar8;
ulong uVar9;
int1 auVar10 [16];
int1 auVar11 [16];
int1 local_68 [32];
int8 local_48;
int8 local_40;
ulong local_38;
local_48 = param_2;
local_40 = param_3;
string_buffer_init(param_1,local_68,0);
string_buffer_putc8(local_68,0x28);
if ((param_6 & 0xfffffffe) == 2) {
string_buffer_puts8(local_68,"async ");
}
string_buffer_puts8(local_68,"function");
if ((param_6 & 0xfffffffd) == 1) {
string_buffer_putc8(local_68,0x2a);
}
string_buffer_puts8(local_68," anonymous(");
uVar7 = param_4 - 1;
lVar8 = 0;
uVar9 = 0;
if (0 < (int)uVar7) {
uVar9 = (ulong)uVar7;
}
local_38 = (ulong)param_4;
do {
if (uVar9 * 0x10 == lVar8) {
string_buffer_puts8(local_68,"\n) {\n");
if (((int)local_38 < 1) ||
(iVar5 = string_buffer_concat_value
(local_68,*(int8 *)(param_5 + (ulong)uVar7 * 0x10),
*(int8 *)(param_5 + 8 + (ulong)uVar7 * 0x10)), iVar5 == 0)) {
string_buffer_puts8(local_68,&DAT_001872b5);
auVar10 = string_buffer_end(local_68);
if (auVar10._8_4_ == 6) goto LAB_00130269;
auVar11 = JS_EvalObject(param_1,*(int8 *)(param_1 + 0x1a0),
*(int8 *)(param_1 + 0x1a8),auVar10._0_8_,auVar10._8_8_,3,
0xffffffff);
JS_FreeValue(param_1,auVar10._0_8_,auVar10._8_8_);
uVar4 = local_40;
uVar2 = local_48;
if (auVar11._8_4_ == 6) goto LAB_00130275;
if ((int)local_40 == 3) {
return auVar11;
}
auVar10 = JS_GetProperty(param_1,local_48,local_40,0x3c);
if (auVar10._8_4_ != -1) {
if (auVar10._8_4_ == 6) goto LAB_00130275;
JS_FreeValue(param_1,auVar10._0_8_,auVar10._8_8_);
lVar8 = JS_GetFunctionRealm(param_1,uVar2,uVar4);
if (lVar8 == 0) goto LAB_00130275;
lVar6 = (ulong)*(ushort *)((long)&func_kind_to_class_id + (ulong)param_6 * 2) * 0x10;
piVar1 = *(int **)(*(long *)(lVar8 + 0x40) + lVar6);
uVar2 = *(int8 *)(*(long *)(lVar8 + 0x40) + 8 + lVar6);
auVar3._8_8_ = uVar2;
auVar3._0_8_ = piVar1;
auVar10._8_8_ = uVar2;
auVar10._0_8_ = piVar1;
if (0xfffffff6 < (uint)uVar2) {
*piVar1 = *piVar1 + 1;
auVar10 = auVar3;
}
}
iVar5 = JS_SetPrototypeInternal
(param_1,auVar11._0_8_,auVar11._8_8_,auVar10._0_8_,auVar10._8_8_,1);
JS_FreeValue(param_1,auVar10._0_8_,auVar10._8_8_);
if (-1 < iVar5) {
return auVar11;
}
goto LAB_00130275;
}
break;
}
if (lVar8 != 0) {
string_buffer_putc8(local_68,0x2c);
}
iVar5 = string_buffer_concat_value
(local_68,*(int8 *)(param_5 + lVar8),
*(int8 *)(param_5 + 8 + lVar8));
lVar8 = lVar8 + 0x10;
} while (iVar5 == 0);
string_buffer_free(local_68);
LAB_00130269:
auVar11 = ZEXT816(3) << 0x40;
LAB_00130275:
JS_FreeValue(param_1,auVar11._0_8_,auVar11._8_8_);
return ZEXT816(6) << 0x40;
}
| |
48,879 | google::protobuf::compiler::ruby::GenerateEnum(google::protobuf::EnumDescriptor const*, google::protobuf::io::Printer*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/ruby/ruby_generator.cc | void GenerateEnum(const EnumDescriptor* en, io::Printer* printer) {
printer->Print(
"add_enum \"$name$\" do\n",
"name", en->full_name());
printer->Indent();
for (int i = 0; i < en->value_count(); i++) {
const EnumValueDescriptor* value = en->value(i);
printer->Print(
"value :$name$, $number$\n",
"name", value->name(),
"number", NumberToString(value->number()));
}
printer->Outdent();
printer->Print(
"end\n");
} | O0 | cpp | google::protobuf::compiler::ruby::GenerateEnum(google::protobuf::EnumDescriptor const*, google::protobuf::io::Printer*):
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x70(%rsp), %rdi
callq 0x6a170
movq 0x20(%rsp), %rdi
movq %rax, %rcx
leaq 0x2e8a7d(%rip), %rsi # 0x3b7ffe
leaq 0x2e6635(%rip), %rdx # 0x3b5bbd
callq 0xa0140
movq 0x68(%rsp), %rdi
callq 0x323ec0
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x70(%rsp), %rdi
callq 0xa4970
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0xcf663
movq 0x70(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0xa4980
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rax
movq %rax, (%rsp)
movq 0x58(%rsp), %rdi
callq 0x58770
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
callq 0x580b0
movl %eax, %esi
leaq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xd0cd0
movq (%rsp), %rdi
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r9
leaq 0x2e89fa(%rip), %rsi # 0x3b8014
leaq 0x2e659c(%rip), %rdx # 0x3b5bbd
leaq 0x2fae42(%rip), %r8 # 0x3ca46a
callq 0xa49a0
jmp 0xcf62f
leaq 0x38(%rsp), %rdi
callq 0x21cc8
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0xcf59f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x21cc8
jmp 0xcf683
movq 0x68(%rsp), %rdi
callq 0x323ee0
movq 0x68(%rsp), %rdi
leaq 0x2e892d(%rip), %rsi # 0x3b7fa6
callq 0x39230
addq $0x78, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x21700
nopl (%rax)
| _ZN6google8protobuf8compiler4ruby12GenerateEnumEPKNS0_14EnumDescriptorEPNS0_2io7PrinterE:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov rax, [rsp+78h+var_10]
mov [rsp+78h+var_58], rax
mov rdi, [rsp+78h+var_8]
call _ZNK6google8protobuf14EnumDescriptor9full_nameB5cxx11Ev; google::protobuf::EnumDescriptor::full_name(void)
mov rdi, [rsp+78h+var_58]
mov rcx, rax
lea rsi, aAddEnumNameDo; "add_enum \"$name$\" do\n"
lea rdx, aGoogleProtobuf_24+34h; "name"
call _ZN6google8protobuf2io7Printer5PrintIJA5_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [5],std::string>(char const*,char [5],std::string const&)
mov rdi, [rsp+78h+var_10]; this
call _ZN6google8protobuf2io7Printer6IndentEv; google::protobuf::io::Printer::Indent(void)
mov [rsp+78h+var_14], 0
loc_CF59F:
mov eax, [rsp+78h+var_14]
mov [rsp+78h+var_5C], eax
mov rdi, [rsp+78h+var_8]; this
call _ZNK6google8protobuf14EnumDescriptor11value_countEv; google::protobuf::EnumDescriptor::value_count(void)
mov ecx, eax
mov eax, [rsp+78h+var_5C]
cmp eax, ecx
jge loc_CF663
mov rdi, [rsp+78h+var_8]; this
mov esi, [rsp+78h+var_14]; int
call _ZNK6google8protobuf14EnumDescriptor5valueEi; google::protobuf::EnumDescriptor::value(int)
mov [rsp+78h+var_20], rax
mov rax, [rsp+78h+var_10]
mov [rsp+78h+var_78], rax
mov rdi, [rsp+78h+var_20]
call _ZNK6google8protobuf19EnumValueDescriptor4nameB5cxx11Ev; google::protobuf::EnumValueDescriptor::name(void)
mov [rsp+78h+var_70], rax
mov rdi, [rsp+78h+var_20]; this
call _ZNK6google8protobuf19EnumValueDescriptor6numberEv; google::protobuf::EnumValueDescriptor::number(void)
mov esi, eax
lea rdi, [rsp+78h+var_40]
mov [rsp+78h+var_68], rdi
call _ZN6google8protobuf8compiler4ruby14NumberToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_; google::protobuf::compiler::ruby::NumberToString<int>(int)
mov rdi, [rsp+78h+var_78]
mov rcx, [rsp+78h+var_70]
mov r9, [rsp+78h+var_68]
lea rsi, aValueNameNumbe_0; "value :$name$, $number$\n"
lea rdx, aGoogleProtobuf_24+34h; "name"
lea r8, aFieldNumber_0+6; "number"
call _ZN6google8protobuf2io7Printer5PrintIJA5_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA7_cSA_EEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [5],std::string,char [7],std::string>(char const*,char [5],std::string,char [7],std::string const&)
jmp short $+2
loc_CF62F:
lea rdi, [rsp+78h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov eax, [rsp+78h+var_14]
add eax, 1
mov [rsp+78h+var_14], eax
jmp loc_CF59F
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_CF683
loc_CF663:
mov rdi, [rsp+78h+var_10]; this
call _ZN6google8protobuf2io7Printer7OutdentEv; google::protobuf::io::Printer::Outdent(void)
mov rdi, [rsp+78h+var_10]
lea rsi, aEnd; "end\n"
call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_
add rsp, 78h
retn
loc_CF683:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
| long long google::protobuf::compiler::ruby::GenerateEnum(
google::protobuf::compiler::ruby *this,
const google::protobuf::EnumDescriptor *a2,
google::protobuf::io::Printer *a3)
{
long long v3; // rax
int v4; // eax
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
google::protobuf::io::Printer *v10; // [rsp+0h] [rbp-78h]
long long v11; // [rsp+8h] [rbp-70h]
int v12; // [rsp+1Ch] [rbp-5Ch]
_BYTE v13[32]; // [rsp+38h] [rbp-40h] BYREF
google::protobuf::EnumValueDescriptor *v14; // [rsp+58h] [rbp-20h]
int i; // [rsp+64h] [rbp-14h]
google::protobuf::io::Printer *v16; // [rsp+68h] [rbp-10h]
google::protobuf::EnumDescriptor *v17; // [rsp+70h] [rbp-8h]
v17 = this;
v16 = a2;
v3 = google::protobuf::EnumDescriptor::full_name[abi:cxx11]((long long)this);
google::protobuf::io::Printer::Print<char [5],std::string>(
(long long)a2,
(long long)"add_enum \"$name$\" do\n",
"name",
v3);
google::protobuf::io::Printer::Indent(a2);
for ( i = 0; ; ++i )
{
v12 = i;
if ( v12 >= (int)google::protobuf::EnumDescriptor::value_count(v17) )
break;
v14 = (google::protobuf::EnumValueDescriptor *)google::protobuf::EnumDescriptor::value(v17, i);
v10 = v16;
v11 = google::protobuf::EnumValueDescriptor::name[abi:cxx11]((long long)v14);
v4 = google::protobuf::EnumValueDescriptor::number(v14);
google::protobuf::compiler::ruby::NumberToString<int>((unsigned int)v13, v4, v5, v6, v7, v8);
google::protobuf::io::Printer::Print<char [5],std::string,char [7],std::string>(
(long long)v10,
(long long)"value :$name$, $number$\n",
"name",
v11,
"number",
(long long)v13);
std::string::~string(v13);
}
google::protobuf::io::Printer::Outdent(v16);
return google::protobuf::io::Printer::Print<>((long long)v16, (long long)"end\n");
}
| GenerateEnum:
SUB RSP,0x78
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x0016a170
MOV RDI,qword ptr [RSP + 0x20]
MOV RCX,RAX
LEA RSI,[0x4b7ffe]
LEA RDX,[0x4b5bbd]
CALL 0x001a0140
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x00423ec0
MOV dword ptr [RSP + 0x64],0x0
LAB_001cf59f:
MOV EAX,dword ptr [RSP + 0x64]
MOV dword ptr [RSP + 0x1c],EAX
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x001a4970
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,ECX
JGE 0x001cf663
MOV RDI,qword ptr [RSP + 0x70]
MOV ESI,dword ptr [RSP + 0x64]
CALL 0x001a4980
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00158770
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001580b0
MOV ESI,EAX
LEA RDI,[RSP + 0x38]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x001d0cd0
MOV RDI,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
MOV R9,qword ptr [RSP + 0x10]
LAB_001cf613:
LEA RSI,[0x4b8014]
LEA RDX,[0x4b5bbd]
LEA R8,[0x4ca46a]
CALL 0x001a49a0
LAB_001cf62d:
JMP 0x001cf62f
LAB_001cf62f:
LEA RDI,[RSP + 0x38]
CALL 0x00121cc8
MOV EAX,dword ptr [RSP + 0x64]
ADD EAX,0x1
MOV dword ptr [RSP + 0x64],EAX
JMP 0x001cf59f
LAB_001cf663:
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x00423ee0
MOV RDI,qword ptr [RSP + 0x68]
LEA RSI,[0x4b7fa6]
CALL 0x00139230
ADD RSP,0x78
RET
|
/* google::protobuf::compiler::ruby::GenerateEnum(google::protobuf::EnumDescriptor const*,
google::protobuf::io::Printer*) */
void google::protobuf::compiler::ruby::GenerateEnum(EnumDescriptor *param_1,Printer *param_2)
{
Printer *this;
int iVar1;
int iVar2;
string *psVar3;
ruby local_40 [32];
EnumValueDescriptor *local_20;
int local_14;
Printer *local_10;
EnumDescriptor *local_8;
local_10 = param_2;
local_8 = param_1;
psVar3 = (string *)EnumDescriptor::full_name_abi_cxx11_(param_1);
io::Printer::Print<char[5],std::__cxx11::string>(param_2,"add_enum \"$name$\" do\n","name",psVar3)
;
io::Printer::Indent(local_10);
local_14 = 0;
while( true ) {
iVar2 = local_14;
iVar1 = EnumDescriptor::value_count(local_8);
if (iVar1 <= iVar2) break;
local_20 = (EnumValueDescriptor *)EnumDescriptor::value(local_8,local_14);
this = local_10;
psVar3 = (string *)EnumValueDescriptor::name_abi_cxx11_(local_20);
iVar2 = EnumValueDescriptor::number(local_20);
NumberToString<int>(local_40,iVar2);
/* try { // try from 001cf613 to 001cf62c has its CatchHandler @ 001cf649 */
io::Printer::Print<char[5],std::__cxx11::string,char[7],std::__cxx11::string>
(this,"value :$name$, $number$\n","name",psVar3,"number",(string *)local_40);
std::__cxx11::string::~string((string *)local_40);
local_14 = local_14 + 1;
}
io::Printer::Outdent(local_10);
io::Printer::Print<>(local_10,"end\n");
return;
}
| |
48,880 | google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAggregateInitializer(google::protobuf::io::Printer*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/primitive_field.cc | void PrimitiveFieldGenerator::GenerateAggregateInitializer(
io::Printer* printer) const {
Formatter format(printer, variables_);
if (ShouldSplit(descriptor_, options_)) {
format("decltype(Impl_::Split::$name$_){$default$}");
return;
}
format("decltype($field$){$default$}");
} | O3 | cpp | google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAggregateInitializer(google::protobuf::io::Printer*) const:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
leaq 0x18(%rdi), %rax
leaq 0x8(%rsp), %rbx
movq %rsi, -0x8(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7e61e
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rsi
callq 0x373df
leaq 0x101546(%rip), %rcx # 0x1cbeaa
leaq 0x10156a(%rip), %rsi # 0x1cbed5
testb %al, %al
cmovneq %rcx, %rsi
movq %rsp, %rdi
callq 0x39938
movq %rbx, %rdi
callq 0x2e5e0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2e5e0
movq %r14, %rdi
callq 0x1f860
| _ZNK6google8protobuf8compiler3cpp23PrimitiveFieldGenerator28GenerateAggregateInitializerEPNS0_2io7PrinterE:
push r14
push rbx
sub rsp, 38h
mov r14, rdi
lea rax, [rdi+18h]
lea rbx, [rsp+48h+var_40]
mov [rbx-8], rsi
mov rdi, rbx
mov rsi, rax
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>> const&)
mov rdi, [r14+8]
mov rsi, [r14+10h]
call _ZN6google8protobuf8compiler3cpp11ShouldSplitEPKNS0_15FieldDescriptorERKNS2_7OptionsE; google::protobuf::compiler::cpp::ShouldSplit(google::protobuf::FieldDescriptor const*,google::protobuf::compiler::cpp::Options const&)
lea rcx, aDecltypeImplSp_1; "decltype(Impl_::Split::$name$_){$defaul"...
lea rsi, aDecltypeFieldD_0; "decltype($field$){$default$}"
test al, al
cmovnz rsi, rcx
mov rdi, rsp
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
add rsp, 38h
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAggregateInitializer(
google::protobuf::compiler::cpp **this,
google::protobuf::io::Printer *a2)
{
const google::protobuf::compiler::cpp::Options *v2; // rdx
const char *v3; // rsi
long long result; // rax
google::protobuf::io::Printer *v5; // [rsp+0h] [rbp-48h] BYREF
_BYTE v6[64]; // [rsp+8h] [rbp-40h] BYREF
v5 = a2;
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(
(long long)v6,
(long long)(this + 3));
v3 = "decltype($field$){$default$}";
if ( (unsigned __int8)google::protobuf::compiler::cpp::ShouldSplit(this[1], this[2], v2) )
v3 = "decltype(Impl_::Split::$name$_){$default$}";
result = google::protobuf::compiler::cpp::Formatter::operator()<>(&v5, v3);
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)v6);
return result;
}
| GenerateAggregateInitializer:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R14,RDI
LEA RAX,[RDI + 0x18]
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX + -0x8],RSI
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0017e61e
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [R14 + 0x10]
LAB_001ca958:
CALL 0x001373df
LEA RCX,[0x2cbeaa]
LEA RSI,[0x2cbed5]
TEST AL,AL
CMOVNZ RSI,RCX
MOV RDI,RSP
CALL 0x00139938
LAB_001ca979:
MOV RDI,RBX
CALL 0x0012e5e0
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAggregateInitializer(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAggregateInitializer
(PrimitiveFieldGenerator *this,Printer *param_1)
{
char cVar1;
char *pcVar2;
Printer *local_48;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_40 [48];
local_48 = param_1;
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::_Rb_tree(local_40,(_Rb_tree *)(this + 0x18));
/* try { // try from 001ca958 to 001ca978 has its CatchHandler @ 001ca989 */
cVar1 = ShouldSplit(*(FieldDescriptor **)(this + 8),*(Options **)(this + 0x10));
pcVar2 = "decltype($field$){$default$}";
if (cVar1 != '\0') {
pcVar2 = "decltype(Impl_::Split::$name$_){$default$}";
}
Formatter::operator()<>((Formatter *)&local_48,pcVar2);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_40);
return;
}
| |
48,881 | LefDefParser::lefiViaRule::propIsString(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiViaRule.cpp | int
lefiViaRule::propIsString(int i) const
{
char msg[160];
if (i < 0 || i >= numProps_) {
sprintf(msg, "ERROR (LEFPARS-1431): The index number %d given for the VIARULE PROPERTY is invalid.\nValid index is from 0 to %d", i, numProps_);
lefiError(0, 1431, msg);
return 0;
}
return dvalues_[i] ? 0 : 1;
} | O3 | cpp | LefDefParser::lefiViaRule::propIsString(int) const:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %esi, %edx
testl %esi, %esi
setns %al
movl 0x1d8(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x2e193
movq 0x1f0(%rdi), %rax
movl %edx, %ecx
xorpd %xmm0, %xmm0
cmpeqsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rbx
andl $0x1, %ebx
jmp 0x2e1b8
leaq 0x3099f(%rip), %rsi # 0x5eb39
xorl %ebx, %ebx
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
xorl %edi, %edi
movl $0x597, %esi # imm = 0x597
movq %r14, %rdx
callq 0x33d78
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
| _ZNK12LefDefParser11lefiViaRule12propIsStringEi:
push r14
push rbx
sub rsp, 0A8h
mov edx, esi
test esi, esi
setns al
mov ecx, [rdi+1D8h]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_2E193
mov rax, [rdi+1F0h]
mov ecx, edx
xorpd xmm0, xmm0
cmpeqsd xmm0, qword ptr [rax+rcx*8]
movq rbx, xmm0
and ebx, 1
jmp short loc_2E1B8
loc_2E193:
lea rsi, aErrorLefpars14_11; "ERROR (LEFPARS-1431): The index number "...
xor ebx, ebx
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
xor edi, edi; this
mov esi, 597h; int
mov rdx, r14; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
loc_2E1B8:
mov eax, ebx
add rsp, 0A8h
pop rbx
pop r14
retn
| long long LefDefParser::lefiViaRule::propIsString(LefDefParser::lefiViaRule *this, signed int a2)
{
int v2; // ecx
__m128d v3; // rt1
unsigned int v4; // ebx
const char *v5; // rcx
_BYTE v7[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 118);
if ( v2 > a2 && a2 >= 0 )
{
v3.m128d_f64[0] = *(double *)(*((_QWORD *)this + 62) + 8LL * (unsigned int)a2);
return *(_OWORD *)&_mm_cmpeq_sd((__m128d)0LL, v3) & 1;
}
else
{
v4 = 0;
sprintf(
v7,
"ERROR (LEFPARS-1431): The index number %d given for the VIARULE PROPERTY is invalid.\n"
"Valid index is from 0 to %d",
a2,
v2);
LefDefParser::lefiError(0LL, 1431, (int)v7, v5);
}
return v4;
}
| propIsString:
PUSH R14
PUSH RBX
SUB RSP,0xa8
MOV EDX,ESI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0x1d8]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0012e193
MOV RAX,qword ptr [RDI + 0x1f0]
MOV ECX,EDX
XORPD XMM0,XMM0
CMPEQSD XMM0,qword ptr [RAX + RCX*0x8]
MOVQ RBX,XMM0
AND EBX,0x1
JMP 0x0012e1b8
LAB_0012e193:
LEA RSI,[0x15eb39]
XOR EBX,EBX
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00102050
XOR EDI,EDI
MOV ESI,0x597
MOV RDX,R14
CALL 0x00133d78
LAB_0012e1b8:
MOV EAX,EBX
ADD RSP,0xa8
POP RBX
POP R14
RET
|
/* LefDefParser::lefiViaRule::propIsString(int) const */
byte __thiscall LefDefParser::lefiViaRule::propIsString(lefiViaRule *this,int param_1)
{
byte bVar1;
char acStack_b8 [168];
if (param_1 < 0 || *(int *)(this + 0x1d8) <= param_1) {
bVar1 = 0;
sprintf(acStack_b8,
"ERROR (LEFPARS-1431): The index number %d given for the VIARULE PROPERTY is invalid.\nValid index is from 0 to %d"
);
lefiError(0,0x597,acStack_b8);
}
else {
bVar1 = -(*(double *)(*(long *)(this + 0x1f0) + (ulong)(uint)param_1 * 8) == 0.0) & 1;
}
return bVar1;
}
| |
48,882 | decode_pos | eloqsql/storage/maria/ma_packrec.c | static uint decode_pos(MARIA_BIT_BUFF *bit_buff,
MARIA_DECODE_TREE *decode_tree)
{
uint16 *pos=decode_tree->table;
for (;;)
{
if (get_bit(bit_buff))
pos++;
if (*pos & IS_CHAR)
return (uint) (*pos & ~IS_CHAR);
pos+= *pos;
}
} | O0 | c | decode_pos:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x4de5a
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x4de7e
jmp 0x4de8a
movq -0x8(%rbp), %rdi
callq 0x4c6e0
movq -0x8(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0x4de8a
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
je 0x4dead
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
andl $0xffff7fff, %eax # imm = 0xFFFF7FFF
addq $0x20, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x4de2b
nopw (%rax,%rax)
| decode_pos:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
loc_4DE2B:
mov rax, [rbp+var_8]
cmp dword ptr [rax+4], 0
jz short loc_4DE5A
mov rax, [rbp+var_8]
mov eax, [rax]
mov rdx, [rbp+var_8]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_4DE7E
jmp short loc_4DE8A
loc_4DE5A:
mov rdi, [rbp+var_8]
call fill_buffer
mov rax, [rbp+var_8]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_8]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz short loc_4DE8A
loc_4DE7E:
mov rax, [rbp+var_18]
add rax, 2
mov [rbp+var_18], rax
loc_4DE8A:
mov rax, [rbp+var_18]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jz short loc_4DEAD
mov rax, [rbp+var_18]
movzx eax, word ptr [rax]
and eax, 0FFFF7FFFh
add rsp, 20h
pop rbp
retn
loc_4DEAD:
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax]
mov rax, [rbp+var_18]
movsxd rcx, ecx
shl rcx, 1
add rax, rcx
mov [rbp+var_18], rax
jmp loc_4DE2B
| long long decode_pos(int *a1, _WORD **a2)
{
int v2; // eax
int v3; // ecx
_WORD *i; // [rsp+8h] [rbp-18h]
for ( i = *a2; ; i += (unsigned __int16)*i )
{
if ( !a1[1] )
{
fill_buffer((long long)a1);
a1[1] = 31;
if ( *a1 >= 0 )
goto LABEL_7;
LABEL_6:
++i;
goto LABEL_7;
}
v2 = *a1;
v3 = a1[1] - 1;
a1[1] = v3;
if ( ((1 << v3) & v2) != 0 )
goto LABEL_6;
LABEL_7:
if ( (*i & 0x8000) != 0 )
break;
}
return *i & 0x7FFF;
}
| decode_pos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_0014de2b:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x0014de5a
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x0014de7e
JMP 0x0014de8a
LAB_0014de5a:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0014c6e0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x0014de8a
LAB_0014de7e:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
MOV qword ptr [RBP + -0x18],RAX
LAB_0014de8a:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JZ 0x0014dead
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
AND EAX,0xffff7fff
ADD RSP,0x20
POP RBP
RET
LAB_0014dead:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0014de2b
|
ushort decode_pos(uint *param_1,int8 *param_2)
{
uint uVar1;
ushort *local_20;
local_20 = (ushort *)*param_2;
while( true ) {
if (param_1[1] == 0) {
fill_buffer(param_1);
param_1[1] = 0x1f;
uVar1 = *param_1 & 0x80000000;
}
else {
uVar1 = param_1[1];
param_1[1] = uVar1 - 1;
uVar1 = *param_1 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 != 0) {
local_20 = local_20 + 1;
}
if ((*local_20 & 0x8000) != 0) break;
local_20 = local_20 + (int)(uint)*local_20;
}
return *local_20 & 0x7fff;
}
| |
48,883 | js_promise_race | bluesky950520[P]quickjs/quickjs.c | static JSValue js_promise_race(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue result_promise, resolving_funcs[2], item, next_promise, ret;
JSValue next_method = JS_UNDEFINED, iter = JS_UNDEFINED;
JSValue promise_resolve = JS_UNDEFINED;
BOOL done;
if (!JS_IsObject(this_val))
return JS_ThrowTypeErrorNotAnObject(ctx);
result_promise = js_new_promise_capability(ctx, resolving_funcs, this_val);
if (JS_IsException(result_promise))
return result_promise;
promise_resolve = JS_GetProperty(ctx, this_val, JS_ATOM_resolve);
if (JS_IsException(promise_resolve) ||
check_function(ctx, promise_resolve))
goto fail_reject;
iter = JS_GetIterator(ctx, argv[0], FALSE);
if (JS_IsException(iter)) {
JSValue error;
fail_reject:
error = JS_GetException(ctx);
ret = JS_Call(ctx, resolving_funcs[1], JS_UNDEFINED, 1,
&error);
JS_FreeValue(ctx, error);
if (JS_IsException(ret))
goto fail;
JS_FreeValue(ctx, ret);
} else {
next_method = JS_GetProperty(ctx, iter, JS_ATOM_next);
if (JS_IsException(next_method))
goto fail_reject;
for(;;) {
/* XXX: conformance: should close the iterator if error on 'done'
access, but not on 'value' access */
item = JS_IteratorNext(ctx, iter, next_method, 0, NULL, &done);
if (JS_IsException(item))
goto fail_reject;
if (done)
break;
next_promise = JS_Call(ctx, promise_resolve,
this_val, 1, &item);
JS_FreeValue(ctx, item);
if (JS_IsException(next_promise)) {
fail_reject1:
JS_IteratorClose(ctx, iter, TRUE);
goto fail_reject;
}
ret = JS_InvokeFree(ctx, next_promise, JS_ATOM_then, 2,
resolving_funcs);
if (check_exception_free(ctx, ret))
goto fail_reject1;
}
}
done:
JS_FreeValue(ctx, promise_resolve);
JS_FreeValue(ctx, next_method);
JS_FreeValue(ctx, iter);
JS_FreeValue(ctx, resolving_funcs[0]);
JS_FreeValue(ctx, resolving_funcs[1]);
return result_promise;
fail:
//JS_FreeValue(ctx, next_method); // why not???
JS_FreeValue(ctx, result_promise);
result_promise = JS_EXCEPTION;
goto done;
} | O1 | c | js_promise_race:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %r12
movq %rdi, %r15
cmpl $-0x1, %r12d
jne 0x58597
movq %r8, %r13
movq %rsi, %rbp
leaq 0x80(%rsp), %rsi
movq %r15, %rdi
movq %rbp, %rdx
movq %r12, %rcx
callq 0x3a312
movq %rax, %rbx
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x588bc
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %rbx, %rcx
andq %rax, %rcx
movq %rcx, 0xb8(%rsp)
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movl $0x81, %ecx
movq %rbp, %r8
movq %r12, %r9
callq 0x26fff
movl $0x3, %ecx
movq %rcx, 0x50(%rsp)
xorl %ecx, %ecx
cmpl $0x6, %edx
movq %r14, 0x48(%rsp)
movq %rax, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
jne 0x585b5
xorl %ebp, %ebp
movl $0x3, %eax
movq %rax, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
jmp 0x58788
leaq 0x4acff(%rip), %rsi # 0xa329d
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x265c3
movl $0x6, %r14d
jmp 0x588bc
movq %r15, %rdi
movq %rax, %rsi
callq 0x4560d
testl %eax, %eax
je 0x585de
xorl %ebp, %ebp
movl $0x3, %eax
movq %rax, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
jmp 0x58786
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq $0x0, 0x30(%rsp)
movq %r15, %rdi
xorl %ecx, %ecx
callq 0x45867
cmpl $0x6, %edx
movq %rdx, 0x20(%rsp)
jne 0x5860b
movq %rax, %rbp
jmp 0x58786
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r15, %rdi
movq %rax, %rsi
movl $0x6b, %ecx
movq %rax, 0x28(%rsp)
movq %rax, %r8
movq %rdx, %r9
callq 0x26fff
movq %rax, 0x30(%rsp)
movq %rdx, 0x50(%rsp)
cmpl $0x6, %edx
jne 0x5864f
movq 0x28(%rsp), %rbp
jmp 0x58786
leaq 0x5c(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %r13
movq %r13, %rdx
movq 0x30(%rsp), %rcx
movq 0x50(%rsp), %r8
xorl %r9d, %r9d
callq 0x45b58
movq %rax, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
cmpl $0x6, %edx
je 0x58645
cmpl $0x0, 0x5c(%rsp)
jne 0x588d4
movl $0x0, 0x60(%rsp)
movq $0x3, 0x68(%rsp)
movups 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movq %r15, %rdi
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbp, %rcx
movq %r12, %r8
movl $0x1, %r9d
callq 0x2c526
movq %rax, %r13
movq %rdx, %r14
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x18(%r15), %rdi
callq 0x21922
cmpl $0x6, %r14d
je 0x5876c
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
movl $0x80, %ecx
movl $0x2, %r8d
leaq 0x80(%rsp), %r9
callq 0x33cf0
movq %rax, 0xb0(%rsp)
movq %rdx, 0xa8(%rsp)
movq 0x18(%r15), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x21922
movq 0x18(%r15), %rdi
movq 0xb0(%rsp), %rsi
movq 0xa8(%rsp), %r14
movq %r14, %rdx
callq 0x21922
cmpl $0x6, %r14d
jne 0x5864f
movq %r15, %rdi
movq 0x28(%rsp), %rbp
movq %rbp, %rsi
movq 0x20(%rsp), %rdx
movl $0x1, %ecx
callq 0x43b05
xorl %ecx, %ecx
movq 0x18(%r15), %rax
movups 0xf0(%rax), %xmm0
movl %ecx, 0xf0(%rax)
movq $0x4, 0xf8(%rax)
leaq 0xc0(%rsp), %r13
movaps %xmm0, (%r13)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movl %ecx, 0x60(%rsp)
movq $0x3, 0x68(%rsp)
movups 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r13, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %r15, %rdi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x2c526
movq %rax, %r14
movq %rdx, %r12
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x18(%r15), %rdi
callq 0x21922
cmpl $0x6, %r12d
jne 0x58832
movq 0x18(%r15), %rdi
movq %rbx, %rsi
movq 0x48(%rsp), %rdx
callq 0x21922
movl $0x6, %r14d
xorl %ebx, %ebx
jmp 0x58846
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x21922
movq 0x48(%rsp), %r14
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x20(%rsp), %r13
movq 0x18(%r15), %rdi
callq 0x21922
movq 0x18(%r15), %rdi
movq 0x30(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x21922
movq 0x18(%r15), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x21922
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0x18(%r15), %rdi
callq 0x21922
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0x18(%r15), %rdi
callq 0x21922
movl %ebx, %ebx
orq 0xb8(%rsp), %rbx
movq %rbx, %rax
movq %r14, %rdx
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%rsp), %r14
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x28(%rsp), %rbp
jmp 0x58855
| js_promise_race:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0D8h
mov r12, rdx
mov r15, rdi
cmp r12d, 0FFFFFFFFh
jnz loc_58597
mov r13, r8
mov rbp, rsi
lea rsi, [rsp+108h+var_88]
mov rdi, r15
mov rdx, rbp
mov rcx, r12
call js_new_promise_capability
mov rbx, rax
mov r14, rdx
cmp r14d, 6
jz loc_588BC
mov rax, 0FFFFFFFF00000000h
mov rcx, rbx
and rcx, rax
mov [rsp+108h+var_50], rcx
mov dword ptr [rsp+108h+var_108+8], 0
mov qword ptr [rsp+108h+var_108], 0
mov rdi, r15
mov rsi, rbp
mov rdx, r12
mov ecx, 81h
mov r8, rbp
mov r9, r12
call JS_GetPropertyInternal2
mov ecx, 3
mov [rsp+108h+var_B8], rcx
xor ecx, ecx
cmp edx, 6
mov [rsp+108h+var_C0], r14
mov [rsp+108h+var_C8], rax
mov [rsp+108h+var_D0], rdx
jnz short loc_585B5
xor ebp, ebp
mov eax, 3
mov [rsp+108h+var_E8], rax
mov [rsp+108h+var_D8], 0
jmp loc_58788
loc_58597:
lea rsi, aOperandPrototy+20h; "not an object"
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
jmp loc_588BC
loc_585B5:
mov rdi, r15
mov rsi, rax
call check_function
test eax, eax
jz short loc_585DE
xor ebp, ebp
mov eax, 3
mov [rsp+108h+var_E8], rax
mov [rsp+108h+var_D8], 0
jmp loc_58786
loc_585DE:
mov rsi, [r13+0]
mov rdx, [r13+8]
mov [rsp+108h+var_D8], 0
mov rdi, r15
xor ecx, ecx
call JS_GetIterator
cmp edx, 6
mov [rsp+108h+var_E8], rdx
jnz short loc_5860B
mov rbp, rax
jmp loc_58786
loc_5860B:
mov dword ptr [rsp+108h+var_108+8], 0
mov qword ptr [rsp+108h+var_108], 0
mov rdi, r15
mov rsi, rax
mov ecx, 6Bh ; 'k'
mov [rsp+108h+var_E0], rax
mov r8, rax
mov r9, rdx
call JS_GetPropertyInternal2
mov [rsp+108h+var_D8], rax
mov [rsp+108h+var_B8], rdx
cmp edx, 6
jnz short loc_5864F
loc_58645:
mov rbp, [rsp+108h+var_E0]
jmp loc_58786
loc_5864F:
lea rax, [rsp+108h+var_AC]
mov qword ptr [rsp+108h+var_108+8], rax
mov qword ptr [rsp+108h+var_108], 0
mov rdi, r15
mov rsi, [rsp+108h+var_E0]
mov r13, [rsp+108h+var_E8]
mov rdx, r13
mov rcx, [rsp+108h+var_D8]
mov r8, [rsp+108h+var_B8]
xor r9d, r9d
call JS_IteratorNext
mov [rsp+108h+var_98], rax
mov [rsp+108h+var_90], rdx
cmp edx, 6
jz short loc_58645
cmp [rsp+108h+var_AC], 0
jnz loc_588D4
mov dword ptr [rsp+108h+var_A8], 0
mov qword ptr [rsp+108h+var_A8+8], 3
movups xmm0, [rsp+108h+var_A8]
movups [rsp+108h+var_108], xmm0
lea rax, [rsp+108h+var_98]
mov [rsp+108h+var_F8], rax
mov [rsp+108h+var_F0], 2
mov rdi, r15
mov rsi, [rsp+108h+var_C8]
mov rdx, [rsp+108h+var_D0]
mov rcx, rbp
mov r8, r12
mov r9d, 1
call JS_CallInternal
mov r13, rax
mov r14, rdx
mov rsi, [rsp+108h+var_98]
mov rdx, [rsp+108h+var_90]
mov rdi, [r15+18h]
call JS_FreeValueRT
cmp r14d, 6
jz short loc_5876C
mov rdi, r15
mov rsi, r13
mov rdx, r14
mov ecx, 80h
mov r8d, 2
lea r9, [rsp+108h+var_88]
call JS_Invoke
mov [rsp+108h+var_58], rax
mov [rsp+108h+var_60], rdx
mov rdi, [r15+18h]
mov rsi, r13
mov rdx, r14
call JS_FreeValueRT
mov rdi, [r15+18h]
mov rsi, [rsp+108h+var_58]
mov r14, [rsp+108h+var_60]
mov rdx, r14
call JS_FreeValueRT
cmp r14d, 6
jnz loc_5864F
loc_5876C:
mov rdi, r15
mov rbp, [rsp+108h+var_E0]
mov rsi, rbp
mov rdx, [rsp+108h+var_E8]
mov ecx, 1
call JS_IteratorClose
loc_58786:
xor ecx, ecx
loc_58788:
mov rax, [r15+18h]
movups xmm0, xmmword ptr [rax+0F0h]
mov [rax+0F0h], ecx
mov qword ptr [rax+0F8h], 4
lea r13, [rsp+108h+var_48]
movaps xmmword ptr [r13+0], xmm0
mov rsi, [rsp+108h+var_78]
mov rdx, [rsp+108h+var_70]
mov dword ptr [rsp+108h+var_A8], ecx
mov qword ptr [rsp+108h+var_A8+8], 3
movups xmm0, [rsp+108h+var_A8]
movups [rsp+108h+var_108], xmm0
mov [rsp+108h+var_F8], r13
mov [rsp+108h+var_F0], 2
mov r8d, 3
mov rdi, r15
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
mov r14, rax
mov r12, rdx
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, [r15+18h]
call JS_FreeValueRT
cmp r12d, 6
jnz short loc_58832
mov rdi, [r15+18h]
mov rsi, rbx
mov rdx, [rsp+108h+var_C0]
call JS_FreeValueRT
mov r14d, 6
xor ebx, ebx
jmp short loc_58846
loc_58832:
mov rdi, [r15+18h]
mov rsi, r14
mov rdx, r12
call JS_FreeValueRT
mov r14, [rsp+108h+var_C0]
loc_58846:
mov rsi, [rsp+108h+var_C8]
mov rdx, [rsp+108h+var_D0]
mov r13, [rsp+108h+var_E8]
loc_58855:
mov rdi, [r15+18h]
call JS_FreeValueRT
mov rdi, [r15+18h]
mov rsi, [rsp+108h+var_D8]
mov rdx, [rsp+108h+var_B8]
call JS_FreeValueRT
mov rdi, [r15+18h]
mov rsi, rbp
mov rdx, r13
call JS_FreeValueRT
mov rsi, [rsp+108h+var_88]
mov rdx, [rsp+108h+var_80]
mov rdi, [r15+18h]
call JS_FreeValueRT
mov rsi, [rsp+108h+var_78]
mov rdx, [rsp+108h+var_70]
mov rdi, [r15+18h]
call JS_FreeValueRT
mov ebx, ebx
or rbx, [rsp+108h+var_50]
loc_588BC:
mov rax, rbx
mov rdx, r14
add rsp, 0D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_588D4:
mov r14, [rsp+108h+var_C0]
mov rsi, [rsp+108h+var_C8]
mov rdx, [rsp+108h+var_D0]
mov rbp, [rsp+108h+var_E0]
jmp loc_58855
| unsigned long long js_promise_race(
long long *a1,
unsigned 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)
{
unsigned long long v16; // rbx
long long v17; // rdx
long long v18; // r14
unsigned long long PropertyInternal2; // rax
long long v20; // rdx
__m128 v21; // xmm4
__m128 v22; // xmm5
_DWORD *v23; // rbp
_DWORD *Iterator; // rax
long long v25; // rdx
long long v26; // rdx
long long v27; // r13
long long v28; // rdx
__m128 v29; // xmm0
_DWORD *v30; // r13
long long v31; // rdx
long long v32; // r14
double v33; // xmm4_8
double v34; // xmm5_8
long long v35; // rdx
int v36; // r14d
long long v37; // rax
__int128 v38; // xmm0
_DWORD *v39; // r14
long long v40; // rdx
long long v41; // r12
_DWORD *v42; // rsi
long long v43; // rdx
char v45; // [rsp+0h] [rbp-108h]
long long v46; // [rsp+20h] [rbp-E8h]
long long v47; // [rsp+28h] [rbp-E0h]
_DWORD *v48; // [rsp+30h] [rbp-D8h]
long long v49; // [rsp+38h] [rbp-D0h]
long long v50; // [rsp+40h] [rbp-C8h]
long long v51; // [rsp+48h] [rbp-C0h]
long long v52; // [rsp+50h] [rbp-B8h]
int v53; // [rsp+5Ch] [rbp-ACh] BYREF
__m128 v54; // [rsp+60h] [rbp-A8h]
_DWORD *v55; // [rsp+70h] [rbp-98h] BYREF
long long v56; // [rsp+78h] [rbp-90h]
_DWORD *v57[2]; // [rsp+80h] [rbp-88h] BYREF
_DWORD *v58; // [rsp+90h] [rbp-78h]
long long v59; // [rsp+98h] [rbp-70h]
long long v60; // [rsp+A8h] [rbp-60h]
_DWORD *v61; // [rsp+B0h] [rbp-58h]
unsigned long long v62; // [rsp+B8h] [rbp-50h]
__int128 v63; // [rsp+C0h] [rbp-48h] BYREF
if ( (_DWORD)a3 == -1 )
{
v16 = js_new_promise_capability(
a1,
(long long)v57,
a2,
a3,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14);
v18 = v17;
if ( (_DWORD)v17 != 6 )
{
v62 = v16 & 0xFFFFFFFF00000000LL;
PropertyInternal2 = JS_GetPropertyInternal2((long long)a1, a2, a3, 0x81u, a2, a3, 0LL, 0);
v52 = 3LL;
v51 = v18;
v50 = PropertyInternal2;
v49 = v20;
if ( (_DWORD)v20 == 6 )
{
v23 = 0LL;
v46 = 3LL;
v48 = 0LL;
}
else if ( (unsigned int)check_function(
(long long)a1,
PropertyInternal2,
v20,
a7,
a8,
a9,
a10,
*(double *)v21.m128_u64,
*(double *)v22.m128_u64,
a13,
a14) )
{
v23 = 0LL;
v46 = 3LL;
v48 = 0LL;
}
else
{
v48 = 0LL;
Iterator = JS_GetIterator(
(long long)a1,
*a5,
a5[1],
0,
a7,
a8,
a9,
a10,
*(double *)v21.m128_u64,
*(double *)v22.m128_u64,
a13,
a14);
v46 = v25;
if ( (_DWORD)v25 == 6 )
{
v23 = Iterator;
}
else
{
v47 = (long long)Iterator;
v48 = (_DWORD *)JS_GetPropertyInternal2(
(long long)a1,
(long long)Iterator,
v25,
0x6Bu,
(long long)Iterator,
v25,
0LL,
0);
v52 = v26;
if ( (_DWORD)v26 != 6 )
{
while ( 1 )
{
v27 = v46;
v55 = (_DWORD *)JS_IteratorNext((long long)a1, v47, v46, (int)v48, v52, 0, 0LL, &v53);
v56 = v28;
if ( (_DWORD)v28 == 6 )
break;
if ( v53 )
{
v42 = (_DWORD *)v50;
v43 = v49;
v23 = (_DWORD *)v47;
goto LABEL_21;
}
v54.m128_i32[0] = 0;
v54.m128_u64[1] = 3LL;
v29 = v54;
v30 = (_DWORD *)JS_CallInternal(
(long long)a1,
v50,
v49,
a2,
a3,
1LL,
v54,
a8,
a9,
a10,
v21,
v22,
a13,
a14,
0,
3,
(long long)&v55,
2u);
v32 = v31;
JS_FreeValueRT(a1[3], v55, v56);
if ( (_DWORD)v32 != 6 )
{
v61 = JS_Invoke((long long)a1, (long long)v30, v32, 0x80u, 2, (long long)v57);
v60 = v35;
JS_FreeValueRT(a1[3], v30, v32);
v36 = v60;
JS_FreeValueRT(a1[3], v61, v60);
if ( v36 != 6 )
continue;
}
v23 = (_DWORD *)v47;
JS_IteratorClose((long long)a1, v47, v46, 1, v29, a8, a9, a10, v33, v34, a13, a14);
goto LABEL_17;
}
}
v23 = (_DWORD *)v47;
}
}
LABEL_17:
v37 = a1[3];
v38 = *(_OWORD *)(v37 + 240);
*(_DWORD *)(v37 + 240) = 0;
*(_QWORD *)(v37 + 248) = 4LL;
v63 = v38;
v54.m128_i32[0] = 0;
v54.m128_u64[1] = 3LL;
v39 = (_DWORD *)JS_CallInternal(
(long long)a1,
(long long)v58,
v59,
0LL,
3LL,
1LL,
v54,
a8,
a9,
a10,
v21,
v22,
a13,
a14,
0,
3,
(long long)&v63,
2u);
v41 = v40;
JS_FreeValueRT(a1[3], (_DWORD *)v63, *((long long *)&v63 + 1));
if ( (_DWORD)v41 == 6 )
{
JS_FreeValueRT(a1[3], (_DWORD *)v16, v51);
LODWORD(v16) = 0;
}
else
{
JS_FreeValueRT(a1[3], v39, v41);
}
v42 = (_DWORD *)v50;
v43 = v49;
v27 = v46;
LABEL_21:
JS_FreeValueRT(a1[3], v42, v43);
JS_FreeValueRT(a1[3], v48, v52);
JS_FreeValueRT(a1[3], v23, v27);
JS_FreeValueRT(a1[3], v57[0], (long long)v57[1]);
JS_FreeValueRT(a1[3], v58, v59);
return v62 | (unsigned int)v16;
}
}
else
{
v16 = 0LL;
JS_ThrowTypeError(
(long long)a1,
(long long)"not an object",
a3,
a4,
(long long)a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v45);
}
return v16;
}
| js_promise_race:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xd8
MOV R12,RDX
MOV R15,RDI
CMP R12D,-0x1
JNZ 0x00158597
MOV R13,R8
MOV RBP,RSI
LEA RSI,[RSP + 0x80]
MOV RDI,R15
MOV RDX,RBP
MOV RCX,R12
CALL 0x0013a312
MOV RBX,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x001588bc
MOV RAX,-0x100000000
MOV RCX,RBX
AND RCX,RAX
MOV qword ptr [RSP + 0xb8],RCX
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP],0x0
MOV RDI,R15
MOV RSI,RBP
MOV RDX,R12
MOV ECX,0x81
MOV R8,RBP
MOV R9,R12
CALL 0x00126fff
MOV ECX,0x3
MOV qword ptr [RSP + 0x50],RCX
XOR ECX,ECX
CMP EDX,0x6
MOV qword ptr [RSP + 0x48],R14
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x38],RDX
JNZ 0x001585b5
XOR EBP,EBP
MOV EAX,0x3
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x30],0x0
JMP 0x00158788
LAB_00158597:
LEA RSI,[0x1a329d]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x001265c3
MOV R14D,0x6
JMP 0x001588bc
LAB_001585b5:
MOV RDI,R15
MOV RSI,RAX
CALL 0x0014560d
TEST EAX,EAX
JZ 0x001585de
XOR EBP,EBP
MOV EAX,0x3
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x30],0x0
JMP 0x00158786
LAB_001585de:
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV qword ptr [RSP + 0x30],0x0
MOV RDI,R15
XOR ECX,ECX
CALL 0x00145867
CMP EDX,0x6
MOV qword ptr [RSP + 0x20],RDX
JNZ 0x0015860b
MOV RBP,RAX
JMP 0x00158786
LAB_0015860b:
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP],0x0
MOV RDI,R15
MOV RSI,RAX
MOV ECX,0x6b
MOV qword ptr [RSP + 0x28],RAX
MOV R8,RAX
MOV R9,RDX
CALL 0x00126fff
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x50],RDX
CMP EDX,0x6
JNZ 0x0015864f
LAB_00158645:
MOV RBP,qword ptr [RSP + 0x28]
JMP 0x00158786
LAB_0015864f:
LEA RAX,[RSP + 0x5c]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],0x0
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RSP + 0x20]
MOV RDX,R13
MOV RCX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x50]
XOR R9D,R9D
CALL 0x00145b58
MOV qword ptr [RSP + 0x70],RAX
MOV qword ptr [RSP + 0x78],RDX
CMP EDX,0x6
JZ 0x00158645
CMP dword ptr [RSP + 0x5c],0x0
JNZ 0x001588d4
MOV dword ptr [RSP + 0x60],0x0
MOV qword ptr [RSP + 0x68],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
LEA RAX,[RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0x2
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,RBP
MOV R8,R12
MOV R9D,0x1
CALL 0x0012c526
MOV R13,RAX
MOV R14,RDX
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
MOV RDI,qword ptr [R15 + 0x18]
CALL 0x00121922
CMP R14D,0x6
JZ 0x0015876c
MOV RDI,R15
MOV RSI,R13
MOV RDX,R14
MOV ECX,0x80
MOV R8D,0x2
LEA R9,[RSP + 0x80]
CALL 0x00133cf0
MOV qword ptr [RSP + 0xb0],RAX
MOV qword ptr [RSP + 0xa8],RDX
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R13
MOV RDX,R14
CALL 0x00121922
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,qword ptr [RSP + 0xb0]
MOV R14,qword ptr [RSP + 0xa8]
MOV RDX,R14
CALL 0x00121922
CMP R14D,0x6
JNZ 0x0015864f
LAB_0015876c:
MOV RDI,R15
MOV RBP,qword ptr [RSP + 0x28]
MOV RSI,RBP
MOV RDX,qword ptr [RSP + 0x20]
MOV ECX,0x1
CALL 0x00143b05
LAB_00158786:
XOR ECX,ECX
LAB_00158788:
MOV RAX,qword ptr [R15 + 0x18]
MOVUPS XMM0,xmmword ptr [RAX + 0xf0]
MOV dword ptr [RAX + 0xf0],ECX
MOV qword ptr [RAX + 0xf8],0x4
LEA R13,[RSP + 0xc0]
MOVAPS xmmword ptr [R13],XMM0
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
MOV dword ptr [RSP + 0x60],ECX
MOV qword ptr [RSP + 0x68],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],R13
MOV dword ptr [RSP + 0x18],0x2
MOV R8D,0x3
MOV RDI,R15
XOR ECX,ECX
MOV R9D,0x1
CALL 0x0012c526
MOV R14,RAX
MOV R12,RDX
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,qword ptr [R15 + 0x18]
CALL 0x00121922
CMP R12D,0x6
JNZ 0x00158832
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,RBX
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x00121922
MOV R14D,0x6
XOR EBX,EBX
JMP 0x00158846
LAB_00158832:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R14
MOV RDX,R12
CALL 0x00121922
MOV R14,qword ptr [RSP + 0x48]
LAB_00158846:
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
MOV R13,qword ptr [RSP + 0x20]
LAB_00158855:
MOV RDI,qword ptr [R15 + 0x18]
CALL 0x00121922
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x50]
CALL 0x00121922
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,RBP
MOV RDX,R13
CALL 0x00121922
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
MOV RDI,qword ptr [R15 + 0x18]
CALL 0x00121922
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
MOV RDI,qword ptr [R15 + 0x18]
CALL 0x00121922
MOV EBX,EBX
OR RBX,qword ptr [RSP + 0xb8]
LAB_001588bc:
MOV RAX,RBX
MOV RDX,R14
ADD RSP,0xd8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001588d4:
MOV R14,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
MOV RBP,qword ptr [RSP + 0x28]
JMP 0x00158855
|
int1 [16]
js_promise_race(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
long lVar1;
int8 uVar2;
int iVar3;
int8 uVar4;
int8 uVar5;
int8 uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
int1 auVar10 [16];
int1 auVar11 [16];
int1 auVar12 [16];
int8 in_stack_ffffffffffffff00;
uint uVar14;
ulong uVar13;
int8 local_e8;
int8 local_d8;
int8 local_b8;
int local_ac [3];
int8 uStack_a0;
int1 local_98 [16];
int8 local_88;
int8 local_80;
int8 local_78;
int8 local_70;
int8 local_60;
int8 local_58;
ulong local_50;
int8 local_48;
int8 uStack_40;
uVar14 = (uint)((ulong)in_stack_ffffffffffffff00 >> 0x20);
if ((int)param_3 == -1) {
auVar7 = js_new_promise_capability(param_1,&local_88,param_2,param_3);
if (auVar7._8_4_ != 6) {
local_50 = auVar7._0_8_ & 0xffffffff00000000;
uVar13 = (ulong)uVar14 << 0x20;
auVar8 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x81,param_2,param_3,0,uVar13);
auVar12._8_8_ = local_98._8_8_;
auVar12._0_8_ = local_98._0_8_;
uVar4 = auVar8._0_8_;
if (auVar8._8_4_ == 6) {
auVar9 = ZEXT816(3) << 0x40;
auVar10 = ZEXT816(3) << 0x40;
}
else {
iVar3 = check_function(param_1,uVar4);
auVar12._8_8_ = local_98._8_8_;
auVar12._0_8_ = local_98._0_8_;
if (iVar3 == 0) {
auVar10 = ZEXT816(3) << 0x40;
auVar9 = JS_GetIterator(param_1,*param_5,param_5[1]);
auVar12._8_8_ = local_98._8_8_;
auVar12._0_8_ = local_98._0_8_;
uVar6 = auVar9._8_8_;
uVar5 = auVar9._0_8_;
if (auVar9._8_4_ != 6) {
auVar10 = JS_GetPropertyInternal2
(param_1,uVar5,uVar6,0x6b,uVar5,uVar6,0,uVar13 & 0xffffffff00000000)
;
auVar12._8_8_ = local_98._8_8_;
auVar12._0_8_ = local_98._0_8_;
local_98 = auVar12;
if (auVar10._8_4_ != 6) {
do {
auVar12 = JS_IteratorNext(param_1,uVar5,uVar6,auVar10._0_8_,auVar10._8_8_,0,0,
local_ac);
if (auVar12._8_4_ == 6) goto LAB_00158788;
local_98 = auVar12;
if (local_ac[0] != 0) goto LAB_00158855;
local_ac[1] = 0;
uStack_a0 = 3;
auVar12 = JS_CallInternal(param_1,uVar4,auVar8._8_8_,param_2,param_3,1,
(ulong)(uint)local_ac[2] << 0x20,3,local_98,2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_98._0_8_,local_98._8_8_);
if (auVar12._8_4_ == 6) break;
auVar11 = JS_Invoke(param_1,auVar12._0_8_,auVar12._8_8_,0x80,2);
local_60 = auVar11._8_8_;
local_58 = auVar11._0_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar12._0_8_,auVar12._8_8_);
uVar2 = local_60;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_58,local_60);
} while ((int)uVar2 != 6);
JS_IteratorClose(param_1,uVar5,uVar6);
auVar12 = local_98;
}
}
}
else {
auVar9 = ZEXT816(3) << 0x40;
auVar10 = ZEXT816(3) << 0x40;
}
}
LAB_00158788:
lVar1 = *(long *)(param_1 + 0x18);
local_48 = *(int8 *)(lVar1 + 0xf0);
uStack_40 = *(int8 *)(lVar1 + 0xf8);
*(int4 *)(lVar1 + 0xf0) = 0;
*(int8 *)(lVar1 + 0xf8) = 4;
local_ac[1] = 0;
uStack_a0 = 3;
local_98 = auVar12;
auVar12 = JS_CallInternal(param_1,local_78,local_70,0,3,1,(ulong)(uint)local_ac[2] << 0x20,3,
&local_48,2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_48,uStack_40);
if (auVar12._8_4_ == 6) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar7._0_8_,auVar7._8_8_);
auVar7 = ZEXT816(6) << 0x40;
}
else {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar12._0_8_,auVar12._8_8_);
}
LAB_00158855:
local_b8 = auVar10._8_8_;
local_d8 = auVar10._0_8_;
local_e8 = auVar9._8_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,auVar8._8_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_d8,local_b8);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar9._0_8_,local_e8);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_88,local_80);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_78,local_70);
auVar7._8_8_ = auVar7._8_8_;
auVar7._0_8_ = auVar7._0_8_ & 0xffffffff | local_50;
}
}
else {
JS_ThrowTypeError(param_1,"not an object");
auVar7 = ZEXT816(6) << 0x40;
}
return auVar7;
}
| |
48,884 | my_strnxfrm_simple_internal | eloqsql/strings/ctype-simple.c | size_t my_strnxfrm_simple_internal(CHARSET_INFO * cs,
uchar *dst, size_t dstlen, uint *nweights,
const uchar *src, size_t srclen)
{
const uchar *map= cs->sort_order;
uchar *d0= dst;
uint frmlen;
if ((frmlen= (uint)MY_MIN(dstlen, *nweights)) > srclen)
frmlen= (uint)srclen;
if (dst != src)
{
const uchar *end;
for (end= src + frmlen; src < end;)
*dst++= map[*src++];
}
else
{
const uchar *end;
for (end= dst + frmlen; dst < end; dst++)
*dst= map[(uchar) *dst];
}
*nweights-= frmlen;
return dst - d0;
} | O0 | c | my_strnxfrm_simple_internal:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
jae 0x93dd9
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x93de3
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl %eax, -0x44(%rbp)
movl %eax, %eax
cmpq -0x30(%rbp), %rax
jbe 0x93df9
movq -0x30(%rbp), %rax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x93e49
movq -0x28(%rbp), %rax
movl -0x44(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x50(%rbp), %rax
jae 0x93e47
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x93e11
jmp 0x93e85
movq -0x10(%rbp), %rax
movl -0x44(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x93e83
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x93e57
jmp 0x93e85
movl -0x44(%rbp), %edx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nop
| my_strnxfrm_simple_internal:
push rbp
mov rbp, rsp
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 [rbp+var_30], r9
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov rcx, [rbp+var_20]
mov ecx, [rcx]
cmp rax, rcx
jnb short loc_93DD9
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
jmp short loc_93DE3
loc_93DD9:
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_60], rax
loc_93DE3:
mov rax, [rbp+var_60]
mov [rbp+var_44], eax
mov eax, eax
cmp rax, [rbp+var_30]
jbe short loc_93DF9
mov rax, [rbp+var_30]
mov [rbp+var_44], eax
loc_93DF9:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_28]
jz short loc_93E49
mov rax, [rbp+var_28]
mov ecx, [rbp+var_44]
add rax, rcx
mov [rbp+var_50], rax
loc_93E11:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_50]
jnb short loc_93E47
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 1
mov [rbp+var_28], rdx
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_93E11
loc_93E47:
jmp short loc_93E85
loc_93E49:
mov rax, [rbp+var_10]
mov ecx, [rbp+var_44]
add rax, rcx
mov [rbp+var_58], rax
loc_93E57:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_58]
jnb short loc_93E83
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_93E57
loc_93E83:
jmp short $+2
loc_93E85:
mov edx, [rbp+var_44]
mov rax, [rbp+var_20]
mov ecx, [rax]
sub ecx, edx
mov [rax], ecx
mov rax, [rbp+var_10]
mov rcx, [rbp+var_40]
sub rax, rcx
pop rbp
retn
| _BYTE * my_strnxfrm_simple_internal(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned int *a4,
unsigned __int8 *a5,
unsigned long long a6)
{
unsigned __int8 *v6; // rcx
unsigned __int8 *v7; // rax
unsigned int v9; // [rsp+0h] [rbp-60h]
int v10; // [rsp+1Ch] [rbp-44h]
long long v11; // [rsp+28h] [rbp-38h]
unsigned __int8 *v12; // [rsp+38h] [rbp-28h]
unsigned __int8 *v14; // [rsp+50h] [rbp-10h]
v14 = a2;
v12 = a5;
v11 = *(_QWORD *)(a1 + 88);
if ( a3 >= *a4 )
v9 = *a4;
else
v9 = a3;
v10 = v9;
if ( v9 > a6 )
v10 = a6;
if ( a2 == a5 )
{
while ( v14 < &a2[v10] )
{
*v14 = *(_BYTE *)(v11 + *v14);
++v14;
}
}
else
{
while ( v12 < &a5[v10] )
{
v6 = v12++;
v7 = v14++;
*v7 = *(_BYTE *)(v11 + *v6);
}
}
*a4 -= v10;
return (_BYTE *)(v14 - a2);
}
| my_strnxfrm_simple_internal:
PUSH RBP
MOV RBP,RSP
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 qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX]
CMP RAX,RCX
JNC 0x00193dd9
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00193de3
LAB_00193dd9:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
LAB_00193de3:
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,EAX
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00193df9
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x44],EAX
LAB_00193df9:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x00193e49
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_00193e11:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x50]
JNC 0x00193e47
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x00193e11
LAB_00193e47:
JMP 0x00193e85
LAB_00193e49:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
LAB_00193e57:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x58]
JNC 0x00193e83
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00193e57
LAB_00193e83:
JMP 0x00193e85
LAB_00193e85:
MOV EDX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX]
SUB ECX,EDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
POP RBP
RET
|
long my_strnxfrm_simple_internal
(long param_1,byte *param_2,ulong param_3,uint *param_4,byte *param_5,ulong param_6)
{
long lVar1;
ulong local_68;
uint local_4c;
byte *local_30;
byte *local_18;
lVar1 = *(long *)(param_1 + 0x58);
local_68 = param_3;
if (*param_4 <= param_3) {
local_68 = (ulong)*param_4;
}
local_4c = (uint)local_68;
if (param_6 < (local_68 & 0xffffffff)) {
local_4c = (uint)param_6;
}
if (param_2 == param_5) {
for (local_18 = param_2; local_18 < param_2 + local_4c; local_18 = local_18 + 1) {
*local_18 = *(byte *)(lVar1 + (ulong)*local_18);
}
}
else {
local_30 = param_5;
local_18 = param_2;
while (local_30 < param_5 + local_4c) {
*local_18 = *(byte *)(lVar1 + (ulong)*local_30);
local_30 = local_30 + 1;
local_18 = local_18 + 1;
}
}
*param_4 = *param_4 - local_4c;
return (long)local_18 - (long)param_2;
}
| |
48,885 | stbi__bmp_parse_header(stbi__context*, stbi__bmp_data*) | SDL3Lite/dependencies/stb_image.h | static void *stbi__bmp_parse_header(stbi__context *s, stbi__bmp_data *info)
{
int hsz;
if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP");
stbi__get32le(s); // discard filesize
stbi__get16le(s); // discard reserved
stbi__get16le(s); // discard reserved
info->offset = stbi__get32le(s);
info->hsz = hsz = stbi__get32le(s);
info->mr = info->mg = info->mb = info->ma = 0;
info->extra_read = 14;
if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP");
if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown");
if (hsz == 12) {
s->img_x = stbi__get16le(s);
s->img_y = stbi__get16le(s);
} else {
s->img_x = stbi__get32le(s);
s->img_y = stbi__get32le(s);
}
if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP");
info->bpp = stbi__get16le(s);
if (hsz != 12) {
int compress = stbi__get32le(s);
if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE");
if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes
if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel
stbi__get32le(s); // discard sizeof
stbi__get32le(s); // discard hres
stbi__get32le(s); // discard vres
stbi__get32le(s); // discard colorsused
stbi__get32le(s); // discard max important
if (hsz == 40 || hsz == 56) {
if (hsz == 56) {
stbi__get32le(s);
stbi__get32le(s);
stbi__get32le(s);
stbi__get32le(s);
}
if (info->bpp == 16 || info->bpp == 32) {
if (compress == 0) {
stbi__bmp_set_mask_defaults(info, compress);
} else if (compress == 3) {
info->mr = stbi__get32le(s);
info->mg = stbi__get32le(s);
info->mb = stbi__get32le(s);
info->extra_read += 12;
// not documented, but generated by photoshop and handled by mspaint
if (info->mr == info->mg && info->mg == info->mb) {
// ?!?!?
return stbi__errpuc("bad BMP", "bad BMP");
}
} else
return stbi__errpuc("bad BMP", "bad BMP");
}
} else {
// V4/V5 header
int i;
if (hsz != 108 && hsz != 124)
return stbi__errpuc("bad BMP", "bad BMP");
info->mr = stbi__get32le(s);
info->mg = stbi__get32le(s);
info->mb = stbi__get32le(s);
info->ma = stbi__get32le(s);
if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs
stbi__bmp_set_mask_defaults(info, compress);
stbi__get32le(s); // discard color space
for (i=0; i < 12; ++i)
stbi__get32le(s); // discard color space parameters
if (hsz == 124) {
stbi__get32le(s); // discard rendering intent
stbi__get32le(s); // discard offset of profile data
stbi__get32le(s); // discard size of profile data
stbi__get32le(s); // discard reserved
}
}
}
return (void *) 1;
} | O3 | c | stbi__bmp_parse_header(stbi__context*, stbi__bmp_data*):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x31fa0
movzbl %al, %eax
cmpl $0x42, %eax
jne 0x321d2
movq 0x18(%rsp), %rdi
callq 0x31fa0
movzbl %al, %eax
cmpl $0x4d, %eax
je 0x321f3
leaq 0x9589(%rip), %rdi # 0x3b762
callq 0x2f5a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x20(%rsp)
jmp 0x3269b
movq 0x18(%rsp), %rdi
callq 0x32030
movq 0x18(%rsp), %rdi
callq 0x32070
movq 0x18(%rsp), %rdi
callq 0x32070
movq 0x18(%rsp), %rdi
callq 0x32030
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x18(%rsp), %rdi
callq 0x32030
movl %eax, %ecx
movl %ecx, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0x18(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0x14(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0x10(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0xc(%rax)
movq 0x10(%rsp), %rax
movl $0xe, 0x20(%rax)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jge 0x322a5
leaq 0x94df(%rip), %rdi # 0x3b76a
callq 0x2f5a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x20(%rsp)
jmp 0x3269b
cmpl $0xc, 0xc(%rsp)
je 0x322e9
cmpl $0x28, 0xc(%rsp)
je 0x322e9
cmpl $0x38, 0xc(%rsp)
je 0x322e9
cmpl $0x6c, 0xc(%rsp)
je 0x322e9
cmpl $0x7c, 0xc(%rsp)
je 0x322e9
leaq 0x94a3(%rip), %rdi # 0x3b772
callq 0x2f5a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x20(%rsp)
jmp 0x3269b
cmpl $0xc, 0xc(%rsp)
jne 0x32319
movq 0x18(%rsp), %rdi
callq 0x32070
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x18(%rsp), %rdi
callq 0x32070
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x4(%rax)
jmp 0x32340
movq 0x18(%rsp), %rdi
callq 0x32030
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x18(%rsp), %rdi
callq 0x32030
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x18(%rsp), %rdi
callq 0x32070
cmpl $0x1, %eax
je 0x32370
leaq 0x9414(%rip), %rdi # 0x3b76a
callq 0x2f5a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x20(%rsp)
jmp 0x3269b
movq 0x18(%rsp), %rdi
callq 0x32070
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
cmpl $0xc, 0xc(%rsp)
je 0x32691
movq 0x18(%rsp), %rdi
callq 0x32030
movl %eax, 0x8(%rsp)
cmpl $0x1, 0x8(%rsp)
je 0x323aa
cmpl $0x2, 0x8(%rsp)
jne 0x323cb
leaq 0x93cd(%rip), %rdi # 0x3b77e
callq 0x2f5a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x20(%rsp)
jmp 0x3269b
cmpl $0x4, 0x8(%rsp)
jl 0x323f3
leaq 0x93ad(%rip), %rdi # 0x3b786
callq 0x2f5a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x20(%rsp)
jmp 0x3269b
cmpl $0x3, 0x8(%rsp)
jne 0x3242f
movq 0x10(%rsp), %rax
cmpl $0x10, (%rax)
je 0x3242f
movq 0x10(%rsp), %rax
cmpl $0x20, (%rax)
je 0x3242f
leaq 0x9355(%rip), %rdi # 0x3b76a
callq 0x2f5a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x20(%rsp)
jmp 0x3269b
movq 0x18(%rsp), %rdi
callq 0x32030
movq 0x18(%rsp), %rdi
callq 0x32030
movq 0x18(%rsp), %rdi
callq 0x32030
movq 0x18(%rsp), %rdi
callq 0x32030
movq 0x18(%rsp), %rdi
callq 0x32030
cmpl $0x28, 0xc(%rsp)
je 0x32473
cmpl $0x38, 0xc(%rsp)
jne 0x3259a
cmpl $0x38, 0xc(%rsp)
jne 0x324a2
movq 0x18(%rsp), %rdi
callq 0x32030
movq 0x18(%rsp), %rdi
callq 0x32030
movq 0x18(%rsp), %rdi
callq 0x32030
movq 0x18(%rsp), %rdi
callq 0x32030
movq 0x10(%rsp), %rax
cmpl $0x10, (%rax)
je 0x324ba
movq 0x10(%rsp), %rax
cmpl $0x20, (%rax)
jne 0x32595
cmpl $0x0, 0x8(%rsp)
jne 0x324d4
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %esi
callq 0x33100
jmp 0x32593
cmpl $0x3, 0x8(%rsp)
jne 0x32570
movq 0x18(%rsp), %rdi
callq 0x32030
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0xc(%rax)
movq 0x18(%rsp), %rdi
callq 0x32030
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x10(%rax)
movq 0x18(%rsp), %rdi
callq 0x32030
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x14(%rax)
movq 0x10(%rsp), %rax
movl 0x20(%rax), %ecx
addl $0xc, %ecx
movl %ecx, 0x20(%rax)
movq 0x10(%rsp), %rax
movl 0xc(%rax), %eax
movq 0x10(%rsp), %rcx
cmpl 0x10(%rcx), %eax
jne 0x3256e
movq 0x10(%rsp), %rax
movl 0x10(%rax), %eax
movq 0x10(%rsp), %rcx
cmpl 0x14(%rcx), %eax
jne 0x3256e
leaq 0x9216(%rip), %rdi # 0x3b76a
callq 0x2f5a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x20(%rsp)
jmp 0x3269b
jmp 0x32591
leaq 0x91f3(%rip), %rdi # 0x3b76a
callq 0x2f5a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x20(%rsp)
jmp 0x3269b
jmp 0x32593
jmp 0x32595
jmp 0x3268f
cmpl $0x6c, 0xc(%rsp)
je 0x325c9
cmpl $0x7c, 0xc(%rsp)
je 0x325c9
leaq 0x91bb(%rip), %rdi # 0x3b76a
callq 0x2f5a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x20(%rsp)
jmp 0x3269b
movq 0x18(%rsp), %rdi
callq 0x32030
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0xc(%rax)
movq 0x18(%rsp), %rdi
callq 0x32030
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x10(%rax)
movq 0x18(%rsp), %rdi
callq 0x32030
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x14(%rax)
movq 0x18(%rsp), %rdi
callq 0x32030
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x18(%rax)
cmpl $0x3, 0x8(%rsp)
je 0x3262e
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %esi
callq 0x33100
movq 0x18(%rsp), %rdi
callq 0x32030
movl $0x0, 0x4(%rsp)
cmpl $0xc, 0x4(%rsp)
jge 0x3265e
movq 0x18(%rsp), %rdi
callq 0x32030
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x32640
cmpl $0x7c, 0xc(%rsp)
jne 0x3268d
movq 0x18(%rsp), %rdi
callq 0x32030
movq 0x18(%rsp), %rdi
callq 0x32030
movq 0x18(%rsp), %rdi
callq 0x32030
movq 0x18(%rsp), %rdi
callq 0x32030
jmp 0x3268f
jmp 0x32691
movl $0x1, %eax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZL22stbi__bmp_parse_headerP13stbi__contextP14stbi__bmp_data:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rdi, [rsp+28h+var_10]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
movzx eax, al
cmp eax, 42h ; 'B'
jnz short loc_321D2
mov rdi, [rsp+28h+var_10]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
movzx eax, al
cmp eax, 4Dh ; 'M'
jz short loc_321F3
loc_321D2:
lea rdi, aNotBmp; "not BMP"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+28h+var_8], rax
jmp loc_3269B
loc_321F3:
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_18]
mov [rax+4], ecx
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov ecx, eax
mov [rsp+28h+var_1C], ecx
mov rax, [rsp+28h+var_18]
mov [rax+8], ecx
mov rax, [rsp+28h+var_18]
mov dword ptr [rax+18h], 0
mov rax, [rsp+28h+var_18]
mov dword ptr [rax+14h], 0
mov rax, [rsp+28h+var_18]
mov dword ptr [rax+10h], 0
mov rax, [rsp+28h+var_18]
mov dword ptr [rax+0Ch], 0
mov rax, [rsp+28h+var_18]
mov dword ptr [rax+20h], 0Eh
mov rax, [rsp+28h+var_18]
cmp dword ptr [rax+4], 0
jge short loc_322A5
lea rdi, aBadBmp; "bad BMP"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+28h+var_8], rax
jmp loc_3269B
loc_322A5:
cmp [rsp+28h+var_1C], 0Ch
jz short loc_322E9
cmp [rsp+28h+var_1C], 28h ; '('
jz short loc_322E9
cmp [rsp+28h+var_1C], 38h ; '8'
jz short loc_322E9
cmp [rsp+28h+var_1C], 6Ch ; 'l'
jz short loc_322E9
cmp [rsp+28h+var_1C], 7Ch ; '|'
jz short loc_322E9
lea rdi, aUnknownBmp; "unknown BMP"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+28h+var_8], rax
jmp loc_3269B
loc_322E9:
cmp [rsp+28h+var_1C], 0Ch
jnz short loc_32319
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_10]
mov [rax], ecx
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_10]
mov [rax+4], ecx
jmp short loc_32340
loc_32319:
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_10]
mov [rax], ecx
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_10]
mov [rax+4], ecx
loc_32340:
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
cmp eax, 1
jz short loc_32370
lea rdi, aBadBmp; "bad BMP"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+28h+var_8], rax
jmp loc_3269B
loc_32370:
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_18]
mov [rax], ecx
cmp [rsp+28h+var_1C], 0Ch
jz loc_32691
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov [rsp+28h+var_20], eax
cmp [rsp+28h+var_20], 1
jz short loc_323AA
cmp [rsp+28h+var_20], 2
jnz short loc_323CB
loc_323AA:
lea rdi, aBmpRle; "BMP RLE"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+28h+var_8], rax
jmp loc_3269B
loc_323CB:
cmp [rsp+28h+var_20], 4
jl short loc_323F3
lea rdi, aBmpJpegPng; "BMP JPEG/PNG"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+28h+var_8], rax
jmp loc_3269B
loc_323F3:
cmp [rsp+28h+var_20], 3
jnz short loc_3242F
mov rax, [rsp+28h+var_18]
cmp dword ptr [rax], 10h
jz short loc_3242F
mov rax, [rsp+28h+var_18]
cmp dword ptr [rax], 20h ; ' '
jz short loc_3242F
lea rdi, aBadBmp; "bad BMP"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+28h+var_8], rax
jmp loc_3269B
loc_3242F:
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
cmp [rsp+28h+var_1C], 28h ; '('
jz short loc_32473
cmp [rsp+28h+var_1C], 38h ; '8'
jnz loc_3259A
loc_32473:
cmp [rsp+28h+var_1C], 38h ; '8'
jnz short loc_324A2
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
loc_324A2:
mov rax, [rsp+28h+var_18]
cmp dword ptr [rax], 10h
jz short loc_324BA
mov rax, [rsp+28h+var_18]
cmp dword ptr [rax], 20h ; ' '
jnz loc_32595
loc_324BA:
cmp [rsp+28h+var_20], 0
jnz short loc_324D4
mov rdi, [rsp+28h+var_18]
mov esi, [rsp+28h+var_20]
call _ZL27stbi__bmp_set_mask_defaultsP14stbi__bmp_datai; stbi__bmp_set_mask_defaults(stbi__bmp_data *,int)
jmp loc_32593
loc_324D4:
cmp [rsp+28h+var_20], 3
jnz loc_32570
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_18]
mov [rax+0Ch], ecx
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_18]
mov [rax+10h], ecx
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_18]
mov [rax+14h], ecx
mov rax, [rsp+28h+var_18]
mov ecx, [rax+20h]
add ecx, 0Ch
mov [rax+20h], ecx
mov rax, [rsp+28h+var_18]
mov eax, [rax+0Ch]
mov rcx, [rsp+28h+var_18]
cmp eax, [rcx+10h]
jnz short loc_3256E
mov rax, [rsp+28h+var_18]
mov eax, [rax+10h]
mov rcx, [rsp+28h+var_18]
cmp eax, [rcx+14h]
jnz short loc_3256E
lea rdi, aBadBmp; "bad BMP"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+28h+var_8], rax
jmp loc_3269B
loc_3256E:
jmp short loc_32591
loc_32570:
lea rdi, aBadBmp; "bad BMP"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+28h+var_8], rax
jmp loc_3269B
loc_32591:
jmp short $+2
loc_32593:
jmp short $+2
loc_32595:
jmp loc_3268F
loc_3259A:
cmp [rsp+28h+var_1C], 6Ch ; 'l'
jz short loc_325C9
cmp [rsp+28h+var_1C], 7Ch ; '|'
jz short loc_325C9
lea rdi, aBadBmp; "bad BMP"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+28h+var_8], rax
jmp loc_3269B
loc_325C9:
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_18]
mov [rax+0Ch], ecx
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_18]
mov [rax+10h], ecx
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_18]
mov [rax+14h], ecx
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov ecx, eax
mov rax, [rsp+28h+var_18]
mov [rax+18h], ecx
cmp [rsp+28h+var_20], 3
jz short loc_3262E
mov rdi, [rsp+28h+var_18]
mov esi, [rsp+28h+var_20]
call _ZL27stbi__bmp_set_mask_defaultsP14stbi__bmp_datai; stbi__bmp_set_mask_defaults(stbi__bmp_data *,int)
loc_3262E:
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov [rsp+28h+var_24], 0
loc_32640:
cmp [rsp+28h+var_24], 0Ch
jge short loc_3265E
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov eax, [rsp+28h+var_24]
add eax, 1
mov [rsp+28h+var_24], eax
jmp short loc_32640
loc_3265E:
cmp [rsp+28h+var_1C], 7Ch ; '|'
jnz short loc_3268D
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
loc_3268D:
jmp short $+2
loc_3268F:
jmp short $+2
loc_32691:
mov eax, 1
mov [rsp+28h+var_8], rax
loc_3269B:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
| long long stbi__bmp_parse_header(_DWORD *a1, _DWORD *a2)
{
int v2; // ecx
int i; // [rsp+4h] [rbp-24h]
int v5; // [rsp+8h] [rbp-20h]
int v6; // [rsp+Ch] [rbp-1Ch]
if ( stbi__get8((long long)a1) == 66 && stbi__get8((long long)a1) == 77 )
{
stbi__get32le((long long)a1);
stbi__get16le((long long)a1);
stbi__get16le((long long)a1);
a2[1] = stbi__get32le((long long)a1);
v6 = stbi__get32le((long long)a1);
a2[2] = v6;
a2[6] = 0;
a2[5] = 0;
a2[4] = 0;
a2[3] = 0;
a2[8] = 14;
if ( (int)a2[1] >= 0 )
{
if ( v6 != 12 && v6 != 40 && v6 != 56 && v6 != 108 && v6 != 124 )
{
stbi__err("unknown BMP");
return 0LL;
}
if ( v6 == 12 )
{
*a1 = stbi__get16le((long long)a1);
v2 = stbi__get16le((long long)a1);
}
else
{
*a1 = stbi__get32le((long long)a1);
v2 = stbi__get32le((long long)a1);
}
a1[1] = v2;
if ( (unsigned int)stbi__get16le((long long)a1) == 1 )
{
*a2 = stbi__get16le((long long)a1);
if ( v6 == 12 )
return 1LL;
v5 = stbi__get32le((long long)a1);
if ( v5 == 1 || v5 == 2 )
{
stbi__err("BMP RLE");
return 0LL;
}
if ( v5 >= 4 )
{
stbi__err("BMP JPEG/PNG");
return 0LL;
}
if ( v5 == 3 && *a2 != 16 && *a2 != 32 )
goto LABEL_36;
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
if ( v6 != 40 && v6 != 56 )
{
a2[3] = stbi__get32le((long long)a1);
a2[4] = stbi__get32le((long long)a1);
a2[5] = stbi__get32le((long long)a1);
a2[6] = stbi__get32le((long long)a1);
if ( v5 != 3 )
stbi__bmp_set_mask_defaults(a2, (unsigned int)v5);
stbi__get32le((long long)a1);
for ( i = 0; i < 12; ++i )
stbi__get32le((long long)a1);
if ( v6 == 124 )
{
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
}
return 1LL;
}
if ( v6 == 56 )
{
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
}
if ( *a2 != 16 && *a2 != 32 )
return 1LL;
if ( !v5 )
{
stbi__bmp_set_mask_defaults(a2, 0LL);
return 1LL;
}
if ( v5 == 3 )
{
a2[3] = stbi__get32le((long long)a1);
a2[4] = stbi__get32le((long long)a1);
a2[5] = stbi__get32le((long long)a1);
a2[8] += 12;
if ( a2[3] != a2[4] || a2[4] != a2[5] )
return 1LL;
}
}
}
LABEL_36:
stbi__err("bad BMP");
return 0LL;
}
stbi__err("not BMP");
return 0LL;
}
| stbi__bmp_parse_header:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00131fa0
MOVZX EAX,AL
CMP EAX,0x42
JNZ 0x001321d2
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00131fa0
MOVZX EAX,AL
CMP EAX,0x4d
JZ 0x001321f3
LAB_001321d2:
LEA RDI,[0x13b762]
CALL 0x0012f5a0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0013269b
LAB_001321f3:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132070
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132070
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x4],ECX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV ECX,EAX
MOV dword ptr [RSP + 0xc],ECX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x14],0x0
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0xc],0x0
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x20],0xe
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x4],0x0
JGE 0x001322a5
LEA RDI,[0x13b76a]
CALL 0x0012f5a0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0013269b
LAB_001322a5:
CMP dword ptr [RSP + 0xc],0xc
JZ 0x001322e9
CMP dword ptr [RSP + 0xc],0x28
JZ 0x001322e9
CMP dword ptr [RSP + 0xc],0x38
JZ 0x001322e9
CMP dword ptr [RSP + 0xc],0x6c
JZ 0x001322e9
CMP dword ptr [RSP + 0xc],0x7c
JZ 0x001322e9
LEA RDI,[0x13b772]
CALL 0x0012f5a0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0013269b
LAB_001322e9:
CMP dword ptr [RSP + 0xc],0xc
JNZ 0x00132319
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132070
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132070
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x4],ECX
JMP 0x00132340
LAB_00132319:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x4],ECX
LAB_00132340:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132070
CMP EAX,0x1
JZ 0x00132370
LEA RDI,[0x13b76a]
CALL 0x0012f5a0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0013269b
LAB_00132370:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132070
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX],ECX
CMP dword ptr [RSP + 0xc],0xc
JZ 0x00132691
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV dword ptr [RSP + 0x8],EAX
CMP dword ptr [RSP + 0x8],0x1
JZ 0x001323aa
CMP dword ptr [RSP + 0x8],0x2
JNZ 0x001323cb
LAB_001323aa:
LEA RDI,[0x13b77e]
CALL 0x0012f5a0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0013269b
LAB_001323cb:
CMP dword ptr [RSP + 0x8],0x4
JL 0x001323f3
LEA RDI,[0x13b786]
CALL 0x0012f5a0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0013269b
LAB_001323f3:
CMP dword ptr [RSP + 0x8],0x3
JNZ 0x0013242f
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX],0x10
JZ 0x0013242f
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX],0x20
JZ 0x0013242f
LEA RDI,[0x13b76a]
CALL 0x0012f5a0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0013269b
LAB_0013242f:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
CMP dword ptr [RSP + 0xc],0x28
JZ 0x00132473
CMP dword ptr [RSP + 0xc],0x38
JNZ 0x0013259a
LAB_00132473:
CMP dword ptr [RSP + 0xc],0x38
JNZ 0x001324a2
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
LAB_001324a2:
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX],0x10
JZ 0x001324ba
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX],0x20
JNZ 0x00132595
LAB_001324ba:
CMP dword ptr [RSP + 0x8],0x0
JNZ 0x001324d4
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x00133100
JMP 0x00132593
LAB_001324d4:
CMP dword ptr [RSP + 0x8],0x3
JNZ 0x00132570
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0xc],ECX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RAX + 0x20]
ADD ECX,0xc
MOV dword ptr [RAX + 0x20],ECX
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0xc]
MOV RCX,qword ptr [RSP + 0x10]
CMP EAX,dword ptr [RCX + 0x10]
JNZ 0x0013256e
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0x10]
MOV RCX,qword ptr [RSP + 0x10]
CMP EAX,dword ptr [RCX + 0x14]
JNZ 0x0013256e
LEA RDI,[0x13b76a]
CALL 0x0012f5a0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0013269b
LAB_0013256e:
JMP 0x00132591
LAB_00132570:
LEA RDI,[0x13b76a]
CALL 0x0012f5a0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0013269b
LAB_00132591:
JMP 0x00132593
LAB_00132593:
JMP 0x00132595
LAB_00132595:
JMP 0x0013268f
LAB_0013259a:
CMP dword ptr [RSP + 0xc],0x6c
JZ 0x001325c9
CMP dword ptr [RSP + 0xc],0x7c
JZ 0x001325c9
LEA RDI,[0x13b76a]
CALL 0x0012f5a0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0013269b
LAB_001325c9:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0xc],ECX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x18],ECX
CMP dword ptr [RSP + 0x8],0x3
JZ 0x0013262e
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x00133100
LAB_0013262e:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV dword ptr [RSP + 0x4],0x0
LAB_00132640:
CMP dword ptr [RSP + 0x4],0xc
JGE 0x0013265e
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00132640
LAB_0013265e:
CMP dword ptr [RSP + 0xc],0x7c
JNZ 0x0013268d
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00132030
LAB_0013268d:
JMP 0x0013268f
LAB_0013268f:
JMP 0x00132691
LAB_00132691:
MOV EAX,0x1
MOV qword ptr [RSP + 0x20],RAX
LAB_0013269b:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
/* stbi__bmp_parse_header(stbi__context*, stbi__bmp_data*) */
int8 stbi__bmp_parse_header(stbi__context *param_1,stbi__bmp_data *param_2)
{
char cVar1;
int4 uVar2;
int iVar3;
int iVar4;
int local_24;
int8 local_8;
cVar1 = stbi__get8(param_1);
if ((cVar1 == 'B') && (cVar1 = stbi__get8(param_1), cVar1 == 'M')) {
stbi__get32le(param_1);
stbi__get16le(param_1);
stbi__get16le(param_1);
uVar2 = stbi__get32le(param_1);
*(int4 *)(param_2 + 4) = uVar2;
iVar3 = stbi__get32le(param_1);
*(int *)(param_2 + 8) = iVar3;
*(int4 *)(param_2 + 0x18) = 0;
*(int4 *)(param_2 + 0x14) = 0;
*(int4 *)(param_2 + 0x10) = 0;
*(int4 *)(param_2 + 0xc) = 0;
*(int4 *)(param_2 + 0x20) = 0xe;
if (*(int *)(param_2 + 4) < 0) {
stbi__err("bad BMP");
local_8 = 0;
}
else if ((((iVar3 == 0xc) || (iVar3 == 0x28)) || (iVar3 == 0x38)) ||
((iVar3 == 0x6c || (iVar3 == 0x7c)))) {
if (iVar3 == 0xc) {
uVar2 = stbi__get16le(param_1);
*(int4 *)param_1 = uVar2;
uVar2 = stbi__get16le(param_1);
*(int4 *)(param_1 + 4) = uVar2;
}
else {
uVar2 = stbi__get32le(param_1);
*(int4 *)param_1 = uVar2;
uVar2 = stbi__get32le(param_1);
*(int4 *)(param_1 + 4) = uVar2;
}
iVar4 = stbi__get16le(param_1);
if (iVar4 == 1) {
uVar2 = stbi__get16le(param_1);
*(int4 *)param_2 = uVar2;
if (iVar3 != 0xc) {
iVar4 = stbi__get32le(param_1);
if ((iVar4 == 1) || (iVar4 == 2)) {
stbi__err("BMP RLE");
return 0;
}
if (3 < iVar4) {
stbi__err("BMP JPEG/PNG");
return 0;
}
if (((iVar4 == 3) && (*(int *)param_2 != 0x10)) && (*(int *)param_2 != 0x20)) {
stbi__err("bad BMP");
return 0;
}
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
if ((iVar3 == 0x28) || (iVar3 == 0x38)) {
if (iVar3 == 0x38) {
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
}
if ((*(int *)param_2 == 0x10) || (*(int *)param_2 == 0x20)) {
if (iVar4 == 0) {
stbi__bmp_set_mask_defaults(param_2,0);
}
else {
if (iVar4 != 3) {
stbi__err("bad BMP");
return 0;
}
uVar2 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0xc) = uVar2;
uVar2 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0x10) = uVar2;
uVar2 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0x14) = uVar2;
*(int *)(param_2 + 0x20) = *(int *)(param_2 + 0x20) + 0xc;
if ((*(int *)(param_2 + 0xc) == *(int *)(param_2 + 0x10)) &&
(*(int *)(param_2 + 0x10) == *(int *)(param_2 + 0x14))) {
stbi__err("bad BMP");
return 0;
}
}
}
}
else {
if ((iVar3 != 0x6c) && (iVar3 != 0x7c)) {
stbi__err("bad BMP");
return 0;
}
uVar2 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0xc) = uVar2;
uVar2 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0x10) = uVar2;
uVar2 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0x14) = uVar2;
uVar2 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0x18) = uVar2;
if (iVar4 != 3) {
stbi__bmp_set_mask_defaults(param_2,iVar4);
}
stbi__get32le(param_1);
for (local_24 = 0; local_24 < 0xc; local_24 = local_24 + 1) {
stbi__get32le(param_1);
}
if (iVar3 == 0x7c) {
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
}
}
}
local_8 = 1;
}
else {
stbi__err("bad BMP");
local_8 = 0;
}
}
else {
stbi__err("unknown BMP");
local_8 = 0;
}
}
else {
stbi__err("not BMP");
local_8 = 0;
}
return local_8;
}
| |
48,886 | js_thisSymbolValue | bluesky950520[P]quickjs/quickjs.c | static JSValue js_thisSymbolValue(JSContext *ctx, JSValue this_val)
{
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_SYMBOL)
return js_dup(this_val);
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(this_val);
if (p->class_id == JS_CLASS_SYMBOL) {
if (JS_VALUE_GET_TAG(p->u.object_data) == JS_TAG_SYMBOL)
return js_dup(p->u.object_data);
}
}
return JS_ThrowTypeError(ctx, "not a symbol");
} | O0 | c | js_thisSymbolValue:
subq $0x38, %rsp
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x20(%rsp), %rax
cmpl $-0x8, %eax
jne 0xd9dd8
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x216d0
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
jmp 0xd9e47
movq 0x20(%rsp), %rax
cmpl $-0x1, %eax
jne 0xd9e2a
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x7, %eax
jne 0xd9e28
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rax
cmpl $-0x8, %eax
jne 0xd9e26
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x38(%rax), %rsi
callq 0x216d0
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
jmp 0xd9e47
jmp 0xd9e28
jmp 0xd9e2a
movq 0x10(%rsp), %rdi
leaq 0x346f8(%rip), %rsi # 0x10e52e
movb $0x0, %al
callq 0x2d300
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| js_thisSymbolValue:
sub rsp, 38h
mov [rsp+38h+var_20], rsi
mov [rsp+38h+var_18], rdx
mov [rsp+38h+var_28], rdi
mov rax, [rsp+38h+var_18]
cmp eax, 0FFFFFFF8h
jnz short loc_D9DD8
mov rdi, [rsp+38h+var_20]
mov rsi, [rsp+38h+var_18]
call js_dup
mov [rsp+38h+var_10], rax
mov [rsp+38h+var_8], rdx
jmp short loc_D9E47
loc_D9DD8:
mov rax, [rsp+38h+var_18]
cmp eax, 0FFFFFFFFh
jnz short loc_D9E2A
mov rax, [rsp+38h+var_20]
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_30]
movzx eax, word ptr [rax+6]
cmp eax, 7
jnz short loc_D9E28
mov rax, [rsp+38h+var_30]
mov rax, [rax+38h]
cmp eax, 0FFFFFFF8h
jnz short loc_D9E26
mov rax, [rsp+38h+var_30]
mov rdi, [rax+30h]
mov rsi, [rax+38h]
call js_dup
mov [rsp+38h+var_10], rax
mov [rsp+38h+var_8], rdx
jmp short loc_D9E47
loc_D9E26:
jmp short $+2
loc_D9E28:
jmp short $+2
loc_D9E2A:
mov rdi, [rsp+38h+var_28]
lea rsi, aNotASymbol; "not a symbol"
mov al, 0
call JS_ThrowTypeError
mov [rsp+38h+var_10], rax
mov [rsp+38h+var_8], rdx
loc_D9E47:
mov rax, [rsp+38h+var_10]
mov rdx, [rsp+38h+var_8]
add rsp, 38h
retn
| _DWORD * js_thisSymbolValue(
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 v15; // [rsp+0h] [rbp-38h]
if ( (_DWORD)a3 == -8 )
return js_dup((_DWORD *)a2, 0xFFFFFFF8);
if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 7 && (unsigned int)*(_QWORD *)(a2 + 56) == -8 )
return js_dup(*(_DWORD **)(a2 + 48), *(_QWORD *)(a2 + 56));
return (_DWORD *)JS_ThrowTypeError(
a1,
(long long)"not a symbol",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v15);
}
| js_thisSymbolValue:
SUB RSP,0x38
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,-0x8
JNZ 0x001d9dd8
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001216d0
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
JMP 0x001d9e47
LAB_001d9dd8:
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,-0x1
JNZ 0x001d9e2a
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x7
JNZ 0x001d9e28
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x38]
CMP EAX,-0x8
JNZ 0x001d9e26
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x30]
MOV RSI,qword ptr [RAX + 0x38]
CALL 0x001216d0
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
JMP 0x001d9e47
LAB_001d9e26:
JMP 0x001d9e28
LAB_001d9e28:
JMP 0x001d9e2a
LAB_001d9e2a:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[0x20e52e]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
LAB_001d9e47:
MOV RAX,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
int1 [16] js_thisSymbolValue(int8 param_1,long param_2,int8 param_3)
{
int1 auVar1 [16];
if ((int)param_3 == -8) {
auVar1 = js_dup(param_2,param_3);
}
else if ((((int)param_3 == -1) && (*(short *)(param_2 + 6) == 7)) &&
((int)*(int8 *)(param_2 + 0x38) == -8)) {
auVar1 = js_dup(*(int8 *)(param_2 + 0x30),*(int8 *)(param_2 + 0x38));
}
else {
auVar1 = JS_ThrowTypeError(param_1,"not a symbol");
}
return auVar1;
}
| |
48,887 | js_thisSymbolValue | bluesky950520[P]quickjs/quickjs.c | static JSValue js_thisSymbolValue(JSContext *ctx, JSValue this_val)
{
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_SYMBOL)
return js_dup(this_val);
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(this_val);
if (p->class_id == JS_CLASS_SYMBOL) {
if (JS_VALUE_GET_TAG(p->u.object_data) == JS_TAG_SYMBOL)
return js_dup(p->u.object_data);
}
}
return JS_ThrowTypeError(ctx, "not a symbol");
} | O1 | c | js_thisSymbolValue:
pushq %rbx
subq $0x10, %rsp
movq %rsi, (%rsp)
cmpl $-0x1, %edx
je 0x7e78b
cmpl $-0x8, %edx
jne 0x7e7af
movq %rsi, %rbx
movq %rsi, 0x8(%rsp)
cmpl $-0x9, %edx
jb 0x7e7c4
movq 0x8(%rsp), %rax
incl (%rax)
jmp 0x7e7c4
movq (%rsp), %rcx
movb $0x1, %al
cmpw $0x7, 0x6(%rcx)
jne 0x7e7ab
movq 0x38(%rcx), %rdx
cmpl $-0x8, %edx
jne 0x7e7ab
movq 0x30(%rcx), %rbx
incl (%rbx)
xorl %eax, %eax
jmp 0x7e7ab
testb %al, %al
je 0x7e7c4
leaq 0x20d14(%rip), %rsi # 0x9f4ca
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22567
movl $0x6, %edx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
| js_thisSymbolValue:
push rbx
sub rsp, 10h
mov [rsp+18h+var_18], rsi
cmp edx, 0FFFFFFFFh
jz short loc_7E78B
cmp edx, 0FFFFFFF8h
jnz short loc_7E7AF
mov rbx, rsi
mov [rsp+18h+var_10], rsi
cmp edx, 0FFFFFFF7h
jb short loc_7E7C4
mov rax, [rsp+18h+var_10]
inc dword ptr [rax]
jmp short loc_7E7C4
loc_7E78B:
mov rcx, [rsp+18h+var_18]
mov al, 1
cmp word ptr [rcx+6], 7
jnz short loc_7E7AB
mov rdx, [rcx+38h]
cmp edx, 0FFFFFFF8h
jnz short loc_7E7AB
mov rbx, [rcx+30h]
inc dword ptr [rbx]
xor eax, eax
jmp short $+2
loc_7E7AB:
test al, al
jz short loc_7E7C4
loc_7E7AF:
lea rsi, aNotASymbol; "not a symbol"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
loc_7E7C4:
mov rax, rbx
add rsp, 10h
pop rbx
retn
| _DWORD * js_thisSymbolValue(
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)
{
_DWORD *v14; // rbx
char v15; // al
if ( (_DWORD)a3 != -1 )
{
if ( (_DWORD)a3 == -8 )
{
v14 = (_DWORD *)a2;
++*(_DWORD *)a2;
return v14;
}
LABEL_8:
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a symbol", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a2);
return v14;
}
a4 = a2;
v15 = 1;
if ( *(_WORD *)(a2 + 6) == 7 )
{
a3 = *(_QWORD *)(a2 + 56);
if ( (_DWORD)a3 == -8 )
{
v14 = *(_DWORD **)(a2 + 48);
++*v14;
v15 = 0;
}
}
if ( v15 )
goto LABEL_8;
return v14;
}
| js_thisSymbolValue:
PUSH RBX
SUB RSP,0x10
MOV qword ptr [RSP],RSI
CMP EDX,-0x1
JZ 0x0017e78b
CMP EDX,-0x8
JNZ 0x0017e7af
MOV RBX,RSI
MOV qword ptr [RSP + 0x8],RSI
CMP EDX,-0x9
JC 0x0017e7c4
MOV RAX,qword ptr [RSP + 0x8]
INC dword ptr [RAX]
JMP 0x0017e7c4
LAB_0017e78b:
MOV RCX,qword ptr [RSP]
MOV AL,0x1
CMP word ptr [RCX + 0x6],0x7
JNZ 0x0017e7ab
MOV RDX,qword ptr [RCX + 0x38]
CMP EDX,-0x8
JNZ 0x0017e7ab
MOV RBX,qword ptr [RCX + 0x30]
INC dword ptr [RBX]
XOR EAX,EAX
JMP 0x0017e7ab
LAB_0017e7ab:
TEST AL,AL
JZ 0x0017e7c4
LAB_0017e7af:
LEA RSI,[0x19f4ca]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x00122567
MOV EDX,0x6
LAB_0017e7c4:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
RET
|
int1 [16] js_thisSymbolValue(int8 param_1,int *param_2,int8 param_3)
{
bool bVar1;
int *unaff_RBX;
int1 auVar2 [16];
if ((int)param_3 == -1) {
bVar1 = true;
if ((*(short *)((long)param_2 + 6) == 7) &&
(param_3 = *(int8 *)(param_2 + 0xe), (int)param_3 == -8)) {
unaff_RBX = *(int **)(param_2 + 0xc);
*unaff_RBX = *unaff_RBX + 1;
bVar1 = false;
}
if (!bVar1) goto LAB_0017e7c4;
}
else if ((int)param_3 == -8) {
*param_2 = *param_2 + 1;
unaff_RBX = param_2;
goto LAB_0017e7c4;
}
unaff_RBX = (int *)0x0;
JS_ThrowTypeError(param_1,"not a symbol");
param_3 = 6;
LAB_0017e7c4:
auVar2._8_8_ = param_3;
auVar2._0_8_ = unaff_RBX;
return auVar2;
}
| |
48,888 | js_thisSymbolValue | bluesky950520[P]quickjs/quickjs.c | static JSValue js_thisSymbolValue(JSContext *ctx, JSValue this_val)
{
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_SYMBOL)
return js_dup(this_val);
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(this_val);
if (p->class_id == JS_CLASS_SYMBOL) {
if (JS_VALUE_GET_TAG(p->u.object_data) == JS_TAG_SYMBOL)
return js_dup(p->u.object_data);
}
}
return JS_ThrowTypeError(ctx, "not a symbol");
} | O2 | c | js_thisSymbolValue:
pushq %rbx
movq %rsi, %rbx
cmpl $-0x1, %edx
je 0x6a4bd
cmpl $-0x8, %edx
jne 0x6a4d3
incl (%rbx)
jmp 0x6a4e6
cmpw $0x7, 0x6(%rbx)
jne 0x6a4d3
movq 0x38(%rbx), %rdx
cmpl $-0x8, %edx
jne 0x6a4d3
movq 0x30(%rbx), %rbx
jmp 0x6a4b9
leaq 0x1bf40(%rip), %rsi # 0x8641a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1c64d
pushq $0x6
popq %rdx
movq %rbx, %rax
popq %rbx
retq
| js_thisSymbolValue:
push rbx
mov rbx, rsi
cmp edx, 0FFFFFFFFh
jz short loc_6A4BD
cmp edx, 0FFFFFFF8h
jnz short loc_6A4D3
loc_6A4B9:
inc dword ptr [rbx]
jmp short loc_6A4E6
loc_6A4BD:
cmp word ptr [rbx+6], 7
jnz short loc_6A4D3
mov rdx, [rbx+38h]
cmp edx, 0FFFFFFF8h
jnz short loc_6A4D3
mov rbx, [rbx+30h]
jmp short loc_6A4B9
loc_6A4D3:
lea rsi, aNotASymbol; "not a symbol"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
push 6
pop rdx
loc_6A4E6:
mov rax, rbx
pop rbx
retn
| _DWORD * js_thisSymbolValue(
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)
{
_DWORD *v14; // rbx
char v16; // [rsp+0h] [rbp-8h]
v14 = (_DWORD *)a2;
if ( (_DWORD)a3 == -1 )
{
if ( *(_WORD *)(a2 + 6) == 7 )
{
a3 = *(_QWORD *)(a2 + 56);
if ( (_DWORD)a3 == -8 )
{
v14 = *(_DWORD **)(a2 + 48);
goto LABEL_3;
}
}
LABEL_7:
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a symbol", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16);
return v14;
}
if ( (_DWORD)a3 != -8 )
goto LABEL_7;
LABEL_3:
++*v14;
return v14;
}
| js_thisSymbolValue:
PUSH RBX
MOV RBX,RSI
CMP EDX,-0x1
JZ 0x0016a4bd
CMP EDX,-0x8
JNZ 0x0016a4d3
LAB_0016a4b9:
INC dword ptr [RBX]
JMP 0x0016a4e6
LAB_0016a4bd:
CMP word ptr [RBX + 0x6],0x7
JNZ 0x0016a4d3
MOV RDX,qword ptr [RBX + 0x38]
CMP EDX,-0x8
JNZ 0x0016a4d3
MOV RBX,qword ptr [RBX + 0x30]
JMP 0x0016a4b9
LAB_0016a4d3:
LEA RSI,[0x18641a]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x0011c64d
PUSH 0x6
POP RDX
LAB_0016a4e6:
MOV RAX,RBX
POP RBX
RET
|
int1 [16] js_thisSymbolValue(int8 param_1,int *param_2,int8 param_3)
{
int1 auVar1 [16];
if ((int)param_3 == -1) {
if ((*(short *)((long)param_2 + 6) != 7) ||
(param_3 = *(int8 *)(param_2 + 0xe), (int)param_3 != -8)) goto LAB_0016a4d3;
param_2 = *(int **)(param_2 + 0xc);
}
else if ((int)param_3 != -8) {
LAB_0016a4d3:
param_2 = (int *)0x0;
JS_ThrowTypeError(param_1,"not a symbol");
param_3 = 6;
goto LAB_0016a4e6;
}
*param_2 = *param_2 + 1;
LAB_0016a4e6:
auVar1._8_8_ = param_3;
auVar1._0_8_ = param_2;
return auVar1;
}
| |
48,889 | minja::Parser::parseDictionary() | llama.cpp/common/minja/minja.hpp | std::shared_ptr<Expression> parseDictionary() {
if (consumeToken("{").empty()) return nullptr;
std::vector<std::pair<std::shared_ptr<Expression>, std::shared_ptr<Expression>>> elements;
if (!consumeToken("}").empty()) {
return std::make_shared<DictExpr>(get_location(), std::move(elements));
}
auto parseKeyValuePair = [&]() {
auto key = parseExpression();
if (!key) throw std::runtime_error("Expected key in dictionary");
if (consumeToken(":").empty()) throw std::runtime_error("Expected colon betweek key & value in dictionary");
auto value = parseExpression();
if (!value) throw std::runtime_error("Expected value in dictionary");
elements.emplace_back(std::pair(std::move(key), std::move(value)));
};
parseKeyValuePair();
while (it != end) {
if (!consumeToken(",").empty()) {
parseKeyValuePair();
} else if (!consumeToken("}").empty()) {
return std::make_shared<DictExpr>(get_location(), std::move(elements));
} else {
throw std::runtime_error("Expected comma or closing brace in dictionary");
}
}
throw std::runtime_error("Expected closing brace");
} | O3 | cpp | minja::Parser::parseDictionary():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x312ea(%rip), %rsi # 0xcbed4
leaq 0x312e4(%rip), %rdx # 0xcbed5
movq %rsp, %rdi
callq 0x3fe82
movq %rbx, 0x60(%rsp)
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %rsi
movl $0x1, %ecx
callq 0x94e1c
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %rbx
cmpq %rax, %rdi
je 0x9ac32
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1c110
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9ac4d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
xorps %xmm0, %xmm0
testq %rbx, %rbx
je 0x9ad0d
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x2c8cc(%rip), %rsi # 0xc7545
leaq 0x2c8c6(%rip), %rdx # 0xc7546
callq 0x3fe82
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %rsi
movl $0x1, %ecx
callq 0x94e1c
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rbx
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x9acbb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1c110
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9acd6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
testq %rbx, %rbx
je 0x9ad1a
movq (%r14), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x9ae71
movq 0x65294(%rip), %rcx # 0xfff90
cmpb $0x0, (%rcx)
je 0x9ae6d
incl 0x8(%rax)
jmp 0x9ae71
movq 0x60(%rsp), %rbx
movups %xmm0, (%rbx)
jmp 0x9af75
leaq 0x68(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x40(%rsp), %rax
movq %rax, 0x8(%rdi)
callq 0x9bfbe
leaq 0x334e8(%rip), %r12 # 0xce21f
movq %rsp, %r13
leaq 0x20(%rsp), %rbp
leaq 0x68(%rsp), %rbx
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x9af87
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
leaq 0x334b9(%rip), %rsi # 0xce21e
movq %r12, %rdx
callq 0x3fe82
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl $0x1, %ecx
callq 0x94e1c
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %r15
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x9ada1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1c110
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9adbc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
testq %r15, %r15
je 0x9adce
movq %rbx, %rdi
callq 0x9bfbe
jmp 0x9ad44
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x2c765(%rip), %rsi # 0xc7545
leaq 0x2c75f(%rip), %rdx # 0xc7546
callq 0x3fe82
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %rsi
movl $0x1, %ecx
callq 0x94e1c
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rbx
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x9ae22
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1c110
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9ae3d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
testq %rbx, %rbx
je 0x9afb9
movq (%r14), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x9ae92
movq 0x6512d(%rip), %rcx # 0xfff90
cmpb $0x0, (%rcx)
je 0x9ae8e
incl 0x8(%rax)
jmp 0x9ae92
lock
incl 0x8(%rax)
leaq 0x28(%rsp), %r15
movq 0x20(%r14), %rbx
subq 0x10(%r14), %rbx
movq %rbx, 0x8(%r15)
movl $0x48, %edi
callq 0x1c160
jmp 0x9aead
lock
incl 0x8(%rax)
leaq 0x28(%rsp), %r15
movq 0x20(%r14), %rbx
subq 0x10(%r14), %rbx
movq %rbx, 0x8(%r15)
movl $0x48, %edi
callq 0x1c160
leaq 0x8(%rsp), %rdi
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x63d09(%rip), %rcx # 0xfebd0
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
leaq 0x63b44(%rip), %rdx # 0xfea20
addq $0x10, %rdx
movq %rdx, 0x10(%rax)
movq 0x20(%rsp), %rdx
movq %rdx, 0x18(%rax)
movq 0x28(%rsp), %rdx
movq %rdx, 0x20(%rax)
testq %rdx, %rdx
je 0x9af15
movq 0x6508e(%rip), %rsi # 0xfff90
cmpb $0x0, (%rsi)
je 0x9af0c
incl 0x8(%rdx)
jmp 0x9af15
lock
incl 0x8(%rdx)
movq 0x30(%rsp), %rbx
movq %rbx, 0x28(%rax)
leaq 0x63d00(%rip), %rdx # 0xfec20
addq $0x10, %rdx
movq %rdx, 0x10(%rax)
movaps 0x40(%rsp), %xmm0
movups %xmm0, 0x30(%rax)
movq 0x50(%rsp), %rdx
movq %rdx, 0x40(%rax)
xorl %edx, %edx
movq %rdx, 0x50(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq 0x60(%rsp), %rbx
movq %rcx, (%rbx)
movq %rdx, 0x8(%rsp)
movq %rax, 0x8(%rbx)
movq %rdx, (%rsp)
callq 0x34564
movq %r15, %rdi
callq 0x34564
leaq 0x40(%rsp), %rdi
callq 0x9c1ea
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1c460
movq %rax, %r14
leaq 0x3339f(%rip), %rsi # 0xce33a
movq %rax, %rdi
callq 0x1c280
movq 0x6500e(%rip), %rsi # 0xfffb8
movq 0x64fc7(%rip), %rdx # 0xfff78
movq %r14, %rdi
callq 0x1c7b0
movl $0x10, %edi
callq 0x1c460
movq %rax, %r14
leaq 0x3333f(%rip), %rsi # 0xce30c
movq %rax, %rdi
callq 0x1c280
jmp 0x9afa3
jmp 0x9b015
jmp 0x9afdf
jmp 0x9b03b
jmp 0x9b026
movq %rax, %rbx
movq %r15, %rdi
callq 0x34564
jmp 0x9b029
jmp 0x9b03b
jmp 0x9b026
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9b033
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
jmp 0x9b033
movq %rax, %rbx
jmp 0x9b033
movq %rax, %rbx
movq %r14, %rdi
callq 0x1caa0
jmp 0x9b029
jmp 0x9b026
jmp 0x9b026
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x9c1ea
movq %rbx, %rdi
callq 0x1c7d0
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9b029
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
jmp 0x9b029
nop
| _ZN5minja6Parser15parseDictionaryEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r14, rsi
mov rbx, rdi
lea rax, [rsp+0A8h+var_98]
mov [rax-10h], rax
lea rsi, asc_CBED4; "{"
lea rdx, asc_CBED4+1; ""
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov [rsp+0A8h+var_48], rbx
lea rdi, [rsp+0A8h+var_88]
mov rdx, rsp
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
lea rax, [rsp+0A8h+var_78]
mov rdi, [rax-10h]; void *
mov rbx, [rax-8]
cmp rdi, rax
jz short loc_9AC32
mov rsi, [rsp+0A8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AC32:
mov rdi, [rsp+0A8h+var_A8]; void *
lea rax, [rsp+0A8h+var_98]
cmp rdi, rax
jz short loc_9AC4D
mov rsi, [rsp+0A8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AC4D:
xorps xmm0, xmm0
test rbx, rbx
jz loc_9AD0D
movaps [rsp+0A8h+var_68], xmm0
mov [rsp+0A8h+var_58], 0
mov rdi, rsp
lea rax, [rsp+0A8h+var_98]
mov [rdi], rax
lea rsi, aResponseHelloW+2Ch; "}"
lea rdx, aResponseHelloW+2Dh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0A8h+var_88]
mov rdx, rsp
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rdi, [rsp+0A8h+var_88]; void *
mov rbx, [rsp+0A8h+var_80]
lea rax, [rsp+0A8h+var_78]
cmp rdi, rax
jz short loc_9ACBB
mov rsi, [rsp+0A8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9ACBB:
mov rdi, [rsp+0A8h+var_A8]; void *
lea rax, [rsp+0A8h+var_98]
cmp rdi, rax
jz short loc_9ACD6
mov rsi, [rsp+0A8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9ACD6:
test rbx, rbx
jz short loc_9AD1A
mov rax, [r14]
mov [rsp+0A8h+var_88], rax
mov rax, [r14+8]
mov [rsp+0A8h+var_80], rax
test rax, rax
jz loc_9AE71
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz loc_9AE6D
inc dword ptr [rax+8]
jmp loc_9AE71
loc_9AD0D:
mov rbx, [rsp+0A8h+var_48]
movups xmmword ptr [rbx], xmm0
jmp loc_9AF75
loc_9AD1A:
lea rdi, [rsp+0A8h+var_40]
mov [rdi], r14
lea rax, [rsp+0A8h+var_68]
mov [rdi+8], rax
call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void)
lea r12, asc_CE21E+1; ""
mov r13, rsp
lea rbp, [rsp+0A8h+var_88]
lea rbx, [rsp+0A8h+var_40]
loc_9AD44:
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz loc_9AF87
lea rax, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_A8], rax
mov rdi, r13
lea rsi, asc_CE21E; ","
mov rdx, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, rbp
mov rsi, r14
mov rdx, r13
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rdi, [rsp+0A8h+var_88]; void *
mov r15, [rsp+0A8h+var_80]
lea rax, [rsp+0A8h+var_78]
cmp rdi, rax
jz short loc_9ADA1
mov rsi, [rsp+0A8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9ADA1:
mov rdi, [rsp+0A8h+var_A8]; void *
lea rax, [rsp+0A8h+var_98]
cmp rdi, rax
jz short loc_9ADBC
mov rsi, [rsp+0A8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9ADBC:
test r15, r15
jz short loc_9ADCE
mov rdi, rbx
call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void)
jmp loc_9AD44
loc_9ADCE:
mov rdi, rsp
lea rax, [rsp+0A8h+var_98]
mov [rdi], rax
lea rsi, aResponseHelloW+2Ch; "}"
lea rdx, aResponseHelloW+2Dh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0A8h+var_88]
mov rdx, rsp
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rdi, [rsp+0A8h+var_88]; void *
mov rbx, [rsp+0A8h+var_80]
lea rax, [rsp+0A8h+var_78]
cmp rdi, rax
jz short loc_9AE22
mov rsi, [rsp+0A8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AE22:
mov rdi, [rsp+0A8h+var_A8]; void *
lea rax, [rsp+0A8h+var_98]
cmp rdi, rax
jz short loc_9AE3D
mov rsi, [rsp+0A8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AE3D:
test rbx, rbx
jz loc_9AFB9
mov rax, [r14]
mov [rsp+0A8h+var_88], rax
mov rax, [r14+8]
mov [rsp+0A8h+var_80], rax
test rax, rax
jz short loc_9AE92
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_9AE8E
inc dword ptr [rax+8]
jmp short loc_9AE92
loc_9AE6D:
lock inc dword ptr [rax+8]
loc_9AE71:
lea r15, [rsp+0A8h+var_80]
mov rbx, [r14+20h]
sub rbx, [r14+10h]
mov [r15+8], rbx
mov edi, 48h ; 'H'; unsigned __int64
call __Znwm; operator new(ulong)
jmp short loc_9AEAD
loc_9AE8E:
lock inc dword ptr [rax+8]
loc_9AE92:
lea r15, [rsp+0A8h+var_80]
mov rbx, [r14+20h]
sub rbx, [r14+10h]
mov [r15+8], rbx
mov edi, 48h ; 'H'; unsigned __int64
call __Znwm; operator new(ulong)
loc_9AEAD:
lea rdi, [rsp+0A8h+var_A0]
mov rcx, 100000001h
mov [rax+8], rcx
lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja8DictExprESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
add rcx, 10h
mov [rax], rcx
mov rcx, rax
add rcx, 10h
lea rdx, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rdx, 10h
mov [rax+10h], rdx
mov rdx, [rsp+0A8h+var_88]
mov [rax+18h], rdx
mov rdx, [rsp+0A8h+var_80]
mov [rax+20h], rdx
test rdx, rdx
jz short loc_9AF15
mov rsi, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rsi], 0
jz short loc_9AF0C
inc dword ptr [rdx+8]
jmp short loc_9AF15
loc_9AF0C:
lock inc dword ptr [rdx+8]
mov rbx, [rsp+0A8h+var_78]
loc_9AF15:
mov [rax+28h], rbx
lea rdx, _ZTVN5minja8DictExprE; `vtable for'minja::DictExpr
add rdx, 10h
mov [rax+10h], rdx
movaps xmm0, [rsp+0A8h+var_68]
movups xmmword ptr [rax+30h], xmm0
mov rdx, [rsp+0A8h+var_58]
mov [rax+40h], rdx
xor edx, edx
mov [rsp+0A8h+var_58], rdx
xorps xmm0, xmm0
movaps [rsp+0A8h+var_68], xmm0
mov rbx, [rsp+0A8h+var_48]
mov [rbx], rcx
mov [rsp+0A8h+var_A0], rdx
mov [rbx+8], rax
mov [rsp+0A8h+var_A8], rdx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0A8h+var_68]
call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector()
loc_9AF75:
mov rax, rbx
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9AF87:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedClosin_5; "Expected closing brace"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_9AFA3:
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_9AFB9:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedCommaO_0; "Expected comma or closing brace in dict"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_9AFA3
jmp short loc_9B015
jmp short loc_9AFDF
jmp short loc_9B03B
jmp short loc_9B026
loc_9AFDF:
mov rbx, rax
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_9B029
jmp short loc_9B03B
jmp short loc_9B026
mov rbx, rax
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_9B033
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9B033
mov rbx, rax
jmp short loc_9B033
loc_9B015:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_9B029
jmp short loc_9B026
jmp short $+2
loc_9B026:
mov rbx, rax
loc_9B029:
lea rdi, [rsp+arg_38]
call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector()
loc_9B033:
mov rdi, rbx
call __Unwind_Resume
loc_9B03B:
mov rbx, rax
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_9B029
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9B029
| minja::Parser * minja::Parser::parseDictionary(minja::Parser *this, long long a2)
{
volatile signed __int32 *v2; // rbx
volatile signed __int32 *v3; // rbx
volatile signed __int32 *v4; // rax
minja::Parser *v5; // rbx
volatile signed __int32 *v6; // r15
volatile signed __int32 *v7; // rbx
volatile signed __int32 *v8; // rax
long long v9; // rbx
long long v10; // rax
volatile signed __int32 *v11; // rdx
std::runtime_error *exception; // r14
void *v14; // [rsp+0h] [rbp-A8h] BYREF
volatile signed __int32 *v15; // [rsp+8h] [rbp-A0h] BYREF
_QWORD v16[2]; // [rsp+10h] [rbp-98h] BYREF
void *v17; // [rsp+20h] [rbp-88h] BYREF
volatile signed __int32 *v18; // [rsp+28h] [rbp-80h] BYREF
_QWORD v19[2]; // [rsp+30h] [rbp-78h] BYREF
__int128 v20; // [rsp+40h] [rbp-68h] BYREF
long long v21; // [rsp+50h] [rbp-58h]
minja::Parser *v22; // [rsp+60h] [rbp-48h]
long long v23; // [rsp+68h] [rbp-40h]
__int128 *v24; // [rsp+70h] [rbp-38h]
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "{", (long long)"");
v22 = this;
minja::Parser::consumeToken(&v17, a2, (_BYTE **)&v14, 1u);
v2 = v18;
if ( v17 != v19 )
operator delete(v17, v19[0] + 1LL);
if ( v14 != v16 )
operator delete(v14, v16[0] + 1LL);
if ( !v2 )
{
v5 = v22;
*(_OWORD *)v22 = 0LL;
return v5;
}
v20 = 0LL;
v21 = 0LL;
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "}", (long long)"");
minja::Parser::consumeToken(&v17, a2, (_BYTE **)&v14, 1u);
v3 = v18;
if ( v17 != v19 )
operator delete(v17, v19[0] + 1LL);
if ( v14 != v16 )
operator delete(v14, v16[0] + 1LL);
if ( v3 )
{
v17 = *(void **)a2;
v4 = *(volatile signed __int32 **)(a2 + 8);
v18 = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v4 + 2);
else
_InterlockedIncrement(v4 + 2);
}
goto LABEL_34;
}
v23 = a2;
v24 = &v20;
minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0);
while ( 1 )
{
if ( *(_QWORD *)(a2 + 32) == *(_QWORD *)(a2 + 24) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected closing brace");
goto LABEL_41;
}
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, ",", (long long)"");
minja::Parser::consumeToken(&v17, a2, (_BYTE **)&v14, 1u);
v6 = v18;
if ( v17 != v19 )
operator delete(v17, v19[0] + 1LL);
if ( v14 != v16 )
operator delete(v14, v16[0] + 1LL);
if ( !v6 )
break;
minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0);
}
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "}", (long long)"");
minja::Parser::consumeToken(&v17, a2, (_BYTE **)&v14, 1u);
v7 = v18;
if ( v17 != v19 )
operator delete(v17, v19[0] + 1LL);
if ( v14 != v16 )
operator delete(v14, v16[0] + 1LL);
if ( !v7 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected comma or closing brace in dictionary");
LABEL_41:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v17 = *(void **)a2;
v8 = *(volatile signed __int32 **)(a2 + 8);
v18 = v8;
if ( v8 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v8 + 2);
else
_InterlockedIncrement(v8 + 2);
}
LABEL_34:
v9 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16);
v19[0] = v9;
v10 = operator new(0x48uLL);
*(_QWORD *)(v10 + 8) = 0x100000001LL;
*(_QWORD *)v10 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
+ 2;
*(_QWORD *)(v10 + 16) = &`vtable for'minja::Expression + 2;
*(_QWORD *)(v10 + 24) = v17;
v11 = v18;
*(_QWORD *)(v10 + 32) = v18;
if ( v11 )
{
if ( _libc_single_threaded )
{
++*((_DWORD *)v11 + 2);
}
else
{
_InterlockedIncrement(v11 + 2);
v9 = v19[0];
}
}
*(_QWORD *)(v10 + 40) = v9;
*(_QWORD *)(v10 + 16) = &`vtable for'minja::DictExpr + 2;
*(_OWORD *)(v10 + 48) = v20;
*(_QWORD *)(v10 + 64) = v21;
v21 = 0LL;
v20 = 0LL;
v5 = v22;
*(_QWORD *)v22 = v10 + 16;
v15 = 0LL;
*((_QWORD *)v5 + 1) = v10;
v14 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v18);
std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector(&v20);
return v5;
}
| parseDictionary:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX + -0x10],RAX
LAB_0019abe3:
LEA RSI,[0x1cbed4]
LEA RDX,[0x1cbed5]
MOV RDI,RSP
CALL 0x0013fe82
LAB_0019abf9:
MOV qword ptr [RSP + 0x60],RBX
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
MOV RSI,R14
MOV ECX,0x1
CALL 0x00194e1c
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
MOV RBX,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x0019ac32
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011c110
LAB_0019ac32:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0019ac4d
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011c110
LAB_0019ac4d:
XORPS XMM0,XMM0
TEST RBX,RBX
JZ 0x0019ad0d
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV qword ptr [RSP + 0x50],0x0
MOV RDI,RSP
LEA RAX,[RSP + 0x10]
MOV qword ptr [RDI],RAX
LAB_0019ac72:
LEA RSI,[0x1c7545]
LEA RDX,[0x1c7546]
CALL 0x0013fe82
LAB_0019ac85:
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
MOV RSI,R14
MOV ECX,0x1
CALL 0x00194e1c
MOV RDI,qword ptr [RSP + 0x20]
MOV RBX,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x0019acbb
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011c110
LAB_0019acbb:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0019acd6
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011c110
LAB_0019acd6:
TEST RBX,RBX
JZ 0x0019ad1a
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x28],RAX
TEST RAX,RAX
JZ 0x0019ae71
MOV RCX,qword ptr [0x001fff90]
CMP byte ptr [RCX],0x0
JZ 0x0019ae6d
INC dword ptr [RAX + 0x8]
JMP 0x0019ae71
LAB_0019ad0d:
MOV RBX,qword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x0019af75
LAB_0019ad1a:
LEA RDI,[RSP + 0x68]
MOV qword ptr [RDI],R14
LEA RAX,[RSP + 0x40]
MOV qword ptr [RDI + 0x8],RAX
LAB_0019ad2b:
CALL 0x0019bfbe
LEA R12,[0x1ce21f]
MOV R13,RSP
LEA RBP,[RSP + 0x20]
LEA RBX,[RSP + 0x68]
LAB_0019ad44:
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x0019af87
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
LAB_0019ad5b:
MOV RDI,R13
LEA RSI,[0x1ce21e]
MOV RDX,R12
CALL 0x0013fe82
LAB_0019ad6d:
MOV RDI,RBP
MOV RSI,R14
MOV RDX,R13
MOV ECX,0x1
CALL 0x00194e1c
MOV RDI,qword ptr [RSP + 0x20]
MOV R15,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x0019ada1
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011c110
LAB_0019ada1:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0019adbc
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011c110
LAB_0019adbc:
TEST R15,R15
JZ 0x0019adce
LAB_0019adc1:
MOV RDI,RBX
CALL 0x0019bfbe
JMP 0x0019ad44
LAB_0019adce:
MOV RDI,RSP
LEA RAX,[RSP + 0x10]
MOV qword ptr [RDI],RAX
LAB_0019add9:
LEA RSI,[0x1c7545]
LEA RDX,[0x1c7546]
CALL 0x0013fe82
LAB_0019adec:
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
MOV RSI,R14
MOV ECX,0x1
CALL 0x00194e1c
MOV RDI,qword ptr [RSP + 0x20]
MOV RBX,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x0019ae22
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011c110
LAB_0019ae22:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0019ae3d
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011c110
LAB_0019ae3d:
TEST RBX,RBX
JZ 0x0019afb9
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x28],RAX
TEST RAX,RAX
JZ 0x0019ae92
MOV RCX,qword ptr [0x001fff90]
CMP byte ptr [RCX],0x0
JZ 0x0019ae8e
INC dword ptr [RAX + 0x8]
JMP 0x0019ae92
LAB_0019ae6d:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019ae71:
LEA R15,[RSP + 0x28]
MOV RBX,qword ptr [R14 + 0x20]
SUB RBX,qword ptr [R14 + 0x10]
MOV qword ptr [R15 + 0x8],RBX
LAB_0019ae82:
MOV EDI,0x48
CALL 0x0011c160
JMP 0x0019aead
LAB_0019ae8e:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019ae92:
LEA R15,[RSP + 0x28]
MOV RBX,qword ptr [R14 + 0x20]
SUB RBX,qword ptr [R14 + 0x10]
MOV qword ptr [R15 + 0x8],RBX
LAB_0019aea3:
MOV EDI,0x48
CALL 0x0011c160
LAB_0019aead:
LEA RDI,[RSP + 0x8]
MOV RCX,0x100000001
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x1febd0]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV RCX,RAX
ADD RCX,0x10
LEA RDX,[0x1fea20]
ADD RDX,0x10
MOV qword ptr [RAX + 0x10],RDX
MOV RDX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x18],RDX
MOV RDX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x20],RDX
TEST RDX,RDX
JZ 0x0019af15
MOV RSI,qword ptr [0x001fff90]
CMP byte ptr [RSI],0x0
JZ 0x0019af0c
INC dword ptr [RDX + 0x8]
JMP 0x0019af15
LAB_0019af0c:
INC.LOCK dword ptr [RDX + 0x8]
MOV RBX,qword ptr [RSP + 0x30]
LAB_0019af15:
MOV qword ptr [RAX + 0x28],RBX
LEA RDX,[0x1fec20]
ADD RDX,0x10
MOV qword ptr [RAX + 0x10],RDX
MOVAPS XMM0,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RAX + 0x30],XMM0
MOV RDX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x40],RDX
XOR EDX,EDX
MOV qword ptr [RSP + 0x50],RDX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV RBX,qword ptr [RSP + 0x60]
MOV qword ptr [RBX],RCX
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RSP],RDX
CALL 0x00134564
MOV RDI,R15
CALL 0x00134564
LEA RDI,[RSP + 0x40]
CALL 0x0019c1ea
LAB_0019af75:
MOV RAX,RBX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019af87:
MOV EDI,0x10
CALL 0x0011c460
MOV R14,RAX
LAB_0019af94:
LEA RSI,[0x1ce33a]
MOV RDI,RAX
CALL 0x0011c280
LAB_0019afa3:
MOV RSI,qword ptr [0x001fffb8]
MOV RDX,qword ptr [0x001fff78]
MOV RDI,R14
CALL 0x0011c7b0
LAB_0019afb9:
MOV EDI,0x10
CALL 0x0011c460
MOV R14,RAX
LAB_0019afc6:
LEA RSI,[0x1ce30c]
MOV RDI,RAX
CALL 0x0011c280
LAB_0019afd5:
JMP 0x0019afa3
|
/* minja::Parser::parseDictionary() */
int8 * minja::Parser::parseDictionary(void)
{
int8 *puVar1;
runtime_error *this;
long lVar2;
int8 *in_RSI;
int8 *in_RDI;
long *local_a8;
int8 local_a0;
long local_98 [2];
long *local_88;
long local_80;
long local_78 [2];
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 *local_48;
_lambda___1_ local_40 [8];
int8 *local_38;
local_a8 = local_98;
/* try { // try from 0019abe3 to 0019abf8 has its CatchHandler @ 0019b010 */
std::__cxx11::string::_M_construct<char_const*>(&local_a8,&DAT_001cbed4,&DAT_001cbed5);
/* try { // try from 0019abf9 to 0019ac12 has its CatchHandler @ 0019aff0 */
local_48 = in_RDI;
consumeToken(&local_88);
lVar2 = local_80;
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
if (local_a8 != local_98) {
operator_delete(local_a8,local_98[0] + 1);
}
if (lVar2 == 0) {
*local_48 = 0;
local_48[1] = 0;
}
else {
local_68 = 0;
uStack_60 = 0;
local_58 = 0;
local_a8 = local_98;
/* try { // try from 0019ac72 to 0019ac84 has its CatchHandler @ 0019afee */
std::__cxx11::string::_M_construct<char_const*>(&local_a8,"}","");
/* try { // try from 0019ac85 to 0019ac99 has its CatchHandler @ 0019afec */
consumeToken(&local_88);
lVar2 = local_80;
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
if (local_a8 != local_98) {
operator_delete(local_a8,local_98[0] + 1);
}
if (lVar2 == 0) {
local_38 = &local_68;
/* try { // try from 0019ad2b to 0019ad2f has its CatchHandler @ 0019b022 */
parseDictionary()::{lambda()#1}::operator()(local_40);
do {
if (in_RSI[4] == in_RSI[3]) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019af94 to 0019afa2 has its CatchHandler @ 0019b015 */
std::runtime_error::runtime_error(this,"Expected closing brace");
LAB_0019afa3:
/* try { // try from 0019afa3 to 0019afb8 has its CatchHandler @ 0019b022 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78);
}
local_a8 = local_98;
/* try { // try from 0019ad5b to 0019ad6c has its CatchHandler @ 0019b026 */
std::__cxx11::string::_M_construct<char_const*>(&local_a8,&DAT_001ce21e,&DAT_001ce21f);
/* try { // try from 0019ad6d to 0019ad7f has its CatchHandler @ 0019b03b */
consumeToken(&local_88);
lVar2 = local_80;
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
if (local_a8 != local_98) {
operator_delete(local_a8,local_98[0] + 1);
}
if (lVar2 == 0) {
local_a8 = local_98;
/* try { // try from 0019add9 to 0019adeb has its CatchHandler @ 0019afdd */
std::__cxx11::string::_M_construct<char_const*>(&local_a8,"}","");
/* try { // try from 0019adec to 0019ae00 has its CatchHandler @ 0019afdb */
consumeToken(&local_88);
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
if (local_a8 != local_98) {
operator_delete(local_a8,local_98[0] + 1);
}
if (local_80 == 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019afc6 to 0019afd4 has its CatchHandler @ 0019afd7 */
std::runtime_error::runtime_error(this,"Expected comma or closing brace in dictionary");
goto LAB_0019afa3;
}
local_88 = (long *)*in_RSI;
local_80 = in_RSI[1];
if (local_80 != 0) {
if (*PTR___libc_single_threaded_001fff90 == '\0') {
LOCK();
*(int *)(local_80 + 8) = *(int *)(local_80 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_80 + 8) = *(int *)(local_80 + 8) + 1;
}
}
lVar2 = in_RSI[4] - in_RSI[2];
local_78[0] = lVar2;
/* try { // try from 0019aea3 to 0019aeac has its CatchHandler @ 0019afd9 */
puVar1 = (int8 *)operator_new(0x48);
goto LAB_0019aead;
}
/* try { // try from 0019adc1 to 0019adc8 has its CatchHandler @ 0019b024 */
parseDictionary()::{lambda()#1}::operator()(local_40);
} while( true );
}
local_88 = (long *)*in_RSI;
local_80 = in_RSI[1];
if (local_80 != 0) {
if (*PTR___libc_single_threaded_001fff90 == '\0') {
LOCK();
*(int *)(local_80 + 8) = *(int *)(local_80 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_80 + 8) = *(int *)(local_80 + 8) + 1;
}
}
lVar2 = in_RSI[4] - in_RSI[2];
local_78[0] = lVar2;
/* try { // try from 0019ae82 to 0019ae8b has its CatchHandler @ 0019afdf */
puVar1 = (int8 *)operator_new(0x48);
LAB_0019aead:
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_base_001febe0;
puVar1[2] = &PTR___cxa_pure_virtual_001fea30;
puVar1[3] = local_88;
puVar1[4] = local_80;
if (local_80 != 0) {
if (*PTR___libc_single_threaded_001fff90 == '\0') {
LOCK();
*(int *)(local_80 + 8) = *(int *)(local_80 + 8) + 1;
UNLOCK();
lVar2 = local_78[0];
}
else {
*(int *)(local_80 + 8) = *(int *)(local_80 + 8) + 1;
}
}
puVar1[5] = lVar2;
puVar1[2] = &PTR_do_evaluate_001fec30;
puVar1[6] = local_68;
puVar1[7] = uStack_60;
puVar1[8] = local_58;
local_58 = 0;
local_68 = 0;
uStack_60 = 0;
*local_48 = puVar1 + 2;
local_a0 = 0;
local_48[1] = puVar1;
local_a8 = (long *)0x0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_a0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_80);
std::
vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>
::~vector((vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>
*)&local_68);
}
return local_48;
}
| |
48,890 | my_wc_mb_8bit | eloqsql/strings/ctype-simple.c | int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc,
uchar *str,
uchar *end)
{
MY_UNI_IDX *idx;
if (str >= end)
return MY_CS_TOOSMALL;
for (idx=cs->tab_from_uni; idx->tab ; idx++)
{
if (idx->from <= wc && idx->to >= wc)
{
str[0]= idx->tab[wc - idx->from];
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
}
}
return MY_CS_ILUNI;
} | O0 | c | my_wc_mb_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x45eaa
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x45f43
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x45f3c
movq -0x30(%rbp), %rax
movzwl (%rax), %eax
cmpq -0x18(%rbp), %rax
ja 0x45f29
movq -0x30(%rbp), %rax
movzwl 0x2(%rax), %eax
cmpq -0x18(%rbp), %rax
jb 0x45f29
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rdx
movzwl (%rdx), %edx
subq %rdx, %rcx
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x31(%rbp)
jne 0x45f14
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x45f43
jmp 0x45f2b
movq -0x30(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x30(%rbp)
jmp 0x45eb6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_wc_mb_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_45EAA
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_45F43
loc_45EAA:
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov [rbp+var_30], rax
loc_45EB6:
mov rax, [rbp+var_30]
cmp qword ptr [rax+8], 0
jz short loc_45F3C
mov rax, [rbp+var_30]
movzx eax, word ptr [rax]
cmp rax, [rbp+var_18]
ja short loc_45F29
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+2]
cmp rax, [rbp+var_18]
jb short loc_45F29
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rcx, [rbp+var_18]
mov rdx, [rbp+var_30]
movzx edx, word ptr [rdx]
sub rcx, rdx
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov [rax], cl
mov rcx, [rbp+var_20]
xor eax, eax
cmp byte ptr [rcx], 0
mov [rbp+var_31], al
jnz short loc_45F14
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_31], al
loc_45F14:
mov dl, [rbp+var_31]
mov eax, 1
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_45F43
loc_45F29:
jmp short $+2
loc_45F2B:
mov rax, [rbp+var_30]
add rax, 10h
mov [rbp+var_30], rax
jmp loc_45EB6
loc_45F3C:
mov [rbp+var_4], 0
loc_45F43:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_8bit(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
bool v5; // [rsp+1h] [rbp-31h]
unsigned __int16 *i; // [rsp+2h] [rbp-30h]
if ( (unsigned long long)a3 < a4 )
{
for ( i = *(unsigned __int16 **)(a1 + 112); ; i += 8 )
{
if ( !*((_QWORD *)i + 1) )
return 0;
if ( *i <= a2 && i[1] >= a2 )
break;
}
*a3 = *(_BYTE *)(*((_QWORD *)i + 1) + a2 - *i);
v5 = 0;
if ( !*a3 )
v5 = a2 != 0;
return !v5;
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00145eaa
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00145f43
LAB_00145eaa:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV qword ptr [RBP + -0x30],RAX
LAB_00145eb6:
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00145f3c
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x00145f29
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x2]
CMP RAX,qword ptr [RBP + -0x18]
JC 0x00145f29
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOVZX EDX,word ptr [RDX]
SUB RCX,RDX
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
CMP byte ptr [RCX],0x0
MOV byte ptr [RBP + -0x31],AL
JNZ 0x00145f14
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_00145f14:
MOV DL,byte ptr [RBP + -0x31]
MOV EAX,0x1
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00145f43
LAB_00145f29:
JMP 0x00145f2b
LAB_00145f2b:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x10
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00145eb6
LAB_00145f3c:
MOV dword ptr [RBP + -0x4],0x0
LAB_00145f43:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint my_wc_mb_8bit(long param_1,ulong param_2,char *param_3,char *param_4)
{
ushort *local_38;
uint local_c;
if (param_3 < param_4) {
for (local_38 = *(ushort **)(param_1 + 0x70); *(long *)(local_38 + 4) != 0;
local_38 = local_38 + 8) {
if ((*local_38 <= param_2) && (param_2 <= local_38[1])) {
*param_3 = *(char *)(*(long *)(local_38 + 4) + (param_2 - *local_38));
return (uint)(*param_3 != '\0' || param_2 == 0);
}
}
local_c = 0;
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
48,891 | common_chat_format_name[abi:cxx11](common_chat_format) | monkey531[P]llama/common/chat.cpp | std::string common_chat_format_name(common_chat_format format) {
switch (format) {
case COMMON_CHAT_FORMAT_CONTENT_ONLY: return "Content-only";
case COMMON_CHAT_FORMAT_GENERIC: return "Generic";
case COMMON_CHAT_FORMAT_MISTRAL_NEMO: return "Mistral Nemo";
case COMMON_CHAT_FORMAT_LLAMA_3_X: return "Llama 3.x";
case COMMON_CHAT_FORMAT_LLAMA_3_X_WITH_BUILTIN_TOOLS: return "Llama 3.x with builtin tools";
case COMMON_CHAT_FORMAT_DEEPSEEK_R1: return "DeepSeek R1";
case COMMON_CHAT_FORMAT_FIREFUNCTION_V2: return "FireFunction v2";
case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: return "Functionary v3.2";
case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1: return "Functionary v3.1 Llama 3.1";
case COMMON_CHAT_FORMAT_HERMES_2_PRO: return "Hermes 2 Pro";
case COMMON_CHAT_FORMAT_COMMAND_R7B: return "Command R7B";
default:
throw std::runtime_error("Unknown chat format");
}
} | O1 | cpp | common_chat_format_name[abi:cxx11](common_chat_format):
pushq %r14
pushq %rbx
pushq %rax
cmpl $0xa, %esi
ja 0xcf74f
movq %rdi, %rbx
movl %esi, %eax
leaq 0x26dbb(%rip), %rcx # 0xf63e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x27dec(%rip), %rsi # 0xf742c
leaq 0x27df1(%rip), %rdx # 0xf7438
jmp 0xcf73c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x27dfe(%rip), %rsi # 0xf7458
leaq 0x27e13(%rip), %rdx # 0xf7474
jmp 0xcf73c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x27e49(%rip), %rsi # 0xf74bd
leaq 0x27e4e(%rip), %rdx # 0xf74c9
jmp 0xcf73c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x27db3(%rip), %rsi # 0xf7441
leaq 0x27db8(%rip), %rdx # 0xf744d
jmp 0xcf73c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x27da6(%rip), %rsi # 0xf744e
leaq 0x27da8(%rip), %rdx # 0xf7457
jmp 0xcf73c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x27dcf(%rip), %rsi # 0xf7491
leaq 0x27dd8(%rip), %rdx # 0xf74a1
jmp 0xcf73c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x27d60(%rip), %rsi # 0xf7439
leaq 0x27d60(%rip), %rdx # 0xf7440
jmp 0xcf73c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x27d85(%rip), %rsi # 0xf7475
leaq 0x27d89(%rip), %rdx # 0xf7480
jmp 0xcf73c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x27d7a(%rip), %rsi # 0xf7481
leaq 0x27d82(%rip), %rdx # 0xf7490
jmp 0xcf73c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x27dac(%rip), %rsi # 0xf74ca
leaq 0x27db0(%rip), %rdx # 0xf74d5
jmp 0xcf73c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x27d6d(%rip), %rsi # 0xf74a2
leaq 0x27d80(%rip), %rdx # 0xf74bc
movq %rbx, %rdi
callq 0x21530
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x1a430
movq %rax, %rbx
leaq 0x27d73(%rip), %rsi # 0xf74d6
movq %rax, %rdi
callq 0x1a310
movq 0x5c876(%rip), %rsi # 0x12bfe8
movq 0x5c7df(%rip), %rdx # 0x12bf58
movq %rbx, %rdi
callq 0x1aea0
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a640
movq %r14, %rdi
callq 0x1af20
| _Z23common_chat_format_nameB5cxx1118common_chat_format:
push r14
push rbx
push rax
cmp esi, 0Ah; switch 11 cases
ja def_CF630; jumptable 00000000000CF630 default case
mov rbx, rdi
mov eax, esi
lea rcx, jpt_CF630
movsxd rax, ds:(jpt_CF630 - 0F63E4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_CF632:
lea rax, [rbx+10h]; jumptable 00000000000CF630 case 0
mov [rbx], rax
lea rsi, aContentOnly; "Content-only"
lea rdx, aContentOnly+0Ch; ""
jmp loc_CF73C
loc_CF64C:
lea rax, [rbx+10h]; jumptable 00000000000CF630 case 4
mov [rbx], rax
lea rsi, aLlama3XWithBui; "Llama 3.x with builtin tools"
lea rdx, aLlama3XWithBui+1Ch; ""
jmp loc_CF73C
loc_CF666:
lea rax, [rbx+10h]; jumptable 00000000000CF630 case 9
mov [rbx], rax
lea rsi, aHermes2Pro; "Hermes 2 Pro"
lea rdx, aHermes2Pro+0Ch; ""
jmp loc_CF73C
loc_CF680:
lea rax, [rbx+10h]; jumptable 00000000000CF630 case 2
mov [rbx], rax
lea rsi, aMistralNemo; "Mistral Nemo"
lea rdx, aMistralNemo+0Ch; ""
jmp loc_CF73C
loc_CF69A:
lea rax, [rbx+10h]; jumptable 00000000000CF630 case 3
mov [rbx], rax
lea rsi, aLlama3X; "Llama 3.x"
lea rdx, aLlama3X+9; ""
jmp loc_CF73C
loc_CF6B4:
lea rax, [rbx+10h]; jumptable 00000000000CF630 case 7
mov [rbx], rax
lea rsi, aFunctionaryV32; "Functionary v3.2"
lea rdx, aFunctionaryV32+10h; ""
jmp short loc_CF73C
loc_CF6CB:
lea rax, [rbx+10h]; jumptable 00000000000CF630 case 1
mov [rbx], rax
lea rsi, aGeneric; "Generic"
lea rdx, aGeneric+7; ""
jmp short loc_CF73C
loc_CF6E2:
lea rax, [rbx+10h]; jumptable 00000000000CF630 case 5
mov [rbx], rax
lea rsi, aDeepseekR1; "DeepSeek R1"
lea rdx, aDeepseekR1+0Bh; ""
jmp short loc_CF73C
loc_CF6F9:
lea rax, [rbx+10h]; jumptable 00000000000CF630 case 6
mov [rbx], rax
lea rsi, aFirefunctionV2; "FireFunction v2"
lea rdx, aFirefunctionV2+0Fh; ""
jmp short loc_CF73C
loc_CF710:
lea rax, [rbx+10h]; jumptable 00000000000CF630 case 10
mov [rbx], rax
lea rsi, aCommandR7b; "Command R7B"
lea rdx, aCommandR7b+0Bh; ""
jmp short loc_CF73C
loc_CF727:
lea rax, [rbx+10h]; jumptable 00000000000CF630 case 8
mov [rbx], rax
lea rsi, aFunctionaryV31; "Functionary v3.1 Llama 3.1"
lea rdx, aFunctionaryV31+1Ah; ""
loc_CF73C:
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
def_CF630:
mov edi, 10h; jumptable 00000000000CF630 default case
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUnknownChatFor; "Unknown chat format"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| _QWORD * common_chat_format_name[abi:cxx11](_QWORD *a1, int a2)
{
char *v2; // rsi
char *v3; // rdx
std::runtime_error *exception; // rbx
switch ( a2 )
{
case 0:
*a1 = a1 + 2;
v2 = "Content-only";
v3 = "";
break;
case 1:
*a1 = a1 + 2;
v2 = "Generic";
v3 = "";
break;
case 2:
*a1 = a1 + 2;
v2 = "Mistral Nemo";
v3 = "";
break;
case 3:
*a1 = a1 + 2;
v2 = "Llama 3.x";
v3 = "";
break;
case 4:
*a1 = a1 + 2;
v2 = "Llama 3.x with builtin tools";
v3 = "";
break;
case 5:
*a1 = a1 + 2;
v2 = "DeepSeek R1";
v3 = "";
break;
case 6:
*a1 = a1 + 2;
v2 = "FireFunction v2";
v3 = "";
break;
case 7:
*a1 = a1 + 2;
v2 = "Functionary v3.2";
v3 = "";
break;
case 8:
*a1 = a1 + 2;
v2 = "Functionary v3.1 Llama 3.1";
v3 = "";
break;
case 9:
*a1 = a1 + 2;
v2 = "Hermes 2 Pro";
v3 = "";
break;
case 10:
*a1 = a1 + 2;
v2 = "Command R7B";
v3 = "";
break;
default:
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Unknown chat format");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
std::string::_M_construct<char const*>(a1, v2, (long long)v3);
return a1;
}
| common_chat_format_name[abi:cxx11]:
PUSH R14
PUSH RBX
PUSH RAX
CMP ESI,0xa
JA 0x001cf74f
MOV RBX,RDI
MOV EAX,ESI
LEA RCX,[0x1f63e4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1f742c]
LEA RDX,[0x1f7438]
JMP 0x001cf73c
caseD_4:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1f7458]
LEA RDX,[0x1f7474]
JMP 0x001cf73c
caseD_9:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1f74bd]
LEA RDX,[0x1f74c9]
JMP 0x001cf73c
caseD_2:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1f7441]
LEA RDX,[0x1f744d]
JMP 0x001cf73c
caseD_3:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1f744e]
LEA RDX,[0x1f7457]
JMP 0x001cf73c
caseD_7:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1f7491]
LEA RDX,[0x1f74a1]
JMP 0x001cf73c
caseD_1:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1f7439]
LEA RDX,[0x1f7440]
JMP 0x001cf73c
caseD_5:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1f7475]
LEA RDX,[0x1f7480]
JMP 0x001cf73c
caseD_6:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1f7481]
LEA RDX,[0x1f7490]
JMP 0x001cf73c
caseD_a:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1f74ca]
LEA RDX,[0x1f74d5]
JMP 0x001cf73c
caseD_8:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1f74a2]
LEA RDX,[0x1f74bc]
LAB_001cf73c:
MOV RDI,RBX
CALL 0x00121530
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
default:
MOV EDI,0x10
CALL 0x0011a430
MOV RBX,RAX
LAB_001cf75c:
LEA RSI,[0x1f74d6]
MOV RDI,RAX
CALL 0x0011a310
LAB_001cf76b:
MOV RSI,qword ptr [0x0022bfe8]
MOV RDX,qword ptr [0x0022bf58]
MOV RDI,RBX
CALL 0x0011aea0
|
/* common_chat_format_name[abi:cxx11](common_chat_format) */
long * common_chat_format_name_abi_cxx11_(long *param_1,int4 param_2)
{
runtime_error *this;
char *pcVar1;
char *pcVar2;
switch(param_2) {
case 0:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Content-only";
pcVar1 = "";
break;
case 1:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Generic";
pcVar1 = "";
break;
case 2:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Mistral Nemo";
pcVar1 = "";
break;
case 3:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Llama 3.x";
pcVar1 = "";
break;
case 4:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Llama 3.x with builtin tools";
pcVar1 = "";
break;
case 5:
*param_1 = (long)(param_1 + 2);
pcVar2 = "DeepSeek R1";
pcVar1 = "";
break;
case 6:
*param_1 = (long)(param_1 + 2);
pcVar2 = "FireFunction v2";
pcVar1 = "";
break;
case 7:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Functionary v3.2";
pcVar1 = "";
break;
case 8:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Functionary v3.1 Llama 3.1";
pcVar1 = "";
break;
case 9:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Hermes 2 Pro";
pcVar1 = "";
break;
case 10:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Command R7B";
pcVar1 = "";
break;
default:
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001cf75c to 001cf76a has its CatchHandler @ 001cf781 */
std::runtime_error::runtime_error(this,"Unknown chat format");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022bfe8,PTR__runtime_error_0022bf58);
}
std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar2,pcVar1);
return param_1;
}
| |
48,892 | ma_invalidate_stmts | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void ma_invalidate_stmts(MYSQL *mysql, const char *function_name)
{
if (mysql->stmts)
{
LIST *li_stmt= mysql->stmts;
for (; li_stmt; li_stmt= li_stmt->next)
{
MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data;
stmt->mysql= NULL;
SET_CLIENT_STMT_ERROR(stmt, CR_STMT_CLOSED, SQLSTATE_UNKNOWN, function_name);
}
mysql->stmts= NULL;
}
} | O0 | c | ma_invalidate_stmts:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x4c8(%rax)
je 0x44b8c
movq -0x8(%rbp), %rax
movq 0x4c8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x44b7d
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x20(%rbp), %rax
movl $0x808, 0x108(%rax) # imm = 0x808
movq -0x20(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x1f2c4c(%rip), %rax # 0x237750
movq (%rax), %rsi
movl $0x5, %edx
callq 0x37150
movq -0x20(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x20(%rbp), %rax
addq $0x10c, %rax # imm = 0x10C
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x44b3b
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x44b4d
leaq 0x1f2c1e(%rip), %rax # 0x237760
movq 0x1c0(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x37150
movq -0x20(%rbp), %rax
movb $0x0, 0x30b(%rax)
jmp 0x44b6c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x44ac1
movq -0x8(%rbp), %rax
movq $0x0, 0x4c8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_invalidate_stmts:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
cmp qword ptr [rax+4C8h], 0
jz loc_44B8C
mov rax, [rbp+var_8]
mov rax, [rax+4C8h]
mov [rbp+var_18], rax
loc_44AC1:
cmp [rbp+var_18], 0
jz loc_44B7D
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov qword ptr [rax+38h], 0
mov rax, [rbp+var_20]
mov dword ptr [rax+108h], 808h
mov rdi, [rbp+var_20]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_20]
mov byte ptr [rax+312h], 0
mov rax, [rbp+var_20]
add rax, 10Ch
mov [rbp+var_28], rax
cmp [rbp+var_10], 0
jz short loc_44B3B
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
jmp short loc_44B4D
loc_44B3B:
lea rax, client_errors
mov rax, [rax+1C0h]
mov [rbp+var_30], rax
loc_44B4D:
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_30]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_20]
mov byte ptr [rax+30Bh], 0
jmp short $+2
loc_44B6C:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_18], rax
jmp loc_44AC1
loc_44B7D:
mov rax, [rbp+var_8]
mov qword ptr [rax+4C8h], 0
loc_44B8C:
add rsp, 30h
pop rbp
retn
| long long ma_invalidate_stmts(long long a1, long long a2)
{
long long result; // rax
long long v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
long long i; // [rsp+18h] [rbp-18h]
result = a1;
if ( *(_QWORD *)(a1 + 1224) )
{
for ( i = *(_QWORD *)(a1 + 1224); i; i = *(_QWORD *)(i + 8) )
{
v4 = *(_QWORD *)(i + 16);
*(_QWORD *)(v4 + 56) = 0LL;
*(_DWORD *)(v4 + 264) = 2056;
strncpy(v4 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(v4 + 786) = 0;
v3 = v4 + 268;
if ( a2 )
strncpy(v3, a2, 512LL);
else
strncpy(v3, client_errors[56], 512LL);
*(_BYTE *)(v4 + 779) = 0;
}
result = a1;
*(_QWORD *)(a1 + 1224) = 0LL;
}
return result;
}
| ma_invalidate_stmts:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x4c8],0x0
JZ 0x00144b8c
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x4c8]
MOV qword ptr [RBP + -0x18],RAX
LAB_00144ac1:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00144b7d
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x38],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x108],0x808
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x30d
LEA RAX,[0x337750]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x312],0x0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x10c
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00144b3b
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00144b4d
LAB_00144b3b:
LEA RAX,[0x337760]
MOV RAX,qword ptr [RAX + 0x1c0]
MOV qword ptr [RBP + -0x30],RAX
LAB_00144b4d:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x30]
MOV EDX,0x200
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x30b],0x0
JMP 0x00144b6c
LAB_00144b6c:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00144ac1
LAB_00144b7d:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x4c8],0x0
LAB_00144b8c:
ADD RSP,0x30
POP RBP
RET
|
void ma_invalidate_stmts(long param_1,char *param_2)
{
long lVar1;
int8 local_38;
int8 local_20;
if (*(long *)(param_1 + 0x4c8) != 0) {
for (local_20 = *(long *)(param_1 + 0x4c8); local_20 != 0; local_20 = *(long *)(local_20 + 8)) {
lVar1 = *(long *)(local_20 + 0x10);
*(int8 *)(lVar1 + 0x38) = 0;
*(int4 *)(lVar1 + 0x108) = 0x808;
strncpy((char *)(lVar1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(lVar1 + 0x312) = 0;
local_38 = param_2;
if (param_2 == (char *)0x0) {
local_38 = PTR_s_Server_closed_statement_due_to_a_00337920;
}
strncpy((char *)(lVar1 + 0x10c),local_38,0x200);
*(int1 *)(lVar1 + 0x30b) = 0;
}
*(int8 *)(param_1 + 0x4c8) = 0;
}
return;
}
| |
48,893 | js_parse_expect | bluesky950520[P]quickjs/quickjs.c | static int js_parse_expect(JSParseState *s, int tok)
{
char buf[ATOM_GET_STR_BUF_SIZE];
if (s->token.val == tok)
return next_token(s);
switch(s->token.val) {
case TOK_EOF:
return js_parse_error(s, "Unexpected end of input");
case TOK_NUMBER:
return js_parse_error(s, "Unexpected number");
case TOK_STRING:
return js_parse_error(s, "Unexpected string");
case TOK_TEMPLATE:
return js_parse_error(s, "Unexpected string template");
case TOK_REGEXP:
return js_parse_error(s, "Unexpected regexp");
case TOK_IDENT:
return js_parse_error(s, "Unexpected identifier '%s'",
JS_AtomGetStr(s->ctx, buf, sizeof(buf),
s->token.u.ident.atom));
case TOK_ERROR:
return js_parse_error(s, "Invalid or unexpected token");
default:
return js_parse_error(s, "Unexpected token '%.*s'",
(int)(s->buf_ptr - s->token.ptr),
(const char *)s->token.ptr);
}
} | O2 | c | js_parse_expect:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movl 0x20(%rdi), %eax
cmpl %esi, %eax
jne 0x58e07
movq %rbx, %rdi
addq $0x40, %rsp
popq %rbx
jmp 0x535fe
leal 0x80(%rax), %ecx
cmpl $0x4, %ecx
ja 0x58e2b
leaq 0x2e827(%rip), %rax # 0x87640
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x31010(%rip), %rsi # 0x89e39
jmp 0x58ea0
cmpl $-0x58, %eax
je 0x58e47
cmpl $-0x56, %eax
jne 0x58e7d
leaq 0x31bac(%rip), %rsi # 0x8a9e8
jmp 0x58ea0
leaq 0x31e72(%rip), %rsi # 0x8acb7
jmp 0x58ea0
leaq 0x31e96(%rip), %rsi # 0x8ace4
jmp 0x58ea0
leaq 0x31e45(%rip), %rsi # 0x8ac9c
jmp 0x58ea0
movq (%rbx), %rdi
movl 0x38(%rbx), %edx
movq %rsp, %rsi
callq 0x32ee5
leaq 0x31e5b(%rip), %rsi # 0x8acc9
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2c007
jmp 0x58eaa
movl 0x70(%rbx), %edx
movq 0x30(%rbx), %rcx
subl %ecx, %edx
leaq 0x31e73(%rip), %rsi # 0x8ad00
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2c007
jmp 0x58eaa
leaq 0x31dea(%rip), %rsi # 0x8ac8a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2c007
pushq $-0x1
popq %rax
addq $0x40, %rsp
popq %rbx
retq
| js_parse_expect:
push rbx
sub rsp, 40h
mov rbx, rdi
mov eax, [rdi+20h]
cmp eax, esi
jnz short loc_58E07
mov rdi, rbx
add rsp, 40h
pop rbx
jmp next_token
loc_58E07:
lea ecx, [rax+80h]; switch 5 cases
cmp ecx, 4
ja short def_58E20; jumptable 0000000000058E20 default case
lea rax, jpt_58E20
movsxd rcx, ds:(jpt_58E20 - 87640h)[rax+rcx*4]
add rcx, rax
jmp rcx; switch jump
loc_58E22:
lea rsi, aUnexpectedNumb; jumptable 0000000000058E20 case -128
jmp short loc_58EA0
def_58E20:
cmp eax, 0FFFFFFA8h; jumptable 0000000000058E20 default case
jz short loc_58E47
cmp eax, 0FFFFFFAAh
jnz short loc_58E7D
lea rsi, aUnexpectedEndO_2; "Unexpected end of input"
jmp short loc_58EA0
loc_58E3E:
lea rsi, aUnexpectedRege; jumptable 0000000000058E20 case -124
jmp short loc_58EA0
loc_58E47:
lea rsi, aInvalidOrUnexp; "Invalid or unexpected token"
jmp short loc_58EA0
loc_58E50:
lea rsi, aUnexpectedStri; jumptable 0000000000058E20 case -126
jmp short loc_58EA0
loc_58E59:
mov rdi, [rbx]; jumptable 0000000000058E20 case -125
mov edx, [rbx+38h]
mov rsi, rsp
call JS_AtomGetStr
lea rsi, aUnexpectedIden; "Unexpected identifier '%s'"
mov rdi, rbx
mov rdx, rax
xor eax, eax
call js_parse_error
jmp short loc_58EAA
loc_58E7D:
mov edx, [rbx+70h]
mov rcx, [rbx+30h]
sub edx, ecx
lea rsi, aUnexpectedToke_2; "Unexpected token '%.*s'"
mov rdi, rbx
xor eax, eax
call js_parse_error
jmp short loc_58EAA
loc_58E99:
lea rsi, aUnexpectedStri_0; jumptable 0000000000058E20 case -127
loc_58EA0:
mov rdi, rbx
xor eax, eax
call js_parse_error
loc_58EAA:
push 0FFFFFFFFFFFFFFFFh
pop rax
add rsp, 40h
pop rbx
retn
| long long js_parse_expect(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v14; // eax
long long result; // rax
const char *v16; // rsi
long long Str; // rax
long long v18; // rcx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
char v23[72]; // [rsp+0h] [rbp-48h] BYREF
v14 = *(_DWORD *)(a1 + 32);
if ( v14 == (_DWORD)a2 )
return next_token(a1, a2, a3, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6);
switch ( v14 )
{
case -128:
v16 = "Unexpected number";
goto LABEL_14;
case -127:
v16 = "Unexpected string";
goto LABEL_14;
case -126:
v16 = "Unexpected string template";
goto LABEL_14;
case -125:
Str = JS_AtomGetStr(*(_QWORD *)a1, v23, *(_DWORD *)(a1 + 56));
js_parse_error(
(long long *)a1,
(long long)"Unexpected identifier '%s'",
Str,
v18,
v19,
v20,
a7,
a8,
a9,
a10,
v21,
v22,
a13,
a14,
v23[0]);
goto LABEL_15;
case -124:
v16 = "Unexpected regexp";
goto LABEL_14;
default:
if ( v14 == -88 )
{
v16 = "Invalid or unexpected token";
}
else
{
if ( v14 != -86 )
{
js_parse_error(
(long long *)a1,
(long long)"Unexpected token '%.*s'",
*(_DWORD *)(a1 + 112) - (unsigned int)*(_QWORD *)(a1 + 48),
*(_QWORD *)(a1 + 48),
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v23[0]);
goto LABEL_15;
}
v16 = "Unexpected end of input";
}
LABEL_14:
js_parse_error(
(long long *)a1,
(long long)v16,
a3,
(unsigned int)(v14 + 128),
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v23[0]);
LABEL_15:
result = -1LL;
break;
}
return result;
}
| js_parse_expect:
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x20]
CMP EAX,ESI
JNZ 0x00158e07
MOV RDI,RBX
ADD RSP,0x40
POP RBX
JMP 0x001535fe
LAB_00158e07:
LEA ECX,[RAX + 0x80]
CMP ECX,0x4
JA 0x00158e2b
LEA RAX,[0x187640]
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_ffffff80:
LEA RSI,[0x189e39]
JMP 0x00158ea0
default:
CMP EAX,-0x58
JZ 0x00158e47
CMP EAX,-0x56
JNZ 0x00158e7d
LEA RSI,[0x18a9e8]
JMP 0x00158ea0
caseD_ffffff84:
LEA RSI,[0x18acb7]
JMP 0x00158ea0
LAB_00158e47:
LEA RSI,[0x18ace4]
JMP 0x00158ea0
caseD_ffffff82:
LEA RSI,[0x18ac9c]
JMP 0x00158ea0
caseD_ffffff83:
MOV RDI,qword ptr [RBX]
MOV EDX,dword ptr [RBX + 0x38]
MOV RSI,RSP
CALL 0x00132ee5
LEA RSI,[0x18acc9]
MOV RDI,RBX
MOV RDX,RAX
XOR EAX,EAX
CALL 0x0012c007
JMP 0x00158eaa
LAB_00158e7d:
MOV EDX,dword ptr [RBX + 0x70]
MOV RCX,qword ptr [RBX + 0x30]
SUB EDX,ECX
LEA RSI,[0x18ad00]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0012c007
JMP 0x00158eaa
caseD_ffffff81:
LEA RSI,[0x18ac8a]
LAB_00158ea0:
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0012c007
LAB_00158eaa:
PUSH -0x1
POP RAX
ADD RSP,0x40
POP RBX
RET
|
int8 js_parse_expect(int8 *param_1,int param_2)
{
int iVar1;
int8 uVar2;
char *pcVar3;
int1 auStack_48 [64];
iVar1 = *(int *)(param_1 + 4);
if (iVar1 == param_2) {
uVar2 = next_token(param_1);
return uVar2;
}
switch(iVar1) {
case -0x80:
pcVar3 = "Unexpected number";
break;
case -0x7f:
pcVar3 = "Unexpected string";
break;
case -0x7e:
pcVar3 = "Unexpected string template";
break;
case -0x7d:
uVar2 = JS_AtomGetStr(*param_1,auStack_48,*(int4 *)(param_1 + 7));
js_parse_error(param_1,"Unexpected identifier \'%s\'",uVar2);
return 0xffffffffffffffff;
case -0x7c:
pcVar3 = "Unexpected regexp";
break;
default:
if (iVar1 == -0x58) {
pcVar3 = "Invalid or unexpected token";
}
else {
if (iVar1 != -0x56) {
js_parse_error(param_1,"Unexpected token \'%.*s\'",*(int *)(param_1 + 0xe) - (int)param_1[6]
);
return 0xffffffffffffffff;
}
pcVar3 = "Unexpected end of input";
}
}
js_parse_error(param_1,pcVar3);
return 0xffffffffffffffff;
}
| |
48,894 | google::protobuf::MessageLite::AppendPartialToString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/message_lite.cc | bool MessageLite::AppendPartialToString(std::string* output) const {
size_t old_size = output->size();
size_t byte_size = ByteSizeLong();
if (byte_size > INT_MAX) {
GOOGLE_LOG(ERROR) << GetTypeName()
<< " exceeded maximum protobuf size of 2GB: " << byte_size;
return false;
}
STLStringResizeUninitializedAmortized(output, old_size + byte_size);
uint8_t* start =
reinterpret_cast<uint8_t*>(io::mutable_string_data(output) + old_size);
SerializeToArrayImpl(*this, start, byte_size);
return true;
} | O3 | cpp | google::protobuf::MessageLite::AppendPartialToString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r12
movq %rdi, %r14
movq 0x8(%rsi), %r15
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, %rbx
testq $-0x80000000, %rax # imm = 0x80000000
jne 0x9e62e
leaq (%rbx,%r15), %r13
leaq 0x10(%r12), %rax
movl $0xf, %esi
cmpq %rax, (%r12)
je 0x9e5ca
movq 0x10(%r12), %rsi
cmpq %r13, %rsi
jae 0x9e5e1
addq %rsi, %rsi
cmpq %r13, %rsi
cmovbeq %r13, %rsi
movq %r12, %rdi
callq 0x13bd4
xorl %ebp, %ebp
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0xf0f0
addq (%r12), %r15
leaq 0x6486e(%rip), %rax # 0x102e69
movb (%rax), %al
andb $0x1, %al
leaq (%r15,%rbx), %rcx
leaq 0x28(%rsp), %rdx
movq %rcx, (%rdx)
movq %rbp, 0x8(%rdx)
movq %rbp, 0x30(%rdx)
movw $0x0, 0x38(%rdx)
movb %al, 0x3a(%rdx)
movb $0x0, 0x3b(%rdx)
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x60(%rax)
jmp 0x9e6aa
leaq 0x1f920(%rip), %rdx # 0xbdf55
leaq 0x28(%rsp), %rdi
movl $0x2, %esi
movl $0x1c1, %ecx # imm = 0x1C1
callq 0x169ca
movq (%r14), %rax
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x164da
leaq 0x1f957(%rip), %rsi # 0xbdfc4
movq %rax, %rdi
callq 0x164c8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x168b8
leaq 0x7(%rsp), %rdi
movq %rax, %rsi
callq 0x165a2
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9e6a0
callq 0xf330
leaq 0x28(%rsp), %rdi
callq 0x169e8
shrq $0x1f, %rbx
sete %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9e6c7
movq %rax, %rbx
jmp 0x9e6dd
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9e6dd
callq 0xf330
leaq 0x28(%rsp), %rdi
callq 0x169e8
movq %rbx, %rdi
callq 0xf570
nop
| _ZNK6google8protobuf11MessageLite21AppendPartialToStringEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12, rsi
mov r14, rdi
mov r15, [rsi+8]
mov rax, [rdi]
call qword ptr [rax+40h]
mov rbx, rax
test rax, 0FFFFFFFF80000000h
jnz short loc_9E62E
lea r13, [rbx+r15]
lea rax, [r12+10h]
mov esi, 0Fh
cmp [r12], rax
jz short loc_9E5CA
mov rsi, [r12+10h]
loc_9E5CA:
cmp rsi, r13
jnb short loc_9E5E1
add rsi, rsi
cmp rsi, r13
cmovbe rsi, r13
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
loc_9E5E1:
xor ebp, ebp
mov rdi, r12
mov rsi, r13
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
add r15, [r12]
lea rax, _ZN6google8protobuf2io17CodedOutputStream36default_serialization_deterministic_E; google::protobuf::io::CodedOutputStream::default_serialization_deterministic_
mov al, [rax]
and al, 1
lea rcx, [r15+rbx]
lea rdx, [rsp+98h+var_70]
mov [rdx], rcx
mov [rdx+8], rbp
mov [rdx+30h], rbp
mov word ptr [rdx+38h], 0
mov [rdx+3Ah], al
mov byte ptr [rdx+3Bh], 0
mov rax, [r14]
mov rdi, r14
mov rsi, r15
call qword ptr [rax+60h]
jmp short loc_9E6AA
loc_9E62E:
lea rdx, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+98h+var_70]
mov esi, 2
mov ecx, 1C1h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rax, [r14]
lea rdi, [rsp+98h+var_90]
mov rsi, r14
call qword ptr [rax+10h]
lea rdi, [rsp+98h+var_70]
lea rsi, [rsp+98h+var_90]
call _ZN6google8protobuf8internal10LogMessagelsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::LogMessage::operator<<(std::string const&)
lea rsi, aExceededMaximu; " exceeded maximum protobuf size of 2GB:"...
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov rdi, rax
mov rsi, rbx
call _ZN6google8protobuf8internal10LogMessagelsEm; google::protobuf::internal::LogMessage::operator<<(ulong)
lea rdi, [rsp+98h+var_91]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rax, [rsp+98h+var_80]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9E6A0
call __ZdlPv; operator delete(void *)
loc_9E6A0:
lea rdi, [rsp+98h+var_70]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_9E6AA:
shr rbx, 1Fh
setz al
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_9E6C7
mov rbx, rax
jmp short loc_9E6DD
loc_9E6C7:
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9E6DD
call __ZdlPv; operator delete(void *)
loc_9E6DD:
lea rdi, [rsp+arg_20]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
| bool google::protobuf::MessageLite::AppendPartialToString(long long a1, _QWORD *a2)
{
long long v3; // r15
long long v4; // rax
unsigned long long v5; // rbx
unsigned long long v6; // r13
unsigned long long v7; // rsi
unsigned long long v8; // rsi
long long v9; // r15
long long v10; // rax
long long v11; // rax
char *v12; // rdx
google::protobuf::internal::LogMessage *v13; // rax
char v15; // [rsp+7h] [rbp-91h] BYREF
void *v16[2]; // [rsp+8h] [rbp-90h] BYREF
char v17; // [rsp+18h] [rbp-80h] BYREF
_QWORD v18[7]; // [rsp+28h] [rbp-70h] BYREF
__int16 v19; // [rsp+60h] [rbp-38h]
char v20; // [rsp+62h] [rbp-36h]
char v21; // [rsp+63h] [rbp-35h]
v3 = a2[1];
v4 = (*(long long ( **)(long long))(*(_QWORD *)a1 + 64LL))(a1);
v5 = v4;
if ( (v4 & 0xFFFFFFFF80000000LL) != 0 )
{
google::protobuf::internal::LogMessage::LogMessage(
(long long)v18,
2,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/message_lite.cc",
449);
(*(void ( **)(void **, long long))(*(_QWORD *)a1 + 16LL))(v16, a1);
v10 = google::protobuf::internal::LogMessage::operator<<((long long)v18, (long long)v16);
v11 = google::protobuf::internal::LogMessage::operator<<(v10, (long long)" exceeded maximum protobuf size of 2GB: ");
v13 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
v11,
(google::protobuf *)v5,
v12);
google::protobuf::internal::LogFinisher::operator=((long long)&v15, v13);
if ( v16[0] != &v17 )
operator delete(v16[0]);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v18);
}
else
{
v6 = v4 + v3;
v7 = 15LL;
if ( (_QWORD *)*a2 != a2 + 2 )
v7 = a2[2];
if ( v7 < v6 )
{
v8 = 2 * v7;
if ( v8 <= v6 )
v8 = v4 + v3;
std::string::reserve((long long)a2, v8);
}
std::string::resize(a2, v5 + v3, 0LL);
v9 = *a2 + v3;
v18[0] = v9 + v5;
v18[1] = 0LL;
v18[6] = 0LL;
v19 = 0;
v20 = google::protobuf::io::CodedOutputStream::default_serialization_deterministic_[0] & 1;
v21 = 0;
(*(void ( **)(long long, long long))(*(_QWORD *)a1 + 96LL))(a1, v9);
}
return v5 >> 31 == 0;
}
| AppendPartialToString:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12,RSI
MOV R14,RDI
MOV R15,qword ptr [RSI + 0x8]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x40]
MOV RBX,RAX
TEST RAX,-0x80000000
JNZ 0x0019e62e
LEA R13,[RBX + R15*0x1]
LEA RAX,[R12 + 0x10]
MOV ESI,0xf
CMP qword ptr [R12],RAX
JZ 0x0019e5ca
MOV RSI,qword ptr [R12 + 0x10]
LAB_0019e5ca:
CMP RSI,R13
JNC 0x0019e5e1
ADD RSI,RSI
CMP RSI,R13
CMOVBE RSI,R13
MOV RDI,R12
CALL 0x00113bd4
LAB_0019e5e1:
XOR EBP,EBP
MOV RDI,R12
MOV RSI,R13
XOR EDX,EDX
CALL 0x0010f0f0
ADD R15,qword ptr [R12]
LEA RAX,[0x202e69]
MOV AL,byte ptr [RAX]
AND AL,0x1
LEA RCX,[R15 + RBX*0x1]
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RCX
MOV qword ptr [RDX + 0x8],RBP
MOV qword ptr [RDX + 0x30],RBP
MOV word ptr [RDX + 0x38],0x0
MOV byte ptr [RDX + 0x3a],AL
MOV byte ptr [RDX + 0x3b],0x0
MOV RAX,qword ptr [R14]
MOV RDI,R14
MOV RSI,R15
CALL qword ptr [RAX + 0x60]
JMP 0x0019e6aa
LAB_0019e62e:
LEA RDX,[0x1bdf55]
LEA RDI,[RSP + 0x28]
MOV ESI,0x2
MOV ECX,0x1c1
CALL 0x001169ca
MOV RAX,qword ptr [R14]
LAB_0019e64c:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL qword ptr [RAX + 0x10]
LAB_0019e657:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
CALL 0x001164da
LEA RSI,[0x1bdfc4]
MOV RDI,RAX
CALL 0x001164c8
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001168b8
LAB_0019e680:
LEA RDI,[RSP + 0x7]
MOV RSI,RAX
CALL 0x001165a2
LAB_0019e68d:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019e6a0
CALL 0x0010f330
LAB_0019e6a0:
LEA RDI,[RSP + 0x28]
CALL 0x001169e8
LAB_0019e6aa:
SHR RBX,0x1f
SETZ AL
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::MessageLite::AppendPartialToString(std::__cxx11::string*) const */
bool __thiscall
google::protobuf::MessageLite::AppendPartialToString(MessageLite *this,string *param_1)
{
ulong uVar1;
ulong uVar2;
LogMessage *pLVar3;
ulong uVar4;
ulong uVar5;
long lVar6;
LogFinisher local_91;
int1 *local_90 [2];
int1 local_80 [16];
long local_70 [6];
int8 local_40;
int2 local_38;
byte local_36;
int1 local_35;
lVar6 = *(long *)(param_1 + 8);
uVar2 = (**(code **)(*(long *)this + 0x40))();
if ((uVar2 & 0xffffffff80000000) == 0) {
uVar1 = uVar2 + lVar6;
uVar4 = 0xf;
if (*(string **)param_1 != param_1 + 0x10) {
uVar4 = *(ulong *)(param_1 + 0x10);
}
if (uVar4 < uVar1) {
uVar5 = uVar4 * 2;
if (uVar4 * 2 <= uVar1) {
uVar5 = uVar1;
}
std::__cxx11::string::reserve(param_1,uVar5);
}
std::__cxx11::string::resize((ulong)param_1,(char)uVar1);
lVar6 = lVar6 + *(long *)param_1;
local_36 = io::CodedOutputStream::default_serialization_deterministic_ & 1;
local_70[0] = lVar6 + uVar2;
local_70[1] = 0;
local_40 = 0;
local_38 = 0;
local_35 = 0;
(**(code **)(*(long *)this + 0x60))(this,lVar6);
}
else {
internal::LogMessage::LogMessage
((LogMessage *)local_70,2,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/message_lite.cc"
,0x1c1);
/* try { // try from 0019e64c to 0019e656 has its CatchHandler @ 0019e6c2 */
(**(code **)(*(long *)this + 0x10))(local_90,this);
/* try { // try from 0019e657 to 0019e67f has its CatchHandler @ 0019e6c7 */
pLVar3 = (LogMessage *)
internal::LogMessage::operator<<((LogMessage *)local_70,(string *)local_90);
pLVar3 = (LogMessage *)
internal::LogMessage::operator<<(pLVar3," exceeded maximum protobuf size of 2GB: ");
pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3,uVar2);
/* try { // try from 0019e680 to 0019e68c has its CatchHandler @ 0019e6c0 */
internal::LogFinisher::operator=(&local_91,pLVar3);
if (local_90[0] != local_80) {
operator_delete(local_90[0]);
}
internal::LogMessage::~LogMessage((LogMessage *)local_70);
}
return uVar2 >> 0x1f == 0;
}
| |
48,895 | xml_value | eloqsql/sql/item_xmlfunc.cc | int xml_value(MY_XML_PARSER *st,const char *attr, size_t len)
{
MY_XML_USER_DATA *data= (MY_XML_USER_DATA*)st->user_data;
MY_XML_NODE node;
node.parent= data->parent; // Set parent for the new text node to old parent
node.level= data->level;
node.type= MY_XML_NODE_TEXT;
node.beg= attr;
node.end= attr + len;
return append_node(data->pxml, &node) ? MY_XML_ERROR : MY_XML_OK;
} | O0 | cpp | xml_value:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x140(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x410(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x48(%rbp)
movl $0x2, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0xa9b760
movb %al, %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| xml_value:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax+140h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax+410h]
mov [rbp+var_40], eax
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_48], eax
mov [rbp+var_44], 2
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov rdi, [rax+8]
lea rsi, [rbp+var_48]
call _ZL11append_nodeP6StringP14my_xml_node_st; append_node(String *,my_xml_node_st *)
mov dl, al
xor eax, eax
mov ecx, 1
test dl, 1
cmovnz eax, ecx
add rsp, 50h
pop rbp
retn
| _BOOL8 xml_value(long long a1, long long a2, long long a3)
{
_DWORD v4[4]; // [rsp+8h] [rbp-48h] BYREF
long long v5; // [rsp+18h] [rbp-38h]
long long v6; // [rsp+20h] [rbp-30h]
long long v7; // [rsp+30h] [rbp-20h]
long long v8; // [rsp+38h] [rbp-18h]
long long v9; // [rsp+40h] [rbp-10h]
long long v10; // [rsp+48h] [rbp-8h]
v10 = a1;
v9 = a2;
v8 = a3;
v7 = *(_QWORD *)(a1 + 320);
v4[2] = *(_DWORD *)(v7 + 1040);
v4[0] = *(_DWORD *)v7;
v4[1] = 2;
v5 = a2;
v6 = a3 + a2;
return (append_node(*(_QWORD *)(v7 + 8), (const char *)v4) & 1) != 0;
}
| val_str:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00a9b7fa
LAB_00a9b7fa:
MOV RSI,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RSI + 0x70]
MOV RDI,qword ptr [RAX]
ADD RSI,0xa8
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x108]
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JZ 0x00a9b854
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x8
CALL 0x005a84f0
MOV RDI,qword ptr [RBP + -0x58]
ADD EAX,0x1
SHR EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,EAX
MOV ESI,EAX
CALL 0x005ad8c0
TEST AL,0x1
JNZ 0x00a9b854
JMP 0x00a9b869
LAB_00a9b854:
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX + 0x64],0x1
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00a9b9d6
LAB_00a9b869:
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x8
CALL 0x005a84d0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RCX
MOV byte ptr [RAX + 0x64],0x0
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x8
MOV EAX,dword ptr [RBP + -0x3c]
MOV ESI,EAX
CALL 0x005acad0
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x8
CALL 0x005a84d0
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x8
CALL 0x005a84f0
AND EAX,0x1
CMP EAX,0x0
JZ 0x00a9b912
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOVSX EDI,byte ptr [RAX]
CALL 0x007c21e0
MOV RCX,qword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x40],EAX
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,RAX
ADD RSI,0x1
MOV qword ptr [RBP + -0x30],RSI
MOV byte ptr [RAX],DL
CMP dword ptr [RBP + -0x40],-0x1
SETZ AL
MOV DL,AL
AND DL,0x1
MOV byte ptr [RCX + 0x64],DL
TEST AL,0x1
JNZ 0x00a9b903
JMP 0x00a9b910
LAB_00a9b903:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00a9b9d6
LAB_00a9b910:
JMP 0x00a9b912
LAB_00a9b912:
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x8
CALL 0x005a84d0
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x8
CALL 0x005a84f0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
LAB_00a9b93f:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x00a9b9ce
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EDI,byte ptr [RAX]
CALL 0x007c21e0
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EDI,byte ptr [RAX + 0x1]
CALL 0x007c21e0
MOV dword ptr [RBP + -0x48],EAX
MOV AL,0x1
CMP dword ptr [RBP + -0x44],-0x1
MOV byte ptr [RBP + -0x61],AL
JZ 0x00a9b981
CMP dword ptr [RBP + -0x48],-0x1
SETZ AL
MOV byte ptr [RBP + -0x61],AL
LAB_00a9b981:
MOV RCX,qword ptr [RBP + -0x50]
MOV AL,byte ptr [RBP + -0x61]
MOV DL,AL
AND DL,0x1
MOV byte ptr [RCX + 0x64],DL
TEST AL,0x1
JNZ 0x00a9b996
JMP 0x00a9b9a0
LAB_00a9b996:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00a9b9d6
LAB_00a9b9a0:
MOV EAX,dword ptr [RBP + -0x44]
SHL EAX,0x4
OR EAX,dword ptr [RBP + -0x48]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00a9b93f
LAB_00a9b9ce:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_00a9b9d6:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
/* Item_func_unhex::val_str(String*) */
String * __thiscall Item_func_unhex::val_str(Item_func_unhex *this,String *param_1)
{
int iVar1;
uint uVar2;
int iVar3;
long lVar4;
ulong uVar5;
char *pcVar6;
byte *pbVar7;
long lVar8;
Item_func_unhex local_69;
byte *local_38;
char *local_28;
lVar4 = (**(code **)(*(long *)**(int8 **)(this + 0x70) + 0x108))
((long *)**(int8 **)(this + 0x70),this + 0xa8);
if (lVar4 != 0) {
iVar1 = Binary_string::length((Binary_string *)(lVar4 + 8));
uVar2 = iVar1 + 1U >> 1;
uVar5 = Binary_string::alloc((Binary_string *)(param_1 + 8),(ulong)uVar2);
if ((uVar5 & 1) == 0) {
pcVar6 = (char *)Binary_string::ptr((Binary_string *)(lVar4 + 8));
this[100] = (Item_func_unhex)0x0;
Binary_string::length((Binary_string *)(param_1 + 8),(ulong)uVar2);
pbVar7 = (byte *)Binary_string::ptr((Binary_string *)(param_1 + 8));
uVar2 = Binary_string::length((Binary_string *)(lVar4 + 8));
local_38 = pbVar7;
local_28 = pcVar6;
if ((uVar2 & 1) != 0) {
local_28 = pcVar6 + 1;
iVar1 = hexchar_to_int(*pcVar6);
local_38 = pbVar7 + 1;
*pbVar7 = (byte)iVar1;
this[100] = (Item_func_unhex)(iVar1 == -1);
if (iVar1 == -1) {
return (String *)0x0;
}
}
lVar8 = Binary_string::ptr((Binary_string *)(lVar4 + 8));
uVar2 = Binary_string::length((Binary_string *)(lVar4 + 8));
while( true ) {
if ((char *)(lVar8 + (ulong)uVar2) <= local_28) {
return param_1;
}
iVar1 = hexchar_to_int(*local_28);
iVar3 = hexchar_to_int(local_28[1]);
local_69 = (Item_func_unhex)(iVar1 == -1 || iVar3 == -1);
this[100] = local_69;
if ((bool)local_69) break;
*local_38 = (byte)(iVar1 << 4) | (byte)iVar3;
local_28 = local_28 + 2;
local_38 = local_38 + 1;
}
return (String *)0x0;
}
}
this[100] = (Item_func_unhex)0x1;
return (String *)0x0;
}
| |
48,896 | minja::Value::empty() const | monkey531[P]llama/common/minja.hpp | bool empty() const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_string()) return primitive_.empty();
if (is_array()) return array_->empty();
if (is_object()) return object_->empty();
return false;
} | O2 | cpp | minja::Value::empty() const:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x64d50
testb %al, %al
jne 0x652af
cmpb $0x3, 0x40(%rbx)
jne 0x65287
addq $0x40, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6551a
movq 0x10(%rbx), %rax
testq %rax, %rax
jne 0x65299
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x652ab
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x652a3
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %rbx
leaq 0x4fff5(%rip), %rsi # 0xb52b6
movq %rax, %rdi
callq 0x23330
movq 0x99d18(%rip), %rsi # 0xfefe8
movq 0x99c71(%rip), %rdx # 0xfef48
movq %rbx, %rdi
callq 0x23fb0
movq %rax, %r14
movq %rbx, %rdi
callq 0x23690
movq %r14, %rdi
callq 0x24030
| _ZNK5minja5Value5emptyEv:
push r14
push rbx
push rax
mov rbx, rdi
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jnz short loc_652AF
cmp byte ptr [rbx+40h], 3
jnz short loc_65287
add rbx, 40h ; '@'
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5emptyEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::empty(void)
loc_65287:
mov rax, [rbx+10h]
test rax, rax
jnz short loc_65299
mov rax, [rbx+20h]
test rax, rax
jz short loc_652AB
loc_65299:
mov rcx, [rax]
cmp rcx, [rax+8]
setz al
loc_652A3:
add rsp, 8
pop rbx
pop r14
retn
loc_652AB:
xor eax, eax
jmp short loc_652A3
loc_652AF:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| char minja::Value::empty(minja::Value *this)
{
_QWORD *v2; // rax
std::runtime_error *exception; // rbx
if ( minja::Value::is_null(this) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *((_BYTE *)this + 64) == 3 )
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::empty((char *)this + 64);
v2 = (_QWORD *)*((_QWORD *)this + 2);
return (v2 || (v2 = (_QWORD *)*((_QWORD *)this + 4)) != 0LL) && *v2 == v2[1];
}
| empty:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00164d50
TEST AL,AL
JNZ 0x001652af
CMP byte ptr [RBX + 0x40],0x3
JNZ 0x00165287
ADD RBX,0x40
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0016551a
LAB_00165287:
MOV RAX,qword ptr [RBX + 0x10]
TEST RAX,RAX
JNZ 0x00165299
MOV RAX,qword ptr [RBX + 0x20]
TEST RAX,RAX
JZ 0x001652ab
LAB_00165299:
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
SETZ AL
LAB_001652a3:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001652ab:
XOR EAX,EAX
JMP 0x001652a3
LAB_001652af:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV RBX,RAX
LAB_001652ba:
LEA RSI,[0x1b52b6]
MOV RDI,RAX
CALL 0x00123330
LAB_001652c9:
MOV RSI,qword ptr [0x001fefe8]
MOV RDX,qword ptr [0x001fef48]
MOV RDI,RBX
CALL 0x00123fb0
|
/* minja::Value::empty() const */
int8 __thiscall minja::Value::empty(Value *this)
{
char cVar1;
int8 uVar2;
long *plVar3;
runtime_error *this_00;
cVar1 = is_null(this);
if (cVar1 != '\0') {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001652ba to 001652c8 has its CatchHandler @ 001652df */
std::runtime_error::runtime_error(this_00,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48);
}
if (this[0x40] == (Value)0x3) {
uVar2 = 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>
::empty((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)(this + 0x40));
return uVar2;
}
plVar3 = *(long **)(this + 0x10);
if ((plVar3 == (long *)0x0) && (plVar3 = *(long **)(this + 0x20), plVar3 == (long *)0x0)) {
uVar2 = 0;
}
else {
uVar2 = CONCAT71((int7)((ulong)plVar3 >> 8),*plVar3 == plVar3[1]);
}
return uVar2;
}
| |
48,897 | minja::Value::empty() const | monkey531[P]llama/common/minja.hpp | bool empty() const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_string()) return primitive_.empty();
if (is_array()) return array_->empty();
if (is_object()) return object_->empty();
return false;
} | O3 | cpp | minja::Value::empty() const:
pushq %r14
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rdx
movq 0x20(%rdi), %rcx
movb 0x40(%rdi), %sil
testq %rcx, %rcx
jne 0x89c34
testq %rdx, %rdx
jne 0x89c34
testb %sil, %sil
jne 0x89c34
cmpq $0x0, 0x30(%rdi)
je 0x89c64
movq %rdx, %rax
orq %rcx, %rax
sete %dil
xorl %eax, %eax
cmpb $0x3, %sil
je 0x89c5c
testb %dil, %dil
jne 0x89c5c
testq %rdx, %rdx
cmovneq %rdx, %rcx
movq (%rcx), %rax
cmpq 0x8(%rcx), %rax
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x1b450
movq %rax, %rbx
leaq 0x6864e(%rip), %rsi # 0xf22c6
movq %rax, %rdi
callq 0x1b330
movq 0xa4361(%rip), %rsi # 0x12dfe8
movq 0xa42c2(%rip), %rdx # 0x12df50
movq %rbx, %rdi
callq 0x1bfb0
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b670
movq %r14, %rdi
callq 0x1c030
| _ZNK5minja5Value5emptyEv:
push r14
push rbx
push rax
mov rdx, [rdi+10h]
mov rcx, [rdi+20h]
mov sil, [rdi+40h]
test rcx, rcx
jnz short loc_89C34
test rdx, rdx
jnz short loc_89C34
test sil, sil
jnz short loc_89C34
cmp qword ptr [rdi+30h], 0
jz short loc_89C64
loc_89C34:
mov rax, rdx
or rax, rcx
setz dil
xor eax, eax
cmp sil, 3
jz short loc_89C5C
test dil, dil
jnz short loc_89C5C
test rdx, rdx
cmovnz rcx, rdx
mov rax, [rcx]
cmp rax, [rcx+8]
setz al
loc_89C5C:
add rsp, 8
pop rbx
pop r14
retn
loc_89C64:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| bool minja::Value::empty(minja::Value *this)
{
unsigned long long v1; // rdx
_QWORD *v2; // rcx
char v3; // si
bool result; // al
std::runtime_error *exception; // rbx
v1 = *((_QWORD *)this + 2);
v2 = (_QWORD *)*((_QWORD *)this + 4);
v3 = *((_BYTE *)this + 64);
if ( __PAIR128__((unsigned long long)v2, v1) == 0 && !v3 && !*((_QWORD *)this + 6) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
result = 0;
if ( v3 != 3 && __PAIR128__((unsigned long long)v2, v1) != 0 )
{
if ( v1 )
v2 = (_QWORD *)*((_QWORD *)this + 2);
return *v2 == v2[1];
}
return result;
}
| empty:
PUSH R14
PUSH RBX
PUSH RAX
MOV RDX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RDI + 0x20]
MOV SIL,byte ptr [RDI + 0x40]
TEST RCX,RCX
JNZ 0x00189c34
TEST RDX,RDX
JNZ 0x00189c34
TEST SIL,SIL
JNZ 0x00189c34
CMP qword ptr [RDI + 0x30],0x0
JZ 0x00189c64
LAB_00189c34:
MOV RAX,RDX
OR RAX,RCX
SETZ DIL
XOR EAX,EAX
CMP SIL,0x3
JZ 0x00189c5c
TEST DIL,DIL
JNZ 0x00189c5c
TEST RDX,RDX
CMOVNZ RCX,RDX
MOV RAX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x8]
SETZ AL
LAB_00189c5c:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00189c64:
MOV EDI,0x10
CALL 0x0011b450
MOV RBX,RAX
LAB_00189c71:
LEA RSI,[0x1f22c6]
MOV RDI,RAX
CALL 0x0011b330
LAB_00189c80:
MOV RSI,qword ptr [0x0022dfe8]
MOV RDX,qword ptr [0x0022df50]
MOV RDI,RBX
CALL 0x0011bfb0
|
/* minja::Value::empty() const */
int8 __thiscall minja::Value::empty(Value *this)
{
long *plVar1;
int8 uVar2;
runtime_error *this_00;
long *plVar3;
plVar1 = *(long **)(this + 0x10);
plVar3 = *(long **)(this + 0x20);
if ((((plVar3 == (long *)0x0) && (plVar1 == (long *)0x0)) && (this[0x40] == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00189c71 to 00189c7f has its CatchHandler @ 00189c96 */
std::runtime_error::runtime_error(this_00,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50);
}
uVar2 = 0;
if ((this[0x40] != (Value)0x3) && (plVar1 != (long *)0x0 || plVar3 != (long *)0x0)) {
if (plVar1 != (long *)0x0) {
plVar3 = plVar1;
}
uVar2 = CONCAT71((int7)((ulong)*plVar3 >> 8),*plVar3 == plVar3[1]);
}
return uVar2;
}
| |
48,898 | my_copy_fix_mb | eloqsql/strings/ctype-mb.c | size_t
my_copy_fix_mb(CHARSET_INFO *cs,
char *dst, size_t dst_length,
const char *src, size_t src_length,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t well_formed_nchars;
size_t well_formed_length;
size_t fixed_length;
size_t min_length= MY_MIN(src_length, dst_length);
well_formed_nchars= my_ci_well_formed_char_length(cs, src, src + min_length,
nchars, status);
DBUG_ASSERT(well_formed_nchars <= nchars);
well_formed_length= status->m_source_end_pos - src;
if (well_formed_length)
memmove(dst, src, well_formed_length);
if (!status->m_well_formed_error_pos)
return well_formed_length;
fixed_length= my_append_fix_badly_formed_tail(cs,
dst + well_formed_length,
dst + dst_length,
src + well_formed_length,
src + src_length,
nchars - well_formed_nchars,
status);
return well_formed_length + fixed_length;
} | O0 | c | my_copy_fix_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x50e88
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x50e90
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x28(%rbp), %rdx
addq -0x58(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0x50f50
movq %rax, -0x40(%rbp)
jmp 0x50ebb
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x50ee5
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x25590
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x50efa
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x50f43
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
addq -0x48(%rbp), %rcx
movq -0x28(%rbp), %r8
addq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
subq -0x40(%rbp), %r9
movq 0x10(%rbp), %rax
movq %rax, (%rsp)
callq 0x50fa0
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| my_copy_fix_mb:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
jnb short loc_50E88
mov rax, [rbp+var_30]
mov [rbp+var_60], rax
jmp short loc_50E90
loc_50E88:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
loc_50E90:
mov rax, [rbp+var_60]
mov [rbp+var_58], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_28]
add rdx, [rbp+var_58]
mov rcx, [rbp+var_38]
mov r8, [rbp+arg_0]
call my_ci_well_formed_char_length
mov [rbp+var_40], rax
jmp short $+2
loc_50EBB:
mov rax, [rbp+arg_0]
mov rax, [rax]
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jz short loc_50EE5
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_48]
call _memmove
loc_50EE5:
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jnz short loc_50EFA
mov rax, [rbp+var_48]
mov [rbp+var_8], rax
jmp short loc_50F43
loc_50EFA:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
add rsi, [rbp+var_48]
mov rdx, [rbp+var_18]
add rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
add rcx, [rbp+var_48]
mov r8, [rbp+var_28]
add r8, [rbp+var_30]
mov r9, [rbp+var_38]
sub r9, [rbp+var_40]
mov rax, [rbp+arg_0]
mov [rsp+70h+var_70], rax
call my_append_fix_badly_formed_tail
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
add rax, [rbp+var_50]
mov [rbp+var_8], rax
loc_50F43:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| long long my_copy_fix_mb(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
long long a6,
_QWORD *a7)
{
unsigned long long v8; // [rsp+10h] [rbp-60h]
long long v9; // [rsp+28h] [rbp-48h]
int v10; // [rsp+30h] [rbp-40h]
int v11; // [rsp+38h] [rbp-38h]
int v12; // [rsp+40h] [rbp-30h]
int v14; // [rsp+50h] [rbp-20h]
v14 = a3;
v12 = a5;
v11 = a6;
if ( a5 >= a3 )
v8 = a3;
else
v8 = a5;
v10 = my_ci_well_formed_char_length(a1, a4, v8 + a4, a6, a7);
v9 = *a7 - a4;
if ( v9 )
memmove(a2, a4, v9);
if ( a7[1] )
return my_append_fix_badly_formed_tail(
a1,
(int)v9 + (int)a2,
v14 + (int)a2,
(int)v9 + (int)a4,
v12 + (int)a4,
v11 - v10,
(long long)a7)
+ v9;
else
return v9;
}
| my_copy_fix_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00150e88
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00150e90
LAB_00150e88:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
LAB_00150e90:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x28]
ADD RDX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + 0x10]
CALL 0x00150f50
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00150ebb
LAB_00150ebb:
MOV RAX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
JZ 0x00150ee5
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00125590
LAB_00150ee5:
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x00150efa
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00150f43
LAB_00150efa:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + -0x28]
ADD R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x38]
SUB R9,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RSP],RAX
CALL 0x00150fa0
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x8],RAX
LAB_00150f43:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
size_t my_copy_fix_mb(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
long param_6,long *param_7)
{
long lVar1;
ulong local_68;
size_t local_10;
local_68 = param_3;
if (param_5 < param_3) {
local_68 = param_5;
}
lVar1 = my_ci_well_formed_char_length(param_1,param_4,(long)param_4 + local_68,param_6,param_7);
local_10 = *param_7 - (long)param_4;
if (local_10 != 0) {
memmove(param_2,param_4,local_10);
}
if (param_7[1] != 0) {
lVar1 = my_append_fix_badly_formed_tail
(param_1,(long)param_2 + local_10,(long)param_2 + param_3,
(long)param_4 + local_10,(long)param_4 + param_5,param_6 - lVar1,param_7);
local_10 = local_10 + lVar1;
}
return local_10;
}
| |
48,899 | Settings::clearAllShots() | 666mxvbee[P]BattleShip/lib/Settings/Settings.cpp | void Settings::clearAllShots() {
std::lock_guard<std::mutex> lock(settings_mutex);
for (auto& ship : masterShips) {
std::fill(ship.hits.begin(), ship.hits.end(), false);
}
for (auto& ship : slaveShips) {
std::fill(ship.hits.begin(), ship.hits.end(), false);
}
} | O3 | cpp | Settings::clearAllShots():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x5500
testl %eax, %eax
jne 0x73a4
movq 0x90(%rbx), %r14
movq 0x98(%rbx), %r15
cmpq %r15, %r14
je 0x733e
movq 0x18(%r14), %rdi
movq 0x28(%r14), %r12
movl 0x30(%r14), %ebp
cmpq %r12, %rdi
je 0x731b
movq %r12, %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x51e0
jmp 0x731e
movq %rdi, %r12
testl %ebp, %ebp
je 0x7338
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shrq %cl, %rax
notq %rax
andq %rax, (%r12)
addq $0x40, %r14
jmp 0x72f6
movq 0xa8(%rbx), %r14
movq 0xb0(%rbx), %r15
cmpq %r15, %r14
je 0x7394
movq 0x18(%r14), %rdi
movq 0x28(%r14), %r12
movl 0x30(%r14), %ebp
cmpq %r12, %rdi
je 0x7371
movq %r12, %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x51e0
jmp 0x7374
movq %rdi, %r12
testl %ebp, %ebp
je 0x738e
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shrq %cl, %rax
notq %rax
andq %rax, (%r12)
addq $0x40, %r14
jmp 0x734c
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x52d0
movl %eax, %edi
callq 0x5260
nop
| _ZN8Settings13clearAllShotsEv:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz loc_73A4
mov r14, [rbx+90h]
mov r15, [rbx+98h]
loc_72F6:
cmp r14, r15
jz short loc_733E
mov rdi, [r14+18h]
mov r12, [r14+28h]
mov ebp, [r14+30h]
cmp rdi, r12
jz short loc_731B
mov rdx, r12
sub rdx, rdi
xor esi, esi
call _memset
jmp short loc_731E
loc_731B:
mov r12, rdi
loc_731E:
test ebp, ebp
jz short loc_7338
neg bpl
mov rax, 0FFFFFFFFFFFFFFFFh
mov ecx, ebp
shr rax, cl
not rax
and [r12], rax
loc_7338:
add r14, 40h ; '@'
jmp short loc_72F6
loc_733E:
mov r14, [rbx+0A8h]
mov r15, [rbx+0B0h]
loc_734C:
cmp r14, r15
jz short loc_7394
mov rdi, [r14+18h]
mov r12, [r14+28h]
mov ebp, [r14+30h]
cmp rdi, r12
jz short loc_7371
mov rdx, r12
sub rdx, rdi
xor esi, esi
call _memset
jmp short loc_7374
loc_7371:
mov r12, rdi
loc_7374:
test ebp, ebp
jz short loc_738E
neg bpl
mov rax, 0FFFFFFFFFFFFFFFFh
mov ecx, ebp
shr rax, cl
not rax
and [r12], rax
loc_738E:
add r14, 40h ; '@'
jmp short loc_734C
loc_7394:
mov rdi, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_73A4:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
| long long Settings::clearAllShots(Settings *this)
{
int v2; // eax
long long v3; // r14
long long v4; // r15
char *v5; // rdi
char *v6; // r12
int v7; // ebp
long long v8; // r14
long long v9; // r15
char *v10; // rdi
char *v11; // r12
int v12; // ebp
v2 = pthread_mutex_lock(this);
if ( v2 )
std::__throw_system_error(v2);
v3 = *((_QWORD *)this + 18);
v4 = *((_QWORD *)this + 19);
while ( v3 != v4 )
{
v5 = *(char **)(v3 + 24);
v6 = *(char **)(v3 + 40);
v7 = *(_DWORD *)(v3 + 48);
if ( v5 == v6 )
v6 = *(char **)(v3 + 24);
else
memset(v5, 0LL, v6 - v5);
if ( v7 )
*(_QWORD *)v6 &= ~(0xFFFFFFFFFFFFFFFFLL >> -(char)v7);
v3 += 64LL;
}
v8 = *((_QWORD *)this + 21);
v9 = *((_QWORD *)this + 22);
while ( v8 != v9 )
{
v10 = *(char **)(v8 + 24);
v11 = *(char **)(v8 + 40);
v12 = *(_DWORD *)(v8 + 48);
if ( v10 == v11 )
v11 = *(char **)(v8 + 24);
else
memset(v10, 0LL, v11 - v10);
if ( v12 )
*(_QWORD *)v11 &= ~(0xFFFFFFFFFFFFFFFFLL >> -(char)v12);
v8 += 64LL;
}
return pthread_mutex_unlock(this);
}
| clearAllShots:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
CALL 0x00105500
TEST EAX,EAX
JNZ 0x001073a4
MOV R14,qword ptr [RBX + 0x90]
MOV R15,qword ptr [RBX + 0x98]
LAB_001072f6:
CMP R14,R15
JZ 0x0010733e
MOV RDI,qword ptr [R14 + 0x18]
MOV R12,qword ptr [R14 + 0x28]
MOV EBP,dword ptr [R14 + 0x30]
CMP RDI,R12
JZ 0x0010731b
MOV RDX,R12
SUB RDX,RDI
XOR ESI,ESI
CALL 0x001051e0
JMP 0x0010731e
LAB_0010731b:
MOV R12,RDI
LAB_0010731e:
TEST EBP,EBP
JZ 0x00107338
NEG BPL
MOV RAX,-0x1
MOV ECX,EBP
SHR RAX,CL
NOT RAX
AND qword ptr [R12],RAX
LAB_00107338:
ADD R14,0x40
JMP 0x001072f6
LAB_0010733e:
MOV R14,qword ptr [RBX + 0xa8]
MOV R15,qword ptr [RBX + 0xb0]
LAB_0010734c:
CMP R14,R15
JZ 0x00107394
MOV RDI,qword ptr [R14 + 0x18]
MOV R12,qword ptr [R14 + 0x28]
MOV EBP,dword ptr [R14 + 0x30]
CMP RDI,R12
JZ 0x00107371
MOV RDX,R12
SUB RDX,RDI
XOR ESI,ESI
CALL 0x001051e0
JMP 0x00107374
LAB_00107371:
MOV R12,RDI
LAB_00107374:
TEST EBP,EBP
JZ 0x0010738e
NEG BPL
MOV RAX,-0x1
MOV ECX,EBP
SHR RAX,CL
NOT RAX
AND qword ptr [R12],RAX
LAB_0010738e:
ADD R14,0x40
JMP 0x0010734c
LAB_00107394:
MOV RDI,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001052d0
LAB_001073a4:
MOV EDI,EAX
CALL 0x00105260
|
/* Settings::clearAllShots() */
void __thiscall Settings::clearAllShots(Settings *this)
{
long lVar1;
ulong *puVar2;
int iVar3;
ulong *puVar4;
long lVar5;
iVar3 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
lVar1 = *(long *)(this + 0x98);
for (lVar5 = *(long *)(this + 0x90); lVar5 != lVar1; lVar5 = lVar5 + 0x40) {
puVar4 = *(ulong **)(lVar5 + 0x18);
puVar2 = *(ulong **)(lVar5 + 0x28);
iVar3 = *(int *)(lVar5 + 0x30);
if (puVar4 != puVar2) {
memset(puVar4,0,(long)puVar2 - (long)puVar4);
puVar4 = puVar2;
}
if (iVar3 != 0) {
*puVar4 = *puVar4 & ~(0xffffffffffffffffU >> (-(char)iVar3 & 0x3fU));
}
}
lVar1 = *(long *)(this + 0xb0);
for (lVar5 = *(long *)(this + 0xa8); lVar5 != lVar1; lVar5 = lVar5 + 0x40) {
puVar4 = *(ulong **)(lVar5 + 0x18);
puVar2 = *(ulong **)(lVar5 + 0x28);
iVar3 = *(int *)(lVar5 + 0x30);
if (puVar4 != puVar2) {
memset(puVar4,0,(long)puVar2 - (long)puVar4);
puVar4 = puVar2;
}
if (iVar3 != 0) {
*puVar4 = *puVar4 & ~(0xffffffffffffffffU >> (-(char)iVar3 & 0x3fU));
}
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.