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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
38,400 | js_parse_var | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_var(JSParseState *s, int parse_flags, int tok,
BOOL export_flag)
{
JSContext *ctx = s->ctx;
JSFunctionDef *fd = s->cur_func;
JSAtom name = JS_ATOM_NULL;
for (;;) {
if (s->token.val == TOK_IDENT) {
if (s->token.u.ident.is_reserved) {
return js_parse_error_reserved_identifier(s);
}
name = JS_DupAtom(ctx, s->token.u.ident.atom);
if (name == JS_ATOM_let && (tok == TOK_LET || tok == TOK_CONST)) {
js_parse_error(s, "'let' is not a valid lexical identifier");
goto var_error;
}
if (next_token(s))
goto var_error;
if (js_define_var(s, name, tok))
goto var_error;
if (export_flag) {
if (!add_export_entry(s, s->cur_func->module, name, name,
JS_EXPORT_TYPE_LOCAL))
goto var_error;
}
if (s->token.val == '=') {
if (next_token(s))
goto var_error;
if (tok == TOK_VAR) {
/* Must make a reference for proper `with` semantics */
int opcode, scope, label;
JSAtom name1;
emit_op(s, OP_scope_get_var);
emit_atom(s, name);
emit_u16(s, fd->scope_level);
if (get_lvalue(s, &opcode, &scope, &name1, &label, NULL, FALSE, '=') < 0)
goto var_error;
if (js_parse_assign_expr2(s, parse_flags)) {
JS_FreeAtom(ctx, name1);
goto var_error;
}
set_object_name(s, name);
put_lvalue(s, opcode, scope, name1, label,
PUT_LVALUE_NOKEEP, FALSE);
} else {
if (js_parse_assign_expr2(s, parse_flags))
goto var_error;
set_object_name(s, name);
emit_op(s, (tok == TOK_CONST || tok == TOK_LET) ?
OP_scope_put_var_init : OP_scope_put_var);
emit_atom(s, name);
emit_u16(s, fd->scope_level);
}
} else {
if (tok == TOK_CONST) {
js_parse_error(s, "missing initializer for const variable");
goto var_error;
}
if (tok == TOK_LET) {
/* initialize lexical variable upon entering its scope */
emit_op(s, OP_undefined);
emit_op(s, OP_scope_put_var_init);
emit_atom(s, name);
emit_u16(s, fd->scope_level);
}
}
JS_FreeAtom(ctx, name);
} else {
int skip_bits;
if ((s->token.val == '[' || s->token.val == '{')
&& js_parse_skip_parens_token(s, &skip_bits, FALSE) == '=') {
emit_op(s, OP_undefined);
if (js_parse_destructuring_element(s, tok, 0, TRUE, skip_bits & SKIP_HAS_ELLIPSIS, TRUE) < 0)
return -1;
} else {
return js_parse_error(s, "variable name expected");
}
}
if (s->token.val != ',')
break;
if (next_token(s))
return -1;
}
return 0;
var_error:
JS_FreeAtom(ctx, name);
return -1;
} | O1 | c | js_parse_var:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, 0x18(%rsp)
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x90(%rdi), %rax
movq %rax, 0x20(%rsp)
leal 0x37(%r15), %eax
testl $0xfffffff7, %eax # imm = 0xFFFFFFF7
sete %al
shlb $0x2, %al
orb $-0x48, %al
leaq 0xc(%rsp), %r13
movzbl %al, %eax
movl %eax, 0x2c(%rsp)
movl %ecx, 0x10(%rsp)
movl 0x20(%r14), %eax
cmpl $-0x7d, %eax
jne 0x70beb
cmpl $0x0, 0x40(%r14)
jne 0x70d6e
movslq 0x38(%r14), %r12
cmpq $0xe0, %r12
jl 0x70a81
movq 0x18(%rbx), %rax
movq 0x68(%rax), %rax
movq (%rax,%r12,8), %rax
incl (%rax)
cmpl $0x27, %r12d
jne 0x70a9b
cmpl $-0x2f, %r15d
je 0x70d78
cmpl $-0x37, %r15d
je 0x70d78
movq %r14, %rdi
callq 0x6122b
testl %eax, %eax
jne 0x70d89
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x69fc6
testl %eax, %eax
jne 0x70d89
testl %ebp, %ebp
je 0x70af0
movq (%r14), %rdi
movq 0x90(%r14), %rax
movq 0x220(%rax), %rdx
movq %r14, %rsi
movl %r12d, %ecx
movl %r12d, %r8d
xorl %r9d, %r9d
callq 0x3495d
testq %rax, %rax
je 0x70d89
cmpl $0x3d, 0x20(%r14)
jne 0x70c5f
movq %r14, %rdi
callq 0x6122b
testl %eax, %eax
jne 0x70d89
cmpl $-0x4f, %r15d
jne 0x70cb8
movq 0x90(%r14), %rax
movl $0x138, %ebp # imm = 0x138
leaq (%rax,%rbp), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xb7, %esi
callq 0x1f52c
movq %r14, %rdi
movl %r12d, %esi
callq 0x62c56
movq 0x20(%rsp), %rax
movzwl 0xe8(%rax), %eax
movq 0x90(%r14), %rdi
addq %rbp, %rdi
movw %ax, 0x16(%rsp)
movl $0x2, %edx
leaq 0x16(%rsp), %rsi
callq 0x1f47e
movq %r14, %rdi
movq %r13, %rsi
leaq 0x34(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
leaq 0x30(%rsp), %r8
xorl %r9d, %r9d
pushq $0x3d
pushq $0x0
callq 0x69689
addq $0x10, %rsp
testl %eax, %eax
js 0x70d89
movq %r14, %rdi
movl 0x18(%rsp), %esi
callq 0x6ea8b
testl %eax, %eax
jne 0x70db1
movq %r14, %rdi
movl %r12d, %esi
callq 0x68e7a
movl 0xc(%rsp), %esi
movl 0x34(%rsp), %edx
movl 0x1c(%rsp), %ecx
movl 0x30(%rsp), %r8d
subq $0x8, %rsp
movq %r14, %rdi
xorl %r9d, %r9d
pushq $0x0
callq 0x6a0a4
addq $0x10, %rsp
movl 0x10(%rsp), %ebp
jmp 0x70d33
orl $0x20, %eax
cmpl $0x7b, %eax
jne 0x70d5b
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x6752b
cmpl $0x3d, %eax
jne 0x70d5b
movq 0x90(%r14), %rax
leaq 0x138(%rax), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0x6, %esi
callq 0x1f52c
movl 0xc(%rsp), %r8d
andl $0x2, %r8d
movq %r14, %rdi
movl %r15d, %esi
xorl %edx, %edx
movl $0x1, %ecx
movl $0x1, %r9d
callq 0x678ee
testl %eax, %eax
jns 0x70d3e
jmp 0x70d94
cmpl $-0x2f, %r15d
je 0x70c74
cmpl $-0x37, %r15d
jne 0x70d33
jmp 0x70da8
movq 0x90(%r14), %rax
movl $0x138, %ebp # imm = 0x138
leaq (%rax,%rbp), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0x6, %esi
callq 0x1f52c
movq 0x90(%r14), %rax
leaq (%rax,%rbp), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xbc, %esi
jmp 0x70cf7
movq %r14, %rdi
movl 0x18(%rsp), %esi
callq 0x6ea8b
testl %eax, %eax
jne 0x70d89
movq %r14, %rdi
movl %r12d, %esi
callq 0x68e7a
movq 0x90(%r14), %rax
movl $0x138, %ebp # imm = 0x138
leaq (%rax,%rbp), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl 0x2c(%rsp), %esi
callq 0x1f52c
movq %r14, %rdi
movl %r12d, %esi
callq 0x62c56
movq 0x20(%rsp), %rax
movzwl 0xe8(%rax), %eax
movq 0x90(%r14), %rdi
addq %rbp, %rdi
movl 0x10(%rsp), %ebp
movw %ax, 0xc(%rsp)
movl $0x2, %edx
movq %r13, %rsi
callq 0x1f47e
movq %rbx, %rdi
movl %r12d, %esi
callq 0x24834
cmpl $0x2c, 0x20(%r14)
jne 0x70d57
movq %r14, %rdi
callq 0x6122b
testl %eax, %eax
je 0x70a4e
jmp 0x70d94
xorl %eax, %eax
jmp 0x70d99
leaq 0x3483e(%rip), %rsi # 0xa55a0
movq %r14, %rdi
xorl %eax, %eax
callq 0x33d45
jmp 0x70d94
movq %r14, %rdi
callq 0x66cb9
jmp 0x70d94
leaq 0x347d2(%rip), %rsi # 0xa5551
movq %r14, %rdi
xorl %eax, %eax
callq 0x33d45
movq %rbx, %rdi
movl %r12d, %esi
callq 0x24834
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x347ca(%rip), %rsi # 0xa5579
jmp 0x70d7f
movl 0x1c(%rsp), %esi
movq %rbx, %rdi
callq 0x24834
jmp 0x70d89
| js_parse_var:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov ebp, ecx
mov r15d, edx
mov [rsp+68h+var_50], esi
mov r14, rdi
mov rbx, [rdi]
mov rax, [rdi+90h]
mov [rsp+68h+var_48], rax
lea eax, [r15+37h]
test eax, 0FFFFFFF7h
setz al
shl al, 2
or al, 0B8h
lea r13, [rsp+68h+var_5C]
movzx eax, al
mov [rsp+68h+var_3C], eax
mov [rsp+68h+var_58], ecx
loc_70A4E:
mov eax, [r14+20h]
cmp eax, 0FFFFFF83h
jnz loc_70BEB
cmp dword ptr [r14+40h], 0
jnz loc_70D6E
movsxd r12, dword ptr [r14+38h]
cmp r12, 0E0h
jl short loc_70A81
mov rax, [rbx+18h]
mov rax, [rax+68h]
mov rax, [rax+r12*8]
inc dword ptr [rax]
loc_70A81:
cmp r12d, 27h ; '''
jnz short loc_70A9B
cmp r15d, 0FFFFFFD1h
jz loc_70D78
cmp r15d, 0FFFFFFC9h
jz loc_70D78
loc_70A9B:
mov rdi, r14
call next_token
test eax, eax
jnz loc_70D89
mov rdi, r14
mov esi, r12d
mov edx, r15d
call js_define_var
test eax, eax
jnz loc_70D89
test ebp, ebp
jz short loc_70AF0
mov rdi, [r14]
mov rax, [r14+90h]
mov rdx, [rax+220h]
mov rsi, r14
mov ecx, r12d
mov r8d, r12d
xor r9d, r9d
call add_export_entry2
test rax, rax
jz loc_70D89
loc_70AF0:
cmp dword ptr [r14+20h], 3Dh ; '='
jnz loc_70C5F
mov rdi, r14
call next_token
test eax, eax
jnz loc_70D89
cmp r15d, 0FFFFFFB1h
jnz loc_70CB8
mov rax, [r14+90h]
mov ebp, 138h
lea rdi, [rax+rbp]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0B7h
call dbuf_putc
mov rdi, r14
mov esi, r12d
call emit_atom
mov rax, [rsp+68h+var_48]
movzx eax, word ptr [rax+0E8h]
mov rdi, [r14+90h]
add rdi, rbp
mov [rsp+68h+var_52], ax
mov edx, 2
lea rsi, [rsp+68h+var_52]
call dbuf_put
mov rdi, r14
mov rsi, r13
lea rdx, [rsp+68h+var_34]
lea rcx, [rsp+68h+var_4C]
lea r8, [rsp+68h+var_38]
xor r9d, r9d
push 3Dh ; '='
push 0
call get_lvalue
add rsp, 10h
test eax, eax
js loc_70D89
mov rdi, r14
mov esi, [rsp+68h+var_50]
call js_parse_assign_expr2
test eax, eax
jnz loc_70DB1
mov rdi, r14
mov esi, r12d
call set_object_name
mov esi, [rsp+68h+var_5C]
mov edx, [rsp+68h+var_34]
mov ecx, [rsp+68h+var_4C]
mov r8d, [rsp+68h+var_38]
sub rsp, 8
mov rdi, r14
xor r9d, r9d
push 0
call put_lvalue
add rsp, 10h
mov ebp, [rsp+68h+var_58]
jmp loc_70D33
loc_70BEB:
or eax, 20h
cmp eax, 7Bh ; '{'
jnz loc_70D5B
mov rdi, r14
mov rsi, r13
xor edx, edx
call js_parse_skip_parens_token
cmp eax, 3Dh ; '='
jnz loc_70D5B
mov rax, [r14+90h]
lea rdi, [rax+138h]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 6
call dbuf_putc
mov r8d, [rsp+68h+var_5C]
and r8d, 2
mov rdi, r14
mov esi, r15d
xor edx, edx
mov ecx, 1
mov r9d, 1
call js_parse_destructuring_element
test eax, eax
jns loc_70D3E
jmp loc_70D94
loc_70C5F:
cmp r15d, 0FFFFFFD1h
jz short loc_70C74
cmp r15d, 0FFFFFFC9h
jnz loc_70D33
jmp loc_70DA8
loc_70C74:
mov rax, [r14+90h]
mov ebp, 138h
lea rdi, [rax+rbp]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 6
call dbuf_putc
mov rax, [r14+90h]
lea rdi, [rax+rbp]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0BCh
jmp short loc_70CF7
loc_70CB8:
mov rdi, r14
mov esi, [rsp+68h+var_50]
call js_parse_assign_expr2
test eax, eax
jnz loc_70D89
mov rdi, r14
mov esi, r12d
call set_object_name
mov rax, [r14+90h]
mov ebp, 138h
lea rdi, [rax+rbp]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, [rsp+68h+var_3C]
loc_70CF7:
call dbuf_putc
mov rdi, r14
mov esi, r12d
call emit_atom
mov rax, [rsp+68h+var_48]
movzx eax, word ptr [rax+0E8h]
mov rdi, [r14+90h]
add rdi, rbp
mov ebp, [rsp+68h+var_58]
mov word ptr [rsp+68h+var_5C], ax
mov edx, 2
mov rsi, r13
call dbuf_put
loc_70D33:
mov rdi, rbx
mov esi, r12d
call JS_FreeAtom
loc_70D3E:
cmp dword ptr [r14+20h], 2Ch ; ','
jnz short loc_70D57
mov rdi, r14
call next_token
test eax, eax
jz loc_70A4E
jmp short loc_70D94
loc_70D57:
xor eax, eax
jmp short loc_70D99
loc_70D5B:
lea rsi, aVariableNameEx; "variable name expected"
mov rdi, r14
xor eax, eax
call js_parse_error
jmp short loc_70D94
loc_70D6E:
mov rdi, r14
call js_parse_error_reserved_identifier
jmp short loc_70D94
loc_70D78:
lea rsi, aLetIsNotAValid; "'let' is not a valid lexical identifier"
loc_70D7F:
mov rdi, r14
xor eax, eax
call js_parse_error
loc_70D89:
mov rdi, rbx
mov esi, r12d
call JS_FreeAtom
loc_70D94:
mov eax, 0FFFFFFFFh
loc_70D99:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_70DA8:
lea rsi, aMissingInitial; "missing initializer for const variable"
jmp short loc_70D7F
loc_70DB1:
mov esi, [rsp+68h+var_4C]
mov rdi, rbx
call JS_FreeAtom
jmp short loc_70D89
| long long js_parse_var(
__m128 *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; // ebp
unsigned int v15; // r15d
long long v17; // rbx
__int32 v18; // eax
long long v19; // r12
_DWORD *v20; // rax
long long v21; // rcx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long v26; // rsi
long long v27; // rdx
long long v28; // rcx
long long v29; // r8
long long v30; // r9
__m128 v31; // xmm4
__m128 v32; // xmm5
unsigned long long v33; // rax
_QWORD *v34; // rdi
__m128 v35; // xmm4
__m128 v36; // xmm5
long long v37; // rdx
long long v38; // rcx
long long v39; // r8
long long v40; // r9
__m128 v41; // xmm4
__m128 v42; // xmm5
unsigned long long v43; // rax
__m128 v44; // xmm4
__m128 v45; // xmm5
long long v46; // rdx
long long v47; // rcx
long long v48; // r8
long long v49; // r9
__m128 v50; // xmm4
__m128 v51; // xmm5
unsigned long long v52; // rax
unsigned long long v53; // rax
_QWORD *v54; // rdi
char v55; // si
unsigned long long v56; // rax
_QWORD *v57; // rdi
const char *v59; // rsi
char v60; // [rsp+0h] [rbp-68h]
int v61; // [rsp+Ch] [rbp-5Ch] BYREF
int v62; // [rsp+10h] [rbp-58h]
__int16 v63; // [rsp+16h] [rbp-52h] BYREF
unsigned int v64; // [rsp+18h] [rbp-50h]
int v65; // [rsp+1Ch] [rbp-4Ch] BYREF
unsigned long long v66; // [rsp+20h] [rbp-48h]
int v67; // [rsp+2Ch] [rbp-3Ch]
int v68; // [rsp+30h] [rbp-38h] BYREF
_DWORD v69[13]; // [rsp+34h] [rbp-34h] BYREF
v14 = a4;
v15 = a3;
v64 = a2;
v17 = a1->m128_u64[0];
v66 = a1[9].m128_u64[0];
v67 = (unsigned __int8)(4 * ((((_DWORD)a3 + 55) & 0xFFFFFFF7) == 0)) | 0xB8;
v62 = a4;
while ( 1 )
{
v18 = a1[2].m128_i32[0];
if ( v18 == -125 )
break;
if ( (v18 | 0x20) != 0x7B
|| (unsigned int)js_parse_skip_parens_token(
(long long)a1,
(char *)&v61,
0LL,
a4,
a5,
a6,
*(double *)a7.m128_u64,
a8,
a9,
a10,
a11,
a12,
a13,
a14) != 61 )
{
js_parse_error(
(long long *)a1,
(long long)"variable name expected",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v60);
return 0xFFFFFFFFLL;
}
v43 = a1[9].m128_u64[0];
*(_DWORD *)(v43 + 360) = *(_DWORD *)(v43 + 320);
dbuf_putc((_QWORD *)(v43 + 312), 6);
a2 = v15;
if ( (int)js_parse_destructuring_element(
(long long)a1,
v15,
0,
1LL,
v61 & 2,
1LL,
a7,
a8,
a9,
a10,
v44,
v45,
a13,
a14) < 0 )
return 0xFFFFFFFFLL;
LABEL_31:
if ( a1[2].m128_i32[0] != 44 )
return 0LL;
if ( (unsigned int)next_token((long long)a1, a7, a8, a9, a10, v50, v51, a13, a14, a2, v46, v47, v48, v49) )
return 0xFFFFFFFFLL;
}
if ( a1[4].m128_i32[0] )
{
js_parse_error_reserved_identifier(
(int *)a1,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14);
return 0xFFFFFFFFLL;
}
v19 = a1[3].m128_i32[2];
if ( v19 >= 224 )
{
v20 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(v17 + 24) + 104LL) + 8 * v19);
++*v20;
}
if ( (_DWORD)v19 == 39 && (v15 == -47 || v15 == -55) )
{
v59 = "'let' is not a valid lexical identifier";
goto LABEL_38;
}
if ( (unsigned int)next_token((long long)a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6) )
goto LABEL_39;
v26 = (unsigned int)v19;
if ( (unsigned int)js_define_var((long long *)a1, v19, v15, v21, v22, v23, a7, a8, a9, a10, v24, v25, a13, a14) )
goto LABEL_39;
if ( v14 )
{
v26 = (long long)a1;
if ( !add_export_entry2(
a1->m128_u64[0],
(long long *)a1,
*(_QWORD *)(a1[9].m128_u64[0] + 544),
v19,
v19,
0,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14) )
goto LABEL_39;
}
if ( a1[2].m128_i32[0] != 61 )
{
if ( v15 == -47 )
{
v52 = a1[9].m128_u64[0];
*(_DWORD *)(v52 + 360) = *(_DWORD *)(v52 + 320);
dbuf_putc((_QWORD *)(v52 + 312), 6);
v53 = a1[9].m128_u64[0];
v54 = (_QWORD *)(v53 + 312);
*(_DWORD *)(v53 + 360) = *(_DWORD *)(v53 + 320);
v55 = -68;
LABEL_29:
dbuf_putc(v54, v55);
emit_atom(a1, v19);
v57 = (_QWORD *)(a1[9].m128_u64[0] + 312);
v14 = v62;
LOWORD(v61) = *(_WORD *)(v66 + 232);
dbuf_put(v57, (long long)&v61, 2LL);
goto LABEL_30;
}
if ( v15 != -55 )
goto LABEL_30;
v59 = "missing initializer for const variable";
LABEL_38:
js_parse_error((long long *)a1, (long long)v59, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v60);
goto LABEL_39;
}
if ( (unsigned int)next_token((long long)a1, a7, a8, a9, a10, a11, a12, a13, a14, v26, a3, a4, a5, a6) )
goto LABEL_39;
if ( v15 != -79 )
{
if ( (unsigned int)js_parse_assign_expr2(a1, v64, v27, v28, v29, v30, a7, a8, a9, a10, v31, v32, a13, a14) )
goto LABEL_39;
set_object_name((long long *)a1, v19);
v56 = a1[9].m128_u64[0];
v54 = (_QWORD *)(v56 + 312);
*(_DWORD *)(v56 + 360) = *(_DWORD *)(v56 + 320);
v55 = v67;
goto LABEL_29;
}
v33 = a1[9].m128_u64[0];
*(_DWORD *)(v33 + 360) = *(_DWORD *)(v33 + 320);
dbuf_putc((_QWORD *)(v33 + 312), 183);
emit_atom(a1, v19);
v34 = (_QWORD *)(a1[9].m128_u64[0] + 312);
v63 = *(_WORD *)(v66 + 232);
dbuf_put(v34, (long long)&v63, 2LL);
if ( (int)get_lvalue(
(long long *)a1,
&v61,
(long long)v69,
(long long)&v65,
(long long)&v68,
0LL,
a7,
a8,
a9,
a10,
v35,
v36,
a13,
a14,
0,
61) < 0 )
goto LABEL_39;
if ( !(unsigned int)js_parse_assign_expr2(a1, v64, v37, v38, v39, v40, a7, a8, a9, a10, v41, v42, a13, a14) )
{
set_object_name((long long *)a1, v19);
put_lvalue((long long *)a1, v61, v69[0], v65, v68, 0, 0);
v14 = v62;
LABEL_30:
a2 = (unsigned int)v19;
JS_FreeAtom(v17, v19);
goto LABEL_31;
}
JS_FreeAtom(v17, v65);
LABEL_39:
JS_FreeAtom(v17, v19);
return 0xFFFFFFFFLL;
}
| js_parse_var:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EBP,ECX
MOV R15D,EDX
MOV dword ptr [RSP + 0x18],ESI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x90]
MOV qword ptr [RSP + 0x20],RAX
LEA EAX,[R15 + 0x37]
TEST EAX,0xfffffff7
SETZ AL
SHL AL,0x2
OR AL,0xb8
LEA R13,[RSP + 0xc]
MOVZX EAX,AL
MOV dword ptr [RSP + 0x2c],EAX
MOV dword ptr [RSP + 0x10],ECX
LAB_00170a4e:
MOV EAX,dword ptr [R14 + 0x20]
CMP EAX,-0x7d
JNZ 0x00170beb
CMP dword ptr [R14 + 0x40],0x0
JNZ 0x00170d6e
MOVSXD R12,dword ptr [R14 + 0x38]
CMP R12,0xe0
JL 0x00170a81
MOV RAX,qword ptr [RBX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R12*0x8]
INC dword ptr [RAX]
LAB_00170a81:
CMP R12D,0x27
JNZ 0x00170a9b
CMP R15D,-0x2f
JZ 0x00170d78
CMP R15D,-0x37
JZ 0x00170d78
LAB_00170a9b:
MOV RDI,R14
CALL 0x0016122b
TEST EAX,EAX
JNZ 0x00170d89
MOV RDI,R14
MOV ESI,R12D
MOV EDX,R15D
CALL 0x00169fc6
TEST EAX,EAX
JNZ 0x00170d89
TEST EBP,EBP
JZ 0x00170af0
MOV RDI,qword ptr [R14]
MOV RAX,qword ptr [R14 + 0x90]
MOV RDX,qword ptr [RAX + 0x220]
MOV RSI,R14
MOV ECX,R12D
MOV R8D,R12D
XOR R9D,R9D
CALL 0x0013495d
TEST RAX,RAX
JZ 0x00170d89
LAB_00170af0:
CMP dword ptr [R14 + 0x20],0x3d
JNZ 0x00170c5f
MOV RDI,R14
CALL 0x0016122b
TEST EAX,EAX
JNZ 0x00170d89
CMP R15D,-0x4f
JNZ 0x00170cb8
MOV RAX,qword ptr [R14 + 0x90]
MOV EBP,0x138
LEA RDI,[RAX + RBP*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0xb7
CALL 0x0011f52c
MOV RDI,R14
MOV ESI,R12D
CALL 0x00162c56
MOV RAX,qword ptr [RSP + 0x20]
MOVZX EAX,word ptr [RAX + 0xe8]
MOV RDI,qword ptr [R14 + 0x90]
ADD RDI,RBP
MOV word ptr [RSP + 0x16],AX
MOV EDX,0x2
LEA RSI,[RSP + 0x16]
CALL 0x0011f47e
MOV RDI,R14
MOV RSI,R13
LEA RDX,[RSP + 0x34]
LEA RCX,[RSP + 0x1c]
LEA R8,[RSP + 0x30]
XOR R9D,R9D
PUSH 0x3d
PUSH 0x0
CALL 0x00169689
ADD RSP,0x10
TEST EAX,EAX
JS 0x00170d89
MOV RDI,R14
MOV ESI,dword ptr [RSP + 0x18]
CALL 0x0016ea8b
TEST EAX,EAX
JNZ 0x00170db1
MOV RDI,R14
MOV ESI,R12D
CALL 0x00168e7a
MOV ESI,dword ptr [RSP + 0xc]
MOV EDX,dword ptr [RSP + 0x34]
MOV ECX,dword ptr [RSP + 0x1c]
MOV R8D,dword ptr [RSP + 0x30]
SUB RSP,0x8
MOV RDI,R14
XOR R9D,R9D
PUSH 0x0
CALL 0x0016a0a4
ADD RSP,0x10
MOV EBP,dword ptr [RSP + 0x10]
JMP 0x00170d33
LAB_00170beb:
OR EAX,0x20
CMP EAX,0x7b
JNZ 0x00170d5b
MOV RDI,R14
MOV RSI,R13
XOR EDX,EDX
CALL 0x0016752b
CMP EAX,0x3d
JNZ 0x00170d5b
MOV RAX,qword ptr [R14 + 0x90]
LEA RDI,[RAX + 0x138]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0x6
CALL 0x0011f52c
MOV R8D,dword ptr [RSP + 0xc]
AND R8D,0x2
MOV RDI,R14
MOV ESI,R15D
XOR EDX,EDX
MOV ECX,0x1
MOV R9D,0x1
CALL 0x001678ee
TEST EAX,EAX
JNS 0x00170d3e
JMP 0x00170d94
LAB_00170c5f:
CMP R15D,-0x2f
JZ 0x00170c74
CMP R15D,-0x37
JNZ 0x00170d33
JMP 0x00170da8
LAB_00170c74:
MOV RAX,qword ptr [R14 + 0x90]
MOV EBP,0x138
LEA RDI,[RAX + RBP*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0x6
CALL 0x0011f52c
MOV RAX,qword ptr [R14 + 0x90]
LEA RDI,[RAX + RBP*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0xbc
JMP 0x00170cf7
LAB_00170cb8:
MOV RDI,R14
MOV ESI,dword ptr [RSP + 0x18]
CALL 0x0016ea8b
TEST EAX,EAX
JNZ 0x00170d89
MOV RDI,R14
MOV ESI,R12D
CALL 0x00168e7a
MOV RAX,qword ptr [R14 + 0x90]
MOV EBP,0x138
LEA RDI,[RAX + RBP*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,dword ptr [RSP + 0x2c]
LAB_00170cf7:
CALL 0x0011f52c
MOV RDI,R14
MOV ESI,R12D
CALL 0x00162c56
MOV RAX,qword ptr [RSP + 0x20]
MOVZX EAX,word ptr [RAX + 0xe8]
MOV RDI,qword ptr [R14 + 0x90]
ADD RDI,RBP
MOV EBP,dword ptr [RSP + 0x10]
MOV word ptr [RSP + 0xc],AX
MOV EDX,0x2
MOV RSI,R13
CALL 0x0011f47e
LAB_00170d33:
MOV RDI,RBX
MOV ESI,R12D
CALL 0x00124834
LAB_00170d3e:
CMP dword ptr [R14 + 0x20],0x2c
JNZ 0x00170d57
MOV RDI,R14
CALL 0x0016122b
TEST EAX,EAX
JZ 0x00170a4e
JMP 0x00170d94
LAB_00170d57:
XOR EAX,EAX
JMP 0x00170d99
LAB_00170d5b:
LEA RSI,[0x1a55a0]
MOV RDI,R14
XOR EAX,EAX
CALL 0x00133d45
JMP 0x00170d94
LAB_00170d6e:
MOV RDI,R14
CALL 0x00166cb9
JMP 0x00170d94
LAB_00170d78:
LEA RSI,[0x1a5551]
LAB_00170d7f:
MOV RDI,R14
XOR EAX,EAX
CALL 0x00133d45
LAB_00170d89:
MOV RDI,RBX
MOV ESI,R12D
CALL 0x00124834
LAB_00170d94:
MOV EAX,0xffffffff
LAB_00170d99:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00170da8:
LEA RSI,[0x1a5579]
JMP 0x00170d7f
LAB_00170db1:
MOV ESI,dword ptr [RSP + 0x1c]
MOV RDI,RBX
CALL 0x00124834
JMP 0x00170d89
|
int8 js_parse_var(long *param_1,int4 param_2,int param_3,int param_4)
{
long lVar1;
int *piVar2;
int iVar3;
int iVar4;
long lVar5;
uint uVar6;
char *pcVar7;
uint local_5c;
int local_58;
int2 local_52;
int4 local_50;
int4 local_4c;
long local_48;
uint local_3c;
int4 local_38;
int4 local_34;
lVar1 = *param_1;
local_48 = param_1[0x12];
local_3c = (uint)(byte)(((param_3 + 0x37U & 0xfffffff7) == 0) << 2 | 0xb8);
local_58 = param_4;
local_50 = param_2;
do {
if (*(uint *)(param_1 + 4) == 0xffffff83) {
if ((int)param_1[8] != 0) {
js_parse_error_reserved_identifier(param_1);
return 0xffffffff;
}
iVar4 = (int)param_1[7];
if (0xdf < (long)iVar4) {
piVar2 = *(int **)(*(long *)(*(long *)(lVar1 + 0x18) + 0x68) + (long)iVar4 * 8);
*piVar2 = *piVar2 + 1;
}
if ((iVar4 == 0x27) && ((param_3 == -0x2f || (param_3 == -0x37)))) {
pcVar7 = "\'let\' is not a valid lexical identifier";
LAB_00170d7f:
js_parse_error(param_1,pcVar7);
LAB_00170d89:
JS_FreeAtom(lVar1,iVar4);
return 0xffffffff;
}
iVar3 = next_token(param_1);
if ((iVar3 != 0) ||
((iVar3 = js_define_var(param_1,iVar4,param_3), iVar3 != 0 ||
((param_4 != 0 &&
(lVar5 = add_export_entry2(*param_1,param_1,*(int8 *)(param_1[0x12] + 0x220),iVar4,
iVar4,0), lVar5 == 0)))))) goto LAB_00170d89;
if ((int)param_1[4] == 0x3d) {
iVar3 = next_token(param_1);
if (iVar3 != 0) goto LAB_00170d89;
if (param_3 != -0x4f) {
iVar3 = js_parse_assign_expr2(param_1,local_50);
if (iVar3 != 0) goto LAB_00170d89;
set_object_name(param_1,iVar4);
lVar5 = param_1[0x12];
*(int4 *)(lVar5 + 0x168) = *(int4 *)(lVar5 + 0x140);
uVar6 = local_3c;
goto LAB_00170cf7;
}
lVar5 = param_1[0x12];
*(int4 *)(lVar5 + 0x168) = *(int4 *)(lVar5 + 0x140);
dbuf_putc(lVar5 + 0x138,0xb7);
emit_atom(param_1,iVar4);
local_52 = *(int2 *)(local_48 + 0xe8);
dbuf_put(param_1[0x12] + 0x138,&local_52,2);
iVar3 = get_lvalue(param_1,&local_5c,&local_34,&local_4c,&local_38,0,0,0x3d);
if (iVar3 < 0) goto LAB_00170d89;
iVar3 = js_parse_assign_expr2(param_1,local_50);
if (iVar3 != 0) {
JS_FreeAtom(lVar1,local_4c);
goto LAB_00170d89;
}
set_object_name(param_1,iVar4);
put_lvalue(param_1,local_5c,local_34,local_4c,local_38,0,0);
param_4 = local_58;
}
else {
if (param_3 != -0x2f) {
if (param_3 != -0x37) goto LAB_00170d33;
pcVar7 = "missing initializer for const variable";
goto LAB_00170d7f;
}
lVar5 = param_1[0x12];
*(int4 *)(lVar5 + 0x168) = *(int4 *)(lVar5 + 0x140);
dbuf_putc(lVar5 + 0x138,6);
lVar5 = param_1[0x12];
*(int4 *)(lVar5 + 0x168) = *(int4 *)(lVar5 + 0x140);
uVar6 = 0xbc;
LAB_00170cf7:
dbuf_putc(lVar5 + 0x138,uVar6);
emit_atom(param_1,iVar4);
param_4 = local_58;
local_5c = CONCAT22(local_5c._2_2_,*(int2 *)(local_48 + 0xe8));
dbuf_put(param_1[0x12] + 0x138,&local_5c,2);
}
LAB_00170d33:
JS_FreeAtom(lVar1,iVar4);
}
else {
if (((*(uint *)(param_1 + 4) | 0x20) != 0x7b) ||
(iVar4 = js_parse_skip_parens_token(param_1,&local_5c,0), iVar4 != 0x3d)) {
js_parse_error(param_1,"variable name expected");
return 0xffffffff;
}
lVar5 = param_1[0x12];
*(int4 *)(lVar5 + 0x168) = *(int4 *)(lVar5 + 0x140);
dbuf_putc(lVar5 + 0x138,6);
iVar4 = js_parse_destructuring_element(param_1,param_3,0,1,local_5c & 2,1);
if (iVar4 < 0) {
return 0xffffffff;
}
}
if ((int)param_1[4] != 0x2c) {
return 0;
}
iVar4 = next_token(param_1);
if (iVar4 != 0) {
return 0xffffffff;
}
} while( true );
}
| |
38,401 | js_parse_var | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_var(JSParseState *s, int parse_flags, int tok,
BOOL export_flag)
{
JSContext *ctx = s->ctx;
JSFunctionDef *fd = s->cur_func;
JSAtom name = JS_ATOM_NULL;
for (;;) {
if (s->token.val == TOK_IDENT) {
if (s->token.u.ident.is_reserved) {
return js_parse_error_reserved_identifier(s);
}
name = JS_DupAtom(ctx, s->token.u.ident.atom);
if (name == JS_ATOM_let && (tok == TOK_LET || tok == TOK_CONST)) {
js_parse_error(s, "'let' is not a valid lexical identifier");
goto var_error;
}
if (next_token(s))
goto var_error;
if (js_define_var(s, name, tok))
goto var_error;
if (export_flag) {
if (!add_export_entry(s, s->cur_func->module, name, name,
JS_EXPORT_TYPE_LOCAL))
goto var_error;
}
if (s->token.val == '=') {
if (next_token(s))
goto var_error;
if (tok == TOK_VAR) {
/* Must make a reference for proper `with` semantics */
int opcode, scope, label;
JSAtom name1;
emit_op(s, OP_scope_get_var);
emit_atom(s, name);
emit_u16(s, fd->scope_level);
if (get_lvalue(s, &opcode, &scope, &name1, &label, NULL, FALSE, '=') < 0)
goto var_error;
if (js_parse_assign_expr2(s, parse_flags)) {
JS_FreeAtom(ctx, name1);
goto var_error;
}
set_object_name(s, name);
put_lvalue(s, opcode, scope, name1, label,
PUT_LVALUE_NOKEEP, FALSE);
} else {
if (js_parse_assign_expr2(s, parse_flags))
goto var_error;
set_object_name(s, name);
emit_op(s, (tok == TOK_CONST || tok == TOK_LET) ?
OP_scope_put_var_init : OP_scope_put_var);
emit_atom(s, name);
emit_u16(s, fd->scope_level);
}
} else {
if (tok == TOK_CONST) {
js_parse_error(s, "missing initializer for const variable");
goto var_error;
}
if (tok == TOK_LET) {
/* initialize lexical variable upon entering its scope */
emit_op(s, OP_undefined);
emit_op(s, OP_scope_put_var_init);
emit_atom(s, name);
emit_u16(s, fd->scope_level);
}
}
JS_FreeAtom(ctx, name);
} else {
int skip_bits;
if ((s->token.val == '[' || s->token.val == '{')
&& js_parse_skip_parens_token(s, &skip_bits, FALSE) == '=') {
emit_op(s, OP_undefined);
if (js_parse_destructuring_element(s, tok, 0, TRUE, skip_bits & SKIP_HAS_ELLIPSIS, TRUE) < 0)
return -1;
} else {
return js_parse_error(s, "variable name expected");
}
}
if (s->token.val != ',')
break;
if (next_token(s))
return -1;
}
return 0;
var_error:
JS_FreeAtom(ctx, name);
return -1;
} | O2 | c | js_parse_var:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, 0x8(%rsp)
movq %rdi, %r15
movq (%rdi), %r14
movq 0x90(%rdi), %rax
movq %rax, 0x10(%rsp)
leal 0x37(%r12), %eax
testl $0xfffffff7, %eax # imm = 0xFFFFFFF7
sete %al
shlb $0x2, %al
orb $-0x48, %al
movzbl %al, %eax
movl %eax, 0x1c(%rsp)
pushq $0x1
popq %r13
movl 0x20(%r15), %eax
cmpl $-0x7d, %eax
jne 0x5f620
cmpl $0x0, 0x40(%r15)
jne 0x5f846
movslq 0x38(%r15), %rbx
cmpq $0xe0, %rbx
jl 0x5f678
movq 0x18(%r14), %rax
movq 0x68(%rax), %rax
movq (%rax,%rbx,8), %rax
incl (%rax)
jmp 0x5f691
orl $0x20, %eax
cmpl $0x7b, %eax
jne 0x5f833
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
xorl %edx, %edx
callq 0x58b5b
cmpl $0x3d, %eax
jne 0x5f833
movq %r15, %rdi
pushq $0x6
popq %rsi
callq 0x535cb
movl 0x4(%rsp), %r8d
andl $0x2, %r8d
movq %r15, %rdi
movl %r12d, %esi
xorl %edx, %edx
movl %r13d, %ecx
movl %r13d, %r9d
callq 0x58eb3
testl %eax, %eax
jns 0x5f816
jmp 0x5f882
cmpl $0x27, %ebx
jne 0x5f691
cmpl $-0x2f, %r12d
je 0x5f850
cmpl $-0x37, %r12d
je 0x5f850
movq %r15, %rdi
callq 0x535fe
testl %eax, %eax
jne 0x5f878
movq %r15, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x5aba7
testl %eax, %eax
jne 0x5f878
testl %ebp, %ebp
je 0x5f6e0
movq 0x90(%r15), %rax
movq 0x220(%rax), %rsi
movq %r15, %rdi
movl %ebx, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x5a02c
testq %rax, %rax
je 0x5f878
cmpl $0x3d, 0x20(%r15)
jne 0x5f7a1
movq %r15, %rdi
callq 0x535fe
testl %eax, %eax
jne 0x5f878
movq %r15, %rdi
cmpl $-0x4f, %r12d
jne 0x5f7c7
movl $0xb7, %esi
callq 0x535cb
movq %r15, %rdi
movl %ebx, %esi
callq 0x54cac
movq 0x10(%rsp), %rax
movzwl 0xe8(%rax), %esi
movq %r15, %rdi
callq 0x535ea
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
leaq 0x24(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x20(%rsp), %r8
xorl %r9d, %r9d
pushq $0x3d
pushq $0x0
callq 0x5a39f
popq %rcx
popq %rdx
testl %eax, %eax
js 0x5f878
movq %r15, %rdi
movl 0x8(%rsp), %esi
callq 0x5e007
testl %eax, %eax
jne 0x5f86c
movq %r15, %rdi
movl %ebx, %esi
callq 0x59c6e
movl 0x4(%rsp), %esi
movl 0x24(%rsp), %edx
movl 0xc(%rsp), %ecx
movl 0x20(%rsp), %r8d
subq $0x8, %rsp
movq %r15, %rdi
xorl %r9d, %r9d
pushq $0x0
callq 0x5ac62
popq %rax
popq %rcx
jmp 0x5f80c
cmpl $-0x2f, %r12d
je 0x5f7b2
cmpl $-0x37, %r12d
jne 0x5f80c
jmp 0x5f859
movq %r15, %rdi
pushq $0x6
popq %rsi
callq 0x535cb
movq %r15, %rdi
movl $0xbc, %esi
jmp 0x5f7e9
movl 0x8(%rsp), %esi
callq 0x5e007
testl %eax, %eax
jne 0x5f878
movq %r15, %rdi
movl %ebx, %esi
callq 0x59c6e
movq %r15, %rdi
movl 0x1c(%rsp), %esi
callq 0x535cb
movq %r15, %rdi
movl %ebx, %esi
callq 0x54cac
movq 0x10(%rsp), %rax
movzwl 0xe8(%rax), %esi
movq %r15, %rdi
callq 0x535ea
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e545
cmpl $0x2c, 0x20(%r15)
jne 0x5f82f
movq %r15, %rdi
callq 0x535fe
testl %eax, %eax
je 0x5f5ef
jmp 0x5f882
xorl %eax, %eax
jmp 0x5f885
leaq 0x2bca0(%rip), %rsi # 0x8b4da
movq %r15, %rdi
xorl %eax, %eax
callq 0x2c007
jmp 0x5f882
movq %r15, %rdi
callq 0x5852f
jmp 0x5f882
leaq 0x2bc34(%rip), %rsi # 0x8b48b
jmp 0x5f860
leaq 0x2bc53(%rip), %rsi # 0x8b4b3
movq %r15, %rdi
xorl %eax, %eax
callq 0x2c007
jmp 0x5f878
movl 0xc(%rsp), %esi
movq %r14, %rdi
callq 0x1e545
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e545
pushq $-0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_parse_var:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, ecx
mov r12d, edx
mov [rsp+58h+var_50], esi
mov r15, rdi
mov r14, [rdi]
mov rax, [rdi+90h]
mov [rsp+58h+var_48], rax
lea eax, [r12+37h]
test eax, 0FFFFFFF7h
setz al
shl al, 2
or al, 0B8h
movzx eax, al
mov [rsp+58h+var_3C], eax
push 1
pop r13
loc_5F5EF:
mov eax, [r15+20h]
cmp eax, 0FFFFFF83h
jnz short loc_5F620
cmp dword ptr [r15+40h], 0
jnz loc_5F846
movsxd rbx, dword ptr [r15+38h]
cmp rbx, 0E0h
jl short loc_5F678
mov rax, [r14+18h]
mov rax, [rax+68h]
mov rax, [rax+rbx*8]
inc dword ptr [rax]
jmp short loc_5F691
loc_5F620:
or eax, 20h
cmp eax, 7Bh ; '{'
jnz loc_5F833
mov rdi, r15
lea rsi, [rsp+58h+var_54]
xor edx, edx
call js_parse_skip_parens_token
cmp eax, 3Dh ; '='
jnz loc_5F833
mov rdi, r15
push 6
pop rsi
call emit_op
mov r8d, [rsp+58h+var_54]
and r8d, 2
mov rdi, r15
mov esi, r12d
xor edx, edx
mov ecx, r13d
mov r9d, r13d
call js_parse_destructuring_element
test eax, eax
jns loc_5F816
jmp loc_5F882
loc_5F678:
cmp ebx, 27h ; '''
jnz short loc_5F691
cmp r12d, 0FFFFFFD1h
jz loc_5F850
cmp r12d, 0FFFFFFC9h
jz loc_5F850
loc_5F691:
mov rdi, r15
call next_token
test eax, eax
jnz loc_5F878
mov rdi, r15
mov esi, ebx
mov edx, r12d
call js_define_var
test eax, eax
jnz loc_5F878
test ebp, ebp
jz short loc_5F6E0
mov rax, [r15+90h]
mov rsi, [rax+220h]
mov rdi, r15
mov edx, ebx
mov ecx, ebx
xor r8d, r8d
call add_export_entry
test rax, rax
jz loc_5F878
loc_5F6E0:
cmp dword ptr [r15+20h], 3Dh ; '='
jnz loc_5F7A1
mov rdi, r15
call next_token
test eax, eax
jnz loc_5F878
mov rdi, r15
cmp r12d, 0FFFFFFB1h
jnz loc_5F7C7
mov esi, 0B7h
call emit_op
mov rdi, r15
mov esi, ebx
call emit_atom
mov rax, [rsp+58h+var_48]
movzx esi, word ptr [rax+0E8h]
mov rdi, r15
call emit_u16
mov rdi, r15
lea rsi, [rsp+58h+var_54]
lea rdx, [rsp+58h+var_34]
lea rcx, [rsp+58h+var_4C]
lea r8, [rsp+58h+var_38]
xor r9d, r9d
push 3Dh ; '='
push 0
call get_lvalue
pop rcx
pop rdx
test eax, eax
js loc_5F878
mov rdi, r15
mov esi, [rsp+58h+var_50]
call js_parse_assign_expr2
test eax, eax
jnz loc_5F86C
mov rdi, r15
mov esi, ebx
call set_object_name
mov esi, [rsp+58h+var_54]
mov edx, [rsp+58h+var_34]
mov ecx, [rsp+58h+var_4C]
mov r8d, [rsp+58h+var_38]
sub rsp, 8
mov rdi, r15
xor r9d, r9d
push 0
call put_lvalue
pop rax
pop rcx
jmp short loc_5F80C
loc_5F7A1:
cmp r12d, 0FFFFFFD1h
jz short loc_5F7B2
cmp r12d, 0FFFFFFC9h
jnz short loc_5F80C
jmp loc_5F859
loc_5F7B2:
mov rdi, r15
push 6
pop rsi
call emit_op
mov rdi, r15
mov esi, 0BCh
jmp short loc_5F7E9
loc_5F7C7:
mov esi, [rsp+58h+var_50]
call js_parse_assign_expr2
test eax, eax
jnz loc_5F878
mov rdi, r15
mov esi, ebx
call set_object_name
mov rdi, r15
mov esi, [rsp+58h+var_3C]
loc_5F7E9:
call emit_op
mov rdi, r15
mov esi, ebx
call emit_atom
mov rax, [rsp+58h+var_48]
movzx esi, word ptr [rax+0E8h]
mov rdi, r15
call emit_u16
loc_5F80C:
mov rdi, r14
mov esi, ebx
call JS_FreeAtom
loc_5F816:
cmp dword ptr [r15+20h], 2Ch ; ','
jnz short loc_5F82F
mov rdi, r15
call next_token
test eax, eax
jz loc_5F5EF
jmp short loc_5F882
loc_5F82F:
xor eax, eax
jmp short loc_5F885
loc_5F833:
lea rsi, aVariableNameEx; "variable name expected"
mov rdi, r15
xor eax, eax
call js_parse_error
jmp short loc_5F882
loc_5F846:
mov rdi, r15
call js_parse_error_reserved_identifier
jmp short loc_5F882
loc_5F850:
lea rsi, aLetIsNotAValid; "'let' is not a valid lexical identifier"
jmp short loc_5F860
loc_5F859:
lea rsi, aMissingInitial; "missing initializer for const variable"
loc_5F860:
mov rdi, r15
xor eax, eax
call js_parse_error
jmp short loc_5F878
loc_5F86C:
mov esi, [rsp+58h+var_4C]
mov rdi, r14
call JS_FreeAtom
loc_5F878:
mov rdi, r14
mov esi, ebx
call JS_FreeAtom
loc_5F882:
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_5F885:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_parse_var(
__m128i *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; // ebp
unsigned int v15; // r12d
long long v17; // r14
__int32 v18; // eax
long long v19; // rbx
_DWORD *v20; // rax
__m128 v21; // xmm4
__m128 v22; // xmm5
long long v23; // rdx
long long v24; // rcx
long long v25; // r8
long long v26; // r9
__m128 v27; // xmm4
__m128 v28; // xmm5
long long v29; // rcx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
long long v34; // rsi
long long v35; // rdx
long long v36; // rcx
long long v37; // r8
long long v38; // r9
__m128 v39; // xmm4
__m128 v40; // xmm5
__m128 v41; // xmm4
__m128 v42; // xmm5
long long v43; // r8
long long v44; // r9
__m128 v45; // xmm4
__m128 v46; // xmm5
long long v47; // rdi
char v48; // si
const char *v50; // rsi
long long v51; // [rsp-10h] [rbp-68h]
long long v52; // [rsp-8h] [rbp-60h]
char v53; // [rsp+0h] [rbp-58h]
int v54; // [rsp+4h] [rbp-54h] BYREF
unsigned int v55; // [rsp+8h] [rbp-50h]
unsigned int v56; // [rsp+Ch] [rbp-4Ch] BYREF
long long v57; // [rsp+10h] [rbp-48h]
int v58; // [rsp+1Ch] [rbp-3Ch]
signed int v59; // [rsp+20h] [rbp-38h] BYREF
_DWORD v60[13]; // [rsp+24h] [rbp-34h] BYREF
v14 = a4;
v15 = a3;
v55 = a2;
v17 = a1->m128i_i64[0];
v57 = a1[9].m128i_i64[0];
v58 = (unsigned __int8)(4 * ((((_DWORD)a3 + 55) & 0xFFFFFFF7) == 0)) | 0xB8;
while ( 1 )
{
v18 = a1[2].m128i_i32[0];
if ( v18 == -125 )
break;
if ( (v18 | 0x20) != 0x7B
|| (unsigned int)js_parse_skip_parens_token(
(long long)a1,
(char *)&v54,
0LL,
a4,
a5,
a6,
*(double *)a7.m128_u64,
*(double *)a8.m128_u64,
a9,
a10,
a11,
a12,
a13,
a14) != 61 )
{
js_parse_error(
a1->m128i_i64,
(long long)"variable name expected",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v53);
return -1LL;
}
emit_op((long long)a1, 6);
a2 = v15;
if ( (int)js_parse_destructuring_element(
(long long)a1,
v15,
0,
1LL,
v54 & 2,
1LL,
a7,
a8,
a9,
a10,
v21,
v22,
a13,
a14) < 0 )
return -1LL;
LABEL_31:
if ( a1[2].m128i_i32[0] != 44 )
return 0LL;
if ( (unsigned int)next_token((long long)a1, a2, v23, a7, a8, a9, a10, v27, v28, a13, a14, v24, v25, v26) )
return -1LL;
}
if ( a1[4].m128i_i32[0] )
{
js_parse_error_reserved_identifier(
(long long)a1,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14);
return -1LL;
}
v19 = a1[3].m128i_i32[2];
if ( v19 < 224 )
{
if ( (_DWORD)v19 == 39 && (v15 == -47 || v15 == -55) )
{
v50 = "'let' is not a valid lexical identifier";
goto LABEL_38;
}
}
else
{
v20 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(v17 + 24) + 104LL) + 8 * v19);
++*v20;
}
if ( (unsigned int)next_token((long long)a1, a2, a3, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6) )
goto LABEL_40;
v34 = (unsigned int)v19;
if ( (unsigned int)js_define_var(a1->m128i_i64, v19, v15, v29, v30, v31, a7, a8, a9, a10, v32, v33, a13, a14) )
goto LABEL_40;
if ( v14 )
{
v34 = *(_QWORD *)(a1[9].m128i_i64[0] + 544);
if ( !add_export_entry(
a1->m128i_i64,
v34,
v19,
v19,
0,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14) )
goto LABEL_40;
}
if ( a1[2].m128i_i32[0] != 61 )
{
if ( v15 == -47 )
{
emit_op((long long)a1, 6);
v47 = (long long)a1;
v48 = -68;
LABEL_29:
emit_op(v47, v48);
emit_atom((long long)a1, (unsigned int)v19);
emit_u16((long long)a1, *(_WORD *)(v57 + 232));
goto LABEL_30;
}
if ( v15 != -55 )
goto LABEL_30;
v50 = "missing initializer for const variable";
LABEL_38:
js_parse_error(a1->m128i_i64, (long long)v50, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v53);
goto LABEL_40;
}
if ( (unsigned int)next_token((long long)a1, v34, a3, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6) )
goto LABEL_40;
if ( v15 != -79 )
{
if ( (unsigned int)js_parse_assign_expr2(a1, v55, v35, v36, v37, v38, a7, a8, a9, a10, v39, v40, a13, a14) )
goto LABEL_40;
set_object_name(a1->m128i_i64, v19);
v47 = (long long)a1;
v48 = v58;
goto LABEL_29;
}
emit_op((long long)a1, 183);
emit_atom((long long)a1, (unsigned int)v19);
emit_u16((long long)a1, *(_WORD *)(v57 + 232));
if ( (int)get_lvalue(a1->m128i_i64, &v54, v60, (long long)&v56, &v59, 0LL, a7, a8, a9, a10, v41, v42, a13, a14, 0, 61) < 0 )
goto LABEL_40;
if ( !(unsigned int)js_parse_assign_expr2(a1, v55, v52, v51, v43, v44, a7, a8, a9, a10, v45, v46, a13, a14) )
{
set_object_name(a1->m128i_i64, v19);
put_lvalue(a1->m128i_i64, v54, v60[0], v56, v59, 0, 0);
LABEL_30:
a2 = (unsigned int)v19;
JS_FreeAtom(v17, v19);
goto LABEL_31;
}
JS_FreeAtom(v17, v56);
LABEL_40:
JS_FreeAtom(v17, v19);
return -1LL;
}
| js_parse_var:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,ECX
MOV R12D,EDX
MOV dword ptr [RSP + 0x8],ESI
MOV R15,RDI
MOV R14,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x90]
MOV qword ptr [RSP + 0x10],RAX
LEA EAX,[R12 + 0x37]
TEST EAX,0xfffffff7
SETZ AL
SHL AL,0x2
OR AL,0xb8
MOVZX EAX,AL
MOV dword ptr [RSP + 0x1c],EAX
PUSH 0x1
POP R13
LAB_0015f5ef:
MOV EAX,dword ptr [R15 + 0x20]
CMP EAX,-0x7d
JNZ 0x0015f620
CMP dword ptr [R15 + 0x40],0x0
JNZ 0x0015f846
MOVSXD RBX,dword ptr [R15 + 0x38]
CMP RBX,0xe0
JL 0x0015f678
MOV RAX,qword ptr [R14 + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + RBX*0x8]
INC dword ptr [RAX]
JMP 0x0015f691
LAB_0015f620:
OR EAX,0x20
CMP EAX,0x7b
JNZ 0x0015f833
MOV RDI,R15
LEA RSI,[RSP + 0x4]
XOR EDX,EDX
CALL 0x00158b5b
CMP EAX,0x3d
JNZ 0x0015f833
MOV RDI,R15
PUSH 0x6
POP RSI
CALL 0x001535cb
MOV R8D,dword ptr [RSP + 0x4]
AND R8D,0x2
MOV RDI,R15
MOV ESI,R12D
XOR EDX,EDX
MOV ECX,R13D
MOV R9D,R13D
CALL 0x00158eb3
TEST EAX,EAX
JNS 0x0015f816
JMP 0x0015f882
LAB_0015f678:
CMP EBX,0x27
JNZ 0x0015f691
CMP R12D,-0x2f
JZ 0x0015f850
CMP R12D,-0x37
JZ 0x0015f850
LAB_0015f691:
MOV RDI,R15
CALL 0x001535fe
TEST EAX,EAX
JNZ 0x0015f878
MOV RDI,R15
MOV ESI,EBX
MOV EDX,R12D
CALL 0x0015aba7
TEST EAX,EAX
JNZ 0x0015f878
TEST EBP,EBP
JZ 0x0015f6e0
MOV RAX,qword ptr [R15 + 0x90]
MOV RSI,qword ptr [RAX + 0x220]
MOV RDI,R15
MOV EDX,EBX
MOV ECX,EBX
XOR R8D,R8D
CALL 0x0015a02c
TEST RAX,RAX
JZ 0x0015f878
LAB_0015f6e0:
CMP dword ptr [R15 + 0x20],0x3d
JNZ 0x0015f7a1
MOV RDI,R15
CALL 0x001535fe
TEST EAX,EAX
JNZ 0x0015f878
MOV RDI,R15
CMP R12D,-0x4f
JNZ 0x0015f7c7
MOV ESI,0xb7
CALL 0x001535cb
MOV RDI,R15
MOV ESI,EBX
CALL 0x00154cac
MOV RAX,qword ptr [RSP + 0x10]
MOVZX ESI,word ptr [RAX + 0xe8]
MOV RDI,R15
CALL 0x001535ea
MOV RDI,R15
LEA RSI,[RSP + 0x4]
LEA RDX,[RSP + 0x24]
LEA RCX,[RSP + 0xc]
LEA R8,[RSP + 0x20]
XOR R9D,R9D
PUSH 0x3d
PUSH 0x0
CALL 0x0015a39f
POP RCX
POP RDX
TEST EAX,EAX
JS 0x0015f878
MOV RDI,R15
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x0015e007
TEST EAX,EAX
JNZ 0x0015f86c
MOV RDI,R15
MOV ESI,EBX
CALL 0x00159c6e
MOV ESI,dword ptr [RSP + 0x4]
MOV EDX,dword ptr [RSP + 0x24]
MOV ECX,dword ptr [RSP + 0xc]
MOV R8D,dword ptr [RSP + 0x20]
SUB RSP,0x8
MOV RDI,R15
XOR R9D,R9D
PUSH 0x0
CALL 0x0015ac62
POP RAX
POP RCX
JMP 0x0015f80c
LAB_0015f7a1:
CMP R12D,-0x2f
JZ 0x0015f7b2
CMP R12D,-0x37
JNZ 0x0015f80c
JMP 0x0015f859
LAB_0015f7b2:
MOV RDI,R15
PUSH 0x6
POP RSI
CALL 0x001535cb
MOV RDI,R15
MOV ESI,0xbc
JMP 0x0015f7e9
LAB_0015f7c7:
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x0015e007
TEST EAX,EAX
JNZ 0x0015f878
MOV RDI,R15
MOV ESI,EBX
CALL 0x00159c6e
MOV RDI,R15
MOV ESI,dword ptr [RSP + 0x1c]
LAB_0015f7e9:
CALL 0x001535cb
MOV RDI,R15
MOV ESI,EBX
CALL 0x00154cac
MOV RAX,qword ptr [RSP + 0x10]
MOVZX ESI,word ptr [RAX + 0xe8]
MOV RDI,R15
CALL 0x001535ea
LAB_0015f80c:
MOV RDI,R14
MOV ESI,EBX
CALL 0x0011e545
LAB_0015f816:
CMP dword ptr [R15 + 0x20],0x2c
JNZ 0x0015f82f
MOV RDI,R15
CALL 0x001535fe
TEST EAX,EAX
JZ 0x0015f5ef
JMP 0x0015f882
LAB_0015f82f:
XOR EAX,EAX
JMP 0x0015f885
LAB_0015f833:
LEA RSI,[0x18b4da]
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012c007
JMP 0x0015f882
LAB_0015f846:
MOV RDI,R15
CALL 0x0015852f
JMP 0x0015f882
LAB_0015f850:
LEA RSI,[0x18b48b]
JMP 0x0015f860
LAB_0015f859:
LEA RSI,[0x18b4b3]
LAB_0015f860:
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012c007
JMP 0x0015f878
LAB_0015f86c:
MOV ESI,dword ptr [RSP + 0xc]
MOV RDI,R14
CALL 0x0011e545
LAB_0015f878:
MOV RDI,R14
MOV ESI,EBX
CALL 0x0011e545
LAB_0015f882:
PUSH -0x1
POP RAX
LAB_0015f885:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 js_parse_var(long *param_1,int4 param_2,int param_3,int param_4)
{
long lVar1;
int *piVar2;
int iVar3;
int iVar4;
long lVar5;
uint uVar6;
char *pcVar7;
int8 uVar8;
uint local_54;
int4 local_50;
int4 local_4c;
long local_48;
uint local_3c;
int4 local_38;
int4 local_34;
lVar1 = *param_1;
local_48 = param_1[0x12];
local_3c = (uint)(byte)(((param_3 + 0x37U & 0xfffffff7) == 0) << 2 | 0xb8);
local_50 = param_2;
do {
if (*(uint *)(param_1 + 4) == 0xffffff83) {
if ((int)param_1[8] != 0) {
js_parse_error_reserved_identifier(param_1);
return 0xffffffffffffffff;
}
iVar4 = (int)param_1[7];
if ((long)iVar4 < 0xe0) {
if ((iVar4 != 0x27) || ((param_3 != -0x2f && (param_3 != -0x37)))) goto LAB_0015f691;
pcVar7 = "\'let\' is not a valid lexical identifier";
LAB_0015f860:
js_parse_error(param_1,pcVar7);
LAB_0015f878:
JS_FreeAtom(lVar1,iVar4);
return 0xffffffffffffffff;
}
piVar2 = *(int **)(*(long *)(*(long *)(lVar1 + 0x18) + 0x68) + (long)iVar4 * 8);
*piVar2 = *piVar2 + 1;
LAB_0015f691:
iVar3 = next_token(param_1);
if (((iVar3 != 0) || (iVar3 = js_define_var(param_1,iVar4,param_3), iVar3 != 0)) ||
((param_4 != 0 &&
(lVar5 = add_export_entry(param_1,*(int8 *)(param_1[0x12] + 0x220),iVar4,iVar4,0),
lVar5 == 0)))) goto LAB_0015f878;
if ((int)param_1[4] == 0x3d) {
iVar3 = next_token(param_1);
if (iVar3 != 0) goto LAB_0015f878;
if (param_3 != -0x4f) {
iVar3 = js_parse_assign_expr2(param_1,local_50);
if (iVar3 != 0) goto LAB_0015f878;
set_object_name(param_1,iVar4);
uVar6 = local_3c;
goto LAB_0015f7e9;
}
emit_op(param_1,0xb7);
emit_atom(param_1,iVar4);
emit_u16(param_1,*(int2 *)(local_48 + 0xe8));
uVar8 = 0;
iVar3 = get_lvalue(param_1,&local_54,&local_34,&local_4c,&local_38,0);
if (iVar3 < 0) goto LAB_0015f878;
iVar3 = js_parse_assign_expr2(param_1,local_50,0x3d,uVar8);
if (iVar3 != 0) {
JS_FreeAtom(lVar1,local_4c);
goto LAB_0015f878;
}
set_object_name(param_1,iVar4);
put_lvalue(param_1,local_54,local_34,local_4c,local_38,0,0);
}
else if (param_3 == -0x2f) {
emit_op(param_1,6);
uVar6 = 0xbc;
LAB_0015f7e9:
emit_op(param_1,uVar6);
emit_atom(param_1,iVar4);
emit_u16(param_1,*(int2 *)(local_48 + 0xe8));
}
else if (param_3 == -0x37) {
pcVar7 = "missing initializer for const variable";
goto LAB_0015f860;
}
JS_FreeAtom(lVar1,iVar4);
}
else {
if (((*(uint *)(param_1 + 4) | 0x20) != 0x7b) ||
(iVar4 = js_parse_skip_parens_token(param_1,&local_54,0), iVar4 != 0x3d)) {
js_parse_error(param_1,"variable name expected");
return 0xffffffffffffffff;
}
emit_op(param_1,6);
iVar4 = js_parse_destructuring_element(param_1,param_3,0,1,local_54 & 2,1);
if (iVar4 < 0) {
return 0xffffffffffffffff;
}
}
if ((int)param_1[4] != 0x2c) {
return 0;
}
iVar4 = next_token(param_1);
if (iVar4 != 0) {
return 0xffffffffffffffff;
}
} while( true );
}
| |
38,402 | pfs_register_statement_v1 | eloqsql/storage/perfschema/pfs.cc | void pfs_register_statement_v1(const char *category,
PSI_statement_info_v1 *info,
int count)
{
char formatted_name[PFS_MAX_INFO_NAME_LENGTH];
size_t prefix_length;
size_t len;
size_t full_length;
assert(category != NULL);
assert(info != NULL);
if (unlikely(build_prefix(&statement_instrument_prefix,
category, formatted_name, &prefix_length)) ||
! pfs_initialized)
{
for (; count>0; count--, info++)
info->m_key= 0;
return ;
}
for (; count>0; count--, info++)
{
if (info->m_name == NULL)
continue;
len= (int)strlen(info->m_name);
full_length= prefix_length + len;
if (likely(full_length <= PFS_MAX_INFO_NAME_LENGTH))
{
memcpy(formatted_name + prefix_length, info->m_name, len);
info->m_key= register_statement_class(formatted_name, (uint)full_length, info->m_flags);
}
else
{
pfs_print_error("register_statement_v1: name too long <%s>\n",
info->m_name);
info->m_key= 0;
}
}
return;
} | O3 | cpp | pfs_register_statement_v1:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %rdx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq 0x2da908(%rip), %rax # 0x31c678
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq -0xb0(%rbp), %rcx
leaq -0xc0(%rbp), %r8
callq 0x4156f
testl %eax, %eax
jne 0x41e34
leaq 0x3514e8(%rip), %rax # 0x393281
cmpb $0x1, (%rax)
jne 0x41e34
testl %ebx, %ebx
jle 0x41e3e
movq -0xc0(%rbp), %r15
leaq (%r15,%rbp), %rax
addq $-0xb0, %rax
movq %rax, -0xb8(%rbp)
addq $0x10, %r14
incl %ebx
movq -0x8(%r14), %r13
testq %r13, %r13
je 0x41e11
movq %r13, %rdi
callq 0x26150
movslq %eax, %rdx
leaq (%rdx,%r15), %r12
cmpq $0x80, %r12
ja 0x41e1e
movq -0xb8(%rbp), %rdi
movq %r13, %rsi
callq 0x26290
movl (%r14), %edx
leaq -0xb0(%rbp), %rdi
movl %r12d, %esi
callq 0x3bf28
movl %eax, %r12d
movl %r12d, -0x10(%r14)
addq $0x18, %r14
decl %ebx
cmpl $0x1, %ebx
jg 0x41dc8
jmp 0x41e3e
xorl %r12d, %r12d
leaq 0x3ee08(%rip), %rdi # 0x80c30
movq %r13, %rsi
xorl %eax, %eax
callq 0x2cd98
jmp 0x41e0d
movl %ebx, %edi
movq %r14, %rsi
callq 0x2b088
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x41e5f
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x263a0
| pfs_register_statement_v1:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov ebx, edx
mov r14, rsi
mov rdx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea rax, statement_instrument_prefix
mov rdi, [rax]
mov rsi, [rax+8]
lea rcx, [rbp+var_B0]
lea r8, [rbp+var_C0]
call _ZL12build_prefixPK25st_mysql_const_lex_stringPKcPcPm; build_prefix(st_mysql_const_lex_string const*,char const*,char *,ulong *)
test eax, eax
jnz loc_41E34
lea rax, pfs_initialized
cmp byte ptr [rax], 1
jnz loc_41E34
test ebx, ebx
jle loc_41E3E
mov r15, [rbp+var_C0]
lea rax, [r15+rbp]
add rax, 0FFFFFFFFFFFFFF50h
mov [rbp+var_B8], rax
add r14, 10h
inc ebx
loc_41DC8:
mov r13, [r14-8]
test r13, r13
jz short loc_41E11
mov rdi, r13
call _strlen
movsxd rdx, eax
lea r12, [rdx+r15]
cmp r12, 80h
ja short loc_41E1E
mov rdi, [rbp+var_B8]
mov rsi, r13
call _memcpy
mov edx, [r14]; int
lea rdi, [rbp+var_B0]; char *
mov esi, r12d; unsigned int
call _Z24register_statement_classPKcji; register_statement_class(char const*,uint,int)
mov r12d, eax
loc_41E0D:
mov [r14-10h], r12d
loc_41E11:
add r14, 18h
dec ebx
cmp ebx, 1
jg short loc_41DC8
jmp short loc_41E3E
loc_41E1E:
xor r12d, r12d
lea rdi, aRegisterStatem; "register_statement_v1: name too long <%"...
mov rsi, r13
xor eax, eax
call _Z15pfs_print_errorPKcz; pfs_print_error(char const*,...)
jmp short loc_41E0D
loc_41E34:
mov edi, ebx
mov rsi, r14
call pfs_register_statement_v1_cold_1
loc_41E3E:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_41E5F
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_41E5F:
call ___stack_chk_fail
| unsigned long long pfs_register_statement_v1(long long a1, _DWORD *a2, int a3)
{
long long v4; // r15
int *v5; // r14
int v6; // ebx
long long v7; // r13
long long v8; // rdx
unsigned int v9; // r12d
int v10; // r12d
long long v12; // [rsp+0h] [rbp-C0h] BYREF
char *v13; // [rsp+8h] [rbp-B8h]
char v14[128]; // [rsp+10h] [rbp-B0h] BYREF
unsigned long long v15; // [rsp+90h] [rbp-30h]
v15 = __readfsqword(0x28u);
if ( (unsigned int)build_prefix(
(long long)statement_instrument_prefix,
(long long)*(&statement_instrument_prefix + 1),
a1,
(long long)v14,
&v12)
|| pfs_initialized[0] != 1 )
{
pfs_register_statement_v1_cold_1(a3, a2);
}
else if ( a3 > 0 )
{
v4 = v12;
v13 = &v14[v12];
v5 = a2 + 4;
v6 = a3 + 1;
do
{
v7 = *((_QWORD *)v5 - 1);
if ( v7 )
{
v8 = (int)strlen(*((_QWORD *)v5 - 1));
v9 = v8 + v4;
if ( (unsigned long long)(v8 + v4) > 0x80 )
{
v10 = 0;
pfs_print_error("register_statement_v1: name too long <%s>\n");
}
else
{
memcpy(v13, v7, v8);
v10 = register_statement_class(v14, v9, *v5);
}
*(v5 - 4) = v10;
}
v5 += 6;
--v6;
}
while ( v6 > 1 );
}
return __readfsqword(0x28u);
}
| pfs_register_statement_v1:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV EBX,EDX
MOV R14,RSI
MOV RDX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x41c678]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
LEA RCX,[RBP + -0xb0]
LEA R8,[RBP + -0xc0]
CALL 0x0014156f
TEST EAX,EAX
JNZ 0x00141e34
LEA RAX,[0x493281]
CMP byte ptr [RAX],0x1
JNZ 0x00141e34
TEST EBX,EBX
JLE 0x00141e3e
MOV R15,qword ptr [RBP + -0xc0]
LEA RAX,[R15 + RBP*0x1]
ADD RAX,-0xb0
MOV qword ptr [RBP + -0xb8],RAX
ADD R14,0x10
INC EBX
LAB_00141dc8:
MOV R13,qword ptr [R14 + -0x8]
TEST R13,R13
JZ 0x00141e11
MOV RDI,R13
CALL 0x00126150
MOVSXD RDX,EAX
LEA R12,[RDX + R15*0x1]
CMP R12,0x80
JA 0x00141e1e
MOV RDI,qword ptr [RBP + -0xb8]
MOV RSI,R13
CALL 0x00126290
MOV EDX,dword ptr [R14]
LEA RDI,[RBP + -0xb0]
MOV ESI,R12D
CALL 0x0013bf28
MOV R12D,EAX
LAB_00141e0d:
MOV dword ptr [R14 + -0x10],R12D
LAB_00141e11:
ADD R14,0x18
DEC EBX
CMP EBX,0x1
JG 0x00141dc8
JMP 0x00141e3e
LAB_00141e1e:
XOR R12D,R12D
LEA RDI,[0x180c30]
MOV RSI,R13
XOR EAX,EAX
CALL 0x0012cd98
JMP 0x00141e0d
LAB_00141e34:
MOV EDI,EBX
MOV RSI,R14
CALL 0x0012b088
LAB_00141e3e:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00141e5f
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00141e5f:
CALL 0x001263a0
|
void pfs_register_statement_v1(char *param_1,long param_2,int param_3)
{
ulong uVar1;
char *__s;
int iVar2;
size_t sVar3;
int *piVar4;
long in_FS_OFFSET;
long local_c8;
ulong local_b8 [16];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
iVar2 = build_prefix((st_mysql_const_lex_string *)statement_instrument_prefix,DAT_0041c680,param_1
,local_b8);
if ((iVar2 == 0) && (pfs_initialized == '\x01')) {
if (0 < param_3) {
piVar4 = (int *)(param_2 + 0x10);
param_3 = param_3 + 1;
do {
__s = *(char **)(piVar4 + -2);
if (__s != (char *)0x0) {
sVar3 = strlen(__s);
uVar1 = (int)sVar3 + local_c8;
if (uVar1 < 0x81) {
memcpy((void *)((long)local_b8 + local_c8),__s,(long)(int)sVar3);
iVar2 = register_statement_class((char *)local_b8,(uint)uVar1,*piVar4);
}
else {
iVar2 = 0;
pfs_print_error("register_statement_v1: name too long <%s>\n",__s);
}
piVar4[-4] = iVar2;
}
piVar4 = piVar4 + 6;
param_3 = param_3 + -1;
} while (1 < param_3);
}
}
else {
pfs_register_statement_v1_cold_1(param_3,param_2);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
| |
38,403 | mbedtls_pkcs5_pbes2 | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/pkcs5.c | int mbedtls_pkcs5_pbes2(const mbedtls_asn1_buf *pbe_params, int mode,
const unsigned char *pwd, size_t pwdlen,
const unsigned char *data, size_t datalen,
unsigned char *output)
{
size_t output_len = 0;
/* We assume caller of the function is providing a big enough output buffer
* so we pass output_size as SIZE_MAX to pass checks, However, no guarantees
* for the output size actually being correct.
*/
return mbedtls_pkcs5_pbes2_ext(pbe_params, mode, pwd, pwdlen, data,
datalen, output, SIZE_MAX, &output_len);
} | O3 | c | mbedtls_pkcs5_pbes2:
pushq %rax
movq 0x10(%rsp), %rax
movq %rsp, %r10
movq $0x0, (%r10)
subq $0x8, %rsp
pushq %r10
pushq $-0x1
pushq %rax
callq 0x99388
addq $0x20, %rsp
popq %rcx
retq
| mbedtls_pkcs5_pbes2:
push rax
mov rax, [rsp+8+arg_0]
mov r10, rsp
mov qword ptr [r10], 0
sub rsp, 8
push r10
push 0FFFFFFFFFFFFFFFFh
push rax
call mbedtls_pkcs5_pbes2_ext
add rsp, 20h
pop rcx
retn
| long long mbedtls_pkcs5_pbes2(int a1, int a2, int a3, int a4, int a5, int a6, long long a7)
{
long long v8; // [rsp-8h] [rbp-8h] BYREF
v8 = 0LL;
return mbedtls_pkcs5_pbes2_ext(a1, a2, a3, a4, a5, a6, a7, -1LL, (long long)&v8);
}
| mbedtls_pkcs5_pbes2:
PUSH RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV R10,RSP
MOV qword ptr [R10],0x0
SUB RSP,0x8
PUSH R10
PUSH -0x1
PUSH RAX
CALL 0x00199388
ADD RSP,0x20
POP RCX
RET
|
void mbedtls_pkcs5_pbes2(void)
{
mbedtls_pkcs5_pbes2_ext();
return;
}
| |
38,404 | mj_printSchema | aimrt_mujoco_sim/_deps/mujoco-src/src/xml/xml_api.cc | int mj_printSchema(const char* filename, char* buffer, int buffer_sz, int flg_html, int flg_pad) {
// print to stringstream
mjXReader reader;
std::stringstream str;
reader.PrintSchema(str, flg_html!=0, flg_pad!=0);
// filename given: write to file
if (filename) {
std::ofstream file;
file.open(filename);
file << str.str();
file.close();
}
// buffer given: write to buffer
if (buffer && buffer_sz) {
strncpy(buffer, str.str().c_str(), buffer_sz);
buffer[buffer_sz-1] = 0;
}
// return string length
return str.str().size();
} | O0 | cpp | mj_printSchema:
subq $0x558, %rsp # imm = 0x558
movq %rdi, 0x550(%rsp)
movq %rsi, 0x548(%rsp)
movl %edx, 0x544(%rsp)
movl %ecx, 0x540(%rsp)
movl %r8d, 0x53c(%rsp)
leaq 0x408(%rsp), %rdi
callq 0x41be60
leaq 0x280(%rsp), %rdi
callq 0x4c380
jmp 0x4165b9
movl 0x540(%rsp), %eax
testl %eax, %eax
setne %cl
movl 0x53c(%rsp), %eax
testl %eax, %eax
setne %al
movzbl %cl, %edx
movzbl %al, %ecx
leaq 0x408(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x41bf20
jmp 0x4165ee
cmpq $0x0, 0x550(%rsp)
je 0x4166de
leaq 0x70(%rsp), %rdi
callq 0x4e830
jmp 0x416609
movq 0x550(%rsp), %rsi
leaq 0x70(%rsp), %rdi
movl $0x10, %edx
callq 0x4e840
jmp 0x416622
leaq 0x50(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x4c3e0
jmp 0x416636
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x4c3f0
jmp 0x416647
leaq 0x50(%rsp), %rdi
callq 0x4a160
leaq 0x70(%rsp), %rdi
callq 0x4e850
jmp 0x41665d
leaq 0x70(%rsp), %rdi
callq 0x4e860
jmp 0x4166de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x4167b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x4167a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x4166cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x4a160
leaq 0x70(%rsp), %rdi
callq 0x4e860
jmp 0x4167a8
cmpq $0x0, 0x548(%rsp)
je 0x416756
cmpl $0x0, 0x544(%rsp)
je 0x416756
movq 0x548(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x4c3e0
jmp 0x416714
leaq 0x30(%rsp), %rdi
callq 0x4a150
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movslq 0x544(%rsp), %rdx
callq 0x49400
leaq 0x30(%rsp), %rdi
callq 0x4a160
movq 0x548(%rsp), %rax
movl 0x544(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
leaq 0x10(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x4c3e0
jmp 0x41676a
leaq 0x10(%rsp), %rdi
callq 0x4a1a0
movl %eax, 0x4(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x4a160
leaq 0x280(%rsp), %rdi
callq 0x4c160
leaq 0x408(%rsp), %rdi
callq 0x4167d0
movl 0x4(%rsp), %eax
addq $0x558, %rsp # imm = 0x558
retq
leaq 0x280(%rsp), %rdi
callq 0x4c160
leaq 0x408(%rsp), %rdi
callq 0x4167d0
movq 0x278(%rsp), %rdi
callq 0x4a070
nop
| mj_printSchema:
sub rsp, 558h
mov [rsp+558h+var_8], rdi
mov [rsp+558h+var_10], rsi
mov [rsp+558h+var_14], edx
mov [rsp+558h+var_18], ecx
mov [rsp+558h+var_1C], r8d
lea rdi, [rsp+558h+var_150]; this
call _ZN9mjXReaderC2Ev; mjXReader::mjXReader(void)
lea rdi, [rsp+558h+var_2D8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
jmp short $+2
loc_4165B9:
mov eax, [rsp+558h+var_18]
test eax, eax
setnz cl
mov eax, [rsp+558h+var_1C]
test eax, eax
setnz al
movzx edx, cl
movzx ecx, al
lea rdi, [rsp+558h+var_150]
lea rsi, [rsp+558h+var_2D8]
call _ZN9mjXReader11PrintSchemaERNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEbb; mjXReader::PrintSchema(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> &,bool,bool)
jmp short $+2
loc_4165EE:
cmp [rsp+558h+var_8], 0
jz loc_4166DE
lea rdi, [rsp+558h+var_4E8]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev; std::ofstream::basic_ofstream(void)
jmp short $+2
loc_416609:
mov rsi, [rsp+558h+var_8]
lea rdi, [rsp+558h+var_4E8]
mov edx, 10h
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode; std::ofstream::open(char const*,std::_Ios_Openmode)
jmp short $+2
loc_416622:
lea rdi, [rsp+558h+var_508]
lea rsi, [rsp+558h+var_2D8]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_416636:
lea rdi, [rsp+558h+var_4E8]
lea rsi, [rsp+558h+var_508]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_416647:
lea rdi, [rsp+558h+var_508]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+558h+var_4E8]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void)
jmp short $+2
loc_41665D:
lea rdi, [rsp+558h+var_4E8]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
jmp short loc_4166DE
mov rcx, rax
mov eax, edx
mov [rsp+arg_270], rcx
mov [rsp+arg_26C], eax
jmp loc_4167B5
mov rcx, rax
mov eax, edx
mov [rsp+arg_270], rcx
mov [rsp+arg_26C], eax
jmp loc_4167A8
mov rcx, rax
mov eax, edx
mov [rsp+arg_270], rcx
mov [rsp+arg_26C], eax
jmp short loc_4166CF
mov rcx, rax
mov eax, edx
mov [rsp+arg_270], rcx
mov [rsp+arg_26C], eax
lea rdi, [rsp+arg_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_4166CF:
lea rdi, [rsp+arg_68]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
jmp loc_4167A8
loc_4166DE:
cmp [rsp+558h+var_10], 0
jz short loc_416756
cmp [rsp+558h+var_14], 0
jz short loc_416756
mov rax, [rsp+558h+var_10]
mov [rsp+558h+var_550], rax
lea rdi, [rsp+558h+var_528]
lea rsi, [rsp+558h+var_2D8]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_416714:
lea rdi, [rsp+558h+var_528]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+558h+var_550]
mov rsi, rax
movsxd rdx, [rsp+558h+var_14]
call _strncpy
lea rdi, [rsp+558h+var_528]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rsp+558h+var_10]
mov ecx, [rsp+558h+var_14]
sub ecx, 1
movsxd rcx, ecx
mov byte ptr [rax+rcx], 0
loc_416756:
lea rdi, [rsp+558h+var_548]
lea rsi, [rsp+558h+var_2D8]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_41676A:
lea rdi, [rsp+558h+var_548]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov [rsp+558h+var_554], eax
lea rdi, [rsp+558h+var_548]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+558h+var_2D8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+558h+var_150]; this
call _ZN9mjXReaderD2Ev; mjXReader::~mjXReader()
mov eax, [rsp+558h+var_554]
add rsp, 558h
retn
loc_4167A8:
lea rdi, [rsp+arg_278]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
loc_4167B5:
lea rdi, [rsp+arg_400]; this
call _ZN9mjXReaderD2Ev; mjXReader::~mjXReader()
mov rdi, [rsp+arg_270]
call __Unwind_Resume
| long long mj_printSchema(long long a1, long long a2, int a3, int a4, int a5)
{
long long v5; // rax
unsigned int v7; // [rsp+4h] [rbp-554h]
long long v8; // [rsp+8h] [rbp-550h]
_BYTE v9[32]; // [rsp+10h] [rbp-548h] BYREF
_BYTE v10[32]; // [rsp+30h] [rbp-528h] BYREF
_BYTE v11[32]; // [rsp+50h] [rbp-508h] BYREF
_BYTE v12[528]; // [rsp+70h] [rbp-4E8h] BYREF
_BYTE v13[392]; // [rsp+280h] [rbp-2D8h] BYREF
_BYTE v14[308]; // [rsp+408h] [rbp-150h] BYREF
int v15; // [rsp+53Ch] [rbp-1Ch]
int v16; // [rsp+540h] [rbp-18h]
int v17; // [rsp+544h] [rbp-14h]
long long v18; // [rsp+548h] [rbp-10h]
long long v19; // [rsp+550h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
mjXReader::mjXReader((mjXReader *)v14);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v13);
mjXReader::PrintSchema(v14, v13, v16 != 0, v15 != 0);
if ( v19 )
{
std::ofstream::basic_ofstream(v12);
std::ofstream::open(v12, v19, 16LL);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v11, v13);
std::operator<<<char>(v12, v11);
std::string::~string(v11);
std::ofstream::close(v12);
std::ofstream::~ofstream(v12);
}
if ( v18 && v17 )
{
v8 = v18;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v10, v13);
v5 = std::string::c_str(v10);
strncpy(v8, v5, v17);
std::string::~string(v10);
*(_BYTE *)(v18 + v17 - 1) = 0;
}
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v9, v13);
v7 = std::string::size(v9);
std::string::~string(v9);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v13);
mjXReader::~mjXReader((mjXReader *)v14);
return v7;
}
| vector:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x004165a0
ADD RSP,0x18
RET
|
/* std::vector<unsigned char, std::allocator<unsigned char> >::vector(std::vector<unsigned char,
std::allocator<unsigned char> >&&) */
void __thiscall
std::vector<unsigned_char,std::allocator<unsigned_char>>::vector
(vector<unsigned_char,std::allocator<unsigned_char>> *this,vector *param_1)
{
_Vector_base<unsigned_char,std::allocator<unsigned_char>>::_Vector_base
((_Vector_base<unsigned_char,std::allocator<unsigned_char>> *)this,
(_Vector_base *)param_1);
return;
}
| |
38,405 | my_getwd | eloqsql/mysys/my_getwd.c | int my_getwd(char * buf, size_t size, myf MyFlags)
{
char * pos;
DBUG_ENTER("my_getwd");
DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu",
buf, (uint) size, MyFlags));
if (size < 1)
DBUG_RETURN(-1);
if (curr_dir[0]) /* Current pos is saved here */
(void) strmake(buf,&curr_dir[0],size-1);
else
{
#if defined(HAVE_GETCWD)
if (size < 2)
DBUG_RETURN(-1);
if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME)
{
my_errno=errno;
my_error(EE_GETWD,MYF(ME_BELL),errno);
DBUG_RETURN(-1);
}
#elif defined(HAVE_GETWD)
{
char pathname[MAXPATHLEN];
getwd(pathname);
strmake(buf,pathname,size-1);
}
#else
#error "No way to get current directory"
#endif
if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */
{
pos[0]= FN_LIBCHAR;
pos[1]=0;
}
(void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1));
}
DBUG_RETURN(0);
} | O0 | c | my_getwd:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0xe0016
cmpq $0x1, -0x18(%rbp)
jae 0xe002b
jmp 0xe001f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe010a
leaq 0x3976de(%rip), %rax # 0x477710
cmpb $0x0, (%rax)
je 0xe0054
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
leaq 0x3976c6(%rip), %rsi # 0x477710
callq 0x12b630
jmp 0xe0101
cmpq $0x2, -0x18(%rbp)
jae 0xe0069
jmp 0xe005d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe010a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
subq $0x2, %rax
movl %eax, %eax
movl %eax, %esi
callq 0x3a3c0
cmpq $0x0, %rax
jne 0xe00c7
movq -0x20(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0xe00c7
callq 0x3a9f0
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
callq 0xe2c80
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
callq 0x3a9f0
movl (%rax), %edx
movl $0x10, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0xdb970
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe010a
movq -0x10(%rbp), %rdi
callq 0x12b5b0
movq %rax, -0x28(%rbp)
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
je 0xe00ec
movq -0x28(%rbp), %rax
movb $0x2f, (%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x10(%rbp), %rsi
leaq 0x397619(%rip), %rdi # 0x477710
movl $0x1ff, %edx # imm = 0x1FF
callq 0x12b630
jmp 0xe0103
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_getwd:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_E0016:
cmp [rbp+var_18], 1
jnb short loc_E002B
jmp short $+2
loc_E001F:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_E010A
loc_E002B:
lea rax, curr_dir
cmp byte ptr [rax], 0
jz short loc_E0054
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
sub rdx, 1
lea rsi, curr_dir
call strmake
jmp loc_E0101
loc_E0054:
cmp [rbp+var_18], 2
jnb short loc_E0069
jmp short $+2
loc_E005D:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_E010A
loc_E0069:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
sub rax, 2
mov eax, eax
mov esi, eax
call _getcwd
cmp rax, 0
jnz short loc_E00C7
mov rax, [rbp+var_20]
and rax, 10h
cmp rax, 0
jz short loc_E00C7
call ___errno_location
mov eax, [rax]
mov [rbp+var_2C], eax
call _my_thread_var
mov ecx, [rbp+var_2C]
mov [rax], ecx
call ___errno_location
mov edx, [rax]
mov edi, 10h
mov esi, 4
mov al, 0
call my_error
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_E010A
loc_E00C7:
mov rdi, [rbp+var_10]
call strend
mov [rbp+var_28], rax
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jz short loc_E00EC
mov rax, [rbp+var_28]
mov byte ptr [rax], 2Fh ; '/'
mov rax, [rbp+var_28]
mov byte ptr [rax+1], 0
loc_E00EC:
mov rsi, [rbp+var_10]
lea rdi, curr_dir
mov edx, 1FFh
call strmake
loc_E0101:
jmp short $+2
loc_E0103:
mov [rbp+var_4], 0
loc_E010A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_getwd(long long a1, unsigned long long a2, char a3)
{
unsigned int *v3; // rax
int v5; // [rsp+4h] [rbp-2Ch]
_BYTE *v6; // [rsp+8h] [rbp-28h]
if ( a2 )
{
if ( curr_dir[0] )
{
strmake(a1, curr_dir, a2 - 1);
}
else
{
if ( a2 < 2 )
return (unsigned int)-1;
if ( !getcwd(a1, (unsigned int)(a2 - 2)) && (a3 & 0x10) != 0 )
{
v5 = *(_DWORD *)__errno_location(a1);
*(_DWORD *)my_thread_var() = v5;
v3 = (unsigned int *)__errno_location(a1);
my_error(0x10u, 4LL, *v3);
return (unsigned int)-1;
}
v6 = (_BYTE *)strend(a1);
if ( *(v6 - 1) != 47 )
{
*v6 = 47;
v6[1] = 0;
}
strmake(curr_dir, a1, 511LL);
}
return 0;
}
return (unsigned int)-1;
}
| my_getwd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
JMP 0x001e0016
LAB_001e0016:
CMP qword ptr [RBP + -0x18],0x1
JNC 0x001e002b
JMP 0x001e001f
LAB_001e001f:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001e010a
LAB_001e002b:
LEA RAX,[0x577710]
CMP byte ptr [RAX],0x0
JZ 0x001e0054
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
LEA RSI,[0x577710]
CALL 0x0022b630
JMP 0x001e0101
LAB_001e0054:
CMP qword ptr [RBP + -0x18],0x2
JNC 0x001e0069
JMP 0x001e005d
LAB_001e005d:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001e010a
LAB_001e0069:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x2
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0013a3c0
CMP RAX,0x0
JNZ 0x001e00c7
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x10
CMP RAX,0x0
JZ 0x001e00c7
CALL 0x0013a9f0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CALL 0x001e2c80
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX],ECX
CALL 0x0013a9f0
MOV EDX,dword ptr [RAX]
MOV EDI,0x10
MOV ESI,0x4
MOV AL,0x0
CALL 0x001db970
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001e010a
LAB_001e00c7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0022b5b0
MOV qword ptr [RBP + -0x28],RAX
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JZ 0x001e00ec
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x2f
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],0x0
LAB_001e00ec:
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[0x577710]
MOV EDX,0x1ff
CALL 0x0022b630
LAB_001e0101:
JMP 0x001e0103
LAB_001e0103:
MOV dword ptr [RBP + -0x4],0x0
LAB_001e010a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_getwd(char *param_1,ulong param_2,ulong param_3)
{
int iVar1;
char *pcVar2;
int *piVar3;
int1 *puVar4;
if (param_2 == 0) {
return 0xffffffff;
}
if (curr_dir == '\0') {
if (param_2 < 2) {
return 0xffffffff;
}
pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2));
if ((pcVar2 == (char *)0x0) && ((param_3 & 0x10) != 0)) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
piVar3 = __errno_location();
my_error(0x10,4,*piVar3);
return 0xffffffff;
}
puVar4 = (int1 *)strend(param_1);
if (puVar4[-1] != '/') {
*puVar4 = 0x2f;
puVar4[1] = 0;
}
strmake(&curr_dir,param_1,0x1ff);
}
else {
strmake(param_1,&curr_dir,param_2 - 1);
}
return 0;
}
| |
38,406 | google::protobuf::io::StringOutputStream::Next(void**, int*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc | bool StringOutputStream::Next(void** data, int* size) {
GOOGLE_CHECK(target_ != NULL);
size_t old_size = target_->size();
// Grow the string.
size_t new_size;
if (old_size < target_->capacity()) {
// Resize the string to match its capacity, since we can get away
// without a memory allocation this way.
new_size = target_->capacity();
} else {
// Size has reached capacity, try to double it.
new_size = old_size * 2;
}
// Avoid integer overflow in returned '*size'.
new_size = std::min(new_size, old_size + std::numeric_limits<int>::max());
// Increase the size, also make sure that it is at least kMinimumSize.
STLStringResizeUninitialized(
target_,
std::max(new_size,
kMinimumSize + 0)); // "+ 0" works around GCC4 weirdness.
*data = mutable_string_data(target_) + old_size;
*size = target_->size() - old_size;
return true;
} | O0 | cpp | google::protobuf::io::StringOutputStream::Next(void**, int*):
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rax), %rax
movb $0x0, 0x67(%rsp)
cmpq $0x0, %rax
je 0x1f096d
jmp 0x1f09bd
leaq 0x20b55c(%rip), %rdx # 0x3fbed0
leaq 0x68(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movl $0x3, %esi
movl $0x8d, %ecx
callq 0x219560
movq 0x18(%rsp), %rdi
movb $0x1, 0x67(%rsp)
leaq 0x20b699(%rip), %rsi # 0x3fc037
callq 0x218e20
movq %rax, 0x20(%rsp)
jmp 0x1f09aa
movq 0x20(%rsp), %rsi
leaq 0x53(%rsp), %rdi
callq 0x218fd0
jmp 0x1f09bb
jmp 0x1f09bd
testb $0x1, 0x67(%rsp)
jne 0x1f09c6
jmp 0x1f09d0
leaq 0x68(%rsp), %rdi
callq 0x2195a0
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x21300
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x48(%rsp)
movq 0x48(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x8(%rax), %rdi
callq 0x21230
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x1f0a46
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x21230
movq %rax, 0x40(%rsp)
jmp 0x1f0a53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
testb $0x1, 0x67(%rsp)
jne 0x1f0a37
jmp 0x1f0a41
leaq 0x68(%rsp), %rdi
callq 0x2195a0
jmp 0x1f0b0b
movq 0x48(%rsp), %rax
shlq %rax
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
callq 0x17d580
movl %eax, %ecx
movq (%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x29ad0
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq (%rcx), %rcx
movq %rcx, 0x40(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq $0x10, 0x30(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x29a10
movq 0x8(%rsp), %rdi
movq (%rax), %rsi
callq 0x1ee030
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1ee7f0
movq %rax, %rdx
movq 0x28(%rsp), %rax
addq 0x48(%rsp), %rdx
movq 0xa8(%rsp), %rcx
movq %rdx, (%rcx)
movq 0x8(%rax), %rdi
callq 0x21300
subq 0x48(%rsp), %rax
movl %eax, %ecx
movq 0xa0(%rsp), %rax
movl %ecx, (%rax)
movb $0x1, %al
andb $0x1, %al
addq $0xb8, %rsp
retq
movq 0x58(%rsp), %rdi
callq 0x21700
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf2io18StringOutputStream4NextEPPvPi:
sub rsp, 0B8h
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_18], rdx
mov rax, [rsp+0B8h+var_8]
mov [rsp+0B8h+var_90], rax
mov rax, [rax+8]
mov [rsp+0B8h+var_51], 0
cmp rax, 0
jz short loc_1F096D
jmp short loc_1F09BD
loc_1F096D:
lea rdx, aWorkspaceLlm4b_66; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_A0], rdi
mov esi, 3
mov ecx, 8Dh
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+0B8h+var_A0]
mov [rsp+0B8h+var_51], 1
lea rsi, aCheckFailedTar_0; "CHECK failed: target_ != NULL: "
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+0B8h+var_98], rax
jmp short $+2
loc_1F09AA:
mov rsi, [rsp+0B8h+var_98]
lea rdi, [rsp+0B8h+var_65]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_1F09BB:
jmp short $+2
loc_1F09BD:
test [rsp+0B8h+var_51], 1
jnz short loc_1F09C6
jmp short loc_1F09D0
loc_1F09C6:
lea rdi, [rsp+0B8h+var_50]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_1F09D0:
mov rax, [rsp+0B8h+var_90]
mov rdi, [rax+8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_70], rcx
mov rcx, [rsp+0B8h+var_70]
mov [rsp+0B8h+var_A8], rcx
mov rdi, [rax+8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv; std::string::capacity(void)
mov rcx, rax
mov rax, [rsp+0B8h+var_A8]
cmp rax, rcx
jnb short loc_1F0A46
mov rax, [rsp+0B8h+var_90]
mov rdi, [rax+8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv; std::string::capacity(void)
mov [rsp+0B8h+var_78], rax
jmp short loc_1F0A53
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
test [rsp+arg_5F], 1
jnz short loc_1F0A37
jmp short loc_1F0A41
loc_1F0A37:
lea rdi, [rsp+arg_60]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_1F0A41:
jmp loc_1F0B0B
loc_1F0A46:
mov rax, [rsp+0B8h+var_70]
shl rax, 1
mov [rsp+0B8h+var_78], rax
loc_1F0A53:
mov rax, [rsp+0B8h+var_70]
mov [rsp+0B8h+var_B8], rax
call _ZNSt14numeric_limitsIiE3maxEv; std::numeric_limits<int>::max(void)
mov ecx, eax
mov rax, [rsp+0B8h+var_B8]
movsxd rcx, ecx
add rax, rcx
mov [rsp+0B8h+var_80], rax
lea rdi, [rsp+0B8h+var_78]
lea rsi, [rsp+0B8h+var_80]
call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&)
mov rcx, rax
mov rax, [rsp+0B8h+var_90]
mov rcx, [rcx]
mov [rsp+0B8h+var_78], rcx
mov rax, [rax+8]
mov [rsp+0B8h+var_B0], rax
mov [rsp+0B8h+var_88], 10h
lea rdi, [rsp+0B8h+var_78]
lea rsi, [rsp+0B8h+var_88]
call _ZSt3maxImERKT_S2_S2_; std::max<ulong>(ulong const&,ulong const&)
mov rdi, [rsp+0B8h+var_B0]
mov rsi, [rax]
call _ZN6google8protobuf28STLStringResizeUninitializedEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; google::protobuf::STLStringResizeUninitialized(std::string *,ulong)
mov rax, [rsp+0B8h+var_90]
mov rdi, [rax+8]
call _ZN6google8protobuf2io19mutable_string_dataEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::io::mutable_string_data(std::string *)
mov rdx, rax
mov rax, [rsp+0B8h+var_90]
add rdx, [rsp+0B8h+var_70]
mov rcx, [rsp+0B8h+var_10]
mov [rcx], rdx
mov rdi, [rax+8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
sub rax, [rsp+0B8h+var_70]
mov ecx, eax
mov rax, [rsp+0B8h+var_18]
mov [rax], ecx
mov al, 1
and al, 1
add rsp, 0B8h
retn
loc_1F0B0B:
mov rdi, [rsp+arg_50]
call __Unwind_Resume
| char google::protobuf::io::StringOutputStream::Next(
google::protobuf::io::StringOutputStream *this,
void **a2,
int *a3)
{
long long v3; // rax
long long *v4; // rax
long long v5; // rax
int v6; // eax
long long v8; // [rsp+8h] [rbp-B0h]
long long v9; // [rsp+20h] [rbp-98h]
long long v10; // [rsp+30h] [rbp-88h] BYREF
unsigned long long v11; // [rsp+38h] [rbp-80h] BYREF
long long v12; // [rsp+40h] [rbp-78h] BYREF
unsigned long long v13; // [rsp+48h] [rbp-70h]
_BYTE v14[20]; // [rsp+53h] [rbp-65h] BYREF
char v15; // [rsp+67h] [rbp-51h]
_BYTE v16[56]; // [rsp+68h] [rbp-50h] BYREF
int *v17; // [rsp+A0h] [rbp-18h]
void **v18; // [rsp+A8h] [rbp-10h]
google::protobuf::io::StringOutputStream *v19; // [rsp+B0h] [rbp-8h]
v19 = this;
v18 = a2;
v17 = a3;
v3 = *((_QWORD *)this + 1);
v15 = 0;
if ( !v3 )
{
google::protobuf::internal::LogMessage::LogMessage(
v16,
3LL,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
141LL);
v15 = 1;
v9 = google::protobuf::internal::LogMessage::operator<<(v16, "CHECK failed: target_ != NULL: ");
google::protobuf::internal::LogFinisher::operator=(v14, v9);
}
if ( (v15 & 1) != 0 )
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v16);
v13 = std::string::size(*((_QWORD *)this + 1));
if ( v13 >= std::string::capacity(*((_QWORD *)this + 1)) )
v12 = 2 * v13;
else
v12 = std::string::capacity(*((_QWORD *)this + 1));
v11 = (int)std::numeric_limits<int>::max() + v13;
v12 = *std::min<unsigned long>(&v12, &v11);
v8 = *((_QWORD *)this + 1);
v10 = 16LL;
v4 = std::max<unsigned long>(&v12, &v10);
google::protobuf::STLStringResizeUninitialized(v8, *v4);
v5 = google::protobuf::io::mutable_string_data(*((_QWORD *)this + 1));
*v18 = (void *)(v13 + v5);
v6 = std::string::size(*((_QWORD *)this + 1));
*v17 = v6 - v13;
return 1;
}
| |||
38,407 | google::protobuf::io::StringOutputStream::Next(void**, int*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc | bool StringOutputStream::Next(void** data, int* size) {
GOOGLE_CHECK(target_ != NULL);
size_t old_size = target_->size();
// Grow the string.
size_t new_size;
if (old_size < target_->capacity()) {
// Resize the string to match its capacity, since we can get away
// without a memory allocation this way.
new_size = target_->capacity();
} else {
// Size has reached capacity, try to double it.
new_size = old_size * 2;
}
// Avoid integer overflow in returned '*size'.
new_size = std::min(new_size, old_size + std::numeric_limits<int>::max());
// Increase the size, also make sure that it is at least kMinimumSize.
STLStringResizeUninitialized(
target_,
std::max(new_size,
kMinimumSize + 0)); // "+ 0" works around GCC4 weirdness.
*data = mutable_string_data(target_) + old_size;
*size = target_->size() - old_size;
return true;
} | O3 | cpp | google::protobuf::io::StringOutputStream::Next(void**, int*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0xfc5e5
leaq 0xefeab(%rip), %rdx # 0x1ec44f
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movl $0x3, %esi
movl $0x8d, %ecx
callq 0x1072ba
leaq 0xefff4(%rip), %rsi # 0x1ec5b6
movq %r12, %rdi
callq 0x106db8
leaq 0xf(%rsp), %rdi
movq %rax, %rsi
callq 0x106e92
leaq 0x10(%rsp), %rdi
callq 0x1072d8
movq 0x8(%r14), %rdi
movq 0x8(%rdi), %r12
leaq 0x10(%rdi), %rcx
movl $0xf, %eax
cmpq %rcx, (%rdi)
je 0xfc5fb
movq 0x10(%rdi), %rax
leaq (%r12,%r12), %rcx
cmpq %rax, %r12
cmovbq %rax, %rcx
leaq 0x7fffffff(%r12), %rax
cmpq %rcx, %rax
cmovbq %rax, %rcx
cmpq $0x11, %rcx
movl $0x10, %esi
cmovaeq %rcx, %rsi
xorl %edx, %edx
callq 0x1f140
movq 0x8(%r14), %rax
movq (%rax), %rax
addq %r12, %rax
movq %rax, (%r15)
movq 0x8(%r14), %rax
movl 0x8(%rax), %eax
subl %r12d, %eax
movl %eax, (%rbx)
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xfc652
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1072d8
movq %rbx, %rdi
callq 0x1f860
nop
| _ZN6google8protobuf2io18StringOutputStream4NextEPPvPi:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov rdi, [rdi+8]
test rdi, rdi
jnz short loc_FC5E5
lea rdx, aWorkspaceLlm4b_51; "/workspace/llm4binary/github2025/aimrt_"...
lea r12, [rsp+68h+var_58]
mov rdi, r12
mov esi, 3
mov ecx, 8Dh
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aCheckFailedTar_0; "CHECK failed: target_ != NULL: "
mov rdi, r12
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rdi, [rsp+68h+var_59]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+68h+var_58]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, [r14+8]
loc_FC5E5:
mov r12, [rdi+8]
lea rcx, [rdi+10h]
mov eax, 0Fh
cmp [rdi], rcx
jz short loc_FC5FB
mov rax, [rdi+10h]
loc_FC5FB:
lea rcx, [r12+r12]
cmp r12, rax
cmovb rcx, rax
lea rax, [r12+7FFFFFFFh]
cmp rax, rcx
cmovb rcx, rax
cmp rcx, 11h
mov esi, 10h
cmovnb rsi, rcx
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rax, [r14+8]
mov rax, [rax]
add rax, r12
mov [r15], rax
mov rax, [r14+8]
mov eax, [rax+8]
sub eax, r12d
mov [rbx], eax
mov al, 1
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_FC652:
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
| char google::protobuf::io::StringOutputStream::Next(
google::protobuf::io::StringOutputStream *this,
void **a2,
int *a3)
{
_QWORD *v6; // rdi
long long v7; // rax
unsigned long long v8; // r12
unsigned long long v9; // rax
unsigned long long v10; // rcx
long long v11; // rsi
char v13; // [rsp+Fh] [rbp-59h] BYREF
_BYTE v14[88]; // [rsp+10h] [rbp-58h] BYREF
v6 = (_QWORD *)*((_QWORD *)this + 1);
if ( !v6 )
{
google::protobuf::internal::LogMessage::LogMessage(
v14,
3LL,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
141LL);
v7 = google::protobuf::internal::LogMessage::operator<<(v14, "CHECK failed: target_ != NULL: ");
google::protobuf::internal::LogFinisher::operator=(&v13, v7);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v14);
v6 = (_QWORD *)*((_QWORD *)this + 1);
}
v8 = v6[1];
v9 = 15LL;
if ( (_QWORD *)*v6 != v6 + 2 )
v9 = v6[2];
v10 = 2 * v8;
if ( v8 < v9 )
v10 = v9;
if ( v8 + 0x7FFFFFFF < v10 )
v10 = v8 + 0x7FFFFFFF;
v11 = 16LL;
if ( v10 >= 0x11 )
v11 = v10;
std::string::resize(v6, v11, 0LL);
*a2 = (void *)(v8 + **((_QWORD **)this + 1));
*a3 = *(_DWORD *)(*((_QWORD *)this + 1) + 8LL) - v8;
return 1;
}
| Next:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x8]
TEST RDI,RDI
JNZ 0x001fc5e5
LEA RDX,[0x2ec44f]
LEA R12,[RSP + 0x10]
MOV RDI,R12
MOV ESI,0x3
MOV ECX,0x8d
CALL 0x002072ba
LAB_001fc5bb:
LEA RSI,[0x2ec5b6]
MOV RDI,R12
CALL 0x00206db8
LAB_001fc5ca:
LEA RDI,[RSP + 0xf]
MOV RSI,RAX
CALL 0x00206e92
LAB_001fc5d7:
LEA RDI,[RSP + 0x10]
CALL 0x002072d8
MOV RDI,qword ptr [R14 + 0x8]
LAB_001fc5e5:
MOV R12,qword ptr [RDI + 0x8]
LEA RCX,[RDI + 0x10]
MOV EAX,0xf
CMP qword ptr [RDI],RCX
JZ 0x001fc5fb
MOV RAX,qword ptr [RDI + 0x10]
LAB_001fc5fb:
LEA RCX,[R12 + R12*0x1]
CMP R12,RAX
CMOVC RCX,RAX
LEA RAX,[R12 + 0x7fffffff]
CMP RAX,RCX
CMOVC RCX,RAX
CMP RCX,0x11
MOV ESI,0x10
CMOVNC RSI,RCX
XOR EDX,EDX
CALL 0x0011f140
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX]
ADD RAX,R12
MOV qword ptr [R15],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV EAX,dword ptr [RAX + 0x8]
SUB EAX,R12D
MOV dword ptr [RBX],EAX
MOV AL,0x1
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* google::protobuf::io::StringOutputStream::Next(void**, int*) */
int8 __thiscall
google::protobuf::io::StringOutputStream::Next(StringOutputStream *this,void **param_1,int *param_2)
{
ulong uVar1;
int iVar2;
LogMessage *pLVar3;
ulong uVar4;
ulong uVar5;
long *plVar6;
LogFinisher local_59;
LogMessage local_58 [56];
plVar6 = *(long **)(this + 8);
if (plVar6 == (long *)0x0) {
internal::LogMessage::LogMessage
(local_58,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc"
,0x8d);
/* try { // try from 001fc5bb to 001fc5c9 has its CatchHandler @ 001fc652 */
pLVar3 = (LogMessage *)
internal::LogMessage::operator<<(local_58,"CHECK failed: target_ != NULL: ");
/* try { // try from 001fc5ca to 001fc5d6 has its CatchHandler @ 001fc650 */
internal::LogFinisher::operator=(&local_59,pLVar3);
internal::LogMessage::~LogMessage(local_58);
plVar6 = *(long **)(this + 8);
}
uVar1 = plVar6[1];
uVar4 = 0xf;
if ((long *)*plVar6 != plVar6 + 2) {
uVar4 = plVar6[2];
}
uVar5 = uVar1 * 2;
if (uVar1 < uVar4) {
uVar5 = uVar4;
}
if (uVar1 + 0x7fffffff < uVar5) {
uVar5 = uVar1 + 0x7fffffff;
}
uVar4 = 0x10;
if (0x10 < uVar5) {
uVar4 = uVar5;
}
std::__cxx11::string::resize((ulong)plVar6,(char)uVar4);
*param_1 = (void *)(**(long **)(this + 8) + uVar1);
iVar2 = *(int *)(*(long *)(this + 8) + 8) - (int)uVar1;
*param_2 = iVar2;
return CONCAT71((uint7)(uint3)((uint)iVar2 >> 8),1);
}
| |
38,408 | init_partitioned_key_cache | eloqsql/mysys/mf_keycache.c | static
int init_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache,
uint key_cache_block_size,
size_t use_mem, uint division_limit,
uint age_threshold, uint changed_blocks_hash_size)
{
int i;
size_t mem_per_cache;
size_t mem_decr;
int cnt;
SIMPLE_KEY_CACHE_CB *partition;
SIMPLE_KEY_CACHE_CB **partition_ptr;
uint partitions= keycache->partitions;
int blocks= 0;
DBUG_ENTER("partitioned_init_key_cache");
keycache->key_cache_block_size = key_cache_block_size;
if (keycache->key_cache_inited)
partition_ptr= keycache->partition_array;
else
{
if(!(partition_ptr=
(SIMPLE_KEY_CACHE_CB **) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB *) *
partitions, MYF(MY_WME))))
DBUG_RETURN(-1);
bzero(partition_ptr, sizeof(SIMPLE_KEY_CACHE_CB *) * partitions);
keycache->partition_array= partition_ptr;
}
mem_per_cache = use_mem / partitions;
mem_decr= mem_per_cache / 5;
for (i= 0; i < (int) partitions; i++)
{
my_bool key_cache_inited= keycache->key_cache_inited;
if (key_cache_inited)
partition= *partition_ptr;
else
{
if (!(partition=
(SIMPLE_KEY_CACHE_CB *) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB),
MYF(MY_WME))))
continue;
partition->key_cache_inited= 0;
}
cnt= init_simple_key_cache(partition, key_cache_block_size, mem_per_cache,
division_limit, age_threshold,
changed_blocks_hash_size);
if (cnt <= 0)
{
end_simple_key_cache(partition, 1);
if (!key_cache_inited)
{
my_free(partition);
partition= 0;
}
if ((i == 0 && cnt < 0) || i > 0)
{
/*
Here we have two cases:
1. i == 0 and cnt < 0
cnt < 0 => mem_per_cache is not big enough to allocate minimal
number of key blocks in the key cache of the partition.
Decrease the the number of the partitions by 1 and start again.
2. i > 0
There is not enough memory for one of the succeeding partitions.
Just skip this partition decreasing the number of partitions in
the key cache by one.
Do not change the value of mem_per_cache in both cases.
*/
if (key_cache_inited)
{
my_free(partition);
partition= 0;
if(key_cache_inited)
memmove(partition_ptr, partition_ptr+1,
sizeof(partition_ptr)*(partitions-i-1));
}
if (!--partitions)
break;
}
else
{
/*
We come here when i == 0 && cnt == 0.
cnt == 0 => the memory allocator fails to allocate a block of
memory of the size mem_per_cache. Decrease the value of
mem_per_cache without changing the current number of partitions
and start again. Make sure that such a decrease may happen not
more than 5 times in total.
*/
if (use_mem <= mem_decr)
break;
use_mem-= mem_decr;
}
i--;
mem_per_cache= use_mem/partitions;
continue;
}
else
{
blocks+= cnt;
*partition_ptr++= partition;
}
}
keycache->partitions= partitions= (uint) (partition_ptr-keycache->partition_array);
keycache->key_cache_mem_size= mem_per_cache * partitions;
for (i= 0; i < (int) partitions; i++)
keycache->partition_array[i]->hash_factor= partitions;
keycache->key_cache_inited= 1;
if (!partitions)
blocks= -1;
DBUG_RETURN(blocks);
} | O3 | c | init_partitioned_key_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, -0x60(%rbp)
movl %r8d, -0x5c(%rbp)
movl %ecx, -0x58(%rbp)
movl 0x1c(%rdi), %r14d
movl %esi, -0x54(%rbp)
movl %esi, 0x18(%rdi)
cmpb $0x0, (%rdi)
movq %rdi, -0x38(%rbp)
je 0xb6cc8
movq %rdi, %r15
movq 0x8(%rdi), %r12
jmp 0xb6d0d
movq %rdx, %rbx
leaq 0xb7a316(%rip), %rax # 0xc30fe8
movl (%rax), %edi
leaq (,%r14,8), %r15
movl $0x10, %edx
movq %r15, %rsi
callq 0xbf321
testq %rax, %rax
je 0xb6ed6
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2a2e0
movq -0x38(%rbp), %r15
movq %r12, 0x8(%r15)
movq %rbx, %rdx
xorl %edi, %edi
movq %rdx, -0x40(%rbp)
movq %rdx, %rax
xorl %edx, %edx
divq %r14
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
movq %rax, -0x50(%rbp)
mulq %rcx
testl %r14d, %r14d
jle 0xb6e7e
shrq $0x2, %rdx
movq %rdx, -0x68(%rbp)
movq $0x0, -0x48(%rbp)
xorl %ebx, %ebx
movb (%r15), %r13b
testb %r13b, %r13b
movq %r12, -0x30(%rbp)
je 0xb6d59
movq (%r12), %r12
jmp 0xb6d80
leaq 0xb7a288(%rip), %rax # 0xc30fe8
movl (%rax), %edi
movl $0x170, %esi # imm = 0x170
movl $0x10, %edx
callq 0xbf321
testq %rax, %rax
je 0xb6e0a
movq %rax, %r12
movb $0x0, (%rax)
movq %r12, %rdi
movl -0x54(%rbp), %esi
movq -0x50(%rbp), %rdx
movl -0x58(%rbp), %ecx
movl -0x5c(%rbp), %r8d
movl -0x60(%rbp), %r9d
callq 0xb52b5
movl %eax, %r15d
testl %eax, %eax
jle 0xb6dc3
movq -0x48(%rbp), %rax
addl %r15d, %eax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %r12, (%rax)
movq %rax, %r12
addq $0x8, %r12
movq -0x38(%rbp), %r15
jmp 0xb6e66
movq %r12, %rdi
movl $0x1, %esi
callq 0xb61b6
testb %r13b, %r13b
je 0xb6e10
testl %ebx, %ebx
sete %al
testl %r15d, %r15d
setne %cl
testl %ebx, %ebx
jg 0xb6de8
andb %cl, %al
je 0xb6e2b
movq %r12, %rdi
callq 0xbf54e
movq -0x30(%rbp), %rdi
leaq 0x8(%rdi), %rsi
movl %ebx, %edx
notl %edx
addl %r14d, %edx
shlq $0x3, %rdx
callq 0x2a150
jmp 0xb6e43
movq -0x30(%rbp), %r12
jmp 0xb6e66
movq %r12, %rdi
callq 0xbf54e
testl %ebx, %ebx
sete %al
testl %r15d, %r15d
setne %cl
testl %ebx, %ebx
jg 0xb6e43
andb %cl, %al
jne 0xb6e43
movq -0x40(%rbp), %rax
subq -0x68(%rbp), %rax
movq -0x38(%rbp), %r15
jbe 0xb6edd
movq -0x30(%rbp), %r12
jmp 0xb6e54
decl %r14d
movq -0x38(%rbp), %r15
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %r12
je 0xb6e71
decl %ebx
movl %r14d, %ecx
movq %rax, -0x40(%rbp)
xorl %edx, %edx
divq %rcx
movq %rax, -0x50(%rbp)
incl %ebx
cmpl %r14d, %ebx
jl 0xb6d47
movq %r12, %rcx
movq 0x8(%r15), %r12
movq -0x48(%rbp), %rdi
jmp 0xb6e81
movq %r12, %rcx
subq %r12, %rcx
shrq $0x3, %rcx
movl %ecx, 0x1c(%r15)
movl %ecx, %eax
imulq -0x50(%rbp), %rax
movq %rax, 0x10(%r15)
testl %ecx, %ecx
jle 0xb6eba
movl %ecx, %eax
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
xorl %edx, %edx
movq 0x8(%r15), %rsi
movq (%rsi,%rdx,8), %rsi
movl %ecx, 0x164(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0xb6ea4
movb $0x1, (%r15)
xorl %eax, %eax
cmpl $0x1, %ecx
sbbl %eax, %eax
orl %edi, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0xb6ec7
movq -0x30(%rbp), %r12
jmp 0xb6e71
| init_partitioned_key_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_60], r9d
mov [rbp+var_5C], r8d
mov [rbp+var_58], ecx
mov r14d, [rdi+1Ch]
mov [rbp+var_54], esi
mov [rdi+18h], esi
cmp byte ptr [rdi], 0
mov [rbp+var_38], rdi
jz short loc_B6CC8
mov r15, rdi
mov r12, [rdi+8]
jmp short loc_B6D0D
loc_B6CC8:
mov rbx, rdx
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
lea r15, ds:0[r14*8]
mov edx, 10h
mov rsi, r15
call my_malloc
test rax, rax
jz loc_B6ED6
mov r12, rax
mov rdi, rax
xor esi, esi
mov rdx, r15
call _memset
mov r15, [rbp+var_38]
mov [r15+8], r12
mov rdx, rbx
loc_B6D0D:
xor edi, edi
mov [rbp+var_40], rdx
mov rax, rdx
xor edx, edx
div r14
mov rcx, 0CCCCCCCCCCCCCCCDh
mov [rbp+var_50], rax
mul rcx
test r14d, r14d
jle loc_B6E7E
shr rdx, 2
mov [rbp+var_68], rdx
mov [rbp+var_48], 0
xor ebx, ebx
loc_B6D47:
mov r13b, [r15]
test r13b, r13b
mov [rbp+var_30], r12
jz short loc_B6D59
mov r12, [r12]
jmp short loc_B6D80
loc_B6D59:
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
mov esi, 170h
mov edx, 10h
call my_malloc
test rax, rax
jz loc_B6E0A
mov r12, rax
mov byte ptr [rax], 0
loc_B6D80:
mov rdi, r12
mov esi, [rbp+var_54]
mov rdx, [rbp+var_50]
mov ecx, [rbp+var_58]
mov r8d, [rbp+var_5C]
mov r9d, [rbp+var_60]
call init_simple_key_cache
mov r15d, eax
test eax, eax
jle short loc_B6DC3
mov rax, [rbp+var_48]
add eax, r15d
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
mov [rax], r12
mov r12, rax
add r12, 8
mov r15, [rbp+var_38]
jmp loc_B6E66
loc_B6DC3:
mov rdi, r12
mov esi, 1
call end_simple_key_cache
test r13b, r13b
jz short loc_B6E10
test ebx, ebx
setz al
test r15d, r15d
setnz cl
test ebx, ebx
jg short loc_B6DE8
and al, cl
jz short loc_B6E2B
loc_B6DE8:
mov rdi, r12
call my_free
mov rdi, [rbp+var_30]
lea rsi, [rdi+8]
mov edx, ebx
not edx
add edx, r14d
shl rdx, 3
call _memmove
jmp short loc_B6E43
loc_B6E0A:
mov r12, [rbp+var_30]
jmp short loc_B6E66
loc_B6E10:
mov rdi, r12
call my_free
test ebx, ebx
setz al
test r15d, r15d
setnz cl
test ebx, ebx
jg short loc_B6E43
and al, cl
jnz short loc_B6E43
loc_B6E2B:
mov rax, [rbp+var_40]
sub rax, [rbp+var_68]
mov r15, [rbp+var_38]
jbe loc_B6EDD
mov r12, [rbp+var_30]
jmp short loc_B6E54
loc_B6E43:
dec r14d
mov r15, [rbp+var_38]
mov rax, [rbp+var_40]
mov r12, [rbp+var_30]
jz short loc_B6E71
loc_B6E54:
dec ebx
mov ecx, r14d
mov [rbp+var_40], rax
xor edx, edx
div rcx
mov [rbp+var_50], rax
loc_B6E66:
inc ebx
cmp ebx, r14d
jl loc_B6D47
loc_B6E71:
mov rcx, r12
mov r12, [r15+8]
mov rdi, [rbp+var_48]
jmp short loc_B6E81
loc_B6E7E:
mov rcx, r12
loc_B6E81:
sub rcx, r12
shr rcx, 3
mov [r15+1Ch], ecx
mov eax, ecx
imul rax, [rbp+var_50]
mov [r15+10h], rax
test ecx, ecx
jle short loc_B6EBA
mov eax, ecx
and eax, 7FFFFFFFh
xor edx, edx
loc_B6EA4:
mov rsi, [r15+8]
mov rsi, [rsi+rdx*8]
mov [rsi+164h], ecx
inc rdx
cmp rax, rdx
jnz short loc_B6EA4
loc_B6EBA:
mov byte ptr [r15], 1
xor eax, eax
cmp ecx, 1
sbb eax, eax
or eax, edi
loc_B6EC7:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B6ED6:
mov eax, 0FFFFFFFFh
jmp short loc_B6EC7
loc_B6EDD:
mov r12, [rbp+var_30]
jmp short loc_B6E71
| long long init_partitioned_key_cache(
char *a1,
unsigned int a2,
unsigned long long a3,
unsigned int a4,
unsigned int a5,
unsigned int a6)
{
unsigned long long v6; // r14
char *v7; // r15
char **v8; // r12
unsigned long long v9; // rbx
long long v10; // rax
int v11; // edi
unsigned __int128 v12; // rax
int v13; // ebx
char v14; // r13
char *v15; // r12
char *v16; // rax
int inited; // r15d
unsigned long long v18; // rax
char **v19; // rcx
unsigned long long v20; // rcx
long long v21; // rdx
unsigned long long v23; // [rsp+8h] [rbp-68h]
unsigned long long v27; // [rsp+20h] [rbp-50h]
int v28; // [rsp+28h] [rbp-48h]
unsigned long long v29; // [rsp+30h] [rbp-40h]
char **v31; // [rsp+40h] [rbp-30h]
v6 = *((unsigned int *)a1 + 7);
*((_DWORD *)a1 + 6) = a2;
if ( *a1 )
{
v7 = a1;
v8 = (char **)*((_QWORD *)a1 + 1);
}
else
{
v9 = a3;
v10 = my_malloc(key_memory_KEY_CACHE, 8 * v6, 16LL);
if ( !v10 )
return 0xFFFFFFFFLL;
v8 = (char **)v10;
memset(v10, 0LL, 8 * v6);
v7 = a1;
*((_QWORD *)a1 + 1) = v8;
a3 = v9;
}
v11 = 0;
v29 = a3;
v27 = a3 / v6;
v12 = 0xCCCCCCCCCCCCCCCDLL * (unsigned __int128)(a3 / v6);
if ( (int)v6 <= 0 )
{
v19 = v8;
goto LABEL_27;
}
v23 = *((_QWORD *)&v12 + 1) >> 2;
v28 = 0;
v13 = 0;
while ( 1 )
{
v14 = *v7;
v31 = v8;
if ( *v7 )
{
v15 = *v8;
}
else
{
v16 = (char *)my_malloc(key_memory_KEY_CACHE, 368LL, 16LL);
if ( !v16 )
goto LABEL_24;
v15 = v16;
*v16 = 0;
}
inited = init_simple_key_cache(v15, a2, v27, a4, a5, a6);
if ( inited <= 0 )
break;
v28 += inited;
*v31 = v15;
v8 = v31 + 1;
v7 = a1;
LABEL_24:
if ( ++v13 >= (int)v6 )
goto LABEL_25;
}
end_simple_key_cache((long long)v15, 1);
if ( v14 )
{
if ( v13 > 0 || inited != 0 && v13 == 0 )
{
my_free(v15);
memmove(v31, v31 + 1, 8LL * (unsigned int)(v6 + ~v13));
goto LABEL_22;
}
}
else
{
my_free(v15);
if ( v13 > 0 || inited != 0 && v13 == 0 )
{
LABEL_22:
LODWORD(v6) = v6 - 1;
v7 = a1;
v18 = v29;
v8 = v31;
if ( !(_DWORD)v6 )
goto LABEL_25;
goto LABEL_23;
}
}
v18 = v29 - v23;
v7 = a1;
if ( v29 > v23 )
{
v8 = v31;
LABEL_23:
--v13;
v29 = v18;
v27 = v18 / (unsigned int)v6;
goto LABEL_24;
}
v8 = v31;
LABEL_25:
v19 = v8;
v8 = (char **)*((_QWORD *)v7 + 1);
v11 = v28;
LABEL_27:
v20 = (unsigned long long)((char *)v19 - (char *)v8) >> 3;
*((_DWORD *)v7 + 7) = v20;
*((_QWORD *)v7 + 2) = v27 * (unsigned int)v20;
if ( (int)v20 > 0 )
{
v21 = 0LL;
do
*(_DWORD *)(*(_QWORD *)(*((_QWORD *)v7 + 1) + 8 * v21++) + 356LL) = v20;
while ( (v20 & 0x7FFFFFFF) != v21 );
}
*v7 = 1;
return v11 | (unsigned int)-((_DWORD)v20 == 0);
}
| init_partitioned_key_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x60],R9D
MOV dword ptr [RBP + -0x5c],R8D
MOV dword ptr [RBP + -0x58],ECX
MOV R14D,dword ptr [RDI + 0x1c]
MOV dword ptr [RBP + -0x54],ESI
MOV dword ptr [RDI + 0x18],ESI
CMP byte ptr [RDI],0x0
MOV qword ptr [RBP + -0x38],RDI
JZ 0x001b6cc8
MOV R15,RDI
MOV R12,qword ptr [RDI + 0x8]
JMP 0x001b6d0d
LAB_001b6cc8:
MOV RBX,RDX
LEA RAX,[0xd30fe8]
MOV EDI,dword ptr [RAX]
LEA R15,[R14*0x8]
MOV EDX,0x10
MOV RSI,R15
CALL 0x001bf321
TEST RAX,RAX
JZ 0x001b6ed6
MOV R12,RAX
MOV RDI,RAX
XOR ESI,ESI
MOV RDX,R15
CALL 0x0012a2e0
MOV R15,qword ptr [RBP + -0x38]
MOV qword ptr [R15 + 0x8],R12
MOV RDX,RBX
LAB_001b6d0d:
XOR EDI,EDI
MOV qword ptr [RBP + -0x40],RDX
MOV RAX,RDX
XOR EDX,EDX
DIV R14
MOV RCX,-0x3333333333333333
MOV qword ptr [RBP + -0x50],RAX
MUL RCX
TEST R14D,R14D
JLE 0x001b6e7e
SHR RDX,0x2
MOV qword ptr [RBP + -0x68],RDX
MOV qword ptr [RBP + -0x48],0x0
XOR EBX,EBX
LAB_001b6d47:
MOV R13B,byte ptr [R15]
TEST R13B,R13B
MOV qword ptr [RBP + -0x30],R12
JZ 0x001b6d59
MOV R12,qword ptr [R12]
JMP 0x001b6d80
LAB_001b6d59:
LEA RAX,[0xd30fe8]
MOV EDI,dword ptr [RAX]
MOV ESI,0x170
MOV EDX,0x10
CALL 0x001bf321
TEST RAX,RAX
JZ 0x001b6e0a
MOV R12,RAX
MOV byte ptr [RAX],0x0
LAB_001b6d80:
MOV RDI,R12
MOV ESI,dword ptr [RBP + -0x54]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x58]
MOV R8D,dword ptr [RBP + -0x5c]
MOV R9D,dword ptr [RBP + -0x60]
CALL 0x001b52b5
MOV R15D,EAX
TEST EAX,EAX
JLE 0x001b6dc3
MOV RAX,qword ptr [RBP + -0x48]
ADD EAX,R15D
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],R12
MOV R12,RAX
ADD R12,0x8
MOV R15,qword ptr [RBP + -0x38]
JMP 0x001b6e66
LAB_001b6dc3:
MOV RDI,R12
MOV ESI,0x1
CALL 0x001b61b6
TEST R13B,R13B
JZ 0x001b6e10
TEST EBX,EBX
SETZ AL
TEST R15D,R15D
SETNZ CL
TEST EBX,EBX
JG 0x001b6de8
AND AL,CL
JZ 0x001b6e2b
LAB_001b6de8:
MOV RDI,R12
CALL 0x001bf54e
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RDI + 0x8]
MOV EDX,EBX
NOT EDX
ADD EDX,R14D
SHL RDX,0x3
CALL 0x0012a150
JMP 0x001b6e43
LAB_001b6e0a:
MOV R12,qword ptr [RBP + -0x30]
JMP 0x001b6e66
LAB_001b6e10:
MOV RDI,R12
CALL 0x001bf54e
TEST EBX,EBX
SETZ AL
TEST R15D,R15D
SETNZ CL
TEST EBX,EBX
JG 0x001b6e43
AND AL,CL
JNZ 0x001b6e43
LAB_001b6e2b:
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,qword ptr [RBP + -0x68]
MOV R15,qword ptr [RBP + -0x38]
JBE 0x001b6edd
MOV R12,qword ptr [RBP + -0x30]
JMP 0x001b6e54
LAB_001b6e43:
DEC R14D
MOV R15,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x40]
MOV R12,qword ptr [RBP + -0x30]
JZ 0x001b6e71
LAB_001b6e54:
DEC EBX
MOV ECX,R14D
MOV qword ptr [RBP + -0x40],RAX
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_001b6e66:
INC EBX
CMP EBX,R14D
JL 0x001b6d47
LAB_001b6e71:
MOV RCX,R12
MOV R12,qword ptr [R15 + 0x8]
MOV RDI,qword ptr [RBP + -0x48]
JMP 0x001b6e81
LAB_001b6e7e:
MOV RCX,R12
LAB_001b6e81:
SUB RCX,R12
SHR RCX,0x3
MOV dword ptr [R15 + 0x1c],ECX
MOV EAX,ECX
IMUL RAX,qword ptr [RBP + -0x50]
MOV qword ptr [R15 + 0x10],RAX
TEST ECX,ECX
JLE 0x001b6eba
MOV EAX,ECX
AND EAX,0x7fffffff
XOR EDX,EDX
LAB_001b6ea4:
MOV RSI,qword ptr [R15 + 0x8]
MOV RSI,qword ptr [RSI + RDX*0x8]
MOV dword ptr [RSI + 0x164],ECX
INC RDX
CMP RAX,RDX
JNZ 0x001b6ea4
LAB_001b6eba:
MOV byte ptr [R15],0x1
XOR EAX,EAX
CMP ECX,0x1
SBB EAX,EAX
OR EAX,EDI
LAB_001b6ec7:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b6ed6:
MOV EAX,0xffffffff
JMP 0x001b6ec7
LAB_001b6edd:
MOV R12,qword ptr [RBP + -0x30]
JMP 0x001b6e71
|
uint init_partitioned_key_cache
(char *param_1,int4 param_2,ulong param_3,int4 param_4,int4 param_5
,int4 param_6)
{
char cVar1;
int iVar2;
uint uVar3;
int8 *__s;
int1 *puVar4;
ulong uVar5;
ulong uVar6;
uint uVar7;
int8 *puVar8;
uint uVar9;
bool bVar10;
ulong local_58;
ulong local_48;
uVar7 = *(uint *)(param_1 + 0x1c);
uVar5 = (ulong)uVar7;
*(int4 *)(param_1 + 0x18) = param_2;
if (*param_1 == '\0') {
__s = (int8 *)my_malloc(key_memory_KEY_CACHE,uVar5 * 8,0x10);
if (__s == (int8 *)0x0) {
return 0xffffffff;
}
memset(__s,0,uVar5 * 8);
*(int8 **)(param_1 + 8) = __s;
}
else {
__s = *(int8 **)(param_1 + 8);
}
uVar3 = 0;
local_58 = param_3 / uVar5;
puVar8 = __s;
if (0 < (int)uVar7) {
uVar6 = local_58 / 5;
uVar3 = 0;
uVar7 = 0;
local_48 = param_3;
do {
cVar1 = *param_1;
if (cVar1 == '\0') {
puVar4 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0x10);
if (puVar4 != (int1 *)0x0) {
*puVar4 = 0;
goto LAB_001b6d80;
}
}
else {
puVar4 = (int1 *)*__s;
LAB_001b6d80:
iVar2 = init_simple_key_cache(puVar4,param_2,local_58,param_4,param_5,param_6);
if (iVar2 < 1) {
end_simple_key_cache(puVar4,1);
if (cVar1 == '\0') {
my_free(puVar4);
if (((int)uVar7 < 1) && (uVar7 != 0 || iVar2 == 0)) goto LAB_001b6e2b;
LAB_001b6e43:
uVar9 = (int)uVar5 - 1;
uVar5 = (ulong)uVar9;
if (uVar9 == 0) break;
}
else {
if ((0 < (int)uVar7) || (uVar7 == 0 && iVar2 != 0)) {
my_free(puVar4);
memmove(__s,__s + 1,(ulong)(~uVar7 + (int)uVar5) << 3);
goto LAB_001b6e43;
}
LAB_001b6e2b:
bVar10 = local_48 < uVar6;
local_48 = local_48 - uVar6;
if (bVar10 || local_48 == 0) break;
}
uVar7 = uVar7 - 1;
local_58 = local_48 / uVar5;
}
else {
uVar3 = uVar3 + iVar2;
*__s = puVar4;
__s = __s + 1;
}
}
uVar7 = uVar7 + 1;
} while ((int)uVar7 < (int)uVar5);
puVar8 = *(int8 **)(param_1 + 8);
}
uVar5 = (ulong)((long)__s - (long)puVar8) >> 3;
uVar7 = (uint)uVar5;
*(uint *)(param_1 + 0x1c) = uVar7;
*(ulong *)(param_1 + 0x10) = (uVar5 & 0xffffffff) * local_58;
if (0 < (int)uVar7) {
uVar5 = 0;
do {
*(uint *)(*(long *)(*(long *)(param_1 + 8) + uVar5 * 8) + 0x164) = uVar7;
uVar5 = uVar5 + 1;
} while ((uVar7 & 0x7fffffff) != uVar5);
}
*param_1 = '\x01';
return -(uint)(uVar7 == 0) | uVar3;
}
| |
38,409 | list_delete | eloqsql/mysys/list.c | LIST *list_delete(LIST *root, LIST *element)
{
if (element->prev)
element->prev->next=element->next;
else
root=element->next;
if (element->next)
element->next->prev=element->prev;
return root;
} | O0 | c | list_delete:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0xae50b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0xae517
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xae534
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
| list_delete:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jz short loc_AE50B
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+8], rcx
jmp short loc_AE517
loc_AE50B:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_8], rax
loc_AE517:
mov rax, [rbp+var_10]
cmp qword ptr [rax+8], 0
jz short loc_AE534
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rax], rcx
loc_AE534:
mov rax, [rbp+var_8]
pop rbp
retn
| long long list_delete(long long a1, _QWORD *a2)
{
if ( *a2 )
*(_QWORD *)(*a2 + 8LL) = a2[1];
else
a1 = a2[1];
if ( a2[1] )
*(_QWORD *)a2[1] = *a2;
return a1;
}
| list_delete:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JZ 0x001ae50b
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001ae517
LAB_001ae50b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
LAB_001ae517:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001ae534
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX],RCX
LAB_001ae534:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
long list_delete(long param_1,long *param_2)
{
long local_10;
if (*param_2 == 0) {
local_10 = param_2[1];
}
else {
*(long *)(*param_2 + 8) = param_2[1];
local_10 = param_1;
}
if (param_2[1] != 0) {
*(long *)param_2[1] = *param_2;
}
return local_10;
}
| |
38,410 | FindPeaksCppTest_SciPyCompatibility_Test::TestBody() | giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp | TEST_F(FindPeaksCppTest, SciPyCompatibility) {
// This is a known test signal with peaks that match SciPy's find_peaks results
std::vector<double> scipy_signal = {0, 1, 0, 2, 0, 3, 0, 2, 0, 1, 0};
// These are the expected peak indices from SciPy's find_peaks
std::vector<size_t> expected_peaks = {1, 3, 5, 7, 9};
PeakConditions conditions;
conditions.set_height(0.5); // Same as SciPy test
auto peaks = find_peaks(scipy_signal, conditions);
ASSERT_EQ(expected_peaks.size(), peaks.size());
for (size_t i = 0; i < peaks.size(); i++) {
EXPECT_EQ(expected_peaks[i], peaks[i].peak);
}
} | O1 | cpp | FindPeaksCppTest_SciPyCompatibility_Test::TestBody():
pushq %rbx
movq %rdi, %rbx
callq 0xdbf4
movl $0x88, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x84e0
nop
| _ZN40FindPeaksCppTest_SciPyCompatibility_TestD0Ev:
push rbx
mov rbx, rdi
call _ZN16FindPeaksCppTestD2Ev; FindPeaksCppTest::~FindPeaksCppTest()
mov esi, 88h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void FindPeaksCppTest_SciPyCompatibility_Test::~FindPeaksCppTest_SciPyCompatibility_Test(
FindPeaksCppTest_SciPyCompatibility_Test *this)
{
FindPeaksCppTest::~FindPeaksCppTest(this);
operator delete(this, 0x88uLL);
}
| ~FindPeaksCppTest_SciPyCompatibility_Test:
PUSH RBX
MOV RBX,RDI
CALL 0x0010dbf4
MOV ESI,0x88
MOV RDI,RBX
POP RBX
JMP 0x001084e0
|
/* FindPeaksCppTest_SciPyCompatibility_Test::~FindPeaksCppTest_SciPyCompatibility_Test() */
void __thiscall
FindPeaksCppTest_SciPyCompatibility_Test::~FindPeaksCppTest_SciPyCompatibility_Test
(FindPeaksCppTest_SciPyCompatibility_Test *this)
{
FindPeaksCppTest::~FindPeaksCppTest((FindPeaksCppTest *)this);
operator_delete(this,0x88);
return;
}
| |
38,411 | FindPeaksCppTest_SciPyCompatibility_Test::TestBody() | giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp | TEST_F(FindPeaksCppTest, SciPyCompatibility) {
// This is a known test signal with peaks that match SciPy's find_peaks results
std::vector<double> scipy_signal = {0, 1, 0, 2, 0, 3, 0, 2, 0, 1, 0};
// These are the expected peak indices from SciPy's find_peaks
std::vector<size_t> expected_peaks = {1, 3, 5, 7, 9};
PeakConditions conditions;
conditions.set_height(0.5); // Same as SciPy test
auto peaks = find_peaks(scipy_signal, conditions);
ASSERT_EQ(expected_peaks.size(), peaks.size());
for (size_t i = 0; i < peaks.size(); i++) {
EXPECT_EQ(expected_peaks[i], peaks[i].peak);
}
} | O2 | cpp | FindPeaksCppTest_SciPyCompatibility_Test::TestBody():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
leaq 0x257ea(%rip), %rsi # 0x318a8
pushq $0xb
popq %rdx
leaq 0x50(%rsp), %rbx
movq %rdx, %rcx
movq %rbx, %rdi
rep movsq (%rsi), %es:(%rdi)
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rcx
movq %rbx, %rsi
callq 0xc724
movups 0x255c0(%rip), %xmm0 # 0x316a8
movaps %xmm0, 0x10(%rbx)
movups 0x255a5(%rip), %xmm0 # 0x31698
movaps %xmm0, (%rbx)
movq $0x9, 0x20(%rbx)
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x5
popq %rdx
leaq 0x10(%rsp), %rcx
callq 0xc75a
movaps 0x24f54(%rip), %xmm0 # 0x31070
leaq 0xb0(%rsp), %rdx
movups %xmm0, 0x8(%rdx)
movaps 0x24ee1(%rip), %xmm0 # 0x31010
movups %xmm0, 0x20(%rdx)
movq $0x1, 0x30(%rdx)
movups %xmm0, 0x40(%rdx)
movups %xmm0, 0x58(%rdx)
andq $0x0, 0x68(%rdx)
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, 0x70(%rdx)
andq $0x0, 0x78(%rdx)
orq $-0x1, 0x80(%rdx)
leaq 0x50(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2e740
movq 0x28(%rsp), %rdx
subq 0x20(%rsp), %rdx
sarq $0x3, %rdx
movq %rsp, %rcx
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
movq %rdx, (%rcx)
pushq $0x70
popq %rsi
cqto
idivq %rsi
leaq 0x8(%rsp), %r8
movq %rax, (%r8)
leaq 0x252bf(%rip), %rsi # 0x31466
leaq 0x252c1(%rip), %rdx # 0x3146f
leaq 0x10(%rsp), %rdi
callq 0xdaeb
cmpb $0x0, 0x10(%rsp)
je 0xc297
leaq 0x18(%rsp), %rdi
callq 0xca92
xorl %ebx, %ebx
leaq 0x10(%rsp), %r12
movq %rsp, %r13
leaq 0x8(%rsp), %rbp
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x50(%rsp), %r8
movq 0x58(%rsp), %rax
subq %r8, %rax
cqto
pushq $0x70
popq %rcx
idivq %rcx
cmpq %rax, %r15
jae 0xc301
movq 0x20(%rsp), %rcx
addq %rbx, %rcx
addq %r14, %r8
movq %r12, %rdi
leaq 0x25267(%rip), %rsi # 0x3147c
leaq 0x25272(%rip), %rdx # 0x3148e
callq 0xdaeb
cmpb $0x0, 0x10(%rsp)
jne 0xc27d
movq %r13, %rdi
callq 0x1575e
movq 0x18(%rsp), %rax
leaq 0x28112(%rip), %r8 # 0x3434e
testq %rax, %rax
je 0xc244
movq (%rax), %r8
movq %rbp, %rdi
pushq $0x1
popq %rsi
leaq 0x24ef3(%rip), %rdx # 0x31144
movl $0xbd, %ecx
callq 0x135fe
movq %rbp, %rdi
movq %r13, %rsi
callq 0x11afe
movq %rbp, %rdi
callq 0x1365e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xc27d
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x18(%rsp), %rdi
callq 0xca92
incq %r15
addq $0x70, %r14
addq $0x8, %rbx
jmp 0xc1e2
movq %rsp, %rdi
callq 0x1575e
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0xc2ae
movq (%rax), %r8
jmp 0xc2b5
leaq 0x28099(%rip), %r8 # 0x3434e
leaq 0x24e88(%rip), %rdx # 0x31144
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0xba, %ecx
callq 0x135fe
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x11afe
leaq 0x18(%rsp), %rbx
leaq 0x8(%rsp), %rdi
callq 0x1365e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xc2f9
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0xca92
leaq 0x50(%rsp), %rdi
callq 0xceaa
leaq 0x20(%rsp), %rdi
callq 0xda62
leaq 0x38(%rsp), %rdi
callq 0xd97c
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc343
jmp 0xc352
jmp 0xc366
jmp 0xc375
movq %rax, %r14
jmp 0xc382
movq %rax, %r14
jmp 0xc38c
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x1365e
jmp 0xc355
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xc369
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0xc369
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0xca92
jmp 0xc378
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0xceaa
leaq 0x20(%rsp), %rdi
callq 0xda62
leaq 0x38(%rsp), %rdi
callq 0xd97c
movq %r14, %rdi
callq 0x89a0
| _ZN40FindPeaksCppTest_SciPyCompatibility_Test8TestBodyEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 138h
lea rsi, unk_318A8
push 0Bh
pop rdx
lea rbx, [rsp+168h+var_118]
mov rcx, rdx
mov rdi, rbx
rep movsq
lea rdi, [rsp+168h+var_130]
lea rcx, [rsp+168h+var_148]
mov rsi, rbx
call _ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_; std::vector<double>::vector(std::initializer_list<double>,std::allocator<double> const&)
movups xmm0, cs:xmmword_316A8
movaps xmmword ptr [rbx+10h], xmm0
movups xmm0, cs:xmmword_31698
movaps xmmword ptr [rbx], xmm0
mov qword ptr [rbx+20h], 9
lea rdi, [rsp+168h+var_148]
lea rsi, [rsp+168h+var_118]
push 5
pop rdx
lea rcx, [rsp+168h+var_158]
call _ZNSt6vectorImSaImEEC2ESt16initializer_listImERKS0_; std::vector<ulong>::vector(std::initializer_list<ulong>,std::allocator<ulong> const&)
movaps xmm0, cs:xmmword_31070
lea rdx, [rsp+168h+var_B8]
movups xmmword ptr [rdx+8], xmm0
movaps xmm0, cs:xmmword_31010
movups xmmword ptr [rdx+20h], xmm0
mov qword ptr [rdx+30h], 1
movups xmmword ptr [rdx+40h], xmm0
movups xmmword ptr [rdx+58h], xmm0
and qword ptr [rdx+68h], 0
mov rax, 3FE0000000000000h
mov [rdx+70h], rax
and qword ptr [rdx+78h], 0
or qword ptr [rdx+80h], 0FFFFFFFFFFFFFFFFh
lea rdi, [rsp+168h+var_118]
lea rsi, [rsp+168h+var_130]
call _ZN9findPeaks10find_peaksERKSt6vectorIdSaIdEENS_14PeakConditionsE; findPeaks::find_peaks(std::vector<double> const&,findPeaks::PeakConditions)
mov rdx, [rsp+168h+var_140]
sub rdx, [rsp+168h+var_148]
sar rdx, 3
mov rcx, rsp
mov rax, [rsp+168h+var_110]
sub rax, [rsp+168h+var_118]
mov [rcx], rdx
push 70h ; 'p'
pop rsi
cqo
idiv rsi
lea r8, [rsp+168h+var_160]
mov [r8], rax
lea rsi, aExpectedPeaksS; "expected_peaks.size()"
lea rdx, aExpectedPeaksS+9; "peaks.size()"
lea rdi, [rsp+168h+var_158]; this
call _ZN7testing8internal11CmpHelperEQImmEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperEQ<ulong,ulong>(char const*,char const*,ulong const&,ulong const&)
cmp [rsp+168h+var_158], 0
jz loc_C297
lea rdi, [rsp+168h+var_150]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
xor ebx, ebx
lea r12, [rsp+168h+var_158]
mov r13, rsp
lea rbp, [rsp+168h+var_160]
xor r14d, r14d
xor r15d, r15d
loc_C1E2:
mov r8, [rsp+168h+var_118]
mov rax, [rsp+168h+var_110]
sub rax, r8
cqo
push 70h ; 'p'
pop rcx
idiv rcx
cmp r15, rax
jnb loc_C301
mov rcx, [rsp+168h+var_148]
add rcx, rbx
add r8, r14
mov rdi, r12; this
lea rsi, aExpectedPeaksI; "expected_peaks[i]"
lea rdx, aPeaksIPeak; "peaks[i].peak"
call _ZN7testing8internal11CmpHelperEQImmEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperEQ<ulong,ulong>(char const*,char const*,ulong const&,ulong const&)
cmp [rsp+168h+var_158], 0
jnz short loc_C27D
mov rdi, r13; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rax, [rsp+168h+var_150]
lea r8, aSFromSSMsTotal+1Ah; ""
test rax, rax
jz short loc_C244
mov r8, [rax]
loc_C244:
mov rdi, rbp
push 1
pop rsi
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0BDh
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
mov rdi, rbp
mov rsi, r13
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
mov rdi, rbp; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
mov rdi, [rsp+168h+var_168]
test rdi, rdi
jz short loc_C27D
mov rax, [rdi]
call qword ptr [rax+8]
loc_C27D:
lea rdi, [rsp+168h+var_150]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
inc r15
add r14, 70h ; 'p'
add rbx, 8
jmp loc_C1E2
loc_C297:
mov rdi, rsp; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rax, [rsp+168h+var_150]
test rax, rax
jz short loc_C2AE
mov r8, [rax]
jmp short loc_C2B5
loc_C2AE:
lea r8, aSFromSSMsTotal+1Ah; ""
loc_C2B5:
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+168h+var_160]
push 2
pop rsi
mov ecx, 0BAh
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
lea rdi, [rsp+168h+var_160]
mov rsi, rsp
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
lea rbx, [rsp+168h+var_150]
lea rdi, [rsp+168h+var_160]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
mov rdi, [rsp+168h+var_168]
test rdi, rdi
jz short loc_C2F9
mov rax, [rdi]
call qword ptr [rax+8]
loc_C2F9:
mov rdi, rbx
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
loc_C301:
lea rdi, [rsp+168h+var_118]
call _ZNSt12_Vector_baseIN9findPeaks13peak_result_tESaIS1_EED2Ev; std::_Vector_base<findPeaks::peak_result_t>::~_Vector_base()
lea rdi, [rsp+168h+var_148]
call _ZNSt12_Vector_baseImSaImEED2Ev; std::_Vector_base<ulong>::~_Vector_base()
lea rdi, [rsp+168h+var_130]
call _ZNSt12_Vector_baseIdSaIdEED2Ev; std::_Vector_base<double>::~_Vector_base()
add rsp, 138h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_C343
jmp short loc_C352
jmp short loc_C366
jmp short loc_C375
mov r14, rax
jmp short loc_C382
mov r14, rax
jmp short loc_C38C
loc_C343:
mov r14, rax
lea rdi, [rsp+arg_0]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
jmp short loc_C355
loc_C352:
mov r14, rax
loc_C355:
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_C369
mov rax, [rdi]
call qword ptr [rax+8]
jmp short loc_C369
loc_C366:
mov r14, rax
loc_C369:
lea rdi, [rsp+arg_10]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
jmp short loc_C378
loc_C375:
mov r14, rax
loc_C378:
lea rdi, [rsp+arg_48]
call _ZNSt12_Vector_baseIN9findPeaks13peak_result_tESaIS1_EED2Ev; std::_Vector_base<findPeaks::peak_result_t>::~_Vector_base()
loc_C382:
lea rdi, [rsp+arg_18]
call _ZNSt12_Vector_baseImSaImEED2Ev; std::_Vector_base<ulong>::~_Vector_base()
loc_C38C:
lea rdi, [rsp+arg_30]
call _ZNSt12_Vector_baseIdSaIdEED2Ev; std::_Vector_base<double>::~_Vector_base()
mov rdi, r14
call __Unwind_Resume
| long long FindPeaksCppTest_SciPyCompatibility_Test::TestBody(FindPeaksCppTest_SciPyCompatibility_Test *this)
{
int v1; // ecx
int v2; // r8d
int v3; // r9d
const char *v4; // rsi
long long v5; // rbx
long long v6; // r14
unsigned long long i; // r15
long long v8; // rdx
char *v9; // r8
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
char *v14; // r8
int v15; // edx
int v16; // ecx
int v17; // r8d
int v18; // r9d
long long v20; // [rsp+0h] [rbp-168h] BYREF
long long v21; // [rsp+8h] [rbp-160h] BYREF
int v22; // [rsp+10h] [rbp-158h] BYREF
char **v23; // [rsp+18h] [rbp-150h] BYREF
long long v24; // [rsp+20h] [rbp-148h] BYREF
long long v25; // [rsp+28h] [rbp-140h]
int v26; // [rsp+30h] [rbp-138h]
char v27[8]; // [rsp+38h] [rbp-130h] BYREF
int v28; // [rsp+40h] [rbp-128h]
int v29; // [rsp+48h] [rbp-120h]
_BYTE v30[88]; // [rsp+50h] [rbp-118h] BYREF
int v31; // [rsp+A8h] [rbp-C0h]
_DWORD v32[38]; // [rsp+B0h] [rbp-B8h] BYREF
char v33; // [rsp+148h] [rbp-20h]
qmemcpy(v30, &unk_318A8, sizeof(v30));
std::vector<double>::vector(v27, v30, 11LL, &v24);
*(_OWORD *)&v30[16] = xmmword_316A8;
*(_OWORD *)v30 = xmmword_31698;
*(_QWORD *)&v30[32] = 9LL;
std::vector<unsigned long>::vector(&v24, v30, 5LL, &v22);
findPeaks::find_peaks(
(unsigned int)v30,
(unsigned int)v27,
(unsigned int)v32,
v1,
v2,
v3,
v20,
v21,
v22,
(_DWORD)v23,
v24,
v25,
v26,
v27[0],
v28,
v29,
v30[0],
*(_DWORD *)&v30[8],
*(_DWORD *)&v30[16],
v30[24],
*(_DWORD *)&v30[32],
*(_DWORD *)&v30[40],
v30[48],
*(_DWORD *)&v30[56],
*(_DWORD *)&v30[64],
v30[72],
*(_DWORD *)&v30[80],
v31,
v32[0],
0,
255,
v32[6],
-1,
-1,
1,
v32[14],
-1,
-1,
v32[20],
-1,
-1,
0,
0,
0,
-1,
v32[34],
v32[36],
v33);
v20 = (v25 - v24) >> 3;
v21 = (*(_QWORD *)&v30[8] - *(_QWORD *)v30) / 112LL;
v4 = "expected_peaks.size()";
testing::internal::CmpHelperEQ<unsigned long,unsigned long>((testing *)&v22);
if ( (_BYTE)v22 )
{
std::unique_ptr<std::string>::~unique_ptr(&v23);
v5 = 0LL;
v6 = 0LL;
for ( i = 0LL; ; ++i )
{
v8 = (*(_QWORD *)&v30[8] - *(_QWORD *)v30) % 112LL;
if ( i >= (*(_QWORD *)&v30[8] - *(_QWORD *)v30) / 112LL )
break;
v4 = "expected_peaks[i]";
testing::internal::CmpHelperEQ<unsigned long,unsigned long>((testing *)&v22);
if ( !(_BYTE)v22 )
{
testing::Message::Message((testing::Message *)&v20);
v9 = "";
if ( v23 )
v9 = *v23;
testing::internal::AssertHelper::AssertHelper(
&v21,
1LL,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp",
189LL,
v9);
v4 = (const char *)&v20;
testing::internal::AssertHelper::operator=(
(unsigned int)&v21,
(unsigned int)&v20,
v10,
v11,
v12,
v13,
v20,
v21,
v22,
(_DWORD)v23,
v24,
v25);
testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)&v21);
if ( v20 )
(*(void ( **)(long long))(*(_QWORD *)v20 + 8LL))(v20);
}
std::unique_ptr<std::string>::~unique_ptr(&v23);
v6 += 112LL;
v5 += 8LL;
}
}
else
{
testing::Message::Message((testing::Message *)&v20);
if ( v23 )
v14 = *v23;
else
v14 = "";
testing::internal::AssertHelper::AssertHelper(
&v21,
2LL,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp",
186LL,
v14);
v4 = (const char *)&v20;
testing::internal::AssertHelper::operator=(
(unsigned int)&v21,
(unsigned int)&v20,
v15,
v16,
v17,
v18,
v20,
v21,
v22,
(_DWORD)v23,
v24,
v25);
testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)&v21);
if ( v20 )
(*(void ( **)(long long))(*(_QWORD *)v20 + 8LL))(v20);
std::unique_ptr<std::string>::~unique_ptr(&v23);
}
std::_Vector_base<findPeaks::peak_result_t>::~_Vector_base(v30, v4, v8);
std::_Vector_base<unsigned long>::~_Vector_base(&v24);
return std::_Vector_base<double>::~_Vector_base(v27);
}
| TestBody:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x138
LEA RSI,[0x1318a8]
PUSH 0xb
POP RDX
LEA RBX,[RSP + 0x50]
MOV RCX,RDX
MOV RDI,RBX
MOVSQ.REP RDI,RSI
LEA RDI,[RSP + 0x38]
LEA RCX,[RSP + 0x20]
MOV RSI,RBX
CALL 0x0010c724
MOVUPS XMM0,xmmword ptr [0x001316a8]
MOVAPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x00131698]
MOVAPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x20],0x9
LAB_0010c0fe:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x50]
PUSH 0x5
POP RDX
LEA RCX,[RSP + 0x10]
CALL 0x0010c75a
MOVAPS XMM0,xmmword ptr [0x00131070]
LEA RDX,[RSP + 0xb0]
MOVUPS xmmword ptr [RDX + 0x8],XMM0
MOVAPS XMM0,xmmword ptr [0x00131010]
MOVUPS xmmword ptr [RDX + 0x20],XMM0
MOV qword ptr [RDX + 0x30],0x1
MOVUPS xmmword ptr [RDX + 0x40],XMM0
MOVUPS xmmword ptr [RDX + 0x58],XMM0
AND qword ptr [RDX + 0x68],0x0
MOV RAX,0x3fe0000000000000
MOV qword ptr [RDX + 0x70],RAX
AND qword ptr [RDX + 0x78],0x0
OR qword ptr [RDX + 0x80],-0x1
LAB_0010c163:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x38]
CALL 0x0012e740
MOV RDX,qword ptr [RSP + 0x28]
SUB RDX,qword ptr [RSP + 0x20]
SAR RDX,0x3
MOV RCX,RSP
MOV RAX,qword ptr [RSP + 0x58]
SUB RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RCX],RDX
PUSH 0x70
POP RSI
CQO
IDIV RSI
LEA R8,[RSP + 0x8]
MOV qword ptr [R8],RAX
LAB_0010c1a0:
LEA RSI,[0x131466]
LEA RDX,[0x13146f]
LEA RDI,[RSP + 0x10]
CALL 0x0010daeb
CMP byte ptr [RSP + 0x10],0x0
JZ 0x0010c297
LEA RDI,[RSP + 0x18]
CALL 0x0010ca92
XOR EBX,EBX
LEA R12,[RSP + 0x10]
MOV R13,RSP
LEA RBP,[RSP + 0x8]
XOR R14D,R14D
XOR R15D,R15D
LAB_0010c1e2:
MOV R8,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x58]
SUB RAX,R8
CQO
PUSH 0x70
POP RCX
IDIV RCX
CMP R15,RAX
JNC 0x0010c301
MOV RCX,qword ptr [RSP + 0x20]
ADD RCX,RBX
ADD R8,R14
LAB_0010c20b:
MOV RDI,R12
LEA RSI,[0x13147c]
LEA RDX,[0x13148e]
CALL 0x0010daeb
CMP byte ptr [RSP + 0x10],0x0
JNZ 0x0010c27d
LAB_0010c228:
MOV RDI,R13
CALL 0x0011575e
MOV RAX,qword ptr [RSP + 0x18]
LEA R8,[0x13434e]
TEST RAX,RAX
JZ 0x0010c244
MOV R8,qword ptr [RAX]
LAB_0010c244:
MOV RDI,RBP
PUSH 0x1
POP RSI
LEA RDX,[0x131144]
MOV ECX,0xbd
CALL 0x001135fe
LAB_0010c25b:
MOV RDI,RBP
MOV RSI,R13
CALL 0x00111afe
LAB_0010c266:
MOV RDI,RBP
CALL 0x0011365e
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x0010c27d
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010c27d:
LEA RDI,[RSP + 0x18]
CALL 0x0010ca92
INC R15
ADD R14,0x70
ADD RBX,0x8
JMP 0x0010c1e2
LAB_0010c297:
MOV RDI,RSP
CALL 0x0011575e
MOV RAX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x0010c2ae
MOV R8,qword ptr [RAX]
JMP 0x0010c2b5
LAB_0010c2ae:
LEA R8,[0x13434e]
LAB_0010c2b5:
LEA RDX,[0x131144]
LEA RDI,[RSP + 0x8]
PUSH 0x2
POP RSI
MOV ECX,0xba
CALL 0x001135fe
LAB_0010c2ce:
LEA RDI,[RSP + 0x8]
MOV RSI,RSP
CALL 0x00111afe
LAB_0010c2db:
LEA RBX,[RSP + 0x18]
LEA RDI,[RSP + 0x8]
CALL 0x0011365e
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x0010c2f9
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010c2f9:
MOV RDI,RBX
CALL 0x0010ca92
LAB_0010c301:
LEA RDI,[RSP + 0x50]
CALL 0x0010ceaa
LEA RDI,[RSP + 0x20]
CALL 0x0010da62
LEA RDI,[RSP + 0x38]
CALL 0x0010d97c
ADD RSP,0x138
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* FindPeaksCppTest_SciPyCompatibility_Test::TestBody() */
void FindPeaksCppTest_SciPyCompatibility_Test::TestBody(void)
{
long lVar1;
int8 *puVar2;
int8 *puVar3;
char *pcVar4;
long lVar5;
ulong uVar6;
long *local_168;
ulong local_160;
internal local_158 [8];
int8 *local_150;
long local_148;
long local_140;
vector<double,std::allocator<double>> local_130 [24];
int8 local_118;
int4 uStack_110;
int4 uStack_10c;
int8 local_108;
int8 uStack_100;
int8 local_f8;
int8 local_b0;
int8 uStack_a8;
int4 local_98;
int4 uStack_94;
int4 uStack_90;
int4 uStack_8c;
int8 local_88;
int4 local_78;
int4 uStack_74;
int4 uStack_70;
int4 uStack_6c;
int4 local_60;
int4 uStack_5c;
int4 uStack_58;
int4 uStack_54;
int8 local_50;
int8 local_48;
int8 local_40;
int8 local_38;
puVar2 = &DAT_001318a8;
puVar3 = &local_118;
for (lVar1 = 0xb; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar3 = *puVar2;
puVar2 = puVar2 + 1;
puVar3 = puVar3 + 1;
}
std::vector<double,std::allocator<double>>::vector(local_130,&local_118,0xb,&local_148);
local_108 = _DAT_001316a8;
uStack_100 = _UNK_001316b0;
local_118._0_4_ = _DAT_00131698;
local_118._4_4_ = _UNK_0013169c;
uStack_110 = _UNK_001316a0;
uStack_10c = _UNK_001316a4;
local_f8 = 9;
/* try { // try from 0010c0fe to 0010c114 has its CatchHandler @ 0010c33e */
std::vector<unsigned_long,std::allocator<unsigned_long>>::vector
((vector<unsigned_long,std::allocator<unsigned_long>> *)&local_148,&local_118,5,
local_158);
local_b0 = _DAT_00131070;
uStack_a8 = _UNK_00131078;
local_98 = _DAT_00131010;
uStack_94 = _UNK_00131014;
uStack_90 = _UNK_00131018;
uStack_8c = _UNK_0013101c;
local_88 = 1;
local_78 = _DAT_00131010;
uStack_74 = _UNK_00131014;
uStack_70 = _UNK_00131018;
uStack_6c = _UNK_0013101c;
local_60 = _DAT_00131010;
uStack_5c = _UNK_00131014;
uStack_58 = _UNK_00131018;
uStack_54 = _UNK_0013101c;
local_50 = 0;
local_48 = 0x3fe0000000000000;
local_40 = 0;
local_38 = 0xffffffffffffffff;
/* try { // try from 0010c163 to 0010c171 has its CatchHandler @ 0010c339 */
findPeaks::find_peaks((findPeaks *)&local_118,local_130);
local_168 = (long *)(local_140 - local_148 >> 3);
local_160 = (CONCAT44(uStack_10c,uStack_110) - CONCAT44(local_118._4_4_,(int4)local_118)) /
0x70;
/* try { // try from 0010c1a0 to 0010c1b7 has its CatchHandler @ 0010c337 */
testing::internal::CmpHelperEQ<unsigned_long,unsigned_long>
(local_158,"expected_peaks.size()","peaks.size()",(ulong *)&local_168,&local_160);
if (local_158[0] == (internal)0x0) {
/* try { // try from 0010c297 to 0010c29e has its CatchHandler @ 0010c335 */
testing::Message::Message((Message *)&local_168);
if (local_150 == (int8 *)0x0) {
pcVar4 = "";
}
else {
pcVar4 = (char *)*local_150;
}
/* try { // try from 0010c2b5 to 0010c2cd has its CatchHandler @ 0010c333 */
testing::internal::AssertHelper::AssertHelper
((AssertHelper *)&local_160,2,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp"
,0xba,pcVar4);
/* try { // try from 0010c2ce to 0010c2da has its CatchHandler @ 0010c331 */
testing::internal::AssertHelper::operator=((AssertHelper *)&local_160,(Message *)&local_168);
testing::internal::AssertHelper::~AssertHelper((AssertHelper *)&local_160);
if (local_168 != (long *)0x0) {
(**(code **)(*local_168 + 8))();
}
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
&local_150);
}
else {
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
&local_150);
lVar1 = 0;
lVar5 = 0;
uVar6 = 0;
while( true ) {
if ((ulong)((CONCAT44(uStack_10c,uStack_110) - CONCAT44(local_118._4_4_,(int4)local_118)
) / 0x70) <= uVar6) break;
/* try { // try from 0010c20b to 0010c220 has its CatchHandler @ 0010c375 */
testing::internal::CmpHelperEQ<unsigned_long,unsigned_long>
(local_158,"expected_peaks[i]","peaks[i].peak",(ulong *)(local_148 + lVar1),
(ulong *)(CONCAT44(local_118._4_4_,(int4)local_118) + lVar5));
if (local_158[0] == (internal)0x0) {
/* try { // try from 0010c228 to 0010c22f has its CatchHandler @ 0010c366 */
testing::Message::Message((Message *)&local_168);
pcVar4 = "";
if (local_150 != (int8 *)0x0) {
pcVar4 = (char *)*local_150;
}
/* try { // try from 0010c244 to 0010c25a has its CatchHandler @ 0010c352 */
testing::internal::AssertHelper::AssertHelper
((AssertHelper *)&local_160,1,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp"
,0xbd,pcVar4);
/* try { // try from 0010c25b to 0010c265 has its CatchHandler @ 0010c343 */
testing::internal::AssertHelper::operator=((AssertHelper *)&local_160,(Message *)&local_168)
;
testing::internal::AssertHelper::~AssertHelper((AssertHelper *)&local_160);
if (local_168 != (long *)0x0) {
(**(code **)(*local_168 + 8))();
}
}
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
&local_150);
uVar6 = uVar6 + 1;
lVar5 = lVar5 + 0x70;
lVar1 = lVar1 + 8;
}
}
std::_Vector_base<findPeaks::peak_result_t,std::allocator<findPeaks::peak_result_t>>::
~_Vector_base((_Vector_base<findPeaks::peak_result_t,std::allocator<findPeaks::peak_result_t>> *)
&local_118);
std::_Vector_base<unsigned_long,std::allocator<unsigned_long>>::~_Vector_base
((_Vector_base<unsigned_long,std::allocator<unsigned_long>> *)&local_148);
std::_Vector_base<double,std::allocator<double>>::~_Vector_base
((_Vector_base<double,std::allocator<double>> *)local_130);
return;
}
| |
38,412 | FindPeaksCppTest_SciPyCompatibility_Test::TestBody() | giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp | TEST_F(FindPeaksCppTest, SciPyCompatibility) {
// This is a known test signal with peaks that match SciPy's find_peaks results
std::vector<double> scipy_signal = {0, 1, 0, 2, 0, 3, 0, 2, 0, 1, 0};
// These are the expected peak indices from SciPy's find_peaks
std::vector<size_t> expected_peaks = {1, 3, 5, 7, 9};
PeakConditions conditions;
conditions.set_height(0.5); // Same as SciPy test
auto peaks = find_peaks(scipy_signal, conditions);
ASSERT_EQ(expected_peaks.size(), peaks.size());
for (size_t i = 0; i < peaks.size(); i++) {
EXPECT_EQ(expected_peaks[i], peaks[i].peak);
}
} | O3 | cpp | FindPeaksCppTest_SciPyCompatibility_Test::TestBody():
pushq %rbx
movq %rdi, %rbx
callq 0xd92e
movl $0x88, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x84e0
nop
| _ZN40FindPeaksCppTest_SciPyCompatibility_TestD0Ev:
push rbx
mov rbx, rdi
call _ZN16FindPeaksCppTestD2Ev; FindPeaksCppTest::~FindPeaksCppTest()
mov esi, 88h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void FindPeaksCppTest_SciPyCompatibility_Test::~FindPeaksCppTest_SciPyCompatibility_Test(
FindPeaksCppTest_SciPyCompatibility_Test *this)
{
FindPeaksCppTest::~FindPeaksCppTest(this);
operator delete(this, 0x88uLL);
}
| ~FindPeaksCppTest_SciPyCompatibility_Test:
PUSH RBX
MOV RBX,RDI
CALL 0x0010d92e
MOV ESI,0x88
MOV RDI,RBX
POP RBX
JMP 0x001084e0
|
/* FindPeaksCppTest_SciPyCompatibility_Test::~FindPeaksCppTest_SciPyCompatibility_Test() */
void __thiscall
FindPeaksCppTest_SciPyCompatibility_Test::~FindPeaksCppTest_SciPyCompatibility_Test
(FindPeaksCppTest_SciPyCompatibility_Test *this)
{
FindPeaksCppTest::~FindPeaksCppTest((FindPeaksCppTest *)this);
operator_delete(this,0x88);
return;
}
| |
38,413 | ma_net_real_write | eloqsql/libmariadb/libmariadb/ma_net.c | int ma_net_real_write(NET *net, const char *packet, size_t len)
{
ssize_t length;
char *pos,*end;
if (net->error == 2)
return(-1); /* socket can't be used */
net->reading_or_writing=2;
#ifdef HAVE_COMPRESS
if (net->compress)
{
size_t complen;
uchar *b;
uint header_length=NET_HEADER_SIZE+COMP_HEADER_SIZE;
if (!(b=(uchar*) malloc(len + NET_HEADER_SIZE + COMP_HEADER_SIZE + 1)))
{
net->pvio->set_error(net->pvio->mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
net->error=2;
net->reading_or_writing=0;
return(1);
}
memcpy(b+header_length,packet,len);
if (_mariadb_compress(net, (unsigned char*) b+header_length,&len,&complen))
{
complen=0;
}
int3store(&b[NET_HEADER_SIZE],complen);
int3store(b,len);
b[3]=(uchar) (net->compress_pkt_nr++);
len+= header_length;
packet= (char*) b;
}
#endif /* HAVE_COMPRESS */
pos=(char*) packet; end=pos+len;
while (pos != end)
{
if ((length=ma_pvio_write(net->pvio,(uchar *)pos,(size_t) (end-pos))) <= 0)
{
int save_errno= errno;
char errmsg[100];
net->error=2; /* Close socket */
strerror_r(save_errno, errmsg, 100);
net->pvio->set_error(net->pvio->mysql, CR_ERR_NET_WRITE, SQLSTATE_UNKNOWN, 0,
errmsg, save_errno);
net->reading_or_writing=0;
#ifdef HAVE_COMPRESS
if (net->compress)
free((char*) packet);
#endif
return(1);
}
pos+=length;
}
#ifdef HAVE_COMPRESS
if (net->compress)
free((char*) packet);
#endif
net->reading_or_writing=0;
return(((int) (pos != end)));
} | O3 | c | ma_net_real_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rdx, -0xa8(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpb $0x2, 0x94(%rdi)
je 0x31da9
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movb $0x2, 0x80(%rdi)
cmpb $0x0, 0x84(%rdi)
je 0x31c7a
leaq 0x8(%rbx), %rdi
callq 0x13600
testq %rax, %rax
je 0x31c7f
movq %rax, %r12
movq %rax, %r13
addq $0x7, %r13
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x13390
leaq -0xa8(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
movq %r14, %rdi
movq %r13, %rsi
callq 0x1ea9f
testb %al, %al
jne 0x31cb2
movq -0xa0(%rbp), %rax
jmp 0x31cb4
movq %r15, %r12
jmp 0x31cfa
movq (%r14), %r8
movq 0x40(%r8), %rdi
leaq 0x18e93(%rip), %rax # 0x4ab20
movq (%rax), %rdx
movl $0x7d8, %esi # imm = 0x7D8
xorl %ecx, %ecx
xorl %eax, %eax
callq *0x50(%r8)
movb $0x2, 0x94(%r14)
movb $0x0, 0x80(%r14)
jmp 0x31da4
xorl %eax, %eax
movq %r12, %rdx
movb %al, 0x4(%r12)
movb %ah, 0x5(%rdx)
shrl $0x10, %eax
movb %al, 0x6(%r12)
movq -0xa8(%rbp), %rbx
movb %bl, (%r12)
movb %bh, 0x1(%rdx)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x2(%r12)
movl 0x64(%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x64(%r14)
movb %al, 0x3(%r12)
addq $0x7, %rbx
movq %rbx, -0xa8(%rbp)
testq %rbx, %rbx
je 0x31d23
movq %r12, %r15
addq %r12, %rbx
movq (%r14), %rdi
movq %rbx, %rdx
subq %r15, %rdx
movq %r15, %rsi
callq 0x1de86
testq %rax, %rax
jle 0x31d41
addq %rax, %r15
cmpq %rbx, %r15
jne 0x31d05
cmpb $0x0, 0x84(%r14)
je 0x31d35
movq %r12, %rdi
callq 0x13570
movb $0x0, 0x80(%r14)
xorl %eax, %eax
jmp 0x31da9
callq 0x13060
movl (%rax), %ebx
movb $0x2, 0x94(%r14)
leaq -0xa0(%rbp), %r15
movl $0x64, %edx
movl %ebx, %edi
movq %r15, %rsi
callq 0x131e0
movq (%r14), %r10
movq 0x40(%r10), %rdi
leaq 0x18dac(%rip), %rax # 0x4ab20
movq (%rax), %rdx
movl $0x1396, %esi # imm = 0x1396
xorl %ecx, %ecx
movq %r15, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq *0x50(%r10)
movb $0x0, 0x80(%r14)
cmpb $0x0, 0x84(%r14)
je 0x31da4
movq %r12, %rdi
callq 0x13570
movl $0x1, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x31dca
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x13500
| ma_net_real_write:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_A8], rdx
mov eax, 0FFFFFFFFh
cmp byte ptr [rdi+94h], 2
jz loc_31DA9
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov byte ptr [rdi+80h], 2
cmp byte ptr [rdi+84h], 0
jz short loc_31C7A
lea rdi, [rbx+8]
call _malloc
test rax, rax
jz short loc_31C7F
mov r12, rax
mov r13, rax
add r13, 7
mov rdi, r13
mov rsi, r15
mov rdx, rbx
call _memcpy
lea rdx, [rbp+var_A8]
lea rcx, [rbp+var_A0]
mov rdi, r14
mov rsi, r13
call _mariadb_compress
test al, al
jnz short loc_31CB2
mov rax, [rbp+var_A0]
jmp short loc_31CB4
loc_31C7A:
mov r12, r15
jmp short loc_31CFA
loc_31C7F:
mov r8, [r14]
mov rdi, [r8+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D8h
xor ecx, ecx
xor eax, eax
call qword ptr [r8+50h]
mov byte ptr [r14+94h], 2
mov byte ptr [r14+80h], 0
jmp loc_31DA4
loc_31CB2:
xor eax, eax
loc_31CB4:
mov rdx, r12
mov [r12+4], al
mov [rdx+5], ah
shr eax, 10h
mov [r12+6], al
mov rbx, [rbp+var_A8]
mov [r12], bl
mov [rdx+1], bh
mov eax, ebx
shr eax, 10h
mov [r12+2], al
mov eax, [r14+64h]
lea ecx, [rax+1]
mov [r14+64h], ecx
mov [r12+3], al
add rbx, 7
mov [rbp+var_A8], rbx
loc_31CFA:
test rbx, rbx
jz short loc_31D23
mov r15, r12
add rbx, r12
loc_31D05:
mov rdi, [r14]
mov rdx, rbx
sub rdx, r15
mov rsi, r15
call ma_pvio_write
test rax, rax
jle short loc_31D41
add r15, rax
cmp r15, rbx
jnz short loc_31D05
loc_31D23:
cmp byte ptr [r14+84h], 0
jz short loc_31D35
mov rdi, r12
call _free
loc_31D35:
mov byte ptr [r14+80h], 0
xor eax, eax
jmp short loc_31DA9
loc_31D41:
call ___errno_location
mov ebx, [rax]
mov byte ptr [r14+94h], 2
lea r15, [rbp+var_A0]
mov edx, 64h ; 'd'
mov edi, ebx
mov rsi, r15
call ___xpg_strerror_r
mov r10, [r14]
mov rdi, [r10+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 1396h
xor ecx, ecx
mov r8, r15
mov r9d, ebx
xor eax, eax
call qword ptr [r10+50h]
mov byte ptr [r14+80h], 0
cmp byte ptr [r14+84h], 0
jz short loc_31DA4
mov rdi, r12
call _free
loc_31DA4:
mov eax, 1
loc_31DA9:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_31DCA
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_31DCA:
call ___stack_chk_fail
| long long ma_net_real_write(_BYTE *a1, long long a2, long long a3)
{
long long result; // rax
long long v4; // rbx
long long v6; // rax
long long v7; // r12
long long v8; // r13
int v9; // eax
long long v10; // rbx
int v11; // eax
long long v12; // r15
long long v13; // rbx
long long v14; // rdi
long long v15; // rax
unsigned int v16; // ebx
long long v17; // [rsp+8h] [rbp-A8h] BYREF
_QWORD v18[20]; // [rsp+10h] [rbp-A0h] BYREF
v18[14] = __readfsqword(0x28u);
v17 = a3;
result = 0xFFFFFFFFLL;
if ( a1[148] != 2 )
{
v4 = a3;
a1[128] = 2;
if ( a1[132] )
{
v6 = malloc(a3 + 8);
if ( !v6 )
{
(*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)a1 + 80LL))(
*(_QWORD *)(*(_QWORD *)a1 + 64LL),
2008LL,
SQLSTATE_UNKNOWN,
0LL);
a1[148] = 2;
a1[128] = 0;
return 1LL;
}
v7 = v6;
v8 = v6 + 7;
memcpy(v6 + 7, a2, v4);
if ( mariadb_compress((long long)a1, v8, &v17, v18) )
v9 = 0;
else
v9 = v18[0];
*(_WORD *)(v7 + 4) = v9;
*(_BYTE *)(v7 + 6) = BYTE2(v9);
v10 = v17;
*(_WORD *)v7 = v17;
*(_BYTE *)(v7 + 2) = BYTE2(v10);
v11 = *((_DWORD *)a1 + 25);
*((_DWORD *)a1 + 25) = v11 + 1;
*(_BYTE *)(v7 + 3) = v11;
v4 = v10 + 7;
v17 = v4;
}
else
{
v7 = a2;
}
if ( v4 )
{
v12 = v7;
v13 = v7 + v4;
while ( 1 )
{
v14 = *(_QWORD *)a1;
v15 = ma_pvio_write(*(_QWORD *)a1, v12, v13 - v12);
if ( v15 <= 0 )
break;
v12 += v15;
if ( v12 == v13 )
goto LABEL_14;
}
v16 = *(_DWORD *)__errno_location(v14);
a1[148] = 2;
__xpg_strerror_r(v16, v18, 100LL);
(*(void ( **)(_QWORD, long long, char *, _QWORD, _QWORD *, _QWORD))(*(_QWORD *)a1 + 80LL))(
*(_QWORD *)(*(_QWORD *)a1 + 64LL),
5014LL,
SQLSTATE_UNKNOWN,
0LL,
v18,
v16);
a1[128] = 0;
if ( a1[132] )
free(v7);
return 1LL;
}
LABEL_14:
if ( a1[132] )
free(v7);
a1[128] = 0;
return 0LL;
}
return result;
}
| ma_net_real_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0xa8],RDX
MOV EAX,0xffffffff
CMP byte ptr [RDI + 0x94],0x2
JZ 0x00131da9
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV byte ptr [RDI + 0x80],0x2
CMP byte ptr [RDI + 0x84],0x0
JZ 0x00131c7a
LEA RDI,[RBX + 0x8]
CALL 0x00113600
TEST RAX,RAX
JZ 0x00131c7f
MOV R12,RAX
MOV R13,RAX
ADD R13,0x7
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBX
CALL 0x00113390
LEA RDX,[RBP + -0xa8]
LEA RCX,[RBP + -0xa0]
MOV RDI,R14
MOV RSI,R13
CALL 0x0011ea9f
TEST AL,AL
JNZ 0x00131cb2
MOV RAX,qword ptr [RBP + -0xa0]
JMP 0x00131cb4
LAB_00131c7a:
MOV R12,R15
JMP 0x00131cfa
LAB_00131c7f:
MOV R8,qword ptr [R14]
MOV RDI,qword ptr [R8 + 0x40]
LEA RAX,[0x14ab20]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d8
XOR ECX,ECX
XOR EAX,EAX
CALL qword ptr [R8 + 0x50]
MOV byte ptr [R14 + 0x94],0x2
MOV byte ptr [R14 + 0x80],0x0
JMP 0x00131da4
LAB_00131cb2:
XOR EAX,EAX
LAB_00131cb4:
MOV RDX,R12
MOV byte ptr [R12 + 0x4],AL
MOV byte ptr [RDX + 0x5],AH
SHR EAX,0x10
MOV byte ptr [R12 + 0x6],AL
MOV RBX,qword ptr [RBP + -0xa8]
MOV byte ptr [R12],BL
MOV byte ptr [RDX + 0x1],BH
MOV EAX,EBX
SHR EAX,0x10
MOV byte ptr [R12 + 0x2],AL
MOV EAX,dword ptr [R14 + 0x64]
LEA ECX,[RAX + 0x1]
MOV dword ptr [R14 + 0x64],ECX
MOV byte ptr [R12 + 0x3],AL
ADD RBX,0x7
MOV qword ptr [RBP + -0xa8],RBX
LAB_00131cfa:
TEST RBX,RBX
JZ 0x00131d23
MOV R15,R12
ADD RBX,R12
LAB_00131d05:
MOV RDI,qword ptr [R14]
MOV RDX,RBX
SUB RDX,R15
MOV RSI,R15
CALL 0x0011de86
TEST RAX,RAX
JLE 0x00131d41
ADD R15,RAX
CMP R15,RBX
JNZ 0x00131d05
LAB_00131d23:
CMP byte ptr [R14 + 0x84],0x0
JZ 0x00131d35
MOV RDI,R12
CALL 0x00113570
LAB_00131d35:
MOV byte ptr [R14 + 0x80],0x0
XOR EAX,EAX
JMP 0x00131da9
LAB_00131d41:
CALL 0x00113060
MOV EBX,dword ptr [RAX]
MOV byte ptr [R14 + 0x94],0x2
LEA R15,[RBP + -0xa0]
MOV EDX,0x64
MOV EDI,EBX
MOV RSI,R15
CALL 0x001131e0
MOV R10,qword ptr [R14]
MOV RDI,qword ptr [R10 + 0x40]
LEA RAX,[0x14ab20]
MOV RDX,qword ptr [RAX]
MOV ESI,0x1396
XOR ECX,ECX
MOV R8,R15
MOV R9D,EBX
XOR EAX,EAX
CALL qword ptr [R10 + 0x50]
MOV byte ptr [R14 + 0x80],0x0
CMP byte ptr [R14 + 0x84],0x0
JZ 0x00131da4
MOV RDI,R12
CALL 0x00113570
LAB_00131da4:
MOV EAX,0x1
LAB_00131da9:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00131dca
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00131dca:
CALL 0x00113500
|
int8 ma_net_real_write(long *param_1,int1 *param_2,size_t param_3)
{
int iVar1;
char cVar2;
int8 uVar3;
int1 *puVar4;
long lVar5;
int *piVar6;
int1 *puVar7;
long in_FS_OFFSET;
size_t local_b0;
int4 local_a8 [28];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar3 = 0xffffffff;
local_b0 = param_3;
if (*(char *)((long)param_1 + 0x94) != '\x02') {
*(int1 *)(param_1 + 0x10) = 2;
if (*(char *)((long)param_1 + 0x84) != '\0') {
puVar4 = (int1 *)malloc(param_3 + 8);
if (puVar4 == (int1 *)0x0) {
(**(code **)(*param_1 + 0x50))(*(int8 *)(*param_1 + 0x40),0x7d8,SQLSTATE_UNKNOWN,0);
*(int1 *)((long)param_1 + 0x94) = 2;
*(int1 *)(param_1 + 0x10) = 0;
LAB_00131da4:
uVar3 = 1;
goto LAB_00131da9;
}
memcpy(puVar4 + 7,param_2,param_3);
cVar2 = _mariadb_compress(param_1,puVar4 + 7,&local_b0,local_a8);
if (cVar2 != '\0') {
local_a8[0] = 0;
}
puVar4[4] = (char)local_a8[0];
puVar4[5] = (char)((uint)local_a8[0] >> 8);
puVar4[6] = (char)((uint)local_a8[0] >> 0x10);
*puVar4 = (char)local_b0;
puVar4[1] = (char)(local_b0 >> 8);
puVar4[2] = (char)(local_b0 >> 0x10);
iVar1 = *(int *)((long)param_1 + 100);
*(int *)((long)param_1 + 100) = iVar1 + 1;
puVar4[3] = (char)iVar1;
local_b0 = local_b0 + 7;
param_2 = puVar4;
}
if (local_b0 != 0) {
puVar7 = param_2 + local_b0;
puVar4 = param_2;
do {
lVar5 = ma_pvio_write(*param_1,puVar4,(long)puVar7 - (long)puVar4);
if (lVar5 < 1) {
piVar6 = __errno_location();
iVar1 = *piVar6;
*(int1 *)((long)param_1 + 0x94) = 2;
__xpg_strerror_r(iVar1,local_a8,100);
(**(code **)(*param_1 + 0x50))
(*(int8 *)(*param_1 + 0x40),0x1396,SQLSTATE_UNKNOWN,0,local_a8,iVar1);
*(int1 *)(param_1 + 0x10) = 0;
if (*(char *)((long)param_1 + 0x84) != '\0') {
free(param_2);
}
goto LAB_00131da4;
}
puVar4 = puVar4 + lVar5;
} while (puVar4 != puVar7);
}
if (*(char *)((long)param_1 + 0x84) != '\0') {
free(param_2);
}
*(int1 *)(param_1 + 0x10) = 0;
uVar3 = 0;
}
LAB_00131da9:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar3;
}
| |
38,414 | insert_dynamic | eloqsql/mysys/array.c | my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void * element)
{
void *buffer;
if (array->elements == array->max_element)
{ /* Call only when necessary */
if (!(buffer=alloc_dynamic(array)))
return TRUE;
}
else
{
buffer=array->buffer+(array->elements * array->size_of_element);
array->elements++;
}
memcpy(buffer,element,(size_t) array->size_of_element);
return FALSE;
} | O0 | c | insert_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jne 0x2da7b
movq -0x10(%rbp), %rdi
callq 0x2dad0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x2da79
movb $0x1, -0x1(%rbp)
jmp 0x2dac1
jmp 0x2daa7
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x10(%rbp), %rdx
imull 0x14(%rdx), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
callq 0x24260
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| insert_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov eax, [rax+8]
mov rcx, [rbp+var_10]
cmp eax, [rcx+0Ch]
jnz short loc_2DA7B
mov rdi, [rbp+var_10]
call alloc_dynamic
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_2DA79
mov [rbp+var_1], 1
jmp short loc_2DAC1
loc_2DA79:
jmp short loc_2DAA7
loc_2DA7B:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_10]
mov ecx, [rcx+8]
mov rdx, [rbp+var_10]
imul ecx, [rdx+14h]
mov ecx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov ecx, [rax+8]
add ecx, 1
mov [rax+8], ecx
loc_2DAA7:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov edx, eax
call _memcpy
mov [rbp+var_1], 0
loc_2DAC1:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char insert_dynamic(long long a1, long long a2)
{
long long v3; // [rsp+0h] [rbp-20h]
if ( *(_DWORD *)(a1 + 8) != *(_DWORD *)(a1 + 12) )
{
v3 = (unsigned int)(*(_DWORD *)(a1 + 20) * (*(_DWORD *)(a1 + 8))++) + *(_QWORD *)a1;
LABEL_6:
memcpy(v3, a2, *(unsigned int *)(a1 + 20));
return 0;
}
v3 = alloc_dynamic(a1);
if ( v3 )
goto LABEL_6;
return 1;
}
| insert_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
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 0x0012da7b
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012dad0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0012da79
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012dac1
LAB_0012da79:
JMP 0x0012daa7
LAB_0012da7b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x10]
IMUL ECX,dword ptr [RDX + 0x14]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x8]
ADD ECX,0x1
MOV dword ptr [RAX + 0x8],ECX
LAB_0012daa7:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
CALL 0x00124260
MOV byte ptr [RBP + -0x1],0x0
LAB_0012dac1:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 insert_dynamic(long *param_1,void *param_2)
{
void *local_28;
if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) {
local_28 = (void *)alloc_dynamic(param_1);
if (local_28 == (void *)0x0) {
return 1;
}
}
else {
local_28 = (void *)(*param_1 + (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14)));
*(int *)(param_1 + 1) = (int)param_1[1] + 1;
}
memcpy(local_28,param_2,(ulong)*(uint *)((long)param_1 + 0x14));
return 0;
}
| |
38,415 | glfwGetGammaRamp | untodesu[P]riteg/build_O0/_deps/glfw-src/src/monitor.c | GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* handle)
{
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
assert(monitor != NULL);
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
_glfwFreeGammaArrays(&monitor->currentRamp);
if (!_glfwPlatformGetGammaRamp(monitor, &monitor->currentRamp))
return NULL;
return &monitor->currentRamp;
} | O0 | c | glfwGetGammaRamp:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x273cd
jmp 0x273ec
leaq 0x91100(%rip), %rdi # 0xb84d4
leaq 0x91075(%rip), %rsi # 0xb8450
movl $0x1f3, %edx # imm = 0x1F3
leaq 0x91362(%rip), %rcx # 0xb8749
callq 0xc5a0
leaq 0xb9875(%rip), %rax # 0xe0c68
cmpl $0x0, (%rax)
jne 0x27412
movl $0x10001, %edi # imm = 0x10001
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x221a0
movq $0x0, -0x8(%rbp)
jmp 0x2744b
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
callq 0x265e0
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x68, %rsi
callq 0x2fa60
cmpl $0x0, %eax
jne 0x2743f
movq $0x0, -0x8(%rbp)
jmp 0x2744b
movq -0x18(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| glfwGetGammaRamp:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_273CD
jmp short loc_273EC
loc_273CD:
lea rdi, aMonitorNull; "monitor != NULL"
lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"...
mov edx, 1F3h
lea rcx, aConstGlfwgamma; "const GLFWgammaramp *glfwGetGammaRamp(G"...
call ___assert_fail
loc_273EC:
lea rax, _glfw
cmp dword ptr [rax], 0
jnz short loc_27412
mov edi, 10001h
xor eax, eax
mov esi, eax
mov al, 0
call _glfwInputError
mov [rbp+var_8], 0
jmp short loc_2744B
loc_27412:
mov rdi, [rbp+var_18]
add rdi, 68h ; 'h'
call _glfwFreeGammaArrays
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_18]
add rsi, 68h ; 'h'
call _glfwPlatformGetGammaRamp
cmp eax, 0
jnz short loc_2743F
mov [rbp+var_8], 0
jmp short loc_2744B
loc_2743F:
mov rax, [rbp+var_18]
add rax, 68h ; 'h'
mov [rbp+var_8], rax
loc_2744B:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long glfwGetGammaRamp(long long a1)
{
if ( !a1 )
__assert_fail(
"monitor != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/monitor.c",
499LL,
"const GLFWgammaramp *glfwGetGammaRamp(GLFWmonitor *)");
if ( glfw[0] )
{
glfwFreeGammaArrays((_QWORD *)(a1 + 104));
if ( (unsigned int)glfwPlatformGetGammaRamp(a1, a1 + 104) )
return a1 + 104;
else
return 0LL;
}
else
{
glfwInputError(0x10001u, 0LL);
return 0LL;
}
}
| glfwGetGammaRamp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001273cd
JMP 0x001273ec
LAB_001273cd:
LEA RDI,[0x1b84d4]
LEA RSI,[0x1b8450]
MOV EDX,0x1f3
LEA RCX,[0x1b8749]
CALL 0x0010c5a0
LAB_001273ec:
LEA RAX,[0x1e0c68]
CMP dword ptr [RAX],0x0
JNZ 0x00127412
MOV EDI,0x10001
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL 0x001221a0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0012744b
LAB_00127412:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x68
CALL 0x001265e0
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x68
CALL 0x0012fa60
CMP EAX,0x0
JNZ 0x0012743f
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0012744b
LAB_0012743f:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x68
MOV qword ptr [RBP + -0x8],RAX
LAB_0012744b:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long glfwGetGammaRamp(long param_1)
{
int iVar1;
long local_10;
if (param_1 != 0) {
if (_glfw == 0) {
_glfwInputError(0x10001,0);
local_10 = 0;
}
else {
_glfwFreeGammaArrays(param_1 + 0x68);
iVar1 = _glfwPlatformGetGammaRamp(param_1,param_1 + 0x68);
if (iVar1 == 0) {
local_10 = 0;
}
else {
local_10 = param_1 + 0x68;
}
}
return local_10;
}
/* WARNING: Subroutine does not return */
__assert_fail("monitor != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/monitor.c"
,499,"const GLFWgammaramp *glfwGetGammaRamp(GLFWmonitor *)");
}
| |
38,416 | inline_mysql_file_close | eloqsql/include/mysql/psi/mysql_file.h | static inline int
inline_mysql_file_close(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
result= my_close(file, flags);
PSI_FILE_CALL(end_file_close_wait)(locker, result);
return result;
}
#endif
result= my_close(file, flags);
return result;
} | O0 | c | inline_mysql_file_close:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x1a2a60(%rip), %rax # 0x1ce530
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x78(%rbp), %rdi
movl $0x4, %edx
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2bb5b
leaq 0x1a2a1d(%rip), %rax # 0x1ce530
movq (%rax), %rax
movq 0x220(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x2fd50
movl %eax, -0x24(%rbp)
leaq 0x1a29f0(%rip), %rax # 0x1ce530
movq (%rax), %rax
movq 0x228(%rax), %rax
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
callq *%rax
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2bb70
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x2fd50
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
| inline_mysql_file_close:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_78]
mov edx, 4
call rax
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_2BB5B
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+220h]
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_close
mov [rbp+var_24], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+228h]
mov rdi, [rbp+var_30]
mov esi, [rbp+var_24]
call rax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_2BB70
loc_2BB5B:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_close
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_2BB70:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long inline_mysql_file_close(long long a1, unsigned int a2, unsigned int a3, long long a4)
{
_BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF
long long v6; // [rsp+50h] [rbp-30h]
unsigned int v7; // [rsp+5Ch] [rbp-24h]
long long v8; // [rsp+60h] [rbp-20h]
unsigned int v9; // [rsp+68h] [rbp-18h]
unsigned int v10; // [rsp+6Ch] [rbp-14h]
long long v11; // [rsp+70h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 4LL);
if ( v6 )
{
((void ( *)(long long, long long, _QWORD))PSI_server[68])(v6, v11, v10);
v7 = my_close(v9, v8);
((void ( *)(long long, _QWORD))PSI_server[69])(v6, v7);
}
else
{
return (unsigned int)my_close(v9, v8);
}
return v7;
}
| inline_mysql_file_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[0x2ce530]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x78]
MOV EDX,0x4
CALL RAX
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0012bb5b
LEA RAX,[0x2ce530]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x220]
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0012fd50
MOV dword ptr [RBP + -0x24],EAX
LEA RAX,[0x2ce530]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x228]
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,dword ptr [RBP + -0x24]
CALL RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012bb70
LAB_0012bb5b:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0012fd50
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_0012bb70:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_close(int8 param_1,int4 param_2,int4 param_3,int8 param_4)
{
int1 local_80 [72];
long local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int4 local_c;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,4);
if (local_38 == 0) {
local_c = my_close(local_20,local_28);
}
else {
(**(code **)(PSI_server + 0x220))(local_38,local_18,local_1c);
local_2c = my_close(local_20,local_28);
(**(code **)(PSI_server + 0x228))(local_38,local_2c);
local_c = local_2c;
}
return local_c;
}
| |
38,417 | u32toa_length_expr | bluesky950520[P]quickjs/tests/test_conv.c | size_t u32toa_length_expr(char buf[minimum_length(11)], uint32_t n)
{
#ifdef USE_SINGLE_CASE_FAST /* 8% */
if (n < 10) {
buf[0] = (char)('0' + n);
buf[1] = '\0';
return 1;
}
size_t len = (2 + (n > 99) + (n > 999) +
(n > 9999) + (n > 99999) + (n > 999999) +
(n > 9999999) + (n > 99999999) + (n > 999999999));
#else
size_t len = (1 + (n > 9) + (n > 99) + (n > 999) +
(n > 9999) + (n > 99999) + (n > 999999) +
(n > 9999999) + (n > 99999999) + (n > 999999999));
#endif
char *end = buf + len;
*end-- = '\0';
while (n >= 10) {
uint32_t quo = n % 10;
n /= 10;
*end-- = (char)('0' + quo);
}
*end = (char)('0' + n);
return len;
} | O0 | c | u32toa_length_expr:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
cmpl $0xa, -0x14(%rsp)
jae 0x34b7
movl -0x14(%rsp), %eax
addl $0x30, %eax
movb %al, %cl
movq -0x10(%rsp), %rax
movb %cl, (%rax)
movq -0x10(%rsp), %rax
movb $0x0, 0x1(%rax)
movq $0x1, -0x8(%rsp)
jmp 0x35d7
cmpl $0x63, -0x14(%rsp)
seta %al
andb $0x1, %al
movzbl %al, %eax
addl $0x2, %eax
cmpl $0x3e7, -0x14(%rsp) # imm = 0x3E7
seta %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
cmpl $0x270f, -0x14(%rsp) # imm = 0x270F
seta %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
cmpl $0x1869f, -0x14(%rsp) # imm = 0x1869F
seta %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
cmpl $0xf423f, -0x14(%rsp) # imm = 0xF423F
seta %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
cmpl $0x98967f, -0x14(%rsp) # imm = 0x98967F
seta %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
cmpl $0x5f5e0ff, -0x14(%rsp) # imm = 0x5F5E0FF
seta %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
cmpl $0x3b9ac9ff, -0x14(%rsp) # imm = 0x3B9AC9FF
seta %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
cltq
movq %rax, -0x20(%rsp)
movq -0x10(%rsp), %rax
addq -0x20(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb $0x0, (%rax)
cmpl $0xa, -0x14(%rsp)
jb 0x35bd
movl -0x14(%rsp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, -0x2c(%rsp)
movl -0x14(%rsp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x14(%rsp)
movl -0x2c(%rsp), %eax
addl $0x30, %eax
movb %al, %cl
movq -0x28(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x28(%rsp)
movb %cl, (%rax)
jmp 0x3576
movl -0x14(%rsp), %eax
addl $0x30, %eax
movb %al, %cl
movq -0x28(%rsp), %rax
movb %cl, (%rax)
movq -0x20(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopl (%rax)
| u32toa_length_expr:
mov [rsp+var_10], rdi
mov [rsp+var_14], esi
cmp [rsp+var_14], 0Ah
jnb short loc_34B7
mov eax, [rsp+var_14]
add eax, 30h ; '0'
mov cl, al
mov rax, [rsp+var_10]
mov [rax], cl
mov rax, [rsp+var_10]
mov byte ptr [rax+1], 0
mov [rsp+var_8], 1
jmp loc_35D7
loc_34B7:
cmp [rsp+var_14], 63h ; 'c'
setnbe al
and al, 1
movzx eax, al
add eax, 2
cmp [rsp+var_14], 3E7h
setnbe cl
and cl, 1
movzx ecx, cl
add eax, ecx
cmp [rsp+var_14], 270Fh
setnbe cl
and cl, 1
movzx ecx, cl
add eax, ecx
cmp [rsp+var_14], 1869Fh
setnbe cl
and cl, 1
movzx ecx, cl
add eax, ecx
cmp [rsp+var_14], 0F423Fh
setnbe cl
and cl, 1
movzx ecx, cl
add eax, ecx
cmp [rsp+var_14], 98967Fh
setnbe cl
and cl, 1
movzx ecx, cl
add eax, ecx
cmp [rsp+var_14], 5F5E0FFh
setnbe cl
and cl, 1
movzx ecx, cl
add eax, ecx
cmp [rsp+var_14], 3B9AC9FFh
setnbe cl
and cl, 1
movzx ecx, cl
add eax, ecx
cdqe
mov [rsp+var_20], rax
mov rax, [rsp+var_10]
add rax, [rsp+var_20]
mov [rsp+var_28], rax
mov rax, [rsp+var_28]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_28], rcx
mov byte ptr [rax], 0
loc_3576:
cmp [rsp+var_14], 0Ah
jb short loc_35BD
mov eax, [rsp+var_14]
mov ecx, 0Ah
xor edx, edx
div ecx
mov [rsp+var_2C], edx
mov eax, [rsp+var_14]
mov ecx, 0Ah
xor edx, edx
div ecx
mov [rsp+var_14], eax
mov eax, [rsp+var_2C]
add eax, 30h ; '0'
mov cl, al
mov rax, [rsp+var_28]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_28], rdx
mov [rax], cl
jmp short loc_3576
loc_35BD:
mov eax, [rsp+var_14]
add eax, 30h ; '0'
mov cl, al
mov rax, [rsp+var_28]
mov [rax], cl
mov rax, [rsp+var_20]
mov [rsp+var_8], rax
loc_35D7:
mov rax, [rsp+var_8]
retn
| long long u32toa_length_expr(_BYTE *a1, unsigned int a2)
{
_BYTE *v2; // rax
unsigned int v4; // [rsp+0h] [rbp-2Ch]
_BYTE *v5; // [rsp+4h] [rbp-28h]
long long v6; // [rsp+Ch] [rbp-20h]
unsigned int v7; // [rsp+18h] [rbp-14h]
v7 = a2;
if ( a2 >= 0xA )
{
v6 = (a2 > 0x3B9AC9FF)
+ (a2 > 0x5F5E0FF)
+ (a2 > 0x98967F)
+ (a2 > 0xF423F)
+ (a2 > 0x1869F)
+ (a2 > 0x270F)
+ (a2 > 0x3E7)
+ (a2 > 0x63)
+ 2;
v5 = &a1[v6 - 1];
a1[v6] = 0;
while ( v7 >= 0xA )
{
v4 = v7 % 0xA;
v7 /= 0xAu;
v2 = v5--;
*v2 = v4 + 48;
}
*v5 = v7 + 48;
return (a2 > 0x3B9AC9FF)
+ (a2 > 0x5F5E0FF)
+ (a2 > 0x98967F)
+ (a2 > 0xF423F)
+ (a2 > 0x1869F)
+ (a2 > 0x270F)
+ (a2 > 0x3E7)
+ (a2 > 0x63)
+ 2;
}
else
{
*a1 = a2 + 48;
a1[1] = 0;
return 1LL;
}
}
| u32toa_length_expr:
MOV qword ptr [RSP + -0x10],RDI
MOV dword ptr [RSP + -0x14],ESI
CMP dword ptr [RSP + -0x14],0xa
JNC 0x001034b7
MOV EAX,dword ptr [RSP + -0x14]
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RSP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + -0x10]
MOV byte ptr [RAX + 0x1],0x0
MOV qword ptr [RSP + -0x8],0x1
JMP 0x001035d7
LAB_001034b7:
CMP dword ptr [RSP + -0x14],0x63
SETA AL
AND AL,0x1
MOVZX EAX,AL
ADD EAX,0x2
CMP dword ptr [RSP + -0x14],0x3e7
SETA CL
AND CL,0x1
MOVZX ECX,CL
ADD EAX,ECX
CMP dword ptr [RSP + -0x14],0x270f
SETA CL
AND CL,0x1
MOVZX ECX,CL
ADD EAX,ECX
CMP dword ptr [RSP + -0x14],0x1869f
SETA CL
AND CL,0x1
MOVZX ECX,CL
ADD EAX,ECX
CMP dword ptr [RSP + -0x14],0xf423f
SETA CL
AND CL,0x1
MOVZX ECX,CL
ADD EAX,ECX
CMP dword ptr [RSP + -0x14],0x98967f
SETA CL
AND CL,0x1
MOVZX ECX,CL
ADD EAX,ECX
CMP dword ptr [RSP + -0x14],0x5f5e0ff
SETA CL
AND CL,0x1
MOVZX ECX,CL
ADD EAX,ECX
CMP dword ptr [RSP + -0x14],0x3b9ac9ff
SETA CL
AND CL,0x1
MOVZX ECX,CL
ADD EAX,ECX
CDQE
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x10]
ADD RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RSP + -0x28],RAX
MOV RAX,qword ptr [RSP + -0x28]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RSP + -0x28],RCX
MOV byte ptr [RAX],0x0
LAB_00103576:
CMP dword ptr [RSP + -0x14],0xa
JC 0x001035bd
MOV EAX,dword ptr [RSP + -0x14]
MOV ECX,0xa
XOR EDX,EDX
DIV ECX
MOV dword ptr [RSP + -0x2c],EDX
MOV EAX,dword ptr [RSP + -0x14]
MOV ECX,0xa
XOR EDX,EDX
DIV ECX
MOV dword ptr [RSP + -0x14],EAX
MOV EAX,dword ptr [RSP + -0x2c]
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RSP + -0x28]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + -0x28],RDX
MOV byte ptr [RAX],CL
JMP 0x00103576
LAB_001035bd:
MOV EAX,dword ptr [RSP + -0x14]
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RSP + -0x28]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RSP + -0x8],RAX
LAB_001035d7:
MOV RAX,qword ptr [RSP + -0x8]
RET
|
long u32toa_length_expr(char *param_1,uint param_2)
{
uint uVar1;
char *local_28;
uint local_14;
long local_8;
if (param_2 < 10) {
*param_1 = (char)param_2 + '0';
param_1[1] = '\0';
local_8 = 1;
}
else {
local_8 = (long)(int)((99 < param_2) + 2 + (uint)(999 < param_2) + (uint)(9999 < param_2) +
(uint)(99999 < param_2) + (uint)(999999 < param_2) +
(uint)(9999999 < param_2) + (uint)(99999999 < param_2) +
(uint)(999999999 < param_2));
local_28 = param_1 + local_8;
*local_28 = '\0';
local_14 = param_2;
while (local_28 = local_28 + -1, 9 < local_14) {
uVar1 = local_14 % 10;
local_14 = local_14 / 10;
*local_28 = (char)uVar1 + '0';
}
*local_28 = (char)local_14 + '0';
}
return local_8;
}
| |
38,418 | ImPlot3D::SampleColormapU32(float, int) | zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp | ImU32 SampleColormapU32(float t, ImPlot3DColormap cmap) {
ImPlot3DContext& gp = *GImPlot3D;
cmap = cmap == IMPLOT3D_AUTO ? gp.Style.Colormap : cmap;
IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!");
return gp.ColormapData.LerpTable(cmap, t);
} | O1 | cpp | ImPlot3D::SampleColormapU32(float, int):
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x2e2821(%rip), %r14 # 0x336c98
cmpl $-0x1, %edi
jne 0x54483
movl 0x1d0(%r14), %ebx
testl %ebx, %ebx
js 0x54490
cmpl 0x2a8(%r14), %ebx
jl 0x544a8
leaq 0x2411f0(%rip), %rdi # 0x295687
movss %xmm0, 0x4(%rsp)
callq 0x2161f4
movss 0x4(%rsp), %xmm0
movq 0x250(%r14), %rcx
movq 0x260(%r14), %rax
movslq %ebx, %rdx
movslq (%rax,%rdx,4), %rax
movl (%rcx,%rdx,4), %ecx
movq 0x290(%r14), %rsi
cmpb $0x1, (%rsi,%rdx)
jne 0x544e9
cvtsi2ss %ecx, %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %esi
decl %ecx
cmpl %ecx, %esi
cmovll %esi, %ecx
xorl %edx, %edx
testl %esi, %esi
cmovnsl %ecx, %edx
jmp 0x544ff
decl %ecx
cvtsi2ss %ecx, %xmm1
mulss %xmm0, %xmm1
addss 0x23ab25(%rip), %xmm1 # 0x28f020
cvttss2si %xmm1, %edx
movslq %edx, %rcx
addq %rax, %rcx
movq 0x240(%r14), %rax
movl (%rax,%rcx,4), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN8ImPlot3D17SampleColormapU32Efi:
push r14
push rbx
push rax
mov ebx, edi
mov r14, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
cmp edi, 0FFFFFFFFh
jnz short loc_54483
mov ebx, [r14+1D0h]
loc_54483:
test ebx, ebx
js short loc_54490
cmp ebx, [r14+2A8h]
jl short loc_544A8
loc_54490:
lea rdi, aInvalidColorma; "Invalid colormap index!"
movss [rsp+18h+var_14], xmm0
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
movss xmm0, [rsp+18h+var_14]
loc_544A8:
mov rcx, [r14+250h]
mov rax, [r14+260h]
movsxd rdx, ebx
movsxd rax, dword ptr [rax+rdx*4]
mov ecx, [rcx+rdx*4]
mov rsi, [r14+290h]
cmp byte ptr [rsi+rdx], 1
jnz short loc_544E9
cvtsi2ss xmm1, ecx
mulss xmm1, xmm0
cvttss2si esi, xmm1
dec ecx
cmp esi, ecx
cmovl ecx, esi
xor edx, edx
test esi, esi
cmovns edx, ecx
jmp short loc_544FF
loc_544E9:
dec ecx
cvtsi2ss xmm1, ecx
mulss xmm1, xmm0
addss xmm1, dword ptr cs:xmmword_28F020
cvttss2si edx, xmm1
loc_544FF:
movsxd rcx, edx
add rcx, rax
mov rax, [r14+240h]
mov eax, [rax+rcx*4]
add rsp, 8
pop rbx
pop r14
retn
| long long ImPlot3D::SampleColormapU32(ImPlot3D *this, float a2, const char *a3)
{
int v3; // ebx
ImGui *v4; // r14
int v5; // ecx
int v6; // esi
int v7; // ecx
int v8; // edx
v3 = (int)this;
v4 = ImPlot3D::GImPlot3D;
if ( (_DWORD)this == -1 )
v3 = *((_DWORD *)ImPlot3D::GImPlot3D + 116);
if ( v3 < 0 || v3 >= *((_DWORD *)ImPlot3D::GImPlot3D + 170) )
ImGui::ErrorLog((ImGui *)"Invalid colormap index!", a3);
v5 = *(_DWORD *)(*((_QWORD *)v4 + 74) + 4LL * v3);
if ( *(_BYTE *)(*((_QWORD *)v4 + 82) + v3) == 1 )
{
v6 = (int)(float)((float)v5 * a2);
v7 = v5 - 1;
if ( v6 < v7 )
v7 = v6;
v8 = 0;
if ( v6 >= 0 )
v8 = v7;
}
else
{
v8 = (int)(float)((float)((float)(v5 - 1) * a2) + 0.5);
}
return *(unsigned int *)(*((_QWORD *)v4 + 72) + 4 * (*(int *)(*((_QWORD *)v4 + 76) + 4LL * v3) + (long long)v8));
}
| SampleColormapU32:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDI
MOV R14,qword ptr [0x00436c98]
CMP EDI,-0x1
JNZ 0x00154483
MOV EBX,dword ptr [R14 + 0x1d0]
LAB_00154483:
TEST EBX,EBX
JS 0x00154490
CMP EBX,dword ptr [R14 + 0x2a8]
JL 0x001544a8
LAB_00154490:
LEA RDI,[0x395687]
MOVSS dword ptr [RSP + 0x4],XMM0
CALL 0x003161f4
MOVSS XMM0,dword ptr [RSP + 0x4]
LAB_001544a8:
MOV RCX,qword ptr [R14 + 0x250]
MOV RAX,qword ptr [R14 + 0x260]
MOVSXD RDX,EBX
MOVSXD RAX,dword ptr [RAX + RDX*0x4]
MOV ECX,dword ptr [RCX + RDX*0x4]
MOV RSI,qword ptr [R14 + 0x290]
CMP byte ptr [RSI + RDX*0x1],0x1
JNZ 0x001544e9
CVTSI2SS XMM1,ECX
MULSS XMM1,XMM0
CVTTSS2SI ESI,XMM1
DEC ECX
CMP ESI,ECX
CMOVL ECX,ESI
XOR EDX,EDX
TEST ESI,ESI
CMOVNS EDX,ECX
JMP 0x001544ff
LAB_001544e9:
DEC ECX
CVTSI2SS XMM1,ECX
MULSS XMM1,XMM0
ADDSS XMM1,dword ptr [0x0038f020]
CVTTSS2SI EDX,XMM1
LAB_001544ff:
MOVSXD RCX,EDX
ADD RCX,RAX
MOV RAX,qword ptr [R14 + 0x240]
MOV EAX,dword ptr [RAX + RCX*0x4]
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* ImPlot3D::SampleColormapU32(float, int) */
int4 ImPlot3D::SampleColormapU32(float param_1,int param_2)
{
int iVar1;
long lVar2;
int iVar3;
long lVar4;
int iVar5;
lVar2 = GImPlot3D;
if (param_2 == -1) {
param_2 = *(int *)(GImPlot3D + 0x1d0);
}
if ((param_2 < 0) || (*(int *)(GImPlot3D + 0x2a8) <= param_2)) {
ImGui::ErrorLog("Invalid colormap index!");
}
lVar4 = (long)param_2;
iVar3 = *(int *)(*(long *)(lVar2 + 0x250) + lVar4 * 4);
if (*(char *)(*(long *)(lVar2 + 0x290) + lVar4) == '\x01') {
iVar5 = (int)((float)iVar3 * param_1);
iVar1 = iVar3 + -1;
if (iVar5 < iVar3 + -1) {
iVar1 = iVar5;
}
iVar3 = 0;
if (-1 < iVar5) {
iVar3 = iVar1;
}
}
else {
iVar3 = (int)((float)(iVar3 + -1) * param_1 + DAT_0038f020);
}
return *(int4 *)
(*(long *)(lVar2 + 0x240) +
((long)iVar3 + (long)*(int *)(*(long *)(lVar2 + 0x260) + lVar4 * 4)) * 4);
}
| |
38,419 | link_to_file_list | eloqsql/mysys/mf_keycache.c | static void link_to_file_list(SIMPLE_KEY_CACHE_CB *keycache,
BLOCK_LINK *block, int file,
my_bool unlink_block)
{
DBUG_ASSERT(block->status & BLOCK_IN_USE);
DBUG_ASSERT(block->hash_link && block->hash_link->block == block);
DBUG_ASSERT(block->hash_link->file == file);
if (unlink_block)
unlink_changed(block);
link_changed(block, &keycache->file_blocks[FILE_HASH(file, keycache)]);
if (block->status & BLOCK_CHANGED)
{
block->status&= ~BLOCK_CHANGED;
keycache->blocks_changed--;
keycache->global_blocks_changed--;
}
} | O0 | c | link_to_file_list:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb %al, -0x15(%rbp)
jmp 0xe672a
jmp 0xe672c
jmp 0xe672e
jmp 0xe6730
jmp 0xe6732
cmpb $0x0, -0x15(%rbp)
je 0xe6741
movq -0x10(%rbp), %rdi
callq 0xe68f0
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rsi
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x3c(%rcx), %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, %eax
shlq $0x3, %rax
addq %rax, %rsi
callq 0xe6b50
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xe67af
movq -0x10(%rbp), %rax
movl 0x50(%rax), %ecx
andl $-0x21, %ecx
movl %ecx, 0x50(%rax)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x138(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| link_to_file_list_0:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_15], al
jmp short $+2
loc_E672A:
jmp short $+2
loc_E672C:
jmp short $+2
loc_E672E:
jmp short $+2
loc_E6730:
jmp short $+2
loc_E6732:
cmp [rbp+var_15], 0
jz short loc_E6741
mov rdi, [rbp+var_10]
call unlink_changed_0
loc_E6741:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rax+130h]
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
mov ecx, [rcx+3Ch]
sub ecx, 1
and eax, ecx
mov eax, eax
shl rax, 3
add rsi, rax
call link_changed_0
mov rax, [rbp+var_10]
mov eax, [rax+50h]
and eax, 20h
cmp eax, 0
jz short loc_E67AF
mov rax, [rbp+var_10]
mov ecx, [rax+50h]
and ecx, 0FFFFFFDFh
mov [rax+50h], ecx
mov rax, [rbp+var_8]
mov rcx, [rax+60h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+60h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+138h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+138h], rcx
loc_E67AF:
add rsp, 20h
pop rbp
retn
| long long link_to_file_list_0(long long a1, long long a2, unsigned int a3, char a4)
{
long long result; // rax
if ( a4 )
unlink_changed_0(a2);
link_changed_0(a2, 8LL * ((*(_DWORD *)(a1 + 60) - 1) & a3) + *(_QWORD *)(a1 + 304));
result = *(_DWORD *)(a2 + 80) & 0x20;
if ( (_DWORD)result )
{
*(_DWORD *)(a2 + 80) &= ~0x20u;
--*(_QWORD *)(a1 + 96);
result = a1;
--*(_QWORD *)(a1 + 312);
}
return result;
}
| link_to_file_list:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV byte ptr [RBP + -0x15],AL
JMP 0x001e672a
LAB_001e672a:
JMP 0x001e672c
LAB_001e672c:
JMP 0x001e672e
LAB_001e672e:
JMP 0x001e6730
LAB_001e6730:
JMP 0x001e6732
LAB_001e6732:
CMP byte ptr [RBP + -0x15],0x0
JZ 0x001e6741
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e68f0
LAB_001e6741:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x130]
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x3c]
SUB ECX,0x1
AND EAX,ECX
MOV EAX,EAX
SHL RAX,0x3
ADD RSI,RAX
CALL 0x001e6b50
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x50]
AND EAX,0x20
CMP EAX,0x0
JZ 0x001e67af
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x50]
AND ECX,0xffffffdf
MOV dword ptr [RAX + 0x50],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x60]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x60],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x138]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x138],RCX
LAB_001e67af:
ADD RSP,0x20
POP RBP
RET
|
void link_to_file_list(long param_1,long param_2,uint param_3,char param_4)
{
if (param_4 != '\0') {
unlink_changed(param_2);
}
link_changed(param_2,*(long *)(param_1 + 0x130) +
(ulong)(param_3 & *(int *)(param_1 + 0x3c) - 1U) * 8);
if ((*(uint *)(param_2 + 0x50) & 0x20) != 0) {
*(uint *)(param_2 + 0x50) = *(uint *)(param_2 + 0x50) & 0xffffffdf;
*(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + -1;
*(long *)(param_1 + 0x138) = *(long *)(param_1 + 0x138) + -1;
}
return;
}
| |
38,420 | ggml_vec_dot_q4_0_q8_0 | 7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c | void ggml_vec_dot_q4_0_q8_0(int n, float * restrict s, const void * restrict vx, const void * restrict vy) {
const int qk = QK8_0;
const int nb = n / qk;
assert(n % qk == 0);
const block_q4_0 * restrict x = vx;
const block_q8_0 * restrict y = vy;
#if defined(__ARM_NEON)
float32x4_t sumv0 = vdupq_n_f32(0.0f);
float32x4_t sumv1 = vdupq_n_f32(0.0f);
assert(nb % 2 == 0); // TODO: handle odd nb
for (int i = 0; i < nb; i += 2) {
const block_q4_0 * restrict x0 = &x[i + 0];
const block_q4_0 * restrict x1 = &x[i + 1];
const block_q8_0 * restrict y0 = &y[i + 0];
const block_q8_0 * restrict y1 = &y[i + 1];
const uint8x16_t m4b = vdupq_n_u8(0x0F);
const int8x16_t s8b = vdupq_n_s8(0x8);
const uint8x16_t v0_0 = vld1q_u8(x0->qs);
const uint8x16_t v0_1 = vld1q_u8(x1->qs);
// 4-bit -> 8-bit
const int8x16_t v0_0l = vreinterpretq_s8_u8(vandq_u8 (v0_0, m4b));
const int8x16_t v0_0h = vreinterpretq_s8_u8(vshrq_n_u8(v0_0, 4));
const int8x16_t v0_1l = vreinterpretq_s8_u8(vandq_u8 (v0_1, m4b));
const int8x16_t v0_1h = vreinterpretq_s8_u8(vshrq_n_u8(v0_1, 4));
// sub 8
const int8x16_t v0_0ls = vsubq_s8(v0_0l, s8b);
const int8x16_t v0_0hs = vsubq_s8(v0_0h, s8b);
const int8x16_t v0_1ls = vsubq_s8(v0_1l, s8b);
const int8x16_t v0_1hs = vsubq_s8(v0_1h, s8b);
// load y
const int8x16_t v1_0l = vld1q_s8(y0->qs);
const int8x16_t v1_0h = vld1q_s8(y0->qs + 16);
const int8x16_t v1_1l = vld1q_s8(y1->qs);
const int8x16_t v1_1h = vld1q_s8(y1->qs + 16);
// dot product into int32x4_t
const int32x4_t p_0 = ggml_vdotq_s32(ggml_vdotq_s32(vdupq_n_s32(0), v0_0ls, v1_0l), v0_0hs, v1_0h);
const int32x4_t p_1 = ggml_vdotq_s32(ggml_vdotq_s32(vdupq_n_s32(0), v0_1ls, v1_1l), v0_1hs, v1_1h);
sumv0 = vmlaq_n_f32(sumv0, vcvtq_f32_s32(p_0), GGML_FP16_TO_FP32(x0->d)*GGML_FP16_TO_FP32(y0->d));
sumv1 = vmlaq_n_f32(sumv1, vcvtq_f32_s32(p_1), GGML_FP16_TO_FP32(x1->d)*GGML_FP16_TO_FP32(y1->d));
}
*s = vaddvq_f32(sumv0) + vaddvq_f32(sumv1);
#elif defined(__AVX2__)
// Initialize accumulator with zeros
__m256 acc = _mm256_setzero_ps();
// Main loop
for (int i = 0; i < nb; ++i) {
/* Compute combined scale for the block */
const __m256 d = _mm256_set1_ps( GGML_FP16_TO_FP32(x[i].d) * GGML_FP16_TO_FP32(y[i].d) );
__m256i bx = bytes_from_nibbles_32(x[i].qs);
// Now we have a vector with bytes in [ 0 .. 15 ] interval. Offset them into [ -8 .. +7 ] interval.
const __m256i off = _mm256_set1_epi8( 8 );
bx = _mm256_sub_epi8( bx, off );
__m256i by = _mm256_loadu_si256((const __m256i *)y[i].qs);
const __m256 q = mul_sum_i8_pairs_float(bx, by);
/* Multiply q with scale and accumulate */
acc = _mm256_fmadd_ps( d, q, acc );
}
*s = hsum_float_8(acc);
#elif defined(__AVX__)
// Initialize accumulator with zeros
__m256 acc = _mm256_setzero_ps();
// Main loop
for (int i = 0; i < nb; ++i) {
// Compute combined scale for the block
const __m256 d = _mm256_set1_ps( GGML_FP16_TO_FP32(x[i].d) * GGML_FP16_TO_FP32(y[i].d) );
const __m128i lowMask = _mm_set1_epi8(0xF);
const __m128i off = _mm_set1_epi8(8);
const __m128i tmp = _mm_loadu_si128((const __m128i *)x[i].qs);
__m128i bx = _mm_and_si128(lowMask, tmp);
__m128i by = _mm_loadu_si128((const __m128i *)y[i].qs);
bx = _mm_sub_epi8(bx, off);
const __m128i i32_0 = mul_sum_i8_pairs(bx, by);
bx = _mm_and_si128(lowMask, _mm_srli_epi64(tmp, 4));
by = _mm_loadu_si128((const __m128i *)(y[i].qs + 16));
bx = _mm_sub_epi8(bx, off);
const __m128i i32_1 = mul_sum_i8_pairs(bx, by);
// Convert int32_t to float
__m256 p = _mm256_cvtepi32_ps(MM256_SET_M128I(i32_0, i32_1));
// Apply the scale, and accumulate
acc = _mm256_add_ps(_mm256_mul_ps( d, p ), acc);
}
*s = hsum_float_8(acc);
#elif defined(__SSSE3__)
// set constants
const __m128i lowMask = _mm_set1_epi8(0xF);
const __m128i off = _mm_set1_epi8(8);
// Initialize accumulator with zeros
__m128 acc_0 = _mm_setzero_ps();
__m128 acc_1 = _mm_setzero_ps();
__m128 acc_2 = _mm_setzero_ps();
__m128 acc_3 = _mm_setzero_ps();
// First round without accumulation
{
_mm_prefetch(&x[0] + sizeof(block_q4_0), _MM_HINT_T0);
_mm_prefetch(&y[0] + sizeof(block_q8_0), _MM_HINT_T0);
// Compute combined scale for the block 0 and 1
const __m128 d_0_1 = _mm_set1_ps( GGML_FP16_TO_FP32(x[0].d) * GGML_FP16_TO_FP32(y[0].d) );
const __m128i tmp_0_1 = _mm_loadu_si128((const __m128i *)x[0].qs);
__m128i bx_0 = _mm_and_si128(lowMask, tmp_0_1);
__m128i by_0 = _mm_loadu_si128((const __m128i *)y[0].qs);
bx_0 = _mm_sub_epi8(bx_0, off);
const __m128i i32_0 = mul_sum_i8_pairs(bx_0, by_0);
__m128i bx_1 = _mm_and_si128(lowMask, _mm_srli_epi64(tmp_0_1, 4));
__m128i by_1 = _mm_loadu_si128((const __m128i *)(y[0].qs + 16));
bx_1 = _mm_sub_epi8(bx_1, off);
const __m128i i32_1 = mul_sum_i8_pairs(bx_1, by_1);
_mm_prefetch(&x[1] + sizeof(block_q4_0), _MM_HINT_T0);
_mm_prefetch(&y[1] + sizeof(block_q8_0), _MM_HINT_T0);
// Compute combined scale for the block 2 and 3
const __m128 d_2_3 = _mm_set1_ps( GGML_FP16_TO_FP32(x[1].d) * GGML_FP16_TO_FP32(y[1].d) );
const __m128i tmp_2_3 = _mm_loadu_si128((const __m128i *)x[1].qs);
__m128i bx_2 = _mm_and_si128(lowMask, tmp_2_3);
__m128i by_2 = _mm_loadu_si128((const __m128i *)y[1].qs);
bx_2 = _mm_sub_epi8(bx_2, off);
const __m128i i32_2 = mul_sum_i8_pairs(bx_2, by_2);
__m128i bx_3 = _mm_and_si128(lowMask, _mm_srli_epi64(tmp_2_3, 4));
__m128i by_3 = _mm_loadu_si128((const __m128i *)(y[1].qs + 16));
bx_3 = _mm_sub_epi8(bx_3, off);
const __m128i i32_3 = mul_sum_i8_pairs(bx_3, by_3);
// Convert int32_t to float
__m128 p0 = _mm_cvtepi32_ps(i32_0);
__m128 p1 = _mm_cvtepi32_ps(i32_1);
__m128 p2 = _mm_cvtepi32_ps(i32_2);
__m128 p3 = _mm_cvtepi32_ps(i32_3);
// Apply the scale
acc_0 = _mm_mul_ps( d_0_1, p0 );
acc_1 = _mm_mul_ps( d_0_1, p1 );
acc_2 = _mm_mul_ps( d_2_3, p2 );
acc_3 = _mm_mul_ps( d_2_3, p3 );
}
assert(nb % 2 == 0); // TODO: handle odd nb
// Main loop
for (int i = 2; i < nb; i+=2) {
_mm_prefetch(&x[i] + sizeof(block_q4_0), _MM_HINT_T0);
_mm_prefetch(&y[i] + sizeof(block_q8_0), _MM_HINT_T0);
// Compute combined scale for the block 0 and 1
const __m128 d_0_1 = _mm_set1_ps( GGML_FP16_TO_FP32(x[i].d) * GGML_FP16_TO_FP32(y[i].d) );
const __m128i tmp_0_1 = _mm_loadu_si128((const __m128i *)x[i].qs);
__m128i bx_0 = _mm_and_si128(lowMask, tmp_0_1);
__m128i by_0 = _mm_loadu_si128((const __m128i *)y[i].qs);
bx_0 = _mm_sub_epi8(bx_0, off);
const __m128i i32_0 = mul_sum_i8_pairs(bx_0, by_0);
__m128i bx_1 = _mm_and_si128(lowMask, _mm_srli_epi64(tmp_0_1, 4));
__m128i by_1 = _mm_loadu_si128((const __m128i *)(y[i].qs + 16));
bx_1 = _mm_sub_epi8(bx_1, off);
const __m128i i32_1 = mul_sum_i8_pairs(bx_1, by_1);
_mm_prefetch(&x[i] + 2 * sizeof(block_q4_0), _MM_HINT_T0);
_mm_prefetch(&y[i] + 2 * sizeof(block_q8_0), _MM_HINT_T0);
// Compute combined scale for the block 2 and 3
const __m128 d_2_3 = _mm_set1_ps( GGML_FP16_TO_FP32(x[i + 1].d) * GGML_FP16_TO_FP32(y[i + 1].d) );
const __m128i tmp_2_3 = _mm_loadu_si128((const __m128i *)x[i + 1].qs);
__m128i bx_2 = _mm_and_si128(lowMask, tmp_2_3);
__m128i by_2 = _mm_loadu_si128((const __m128i *)y[i + 1].qs);
bx_2 = _mm_sub_epi8(bx_2, off);
const __m128i i32_2 = mul_sum_i8_pairs(bx_2, by_2);
__m128i bx_3 = _mm_and_si128(lowMask, _mm_srli_epi64(tmp_2_3, 4));
__m128i by_3 = _mm_loadu_si128((const __m128i *)(y[i + 1].qs + 16));
bx_3 = _mm_sub_epi8(bx_3, off);
const __m128i i32_3 = mul_sum_i8_pairs(bx_3, by_3);
// Convert int32_t to float
__m128 p0 = _mm_cvtepi32_ps(i32_0);
__m128 p1 = _mm_cvtepi32_ps(i32_1);
__m128 p2 = _mm_cvtepi32_ps(i32_2);
__m128 p3 = _mm_cvtepi32_ps(i32_3);
// Apply the scale
__m128 p0_d = _mm_mul_ps( d_0_1, p0 );
__m128 p1_d = _mm_mul_ps( d_0_1, p1 );
__m128 p2_d = _mm_mul_ps( d_2_3, p2 );
__m128 p3_d = _mm_mul_ps( d_2_3, p3 );
// Acummulate
acc_0 = _mm_add_ps(p0_d, acc_0);
acc_1 = _mm_add_ps(p1_d, acc_1);
acc_2 = _mm_add_ps(p2_d, acc_2);
acc_3 = _mm_add_ps(p3_d, acc_3);
}
*s = hsum_float_4x4(acc_0, acc_1, acc_2, acc_3);
#elif defined(__riscv_v_intrinsic)
float sumf = 0.0;
size_t vl = __riscv_vsetvl_e8m1(qk/2);
for (int i = 0; i < nb; i++) {
// load elements
vuint8mf2_t tx = __riscv_vle8_v_u8mf2(x[i].qs, vl);
vint8mf2_t y0 = __riscv_vle8_v_i8mf2(y[i].qs, vl);
vint8mf2_t y1 = __riscv_vle8_v_i8mf2(y[i].qs+16, vl);
// mask and store lower part of x, and then upper part
vuint8mf2_t x_a = __riscv_vand_vx_u8mf2(tx, 0x0F, vl);
vuint8mf2_t x_l = __riscv_vsrl_vx_u8mf2(tx, 0x04, vl);
vint8mf2_t x_ai = __riscv_vreinterpret_v_u8mf2_i8mf2(x_a);
vint8mf2_t x_li = __riscv_vreinterpret_v_u8mf2_i8mf2(x_l);
// subtract offset
vint8mf2_t v0 = __riscv_vsub_vx_i8mf2(x_ai, 8, vl);
vint8mf2_t v1 = __riscv_vsub_vx_i8mf2(x_li, 8, vl);
vint16m1_t vec_mul1 = __riscv_vwmul_vv_i16m1(v0, y0, vl);
vint16m1_t vec_mul2 = __riscv_vwmul_vv_i16m1(v1, y1, vl);
vint32m1_t vec_zero = __riscv_vmv_v_x_i32m1(0, vl);
vint32m1_t vs1 = __riscv_vwredsum_vs_i16m1_i32m1(vec_mul1, vec_zero, vl);
vint32m1_t vs2 = __riscv_vwredsum_vs_i16m1_i32m1(vec_mul2, vs1, vl);
int sumi = __riscv_vmv_x_s_i32m1_i32(vs2);
sumf += sumi*GGML_FP16_TO_FP32(x[i].d)*GGML_FP16_TO_FP32(y[i].d);
}
*s = sumf;
#else
// scalar
float sumf = 0.0;
for (int i = 0; i < nb; i++) {
int sumi = 0;
for (int j = 0; j < qk/2; ++j) {
const int v0 = (x[i].qs[j] & 0x0F) - 8;
const int v1 = (x[i].qs[j] >> 4) - 8;
sumi += (v0 * y[i].qs[j]) + (v1 * y[i].qs[j + qk/2]);
}
sumf += sumi*GGML_FP16_TO_FP32(x[i].d)*GGML_FP16_TO_FP32(y[i].d);
}
*s = sumf;
#endif
} | O2 | c | ggml_vec_dot_q4_0_q8_0:
movq %rdx, %r8
movl %edi, %eax
pushq $0x20
popq %rdi
cltd
idivl %edi
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
imulq $0x12, %rax, %rax
addq $0x2, %rcx
vxorps %xmm0, %xmm0, %xmm0
leaq 0xc7f3d(%rip), %rdi # 0x15d290
vpbroadcastb 0xfbc4(%rip), %ymm1 # 0xa4f20
vpbroadcastb 0xfbbc(%rip), %ymm2 # 0xa4f21
vpbroadcastw 0xfbb4(%rip), %ymm3 # 0xa4f22
cmpq %rdx, %rax
je 0x953d2
movzwl (%r8,%rdx), %r9d
vmovss (%rdi,%r9,4), %xmm4
movzwl -0x2(%rcx), %r9d
vmulss (%rdi,%r9,4), %xmm4, %xmm4
vbroadcastss %xmm4, %ymm4
vmovdqu 0x2(%r8,%rdx), %xmm5
vpsrlw $0x4, %xmm5, %xmm6
vinserti128 $0x1, %xmm6, %ymm5, %ymm5
vpand %ymm1, %ymm5, %ymm5
vpaddb %ymm2, %ymm5, %ymm5
vmovdqu (%rcx), %ymm6
vpsignb %ymm5, %ymm5, %ymm7
vpsignb %ymm5, %ymm6, %ymm5
vpmaddubsw %ymm5, %ymm7, %ymm5
vpmaddwd %ymm5, %ymm3, %ymm5
vcvtdq2ps %ymm5, %ymm5
vfmadd231ps %ymm5, %ymm4, %ymm0 # ymm0 = (ymm4 * ymm5) + ymm0
addq $0x12, %rdx
addq $0x22, %rcx
jmp 0x9536e
vextractf128 $0x1, %ymm0, %xmm1
vaddps %xmm0, %xmm1, %xmm0
vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0]
vaddps %xmm1, %xmm0, %xmm0
vhaddps %xmm0, %xmm0, %xmm0
vmovss %xmm0, (%rsi)
vzeroupper
retq
| ggml_vec_dot_q4_0_q8_0:
mov r8, rdx
mov eax, edi
push 20h ; ' '
pop rdi
cdq
idiv edi
xor edx, edx
test eax, eax
cmovle eax, edx
imul rax, 12h
add rcx, 2
vxorps xmm0, xmm0, xmm0
lea rdi, ggml_table_f32_f16
vpbroadcastb ymm1, cs:byte_A4F20
vpbroadcastb ymm2, cs:byte_A4F21
vpbroadcastw ymm3, cs:word_A4F22
loc_9536E:
cmp rax, rdx
jz short loc_953D2
movzx r9d, word ptr [r8+rdx]
vmovss xmm4, dword ptr [rdi+r9*4]
movzx r9d, word ptr [rcx-2]
vmulss xmm4, xmm4, dword ptr [rdi+r9*4]
vbroadcastss ymm4, xmm4
vmovdqu xmm5, xmmword ptr [r8+rdx+2]
vpsrlw xmm6, xmm5, 4
vinserti128 ymm5, ymm5, xmm6, 1
vpand ymm5, ymm5, ymm1
vpaddb ymm5, ymm5, ymm2
vmovdqu ymm6, ymmword ptr [rcx]
vpsignb ymm7, ymm5, ymm5
vpsignb ymm5, ymm6, ymm5
vpmaddubsw ymm5, ymm7, ymm5
vpmaddwd ymm5, ymm3, ymm5
vcvtdq2ps ymm5, ymm5
vfmadd231ps ymm0, ymm4, ymm5
add rdx, 12h
add rcx, 22h ; '"'
jmp short loc_9536E
loc_953D2:
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rsi], xmm0
vzeroupper
retn
| long long ggml_vec_dot_q4_0_q8_0(int a1, long long _RSI, long long a3, long long a4, __m128 _XMM0)
{
long long v8; // rax
long long result; // rax
_R8 = a3;
v8 = (unsigned int)(a1 / 32);
_RDX = 0LL;
if ( (int)v8 <= 0 )
v8 = 0LL;
result = 18 * v8;
_RCX = a4 + 2;
__asm { vxorps xmm0, xmm0, xmm0 }
_RDI = &ggml_table_f32_f16;
__asm
{
vpbroadcastb ymm1, cs:byte_A4F20
vpbroadcastb ymm2, cs:byte_A4F21
vpbroadcastw ymm3, cs:word_A4F22
}
while ( result != _RDX )
{
_R9 = *(unsigned __int16 *)(_R8 + _RDX);
__asm
{
vmovss xmm4, dword ptr [rdi+r9*4]
vmulss xmm4, xmm4, dword ptr [rdi+r9*4]
vbroadcastss ymm4, xmm4
vmovdqu xmm5, xmmword ptr [r8+rdx+2]
vpsrlw xmm6, xmm5, 4
vinserti128 ymm5, ymm5, xmm6, 1
vpand ymm5, ymm5, ymm1
vpaddb ymm5, ymm5, ymm2
vmovdqu ymm6, ymmword ptr [rcx]
vpsignb ymm7, ymm5, ymm5
vpsignb ymm5, ymm6, ymm5
vpmaddubsw ymm5, ymm7, ymm5
vpmaddwd ymm5, ymm3, ymm5
vcvtdq2ps ymm5, ymm5
vfmadd231ps ymm0, ymm4, ymm5
}
_RDX += 18LL;
_RCX += 34LL;
}
__asm
{
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rsi], xmm0
vzeroupper
}
return result;
}
| ggml_vec_dot_q4_0_q8_0:
MOV R8,RDX
MOV EAX,EDI
PUSH 0x20
POP RDI
CDQ
IDIV EDI
XOR EDX,EDX
TEST EAX,EAX
CMOVLE EAX,EDX
IMUL RAX,RAX,0x12
ADD RCX,0x2
VXORPS XMM0,XMM0,XMM0
LEA RDI,[0x25d290]
VPBROADCASTB YMM1,byte ptr [0x001a4f20]
VPBROADCASTB YMM2,byte ptr [0x001a4f21]
VPBROADCASTW YMM3,word ptr [0x001a4f22]
LAB_0019536e:
CMP RAX,RDX
JZ 0x001953d2
MOVZX R9D,word ptr [R8 + RDX*0x1]
VMOVSS XMM4,dword ptr [RDI + R9*0x4]
MOVZX R9D,word ptr [RCX + -0x2]
VMULSS XMM4,XMM4,dword ptr [RDI + R9*0x4]
VBROADCASTSS YMM4,XMM4
VMOVDQU XMM5,xmmword ptr [R8 + RDX*0x1 + 0x2]
VPSRLW XMM6,XMM5,0x4
VINSERTI128 YMM5,YMM5,XMM6,0x1
VPAND YMM5,YMM5,YMM1
VPADDB YMM5,YMM5,YMM2
VMOVDQU YMM6,ymmword ptr [RCX]
VPSIGNB YMM7,YMM5,YMM5
VPSIGNB YMM5,YMM6,YMM5
VPMADDUBSW YMM5,YMM7,YMM5
VPMADDWD YMM5,YMM3,YMM5
VCVTDQ2PS YMM5,YMM5
VFMADD231PS YMM0,YMM4,YMM5
ADD RDX,0x12
ADD RCX,0x22
JMP 0x0019536e
LAB_001953d2:
VEXTRACTF128 XMM1,YMM0,0x1
VADDPS XMM0,XMM1,XMM0
VSHUFPD XMM1,XMM0,XMM0,0x1
VADDPS XMM0,XMM0,XMM1
VHADDPS XMM0,XMM0,XMM0
VMOVSS dword ptr [RSI],XMM0
VZEROUPPER
RET
|
void ggml_vec_dot_q4_0_q8_0(int param_1,int4 *param_2,long param_3,long param_4)
{
float fVar1;
int1 auVar2 [32];
ulong uVar3;
int1 (*pauVar4) [32];
ulong uVar5;
int1 auVar6 [16];
int1 auVar7 [16];
int1 auVar8 [32];
int1 auVar9 [32];
int1 auVar10 [32];
int1 auVar11 [32];
int1 auVar12 [32];
int1 auVar13 [16];
uVar5 = 0;
uVar3 = (long)param_1 / 0x20 & 0xffffffff;
if ((int)((long)param_1 / 0x20) < 1) {
uVar3 = uVar5;
}
pauVar4 = (int1 (*) [32])(param_4 + 2);
auVar6 = ZEXT816(0) << 0x40;
auVar8[1] = DAT_001a4f20;
auVar8[0] = DAT_001a4f20;
auVar8[2] = DAT_001a4f20;
auVar8[3] = DAT_001a4f20;
auVar8[4] = DAT_001a4f20;
auVar8[5] = DAT_001a4f20;
auVar8[6] = DAT_001a4f20;
auVar8[7] = DAT_001a4f20;
auVar8[8] = DAT_001a4f20;
auVar8[9] = DAT_001a4f20;
auVar8[10] = DAT_001a4f20;
auVar8[0xb] = DAT_001a4f20;
auVar8[0xc] = DAT_001a4f20;
auVar8[0xd] = DAT_001a4f20;
auVar8[0xe] = DAT_001a4f20;
auVar8[0xf] = DAT_001a4f20;
auVar8[0x10] = DAT_001a4f20;
auVar8[0x11] = DAT_001a4f20;
auVar8[0x12] = DAT_001a4f20;
auVar8[0x13] = DAT_001a4f20;
auVar8[0x14] = DAT_001a4f20;
auVar8[0x15] = DAT_001a4f20;
auVar8[0x16] = DAT_001a4f20;
auVar8[0x17] = DAT_001a4f20;
auVar8[0x18] = DAT_001a4f20;
auVar8[0x19] = DAT_001a4f20;
auVar8[0x1a] = DAT_001a4f20;
auVar8[0x1b] = DAT_001a4f20;
auVar8[0x1c] = DAT_001a4f20;
auVar8[0x1d] = DAT_001a4f20;
auVar8[0x1e] = DAT_001a4f20;
auVar8[0x1f] = DAT_001a4f20;
auVar9[1] = DAT_001a4f21;
auVar9[0] = DAT_001a4f21;
auVar9[2] = DAT_001a4f21;
auVar9[3] = DAT_001a4f21;
auVar9[4] = DAT_001a4f21;
auVar9[5] = DAT_001a4f21;
auVar9[6] = DAT_001a4f21;
auVar9[7] = DAT_001a4f21;
auVar9[8] = DAT_001a4f21;
auVar9[9] = DAT_001a4f21;
auVar9[10] = DAT_001a4f21;
auVar9[0xb] = DAT_001a4f21;
auVar9[0xc] = DAT_001a4f21;
auVar9[0xd] = DAT_001a4f21;
auVar9[0xe] = DAT_001a4f21;
auVar9[0xf] = DAT_001a4f21;
auVar9[0x10] = DAT_001a4f21;
auVar9[0x11] = DAT_001a4f21;
auVar9[0x12] = DAT_001a4f21;
auVar9[0x13] = DAT_001a4f21;
auVar9[0x14] = DAT_001a4f21;
auVar9[0x15] = DAT_001a4f21;
auVar9[0x16] = DAT_001a4f21;
auVar9[0x17] = DAT_001a4f21;
auVar9[0x18] = DAT_001a4f21;
auVar9[0x19] = DAT_001a4f21;
auVar9[0x1a] = DAT_001a4f21;
auVar9[0x1b] = DAT_001a4f21;
auVar9[0x1c] = DAT_001a4f21;
auVar9[0x1d] = DAT_001a4f21;
auVar9[0x1e] = DAT_001a4f21;
auVar9[0x1f] = DAT_001a4f21;
auVar10._2_2_ = DAT_001a4f22;
auVar10._0_2_ = DAT_001a4f22;
auVar10._4_2_ = DAT_001a4f22;
auVar10._6_2_ = DAT_001a4f22;
auVar10._8_2_ = DAT_001a4f22;
auVar10._10_2_ = DAT_001a4f22;
auVar10._12_2_ = DAT_001a4f22;
auVar10._14_2_ = DAT_001a4f22;
auVar10._16_2_ = DAT_001a4f22;
auVar10._18_2_ = DAT_001a4f22;
auVar10._20_2_ = DAT_001a4f22;
auVar10._22_2_ = DAT_001a4f22;
auVar10._24_2_ = DAT_001a4f22;
auVar10._26_2_ = DAT_001a4f22;
auVar10._28_2_ = DAT_001a4f22;
auVar10._30_2_ = DAT_001a4f22;
for (; uVar3 * 0x12 - uVar5 != 0; uVar5 = uVar5 + 0x12) {
fVar1 = (float)(&ggml_table_f32_f16)[*(ushort *)(param_3 + uVar5)] *
(float)(&ggml_table_f32_f16)[*(ushort *)(pauVar4[-1] + 0x1e)];
auVar11._4_4_ = fVar1;
auVar11._0_4_ = fVar1;
auVar11._8_4_ = fVar1;
auVar11._12_4_ = fVar1;
auVar11._16_4_ = fVar1;
auVar11._20_4_ = fVar1;
auVar11._24_4_ = fVar1;
auVar11._28_4_ = fVar1;
auVar7 = *(int1 (*) [16])(param_3 + 2 + uVar5);
auVar13 = vpsrlw_avx(auVar7,4);
auVar12._0_16_ = ZEXT116(0) * auVar13 + ZEXT116(1) * auVar7;
auVar12._16_16_ = ZEXT116(0) * SUB4816((int1 [48])0x0,0) + ZEXT116(1) * auVar13;
auVar12 = vpand_avx2(auVar12,auVar8);
auVar12 = vpaddb_avx2(auVar12,auVar9);
auVar2 = vpsignb_avx2(auVar12,auVar12);
auVar12 = vpsignb_avx2(*pauVar4,auVar12);
auVar12 = vpmaddubsw_avx2(auVar2,auVar12);
auVar12 = vpmaddwd_avx2(auVar10,auVar12);
auVar12 = vcvtdq2ps_avx(auVar12);
auVar6 = vfmadd231ps_fma(ZEXT1632(auVar6),auVar11,auVar12);
pauVar4 = (int1 (*) [32])(pauVar4[1] + 2);
}
auVar7._0_4_ = auVar6._0_4_ + 0.0;
auVar7._4_4_ = auVar6._4_4_ + 0.0;
auVar7._8_4_ = auVar6._8_4_ + 0.0;
auVar7._12_4_ = auVar6._12_4_ + 0.0;
auVar6 = vshufpd_avx(auVar7,auVar7,1);
auVar13._0_4_ = auVar7._0_4_ + auVar6._0_4_;
auVar13._4_4_ = auVar7._4_4_ + auVar6._4_4_;
auVar13._8_4_ = auVar7._8_4_ + auVar6._8_4_;
auVar13._12_4_ = auVar7._12_4_ + auVar6._12_4_;
auVar6 = vhaddps_avx(auVar13,auVar13);
*param_2 = auVar6._0_4_;
return;
}
| |
38,421 | ggml_vec_dot_q4_0_q8_0 | 7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c | void ggml_vec_dot_q4_0_q8_0(int n, float * restrict s, const void * restrict vx, const void * restrict vy) {
const int qk = QK8_0;
const int nb = n / qk;
assert(n % qk == 0);
const block_q4_0 * restrict x = vx;
const block_q8_0 * restrict y = vy;
#if defined(__ARM_NEON)
float32x4_t sumv0 = vdupq_n_f32(0.0f);
float32x4_t sumv1 = vdupq_n_f32(0.0f);
assert(nb % 2 == 0); // TODO: handle odd nb
for (int i = 0; i < nb; i += 2) {
const block_q4_0 * restrict x0 = &x[i + 0];
const block_q4_0 * restrict x1 = &x[i + 1];
const block_q8_0 * restrict y0 = &y[i + 0];
const block_q8_0 * restrict y1 = &y[i + 1];
const uint8x16_t m4b = vdupq_n_u8(0x0F);
const int8x16_t s8b = vdupq_n_s8(0x8);
const uint8x16_t v0_0 = vld1q_u8(x0->qs);
const uint8x16_t v0_1 = vld1q_u8(x1->qs);
// 4-bit -> 8-bit
const int8x16_t v0_0l = vreinterpretq_s8_u8(vandq_u8 (v0_0, m4b));
const int8x16_t v0_0h = vreinterpretq_s8_u8(vshrq_n_u8(v0_0, 4));
const int8x16_t v0_1l = vreinterpretq_s8_u8(vandq_u8 (v0_1, m4b));
const int8x16_t v0_1h = vreinterpretq_s8_u8(vshrq_n_u8(v0_1, 4));
// sub 8
const int8x16_t v0_0ls = vsubq_s8(v0_0l, s8b);
const int8x16_t v0_0hs = vsubq_s8(v0_0h, s8b);
const int8x16_t v0_1ls = vsubq_s8(v0_1l, s8b);
const int8x16_t v0_1hs = vsubq_s8(v0_1h, s8b);
// load y
const int8x16_t v1_0l = vld1q_s8(y0->qs);
const int8x16_t v1_0h = vld1q_s8(y0->qs + 16);
const int8x16_t v1_1l = vld1q_s8(y1->qs);
const int8x16_t v1_1h = vld1q_s8(y1->qs + 16);
// dot product into int32x4_t
const int32x4_t p_0 = ggml_vdotq_s32(ggml_vdotq_s32(vdupq_n_s32(0), v0_0ls, v1_0l), v0_0hs, v1_0h);
const int32x4_t p_1 = ggml_vdotq_s32(ggml_vdotq_s32(vdupq_n_s32(0), v0_1ls, v1_1l), v0_1hs, v1_1h);
sumv0 = vmlaq_n_f32(sumv0, vcvtq_f32_s32(p_0), GGML_FP16_TO_FP32(x0->d)*GGML_FP16_TO_FP32(y0->d));
sumv1 = vmlaq_n_f32(sumv1, vcvtq_f32_s32(p_1), GGML_FP16_TO_FP32(x1->d)*GGML_FP16_TO_FP32(y1->d));
}
*s = vaddvq_f32(sumv0) + vaddvq_f32(sumv1);
#elif defined(__AVX2__)
// Initialize accumulator with zeros
__m256 acc = _mm256_setzero_ps();
// Main loop
for (int i = 0; i < nb; ++i) {
/* Compute combined scale for the block */
const __m256 d = _mm256_set1_ps( GGML_FP16_TO_FP32(x[i].d) * GGML_FP16_TO_FP32(y[i].d) );
__m256i bx = bytes_from_nibbles_32(x[i].qs);
// Now we have a vector with bytes in [ 0 .. 15 ] interval. Offset them into [ -8 .. +7 ] interval.
const __m256i off = _mm256_set1_epi8( 8 );
bx = _mm256_sub_epi8( bx, off );
__m256i by = _mm256_loadu_si256((const __m256i *)y[i].qs);
const __m256 q = mul_sum_i8_pairs_float(bx, by);
/* Multiply q with scale and accumulate */
acc = _mm256_fmadd_ps( d, q, acc );
}
*s = hsum_float_8(acc);
#elif defined(__AVX__)
// Initialize accumulator with zeros
__m256 acc = _mm256_setzero_ps();
// Main loop
for (int i = 0; i < nb; ++i) {
// Compute combined scale for the block
const __m256 d = _mm256_set1_ps( GGML_FP16_TO_FP32(x[i].d) * GGML_FP16_TO_FP32(y[i].d) );
const __m128i lowMask = _mm_set1_epi8(0xF);
const __m128i off = _mm_set1_epi8(8);
const __m128i tmp = _mm_loadu_si128((const __m128i *)x[i].qs);
__m128i bx = _mm_and_si128(lowMask, tmp);
__m128i by = _mm_loadu_si128((const __m128i *)y[i].qs);
bx = _mm_sub_epi8(bx, off);
const __m128i i32_0 = mul_sum_i8_pairs(bx, by);
bx = _mm_and_si128(lowMask, _mm_srli_epi64(tmp, 4));
by = _mm_loadu_si128((const __m128i *)(y[i].qs + 16));
bx = _mm_sub_epi8(bx, off);
const __m128i i32_1 = mul_sum_i8_pairs(bx, by);
// Convert int32_t to float
__m256 p = _mm256_cvtepi32_ps(MM256_SET_M128I(i32_0, i32_1));
// Apply the scale, and accumulate
acc = _mm256_add_ps(_mm256_mul_ps( d, p ), acc);
}
*s = hsum_float_8(acc);
#elif defined(__SSSE3__)
// set constants
const __m128i lowMask = _mm_set1_epi8(0xF);
const __m128i off = _mm_set1_epi8(8);
// Initialize accumulator with zeros
__m128 acc_0 = _mm_setzero_ps();
__m128 acc_1 = _mm_setzero_ps();
__m128 acc_2 = _mm_setzero_ps();
__m128 acc_3 = _mm_setzero_ps();
// First round without accumulation
{
_mm_prefetch(&x[0] + sizeof(block_q4_0), _MM_HINT_T0);
_mm_prefetch(&y[0] + sizeof(block_q8_0), _MM_HINT_T0);
// Compute combined scale for the block 0 and 1
const __m128 d_0_1 = _mm_set1_ps( GGML_FP16_TO_FP32(x[0].d) * GGML_FP16_TO_FP32(y[0].d) );
const __m128i tmp_0_1 = _mm_loadu_si128((const __m128i *)x[0].qs);
__m128i bx_0 = _mm_and_si128(lowMask, tmp_0_1);
__m128i by_0 = _mm_loadu_si128((const __m128i *)y[0].qs);
bx_0 = _mm_sub_epi8(bx_0, off);
const __m128i i32_0 = mul_sum_i8_pairs(bx_0, by_0);
__m128i bx_1 = _mm_and_si128(lowMask, _mm_srli_epi64(tmp_0_1, 4));
__m128i by_1 = _mm_loadu_si128((const __m128i *)(y[0].qs + 16));
bx_1 = _mm_sub_epi8(bx_1, off);
const __m128i i32_1 = mul_sum_i8_pairs(bx_1, by_1);
_mm_prefetch(&x[1] + sizeof(block_q4_0), _MM_HINT_T0);
_mm_prefetch(&y[1] + sizeof(block_q8_0), _MM_HINT_T0);
// Compute combined scale for the block 2 and 3
const __m128 d_2_3 = _mm_set1_ps( GGML_FP16_TO_FP32(x[1].d) * GGML_FP16_TO_FP32(y[1].d) );
const __m128i tmp_2_3 = _mm_loadu_si128((const __m128i *)x[1].qs);
__m128i bx_2 = _mm_and_si128(lowMask, tmp_2_3);
__m128i by_2 = _mm_loadu_si128((const __m128i *)y[1].qs);
bx_2 = _mm_sub_epi8(bx_2, off);
const __m128i i32_2 = mul_sum_i8_pairs(bx_2, by_2);
__m128i bx_3 = _mm_and_si128(lowMask, _mm_srli_epi64(tmp_2_3, 4));
__m128i by_3 = _mm_loadu_si128((const __m128i *)(y[1].qs + 16));
bx_3 = _mm_sub_epi8(bx_3, off);
const __m128i i32_3 = mul_sum_i8_pairs(bx_3, by_3);
// Convert int32_t to float
__m128 p0 = _mm_cvtepi32_ps(i32_0);
__m128 p1 = _mm_cvtepi32_ps(i32_1);
__m128 p2 = _mm_cvtepi32_ps(i32_2);
__m128 p3 = _mm_cvtepi32_ps(i32_3);
// Apply the scale
acc_0 = _mm_mul_ps( d_0_1, p0 );
acc_1 = _mm_mul_ps( d_0_1, p1 );
acc_2 = _mm_mul_ps( d_2_3, p2 );
acc_3 = _mm_mul_ps( d_2_3, p3 );
}
assert(nb % 2 == 0); // TODO: handle odd nb
// Main loop
for (int i = 2; i < nb; i+=2) {
_mm_prefetch(&x[i] + sizeof(block_q4_0), _MM_HINT_T0);
_mm_prefetch(&y[i] + sizeof(block_q8_0), _MM_HINT_T0);
// Compute combined scale for the block 0 and 1
const __m128 d_0_1 = _mm_set1_ps( GGML_FP16_TO_FP32(x[i].d) * GGML_FP16_TO_FP32(y[i].d) );
const __m128i tmp_0_1 = _mm_loadu_si128((const __m128i *)x[i].qs);
__m128i bx_0 = _mm_and_si128(lowMask, tmp_0_1);
__m128i by_0 = _mm_loadu_si128((const __m128i *)y[i].qs);
bx_0 = _mm_sub_epi8(bx_0, off);
const __m128i i32_0 = mul_sum_i8_pairs(bx_0, by_0);
__m128i bx_1 = _mm_and_si128(lowMask, _mm_srli_epi64(tmp_0_1, 4));
__m128i by_1 = _mm_loadu_si128((const __m128i *)(y[i].qs + 16));
bx_1 = _mm_sub_epi8(bx_1, off);
const __m128i i32_1 = mul_sum_i8_pairs(bx_1, by_1);
_mm_prefetch(&x[i] + 2 * sizeof(block_q4_0), _MM_HINT_T0);
_mm_prefetch(&y[i] + 2 * sizeof(block_q8_0), _MM_HINT_T0);
// Compute combined scale for the block 2 and 3
const __m128 d_2_3 = _mm_set1_ps( GGML_FP16_TO_FP32(x[i + 1].d) * GGML_FP16_TO_FP32(y[i + 1].d) );
const __m128i tmp_2_3 = _mm_loadu_si128((const __m128i *)x[i + 1].qs);
__m128i bx_2 = _mm_and_si128(lowMask, tmp_2_3);
__m128i by_2 = _mm_loadu_si128((const __m128i *)y[i + 1].qs);
bx_2 = _mm_sub_epi8(bx_2, off);
const __m128i i32_2 = mul_sum_i8_pairs(bx_2, by_2);
__m128i bx_3 = _mm_and_si128(lowMask, _mm_srli_epi64(tmp_2_3, 4));
__m128i by_3 = _mm_loadu_si128((const __m128i *)(y[i + 1].qs + 16));
bx_3 = _mm_sub_epi8(bx_3, off);
const __m128i i32_3 = mul_sum_i8_pairs(bx_3, by_3);
// Convert int32_t to float
__m128 p0 = _mm_cvtepi32_ps(i32_0);
__m128 p1 = _mm_cvtepi32_ps(i32_1);
__m128 p2 = _mm_cvtepi32_ps(i32_2);
__m128 p3 = _mm_cvtepi32_ps(i32_3);
// Apply the scale
__m128 p0_d = _mm_mul_ps( d_0_1, p0 );
__m128 p1_d = _mm_mul_ps( d_0_1, p1 );
__m128 p2_d = _mm_mul_ps( d_2_3, p2 );
__m128 p3_d = _mm_mul_ps( d_2_3, p3 );
// Acummulate
acc_0 = _mm_add_ps(p0_d, acc_0);
acc_1 = _mm_add_ps(p1_d, acc_1);
acc_2 = _mm_add_ps(p2_d, acc_2);
acc_3 = _mm_add_ps(p3_d, acc_3);
}
*s = hsum_float_4x4(acc_0, acc_1, acc_2, acc_3);
#elif defined(__riscv_v_intrinsic)
float sumf = 0.0;
size_t vl = __riscv_vsetvl_e8m1(qk/2);
for (int i = 0; i < nb; i++) {
// load elements
vuint8mf2_t tx = __riscv_vle8_v_u8mf2(x[i].qs, vl);
vint8mf2_t y0 = __riscv_vle8_v_i8mf2(y[i].qs, vl);
vint8mf2_t y1 = __riscv_vle8_v_i8mf2(y[i].qs+16, vl);
// mask and store lower part of x, and then upper part
vuint8mf2_t x_a = __riscv_vand_vx_u8mf2(tx, 0x0F, vl);
vuint8mf2_t x_l = __riscv_vsrl_vx_u8mf2(tx, 0x04, vl);
vint8mf2_t x_ai = __riscv_vreinterpret_v_u8mf2_i8mf2(x_a);
vint8mf2_t x_li = __riscv_vreinterpret_v_u8mf2_i8mf2(x_l);
// subtract offset
vint8mf2_t v0 = __riscv_vsub_vx_i8mf2(x_ai, 8, vl);
vint8mf2_t v1 = __riscv_vsub_vx_i8mf2(x_li, 8, vl);
vint16m1_t vec_mul1 = __riscv_vwmul_vv_i16m1(v0, y0, vl);
vint16m1_t vec_mul2 = __riscv_vwmul_vv_i16m1(v1, y1, vl);
vint32m1_t vec_zero = __riscv_vmv_v_x_i32m1(0, vl);
vint32m1_t vs1 = __riscv_vwredsum_vs_i16m1_i32m1(vec_mul1, vec_zero, vl);
vint32m1_t vs2 = __riscv_vwredsum_vs_i16m1_i32m1(vec_mul2, vs1, vl);
int sumi = __riscv_vmv_x_s_i32m1_i32(vs2);
sumf += sumi*GGML_FP16_TO_FP32(x[i].d)*GGML_FP16_TO_FP32(y[i].d);
}
*s = sumf;
#else
// scalar
float sumf = 0.0;
for (int i = 0; i < nb; i++) {
int sumi = 0;
for (int j = 0; j < qk/2; ++j) {
const int v0 = (x[i].qs[j] & 0x0F) - 8;
const int v1 = (x[i].qs[j] >> 4) - 8;
sumi += (v0 * y[i].qs[j]) + (v1 * y[i].qs[j + qk/2]);
}
sumf += sumi*GGML_FP16_TO_FP32(x[i].d)*GGML_FP16_TO_FP32(y[i].d);
}
*s = sumf;
#endif
} | O3 | c | ggml_vec_dot_q4_0_q8_0:
vxorps %xmm0, %xmm0, %xmm0
cmpl $0x20, %edi
jl 0xb8242
addq $0x2, %rcx
shrl $0x4, %edi
andl $-0x2, %edi
leaq (%rdi,%rdi,8), %rax
xorl %edi, %edi
leaq 0xc40ba(%rip), %r8 # 0x17c280
vpbroadcastb 0xfe3d(%rip), %ymm1 # 0xc800c
vpbroadcastb 0xfe35(%rip), %ymm2 # 0xc800d
vpbroadcastw 0xfe2d(%rip), %ymm3 # 0xc800e
movzwl (%rdx,%rdi), %r9d
vmovss (%r8,%r9,4), %xmm4
movzwl -0x2(%rcx), %r9d
vmulss (%r8,%r9,4), %xmm4, %xmm4
vbroadcastss %xmm4, %ymm4
vmovdqu 0x2(%rdx,%rdi), %xmm5
vpsrlw $0x4, %xmm5, %xmm6
vinserti128 $0x1, %xmm6, %ymm5, %ymm5
vpand %ymm1, %ymm5, %ymm5
vpaddb %ymm2, %ymm5, %ymm5
vmovdqu (%rcx), %ymm6
vpsignb %ymm5, %ymm5, %ymm7
vpsignb %ymm5, %ymm6, %ymm5
vpmaddubsw %ymm5, %ymm7, %ymm5
vpmaddwd %ymm5, %ymm3, %ymm5
vcvtdq2ps %ymm5, %ymm5
vfmadd231ps %ymm5, %ymm4, %ymm0 # ymm0 = (ymm4 * ymm5) + ymm0
addq $0x22, %rcx
addq $0x12, %rdi
cmpq %rdi, %rax
jne 0xb81e1
vextractf128 $0x1, %ymm0, %xmm1
vaddps %xmm0, %xmm1, %xmm0
vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0]
vaddps %xmm1, %xmm0, %xmm0
vhaddps %xmm0, %xmm0, %xmm0
vmovss %xmm0, (%rsi)
vzeroupper
retq
| ggml_vec_dot_q4_0_q8_0:
vxorps xmm0, xmm0, xmm0
cmp edi, 20h ; ' '
jl loc_B8242
add rcx, 2
shr edi, 4
and edi, 0FFFFFFFEh
lea rax, [rdi+rdi*8]
xor edi, edi
lea r8, ggml_table_f32_f16
vpbroadcastb ymm1, cs:byte_C800C
vpbroadcastb ymm2, cs:byte_C800D
vpbroadcastw ymm3, cs:word_C800E
loc_B81E1:
movzx r9d, word ptr [rdx+rdi]
vmovss xmm4, dword ptr [r8+r9*4]
movzx r9d, word ptr [rcx-2]
vmulss xmm4, xmm4, dword ptr [r8+r9*4]
vbroadcastss ymm4, xmm4
vmovdqu xmm5, xmmword ptr [rdx+rdi+2]
vpsrlw xmm6, xmm5, 4
vinserti128 ymm5, ymm5, xmm6, 1
vpand ymm5, ymm5, ymm1
vpaddb ymm5, ymm5, ymm2
vmovdqu ymm6, ymmword ptr [rcx]
vpsignb ymm7, ymm5, ymm5
vpsignb ymm5, ymm6, ymm5
vpmaddubsw ymm5, ymm7, ymm5
vpmaddwd ymm5, ymm3, ymm5
vcvtdq2ps ymm5, ymm5
vfmadd231ps ymm0, ymm4, ymm5
add rcx, 22h ; '"'
add rdi, 12h
cmp rax, rdi
jnz short loc_B81E1
loc_B8242:
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rsi], xmm0
vzeroupper
retn
| void ggml_vec_dot_q4_0_q8_0(int a1, long long _RSI, long long _RDX, long long a4, __m128 _XMM0)
{
long long v9; // rax
__asm { vxorps xmm0, xmm0, xmm0 }
if ( a1 >= 32 )
{
_RCX = a4 + 2;
v9 = 9LL * (((unsigned int)a1 >> 4) & 0xFFFFFFFE);
_RDI = 0LL;
_R8 = &ggml_table_f32_f16;
__asm
{
vpbroadcastb ymm1, cs:byte_C800C
vpbroadcastb ymm2, cs:byte_C800D
vpbroadcastw ymm3, cs:word_C800E
}
do
{
_R9 = *(unsigned __int16 *)(_RDX + _RDI);
__asm
{
vmovss xmm4, dword ptr [r8+r9*4]
vmulss xmm4, xmm4, dword ptr [r8+r9*4]
vbroadcastss ymm4, xmm4
vmovdqu xmm5, xmmword ptr [rdx+rdi+2]
vpsrlw xmm6, xmm5, 4
vinserti128 ymm5, ymm5, xmm6, 1
vpand ymm5, ymm5, ymm1
vpaddb ymm5, ymm5, ymm2
vmovdqu ymm6, ymmword ptr [rcx]
vpsignb ymm7, ymm5, ymm5
vpsignb ymm5, ymm6, ymm5
vpmaddubsw ymm5, ymm7, ymm5
vpmaddwd ymm5, ymm3, ymm5
vcvtdq2ps ymm5, ymm5
vfmadd231ps ymm0, ymm4, ymm5
}
_RCX += 34LL;
_RDI += 18LL;
}
while ( v9 != _RDI );
}
__asm
{
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rsi], xmm0
vzeroupper
}
}
| |||
38,422 | reset_partitioned_key_cache_counters | eloqsql/mysys/mf_keycache.c | static int
reset_partitioned_key_cache_counters(const char *name __attribute__((unused)),
PARTITIONED_KEY_CACHE_CB *keycache)
{
uint i;
uint partitions= keycache->partitions;
DBUG_ENTER("partitioned_reset_key_cache_counters");
for (i = 0; i < partitions; i++)
{
reset_simple_key_cache_counters(name, keycache->partition_array[i]);
}
DBUG_RETURN(0);
} | O3 | c | reset_partitioned_key_cache_counters:
movl 0x1c(%rsi), %eax
testq %rax, %rax
je 0x9bbbc
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movq 0x8(%rsi), %rdx
movq (%rdx,%rcx,8), %rdx
cmpb $0x0, (%rdx)
je 0x9bbb3
movups %xmm0, 0x148(%rdx)
movups %xmm0, 0x138(%rdx)
movq $0x0, 0x158(%rdx)
incq %rcx
cmpq %rcx, %rax
jne 0x9bb8d
popq %rbp
xorl %eax, %eax
retq
| reset_partitioned_key_cache_counters:
mov eax, [rsi+1Ch]
test rax, rax
jz short loc_9BBBC
push rbp
mov rbp, rsp
xor ecx, ecx
xorps xmm0, xmm0
loc_9BB8D:
mov rdx, [rsi+8]
mov rdx, [rdx+rcx*8]
cmp byte ptr [rdx], 0
jz short loc_9BBB3
movups xmmword ptr [rdx+148h], xmm0
movups xmmword ptr [rdx+138h], xmm0
mov qword ptr [rdx+158h], 0
loc_9BBB3:
inc rcx
cmp rax, rcx
jnz short loc_9BB8D
pop rbp
loc_9BBBC:
xor eax, eax
retn
| long long reset_partitioned_key_cache_counters(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
long long v4; // rdx
v2 = *(unsigned int *)(a2 + 28);
if ( *(_DWORD *)(a2 + 28) )
{
v3 = 0LL;
do
{
v4 = *(_QWORD *)(*(_QWORD *)(a2 + 8) + 8 * v3);
if ( *(_BYTE *)v4 )
{
*(_OWORD *)(v4 + 328) = 0LL;
*(_OWORD *)(v4 + 312) = 0LL;
*(_QWORD *)(v4 + 344) = 0LL;
}
++v3;
}
while ( v2 != v3 );
}
return 0LL;
}
| reset_partitioned_key_cache_counters:
MOV EAX,dword ptr [RSI + 0x1c]
TEST RAX,RAX
JZ 0x0019bbbc
PUSH RBP
MOV RBP,RSP
XOR ECX,ECX
XORPS XMM0,XMM0
LAB_0019bb8d:
MOV RDX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RDX + RCX*0x8]
CMP byte ptr [RDX],0x0
JZ 0x0019bbb3
MOVUPS xmmword ptr [RDX + 0x148],XMM0
MOVUPS xmmword ptr [RDX + 0x138],XMM0
MOV qword ptr [RDX + 0x158],0x0
LAB_0019bbb3:
INC RCX
CMP RAX,RCX
JNZ 0x0019bb8d
POP RBP
LAB_0019bbbc:
XOR EAX,EAX
RET
|
int8 reset_partitioned_key_cache_counters(int8 param_1,long param_2)
{
uint uVar1;
char *pcVar2;
ulong uVar3;
uVar1 = *(uint *)(param_2 + 0x1c);
if ((ulong)uVar1 != 0) {
uVar3 = 0;
do {
pcVar2 = *(char **)(*(long *)(param_2 + 8) + uVar3 * 8);
if (*pcVar2 != '\0') {
pcVar2[0x148] = '\0';
pcVar2[0x149] = '\0';
pcVar2[0x14a] = '\0';
pcVar2[0x14b] = '\0';
pcVar2[0x14c] = '\0';
pcVar2[0x14d] = '\0';
pcVar2[0x14e] = '\0';
pcVar2[0x14f] = '\0';
pcVar2[0x150] = '\0';
pcVar2[0x151] = '\0';
pcVar2[0x152] = '\0';
pcVar2[0x153] = '\0';
pcVar2[0x154] = '\0';
pcVar2[0x155] = '\0';
pcVar2[0x156] = '\0';
pcVar2[0x157] = '\0';
pcVar2[0x138] = '\0';
pcVar2[0x139] = '\0';
pcVar2[0x13a] = '\0';
pcVar2[0x13b] = '\0';
pcVar2[0x13c] = '\0';
pcVar2[0x13d] = '\0';
pcVar2[0x13e] = '\0';
pcVar2[0x13f] = '\0';
pcVar2[0x140] = '\0';
pcVar2[0x141] = '\0';
pcVar2[0x142] = '\0';
pcVar2[0x143] = '\0';
pcVar2[0x144] = '\0';
pcVar2[0x145] = '\0';
pcVar2[0x146] = '\0';
pcVar2[0x147] = '\0';
pcVar2[0x158] = '\0';
pcVar2[0x159] = '\0';
pcVar2[0x15a] = '\0';
pcVar2[0x15b] = '\0';
pcVar2[0x15c] = '\0';
pcVar2[0x15d] = '\0';
pcVar2[0x15e] = '\0';
pcVar2[0x15f] = '\0';
}
uVar3 = uVar3 + 1;
} while (uVar1 != uVar3);
}
return 0;
}
| |
38,423 | my_caseup_8bit | eloqsql/strings/ctype-simple.c | size_t my_caseup_8bit(CHARSET_INFO * cs, const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)))
{
const char *end= src + srclen;
register const uchar *map= cs->to_upper;
DBUG_ASSERT(srclen <= dstlen);
for ( ; src != end ; src++)
*dst++= (char) map[(uchar) *src];
return srclen;
} | O3 | c | my_caseup_8bit:
movq %rdx, %rax
testq %rdx, %rdx
je 0xbaf43
pushq %rbp
movq %rsp, %rbp
movq 0x50(%rdi), %rdx
xorl %edi, %edi
movzbl (%rsi,%rdi), %r8d
movb (%rdx,%r8), %r8b
movb %r8b, (%rcx,%rdi)
incq %rdi
cmpq %rdi, %rax
jne 0xbaf2d
popq %rbp
retq
| my_caseup_8bit:
mov rax, rdx
test rdx, rdx
jz short locret_BAF43
push rbp
mov rbp, rsp
mov rdx, [rdi+50h]
xor edi, edi
loc_BAF2D:
movzx r8d, byte ptr [rsi+rdi]
mov r8b, [rdx+r8]
mov [rcx+rdi], r8b
inc rdi
cmp rax, rdi
jnz short loc_BAF2D
pop rbp
locret_BAF43:
retn
| long long my_caseup_8bit(long long a1, long long a2, long long a3, long long a4)
{
long long result; // rax
long long v5; // rdx
long long v6; // rdi
result = a3;
if ( a3 )
{
v5 = *(_QWORD *)(a1 + 80);
v6 = 0LL;
do
{
*(_BYTE *)(a4 + v6) = *(_BYTE *)(v5 + *(unsigned __int8 *)(a2 + v6));
++v6;
}
while ( result != v6 );
}
return result;
}
| my_caseup_8bit:
MOV RAX,RDX
TEST RDX,RDX
JZ 0x001baf43
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI + 0x50]
XOR EDI,EDI
LAB_001baf2d:
MOVZX R8D,byte ptr [RSI + RDI*0x1]
MOV R8B,byte ptr [RDX + R8*0x1]
MOV byte ptr [RCX + RDI*0x1],R8B
INC RDI
CMP RAX,RDI
JNZ 0x001baf2d
POP RBP
LAB_001baf43:
RET
|
void my_caseup_8bit(long param_1,long param_2,long param_3,long param_4)
{
long lVar1;
long lVar2;
if (param_3 != 0) {
lVar1 = *(long *)(param_1 + 0x50);
lVar2 = 0;
do {
*(int1 *)(param_4 + lVar2) = *(int1 *)(lVar1 + (ulong)*(byte *)(param_2 + lVar2));
lVar2 = lVar2 + 1;
} while (param_3 != lVar2);
}
return;
}
| |
38,424 | yy::parser::yysyntax_error_[abi:cxx11](yy::parser::context const&) const | msxemulator/build_O0/_deps/pico_sdk-src/tools/pioasm/gen/parser.cpp | std::string
parser::yysyntax_error_ (const context& yyctx) const
{
// Its maximum.
enum { YYARGS_MAX = 5 };
// Arguments of yyformat.
symbol_kind_type yyarg[YYARGS_MAX];
int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
char const* yyformat = YY_NULLPTR;
switch (yycount)
{
#define YYCASE_(N, S) \
case N: \
yyformat = S; \
break
default: // Avoid compiler warnings.
YYCASE_ (0, YY_("syntax error"));
YYCASE_ (1, YY_("syntax error, unexpected %s"));
YYCASE_ (2, YY_("syntax error, unexpected %s, expecting %s"));
YYCASE_ (3, YY_("syntax error, unexpected %s, expecting %s or %s"));
YYCASE_ (4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
YYCASE_ (5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
#undef YYCASE_
}
std::string yyres;
// Argument number.
std::ptrdiff_t yyi = 0;
for (char const* yyp = yyformat; *yyp; ++yyp)
if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount)
{
yyres += symbol_name (yyarg[yyi++]);
++yyp;
}
else
yyres += *yyp;
return yyres;
} | O0 | cpp | yy::parser::yysyntax_error_[abi:cxx11](yy::parser::context const&) const:
subq $0xa8, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
leaq 0x70(%rsp), %rdx
movl $0x5, %ecx
callq 0x3c6d0
movl %eax, 0x6c(%rsp)
movq $0x0, 0x60(%rsp)
movl 0x6c(%rsp), %eax
movq %rax, 0x10(%rsp)
subq $0x5, %rax
ja 0x3c7fb
movq 0x10(%rsp), %rax
leaq 0x19e72(%rip), %rcx # 0x56664
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x3c7fd
leaq 0x1aef6(%rip), %rax # 0x576fa
movq %rax, 0x60(%rsp)
jmp 0x3c84f
leaq 0x1aef5(%rip), %rax # 0x57707
movq %rax, 0x60(%rsp)
jmp 0x3c84f
leaq 0x1af03(%rip), %rax # 0x57723
movq %rax, 0x60(%rsp)
jmp 0x3c84f
leaq 0x1af1f(%rip), %rax # 0x5774d
movq %rax, 0x60(%rsp)
jmp 0x3c84f
leaq 0x1af41(%rip), %rax # 0x5777d
movq %rax, 0x60(%rsp)
jmp 0x3c84f
leaq 0x1af69(%rip), %rax # 0x577b3
movq %rax, 0x60(%rsp)
movq (%rsp), %rdi
movb $0x0, 0x5f(%rsp)
callq 0x74d0
movq $0x0, 0x50(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
cmpb $0x0, (%rax)
je 0x3c94e
movq 0x48(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x25, %eax
jne 0x3c924
movq 0x48(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x73, %eax
jne 0x3c924
movq 0x50(%rsp), %rax
movslq 0x6c(%rsp), %rcx
cmpq %rcx, %rax
jge 0x3c924
movq 0x50(%rsp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, 0x50(%rsp)
movl 0x70(%rsp,%rax,4), %esi
leaq 0x28(%rsp), %rdi
callq 0x3c2f0
jmp 0x3c8d0
movq (%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x7450
jmp 0x3c8e0
leaq 0x28(%rsp), %rdi
callq 0x76d8
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
jmp 0x3c939
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0x3c970
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x76d8
jmp 0x3c970
movq (%rsp), %rdi
movq 0x48(%rsp), %rax
movsbl (%rax), %esi
callq 0x7230
jmp 0x3c937
jmp 0x3c939
jmp 0x3c93b
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
jmp 0x3c870
movb $0x1, 0x5f(%rsp)
testb $0x1, 0x5f(%rsp)
jne 0x3c963
movq (%rsp), %rdi
callq 0x76d8
movq 0x8(%rsp), %rax
addq $0xa8, %rsp
retq
movq (%rsp), %rdi
callq 0x76d8
movq 0x20(%rsp), %rdi
callq 0x75f0
nopw %cs:(%rax,%rax)
| _ZNK2yy6parser15yysyntax_error_B5cxx11ERKNS0_7contextE:
sub rsp, 0A8h
mov [rsp+0A8h+var_A8], rdi
mov rax, rdi
mov [rsp+0A8h+var_A0], rax
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov [rsp+0A8h+var_18], rdx
mov rdi, [rsp+0A8h+var_10]
mov rsi, [rsp+0A8h+var_18]
lea rdx, [rsp+0A8h+var_38]
mov ecx, 5
call _ZNK2yy6parser26yy_syntax_error_arguments_ERKNS0_7contextEPNS0_11symbol_kind16symbol_kind_typeEi; yy::parser::yy_syntax_error_arguments_(yy::parser::context const&,yy::parser::symbol_kind::symbol_kind_type *,int)
mov [rsp+0A8h+var_3C], eax
mov [rsp+0A8h+var_48], 0
mov eax, [rsp+0A8h+var_3C]
mov [rsp+0A8h+var_98], rax
sub rax, 5; switch 6 cases
ja short def_3C7F9; jumptable 000000000003C7F9 default case
mov rax, [rsp+0A8h+var_98]
lea rcx, jpt_3C7F9
movsxd rax, ds:(jpt_3C7F9 - 56664h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
def_3C7F9:
jmp short $+2; jumptable 000000000003C7F9 default case
loc_3C7FD:
lea rax, aSyntaxError; jumptable 000000000003C7F9 case 0
mov [rsp+0A8h+var_48], rax
jmp short loc_3C84F
loc_3C80B:
lea rax, aSyntaxErrorUne; jumptable 000000000003C7F9 case 1
mov [rsp+0A8h+var_48], rax
jmp short loc_3C84F
loc_3C819:
lea rax, aSyntaxErrorUne_0; jumptable 000000000003C7F9 case 2
mov [rsp+0A8h+var_48], rax
jmp short loc_3C84F
loc_3C827:
lea rax, aSyntaxErrorUne_1; jumptable 000000000003C7F9 case 3
mov [rsp+0A8h+var_48], rax
jmp short loc_3C84F
loc_3C835:
lea rax, aSyntaxErrorUne_2; jumptable 000000000003C7F9 case 4
mov [rsp+0A8h+var_48], rax
jmp short loc_3C84F
loc_3C843:
lea rax, aSyntaxErrorUne_3; jumptable 000000000003C7F9 case 5
mov [rsp+0A8h+var_48], rax
loc_3C84F:
mov rdi, [rsp+0A8h+var_A8]
mov [rsp+0A8h+var_49], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov [rsp+0A8h+var_58], 0
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_60], rax
loc_3C870:
mov rax, [rsp+0A8h+var_60]
cmp byte ptr [rax], 0
jz loc_3C94E
mov rax, [rsp+0A8h+var_60]
movsx eax, byte ptr [rax]
cmp eax, 25h ; '%'
jnz loc_3C924
mov rax, [rsp+0A8h+var_60]
movsx eax, byte ptr [rax+1]
cmp eax, 73h ; 's'
jnz loc_3C924
mov rax, [rsp+0A8h+var_58]
movsxd rcx, [rsp+0A8h+var_3C]
cmp rax, rcx
jge short loc_3C924
mov rax, [rsp+0A8h+var_58]
mov rcx, rax
inc rcx
mov [rsp+0A8h+var_58], rcx
mov esi, [rsp+rax*4+0A8h+var_38]
lea rdi, [rsp+0A8h+var_80]; int
call _ZN2yy6parser11symbol_nameB5cxx11ENS0_11symbol_kind16symbol_kind_typeE; yy::parser::symbol_name(yy::parser::symbol_kind::symbol_kind_type)
jmp short $+2
loc_3C8D0:
mov rdi, [rsp+0A8h+var_A8]
lea rsi, [rsp+0A8h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_3C8E0:
lea rdi, [rsp+0A8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rsp+0A8h+var_60]
add rax, 1
mov [rsp+0A8h+var_60], rax
jmp short loc_3C939
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
jmp short loc_3C970
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_3C970
loc_3C924:
mov rdi, [rsp+0A8h+var_A8]
mov rax, [rsp+0A8h+var_60]
movsx esi, byte ptr [rax]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_3C937:
jmp short $+2
loc_3C939:
jmp short $+2
loc_3C93B:
mov rax, [rsp+0A8h+var_60]
add rax, 1
mov [rsp+0A8h+var_60], rax
jmp loc_3C870
loc_3C94E:
mov [rsp+0A8h+var_49], 1
test [rsp+0A8h+var_49], 1
jnz short loc_3C963
mov rdi, [rsp+0A8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3C963:
mov rax, [rsp+0A8h+var_A0]
add rsp, 0A8h
retn
loc_3C970:
mov rdi, [rsp+0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+arg_18]
call __Unwind_Resume
| long long yy::parser::yysyntax_error_[abi:cxx11](long long a1, long long a2, yy::parser::context *a3)
{
long long v3; // rax
int v5[8]; // [rsp+28h] [rbp-80h] BYREF
const char *i; // [rsp+48h] [rbp-60h]
long long v7; // [rsp+50h] [rbp-58h]
char v8; // [rsp+5Fh] [rbp-49h]
const char *v9; // [rsp+60h] [rbp-48h]
int v10; // [rsp+6Ch] [rbp-3Ch]
_DWORD v11[8]; // [rsp+70h] [rbp-38h] BYREF
yy::parser::context *v12; // [rsp+90h] [rbp-18h]
long long v13; // [rsp+98h] [rbp-10h]
long long v14; // [rsp+A0h] [rbp-8h]
v14 = a1;
v13 = a2;
v12 = a3;
v10 = yy::parser::yy_syntax_error_arguments_(a2, a3, v11, 5);
v9 = 0LL;
switch ( v10 )
{
case 1:
v9 = "syntax error, unexpected %s";
break;
case 2:
v9 = "syntax error, unexpected %s, expecting %s";
break;
case 3:
v9 = "syntax error, unexpected %s, expecting %s or %s";
break;
case 4:
v9 = "syntax error, unexpected %s, expecting %s or %s or %s";
break;
case 5:
v9 = "syntax error, unexpected %s, expecting %s or %s or %s or %s";
break;
default:
v9 = "syntax error";
break;
}
v8 = 0;
std::string::basic_string(a1);
v7 = 0LL;
for ( i = v9; *i; ++i )
{
if ( *i == 37 && i[1] == 115 && v7 < v10 )
{
v3 = v7++;
yy::parser::symbol_name[abi:cxx11](v5, v11[v3]);
std::string::operator+=(a1, v5);
std::string::~string(v5);
++i;
}
else
{
std::string::operator+=(a1, (unsigned int)*i);
}
}
return a1;
}
| yysyntax_error_[abi:cxx11]:
SUB RSP,0xa8
MOV qword ptr [RSP],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV RDI,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RSP + 0x90]
LEA RDX,[RSP + 0x70]
MOV ECX,0x5
CALL 0x0013c6d0
MOV dword ptr [RSP + 0x6c],EAX
MOV qword ptr [RSP + 0x60],0x0
MOV EAX,dword ptr [RSP + 0x6c]
MOV qword ptr [RSP + 0x10],RAX
SUB RAX,0x5
JA 0x0013c7fb
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[0x156664]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
LAB_0013c7fb:
JMP 0x0013c7fd
caseD_0:
LEA RAX,[0x1576fa]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x0013c84f
caseD_1:
LEA RAX,[0x157707]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x0013c84f
caseD_2:
LEA RAX,[0x157723]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x0013c84f
caseD_3:
LEA RAX,[0x15774d]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x0013c84f
caseD_4:
LEA RAX,[0x15777d]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x0013c84f
caseD_5:
LEA RAX,[0x1577b3]
MOV qword ptr [RSP + 0x60],RAX
LAB_0013c84f:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x5f],0x0
CALL 0x001074d0
MOV qword ptr [RSP + 0x50],0x0
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x48],RAX
LAB_0013c870:
MOV RAX,qword ptr [RSP + 0x48]
CMP byte ptr [RAX],0x0
JZ 0x0013c94e
MOV RAX,qword ptr [RSP + 0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x25
JNZ 0x0013c924
MOV RAX,qword ptr [RSP + 0x48]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x73
JNZ 0x0013c924
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RCX,dword ptr [RSP + 0x6c]
CMP RAX,RCX
JGE 0x0013c924
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,RAX
INC RCX
MOV qword ptr [RSP + 0x50],RCX
MOV ESI,dword ptr [RSP + RAX*0x4 + 0x70]
LAB_0013c8c4:
LEA RDI,[RSP + 0x28]
CALL 0x0013c2f0
JMP 0x0013c8d0
LAB_0013c8d0:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x28]
CALL 0x00107450
JMP 0x0013c8e0
LAB_0013c8e0:
LEA RDI,[RSP + 0x28]
CALL 0x001076d8
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,0x1
MOV qword ptr [RSP + 0x48],RAX
JMP 0x0013c939
LAB_0013c924:
MOV RDI,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x48]
MOVSX ESI,byte ptr [RAX]
LAB_0013c930:
CALL 0x00107230
LAB_0013c935:
JMP 0x0013c937
LAB_0013c937:
JMP 0x0013c939
LAB_0013c939:
JMP 0x0013c93b
LAB_0013c93b:
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,0x1
MOV qword ptr [RSP + 0x48],RAX
JMP 0x0013c870
LAB_0013c94e:
MOV byte ptr [RSP + 0x5f],0x1
TEST byte ptr [RSP + 0x5f],0x1
JNZ 0x0013c963
MOV RDI,qword ptr [RSP]
CALL 0x001076d8
LAB_0013c963:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0xa8
RET
|
/* WARNING: Removing unreachable block (ram,0x0013c95a) */
/* yy::parser::yysyntax_error_[abi:cxx11](yy::parser::context const&) const */
context * yy::parser::yysyntax_error__abi_cxx11_(context *param_1)
{
int4 *puVar1;
context *in_RDX;
parser *in_RSI;
parser local_80 [32];
char *local_60;
long local_58;
int1 local_49;
char *local_48;
int local_3c;
int4 local_38 [12];
context *local_8;
local_8 = param_1;
local_3c = yy_syntax_error_arguments_(in_RSI,in_RDX,(symbol_kind_type *)local_38,5);
switch(local_3c) {
default:
local_48 = "syntax error";
break;
case 1:
local_48 = "syntax error, unexpected %s";
break;
case 2:
local_48 = "syntax error, unexpected %s, expecting %s";
break;
case 3:
local_48 = "syntax error, unexpected %s, expecting %s or %s";
break;
case 4:
local_48 = "syntax error, unexpected %s, expecting %s or %s or %s";
break;
case 5:
local_48 = "syntax error, unexpected %s, expecting %s or %s or %s or %s";
}
local_49 = 0;
std::__cxx11::string::string((string *)param_1);
local_58 = 0;
for (local_60 = local_48; *local_60 != '\0'; local_60 = local_60 + 1) {
if (((*local_60 == '%') && (local_60[1] == 's')) && (local_58 < local_3c)) {
puVar1 = local_38 + local_58;
/* try { // try from 0013c8c4 to 0013c8cd has its CatchHandler @ 0013c8fa */
local_58 = local_58 + 1;
symbol_name_abi_cxx11_(local_80,*puVar1);
/* try { // try from 0013c8d0 to 0013c8dd has its CatchHandler @ 0013c90a */
std::__cxx11::string::operator+=((string *)param_1,(string *)local_80);
std::__cxx11::string::~string((string *)local_80);
local_60 = local_60 + 1;
}
else {
/* try { // try from 0013c930 to 0013c934 has its CatchHandler @ 0013c8fa */
std::__cxx11::string::operator+=((string *)param_1,*local_60);
}
}
return param_1;
}
| |
38,425 | get_collation_number | eloqsql/mysys/charset.c | uint get_collation_number(const char *name, myf flags)
{
uint id;
char alias[64];
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_collation_number_internal(name)))
return id;
if ((name= get_collation_name_alias(name, alias, sizeof(alias),flags)))
return get_collation_number_internal(name);
return 0;
} | O0 | c | get_collation_number:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
leaq 0xba6d00(%rip), %rdi # 0xc839d4
leaq 0x85(%rip), %rsi # 0xdcd60
callq 0x2a240
movq -0x60(%rbp), %rdi
callq 0xdcef0
movl %eax, -0x6c(%rbp)
cmpl $0x0, %eax
je 0xdccf9
movl -0x6c(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0xdcd2e
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rcx
movl $0x40, %edx
callq 0xdcf90
movq %rax, -0x60(%rbp)
cmpq $0x0, %rax
je 0xdcd27
movq -0x60(%rbp), %rdi
callq 0xdcef0
movl %eax, -0x54(%rbp)
jmp 0xdcd2e
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x70(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xdcd4f
movl -0x70(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| get_collation_number:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_60], rdi
mov [rbp+var_68], rsi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, [rbp+var_60]
call get_collation_number_internal
mov [rbp+var_6C], eax
cmp eax, 0
jz short loc_DCCF9
mov eax, [rbp+var_6C]
mov [rbp+var_54], eax
jmp short loc_DCD2E
loc_DCCF9:
mov rdi, [rbp+var_60]
lea rsi, [rbp+var_50]
mov rcx, [rbp+var_68]
mov edx, 40h ; '@'
call get_collation_name_alias
mov [rbp+var_60], rax
cmp rax, 0
jz short loc_DCD27
mov rdi, [rbp+var_60]
call get_collation_number_internal
mov [rbp+var_54], eax
jmp short loc_DCD2E
loc_DCD27:
mov [rbp+var_54], 0
loc_DCD2E:
mov eax, [rbp+var_54]
mov [rbp+var_70], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_DCD4F
mov eax, [rbp+var_70]
add rsp, 70h
pop rbp
retn
loc_DCD4F:
call ___stack_chk_fail
| long long get_collation_number(long long a1, long long a2)
{
unsigned int collation_number_internal; // [rsp+4h] [rbp-6Ch]
long long collation_name_alias; // [rsp+10h] [rbp-60h]
_BYTE v6[72]; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v7; // [rsp+68h] [rbp-8h]
v7 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
collation_number_internal = get_collation_number_internal(a1);
if ( collation_number_internal )
{
return collation_number_internal;
}
else
{
collation_name_alias = get_collation_name_alias(a1, v6, 64LL, a2);
if ( collation_name_alias )
return (unsigned int)get_collation_number_internal(collation_name_alias);
else
return 0;
}
}
| get_collation_number:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x68],RSI
LEA RDI,[0xd839d4]
LEA RSI,[0x1dcd60]
CALL 0x0012a240
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x001dcef0
MOV dword ptr [RBP + -0x6c],EAX
CMP EAX,0x0
JZ 0x001dccf9
MOV EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001dcd2e
LAB_001dccf9:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x68]
MOV EDX,0x40
CALL 0x001dcf90
MOV qword ptr [RBP + -0x60],RAX
CMP RAX,0x0
JZ 0x001dcd27
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x001dcef0
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001dcd2e
LAB_001dcd27:
MOV dword ptr [RBP + -0x54],0x0
LAB_001dcd2e:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x70],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001dcd4f
MOV EAX,dword ptr [RBP + -0x70]
ADD RSP,0x70
POP RBP
RET
LAB_001dcd4f:
CALL 0x0012a270
|
int get_collation_number(int8 param_1,int8 param_2)
{
long lVar1;
long in_FS_OFFSET;
int local_5c;
int1 local_58 [72];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
local_5c = get_collation_number_internal(param_1);
if (local_5c == 0) {
lVar1 = get_collation_name_alias(param_1,local_58,0x40,param_2);
if (lVar1 == 0) {
local_5c = 0;
}
else {
local_5c = get_collation_number_internal(lVar1);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_5c;
}
| |
38,426 | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/common.cpp | void string_process_escapes(std::string & input) {
std::size_t input_len = input.length();
std::size_t output_idx = 0;
for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) {
if (input[input_idx] == '\\' && input_idx + 1 < input_len) {
switch (input[++input_idx]) {
case 'n': input[output_idx++] = '\n'; break;
case 'r': input[output_idx++] = '\r'; break;
case 't': input[output_idx++] = '\t'; break;
case '\'': input[output_idx++] = '\''; break;
case '\"': input[output_idx++] = '\"'; break;
case '\\': input[output_idx++] = '\\'; break;
case 'x':
// Handle \x12, etc
if (input_idx + 2 < input_len) {
const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 };
char *err_p = nullptr;
const long val = std::strtol(x, &err_p, 16);
if (err_p == x + 2) {
input_idx += 2;
input[output_idx++] = char(val);
break;
}
}
// fall through
default: input[output_idx++] = '\\';
input[output_idx++] = input[input_idx]; break;
}
} else {
input[output_idx++] = input[input_idx];
}
}
input.resize(output_idx);
} | O1 | cpp | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r13
testq %r13, %r13
je 0x53b84
leaq 0xf(%rsp), %rbp
xorl %r14d, %r14d
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
movq (%rbx), %rcx
movb (%rcx,%rax), %dl
cmpb $0x5c, %dl
jne 0x53aad
leaq 0x1(%rax), %r15
cmpq %r13, %r15
jae 0x53aad
movzbl (%rcx,%r15), %edx
cmpl $0x6d, %edx
jle 0x53ab9
cmpl $0x73, %edx
jg 0x53ad3
cmpl $0x6e, %edx
je 0x53b24
cmpl $0x72, %edx
jne 0x53b5b
movb $0xd, (%rcx,%r14)
jmp 0x53b37
movb %dl, (%rcx,%r14)
incq %r14
jmp 0x53b76
cmpl $0x22, %edx
je 0x53b1d
cmpl $0x27, %edx
je 0x53b32
cmpl $0x5c, %edx
jne 0x53b5b
movb $0x5c, (%rcx,%r14)
jmp 0x53b37
cmpl $0x74, %edx
je 0x53b2b
cmpl $0x78, %edx
jne 0x53b5b
leaq 0x3(%rax), %r12
cmpq %r13, %r12
jae 0x53b5b
movb 0x2(%rcx,%rax), %dl
movb %dl, 0xd(%rsp)
movb 0x3(%rcx,%rax), %al
movb %al, 0xe(%rsp)
movb $0x0, 0xf(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x10, %edx
callq 0x19980
movq 0x10(%rsp), %rcx
cmpq %rbp, %rcx
je 0x53b3c
movq %r15, %r12
jmp 0x53b49
movb $0x22, (%rcx,%r14)
jmp 0x53b37
movb $0xa, (%rcx,%r14)
jmp 0x53b37
movb $0x9, (%rcx,%r14)
jmp 0x53b37
movb $0x27, (%rcx,%r14)
incq %r14
jmp 0x53b73
movq (%rbx), %rdx
movb %al, (%rdx,%r14)
incq %r14
movq %r12, %r15
movq %r12, %rax
cmpq %rbp, %rcx
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
je 0x53b76
movq (%rbx), %rax
movb $0x5c, (%rax,%r14)
movq (%rbx), %rax
movb (%rax,%r15), %cl
movb %cl, 0x1(%rax,%r14)
addq $0x2, %r14
movq %r15, %rax
incq %rax
cmpq %r13, %rax
jb 0x53a6e
jmp 0x53b87
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x191e0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r13, [rdi+8]
test r13, r13
jz loc_53B84
lea rbp, [rsp+48h+var_39]
xor r14d, r14d
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
xor eax, eax
loc_53A6E:
mov rcx, [rbx]
mov dl, [rcx+rax]
cmp dl, 5Ch ; '\'
jnz short loc_53AAD
lea r15, [rax+1]
cmp r15, r13
jnb short loc_53AAD
movzx edx, byte ptr [rcx+r15]
cmp edx, 6Dh ; 'm'
jle short loc_53AB9
cmp edx, 73h ; 's'
jg short loc_53AD3
cmp edx, 6Eh ; 'n'
jz loc_53B24
cmp edx, 72h ; 'r'
jnz loc_53B5B
mov byte ptr [rcx+r14], 0Dh
jmp loc_53B37
loc_53AAD:
mov [rcx+r14], dl
inc r14
jmp loc_53B76
loc_53AB9:
cmp edx, 22h ; '"'
jz short loc_53B1D
cmp edx, 27h ; '''
jz short loc_53B32
cmp edx, 5Ch ; '\'
jnz loc_53B5B
mov byte ptr [rcx+r14], 5Ch ; '\'
jmp short loc_53B37
loc_53AD3:
cmp edx, 74h ; 't'
jz short loc_53B2B
cmp edx, 78h ; 'x'
jnz short loc_53B5B
lea r12, [rax+3]
cmp r12, r13
jnb short loc_53B5B
mov dl, [rcx+rax+2]
mov [rsp+48h+var_3B], dl
mov al, [rcx+rax+3]
mov [rsp+48h+var_3A], al
mov [rsp+48h+var_39], 0
mov [rsp+48h+var_38], 0
mov edx, 10h
call _strtol
mov rcx, [rsp+48h+var_38]
cmp rcx, rbp
jz short loc_53B3C
mov r12, r15
jmp short loc_53B49
loc_53B1D:
mov byte ptr [rcx+r14], 22h ; '"'
jmp short loc_53B37
loc_53B24:
mov byte ptr [rcx+r14], 0Ah
jmp short loc_53B37
loc_53B2B:
mov byte ptr [rcx+r14], 9
jmp short loc_53B37
loc_53B32:
mov byte ptr [rcx+r14], 27h ; '''
loc_53B37:
inc r14
jmp short loc_53B73
loc_53B3C:
mov rdx, [rbx]
mov [rdx+r14], al
inc r14
mov r15, r12
loc_53B49:
mov rax, r12
cmp rcx, rbp
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
jz short loc_53B76
loc_53B5B:
mov rax, [rbx]
mov byte ptr [rax+r14], 5Ch ; '\'
mov rax, [rbx]
mov cl, [rax+r15]
mov [rax+r14+1], cl
add r14, 2
loc_53B73:
mov rax, r15
loc_53B76:
inc rax
cmp rax, r13
jb loc_53A6E
jmp short loc_53B87
loc_53B84:
xor r14d, r14d
loc_53B87:
mov rdi, rbx
mov rsi, r14
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long string_process_escapes(long long *a1)
{
unsigned long long v1; // r13
long long v2; // r14
long long v3; // rax
long long v4; // rcx
char v5; // dl
long long v6; // r15
unsigned int v7; // edx
long long v8; // r12
char v9; // al
char *v10; // rcx
_BYTE v12[2]; // [rsp+Dh] [rbp-3Bh] BYREF
char v13; // [rsp+Fh] [rbp-39h] BYREF
char *v14; // [rsp+10h] [rbp-38h] BYREF
v1 = a1[1];
if ( v1 )
{
v2 = 0LL;
v3 = 0LL;
while ( 1 )
{
v4 = *a1;
v5 = *(_BYTE *)(*a1 + v3);
if ( v5 == 92 )
{
v6 = v3 + 1;
if ( v3 + 1 < v1 )
break;
}
*(_BYTE *)(v4 + v2++) = v5;
LABEL_29:
if ( ++v3 >= v1 )
return std::string::resize(a1, v2, 0LL);
}
v7 = *(unsigned __int8 *)(v4 + v6);
if ( v7 <= 0x6D )
{
switch ( v7 )
{
case '"':
*(_BYTE *)(v4 + v2) = 34;
goto LABEL_24;
case '\'':
*(_BYTE *)(v4 + v2) = 39;
goto LABEL_24;
case '\\':
*(_BYTE *)(v4 + v2) = 92;
goto LABEL_24;
}
}
else if ( *(unsigned __int8 *)(v4 + v6) > 0x73u )
{
if ( v7 == 116 )
{
*(_BYTE *)(v4 + v2) = 9;
goto LABEL_24;
}
if ( v7 == 120 )
{
v8 = v3 + 3;
if ( v3 + 3 < v1 )
{
v12[0] = *(_BYTE *)(v4 + v3 + 2);
v12[1] = *(_BYTE *)(v4 + v3 + 3);
v13 = 0;
v14 = 0LL;
v9 = strtol(v12, &v14, 16LL);
v10 = v14;
if ( v14 == &v13 )
{
*(_BYTE *)(*a1 + v2++) = v9;
v6 = v8;
}
else
{
v8 = v6;
}
v3 = v8;
if ( v10 == &v13 )
goto LABEL_29;
}
}
}
else
{
if ( v7 == 110 )
{
*(_BYTE *)(v4 + v2) = 10;
goto LABEL_24;
}
if ( v7 == 114 )
{
*(_BYTE *)(v4 + v2) = 13;
LABEL_24:
++v2;
LABEL_28:
v3 = v6;
goto LABEL_29;
}
}
*(_BYTE *)(*a1 + v2) = 92;
*(_BYTE *)(*a1 + v2 + 1) = *(_BYTE *)(*a1 + v6);
v2 += 2LL;
goto LABEL_28;
}
v2 = 0LL;
return std::string::resize(a1, v2, 0LL);
}
| string_process_escapes:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x8]
TEST R13,R13
JZ 0x00153b84
LEA RBP,[RSP + 0xf]
XOR R14D,R14D
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
XOR EAX,EAX
LAB_00153a6e:
MOV RCX,qword ptr [RBX]
MOV DL,byte ptr [RCX + RAX*0x1]
CMP DL,0x5c
JNZ 0x00153aad
LEA R15,[RAX + 0x1]
CMP R15,R13
JNC 0x00153aad
MOVZX EDX,byte ptr [RCX + R15*0x1]
CMP EDX,0x6d
JLE 0x00153ab9
CMP EDX,0x73
JG 0x00153ad3
CMP EDX,0x6e
JZ 0x00153b24
CMP EDX,0x72
JNZ 0x00153b5b
MOV byte ptr [RCX + R14*0x1],0xd
JMP 0x00153b37
LAB_00153aad:
MOV byte ptr [RCX + R14*0x1],DL
INC R14
JMP 0x00153b76
LAB_00153ab9:
CMP EDX,0x22
JZ 0x00153b1d
CMP EDX,0x27
JZ 0x00153b32
CMP EDX,0x5c
JNZ 0x00153b5b
MOV byte ptr [RCX + R14*0x1],0x5c
JMP 0x00153b37
LAB_00153ad3:
CMP EDX,0x74
JZ 0x00153b2b
CMP EDX,0x78
JNZ 0x00153b5b
LEA R12,[RAX + 0x3]
CMP R12,R13
JNC 0x00153b5b
MOV DL,byte ptr [RCX + RAX*0x1 + 0x2]
MOV byte ptr [RSP + 0xd],DL
MOV AL,byte ptr [RCX + RAX*0x1 + 0x3]
MOV byte ptr [RSP + 0xe],AL
MOV byte ptr [RSP + 0xf],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV EDX,0x10
CALL 0x00119980
MOV RCX,qword ptr [RSP + 0x10]
CMP RCX,RBP
JZ 0x00153b3c
MOV R12,R15
JMP 0x00153b49
LAB_00153b1d:
MOV byte ptr [RCX + R14*0x1],0x22
JMP 0x00153b37
LAB_00153b24:
MOV byte ptr [RCX + R14*0x1],0xa
JMP 0x00153b37
LAB_00153b2b:
MOV byte ptr [RCX + R14*0x1],0x9
JMP 0x00153b37
LAB_00153b32:
MOV byte ptr [RCX + R14*0x1],0x27
LAB_00153b37:
INC R14
JMP 0x00153b73
LAB_00153b3c:
MOV RDX,qword ptr [RBX]
MOV byte ptr [RDX + R14*0x1],AL
INC R14
MOV R15,R12
LAB_00153b49:
MOV RAX,R12
CMP RCX,RBP
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
JZ 0x00153b76
LAB_00153b5b:
MOV RAX,qword ptr [RBX]
MOV byte ptr [RAX + R14*0x1],0x5c
MOV RAX,qword ptr [RBX]
MOV CL,byte ptr [RAX + R15*0x1]
MOV byte ptr [RAX + R14*0x1 + 0x1],CL
ADD R14,0x2
LAB_00153b73:
MOV RAX,R15
LAB_00153b76:
INC RAX
CMP RAX,R13
JC 0x00153a6e
JMP 0x00153b87
LAB_00153b84:
XOR R14D,R14D
LAB_00153b87:
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x001191e0
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_process_escapes(std::__cxx11::string&) */
void string_process_escapes(string *param_1)
{
byte bVar1;
ulong uVar2;
long lVar3;
ulong uVar4;
long lVar6;
char local_3b;
int1 local_3a;
char local_39;
char *local_38;
ulong uVar5;
uVar2 = *(ulong *)(param_1 + 8);
if (uVar2 == 0) {
lVar6 = 0;
}
else {
lVar6 = 0;
uVar4 = 0;
do {
lVar3 = *(long *)param_1;
if ((*(char *)(lVar3 + uVar4) == '\\') && (uVar5 = uVar4 + 1, uVar5 < uVar2)) {
bVar1 = *(byte *)(lVar3 + uVar5);
if (bVar1 < 0x6e) {
if (bVar1 == 0x22) {
*(int1 *)(lVar3 + lVar6) = 0x22;
}
else if (bVar1 == 0x27) {
*(int1 *)(lVar3 + lVar6) = 0x27;
}
else {
if (bVar1 != 0x5c) goto LAB_00153b5b;
*(int1 *)(lVar3 + lVar6) = 0x5c;
}
}
else if (bVar1 < 0x74) {
if (bVar1 == 0x6e) {
*(int1 *)(lVar3 + lVar6) = 10;
}
else {
if (bVar1 != 0x72) goto LAB_00153b5b;
*(int1 *)(lVar3 + lVar6) = 0xd;
}
}
else {
if (bVar1 != 0x74) {
if ((bVar1 == 0x78) && (uVar4 + 3 < uVar2)) {
local_3b = *(char *)(lVar3 + 2 + uVar4);
local_3a = *(int1 *)(lVar3 + 3 + uVar4);
local_39 = '\0';
local_38 = (char *)0x0;
lVar3 = strtol(&local_3b,&local_38,0x10);
if (local_38 == &local_39) {
*(char *)(*(long *)param_1 + lVar6) = (char)lVar3;
lVar6 = lVar6 + 1;
uVar5 = uVar4 + 3;
goto LAB_00153b76;
}
}
LAB_00153b5b:
*(int1 *)(*(long *)param_1 + lVar6) = 0x5c;
*(int1 *)(*(long *)param_1 + 1 + lVar6) =
*(int1 *)(*(long *)param_1 + uVar5);
lVar6 = lVar6 + 2;
goto LAB_00153b76;
}
*(int1 *)(lVar3 + lVar6) = 9;
}
lVar6 = lVar6 + 1;
}
else {
*(char *)(lVar3 + lVar6) = *(char *)(lVar3 + uVar4);
lVar6 = lVar6 + 1;
uVar5 = uVar4;
}
LAB_00153b76:
uVar4 = uVar5 + 1;
} while (uVar4 < uVar2);
}
std::__cxx11::string::resize((ulong)param_1,(char)lVar6);
return;
}
| |
38,427 | ma_sp_make_key | eloqsql/storage/maria/ma_sp_key.c | MARIA_KEY *_ma_sp_make_key(MARIA_HA *info, MARIA_KEY *ret_key, uint keynr,
uchar *key, const uchar *record, my_off_t filepos,
ulonglong trid)
{
HA_KEYSEG *keyseg;
MARIA_KEYDEF *keyinfo = &info->s->keyinfo[keynr];
uint len = 0;
const uchar *pos;
uint dlen;
uchar *dptr;
double mbr[SPDIMS * 2];
uint i;
DBUG_ENTER("_ma_sp_make_key");
keyseg = &keyinfo->seg[-1];
pos = record + keyseg->start;
ret_key->data= key;
dlen = _ma_calc_blob_length(keyseg->bit_start, pos);
memcpy(&dptr, pos + keyseg->bit_start, sizeof(char*));
if (!dptr)
{
my_errno= HA_ERR_NULL_IN_SPATIAL;
DBUG_RETURN(0);
}
sp_mbr_from_wkb(dptr + 4, dlen - 4, SPDIMS, mbr); /* SRID */
for (i = 0, keyseg = keyinfo->seg; keyseg->type; keyseg++, i++)
{
uint length = keyseg->length, start= keyseg->start;
double val;
DBUG_ASSERT(length == 8);
DBUG_ASSERT(!(start % 8));
DBUG_ASSERT(start < sizeof(mbr));
DBUG_ASSERT(keyseg->type == HA_KEYTYPE_DOUBLE);
val= mbr[start / sizeof (double)];
if (isnan(val))
{
bzero(key, length);
key+= length;
len+= length;
continue;
}
if (keyseg->flag & HA_SWAP_KEY)
{
mi_float8store(key, val);
}
else
{
float8store((uchar *)key, val);
}
key += length;
len+= length;
}
_ma_dpointer(info->s, key, filepos);
ret_key->keyinfo= keyinfo;
ret_key->data_length= len;
ret_key->ref_length= info->s->rec_reflength;
ret_key->flag= 0;
if (_ma_have_versioning(info) && trid)
{
ret_key->ref_length+= transid_store_packed(info,
key + ret_key->ref_length,
trid);
}
DBUG_EXECUTE("key", _ma_print_key(DBUG_FILE, ret_key););
DBUG_RETURN(ret_key);
} | O3 | c | ma_sp_make_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, -0x38(%rbp)
movq %rcx, %r14
movq %rdi, -0x40(%rbp)
movq (%rdi), %rax
movq 0x570(%rax), %rbx
movl %edx, %eax
imulq $0x118, %rax, %r12 # imm = 0x118
movq 0xc0(%rbx,%r12), %r15
movl -0x18(%r15), %r13d
addq %r8, %r13
movq %rsi, -0x48(%rbp)
movq %rcx, (%rsi)
movzbl -0x6(%r15), %edi
movq %r13, %rsi
callq 0x691c3
movzbl -0x6(%r15), %ecx
movq (%rcx,%r13), %rcx
testq %rcx, %rcx
je 0x8aa1d
addq %r12, %rbx
leaq 0x4(%rcx), %rdx
addl $-0x4, %eax
leaq -0x50(%rbp), %rdi
movq %rdx, (%rdi)
movapd 0x7a60f(%rip), %xmm0 # 0x104f40
leaq -0x70(%rbp), %rdx
movapd %xmm0, (%rdx)
movapd %xmm0, 0x10(%rdx)
leaq (%rcx,%rax), %rsi
addq $0x4, %rsi
movl $0x1, %ecx
callq 0x8aaa0
movq 0xc0(%rbx), %r12
cmpb $0x0, 0x18(%r12)
movq %rbx, -0x30(%rbp)
je 0x8aa2c
addq $0x8, %r12
xorl %r15d, %r15d
movzwl 0xc(%r12), %ebx
movl (%r12), %eax
andl $-0x8, %eax
movsd -0x70(%rbp,%rax), %xmm0
ucomisd %xmm0, %xmm0
jp 0x8aa0b
testb $0x40, 0xa(%r12)
jne 0x8a99a
movsd %xmm0, (%r14)
jmp 0x8a9ef
movq %xmm0, %rax
movq %rax, %rcx
shrq $0x38, %rcx
movq %rax, %rdx
shrq $0x30, %rdx
movq %rax, %rsi
shrq $0x28, %rsi
movq %rax, %rdi
shrq $0x20, %rdi
movl %eax, %r8d
shrl $0x18, %r8d
movl %eax, %r9d
shrl $0x10, %r9d
movl %eax, %r10d
shrl $0x8, %r10d
movb %cl, (%r14)
movb %dl, 0x1(%r14)
movb %sil, 0x2(%r14)
movb %dil, 0x3(%r14)
movb %r8b, 0x4(%r14)
movb %r9b, 0x5(%r14)
movb %r10b, 0x6(%r14)
movb %al, 0x7(%r14)
movq %rbx, %r13
addq %r13, %r14
addl %ebx, %r15d
cmpb $0x0, 0x30(%r12)
leaq 0x20(%r12), %r12
jne 0x8a96e
jmp 0x8aa2f
movl %ebx, %r13d
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x2a2e0
jmp 0x8a9f2
callq 0xc14ee
movl $0x9e, (%rax)
xorl %ebx, %ebx
jmp 0x8aa8e
xorl %r15d, %r15d
movq -0x40(%rbp), %r12
movq (%r12), %rdi
movq %r14, %rsi
movq -0x38(%rbp), %rdx
callq 0x5df58
movq -0x48(%rbp), %rbx
movq -0x30(%rbp), %rax
movq %rax, 0x8(%rbx)
movl %r15d, 0x10(%rbx)
movq (%r12), %rax
movl 0x740(%rax), %eax
movl %eax, 0x14(%rbx)
movl $0x0, 0x18(%rbx)
movq 0x10(%rbp), %rdx
testq %rdx, %rdx
je 0x8aa8e
movl 0x618(%r12), %ecx
andl $0x1, %ecx
je 0x8aa8e
addq %rax, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x61c78
addl %eax, 0x14(%rbx)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_sp_make_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_38], r9
mov r14, rcx
mov [rbp+var_40], rdi
mov rax, [rdi]
mov rbx, [rax+570h]
mov eax, edx
imul r12, rax, 118h
mov r15, [rbx+r12+0C0h]
mov r13d, [r15-18h]
add r13, r8
mov [rbp+var_48], rsi
mov [rsi], rcx
movzx edi, byte ptr [r15-6]
mov rsi, r13
call _ma_calc_blob_length
movzx ecx, byte ptr [r15-6]
mov rcx, [rcx+r13]
test rcx, rcx
jz loc_8AA1D
add rbx, r12
lea rdx, [rcx+4]
add eax, 0FFFFFFFCh
lea rdi, [rbp+var_50]
mov [rdi], rdx
movapd xmm0, cs:xmmword_104F40
lea rdx, [rbp+var_70]
movapd xmmword ptr [rdx], xmm0
movapd xmmword ptr [rdx+10h], xmm0
lea rsi, [rcx+rax]
add rsi, 4
mov ecx, 1
call sp_get_geometry_mbr
mov r12, [rbx+0C0h]
cmp byte ptr [r12+18h], 0
mov [rbp+var_30], rbx
jz loc_8AA2C
add r12, 8
xor r15d, r15d
loc_8A96E:
movzx ebx, word ptr [r12+0Ch]
mov eax, [r12]
and eax, 0FFFFFFF8h
movsd xmm0, [rbp+rax+var_70]
ucomisd xmm0, xmm0
jp loc_8AA0B
test byte ptr [r12+0Ah], 40h
jnz short loc_8A99A
movsd qword ptr [r14], xmm0
jmp short loc_8A9EF
loc_8A99A:
movq rax, xmm0
mov rcx, rax
shr rcx, 38h
mov rdx, rax
shr rdx, 30h
mov rsi, rax
shr rsi, 28h
mov rdi, rax
shr rdi, 20h
mov r8d, eax
shr r8d, 18h
mov r9d, eax
shr r9d, 10h
mov r10d, eax
shr r10d, 8
mov [r14], cl
mov [r14+1], dl
mov [r14+2], sil
mov [r14+3], dil
mov [r14+4], r8b
mov [r14+5], r9b
mov [r14+6], r10b
mov [r14+7], al
loc_8A9EF:
mov r13, rbx
loc_8A9F2:
add r14, r13
add r15d, ebx
cmp byte ptr [r12+30h], 0
lea r12, [r12+20h]
jnz loc_8A96E
jmp short loc_8AA2F
loc_8AA0B:
mov r13d, ebx
mov rdi, r14
xor esi, esi
mov rdx, r13
call _memset
jmp short loc_8A9F2
loc_8AA1D:
call _my_thread_var
mov dword ptr [rax], 9Eh
xor ebx, ebx
jmp short loc_8AA8E
loc_8AA2C:
xor r15d, r15d
loc_8AA2F:
mov r12, [rbp+var_40]
mov rdi, [r12]
mov rsi, r14
mov rdx, [rbp+var_38]
call _ma_dpointer
mov rbx, [rbp+var_48]
mov rax, [rbp+var_30]
mov [rbx+8], rax
mov [rbx+10h], r15d
mov rax, [r12]
mov eax, [rax+740h]
mov [rbx+14h], eax
mov dword ptr [rbx+18h], 0
mov rdx, [rbp+arg_0]
test rdx, rdx
jz short loc_8AA8E
mov ecx, [r12+618h]
and ecx, 1
jz short loc_8AA8E
add r14, rax
mov rdi, r12
mov rsi, r14
call transid_store_packed
add [rbx+14h], eax
loc_8AA8E:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * ma_sp_make_key(
long long *a1,
_QWORD *a2,
unsigned int a3,
_BYTE *a4,
long long a5,
long long a6,
long long a7)
{
_BYTE *v7; // r14
long long v8; // rbx
long long v9; // r12
long long v10; // r15
unsigned __int8 *v11; // r13
long long v12; // rdi
int v13; // eax
long long v14; // rcx
long long v15; // rbx
long long v16; // r12
bool v17; // zf
long long v18; // r12
int v19; // r15d
long long v20; // rbx
long long v21; // xmm0_8
_QWORD *v22; // rbx
long long *v23; // r12
long long v24; // rax
_OWORD v26[2]; // [rsp+0h] [rbp-70h] BYREF
long long v27; // [rsp+20h] [rbp-50h] BYREF
_QWORD *v28; // [rsp+28h] [rbp-48h]
long long *v29; // [rsp+30h] [rbp-40h]
long long v30; // [rsp+38h] [rbp-38h]
long long v31; // [rsp+40h] [rbp-30h]
v30 = a6;
v7 = a4;
v29 = a1;
v8 = *(_QWORD *)(*a1 + 1392);
v9 = 280LL * a3;
v10 = *(_QWORD *)(v8 + v9 + 192);
v11 = (unsigned __int8 *)(a5 + *(unsigned int *)(v10 - 24));
v28 = a2;
*a2 = a4;
v12 = *(unsigned __int8 *)(v10 - 6);
v13 = ma_calc_blob_length(v12, v11);
v14 = *(_QWORD *)&v11[*(unsigned __int8 *)(v10 - 6)];
if ( v14 )
{
v15 = v9 + v8;
v27 = v14 + 4;
v26[0] = xmmword_104F40;
v26[1] = xmmword_104F40;
((void ( *)(long long *, long long, _OWORD *, long long))sp_get_geometry_mbr)(
&v27,
v14 + (unsigned int)(v13 - 4) + 4,
v26,
1LL);
v16 = *(_QWORD *)(v15 + 192);
v17 = *(_BYTE *)(v16 + 24) == 0;
v31 = v15;
if ( v17 )
{
v19 = 0;
}
else
{
v18 = v16 + 8;
v19 = 0;
do
{
v20 = *(unsigned __int16 *)(v18 + 12);
v21 = *(_QWORD *)((char *)v26 + (*(_DWORD *)v18 & 0xFFFFFFF8));
if ( (*(_BYTE *)(v18 + 10) & 0x40) != 0 )
{
*v7 = HIBYTE(v21);
v7[1] = BYTE6(v21);
v7[2] = BYTE5(v21);
v7[3] = BYTE4(v21);
v7[4] = BYTE3(v21);
v7[5] = BYTE2(v21);
v7[6] = BYTE1(v21);
v7[7] = v21;
}
else
{
*(_QWORD *)v7 = v21;
}
v7 += v20;
v19 += v20;
v17 = *(_BYTE *)(v18 + 48) == 0;
v18 += 32LL;
}
while ( !v17 );
}
v23 = v29;
ma_dpointer(*v29, (long long)v7, v30);
v22 = v28;
v28[1] = v31;
*((_DWORD *)v22 + 4) = v19;
v24 = *(unsigned int *)(*v23 + 1856);
*(_QWORD *)((char *)v22 + 20) = (unsigned int)v24;
if ( a7 && (v23[195] & 1) != 0 )
*((_DWORD *)v22 + 5) += transid_store_packed((long long)v23, &v7[v24], a7);
}
else
{
*(_DWORD *)my_thread_var(v12) = 158;
return 0LL;
}
return v22;
}
| _ma_sp_make_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],R9
MOV R14,RCX
MOV qword ptr [RBP + -0x40],RDI
MOV RAX,qword ptr [RDI]
MOV RBX,qword ptr [RAX + 0x570]
MOV EAX,EDX
IMUL R12,RAX,0x118
MOV R15,qword ptr [RBX + R12*0x1 + 0xc0]
MOV R13D,dword ptr [R15 + -0x18]
ADD R13,R8
MOV qword ptr [RBP + -0x48],RSI
MOV qword ptr [RSI],RCX
MOVZX EDI,byte ptr [R15 + -0x6]
MOV RSI,R13
CALL 0x001691c3
MOVZX ECX,byte ptr [R15 + -0x6]
MOV RCX,qword ptr [RCX + R13*0x1]
TEST RCX,RCX
JZ 0x0018aa1d
ADD RBX,R12
LEA RDX,[RCX + 0x4]
ADD EAX,-0x4
LEA RDI,[RBP + -0x50]
MOV qword ptr [RDI],RDX
MOVAPD XMM0,xmmword ptr [0x00204f40]
LEA RDX,[RBP + -0x70]
MOVAPD xmmword ptr [RDX],XMM0
MOVAPD xmmword ptr [RDX + 0x10],XMM0
LEA RSI,[RCX + RAX*0x1]
ADD RSI,0x4
MOV ECX,0x1
CALL 0x0018aaa0
MOV R12,qword ptr [RBX + 0xc0]
CMP byte ptr [R12 + 0x18],0x0
MOV qword ptr [RBP + -0x30],RBX
JZ 0x0018aa2c
ADD R12,0x8
XOR R15D,R15D
LAB_0018a96e:
MOVZX EBX,word ptr [R12 + 0xc]
MOV EAX,dword ptr [R12]
AND EAX,0xfffffff8
MOVSD XMM0,qword ptr [RBP + RAX*0x1 + -0x70]
UCOMISD XMM0,XMM0
JP 0x0018aa0b
TEST byte ptr [R12 + 0xa],0x40
JNZ 0x0018a99a
MOVSD qword ptr [R14],XMM0
JMP 0x0018a9ef
LAB_0018a99a:
MOVQ RAX,XMM0
MOV RCX,RAX
SHR RCX,0x38
MOV RDX,RAX
SHR RDX,0x30
MOV RSI,RAX
SHR RSI,0x28
MOV RDI,RAX
SHR RDI,0x20
MOV R8D,EAX
SHR R8D,0x18
MOV R9D,EAX
SHR R9D,0x10
MOV R10D,EAX
SHR R10D,0x8
MOV byte ptr [R14],CL
MOV byte ptr [R14 + 0x1],DL
MOV byte ptr [R14 + 0x2],SIL
MOV byte ptr [R14 + 0x3],DIL
MOV byte ptr [R14 + 0x4],R8B
MOV byte ptr [R14 + 0x5],R9B
MOV byte ptr [R14 + 0x6],R10B
MOV byte ptr [R14 + 0x7],AL
LAB_0018a9ef:
MOV R13,RBX
LAB_0018a9f2:
ADD R14,R13
ADD R15D,EBX
CMP byte ptr [R12 + 0x30],0x0
LEA R12,[R12 + 0x20]
JNZ 0x0018a96e
JMP 0x0018aa2f
LAB_0018aa0b:
MOV R13D,EBX
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R13
CALL 0x0012a2e0
JMP 0x0018a9f2
LAB_0018aa1d:
CALL 0x001c14ee
MOV dword ptr [RAX],0x9e
XOR EBX,EBX
JMP 0x0018aa8e
LAB_0018aa2c:
XOR R15D,R15D
LAB_0018aa2f:
MOV R12,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [R12]
MOV RSI,R14
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x0015df58
MOV RBX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX + 0x10],R15D
MOV RAX,qword ptr [R12]
MOV EAX,dword ptr [RAX + 0x740]
MOV dword ptr [RBX + 0x14],EAX
MOV dword ptr [RBX + 0x18],0x0
MOV RDX,qword ptr [RBP + 0x10]
TEST RDX,RDX
JZ 0x0018aa8e
MOV ECX,dword ptr [R12 + 0x618]
AND ECX,0x1
JZ 0x0018aa8e
ADD R14,RAX
MOV RDI,R12
MOV RSI,R14
CALL 0x00161c78
ADD dword ptr [RBX + 0x14],EAX
LAB_0018aa8e:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 *
_ma_sp_make_key(long *param_1,int8 *param_2,ulong param_3,double *param_4,long param_5,
int8 param_6,long param_7)
{
uint *puVar1;
double dVar2;
ushort uVar3;
uint uVar4;
long lVar5;
long *plVar6;
int4 *puVar7;
long lVar8;
int8 *puVar9;
long lVar10;
uint *puVar11;
int iVar12;
double local_78 [4];
long local_58;
int8 *local_50;
long *local_48;
int8 local_40;
long local_38;
lVar8 = *(long *)(*param_1 + 0x570);
lVar10 = (param_3 & 0xffffffff) * 0x118;
lVar5 = *(long *)(lVar8 + 0xc0 + lVar10);
param_5 = (ulong)*(uint *)(lVar5 + -0x18) + param_5;
*param_2 = param_4;
local_50 = param_2;
local_48 = param_1;
local_40 = param_6;
_ma_calc_blob_length(*(int1 *)(lVar5 + -6),param_5);
local_58 = *(long *)((ulong)*(byte *)(lVar5 + -6) + param_5);
if (local_58 == 0) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x9e;
puVar9 = (int8 *)0x0;
}
else {
lVar8 = lVar8 + lVar10;
local_58 = local_58 + 4;
local_78[0] = _DAT_00204f40;
local_78[1] = (double)_UNK_00204f48;
local_78[2] = _DAT_00204f40;
local_78[3] = (double)_UNK_00204f48;
sp_get_geometry_mbr();
lVar5 = *(long *)(lVar8 + 0xc0);
local_38 = lVar8;
if (*(char *)(lVar5 + 0x18) == '\0') {
iVar12 = 0;
}
else {
puVar11 = (uint *)(lVar5 + 8);
iVar12 = 0;
do {
uVar3 = (ushort)puVar11[3];
dVar2 = *(double *)((long)local_78 + (ulong)(*puVar11 & 0xfffffff8));
if (NAN(dVar2)) {
memset(param_4,0,(ulong)uVar3);
}
else if ((*(byte *)((long)puVar11 + 10) & 0x40) == 0) {
*param_4 = dVar2;
}
else {
*(char *)param_4 = (char)((ulong)dVar2 >> 0x38);
*(char *)((long)param_4 + 1) = (char)((ulong)dVar2 >> 0x30);
*(char *)((long)param_4 + 2) = (char)((ulong)dVar2 >> 0x28);
*(char *)((long)param_4 + 3) = (char)((ulong)dVar2 >> 0x20);
*(char *)((long)param_4 + 4) = (char)((ulong)dVar2 >> 0x18);
*(char *)((long)param_4 + 5) = (char)((ulong)dVar2 >> 0x10);
*(char *)((long)param_4 + 6) = (char)((ulong)dVar2 >> 8);
*(char *)((long)param_4 + 7) = SUB81(dVar2,0);
}
param_4 = (double *)((long)param_4 + (ulong)uVar3);
iVar12 = iVar12 + (uint)uVar3;
puVar1 = puVar11 + 0xc;
puVar11 = puVar11 + 8;
} while ((char)*puVar1 != '\0');
}
plVar6 = local_48;
_ma_dpointer(*local_48,param_4,local_40);
puVar9 = local_50;
local_50[1] = local_38;
*(int *)(local_50 + 2) = iVar12;
uVar4 = *(uint *)(*plVar6 + 0x740);
*(uint *)((long)local_50 + 0x14) = uVar4;
*(int4 *)(local_50 + 3) = 0;
if ((param_7 != 0) && ((*(uint *)(plVar6 + 0xc3) & 1) != 0)) {
iVar12 = transid_store_packed(plVar6,(long)param_4 + (ulong)uVar4);
*(int *)((long)puVar9 + 0x14) = *(int *)((long)puVar9 + 0x14) + iVar12;
}
}
return puVar9;
}
| |
38,428 | pow5mult | eloqsql/strings/dtoa.c | static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
{
Bigint *b1, *p5, *p51=NULL;
int i;
static int p05[3]= { 5, 25, 125 };
my_bool overflow= FALSE;
if ((i= k & 3))
b= multadd(b, p05[i-1], 0, alloc);
if (!(k>>= 2))
return b;
p5= p5_a;
for (;;)
{
if (k & 1)
{
b1= mult(b, p5, alloc);
Bfree(b, alloc);
b= b1;
}
if (!(k>>= 1))
break;
/* Calculate next power of 5 */
if (overflow)
{
p51= mult(p5, p5, alloc);
Bfree(p5, alloc);
p5= p51;
}
else if (p5 < p5_a + P5A_MAX)
++p5;
else if (p5 == p5_a + P5A_MAX)
{
p5= mult(p5, p5, alloc);
overflow= TRUE;
}
}
if (p51)
Bfree(p51, alloc);
return b;
} | O0 | c | pow5mult:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
movb $0x0, -0x3d(%rbp)
movl -0x14(%rbp), %eax
andl $0x3, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0x149103
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x32dabf(%rip), %rax # 0x476bb0
movl (%rax,%rcx,4), %esi
movq -0x20(%rbp), %rcx
xorl %edx, %edx
callq 0x149a50
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
sarl $0x2, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jne 0x14911e
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x149214
leaq 0x32da9b(%rip), %rax # 0x476bc0
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x14915e
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x149220
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x149470
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
sarl %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jne 0x149170
jmp 0x1491f8
cmpb $0x0, -0x3d(%rbp)
je 0x1491a2
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x149220
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x149470
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x1491f3
leaq 0x32da17(%rip), %rax # 0x476bc0
addq $0x90, %rax
cmpq %rax, -0x30(%rbp)
jae 0x1491c3
movq -0x30(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x30(%rbp)
jmp 0x1491f1
leaq 0x32d9f6(%rip), %rax # 0x476bc0
addq $0x90, %rax
cmpq %rax, -0x30(%rbp)
jne 0x1491ef
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x149220
movq %rax, -0x30(%rbp)
movb $0x1, -0x3d(%rbp)
jmp 0x1491f1
jmp 0x1491f3
jmp 0x149129
cmpq $0x0, -0x38(%rbp)
je 0x14920c
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x149470
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| pow5mult:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_38], 0
mov [rbp+var_3D], 0
mov eax, [rbp+var_14]
and eax, 3
mov [rbp+var_3C], eax
cmp eax, 0
jz short loc_149103
mov rdi, [rbp+var_10]
mov eax, [rbp+var_3C]
sub eax, 1
movsxd rcx, eax
lea rax, pow5mult_p05
mov esi, [rax+rcx*4]
mov rcx, [rbp+var_20]
xor edx, edx
call multadd
mov [rbp+var_10], rax
loc_149103:
mov eax, [rbp+var_14]
sar eax, 2
mov [rbp+var_14], eax
cmp eax, 0
jnz short loc_14911E
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
jmp loc_149214
loc_14911E:
lea rax, p5_a
mov [rbp+var_30], rax
loc_149129:
mov eax, [rbp+var_14]
and eax, 1
cmp eax, 0
jz short loc_14915E
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
call mult
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call Bfree
mov rax, [rbp+var_28]
mov [rbp+var_10], rax
loc_14915E:
mov eax, [rbp+var_14]
sar eax, 1
mov [rbp+var_14], eax
cmp eax, 0
jnz short loc_149170
jmp loc_1491F8
loc_149170:
cmp [rbp+var_3D], 0
jz short loc_1491A2
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
call mult
mov [rbp+var_38], rax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_20]
call Bfree
mov rax, [rbp+var_38]
mov [rbp+var_30], rax
jmp short loc_1491F3
loc_1491A2:
lea rax, p5_a
add rax, 90h
cmp [rbp+var_30], rax
jnb short loc_1491C3
mov rax, [rbp+var_30]
add rax, 18h
mov [rbp+var_30], rax
jmp short loc_1491F1
loc_1491C3:
lea rax, p5_a
add rax, 90h
cmp [rbp+var_30], rax
jnz short loc_1491EF
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
call mult
mov [rbp+var_30], rax
mov [rbp+var_3D], 1
loc_1491EF:
jmp short $+2
loc_1491F1:
jmp short $+2
loc_1491F3:
jmp loc_149129
loc_1491F8:
cmp [rbp+var_38], 0
jz short loc_14920C
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_20]
call Bfree
loc_14920C:
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_149214:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long pow5mult(long long a1, int a2, long long a3)
{
char v4; // [rsp+3h] [rbp-3Dh]
_BYTE v5[12]; // [rsp+4h] [rbp-3Ch]
_UNKNOWN **v6; // [rsp+10h] [rbp-30h]
long long v7; // [rsp+18h] [rbp-28h]
int v9; // [rsp+2Ch] [rbp-14h]
long long v10; // [rsp+30h] [rbp-10h]
v10 = a1;
*(_DWORD *)&v5[8] = 0;
v4 = 0;
*(_QWORD *)v5 = a2 & 3;
if ( (a2 & 3) != 0 )
v10 = multadd(a1, pow5mult_p05[*(_DWORD *)v5 - 1], 0LL, a3);
v9 = a2 >> 2;
if ( !(a2 >> 2) )
return v10;
v6 = &p5_a;
while ( 1 )
{
if ( (v9 & 1) != 0 )
{
v7 = mult(v10, v6, a3);
Bfree(v10, a3);
v10 = v7;
}
v9 >>= 1;
if ( !v9 )
break;
if ( v4 )
{
*(_QWORD *)&v5[4] = mult(v6, v6, a3);
Bfree(v6, a3);
v6 = *(_UNKNOWN ***)&v5[4];
}
else if ( v6 >= &p5_a + 18 )
{
if ( v6 == &p5_a + 18 )
{
v6 = (_UNKNOWN **)mult(v6, v6, a3);
v4 = 1;
}
}
else
{
v6 += 3;
}
}
if ( *(_QWORD *)&v5[4] )
Bfree(*(_QWORD *)&v5[4], a3);
return v10;
}
| |||
38,429 | pow5mult | eloqsql/strings/dtoa.c | static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
{
Bigint *b1, *p5, *p51=NULL;
int i;
static int p05[3]= { 5, 25, 125 };
my_bool overflow= FALSE;
if ((i= k & 3))
b= multadd(b, p05[i-1], 0, alloc);
if (!(k>>= 2))
return b;
p5= p5_a;
for (;;)
{
if (k & 1)
{
b1= mult(b, p5, alloc);
Bfree(b, alloc);
b= b1;
}
if (!(k>>= 1))
break;
/* Calculate next power of 5 */
if (overflow)
{
p51= mult(p5, p5, alloc);
Bfree(p5, alloc);
p5= p51;
}
else if (p5 < p5_a + P5A_MAX)
++p5;
else if (p5 == p5_a + P5A_MAX)
{
p5= mult(p5, p5, alloc);
overflow= TRUE;
}
}
if (p51)
Bfree(p51, alloc);
return b;
} | O3 | c | pow5mult:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r13
movl %esi, %eax
andl $0x3, %eax
je 0xd4ffd
decl %eax
leaq 0x286afe(%rip), %rcx # 0x35bae8
movl (%rcx,%rax,4), %esi
movq %r13, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xd544a
movq %rax, %r13
cmpl $0x4, %r15d
jb 0xd50e5
movq %rbx, -0x38(%rbp)
shrl $0x2, %r15d
movb $0x1, %cl
leaq 0x3271f8(%rip), %rbx # 0x3fc210
movq $0x0, -0x40(%rbp)
leaq 0x327279(%rip), %r12 # 0x3fc2a0
movl %ecx, %r14d
cmpq %r12, %rbx
setb %cl
movl %ecx, -0x2c(%rbp)
testb $0x1, %r15b
je 0xd5068
movq %r13, %rdi
movq %rbx, %rsi
movq %r13, %r12
movq -0x38(%rbp), %r13
movq %r13, %rdx
callq 0xd50f7
movq %rax, -0x48(%rbp)
movq %r12, %rdi
leaq 0x327244(%rip), %r12 # 0x3fc2a0
movq %r13, %rsi
callq 0xd5219
movq -0x48(%rbp), %r13
cmpl $0x2, %r15d
jb 0xd50d3
shrl %r15d
testb $0x1, %r14b
je 0xd5098
cmpq %r12, %rbx
jb 0xd50c7
movb $0x1, %r14b
jne 0xd5033
movq %r12, %rdi
movq %r12, %rsi
movq -0x38(%rbp), %rdx
callq 0xd50f7
movq %rax, %rbx
movl -0x2c(%rbp), %ecx
jmp 0xd5027
movq %rbx, %rdi
movq %rbx, %r14
movq %rbx, %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdx
callq 0xd50f7
movq %rax, -0x40(%rbp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd5219
xorl %ecx, %ecx
movq -0x40(%rbp), %rbx
jmp 0xd5027
addq $0x18, %rbx
movl -0x2c(%rbp), %ecx
jmp 0xd5027
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xd50e5
movq -0x38(%rbp), %rsi
callq 0xd5219
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| pow5mult:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r15d, esi
mov r13, rdi
mov eax, esi
and eax, 3
jz short loc_D4FFD
dec eax
lea rcx, pow5mult_p05
mov esi, [rcx+rax*4]
mov rdi, r13
xor edx, edx
mov rcx, rbx
call multadd
mov r13, rax
loc_D4FFD:
cmp r15d, 4
jb loc_D50E5
mov [rbp+var_38], rbx
shr r15d, 2
mov cl, 1
lea rbx, p5_a
mov [rbp+var_40], 0
lea r12, off_3FC2A0
loc_D5027:
mov r14d, ecx
cmp rbx, r12
setb cl
mov [rbp+var_2C], ecx
loc_D5033:
test r15b, 1
jz short loc_D5068
mov rdi, r13
mov rsi, rbx
mov r12, r13
mov r13, [rbp+var_38]
mov rdx, r13
call mult
mov [rbp+var_48], rax
mov rdi, r12
lea r12, off_3FC2A0
mov rsi, r13
call Bfree
mov r13, [rbp+var_48]
loc_D5068:
cmp r15d, 2
jb short loc_D50D3
shr r15d, 1
test r14b, 1
jz short loc_D5098
cmp rbx, r12
jb short loc_D50C7
mov r14b, 1
jnz short loc_D5033
mov rdi, r12
mov rsi, r12
mov rdx, [rbp+var_38]
call mult
mov rbx, rax
mov ecx, [rbp+var_2C]
jmp short loc_D5027
loc_D5098:
mov rdi, rbx
mov r14, rbx
mov rsi, rbx
mov rbx, [rbp+var_38]
mov rdx, rbx
call mult
mov [rbp+var_40], rax
mov rdi, r14
mov rsi, rbx
call Bfree
xor ecx, ecx
mov rbx, [rbp+var_40]
jmp loc_D5027
loc_D50C7:
add rbx, 18h
mov ecx, [rbp+var_2C]
jmp loc_D5027
loc_D50D3:
mov rdi, [rbp+var_40]
test rdi, rdi
jz short loc_D50E5
mov rsi, [rbp+var_38]
call Bfree
loc_D50E5:
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long pow5mult(long long a1, unsigned int a2, long long a3, int a4)
{
long long v5; // r13
unsigned int v6; // r15d
_UNKNOWN **v7; // rbx
char v8; // r14
long long v10; // [rsp+8h] [rbp-48h]
long long v11; // [rsp+10h] [rbp-40h]
long long v12; // [rsp+18h] [rbp-38h]
int v13; // [rsp+24h] [rbp-2Ch]
v5 = a1;
if ( (a2 & 3) != 0 )
v5 = multadd(a1, pow5mult_p05[(a2 & 3) - 1], 0LL, a3);
if ( a2 >= 4 )
{
v12 = a3;
v6 = a2 >> 2;
LOBYTE(a4) = 1;
v7 = &p5_a;
v11 = 0LL;
LABEL_5:
v8 = a4;
LOBYTE(a4) = v7 < &off_3FC2A0;
v13 = a4;
while ( 1 )
{
if ( (v6 & 1) != 0 )
{
v10 = mult(v5, v7, v12);
Bfree(v5, v12);
v5 = v10;
}
if ( v6 < 2 )
break;
v6 >>= 1;
if ( (v8 & 1) == 0 )
{
v11 = mult(v7, v7, v12);
Bfree(v7, v12);
a4 = 0;
v7 = (_UNKNOWN **)v11;
goto LABEL_5;
}
if ( v7 < &off_3FC2A0 )
{
v7 += 3;
a4 = v13;
goto LABEL_5;
}
v8 = 1;
if ( v7 == &off_3FC2A0 )
{
v7 = (_UNKNOWN **)mult(&off_3FC2A0, &off_3FC2A0, v12);
a4 = v13;
goto LABEL_5;
}
}
if ( v11 )
Bfree(v11, v12);
}
return v5;
}
| pow5mult:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R15D,ESI
MOV R13,RDI
MOV EAX,ESI
AND EAX,0x3
JZ 0x001d4ffd
DEC EAX
LEA RCX,[0x45bae8]
MOV ESI,dword ptr [RCX + RAX*0x4]
MOV RDI,R13
XOR EDX,EDX
MOV RCX,RBX
CALL 0x001d544a
MOV R13,RAX
LAB_001d4ffd:
CMP R15D,0x4
JC 0x001d50e5
MOV qword ptr [RBP + -0x38],RBX
SHR R15D,0x2
MOV CL,0x1
LEA RBX,[0x4fc210]
MOV qword ptr [RBP + -0x40],0x0
LEA R12,[0x4fc2a0]
LAB_001d5027:
MOV R14D,ECX
CMP RBX,R12
SETC CL
MOV dword ptr [RBP + -0x2c],ECX
LAB_001d5033:
TEST R15B,0x1
JZ 0x001d5068
MOV RDI,R13
MOV RSI,RBX
MOV R12,R13
MOV R13,qword ptr [RBP + -0x38]
MOV RDX,R13
CALL 0x001d50f7
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,R12
LEA R12,[0x4fc2a0]
MOV RSI,R13
CALL 0x001d5219
MOV R13,qword ptr [RBP + -0x48]
LAB_001d5068:
CMP R15D,0x2
JC 0x001d50d3
SHR R15D,0x1
TEST R14B,0x1
JZ 0x001d5098
CMP RBX,R12
JC 0x001d50c7
MOV R14B,0x1
JNZ 0x001d5033
MOV RDI,R12
MOV RSI,R12
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x001d50f7
MOV RBX,RAX
MOV ECX,dword ptr [RBP + -0x2c]
JMP 0x001d5027
LAB_001d5098:
MOV RDI,RBX
MOV R14,RBX
MOV RSI,RBX
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,RBX
CALL 0x001d50f7
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x001d5219
XOR ECX,ECX
MOV RBX,qword ptr [RBP + -0x40]
JMP 0x001d5027
LAB_001d50c7:
ADD RBX,0x18
MOV ECX,dword ptr [RBP + -0x2c]
JMP 0x001d5027
LAB_001d50d3:
MOV RDI,qword ptr [RBP + -0x40]
TEST RDI,RDI
JZ 0x001d50e5
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001d5219
LAB_001d50e5:
MOV RAX,R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 pow5mult(int8 param_1,uint param_2,int8 param_3)
{
int1 *puVar1;
int8 uVar2;
bool bVar3;
bool bVar4;
int1 *local_48;
if ((param_2 & 3) != 0) {
param_1 = multadd(param_1,*(int4 *)(pow5mult_p05 + (ulong)((param_2 & 3) - 1) * 4),0,
param_3);
}
if (param_2 < 4) {
return param_1;
}
param_2 = param_2 >> 2;
local_48 = (int1 *)0x0;
puVar1 = p5_a;
bVar3 = true;
LAB_001d5027:
do {
bVar4 = puVar1 < (int1 *)0x4fc2a0;
uVar2 = param_1;
do {
param_1 = uVar2;
if ((param_2 & 1) != 0) {
param_1 = mult(uVar2,puVar1,param_3);
Bfree(uVar2,param_3);
}
if (param_2 < 2) {
if (local_48 == (int1 *)0x0) {
return param_1;
}
Bfree(local_48,param_3);
return param_1;
}
param_2 = param_2 >> 1;
if (!bVar3) {
local_48 = (int1 *)mult(puVar1,puVar1,param_3);
Bfree(puVar1,param_3);
bVar3 = false;
puVar1 = local_48;
goto LAB_001d5027;
}
if (puVar1 < (int1 *)0x4fc2a0) {
puVar1 = puVar1 + 0x18;
bVar3 = bVar4;
goto LAB_001d5027;
}
bVar3 = true;
uVar2 = param_1;
} while (puVar1 != (int1 *)0x4fc2a0);
puVar1 = (int1 *)mult(0x4fc2a0,0x4fc2a0,param_3);
bVar3 = bVar4;
} while( true );
}
| |
38,430 | print_row | eloqsql/client/mysqlshow.c | static void
print_row(const char *header,size_t head_length,...)
{
va_list args;
const char *field;
size_t i,length,field_length;
va_start(args,head_length);
field=header; length=head_length;
for (;;)
{
putchar('|');
putchar(' ');
fputs(field,stdout);
field_length= strlen(field);
for (i=field_length ; i <= length ; i++)
putchar(' ');
if (!(field=va_arg(args,char *)))
break;
length=va_arg(args,uint);
}
va_end(args);
putchar('|');
putchar('\n');
} | O0 | c | print_row:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
testb %al, %al
je 0x3954e
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movq %r8, -0xe0(%rbp)
movq %rcx, -0xe8(%rbp)
movq %rdx, -0xf0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x100(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x7c, %edi
callq 0x36b20
movl $0x20, %edi
callq 0x36b20
movq -0x38(%rbp), %rdi
movq 0x1f5a13(%rip), %rax # 0x22efd8
movq (%rax), %rsi
callq 0x36310
movq -0x38(%rbp), %rdi
callq 0x363e0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
ja 0x39604
movl $0x20, %edi
callq 0x36b20
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x395e2
leaq -0x30(%rbp), %rax
movq %rax, -0x110(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x104(%rbp)
cmpl $0x28, %eax
ja 0x3963f
movq -0x110(%rbp), %rcx
movl -0x104(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x118(%rbp)
jmp 0x3965c
movq -0x110(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x39672
jmp 0x396dc
leaq -0x30(%rbp), %rax
movq %rax, -0x128(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x11c(%rbp)
cmpl $0x28, %eax
ja 0x396ad
movq -0x128(%rbp), %rcx
movl -0x11c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x130(%rbp)
jmp 0x396ca
movq -0x128(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x48(%rbp)
jmp 0x395a6
movl $0x7c, %edi
callq 0x36b20
movl $0xa, %edi
callq 0x36b20
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
nopl (%rax)
| print_row:
push rbp
mov rbp, rsp
sub rsp, 130h
test al, al
jz short loc_3954E
movaps [rbp+var_D0], xmm0
movaps [rbp+var_C0], xmm1
movaps [rbp+var_B0], xmm2
movaps [rbp+var_A0], xmm3
movaps [rbp+var_90], xmm4
movaps [rbp+var_80], xmm5
movaps [rbp+var_70], xmm6
movaps [rbp+var_60], xmm7
loc_3954E:
mov [rbp+var_D8], r9
mov [rbp+var_E0], r8
mov [rbp+var_E8], rcx
mov [rbp+var_F0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_100]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
loc_395A6:
mov edi, 7Ch ; '|'
call _putchar
mov edi, 20h ; ' '
call _putchar
mov rdi, [rbp+var_38]
mov rax, cs:stdout_ptr
mov rsi, [rax]
call _fputs
mov rdi, [rbp+var_38]
call _strlen
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov [rbp+var_40], rax
loc_395E2:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_48]
ja short loc_39604
mov edi, 20h ; ' '
call _putchar
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp short loc_395E2
loc_39604:
lea rax, [rbp+var_30]
mov [rbp+var_110], rax
mov eax, [rbp+var_30]
mov [rbp+var_104], eax
cmp eax, 28h ; '('
ja short loc_3963F
mov rcx, [rbp+var_110]
mov edx, [rbp+var_104]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_118], rax
jmp short loc_3965C
loc_3963F:
mov rcx, [rbp+var_110]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_118], rax
loc_3965C:
mov rax, [rbp+var_118]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jnz short loc_39672
jmp short loc_396DC
loc_39672:
lea rax, [rbp+var_30]
mov [rbp+var_128], rax
mov eax, [rbp+var_30]
mov [rbp+var_11C], eax
cmp eax, 28h ; '('
ja short loc_396AD
mov rcx, [rbp+var_128]
mov edx, [rbp+var_11C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_130], rax
jmp short loc_396CA
loc_396AD:
mov rcx, [rbp+var_128]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_130], rax
loc_396CA:
mov rax, [rbp+var_130]
mov eax, [rax]
mov [rbp+var_48], rax
jmp loc_395A6
loc_396DC:
mov edi, 7Ch ; '|'
call _putchar
mov edi, 0Ah
call _putchar
add rsp, 130h
pop rbp
retn
| long long print_row(
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,
char a15)
{
char *v15; // rax
char *v16; // rax
char v18; // [rsp+30h] [rbp-100h] BYREF
long long v19; // [rsp+40h] [rbp-F0h]
long long v20; // [rsp+48h] [rbp-E8h]
long long v21; // [rsp+50h] [rbp-E0h]
long long v22; // [rsp+58h] [rbp-D8h]
__m128 v23; // [rsp+60h] [rbp-D0h]
__m128 v24; // [rsp+70h] [rbp-C0h]
__m128 v25; // [rsp+80h] [rbp-B0h]
__m128 v26; // [rsp+90h] [rbp-A0h]
__m128 v27; // [rsp+A0h] [rbp-90h]
__m128 v28; // [rsp+B0h] [rbp-80h]
__m128 v29; // [rsp+C0h] [rbp-70h]
__m128 v30; // [rsp+D0h] [rbp-60h]
long long v31; // [rsp+E0h] [rbp-50h]
unsigned long long i; // [rsp+E8h] [rbp-48h]
unsigned long long j; // [rsp+F0h] [rbp-40h]
long long v34; // [rsp+F8h] [rbp-38h]
int v35; // [rsp+100h] [rbp-30h]
int v36; // [rsp+104h] [rbp-2Ch]
char *v37; // [rsp+108h] [rbp-28h]
char *v38; // [rsp+110h] [rbp-20h]
unsigned long long v39; // [rsp+120h] [rbp-10h]
long long v40; // [rsp+128h] [rbp-8h]
v23 = a7;
v24 = a8;
v25 = a9;
v26 = a10;
v27 = a11;
v28 = a12;
v29 = a13;
v30 = a14;
v22 = a6;
v21 = a5;
v20 = a4;
v19 = a3;
v40 = a1;
v39 = a2;
v38 = &v18;
v37 = &a15;
v36 = 48;
v35 = 16;
v34 = a1;
for ( i = a2; ; i = *(unsigned int *)v16 )
{
putchar(124LL);
putchar(32LL);
fputs(v34, stdout);
v31 = strlen(v34);
for ( j = v31; j <= i; ++j )
putchar(32LL);
if ( (unsigned int)v35 > 0x28 )
{
v15 = v37;
v37 += 8;
}
else
{
v15 = &v38[v35];
v35 += 8;
}
v34 = *(_QWORD *)v15;
if ( !v34 )
break;
if ( (unsigned int)v35 > 0x28 )
{
v16 = v37;
v37 += 8;
}
else
{
v16 = &v38[v35];
v35 += 8;
}
}
putchar(124LL);
return putchar(10LL);
}
| print_row:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x130
TEST AL,AL
JZ 0x0013954e
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOVAPS xmmword ptr [RBP + -0xc0],XMM1
MOVAPS xmmword ptr [RBP + -0xb0],XMM2
MOVAPS xmmword ptr [RBP + -0xa0],XMM3
MOVAPS xmmword ptr [RBP + -0x90],XMM4
MOVAPS xmmword ptr [RBP + -0x80],XMM5
MOVAPS xmmword ptr [RBP + -0x70],XMM6
MOVAPS xmmword ptr [RBP + -0x60],XMM7
LAB_0013954e:
MOV qword ptr [RBP + -0xd8],R9
MOV qword ptr [RBP + -0xe0],R8
MOV qword ptr [RBP + -0xe8],RCX
MOV qword ptr [RBP + -0xf0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x100]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x48],RAX
LAB_001395a6:
MOV EDI,0x7c
CALL 0x00136b20
MOV EDI,0x20
CALL 0x00136b20
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [0x0032efd8]
MOV RSI,qword ptr [RAX]
CALL 0x00136310
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001363e0
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x40],RAX
LAB_001395e2:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x48]
JA 0x00139604
MOV EDI,0x20
CALL 0x00136b20
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001395e2
LAB_00139604:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x110],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x104],EAX
CMP EAX,0x28
JA 0x0013963f
MOV RCX,qword ptr [RBP + -0x110]
MOV EDX,dword ptr [RBP + -0x104]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x118],RAX
JMP 0x0013965c
LAB_0013963f:
MOV RCX,qword ptr [RBP + -0x110]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x118],RAX
LAB_0013965c:
MOV RAX,qword ptr [RBP + -0x118]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JNZ 0x00139672
JMP 0x001396dc
LAB_00139672:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x128],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x11c],EAX
CMP EAX,0x28
JA 0x001396ad
MOV RCX,qword ptr [RBP + -0x128]
MOV EDX,dword ptr [RBP + -0x11c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x130],RAX
JMP 0x001396ca
LAB_001396ad:
MOV RCX,qword ptr [RBP + -0x128]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x130],RAX
LAB_001396ca:
MOV RAX,qword ptr [RBP + -0x130]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001395a6
LAB_001396dc:
MOV EDI,0x7c
CALL 0x00136b20
MOV EDI,0xa
CALL 0x00136b20
ADD RSP,0x130
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void print_row(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
char *param_9,ulong param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
uint *local_138;
uint *local_120;
int1 local_108 [16];
int8 local_f8;
int8 local_f0;
int8 local_e8;
int8 local_e0;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
size_t local_58;
ulong local_50;
ulong local_48;
char *local_40;
uint local_38;
int4 local_34;
uint *local_30;
int1 *local_28;
ulong local_18;
char *local_10;
if (in_AL != '\0') {
local_d8 = param_1;
local_c8 = param_2;
local_b8 = param_3;
local_a8 = param_4;
local_98 = param_5;
local_88 = param_6;
local_78 = param_7;
local_68 = param_8;
}
local_28 = local_108;
local_30 = (uint *)&stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
local_f8 = param_11;
local_f0 = param_12;
local_e8 = param_13;
local_e0 = param_14;
local_50 = param_10;
local_40 = param_9;
local_18 = param_10;
local_10 = param_9;
while( true ) {
putchar(0x7c);
putchar(0x20);
fputs(local_40,*(FILE **)PTR_stdout_0032efd8);
local_58 = strlen(local_40);
for (local_48 = local_58; local_48 <= local_50; local_48 = local_48 + 1) {
putchar(0x20);
}
if (local_38 < 0x29) {
local_120 = (uint *)(local_28 + (int)local_38);
local_38 = local_38 + 8;
}
else {
local_120 = local_30;
local_30 = local_30 + 2;
}
local_40 = *(char **)local_120;
if (local_40 == (char *)0x0) break;
if (local_38 < 0x29) {
local_138 = (uint *)(local_28 + (int)local_38);
local_38 = local_38 + 8;
}
else {
local_138 = local_30;
local_30 = local_30 + 2;
}
local_50 = (ulong)*local_138;
}
putchar(0x7c);
putchar(10);
return;
}
| |
38,431 | mi_keydef_write | eloqsql/storage/myisam/mi_open.c | uint mi_keydef_write(File file, MI_KEYDEF *keydef)
{
uchar buff[MI_KEYDEF_SIZE];
uchar *ptr=buff;
*ptr++ = (uchar) keydef->keysegs;
*ptr++ = keydef->key_alg; /* Rtree or Btree */
mi_int2store(ptr,keydef->flag); ptr +=2;
mi_int2store(ptr,keydef->block_length); ptr +=2;
mi_int2store(ptr,keydef->keylength); ptr +=2;
mi_int2store(ptr,keydef->minlength); ptr +=2;
mi_int2store(ptr,keydef->maxlength); ptr +=2;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
} | O0 | c | mi_keydef_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
leaq -0x14(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movb 0x8(%rax), %dl
movq -0x28(%rbp), %rax
movq %rax, %rsi
incq %rsi
movq %rsi, -0x28(%rbp)
movb %dl, (%rax)
movq -0x20(%rbp), %rax
movb 0xc(%rax), %dl
movq -0x28(%rbp), %rax
movq %rax, %rsi
incq %rsi
movq %rsi, -0x28(%rbp)
movb %dl, (%rax)
movq -0x20(%rbp), %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x2c(%rbp)
movb -0x2c(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x2b(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0xe(%rax), %eax
movl %eax, -0x30(%rbp)
movb -0x30(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x2f(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
movl %eax, -0x34(%rbp)
movb -0x34(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x33(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x38(%rbp)
movb -0x38(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x37(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x16(%rax), %eax
movl %eax, -0x3c(%rbp)
movb -0x3c(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x3b(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %edx
movq -0x28(%rbp), %r8
subq %rcx, %r8
leaq 0x9a1e1(%rip), %rdi # 0x153b76
movl $0x476, %esi # imm = 0x476
movl $0x4, %r9d
callq 0xb8ad0
testq %rax, %rax
setne %al
movzbl %al, %eax
movl %eax, -0x40(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb99cc
movl -0x40(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| mi_keydef_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], edi
mov [rbp+var_20], rsi
lea rcx, [rbp+var_14]
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
mov dl, [rax+8]
mov rax, [rbp+var_28]
mov rsi, rax
inc rsi
mov [rbp+var_28], rsi
mov [rax], dl
mov rax, [rbp+var_20]
mov dl, [rax+0Ch]
mov rax, [rbp+var_28]
mov rsi, rax
inc rsi
mov [rbp+var_28], rsi
mov [rax], dl
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0Ah]
mov [rbp+var_2C], eax
mov dl, byte ptr [rbp+var_2C]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_2C+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0Eh]
mov [rbp+var_30], eax
mov dl, byte ptr [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_30+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
mov [rbp+var_34], eax
mov dl, byte ptr [rbp+var_34]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_34+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+14h]
mov [rbp+var_38], eax
mov dl, byte ptr [rbp+var_38]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_38+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+16h]
mov [rbp+var_3C], eax
mov dl, byte ptr [rbp+var_3C]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_3C+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov edx, [rbp+var_18]
mov r8, [rbp+var_28]
sub r8, rcx
lea rdi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 476h
mov r9d, 4
call inline_mysql_file_write_2
test rax, rax
setnz al
movzx eax, al
mov [rbp+var_40], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_B99CC
mov eax, [rbp+var_40]
add rsp, 40h
pop rbp
retn
loc_B99CC:
call ___stack_chk_fail
| _BOOL8 mi_keydef_write(unsigned int a1, long long a2)
{
__int16 v2; // kr00_2
__int16 v3; // kr02_2
__int16 v4; // kr04_2
__int16 v5; // kr06_2
__int16 v6; // kr08_2
_BYTE v8[12]; // [rsp+2Ch] [rbp-14h] BYREF
unsigned long long v9; // [rsp+38h] [rbp-8h]
v9 = __readfsqword(0x28u);
v8[0] = *(_BYTE *)(a2 + 8);
v8[1] = *(_BYTE *)(a2 + 12);
v2 = *(_WORD *)(a2 + 10);
v8[2] = HIBYTE(v2);
v8[3] = v2;
v3 = *(_WORD *)(a2 + 14);
v8[4] = HIBYTE(v3);
v8[5] = v3;
v4 = *(_WORD *)(a2 + 18);
v8[6] = HIBYTE(v4);
v8[7] = v4;
v5 = *(_WORD *)(a2 + 20);
v8[8] = HIBYTE(v5);
v8[9] = v5;
v6 = *(_WORD *)(a2 + 22);
v8[10] = HIBYTE(v6);
v8[11] = v6;
return inline_mysql_file_write_2(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
0x476u,
a1,
(long long)v8,
12LL,
4LL) != 0;
}
| mi_keydef_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x18],EDI
MOV qword ptr [RBP + -0x20],RSI
LEA RCX,[RBP + -0x14]
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV DL,byte ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RAX
INC RSI
MOV qword ptr [RBP + -0x28],RSI
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x20]
MOV DL,byte ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RAX
INC RSI
MOV qword ptr [RBP + -0x28],RSI
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xa]
MOV dword ptr [RBP + -0x2c],EAX
MOV DL,byte ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x2b]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xe]
MOV dword ptr [RBP + -0x30],EAX
MOV DL,byte ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x2f]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
MOV dword ptr [RBP + -0x34],EAX
MOV DL,byte ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x33]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x38],EAX
MOV DL,byte ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x37]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x16]
MOV dword ptr [RBP + -0x3c],EAX
MOV DL,byte ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x3b]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV EDX,dword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x28]
SUB R8,RCX
LEA RDI,[0x253b76]
MOV ESI,0x476
MOV R9D,0x4
CALL 0x001b8ad0
TEST RAX,RAX
SETNZ AL
MOVZX EAX,AL
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001b99cc
MOV EAX,dword ptr [RBP + -0x40]
ADD RSP,0x40
POP RBP
RET
LAB_001b99cc:
CALL 0x0012a270
|
bool mi_keydef_write(int4 param_1,long param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_44;
int1 uStack_43;
int1 local_40;
int1 uStack_3f;
int1 local_3c;
int1 uStack_3b;
int1 local_38;
int1 uStack_37;
int1 local_34;
int1 uStack_33;
int1 local_1c;
int1 local_1b;
int1 local_1a;
int1 local_19;
int1 local_18;
int1 local_17;
int1 local_16;
int1 local_15;
int1 local_14;
int1 local_13;
int1 local_12;
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_1c = *(int1 *)(param_2 + 8);
local_1b = *(int1 *)(param_2 + 0xc);
local_34 = (int1)*(int2 *)(param_2 + 10);
local_19 = local_34;
uStack_33 = (int1)((ushort)*(int2 *)(param_2 + 10) >> 8);
local_1a = uStack_33;
local_38 = (int1)*(int2 *)(param_2 + 0xe);
local_17 = local_38;
uStack_37 = (int1)((ushort)*(int2 *)(param_2 + 0xe) >> 8);
local_18 = uStack_37;
local_3c = (int1)*(int2 *)(param_2 + 0x12);
local_15 = local_3c;
uStack_3b = (int1)((ushort)*(int2 *)(param_2 + 0x12) >> 8);
local_16 = uStack_3b;
local_40 = (int1)*(int2 *)(param_2 + 0x14);
local_13 = local_40;
uStack_3f = (int1)((ushort)*(int2 *)(param_2 + 0x14) >> 8);
local_14 = uStack_3f;
local_44 = (int1)*(int2 *)(param_2 + 0x16);
local_11 = local_44;
uStack_43 = (int1)((ushort)*(int2 *)(param_2 + 0x16) >> 8);
local_12 = uStack_43;
lVar1 = inline_mysql_file_write
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x476,
param_1,&local_1c,(long)&local_10 - (long)&local_1c,4);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return lVar1 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
38,432 | ImPlot3D::GetColormapColorU32(int, int) | zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp | ImU32 GetColormapColorU32(int idx, ImPlot3DColormap cmap) {
ImPlot3DContext& gp = *GImPlot3D;
cmap = cmap == IMPLOT3D_AUTO ? gp.Style.Colormap : cmap;
IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!");
idx = idx % gp.ColormapData.GetKeyCount(cmap);
return gp.ColormapData.GetKeyColor(cmap, idx);
} | O1 | cpp | ImPlot3D::GetColormapColorU32(int, int):
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %ebx
movq 0x2e2891(%rip), %r14 # 0x336c98
cmpl $-0x1, %esi
jne 0x54413
movl 0x1d0(%r14), %ebp
testl %ebp, %ebp
js 0x54420
cmpl 0x2a8(%r14), %ebp
jl 0x5442c
leaq 0x241260(%rip), %rdi # 0x295687
callq 0x2161f4
movq 0x210(%r14), %rcx
movq 0x220(%r14), %rsi
movslq %ebp, %rdi
movl %ebx, %eax
cltd
idivl (%rsi,%rdi,4)
movq 0x230(%r14), %rax
movslq (%rax,%rdi,4), %rax
movslq %edx, %rdx
addq %rax, %rdx
movl (%rcx,%rdx,4), %eax
popq %rbx
popq %r14
popq %rbp
retq
| _ZN8ImPlot3D19GetColormapColorU32Eii:
push rbp
push r14
push rbx
mov ebp, esi
mov ebx, edi
mov r14, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
cmp esi, 0FFFFFFFFh
jnz short loc_54413
mov ebp, [r14+1D0h]
loc_54413:
test ebp, ebp
js short loc_54420
cmp ebp, [r14+2A8h]
jl short loc_5442C
loc_54420:
lea rdi, aInvalidColorma; "Invalid colormap index!"
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_5442C:
mov rcx, [r14+210h]
mov rsi, [r14+220h]
movsxd rdi, ebp
mov eax, ebx
cdq
idiv dword ptr [rsi+rdi*4]
mov rax, [r14+230h]
movsxd rax, dword ptr [rax+rdi*4]
movsxd rdx, edx
add rdx, rax
mov eax, [rcx+rdx*4]
pop rbx
pop r14
pop rbp
retn
| long long ImPlot3D::GetColormapColorU32(ImPlot3D *this, const char *a2)
{
int v2; // ebp
ImGui *v3; // r14
v2 = (int)a2;
v3 = ImPlot3D::GImPlot3D;
if ( (_DWORD)a2 == -1 )
v2 = *((_DWORD *)ImPlot3D::GImPlot3D + 116);
if ( v2 < 0 || v2 >= *((_DWORD *)ImPlot3D::GImPlot3D + 170) )
ImGui::ErrorLog((ImGui *)"Invalid colormap index!", a2);
return *(unsigned int *)(*((_QWORD *)v3 + 66)
+ 4
* (*(int *)(*((_QWORD *)v3 + 70) + 4LL * v2)
+ (long long)((int)this % *(_DWORD *)(*((_QWORD *)v3 + 68) + 4LL * v2))));
}
| GetColormapColorU32:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBP,ESI
MOV EBX,EDI
MOV R14,qword ptr [0x00436c98]
CMP ESI,-0x1
JNZ 0x00154413
MOV EBP,dword ptr [R14 + 0x1d0]
LAB_00154413:
TEST EBP,EBP
JS 0x00154420
CMP EBP,dword ptr [R14 + 0x2a8]
JL 0x0015442c
LAB_00154420:
LEA RDI,[0x395687]
CALL 0x003161f4
LAB_0015442c:
MOV RCX,qword ptr [R14 + 0x210]
MOV RSI,qword ptr [R14 + 0x220]
MOVSXD RDI,EBP
MOV EAX,EBX
CDQ
IDIV dword ptr [RSI + RDI*0x4]
MOV RAX,qword ptr [R14 + 0x230]
MOVSXD RAX,dword ptr [RAX + RDI*0x4]
MOVSXD RDX,EDX
ADD RDX,RAX
MOV EAX,dword ptr [RCX + RDX*0x4]
POP RBX
POP R14
POP RBP
RET
|
/* ImPlot3D::GetColormapColorU32(int, int) */
int4 ImPlot3D::GetColormapColorU32(int param_1,int param_2)
{
long lVar1;
lVar1 = GImPlot3D;
if (param_2 == -1) {
param_2 = *(int *)(GImPlot3D + 0x1d0);
}
if ((param_2 < 0) || (*(int *)(GImPlot3D + 0x2a8) <= param_2)) {
ImGui::ErrorLog("Invalid colormap index!");
}
return *(int4 *)
(*(long *)(lVar1 + 0x210) +
((long)(param_1 % *(int *)(*(long *)(lVar1 + 0x220) + (long)param_2 * 4)) +
(long)*(int *)(*(long *)(lVar1 + 0x230) + (long)param_2 * 4)) * 4);
}
| |
38,433 | my_crc32c_implementation | eloqsql/mysys/crc32/crc32c.cc | const char *my_crc32c_implementation()
{
#if defined(HAVE_POWER8) && defined(HAS_ALTIVEC)
if (ChosenExtend == ExtendPPCImpl)
return "Using POWER8 crc32 instructions";
#elif defined(HAVE_ARMV8_CRC)
if (const char *ret= crc32c_aarch64_available())
return ret;
#elif HAVE_SSE42
# if defined HAVE_PCLMUL && SIZEOF_SIZE_T == 8
if (ChosenExtend == crc32c_3way)
return "Using crc32 + pclmulqdq instructions";
# endif
if (ChosenExtend == crc32c_sse42)
return "Using SSE4.2 crc32 instructions";
#endif
return "Using generic crc32 instructions";
} | O3 | cpp | my_crc32c_implementation:
pushq %rbp
movq %rsp, %rbp
movq 0xb5f649(%rip), %rax # 0xc08990
leaq 0x29(%rip), %rcx # 0xa9377
cmpq %rcx, %rax
leaq 0x33c18(%rip), %rcx # 0xdcf70
leaq 0x33c31(%rip), %rdx # 0xdcf90
cmoveq %rcx, %rdx
cmpq 0x2dac4e(%rip), %rax # 0x383fb8
leaq 0x33bda(%rip), %rax # 0xdcf4b
cmovneq %rdx, %rax
popq %rbp
retq
| my_crc32c_implementation:
push rbp
mov rbp, rsp
mov rax, cs:_ZN15mysys_namespace6crc32cL12ChosenExtendE; mysys_namespace::crc32c::ChosenExtend
lea rcx, _ZN15mysys_namespace6crc32cL12crc32c_sse42EjPKcm; mysys_namespace::crc32c::crc32c_sse42(uint,char const*,ulong)
cmp rax, rcx
lea rcx, aUsingSse42Crc3; "Using SSE4.2 crc32 instructions"
lea rdx, aUsingGenericCr; "Using generic crc32 instructions"
cmovz rdx, rcx
cmp rax, cs:crc32c_3way_ptr
lea rax, aUsingCrc32Pclm; "Using crc32 + pclmulqdq instructions"
cmovnz rax, rdx
pop rbp
retn
| const char *my_crc32c_implementation()
{
const char *v0; // rdx
const char *result; // rax
v0 = "Using generic crc32 instructions";
if ( (long long ( *)(mysys_namespace::crc32c *__hidden, unsigned int, const char *, unsigned long long))mysys_namespace::crc32c::ChosenExtend == mysys_namespace::crc32c::crc32c_sse42 )
v0 = "Using SSE4.2 crc32 instructions";
result = "Using crc32 + pclmulqdq instructions";
if ( (long long ( *)())mysys_namespace::crc32c::ChosenExtend != crc32c_3way )
return v0;
return result;
}
| my_crc32c_implementation:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [0x00d08990]
LEA RCX,[0x1a9377]
CMP RAX,RCX
LEA RCX,[0x1dcf70]
LEA RDX,[0x1dcf90]
CMOVZ RDX,RCX
CMP RAX,qword ptr [0x00483fb8]
LEA RAX,[0x1dcf4b]
CMOVNZ RAX,RDX
POP RBP
RET
|
char * my_crc32c_implementation(void)
{
char *pcVar1;
char *pcVar2;
pcVar2 = "Using generic crc32 instructions";
if (mysys_namespace::crc32c::ChosenExtend == mysys_namespace::crc32c::crc32c_sse42) {
pcVar2 = "Using SSE4.2 crc32 instructions";
}
pcVar1 = "Using crc32 + pclmulqdq instructions";
if (mysys_namespace::crc32c::ChosenExtend != (code *)PTR_crc32c_3way_00483fb8) {
pcVar1 = pcVar2;
}
return pcVar1;
}
| |
38,434 | StopAudioBuffer | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c | void StopAudioBuffer(AudioBuffer *buffer)
{
ma_mutex_lock(&AUDIO.System.lock);
StopAudioBufferInLockedState(buffer);
ma_mutex_unlock(&AUDIO.System.lock);
} | O1 | c | StopAudioBuffer:
pushq %rbx
movq %rdi, %rbx
leaq 0xfb72d(%rip), %rdi # 0x13eb18
callq 0x97d0
testq %rbx, %rbx
je 0x43424
cmpb $0x1, 0x154(%rbx)
jne 0x43424
cmpb $0x0, 0x155(%rbx)
jne 0x43424
movw $0x0, 0x154(%rbx)
movq $0x0, 0x164(%rbx)
movw $0x101, 0x15c(%rbx) # imm = 0x101
leaq 0xfb6ed(%rip), %rdi # 0x13eb18
popq %rbx
jmp 0x93c0
| StopAudioBuffer:
push rbx
mov rbx, rdi
lea rdi, unk_13EB18
call _pthread_mutex_lock
test rbx, rbx
jz short loc_43424
cmp byte ptr [rbx+154h], 1
jnz short loc_43424
cmp byte ptr [rbx+155h], 0
jnz short loc_43424
mov word ptr [rbx+154h], 0
mov qword ptr [rbx+164h], 0
mov word ptr [rbx+15Ch], 101h
loc_43424:
lea rdi, unk_13EB18
pop rbx
jmp _pthread_mutex_unlock
| long long StopAudioBuffer(long long a1)
{
pthread_mutex_lock(&unk_13EB18);
if ( a1 && *(_BYTE *)(a1 + 340) == 1 && !*(_BYTE *)(a1 + 341) )
{
*(_WORD *)(a1 + 340) = 0;
*(_QWORD *)(a1 + 356) = 0LL;
*(_WORD *)(a1 + 348) = 257;
}
return pthread_mutex_unlock(&unk_13EB18);
}
| StopAudioBuffer:
PUSH RBX
MOV RBX,RDI
LEA RDI,[0x23eb18]
CALL 0x001097d0
TEST RBX,RBX
JZ 0x00143424
CMP byte ptr [RBX + 0x154],0x1
JNZ 0x00143424
CMP byte ptr [RBX + 0x155],0x0
JNZ 0x00143424
MOV word ptr [RBX + 0x154],0x0
MOV qword ptr [RBX + 0x164],0x0
MOV word ptr [RBX + 0x15c],0x101
LAB_00143424:
LEA RDI,[0x23eb18]
POP RBX
JMP 0x001093c0
|
void StopAudioBuffer(long param_1)
{
pthread_mutex_lock((pthread_mutex_t *)(AUDIO + 0x12b8));
if (((param_1 != 0) && (*(char *)(param_1 + 0x154) == '\x01')) &&
(*(char *)(param_1 + 0x155) == '\0')) {
*(int2 *)(param_1 + 0x154) = 0;
*(int8 *)(param_1 + 0x164) = 0;
*(int2 *)(param_1 + 0x15c) = 0x101;
}
pthread_mutex_unlock((pthread_mutex_t *)(AUDIO + 0x12b8));
return;
}
| |
38,435 | StopAudioBuffer | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c | void StopAudioBuffer(AudioBuffer *buffer)
{
ma_mutex_lock(&AUDIO.System.lock);
StopAudioBufferInLockedState(buffer);
ma_mutex_unlock(&AUDIO.System.lock);
} | O3 | c | StopAudioBuffer:
pushq %rbx
movq %rdi, %rbx
leaq 0xf5ef1(%rip), %rdi # 0x138b28
callq 0xa7d0
testq %rbx, %rbx
je 0x42c70
cmpb $0x1, 0x154(%rbx)
jne 0x42c70
cmpb $0x0, 0x155(%rbx)
jne 0x42c70
movw $0x0, 0x154(%rbx)
movq $0x0, 0x164(%rbx)
movw $0x101, 0x15c(%rbx) # imm = 0x101
leaq 0xf5eb1(%rip), %rdi # 0x138b28
popq %rbx
jmp 0xa3c0
| StopAudioBuffer:
push rbx
mov rbx, rdi
lea rdi, unk_138B28
call _pthread_mutex_lock
test rbx, rbx
jz short loc_42C70
cmp byte ptr [rbx+154h], 1
jnz short loc_42C70
cmp byte ptr [rbx+155h], 0
jnz short loc_42C70
mov word ptr [rbx+154h], 0
mov qword ptr [rbx+164h], 0
mov word ptr [rbx+15Ch], 101h
loc_42C70:
lea rdi, unk_138B28
pop rbx
jmp _pthread_mutex_unlock
| long long StopAudioBuffer(long long a1)
{
pthread_mutex_lock(&unk_138B28);
if ( a1 && *(_BYTE *)(a1 + 340) == 1 && !*(_BYTE *)(a1 + 341) )
{
*(_WORD *)(a1 + 340) = 0;
*(_QWORD *)(a1 + 356) = 0LL;
*(_WORD *)(a1 + 348) = 257;
}
return pthread_mutex_unlock(&unk_138B28);
}
| StopAudioBuffer:
PUSH RBX
MOV RBX,RDI
LEA RDI,[0x238b28]
CALL 0x0010a7d0
TEST RBX,RBX
JZ 0x00142c70
CMP byte ptr [RBX + 0x154],0x1
JNZ 0x00142c70
CMP byte ptr [RBX + 0x155],0x0
JNZ 0x00142c70
MOV word ptr [RBX + 0x154],0x0
MOV qword ptr [RBX + 0x164],0x0
MOV word ptr [RBX + 0x15c],0x101
LAB_00142c70:
LEA RDI,[0x238b28]
POP RBX
JMP 0x0010a3c0
|
void StopAudioBuffer(long param_1)
{
pthread_mutex_lock((pthread_mutex_t *)(AUDIO + 0x12b8));
if (((param_1 != 0) && (*(char *)(param_1 + 0x154) == '\x01')) &&
(*(char *)(param_1 + 0x155) == '\0')) {
*(int2 *)(param_1 + 0x154) = 0;
*(int8 *)(param_1 + 0x164) = 0;
*(int2 *)(param_1 + 0x15c) = 0x101;
}
pthread_mutex_unlock((pthread_mutex_t *)(AUDIO + 0x12b8));
return;
}
| |
38,436 | getModulePath | msxemulator/build_O3/_deps/picotool-src/lib/whereami/whereami.c | int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
{
int length = -1;
FILE* maps = NULL;
for (int r = 0; r < WAI_PROC_SELF_MAPS_RETRY; ++r)
{
maps = fopen(WAI_PROC_SELF_MAPS, "r");
if (!maps)
break;
for (;;)
{
char buffer[PATH_MAX < 1024 ? 1024 : PATH_MAX];
uint64_t low, high;
char perms[5];
uint64_t offset;
uint32_t major, minor;
char path[PATH_MAX];
uint32_t inode;
if (!fgets(buffer, sizeof(buffer), maps))
break;
if (sscanf(buffer, "%" PRIx64 "-%" PRIx64 " %s %" PRIx64 " %x:%x %u %s\n", &low, &high, perms, &offset, &major, &minor, &inode, path) == 8)
{
uint64_t addr = (uintptr_t)WAI_RETURN_ADDRESS();
if (low <= addr && addr <= high)
{
char* resolved;
resolved = realpath(path, buffer);
if (!resolved)
break;
length = (int)strlen(resolved);
#if defined(__ANDROID__) || defined(ANDROID)
if (length > 4
&&buffer[length - 1] == 'k'
&&buffer[length - 2] == 'p'
&&buffer[length - 3] == 'a'
&&buffer[length - 4] == '.')
{
int fd = open(path, O_RDONLY);
if (fd == -1)
{
length = -1; // retry
break;
}
char* begin = (char*)mmap(0, offset, PROT_READ, MAP_SHARED, fd, 0);
if (begin == MAP_FAILED)
{
close(fd);
length = -1; // retry
break;
}
char* p = begin + offset - 30; // minimum size of local file header
while (p >= begin) // scan backwards
{
if (*((uint32_t*)p) == 0x04034b50UL) // local file header signature found
{
uint16_t length_ = *((uint16_t*)(p + 26));
if (length + 2 + length_ < (int)sizeof(buffer))
{
memcpy(&buffer[length], "!/", 2);
memcpy(&buffer[length + 2], p + 30, length_);
length += 2 + length_;
}
break;
}
--p;
}
munmap(begin, offset);
close(fd);
}
#endif
if (length <= capacity)
{
memcpy(out, resolved, length);
if (dirname_length)
{
int i;
for (i = length - 1; i >= 0; --i)
{
if (out[i] == '/')
{
*dirname_length = i;
break;
}
}
}
}
break;
}
}
}
fclose(maps);
maps = NULL;
if (length != -1)
break;
}
return length;
} | O3 | c | getModulePath:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2068, %rsp # imm = 0x2068
movq %rdx, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq %rdi, 0x20(%rsp)
leaq -0x1(%rdi), %rax
movq %rax, 0x18(%rsp)
leaq 0x1060(%rsp), %r13
leaq 0x53(%rsp), %r12
leaq 0x58(%rsp), %rbx
xorl %r15d, %r15d
leaq 0x38993(%rip), %rdi # 0xaa9d1
leaq 0x357ac(%rip), %rsi # 0xa77f1
callq 0xf540
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x72173
movq %rax, %rbp
movq %r13, %rdi
movl $0x1000, %esi # imm = 0x1000
movq %rax, %rdx
callq 0xf6e0
testq %rax, %rax
leaq 0x60(%rsp), %r14
je 0x720e2
movq %r13, %rdi
leaq 0x38961(%rip), %rsi # 0xaa9e1
leaq 0x38(%rsp), %rdx
leaq 0x30(%rsp), %rcx
movq %r12, %r8
movq %rbx, %r9
xorl %eax, %eax
pushq %r14
leaq 0x4c(%rsp), %r10
pushq %r10
leaq 0x58(%rsp), %r10
pushq %r10
leaq 0x64(%rsp), %r10
pushq %r10
callq 0xf420
addq $0x20, %rsp
cmpl $0x8, %eax
jne 0x720cd
movq 0x2098(%rsp), %rax
cmpq %rax, 0x38(%rsp)
ja 0x720cd
cmpq %rax, 0x30(%rsp)
jae 0x720ff
movq %r13, %rdi
movl $0x1000, %esi # imm = 0x1000
movq %rbp, %rdx
callq 0xf6e0
testq %rax, %rax
jne 0x72076
movq %rbp, %rdi
callq 0xf450
incl %r15d
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpl $0x5, %r15d
jne 0x72037
jmp 0x72173
movq %r14, %rdi
movq %r13, %rsi
callq 0xf1b0
testq %rax, %rax
je 0x720e2
movq %rax, 0x28(%rsp)
movq %rax, %rdi
callq 0xf240
movq %rax, %r14
cmpl 0xc(%rsp), %r14d
jg 0x72161
movslq %r14d, %rdx
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xf3a0
cmpq $0x0, 0x10(%rsp)
je 0x72161
movl %r14d, %eax
addq 0x18(%rsp), %rax
movl %r14d, %ecx
testl %ecx, %ecx
jle 0x72161
decl %ecx
cmpb $0x2f, (%rax)
leaq -0x1(%rax), %rax
jne 0x7214b
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movq %rbp, %rdi
callq 0xf450
cmpl $-0x1, %r14d
je 0x720ea
movl %r14d, %eax
addq $0x2068, %rsp # imm = 0x2068
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| getModulePath:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2068h
mov [rsp+2098h+var_2088], rdx
mov [rsp+2098h+var_208C], esi
mov [rsp+2098h+var_2078], rdi
lea rax, [rdi-1]
mov [rsp+2098h+var_2080], rax
lea r13, [rsp+2098h+var_1038]
lea r12, [rsp+2098h+var_2045]
lea rbx, [rsp+2098h+var_2040]
xor r15d, r15d
loc_72037:
lea rdi, aProcSelfMaps; "/proc/self/maps"
lea rsi, aInvalidStringC_22+4Ch; "r"
call _fopen
mov r14d, 0FFFFFFFFh
test rax, rax
jz loc_72173
mov rbp, rax
mov rdi, r13
mov esi, 1000h
mov rdx, rax
call _fgets
test rax, rax
lea r14, [rsp+2098h+var_2038]
jz short loc_720E2
loc_72076:
mov rdi, r13
lea rsi, aLxLxSLxXXUS; "%lx-%lx %s %lx %x:%x %u %s\n"
lea rdx, [rsp+2098h+var_2060]
lea rcx, [rsp+2098h+var_2068]
mov r8, r12
mov r9, rbx
xor eax, eax
push r14
lea r10, [rsp+20A0h+var_2054]
push r10
lea r10, [rsp+20A8h+var_2050]
push r10
lea r10, [rsp+20B0h+var_204C]
push r10
call ___isoc99_sscanf
add rsp, 20h
cmp eax, 8
jnz short loc_720CD
mov rax, [rsp+2098h]
cmp [rsp+2098h+var_2060], rax
ja short loc_720CD
cmp [rsp+2098h+var_2068], rax
jnb short loc_720FF
loc_720CD:
mov rdi, r13
mov esi, 1000h
mov rdx, rbp
call _fgets
test rax, rax
jnz short loc_72076
loc_720E2:
mov rdi, rbp
call _fclose
loc_720EA:
inc r15d
mov r14d, 0FFFFFFFFh
cmp r15d, 5
jnz loc_72037
jmp short loc_72173
loc_720FF:
mov rdi, r14
mov rsi, r13
call _realpath
test rax, rax
jz short loc_720E2
mov [rsp+2098h+var_2070], rax
mov rdi, rax
call _strlen
mov r14, rax
cmp r14d, [rsp+2098h+var_208C]
jg short loc_72161
movsxd rdx, r14d
mov rdi, [rsp+2098h+var_2078]
mov rsi, [rsp+2098h+var_2070]
call _memcpy
cmp [rsp+2098h+var_2088], 0
jz short loc_72161
mov eax, r14d
add rax, [rsp+2098h+var_2080]
mov ecx, r14d
loc_7214B:
test ecx, ecx
jle short loc_72161
dec ecx
cmp byte ptr [rax], 2Fh ; '/'
lea rax, [rax-1]
jnz short loc_7214B
mov rax, [rsp+2098h+var_2088]
mov [rax], ecx
loc_72161:
mov rdi, rbp
call _fclose
cmp r14d, 0FFFFFFFFh
jz loc_720EA
loc_72173:
mov eax, r14d
add rsp, 2068h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long getModulePath(long long a1, signed int a2, int *a3)
{
int i; // r15d
long long v4; // rax
unsigned int v5; // r14d
long long v6; // rbp
long long v7; // rax
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
signed int v12; // eax
_BYTE *v13; // rax
int v14; // ecx
long long v18; // [rsp+28h] [rbp-2070h]
unsigned long long v19; // [rsp+30h] [rbp-2068h] BYREF
unsigned long long v20; // [rsp+38h] [rbp-2060h] BYREF
char v21; // [rsp+44h] [rbp-2054h] BYREF
char v22; // [rsp+48h] [rbp-2050h] BYREF
char v23; // [rsp+4Ch] [rbp-204Ch] BYREF
char v24; // [rsp+53h] [rbp-2045h] BYREF
char v25; // [rsp+58h] [rbp-2040h] BYREF
char v26[4096]; // [rsp+60h] [rbp-2038h] BYREF
_BYTE v27[4152]; // [rsp+1060h] [rbp-1038h] BYREF
unsigned long long retaddr; // [rsp+2098h] [rbp+0h]
for ( i = 0; i != 5; ++i )
{
v4 = fopen("/proc/self/maps", "r");
v5 = -1;
if ( !v4 )
break;
v6 = v4;
if ( !fgets(v27, 4096LL, v4) )
goto LABEL_8;
while ( (unsigned int)__isoc99_sscanf(
v27,
"%lx-%lx %s %lx %x:%x %u %s\n",
&v20,
&v19,
&v24,
&v25,
&v23,
&v22,
&v21,
v26) != 8
|| v20 > retaddr
|| v19 < retaddr )
{
if ( !fgets(v27, 4096LL, v6) )
goto LABEL_8;
}
v7 = realpath(v26, v27);
if ( v7 )
{
v18 = v7;
v12 = strlen(v7, v27, v8, v9, v10, v11);
v5 = v12;
if ( v12 <= a2 )
{
memcpy(a1, v18, v12);
if ( a3 )
{
v13 = (_BYTE *)(a1 - 1 + v5);
v14 = v5;
while ( v14 > 0 )
{
--v14;
if ( *v13-- == 47 )
{
*a3 = v14;
break;
}
}
}
}
fclose(v6);
if ( v5 != -1 )
return v5;
}
else
{
LABEL_8:
fclose(v6);
}
v5 = -1;
}
return v5;
}
| getModulePath:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2068
MOV qword ptr [RSP + 0x10],RDX
MOV dword ptr [RSP + 0xc],ESI
MOV qword ptr [RSP + 0x20],RDI
LEA RAX,[RDI + -0x1]
MOV qword ptr [RSP + 0x18],RAX
LEA R13,[RSP + 0x1060]
LEA R12,[RSP + 0x53]
LEA RBX,[RSP + 0x58]
XOR R15D,R15D
LAB_00172037:
LEA RDI,[0x1aa9d1]
LEA RSI,[0x1a77f1]
CALL 0x0010f540
MOV R14D,0xffffffff
TEST RAX,RAX
JZ 0x00172173
MOV RBP,RAX
MOV RDI,R13
MOV ESI,0x1000
MOV RDX,RAX
CALL 0x0010f6e0
TEST RAX,RAX
LEA R14,[RSP + 0x60]
JZ 0x001720e2
LAB_00172076:
MOV RDI,R13
LEA RSI,[0x1aa9e1]
LEA RDX,[RSP + 0x38]
LEA RCX,[RSP + 0x30]
MOV R8,R12
MOV R9,RBX
XOR EAX,EAX
PUSH R14
LEA R10,[RSP + 0x4c]
PUSH R10
LEA R10,[RSP + 0x58]
PUSH R10
LEA R10,[RSP + 0x64]
PUSH R10
CALL 0x0010f420
ADD RSP,0x20
CMP EAX,0x8
JNZ 0x001720cd
MOV RAX,qword ptr [RSP + 0x2098]
CMP qword ptr [RSP + 0x38],RAX
JA 0x001720cd
CMP qword ptr [RSP + 0x30],RAX
JNC 0x001720ff
LAB_001720cd:
MOV RDI,R13
MOV ESI,0x1000
MOV RDX,RBP
CALL 0x0010f6e0
TEST RAX,RAX
JNZ 0x00172076
LAB_001720e2:
MOV RDI,RBP
CALL 0x0010f450
LAB_001720ea:
INC R15D
MOV R14D,0xffffffff
CMP R15D,0x5
JNZ 0x00172037
JMP 0x00172173
LAB_001720ff:
MOV RDI,R14
MOV RSI,R13
CALL 0x0010f1b0
TEST RAX,RAX
JZ 0x001720e2
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,RAX
CALL 0x0010f240
MOV R14,RAX
CMP R14D,dword ptr [RSP + 0xc]
JG 0x00172161
MOVSXD RDX,R14D
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0010f3a0
CMP qword ptr [RSP + 0x10],0x0
JZ 0x00172161
MOV EAX,R14D
ADD RAX,qword ptr [RSP + 0x18]
MOV ECX,R14D
LAB_0017214b:
TEST ECX,ECX
JLE 0x00172161
DEC ECX
CMP byte ptr [RAX],0x2f
LEA RAX,[RAX + -0x1]
JNZ 0x0017214b
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX],ECX
LAB_00172161:
MOV RDI,RBP
CALL 0x0010f450
CMP R14D,-0x1
JZ 0x001720ea
LAB_00172173:
MOV EAX,R14D
ADD RSP,0x2068
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong getModulePath(void *param_1,int param_2,uint *param_3)
{
char cVar1;
int iVar2;
FILE *__stream;
char *pcVar3;
uint uVar4;
ulong uVar5;
size_t sVar6;
int iVar7;
ulong unaff_retaddr;
ulong local_2068;
ulong local_2060;
int1 local_2054 [4];
int1 local_2050 [4];
int1 local_204c [7];
int1 local_2045 [5];
int1 local_2040 [8];
char local_2038 [4096];
char local_1038 [4104];
iVar7 = 0;
LAB_00172037:
__stream = fopen("/proc/self/maps","r");
sVar6 = 0xffffffff;
if (__stream != (FILE *)0x0) {
pcVar3 = fgets(local_1038,0x1000,__stream);
while (pcVar3 != (char *)0x0) {
iVar2 = __isoc99_sscanf(local_1038,"%lx-%lx %s %lx %x:%x %u %s\n",&local_2060,&local_2068,
local_2045,local_2040,local_204c,local_2050,local_2054,local_2038);
if (((iVar2 == 8) && (local_2060 <= unaff_retaddr)) && (unaff_retaddr <= local_2068)) {
pcVar3 = realpath(local_2038,local_1038);
if (pcVar3 != (char *)0x0) {
sVar6 = strlen(pcVar3);
iVar2 = (int)sVar6;
if ((param_2 < iVar2) || (memcpy(param_1,pcVar3,(long)iVar2), param_3 == (uint *)0x0))
goto LAB_00172161;
pcVar3 = (char *)((long)param_1 + ((sVar6 & 0xffffffff) - 1));
uVar5 = sVar6 & 0xffffffff;
goto LAB_0017214b;
}
break;
}
pcVar3 = fgets(local_1038,0x1000,__stream);
}
fclose(__stream);
goto LAB_001720ea;
}
goto LAB_00172173;
while( true ) {
uVar4 = (int)uVar5 - 1;
uVar5 = (ulong)uVar4;
cVar1 = *pcVar3;
pcVar3 = pcVar3 + -1;
if (cVar1 == '/') break;
LAB_0017214b:
if ((int)uVar5 < 1) goto LAB_00172161;
}
*param_3 = uVar4;
LAB_00172161:
fclose(__stream);
if (iVar2 != -1) goto LAB_00172173;
LAB_001720ea:
iVar7 = iVar7 + 1;
sVar6 = 0xffffffff;
if (iVar7 == 5) {
LAB_00172173:
return sVar6 & 0xffffffff;
}
goto LAB_00172037;
}
| |
38,437 | pvio_socket_read | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | ssize_t pvio_socket_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length)
{
ssize_t r;
int read_flags= MSG_DONTWAIT;
struct st_pvio_socket *csock;
int timeout;
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
timeout = pvio->timeout[PVIO_READ_TIMEOUT];
while ((r = ma_recv(csock->socket, (void *)buffer, length, read_flags)) == -1)
{
int err = socket_errno;
if ((err != SOCKET_EAGAIN
#ifdef HAVE_SOCKET_EWOULDBLOCK
&& err != SOCKET_EWOULDBLOCK
#endif
) || timeout == 0)
return r;
if (pvio_socket_wait_io_or_timeout(pvio, TRUE, timeout) < 1)
return -1;
}
return r;
} | O0 | c | pvio_socket_read:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x40, -0x2c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x67e9c
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x67ea6
movq $-0x1, -0x8(%rbp)
jmp 0x67f25
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x694e0
movq %rax, -0x28(%rbp)
cmpq $-0x1, %rax
jne 0x67f1d
callq 0x379e0
movl (%rax), %eax
movl %eax, -0x40(%rbp)
cmpl $0xb, -0x40(%rbp)
jne 0x67ef1
cmpl $0x0, -0x3c(%rbp)
jne 0x67efb
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x67f25
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %edx
movl $0x1, %esi
callq 0x68110
cmpl $0x1, %eax
jge 0x67f1b
movq $-0x1, -0x8(%rbp)
jmp 0x67f25
jmp 0x67ebb
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| pvio_socket_read:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_2C], 40h ; '@'
cmp [rbp+var_10], 0
jz short loc_67E9C
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_67EA6
loc_67E9C:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_67F25
loc_67EA6:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov eax, [rax+28h]
mov [rbp+var_3C], eax
loc_67EBB:
mov rax, [rbp+var_38]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
call ma_recv
mov [rbp+var_28], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_67F1D
call ___errno_location
mov eax, [rax]
mov [rbp+var_40], eax
cmp [rbp+var_40], 0Bh
jnz short loc_67EF1
cmp [rbp+var_3C], 0
jnz short loc_67EFB
loc_67EF1:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_67F25
loc_67EFB:
mov rdi, [rbp+var_10]
mov edx, [rbp+var_3C]
mov esi, 1
call pvio_socket_wait_io_or_timeout
cmp eax, 1
jge short loc_67F1B
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_67F25
loc_67F1B:
jmp short loc_67EBB
loc_67F1D:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_67F25:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long pvio_socket_read(unsigned int **a1, long long a2, long long a3)
{
long long v3; // rdi
unsigned int v5; // [rsp+4h] [rbp-3Ch]
unsigned int *v6; // [rsp+8h] [rbp-38h]
long long v7; // [rsp+18h] [rbp-28h]
if ( !a1 || !*a1 )
return -1LL;
v6 = *a1;
v5 = *((_DWORD *)a1 + 10);
while ( 1 )
{
v3 = *v6;
v7 = ma_recv(v3, a2, a3, 64LL);
if ( v7 != -1 )
break;
if ( *(_DWORD *)__errno_location(v3) != 11 || !v5 )
return -1LL;
if ( (int)pvio_socket_wait_io_or_timeout(a1, 1LL, v5) < 1 )
return -1LL;
}
return v7;
}
| pvio_socket_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x2c],0x40
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00167e9c
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x00167ea6
LAB_00167e9c:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00167f25
LAB_00167ea6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
MOV dword ptr [RBP + -0x3c],EAX
LAB_00167ebb:
MOV RAX,qword ptr [RBP + -0x38]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
CALL 0x001694e0
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,-0x1
JNZ 0x00167f1d
CALL 0x001379e0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0xb
JNZ 0x00167ef1
CMP dword ptr [RBP + -0x3c],0x0
JNZ 0x00167efb
LAB_00167ef1:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00167f25
LAB_00167efb:
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x3c]
MOV ESI,0x1
CALL 0x00168110
CMP EAX,0x1
JGE 0x00167f1b
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00167f25
LAB_00167f1b:
JMP 0x00167ebb
LAB_00167f1d:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00167f25:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long pvio_socket_read(long *param_1,int8 param_2,int8 param_3)
{
int4 *puVar1;
long lVar2;
int iVar3;
long lVar4;
int *piVar5;
if ((param_1 != (long *)0x0) && (*param_1 != 0)) {
puVar1 = (int4 *)*param_1;
lVar2 = param_1[5];
do {
lVar4 = ma_recv(*puVar1,param_2,param_3,0x40);
if (lVar4 != -1) {
return lVar4;
}
piVar5 = __errno_location();
if (*piVar5 != 0xb) {
return -1;
}
if ((int)lVar2 == 0) {
return -1;
}
iVar3 = pvio_socket_wait_io_or_timeout(param_1,1,(int)lVar2);
} while (0 < iVar3);
}
return -1;
}
| |
38,438 | my_string_repertoire | eloqsql/strings/ctype.c | my_repertoire_t
my_string_repertoire(CHARSET_INFO *cs, const char *str, size_t length)
{
if (cs->mbminlen == 1 && !(cs->state & MY_CS_NONASCII))
{
return my_string_repertoire_8bit(cs, str, length);
}
else
{
const char *strend= str + length;
my_wc_t wc;
int chlen;
for (;
(chlen= my_ci_mb_wc(cs, &wc, (uchar*) str, (uchar*) strend)) > 0;
str+= chlen)
{
if (wc > 0x7F)
return MY_REPERTOIRE_UNICODE30;
}
}
return MY_REPERTOIRE_ASCII;
} | O0 | c | my_string_repertoire:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x98(%rax)
jne 0xbc9f8
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
jne 0xbc9f8
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xbc7a0
movl %eax, -0x4(%rbp)
jmp 0xbca5b
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0xbca52
cmpq $0x7f, -0x30(%rbp)
jbe 0xbca3d
movl $0x3, -0x4(%rbp)
jmp 0xbca5b
jmp 0xbca3f
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0xbca04
jmp 0xbca54
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_string_repertoire:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
cmp dword ptr [rax+98h], 1
jnz short loc_BC9F8
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
and eax, 2000h
cmp eax, 0
jnz short loc_BC9F8
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_string_repertoire_8bit
mov [rbp+var_4], eax
jmp short loc_BCA5B
loc_BC9F8:
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_BCA04:
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_28]
lea rsi, [rbp+var_30]
call rax
mov [rbp+var_34], eax
cmp eax, 0
jle short loc_BCA52
cmp [rbp+var_30], 7Fh
jbe short loc_BCA3D
mov [rbp+var_4], 3
jmp short loc_BCA5B
loc_BCA3D:
jmp short $+2
loc_BCA3F:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp short loc_BCA04
loc_BCA52:
jmp short $+2
loc_BCA54:
mov [rbp+var_4], 1
loc_BCA5B:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long my_string_repertoire(long long a1, unsigned __int8 *a2, long long a3)
{
int v4; // [rsp+Ch] [rbp-34h]
unsigned long long v5; // [rsp+10h] [rbp-30h] BYREF
unsigned __int8 *v6; // [rsp+18h] [rbp-28h]
long long v7; // [rsp+20h] [rbp-20h]
unsigned __int8 *v8; // [rsp+28h] [rbp-18h]
long long v9; // [rsp+30h] [rbp-10h]
v9 = a1;
v8 = a2;
v7 = a3;
if ( *(_DWORD *)(a1 + 152) != 1 || (*(_DWORD *)(v9 + 12) & 0x2000) != 0 )
{
v6 = &v8[v7];
while ( 1 )
{
v4 = (*(long long ( **)(long long, unsigned long long *, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(v9 + 184) + 40LL))(
v9,
&v5,
v8,
v6);
if ( v4 <= 0 )
break;
if ( v5 > 0x7F )
return 3;
v8 += v4;
}
return 1;
}
else
{
return (unsigned int)my_string_repertoire_8bit(v9, v8, v7);
}
}
| my_string_repertoire:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x98],0x1
JNZ 0x001bc9f8
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x2000
CMP EAX,0x0
JNZ 0x001bc9f8
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001bc7a0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001bca5b
LAB_001bc9f8:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_001bca04:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x001bca52
CMP qword ptr [RBP + -0x30],0x7f
JBE 0x001bca3d
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001bca5b
LAB_001bca3d:
JMP 0x001bca3f
LAB_001bca3f:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001bca04
LAB_001bca52:
JMP 0x001bca54
LAB_001bca54:
MOV dword ptr [RBP + -0x4],0x1
LAB_001bca5b:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 my_string_repertoire(long param_1,long param_2,long param_3)
{
int iVar1;
ulong local_38;
long local_30;
long local_28;
long local_20;
long local_18;
int4 local_c;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((*(int *)(param_1 + 0x98) == 1) && ((*(uint *)(param_1 + 0xc) & 0x2000) == 0)) {
local_c = my_string_repertoire_8bit(param_1,param_2,param_3);
}
else {
local_30 = param_2 + param_3;
while (iVar1 = (**(code **)(*(long *)(local_18 + 0xb8) + 0x28))
(local_18,&local_38,local_20,local_30), 0 < iVar1) {
if (0x7f < local_38) {
return 3;
}
local_20 = local_20 + iVar1;
}
local_c = 1;
}
return local_c;
}
| |
38,439 | stbi_loadf_from_memory | monkey531[P]llama/examples/llava/../../common/stb_image.h | STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
{
stbi__context s;
stbi__start_mem(&s,buffer,len);
return stbi__loadf_main(&s,x,y,comp,req_comp);
} | O3 | c | stbi_loadf_from_memory:
subq $0xe8, %rsp
leaq 0x8(%rsp), %rax
movq $0x0, 0x10(%rax)
xorl %r10d, %r10d
movl %r10d, 0x30(%rax)
movl %r10d, 0xb8(%rax)
movq %rdi, 0xd0(%rax)
movq %rdi, 0xc0(%rax)
movslq %esi, %rsi
addq %rdi, %rsi
movq %rsi, 0xd8(%rax)
movq %rsi, 0xc8(%rax)
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
movl %r9d, %r8d
callq 0x28961
addq $0xe8, %rsp
retq
| stbi_loadf_from_memory:
sub rsp, 0E8h
lea rax, [rsp+0E8h+var_E0]
mov qword ptr [rax+10h], 0
xor r10d, r10d
mov [rax+30h], r10d
mov [rax+0B8h], r10d
mov [rax+0D0h], rdi
mov [rax+0C0h], rdi
movsxd rsi, esi
add rsi, rdi
mov [rax+0D8h], rsi
mov [rax+0C8h], rsi
mov rdi, rax
mov rsi, rdx
mov rdx, rcx
mov rcx, r8
mov r8d, r9d
call _ZL16stbi__loadf_mainP13stbi__contextPiS1_S1_i; stbi__loadf_main(stbi__context *,int *,int *,int *,int)
add rsp, 0E8h
retn
| long long stbi_loadf_from_memory(long long a1, int a2, long long a3, long long a4, long long a5, unsigned int a6)
{
_BYTE v7[16]; // [rsp+8h] [rbp-E0h] BYREF
long long v8; // [rsp+18h] [rbp-D0h]
int v9; // [rsp+38h] [rbp-B0h]
int v10; // [rsp+C0h] [rbp-28h]
long long v11; // [rsp+C8h] [rbp-20h]
long long v12; // [rsp+D0h] [rbp-18h]
long long v13; // [rsp+D8h] [rbp-10h]
long long v14; // [rsp+E0h] [rbp-8h]
v8 = 0LL;
v9 = 0;
v10 = 0;
v13 = a1;
v11 = a1;
v14 = a1 + a2;
v12 = v14;
return stbi__loadf_main(v7, a3, a4, a5, a6);
}
| stbi_loadf_from_memory:
SUB RSP,0xe8
LEA RAX,[RSP + 0x8]
MOV qword ptr [RAX + 0x10],0x0
XOR R10D,R10D
MOV dword ptr [RAX + 0x30],R10D
MOV dword ptr [RAX + 0xb8],R10D
MOV qword ptr [RAX + 0xd0],RDI
MOV qword ptr [RAX + 0xc0],RDI
MOVSXD RSI,ESI
ADD RSI,RDI
MOV qword ptr [RAX + 0xd8],RSI
MOV qword ptr [RAX + 0xc8],RSI
MOV RDI,RAX
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,R8
MOV R8D,R9D
CALL 0x00128961
ADD RSP,0xe8
RET
|
void stbi_loadf_from_memory
(long param_1,int param_2,int *param_3,int *param_4,int *param_5,int param_6)
{
stbi__context local_e0 [16];
int8 local_d0;
int4 local_b0;
int4 local_28;
long local_20;
long local_18;
long local_10;
long local_8;
local_d0 = 0;
local_b0 = 0;
local_28 = 0;
local_18 = param_2 + param_1;
local_20 = param_1;
local_10 = param_1;
local_8 = local_18;
stbi__loadf_main(local_e0,param_3,param_4,param_5,param_6);
return;
}
| |
38,440 | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<double&>(double&, bool) | monkey531[P]llama/common/json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O1 | cpp | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<double&>(double&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl 0x38(%rdi), %ecx
cmpq %rax, 0x20(%rdi)
sete %dl
testl %ecx, %ecx
sete %dil
andb %dl, %dil
cmpb $0x1, %dil
je 0x5f121
movl %ecx, %ecx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
leaq -0x1(%rcx), %rdx
addq $0x3e, %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
sarq $0x6, %rcx
leaq (%rax,%rcx,8), %rax
leaq 0x3f(%r15), %rcx
andq %rdx, %rcx
xorl %edi, %edi
cmpq %r15, %rcx
setbe %dil
movq -0x8(%rax,%rdi,8), %rax
btq %rdx, %rax
jae 0x5efb4
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movsd (%rsi), %xmm0
movq %r14, %rdi
callq 0x5f1bc
movq %r14, %rdi
movl $0x1, %esi
callq 0x57bfe
testb %bpl, %bpl
jne 0x5ef61
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0xc(%rsp)
movb $0x5, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x5f142
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
testb %al, %al
je 0x5f0f5
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x5efbe
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x5f0f5
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x5f018
cmpl $0x2, %ecx
jne 0x5f147
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5ca30
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x5f0f1
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x5f111
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x57bfe
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x57bfe
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x5a59a
movq %r15, %rdi
xorl %esi, %esi
callq 0x57bfe
movq %r15, %rdi
callq 0x5d3ea
movq (%rbx), %r14
jmp 0x5f0f1
movq 0x58(%rbx), %rax
movl 0x60(%rbx), %ecx
cmpq %rax, 0x48(%rbx)
sete %dl
testl %ecx, %ecx
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x5f155
movl %ecx, %esi
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
addq $0x3e, %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdi
leaq 0x3f(%r15), %rdx
andq %rcx, %rdx
xorl %r8d, %r8d
cmpq %r15, %rdx
setbe %r8b
movl $0x1, %edx
shlq %cl, %rdx
andq -0x8(%rdi,%r8,8), %rdx
subl $0x1, %esi
movl %esi, 0x60(%rbx)
jae 0x5f08a
movl $0x3f, 0x60(%rbx)
addq $-0x8, %rax
movq %rax, 0x58(%rbx)
testq %rdx, %rdx
je 0x5f0f5
cmpq $0x0, 0x70(%rbx)
je 0x5f176
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x57bfe
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x57bfe
movq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0x5a59a
movq %r15, %rdi
xorl %esi, %esi
callq 0x57bfe
movq %r15, %rdi
callq 0x5d3ea
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x5f0fa
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x57bfe
movq %r15, %rdi
callq 0x5d3ea
movl %ebx, %eax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x90abb(%rip), %rdi # 0xefbe3
leaq 0x8b011(%rip), %rdx # 0xea140
leaq 0x91a12(%rip), %rcx # 0xf0b48
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x1be80
callq 0x1b310
leaq 0x91a0e(%rip), %rcx # 0xf0b5c
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x5f161
leaq 0x91a3e(%rip), %rcx # 0xf0b9a
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x90a7b(%rip), %rdi # 0xefbe3
leaq 0x8afd1(%rip), %rdx # 0xea140
xorl %eax, %eax
callq 0x1be80
leaq 0x90a66(%rip), %rdi # 0xefbe3
leaq 0x8afbc(%rip), %rdx # 0xea140
leaq 0x91a27(%rip), %rcx # 0xf0bb2
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x1be80
jmp 0x5f199
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x57bfe
movq %r14, %rdi
callq 0x5d3ea
movq %rbx, %rdi
callq 0x1bf70
nop
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRdEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov ebp, edx
mov rbx, rdi
mov rax, [rdi+30h]
mov ecx, [rdi+38h]
cmp [rdi+20h], rax
setz dl
test ecx, ecx
setz dil
and dil, dl
cmp dil, 1
jz loc_5F121
mov ecx, ecx
mov r15, 8000000000000000h
lea rdx, [rcx-1]
add rcx, 3Eh ; '>'
test rdx, rdx
cmovns rcx, rdx
sar rcx, 6
lea rax, [rax+rcx*8]
lea rcx, [r15+3Fh]
and rcx, rdx
xor edi, edi
cmp rcx, r15
setbe dil
mov rax, [rax+rdi*8-8]
bt rax, rdx
jnb loc_5EFB4
xorps xmm0, xmm0
lea r14, [rsp+68h+var_58]
movaps xmmword ptr [r14], xmm0
movsd xmm0, qword ptr [rsi]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_float_t)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
test bpl, bpl
jnz short loc_5EF61
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+68h+var_5C], eax
mov [rsp+68h+var_5D], 5
cmp qword ptr [rbx+90h], 0
jz loc_5F142
lea rdi, [rbx+80h]
lea rsi, [rsp+68h+var_5C]
lea rdx, [rsp+68h+var_5D]
lea rcx, [rsp+68h+var_58]
call qword ptr [rbx+98h]
test al, al
jz loc_5F0F5
loc_5EF61:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_5EFBE
mov rax, [rax-8]
test rax, rax
jz loc_5F0F5
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz loc_5F018
cmp ecx, 2
jnz loc_5F147
mov rdi, [rax+8]
lea rsi, [rsp+68h+var_58]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_5F0F1
loc_5EFB4:
xor ebx, ebx
xor r14d, r14d
jmp loc_5F111
loc_5EFBE:
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_38]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rbx]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp loc_5F0F1
loc_5F018:
mov rax, [rbx+58h]
mov ecx, [rbx+60h]
cmp [rbx+48h], rax
setz dl
test ecx, ecx
setz sil
and sil, dl
cmp sil, 1
jz loc_5F155
mov esi, ecx
lea rcx, [rsi-1]
mov rdx, rsi
add rdx, 3Eh ; '>'
test rcx, rcx
cmovns rdx, rcx
sar rdx, 6
lea rdi, [rax+rdx*8]
lea rdx, [r15+3Fh]
and rdx, rcx
xor r8d, r8d
cmp rdx, r15
setbe r8b
mov edx, 1
shl rdx, cl
and rdx, [rdi+r8*8-8]
sub esi, 1
mov [rbx+60h], esi
jnb short loc_5F08A
mov dword ptr [rbx+60h], 3Fh ; '?'
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+58h], rax
loc_5F08A:
test rdx, rdx
jz short loc_5F0F5
cmp qword ptr [rbx+70h], 0
jz loc_5F176
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_48]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rbx+70h]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_5F0F1:
mov bl, 1
jmp short loc_5F0FA
loc_5F0F5:
xor ebx, ebx
xor r14d, r14d
loc_5F0FA:
lea r15, [rsp+68h+var_58]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_5F111:
mov eax, ebx
mov rdx, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_5F121:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_5F142:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_5F147:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_5F161
loc_5F155:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_5F161:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_5F176:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_5F199:
mov rbx, rax
lea r14, [rsp+68h+var_58]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<double &>(
long long a1,
double *a2,
char a3)
{
unsigned int v4; // ebx
long long v5; // rax
unsigned int v6; // ecx
signed long long v7; // rdx
long long v8; // rcx
long long v9; // rax
long long v10; // rax
unsigned __int8 *v11; // rax
int v12; // ecx
long long v13; // rax
unsigned int v14; // ecx
long long v15; // rsi
long long v16; // rcx
long long v17; // rdx
long long v18; // rdx
const char *v20; // rcx
long long v21; // rsi
long long v22; // rbx
char v23; // [rsp+Bh] [rbp-5Dh] BYREF
int v24; // [rsp+Ch] [rbp-5Ch] BYREF
__int128 v25; // [rsp+10h] [rbp-58h] BYREF
__int128 v26; // [rsp+20h] [rbp-48h] BYREF
_OWORD v27[3]; // [rsp+30h] [rbp-38h] BYREF
v4 = a1;
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
goto LABEL_28;
}
v7 = v6 - 1LL;
v8 = v6 + 62LL;
if ( v7 >= 0 )
v8 = v7;
v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8);
if ( _bittest64(&v9, v7) )
{
v25 = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
&v25,
*a2);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
if ( a3 )
{
LABEL_8:
v10 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v10 )
{
v27[0] = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)a1,
(long long)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v27);
goto LABEL_23;
}
v11 = *(unsigned __int8 **)(v10 - 8);
if ( v11 )
{
v12 = *v11;
if ( v12 != 1 )
{
if ( v12 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v11 + 1),
(long long)&v25);
LABEL_23:
LOBYTE(v4) = 1;
LABEL_25:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v25);
return v4;
}
v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v21 = 7243LL;
goto LABEL_31;
}
v13 = *(_QWORD *)(a1 + 88);
v14 = *(_DWORD *)(a1 + 96);
if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 )
{
v20 = "!key_keep_stack.empty()";
v21 = 7255LL;
LABEL_31:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v21,
"GGML_ASSERT(%s) failed",
v20);
goto LABEL_32;
}
v15 = v14;
v16 = v14 - 1LL;
v17 = v15 + 62;
if ( v16 >= 0 )
v17 = v16;
v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16);
*(_DWORD *)(a1 + 96) = v15 - 1;
if ( !(_DWORD)v15 )
{
*(_DWORD *)(a1 + 96) = 63;
*(_QWORD *)(a1 + 88) = v13 - 8;
}
if ( v18 )
{
if ( *(_QWORD *)(a1 + 112) )
{
v26 = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(a1 + 112),
(long long)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26);
goto LABEL_23;
}
LABEL_32:
v22 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v25);
_Unwind_Resume(v22);
}
}
LABEL_24:
v4 = 0;
goto LABEL_25;
}
v24 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3;
v23 = 5;
if ( *(_QWORD *)(a1 + 144) )
{
if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))(
a1 + 128,
&v24,
&v23,
&v25) )
goto LABEL_24;
goto LABEL_8;
}
LABEL_28:
std::__throw_bad_function_call();
}
return 0;
}
| handle_value<double&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV EBP,EDX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x30]
MOV ECX,dword ptr [RDI + 0x38]
CMP qword ptr [RDI + 0x20],RAX
SETZ DL
TEST ECX,ECX
SETZ DIL
AND DIL,DL
CMP DIL,0x1
JZ 0x0015f121
MOV ECX,ECX
MOV R15,-0x8000000000000000
LEA RDX,[RCX + -0x1]
ADD RCX,0x3e
TEST RDX,RDX
CMOVNS RCX,RDX
SAR RCX,0x6
LEA RAX,[RAX + RCX*0x8]
LEA RCX,[R15 + 0x3f]
AND RCX,RDX
XOR EDI,EDI
CMP RCX,R15
SETBE DIL
MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8]
BT RAX,RDX
JNC 0x0015efb4
XORPS XMM0,XMM0
LEA R14,[RSP + 0x10]
MOVAPS xmmword ptr [R14],XMM0
MOVSD XMM0,qword ptr [RSI]
MOV RDI,R14
CALL 0x0015f1bc
MOV RDI,R14
MOV ESI,0x1
CALL 0x00157bfe
TEST BPL,BPL
JNZ 0x0015ef61
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x5
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0015f142
LEA RDI,[RBX + 0x80]
LAB_0015ef44:
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JZ 0x0015f0f5
LAB_0015ef61:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0015efbe
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x0015f0f5
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x0015f018
CMP ECX,0x2
JNZ 0x0015f147
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x10]
CALL 0x0015ca30
LAB_0015ef9b:
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x0015f0f1
LAB_0015efb4:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x0015f111
LAB_0015efbe:
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x30]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x00157bfe
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x00157bfe
MOV RDI,qword ptr [RBX]
MOV RSI,R15
CALL 0x0015a59a
MOV RDI,R15
XOR ESI,ESI
CALL 0x00157bfe
MOV RDI,R15
CALL 0x0015d3ea
MOV R14,qword ptr [RBX]
JMP 0x0015f0f1
LAB_0015f018:
MOV RAX,qword ptr [RBX + 0x58]
MOV ECX,dword ptr [RBX + 0x60]
CMP qword ptr [RBX + 0x48],RAX
SETZ DL
TEST ECX,ECX
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JZ 0x0015f155
MOV ESI,ECX
LEA RCX,[RSI + -0x1]
MOV RDX,RSI
ADD RDX,0x3e
TEST RCX,RCX
CMOVNS RDX,RCX
SAR RDX,0x6
LEA RDI,[RAX + RDX*0x8]
LEA RDX,[R15 + 0x3f]
AND RDX,RCX
XOR R8D,R8D
CMP RDX,R15
SETBE R8B
MOV EDX,0x1
SHL RDX,CL
AND RDX,qword ptr [RDI + R8*0x8 + -0x8]
SUB ESI,0x1
MOV dword ptr [RBX + 0x60],ESI
JNC 0x0015f08a
MOV dword ptr [RBX + 0x60],0x3f
ADD RAX,-0x8
MOV qword ptr [RBX + 0x58],RAX
LAB_0015f08a:
TEST RDX,RDX
JZ 0x0015f0f5
CMP qword ptr [RBX + 0x70],0x0
JZ 0x0015f176
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x20]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x00157bfe
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x00157bfe
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R15
CALL 0x0015a59a
MOV RDI,R15
XOR ESI,ESI
CALL 0x00157bfe
MOV RDI,R15
CALL 0x0015d3ea
MOV R14,qword ptr [RBX + 0x70]
LAB_0015f0f1:
MOV BL,0x1
JMP 0x0015f0fa
LAB_0015f0f5:
XOR EBX,EBX
XOR R14D,R14D
LAB_0015f0fa:
LEA R15,[RSP + 0x10]
MOV RDI,R15
XOR ESI,ESI
CALL 0x00157bfe
MOV RDI,R15
CALL 0x0015d3ea
LAB_0015f111:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0015f121:
LEA RDI,[0x1efbe3]
LEA RDX,[0x1ea140]
LEA RCX,[0x1f0b48]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x0011be80
LAB_0015f142:
CALL 0x0011b310
LAB_0015f147:
LEA RCX,[0x1f0b5c]
MOV ESI,0x1c4b
JMP 0x0015f161
LAB_0015f155:
LEA RCX,[0x1f0b9a]
MOV ESI,0x1c57
LAB_0015f161:
LEA RDI,[0x1efbe3]
LEA RDX,[0x1ea140]
XOR EAX,EAX
CALL 0x0011be80
LAB_0015f176:
LEA RDI,[0x1efbe3]
LEA RDX,[0x1ea140]
LEA RCX,[0x1f0bb2]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x0011be80
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<double&>(double&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<double&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,double *param_1,bool param_2)
{
uint uVar1;
char cVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
int8 uVar6;
bool bVar7;
long lVar8;
int1 auVar9 [16];
int1 local_5d;
int4 local_5c;
ulong local_58;
int8 uStack_50;
ulong local_48;
int8 uStack_40;
ulong local_38;
int8 uStack_30;
uVar1 = *(uint *)(this + 0x38);
if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) &
1) == 0) {
uVar5 = 0;
lVar8 = 0;
goto LAB_0015f111;
}
local_58 = 0;
uStack_50 = 0;
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(SUB84(*param_1,0),&local_58);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
if (param_2) {
LAB_0015ef61:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_38 = local_58;
uStack_30 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_38,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this,(data *)&local_38);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_38);
lVar8 = *(long *)this;
}
else {
pcVar4 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar4 == (char *)0x0) goto LAB_0015f0f5;
if (*pcVar4 == '\x01') {
lVar8 = *(long *)(this + 0x58);
uVar1 = *(uint *)(this + 0x60);
if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) {
pcVar4 = "!key_keep_stack.empty()";
uVar6 = 0x1c57;
goto LAB_0015f161;
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8);
*(uint *)(this + 0x60) = uVar1 - 1;
if (uVar1 == 0) {
*(int4 *)(this + 0x60) = 0x3f;
*(long *)(this + 0x58) = lVar8 + -8;
}
if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_0015f0f5;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 0015f176 to 0015f196 has its CatchHandler @ 0015f197 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
0x1c60,"GGML_ASSERT(%s) failed","object_element");
}
local_48 = local_58;
uStack_40 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_48,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(this + 0x70),(data *)&local_48);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_48);
lVar8 = *(long *)(this + 0x70);
}
else {
if (*pcVar4 != '\x02') {
pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar6 = 0x1c4b;
LAB_0015f161:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
uVar6,"GGML_ASSERT(%s) failed",pcVar4);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(pcVar4 + 8),(basic_json *)&local_58);
lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar5 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_5d = 5;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 0015f142 to 0015f175 has its CatchHandler @ 0015f199 */
std::__throw_bad_function_call();
}
/* try { // try from 0015ef44 to 0015ef9a has its CatchHandler @ 0015f199 */
cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58);
if (cVar2 != '\0') goto LAB_0015ef61;
LAB_0015f0f5:
uVar5 = 0;
lVar8 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_58,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
LAB_0015f111:
auVar9._0_8_ = uVar5 & 0xffffffff;
auVar9._8_8_ = lVar8;
return auVar9;
}
| |
38,441 | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<double&>(double&, bool) | monkey531[P]llama/common/json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O2 | cpp | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<double&>(double&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %rax
cmpq 0x30(%rdi), %rax
jne 0x4489e
cmpl $0x0, 0x38(%rbx)
je 0x449f6
leaq 0x20(%rbx), %rdi
callq 0x419ae
testq %rdx, (%rax)
je 0x44939
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x44a80
testb %bpl, %bpl
jne 0x448ea
leaq 0x80(%rbx), %rdi
movq 0x10(%rbx), %rsi
subq 0x8(%rbx), %rsi
shrq $0x3, %rsi
pushq $0x5
popq %rdx
leaq 0x8(%rsp), %rcx
callq 0x419dc
testb %al, %al
je 0x449d7
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x44943
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x449d7
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x4496d
cmpl $0x2, %ecx
jne 0x44a17
movq 0x8(%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x41e12
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x449d3
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x449e6
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x41dde
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x400ba
movq %r14, %rdi
callq 0x3d534
movq (%rbx), %r14
jmp 0x449d3
movq 0x48(%rbx), %rax
cmpq 0x58(%rbx), %rax
jne 0x44981
cmpl $0x0, 0x60(%rbx)
je 0x44a25
leaq 0x48(%rbx), %rdi
callq 0x419ae
movq %rdx, %r14
leaq 0x58(%rbx), %rdi
movq (%rax), %r15
callq 0x41014
testq %r14, %r15
je 0x449d7
cmpq $0x0, 0x70(%rbx)
je 0x44a46
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x41dde
movq 0x70(%rbx), %rdi
movq %r14, %rsi
callq 0x400ba
movq %r14, %rdi
callq 0x3d534
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x449dc
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
callq 0x3d534
movl %ebx, %eax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6d1e9(%rip), %rdi # 0xb1be6
leaq 0x6773c(%rip), %rdx # 0xac140
leaq 0x6e14f(%rip), %rcx # 0xb2b5a
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x24e90
leaq 0x6e150(%rip), %rcx # 0xb2b6e
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x44a31
leaq 0x6e180(%rip), %rcx # 0xb2bac
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x6d1ae(%rip), %rdi # 0xb1be6
leaq 0x67701(%rip), %rdx # 0xac140
xorl %eax, %eax
callq 0x24e90
leaq 0x6d199(%rip), %rdi # 0xb1be6
leaq 0x676ec(%rip), %rdx # 0xac140
leaq 0x6e169(%rip), %rcx # 0xb2bc4
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x24e90
jmp 0x44a6b
jmp 0x44a6b
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3d534
movq %rbx, %rdi
callq 0x24f60
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRmEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 38h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rax, [rdi+20h]
cmp rax, [rdi+30h]
jnz short loc_4489E
cmp dword ptr [rbx+38h], 0
jz loc_449F6
loc_4489E:
lea rdi, [rbx+20h]
call _ZNSt6vectorIbSaIbEE4backEv; std::vector<bool>::back(void)
test [rax], rdx
jz loc_44939
lea rdi, [rsp+58h+var_50]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRmmTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
test bpl, bpl
jnz short loc_448EA
lea rdi, [rbx+80h]
mov rsi, [rbx+10h]
sub rsi, [rbx+8]
shr rsi, 3
push 5
pop rdx
lea rcx, [rsp+58h+var_50]
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
test al, al
jz loc_449D7
loc_448EA:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_44943
mov rax, [rax-8]
test rax, rax
jz loc_449D7
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz short loc_4496D
cmp ecx, 2
jnz loc_44A17
mov rdi, [rax+8]
lea rsi, [rsp+58h+var_50]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_449D3
loc_44939:
xor ebx, ebx
xor r14d, r14d
jmp loc_449E6
loc_44943:
lea r14, [rsp+58h+var_30]
lea rsi, [rsp+58h+var_50]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rdi, [rbx]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov r14, [rbx]
jmp short loc_449D3
loc_4496D:
mov rax, [rbx+48h]
cmp rax, [rbx+58h]
jnz short loc_44981
cmp dword ptr [rbx+60h], 0
jz loc_44A25
loc_44981:
lea rdi, [rbx+48h]
call _ZNSt6vectorIbSaIbEE4backEv; std::vector<bool>::back(void)
mov r14, rdx
lea rdi, [rbx+58h]; this
mov r15, [rax]
call _ZNSt18_Bit_iterator_base12_M_bump_downEv; std::_Bit_iterator_base::_M_bump_down(void)
test r15, r14
jz short loc_449D7
cmp qword ptr [rbx+70h], 0
jz loc_44A46
lea r14, [rsp+58h+var_40]
lea rsi, [rsp+58h+var_50]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rdi, [rbx+70h]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov r14, [rbx+70h]
loc_449D3:
mov bl, 1
jmp short loc_449DC
loc_449D7:
xor ebx, ebx
xor r14d, r14d
loc_449DC:
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_449E6:
mov eax, ebx
mov rdx, r14
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_449F6:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_44A17:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_44A31
loc_44A25:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_44A31:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_44A46:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short loc_44A6B
jmp short $+2
loc_44A6B:
mov rbx, rax
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<unsigned long &>(
long long a1,
long long a2,
char a3)
{
unsigned int v4; // ebx
_QWORD *v5; // rax
long long v6; // rdx
long long v7; // rax
unsigned __int8 *v8; // rax
int v9; // ecx
long long *v10; // rax
long long v11; // rdx
long long v12; // r14
long long v13; // r15
const char *v15; // rcx
long long v16; // rsi
long long v17; // rbx
_BYTE v18[16]; // [rsp+8h] [rbp-50h] BYREF
char v19[16]; // [rsp+18h] [rbp-40h] BYREF
char v20[48]; // [rsp+28h] [rbp-30h] BYREF
v4 = a1;
if ( *(_QWORD *)(a1 + 32) == *(_QWORD *)(a1 + 48) && !*(_DWORD *)(a1 + 56) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
LABEL_23:
v15 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v16 = 7243LL;
LABEL_25:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v16,
"GGML_ASSERT(%s) failed",
v15);
goto LABEL_26;
}
v5 = (_QWORD *)std::vector<bool>::back(a1 + 32);
if ( (v6 & *v5) != 0 )
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRmmTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(
v18,
a2);
if ( a3
|| (unsigned __int8)std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
a1 + 128,
(*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3,
5) )
{
v7 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v7 )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v20,
(long long)v18);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)a1,
(long long)v20);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v20);
goto LABEL_18;
}
v8 = *(unsigned __int8 **)(v7 - 8);
if ( v8 )
{
v9 = *v8;
if ( v9 != 1 )
{
if ( v9 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v8 + 1),
(long long)v18);
LABEL_18:
LOBYTE(v4) = 1;
LABEL_20:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v18);
return v4;
}
goto LABEL_23;
}
if ( *(_QWORD *)(a1 + 72) == *(_QWORD *)(a1 + 88) && !*(_DWORD *)(a1 + 96) )
{
v15 = "!key_keep_stack.empty()";
v16 = 7255LL;
goto LABEL_25;
}
v10 = (long long *)std::vector<bool>::back(a1 + 72);
v12 = v11;
v13 = *v10;
std::_Bit_iterator_base::_M_bump_down((std::_Bit_iterator_base *)(a1 + 88));
if ( (v12 & v13) != 0 )
{
if ( *(_QWORD *)(a1 + 112) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v19,
(long long)v18);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(a1 + 112),
(long long)v19);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v19);
goto LABEL_18;
}
LABEL_26:
v17 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v18);
_Unwind_Resume(v17);
}
}
}
v4 = 0;
goto LABEL_20;
}
return 0;
}
| handle_value<unsigned_long&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x20]
CMP RAX,qword ptr [RDI + 0x30]
JNZ 0x0014489e
CMP dword ptr [RBX + 0x38],0x0
JZ 0x001449f6
LAB_0014489e:
LEA RDI,[RBX + 0x20]
CALL 0x001419ae
TEST qword ptr [RAX],RDX
JZ 0x00144939
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x00144a80
TEST BPL,BPL
JNZ 0x001448ea
LEA RDI,[RBX + 0x80]
MOV RSI,qword ptr [RBX + 0x10]
SUB RSI,qword ptr [RBX + 0x8]
SHR RSI,0x3
LAB_001448d5:
PUSH 0x5
POP RDX
LEA RCX,[RSP + 0x8]
CALL 0x001419dc
TEST AL,AL
JZ 0x001449d7
LAB_001448ea:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x00144943
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x001449d7
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x0014496d
CMP ECX,0x2
JNZ 0x00144a17
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x8]
CALL 0x00141e12
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x001449d3
LAB_00144939:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x001449e6
LAB_00144943:
LEA R14,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00141dde
MOV RDI,qword ptr [RBX]
MOV RSI,R14
CALL 0x001400ba
MOV RDI,R14
CALL 0x0013d534
MOV R14,qword ptr [RBX]
JMP 0x001449d3
LAB_0014496d:
MOV RAX,qword ptr [RBX + 0x48]
CMP RAX,qword ptr [RBX + 0x58]
JNZ 0x00144981
CMP dword ptr [RBX + 0x60],0x0
JZ 0x00144a25
LAB_00144981:
LEA RDI,[RBX + 0x48]
CALL 0x001419ae
LAB_0014498a:
MOV R14,RDX
LEA RDI,[RBX + 0x58]
MOV R15,qword ptr [RAX]
CALL 0x00141014
TEST R15,R14
JZ 0x001449d7
CMP qword ptr [RBX + 0x70],0x0
JZ 0x00144a46
LEA R14,[RSP + 0x18]
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00141dde
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R14
CALL 0x001400ba
MOV RDI,R14
CALL 0x0013d534
MOV R14,qword ptr [RBX + 0x70]
LAB_001449d3:
MOV BL,0x1
JMP 0x001449dc
LAB_001449d7:
XOR EBX,EBX
XOR R14D,R14D
LAB_001449dc:
LEA RDI,[RSP + 0x8]
CALL 0x0013d534
LAB_001449e6:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001449f6:
LEA RDI,[0x1b1be6]
LEA RDX,[0x1ac140]
LEA RCX,[0x1b2b5a]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x00124e90
LAB_00144a17:
LEA RCX,[0x1b2b6e]
MOV ESI,0x1c4b
JMP 0x00144a31
LAB_00144a25:
LEA RCX,[0x1b2bac]
MOV ESI,0x1c57
LAB_00144a31:
LEA RDI,[0x1b1be6]
LEA RDX,[0x1ac140]
XOR EAX,EAX
CALL 0x00124e90
LAB_00144a46:
LEA RDI,[0x1b1be6]
LEA RDX,[0x1ac140]
LEA RCX,[0x1b2bc4]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x00124e90
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<unsigned long&>(unsigned long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<unsigned_long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong *param_1,bool param_2)
{
char cVar1;
char *pcVar2;
ulong uVar3;
int8 uVar4;
long lVar5;
int1 auVar6 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_50 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_40 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_30 [16];
if ((*(long *)(this + 0x20) == *(long *)(this + 0x30)) && (*(int *)(this + 0x38) == 0)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
auVar6 = std::vector<bool,std::allocator<bool>>::back
((vector<bool,std::allocator<bool>> *)(this + 0x20));
if ((*auVar6._0_8_ & auVar6._8_8_) == 0) {
uVar3 = 0;
lVar5 = 0;
goto LAB_001449e6;
}
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRmmTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
(local_50,param_1);
if (param_2) {
LAB_001448ea:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_30,local_50);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this,local_30);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_30);
lVar5 = *(long *)this;
}
else {
pcVar2 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar2 == (char *)0x0) goto LAB_001449d7;
if (*pcVar2 == '\x01') {
if ((*(long *)(this + 0x48) == *(long *)(this + 0x58)) && (*(int *)(this + 0x60) == 0)) {
pcVar2 = "!key_keep_stack.empty()";
uVar4 = 0x1c57;
goto LAB_00144a31;
}
/* try { // try from 00144981 to 00144989 has its CatchHandler @ 00144a69 */
auVar6 = std::vector<bool,std::allocator<bool>>::back
((vector<bool,std::allocator<bool>> *)(this + 0x48));
uVar3 = *auVar6._0_8_;
std::_Bit_iterator_base::_M_bump_down((_Bit_iterator_base *)(this + 0x58));
if ((uVar3 & auVar6._8_8_) == 0) goto LAB_001449d7;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 00144a46 to 00144a66 has its CatchHandler @ 00144a67 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
0x1c60,"GGML_ASSERT(%s) failed","object_element");
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_40,local_50);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(this + 0x70),local_40);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_40);
lVar5 = *(long *)(this + 0x70);
}
else {
if (*pcVar2 != '\x02') {
pcVar2 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar4 = 0x1c4b;
LAB_00144a31:
/* try { // try from 00144a31 to 00144a45 has its CatchHandler @ 00144a6b */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
uVar4,"GGML_ASSERT(%s) failed",pcVar2);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(pcVar2 + 8),local_50);
lVar5 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar3 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
/* try { // try from 001448d5 to 0014491f has its CatchHandler @ 00144a6b */
cVar1 = std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()(this + 0x80,(ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3,5,
local_50);
if (cVar1 != '\0') goto LAB_001448ea;
LAB_001449d7:
uVar3 = 0;
lVar5 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_50);
LAB_001449e6:
auVar6._0_8_ = uVar3 & 0xffffffff;
auVar6._8_8_ = lVar5;
return auVar6;
}
| |
38,442 | my_close | eloqsql/mysys/my_open.c | int my_close(File fd, myf MyFlags)
{
int err;
char *name= NULL;
DBUG_ENTER("my_close");
DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE)))
MyFlags|= my_global_flags;
if ((uint) fd < my_file_limit && my_file_info[fd].type != UNOPEN)
{
name= my_file_info[fd].name;
my_file_info[fd].name= NULL;
my_file_info[fd].type= UNOPEN;
}
#ifndef _WIN32
err= close(fd);
#else
err= my_win_close(fd);
#endif
if (err)
{
DBUG_PRINT("error",("Got error %d on close",err));
my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_BADCLOSE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
name,errno);
}
if (name)
{
my_free(name);
}
my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED);
DBUG_RETURN(err);
} | O0 | c | my_close:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
jmp 0xfcca9
movq -0x10(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
jne 0xfccc9
leaq 0xb9518a(%rip), %rax # 0xc91e48
movq (%rax), %rax
orq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %eax
leaq 0x1d0cbd(%rip), %rcx # 0x2cd990
cmpl (%rcx), %eax
jae 0xfcd46
leaq 0x1d0cba(%rip), %rax # 0x2cd998
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0xfcd46
leaq 0x1d0c9f(%rip), %rax # 0x2cd998
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
leaq 0x1d0c83(%rip), %rax # 0x2cd998
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
leaq 0x1d0c67(%rip), %rax # 0x2cd998
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movl -0x4(%rbp), %edi
callq 0x2a1b0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0xfcdb4
jmp 0xfcd59
jmp 0xfcd5b
callq 0x2a750
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
callq 0xfea30
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0xfcdb2
movq -0x10(%rbp), %rax
andq $0x440, %rax # imm = 0x440
orq $0x4, %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x2a750
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl (%rax), %ecx
movl $0x4, %edi
movb $0x0, %al
callq 0xf4b80
jmp 0xfcdb4
cmpq $0x0, -0x20(%rbp)
je 0xfcdc4
movq -0x20(%rbp), %rdi
callq 0xfc410
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
movl -0x24(%rbp), %eax
leaq 0xb9507f(%rip), %rcx # 0xc91e54
lock
xaddl %eax, (%rcx)
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_close:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_20], 0
jmp short $+2
loc_FCCA9:
mov rax, [rbp+var_10]
and rax, 18h
cmp rax, 0
jnz short loc_FCCC9
lea rax, my_global_flags
mov rax, [rax]
or rax, [rbp+var_10]
mov [rbp+var_10], rax
loc_FCCC9:
mov eax, [rbp+var_4]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_FCD46
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_4]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 0
jz short loc_FCD46
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_4]
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_20], rax
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_4]
shl rcx, 4
add rax, rcx
mov qword ptr [rax], 0
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_4]
shl rcx, 4
add rax, rcx
mov dword ptr [rax+8], 0
loc_FCD46:
mov edi, [rbp+var_4]
call _close
mov [rbp+var_14], eax
cmp [rbp+var_14], 0
jz short loc_FCDB4
jmp short $+2
loc_FCD59:
jmp short $+2
loc_FCD5B:
call ___errno_location
mov eax, [rax]
mov [rbp+var_2C], eax
call _my_thread_var
mov ecx, [rbp+var_2C]
mov [rax], ecx
mov rax, [rbp+var_10]
and rax, 18h
cmp rax, 0
jz short loc_FCDB2
mov rax, [rbp+var_10]
and rax, 440h
or rax, 4
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
call ___errno_location
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
mov ecx, [rax]
mov edi, 4
mov al, 0
call my_error
loc_FCDB2:
jmp short $+2
loc_FCDB4:
cmp [rbp+var_20], 0
jz short loc_FCDC4
mov rdi, [rbp+var_20]
call my_free
loc_FCDC4:
mov [rbp+var_24], 0FFFFFFFFh
mov eax, [rbp+var_24]
lea rcx, my_file_opened
lock xadd [rcx], eax
mov [rbp+var_28], eax
mov eax, [rbp+var_14]
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
add rsp, 50h
pop rbp
retn
| long long my_close(unsigned int a1, const char *a2)
{
unsigned int *v2; // rax
int v4; // [rsp+24h] [rbp-2Ch]
long long v5; // [rsp+30h] [rbp-20h]
unsigned int v6; // [rsp+3Ch] [rbp-14h]
__int16 v7; // [rsp+40h] [rbp-10h]
v7 = (__int16)a2;
v5 = 0LL;
if ( ((unsigned __int8)a2 & 0x18) == 0 )
v7 = (unsigned __int16)a2 | my_global_flags;
if ( a1 < my_file_limit && *((_DWORD *)my_file_info + 4 * (int)a1 + 2) )
{
v5 = *((_QWORD *)my_file_info + 2 * (int)a1);
*((_QWORD *)my_file_info + 2 * (int)a1) = 0LL;
*((_DWORD *)my_file_info + 4 * (int)a1 + 2) = 0;
}
v6 = close(a1);
if ( v6 )
{
v4 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a1, a2) = v4;
if ( (v7 & 0x18) != 0 )
{
v2 = (unsigned int *)__errno_location();
my_error(4u, v7 & 0x440 | 4LL, v5, *v2);
}
}
if ( v5 )
my_free(v5);
_InterlockedExchangeAdd(my_file_opened, 0xFFFFFFFF);
return v6;
}
| my_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x20],0x0
JMP 0x001fcca9
LAB_001fcca9:
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x18
CMP RAX,0x0
JNZ 0x001fccc9
LEA RAX,[0xd91e48]
MOV RAX,qword ptr [RAX]
OR RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
LAB_001fccc9:
MOV EAX,dword ptr [RBP + -0x4]
LEA RCX,[0x3cd990]
CMP EAX,dword ptr [RCX]
JNC 0x001fcd46
LEA RAX,[0x3cd998]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x0
JZ 0x001fcd46
LEA RAX,[0x3cd998]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x3cd998]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RAX],0x0
LEA RAX,[0x3cd998]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV dword ptr [RAX + 0x8],0x0
LAB_001fcd46:
MOV EDI,dword ptr [RBP + -0x4]
CALL 0x0012a1b0
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],0x0
JZ 0x001fcdb4
JMP 0x001fcd59
LAB_001fcd59:
JMP 0x001fcd5b
LAB_001fcd5b:
CALL 0x0012a750
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CALL 0x001fea30
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x18
CMP RAX,0x0
JZ 0x001fcdb2
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x440
OR RAX,0x4
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
CALL 0x0012a750
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX]
MOV EDI,0x4
MOV AL,0x0
CALL 0x001f4b80
LAB_001fcdb2:
JMP 0x001fcdb4
LAB_001fcdb4:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001fcdc4
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001fc410
LAB_001fcdc4:
MOV dword ptr [RBP + -0x24],0xffffffff
MOV EAX,dword ptr [RBP + -0x24]
LEA RCX,[0xd91e54]
XADD.LOCK dword ptr [RCX],EAX
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
ADD RSP,0x50
POP RBP
RET
|
int my_close(uint param_1,ulong param_2)
{
int iVar1;
int iVar2;
int *piVar3;
long local_28;
ulong local_18;
local_28 = 0;
local_18 = param_2;
if ((param_2 & 0x18) == 0) {
local_18 = my_global_flags | param_2;
}
if ((param_1 < my_file_limit) && (*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) != 0)) {
local_28 = *(long *)(my_file_info + (long)(int)param_1 * 0x10);
*(int8 *)(my_file_info + (long)(int)param_1 * 0x10) = 0;
*(int4 *)(my_file_info + (long)(int)param_1 * 0x10 + 8) = 0;
}
iVar2 = close(param_1);
if (iVar2 != 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((local_18 & 0x18) != 0) {
piVar3 = __errno_location();
my_error(4,local_18 & 0x440 | 4,local_28,*piVar3);
}
}
if (local_28 != 0) {
my_free(local_28);
}
LOCK();
my_file_opened = my_file_opened + -1;
UNLOCK();
return iVar2;
}
| |
38,443 | LefDefParser::defiSlot::yh(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiSlot.cpp | int defiSlot::yh(int index) const {
char msg[160];
if (index < 0 || index >= numRectangles_) {
sprintf (msg, "ERROR (DEFPARS-6160): The index number %d specified for the SLOT RECTANGLE is invalid.\nValid index number is from 0 to %d. Specify a valid index number and then try again.",
index, numRectangles_);
defiError(0, 6160, msg, defData);
return 0;
}
return yh_[index];
} | O3 | cpp | LefDefParser::defiSlot::yh(int) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movl %esi, %edx
movq %rdi, %rbx
testl %esi, %esi
setns %al
movl 0x14(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x2cf58
movq 0x38(%rbx), %rax
movl %edx, %ecx
movl (%rax,%rcx,4), %ebp
jmp 0x2cf81
leaq 0x16d0d(%rip), %rsi # 0x43c6c
xorl %ebp, %ebp
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x6060
movq 0x50(%rbx), %rcx
xorl %edi, %edi
movl $0x1810, %esi # imm = 0x1810
movq %r14, %rdx
callq 0x18f80
movl %ebp, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZNK12LefDefParser8defiSlot2yhEi:
push rbp
push r14
push rbx
sub rsp, 0A0h
mov edx, esi
mov rbx, rdi
test esi, esi
setns al
mov ecx, [rdi+14h]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_2CF58
mov rax, [rbx+38h]
mov ecx, edx
mov ebp, [rax+rcx*4]
jmp short loc_2CF81
loc_2CF58:
lea rsi, aErrorDefpars61_9; "ERROR (DEFPARS-6160): The index number "...
xor ebp, ebp
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
mov rcx, [rbx+50h]; LefDefParser::defrData *
xor edi, edi; this
mov esi, 1810h; int
mov rdx, r14; char *
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
loc_2CF81:
mov eax, ebp
add rsp, 0A0h
pop rbx
pop r14
pop rbp
retn
| long long LefDefParser::defiSlot::yh(LefDefParser::defiSlot *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 + 5);
if ( v2 > a2 && a2 >= 0 )
{
return *(unsigned int *)(*((_QWORD *)this + 7) + 4LL * (unsigned int)a2);
}
else
{
v3 = 0;
sprintf(
v6,
"ERROR (DEFPARS-6160): The index number %d specified for the SLOT RECTANGLE is invalid.\n"
"Valid index number is from 0 to %d. Specify a valid index number and then try again.",
a2,
v2);
LefDefParser::defiError(0LL, 6160, v6, *((LefDefParser::defrData **)this + 10), v4);
}
return v3;
}
| yh:
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 + 0x14]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0012cf58
MOV RAX,qword ptr [RBX + 0x38]
MOV ECX,EDX
MOV EBP,dword ptr [RAX + RCX*0x4]
JMP 0x0012cf81
LAB_0012cf58:
LEA RSI,[0x143c6c]
XOR EBP,EBP
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00106060
MOV RCX,qword ptr [RBX + 0x50]
XOR EDI,EDI
MOV ESI,0x1810
MOV RDX,R14
CALL 0x00118f80
LAB_0012cf81:
MOV EAX,EBP
ADD RSP,0xa0
POP RBX
POP R14
POP RBP
RET
|
/* LefDefParser::defiSlot::yh(int) const */
int4 __thiscall LefDefParser::defiSlot::yh(defiSlot *this,int param_1)
{
int4 uVar1;
char acStack_b8 [160];
if (param_1 < 0 || *(int *)(this + 0x14) <= param_1) {
uVar1 = 0;
sprintf(acStack_b8,
"ERROR (DEFPARS-6160): The index number %d specified for the SLOT RECTANGLE is invalid.\nValid index number is from 0 to %d. Specify a valid index number and then try again."
);
defiError(0,0x1810,acStack_b8,*(defrData **)(this + 0x50));
}
else {
uVar1 = *(int4 *)(*(long *)(this + 0x38) + (ulong)(uint)param_1 * 4);
}
return uVar1;
}
| |
38,444 | ggml_flash_attn_back | monkey531[P]llama/ggml/src/ggml.c | struct ggml_tensor * ggml_flash_attn_back(
struct ggml_context * ctx,
struct ggml_tensor * q,
struct ggml_tensor * k,
struct ggml_tensor * v,
struct ggml_tensor * d,
bool masked) {
GGML_ABORT("TODO: adapt to ggml_flash_attn_ext() changes");
GGML_ASSERT(ggml_can_mul_mat(k, q));
// TODO: check if vT can be multiplied by (k*qT)
// d shape [D,N,ne2,ne3]
// q shape [D,N,ne2,ne3]
// k shape [D,M,kvne2,ne3]
// v shape [M,D,kvne2,ne3]
const int64_t D = q->ne[0];
const int64_t N = q->ne[1];
const int64_t M = k->ne[1];
const int64_t ne2 = q->ne[2];
const int64_t ne3 = q->ne[3];
const int64_t kvne2 = k->ne[2];
GGML_ASSERT(k->ne[0] == D);
GGML_ASSERT(v->ne[0] == M);
GGML_ASSERT(v->ne[1] == D);
GGML_ASSERT(d->ne[0] == D);
GGML_ASSERT(d->ne[1] == N);
GGML_ASSERT(k->ne[2] == kvne2);
GGML_ASSERT(k->ne[3] == ne3);
GGML_ASSERT(v->ne[2] == kvne2);
GGML_ASSERT(v->ne[3] == ne3);
GGML_ASSERT(d->ne[2] == ne2);
GGML_ASSERT(d->ne[3] == ne3);
GGML_ASSERT(ne2 % kvne2 == 0);
// store gradients of q, k and v as continuous tensors concatenated in result.
// note: v and gradv are actually transposed, i.e. v->ne[0] != D.
const int64_t elem_q = ggml_nelements(q);
const int64_t elem_k = ggml_nelements(k);
const int64_t elem_v = ggml_nelements(v);
enum ggml_type result_type = GGML_TYPE_F32;
GGML_ASSERT(ggml_blck_size(result_type) == 1);
const size_t tsize = ggml_type_size(result_type);
const size_t offs_q = 0;
const size_t offs_k = offs_q + GGML_PAD(elem_q * tsize, GGML_MEM_ALIGN);
const size_t offs_v = offs_k + GGML_PAD(elem_k * tsize, GGML_MEM_ALIGN);
const size_t end = offs_v + GGML_PAD(elem_v * tsize, GGML_MEM_ALIGN);
const size_t nelements = (end + tsize - 1)/tsize;
struct ggml_tensor * result = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, nelements);
int32_t masked_i = masked ? 1 : 0;
ggml_set_op_params(result, &masked_i, sizeof(masked_i));
result->op = GGML_OP_FLASH_ATTN_BACK;
result->src[0] = q;
result->src[1] = k;
result->src[2] = v;
result->src[3] = d;
return result;
} | O0 | c | ggml_flash_attn_back:
subq $0xc8, %rsp
movb %r9b, %al
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq %rdx, 0xb0(%rsp)
movq %rcx, 0xa8(%rsp)
movq %r8, 0xa0(%rsp)
andb $0x1, %al
movb %al, 0x9f(%rsp)
leaq 0x62ae5(%rip), %rdi # 0xb45b7
movl $0x1117, %esi # imm = 0x1117
leaq 0x63409(%rip), %rdx # 0xb4ee7
movb $0x0, %al
callq 0x46770
nopw %cs:(%rax,%rax)
| ggml_flash_attn_back:
sub rsp, 0C8h
mov al, r9b
mov [rsp+0C8h+var_8], rdi
mov [rsp+0C8h+var_10], rsi
mov [rsp+0C8h+var_18], rdx
mov [rsp+0C8h+var_20], rcx
mov [rsp+0C8h+var_28], r8
and al, 1
mov [rsp+0C8h+var_29], al
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1117h
lea rdx, aTodoAdaptToGgm; "TODO: adapt to ggml_flash_attn_ext() ch"...
mov al, 0
call _ggml_abort
| void __noreturn ggml_flash_attn_back()
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",
4375,
(long long)"TODO: adapt to ggml_flash_attn_ext() changes");
}
| ggml_flash_attn_back:
SUB RSP,0xc8
MOV AL,R9B
MOV qword ptr [RSP + 0xc0],RDI
MOV qword ptr [RSP + 0xb8],RSI
MOV qword ptr [RSP + 0xb0],RDX
MOV qword ptr [RSP + 0xa8],RCX
MOV qword ptr [RSP + 0xa0],R8
AND AL,0x1
MOV byte ptr [RSP + 0x9f],AL
LEA RDI,[0x1b45b7]
MOV ESI,0x1117
LEA RDX,[0x1b4ee7]
MOV AL,0x0
CALL 0x00146770
NOP dword ptr CS:[RAX + RAX*0x1]
|
long ggml_flash_attn_back(void)
{
int8 uVar1;
ulong uVar2;
long lVar3;
long lVar4;
long extraout_RDX;
long lVar5;
char *pcVar6;
pcVar6 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c";
lVar5 = 0x1117;
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x1117,
"TODO: adapt to ggml_flash_attn_ext() changes");
uVar2 = ggml_is_3d(lVar5);
if ((uVar2 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x115b,
"GGML_ASSERT(%s) failed","ggml_is_3d(sx)");
}
uVar2 = ggml_is_matrix(extraout_RDX);
if ((uVar2 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x115c,
"GGML_ASSERT(%s) failed","ggml_is_matrix(c)");
}
lVar4 = *(long *)(extraout_RDX + 0x18);
lVar3 = (*(long *)(lVar5 + 0x10) - *(long *)(extraout_RDX + 0x10)) + 1;
uVar1 = *(int8 *)(lVar5 + 0x20);
if (*(long *)(lVar5 + 0x10) != *(long *)(extraout_RDX + 0x10) + -1 + lVar3) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x1165,
"GGML_ASSERT(%s) failed","sx->ne[0] == d_conv - 1 + n_t");
}
if (*(long *)(lVar5 + 0x18) != lVar4) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x1166,
"GGML_ASSERT(%s) failed","sx->ne[1] == d_inner");
}
if (lVar3 < 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x1167,
"GGML_ASSERT(%s) failed","n_t >= 0");
}
lVar4 = ggml_new_tensor_3d(pcVar6,0,lVar4,lVar3,uVar1);
*(int4 *)(lVar4 + 0x50) = 0x3f;
*(long *)(lVar4 + 0x98) = lVar5;
*(long *)(lVar4 + 0xa0) = extraout_RDX;
return lVar4;
}
| |
38,445 | mi_dynmap_file | eloqsql/storage/myisam/mi_dynrec.c | my_bool mi_dynmap_file(MI_INFO *info, my_off_t size)
{
DBUG_ENTER("mi_dynmap_file");
if (size == 0 || size > (my_off_t) (~((size_t) 0)))
{
if (size)
DBUG_PRINT("warning", ("File is too large for mmap"));
else
DBUG_PRINT("warning", ("Do not mmap zero-length"));
DBUG_RETURN(1);
}
/*
I wonder if it is good to use MAP_NORESERVE. From the Linux man page:
MAP_NORESERVE
Do not reserve swap space for this mapping. When swap space is
reserved, one has the guarantee that it is possible to modify the
mapping. When swap space is not reserved one might get SIGSEGV
upon a write if no physical memory is available.
*/
info->s->file_map= (uchar*)
my_mmap(0, (size_t) size,
info->s->mode==O_RDONLY ? PROT_READ :
PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_NORESERVE,
info->dfile, 0L);
if (info->s->file_map == (uchar*) MAP_FAILED)
{
info->s->file_map= NULL;
DBUG_RETURN(1);
}
#if defined(HAVE_MADVISE)
madvise((char*) info->s->file_map, size, MADV_RANDOM);
#endif
info->s->mmaped_length= (size_t) size;
info->s->file_read= mi_mmap_pread;
info->s->file_write= mi_mmap_pwrite;
DBUG_RETURN(0);
} | O3 | c | mi_dynmap_file:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movb $0x1, %r14b
testq %rsi, %rsi
je 0x77d57
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rax
xorl %ecx, %ecx
cmpl $0x0, 0x358(%rax)
setne %cl
leal 0x1(,%rcx,2), %edx
movl 0x1c0(%rdi), %r8d
xorl %edi, %edi
movl $0x4001, %ecx # imm = 0x4001
xorl %r9d, %r9d
callq 0x295e0
movq (%rbx), %rcx
movq %rax, 0x270(%rcx)
movq (%rbx), %rax
movq 0x270(%rax), %rdi
cmpq $-0x1, %rdi
je 0x77d4c
movq %r15, %rsi
movl $0x1, %edx
callq 0x29480
movq (%rbx), %rax
movq %r15, 0x4d0(%rax)
movq (%rbx), %rax
leaq 0x36(%rip), %rcx # 0x77d65
movq %rcx, 0x2e0(%rax)
movq (%rbx), %rax
leaq 0x1f3(%rip), %rcx # 0x77f33
movq %rcx, 0x2e8(%rax)
xorl %r14d, %r14d
jmp 0x77d57
movq $0x0, 0x270(%rax)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mi_dynmap_file:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14b, 1
test rsi, rsi
jz loc_77D57
mov r15, rsi
mov rbx, rdi
mov rax, [rdi]
xor ecx, ecx
cmp dword ptr [rax+358h], 0
setnz cl
lea edx, ds:1[rcx*2]
mov r8d, [rdi+1C0h]
xor edi, edi
mov ecx, 4001h
xor r9d, r9d
call _mmap64
mov rcx, [rbx]
mov [rcx+270h], rax
mov rax, [rbx]
mov rdi, [rax+270h]
cmp rdi, 0FFFFFFFFFFFFFFFFh
jz short loc_77D4C
mov rsi, r15
mov edx, 1
call _madvise
mov rax, [rbx]
mov [rax+4D0h], r15
mov rax, [rbx]
lea rcx, mi_mmap_pread
mov [rax+2E0h], rcx
mov rax, [rbx]
lea rcx, mi_mmap_pwrite
mov [rax+2E8h], rcx
xor r14d, r14d
jmp short loc_77D57
loc_77D4C:
mov qword ptr [rax+270h], 0
loc_77D57:
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mi_dynmap_file(unsigned int *a1, long long a2)
{
long long v2; // rax
unsigned int v3; // r14d
long long v5; // rax
long long v6; // rdi
LOBYTE(v3) = 1;
if ( a2 )
{
*(_QWORD *)(*(_QWORD *)a1 + 624LL) = mmap64(
0LL,
a2,
2 * (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 856LL) != 0) + 1,
16385LL,
a1[112],
0LL,
v2);
v5 = *(_QWORD *)a1;
v6 = *(_QWORD *)(*(_QWORD *)a1 + 624LL);
if ( v6 == -1 )
{
*(_QWORD *)(v5 + 624) = 0LL;
}
else
{
madvise(v6, a2, 1LL);
*(_QWORD *)(*(_QWORD *)a1 + 1232LL) = a2;
*(_QWORD *)(*(_QWORD *)a1 + 736LL) = mi_mmap_pread;
*(_QWORD *)(*(_QWORD *)a1 + 744LL) = mi_mmap_pwrite;
return 0;
}
}
return v3;
}
| mi_dynmap_file:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14B,0x1
TEST RSI,RSI
JZ 0x00177d57
MOV R15,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
XOR ECX,ECX
CMP dword ptr [RAX + 0x358],0x0
SETNZ CL
LEA EDX,[0x1 + RCX*0x2]
MOV R8D,dword ptr [RDI + 0x1c0]
XOR EDI,EDI
MOV ECX,0x4001
XOR R9D,R9D
CALL 0x001295e0
MOV RCX,qword ptr [RBX]
MOV qword ptr [RCX + 0x270],RAX
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + 0x270]
CMP RDI,-0x1
JZ 0x00177d4c
MOV RSI,R15
MOV EDX,0x1
CALL 0x00129480
MOV RAX,qword ptr [RBX]
MOV qword ptr [RAX + 0x4d0],R15
MOV RAX,qword ptr [RBX]
LEA RCX,[0x177d65]
MOV qword ptr [RAX + 0x2e0],RCX
MOV RAX,qword ptr [RBX]
LEA RCX,[0x177f33]
MOV qword ptr [RAX + 0x2e8],RCX
XOR R14D,R14D
JMP 0x00177d57
LAB_00177d4c:
MOV qword ptr [RAX + 0x270],0x0
LAB_00177d57:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong mi_dynmap_file(long *param_1,size_t param_2)
{
void *pvVar1;
int8 unaff_R14;
ulong uVar2;
uVar2 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1);
if (param_2 != 0) {
pvVar1 = mmap64((void *)0x0,param_2,(uint)(*(int *)(*param_1 + 0x358) != 0) * 2 + 1,0x4001,
(int)param_1[0x38],0);
*(void **)(*param_1 + 0x270) = pvVar1;
pvVar1 = *(void **)(*param_1 + 0x270);
if (pvVar1 == (void *)0xffffffffffffffff) {
*(int8 *)(*param_1 + 0x270) = 0;
}
else {
madvise(pvVar1,param_2,1);
*(size_t *)(*param_1 + 0x4d0) = param_2;
*(code **)(*param_1 + 0x2e0) = mi_mmap_pread;
*(code **)(*param_1 + 0x2e8) = mi_mmap_pwrite;
uVar2 = 0;
}
}
return uVar2 & 0xffffffff;
}
| |
38,446 | my_numchars_utf16 | eloqsql/strings/ctype-ucs2.c | static size_t
my_numchars_utf16(CHARSET_INFO *cs,
const char *b, const char *e)
{
size_t nchars= 0;
for ( ; ; nchars++)
{
size_t charlen= my_ismbchar(cs, b, e);
if (!charlen)
break;
b+= charlen;
}
return nchars;
} | O0 | c | my_numchars_utf16:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x64e20
movl %eax, %eax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x616ec
jmp 0x61706
movq -0x28(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x616cc
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
| my_numchars_utf16:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], 0
loc_616CC:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call my_ismbchar_1
mov eax, eax
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_616EC
jmp short loc_61706
loc_616EC:
mov rax, [rbp+var_28]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_616CC
loc_61706:
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
| long long my_numchars_utf16(long long a1, long long a2, long long a3)
{
unsigned int v3; // eax
long long i; // [rsp+10h] [rbp-20h]
for ( i = 0LL; ; ++i )
{
v3 = my_ismbchar_1(a1, a2, a3);
if ( !v3 )
break;
a2 += v3;
}
return i;
}
| my_numchars_utf16:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],0x0
LAB_001616cc:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00164e20
MOV EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001616ec
JMP 0x00161706
LAB_001616ec:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001616cc
LAB_00161706:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
long my_numchars_utf16(int8 param_1,long param_2,int8 param_3)
{
uint uVar1;
int8 local_28;
int8 local_18;
local_28 = 0;
local_18 = param_2;
while( true ) {
uVar1 = my_ismbchar(param_1,local_18,param_3);
if ((ulong)uVar1 == 0) break;
local_18 = (ulong)uVar1 + local_18;
local_28 = local_28 + 1;
}
return local_28;
}
| |
38,447 | httplib::Response::set_header(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&) | llama.cpp/examples/server/httplib.h | inline void Response::set_header(const std::string &key,
const std::string &val) {
if (detail::fields::is_field_name(key) &&
detail::fields::is_field_value(val)) {
headers.emplace(key, val);
}
} | O3 | c | httplib::Response::set_header(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&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x8(%rsi), %r12
testq %r12, %r12
je 0x68f3d
movq %rsi, %r14
movq (%rsi), %r13
xorl %r15d, %r15d
movabsq $-0x1fffffffffffc983, %rbx # imm = 0xE00000000000367D
movsbl (%r13,%r15), %ebp
movl %ebp, %edi
callq 0x258e0
testl %eax, %eax
jne 0x68e3f
movzbl %bpl, %eax
leal -0x21(%rax), %ecx
cmpl $0x3f, %ecx
ja 0x68e49
btq %rcx, %rbx
jae 0x68e49
incq %r15
cmpq %r15, %r12
jne 0x68e1c
jmp 0x68e58
cmpl $0x7e, %eax
je 0x68e3f
cmpl $0x7c, %eax
je 0x68e3f
jmp 0x68f3d
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x68f17
cmpq $0x2, %rcx
je 0x68e83
cmpq $0x1, %rcx
jne 0x68ea8
movq 0x8(%rsp), %rax
movq (%rax), %rax
jmp 0x68f03
movq 0x8(%rsp), %rax
movq (%rax), %rax
movb (%rax), %cl
leal -0x21(%rcx), %edx
cmpb $0x5e, %dl
setae %dl
testb %cl, %cl
setns %cl
testb %dl, %cl
jne 0x68f3d
incq %rax
jmp 0x68f03
movq 0x8(%rsp), %rax
movq (%rax), %rax
movb (%rax), %dl
leal -0x21(%rdx), %esi
cmpb $0x5e, %sil
setae %sil
testb %dl, %dl
setns %dl
testb %sil, %dl
jne 0x68f3d
leaq -0x1(%rcx), %rdx
addq $-0x2, %rcx
xorl %esi, %esi
movzbl 0x1(%rax,%rsi), %edi
cmpl $0x9, %edi
je 0x68ef8
cmpl $0x20, %edi
je 0x68ef8
leal -0x21(%rdi), %r8d
cmpb $0x5e, %r8b
setae %r8b
testb %dil, %dil
setns %dil
testb %r8b, %dil
jne 0x68f3d
incq %rsi
cmpq %rsi, %rcx
jne 0x68ed1
addq %rdx, %rax
movb (%rax), %al
leal -0x21(%rax), %ecx
cmpb $0x5e, %cl
setae %cl
testb %al, %al
setns %al
testb %cl, %al
jne 0x68f3d
movq 0x10(%rsp), %rdi
addq $0x48, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6b9c6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN7httplib8Response10set_headerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], rdx
mov [rsp+48h+var_38], rdi
mov r12, [rsi+8]
test r12, r12
jz loc_68F3D
mov r14, rsi
mov r13, [rsi]
xor r15d, r15d
mov rbx, 0E00000000000367Dh
loc_68E1C:
movsx ebp, byte ptr [r13+r15+0]
mov edi, ebp
call _isalnum
test eax, eax
jnz short loc_68E3F
movzx eax, bpl
lea ecx, [rax-21h]
cmp ecx, 3Fh ; '?'
ja short loc_68E49
bt rbx, rcx
jnb short loc_68E49
loc_68E3F:
inc r15
cmp r12, r15
jnz short loc_68E1C
jmp short loc_68E58
loc_68E49:
cmp eax, 7Eh ; '~'
jz short loc_68E3F
cmp eax, 7Ch ; '|'
jz short loc_68E3F
jmp loc_68F3D
loc_68E58:
mov rax, [rsp+48h+var_40]
mov rcx, [rax+8]
test rcx, rcx
jz loc_68F17
cmp rcx, 2
jz short loc_68E83
cmp rcx, 1
jnz short loc_68EA8
mov rax, [rsp+48h+var_40]
mov rax, [rax]
jmp loc_68F03
loc_68E83:
mov rax, [rsp+48h+var_40]
mov rax, [rax]
mov cl, [rax]
lea edx, [rcx-21h]
cmp dl, 5Eh ; '^'
setnb dl
test cl, cl
setns cl
test cl, dl
jnz loc_68F3D
inc rax
jmp short loc_68F03
loc_68EA8:
mov rax, [rsp+48h+var_40]
mov rax, [rax]
mov dl, [rax]
lea esi, [rdx-21h]
cmp sil, 5Eh ; '^'
setnb sil
test dl, dl
setns dl
test dl, sil
jnz short loc_68F3D
lea rdx, [rcx-1]
add rcx, 0FFFFFFFFFFFFFFFEh
xor esi, esi
loc_68ED1:
movzx edi, byte ptr [rax+rsi+1]
cmp edi, 9
jz short loc_68EF8
cmp edi, 20h ; ' '
jz short loc_68EF8
lea r8d, [rdi-21h]
cmp r8b, 5Eh ; '^'
setnb r8b
test dil, dil
setns dil
test dil, r8b
jnz short loc_68F3D
loc_68EF8:
inc rsi
cmp rcx, rsi
jnz short loc_68ED1
add rax, rdx
loc_68F03:
mov al, [rax]
lea ecx, [rax-21h]
cmp cl, 5Eh ; '^'
setnb cl
test al, al
setns al
test al, cl
jnz short loc_68F3D
loc_68F17:
mov rdi, [rsp+48h+var_38]
add rdi, 48h ; 'H'
xor esi, esi
mov rdx, r14
mov rcx, [rsp+48h+var_40]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _ZNSt10_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_traitsILb1ELb0ELb0EEEE10_M_emplaceIJRS7_SO_EEENSA_14_Node_iteratorIS8_Lb0ELb1EEENSA_20_Node_const_iteratorIS8_Lb0ELb1EEESt17integral_constantIbLb0EEDpOT_; 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>>::_M_emplace<std::string const&,std::string const&>(std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>,std::integral_constant<bool,false>,std::string const&,std::string const&)
loc_68F3D:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| void httplib::Response::set_header(long long a1, long long *a2, _QWORD *a3)
{
long long v3; // r12
long long v5; // r13
long long v6; // r15
unsigned long long v7; // rbx
unsigned __int8 v8; // bp
unsigned long long v9; // rcx
long long v10; // rcx
_BYTE *v11; // rax
_BYTE *v12; // rax
long long v13; // rdx
long long v14; // rcx
long long v15; // rsi
int v16; // edi
v3 = a2[1];
if ( v3 )
{
v5 = *a2;
v6 = 0LL;
v7 = 0xE00000000000367DLL;
do
{
v8 = *(_BYTE *)(v5 + v6);
if ( !(unsigned int)isalnum((unsigned int)(char)v8) )
{
v9 = (unsigned int)v8 - 33;
if ( ((unsigned int)v9 > 0x3F || !_bittest64((const long long *)&v7, v9)) && v8 != 126 && v8 != 124 )
return;
}
++v6;
}
while ( v3 != v6 );
v10 = a3[1];
switch ( v10 )
{
case 0LL:
LABEL_25:
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>>::_M_emplace<std::string const&,std::string const&>(
a1 + 72,
0LL,
a2,
a3);
return;
case 2LL:
if ( (unsigned __int8)(*(_BYTE *)*a3 - 33) >= 0x5Eu && *(_BYTE *)*a3 >= 0 )
return;
v11 = (_BYTE *)(*a3 + 1LL);
LABEL_24:
if ( (unsigned __int8)(*v11 - 33) >= 0x5Eu && *v11 >= 0 )
return;
goto LABEL_25;
case 1LL:
v11 = (_BYTE *)*a3;
goto LABEL_24;
}
v12 = (_BYTE *)*a3;
if ( (unsigned __int8)(*(_BYTE *)*a3 - 33) < 0x5Eu || *(_BYTE *)*a3 < 0 )
{
v13 = v10 - 1;
v14 = v10 - 2;
v15 = 0LL;
while ( 1 )
{
v16 = (unsigned __int8)v12[v15 + 1];
if ( v16 != 9 && v16 != 32 && (unsigned __int8)(v16 - 33) >= 0x5Eu && (v16 & 0x80u) == 0 )
break;
if ( v14 == ++v15 )
{
v11 = &v12[v13];
goto LABEL_24;
}
}
}
}
}
| set_header:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV R12,qword ptr [RSI + 0x8]
TEST R12,R12
JZ 0x00168f3d
MOV R14,RSI
MOV R13,qword ptr [RSI]
XOR R15D,R15D
MOV RBX,-0x1fffffffffffc983
LAB_00168e1c:
MOVSX EBP,byte ptr [R13 + R15*0x1]
MOV EDI,EBP
CALL 0x001258e0
TEST EAX,EAX
JNZ 0x00168e3f
MOVZX EAX,BPL
LEA ECX,[RAX + -0x21]
CMP ECX,0x3f
JA 0x00168e49
BT RBX,RCX
JNC 0x00168e49
LAB_00168e3f:
INC R15
CMP R12,R15
JNZ 0x00168e1c
JMP 0x00168e58
LAB_00168e49:
CMP EAX,0x7e
JZ 0x00168e3f
CMP EAX,0x7c
JZ 0x00168e3f
JMP 0x00168f3d
LAB_00168e58:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JZ 0x00168f17
CMP RCX,0x2
JZ 0x00168e83
CMP RCX,0x1
JNZ 0x00168ea8
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX]
JMP 0x00168f03
LAB_00168e83:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX]
MOV CL,byte ptr [RAX]
LEA EDX,[RCX + -0x21]
CMP DL,0x5e
SETNC DL
TEST CL,CL
SETNS CL
TEST CL,DL
JNZ 0x00168f3d
INC RAX
JMP 0x00168f03
LAB_00168ea8:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX]
MOV DL,byte ptr [RAX]
LEA ESI,[RDX + -0x21]
CMP SIL,0x5e
SETNC SIL
TEST DL,DL
SETNS DL
TEST DL,SIL
JNZ 0x00168f3d
LEA RDX,[RCX + -0x1]
ADD RCX,-0x2
XOR ESI,ESI
LAB_00168ed1:
MOVZX EDI,byte ptr [RAX + RSI*0x1 + 0x1]
CMP EDI,0x9
JZ 0x00168ef8
CMP EDI,0x20
JZ 0x00168ef8
LEA R8D,[RDI + -0x21]
CMP R8B,0x5e
SETNC R8B
TEST DIL,DIL
SETNS DIL
TEST DIL,R8B
JNZ 0x00168f3d
LAB_00168ef8:
INC RSI
CMP RCX,RSI
JNZ 0x00168ed1
ADD RAX,RDX
LAB_00168f03:
MOV AL,byte ptr [RAX]
LEA ECX,[RAX + -0x21]
CMP CL,0x5e
SETNC CL
TEST AL,AL
SETNS AL
TEST AL,CL
JNZ 0x00168f3d
LAB_00168f17:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x48
XOR ESI,ESI
MOV RDX,R14
MOV RCX,qword ptr [RSP + 0x8]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0016b9c6
LAB_00168f3d:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* httplib::Response::set_header(std::__cxx11::string const&, std::__cxx11::string const&) */
void __thiscall httplib::Response::set_header(Response *this,string *param_1,string *param_2)
{
byte bVar1;
char cVar2;
long lVar3;
int iVar4;
uint uVar5;
char *pcVar6;
long lVar7;
long lVar8;
lVar3 = *(long *)(param_1 + 8);
if (lVar3 == 0) {
return;
}
lVar7 = *(long *)param_1;
lVar8 = 0;
do {
bVar1 = *(byte *)(lVar7 + lVar8);
iVar4 = isalnum((int)(char)bVar1);
if (iVar4 == 0) {
uVar5 = (uint)bVar1;
if ((((0x3f < uVar5 - 0x21) ||
((0xe00000000000367dU >> ((ulong)(uVar5 - 0x21) & 0x3f) & 1) == 0)) && (uVar5 != 0x7e))
&& (uVar5 != 0x7c)) {
return;
}
}
lVar8 = lVar8 + 1;
if (lVar3 == lVar8) {
lVar3 = *(long *)(param_2 + 8);
if (lVar3 != 0) {
if (lVar3 == 2) {
cVar2 = **(char **)param_2;
if (-1 < cVar2 && 0x5d < (byte)(cVar2 - 0x21U)) {
return;
}
pcVar6 = *(char **)param_2 + 1;
}
else if (lVar3 == 1) {
pcVar6 = *(char **)param_2;
}
else {
pcVar6 = *(char **)param_2;
if (-1 < *pcVar6 && 0x5d < (byte)(*pcVar6 - 0x21U)) {
return;
}
lVar7 = 0;
do {
cVar2 = pcVar6[lVar7 + 1];
if (((cVar2 != '\t') && (cVar2 != ' ')) && (-1 < cVar2 && 0x5d < (byte)(cVar2 - 0x21U)))
{
return;
}
lVar7 = lVar7 + 1;
} while (lVar3 + -2 != lVar7);
pcVar6 = pcVar6 + lVar3 + -1;
}
if (-1 < *pcVar6 && 0x5d < (byte)(*pcVar6 - 0x21U)) {
return;
}
}
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>>
::_M_emplace<std::__cxx11::string_const&,std::__cxx11::string_const&>
(this + 0x48,0,param_1,param_2);
return;
}
} while( true );
}
| |
38,448 | bool fmt::v10::detail::basic_fp<unsigned __int128>::assign<float, 0>(float) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR auto assign(Float n) -> bool {
static_assert(std::numeric_limits<Float>::digits <= 113, "unsupported FP");
// Assume Float is in the format [sign][exponent][significand].
using carrier_uint = typename dragonbox::float_info<Float>::carrier_uint;
const auto num_float_significand_bits =
detail::num_significand_bits<Float>();
const auto implicit_bit = carrier_uint(1) << num_float_significand_bits;
const auto significand_mask = implicit_bit - 1;
auto u = bit_cast<carrier_uint>(n);
f = static_cast<F>(u & significand_mask);
auto biased_e = static_cast<int>((u & exponent_mask<Float>()) >>
num_float_significand_bits);
// The predecessor is closer if n is a normalized power of 2 (f == 0)
// other than the smallest normalized number (biased_e > 1).
auto is_predecessor_closer = f == 0 && biased_e > 1;
if (biased_e == 0)
biased_e = 1; // Subnormals use biased exponent 1 (min exponent).
else if (has_implicit_bit<Float>())
f += static_cast<F>(implicit_bit);
e = biased_e - exponent_bias<Float>() - num_float_significand_bits;
if (!has_implicit_bit<Float>()) ++e;
return is_predecessor_closer;
} | O0 | c | bool fmt::v10::detail::basic_fp<unsigned __int128>::assign<float, 0>(float):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movss %xmm0, 0x2c(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x17, 0x28(%rsp)
movl $0x800000, 0x24(%rsp) # imm = 0x800000
movl $0x7fffff, 0x20(%rsp) # imm = 0x7FFFFF
leaq 0x2c(%rsp), %rdi
callq 0xc9e50
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x1c(%rsp)
movl 0x1c(%rsp), %ecx
andl $0x7fffff, %ecx # imm = 0x7FFFFF
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0xc9e70
movl 0x4(%rsp), %ecx
movl %eax, %edx
movq 0x8(%rsp), %rax
andl %edx, %ecx
shrl $0x17, %ecx
movl %ecx, 0x18(%rsp)
movq (%rax), %rcx
movq 0x8(%rax), %rdx
xorl %eax, %eax
orq %rdx, %rcx
movb %al, 0x16(%rsp)
jne 0xd99ec
jmp 0xd99e0
cmpl $0x1, 0x18(%rsp)
setg %al
movb %al, 0x16(%rsp)
movb 0x16(%rsp), %al
andb $0x1, %al
movb %al, 0x17(%rsp)
cmpl $0x0, 0x18(%rsp)
jne 0xd9a07
movl $0x1, 0x18(%rsp)
jmp 0xd9a1e
movq 0x8(%rsp), %rax
movq (%rax), %rcx
addq $0x800000, %rcx # imm = 0x800000
adcq $0x0, 0x8(%rax)
movq %rcx, (%rax)
movl 0x18(%rsp), %eax
movl %eax, (%rsp)
callq 0xc9ea0
movl (%rsp), %ecx
movl %eax, %edx
movq 0x8(%rsp), %rax
subl %edx, %ecx
subl $0x17, %ecx
movl %ecx, 0x10(%rax)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw (%rax,%rax)
| _ZN3fmt3v106detail8basic_fpIoE6assignIfTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
movss [rsp+38h+var_C], xmm0
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_30], rax
mov [rsp+38h+var_10], 17h
mov [rsp+38h+var_14], 800000h
mov [rsp+38h+var_18], 7FFFFFh
lea rdi, [rsp+38h+var_C]
call _ZN3fmt3v106detail8bit_castIjfTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_
mov ecx, eax
mov rax, [rsp+38h+var_30]
mov [rsp+38h+var_1C], ecx
mov ecx, [rsp+38h+var_1C]
and ecx, 7FFFFFh
mov [rax], rcx
mov qword ptr [rax+8], 0
mov eax, [rsp+38h+var_1C]
mov [rsp+38h+var_34], eax
call _ZN3fmt3v106detail13exponent_maskIfEENS1_9dragonbox10float_infoIT_vE12carrier_uintEv; fmt::v10::detail::exponent_mask<float>(void)
mov ecx, [rsp+38h+var_34]
mov edx, eax
mov rax, [rsp+38h+var_30]
and ecx, edx
shr ecx, 17h
mov [rsp+38h+var_20], ecx
mov rcx, [rax]
mov rdx, [rax+8]
xor eax, eax
or rcx, rdx
mov [rsp+38h+var_22], al
jnz short loc_D99EC
jmp short $+2
loc_D99E0:
cmp [rsp+38h+var_20], 1
setnle al
mov [rsp+38h+var_22], al
loc_D99EC:
mov al, [rsp+38h+var_22]
and al, 1
mov [rsp+38h+var_21], al
cmp [rsp+38h+var_20], 0
jnz short loc_D9A07
mov [rsp+38h+var_20], 1
jmp short loc_D9A1E
loc_D9A07:
mov rax, [rsp+38h+var_30]
mov rcx, [rax]
add rcx, 800000h
adc qword ptr [rax+8], 0
mov [rax], rcx
loc_D9A1E:
mov eax, [rsp+38h+var_20]
mov [rsp+38h+var_38], eax
call _ZN3fmt3v106detail13exponent_biasIfEEiv; fmt::v10::detail::exponent_bias<float>(void)
mov ecx, [rsp+38h+var_38]
mov edx, eax
mov rax, [rsp+38h+var_30]
sub ecx, edx
sub ecx, 17h
mov [rax+10h], ecx
mov al, [rsp+38h+var_21]
and al, 1
add rsp, 38h
retn
| bool ZN3fmt3v106detail8basic_fpIoE6assignIfTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_(
long long a1,
float a2)
{
long long v2; // rcx
bool v4; // [rsp+16h] [rbp-22h]
signed int v5; // [rsp+18h] [rbp-20h]
int v6; // [rsp+1Ch] [rbp-1Ch]
float v7; // [rsp+2Ch] [rbp-Ch] BYREF
long long v8; // [rsp+30h] [rbp-8h]
v8 = a1;
v7 = a2;
v6 = ZN3fmt3v106detail8bit_castIjfTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_((unsigned int *)&v7);
*(_QWORD *)a1 = v6 & 0x7FFFFF;
*(_QWORD *)(a1 + 8) = 0LL;
v5 = ((unsigned int)fmt::v10::detail::exponent_mask<float>((long long)&v7) & v6) >> 23;
v4 = 0;
if ( *(_OWORD *)a1 == 0LL )
v4 = v5 > 1;
if ( v5 )
{
v2 = *(_QWORD *)a1 + 0x800000LL;
*(_QWORD *)(a1 + 8) += __CFADD__(*(_QWORD *)a1, 0x800000LL);
*(_QWORD *)a1 = v2;
}
else
{
v5 = 1;
}
*(_DWORD *)(a1 + 16) = v5 - fmt::v10::detail::exponent_bias<float>() - 23;
return v4;
}
| _ZN3fmt3v106detail8basic_fpIoE6assignIfTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOVSS dword ptr [RSP + 0x2c],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RSP + 0x28],0x17
MOV dword ptr [RSP + 0x24],0x800000
MOV dword ptr [RSP + 0x20],0x7fffff
LEA RDI,[RSP + 0x2c]
CALL 0x001c9e50
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0x1c],ECX
MOV ECX,dword ptr [RSP + 0x1c]
AND ECX,0x7fffff
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x4],EAX
CALL 0x001c9e70
MOV ECX,dword ptr [RSP + 0x4]
MOV EDX,EAX
MOV RAX,qword ptr [RSP + 0x8]
AND ECX,EDX
SHR ECX,0x17
MOV dword ptr [RSP + 0x18],ECX
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
XOR EAX,EAX
OR RCX,RDX
MOV byte ptr [RSP + 0x16],AL
JNZ 0x001d99ec
JMP 0x001d99e0
LAB_001d99e0:
CMP dword ptr [RSP + 0x18],0x1
SETG AL
MOV byte ptr [RSP + 0x16],AL
LAB_001d99ec:
MOV AL,byte ptr [RSP + 0x16]
AND AL,0x1
MOV byte ptr [RSP + 0x17],AL
CMP dword ptr [RSP + 0x18],0x0
JNZ 0x001d9a07
MOV dword ptr [RSP + 0x18],0x1
JMP 0x001d9a1e
LAB_001d9a07:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x800000
ADC qword ptr [RAX + 0x8],0x0
MOV qword ptr [RAX],RCX
LAB_001d9a1e:
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP],EAX
CALL 0x001c9ea0
MOV ECX,dword ptr [RSP]
MOV EDX,EAX
MOV RAX,qword ptr [RSP + 0x8]
SUB ECX,EDX
SUB ECX,0x17
MOV dword ptr [RAX + 0x10],ECX
MOV AL,byte ptr [RSP + 0x17]
AND AL,0x1
ADD RSP,0x38
RET
|
bool _ZN3fmt3v106detail8basic_fpIoE6assignIfTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_
(int4 param_1,ulong *param_2)
{
uint uVar1;
uint uVar2;
int iVar3;
bool local_22;
uint local_20;
int4 local_c;
ulong *local_8;
local_c = param_1;
local_8 = param_2;
uVar1 = _ZN3fmt3v106detail8bit_castIjfTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_
(&local_c);
*param_2 = (ulong)(uVar1 & 0x7fffff);
param_2[1] = 0;
uVar2 = fmt::v10::detail::exponent_mask<float>();
local_20 = (uVar1 & uVar2) >> 0x17;
local_22 = (*param_2 == 0 && param_2[1] == 0) && 1 < local_20;
if (local_20 == 0) {
local_20 = 1;
}
else {
param_2[1] = param_2[1] + (ulong)(0xffffffffff7fffff < *param_2);
*param_2 = *param_2 + 0x800000;
}
iVar3 = fmt::v10::detail::exponent_bias<float>();
*(uint *)(param_2 + 2) = (local_20 - iVar3) + -0x17;
return local_22;
}
| |
38,449 | google::protobuf::io::CopyingOutputStreamAdaptor::WriteBuffer() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc | bool CopyingOutputStreamAdaptor::WriteBuffer() {
if (failed_) {
// Already failed on a previous write.
return false;
}
if (buffer_used_ == 0) return true;
if (copying_stream_->Write(buffer_.get(), buffer_used_)) {
position_ += buffer_used_;
buffer_used_ = 0;
return true;
} else {
failed_ = true;
FreeBuffer();
return false;
}
} | O0 | cpp | google::protobuf::io::CopyingOutputStreamAdaptor::WriteBuffer():
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
testb $0x1, 0x11(%rax)
je 0x3c6130
movb $0x0, 0x27(%rsp)
jmp 0x3c61a7
movq 0x10(%rsp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x3c6142
movb $0x1, 0x27(%rsp)
jmp 0x3c61a7
movq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rsp)
addq $0x20, %rdi
callq 0x19ff60
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x10(%rsp), %rax
movl 0x2c(%rax), %edx
movq (%rdi), %rax
callq *0x10(%rax)
testb $0x1, %al
jne 0x3c6175
jmp 0x3c6194
movq 0x10(%rsp), %rax
movslq 0x2c(%rax), %rcx
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
movl $0x0, 0x2c(%rax)
movb $0x1, 0x27(%rsp)
jmp 0x3c61a7
movq 0x10(%rsp), %rdi
movb $0x1, 0x11(%rdi)
callq 0x3c67d0
movb $0x0, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf2io26CopyingOutputStreamAdaptor11WriteBufferEv:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_18], rax
test byte ptr [rax+11h], 1
jz short loc_3C6130
mov [rsp+28h+var_1], 0
jmp short loc_3C61A7
loc_3C6130:
mov rax, [rsp+28h+var_18]
cmp dword ptr [rax+2Ch], 0
jnz short loc_3C6142
mov [rsp+28h+var_1], 1
jmp short loc_3C61A7
loc_3C6142:
mov rdi, [rsp+28h+var_18]
mov rax, [rdi+8]
mov [rsp+28h+var_20], rax
add rdi, 20h ; ' '
call __ZNKSt10unique_ptrIA_hSt14default_deleteIS0_EE3getEv; std::unique_ptr<uchar []>::get(void)
mov rdi, [rsp+28h+var_20]
mov rsi, rax
mov rax, [rsp+28h+var_18]
mov edx, [rax+2Ch]
mov rax, [rdi]
call qword ptr [rax+10h]
test al, 1
jnz short loc_3C6175
jmp short loc_3C6194
loc_3C6175:
mov rax, [rsp+28h+var_18]
movsxd rcx, dword ptr [rax+2Ch]
add rcx, [rax+18h]
mov [rax+18h], rcx
mov dword ptr [rax+2Ch], 0
mov [rsp+28h+var_1], 1
jmp short loc_3C61A7
loc_3C6194:
mov rdi, [rsp+28h+var_18]; this
mov byte ptr [rdi+11h], 1
call _ZN6google8protobuf2io26CopyingOutputStreamAdaptor10FreeBufferEv; google::protobuf::io::CopyingOutputStreamAdaptor::FreeBuffer(void)
mov [rsp+28h+var_1], 0
loc_3C61A7:
mov al, [rsp+28h+var_1]
and al, 1
add rsp, 28h
retn
| char google::protobuf::io::CopyingOutputStreamAdaptor::WriteBuffer(
google::protobuf::io::CopyingOutputStreamAdaptor *this)
{
long long v1; // rax
long long v3; // [rsp+8h] [rbp-20h]
if ( (*((_BYTE *)this + 17) & 1) != 0 )
return 0;
if ( !*((_DWORD *)this + 11) )
return 1;
v3 = *((_QWORD *)this + 1);
v1 = std::unique_ptr<unsigned char []>::get((char *)this + 32);
if ( ((*(long long ( **)(long long, long long, _QWORD))(*(_QWORD *)v3 + 16LL))(
v3,
v1,
*((unsigned int *)this + 11)) & 1) != 0 )
{
*((_QWORD *)this + 3) += *((int *)this + 11);
*((_DWORD *)this + 11) = 0;
return 1;
}
else
{
*((_BYTE *)this + 17) = 1;
google::protobuf::io::CopyingOutputStreamAdaptor::FreeBuffer(this);
return 0;
}
}
| operator():
SUB RSP,0x28
MOV RAX,RDI
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x8],RCX
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x002a0c10
MOV RAX,qword ptr [RSP]
ADD RSP,0x28
RET
|
/* std::enable_if<call_traits<asio_prefer_fn::impl,
asio::strand<asio::io_context::basic_executor_type<std::allocator<void>, 4ul> > const&, void
(asio::execution::detail::blocking::never_t<0>
const&)>::overload==((asio_prefer_fn::overload_type)1),
asio_prefer_fn::call_traits<asio_prefer_fn::impl,
asio::strand<asio::io_context::basic_executor_type<std::allocator<void>, 4ul> > const&, void
(asio::execution::detail::blocking::never_t<0> const&), void, void, void, void, void, void,
void>::result_type>::type
asio_prefer_fn::impl::TEMPNAMEPLACEHOLDERVALUE(asio::strand<asio::io_context::basic_executor_type<std::allocator<void>,
4ul> > const&, asio::execution::detail::blocking::never_t<0> const&) const */
strand * asio_prefer_fn::impl::operator()(strand *param_1,never_t *param_2)
{
asio::strand<asio::io_context::basic_executor_type<std::allocator<void>,4ul>>::
require<asio::execution::detail::blocking::never_t<0>>((never_t *)param_1);
return param_1;
}
| |
38,450 | OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(OpenSubdiv::v3_6_0::Bfr::Parameterization const&, int, int const*, OpenSubdiv::v3_6_0::Bfr::Tessellation::Options const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | bool
Tessellation::validateArguments(Parameterization const & p,
int numRates, int const rates[], Options const & options) {
// Check the Parameterization:
if (!p.IsValid()) return false;
// Check given tessellation rates:
if (numRates < 1) return false;
for (int i = 0; i < numRates; ++i) {
if (rates[i] < 1) return false;
}
// Check given buffer strides in Options:
int coordStride = options.GetCoordStride();
if (coordStride && (coordStride < 2)) return false;
int facetStride = options.GetFacetStride();
if (facetStride && (facetStride < options.GetFacetSize())) return false;
return true;
} | O0 | cpp | OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(OpenSubdiv::v3_6_0::Bfr::Parameterization const&, int, int const*, OpenSubdiv::v3_6_0::Bfr::Tessellation::Options const&):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd75a0
testb $0x1, %al
jne 0x1bdf01
movb $0x0, -0x1(%rbp)
jmp 0x1bdf92
cmpl $0x1, -0x1c(%rbp)
jge 0x1bdf10
movb $0x0, -0x1(%rbp)
jmp 0x1bdf92
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x1bdf40
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,4)
jge 0x1bdf33
movb $0x0, -0x1(%rbp)
jmp 0x1bdf92
jmp 0x1bdf35
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1bdf17
movq -0x30(%rbp), %rdi
callq 0xc9bc0
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
je 0x1bdf5e
cmpl $0x2, -0x38(%rbp)
jge 0x1bdf5e
movb $0x0, -0x1(%rbp)
jmp 0x1bdf92
movq -0x30(%rbp), %rdi
callq 0xc4620
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x1bdf8e
movl -0x3c(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0xd2460
movl %eax, %ecx
movl -0x40(%rbp), %eax
cmpl %ecx, %eax
jge 0x1bdf8e
movb $0x0, -0x1(%rbp)
jmp 0x1bdf92
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN10OpenSubdiv6v3_6_03Bfr12Tessellation17validateArgumentsERKNS1_16ParameterizationEiPKiRKNS2_7OptionsE:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rdi, [rbp+var_18]; this
call __ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization7IsValidEv; OpenSubdiv::v3_6_0::Bfr::Parameterization::IsValid(void)
test al, 1
jnz short loc_1BDF01
mov [rbp+var_1], 0
jmp loc_1BDF92
loc_1BDF01:
cmp [rbp+var_1C], 1
jge short loc_1BDF10
mov [rbp+var_1], 0
jmp loc_1BDF92
loc_1BDF10:
mov [rbp+var_34], 0
loc_1BDF17:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_1C]
jge short loc_1BDF40
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_34]
cmp dword ptr [rax+rcx*4], 1
jge short loc_1BDF33
mov [rbp+var_1], 0
jmp short loc_1BDF92
loc_1BDF33:
jmp short $+2
loc_1BDF35:
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp short loc_1BDF17
loc_1BDF40:
mov rdi, [rbp+var_30]; this
call __ZNK10OpenSubdiv6v3_6_03Bfr12Tessellation7Options14GetCoordStrideEv; OpenSubdiv::v3_6_0::Bfr::Tessellation::Options::GetCoordStride(void)
mov [rbp+var_38], eax
cmp [rbp+var_38], 0
jz short loc_1BDF5E
cmp [rbp+var_38], 2
jge short loc_1BDF5E
mov [rbp+var_1], 0
jmp short loc_1BDF92
loc_1BDF5E:
mov rdi, [rbp+var_30]; this
call __ZNK10OpenSubdiv6v3_6_03Bfr12Tessellation7Options14GetFacetStrideEv; OpenSubdiv::v3_6_0::Bfr::Tessellation::Options::GetFacetStride(void)
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jz short loc_1BDF8E
mov eax, [rbp+var_3C]
mov [rbp+var_40], eax
mov rdi, [rbp+var_30]; this
call __ZNK10OpenSubdiv6v3_6_03Bfr12Tessellation7Options12GetFacetSizeEv; OpenSubdiv::v3_6_0::Bfr::Tessellation::Options::GetFacetSize(void)
mov ecx, eax
mov eax, [rbp+var_40]
cmp eax, ecx
jge short loc_1BDF8E
mov [rbp+var_1], 0
jmp short loc_1BDF92
loc_1BDF8E:
mov [rbp+var_1], 1
loc_1BDF92:
mov al, [rbp+var_1]
and al, 1
add rsp, 40h
pop rbp
retn
| bool OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(
OpenSubdiv::v3_6_0::Bfr::Tessellation *this,
const OpenSubdiv::v3_6_0::Bfr::Parameterization *a2,
int a3,
const int *a4,
const OpenSubdiv::v3_6_0::Bfr::Tessellation::Options *a5)
{
int FacetStride; // [rsp+4h] [rbp-3Ch]
int CoordStride; // [rsp+8h] [rbp-38h]
int i; // [rsp+Ch] [rbp-34h]
if ( (OpenSubdiv::v3_6_0::Bfr::Parameterization::IsValid(a2) & 1) == 0 )
return 0;
if ( a3 < 1 )
return 0;
for ( i = 0; i < a3; ++i )
{
if ( a4[i] < 1 )
return 0;
}
CoordStride = OpenSubdiv::v3_6_0::Bfr::Tessellation::Options::GetCoordStride(a5);
if ( CoordStride && CoordStride < 2 )
return 0;
FacetStride = OpenSubdiv::v3_6_0::Bfr::Tessellation::Options::GetFacetStride(a5);
return !FacetStride || FacetStride >= (int)OpenSubdiv::v3_6_0::Bfr::Tessellation::Options::GetFacetSize(a5);
}
| |||
38,451 | OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(OpenSubdiv::v3_6_0::Bfr::Parameterization const&, int, int const*, OpenSubdiv::v3_6_0::Bfr::Tessellation::Options const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | bool
Tessellation::validateArguments(Parameterization const & p,
int numRates, int const rates[], Options const & options) {
// Check the Parameterization:
if (!p.IsValid()) return false;
// Check given tessellation rates:
if (numRates < 1) return false;
for (int i = 0; i < numRates; ++i) {
if (rates[i] < 1) return false;
}
// Check given buffer strides in Options:
int coordStride = options.GetCoordStride();
if (coordStride && (coordStride < 2)) return false;
int facetStride = options.GetFacetStride();
if (facetStride && (facetStride < options.GetFacetSize())) return false;
return true;
} | O1 | cpp | OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(OpenSubdiv::v3_6_0::Bfr::Parameterization const&, int, int const*, OpenSubdiv::v3_6_0::Bfr::Tessellation::Options const&):
xorl %eax, %eax
testl %edx, %edx
jle 0x9ee66
cmpw $0x0, 0x2(%rsi)
je 0x9ee66
cmpl $0x0, (%rcx)
jle 0x9ee64
movl %edx, %eax
leaq -0x1(%rax), %rdx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x9ee4e
leaq 0x1(%rsi), %rdi
cmpl $0x0, 0x4(%rcx,%rsi,4)
movq %rdi, %rsi
jg 0x9ee36
cmpq %rax, %rdi
jb 0x9ee64
movzwl 0x2(%r8), %eax
testw %ax, %ax
setne %cl
cmpw $0x2, %ax
setl %al
testb %al, %cl
je 0x9ee67
xorl %eax, %eax
retq
movzwl 0x4(%r8), %ecx
testw %cx, %cx
je 0x9ee86
xorl %eax, %eax
btl $0x1, (%r8)
movl $0x0, %edx
adcw $0x3, %dx
cmpw %dx, %cx
jl 0x9ee66
movb $0x1, %al
retq
nop
| _ZN10OpenSubdiv6v3_6_03Bfr12Tessellation17validateArgumentsERKNS1_16ParameterizationEiPKiRKNS2_7OptionsE:
xor eax, eax
test edx, edx
jle short locret_9EE66
cmp word ptr [rsi+2], 0
jz short locret_9EE66
cmp dword ptr [rcx], 0
jle short loc_9EE64
mov eax, edx
lea rdx, [rax-1]
xor esi, esi
loc_9EE36:
cmp rdx, rsi
jz short loc_9EE4E
lea rdi, [rsi+1]
cmp dword ptr [rcx+rsi*4+4], 0
mov rsi, rdi
jg short loc_9EE36
cmp rdi, rax
jb short loc_9EE64
loc_9EE4E:
movzx eax, word ptr [r8+2]
test ax, ax
setnz cl
cmp ax, 2
setl al
test cl, al
jz short loc_9EE67
loc_9EE64:
xor eax, eax
locret_9EE66:
retn
loc_9EE67:
movzx ecx, word ptr [r8+4]
test cx, cx
jz short loc_9EE86
xor eax, eax
bt dword ptr [r8], 1
mov edx, 0
adc dx, 3
cmp cx, dx
jl short locret_9EE66
loc_9EE86:
mov al, 1
retn
| char OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(
long long a1,
long long a2,
int a3,
int *a4,
long long a5)
{
char result; // al
unsigned long long v6; // rax
long long v7; // rdx
long long v8; // rsi
unsigned long long v9; // rdi
__int16 v11; // cx
result = 0;
if ( a3 > 0 && *(_WORD *)(a2 + 2) )
{
if ( *a4 <= 0 )
return 0;
v6 = (unsigned int)a3;
v7 = (unsigned int)a3 - 1LL;
v8 = 0LL;
while ( v7 != v8 )
{
v9 = v8 + 1;
if ( a4[++v8] <= 0 )
{
if ( v9 < v6 )
return 0;
break;
}
}
if ( *(_WORD *)(a5 + 2) < 2 && *(_WORD *)(a5 + 2) != 0 )
{
return 0;
}
else
{
v11 = *(_WORD *)(a5 + 4);
if ( !v11 )
return 1;
result = 0;
if ( v11 >= (__int16)(_bittest((const signed __int32 *)a5, 1u) + 3) )
return 1;
}
}
return result;
}
| validateArguments:
XOR EAX,EAX
TEST EDX,EDX
JLE 0x0019ee66
CMP word ptr [RSI + 0x2],0x0
JZ 0x0019ee66
CMP dword ptr [RCX],0x0
JLE 0x0019ee64
MOV EAX,EDX
LEA RDX,[RAX + -0x1]
XOR ESI,ESI
LAB_0019ee36:
CMP RDX,RSI
JZ 0x0019ee4e
LEA RDI,[RSI + 0x1]
CMP dword ptr [RCX + RSI*0x4 + 0x4],0x0
MOV RSI,RDI
JG 0x0019ee36
CMP RDI,RAX
JC 0x0019ee64
LAB_0019ee4e:
MOVZX EAX,word ptr [R8 + 0x2]
TEST AX,AX
SETNZ CL
CMP AX,0x2
SETL AL
TEST CL,AL
JZ 0x0019ee67
LAB_0019ee64:
XOR EAX,EAX
LAB_0019ee66:
RET
LAB_0019ee67:
MOVZX ECX,word ptr [R8 + 0x4]
TEST CX,CX
JZ 0x0019ee86
XOR EAX,EAX
BT dword ptr [R8],0x1
MOV EDX,0x0
ADC DX,0x3
CMP CX,DX
JL 0x0019ee66
LAB_0019ee86:
MOV AL,0x1
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(OpenSubdiv::v3_6_0::Bfr::Parameterization
const&, int, int const*, OpenSubdiv::v3_6_0::Bfr::Tessellation::Options const&) */
int8 __thiscall
OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments
(Tessellation *this,Parameterization *param_1,int param_2,int *param_3,Options *param_4)
{
ulong uVar1;
short sVar2;
long lVar3;
ulong uVar4;
if (((0 < param_2) && (*(short *)(param_1 + 2) != 0)) && (0 < *param_3)) {
uVar4 = 0;
do {
if ((ulong)(uint)param_2 - 1 == uVar4) goto LAB_0019ee4e;
uVar1 = uVar4 + 1;
lVar3 = uVar4 + 1;
uVar4 = uVar1;
} while (0 < param_3[lVar3]);
if ((uint)param_2 <= uVar1) {
LAB_0019ee4e:
sVar2 = *(short *)(param_4 + 2);
uVar4 = (ulong)CONCAT11((char)((ushort)sVar2 >> 8),sVar2 < 2);
if ((sVar2 == 0 || sVar2 >= 2) &&
((*(short *)(param_4 + 4) == 0 ||
(uVar4 = 0, (short)(((*(uint *)param_4 >> 1 & 1) != 0) + 3) <= *(short *)(param_4 + 4)))))
{
return CONCAT71((int7)(uVar4 >> 8),1);
}
}
}
return 0;
}
| |
38,452 | OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(OpenSubdiv::v3_6_0::Bfr::Parameterization const&, int, int const*, OpenSubdiv::v3_6_0::Bfr::Tessellation::Options const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | bool
Tessellation::validateArguments(Parameterization const & p,
int numRates, int const rates[], Options const & options) {
// Check the Parameterization:
if (!p.IsValid()) return false;
// Check given tessellation rates:
if (numRates < 1) return false;
for (int i = 0; i < numRates; ++i) {
if (rates[i] < 1) return false;
}
// Check given buffer strides in Options:
int coordStride = options.GetCoordStride();
if (coordStride && (coordStride < 2)) return false;
int facetStride = options.GetFacetStride();
if (facetStride && (facetStride < options.GetFacetSize())) return false;
return true;
} | O2 | cpp | OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(OpenSubdiv::v3_6_0::Bfr::Parameterization const&, int, int const*, OpenSubdiv::v3_6_0::Bfr::Tessellation::Options const&):
xorl %eax, %eax
testl %edx, %edx
jle 0xaaac8
cmpw $0x0, 0x2(%rsi)
je 0xaaac8
movl %edx, %eax
xorl %edx, %edx
cmpq %rdx, %rax
je 0xaaab0
cmpl $0x0, (%rcx,%rdx,4)
leaq 0x1(%rdx), %rdx
jg 0xaaa9f
jmp 0xaaac6
movzwl 0x2(%r8), %eax
testw %ax, %ax
setne %cl
cmpw $0x2, %ax
setl %al
testb %al, %cl
je 0xaaac9
xorl %eax, %eax
retq
movzwl 0x4(%r8), %ecx
testw %cx, %cx
je 0xaaae8
xorl %eax, %eax
btl $0x1, (%r8)
movl $0x0, %edx
adcw $0x3, %dx
cmpw %dx, %cx
jl 0xaaac8
movb $0x1, %al
retq
nop
| _ZN10OpenSubdiv6v3_6_03Bfr12Tessellation17validateArgumentsERKNS1_16ParameterizationEiPKiRKNS2_7OptionsE:
xor eax, eax
test edx, edx
jle short locret_AAAC8
cmp word ptr [rsi+2], 0
jz short locret_AAAC8
mov eax, edx
xor edx, edx
loc_AAA9F:
cmp rax, rdx
jz short loc_AAAB0
cmp dword ptr [rcx+rdx*4], 0
lea rdx, [rdx+1]
jg short loc_AAA9F
jmp short loc_AAAC6
loc_AAAB0:
movzx eax, word ptr [r8+2]
test ax, ax
setnz cl
cmp ax, 2
setl al
test cl, al
jz short loc_AAAC9
loc_AAAC6:
xor eax, eax
locret_AAAC8:
retn
loc_AAAC9:
movzx ecx, word ptr [r8+4]
test cx, cx
jz short loc_AAAE8
xor eax, eax
bt dword ptr [r8], 1
mov edx, 0
adc dx, 3
cmp cx, dx
jl short locret_AAAC8
loc_AAAE8:
mov al, 1
retn
| char OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(
long long a1,
long long a2,
int a3,
long long a4,
long long a5)
{
char result; // al
long long v6; // rax
long long v7; // rdx
__int16 v9; // cx
result = 0;
if ( a3 > 0 && *(_WORD *)(a2 + 2) )
{
v6 = (unsigned int)a3;
v7 = 0LL;
while ( v6 != v7 )
{
if ( *(_DWORD *)(a4 + 4 * v7++) <= 0 )
return 0;
}
if ( *(_WORD *)(a5 + 2) < 2 && *(_WORD *)(a5 + 2) != 0 )
return 0;
v9 = *(_WORD *)(a5 + 4);
if ( !v9 )
return 1;
result = 0;
if ( v9 >= (__int16)(_bittest((const signed __int32 *)a5, 1u) + 3) )
return 1;
}
return result;
}
| validateArguments:
XOR EAX,EAX
TEST EDX,EDX
JLE 0x001aaac8
CMP word ptr [RSI + 0x2],0x0
JZ 0x001aaac8
MOV EAX,EDX
XOR EDX,EDX
LAB_001aaa9f:
CMP RAX,RDX
JZ 0x001aaab0
CMP dword ptr [RCX + RDX*0x4],0x0
LEA RDX,[RDX + 0x1]
JG 0x001aaa9f
JMP 0x001aaac6
LAB_001aaab0:
MOVZX EAX,word ptr [R8 + 0x2]
TEST AX,AX
SETNZ CL
CMP AX,0x2
SETL AL
TEST CL,AL
JZ 0x001aaac9
LAB_001aaac6:
XOR EAX,EAX
LAB_001aaac8:
RET
LAB_001aaac9:
MOVZX ECX,word ptr [R8 + 0x4]
TEST CX,CX
JZ 0x001aaae8
XOR EAX,EAX
BT dword ptr [R8],0x1
MOV EDX,0x0
ADC DX,0x3
CMP CX,DX
JL 0x001aaac8
LAB_001aaae8:
MOV AL,0x1
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(OpenSubdiv::v3_6_0::Bfr::Parameterization
const&, int, int const*, OpenSubdiv::v3_6_0::Bfr::Tessellation::Options const&) */
int8 __thiscall
OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments
(Tessellation *this,Parameterization *param_1,int param_2,int *param_3,Options *param_4)
{
int *piVar1;
short sVar2;
ulong uVar3;
if ((0 < param_2) && (*(short *)(param_1 + 2) != 0)) {
uVar3 = 0;
do {
if ((uint)param_2 == uVar3) {
sVar2 = *(short *)(param_4 + 2);
uVar3 = (ulong)CONCAT11((char)((ushort)sVar2 >> 8),sVar2 < 2);
if (sVar2 != 0 && sVar2 < 2) {
return 0;
}
if ((*(short *)(param_4 + 4) != 0) &&
(uVar3 = 0, *(short *)(param_4 + 4) < (short)(((*(uint *)param_4 >> 1 & 1) != 0) + 3))) {
return 0;
}
return CONCAT71((int7)(uVar3 >> 8),1);
}
piVar1 = param_3 + uVar3;
uVar3 = uVar3 + 1;
} while (0 < *piVar1);
}
return 0;
}
| |
38,453 | OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(OpenSubdiv::v3_6_0::Bfr::Parameterization const&, int, int const*, OpenSubdiv::v3_6_0::Bfr::Tessellation::Options const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | bool
Tessellation::validateArguments(Parameterization const & p,
int numRates, int const rates[], Options const & options) {
// Check the Parameterization:
if (!p.IsValid()) return false;
// Check given tessellation rates:
if (numRates < 1) return false;
for (int i = 0; i < numRates; ++i) {
if (rates[i] < 1) return false;
}
// Check given buffer strides in Options:
int coordStride = options.GetCoordStride();
if (coordStride && (coordStride < 2)) return false;
int facetStride = options.GetFacetStride();
if (facetStride && (facetStride < options.GetFacetSize())) return false;
return true;
} | O3 | cpp | OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(OpenSubdiv::v3_6_0::Bfr::Parameterization const&, int, int const*, OpenSubdiv::v3_6_0::Bfr::Tessellation::Options const&):
xorl %eax, %eax
testl %edx, %edx
jle 0xa1925
cmpw $0x0, 0x2(%rsi)
je 0xa1925
movl %edx, %eax
xorl %edx, %edx
cmpl $0x0, (%rcx,%rdx,4)
jle 0xa1923
incq %rdx
cmpq %rdx, %rax
jne 0xa18ff
movzwl 0x2(%r8), %eax
testw %ax, %ax
setne %cl
cmpw $0x2, %ax
setl %al
testb %al, %cl
je 0xa1926
xorl %eax, %eax
retq
movzwl 0x4(%r8), %ecx
testw %cx, %cx
je 0xa1945
xorl %eax, %eax
btl $0x1, (%r8)
movl $0x0, %edx
adcw $0x3, %dx
cmpw %dx, %cx
jl 0xa1925
movb $0x1, %al
retq
| _ZN10OpenSubdiv6v3_6_03Bfr12Tessellation17validateArgumentsERKNS1_16ParameterizationEiPKiRKNS2_7OptionsE:
xor eax, eax
test edx, edx
jle short locret_A1925
cmp word ptr [rsi+2], 0
jz short locret_A1925
mov eax, edx
xor edx, edx
loc_A18FF:
cmp dword ptr [rcx+rdx*4], 0
jle short loc_A1923
inc rdx
cmp rax, rdx
jnz short loc_A18FF
movzx eax, word ptr [r8+2]
test ax, ax
setnz cl
cmp ax, 2
setl al
test cl, al
jz short loc_A1926
loc_A1923:
xor eax, eax
locret_A1925:
retn
loc_A1926:
movzx ecx, word ptr [r8+4]
test cx, cx
jz short loc_A1945
xor eax, eax
bt dword ptr [r8], 1
mov edx, 0
adc dx, 3
cmp cx, dx
jl short locret_A1925
loc_A1945:
mov al, 1
retn
| char OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(
long long a1,
long long a2,
int a3,
long long a4,
long long a5)
{
char result; // al
long long v6; // rax
long long i; // rdx
__int16 v8; // cx
result = 0;
if ( a3 > 0 && *(_WORD *)(a2 + 2) )
{
v6 = (unsigned int)a3;
for ( i = 0LL; i != v6; ++i )
{
if ( *(int *)(a4 + 4 * i) <= 0 )
return 0;
}
if ( *(_WORD *)(a5 + 2) < 2 && *(_WORD *)(a5 + 2) != 0 )
return 0;
v8 = *(_WORD *)(a5 + 4);
if ( !v8 )
return 1;
result = 0;
if ( v8 >= (__int16)(_bittest((const signed __int32 *)a5, 1u) + 3) )
return 1;
}
return result;
}
| validateArguments:
XOR EAX,EAX
TEST EDX,EDX
JLE 0x001a1925
CMP word ptr [RSI + 0x2],0x0
JZ 0x001a1925
MOV EAX,EDX
XOR EDX,EDX
LAB_001a18ff:
CMP dword ptr [RCX + RDX*0x4],0x0
JLE 0x001a1923
INC RDX
CMP RAX,RDX
JNZ 0x001a18ff
MOVZX EAX,word ptr [R8 + 0x2]
TEST AX,AX
SETNZ CL
CMP AX,0x2
SETL AL
TEST CL,AL
JZ 0x001a1926
LAB_001a1923:
XOR EAX,EAX
LAB_001a1925:
RET
LAB_001a1926:
MOVZX ECX,word ptr [R8 + 0x4]
TEST CX,CX
JZ 0x001a1945
XOR EAX,EAX
BT dword ptr [R8],0x1
MOV EDX,0x0
ADC DX,0x3
CMP CX,DX
JL 0x001a1925
LAB_001a1945:
MOV AL,0x1
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments(OpenSubdiv::v3_6_0::Bfr::Parameterization
const&, int, int const*, OpenSubdiv::v3_6_0::Bfr::Tessellation::Options const&) */
int8 __thiscall
OpenSubdiv::v3_6_0::Bfr::Tessellation::validateArguments
(Tessellation *this,Parameterization *param_1,int param_2,int *param_3,Options *param_4)
{
short sVar1;
ulong uVar2;
if ((0 < param_2) && (*(short *)(param_1 + 2) != 0)) {
uVar2 = 0;
do {
if (param_3[uVar2] < 1) {
return 0;
}
uVar2 = uVar2 + 1;
} while ((uint)param_2 != uVar2);
sVar1 = *(short *)(param_4 + 2);
uVar2 = (ulong)CONCAT11((char)((ushort)sVar1 >> 8),sVar1 < 2);
if ((sVar1 == 0 || sVar1 >= 2) &&
((*(short *)(param_4 + 4) == 0 ||
(uVar2 = 0, (short)(((*(uint *)param_4 >> 1 & 1) != 0) + 3) <= *(short *)(param_4 + 4))))) {
return CONCAT71((int7)(uVar2 >> 8),1);
}
}
return 0;
}
| |
38,454 | string_buffer_putc | bluesky950520[P]quickjs/quickjs.c | static int string_buffer_putc(StringBuffer *s, uint32_t c)
{
if (unlikely(c >= 0x10000)) {
/* surrogate pair */
if (string_buffer_putc16(s, get_hi_surrogate(c)))
return -1;
c = get_lo_surrogate(c);
}
return string_buffer_putc16(s, c);
} | O0 | c | string_buffer_putc:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
cmpl $0x10000, 0x14(%rsp) # imm = 0x10000
setae %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x53dd4
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x14(%rsp), %edi
callq 0x84a50
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x84980
cmpl $0x0, %eax
je 0x53dc7
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x53de6
movl 0x14(%rsp), %edi
callq 0x84a70
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x84980
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
| string_buffer_putc:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_14], esi
cmp [rsp+28h+var_14], offset loc_10000
setnb al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_53DD4
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_20], rax
mov edi, [rsp+28h+var_14]
call get_hi_surrogate_0
mov rdi, [rsp+28h+var_20]
mov esi, eax
call string_buffer_putc16
cmp eax, 0
jz short loc_53DC7
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp short loc_53DE6
loc_53DC7:
mov edi, [rsp+28h+var_14]
call get_lo_surrogate_0
mov [rsp+28h+var_14], eax
loc_53DD4:
mov rdi, [rsp+28h+var_10]
mov esi, [rsp+28h+var_14]
call string_buffer_putc16
mov [rsp+28h+var_4], eax
loc_53DE6:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long string_buffer_putc(long long a1, unsigned int a2)
{
unsigned int hi_surrogate_0; // eax
unsigned int lo_surrogate_0; // [rsp+14h] [rbp-14h]
lo_surrogate_0 = a2;
if ( a2 < (unsigned int)&loc_10000 )
return (unsigned int)string_buffer_putc16(a1, lo_surrogate_0);
hi_surrogate_0 = get_hi_surrogate_0(a2);
if ( !(unsigned int)string_buffer_putc16(a1, hi_surrogate_0) )
{
lo_surrogate_0 = get_lo_surrogate_0(a2);
return (unsigned int)string_buffer_putc16(a1, lo_surrogate_0);
}
return (unsigned int)-1;
}
| string_buffer_putc:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
CMP dword ptr [RSP + 0x14],0x10000
SETNC AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00153dd4
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,dword ptr [RSP + 0x14]
CALL 0x00184a50
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,EAX
CALL 0x00184980
CMP EAX,0x0
JZ 0x00153dc7
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x00153de6
LAB_00153dc7:
MOV EDI,dword ptr [RSP + 0x14]
CALL 0x00184a70
MOV dword ptr [RSP + 0x14],EAX
LAB_00153dd4:
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0x14]
CALL 0x00184980
MOV dword ptr [RSP + 0x24],EAX
LAB_00153de6:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 string_buffer_putc(int8 param_1,uint param_2)
{
int4 uVar1;
int iVar2;
uint local_14;
local_14 = param_2;
if (0xffff < param_2) {
uVar1 = get_hi_surrogate(param_2);
iVar2 = string_buffer_putc16(param_1,uVar1);
if (iVar2 != 0) {
return 0xffffffff;
}
local_14 = get_lo_surrogate(param_2);
}
uVar1 = string_buffer_putc16(param_1,local_14);
return uVar1;
}
| |
38,455 | string_buffer_putc | bluesky950520[P]quickjs/quickjs.c | static int string_buffer_putc(StringBuffer *s, uint32_t c)
{
if (unlikely(c >= 0x10000)) {
/* surrogate pair */
if (string_buffer_putc16(s, get_hi_surrogate(c)))
return -1;
c = get_lo_surrogate(c);
}
return string_buffer_putc16(s, c);
} | O2 | c | string_buffer_putc:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x10000, %esi # imm = 0x10000
jae 0x30654
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x418a6
movl %ebx, %esi
shrl $0xa, %esi
addl $0xd7c0, %esi # imm = 0xD7C0
movq %r14, %rdi
callq 0x418a6
testl %eax, %eax
je 0x30676
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
andl $0x3ff, %ebx # imm = 0x3FF
orl $0xdc00, %ebx # imm = 0xDC00
jmp 0x30643
| string_buffer_putc:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
cmp esi, 10000h
jnb short loc_30654
loc_30643:
mov rdi, r14
mov esi, ebx
add rsp, 8
pop rbx
pop r14
jmp string_buffer_putc16
loc_30654:
mov esi, ebx
shr esi, 0Ah
add esi, 0D7C0h
mov rdi, r14
call string_buffer_putc16
test eax, eax
jz short loc_30676
push 0FFFFFFFFFFFFFFFFh
pop rax
add rsp, 8
pop rbx
pop r14
retn
loc_30676:
and ebx, 3FFh
or ebx, 0DC00h
jmp short loc_30643
| long long string_buffer_putc(long long a1, unsigned int a2)
{
unsigned int v2; // ebx
v2 = a2;
if ( a2 < 0x10000 )
return string_buffer_putc16(a1, v2);
if ( !(unsigned int)string_buffer_putc16(a1, (a2 >> 10) + 55232) )
{
v2 = a2 & 0x3FF | 0xDC00;
return string_buffer_putc16(a1, v2);
}
return -1LL;
}
| string_buffer_putc:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
CMP ESI,0x10000
JNC 0x00130654
LAB_00130643:
MOV RDI,R14
MOV ESI,EBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001418a6
LAB_00130654:
MOV ESI,EBX
SHR ESI,0xa
ADD ESI,0xd7c0
MOV RDI,R14
CALL 0x001418a6
TEST EAX,EAX
JZ 0x00130676
PUSH -0x1
POP RAX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00130676:
AND EBX,0x3ff
OR EBX,0xdc00
JMP 0x00130643
|
int8 string_buffer_putc(int8 param_1,uint param_2)
{
int iVar1;
int8 uVar2;
if (0xffff < param_2) {
iVar1 = string_buffer_putc16(param_1,(param_2 >> 10) + 0xd7c0);
if (iVar1 != 0) {
return 0xffffffffffffffff;
}
param_2 = param_2 & 0x3ff | 0xdc00;
}
uVar2 = string_buffer_putc16(param_1,param_2);
return uVar2;
}
| |
38,456 | LefDefParser::defiAssertion::addPath(char const*, char const*, char const*, char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiAssertion.cpp | void defiAssertion::addPath(const char* fromInst, const char* fromPin,
const char* toInst, const char* toPin) {
int i;
struct defiAssertPath* s;
// set wiredlogic to false
isWiredlogic_ = 0;
// make our own copy
s = (struct defiAssertPath*)malloc(sizeof(struct defiAssertPath));
i = strlen(fromInst) + 1;
s->fromInst_ = (char*)malloc(i);
strcpy(s->fromInst_, defData->DEFCASE(fromInst));
i = strlen(toInst) + 1;
s->toInst_ = (char*)malloc(i);
strcpy(s->toInst_, defData->DEFCASE(toInst));
i = strlen(fromPin) + 1;
s->fromPin_ = (char*)malloc(i);
strcpy(s->fromPin_, defData->DEFCASE(fromPin));
i = strlen(toPin) + 1;
s->toPin_ = (char*)malloc(i);
strcpy(s->toPin_, defData->DEFCASE(toPin));
// make sure there is space in the array
if (numItems_ >= numItemsAllocated_)
bumpItems();
// place it
i = numItems_;
items_[i] = (int*)s;
itemTypes_[i] = 'p';
numItems_ = i + 1;
//strcpy(itemTypes_, "p");
} | O3 | cpp | LefDefParser::defiAssertion::addPath(char const*, char const*, char const*, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
movb $0x0, 0x7(%rdi)
movl $0x20, %edi
callq 0x7270
movq %rax, %r14
movq %rbp, %rdi
callq 0x70d0
incl %eax
movslq %eax, %rdi
callq 0x7270
movq %rax, %r15
movq %rax, 0x10(%r14)
movq 0x58(%rbx), %rdi
movq %rbp, %rsi
callq 0x1b638
movq %r15, %rdi
movq %rax, %rsi
callq 0x7190
movq %r13, %rdi
callq 0x70d0
incl %eax
movslq %eax, %rdi
callq 0x7270
movq %rax, %r15
movq %rax, 0x18(%r14)
movq 0x58(%rbx), %rdi
movq %r13, %rsi
callq 0x1b638
movq %r15, %rdi
movq %rax, %rsi
callq 0x7190
movq %r12, %rdi
callq 0x70d0
incl %eax
movslq %eax, %rdi
callq 0x7270
movq %rax, %r15
movq %rax, (%r14)
movq 0x58(%rbx), %rdi
movq %r12, %rsi
callq 0x1b638
movq %r15, %rdi
movq %rax, %rsi
callq 0x7190
movq (%rsp), %r12
movq %r12, %rdi
callq 0x70d0
incl %eax
movslq %eax, %rdi
callq 0x7270
movq %rax, %r15
movq %rax, 0x8(%r14)
movq 0x58(%rbx), %rdi
movq %r12, %rsi
callq 0x1b638
movq %r15, %rdi
movq %rax, %rsi
callq 0x7190
movl 0x40(%rbx), %eax
cmpl 0x44(%rbx), %eax
jl 0x2a742
movq %rbx, %rdi
callq 0x2a4de
movl 0x40(%rbx), %eax
movq 0x50(%rbx), %rcx
cltq
movq %r14, (%rcx,%rax,8)
movq 0x48(%rbx), %rcx
movb $0x70, (%rcx,%rax)
incl %eax
movl %eax, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12LefDefParser13defiAssertion7addPathEPKcS2_S2_S2_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], r8
mov r13, rcx
mov r12, rdx
mov rbp, rsi
mov rbx, rdi
mov byte ptr [rdi+7], 0
mov edi, 20h ; ' '
call _malloc
mov r14, rax
mov rdi, rbp
call _strlen
inc eax
movsxd rdi, eax
call _malloc
mov r15, rax
mov [r14+10h], rax
mov rdi, [rbx+58h]; this
mov rsi, rbp; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r15
mov rsi, rax
call _strcpy
mov rdi, r13
call _strlen
inc eax
movsxd rdi, eax
call _malloc
mov r15, rax
mov [r14+18h], rax
mov rdi, [rbx+58h]; this
mov rsi, r13; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r15
mov rsi, rax
call _strcpy
mov rdi, r12
call _strlen
inc eax
movsxd rdi, eax
call _malloc
mov r15, rax
mov [r14], rax
mov rdi, [rbx+58h]; this
mov rsi, r12; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r15
mov rsi, rax
call _strcpy
mov r12, [rsp+38h+var_38]
mov rdi, r12
call _strlen
inc eax
movsxd rdi, eax
call _malloc
mov r15, rax
mov [r14+8], rax
mov rdi, [rbx+58h]; this
mov rsi, r12; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r15
mov rsi, rax
call _strcpy
mov eax, [rbx+40h]
cmp eax, [rbx+44h]
jl short loc_2A742
mov rdi, rbx; this
call _ZN12LefDefParser13defiAssertion9bumpItemsEv; LefDefParser::defiAssertion::bumpItems(void)
mov eax, [rbx+40h]
loc_2A742:
mov rcx, [rbx+50h]
cdqe
mov [rcx+rax*8], r14
mov rcx, [rbx+48h]
mov byte ptr [rcx+rax], 70h ; 'p'
inc eax
mov [rbx+40h], eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::defiAssertion::addPath(
LefDefParser::defiAssertion *this,
const char *a2,
const char *a3,
const char *a4,
const char *a5)
{
long long *v7; // r14
int v8; // eax
long long v9; // r15
const char *v10; // rax
int v11; // eax
long long v12; // r15
const char *v13; // rax
int v14; // eax
long long v15; // r15
const char *v16; // rax
int v17; // eax
long long v18; // r15
const char *v19; // rax
int v20; // eax
long long result; // rax
*((_BYTE *)this + 7) = 0;
v7 = (long long *)malloc(0x20uLL);
v8 = strlen(a2);
v9 = malloc(v8 + 1);
v7[2] = v9;
v10 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 11), a2);
strcpy(v9, v10);
v11 = strlen(a4);
v12 = malloc(v11 + 1);
v7[3] = v12;
v13 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 11), a4);
strcpy(v12, v13);
v14 = strlen(a3);
v15 = malloc(v14 + 1);
*v7 = v15;
v16 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 11), a3);
strcpy(v15, v16);
v17 = strlen(a5);
v18 = malloc(v17 + 1);
v7[1] = v18;
v19 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 11), a5);
strcpy(v18, v19);
v20 = *((_DWORD *)this + 16);
if ( v20 >= *((_DWORD *)this + 17) )
{
LefDefParser::defiAssertion::bumpItems(this);
v20 = *((_DWORD *)this + 16);
}
*(_QWORD *)(*((_QWORD *)this + 10) + 8LL * v20) = v7;
*(_BYTE *)(*((_QWORD *)this + 9) + v20) = 112;
result = (unsigned int)(v20 + 1);
*((_DWORD *)this + 16) = result;
return result;
}
| addPath:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],R8
MOV R13,RCX
MOV R12,RDX
MOV RBP,RSI
MOV RBX,RDI
MOV byte ptr [RDI + 0x7],0x0
MOV EDI,0x20
CALL 0x00107270
MOV R14,RAX
MOV RDI,RBP
CALL 0x001070d0
INC EAX
MOVSXD RDI,EAX
CALL 0x00107270
MOV R15,RAX
MOV qword ptr [R14 + 0x10],RAX
MOV RDI,qword ptr [RBX + 0x58]
MOV RSI,RBP
CALL 0x0011b638
MOV RDI,R15
MOV RSI,RAX
CALL 0x00107190
MOV RDI,R13
CALL 0x001070d0
INC EAX
MOVSXD RDI,EAX
CALL 0x00107270
MOV R15,RAX
MOV qword ptr [R14 + 0x18],RAX
MOV RDI,qword ptr [RBX + 0x58]
MOV RSI,R13
CALL 0x0011b638
MOV RDI,R15
MOV RSI,RAX
CALL 0x00107190
MOV RDI,R12
CALL 0x001070d0
INC EAX
MOVSXD RDI,EAX
CALL 0x00107270
MOV R15,RAX
MOV qword ptr [R14],RAX
MOV RDI,qword ptr [RBX + 0x58]
MOV RSI,R12
CALL 0x0011b638
MOV RDI,R15
MOV RSI,RAX
CALL 0x00107190
MOV R12,qword ptr [RSP]
MOV RDI,R12
CALL 0x001070d0
INC EAX
MOVSXD RDI,EAX
CALL 0x00107270
MOV R15,RAX
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,qword ptr [RBX + 0x58]
MOV RSI,R12
CALL 0x0011b638
MOV RDI,R15
MOV RSI,RAX
CALL 0x00107190
MOV EAX,dword ptr [RBX + 0x40]
CMP EAX,dword ptr [RBX + 0x44]
JL 0x0012a742
MOV RDI,RBX
CALL 0x0012a4de
MOV EAX,dword ptr [RBX + 0x40]
LAB_0012a742:
MOV RCX,qword ptr [RBX + 0x50]
CDQE
MOV qword ptr [RCX + RAX*0x8],R14
MOV RCX,qword ptr [RBX + 0x48]
MOV byte ptr [RCX + RAX*0x1],0x70
INC EAX
MOV dword ptr [RBX + 0x40],EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defiAssertion::addPath(char const*, char const*, char const*, char const*) */
void __thiscall
LefDefParser::defiAssertion::addPath
(defiAssertion *this,char *param_1,char *param_2,char *param_3,char *param_4)
{
int iVar1;
int8 *puVar2;
size_t sVar3;
char *pcVar4;
char *pcVar5;
this[7] = (defiAssertion)0x0;
puVar2 = (int8 *)malloc(0x20);
sVar3 = strlen(param_1);
pcVar4 = (char *)malloc((long)((int)sVar3 + 1));
puVar2[2] = pcVar4;
pcVar5 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x58),param_1);
strcpy(pcVar4,pcVar5);
sVar3 = strlen(param_3);
pcVar4 = (char *)malloc((long)((int)sVar3 + 1));
puVar2[3] = pcVar4;
pcVar5 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x58),param_3);
strcpy(pcVar4,pcVar5);
sVar3 = strlen(param_2);
pcVar4 = (char *)malloc((long)((int)sVar3 + 1));
*puVar2 = pcVar4;
pcVar5 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x58),param_2);
strcpy(pcVar4,pcVar5);
sVar3 = strlen(param_4);
pcVar4 = (char *)malloc((long)((int)sVar3 + 1));
puVar2[1] = pcVar4;
pcVar5 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x58),param_4);
strcpy(pcVar4,pcVar5);
iVar1 = *(int *)(this + 0x40);
if (*(int *)(this + 0x44) <= iVar1) {
bumpItems(this);
iVar1 = *(int *)(this + 0x40);
}
*(int8 **)(*(long *)(this + 0x50) + (long)iVar1 * 8) = puVar2;
*(int1 *)(*(long *)(this + 0x48) + (long)iVar1) = 0x70;
*(int *)(this + 0x40) = iVar1 + 1;
return;
}
| |
38,457 | js_async_module_execution_fulfilled | bluesky950520[P]quickjs/quickjs.c | static JSValue js_async_module_execution_fulfilled(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv, int magic, JSValue *func_data)
{
JSModuleDef *module = JS_VALUE_GET_PTR(func_data[0]);
ExecModuleList exec_list_s, *exec_list = &exec_list_s;
int i;
if (module->status == JS_MODULE_STATUS_EVALUATED) {
assert(module->eval_has_exception);
return JS_UNDEFINED;
}
assert(module->status == JS_MODULE_STATUS_EVALUATING_ASYNC);
assert(!module->eval_has_exception);
assert(module->async_evaluation);
module->async_evaluation = FALSE;
js_set_module_evaluated(ctx, module);
exec_list->tab = NULL;
exec_list->count = 0;
exec_list->size = 0;
if (gather_available_ancestors(ctx, module, exec_list) < 0) {
js_free(ctx, exec_list->tab);
return JS_EXCEPTION;
}
/* sort by increasing async_evaluation timestamp */
rqsort(exec_list->tab, exec_list->count, sizeof(exec_list->tab[0]),
exec_module_list_cmp, NULL);
for(i = 0; i < exec_list->count; i++) {
JSModuleDef *m = exec_list->tab[i];
if (m->status == JS_MODULE_STATUS_EVALUATED) {
assert(m->eval_has_exception);
} else if (m->has_tla) {
js_execute_async_module(ctx, m);
} else {
JSValue error;
if (js_execute_sync_module(ctx, m, &error) < 0) {
JSValue m_obj = JS_NewModuleValue(ctx, m);
js_async_module_execution_rejected(ctx, JS_UNDEFINED,
1, (JSValueConst *)&error, 0,
&m_obj);
JS_FreeValue(ctx, m_obj);
JS_FreeValue(ctx, error);
} else {
js_set_module_evaluated(ctx, m);
}
}
}
js_free(ctx, exec_list->tab);
return JS_UNDEFINED;
} | O0 | c | js_async_module_execution_fulfilled:
subq $0xb8, %rsp
movq 0xc0(%rsp), %rax
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 0xc0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x70(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x70(%rsp), %rax
movl 0x80(%rax), %eax
shrl $0x18, %eax
cmpl $0x5, %eax
jne 0x75f04
movl $0x0, 0xa8(%rsp)
movq $0x3, 0xb0(%rsp)
jmp 0x7613a
movq 0x70(%rsp), %rax
movl $0x0, 0xac(%rax)
movq 0x90(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x76480
movq 0x58(%rsp), %rax
movq $0x0, (%rax)
movq 0x58(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x58(%rsp), %rax
movl $0x0, 0xc(%rax)
movq 0x90(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x76570
cmpl $0x0, %eax
jge 0x75f96
movq 0x90(%rsp), %rdi
movq 0x58(%rsp), %rax
movq (%rax), %rsi
callq 0x20af0
movl $0x0, 0xa8(%rsp)
movq $0x6, 0xb0(%rsp)
jmp 0x7613a
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x58(%rsp), %rax
movslq 0x8(%rax), %rsi
movl $0x8, %edx
leaq 0x75d(%rip), %rcx # 0x76710
xorl %eax, %eax
movl %eax, %r8d
callq 0x1efe0
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
movq 0x58(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x7610e
movq 0x58(%rsp), %rax
movq (%rax), %rax
movslq 0x54(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movl 0x80(%rax), %eax
shrl $0x18, %eax
cmpl $0x5, %eax
jne 0x76005
jmp 0x760fc
movq 0x48(%rsp), %rax
movl 0x80(%rax), %eax
shll $0x18, %eax
sarl $0x18, %eax
cmpl $0x0, %eax
je 0x76032
movq 0x90(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x75980
jmp 0x760fa
movq 0x90(%rsp), %rdi
movq 0x48(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x75bf0
cmpl $0x0, %eax
jge 0x760e6
movq 0x90(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x72d30
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x90(%rsp), %rdi
movl $0x0, 0x18(%rsp)
movq $0x3, 0x20(%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movl $0x1, %ecx
leaq 0x38(%rsp), %r8
xorl %r9d, %r9d
leaq 0x28(%rsp), %rax
movq %rax, (%rsp)
callq 0x76160
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x90(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x229d0
movq 0x90(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x229d0
jmp 0x760f8
movq 0x90(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x76480
jmp 0x760fa
jmp 0x760fc
jmp 0x760fe
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x75fc5
movq 0x90(%rsp), %rdi
movq 0x58(%rsp), %rax
movq (%rax), %rsi
callq 0x20af0
movl $0x0, 0xa8(%rsp)
movq $0x3, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
movq 0xb0(%rsp), %rdx
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
| js_async_module_execution_fulfilled:
sub rsp, 0B8h
mov rax, [rsp+0B8h+arg_0]
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 rax, [rsp+0B8h+arg_0]
mov rax, [rax]
mov [rsp+0B8h+var_48], rax
lea rax, [rsp+0B8h+var_58]
mov [rsp+0B8h+var_60], rax
mov rax, [rsp+0B8h+var_48]
mov eax, [rax+80h]
shr eax, 18h
cmp eax, 5
jnz short loc_75F04
mov dword ptr [rsp+0B8h+var_10], 0
mov [rsp+0B8h+var_8], 3
jmp loc_7613A
loc_75F04:
mov rax, [rsp+0B8h+var_48]
mov dword ptr [rax+0ACh], 0
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_48]
call js_set_module_evaluated
mov rax, [rsp+0B8h+var_60]
mov qword ptr [rax], 0
mov rax, [rsp+0B8h+var_60]
mov dword ptr [rax+8], 0
mov rax, [rsp+0B8h+var_60]
mov dword ptr [rax+0Ch], 0
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_60]
call gather_available_ancestors
cmp eax, 0
jge short loc_75F96
mov rdi, [rsp+0B8h+var_28]
mov rax, [rsp+0B8h+var_60]
mov rsi, [rax]
call js_free
mov dword ptr [rsp+0B8h+var_10], 0
mov [rsp+0B8h+var_8], 6
jmp loc_7613A
loc_75F96:
mov rax, [rsp+0B8h+var_60]
mov rdi, [rax]
mov rax, [rsp+0B8h+var_60]
movsxd rsi, dword ptr [rax+8]
mov edx, 8
lea rcx, exec_module_list_cmp
xor eax, eax
mov r8d, eax
call rqsort
mov [rsp+0B8h+var_64], 0
loc_75FC5:
mov eax, [rsp+0B8h+var_64]
mov rcx, [rsp+0B8h+var_60]
cmp eax, [rcx+8]
jge loc_7610E
mov rax, [rsp+0B8h+var_60]
mov rax, [rax]
movsxd rcx, [rsp+0B8h+var_64]
mov rax, [rax+rcx*8]
mov [rsp+0B8h+var_70], rax
mov rax, [rsp+0B8h+var_70]
mov eax, [rax+80h]
shr eax, 18h
cmp eax, 5
jnz short loc_76005
jmp loc_760FC
loc_76005:
mov rax, [rsp+0B8h+var_70]
mov eax, [rax+80h]
shl eax, 18h
sar eax, 18h
cmp eax, 0
jz short loc_76032
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_70]
call js_execute_async_module
jmp loc_760FA
loc_76032:
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_70]
lea rdx, [rsp+0B8h+var_80]
call js_execute_sync_module
cmp eax, 0
jge loc_760E6
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_70]
call JS_NewModuleValue
mov [rsp+0B8h+var_90], rax
mov [rsp+0B8h+var_88], rdx
mov rdi, [rsp+0B8h+var_28]
mov dword ptr [rsp+0B8h+var_A0], 0
mov [rsp+0B8h+var_98], 3
mov rsi, [rsp+0B8h+var_A0]
mov rdx, [rsp+0B8h+var_98]
mov ecx, 1
lea r8, [rsp+0B8h+var_80]
xor r9d, r9d
lea rax, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_B8], rax
call js_async_module_execution_rejected
mov [rsp+0B8h+var_B0], rax
mov [rsp+0B8h+var_A8], rdx
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_90]
mov rdx, [rsp+0B8h+var_88]
call JS_FreeValue
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_80]
mov rdx, [rsp+0B8h+var_78]
call JS_FreeValue
jmp short loc_760F8
loc_760E6:
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_70]
call js_set_module_evaluated
loc_760F8:
jmp short $+2
loc_760FA:
jmp short $+2
loc_760FC:
jmp short $+2
loc_760FE:
mov eax, [rsp+0B8h+var_64]
add eax, 1
mov [rsp+0B8h+var_64], eax
jmp loc_75FC5
loc_7610E:
mov rdi, [rsp+0B8h+var_28]
mov rax, [rsp+0B8h+var_60]
mov rsi, [rax]
call js_free
mov dword ptr [rsp+0B8h+var_10], 0
mov [rsp+0B8h+var_8], 3
loc_7613A:
mov rax, [rsp+0B8h+var_10]
mov rdx, [rsp+0B8h+var_8]
add rsp, 0B8h
retn
| long long js_async_module_execution_fulfilled(
long long a1,
long long a2,
long long a3,
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 *a15)
{
double v15; // xmm4_8
double v16; // xmm5_8
long long v17; // rdx
long long v18; // rcx
long long v19; // r8
long long v20; // r9
long long v21; // rdx
long long v23; // [rsp+28h] [rbp-90h] BYREF
long long v24; // [rsp+30h] [rbp-88h]
long long v25[2]; // [rsp+38h] [rbp-80h] BYREF
long long v26; // [rsp+48h] [rbp-70h]
int i; // [rsp+54h] [rbp-64h]
char *v28; // [rsp+58h] [rbp-60h]
char v29; // [rsp+60h] [rbp-58h] BYREF
long long v30; // [rsp+70h] [rbp-48h]
int v31; // [rsp+7Ch] [rbp-3Ch]
long long v32; // [rsp+80h] [rbp-38h]
int v33; // [rsp+8Ch] [rbp-2Ch]
long long v34; // [rsp+90h] [rbp-28h]
long long v35; // [rsp+98h] [rbp-20h]
long long v36; // [rsp+A0h] [rbp-18h]
long long v37; // [rsp+A8h] [rbp-10h]
long long v38; // [rsp+B0h] [rbp-8h]
v35 = a2;
v36 = a3;
v34 = a1;
v33 = a4;
v32 = a5;
v31 = a6;
v30 = *a15;
v28 = &v29;
if ( HIBYTE(*(_DWORD *)(v30 + 128)) == 5 )
{
LODWORD(v37) = 0;
v38 = 3LL;
}
else
{
*(_DWORD *)(v30 + 172) = 0;
js_set_module_evaluated(v34, v30);
*(_QWORD *)v28 = 0LL;
*((_DWORD *)v28 + 2) = 0;
*((_DWORD *)v28 + 3) = 0;
if ( (int)gather_available_ancestors(v34, v30, v28) >= 0 )
{
rqsort(
*(_QWORD *)v28,
*((int *)v28 + 2),
8LL,
(long long ( *)(unsigned long long, unsigned long long, long long))exec_module_list_cmp,
0LL);
for ( i = 0; i < *((_DWORD *)v28 + 2); ++i )
{
v26 = *(_QWORD *)(*(_QWORD *)v28 + 8LL * i);
if ( HIBYTE(*(_DWORD *)(v26 + 128)) != 5 )
{
if ( (unsigned __int8)*(_DWORD *)(v26 + 128) )
{
js_execute_async_module(v34, v26, a7, a8, a9, a10, v15, v16, a13, a14);
}
else if ( (int)js_execute_sync_module(v34, v26, v25, a7, a8, a9, a10, v15, v16, a13, a14) >= 0 )
{
js_set_module_evaluated(v34, v26);
}
else
{
v23 = JS_NewModuleValue(v34, v26, v17, v18, v19, v20);
v24 = v21;
js_async_module_execution_rejected(v34, 0, 3, 1, (int)v25, 0, (long long)&v23);
JS_FreeValue(v34, v23, v24);
JS_FreeValue(v34, v25[0], v25[1]);
}
}
}
js_free(v34, *(_QWORD *)v28);
LODWORD(v37) = 0;
v38 = 3LL;
}
else
{
js_free(v34, *(_QWORD *)v28);
LODWORD(v37) = 0;
v38 = 6LL;
}
}
return v37;
}
| js_async_module_execution_fulfilled:
SUB RSP,0xb8
MOV RAX,qword ptr [RSP + 0xc0]
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 RAX,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x70],RAX
LEA RAX,[RSP + 0x60]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV EAX,dword ptr [RAX + 0x80]
SHR EAX,0x18
CMP EAX,0x5
JNZ 0x00175f04
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x3
JMP 0x0017613a
LAB_00175f04:
MOV RAX,qword ptr [RSP + 0x70]
MOV dword ptr [RAX + 0xac],0x0
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x70]
CALL 0x00176480
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0xc],0x0
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x00176570
CMP EAX,0x0
JGE 0x00175f96
MOV RDI,qword ptr [RSP + 0x90]
MOV RAX,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RAX]
CALL 0x00120af0
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x6
JMP 0x0017613a
LAB_00175f96:
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x58]
MOVSXD RSI,dword ptr [RAX + 0x8]
MOV EDX,0x8
LEA RCX,[0x176710]
XOR EAX,EAX
MOV R8D,EAX
CALL 0x0011efe0
MOV dword ptr [RSP + 0x54],0x0
LAB_00175fc5:
MOV EAX,dword ptr [RSP + 0x54]
MOV RCX,qword ptr [RSP + 0x58]
CMP EAX,dword ptr [RCX + 0x8]
JGE 0x0017610e
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RSP + 0x54]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV EAX,dword ptr [RAX + 0x80]
SHR EAX,0x18
CMP EAX,0x5
JNZ 0x00176005
JMP 0x001760fc
LAB_00176005:
MOV RAX,qword ptr [RSP + 0x48]
MOV EAX,dword ptr [RAX + 0x80]
SHL EAX,0x18
SAR EAX,0x18
CMP EAX,0x0
JZ 0x00176032
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00175980
JMP 0x001760fa
LAB_00176032:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x48]
LEA RDX,[RSP + 0x38]
CALL 0x00175bf0
CMP EAX,0x0
JGE 0x001760e6
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00172d30
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RDI,qword ptr [RSP + 0x90]
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x3
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
MOV ECX,0x1
LEA R8,[RSP + 0x38]
XOR R9D,R9D
LEA RAX,[RSP + 0x28]
MOV qword ptr [RSP],RAX
CALL 0x00176160
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x001229d0
JMP 0x001760f8
LAB_001760e6:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00176480
LAB_001760f8:
JMP 0x001760fa
LAB_001760fa:
JMP 0x001760fc
LAB_001760fc:
JMP 0x001760fe
LAB_001760fe:
MOV EAX,dword ptr [RSP + 0x54]
ADD EAX,0x1
MOV dword ptr [RSP + 0x54],EAX
JMP 0x00175fc5
LAB_0017610e:
MOV RDI,qword ptr [RSP + 0x90]
MOV RAX,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RAX]
CALL 0x00120af0
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x3
LAB_0017613a:
MOV RAX,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0xb0]
ADD RSP,0xb8
RET
|
int1 [16]
js_async_module_execution_fulfilled
(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 param_5,int4 param_6,long *param_7)
{
int iVar1;
int1 auVar2 [16];
uint uStack_9c;
int1 local_90 [16];
int8 local_80;
int8 local_78;
long local_70;
int local_64;
long *local_60;
long local_58 [2];
long local_48;
int4 local_3c;
int8 local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 uStack_c;
int8 local_8;
local_48 = *param_7;
local_60 = local_58;
if (*(uint *)(local_48 + 0x80) >> 0x18 == 5) {
local_8 = 3;
}
else {
*(int4 *)(local_48 + 0xac) = 0;
local_3c = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
js_set_module_evaluated(param_1,local_48);
*local_60 = 0;
*(int4 *)(local_60 + 1) = 0;
*(int4 *)((long)local_60 + 0xc) = 0;
iVar1 = gather_available_ancestors(local_28,local_48,local_60);
if (iVar1 < 0) {
js_free(local_28,*local_60);
local_8 = 6;
}
else {
rqsort(*local_60,(long)(int)local_60[1],8,exec_module_list_cmp,0);
for (local_64 = 0; local_64 < (int)local_60[1]; local_64 = local_64 + 1) {
local_70 = *(long *)(*local_60 + (long)local_64 * 8);
if (*(uint *)(local_70 + 0x80) >> 0x18 != 5) {
if ((char)*(int4 *)(local_70 + 0x80) == '\0') {
iVar1 = js_execute_sync_module(local_28,local_70,&local_80);
if (iVar1 < 0) {
auVar2 = JS_NewModuleValue(local_28,local_70);
local_90 = auVar2;
js_async_module_execution_rejected
(local_28,(ulong)uStack_9c << 0x20,3,1,&local_80,0,local_90);
JS_FreeValue(local_28,local_90._0_8_,local_90._8_8_);
JS_FreeValue(local_28,local_80,local_78);
}
else {
js_set_module_evaluated(local_28,local_70);
}
}
else {
js_execute_async_module(local_28,local_70);
}
}
}
js_free(local_28,*local_60);
local_8 = 3;
}
}
auVar2._4_8_ = local_8;
auVar2._0_4_ = uStack_c;
auVar2._12_4_ = 0;
return auVar2 << 0x20;
}
| |
38,458 | js_async_module_execution_fulfilled | bluesky950520[P]quickjs/quickjs.c | static JSValue js_async_module_execution_fulfilled(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv, int magic, JSValue *func_data)
{
JSModuleDef *module = JS_VALUE_GET_PTR(func_data[0]);
ExecModuleList exec_list_s, *exec_list = &exec_list_s;
int i;
if (module->status == JS_MODULE_STATUS_EVALUATED) {
assert(module->eval_has_exception);
return JS_UNDEFINED;
}
assert(module->status == JS_MODULE_STATUS_EVALUATING_ASYNC);
assert(!module->eval_has_exception);
assert(module->async_evaluation);
module->async_evaluation = FALSE;
js_set_module_evaluated(ctx, module);
exec_list->tab = NULL;
exec_list->count = 0;
exec_list->size = 0;
if (gather_available_ancestors(ctx, module, exec_list) < 0) {
js_free(ctx, exec_list->tab);
return JS_EXCEPTION;
}
/* sort by increasing async_evaluation timestamp */
rqsort(exec_list->tab, exec_list->count, sizeof(exec_list->tab[0]),
exec_module_list_cmp, NULL);
for(i = 0; i < exec_list->count; i++) {
JSModuleDef *m = exec_list->tab[i];
if (m->status == JS_MODULE_STATUS_EVALUATED) {
assert(m->eval_has_exception);
} else if (m->has_tla) {
js_execute_async_module(ctx, m);
} else {
JSValue error;
if (js_execute_sync_module(ctx, m, &error) < 0) {
JSValue m_obj = JS_NewModuleValue(ctx, m);
js_async_module_execution_rejected(ctx, JS_UNDEFINED,
1, (JSValueConst *)&error, 0,
&m_obj);
JS_FreeValue(ctx, m_obj);
JS_FreeValue(ctx, error);
} else {
js_set_module_evaluated(ctx, m);
}
}
}
js_free(ctx, exec_list->tab);
return JS_UNDEFINED;
} | O1 | c | js_async_module_execution_fulfilled:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x80(%rsp), %rax
movq (%rax), %r14
movzbl 0x83(%r14), %eax
shll $0x18, %eax
movl $0x3, %r15d
cmpl $0x5000000, %eax # imm = 0x5000000
je 0x443a9
movq %rdi, %rbx
movl $0x0, 0xac(%r14)
movq %r14, %rsi
callq 0x44537
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x445b4
testl %eax, %eax
js 0x44393
movq 0x10(%rsp), %r14
movslq 0x18(%rsp), %r12
leaq 0x40b(%rip), %rcx # 0x446cc
movl $0x8, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %r8d, %r8d
callq 0x1b41d
movl $0x3, %r15d
testq %r12, %r12
jle 0x4439e
xorl %r15d, %r15d
leaq 0x38(%rsp), %r13
movq (%r14,%r15,8), %rbp
movl 0x80(%rbp), %eax
movl %eax, %ecx
andl $0xff000000, %ecx # imm = 0xFF000000
cmpl $0x5000000, %ecx # imm = 0x5000000
je 0x44373
movq %rbx, %rdi
testb %al, %al
jne 0x44381
movq %rbp, %rsi
movq %r13, %rdx
callq 0x441c9
testl %eax, %eax
js 0x44328
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x44537
jmp 0x44373
incl (%rbp)
movq %rbp, 0x28(%rsp)
movq $-0x3, 0x30(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r13, %r8
callq 0x443bd
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
movq $-0x3, %rdx
callq 0x1ccb2
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
incq %r15
cmpq %r15, %r12
jne 0x442eb
jmp 0x4438b
movq %rbp, %rsi
callq 0x11026
jmp 0x44373
movl $0x3, %r15d
jmp 0x4439e
movl $0x6, %r15d
movq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1bf85
xorl %eax, %eax
movq %r15, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_async_module_execution_fulfilled:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rax, [rsp+78h+arg_0]
mov r14, [rax]
movzx eax, byte ptr [r14+83h]
shl eax, 18h
mov r15d, 3
cmp eax, 5000000h
jz loc_443A9
mov rbx, rdi
mov dword ptr [r14+0ACh], 0
mov rsi, r14
call js_set_module_evaluated
xorps xmm0, xmm0
lea rdx, [rsp+78h+var_68]
movaps xmmword ptr [rdx], xmm0
mov rdi, rbx
mov rsi, r14
call gather_available_ancestors
test eax, eax
js loc_44393
mov r14, [rsp+78h+var_68]
movsxd r12, [rsp+78h+var_60]
lea rcx, exec_module_list_cmp
mov edx, 8
mov rdi, r14
mov rsi, r12
xor r8d, r8d
call rqsort
mov r15d, 3
test r12, r12
jle loc_4439E
xor r15d, r15d
lea r13, [rsp+78h+var_40]
loc_442EB:
mov rbp, [r14+r15*8]
mov eax, [rbp+80h]
mov ecx, eax
and ecx, 0FF000000h
cmp ecx, 5000000h
jz short loc_44373
mov rdi, rbx
test al, al
jnz short loc_44381
mov rsi, rbp
mov rdx, r13
call js_execute_sync_module
test eax, eax
js short loc_44328
mov rdi, rbx
mov rsi, rbp
call js_set_module_evaluated
jmp short loc_44373
loc_44328:
inc dword ptr [rbp+0]
mov [rsp+78h+var_50], rbp
mov [rsp+78h+var_48], 0FFFFFFFFFFFFFFFDh
lea rax, [rsp+78h+var_50]
mov [rsp+78h+var_78], rax
mov rdi, rbx
mov r8, r13
call js_async_module_execution_rejected
mov rdi, [rbx+18h]
mov rsi, rbp
mov rdx, 0FFFFFFFFFFFFFFFDh
call JS_FreeValueRT
mov rsi, [rsp+78h+var_40]
mov rdx, [rsp+78h+var_38]
mov rdi, [rbx+18h]
call JS_FreeValueRT
loc_44373:
inc r15
cmp r12, r15
jnz loc_442EB
jmp short loc_4438B
loc_44381:
mov rsi, rbp
call js_execute_async_module
jmp short loc_44373
loc_4438B:
mov r15d, 3
jmp short loc_4439E
loc_44393:
mov r15d, 6
mov r14, [rsp+78h+var_68]
loc_4439E:
mov rdi, rbx
mov rsi, r14
call js_free
loc_443A9:
xor eax, eax
mov rdx, r15
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_async_module_execution_fulfilled(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long *a7)
{
long long v7; // r14
long long v8; // r14
long long v9; // r12
long long i; // r15
_DWORD *v11; // rbp
int v12; // eax
long long v13; // rsi
int v14; // edx
int v15; // ecx
int v16; // r9d
__int128 v18; // [rsp+10h] [rbp-68h] BYREF
_QWORD v19[2]; // [rsp+28h] [rbp-50h] BYREF
_DWORD *v20[8]; // [rsp+38h] [rbp-40h] BYREF
v7 = *a7;
if ( *(unsigned __int8 *)(*a7 + 131) << 24 != 83886080 )
{
*(_DWORD *)(v7 + 172) = 0;
js_set_module_evaluated(a1, v7);
v18 = 0LL;
if ( (int)gather_available_ancestors(a1, v7, &v18) < 0 )
{
v8 = v18;
}
else
{
v8 = v18;
v9 = SDWORD2(v18);
rqsort(
v18,
SDWORD2(v18),
8LL,
(long long ( *)(unsigned long long, unsigned long long, long long))exec_module_list_cmp,
0LL);
if ( v9 > 0 )
{
for ( i = 0LL; i != v9; ++i )
{
v11 = *(_DWORD **)(v8 + 8 * i);
v12 = v11[32];
if ( (v12 & 0xFF000000) != 0x5000000 )
{
if ( (_BYTE)v12 )
{
js_execute_async_module(a1, *(_QWORD *)(v8 + 8 * i));
}
else
{
v13 = *(_QWORD *)(v8 + 8 * i);
if ( (int)js_execute_sync_module(a1, v13, v20) < 0 )
{
++*v11;
v19[0] = v11;
v19[1] = -3LL;
js_async_module_execution_rejected(a1, v13, v14, v15, (int)v20, v16, (long long)v19);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v11, -3LL);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v20[0], (long long)v20[1]);
}
else
{
js_set_module_evaluated(a1, v11);
}
}
}
}
}
}
js_free(a1, v8);
}
return 0LL;
}
| js_async_module_execution_fulfilled:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr [RSP + 0x80]
MOV R14,qword ptr [RAX]
MOVZX EAX,byte ptr [R14 + 0x83]
SHL EAX,0x18
MOV R15D,0x3
CMP EAX,0x5000000
JZ 0x001443a9
MOV RBX,RDI
MOV dword ptr [R14 + 0xac],0x0
MOV RSI,R14
CALL 0x00144537
XORPS XMM0,XMM0
LEA RDX,[RSP + 0x10]
MOVAPS xmmword ptr [RDX],XMM0
MOV RDI,RBX
MOV RSI,R14
CALL 0x001445b4
TEST EAX,EAX
JS 0x00144393
MOV R14,qword ptr [RSP + 0x10]
MOVSXD R12,dword ptr [RSP + 0x18]
LEA RCX,[0x1446cc]
MOV EDX,0x8
MOV RDI,R14
MOV RSI,R12
XOR R8D,R8D
CALL 0x0011b41d
MOV R15D,0x3
TEST R12,R12
JLE 0x0014439e
XOR R15D,R15D
LEA R13,[RSP + 0x38]
LAB_001442eb:
MOV RBP,qword ptr [R14 + R15*0x8]
MOV EAX,dword ptr [RBP + 0x80]
MOV ECX,EAX
AND ECX,0xff000000
CMP ECX,0x5000000
JZ 0x00144373
MOV RDI,RBX
TEST AL,AL
JNZ 0x00144381
MOV RSI,RBP
MOV RDX,R13
CALL 0x001441c9
TEST EAX,EAX
JS 0x00144328
MOV RDI,RBX
MOV RSI,RBP
CALL 0x00144537
JMP 0x00144373
LAB_00144328:
INC dword ptr [RBP]
MOV qword ptr [RSP + 0x28],RBP
MOV qword ptr [RSP + 0x30],-0x3
LEA RAX,[RSP + 0x28]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV R8,R13
CALL 0x001443bd
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RBP
MOV RDX,-0x3
CALL 0x0011ccb2
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
LAB_00144373:
INC R15
CMP R12,R15
JNZ 0x001442eb
JMP 0x0014438b
LAB_00144381:
MOV RSI,RBP
CALL 0x00111026
JMP 0x00144373
LAB_0014438b:
MOV R15D,0x3
JMP 0x0014439e
LAB_00144393:
MOV R15D,0x6
MOV R14,qword ptr [RSP + 0x10]
LAB_0014439e:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011bf85
LAB_001443a9:
XOR EAX,EAX
MOV RDX,R15
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001442e3) */
/* WARNING: Removing unreachable block (ram,0x001442eb) */
/* WARNING: Removing unreachable block (ram,0x00144305) */
/* WARNING: Removing unreachable block (ram,0x00144381) */
/* WARNING: Removing unreachable block (ram,0x0014430c) */
/* WARNING: Removing unreachable block (ram,0x00144328) */
/* WARNING: Removing unreachable block (ram,0x0014431b) */
/* WARNING: Removing unreachable block (ram,0x00144373) */
/* WARNING: Removing unreachable block (ram,0x0014437f) */
int1 [16] js_async_module_execution_fulfilled(int8 param_1)
{
long lVar1;
int1 auVar2 [16];
int iVar3;
ulong uVar4;
long *in_stack_00000008;
lVar1 = *in_stack_00000008;
uVar4 = 3;
if (*(char *)(lVar1 + 0x83) != '\x05') {
*(int4 *)(lVar1 + 0xac) = 0;
js_set_module_evaluated(param_1,lVar1);
iVar3 = gather_available_ancestors(param_1,lVar1);
if (iVar3 < 0) {
uVar4 = 6;
}
else {
rqsort(0,0,8,exec_module_list_cmp,0);
uVar4 = 3;
}
js_free(param_1,0);
}
auVar2._8_8_ = 0;
auVar2._0_8_ = uVar4;
return auVar2 << 0x40;
}
| |
38,459 | my_8bit_collation_flags_from_data | eloqsql/strings/ctype-simple.c | uint my_8bit_collation_flags_from_data(CHARSET_INFO *cs)
{
uint flags= 0;
if (cs->sort_order && cs->sort_order['A'] < cs->sort_order['a'] &&
cs->sort_order['a'] < cs->sort_order['B'])
flags|= MY_CS_CSSORT;
return flags;
} | O0 | c | my_8bit_collation_flags_from_data:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x4d1dd
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movzbl 0x41(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
movzbl 0x61(%rcx), %ecx
cmpl %ecx, %eax
jge 0x4d1dd
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movzbl 0x61(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
movzbl 0x42(%rcx), %ecx
cmpl %ecx, %eax
jge 0x4d1dd
movl -0xc(%rbp), %eax
orl $0x400, %eax # imm = 0x400
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_8bit_collation_flags_from_data:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+58h], 0
jz short loc_4D1DD
mov rax, [rbp+var_8]
mov rax, [rax+58h]
movzx eax, byte ptr [rax+41h]
mov rcx, [rbp+var_8]
mov rcx, [rcx+58h]
movzx ecx, byte ptr [rcx+61h]
cmp eax, ecx
jge short loc_4D1DD
mov rax, [rbp+var_8]
mov rax, [rax+58h]
movzx eax, byte ptr [rax+61h]
mov rcx, [rbp+var_8]
mov rcx, [rcx+58h]
movzx ecx, byte ptr [rcx+42h]
cmp eax, ecx
jge short loc_4D1DD
mov eax, [rbp+var_C]
or eax, 400h
mov [rbp+var_C], eax
loc_4D1DD:
mov eax, [rbp+var_C]
pop rbp
retn
| long long my_8bit_collation_flags_from_data(long long a1)
{
unsigned int v2; // [rsp+0h] [rbp-Ch]
v2 = 0;
if ( *(_QWORD *)(a1 + 88)
&& *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 65LL) < (int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 97LL)
&& *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 97LL) < (int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 66LL) )
{
return 1024;
}
return v2;
}
| my_8bit_collation_flags_from_data:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x58],0x0
JZ 0x0014d1dd
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX EAX,byte ptr [RAX + 0x41]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x58]
MOVZX ECX,byte ptr [RCX + 0x61]
CMP EAX,ECX
JGE 0x0014d1dd
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX EAX,byte ptr [RAX + 0x61]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x58]
MOVZX ECX,byte ptr [RCX + 0x42]
CMP EAX,ECX
JGE 0x0014d1dd
MOV EAX,dword ptr [RBP + -0xc]
OR EAX,0x400
MOV dword ptr [RBP + -0xc],EAX
LAB_0014d1dd:
MOV EAX,dword ptr [RBP + -0xc]
POP RBP
RET
|
int4 my_8bit_collation_flags_from_data(long param_1)
{
int4 local_14;
local_14 = 0;
if (((*(long *)(param_1 + 0x58) != 0) &&
(*(byte *)(*(long *)(param_1 + 0x58) + 0x41) < *(byte *)(*(long *)(param_1 + 0x58) + 0x61)))
&& (*(byte *)(*(long *)(param_1 + 0x58) + 0x61) < *(byte *)(*(long *)(param_1 + 0x58) + 0x42)))
{
local_14 = 0x400;
}
return local_14;
}
| |
38,460 | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>) | monkey531[P]llama/common/json.hpp | iterator erase(iterator first, iterator last)
{
if (first == last)
{
return first;
}
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delete elements_affected
// elements (3 in this example: e, f, g), and need to return an
// iterator past the last deleted element (h in this example).
// Note that offset is the distance from the start of the vector
// to first. We will need this later.
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// first last
// Since we cannot move const Keys, we re-construct them in place.
// We start at first and re-construct (viz. copy) the elements from
// the back of the vector. Example for first iteration:
// ,--------.
// v | destroy e and re-construct with h
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// it it + elements_affected
for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it)
{
it->~value_type(); // destroy but keep allocation
new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it
}
// [ a, b, c, d, h, i, j, h, i, j ]
// ^ ^
// first last
// remove the unneeded elements at the end of the vector
Container::resize(this->size() - static_cast<size_type>(elements_affected));
// [ a, b, c, d, h, i, j ]
// ^ ^
// first last
// first is now pointing past the last deleted element, but we cannot
// use this iterator, because it may have been invalidated by the
// resize call. Instead, we can return begin() + offset.
return Container::begin() + offset;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq %rdx, %rsi
je 0x6dc4d
movq %rdi, %r14
subq %rbx, %rdx
pushq $0x60
popq %rcx
movq %rdx, %rax
cqto
idivq %rcx
movq %rax, %r15
movq (%rdi), %rax
movq %rax, (%rsp)
imulq $0x60, %r15, %r13
addq %rbx, %r13
movq %r13, %r12
negq %r12
movq %rbx, %rbp
cmpq 0x8(%r14), %r13
je 0x6dc27
movq %rbp, %rdi
callq 0x67ba8
movq %rbp, %rdi
movq %r13, %rsi
callq 0x6dc60
addq $0x60, %rbp
addq $0x60, %r13
addq $-0x60, %r12
jmp 0x6dc00
subq (%rsp), %rbx
addq (%r14), %r12
negq %r12
movq %r12, %rax
cqto
pushq $0x60
popq %rcx
idivq %rcx
subq %r15, %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x6dc8a
addq (%r14), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
cmp rsi, rdx
jz short loc_6DC4D
mov r14, rdi
sub rdx, rbx
push 60h ; '`'
pop rcx
mov rax, rdx
cqo
idiv rcx
mov r15, rax
mov rax, [rdi]
mov [rsp+38h+var_38], rax
imul r13, r15, 60h ; '`'
add r13, rbx
mov r12, r13
neg r12
mov rbp, rbx
loc_6DC00:
cmp r13, [r14+8]
jz short loc_6DC27
mov rdi, rbp
call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEED2Ev; 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>::~pair()
mov rdi, rbp
mov rsi, r13
call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; 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>::pair(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>&&)
add rbp, 60h ; '`'
add r13, 60h ; '`'
add r12, 0FFFFFFFFFFFFFFA0h
jmp short loc_6DC00
loc_6DC27:
sub rbx, [rsp+38h+var_38]
add r12, [r14]
neg r12
mov rax, r12
cqo
push 60h ; '`'
pop rcx
idiv rcx
sub rax, r15
mov rdi, r14
mov rsi, rax
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; 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>>::resize(ulong)
add rbx, [r14]
loc_6DC4D:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
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>>>::erase(
long long *a1,
long long a2,
long long a3)
{
long long v3; // rbx
long long v4; // r15
long long v5; // r13
long long v6; // r12
long long v7; // rbp
long long v9; // [rsp+0h] [rbp-38h]
v3 = a2;
if ( a2 != a3 )
{
v4 = (a3 - a2) / 96;
v9 = *a1;
v5 = a2 + 96 * v4;
v6 = -v5;
v7 = a2;
while ( v5 != a1[1] )
{
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>::~pair(v7);
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>::pair(
v7,
v5);
v7 += 96LL;
v5 += 96LL;
v6 -= 96LL;
}
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>>::resize(
a1,
-(*a1 + v6) / 96 - v4,
-(*a1 + v6) % 96);
return *a1 + a2 - v9;
}
return v3;
}
| erase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
CMP RSI,RDX
JZ 0x0016dc4d
MOV R14,RDI
SUB RDX,RBX
PUSH 0x60
POP RCX
MOV RAX,RDX
CQO
IDIV RCX
MOV R15,RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP],RAX
IMUL R13,R15,0x60
ADD R13,RBX
MOV R12,R13
NEG R12
MOV RBP,RBX
LAB_0016dc00:
CMP R13,qword ptr [R14 + 0x8]
JZ 0x0016dc27
MOV RDI,RBP
CALL 0x00167ba8
MOV RDI,RBP
MOV RSI,R13
CALL 0x0016dc60
ADD RBP,0x60
ADD R13,0x60
ADD R12,-0x60
JMP 0x0016dc00
LAB_0016dc27:
SUB RBX,qword ptr [RSP]
ADD R12,qword ptr [R14]
NEG R12
MOV RAX,R12
CQO
PUSH 0x60
POP RCX
IDIV RCX
SUB RAX,R15
MOV RDI,R14
MOV RSI,RAX
CALL 0x0016dc8a
ADD RBX,qword ptr [R14]
LAB_0016dc4d:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
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> >
>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, 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::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> > > >,
__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, 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::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> > > >) */
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>
* __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>>>
::erase(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,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>
*param_2,
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>
*param_3)
{
long lVar1;
long lVar2;
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_00;
long lVar3;
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>
*ppVar4;
if (param_2 != param_3) {
lVar2 = ((long)param_3 - (long)param_2) / 0x60;
lVar1 = *(long *)this;
ppVar4 = param_2 + lVar2 * 0x60;
lVar3 = -(long)ppVar4;
this_00 = param_2;
for (; ppVar4 != *(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 + 8); ppVar4 = ppVar4 + 0x60) {
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>
::~pair(this_00);
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>
::pair(this_00,ppVar4);
this_00 = this_00 + 0x60;
lVar3 = lVar3 + -0x60;
}
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>>>
::resize((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,-(lVar3 + *(long *)this) / 0x60 - lVar2);
param_2 = param_2 + (*(long *)this - lVar1);
}
return param_2;
}
| |
38,461 | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>) | monkey531[P]llama/common/json.hpp | iterator erase(iterator first, iterator last)
{
if (first == last)
{
return first;
}
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delete elements_affected
// elements (3 in this example: e, f, g), and need to return an
// iterator past the last deleted element (h in this example).
// Note that offset is the distance from the start of the vector
// to first. We will need this later.
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// first last
// Since we cannot move const Keys, we re-construct them in place.
// We start at first and re-construct (viz. copy) the elements from
// the back of the vector. Example for first iteration:
// ,--------.
// v | destroy e and re-construct with h
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// it it + elements_affected
for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it)
{
it->~value_type(); // destroy but keep allocation
new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it
}
// [ a, b, c, d, h, i, j, h, i, j ]
// ^ ^
// first last
// remove the unneeded elements at the end of the vector
Container::resize(this->size() - static_cast<size_type>(elements_affected));
// [ a, b, c, d, h, i, j ]
// ^ ^
// first last
// first is now pointing past the last deleted element, but we cannot
// use this iterator, because it may have been invalidated by the
// resize call. Instead, we can return begin() + offset.
return Container::begin() + offset;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
cmpq %rdx, %rsi
je 0x5e97e
movq %rdx, %r15
movq %rdi, %r14
movq %rdx, %rax
subq %rbx, %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movq %rax, 0x10(%rsp)
movq (%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x10(%rbx), %rbp
movq %rdx, %r12
negq %r12
cmpq 0x8(%r14), %r15
je 0x5e94e
leaq 0x10(%rbp), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x5834c
movq %r13, %rdi
callq 0x5d83a
movq -0x10(%rbp), %rdi
cmpq %rdi, %rbp
je 0x5e934
movq (%rbp), %rsi
incq %rsi
callq 0x1a8c0
leaq -0x10(%rbp), %rdi
movq %r15, %rsi
callq 0x5e990
addq $0x30, %r15
addq $0x30, %rbp
addq $-0x30, %r12
jmp 0x5e903
subq 0x8(%rsp), %rbx
addq (%r14), %r12
negq %r12
sarq $0x4, %r12
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r12
subq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x5e9e8
addq (%r14), %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
cmp rsi, rdx
jz loc_5E97E
mov r15, rdx
mov r14, rdi
mov rax, rdx
sub rax, rbx
sar rax, 4
mov rcx, 0AAAAAAAAAAAAAAABh
imul rax, rcx
mov [rsp+48h+var_38], rax
mov rax, [rdi]
mov [rsp+48h+var_40], rax
lea rbp, [rbx+10h]
mov r12, rdx
neg r12
loc_5E903:
cmp r15, [r14+8]
jz short loc_5E94E
lea r13, [rbp+10h]
mov rdi, r13
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbp-10h]; void *
cmp rbp, rdi
jz short loc_5E934
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5E934:
lea rdi, [rbp-10h]
mov rsi, r15
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEC2EOSG_; std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::pair(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>&&)
add r15, 30h ; '0'
add rbp, 30h ; '0'
add r12, 0FFFFFFFFFFFFFFD0h
jmp short loc_5E903
loc_5E94E:
sub rbx, [rsp+48h+var_40]
add r12, [r14]
neg r12
sar r12, 4
mov rax, 0AAAAAAAAAAAAAAABh
imul r12, rax
sub r12, [rsp+48h+var_38]
mov rdi, r14
mov rsi, r12
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE6resizeEm; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::resize(ulong)
add rbx, [r14]
loc_5E97E:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::erase(
long long *a1,
long long a2,
long long a3)
{
long long v3; // rbx
long long v4; // r15
char *v6; // rbp
long long v7; // r12
char *v8; // rdi
long long v10; // [rsp+8h] [rbp-40h]
unsigned long long v11; // [rsp+10h] [rbp-38h]
v3 = a2;
if ( a2 != a3 )
{
v4 = a3;
v11 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 4);
v10 = *a1;
v6 = (char *)(a2 + 16);
v7 = -a3;
while ( v4 != a1[1] )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v6 + 16);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v6 + 16);
v8 = (char *)*((_QWORD *)v6 - 2);
if ( v6 != v8 )
operator delete(v8, *(_QWORD *)v6 + 1LL);
std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::pair(
v6 - 16,
v4);
v4 += 48LL;
v6 += 48;
v7 -= 48LL;
}
std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::resize(
a1,
0xAAAAAAAAAAAAAAABLL * (-(*a1 + v7) >> 4) - v11);
return *a1 + a2 - v10;
}
return v3;
}
| erase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
CMP RSI,RDX
JZ 0x0015e97e
MOV R15,RDX
MOV R14,RDI
MOV RAX,RDX
SUB RAX,RBX
SAR RAX,0x4
MOV RCX,-0x5555555555555555
IMUL RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RAX
LEA RBP,[RBX + 0x10]
MOV R12,RDX
NEG R12
LAB_0015e903:
CMP R15,qword ptr [R14 + 0x8]
JZ 0x0015e94e
LEA R13,[RBP + 0x10]
MOV RDI,R13
XOR ESI,ESI
CALL 0x0015834c
MOV RDI,R13
CALL 0x0015d83a
MOV RDI,qword ptr [RBP + -0x10]
CMP RBP,RDI
JZ 0x0015e934
MOV RSI,qword ptr [RBP]
INC RSI
CALL 0x0011a8c0
LAB_0015e934:
LEA RDI,[RBP + -0x10]
MOV RSI,R15
CALL 0x0015e990
ADD R15,0x30
ADD RBP,0x30
ADD R12,-0x30
JMP 0x0015e903
LAB_0015e94e:
SUB RBX,qword ptr [RSP + 0x8]
ADD R12,qword ptr [R14]
NEG R12
SAR R12,0x4
MOV RAX,-0x5555555555555555
IMUL R12,RAX
SUB R12,qword ptr [RSP + 0x10]
MOV RDI,R14
MOV RSI,R12
CALL 0x0015e9e8
ADD RBX,qword ptr [R14]
LAB_0015e97e:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >*, std::vector<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > > >, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >*, std::vector<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > > >) */
pair * __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::erase(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,pair *param_2,pair *param_3)
{
long lVar1;
long lVar2;
long *plVar3;
long lVar4;
if (param_2 != param_3) {
lVar2 = (long)param_3 - (long)param_2;
lVar1 = *(long *)this;
plVar3 = (long *)(param_2 + 0x10);
lVar4 = -(long)param_3;
for (; param_3 != *(pair **)(this + 8); param_3 = param_3 + 0x30) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)(plVar3 + 2),0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)(plVar3 + 2));
if (plVar3 != (long *)plVar3[-2]) {
operator_delete((long *)plVar3[-2],*plVar3 + 1);
}
std::
pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::pair((pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)(plVar3 + -2),param_3);
plVar3 = plVar3 + 6;
lVar4 = lVar4 + -0x30;
}
std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::resize((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this,(-(lVar4 + *(long *)this) >> 4) * -0x5555555555555555 +
(lVar2 >> 4) * 0x5555555555555555);
param_2 = param_2 + (*(long *)this - lVar1);
}
return param_2;
}
| |
38,462 | my_set_error | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void my_set_error(MYSQL *mysql,
unsigned int error_nr,
const char *sqlstate,
const char *format,
...)
{
va_list ap;
const char *errmsg;
if (!format)
{
if (error_nr >= CR_MIN_ERROR && error_nr <= CR_MYSQL_LAST_ERROR)
errmsg= ER(error_nr);
else if (error_nr >= CER_MIN_ERROR && error_nr <= CR_MARIADB_LAST_ERROR)
errmsg= CER(error_nr);
else
errmsg= ER(CR_UNKNOWN_ERROR);
}
mysql->net.last_errno= error_nr;
ma_strmake(mysql->net.sqlstate, sqlstate, SQLSTATE_LENGTH);
va_start(ap, format);
vsnprintf(mysql->net.last_error, MYSQL_ERRMSG_SIZE - 1,
format ? format : errmsg, ap);
va_end(ap);
return;
} | O3 | c | my_set_error:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rcx, %r14
movq %rdx, %rcx
movq %rdi, %rbx
movq %r8, -0xc0(%rbp)
movq %r9, -0xb8(%rbp)
testb %al, %al
je 0x155db
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
testq %r14, %r14
jne 0x1561e
leal -0x7d0(%rsi), %eax
cmpl $0x3d, %eax
ja 0x155fa
movl %eax, %eax
shlq $0x3, %rax
addq 0x319d8(%rip), %rax # 0x46fd0
jmp 0x1561b
leal -0x1388(%rsi), %eax
cmpl $0xf, %eax
ja 0x15614
movl %eax, %eax
shlq $0x3, %rax
addq 0x319ce(%rip), %rax # 0x46fe0
jmp 0x1561b
leaq 0x33425(%rip), %rax # 0x48a40
movq (%rax), %r14
movl %esi, 0x90(%rbx)
leaq 0x297(%rbx), %rdi
movl $0x5, %edx
movq %rcx, %rsi
callq 0x24ebb
movabsq $0x3000000020, %rax # imm = 0x3000000020
leaq -0x30(%rbp), %r9
movq %rax, (%r9)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r9)
leaq -0xe0(%rbp), %rax
movq %rax, 0x10(%r9)
addq $0x97, %rbx
movl $0x1ff, %esi # imm = 0x1FF
movq %rbx, %rdi
movl $0x1, %edx
movq $-0x1, %rcx
movq %r14, %r8
callq 0x13380
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| my_set_error:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 0D0h
mov r14, rcx
mov rcx, rdx
mov rbx, rdi
mov [rbp+var_C0], r8
mov [rbp+var_B8], r9
test al, al
jz short loc_155DB
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_155DB:
test r14, r14
jnz short loc_1561E
lea eax, [rsi-7D0h]
cmp eax, 3Dh ; '='
ja short loc_155FA
mov eax, eax
shl rax, 3
add rax, cs:client_errors_ptr
jmp short loc_1561B
loc_155FA:
lea eax, [rsi-1388h]
cmp eax, 0Fh
ja short loc_15614
mov eax, eax
shl rax, 3
add rax, cs:mariadb_client_errors_ptr
jmp short loc_1561B
loc_15614:
lea rax, client_errors
loc_1561B:
mov r14, [rax]
loc_1561E:
mov [rbx+90h], esi
lea rdi, [rbx+297h]
mov edx, 5
mov rsi, rcx
call ma_strmake
mov rax, 3000000020h
lea r9, [rbp+var_30]
mov [r9], rax
lea rax, [rbp+arg_0]
mov [r9+8], rax
lea rax, [rbp+var_E0]
mov [r9+10h], rax
add rbx, 97h
mov esi, 1FFh
mov rdi, rbx
mov edx, 1
mov rcx, 0FFFFFFFFFFFFFFFFh
mov r8, r14
call ___vsnprintf_chk
add rsp, 0D0h
pop rbx
pop r14
pop rbp
retn
| long long my_set_error(long long a1, int a2, long long a3, char *a4, ...)
{
char *v4; // r14
char **v5; // rax
va_list va; // [rsp+B0h] [rbp-30h] BYREF
v4 = a4;
if ( !a4 )
{
if ( (unsigned int)(a2 - 2000) > 0x3D )
{
if ( (unsigned int)(a2 - 5000) > 0xF )
v5 = client_errors;
else
v5 = &mariadb_client_errors[a2 - 5000];
}
else
{
v5 = &client_errors[a2 - 2000];
}
v4 = *v5;
}
*(_DWORD *)(a1 + 144) = a2;
ma_strmake(a1 + 663, a3, 5LL);
va_start(va, a4);
return __vsnprintf_chk(a1 + 151, 511LL, 1LL, -1LL, v4, va);
}
| my_set_error:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0xd0
MOV R14,RCX
MOV RCX,RDX
MOV RBX,RDI
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xb8],R9
TEST AL,AL
JZ 0x001155db
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_001155db:
TEST R14,R14
JNZ 0x0011561e
LEA EAX,[RSI + -0x7d0]
CMP EAX,0x3d
JA 0x001155fa
MOV EAX,EAX
SHL RAX,0x3
ADD RAX,qword ptr [0x00146fd0]
JMP 0x0011561b
LAB_001155fa:
LEA EAX,[RSI + -0x1388]
CMP EAX,0xf
JA 0x00115614
MOV EAX,EAX
SHL RAX,0x3
ADD RAX,qword ptr [0x00146fe0]
JMP 0x0011561b
LAB_00115614:
LEA RAX,[0x148a40]
LAB_0011561b:
MOV R14,qword ptr [RAX]
LAB_0011561e:
MOV dword ptr [RBX + 0x90],ESI
LEA RDI,[RBX + 0x297]
MOV EDX,0x5
MOV RSI,RCX
CALL 0x00124ebb
MOV RAX,0x3000000020
LEA R9,[RBP + -0x30]
MOV qword ptr [R9],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [R9 + 0x8],RAX
LEA RAX,[RBP + -0xe0]
MOV qword ptr [R9 + 0x10],RAX
ADD RBX,0x97
MOV ESI,0x1ff
MOV RDI,RBX
MOV EDX,0x1
MOV RCX,-0x1
MOV R8,R14
CALL 0x00113380
ADD RSP,0xd0
POP RBX
POP R14
POP RBP
RET
|
void my_set_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
long param_9,int param_10,int8 param_11,int *param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int **ppuVar1;
int1 local_e8 [32];
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int1 *local_30;
int1 *local_28;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
if (param_12 == (int *)0x0) {
if (param_10 - 2000U < 0x3e) {
ppuVar1 = (int **)(PTR_client_errors_00146fd0 + (ulong)(param_10 - 2000U) * 8);
}
else if (param_10 - 5000U < 0x10) {
ppuVar1 = (int **)(PTR_mariadb_client_errors_00146fe0 + (ulong)(param_10 - 5000U) * 8);
}
else {
ppuVar1 = &client_errors;
}
param_12 = *ppuVar1;
}
*(int *)(param_9 + 0x90) = param_10;
local_c8 = param_13;
local_c0 = param_14;
ma_strmake(param_9 + 0x297,param_11,5);
local_38 = 0x3000000020;
local_30 = &stack0x00000008;
local_28 = local_e8;
__vsnprintf_chk(param_9 + 0x97,0x1ff,1,0xffffffffffffffff,param_12);
return;
}
| |
38,463 | ma_mmap_pwrite | eloqsql/storage/maria/ma_dynrec.c | size_t _ma_mmap_pwrite(MARIA_HA *info, const uchar *Buffer,
size_t Count, my_off_t offset, myf MyFlags)
{
DBUG_PRINT("info", ("maria_write with mmap %d\n", info->dfile.file));
if (info->s->lock_key_trees)
mysql_rwlock_rdlock(&info->s->mmap_lock);
/*
The following test may fail in the following cases:
- We failed to remap a memory area (fragmented memory?)
- This thread has done some writes, but not yet extended the
memory mapped area.
*/
if (info->s->mmaped_length >= offset + Count)
{
memcpy(info->s->file_map + offset, Buffer, Count);
if (info->s->lock_key_trees)
mysql_rwlock_unlock(&info->s->mmap_lock);
return 0;
}
else
{
info->s->nonmmaped_inserts++;
if (info->s->lock_key_trees)
mysql_rwlock_unlock(&info->s->mmap_lock);
return my_pwrite(info->dfile.file, Buffer, Count, offset, MyFlags);
}
} | O0 | c | ma_mmap_pwrite:
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 %r8, -0x30(%rbp)
jmp 0x4f80e
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, 0x7e3(%rax)
je 0x4f83d
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0xb78, %rdi # imm = 0xB78
leaq 0x103ec8(%rip), %rsi # 0x1536fb
movl $0xbb, %edx
callq 0x4f540
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xa00(%rax), %rax
movq -0x28(%rbp), %rcx
addq -0x20(%rbp), %rcx
cmpq %rcx, %rax
jb 0x4f8a4
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x5f0(%rax), %rdi
addq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2a090
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, 0x7e3(%rax)
je 0x4f89a
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0xb78, %rdi # imm = 0xB78
callq 0x4f5b0
movq $0x0, -0x8(%rbp)
jmp 0x4f900
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0xa08(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xa08(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, 0x7e3(%rax)
je 0x4f8dd
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0xb78, %rdi # imm = 0xB78
callq 0x4f5b0
movq -0x10(%rbp), %rax
movl 0x480(%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0xf5740
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ma_mmap_pwrite:
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 [rbp+var_30], r8
jmp short $+2
loc_4F80E:
mov rax, [rbp+var_10]
mov rax, [rax]
cmp byte ptr [rax+7E3h], 0
jz short loc_4F83D
mov rax, [rbp+var_10]
mov rdi, [rax]
add rdi, 0B78h
lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0BBh
call inline_mysql_rwlock_rdlock_0
loc_4F83D:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+0A00h]
mov rcx, [rbp+var_28]
add rcx, [rbp+var_20]
cmp rax, rcx
jb short loc_4F8A4
mov rax, [rbp+var_10]
mov rax, [rax]
mov rdi, [rax+5F0h]
add rdi, [rbp+var_28]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
mov rax, [rbp+var_10]
mov rax, [rax]
cmp byte ptr [rax+7E3h], 0
jz short loc_4F89A
mov rax, [rbp+var_10]
mov rdi, [rax]
add rdi, 0B78h
call inline_mysql_rwlock_unlock_1
loc_4F89A:
mov [rbp+var_8], 0
jmp short loc_4F900
loc_4F8A4:
mov rax, [rbp+var_10]
mov rax, [rax]
mov ecx, [rax+0A08h]
add ecx, 1
mov [rax+0A08h], ecx
mov rax, [rbp+var_10]
mov rax, [rax]
cmp byte ptr [rax+7E3h], 0
jz short loc_4F8DD
mov rax, [rbp+var_10]
mov rdi, [rax]
add rdi, 0B78h
call inline_mysql_rwlock_unlock_1
loc_4F8DD:
mov rax, [rbp+var_10]
mov edi, [rax+480h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
call my_pwrite
mov [rbp+var_8], rax
loc_4F900:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long ma_mmap_pwrite(unsigned int *a1, long long a2, long long a3, long long a4, long long a5)
{
if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) )
inline_mysql_rwlock_rdlock_0(
*(_QWORD *)a1 + 2936LL,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",
0xBBu);
if ( *(_QWORD *)(*(_QWORD *)a1 + 2560LL) < (unsigned long long)(a3 + a4) )
{
++*(_DWORD *)(*(_QWORD *)a1 + 2568LL);
if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) )
inline_mysql_rwlock_unlock_1(*(_QWORD *)a1 + 2936LL);
return my_pwrite(a1[288], a2, a3, a4, a5);
}
else
{
memcpy(a4 + *(_QWORD *)(*(_QWORD *)a1 + 1520LL), a2, a3);
if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) )
inline_mysql_rwlock_unlock_1(*(_QWORD *)a1 + 2936LL);
return 0LL;
}
}
| _ma_mmap_pwrite:
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 qword ptr [RBP + -0x30],R8
JMP 0x0014f80e
LAB_0014f80e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP byte ptr [RAX + 0x7e3],0x0
JZ 0x0014f83d
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
ADD RDI,0xb78
LEA RSI,[0x2536fb]
MOV EDX,0xbb
CALL 0x0014f540
LAB_0014f83d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xa00]
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,qword ptr [RBP + -0x20]
CMP RAX,RCX
JC 0x0014f8a4
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x5f0]
ADD RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP byte ptr [RAX + 0x7e3],0x0
JZ 0x0014f89a
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
ADD RDI,0xb78
CALL 0x0014f5b0
LAB_0014f89a:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014f900
LAB_0014f8a4:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0xa08]
ADD ECX,0x1
MOV dword ptr [RAX + 0xa08],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP byte ptr [RAX + 0x7e3],0x0
JZ 0x0014f8dd
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
ADD RDI,0xb78
CALL 0x0014f5b0
LAB_0014f8dd:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x480]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001f5740
MOV qword ptr [RBP + -0x8],RAX
LAB_0014f900:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int8
_ma_mmap_pwrite(long *param_1,void *param_2,size_t param_3,long param_4,int8 param_5)
{
int8 local_10;
if (*(char *)(*param_1 + 0x7e3) != '\0') {
inline_mysql_rwlock_rdlock
(*param_1 + 0xb78,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c"
,0xbb);
}
if (*(ulong *)(*param_1 + 0xa00) < param_4 + param_3) {
*(int *)(*param_1 + 0xa08) = *(int *)(*param_1 + 0xa08) + 1;
if (*(char *)(*param_1 + 0x7e3) != '\0') {
inline_mysql_rwlock_unlock(*param_1 + 0xb78);
}
local_10 = my_pwrite((int)param_1[0x90],param_2,param_3,param_4,param_5);
}
else {
memcpy((void *)(*(long *)(*param_1 + 0x5f0) + param_4),param_2,param_3);
if (*(char *)(*param_1 + 0x7e3) != '\0') {
inline_mysql_rwlock_unlock(*param_1 + 0xb78);
}
local_10 = 0;
}
return local_10;
}
| |
38,464 | ma_mmap_pwrite | eloqsql/storage/maria/ma_dynrec.c | size_t _ma_mmap_pwrite(MARIA_HA *info, const uchar *Buffer,
size_t Count, my_off_t offset, myf MyFlags)
{
DBUG_PRINT("info", ("maria_write with mmap %d\n", info->dfile.file));
if (info->s->lock_key_trees)
mysql_rwlock_rdlock(&info->s->mmap_lock);
/*
The following test may fail in the following cases:
- We failed to remap a memory area (fragmented memory?)
- This thread has done some writes, but not yet extended the
memory mapped area.
*/
if (info->s->mmaped_length >= offset + Count)
{
memcpy(info->s->file_map + offset, Buffer, Count);
if (info->s->lock_key_trees)
mysql_rwlock_unlock(&info->s->mmap_lock);
return 0;
}
else
{
info->s->nonmmaped_inserts++;
if (info->s->lock_key_trees)
mysql_rwlock_unlock(&info->s->mmap_lock);
return my_pwrite(info->dfile.file, Buffer, Count, offset, MyFlags);
}
} | O3 | c | ma_mmap_pwrite:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
movq (%rdi), %rax
cmpb $0x0, 0x7e3(%rax)
je 0x47770
leaq 0xb78(%rax), %rdi
cmpq $0x0, 0xc08(%rax)
jne 0x4782c
callq 0xa4ca8
movq (%r15), %rax
leaq (%r14,%rbx), %rcx
cmpq %rcx, 0xa00(%rax)
jae 0x477df
movq %r12, -0x30(%rbp)
incl 0xa08(%rax)
movq (%r15), %r12
cmpb $0x0, 0x7e3(%r12)
je 0x477b8
movq 0xc08(%r12), %rdi
addq $0xb78, %r12 # imm = 0xB78
testq %rdi, %rdi
jne 0x47842
movq %r12, %rdi
callq 0xa4dd6
movl 0x480(%r15), %edi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq -0x30(%rbp), %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa10de
addq 0x5f0(%rax), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x29080
movq (%r15), %rbx
cmpb $0x0, 0x7e3(%rbx)
je 0x4781b
movq 0xc08(%rbx), %rdi
addq $0xb78, %rbx # imm = 0xB78
testq %rdi, %rdi
jne 0x47857
movq %rbx, %rdi
callq 0xa4dd6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x93063(%rip), %rsi # 0xda896
movl $0xbb, %edx
callq 0x2ec70
jmp 0x47770
leaq 0x33e7c7(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x477b0
leaq 0x33e7b2(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x47813
| _ma_mmap_pwrite:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, r8
mov r14, rcx
mov rbx, rdx
mov r13, rsi
mov r15, rdi
mov rax, [rdi]
cmp byte ptr [rax+7E3h], 0
jz short loc_47770
lea rdi, [rax+0B78h]
cmp qword ptr [rax+0C08h], 0
jnz loc_4782C
call my_rw_rdlock
loc_47770:
mov rax, [r15]
lea rcx, [r14+rbx]
cmp [rax+0A00h], rcx
jnb short loc_477DF
mov [rbp+var_30], r12
inc dword ptr [rax+0A08h]
mov r12, [r15]
cmp byte ptr [r12+7E3h], 0
jz short loc_477B8
mov rdi, [r12+0C08h]
add r12, 0B78h
test rdi, rdi
jnz loc_47842
loc_477B0:
mov rdi, r12
call my_rw_unlock
loc_477B8:
mov edi, [r15+480h]
mov rsi, r13
mov rdx, rbx
mov rcx, r14
mov r8, [rbp+var_30]
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp my_pwrite
loc_477DF:
add r14, [rax+5F0h]
mov rdi, r14
mov rsi, r13
mov rdx, rbx
call _memcpy
mov rbx, [r15]
cmp byte ptr [rbx+7E3h], 0
jz short loc_4781B
mov rdi, [rbx+0C08h]
add rbx, 0B78h
test rdi, rdi
jnz short loc_47857
loc_47813:
mov rdi, rbx
call my_rw_unlock
loc_4781B:
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4782C:
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0BBh
call psi_rwlock_rdlock
jmp loc_47770
loc_47842:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp loc_477B0
loc_47857:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp short loc_47813
| long long ma_mmap_pwrite(unsigned int *a1, long long a2, long long a3, long long a4, long long a5)
{
long long v9; // rax
long long v10; // rdi
long long v11; // rax
long long v12; // r12
long long v13; // rdi
long long v14; // r12
long long v16; // rbx
long long v17; // rdi
long long v18; // rbx
long long v19; // [rsp+0h] [rbp-30h]
v9 = *(_QWORD *)a1;
if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) )
{
v10 = v9 + 2936;
if ( *(_QWORD *)(v9 + 3080) )
psi_rwlock_rdlock(v10, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 0xBBu);
else
my_rw_rdlock(v10);
}
v11 = *(_QWORD *)a1;
if ( *(_QWORD *)(*(_QWORD *)a1 + 2560LL) >= (unsigned long long)(a4 + a3) )
{
memcpy(*(_QWORD *)(v11 + 1520) + a4, a2, a3);
v16 = *(_QWORD *)a1;
if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) )
{
v17 = *(_QWORD *)(v16 + 3080);
v18 = v16 + 2936;
if ( v17 )
((void ( *)(long long))PSI_server[45])(v17);
my_rw_unlock(v18);
}
return 0LL;
}
else
{
v19 = a5;
++*(_DWORD *)(v11 + 2568);
v12 = *(_QWORD *)a1;
if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) )
{
v13 = *(_QWORD *)(v12 + 3080);
v14 = v12 + 2936;
if ( v13 )
((void ( *)(long long))PSI_server[45])(v13);
my_rw_unlock(v14);
}
return my_pwrite(a1[288], a2, a3, a4, v19);
}
}
| _ma_mmap_pwrite:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,R8
MOV R14,RCX
MOV RBX,RDX
MOV R13,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI]
CMP byte ptr [RAX + 0x7e3],0x0
JZ 0x00147770
LEA RDI,[RAX + 0xb78]
CMP qword ptr [RAX + 0xc08],0x0
JNZ 0x0014782c
CALL 0x001a4ca8
LAB_00147770:
MOV RAX,qword ptr [R15]
LEA RCX,[R14 + RBX*0x1]
CMP qword ptr [RAX + 0xa00],RCX
JNC 0x001477df
MOV qword ptr [RBP + -0x30],R12
INC dword ptr [RAX + 0xa08]
MOV R12,qword ptr [R15]
CMP byte ptr [R12 + 0x7e3],0x0
JZ 0x001477b8
MOV RDI,qword ptr [R12 + 0xc08]
ADD R12,0xb78
TEST RDI,RDI
JNZ 0x00147842
LAB_001477b0:
MOV RDI,R12
CALL 0x001a4dd6
LAB_001477b8:
MOV EDI,dword ptr [R15 + 0x480]
MOV RSI,R13
MOV RDX,RBX
MOV RCX,R14
MOV R8,qword ptr [RBP + -0x30]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001a10de
LAB_001477df:
ADD R14,qword ptr [RAX + 0x5f0]
MOV RDI,R14
MOV RSI,R13
MOV RDX,RBX
CALL 0x00129080
MOV RBX,qword ptr [R15]
CMP byte ptr [RBX + 0x7e3],0x0
JZ 0x0014781b
MOV RDI,qword ptr [RBX + 0xc08]
ADD RBX,0xb78
TEST RDI,RDI
JNZ 0x00147857
LAB_00147813:
MOV RDI,RBX
CALL 0x001a4dd6
LAB_0014781b:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014782c:
LEA RSI,[0x1da896]
MOV EDX,0xbb
CALL 0x0012ec70
JMP 0x00147770
LAB_00147842:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x001477b0
LAB_00147857:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x00147813
|
int8
_ma_mmap_pwrite(long *param_1,void *param_2,size_t param_3,long param_4,int8 param_5)
{
long lVar1;
int8 uVar2;
lVar1 = *param_1;
if (*(char *)(lVar1 + 0x7e3) != '\0') {
if (*(long *)(lVar1 + 0xc08) == 0) {
my_rw_rdlock();
}
else {
psi_rwlock_rdlock(lVar1 + 0xb78,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",0xbb);
}
}
lVar1 = *param_1;
if (*(ulong *)(lVar1 + 0xa00) < param_4 + param_3) {
*(int *)(lVar1 + 0xa08) = *(int *)(lVar1 + 0xa08) + 1;
lVar1 = *param_1;
if (*(char *)(lVar1 + 0x7e3) != '\0') {
if (*(long *)(lVar1 + 0xc08) != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(lVar1 + 0xb78);
}
uVar2 = my_pwrite((int)param_1[0x90],param_2,param_3,param_4,param_5);
return uVar2;
}
memcpy((void *)(param_4 + *(long *)(lVar1 + 0x5f0)),param_2,param_3);
lVar1 = *param_1;
if (*(char *)(lVar1 + 0x7e3) != '\0') {
if (*(long *)(lVar1 + 0xc08) != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(lVar1 + 0xb78);
}
return 0;
}
| |
38,465 | safe_hash_free | eloqsql/mysys/my_safehash.c | void safe_hash_free(SAFE_HASH *hash)
{
/*
Test if safe_hash_init succeeded. This will also guard us against multiple
free calls.
*/
if (hash->default_value)
{
my_hash_free(&hash->hash);
mysql_rwlock_destroy(&hash->mutex);
hash->default_value=0;
}
} | O3 | c | safe_hash_free:
cmpq $0x0, 0x108(%rdi)
je 0xa5f41
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x98, %rdi
callq 0x93bf1
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
jne 0xa5f42
movq %rbx, %rdi
callq 0xa438c
movq $0x0, 0x108(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2e00c7(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x58(%rax)
movq $0x0, 0x90(%rbx)
jmp 0xa5f28
| safe_hash_free:
cmp qword ptr [rdi+108h], 0
jz short locret_A5F41
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
add rdi, 98h
call my_hash_free
mov rdi, [rbx+90h]
test rdi, rdi
jnz short loc_A5F42
loc_A5F28:
mov rdi, rbx
call my_rw_destroy
mov qword ptr [rbx+108h], 0
add rsp, 8
pop rbx
pop rbp
locret_A5F41:
retn
loc_A5F42:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+58h]
mov qword ptr [rbx+90h], 0
jmp short loc_A5F28
| long long safe_hash_free(long long a1)
{
long long v2; // rdi
long long result; // rax
if ( *(_QWORD *)(a1 + 264) )
{
my_hash_free(a1 + 152);
v2 = *(_QWORD *)(a1 + 144);
if ( v2 )
{
((void ( *)(long long))PSI_server[11])(v2);
*(_QWORD *)(a1 + 144) = 0LL;
}
result = my_rw_destroy(a1);
*(_QWORD *)(a1 + 264) = 0LL;
}
return result;
}
| safe_hash_free:
CMP qword ptr [RDI + 0x108],0x0
JZ 0x001a5f41
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
ADD RDI,0x98
CALL 0x00193bf1
MOV RDI,qword ptr [RBX + 0x90]
TEST RDI,RDI
JNZ 0x001a5f42
LAB_001a5f28:
MOV RDI,RBX
CALL 0x001a438c
MOV qword ptr [RBX + 0x108],0x0
ADD RSP,0x8
POP RBX
POP RBP
LAB_001a5f41:
RET
LAB_001a5f42:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x58]
MOV qword ptr [RBX + 0x90],0x0
JMP 0x001a5f28
|
void safe_hash_free(long param_1)
{
if (*(long *)(param_1 + 0x108) != 0) {
my_hash_free(param_1 + 0x98);
if (*(long *)(param_1 + 0x90) != 0) {
(**(code **)(PSI_server + 0x58))();
*(int8 *)(param_1 + 0x90) = 0;
}
my_rw_destroy(param_1);
*(int8 *)(param_1 + 0x108) = 0;
}
return;
}
| |
38,466 | my_register_filename | eloqsql/mysys/my_open.c | File my_register_filename(File fd, const char *FileName, enum file_type
type_of_file, uint error_message_number, myf MyFlags)
{
DBUG_ENTER("my_register_filename");
if ((int) fd >= MY_FILE_MIN)
{
my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED);
if ((uint) fd >= my_file_limit || (MyFlags & MY_NO_REGISTER))
DBUG_RETURN(fd);
my_file_info[fd].name = my_strdup(key_memory_my_file_info, FileName, MyFlags);
statistic_increment(my_file_total_opened,&THR_LOCK_open);
my_file_info[fd].type = type_of_file;
DBUG_PRINT("exit",("fd: %d",fd));
DBUG_RETURN(fd);
}
my_errno= errno;
DBUG_PRINT("error",("Got error %d on open", my_errno));
if (MyFlags & (MY_FFNF | MY_FAE | MY_WME))
{
if (my_errno == EMFILE)
error_message_number= EE_OUT_OF_FILERESOURCES;
my_error(error_message_number,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
FileName, my_errno);
}
DBUG_RETURN(-1);
} | O0 | c | my_register_filename:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0xf57f6
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
leaq 0xb8e920(%rip), %rcx # 0xc84074
lock
xaddl %eax, (%rcx)
movl %eax, -0x28(%rbp)
movl -0x8(%rbp), %eax
leaq 0x1cb4eb(%rip), %rcx # 0x2c0c50
cmpl (%rcx), %eax
jae 0xf5779
movq -0x20(%rbp), %rax
andq $0x2004, %rax # imm = 0x2004
cmpq $0x0, %rax
je 0xf5786
jmp 0xf577b
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf586d
leaq 0xb8ee17(%rip), %rax # 0xc845a4
movl (%rax), %edi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xf5060
movq %rax, %rcx
leaq 0x1cb4b2(%rip), %rax # 0x2c0c58
movq (%rax), %rax
movslq -0x8(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
leaq 0xb8e8a2(%rip), %rax # 0xc84060
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0xb8e894(%rip), %rax # 0xc84060
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
leaq 0x1cb47f(%rip), %rax # 0x2c0c58
movq (%rax), %rax
movslq -0x8(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
jmp 0xf57ec
jmp 0xf57ee
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf586d
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
callq 0xf7440
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
jmp 0xf580c
movq -0x20(%rbp), %rax
andq $0x19, %rax
cmpq $0x0, %rax
je 0xf5864
callq 0xf7440
cmpl $0x18, (%rax)
jne 0xf582b
movl $0x17, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rax
andq $0x440, %rax # imm = 0x440
orq $0x4, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0xf7440
movl -0x44(%rbp), %edi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl (%rax), %ecx
movb $0x0, %al
callq 0xf0ef0
jmp 0xf5866
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_register_filename:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
mov [rbp+var_20], r8
cmp [rbp+var_8], 0
jl loc_F57F6
mov [rbp+var_24], 1
mov eax, [rbp+var_24]
lea rcx, my_file_opened
lock xadd [rcx], eax
mov [rbp+var_28], eax
mov eax, [rbp+var_8]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_F5779
mov rax, [rbp+var_20]
and rax, 2004h
cmp rax, 0
jz short loc_F5786
loc_F5779:
jmp short $+2
loc_F577B:
mov eax, [rbp+var_8]
mov [rbp+var_4], eax
jmp loc_F586D
loc_F5786:
lea rax, key_memory_my_file_info
mov edi, [rax]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_20]
call my_strdup
mov rcx, rax
lea rax, my_file_info
mov rax, [rax]
movsxd rdx, [rbp+var_8]
shl rdx, 4
add rax, rdx
mov [rax], rcx
lea rax, my_file_total_opened
mov rcx, [rax]
add rcx, 1
lea rax, my_file_total_opened
mov [rax], rcx
mov ecx, [rbp+var_14]
lea rax, my_file_info
mov rax, [rax]
movsxd rdx, [rbp+var_8]
shl rdx, 4
add rax, rdx
mov [rax+8], ecx
jmp short $+2
loc_F57EC:
jmp short $+2
loc_F57EE:
mov eax, [rbp+var_8]
mov [rbp+var_4], eax
jmp short loc_F586D
loc_F57F6:
call ___errno_location
mov eax, [rax]
mov [rbp+var_2C], eax
call _my_thread_var
mov ecx, [rbp+var_2C]
mov [rax], ecx
jmp short $+2
loc_F580C:
mov rax, [rbp+var_20]
and rax, 19h
cmp rax, 0
jz short loc_F5864
call _my_thread_var
cmp dword ptr [rax], 18h
jnz short loc_F582B
mov [rbp+var_18], 17h
loc_F582B:
mov eax, [rbp+var_18]
mov [rbp+var_44], eax
mov rax, [rbp+var_20]
and rax, 440h
or rax, 4
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
call _my_thread_var
mov edi, [rbp+var_44]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
mov ecx, [rax]
mov al, 0
call my_error
loc_F5864:
jmp short $+2
loc_F5866:
mov [rbp+var_4], 0FFFFFFFFh
loc_F586D:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long my_register_filename(long long a1, const char *a2, int a3, unsigned int a4, __int16 a5)
{
unsigned int *v5; // rax
int v7; // [rsp+24h] [rbp-2Ch]
if ( (int)a1 < 0 )
{
v7 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a1, a2) = v7;
if ( (a5 & 0x19) != 0 )
{
if ( *(_DWORD *)my_thread_var(a1, a2) == 24 )
a4 = 23;
v5 = (unsigned int *)my_thread_var(a1, a2);
my_error(a4, a5 & 0x440 | 4LL, a2, *v5);
}
return (unsigned int)-1;
}
else
{
_InterlockedExchangeAdd(my_file_opened, 1u);
if ( (unsigned int)a1 >= my_file_limit || (a5 & 0x2004) != 0 )
{
return (unsigned int)a1;
}
else
{
*((_QWORD *)my_file_info + 2 * (int)a1) = my_strdup(key_memory_my_file_info, (long long)a2, a5);
++my_file_total_opened;
*((_DWORD *)my_file_info + 4 * (int)a1 + 2) = a3;
return (unsigned int)a1;
}
}
}
| my_register_filename:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
MOV qword ptr [RBP + -0x20],R8
CMP dword ptr [RBP + -0x8],0x0
JL 0x001f57f6
MOV dword ptr [RBP + -0x24],0x1
MOV EAX,dword ptr [RBP + -0x24]
LEA RCX,[0xd84074]
XADD.LOCK dword ptr [RCX],EAX
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x8]
LEA RCX,[0x3c0c50]
CMP EAX,dword ptr [RCX]
JNC 0x001f5779
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x2004
CMP RAX,0x0
JZ 0x001f5786
LAB_001f5779:
JMP 0x001f577b
LAB_001f577b:
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001f586d
LAB_001f5786:
LEA RAX,[0xd845a4]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001f5060
MOV RCX,RAX
LEA RAX,[0x3c0c58]
MOV RAX,qword ptr [RAX]
MOVSXD RDX,dword ptr [RBP + -0x8]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX],RCX
LEA RAX,[0xd84060]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0xd84060]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x14]
LEA RAX,[0x3c0c58]
MOV RAX,qword ptr [RAX]
MOVSXD RDX,dword ptr [RBP + -0x8]
SHL RDX,0x4
ADD RAX,RDX
MOV dword ptr [RAX + 0x8],ECX
JMP 0x001f57ec
LAB_001f57ec:
JMP 0x001f57ee
LAB_001f57ee:
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001f586d
LAB_001f57f6:
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CALL 0x001f7440
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX],ECX
JMP 0x001f580c
LAB_001f580c:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x19
CMP RAX,0x0
JZ 0x001f5864
CALL 0x001f7440
CMP dword ptr [RAX],0x18
JNZ 0x001f582b
MOV dword ptr [RBP + -0x18],0x17
LAB_001f582b:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x440
OR RAX,0x4
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
CALL 0x001f7440
MOV EDI,dword ptr [RBP + -0x44]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX]
MOV AL,0x0
CALL 0x001f0ef0
LAB_001f5864:
JMP 0x001f5866
LAB_001f5866:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_001f586d:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
uint my_register_filename
(uint param_1,int8 param_2,int4 param_3,int4 param_4,ulong param_5)
{
int iVar1;
int8 uVar2;
int *piVar3;
int4 *puVar4;
int4 local_20;
uint local_c;
if ((int)param_1 < 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((param_5 & 0x19) != 0) {
piVar3 = (int *)_my_thread_var();
local_20 = param_4;
if (*piVar3 == 0x18) {
local_20 = 0x17;
}
puVar4 = (int4 *)_my_thread_var();
my_error(local_20,param_5 & 0x440 | 4,param_2,*puVar4);
}
local_c = 0xffffffff;
}
else {
LOCK();
my_file_opened = my_file_opened + 1;
UNLOCK();
local_c = param_1;
if ((param_1 < my_file_limit) && ((param_5 & 0x2004) == 0)) {
uVar2 = my_strdup(key_memory_my_file_info,param_2,param_5);
*(int8 *)(my_file_info + (long)(int)param_1 * 0x10) = uVar2;
my_file_total_opened = my_file_total_opened + 1;
*(int4 *)(my_file_info + (long)(int)param_1 * 0x10 + 8) = param_3;
}
}
return local_c;
}
| |
38,467 | ma_cmp_buffer | eloqsql/storage/maria/ma_dynrec.c | static my_bool _ma_cmp_buffer(File file, const uchar *buff, my_off_t filepos,
uint length)
{
uint next_length;
uchar temp_buff[IO_SIZE*2];
DBUG_ENTER("_ma_cmp_buffer");
next_length= IO_SIZE*2 - (uint) (filepos & (IO_SIZE-1));
while (length > IO_SIZE*2)
{
if (mysql_file_pread(file,temp_buff,next_length,filepos, MYF(MY_NABP)) ||
memcmp(buff, temp_buff, next_length))
goto err;
filepos+=next_length;
buff+=next_length;
length-= next_length;
next_length=IO_SIZE*2;
}
if (mysql_file_pread(file,temp_buff,length,filepos,MYF(MY_NABP)))
goto err;
DBUG_RETURN(memcmp(buff, temp_buff, length) != 0);
err:
DBUG_RETURN(1);
} | O0 | c | ma_cmp_buffer:
pushq %rbp
movq %rsp, %rbp
subq $0x2040, %rsp # imm = 0x2040
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x2018(%rbp)
movq %rsi, -0x2020(%rbp)
movq %rdx, -0x2028(%rbp)
movl %ecx, -0x202c(%rbp)
movq -0x2028(%rbp), %rax
andq $0xfff, %rax # imm = 0xFFF
movl %eax, %ecx
movl $0x2000, %eax # imm = 0x2000
subl %ecx, %eax
movl %eax, -0x2030(%rbp)
cmpl $0x2000, -0x202c(%rbp) # imm = 0x2000
jbe 0x407ef
movl -0x2018(%rbp), %edx
leaq -0x2010(%rbp), %rcx
movl -0x2030(%rbp), %eax
movl %eax, %r8d
movq -0x2028(%rbp), %r9
leaq 0x110e8a(%rip), %rdi # 0x1515ec
movl $0x6c1, %esi # imm = 0x6C1
movq $0x4, (%rsp)
callq 0x3b6f0
cmpq $0x0, %rax
jne 0x4079a
movq -0x2020(%rbp), %rdi
leaq -0x2010(%rbp), %rsi
movl -0x2030(%rbp), %eax
movl %eax, %edx
callq 0x2a830
cmpl $0x0, %eax
je 0x4079f
jmp 0x4085d
movl -0x2030(%rbp), %eax
addq -0x2028(%rbp), %rax
movq %rax, -0x2028(%rbp)
movl -0x2030(%rbp), %ecx
movq -0x2020(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x2020(%rbp)
movl -0x2030(%rbp), %ecx
movl -0x202c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x202c(%rbp)
movl $0x2000, -0x2030(%rbp) # imm = 0x2000
jmp 0x4072e
movl -0x2018(%rbp), %edx
leaq -0x2010(%rbp), %rcx
movl -0x202c(%rbp), %eax
movl %eax, %r8d
movq -0x2028(%rbp), %r9
leaq 0x110dd9(%rip), %rdi # 0x1515ec
movl $0x6c9, %esi # imm = 0x6C9
movq $0x4, (%rsp)
callq 0x3b6f0
cmpq $0x0, %rax
je 0x4082d
jmp 0x4085d
jmp 0x4082f
movq -0x2020(%rbp), %rdi
leaq -0x2010(%rbp), %rsi
movl -0x202c(%rbp), %eax
movl %eax, %edx
callq 0x2a830
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x2011(%rbp)
jmp 0x40866
jmp 0x4085f
movb $0x1, -0x2011(%rbp)
movb -0x2011(%rbp), %al
movb %al, -0x2031(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x40893
movb -0x2031(%rbp), %al
addq $0x2040, %rsp # imm = 0x2040
popq %rbp
retq
callq 0x2a270
nopl (%rax,%rax)
| _ma_cmp_buffer:
push rbp
mov rbp, rsp
sub rsp, 2040h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2018], edi
mov [rbp+var_2020], rsi
mov [rbp+var_2028], rdx
mov [rbp+var_202C], ecx
mov rax, [rbp+var_2028]
and rax, 0FFFh
mov ecx, eax
mov eax, 2000h
sub eax, ecx
mov [rbp+var_2030], eax
loc_4072E:
cmp [rbp+var_202C], 2000h
jbe loc_407EF
mov edx, [rbp+var_2018]
lea rcx, [rbp+var_2010]
mov eax, [rbp+var_2030]
mov r8d, eax
mov r9, [rbp+var_2028]
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 6C1h
mov [rsp+2040h+var_2040], 4
call inline_mysql_file_pread_0
cmp rax, 0
jnz short loc_4079A
mov rdi, [rbp+var_2020]
lea rsi, [rbp+var_2010]
mov eax, [rbp+var_2030]
mov edx, eax
call _memcmp
cmp eax, 0
jz short loc_4079F
loc_4079A:
jmp loc_4085D
loc_4079F:
mov eax, [rbp+var_2030]
add rax, [rbp+var_2028]
mov [rbp+var_2028], rax
mov ecx, [rbp+var_2030]
mov rax, [rbp+var_2020]
mov ecx, ecx
add rax, rcx
mov [rbp+var_2020], rax
mov ecx, [rbp+var_2030]
mov eax, [rbp+var_202C]
sub eax, ecx
mov [rbp+var_202C], eax
mov [rbp+var_2030], 2000h
jmp loc_4072E
loc_407EF:
mov edx, [rbp+var_2018]
lea rcx, [rbp+var_2010]
mov eax, [rbp+var_202C]
mov r8d, eax
mov r9, [rbp+var_2028]
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 6C9h
mov [rsp+2040h+var_2040], 4
call inline_mysql_file_pread_0
cmp rax, 0
jz short loc_4082D
jmp short loc_4085D
loc_4082D:
jmp short $+2
loc_4082F:
mov rdi, [rbp+var_2020]
lea rsi, [rbp+var_2010]
mov eax, [rbp+var_202C]
mov edx, eax
call _memcmp
cmp eax, 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_2011], al
jmp short loc_40866
loc_4085D:
jmp short $+2
loc_4085F:
mov [rbp+var_2011], 1
loc_40866:
mov al, [rbp+var_2011]
mov [rbp+var_2031], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_40893
mov al, [rbp+var_2031]
add rsp, 2040h
pop rbp
retn
loc_40893:
call ___stack_chk_fail
| bool ma_cmp_buffer(unsigned int a1, long long a2, long long a3, unsigned int a4)
{
unsigned int v5; // [rsp+10h] [rbp-2030h]
long long v7; // [rsp+18h] [rbp-2028h]
_BYTE v10[8200]; // [rsp+30h] [rbp-2010h] BYREF
unsigned long long v11; // [rsp+2038h] [rbp-8h]
v11 = __readfsqword(0x28u);
v7 = a3;
v5 = 0x2000 - (a3 & 0xFFF);
while ( a4 > 0x2000 )
{
if ( inline_mysql_file_pread_0(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",
0x6C1u,
a1,
(long long)v10,
v5,
v7,
4LL)
|| (unsigned int)memcmp(a2, v10, v5) )
{
return 1;
}
v7 += v5;
a2 += v5;
a4 -= v5;
v5 = 0x2000;
}
if ( !inline_mysql_file_pread_0(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",
0x6C9u,
a1,
(long long)v10,
a4,
v7,
4LL) )
return (unsigned int)memcmp(a2, v10, a4) != 0;
return 1;
}
| _ma_cmp_buffer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2040
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x2018],EDI
MOV qword ptr [RBP + -0x2020],RSI
MOV qword ptr [RBP + -0x2028],RDX
MOV dword ptr [RBP + -0x202c],ECX
MOV RAX,qword ptr [RBP + -0x2028]
AND RAX,0xfff
MOV ECX,EAX
MOV EAX,0x2000
SUB EAX,ECX
MOV dword ptr [RBP + -0x2030],EAX
LAB_0014072e:
CMP dword ptr [RBP + -0x202c],0x2000
JBE 0x001407ef
MOV EDX,dword ptr [RBP + -0x2018]
LEA RCX,[RBP + -0x2010]
MOV EAX,dword ptr [RBP + -0x2030]
MOV R8D,EAX
MOV R9,qword ptr [RBP + -0x2028]
LEA RDI,[0x2515ec]
MOV ESI,0x6c1
MOV qword ptr [RSP],0x4
CALL 0x0013b6f0
CMP RAX,0x0
JNZ 0x0014079a
MOV RDI,qword ptr [RBP + -0x2020]
LEA RSI,[RBP + -0x2010]
MOV EAX,dword ptr [RBP + -0x2030]
MOV EDX,EAX
CALL 0x0012a830
CMP EAX,0x0
JZ 0x0014079f
LAB_0014079a:
JMP 0x0014085d
LAB_0014079f:
MOV EAX,dword ptr [RBP + -0x2030]
ADD RAX,qword ptr [RBP + -0x2028]
MOV qword ptr [RBP + -0x2028],RAX
MOV ECX,dword ptr [RBP + -0x2030]
MOV RAX,qword ptr [RBP + -0x2020]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x2020],RAX
MOV ECX,dword ptr [RBP + -0x2030]
MOV EAX,dword ptr [RBP + -0x202c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x202c],EAX
MOV dword ptr [RBP + -0x2030],0x2000
JMP 0x0014072e
LAB_001407ef:
MOV EDX,dword ptr [RBP + -0x2018]
LEA RCX,[RBP + -0x2010]
MOV EAX,dword ptr [RBP + -0x202c]
MOV R8D,EAX
MOV R9,qword ptr [RBP + -0x2028]
LEA RDI,[0x2515ec]
MOV ESI,0x6c9
MOV qword ptr [RSP],0x4
CALL 0x0013b6f0
CMP RAX,0x0
JZ 0x0014082d
JMP 0x0014085d
LAB_0014082d:
JMP 0x0014082f
LAB_0014082f:
MOV RDI,qword ptr [RBP + -0x2020]
LEA RSI,[RBP + -0x2010]
MOV EAX,dword ptr [RBP + -0x202c]
MOV EDX,EAX
CALL 0x0012a830
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x2011],AL
JMP 0x00140866
LAB_0014085d:
JMP 0x0014085f
LAB_0014085f:
MOV byte ptr [RBP + -0x2011],0x1
LAB_00140866:
MOV AL,byte ptr [RBP + -0x2011]
MOV byte ptr [RBP + -0x2031],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00140893
MOV AL,byte ptr [RBP + -0x2031]
ADD RSP,0x2040
POP RBP
RET
LAB_00140893:
CALL 0x0012a270
|
int8 _ma_cmp_buffer(int4 param_1,void *param_2,long param_3,uint param_4)
{
int iVar1;
long lVar2;
long in_FS_OFFSET;
uint local_2038;
uint local_2034;
long local_2030;
void *local_2028;
bool local_2019;
int1 local_2018 [8200];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2038 = 0x2000 - ((uint)param_3 & 0xfff);
local_2034 = param_4;
local_2030 = param_3;
local_2028 = param_2;
while (0x2000 < local_2034) {
lVar2 = inline_mysql_file_pread
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",0x6c1,
param_1,local_2018,local_2038,local_2030,4);
if ((lVar2 != 0) || (iVar1 = memcmp(local_2028,local_2018,(ulong)local_2038), iVar1 != 0))
goto LAB_0014085d;
local_2030 = (ulong)local_2038 + local_2030;
local_2028 = (void *)((long)local_2028 + (ulong)local_2038);
local_2034 = local_2034 - local_2038;
local_2038 = 0x2000;
}
lVar2 = inline_mysql_file_pread
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",0x6c9,
param_1,local_2018,local_2034,local_2030,4);
if (lVar2 == 0) {
iVar1 = memcmp(local_2028,local_2018,(ulong)local_2034);
local_2019 = iVar1 != 0;
}
else {
LAB_0014085d:
local_2019 = true;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_2019);
}
| |
38,468 | thai2sortable | eloqsql/strings/ctype-tis620.c | static size_t thai2sortable(uchar *tstr, size_t len)
{
uchar *p;
size_t tlen;
uchar l2bias;
tlen= len;
l2bias= 256 - 8;
for (p= tstr; tlen > 0; p++, tlen--)
{
uchar c= *p;
if (isthai(c))
{
const int *t_ctype0= t_ctype[c];
if (isconsnt(c))
l2bias -= 8;
if (isldvowel(c) && tlen != 1 && isconsnt(p[1]))
{
/* simply swap between leading-vowel and consonant */
*p= p[1];
p[1]= c;
tlen--;
p++;
continue;
}
/* if found level 2 char (L2_GARAN,L2_TONE*,L2_TYKHU) move to last */
if (t_ctype0[1] >= L2_GARAN)
{
/*
l2bias use to control position weight of l2char
example (*=l2char) XX*X must come before X*XX
*/
memmove((char*) p, (char*) (p+1), tlen-1);
tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1;
p--;
continue;
}
}
else
{
l2bias-= 8;
*p= to_lower_tis620[c];
}
}
return len;
} | O0 | c | thai2sortable:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $-0x8, -0x21(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x519b6
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x22(%rbp)
movzbl -0x22(%rbp), %eax
cmpl $0x80, %eax
jl 0x51977
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
leaq 0xf9adc(%rip), %rax # 0x14b350
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
leaq 0xf9ac4(%rip), %rax # 0x14b350
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x518a8
movzbl -0x21(%rbp), %eax
subl $0x8, %eax
movb %al, -0x21(%rbp)
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
leaq 0xf9a9b(%rip), %rax # 0x14b350
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x51922
cmpq $0x1, -0x20(%rbp)
je 0x51922
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %ecx
leaq 0xf9a71(%rip), %rax # 0x14b350
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x51922
movq -0x18(%rbp), %rax
movb 0x1(%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movb -0x22(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x51999
movq -0x30(%rbp), %rax
cmpl $0x9, 0x4(%rax)
jl 0x51975
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
movq -0x20(%rbp), %rdx
subq $0x1, %rdx
callq 0x25600
movzbl -0x21(%rbp), %eax
movq -0x30(%rbp), %rcx
addl 0x4(%rcx), %eax
subl $0x9, %eax
addl $0x1, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x51999
jmp 0x51997
movzbl -0x21(%rbp), %eax
subl $0x8, %eax
movb %al, -0x21(%rbp)
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
leaq 0x272472(%rip), %rax # 0x2c3e00
movb (%rax,%rcx), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
jmp 0x51999
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x51844
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
| thai2sortable:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov [rbp+var_21], 0F8h
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
loc_51844:
cmp [rbp+var_20], 0
jbe loc_519B6
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_22], al
movzx eax, [rbp+var_22]
cmp eax, 80h
jl loc_51977
movzx eax, [rbp+var_22]
mov ecx, eax
lea rax, t_ctype
imul rcx, 14h
add rax, rcx
mov [rbp+var_30], rax
movzx eax, [rbp+var_22]
mov ecx, eax
lea rax, t_ctype
imul rcx, 14h
add rax, rcx
mov eax, [rax+10h]
and eax, 10h
cmp eax, 0
jz short loc_518A8
movzx eax, [rbp+var_21]
sub eax, 8
mov [rbp+var_21], al
loc_518A8:
movzx eax, [rbp+var_22]
mov ecx, eax
lea rax, t_ctype
imul rcx, 14h
add rax, rcx
mov eax, [rax+10h]
and eax, 20h
cmp eax, 0
jz short loc_51922
cmp [rbp+var_20], 1
jz short loc_51922
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
mov ecx, eax
lea rax, t_ctype
imul rcx, 14h
add rax, rcx
mov eax, [rax+10h]
and eax, 10h
cmp eax, 0
jz short loc_51922
mov rax, [rbp+var_18]
mov cl, [rax+1]
mov rax, [rbp+var_18]
mov [rax], cl
mov cl, [rbp+var_22]
mov rax, [rbp+var_18]
mov [rax+1], cl
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_51999
loc_51922:
mov rax, [rbp+var_30]
cmp dword ptr [rax+4], 9
jl short loc_51975
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_18]
add rsi, 1
mov rdx, [rbp+var_20]
sub rdx, 1
call _memmove
movzx eax, [rbp+var_21]
mov rcx, [rbp+var_30]
add eax, [rcx+4]
sub eax, 9
add eax, 1
mov dl, al
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
sub rcx, 1
mov [rax+rcx], dl
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_51999
loc_51975:
jmp short loc_51997
loc_51977:
movzx eax, [rbp+var_21]
sub eax, 8
mov [rbp+var_21], al
movzx eax, [rbp+var_22]
mov ecx, eax
lea rax, to_lower_tis620
mov cl, [rax+rcx]
mov rax, [rbp+var_18]
mov [rax], cl
loc_51997:
jmp short $+2
loc_51999:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp loc_51844
loc_519B6:
mov rax, [rbp+var_10]
add rsp, 30h
pop rbp
retn
| long long thai2sortable(unsigned __int8 *a1, long long a2)
{
char *v3; // [rsp+0h] [rbp-30h]
unsigned __int8 v4; // [rsp+Eh] [rbp-22h]
char v5; // [rsp+Fh] [rbp-21h]
long long v6; // [rsp+10h] [rbp-20h]
unsigned __int8 *v7; // [rsp+18h] [rbp-18h]
v6 = a2;
v5 = -8;
v7 = a1;
while ( v6 )
{
v4 = *v7;
if ( *v7 < 0x80u )
{
v5 -= 8;
*v7 = to_lower_tis620[v4];
}
else
{
v3 = (char *)&t_ctype[5 * v4];
if ( (*((_DWORD *)v3 + 4) & 0x10) != 0 )
v5 -= 8;
if ( (t_ctype[5 * v4 + 4] & 0x20) != 0 && v6 != 1 && (t_ctype[5 * v7[1] + 4] & 0x10) != 0 )
{
*v7 = v7[1];
v7[1] = v4;
--v6;
++v7;
}
else if ( *((int *)v3 + 1) >= 9 )
{
memmove(v7, v7 + 1, v6 - 1);
a1[a2 - 1] = v3[4] + v5 - 9 + 1;
--v7;
}
}
++v7;
--v6;
}
return a2;
}
| thai2sortable:
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 + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV byte ptr [RBP + -0x21],0xf8
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_00151844:
CMP qword ptr [RBP + -0x20],0x0
JBE 0x001519b6
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x22],AL
MOVZX EAX,byte ptr [RBP + -0x22]
CMP EAX,0x80
JL 0x00151977
MOVZX EAX,byte ptr [RBP + -0x22]
MOV ECX,EAX
LEA RAX,[0x24b350]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOVZX EAX,byte ptr [RBP + -0x22]
MOV ECX,EAX
LEA RAX,[0x24b350]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001518a8
MOVZX EAX,byte ptr [RBP + -0x21]
SUB EAX,0x8
MOV byte ptr [RBP + -0x21],AL
LAB_001518a8:
MOVZX EAX,byte ptr [RBP + -0x22]
MOV ECX,EAX
LEA RAX,[0x24b350]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x20
CMP EAX,0x0
JZ 0x00151922
CMP qword ptr [RBP + -0x20],0x1
JZ 0x00151922
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV ECX,EAX
LEA RAX,[0x24b350]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x10
CMP EAX,0x0
JZ 0x00151922
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,byte ptr [RAX + 0x1]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
MOV CL,byte ptr [RBP + -0x22]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00151999
LAB_00151922:
MOV RAX,qword ptr [RBP + -0x30]
CMP dword ptr [RAX + 0x4],0x9
JL 0x00151975
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x20]
SUB RDX,0x1
CALL 0x00125600
MOVZX EAX,byte ptr [RBP + -0x21]
MOV RCX,qword ptr [RBP + -0x30]
ADD EAX,dword ptr [RCX + 0x4]
SUB EAX,0x9
ADD EAX,0x1
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
SUB RCX,0x1
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00151999
LAB_00151975:
JMP 0x00151997
LAB_00151977:
MOVZX EAX,byte ptr [RBP + -0x21]
SUB EAX,0x8
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x22]
MOV ECX,EAX
LEA RAX,[0x3c3e00]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
LAB_00151997:
JMP 0x00151999
LAB_00151999:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00151844
LAB_001519b6:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x30
POP RBP
RET
|
long thai2sortable(byte *param_1,long param_2)
{
byte bVar1;
char local_29;
long local_28;
byte *local_20;
local_29 = -8;
local_20 = param_1;
for (local_28 = param_2; local_28 != 0; local_28 = local_28 + -1) {
bVar1 = *local_20;
if (bVar1 < 0x80) {
local_29 = local_29 + -8;
*local_20 = to_lower_tis620[bVar1];
}
else {
if ((*(uint *)(t_ctype + (ulong)bVar1 * 0x14 + 0x10) & 0x10) != 0) {
local_29 = local_29 + -8;
}
if ((((*(uint *)(t_ctype + (ulong)bVar1 * 0x14 + 0x10) & 0x20) == 0) || (local_28 == 1)) ||
((*(uint *)(t_ctype + (ulong)local_20[1] * 0x14 + 0x10) & 0x10) == 0)) {
if (8 < *(int *)(t_ctype + (ulong)bVar1 * 0x14 + 4)) {
memmove(local_20,local_20 + 1,local_28 - 1);
param_1[param_2 + -1] =
(local_29 + (char)*(int4 *)(t_ctype + (ulong)bVar1 * 0x14 + 4)) - 8;
local_20 = local_20 + -1;
}
}
else {
*local_20 = local_20[1];
local_20[1] = bVar1;
local_28 = local_28 + -1;
local_20 = local_20 + 1;
}
}
local_20 = local_20 + 1;
}
return param_2;
}
| |
38,469 | thai2sortable | eloqsql/strings/ctype-tis620.c | static size_t thai2sortable(uchar *tstr, size_t len)
{
uchar *p;
size_t tlen;
uchar l2bias;
tlen= len;
l2bias= 256 - 8;
for (p= tstr; tlen > 0; p++, tlen--)
{
uchar c= *p;
if (isthai(c))
{
const int *t_ctype0= t_ctype[c];
if (isconsnt(c))
l2bias -= 8;
if (isldvowel(c) && tlen != 1 && isconsnt(p[1]))
{
/* simply swap between leading-vowel and consonant */
*p= p[1];
p[1]= c;
tlen--;
p++;
continue;
}
/* if found level 2 char (L2_GARAN,L2_TONE*,L2_TYKHU) move to last */
if (t_ctype0[1] >= L2_GARAN)
{
/*
l2bias use to control position weight of l2char
example (*=l2char) XX*X must come before X*XX
*/
memmove((char*) p, (char*) (p+1), tlen-1);
tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1;
p--;
continue;
}
}
else
{
l2bias-= 8;
*p= to_lower_tis620[c];
}
}
return len;
} | O3 | c | thai2sortable:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
testq %rsi, %rsi
je 0x40370
movb $-0x8, %r13b
leaq 0x1aa02d(%rip), %r12 # 0x1ea2e0
leaq 0x2e09e6(%rip), %r8 # 0x320ca0
movq -0x38(%rbp), %r15
movq -0x30(%rbp), %rbx
movb (%r15), %al
movzbl %al, %ecx
testb %cl, %cl
js 0x402e4
addb $-0x8, %r13b
movb (%rcx,%r8), %al
movb %al, (%r15)
incq %r15
decq %rbx
jne 0x402c2
jmp 0x40370
leaq (%rcx,%rcx,4), %rcx
movl 0x10(%r12,%rcx,4), %edx
leal -0x8(%r13), %esi
testb $0x10, %dl
movzbl %r13b, %edi
movzbl %sil, %r13d
cmovel %edi, %r13d
cmpq $0x1, %rbx
je 0x4031d
andl $0x20, %edx
je 0x4031d
movzbl 0x1(%r15), %edx
leaq -0xcf(%rdx), %rsi
cmpq $-0x2e, %rsi
jae 0x4035e
leaq (%r12,%rcx,4), %rax
movl 0x4(%rax), %r14d
cmpl $0x9, %r14d
jl 0x402d7
leaq 0x1(%r15), %rsi
leaq -0x1(%rbx), %rdx
movq %r15, %rdi
callq 0x24640
leaq 0x2e095e(%rip), %r8 # 0x320ca0
addb %r13b, %r14b
addb $-0x8, %r14b
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movb %r14b, -0x1(%rcx,%rax)
decq %r15
jmp 0x402d7
movb %dl, (%r15)
movb %al, 0x1(%r15)
incq %r15
decq %rbx
jmp 0x402d7
movq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| thai2sortable:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], rdi
mov [rbp+var_30], rsi
test rsi, rsi
jz loc_40370
mov r13b, 0F8h
lea r12, t_ctype
lea r8, to_lower_tis620
mov r15, [rbp+var_38]
mov rbx, [rbp+var_30]
loc_402C2:
mov al, [r15]
movzx ecx, al
test cl, cl
js short loc_402E4
add r13b, 0F8h
mov al, [rcx+r8]
mov [r15], al
loc_402D7:
inc r15
dec rbx
jnz short loc_402C2
jmp loc_40370
loc_402E4:
lea rcx, [rcx+rcx*4]
mov edx, [r12+rcx*4+10h]
lea esi, [r13-8]
test dl, 10h
movzx edi, r13b
movzx r13d, sil
cmovz r13d, edi
cmp rbx, 1
jz short loc_4031D
and edx, 20h
jz short loc_4031D
movzx edx, byte ptr [r15+1]
lea rsi, [rdx-0CFh]
cmp rsi, 0FFFFFFFFFFFFFFD2h
jnb short loc_4035E
loc_4031D:
lea rax, [r12+rcx*4]
mov r14d, [rax+4]
cmp r14d, 9
jl short loc_402D7
lea rsi, [r15+1]
lea rdx, [rbx-1]
mov rdi, r15
call _memmove
lea r8, to_lower_tis620
add r14b, r13b
add r14b, 0F8h
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
mov [rcx+rax-1], r14b
dec r15
jmp loc_402D7
loc_4035E:
mov [r15], dl
mov [r15+1], al
inc r15
dec rbx
jmp loc_402D7
loc_40370:
mov rax, [rbp+var_30]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long thai2sortable(unsigned __int8 *a1, long long a2)
{
char v2; // r13
unsigned __int8 *v3; // r15
long long v4; // rbx
unsigned __int8 v5; // al
long long v6; // rcx
long long v7; // rcx
int v8; // edx
char v9; // di
long long v10; // rdx
int v11; // r14d
if ( a2 )
{
v2 = -8;
v3 = a1;
v4 = a2;
do
{
v5 = *v3;
v6 = *v3;
if ( (v6 & 0x80u) != 0LL )
{
v7 = 5 * v6;
v8 = t_ctype[v7 + 4];
v9 = v2;
v2 -= 8;
if ( (v8 & 0x10) == 0 )
v2 = v9;
if ( v4 != 1 && (v8 & 0x20) != 0 && (v10 = v3[1], (unsigned long long)(v10 - 207) >= 0xFFFFFFFFFFFFFFD2LL) )
{
*v3 = v10;
*++v3 = v5;
--v4;
}
else
{
v11 = t_ctype[v7 + 1];
if ( v11 >= 9 )
{
memmove(v3, v3 + 1, v4 - 1);
a1[a2 - 1] = v2 + v11 - 8;
--v3;
}
}
}
else
{
v2 -= 8;
*v3 = to_lower_tis620[v6];
}
++v3;
--v4;
}
while ( v4 );
}
return a2;
}
| thai2sortable:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x30],RSI
TEST RSI,RSI
JZ 0x00140370
MOV R13B,0xf8
LEA R12,[0x2ea2e0]
LEA R8,[0x420ca0]
MOV R15,qword ptr [RBP + -0x38]
MOV RBX,qword ptr [RBP + -0x30]
LAB_001402c2:
MOV AL,byte ptr [R15]
MOVZX ECX,AL
TEST CL,CL
JS 0x001402e4
ADD R13B,0xf8
MOV AL,byte ptr [RCX + R8*0x1]
MOV byte ptr [R15],AL
LAB_001402d7:
INC R15
DEC RBX
JNZ 0x001402c2
JMP 0x00140370
LAB_001402e4:
LEA RCX,[RCX + RCX*0x4]
MOV EDX,dword ptr [R12 + RCX*0x4 + 0x10]
LEA ESI,[R13 + -0x8]
TEST DL,0x10
MOVZX EDI,R13B
MOVZX R13D,SIL
CMOVZ R13D,EDI
CMP RBX,0x1
JZ 0x0014031d
AND EDX,0x20
JZ 0x0014031d
MOVZX EDX,byte ptr [R15 + 0x1]
LEA RSI,[RDX + -0xcf]
CMP RSI,-0x2e
JNC 0x0014035e
LAB_0014031d:
LEA RAX,[R12 + RCX*0x4]
MOV R14D,dword ptr [RAX + 0x4]
CMP R14D,0x9
JL 0x001402d7
LEA RSI,[R15 + 0x1]
LEA RDX,[RBX + -0x1]
MOV RDI,R15
CALL 0x00124640
LEA R8,[0x420ca0]
ADD R14B,R13B
ADD R14B,0xf8
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
MOV byte ptr [RCX + RAX*0x1 + -0x1],R14B
DEC R15
JMP 0x001402d7
LAB_0014035e:
MOV byte ptr [R15],DL
MOV byte ptr [R15 + 0x1],AL
INC R15
DEC RBX
JMP 0x001402d7
LAB_00140370:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long thai2sortable(byte *param_1,long param_2)
{
byte bVar1;
int iVar2;
char cVar3;
ulong uVar4;
long lVar5;
char cVar6;
byte *__dest;
if (param_2 != 0) {
cVar6 = -8;
lVar5 = param_2;
__dest = param_1;
do {
bVar1 = *__dest;
uVar4 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
cVar3 = cVar6 + -8;
if ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x10) == 0) {
cVar3 = cVar6;
}
cVar6 = cVar3;
if (((lVar5 == 1) || ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x20) == 0)) ||
((ulong)__dest[1] - 0xcf < 0xffffffffffffffd2)) {
iVar2 = *(int *)(t_ctype + uVar4 * 0x14 + 4);
if (8 < iVar2) {
memmove(__dest,__dest + 1,lVar5 - 1);
param_1[param_2 + -1] = ((char)iVar2 + cVar3) - 8;
__dest = __dest + -1;
}
}
else {
*__dest = __dest[1];
__dest[1] = bVar1;
__dest = __dest + 1;
lVar5 = lVar5 + -1;
}
}
else {
*__dest = to_lower_tis620[uVar4];
cVar6 = cVar6 + -8;
}
__dest = __dest + 1;
lVar5 = lVar5 + -1;
} while (lVar5 != 0);
}
return param_2;
}
| |
38,470 | FTB_WORD_cmp | eloqsql/storage/myisam/ft_boolean_search.c | static int FTB_WORD_cmp(my_off_t *v, FTB_WORD *a, FTB_WORD *b)
{
int i;
/* if a==curdoc, take it as a < b */
if (v && a->docid[0] == *v)
return -1;
/* ORDER BY docid, ndepth DESC */
i=CMP_NUM(a->docid[0], b->docid[0]);
if (!i)
i=CMP_NUM(b->ndepth,a->ndepth);
return i;
} | O3 | c | FTB_WORD_cmp:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rsi), %rcx
testq %rdi, %rdi
je 0x71a05
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq (%rdi), %rcx
je 0x71a28
xorl %eax, %eax
cmpq 0x10(%rdx), %rcx
setne %al
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmovbl %ecx, %eax
testl %eax, %eax
jne 0x71a28
movl 0x44(%rdx), %edx
xorl %eax, %eax
cmpl 0x44(%rsi), %edx
setne %al
cmovbl %ecx, %eax
popq %rbp
retq
| FTB_WORD_cmp:
push rbp
mov rbp, rsp
mov rcx, [rsi+10h]
test rdi, rdi
jz short loc_71A05
mov eax, 0FFFFFFFFh
cmp rcx, [rdi]
jz short loc_71A28
loc_71A05:
xor eax, eax
cmp rcx, [rdx+10h]
setnz al
mov ecx, 0FFFFFFFFh
cmovb eax, ecx
test eax, eax
jnz short loc_71A28
mov edx, [rdx+44h]
xor eax, eax
cmp edx, [rsi+44h]
setnz al
cmovb eax, ecx
loc_71A28:
pop rbp
retn
| long long FTB_WORD_cmp(_QWORD *a1, long long a2, long long a3)
{
unsigned long long v3; // rcx
long long result; // rax
unsigned int v5; // edx
v3 = *(_QWORD *)(a2 + 16);
if ( !a1 || (result = 0xFFFFFFFFLL, v3 != *a1) )
{
result = v3 != *(_QWORD *)(a3 + 16);
if ( v3 < *(_QWORD *)(a3 + 16) )
result = 0xFFFFFFFFLL;
if ( !(_DWORD)result )
{
v5 = *(_DWORD *)(a3 + 68);
result = v5 != *(_DWORD *)(a2 + 68);
if ( v5 < *(_DWORD *)(a2 + 68) )
return 0xFFFFFFFFLL;
}
}
return result;
}
| FTB_WORD_cmp:
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RSI + 0x10]
TEST RDI,RDI
JZ 0x00171a05
MOV EAX,0xffffffff
CMP RCX,qword ptr [RDI]
JZ 0x00171a28
LAB_00171a05:
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x10]
SETNZ AL
MOV ECX,0xffffffff
CMOVC EAX,ECX
TEST EAX,EAX
JNZ 0x00171a28
MOV EDX,dword ptr [RDX + 0x44]
XOR EAX,EAX
CMP EDX,dword ptr [RSI + 0x44]
SETNZ AL
CMOVC EAX,ECX
LAB_00171a28:
POP RBP
RET
|
uint FTB_WORD_cmp(ulong *param_1,long param_2,long param_3)
{
ulong uVar1;
uint uVar2;
uVar1 = *(ulong *)(param_2 + 0x10);
if ((param_1 == (ulong *)0x0) || (uVar2 = 0xffffffff, uVar1 != *param_1)) {
uVar2 = (uint)(uVar1 != *(ulong *)(param_3 + 0x10));
if (uVar1 < *(ulong *)(param_3 + 0x10)) {
uVar2 = 0xffffffff;
}
if ((uVar2 == 0) &&
(uVar2 = (uint)(*(uint *)(param_3 + 0x44) != *(uint *)(param_2 + 0x44)),
*(uint *)(param_3 + 0x44) < *(uint *)(param_2 + 0x44))) {
uVar2 = 0xffffffff;
}
}
return uVar2;
}
| |
38,471 | js_get_fast_array_element | bluesky950520[P]quickjs/quickjs.c | static BOOL js_get_fast_array_element(JSContext *ctx, JSObject *p,
uint32_t idx, JSValue *pval)
{
switch(p->class_id) {
case JS_CLASS_ARRAY:
case JS_CLASS_ARGUMENTS:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_dup(p->u.array.u.values[idx]);
return TRUE;
case JS_CLASS_INT8_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_int32(p->u.array.u.int8_ptr[idx]);
return TRUE;
case JS_CLASS_UINT8C_ARRAY:
case JS_CLASS_UINT8_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_int32(p->u.array.u.uint8_ptr[idx]);
return TRUE;
case JS_CLASS_INT16_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_int32(p->u.array.u.int16_ptr[idx]);
return TRUE;
case JS_CLASS_UINT16_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_int32(p->u.array.u.uint16_ptr[idx]);
return TRUE;
case JS_CLASS_INT32_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_int32(p->u.array.u.int32_ptr[idx]);
return TRUE;
case JS_CLASS_UINT32_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_uint32(p->u.array.u.uint32_ptr[idx]);
return TRUE;
case JS_CLASS_BIG_INT64_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = JS_NewBigInt64(ctx, p->u.array.u.int64_ptr[idx]);
return TRUE;
case JS_CLASS_BIG_UINT64_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = JS_NewBigUint64(ctx, p->u.array.u.uint64_ptr[idx]);
return TRUE;
case JS_CLASS_FLOAT16_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_float64(fromfp16(p->u.array.u.fp16_ptr[idx]));
return TRUE;
case JS_CLASS_FLOAT32_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_float64(p->u.array.u.float_ptr[idx]);
return TRUE;
case JS_CLASS_FLOAT64_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_float64(p->u.array.u.double_ptr[idx]);
return TRUE;
default:
return FALSE;
}
} | O2 | c | js_get_fast_array_element:
pushq %rbx
movq %rcx, %rbx
movzwl 0x6(%rsi), %ecx
xorl %eax, %eax
addl $-0x2, %ecx
cmpl $0x1e, %ecx
ja 0x1e3a4
leaq 0x65301(%rip), %r8 # 0x83544
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rcx
movl %edx, %edx
shlq $0x4, %rdx
movq (%rcx,%rdx), %rax
movq 0x8(%rcx,%rdx), %rdx
cmpl $-0x9, %edx
jb 0x1e30a
incl (%rax)
jmp 0x1e30a
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movzbl (%rax,%rcx), %eax
jmp 0x1e369
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movsbq (%rax,%rcx), %rax
jmp 0x1e356
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rsi
callq 0x21d56
jmp 0x1e30a
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, (%rbx)
jmp 0x1e39a
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movl (%rax,%rcx,4), %eax
jmp 0x1e369
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rsi
callq 0x21dfa
movq %rax, (%rbx)
jmp 0x1e39d
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movslq (%rax,%rcx,4), %rax
xorl %ecx, %ecx
movl %eax, %edx
cvtsi2sd %rdx, %xmm0
testq %rax, %rax
movq %xmm0, %rsi
cmovnsq %rax, %rsi
pushq $0x7
popq %rdx
cmovnsq %rcx, %rdx
movq %rsi, (%rbx)
jmp 0x1e39d
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movswq (%rax,%rcx,2), %rax
movl %eax, %eax
jmp 0x1e369
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movzwl (%rax,%rcx,2), %eax
movq %rax, (%rbx)
xorl %edx, %edx
jmp 0x1e39d
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
cvtss2sd (%rax,%rcx,4), %xmm0
jmp 0x1e396
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x36177
movsd %xmm0, (%rbx)
pushq $0x7
popq %rdx
movq %rdx, 0x8(%rbx)
pushq $0x1
popq %rax
popq %rbx
retq
| js_get_fast_array_element:
push rbx
mov rbx, rcx
movzx ecx, word ptr [rsi+6]
xor eax, eax
add ecx, 0FFFFFFFEh; switch 31 cases
cmp ecx, 1Eh
ja def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
lea r8, jpt_1E24A
movsxd rcx, ds:(jpt_1E24A - 83544h)[r8+rcx*4]
add rcx, r8
jmp rcx; switch jump
loc_1E24C:
cmp [rsi+40h], edx; jumptable 000000000001E24A cases 2,8
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rcx, [rsi+38h]
mov edx, edx
shl rdx, 4
mov rax, [rcx+rdx]
mov rdx, [rcx+rdx+8]
cmp edx, 0FFFFFFF7h
jb loc_1E30A
inc dword ptr [rax]
jmp loc_1E30A
loc_1E278:
cmp [rsi+40h], edx; jumptable 000000000001E24A cases 21,23
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
movzx eax, byte ptr [rax+rcx]
jmp loc_1E369
loc_1E290:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 22
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
movsx rax, byte ptr [rax+rcx]
jmp loc_1E356
loc_1E2A9:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 28
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
mov rsi, [rax+rcx*8]
call JS_NewBigInt64
jmp short loc_1E30A
loc_1E2C3:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 32
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
mov rax, [rax+rcx*8]
mov [rbx], rax
jmp loc_1E39A
loc_1E2DE:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 26
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
mov eax, [rax+rcx*4]
jmp short loc_1E369
loc_1E2F2:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 29
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
mov rsi, [rax+rcx*8]
call JS_NewBigUint64
loc_1E30A:
mov [rbx], rax
jmp loc_1E39D
loc_1E312:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 27
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
movsxd rax, dword ptr [rax+rcx*4]
xor ecx, ecx
mov edx, eax
cvtsi2sd xmm0, rdx
test rax, rax
movq rsi, xmm0
cmovns rsi, rax
push 7
pop rdx
cmovns rdx, rcx
mov [rbx], rsi
jmp short loc_1E39D
loc_1E346:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 24
jbe short def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
movsx rax, word ptr [rax+rcx*2]
loc_1E356:
mov eax, eax
jmp short loc_1E369
loc_1E35A:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 25
jbe short def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
movzx eax, word ptr [rax+rcx*2]
loc_1E369:
mov [rbx], rax
xor edx, edx
jmp short loc_1E39D
loc_1E370:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 31
jbe short def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
cvtss2sd xmm0, dword ptr [rax+rcx*4]
jmp short loc_1E396
loc_1E382:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 30
jbe short def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
movzx edi, word ptr [rax+rcx*2]
call fromfp16
loc_1E396:
movsd qword ptr [rbx], xmm0
loc_1E39A:
push 7
pop rdx
loc_1E39D:
mov [rbx+8], rdx
push 1
pop rax
def_1E24A:
pop rbx; jumptable 000000000001E24A default case, cases 3-7,9-20
retn
| long long js_get_fast_array_element(long long a1, long long a2, unsigned int a3, double *a4)
{
long long result; // rax
long long v6; // rcx
long long v7; // rdx
_DWORD *v8; // rax
long long v9; // rdx
long long v10; // rax
long long v11; // rax
double v12; // rsi
double v13; // xmm0_8
result = 0LL;
switch ( *(_WORD *)(a2 + 6) )
{
case 2:
case 8:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v6 = *(_QWORD *)(a2 + 56);
v7 = 16LL * a3;
v8 = *(_DWORD **)(v6 + v7);
v9 = *(_QWORD *)(v6 + v7 + 8);
if ( (unsigned int)v9 >= 0xFFFFFFF7 )
++*v8;
goto LABEL_17;
}
break;
case 0x15:
case 0x17:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v10 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 56) + a3);
goto LABEL_29;
}
break;
case 0x16:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
LODWORD(v10) = *(char *)(*(_QWORD *)(a2 + 56) + a3);
goto LABEL_26;
}
break;
case 0x18:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
LODWORD(v10) = *(__int16 *)(*(_QWORD *)(a2 + 56) + 2LL * a3);
LABEL_26:
v10 = (unsigned int)v10;
goto LABEL_29;
}
break;
case 0x19:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v10 = *(unsigned __int16 *)(*(_QWORD *)(a2 + 56) + 2LL * a3);
goto LABEL_29;
}
break;
case 0x1A:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v10 = *(unsigned int *)(*(_QWORD *)(a2 + 56) + 4LL * a3);
LABEL_29:
*(_QWORD *)a4 = v10;
v9 = 0LL;
goto LABEL_36;
}
break;
case 0x1B:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v11 = *(int *)(*(_QWORD *)(a2 + 56) + 4LL * a3);
v12 = (double)*(int *)(*(_QWORD *)(a2 + 56) + 4LL * a3);
if ( v11 >= 0 )
v12 = *(double *)&v11;
v9 = 7LL;
if ( v11 >= 0 )
v9 = 0LL;
*a4 = v12;
goto LABEL_36;
}
break;
case 0x1C:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v8 = (_DWORD *)JS_NewBigInt64(a1, *(_QWORD *)(*(_QWORD *)(a2 + 56) + 8LL * a3));
goto LABEL_17;
}
break;
case 0x1D:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v8 = (_DWORD *)JS_NewBigUint64(a1, *(_QWORD *)(*(_QWORD *)(a2 + 56) + 8LL * a3));
LABEL_17:
*(_QWORD *)a4 = v8;
goto LABEL_36;
}
break;
case 0x1E:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v13 = fromfp16(*(unsigned __int16 *)(*(_QWORD *)(a2 + 56) + 2LL * a3));
goto LABEL_34;
}
break;
case 0x1F:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v13 = *(float *)(*(_QWORD *)(a2 + 56) + 4LL * a3);
LABEL_34:
*a4 = v13;
goto LABEL_35;
}
break;
case 0x20:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
*a4 = *(double *)(*(_QWORD *)(a2 + 56) + 8LL * a3);
LABEL_35:
v9 = 7LL;
LABEL_36:
*((_QWORD *)a4 + 1) = v9;
result = 1LL;
}
break;
default:
return result;
}
return result;
}
| js_get_fast_array_element:
PUSH RBX
MOV RBX,RCX
MOVZX ECX,word ptr [RSI + 0x6]
XOR EAX,EAX
ADD ECX,-0x2
CMP ECX,0x1e
JA 0x0011e3a4
LEA R8,[0x183544]
MOVSXD RCX,dword ptr [R8 + RCX*0x4]
ADD RCX,R8
switchD:
JMP RCX
caseD_2:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RCX,qword ptr [RSI + 0x38]
MOV EDX,EDX
SHL RDX,0x4
MOV RAX,qword ptr [RCX + RDX*0x1]
MOV RDX,qword ptr [RCX + RDX*0x1 + 0x8]
CMP EDX,-0x9
JC 0x0011e30a
INC dword ptr [RAX]
JMP 0x0011e30a
caseD_15:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
JMP 0x0011e369
caseD_16:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOVSX RAX,byte ptr [RAX + RCX*0x1]
JMP 0x0011e356
caseD_1c:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOV RSI,qword ptr [RAX + RCX*0x8]
CALL 0x00121d56
JMP 0x0011e30a
caseD_20:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBX],RAX
JMP 0x0011e39a
caseD_1a:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOV EAX,dword ptr [RAX + RCX*0x4]
JMP 0x0011e369
caseD_1d:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOV RSI,qword ptr [RAX + RCX*0x8]
CALL 0x00121dfa
LAB_0011e30a:
MOV qword ptr [RBX],RAX
JMP 0x0011e39d
caseD_1b:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOVSXD RAX,dword ptr [RAX + RCX*0x4]
XOR ECX,ECX
MOV EDX,EAX
CVTSI2SD XMM0,RDX
TEST RAX,RAX
MOVQ RSI,XMM0
CMOVNS RSI,RAX
PUSH 0x7
POP RDX
CMOVNS RDX,RCX
MOV qword ptr [RBX],RSI
JMP 0x0011e39d
caseD_18:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOVSX RAX,word ptr [RAX + RCX*0x2]
LAB_0011e356:
MOV EAX,EAX
JMP 0x0011e369
caseD_19:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOVZX EAX,word ptr [RAX + RCX*0x2]
LAB_0011e369:
MOV qword ptr [RBX],RAX
XOR EDX,EDX
JMP 0x0011e39d
caseD_1f:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
CVTSS2SD XMM0,dword ptr [RAX + RCX*0x4]
JMP 0x0011e396
caseD_1e:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOVZX EDI,word ptr [RAX + RCX*0x2]
CALL 0x00136177
LAB_0011e396:
MOVSD qword ptr [RBX],XMM0
LAB_0011e39a:
PUSH 0x7
POP RDX
LAB_0011e39d:
MOV qword ptr [RBX + 0x8],RDX
PUSH 0x1
POP RAX
caseD_3:
POP RBX
RET
|
int8 js_get_fast_array_element(int8 param_1,long param_2,uint param_3,double *param_4)
{
int *piVar1;
int1 auVar2 [16];
uint uVar3;
int8 uVar4;
double dVar5;
double dVar6;
double dVar7;
int1 auVar8 [16];
uVar4 = 0;
switch(*(int2 *)(param_2 + 6)) {
case 2:
case 8:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
piVar1 = *(int **)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 0x10);
uVar4 = *(int8 *)(*(long *)(param_2 + 0x38) + 8 + (ulong)param_3 * 0x10);
auVar2._8_8_ = uVar4;
auVar2._0_8_ = piVar1;
auVar8._8_8_ = uVar4;
auVar8._0_8_ = piVar1;
if (0xfffffff6 < (uint)uVar4) {
*piVar1 = *piVar1 + 1;
auVar8 = auVar2;
}
goto LAB_0011e30a;
default:
goto switchD_0011e24a_caseD_3;
case 0x15:
case 0x17:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
dVar7 = (double)(ulong)*(byte *)(*(long *)(param_2 + 0x38) + (ulong)param_3);
break;
case 0x16:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
uVar3 = (uint)*(char *)(*(long *)(param_2 + 0x38) + (ulong)param_3);
goto LAB_0011e356;
case 0x18:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
uVar3 = (uint)*(short *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 2);
LAB_0011e356:
dVar7 = (double)(ulong)uVar3;
break;
case 0x19:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
dVar7 = (double)(ulong)*(ushort *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 2);
break;
case 0x1a:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
dVar7 = (double)(ulong)*(uint *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 4);
break;
case 0x1b:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
uVar3 = *(uint *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 4);
dVar5 = (double)(long)(int)uVar3;
dVar6 = (double)uVar3;
if (-1 < (long)dVar5) {
dVar6 = dVar5;
}
dVar7 = 3.45845952088873e-323;
if (-1 < (long)dVar5) {
dVar7 = 0.0;
}
*param_4 = dVar6;
goto LAB_0011e39d;
case 0x1c:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
auVar8 = JS_NewBigInt64(param_1,*(int8 *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 8))
;
goto LAB_0011e30a;
case 0x1d:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
auVar8 = JS_NewBigUint64(param_1,*(int8 *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 8)
);
LAB_0011e30a:
dVar7 = auVar8._8_8_;
*param_4 = auVar8._0_8_;
goto LAB_0011e39d;
case 0x1e:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
dVar7 = (double)fromfp16(*(int2 *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 2));
goto LAB_0011e396;
case 0x1f:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
dVar7 = (double)*(float *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 4);
LAB_0011e396:
*param_4 = dVar7;
LAB_0011e39a:
dVar7 = 3.45845952088873e-323;
goto LAB_0011e39d;
case 0x20:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
*param_4 = *(double *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 8);
goto LAB_0011e39a;
}
*param_4 = dVar7;
dVar7 = 0.0;
LAB_0011e39d:
param_4[1] = dVar7;
uVar4 = 1;
switchD_0011e24a_caseD_3:
return uVar4;
}
| |
38,472 | 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>::basic_json(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> const&) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | basic_json(const basic_json& other)
: json_base_class_t(other)
#if JSON_DIAGNOSTIC_POSITIONS
, start_position(other.start_position)
, end_position(other.end_position)
#endif
{
m_data.m_type = other.m_data.m_type;
// check of passed value is valid
other.assert_invariant();
switch (m_data.m_type)
{
case value_t::object:
{
m_data.m_value = *other.m_data.m_value.object;
break;
}
case value_t::array:
{
m_data.m_value = *other.m_data.m_value.array;
break;
}
case value_t::string:
{
m_data.m_value = *other.m_data.m_value.string;
break;
}
case value_t::boolean:
{
m_data.m_value = other.m_data.m_value.boolean;
break;
}
case value_t::number_integer:
{
m_data.m_value = other.m_data.m_value.number_integer;
break;
}
case value_t::number_unsigned:
{
m_data.m_value = other.m_data.m_value.number_unsigned;
break;
}
case value_t::number_float:
{
m_data.m_value = other.m_data.m_value.number_float;
break;
}
case value_t::binary:
{
m_data.m_value = *other.m_data.m_value.binary;
break;
}
case value_t::null:
case value_t::discarded:
default:
break;
}
set_parents();
assert_invariant();
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(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> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movb (%rsi), %al
movb %al, (%rdi)
movq %rsi, %rdi
movl $0x1, %esi
callq 0x11430
movzbl (%rbx), %eax
decl %eax
cmpl $0x7, %eax
ja 0x1cad2
leaq 0x4b4e(%rip), %rcx # 0x215dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r14), %rax
jmp 0x1cace
movq 0x8(%r14), %rdi
callq 0x11070
jmp 0x1cace
movq 0x8(%r14), %rdi
callq 0x12160
jmp 0x1cace
movzbl 0x8(%r14), %eax
jmp 0x1cace
movq 0x8(%r14), %rdi
callq 0x11d40
jmp 0x1cace
movq 0x8(%r14), %rdi
callq 0x11d30
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11430
jmp 0x1caec
jmp 0x1caec
jmp 0x1caec
movq %rax, %r14
movq %rbx, %rdi
callq 0x11e20
movq %r14, %rdi
callq 0x11fe0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov al, [rsi]
mov [rdi], al
mov rdi, rsi
mov esi, 1
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; 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>::assert_invariant(bool)
movzx eax, byte ptr [rbx]
dec eax; switch 8 cases
cmp eax, 7
ja short def_1CA95; jumptable 000000000001CA95 default case
lea rcx, jpt_1CA95
movsxd rax, ds:(jpt_1CA95 - 215DCh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1CA97:
mov rax, [r14+8]; jumptable 000000000001CA95 cases 5-7
jmp short loc_1CACE
loc_1CA9D:
mov rdi, [r14+8]; jumptable 000000000001CA95 case 3
call __ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRKS9_EEEPT_DpOT0_; 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>::create<std::string,std::string const&>(std::string const&)
jmp short loc_1CACE
loc_1CAA8:
mov rdi, [r14+8]; jumptable 000000000001CA95 case 8
call __ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJRKSG_EEEPT_DpOT0_; 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>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&>(nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&)
jmp short loc_1CACE
loc_1CAB3:
movzx eax, byte ptr [r14+8]; jumptable 000000000001CA95 case 4
jmp short loc_1CACE
loc_1CABA:
mov rdi, [r14+8]; jumptable 000000000001CA95 case 1
call __ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEJRKSL_EEEPT_DpOT0_; 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>::create<std::map<std::string,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::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&>(std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)
jmp short loc_1CACE
loc_1CAC5:
mov rdi, [r14+8]; jumptable 000000000001CA95 case 2
call __ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJRKSG_EEEPT_DpOT0_; 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>::create<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::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>> const&>(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>> const&)
loc_1CACE:
mov [rbx+8], rax
def_1CA95:
mov rdi, rbx; jumptable 000000000001CA95 default case
mov esi, 1
add rsp, 8
pop rbx
pop r14
jmp __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; 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>::assert_invariant(bool)
jmp short loc_1CAEC
jmp short loc_1CAEC
jmp short $+2
loc_1CAEC:
mov r14, rax
mov rdi, rbx
call __ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
long long a1,
long long a2)
{
long long v2; // rax
*(_OWORD *)a1 = 0LL;
*(_BYTE *)a1 = *(_BYTE *)a2;
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>::assert_invariant(
a2,
1LL);
switch ( *(_BYTE *)a1 )
{
case 1:
v2 = 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>::create<std::map<std::string,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::map<std::string,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>> const&>(*(_QWORD *)(a2 + 8));
goto LABEL_8;
case 2:
v2 = 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>::create<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::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>> const&>(*(_QWORD *)(a2 + 8));
goto LABEL_8;
case 3:
v2 = 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>::create<std::string,std::string const&>(*(_QWORD *)(a2 + 8));
goto LABEL_8;
case 4:
v2 = *(unsigned __int8 *)(a2 + 8);
goto LABEL_8;
case 5:
case 6:
case 7:
v2 = *(_QWORD *)(a2 + 8);
goto LABEL_8;
case 8:
v2 = 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>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>> const&>(*(_QWORD *)(a2 + 8));
LABEL_8:
*(_QWORD *)(a1 + 8) = v2;
break;
default:
return 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>::assert_invariant(
a1,
1LL);
}
return 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>::assert_invariant(
a1,
1LL);
}
| basic_json:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV AL,byte ptr [RSI]
MOV byte ptr [RDI],AL
MOV RDI,RSI
MOV ESI,0x1
CALL 0x00111430
MOVZX EAX,byte ptr [RBX]
DEC EAX
CMP EAX,0x7
JA 0x0011cad2
LEA RCX,[0x1215dc]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOV RAX,qword ptr [R14 + 0x8]
JMP 0x0011cace
caseD_3:
MOV RDI,qword ptr [R14 + 0x8]
LAB_0011caa1:
CALL 0x00111070
JMP 0x0011cace
caseD_8:
MOV RDI,qword ptr [R14 + 0x8]
LAB_0011caac:
CALL 0x00112160
JMP 0x0011cace
caseD_4:
MOVZX EAX,byte ptr [R14 + 0x8]
JMP 0x0011cace
caseD_1:
MOV RDI,qword ptr [R14 + 0x8]
LAB_0011cabe:
CALL 0x00111d40
JMP 0x0011cace
caseD_2:
MOV RDI,qword ptr [R14 + 0x8]
LAB_0011cac9:
CALL 0x00111d30
LAB_0011cace:
MOV qword ptr [RBX + 0x8],RAX
default:
MOV RDI,RBX
MOV ESI,0x1
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00111430
|
/* 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>::basic_json(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> const&) */
void __thiscall
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>
::basic_json(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,basic_json *param_1)
{
string *psVar1;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*this = (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>
)*param_1;
assert_invariant(SUB81(param_1,0));
switch(*this) {
case (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>
)0x1:
/* try { // try from 0011cabe to 0011cac2 has its CatchHandler @ 0011cae8 */
psVar1 = (string *)
create<std::map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,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::map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,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>>>>const&>
(*(map **)(param_1 + 8));
break;
case (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>
)0x2:
/* try { // try from 0011cac9 to 0011cacd has its CatchHandler @ 0011cae6 */
psVar1 = (string *)
create<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>>>,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>>>const&>
(*(vector **)(param_1 + 8));
break;
case (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>
)0x3:
/* try { // try from 0011caa1 to 0011caa5 has its CatchHandler @ 0011caec */
psVar1 = create<std::__cxx11::string,std::__cxx11::string_const&>(*(string **)(param_1 + 8));
break;
case (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>
)0x4:
psVar1 = (string *)(ulong)(byte)param_1[8];
break;
case (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>
)0x5:
case (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>
)0x6:
case (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>
)0x7:
psVar1 = *(string **)(param_1 + 8);
break;
case (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>
)0x8:
/* try { // try from 0011caac to 0011cab0 has its CatchHandler @ 0011caea */
psVar1 = (string *)
create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>const&>
(*(byte_container_with_subtype **)(param_1 + 8));
break;
default:
goto switchD_0011ca95_default;
}
*(string **)(this + 8) = psVar1;
switchD_0011ca95_default:
assert_invariant(SUB81(this,0));
return;
}
| |
38,473 | stbi__pic_test_core | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static int stbi__pic_test_core(stbi__context *s)
{
int i;
if (!stbi__pic_is4(s,"\x53\x80\xF6\x34"))
return 0;
for(i=0;i<84;++i)
stbi__get8(s);
if (!stbi__pic_is4(s,"PICT"))
return 0;
return 1;
} | O0 | c | stbi__pic_test_core:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x203f5(%rip), %rsi # 0x90b6c
callq 0x707e0
cmpl $0x0, %eax
jne 0x7078a
movl $0x0, -0x4(%rbp)
jmp 0x707d0
movl $0x0, -0x14(%rbp)
cmpl $0x54, -0x14(%rbp)
jge 0x707ab
movq -0x10(%rbp), %rdi
callq 0x6a1b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x70791
movq -0x10(%rbp), %rdi
leaq 0x203bb(%rip), %rsi # 0x90b71
callq 0x707e0
cmpl $0x0, %eax
jne 0x707c9
movl $0x0, -0x4(%rbp)
jmp 0x707d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| stbi__pic_test_core:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
lea rsi, unk_90B6C
call stbi__pic_is4
cmp eax, 0
jnz short loc_7078A
mov [rbp+var_4], 0
jmp short loc_707D0
loc_7078A:
mov [rbp+var_14], 0
loc_70791:
cmp [rbp+var_14], 54h ; 'T'
jge short loc_707AB
mov rdi, [rbp+var_10]
call stbi__get8
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_70791
loc_707AB:
mov rdi, [rbp+var_10]
lea rsi, aPict; "PICT"
call stbi__pic_is4
cmp eax, 0
jnz short loc_707C9
mov [rbp+var_4], 0
jmp short loc_707D0
loc_707C9:
mov [rbp+var_4], 1
loc_707D0:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| _BOOL8 stbi__pic_test_core(long long a1)
{
int i; // [rsp+Ch] [rbp-14h]
if ( (unsigned int)stbi__pic_is4(a1, &unk_90B6C) )
{
for ( i = 0; i < 84; ++i )
stbi__get8(a1);
return stbi__pic_is4(a1, "PICT") != 0;
}
else
{
return 0;
}
}
| stbi__pic_test_core:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x190b6c]
CALL 0x001707e0
CMP EAX,0x0
JNZ 0x0017078a
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001707d0
LAB_0017078a:
MOV dword ptr [RBP + -0x14],0x0
LAB_00170791:
CMP dword ptr [RBP + -0x14],0x54
JGE 0x001707ab
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0016a1b0
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00170791
LAB_001707ab:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x190b71]
CALL 0x001707e0
CMP EAX,0x0
JNZ 0x001707c9
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001707d0
LAB_001707c9:
MOV dword ptr [RBP + -0x4],0x1
LAB_001707d0:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 stbi__pic_test_core(int8 param_1)
{
int iVar1;
int local_1c;
int4 local_c;
iVar1 = stbi__pic_is4(param_1,&DAT_00190b6c);
if (iVar1 == 0) {
local_c = 0;
}
else {
for (local_1c = 0; local_1c < 0x54; local_1c = local_1c + 1) {
stbi__get8(param_1);
}
iVar1 = stbi__pic_is4(param_1,&DAT_00190b71);
if (iVar1 == 0) {
local_c = 0;
}
else {
local_c = 1;
}
}
return local_c;
}
| |
38,474 | my_wc_mb_latin1 | eloqsql/strings/ctype-latin1.c | static
int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc,
uchar *str,
uchar *end __attribute__((unused)))
{
const uchar *pl;
if (str >= end)
return MY_CS_TOOSMALL;
if (wc > 0xFFFF)
return MY_CS_ILUNI;
pl= uni_to_cs[wc >> 8];
str[0]= pl ? pl[wc & 0xFF] : '\0';
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
} | O3 | c | my_wc_mb_latin1:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x39e68
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x39e68
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rax
shrq $0x8, %rax
leaq 0x2b347f(%rip), %rcx # 0x2ed2c0
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x39e53
movzbl %sil, %ecx
movb (%rax,%rcx), %al
jmp 0x39e55
xorl %eax, %eax
movb %al, (%rdx)
testb %al, %al
setne %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movzbl %cl, %eax
popq %rbp
retq
| my_wc_mb_latin1:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_39E68
xor eax, eax
cmp rsi, 0FFFFh
ja short locret_39E68
push rbp
mov rbp, rsp
mov rax, rsi
shr rax, 8
lea rcx, uni_to_cs
mov rax, [rcx+rax*8]
test rax, rax
jz short loc_39E53
movzx ecx, sil
mov al, [rax+rcx]
jmp short loc_39E55
loc_39E53:
xor eax, eax
loc_39E55:
mov [rdx], al
test al, al
setnz al
test rsi, rsi
setz cl
or cl, al
movzx eax, cl
pop rbp
locret_39E68:
retn
| long long my_wc_mb_latin1(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rax
char v6; // al
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
v5 = (long long)*(&uni_to_cs + (a2 >> 8));
if ( v5 )
v6 = *(_BYTE *)(v5 + (unsigned __int8)a2);
else
v6 = 0;
*a3 = v6;
return (v6 != 0) | (unsigned __int8)(a2 == 0);
}
}
return result;
}
| my_wc_mb_latin1:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00139e68
XOR EAX,EAX
CMP RSI,0xffff
JA 0x00139e68
PUSH RBP
MOV RBP,RSP
MOV RAX,RSI
SHR RAX,0x8
LEA RCX,[0x3ed2c0]
MOV RAX,qword ptr [RCX + RAX*0x8]
TEST RAX,RAX
JZ 0x00139e53
MOVZX ECX,SIL
MOV AL,byte ptr [RAX + RCX*0x1]
JMP 0x00139e55
LAB_00139e53:
XOR EAX,EAX
LAB_00139e55:
MOV byte ptr [RDX],AL
TEST AL,AL
SETNZ AL
TEST RSI,RSI
SETZ CL
OR CL,AL
MOVZX EAX,CL
POP RBP
LAB_00139e68:
RET
|
ulong my_wc_mb_latin1(int8 param_1,ulong param_2,char *param_3,char *param_4)
{
char cVar1;
ulong uVar2;
uVar2 = 0xffffff9b;
if ((param_3 < param_4) && (uVar2 = 0, param_2 < 0x10000)) {
if (*(long *)(uni_to_cs + (param_2 >> 8) * 8) == 0) {
cVar1 = '\0';
}
else {
cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8) * 8) + (param_2 & 0xff));
}
*param_3 = cVar1;
uVar2 = (ulong)(param_2 == 0 || cVar1 != '\0');
}
return uVar2;
}
| |
38,475 | MemoryManager::addPage(unsigned int) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MemoryManager.cpp | bool MemoryManager::addPage(uint32_t addr) {
uint32_t i = this->getFirstEntryId(addr);
uint32_t j = this->getSecondEntryId(addr);
if (this->memory[i] == nullptr) {
this->memory[i] = new uint8_t *[1024];
memset(this->memory[i], 0, sizeof(uint8_t *) * 1024);
}
if (this->memory[i][j] == nullptr) {
this->memory[i][j] = new uint8_t[4096];
memset(this->memory[i][j], 0, 4096);
} else {
dbgprintf("Addr 0x%x already exists and do not need an addPage()!\n", addr);
return false;
}
return true;
} | O0 | cpp | MemoryManager::addPage(unsigned int):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
movl 0x14(%rsp), %esi
callq 0x33d0
movq (%rsp), %rdi
movl %eax, 0x10(%rsp)
movl 0x14(%rsp), %esi
callq 0x33f0
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0xc(%rsp)
movl 0x10(%rsp), %ecx
cmpq $0x0, (%rax,%rcx,8)
jne 0x3342
movl $0x2000, %edi # imm = 0x2000
callq 0x2030
movq %rax, %rdx
movq (%rsp), %rax
movl 0x10(%rsp), %ecx
movq %rdx, (%rax,%rcx,8)
movl 0x10(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
xorl %esi, %esi
movl $0x2000, %edx # imm = 0x2000
callq 0x2110
movq (%rsp), %rax
movl 0x10(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movl 0xc(%rsp), %ecx
cmpq $0x0, (%rax,%rcx,8)
jne 0x3398
movl $0x1000, %edi # imm = 0x1000
callq 0x2030
movq %rax, %rsi
movq (%rsp), %rax
movl 0x10(%rsp), %ecx
movq (%rax,%rcx,8), %rcx
movl 0xc(%rsp), %edx
movq %rsi, (%rcx,%rdx,8)
movl 0x10(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movl 0xc(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
xorl %esi, %esi
movl $0x1000, %edx # imm = 0x1000
callq 0x2110
jmp 0x33b1
movl 0x14(%rsp), %esi
leaq 0x4d5f(%rip), %rdi # 0x8102
movb $0x0, %al
callq 0x4180
movb $0x0, 0x27(%rsp)
jmp 0x33b6
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN13MemoryManager7addPageEj:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_14], esi
mov rdi, [rsp+28h+var_10]; this
mov [rsp+28h+var_28], rdi
mov esi, [rsp+28h+var_14]; unsigned int
call _ZN13MemoryManager15getFirstEntryIdEj; MemoryManager::getFirstEntryId(uint)
mov rdi, [rsp+28h+var_28]; this
mov [rsp+28h+var_18], eax
mov esi, [rsp+28h+var_14]; unsigned int
call _ZN13MemoryManager16getSecondEntryIdEj; MemoryManager::getSecondEntryId(uint)
mov ecx, eax
mov rax, [rsp+28h+var_28]
mov [rsp+28h+var_1C], ecx
mov ecx, [rsp+28h+var_18]
cmp qword ptr [rax+rcx*8], 0
jnz short loc_3342
mov edi, 2000h; unsigned __int64
call __Znam; operator new[](ulong)
mov rdx, rax
mov rax, [rsp+28h+var_28]
mov ecx, [rsp+28h+var_18]
mov [rax+rcx*8], rdx
mov ecx, [rsp+28h+var_18]
mov rdi, [rax+rcx*8]
xor esi, esi
mov edx, 2000h
call _memset
loc_3342:
mov rax, [rsp+28h+var_28]
mov ecx, [rsp+28h+var_18]
mov rax, [rax+rcx*8]
mov ecx, [rsp+28h+var_1C]
cmp qword ptr [rax+rcx*8], 0
jnz short loc_3398
mov edi, 1000h; unsigned __int64
call __Znam; operator new[](ulong)
mov rsi, rax
mov rax, [rsp+28h+var_28]
mov ecx, [rsp+28h+var_18]
mov rcx, [rax+rcx*8]
mov edx, [rsp+28h+var_1C]
mov [rcx+rdx*8], rsi
mov ecx, [rsp+28h+var_18]
mov rax, [rax+rcx*8]
mov ecx, [rsp+28h+var_1C]
mov rdi, [rax+rcx*8]
xor esi, esi
mov edx, 1000h
call _memset
jmp short loc_33B1
loc_3398:
mov esi, [rsp+28h+var_14]
lea rdi, aAddr0xXAlready; "Addr 0x%x already exists and do not nee"...
mov al, 0
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
mov [rsp+28h+var_1], 0
jmp short loc_33B6
loc_33B1:
mov [rsp+28h+var_1], 1
loc_33B6:
mov al, [rsp+28h+var_1]
and al, 1
add rsp, 28h
retn
| char MemoryManager::addPage(MemoryManager *this, unsigned int a2)
{
unsigned int SecondEntryId; // [rsp+Ch] [rbp-1Ch]
unsigned int FirstEntryId; // [rsp+10h] [rbp-18h]
FirstEntryId = MemoryManager::getFirstEntryId(this, a2);
SecondEntryId = MemoryManager::getSecondEntryId(this, a2);
if ( !*((_QWORD *)this + FirstEntryId) )
{
*((_QWORD *)this + FirstEntryId) = operator new[](0x2000uLL);
memset(*((_QWORD *)this + FirstEntryId), 0LL, 0x2000LL);
}
if ( *(_QWORD *)(*((_QWORD *)this + FirstEntryId) + 8LL * SecondEntryId) )
{
dbgprintf("Addr 0x%x already exists and do not need an addPage()!\n", a2);
return 0;
}
else
{
*(_QWORD *)(*((_QWORD *)this + FirstEntryId) + 8LL * SecondEntryId) = operator new[](0x1000uLL);
memset(*(_QWORD *)(*((_QWORD *)this + FirstEntryId) + 8LL * SecondEntryId), 0LL, 4096LL);
return 1;
}
}
| addPage:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RDI
MOV ESI,dword ptr [RSP + 0x14]
CALL 0x001033d0
MOV RDI,qword ptr [RSP]
MOV dword ptr [RSP + 0x10],EAX
MOV ESI,dword ptr [RSP + 0x14]
CALL 0x001033f0
MOV ECX,EAX
MOV RAX,qword ptr [RSP]
MOV dword ptr [RSP + 0xc],ECX
MOV ECX,dword ptr [RSP + 0x10]
CMP qword ptr [RAX + RCX*0x8],0x0
JNZ 0x00103342
MOV EDI,0x2000
CALL 0x00102030
MOV RDX,RAX
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RSP + 0x10]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV ECX,dword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + RCX*0x8]
XOR ESI,ESI
MOV EDX,0x2000
CALL 0x00102110
LAB_00103342:
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RSP + 0xc]
CMP qword ptr [RAX + RCX*0x8],0x0
JNZ 0x00103398
MOV EDI,0x1000
CALL 0x00102030
MOV RSI,RAX
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RSP + 0x10]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV EDX,dword ptr [RSP + 0xc]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV ECX,dword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RSP + 0xc]
MOV RDI,qword ptr [RAX + RCX*0x8]
XOR ESI,ESI
MOV EDX,0x1000
CALL 0x00102110
JMP 0x001033b1
LAB_00103398:
MOV ESI,dword ptr [RSP + 0x14]
LEA RDI,[0x108102]
MOV AL,0x0
CALL 0x00104180
MOV byte ptr [RSP + 0x27],0x0
JMP 0x001033b6
LAB_001033b1:
MOV byte ptr [RSP + 0x27],0x1
LAB_001033b6:
MOV AL,byte ptr [RSP + 0x27]
AND AL,0x1
ADD RSP,0x28
RET
|
/* MemoryManager::addPage(unsigned int) */
bool __thiscall MemoryManager::addPage(MemoryManager *this,uint param_1)
{
uint uVar1;
uint uVar2;
void *pvVar3;
bool local_1;
uVar1 = getFirstEntryId(this,param_1);
uVar2 = getSecondEntryId(this,param_1);
if (*(long *)(this + (ulong)uVar1 * 8) == 0) {
pvVar3 = operator_new__(0x2000);
*(void **)(this + (ulong)uVar1 * 8) = pvVar3;
memset(*(void **)(this + (ulong)uVar1 * 8),0,0x2000);
}
local_1 = *(long *)(*(long *)(this + (ulong)uVar1 * 8) + (ulong)uVar2 * 8) != 0;
if (local_1) {
dbgprintf("Addr 0x%x already exists and do not need an addPage()!\n",(ulong)param_1);
}
else {
pvVar3 = operator_new__(0x1000);
*(void **)(*(long *)(this + (ulong)uVar1 * 8) + (ulong)uVar2 * 8) = pvVar3;
memset(*(void **)(*(long *)(this + (ulong)uVar1 * 8) + (ulong)uVar2 * 8),0,0x1000);
}
local_1 = !local_1;
return local_1;
}
| |
38,476 | MemoryManager::addPage(unsigned int) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MemoryManager.cpp | bool MemoryManager::addPage(uint32_t addr) {
uint32_t i = this->getFirstEntryId(addr);
uint32_t j = this->getSecondEntryId(addr);
if (this->memory[i] == nullptr) {
this->memory[i] = new uint8_t *[1024];
memset(this->memory[i], 0, sizeof(uint8_t *) * 1024);
}
if (this->memory[i][j] == nullptr) {
this->memory[i][j] = new uint8_t[4096];
memset(this->memory[i][j], 0, 4096);
} else {
dbgprintf("Addr 0x%x already exists and do not need an addPage()!\n", addr);
return false;
}
return true;
} | O1 | cpp | MemoryManager::addPage(unsigned int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %r14d
shrl $0x16, %r14d
movl %esi, %r15d
shrl $0xc, %r15d
andl $0x3ff, %r15d # imm = 0x3FF
cmpq $0x0, (%rdi,%r14,8)
jne 0x2ddd
movl $0x2000, %edi # imm = 0x2000
callq 0x2030
movq %rax, (%rbx,%r14,8)
movl $0x2000, %edx # imm = 0x2000
movq %rax, %rdi
xorl %esi, %esi
callq 0x2130
movq (%rbx,%r14,8), %r13
movl %r15d, %r12d
movq (%r13,%r12,8), %r15
testq %r15, %r15
jne 0x2e2a
movl $0x1000, %edi # imm = 0x1000
callq 0x2030
shll $0x3, %r12d
movq %rax, (%r13,%r12)
movq (%rbx,%r14,8), %rax
movq (%rax,%r12), %rdi
movl $0x1000, %edx # imm = 0x1000
xorl %esi, %esi
callq 0x2130
testq %r15, %r15
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x230b(%rip), %rdi # 0x513c
movl %ebp, %esi
xorl %eax, %eax
callq 0x2330
jmp 0x2e15
| _ZN13MemoryManager7addPageEj:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, esi
mov rbx, rdi
mov r14d, esi
shr r14d, 16h
mov r15d, esi
shr r15d, 0Ch
and r15d, 3FFh
cmp qword ptr [rdi+r14*8], 0
jnz short loc_2DDD
mov edi, 2000h; unsigned __int64
call __Znam; operator new[](ulong)
mov [rbx+r14*8], rax
mov edx, 2000h
mov rdi, rax
xor esi, esi
call _memset
loc_2DDD:
mov r13, [rbx+r14*8]
mov r12d, r15d
mov r15, [r13+r12*8+0]
test r15, r15
jnz short loc_2E2A
mov edi, 1000h; unsigned __int64
call __Znam; operator new[](ulong)
shl r12d, 3
mov [r13+r12+0], rax
mov rax, [rbx+r14*8]
mov rdi, [rax+r12]
mov edx, 1000h
xor esi, esi
call _memset
loc_2E15:
test r15, r15
setz al
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2E2A:
lea rdi, aAddr0xXAlready; "Addr 0x%x already exists and do not nee"...
mov esi, ebp
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
jmp short loc_2E15
| bool MemoryManager::addPage(
MemoryManager *this,
unsigned int a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
long long v15; // r14
long long v16; // rax
long long v17; // r13
long long v18; // r15
long long v19; // r12
char v21; // [rsp-8h] [rbp-38h]
v21 = v14;
v15 = a2 >> 22;
if ( !*((_QWORD *)this + v15) )
{
v16 = operator new[](0x2000uLL);
*((_QWORD *)this + v15) = v16;
memset(v16, 0LL, 0x2000LL);
}
v17 = *((_QWORD *)this + v15);
v18 = *(_QWORD *)(v17 + 8LL * ((a2 >> 12) & 0x3FF));
if ( v18 )
{
dbgprintf(
"Addr 0x%x already exists and do not need an addPage()!\n",
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v21);
}
else
{
v19 = 8 * ((a2 >> 12) & 0x3FF);
*(_QWORD *)(v17 + v19) = operator new[](0x1000uLL);
memset(*(_QWORD *)(*((_QWORD *)this + v15) + v19), 0LL, 4096LL);
}
return v18 == 0;
}
| addPage:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
MOV R14D,ESI
SHR R14D,0x16
MOV R15D,ESI
SHR R15D,0xc
AND R15D,0x3ff
CMP qword ptr [RDI + R14*0x8],0x0
JNZ 0x00102ddd
MOV EDI,0x2000
CALL 0x00102030
MOV qword ptr [RBX + R14*0x8],RAX
MOV EDX,0x2000
MOV RDI,RAX
XOR ESI,ESI
CALL 0x00102130
LAB_00102ddd:
MOV R13,qword ptr [RBX + R14*0x8]
MOV R12D,R15D
MOV R15,qword ptr [R13 + R12*0x8]
TEST R15,R15
JNZ 0x00102e2a
MOV EDI,0x1000
CALL 0x00102030
SHL R12D,0x3
MOV qword ptr [R13 + R12*0x1],RAX
MOV RAX,qword ptr [RBX + R14*0x8]
MOV RDI,qword ptr [RAX + R12*0x1]
MOV EDX,0x1000
XOR ESI,ESI
CALL 0x00102130
LAB_00102e15:
TEST R15,R15
SETZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00102e2a:
LEA RDI,[0x10513c]
MOV ESI,EBP
XOR EAX,EAX
CALL 0x00102330
JMP 0x00102e15
|
/* MemoryManager::addPage(unsigned int) */
bool __thiscall MemoryManager::addPage(MemoryManager *this,uint param_1)
{
long lVar1;
long lVar2;
void *pvVar3;
ulong uVar4;
ulong uVar5;
uint uVar6;
uVar5 = (ulong)(param_1 >> 0x16);
uVar6 = param_1 >> 0xc & 0x3ff;
if (*(long *)(this + uVar5 * 8) == 0) {
pvVar3 = operator_new__(0x2000);
*(void **)(this + uVar5 * 8) = pvVar3;
memset(pvVar3,0,0x2000);
}
lVar1 = *(long *)(this + uVar5 * 8);
lVar2 = *(long *)(lVar1 + (ulong)uVar6 * 8);
if (lVar2 == 0) {
pvVar3 = operator_new__(0x1000);
uVar4 = (ulong)(uVar6 << 3);
*(void **)(lVar1 + uVar4) = pvVar3;
memset(*(void **)(*(long *)(this + uVar5 * 8) + uVar4),0,0x1000);
}
else {
dbgprintf("Addr 0x%x already exists and do not need an addPage()!\n",param_1);
}
return lVar2 == 0;
}
| |
38,477 | MemoryManager::addPage(unsigned int) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MemoryManager.cpp | bool MemoryManager::addPage(uint32_t addr) {
uint32_t i = this->getFirstEntryId(addr);
uint32_t j = this->getSecondEntryId(addr);
if (this->memory[i] == nullptr) {
this->memory[i] = new uint8_t *[1024];
memset(this->memory[i], 0, sizeof(uint8_t *) * 1024);
}
if (this->memory[i][j] == nullptr) {
this->memory[i][j] = new uint8_t[4096];
memset(this->memory[i][j], 0, 4096);
} else {
dbgprintf("Addr 0x%x already exists and do not need an addPage()!\n", addr);
return false;
}
return true;
} | O3 | cpp | MemoryManager::addPage(unsigned int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %r15d
shrl $0x16, %r15d
movl %esi, %r12d
shrl $0xc, %r12d
andl $0x3ff, %r12d # imm = 0x3FF
movq (%rdi,%r15,8), %r14
testq %r14, %r14
jne 0x2de2
movl $0x2000, %edi # imm = 0x2000
callq 0x2030
movq %rax, %r14
movq %rax, (%rbx,%r15,8)
movl $0x2000, %edx # imm = 0x2000
movq %rax, %rdi
xorl %esi, %esi
callq 0x2130
movl %r12d, %r13d
movq (%r14,%r13,8), %r12
testq %r12, %r12
jne 0x2e29
movl $0x1000, %edi # imm = 0x1000
callq 0x2030
shll $0x3, %r13d
movq %rax, (%r14,%r13)
movq (%rbx,%r15,8), %rax
movq (%rax,%r13), %rdi
movl $0x1000, %edx # imm = 0x1000
xorl %esi, %esi
callq 0x2130
testq %r12, %r12
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x230c(%rip), %rdi # 0x513c
movl %ebp, %esi
xorl %eax, %eax
callq 0x2330
jmp 0x2e14
nop
| _ZN13MemoryManager7addPageEj:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, esi
mov rbx, rdi
mov r15d, esi
shr r15d, 16h
mov r12d, esi
shr r12d, 0Ch
and r12d, 3FFh
mov r14, [rdi+r15*8]
test r14, r14
jnz short loc_2DE2
mov edi, 2000h; unsigned __int64
call __Znam; operator new[](ulong)
mov r14, rax
mov [rbx+r15*8], rax
mov edx, 2000h
mov rdi, rax
xor esi, esi
call _memset
loc_2DE2:
mov r13d, r12d
mov r12, [r14+r13*8]
test r12, r12
jnz short loc_2E29
mov edi, 1000h; unsigned __int64
call __Znam; operator new[](ulong)
shl r13d, 3
mov [r14+r13], rax
mov rax, [rbx+r15*8]
mov rdi, [rax+r13]
mov edx, 1000h
xor esi, esi
call _memset
loc_2E14:
test r12, r12
setz al
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2E29:
lea rdi, aAddr0xXAlready; "Addr 0x%x already exists and do not nee"...
mov esi, ebp
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
jmp short loc_2E14
| bool MemoryManager::addPage(
MemoryManager *this,
unsigned int a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
long long v15; // r15
long long v16; // r14
long long v17; // r12
long long v18; // r13
char v20; // [rsp-8h] [rbp-38h]
v20 = v14;
v15 = a2 >> 22;
v16 = *((_QWORD *)this + v15);
if ( !v16 )
{
v16 = operator new[](0x2000uLL);
*((_QWORD *)this + v15) = v16;
memset(v16, 0LL, 0x2000LL);
}
v17 = *(_QWORD *)(v16 + 8LL * ((a2 >> 12) & 0x3FF));
if ( v17 )
{
dbgprintf(
"Addr 0x%x already exists and do not need an addPage()!\n",
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
}
else
{
v18 = 8 * ((a2 >> 12) & 0x3FF);
*(_QWORD *)(v16 + v18) = operator new[](0x1000uLL);
memset(*(_QWORD *)(*((_QWORD *)this + v15) + v18), 0LL, 4096LL);
}
return v17 == 0;
}
| addPage:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
MOV R15D,ESI
SHR R15D,0x16
MOV R12D,ESI
SHR R12D,0xc
AND R12D,0x3ff
MOV R14,qword ptr [RDI + R15*0x8]
TEST R14,R14
JNZ 0x00102de2
MOV EDI,0x2000
CALL 0x00102030
MOV R14,RAX
MOV qword ptr [RBX + R15*0x8],RAX
MOV EDX,0x2000
MOV RDI,RAX
XOR ESI,ESI
CALL 0x00102130
LAB_00102de2:
MOV R13D,R12D
MOV R12,qword ptr [R14 + R13*0x8]
TEST R12,R12
JNZ 0x00102e29
MOV EDI,0x1000
CALL 0x00102030
SHL R13D,0x3
MOV qword ptr [R14 + R13*0x1],RAX
MOV RAX,qword ptr [RBX + R15*0x8]
MOV RDI,qword ptr [RAX + R13*0x1]
MOV EDX,0x1000
XOR ESI,ESI
CALL 0x00102130
LAB_00102e14:
TEST R12,R12
SETZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00102e29:
LEA RDI,[0x10513c]
MOV ESI,EBP
XOR EAX,EAX
CALL 0x00102330
JMP 0x00102e14
|
/* MemoryManager::addPage(unsigned int) */
bool __thiscall MemoryManager::addPage(MemoryManager *this,uint param_1)
{
long lVar1;
void *__s;
void *pvVar2;
uint uVar3;
ulong uVar4;
ulong uVar5;
uVar5 = (ulong)(param_1 >> 0x16);
uVar3 = param_1 >> 0xc & 0x3ff;
__s = *(void **)(this + uVar5 * 8);
if (__s == (void *)0x0) {
__s = operator_new__(0x2000);
*(void **)(this + uVar5 * 8) = __s;
memset(__s,0,0x2000);
}
lVar1 = *(long *)((long)__s + (ulong)uVar3 * 8);
if (lVar1 == 0) {
pvVar2 = operator_new__(0x1000);
uVar4 = (ulong)(uVar3 << 3);
*(void **)((long)__s + uVar4) = pvVar2;
memset(*(void **)(*(long *)(this + uVar5 * 8) + uVar4),0,0x1000);
}
else {
dbgprintf("Addr 0x%x already exists and do not need an addPage()!\n",param_1);
}
return lVar1 == 0;
}
| |
38,478 | js_array_buffer_constructor0 | bluesky950520[P]quickjs/quickjs.c | static JSValue js_array_buffer_constructor0(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv,
JSClassID class_id)
{
uint64_t len, max_len, *pmax_len = NULL;
JSValue obj, val;
int64_t i;
if (JS_ToIndex(ctx, &len, argv[0]))
return JS_EXCEPTION;
if (argc < 2)
goto next;
if (!JS_IsObject(argv[1]))
goto next;
obj = JS_ToObject(ctx, argv[1]);
if (JS_IsException(obj))
return JS_EXCEPTION;
val = JS_GetProperty(ctx, obj, JS_ATOM_maxByteLength);
JS_FreeValue(ctx, obj);
if (JS_IsException(val))
return JS_EXCEPTION;
if (JS_IsUndefined(val))
goto next;
if (JS_ToInt64Free(ctx, &i, val))
return JS_EXCEPTION;
// don't have to check i < 0 because len >= 0
if (len > i || i > MAX_SAFE_INTEGER)
return JS_ThrowRangeError(ctx, "invalid array buffer max length");
max_len = i;
pmax_len = &max_len;
next:
return js_array_buffer_constructor2(ctx, new_target, len, pmax_len,
class_id);
} | O0 | c | js_array_buffer_constructor0:
subq $0xa8, %rsp
movq %rsi, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq %rdi, 0x80(%rsp)
movl %ecx, 0x7c(%rsp)
movq %r8, 0x70(%rsp)
movl %r9d, 0x6c(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x80(%rsp), %rdi
movq 0x70(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x60(%rsp), %rsi
callq 0x39140
cmpl $0x0, %eax
je 0xde685
movl $0x0, 0x98(%rsp)
movq $0x6, 0xa0(%rsp)
jmp 0xde881
cmpl $0x2, 0x7c(%rsp)
jge 0xde691
jmp 0xde845
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x18(%rax), %rsi
callq 0x2af70
cmpl $0x0, %eax
jne 0xde6ad
jmp 0xde845
movq 0x80(%rsp), %rdi
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
callq 0x37770
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0xde715
movl $0x0, 0x98(%rsp)
movq $0x6, 0xa0(%rsp)
jmp 0xde881
movq 0x80(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movl $0x92, %ecx
callq 0x29d80
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x23c90
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0xde796
movl $0x0, 0x98(%rsp)
movq $0x6, 0xa0(%rsp)
jmp 0xde881
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x2e260
cmpl $0x0, %eax
je 0xde7af
jmp 0xde845
movq 0x80(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x28(%rsp), %rsi
callq 0x38c60
cmpl $0x0, %eax
je 0xde7ec
movl $0x0, 0x98(%rsp)
movq $0x6, 0xa0(%rsp)
jmp 0xde881
movq 0x60(%rsp), %rax
cmpq 0x28(%rsp), %rax
ja 0xde809
movabsq $0x1fffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFF
cmpq %rax, 0x28(%rsp)
jle 0xde831
movq 0x80(%rsp), %rdi
leaq 0x32e7b(%rip), %rsi # 0x111693
movb $0x0, %al
callq 0x29670
movq %rax, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
jmp 0xde881
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x80(%rsp), %rdi
movq 0x60(%rsp), %rcx
movq 0x50(%rsp), %r8
movl 0x6c(%rsp), %r9d
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0xdb0b0
movq %rax, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq 0xa0(%rsp), %rdx
addq $0xa8, %rsp
retq
nopl (%rax)
| js_array_buffer_constructor0:
sub rsp, 0A8h
mov [rsp+0A8h+var_20], rsi
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_28], rdi
mov [rsp+0A8h+var_2C], ecx
mov [rsp+0A8h+var_38], r8
mov [rsp+0A8h+var_3C], r9d
mov [rsp+0A8h+var_58], 0
mov rdi, [rsp+0A8h+var_28]
mov rax, [rsp+0A8h+var_38]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+0A8h+var_48]
call JS_ToIndex
cmp eax, 0
jz short loc_DE685
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 6
jmp loc_DE881
loc_DE685:
cmp [rsp+0A8h+var_2C], 2
jge short loc_DE691
jmp loc_DE845
loc_DE691:
mov rax, [rsp+0A8h+var_38]
mov rdi, [rax+10h]
mov rsi, [rax+18h]
call JS_IsObject
cmp eax, 0
jnz short loc_DE6AD
jmp loc_DE845
loc_DE6AD:
mov rdi, [rsp+0A8h+var_28]
mov rax, [rsp+0A8h+var_38]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
call JS_ToObject
mov [rsp+0A8h+var_90], rax
mov [rsp+0A8h+var_88], rdx
mov rax, [rsp+0A8h+var_90]
mov [rsp+0A8h+var_68], rax
mov rax, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_60], rax
mov rdi, [rsp+0A8h+var_68]
mov rsi, [rsp+0A8h+var_60]
call JS_IsException_1
cmp eax, 0
jz short loc_DE715
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 6
jmp loc_DE881
loc_DE715:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_68]
mov rdx, [rsp+0A8h+var_60]
mov ecx, 92h
call JS_GetProperty
mov [rsp+0A8h+var_A0], rax
mov [rsp+0A8h+var_98], rdx
mov rax, [rsp+0A8h+var_A0]
mov [rsp+0A8h+var_78], rax
mov rax, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_70], rax
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_68]
mov rdx, [rsp+0A8h+var_60]
call JS_FreeValue
mov rdi, [rsp+0A8h+var_78]
mov rsi, [rsp+0A8h+var_70]
call JS_IsException_1
cmp eax, 0
jz short loc_DE796
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 6
jmp loc_DE881
loc_DE796:
mov rdi, [rsp+0A8h+var_78]
mov rsi, [rsp+0A8h+var_70]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_DE7AF
jmp loc_DE845
loc_DE7AF:
mov rdi, [rsp+0A8h+var_28]
mov rdx, [rsp+0A8h+var_78]
mov rcx, [rsp+0A8h+var_70]
lea rsi, [rsp+0A8h+var_80]
call JS_ToInt64Free
cmp eax, 0
jz short loc_DE7EC
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 6
jmp loc_DE881
loc_DE7EC:
mov rax, [rsp+0A8h+var_48]
cmp rax, [rsp+0A8h+var_80]
ja short loc_DE809
mov rax, 1FFFFFFFFFFFFFh
cmp [rsp+0A8h+var_80], rax
jle short loc_DE831
loc_DE809:
mov rdi, [rsp+0A8h+var_28]
lea rsi, aInvalidArrayBu_1; "invalid array buffer max length"
mov al, 0
call JS_ThrowRangeError
mov [rsp+0A8h+var_10], rax
mov [rsp+0A8h+var_8], rdx
jmp short loc_DE881
loc_DE831:
mov rax, [rsp+0A8h+var_80]
mov [rsp+0A8h+var_50], rax
lea rax, [rsp+0A8h+var_50]
mov [rsp+0A8h+var_58], rax
loc_DE845:
mov rdi, [rsp+0A8h+var_28]
mov rcx, [rsp+0A8h+var_48]
mov r8, [rsp+0A8h+var_58]
mov r9d, [rsp+0A8h+var_3C]
mov rsi, [rsp+0A8h+var_20]
mov rdx, [rsp+0A8h+var_18]
call js_array_buffer_constructor2
mov [rsp+0A8h+var_10], rax
mov [rsp+0A8h+var_8], rdx
loc_DE881:
mov rax, [rsp+0A8h+var_10]
mov rdx, [rsp+0A8h+var_8]
add rsp, 0A8h
retn
| long long js_array_buffer_constructor0(
long long a1,
long long a2,
long long a3,
int a4,
long long a5,
unsigned int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
__m128 v14; // xmm4
__m128 v15; // xmm5
long long v16; // rcx
long long v17; // r8
long long v18; // r9
long long v19; // rdx
long long v20; // rdx
long long v21; // rdx
long long v22; // rcx
long long v23; // r8
long long v24; // r9
long long v25; // rdx
long long v26; // rdx
char v28; // [rsp+0h] [rbp-A8h]
long long v29; // [rsp+28h] [rbp-80h] BYREF
long long Property; // [rsp+30h] [rbp-78h]
long long v31; // [rsp+38h] [rbp-70h]
_DWORD *v32; // [rsp+40h] [rbp-68h]
long long v33; // [rsp+48h] [rbp-60h]
unsigned long long *v34; // [rsp+50h] [rbp-58h]
long long v35; // [rsp+58h] [rbp-50h] BYREF
unsigned long long v36; // [rsp+60h] [rbp-48h] BYREF
unsigned int v37; // [rsp+6Ch] [rbp-3Ch]
long long v38; // [rsp+70h] [rbp-38h]
int v39; // [rsp+7Ch] [rbp-2Ch]
long long v40; // [rsp+80h] [rbp-28h]
long long v41; // [rsp+88h] [rbp-20h]
long long v42; // [rsp+90h] [rbp-18h]
long long v43; // [rsp+98h] [rbp-10h]
long long v44; // [rsp+A0h] [rbp-8h]
v41 = a2;
v42 = a3;
v40 = a1;
v39 = a4;
v38 = a5;
v37 = a6;
v34 = 0LL;
if ( !(unsigned int)JS_ToIndex(a1, &v36, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), a7, a8, a9, a10, a11, a12, a13, a14) )
{
if ( v39 >= 2 && JS_IsObject(*(_QWORD *)(v38 + 16), *(_QWORD *)(v38 + 24)) )
{
v32 = JS_ToObject(
v40,
*(_DWORD **)(v38 + 16),
*(_QWORD *)(v38 + 24),
a7,
a8,
a9,
a10,
v14,
v15,
a13,
a14,
v16,
v17,
v18);
v33 = v19;
if ( JS_IsException_1((long long)v32, v19) )
{
LODWORD(v43) = 0;
v44 = 6LL;
return v43;
}
Property = JS_GetProperty(v40, (int)v32, v33, 146);
v31 = v20;
JS_FreeValue(v40, (long long)v32, v33);
if ( JS_IsException_1(Property, v31) )
{
LODWORD(v43) = 0;
v44 = 6LL;
return v43;
}
if ( !JS_IsUndefined_0(Property, v31) )
{
if ( (unsigned int)JS_ToInt64Free(v40, &v29, Property, v31) )
{
LODWORD(v43) = 0;
v44 = 6LL;
return v43;
}
if ( v36 > v29 || v29 > 0x1FFFFFFFFFFFFFLL )
{
v43 = JS_ThrowRangeError(
v40,
(long long)"invalid array buffer max length",
v21,
v22,
v23,
v24,
a7,
a8,
a9,
a10,
v14,
v15,
a13,
a14,
v28);
v44 = v25;
return v43;
}
v35 = v29;
v34 = (unsigned long long *)&v35;
}
}
v43 = js_array_buffer_constructor2(v40, v41, v42, v36, v34, v37, a7, a8, a9, a10, v14, v15, a13, a14);
v44 = v26;
return v43;
}
LODWORD(v43) = 0;
v44 = 6LL;
return v43;
}
| js_array_buffer_constructor0:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV qword ptr [RSP + 0x80],RDI
MOV dword ptr [RSP + 0x7c],ECX
MOV qword ptr [RSP + 0x70],R8
MOV dword ptr [RSP + 0x6c],R9D
MOV qword ptr [RSP + 0x50],0x0
MOV RDI,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x60]
CALL 0x00139140
CMP EAX,0x0
JZ 0x001de685
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x6
JMP 0x001de881
LAB_001de685:
CMP dword ptr [RSP + 0x7c],0x2
JGE 0x001de691
JMP 0x001de845
LAB_001de691:
MOV RAX,qword ptr [RSP + 0x70]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RAX + 0x18]
CALL 0x0012af70
CMP EAX,0x0
JNZ 0x001de6ad
JMP 0x001de845
LAB_001de6ad:
MOV RDI,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00137770
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001de715
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x6
JMP 0x001de881
LAB_001de715:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
MOV ECX,0x92
CALL 0x00129d80
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001de796
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x6
JMP 0x001de881
LAB_001de796:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x0012e260
CMP EAX,0x0
JZ 0x001de7af
JMP 0x001de845
LAB_001de7af:
MOV RDI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x28]
CALL 0x00138c60
CMP EAX,0x0
JZ 0x001de7ec
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x6
JMP 0x001de881
LAB_001de7ec:
MOV RAX,qword ptr [RSP + 0x60]
CMP RAX,qword ptr [RSP + 0x28]
JA 0x001de809
MOV RAX,0x1fffffffffffff
CMP qword ptr [RSP + 0x28],RAX
JLE 0x001de831
LAB_001de809:
MOV RDI,qword ptr [RSP + 0x80]
LEA RSI,[0x211693]
MOV AL,0x0
CALL 0x00129670
MOV qword ptr [RSP + 0x98],RAX
MOV qword ptr [RSP + 0xa0],RDX
JMP 0x001de881
LAB_001de831:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x58],RAX
LEA RAX,[RSP + 0x58]
MOV qword ptr [RSP + 0x50],RAX
LAB_001de845:
MOV RDI,qword ptr [RSP + 0x80]
MOV RCX,qword ptr [RSP + 0x60]
MOV R8,qword ptr [RSP + 0x50]
MOV R9D,dword ptr [RSP + 0x6c]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
CALL 0x001db0b0
MOV qword ptr [RSP + 0x98],RAX
MOV qword ptr [RSP + 0xa0],RDX
LAB_001de881:
MOV RAX,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RSP,0xa8
RET
|
int1 [16]
js_array_buffer_constructor0
(int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5,
int4 param_6)
{
int iVar1;
int1 auVar2 [16];
ulong local_80;
int1 local_78 [16];
int1 local_68 [16];
ulong *local_58;
ulong local_50;
ulong local_48;
int4 local_3c;
int8 *local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_58 = (ulong *)0x0;
local_3c = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
iVar1 = JS_ToIndex(param_1,&local_48,*param_5,param_5[1]);
if (iVar1 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001de881;
}
if (1 < local_2c) {
iVar1 = JS_IsObject(local_38[2],local_38[3]);
if (iVar1 != 0) {
local_68 = JS_ToObject(local_28,local_38[2],local_38[3]);
iVar1 = JS_IsException(local_68._0_8_,local_68._8_8_);
if (iVar1 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001de881;
}
local_78 = JS_GetProperty(local_28,local_68._0_8_,local_68._8_8_,0x92);
JS_FreeValue(local_28,local_68._0_8_,local_68._8_8_);
iVar1 = JS_IsException(local_78._0_8_,local_78._8_8_);
if (iVar1 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001de881;
}
iVar1 = JS_IsUndefined(local_78._0_8_,local_78._8_8_);
if (iVar1 == 0) {
iVar1 = JS_ToInt64Free(local_28,&local_80,local_78._0_8_,local_78._8_8_);
if (iVar1 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001de881;
}
if ((local_80 < local_48) || (0x1fffffffffffff < (long)local_80)) {
auVar2 = JS_ThrowRangeError(local_28,"invalid array buffer max length");
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
goto LAB_001de881;
}
local_50 = local_80;
local_58 = &local_50;
}
}
}
auVar2 = js_array_buffer_constructor2(local_28,local_20,local_18,local_48,local_58,local_3c);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
LAB_001de881:
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
| |
38,479 | js_array_buffer_constructor0 | bluesky950520[P]quickjs/quickjs.c | static JSValue js_array_buffer_constructor0(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv,
JSClassID class_id)
{
uint64_t len, max_len, *pmax_len = NULL;
JSValue obj, val;
int64_t i;
if (JS_ToIndex(ctx, &len, argv[0]))
return JS_EXCEPTION;
if (argc < 2)
goto next;
if (!JS_IsObject(argv[1]))
goto next;
obj = JS_ToObject(ctx, argv[1]);
if (JS_IsException(obj))
return JS_EXCEPTION;
val = JS_GetProperty(ctx, obj, JS_ATOM_maxByteLength);
JS_FreeValue(ctx, obj);
if (JS_IsException(val))
return JS_EXCEPTION;
if (JS_IsUndefined(val))
goto next;
if (JS_ToInt64Free(ctx, &i, val))
return JS_EXCEPTION;
// don't have to check i < 0 because len >= 0
if (len > i || i > MAX_SAFE_INTEGER)
return JS_ThrowRangeError(ctx, "invalid array buffer max length");
max_len = i;
pmax_len = &max_len;
next:
return js_array_buffer_constructor2(ctx, new_target, len, pmax_len,
class_id);
} | O2 | c | js_array_buffer_constructor0:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r15d
movq %r8, %r13
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq (%r8), %rdx
movq 0x8(%r8), %rcx
movq %rsp, %rsi
callq 0x21680
pushq $0x6
popq %rdx
testl %eax, %eax
je 0x6bcb4
xorl %r13d, %r13d
xorl %ecx, %ecx
jmp 0x6bd0b
cmpl $0x2, %ebp
jl 0x6bce0
movq 0x18(%r13), %rdx
cmpl $-0x1, %edx
jne 0x6bce0
movq 0x10(%r13), %rsi
movq %r14, %rdi
callq 0x20b92
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x6bd20
xorl %r13d, %r13d
xorl %ecx, %ecx
pushq $0x6
popq %rdx
jmp 0x6bd0b
xorl %r13d, %r13d
movq (%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r13, %r8
movl %r15d, %r9d
callq 0x6a9fb
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %r13d
orq %rcx, %r13
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movq %r14, %rdi
movq %rax, %rsi
movq %rbp, %rdx
movl $0x92, %ecx
callq 0x1b043
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1801e
movq 0x10(%rsp), %rcx
xorl %r13d, %r13d
cmpl $0x3, %ecx
je 0x6bce3
cmpl $0x6, %ecx
jne 0x6bd67
movl %ecx, %edx
jmp 0x6bcb0
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
movq 0x8(%rsp), %rdx
callq 0x21507
testl %eax, %eax
jne 0x6bcd6
movq 0x18(%rsp), %rax
cmpq %rax, (%rsp)
setbe %cl
movabsq $0x20000000000000, %rdx # imm = 0x20000000000000
cmpq %rdx, %rax
setl %dl
testb %dl, %cl
jne 0x6bdba
leaq 0x1d7aa(%rip), %rsi # 0x89552
xorl %r13d, %r13d
movq %r14, %rdi
xorl %eax, %eax
callq 0x1acb3
jmp 0x6bcd9
leaq 0x20(%rsp), %r13
movq %rax, (%r13)
jmp 0x6bce3
| js_array_buffer_constructor0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15d, r9d
mov r13, r8
mov ebp, ecx
mov r12, rdx
mov rbx, rsi
mov r14, rdi
mov rdx, [r8]
mov rcx, [r8+8]
mov rsi, rsp
call JS_ToIndex
push 6
pop rdx
test eax, eax
jz short loc_6BCB4
xor r13d, r13d
loc_6BCB0:
xor ecx, ecx
jmp short loc_6BD0B
loc_6BCB4:
cmp ebp, 2
jl short loc_6BCE0
mov rdx, [r13+18h]
cmp edx, 0FFFFFFFFh
jnz short loc_6BCE0
mov rsi, [r13+10h]
mov rdi, r14
call JS_ToObject
mov rbp, rdx
cmp ebp, 6
jnz short loc_6BD20
loc_6BCD6:
xor r13d, r13d
loc_6BCD9:
xor ecx, ecx
push 6
pop rdx
jmp short loc_6BD0B
loc_6BCE0:
xor r13d, r13d
loc_6BCE3:
mov rcx, [rsp+58h+var_58]
mov rdi, r14
mov rsi, rbx
mov rdx, r12
mov r8, r13
mov r9d, r15d
call js_array_buffer_constructor2
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov r13d, eax
loc_6BD0B:
or r13, rcx
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6BD20:
mov r13, rax
mov rdi, r14
mov rsi, rax
mov rdx, rbp
mov ecx, 92h
call JS_GetProperty
mov [rsp+58h+var_50], rax
mov [rsp+58h+var_48], rdx
mov rdi, r14
mov rsi, r13
mov rdx, rbp
call JS_FreeValue
mov rcx, [rsp+58h+var_48]
xor r13d, r13d
cmp ecx, 3
jz short loc_6BCE3
cmp ecx, 6
jnz short loc_6BD67
mov edx, ecx
jmp loc_6BCB0
loc_6BD67:
lea rsi, [rsp+58h+var_40]
mov rdi, r14
mov rdx, [rsp+58h+var_50]
call JS_ToInt64Free
test eax, eax
jnz loc_6BCD6
mov rax, [rsp+58h+var_40]
cmp [rsp+58h+var_58], rax
setbe cl
mov rdx, 20000000000000h
cmp rax, rdx
setl dl
test cl, dl
jnz short loc_6BDBA
lea rsi, aInvalidArrayBu_1; "invalid array buffer max length"
xor r13d, r13d
mov rdi, r14
xor eax, eax
call JS_ThrowRangeError
jmp loc_6BCD9
loc_6BDBA:
lea r13, [rsp+58h+var_38]
mov [r13+0], rax
jmp loc_6BCE3
| unsigned long long js_array_buffer_constructor0(
long long a1,
long long a2,
long long a3,
int a4,
long long a5,
unsigned int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
long long v18; // rcx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
unsigned long long v23; // r13
unsigned long long v24; // rcx
long long v25; // rdx
long long v26; // rax
long long v27; // rdx
long long v28; // rbp
unsigned long long v29; // rax
long long v31; // r13
long long v32; // rdx
long long v33; // rcx
long long v34; // r8
long long v35; // r9
long long v36; // rdx
unsigned long long v37; // [rsp+0h] [rbp-58h] BYREF
long long Property; // [rsp+8h] [rbp-50h]
long long v39; // [rsp+10h] [rbp-48h]
unsigned long long v40; // [rsp+18h] [rbp-40h] BYREF
unsigned long long v41; // [rsp+20h] [rbp-38h] BYREF
if ( !(unsigned int)JS_ToIndex(a1, &v37, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), a7, a8, a9, a10, a11, a12, a13, a14) )
{
if ( a4 >= 2 && (v25 = *(_QWORD *)(a5 + 24), (_DWORD)v25 == -1) )
{
v26 = JS_ToObject(a1, *(_QWORD *)(a5 + 16), v25, v18, v19, v20, a7, a8, a9, a10, v21, v22, a13, a14);
v28 = v27;
if ( (_DWORD)v27 == 6 )
{
LABEL_7:
v23 = 0LL;
LABEL_8:
v24 = 0LL;
return v24 | v23;
}
v31 = v26;
Property = JS_GetProperty(a1, v26, v27, 146);
v39 = v32;
JS_FreeValue(a1, v31, v28);
v23 = 0LL;
if ( (_DWORD)v39 != 3 )
{
if ( (_DWORD)v39 == 6 )
goto LABEL_3;
if ( (unsigned int)JS_ToInt64Free(a1, (long long *)&v40, Property, v39) )
goto LABEL_7;
v36 = 0x20000000000000LL;
if ( (long long)v40 >= 0x20000000000000LL || v37 > v40 )
{
v23 = 0LL;
LOBYTE(v36) = (long long)v40 < 0x20000000000000LL;
LOBYTE(v33) = v37 <= v40;
JS_ThrowRangeError(
a1,
(long long)"invalid array buffer max length",
v36,
v33,
v34,
v35,
a7,
a8,
a9,
a10,
v21,
v22,
a13,
a14,
v37);
goto LABEL_8;
}
v23 = (unsigned long long)&v41;
v41 = v40;
}
}
else
{
v23 = 0LL;
}
v29 = js_array_buffer_constructor2(a1, a2, a3, v37, (int *)v23, a6, a7, a8, a9, a10, v21, v22, a13, a14);
v24 = v29 & 0xFFFFFFFF00000000LL;
v23 = (unsigned int)v29;
return v24 | v23;
}
v23 = 0LL;
LABEL_3:
v24 = 0LL;
return v24 | v23;
}
| js_array_buffer_constructor0:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15D,R9D
MOV R13,R8
MOV EBP,ECX
MOV R12,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
MOV RSI,RSP
CALL 0x00121680
PUSH 0x6
POP RDX
TEST EAX,EAX
JZ 0x0016bcb4
XOR R13D,R13D
LAB_0016bcb0:
XOR ECX,ECX
JMP 0x0016bd0b
LAB_0016bcb4:
CMP EBP,0x2
JL 0x0016bce0
MOV RDX,qword ptr [R13 + 0x18]
CMP EDX,-0x1
JNZ 0x0016bce0
MOV RSI,qword ptr [R13 + 0x10]
MOV RDI,R14
CALL 0x00120b92
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x0016bd20
LAB_0016bcd6:
XOR R13D,R13D
LAB_0016bcd9:
XOR ECX,ECX
PUSH 0x6
POP RDX
JMP 0x0016bd0b
LAB_0016bce0:
XOR R13D,R13D
LAB_0016bce3:
MOV RCX,qword ptr [RSP]
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
MOV R8,R13
MOV R9D,R15D
CALL 0x0016a9fb
MOV RCX,-0x100000000
AND RCX,RAX
MOV R13D,EAX
LAB_0016bd0b:
OR R13,RCX
MOV RAX,R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016bd20:
MOV R13,RAX
MOV RDI,R14
MOV RSI,RAX
MOV RDX,RBP
MOV ECX,0x92
CALL 0x0011b043
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,R14
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011801e
MOV RCX,qword ptr [RSP + 0x10]
XOR R13D,R13D
CMP ECX,0x3
JZ 0x0016bce3
CMP ECX,0x6
JNZ 0x0016bd67
MOV EDX,ECX
JMP 0x0016bcb0
LAB_0016bd67:
LEA RSI,[RSP + 0x18]
MOV RDI,R14
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x00121507
TEST EAX,EAX
JNZ 0x0016bcd6
MOV RAX,qword ptr [RSP + 0x18]
CMP qword ptr [RSP],RAX
SETBE CL
MOV RDX,0x20000000000000
CMP RAX,RDX
SETL DL
TEST CL,DL
JNZ 0x0016bdba
LEA RSI,[0x189552]
XOR R13D,R13D
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011acb3
JMP 0x0016bcd9
LAB_0016bdba:
LEA R13,[RSP + 0x20]
MOV qword ptr [R13],RAX
JMP 0x0016bce3
|
ulong js_array_buffer_constructor0
(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5,int4 param_6)
{
int iVar1;
ulong uVar2;
ulong uVar3;
int1 *puVar4;
int1 auVar5 [16];
ulong local_58;
int1 local_50 [16];
ulong local_40;
int1 local_38 [8];
iVar1 = JS_ToIndex(param_1,&local_58,*param_5,param_5[1]);
if (iVar1 != 0) {
LAB_0016bcb0:
uVar2 = 0;
uVar3 = 0;
goto LAB_0016bd0b;
}
if ((param_4 < 2) || ((int)param_5[3] != -1)) {
puVar4 = (int1 *)0x0;
LAB_0016bce3:
uVar2 = js_array_buffer_constructor2(param_1,param_2,param_3,local_58,puVar4,param_6);
uVar3 = uVar2 & 0xffffffff00000000;
uVar2 = uVar2 & 0xffffffff;
}
else {
auVar5 = JS_ToObject(param_1,param_5[2]);
if (auVar5._8_4_ != 6) {
local_50 = JS_GetProperty(param_1,auVar5._0_8_,auVar5._8_8_,0x92);
JS_FreeValue(param_1,auVar5._0_8_,auVar5._8_8_);
puVar4 = (int1 *)0x0;
if (local_50._8_4_ == 3) goto LAB_0016bce3;
if (local_50._8_4_ == 6) goto LAB_0016bcb0;
iVar1 = JS_ToInt64Free(param_1,&local_40,local_50._0_8_);
if (iVar1 == 0) {
if (local_58 <= local_40 && (long)local_40 < 0x20000000000000) {
puVar4 = local_38;
goto LAB_0016bce3;
}
JS_ThrowRangeError(param_1,"invalid array buffer max length");
}
}
uVar2 = 0;
uVar3 = 0;
}
LAB_0016bd0b:
return uVar2 | uVar3;
}
| |
38,480 | js_array_buffer_constructor0 | bluesky950520[P]quickjs/quickjs.c | static JSValue js_array_buffer_constructor0(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv,
JSClassID class_id)
{
uint64_t len, max_len, *pmax_len = NULL;
JSValue obj, val;
int64_t i;
if (JS_ToIndex(ctx, &len, argv[0]))
return JS_EXCEPTION;
if (argc < 2)
goto next;
if (!JS_IsObject(argv[1]))
goto next;
obj = JS_ToObject(ctx, argv[1]);
if (JS_IsException(obj))
return JS_EXCEPTION;
val = JS_GetProperty(ctx, obj, JS_ATOM_maxByteLength);
JS_FreeValue(ctx, obj);
if (JS_IsException(val))
return JS_EXCEPTION;
if (JS_IsUndefined(val))
goto next;
if (JS_ToInt64Free(ctx, &i, val))
return JS_EXCEPTION;
// don't have to check i < 0 because len >= 0
if (len > i || i > MAX_SAFE_INTEGER)
return JS_ThrowRangeError(ctx, "invalid array buffer max length");
max_len = i;
pmax_len = &max_len;
next:
return js_array_buffer_constructor2(ctx, new_target, len, pmax_len,
class_id);
} | O3 | c | js_array_buffer_constructor0:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r15d
movq %r8, %r13
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq (%r8), %rdx
movq 0x8(%r8), %rcx
movq %rsp, %rsi
callq 0x280f0
movl $0x6, %edx
testl %eax, %eax
je 0x82e0f
xorl %r13d, %r13d
xorl %ecx, %ecx
jmp 0x82e7c
cmpl $0x2, %ebp
jl 0x82e3e
movq 0x18(%r13), %rdx
cmpl $-0x1, %edx
jne 0x82e3e
movq 0x10(%r13), %rsi
movq %r14, %rdi
callq 0x27514
movq %rdx, %r13
cmpl $0x6, %r13d
jne 0x82e91
xorl %r13d, %r13d
xorl %ecx, %ecx
movl $0x6, %edx
jmp 0x82e7c
xorl %r13d, %r13d
movq (%rsp), %rcx
xorl %eax, %eax
leaq -0x48c7c(%rip), %r10 # 0x3a1d2
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r13, %r8
movl %r15d, %r9d
pushq $0x1
pushq %rax
pushq %r10
pushq %rax
callq 0x39eef
addq $0x20, %rsp
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %r13d
orq %rcx, %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
movl $0x92, %ecx
movq %rax, %r8
movq %r13, %r9
pushq $0x0
pushq $0x0
callq 0x2384b
addq $0x10, %rsp
movq %rdx, %r8
cmpl $-0x9, %r13d
jb 0x82ee7
movq 0x18(%r14), %rdi
movl (%rbp), %edx
leal -0x1(%rdx), %ecx
movl %ecx, (%rbp)
cmpl $0x1, %edx
jg 0x82ee7
movq %rbp, %rsi
movq %r13, %rdx
movq %r8, %r13
movq %rax, %rbp
callq 0x219cc
movq %rbp, %rax
movq %r13, %r8
xorl %r13d, %r13d
cmpl $0x3, %r8d
je 0x82e41
cmpl $0x6, %r8d
jne 0x82f02
movl %r8d, %edx
jmp 0x82e0b
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rax, %rdx
movq %r8, %rcx
callq 0x27f66
testl %eax, %eax
jne 0x82e32
movq 0x8(%rsp), %rax
cmpq %rax, (%rsp)
setbe %cl
movabsq $0x20000000000000, %rdx # imm = 0x20000000000000
cmpq %rdx, %rax
setl %dl
testb %dl, %cl
jne 0x82f56
leaq 0x2267e(%rip), %rsi # 0xa55c2
xorl %r13d, %r13d
movq %r14, %rdi
xorl %eax, %eax
callq 0x2122c
jmp 0x82e35
leaq 0x10(%rsp), %r13
movq %rax, (%r13)
jmp 0x82e41
| js_array_buffer_constructor0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15d, r9d
mov r13, r8
mov ebp, ecx
mov r12, rdx
mov rbx, rsi
mov r14, rdi
mov rdx, [r8]
mov rcx, [r8+8]
mov rsi, rsp
call JS_ToIndex
mov edx, 6
test eax, eax
jz short loc_82E0F
xor r13d, r13d
loc_82E0B:
xor ecx, ecx
jmp short loc_82E7C
loc_82E0F:
cmp ebp, 2
jl short loc_82E3E
mov rdx, [r13+18h]
cmp edx, 0FFFFFFFFh
jnz short loc_82E3E
mov rsi, [r13+10h]
mov rdi, r14
call JS_ToObject
mov r13, rdx
cmp r13d, 6
jnz short loc_82E91
loc_82E32:
xor r13d, r13d
loc_82E35:
xor ecx, ecx
mov edx, 6
jmp short loc_82E7C
loc_82E3E:
xor r13d, r13d
loc_82E41:
mov rcx, [rsp+48h+var_48]
xor eax, eax
lea r10, js_array_buffer_free
mov rdi, r14
mov rsi, rbx
mov rdx, r12
mov r8, r13
mov r9d, r15d
push 1
push rax
push r10
push rax
call js_array_buffer_constructor3
add rsp, 20h
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov r13d, eax
loc_82E7C:
or r13, rcx
mov rax, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_82E91:
mov rbp, rax
mov rdi, r14
mov rsi, rax
mov rdx, r13
mov ecx, 92h
mov r8, rax
mov r9, r13
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r8, rdx
cmp r13d, 0FFFFFFF7h
jb short loc_82EE7
mov rdi, [r14+18h]
mov edx, [rbp+0]
lea ecx, [rdx-1]
mov [rbp+0], ecx
cmp edx, 1
jg short loc_82EE7
mov rsi, rbp
mov rdx, r13
mov r13, r8
mov rbp, rax
call js_free_value_rt
mov rax, rbp
mov r8, r13
loc_82EE7:
xor r13d, r13d
cmp r8d, 3
jz loc_82E41
cmp r8d, 6
jnz short loc_82F02
mov edx, r8d
jmp loc_82E0B
loc_82F02:
lea rsi, [rsp+48h+var_40]
mov rdi, r14
mov rdx, rax
mov rcx, r8
call JS_ToInt64Free
test eax, eax
jnz loc_82E32
mov rax, [rsp+48h+var_40]
cmp [rsp+48h+var_48], rax
setbe cl
mov rdx, 20000000000000h
cmp rax, rdx
setl dl
test cl, dl
jnz short loc_82F56
lea rsi, aInvalidArrayBu_1; "invalid array buffer max length"
xor r13d, r13d
mov rdi, r14
xor eax, eax
call JS_ThrowRangeError
jmp loc_82E35
loc_82F56:
lea r13, [rsp+48h+var_38]
mov [r13+0], rax
jmp loc_82E41
| unsigned long long js_array_buffer_constructor0(
long long a1,
long long a2,
long long a3,
int a4,
long long a5,
unsigned int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
long long v20; // rcx
long long v21; // r8
long long v22; // r9
__m128 v23; // xmm4
__m128 v24; // xmm5
unsigned long long v25; // r13
unsigned long long v26; // rcx
long long v27; // rdx
long long v28; // rax
long long v29; // rdx
unsigned int v30; // r13d
unsigned long long v31; // rax
_DWORD *v33; // rbp
unsigned long long PropertyInternal2; // rax
long long v35; // rdx
long long v36; // r8
long long v37; // rdi
int v38; // edx
_QWORD *v39; // rsi
int v40; // edx
long long v41; // r13
unsigned long long v42; // rbp
long long v43; // rcx
long long v44; // r8
long long v45; // r9
long long v46; // rdx
unsigned long long v47; // [rsp+0h] [rbp-48h] BYREF
unsigned long long v48; // [rsp+8h] [rbp-40h] BYREF
unsigned long long v49; // [rsp+10h] [rbp-38h] BYREF
if ( !(unsigned int)JS_ToIndex(a1, &v47, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), a7, a8, a9, a10, a11, a12, a13, a14) )
{
if ( a4 >= 2 && (v27 = *(_QWORD *)(a5 + 24), (_DWORD)v27 == -1) )
{
v28 = JS_ToObject(a1, *(_QWORD *)(a5 + 16), v27, v20, v21, v22, a7, a8, a9, a10, v23, v24, a13, a14);
v30 = v29;
if ( (_DWORD)v29 == 6 )
{
LABEL_7:
v25 = 0LL;
LABEL_8:
v26 = 0LL;
return v26 | v25;
}
v33 = (_DWORD *)v28;
PropertyInternal2 = JS_GetPropertyInternal2(a1, v28, v29, 0x92u, v28, v29, 0LL, 0);
v36 = v35;
if ( v30 >= 0xFFFFFFF7 )
{
v37 = *(_QWORD *)(a1 + 24);
v38 = (*v33)--;
if ( v38 <= 1 )
{
v39 = v33;
v40 = v30;
v41 = v36;
v42 = PropertyInternal2;
js_free_value_rt(v37, v39, v40);
PropertyInternal2 = v42;
v36 = v41;
}
}
v25 = 0LL;
if ( (_DWORD)v36 != 3 )
{
if ( (_DWORD)v36 == 6 )
goto LABEL_3;
if ( (unsigned int)JS_ToInt64Free(a1, (long long *)&v48, PropertyInternal2, v36) )
goto LABEL_7;
v46 = 0x20000000000000LL;
if ( (long long)v48 >= 0x20000000000000LL || v47 > v48 )
{
v25 = 0LL;
LOBYTE(v46) = (long long)v48 < 0x20000000000000LL;
LOBYTE(v43) = v47 <= v48;
JS_ThrowRangeError(
a1,
(long long)"invalid array buffer max length",
v46,
v43,
v44,
v45,
a7,
a8,
a9,
a10,
v23,
v24,
a13,
a14,
v47);
goto LABEL_8;
}
v25 = (unsigned long long)&v49;
v49 = v48;
}
}
else
{
v25 = 0LL;
}
v31 = js_array_buffer_constructor3(
a1,
a2,
a3,
v47,
(unsigned long long *)v25,
a6,
a7,
a8,
a9,
a10,
v23,
v24,
a13,
a14,
0LL,
(long long ( *)())js_array_buffer_free,
0LL,
1u);
v26 = v31 & 0xFFFFFFFF00000000LL;
v25 = (unsigned int)v31;
return v26 | v25;
}
v25 = 0LL;
LABEL_3:
v26 = 0LL;
return v26 | v25;
}
| js_array_buffer_constructor0:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15D,R9D
MOV R13,R8
MOV EBP,ECX
MOV R12,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
MOV RSI,RSP
CALL 0x001280f0
MOV EDX,0x6
TEST EAX,EAX
JZ 0x00182e0f
XOR R13D,R13D
LAB_00182e0b:
XOR ECX,ECX
JMP 0x00182e7c
LAB_00182e0f:
CMP EBP,0x2
JL 0x00182e3e
MOV RDX,qword ptr [R13 + 0x18]
CMP EDX,-0x1
JNZ 0x00182e3e
MOV RSI,qword ptr [R13 + 0x10]
MOV RDI,R14
CALL 0x00127514
MOV R13,RDX
CMP R13D,0x6
JNZ 0x00182e91
LAB_00182e32:
XOR R13D,R13D
LAB_00182e35:
XOR ECX,ECX
MOV EDX,0x6
JMP 0x00182e7c
LAB_00182e3e:
XOR R13D,R13D
LAB_00182e41:
MOV RCX,qword ptr [RSP]
XOR EAX,EAX
LEA R10,[0x13a1d2]
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
MOV R8,R13
MOV R9D,R15D
PUSH 0x1
PUSH RAX
PUSH R10
PUSH RAX
CALL 0x00139eef
ADD RSP,0x20
MOV RCX,-0x100000000
AND RCX,RAX
MOV R13D,EAX
LAB_00182e7c:
OR R13,RCX
MOV RAX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00182e91:
MOV RBP,RAX
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R13
MOV ECX,0x92
MOV R8,RAX
MOV R9,R13
PUSH 0x0
PUSH 0x0
CALL 0x0012384b
ADD RSP,0x10
MOV R8,RDX
CMP R13D,-0x9
JC 0x00182ee7
MOV RDI,qword ptr [R14 + 0x18]
MOV EDX,dword ptr [RBP]
LEA ECX,[RDX + -0x1]
MOV dword ptr [RBP],ECX
CMP EDX,0x1
JG 0x00182ee7
MOV RSI,RBP
MOV RDX,R13
MOV R13,R8
MOV RBP,RAX
CALL 0x001219cc
MOV RAX,RBP
MOV R8,R13
LAB_00182ee7:
XOR R13D,R13D
CMP R8D,0x3
JZ 0x00182e41
CMP R8D,0x6
JNZ 0x00182f02
MOV EDX,R8D
JMP 0x00182e0b
LAB_00182f02:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
MOV RDX,RAX
MOV RCX,R8
CALL 0x00127f66
TEST EAX,EAX
JNZ 0x00182e32
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RSP],RAX
SETBE CL
MOV RDX,0x20000000000000
CMP RAX,RDX
SETL DL
TEST CL,DL
JNZ 0x00182f56
LEA RSI,[0x1a55c2]
XOR R13D,R13D
MOV RDI,R14
XOR EAX,EAX
CALL 0x0012122c
JMP 0x00182e35
LAB_00182f56:
LEA R13,[RSP + 0x10]
MOV qword ptr [R13],RAX
JMP 0x00182e41
|
ulong js_array_buffer_constructor0
(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5,
int4 param_6)
{
int8 uVar1;
int iVar2;
int *piVar3;
ulong uVar4;
ulong uVar5;
int8 uVar6;
int1 *puVar7;
int1 auVar8 [16];
int1 auVar9 [16];
ulong local_48;
ulong local_40;
int1 local_38 [8];
iVar2 = JS_ToIndex(param_1,&local_48,*param_5,param_5[1]);
if (iVar2 != 0) {
LAB_00182e0b:
uVar4 = 0;
uVar5 = 0;
goto LAB_00182e7c;
}
if ((param_4 < 2) || ((int)param_5[3] != -1)) {
puVar7 = (int1 *)0x0;
LAB_00182e41:
uVar4 = js_array_buffer_constructor3
(param_1,param_2,param_3,local_48,puVar7,param_6,0,js_array_buffer_free,0,1);
uVar5 = uVar4 & 0xffffffff00000000;
uVar4 = uVar4 & 0xffffffff;
}
else {
auVar8 = JS_ToObject(param_1,param_5[2]);
uVar6 = auVar8._8_8_;
piVar3 = auVar8._0_8_;
if (auVar8._8_4_ != 6) {
auVar9 = JS_GetPropertyInternal2(param_1,piVar3,uVar6,0x92,piVar3,uVar6,0,0);
if (0xfffffff6 < auVar8._8_4_) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar3;
*piVar3 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar1,piVar3,uVar6);
}
}
puVar7 = (int1 *)0x0;
if (auVar9._8_4_ == 3) goto LAB_00182e41;
if (auVar9._8_4_ == 6) goto LAB_00182e0b;
iVar2 = JS_ToInt64Free(param_1,&local_40,auVar9._0_8_,auVar9._8_8_);
if (iVar2 == 0) {
if (local_48 <= local_40 && (long)local_40 < 0x20000000000000) {
puVar7 = local_38;
goto LAB_00182e41;
}
JS_ThrowRangeError(param_1,"invalid array buffer max length");
}
}
uVar4 = 0;
uVar5 = 0;
}
LAB_00182e7c:
return uVar4 | uVar5;
}
| |
38,481 | core_tensor_logic_dynamic_graph_init_op_Test::TestBody() | magnetron/test/unittests/tensor/core_logic.cpp | TEST(core_tensor_logic, dynamic_graph_init_op) {
context ctx {compute_device::cpu};
tensor a {ctx, dtype::e8m23, 10};
a.fill_rand_uniform(0.0f, 1.0f);
mag_tensor_t* ta {&*a};
ASSERT_EQ(ta->op, MAG_OP_NOP);
ASSERT_EQ(ta->flags, MAG_TFLAG_REQUIRES_GRAD|MAG_TFLAG_OWNER);
for (std::size_t i {}; i < k_max_input_tensors; ++i) {
ASSERT_EQ(ta->op_inputs[i], nullptr);
}
for (std::size_t i {}; i < k_max_op_params; ++i) {
ASSERT_EQ(mag_opp_unpack_type(ta->op_params[i]), MAG_OPP_NONE);
}
ASSERT_EQ(ta->init_op, MAG_IOP_RAND_UNIFORM);
ASSERT_EQ(mag_opp_unpack_type(ta->init_op_params[0]), MAG_OPP_E8M23);
ASSERT_FLOAT_EQ(mag_opp_unpack_e8m23_or_panic(ta->init_op_params[0]), 0.0f);
ASSERT_EQ(mag_opp_unpack_type(ta->init_op_params[1]), MAG_OPP_E8M23);
ASSERT_FLOAT_EQ(mag_opp_unpack_e8m23_or_panic(ta->init_op_params[1]), 1.0f);
} | O0 | cpp | core_tensor_logic_dynamic_graph_init_op_Test::TestBody():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x9ed60
movq -0x10(%rbp), %rax
leaq 0xb21a4(%rip), %rcx # 0x134d18
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN44core_tensor_logic_dynamic_graph_init_op_TestC2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN7testing4TestC2Ev; testing::Test::Test(void)
mov rax, [rbp+var_10]
lea rcx, _ZTV44core_tensor_logic_dynamic_graph_init_op_Test; `vtable for'core_tensor_logic_dynamic_graph_init_op_Test
add rcx, 10h
mov [rax], rcx
add rsp, 10h
pop rbp
retn
| void core_tensor_logic_dynamic_graph_init_op_Test::core_tensor_logic_dynamic_graph_init_op_Test(
core_tensor_logic_dynamic_graph_init_op_Test *this)
{
testing::Test::Test(this);
*(_QWORD *)this = &`vtable for'core_tensor_logic_dynamic_graph_init_op_Test + 2;
}
| core_tensor_logic_dynamic_graph_init_op_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x0019ed60
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x234d18]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x10
POP RBP
RET
|
/* core_tensor_logic_dynamic_graph_init_op_Test::core_tensor_logic_dynamic_graph_init_op_Test() */
void __thiscall
core_tensor_logic_dynamic_graph_init_op_Test::core_tensor_logic_dynamic_graph_init_op_Test
(core_tensor_logic_dynamic_graph_init_op_Test *this)
{
testing::Test::Test((Test *)this);
*(int ***)this = &PTR__core_tensor_logic_dynamic_graph_init_op_Test_00234d28;
return;
}
| |
38,482 | decltype(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>::Get(fp).MatchAndExplain(fp0, fp1->stream())) testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>>(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::MatchResultListener*) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/include/gtest/gtest-matchers.h | static const M& Get(const MatcherBase& m) {
return static_cast<Shared*>(m.buffer_.shared)->value;
} | O1 | c | decltype(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>::Get(fp).MatchAndExplain(fp0, fp1->stream())) testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>>(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::MatchResultListener*):
movq 0x10(%rdi), %rax
movq 0x8(%rsi), %rdx
cmpq 0x10(%rax), %rdx
jne 0x39b99
testq %rdx, %rdx
je 0x39b9c
pushq %rax
movq 0x8(%rax), %rax
movq (%rsi), %rdi
movq %rax, %rsi
callq 0x8500
testl %eax, %eax
sete %al
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
movb $0x1, %al
retq
nop
| _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE19MatchAndExplainImplINSA_11ValuePolicyINS0_9EqMatcherIS7_EELb0EEEEEDTcldtclsrT_3Getfp_E15MatchAndExplainfp0_clptfp1_6streamEEERKSA_S9_PNS_19MatchResultListenerE:
mov rax, [rdi+10h]
mov rdx, [rsi+8]
cmp rdx, [rax+10h]
jnz short loc_39B99
test rdx, rdx
jz short loc_39B9C
push rax
mov rax, [rax+8]
mov rdi, [rsi]
mov rsi, rax
call _bcmp
test eax, eax
setz al
add rsp, 8
retn
loc_39B99:
xor eax, eax
retn
loc_39B9C:
mov al, 1
retn
| bool testing::internal::MatcherBase<std::string const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::string const&>::ValuePolicy<testing::internal::EqMatcher<std::string>,false>>(
long long a1,
_QWORD *a2)
{
long long v2; // rax
long long v3; // rdx
v2 = *(_QWORD *)(a1 + 16);
v3 = a2[1];
if ( v3 != *(_QWORD *)(v2 + 16) )
return 0;
if ( v3 )
return (unsigned int)bcmp(*a2, *(_QWORD *)(v2 + 8)) == 0;
return 1;
}
| MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::string_const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>>:
MOV RAX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RSI + 0x8]
CMP RDX,qword ptr [RAX + 0x10]
JNZ 0x00139b99
TEST RDX,RDX
JZ 0x00139b9c
PUSH RAX
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RSI]
MOV RSI,RAX
CALL 0x00108500
TEST EAX,EAX
SETZ AL
ADD RSP,0x8
RET
LAB_00139b99:
XOR EAX,EAX
RET
LAB_00139b9c:
MOV AL,0x1
RET
|
/* decltype (((testing::internal::MatcherBase<std::__cxx11::string
const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string >,
false>::Get({parm#1})).MatchAndExplain)({parm#2}, ({parm#3}->stream)()))
testing::internal::MatcherBase<std::__cxx11::string
const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::string
const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string >, false>
>(testing::internal::MatcherBase<std::__cxx11::string const&> const&, std::__cxx11::string
const&, testing::MatchResultListener*) */
int8
testing::internal::MatcherBase<std::__cxx11::string_const&>::
MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::string_const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>>
(MatcherBase *param_1,string *param_2,MatchResultListener *param_3)
{
long lVar1;
size_t __n;
int iVar2;
int4 extraout_var;
lVar1 = *(long *)(param_1 + 0x10);
__n = *(size_t *)(param_2 + 8);
if (__n != *(size_t *)(lVar1 + 0x10)) {
return 0;
}
if (__n != 0) {
iVar2 = bcmp(*(void **)param_2,*(void **)(lVar1 + 8),__n);
return CONCAT71((int7)(CONCAT44(extraout_var,iVar2) >> 8),iVar2 == 0);
}
return CONCAT71((int7)((ulong)lVar1 >> 8),1);
}
| |
38,483 | LefDefParser::defiNonDefault::propNumber(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | double defiNonDefault::propNumber(int index) const {
char msg[160];
if (index < 0 || index >= numProps_) {
sprintf (msg, "ERROR (DEFPARS-6091): The index number %d specified for the NONDEFAULT PROPERTY is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numProps_);
defiError(0, 6091, msg, defData);
return 0;
}
return dvalues_[index];
} | O3 | cpp | LefDefParser::defiNonDefault::propNumber(int) const:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %esi, %edx
movq %rdi, %rbx
testl %esi, %esi
setns %al
movl 0x90(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x2c7e9
movq 0xa8(%rbx), %rax
movl %edx, %ecx
movsd (%rax,%rcx,8), %xmm0
jmp 0x2c816
leaq 0x19322(%rip), %rsi # 0x45b12
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x7060
movq 0xb8(%rbx), %rcx
xorl %edi, %edi
movl $0x17cb, %esi # imm = 0x17CB
movq %r14, %rdx
callq 0x1bb18
xorps %xmm0, %xmm0
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZNK12LefDefParser14defiNonDefault10propNumberEi:
push r14
push rbx
sub rsp, 0A8h
mov edx, esi
mov rbx, rdi
test esi, esi
setns al
mov ecx, [rdi+90h]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_2C7E9
mov rax, [rbx+0A8h]
mov ecx, edx
movsd xmm0, qword ptr [rax+rcx*8]
jmp short loc_2C816
loc_2C7E9:
lea rsi, aErrorDefpars60_9; "ERROR (DEFPARS-6091): The index number "...
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
mov rcx, [rbx+0B8h]; LefDefParser::defrData *
xor edi, edi; this
mov esi, 17CBh; int
mov rdx, r14; char *
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
xorps xmm0, xmm0
loc_2C816:
add rsp, 0A8h
pop rbx
pop r14
retn
| double LefDefParser::defiNonDefault::propNumber(LefDefParser::defiNonDefault *this, signed int a2)
{
int v2; // ecx
LefDefParser::defrData *v4; // r8
char v5[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 36);
if ( v2 > a2 && a2 >= 0 )
return *(double *)(*((_QWORD *)this + 21) + 8LL * (unsigned int)a2);
sprintf(
v5,
"ERROR (DEFPARS-6091): The index number %d specified for the NONDEFAULT PROPERTY is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
a2,
v2);
LefDefParser::defiError(0LL, 6091, v5, *((LefDefParser::defrData **)this + 23), v4);
return 0.0;
}
| propNumber:
PUSH R14
PUSH RBX
SUB RSP,0xa8
MOV EDX,ESI
MOV RBX,RDI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0x90]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0012c7e9
MOV RAX,qword ptr [RBX + 0xa8]
MOV ECX,EDX
MOVSD XMM0,qword ptr [RAX + RCX*0x8]
JMP 0x0012c816
LAB_0012c7e9:
LEA RSI,[0x145b12]
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00107060
MOV RCX,qword ptr [RBX + 0xb8]
XOR EDI,EDI
MOV ESI,0x17cb
MOV RDX,R14
CALL 0x0011bb18
XORPS XMM0,XMM0
LAB_0012c816:
ADD RSP,0xa8
POP RBX
POP R14
RET
|
/* LefDefParser::defiNonDefault::propNumber(int) const */
int8 __thiscall LefDefParser::defiNonDefault::propNumber(defiNonDefault *this,int param_1)
{
int8 uVar1;
char acStack_b8 [168];
if (param_1 < 0 || *(int *)(this + 0x90) <= param_1) {
sprintf(acStack_b8,
"ERROR (DEFPARS-6091): The index number %d specified for the NONDEFAULT PROPERTY is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
);
defiError(0,0x17cb,acStack_b8,*(defrData **)(this + 0xb8));
uVar1 = 0;
}
else {
uVar1 = *(int8 *)(*(long *)(this + 0xa8) + (ulong)(uint)param_1 * 8);
}
return uVar1;
}
| |
38,484 | lshift | eloqsql/strings/dtoa.c | static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc)
{
int i, k1, n, n1;
Bigint *b1;
ULong *x, *x1, *xe, z;
n= k >> 5;
k1= b->k;
n1= n + b->wds + 1;
for (i= b->maxwds; n1 > i; i<<= 1)
k1++;
b1= Balloc(k1, alloc);
x1= b1->p.x;
for (i= 0; i < n; i++)
*x1++= 0;
x= b->p.x;
xe= x + b->wds;
if (k&= 0x1f)
{
k1= 32 - k;
z= 0;
do
{
*x1++= *x << k | z;
z= *x++ >> k1;
}
while (x < xe);
if ((*x1= z))
++n1;
}
else
do
*x1++= *x++;
while (x < xe);
b1->wds= n1 - 1;
Bfree(b, alloc);
return b1;
} | O0 | c | lshift:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %eax
sarl $0x5, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
addl 0x14(%rcx), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0xdcbab
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x1c(%rbp)
jmp 0xdcb90
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0xdc420
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xdcbf5
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x40(%rbp)
movl $0x0, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xdcbcd
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x14(%rcx), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %eax
andl $0x1f, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
je 0xdcc94
movl $0x20, %eax
subl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl -0xc(%rbp), %ecx
shll %cl, %eax
movl %eax, %ecx
orl -0x4c(%rbp), %ecx
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x40(%rbp)
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %eax
movl -0x20(%rbp), %ecx
shrl %cl, %eax
movl %eax, -0x4c(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0xdcc37
movl -0x4c(%rbp), %eax
movq -0x40(%rbp), %rcx
movl %eax, (%rcx)
cmpl $0x0, %eax
je 0xdcc92
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xdccc4
jmp 0xdcc96
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %ecx
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x40(%rbp)
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0xdcc96
jmp 0xdccc4
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xdcad0
movq -0x30(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| lshift:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov eax, [rbp+var_C]
sar eax, 5
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_20], eax
mov eax, [rbp+var_24]
mov rcx, [rbp+var_8]
add eax, [rcx+14h]
add eax, 1
mov [rbp+var_28], eax
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
mov [rbp+var_1C], eax
loc_DCB90:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_1C]
jle short loc_DCBAB
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
mov eax, [rbp+var_1C]
shl eax, 1
mov [rbp+var_1C], eax
jmp short loc_DCB90
loc_DCBAB:
mov edi, [rbp+var_20]
mov rsi, [rbp+var_18]
call Balloc
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_40], rax
mov [rbp+var_1C], 0
loc_DCBCD:
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_24]
jge short loc_DCBF5
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 4
mov [rbp+var_40], rcx
mov dword ptr [rax], 0
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_DCBCD
loc_DCBF5:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+14h]
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
mov eax, [rbp+var_C]
and eax, 1Fh
mov [rbp+var_C], eax
cmp eax, 0
jz short loc_DCC94
mov eax, 20h ; ' '
sub eax, [rbp+var_C]
mov [rbp+var_20], eax
mov [rbp+var_4C], 0
loc_DCC37:
mov rax, [rbp+var_38]
mov eax, [rax]
mov ecx, [rbp+var_C]
shl eax, cl
mov ecx, eax
or ecx, [rbp+var_4C]
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 4
mov [rbp+var_40], rdx
mov [rax], ecx
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 4
mov [rbp+var_38], rcx
mov eax, [rax]
mov ecx, [rbp+var_20]
shr eax, cl
mov [rbp+var_4C], eax
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jb short loc_DCC37
mov eax, [rbp+var_4C]
mov rcx, [rbp+var_40]
mov [rcx], eax
cmp eax, 0
jz short loc_DCC92
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
loc_DCC92:
jmp short loc_DCCC4
loc_DCC94:
jmp short $+2
loc_DCC96:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 4
mov [rbp+var_38], rcx
mov ecx, [rax]
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 4
mov [rbp+var_40], rdx
mov [rax], ecx
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jb short loc_DCC96
jmp short $+2
loc_DCCC4:
mov ecx, [rbp+var_28]
sub ecx, 1
mov rax, [rbp+var_30]
mov [rax+14h], ecx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call Bfree
mov rax, [rbp+var_30]
add rsp, 50h
pop rbp
retn
| long long lshift(unsigned long long a1, int a2, unsigned long long *a3)
{
int *v3; // rax
int *v4; // rax
int *v5; // rax
int *v6; // rax
int v7; // ecx
int *v8; // rax
int v10; // [rsp+4h] [rbp-4Ch]
unsigned long long v11; // [rsp+8h] [rbp-48h]
int *v12; // [rsp+10h] [rbp-40h]
int *v13; // [rsp+18h] [rbp-38h]
long long v14; // [rsp+20h] [rbp-30h]
int v15; // [rsp+28h] [rbp-28h]
int v16; // [rsp+30h] [rbp-20h]
int i; // [rsp+34h] [rbp-1Ch]
int j; // [rsp+34h] [rbp-1Ch]
char v20; // [rsp+44h] [rbp-Ch]
v16 = *(_DWORD *)(a1 + 8);
v15 = *(_DWORD *)(a1 + 20) + (a2 >> 5) + 1;
for ( i = *(_DWORD *)(a1 + 12); v15 > i; i *= 2 )
++v16;
v14 = Balloc(v16, (long long)a3);
v12 = *(int **)v14;
for ( j = 0; j < a2 >> 5; ++j )
{
v3 = v12++;
*v3 = 0;
}
v13 = *(int **)a1;
v11 = 4LL * *(int *)(a1 + 20) + *(_QWORD *)a1;
v20 = a2 & 0x1F;
if ( (a2 & 0x1F) != 0 )
{
v10 = 0;
do
{
v4 = v12++;
*v4 = v10 | (*v13 << v20);
v5 = v13++;
v10 = (unsigned int)*v5 >> (32 - v20);
}
while ( (unsigned long long)v13 < v11 );
*v12 = v10;
if ( v10 )
++v15;
}
else
{
do
{
v6 = v13++;
v7 = *v6;
v8 = v12++;
*v8 = v7;
}
while ( (unsigned long long)v13 < v11 );
}
*(_DWORD *)(v14 + 20) = v15 - 1;
Bfree(a1, a3);
return v14;
}
| lshift:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV EAX,dword ptr [RBP + -0xc]
SAR EAX,0x5
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x8]
ADD EAX,dword ptr [RCX + 0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RBP + -0x1c],EAX
LAB_001dcb90:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x1c]
JLE 0x001dcbab
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x1c]
SHL EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001dcb90
LAB_001dcbab:
MOV EDI,dword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001dc420
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x1c],0x0
LAB_001dcbcd:
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x24]
JGE 0x001dcbf5
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x40],RCX
MOV dword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001dcbcd
LAB_001dcbf5:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0x14]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x1f
MOV dword ptr [RBP + -0xc],EAX
CMP EAX,0x0
JZ 0x001dcc94
MOV EAX,0x20
SUB EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x20],EAX
MOV dword ptr [RBP + -0x4c],0x0
LAB_001dcc37:
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
SHL EAX,CL
MOV ECX,EAX
OR ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x40],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x38],RCX
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
SHR EAX,CL
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x001dcc37
MOV EAX,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RBP + -0x40]
MOV dword ptr [RCX],EAX
CMP EAX,0x0
JZ 0x001dcc92
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
LAB_001dcc92:
JMP 0x001dccc4
LAB_001dcc94:
JMP 0x001dcc96
LAB_001dcc96:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x38],RCX
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x40],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x001dcc96
JMP 0x001dccc4
LAB_001dccc4:
MOV ECX,dword ptr [RBP + -0x28]
SUB ECX,0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x14],ECX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001dcad0
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x50
POP RBP
RET
|
int8 * lshift(int8 *param_1,uint param_2,int8 param_3)
{
sbyte sVar1;
int iVar2;
int8 *puVar3;
uint *puVar4;
uint *puVar5;
uint *puVar6;
uint local_54;
uint *local_48;
uint *local_40;
int local_30;
int local_28;
int local_24;
local_28 = *(int *)(param_1 + 1);
iVar2 = ((int)param_2 >> 5) + *(int *)((long)param_1 + 0x14);
local_30 = iVar2 + 1;
for (local_24 = *(int *)((long)param_1 + 0xc); local_24 < local_30; local_24 = local_24 << 1) {
local_28 = local_28 + 1;
}
puVar3 = (int8 *)Balloc(local_28,param_3);
local_48 = (uint *)*puVar3;
for (local_24 = 0; local_24 < (int)param_2 >> 5; local_24 = local_24 + 1) {
*local_48 = 0;
local_48 = local_48 + 1;
}
local_40 = (uint *)*param_1;
puVar4 = local_40 + *(int *)((long)param_1 + 0x14);
if ((param_2 & 0x1f) == 0) {
do {
puVar5 = local_40 + 1;
*local_48 = *local_40;
local_48 = local_48 + 1;
local_40 = puVar5;
} while (puVar5 < puVar4);
}
else {
sVar1 = (sbyte)(param_2 & 0x1f);
local_54 = 0;
do {
puVar6 = local_48 + 1;
*local_48 = *local_40 << sVar1 | local_54;
puVar5 = local_40 + 1;
local_54 = *local_40 >> (0x20U - sVar1 & 0x1f);
local_48 = puVar6;
local_40 = puVar5;
} while (puVar5 < puVar4);
*puVar6 = local_54;
if (local_54 != 0) {
local_30 = iVar2 + 2;
}
}
*(int *)((long)puVar3 + 0x14) = local_30 + -1;
Bfree(param_1,param_3);
return puVar3;
}
| |
38,485 | translog_start_buffer | eloqsql/storage/maria/ma_loghandler.c | static void translog_start_buffer(struct st_translog_buffer *buffer,
struct st_buffer_cursor *cursor,
uint buffer_no)
{
DBUG_ENTER("translog_start_buffer");
DBUG_PRINT("enter",
("Assign buffer: #%u (%p) offset: 0x%x(%u)",
(uint) buffer->buffer_no, buffer,
(uint) LSN_OFFSET(log_descriptor.horizon),
(uint) LSN_OFFSET(log_descriptor.horizon)));
DBUG_ASSERT(buffer_no == buffer->buffer_no);
buffer->pre_force_close_horizon=
buffer->prev_last_lsn= buffer->last_lsn= LSN_IMPOSSIBLE;
DBUG_PRINT("info", ("last_lsn and prev_last_lsn set to 0 buffer: %p",
buffer));
buffer->offset= log_descriptor.horizon;
buffer->next_buffer_offset= LSN_IMPOSSIBLE;
buffer->file= get_current_logfile();
buffer->overlay= 0;
buffer->size= 0;
buffer->skipped_data= 0;
translog_cursor_init(cursor, buffer, buffer_no);
DBUG_PRINT("info", ("file: #%ld (%d) init cursor #%u: %p "
"chaser: %d Size: %lu (%lu)",
(long) (buffer->file ? buffer->file->number : 0),
(buffer->file ? buffer->file->handler.file : -1),
(uint) cursor->buffer->buffer_no, cursor->buffer,
cursor->chaser, (ulong) cursor->buffer->size,
(ulong) (cursor->ptr - cursor->buffer->buffer)));
translog_check_cursor(cursor);
mysql_mutex_lock(&log_descriptor.dirty_buffer_mask_lock);
log_descriptor.dirty_buffer_mask|= (1 << buffer->buffer_no);
mysql_mutex_unlock(&log_descriptor.dirty_buffer_mask_lock);
DBUG_VOID_RETURN;
} | O3 | c | translog_start_buffer:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
xorl %r12d, %r12d
movq %r12, 0x100028(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x100000(%rdi)
movq 0xbcb541(%rip), %rax # 0xbfeb38
movq %rax, 0x100010(%rdi)
movq %r12, 0x100018(%rdi)
callq 0x39880
movq %rax, 0x100038(%rbx)
movb %r12b, 0x100088(%rbx)
movq %r12, 0x100030(%rbx)
movq %rbx, 0x20(%r15)
movq %rbx, 0x28(%r15)
movb %r14b, 0x36(%r15)
movw $0x0, 0x30(%r15)
leaq 0xbcb507(%rip), %rax # 0xbfeb40
cmpq %rax, %r15
setne 0x37(%r15)
movl $0x0, 0x32(%r15)
movb %r12b, 0x38(%r15)
cmpq %r12, 0xbcb4dc(%rip) # 0xbfeb30
jne 0x33695
leaq 0xbcb493(%rip), %rdi # 0xbfeaf0
callq 0x29200
movb 0x10008c(%rbx), %cl
movl $0x1, %eax
shll %cl, %eax
orb %al, 0xbcb473(%rip) # 0xbfeae8
movq 0xbcb4b4(%rip), %rdi # 0xbfeb30
testq %rdi, %rdi
jne 0x3369c
leaq 0xbcb468(%rip), %rdi # 0xbfeaf0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x291c0
callq 0x2b81a
jmp 0x33662
leaq 0x35296d(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x33681
| translog_start_buffer:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14d, edx
mov r15, rsi
mov rbx, rdi
xor r12d, r12d
mov ds:qword_100028[rdi], r12
xorps xmm0, xmm0
movups ds:xmmword_100000[rdi], xmm0
mov rax, cs:qword_BFEB38
mov ds:qword_100010[rdi], rax
mov ds:qword_100018[rdi], r12
call get_current_logfile
mov ds:qword_100038[rbx], rax
mov ds:byte_100088[rbx], r12b
mov ds:qword_100030[rbx], r12
mov [r15+20h], rbx
mov [r15+28h], rbx
mov [r15+36h], r14b
mov word ptr [r15+30h], 0
lea rax, xmmword_BFEB40
cmp r15, rax
setnz byte ptr [r15+37h]
mov dword ptr [r15+32h], 0
mov [r15+38h], r12b
cmp cs:qword_BFEB30, r12
jnz short loc_33695
lea rdi, unk_BFEAF0
call _pthread_mutex_lock
loc_33662:
mov cl, byte ptr ds:dword_10008C[rbx]
mov eax, 1
shl eax, cl
or cs:byte_BFEAE8, al
mov rdi, cs:qword_BFEB30
test rdi, rdi
jnz short loc_3369C
loc_33681:
lea rdi, unk_BFEAF0
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_33695:
call translog_start_buffer_cold_1
jmp short loc_33662
loc_3369C:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_33681
| long long translog_start_buffer(long long a1, __int128 *a2, char a3)
{
*(long long *)((char *)&qword_100028 + a1) = 0LL;
*(__int128 *)((char *)&xmmword_100000 + a1) = 0LL;
*(long long *)((char *)&qword_100010 + a1) = qword_BFEB38;
*(long long *)((char *)&qword_100018 + a1) = 0LL;
*(long long *)((char *)&qword_100038 + a1) = get_current_logfile();
byte_100088[a1] = 0;
*(long long *)((char *)&qword_100030 + a1) = 0LL;
*((_QWORD *)a2 + 4) = a1;
*((_QWORD *)a2 + 5) = a1;
*((_BYTE *)a2 + 54) = a3;
*((_WORD *)a2 + 24) = 0;
*((_BYTE *)a2 + 55) = a2 != &xmmword_BFEB40;
*(_DWORD *)((char *)a2 + 50) = 0;
*((_BYTE *)a2 + 56) = 0;
if ( qword_BFEB30 )
translog_start_buffer_cold_1();
else
pthread_mutex_lock(&unk_BFEAF0);
byte_BFEAE8 |= 1 << *((_BYTE *)&dword_10008C + a1);
if ( qword_BFEB30 )
PSI_server[44]();
return pthread_mutex_unlock(&unk_BFEAF0);
}
| translog_start_buffer:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14D,EDX
MOV R15,RSI
MOV RBX,RDI
XOR R12D,R12D
MOV qword ptr [RDI + 0x100028],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x100000],XMM0
MOV RAX,qword ptr [0x00cfeb38]
MOV qword ptr [RDI + 0x100010],RAX
MOV qword ptr [RDI + 0x100018],R12
CALL 0x00139880
MOV qword ptr [RBX + 0x100038],RAX
MOV byte ptr [RBX + 0x100088],R12B
MOV qword ptr [RBX + 0x100030],R12
MOV qword ptr [R15 + 0x20],RBX
MOV qword ptr [R15 + 0x28],RBX
MOV byte ptr [R15 + 0x36],R14B
MOV word ptr [R15 + 0x30],0x0
LEA RAX,[0xcfeb40]
CMP R15,RAX
SETNZ byte ptr [R15 + 0x37]
MOV dword ptr [R15 + 0x32],0x0
MOV byte ptr [R15 + 0x38],R12B
CMP qword ptr [0x00cfeb30],R12
JNZ 0x00133695
LEA RDI,[0xcfeaf0]
CALL 0x00129200
LAB_00133662:
MOV CL,byte ptr [RBX + 0x10008c]
MOV EAX,0x1
SHL EAX,CL
OR byte ptr [0x00cfeae8],AL
MOV RDI,qword ptr [0x00cfeb30]
TEST RDI,RDI
JNZ 0x0013369c
LAB_00133681:
LEA RDI,[0xcfeaf0]
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001291c0
LAB_00133695:
CALL 0x0012b81a
JMP 0x00133662
LAB_0013369c:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00133681
|
void translog_start_buffer(long param_1,int *param_2,int1 param_3)
{
int8 uVar1;
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x1f) = 0;
*(int8 *)(param_1 + 0x100000) = 0;
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + -1) = 0;
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) = DAT_00cfeb38;
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0xf) = 0;
uVar1 = get_current_logfile();
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) = uVar1;
*(int1 *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1) = 0;
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x27) = 0;
*(long *)(param_2 + 0x20) = param_1;
*(long *)(param_2 + 0x28) = param_1;
param_2[0x36] = param_3;
*(int2 *)(param_2 + 0x30) = 0;
param_2[0x37] = param_2 != &DAT_00cfeb40;
*(int4 *)(param_2 + 0x32) = 0;
param_2[0x38] = 0;
if (DAT_00cfeb30 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00cfeaf0);
}
else {
translog_start_buffer_cold_1();
}
DAT_00cfeae8 = DAT_00cfeae8 |
(byte)(1 << (*(byte *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1 + 4) &
0x1f));
if (DAT_00cfeb30 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00cfeaf0);
return;
}
| |
38,486 | ggml_opt_dataset_free | ngxson[P]ggml-easy/ggml/src/ggml-opt.cpp | void ggml_opt_dataset_free(ggml_opt_dataset_t dataset) {
ggml_backend_buffer_free(dataset->buf);
ggml_free(dataset->ctx);
delete dataset;
} | O3 | cpp | ggml_opt_dataset_free:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x17d00
movq (%rbx), %rdi
callq 0x16270
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x29137
movq 0x50(%rbx), %rsi
subq %rdi, %rsi
callq 0x17070
movl $0x58, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x17070
| ggml_opt_dataset_free:
push rbx
mov rbx, rdi
mov rdi, [rdi+8]; void *
call _ggml_backend_buffer_free
mov rdi, [rbx]
call _ggml_free
mov rdi, [rbx+40h]; void *
test rdi, rdi
jz short loc_29137
mov rsi, [rbx+50h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29137:
mov esi, 58h ; 'X'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void ggml_opt_dataset_free(void **a1)
{
void *v2; // rdi
ggml_backend_buffer_free(a1[1]);
ggml_free(*a1);
v2 = a1[8];
if ( v2 )
operator delete(v2, (_BYTE *)a1[10] - (_BYTE *)v2);
operator delete(a1, 0x58uLL);
}
| ggml_opt_dataset_free:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
CALL 0x00117d00
MOV RDI,qword ptr [RBX]
CALL 0x00116270
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00129137
MOV RSI,qword ptr [RBX + 0x50]
SUB RSI,RDI
CALL 0x00117070
LAB_00129137:
MOV ESI,0x58
MOV RDI,RBX
POP RBX
JMP 0x00117070
|
void ggml_opt_dataset_free(int8 *param_1)
{
void *pvVar1;
ggml_backend_buffer_free(param_1[1]);
ggml_free(*param_1);
pvVar1 = (void *)param_1[8];
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,param_1[10] - (long)pvVar1);
}
operator_delete(param_1,0x58);
return;
}
| |
38,487 | init_signals() | eloqsql/sql/mysqld.cc | void init_signals(void)
{
sigset_t set;
struct sigaction sa;
DBUG_ENTER("init_signals");
my_sigset(THR_SERVER_ALARM,print_signal_warning); // Should never be called!
if (opt_stack_trace || (test_flags & TEST_CORE_ON_SIGNAL))
{
sa.sa_flags = SA_RESETHAND | SA_NODEFER;
sigemptyset(&sa.sa_mask);
sigprocmask(SIG_SETMASK,&sa.sa_mask,NULL);
#if defined(__amiga__)
sa.sa_handler=(void(*)())handle_fatal_signal;
#else
sa.sa_handler=handle_fatal_signal;
#endif
sigaction(SIGSEGV, &sa, NULL);
sigaction(SIGABRT, &sa, NULL);
#ifdef SIGBUS
sigaction(SIGBUS, &sa, NULL);
#endif
sigaction(SIGILL, &sa, NULL);
sigaction(SIGFPE, &sa, NULL);
}
#ifdef HAVE_GETRLIMIT
if (test_flags & TEST_CORE_ON_SIGNAL)
{
/* Change limits so that we will get a core file */
STRUCT_RLIMIT rl;
rl.rlim_cur = rl.rlim_max = (rlim_t) RLIM_INFINITY;
if (setrlimit(RLIMIT_CORE, &rl) && global_system_variables.log_warnings)
sql_print_warning("setrlimit could not change the size of core files to 'infinity'; We may not be able to generate a core file on signals");
}
#endif
(void) sigemptyset(&set);
my_sigset(SIGPIPE,SIG_IGN);
sigaddset(&set,SIGPIPE);
#ifndef IGNORE_SIGHUP_SIGQUIT
sigaddset(&set,SIGQUIT);
sigaddset(&set,SIGHUP);
#endif
sigaddset(&set,SIGTERM);
/* Fix signals if blocked by parents (can happen on Mac OS X) */
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sa.sa_handler = print_signal_warning;
sigaction(SIGTERM, &sa, (struct sigaction*) 0);
sa.sa_flags = 0;
sa.sa_handler = print_signal_warning;
sigaction(SIGHUP, &sa, (struct sigaction*) 0);
sigaddset(&set,THR_SERVER_ALARM);
if (test_flags & TEST_SIGINT)
{
/* Allow SIGINT to break mysqld. This is for debugging with --gdb */
my_sigset(SIGINT, end_mysqld_signal);
sigdelset(&set, SIGINT);
}
else
{
sigaddset(&set,SIGINT);
#ifdef SIGTSTP
sigaddset(&set,SIGTSTP);
#endif
}
sigprocmask(SIG_SETMASK,&set,NULL);
pthread_sigmask(SIG_SETMASK,&set,NULL);
DBUG_VOID_RETURN;
} | O0 | cpp | init_signals():
pushq %rbp
movq %rsp, %rbp
subq $0x470, %rsp # imm = 0x470
jmp 0x89058d
jmp 0x89058f
leaq -0x230(%rbp), %rdi
callq 0x775cb0
leaq -0xa72(%rip), %rax # 0x88fb30
movq %rax, -0x1b0(%rbp)
leaq -0x1b0(%rbp), %rdi
addq $0x8, %rdi
leaq -0x230(%rbp), %rsi
movl $0x80, %edx
callq 0x776440
movl $0x0, -0x128(%rbp)
movl $0xe, %edi
leaq -0x1b0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x775bc0
cmpb $0x0, 0x14ba845(%rip) # 0x1d4ae30
jne 0x890604
movq 0x14b776c(%rip), %rax # 0x1d47d60
andq $0x100, %rax # imm = 0x100
cmpq $0x0, %rax
je 0x8906ae
movl $0xc0000000, -0x90(%rbp) # imm = 0xC0000000
leaq -0x118(%rbp), %rdi
addq $0x8, %rdi
callq 0x775cb0
leaq -0x118(%rbp), %rsi
addq $0x8, %rsi
movl $0x2, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x777050
leaq 0x477672(%rip), %rax # 0xd07cb0
movq %rax, -0x118(%rbp)
movl $0xb, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x775bc0
movl $0x6, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x775bc0
movl $0x7, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x775bc0
movl $0x4, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x775bc0
movl $0x8, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x775bc0
movq 0x14b76ab(%rip), %rax # 0x1d47d60
andq $0x100, %rax # imm = 0x100
cmpq $0x0, %rax
je 0x890713
movq $-0x1, -0x238(%rbp)
movq $-0x1, -0x240(%rbp)
movl $0x4, %edi
leaq -0x240(%rbp), %rsi
callq 0x776db0
cmpl $0x0, %eax
je 0x890711
cmpq $0x0, 0x14b8d6b(%rip) # 0x1d49460
je 0x890711
leaq 0xb7c15f(%rip), %rdi # 0x140c85d
movl $0xbe0, %esi # imm = 0xBE0
leaq 0xb7c264(%rip), %rdx # 0x140c96e
movb $0x0, %al
callq 0x84cd00
jmp 0x890713
leaq -0x80(%rbp), %rdi
callq 0x775cb0
jmp 0x89071e
jmp 0x890720
leaq -0x358(%rbp), %rdi
callq 0x775cb0
movl $0x1, %eax
movq %rax, -0x2d8(%rbp)
leaq -0x2d8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x358(%rbp), %rsi
movl $0x80, %edx
callq 0x776440
movl $0x0, -0x250(%rbp)
movl $0xd, %edi
leaq -0x2d8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x775bc0
leaq -0x80(%rbp), %rdi
movl $0xd, %esi
callq 0x775ea0
leaq -0x80(%rbp), %rdi
movl $0x3, %esi
callq 0x775ea0
leaq -0x80(%rbp), %rdi
movl $0x1, %esi
callq 0x775ea0
leaq -0x80(%rbp), %rdi
movl $0xf, %esi
callq 0x775ea0
leaq -0x118(%rbp), %rdi
addq $0x8, %rdi
callq 0x775cb0
movl $0x0, -0x90(%rbp)
leaq -0xc9c(%rip), %rax # 0x88fb30
movq %rax, -0x118(%rbp)
movl $0xf, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x775bc0
movl $0x0, -0x90(%rbp)
leaq -0xcc9(%rip), %rax # 0x88fb30
movq %rax, -0x118(%rbp)
movl $0x1, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x775bc0
leaq -0x80(%rbp), %rdi
movl $0xe, %esi
callq 0x775ea0
movq 0x14b7536(%rip), %rax # 0x1d47d60
andq $0x400, %rax # imm = 0x400
cmpq $0x0, %rax
je 0x8908a1
jmp 0x890838
jmp 0x89083a
jmp 0x89083c
leaq -0x470(%rbp), %rdi
callq 0x775cb0
leaq -0x39f(%rip), %rax # 0x8904b0
movq %rax, -0x3f0(%rbp)
leaq -0x3f0(%rbp), %rdi
addq $0x8, %rdi
leaq -0x470(%rbp), %rsi
movl $0x80, %edx
callq 0x776440
movl $0x0, -0x368(%rbp)
movl $0x2, %edi
leaq -0x3f0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x775bc0
leaq -0x80(%rbp), %rdi
movl $0x2, %esi
callq 0x776b90
jmp 0x8908bd
leaq -0x80(%rbp), %rdi
movl $0x2, %esi
callq 0x775ea0
leaq -0x80(%rbp), %rdi
movl $0x14, %esi
callq 0x775ea0
movl $0x2, %edi
leaq -0x80(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x777050
movl $0x2, %edi
leaq -0x80(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x775350
jmp 0x8908e3
addq $0x470, %rsp # imm = 0x470
popq %rbp
retq
nopl (%rax)
| _Z12init_signalsv:
push rbp
mov rbp, rsp
sub rsp, 470h
jmp short $+2
loc_89058D:
jmp short $+2
loc_89058F:
lea rdi, [rbp+var_230]
call _sigemptyset
lea rax, print_signal_warning
mov [rbp+var_1B0], rax
lea rdi, [rbp+var_1B0]
add rdi, 8
lea rsi, [rbp+var_230]
mov edx, 80h
call _memcpy
mov [rbp+var_128], 0
mov edi, 0Eh
lea rsi, [rbp+var_1B0]
xor eax, eax
mov edx, eax
call _sigaction
cmp cs:opt_stack_trace, 0
jnz short loc_890604
mov rax, cs:test_flags
and rax, 100h
cmp rax, 0
jz loc_8906AE
loc_890604:
mov [rbp+var_90], 0C0000000h
lea rdi, [rbp+var_118]
add rdi, 8
call _sigemptyset
lea rsi, [rbp+var_118]
add rsi, 8
mov edi, 2
xor eax, eax
mov edx, eax
call _sigprocmask
lea rax, handle_fatal_signal
mov [rbp+var_118], rax
mov edi, 0Bh
lea rsi, [rbp+var_118]
xor eax, eax
mov edx, eax
call _sigaction
mov edi, 6
lea rsi, [rbp+var_118]
xor eax, eax
mov edx, eax
call _sigaction
mov edi, 7
lea rsi, [rbp+var_118]
xor eax, eax
mov edx, eax
call _sigaction
mov edi, 4
lea rsi, [rbp+var_118]
xor eax, eax
mov edx, eax
call _sigaction
mov edi, 8
lea rsi, [rbp+var_118]
xor eax, eax
mov edx, eax
call _sigaction
loc_8906AE:
mov rax, cs:test_flags
and rax, 100h
cmp rax, 0
jz short loc_890713
mov [rbp+var_238], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_240], 0FFFFFFFFFFFFFFFFh
mov edi, 4
lea rsi, [rbp+var_240]
call _setrlimit64
cmp eax, 0
jz short loc_890711
cmp cs:qword_1D49460, 0
jz short loc_890711
lea rdi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 0BE0h; int
lea rdx, aSetrlimitCould; "setrlimit could not change the size of "...
mov al, 0
call _Z18glog_print_warningPKciS0_z; glog_print_warning(char const*,int,char const*,...)
loc_890711:
jmp short $+2
loc_890713:
lea rdi, [rbp+var_80]
call _sigemptyset
jmp short $+2
loc_89071E:
jmp short $+2
loc_890720:
lea rdi, [rbp+var_358]
call _sigemptyset
mov eax, 1
mov [rbp+var_2D8], rax
lea rdi, [rbp+var_2D8]
add rdi, 8
lea rsi, [rbp+var_358]
mov edx, 80h
call _memcpy
mov [rbp+var_250], 0
mov edi, 0Dh
lea rsi, [rbp+var_2D8]
xor eax, eax
mov edx, eax
call _sigaction
lea rdi, [rbp+var_80]
mov esi, 0Dh
call _sigaddset
lea rdi, [rbp+var_80]
mov esi, 3
call _sigaddset
lea rdi, [rbp+var_80]
mov esi, 1
call _sigaddset
lea rdi, [rbp+var_80]
mov esi, 0Fh
call _sigaddset
lea rdi, [rbp+var_118]
add rdi, 8
call _sigemptyset
mov [rbp+var_90], 0
lea rax, print_signal_warning
mov [rbp+var_118], rax
mov edi, 0Fh
lea rsi, [rbp+var_118]
xor eax, eax
mov edx, eax
call _sigaction
mov [rbp+var_90], 0
lea rax, print_signal_warning
mov [rbp+var_118], rax
mov edi, 1
lea rsi, [rbp+var_118]
xor eax, eax
mov edx, eax
call _sigaction
lea rdi, [rbp+var_80]
mov esi, 0Eh
call _sigaddset
mov rax, cs:test_flags
and rax, 400h
cmp rax, 0
jz short loc_8908A1
jmp short $+2
loc_890838:
jmp short $+2
loc_89083A:
jmp short $+2
loc_89083C:
lea rdi, [rbp+var_470]
call _sigemptyset
lea rax, end_mysqld_signal
mov [rbp+var_3F0], rax
lea rdi, [rbp+var_3F0]
add rdi, 8
lea rsi, [rbp+var_470]
mov edx, 80h
call _memcpy
mov [rbp+var_368], 0
mov edi, 2
lea rsi, [rbp+var_3F0]
xor eax, eax
mov edx, eax
call _sigaction
lea rdi, [rbp+var_80]
mov esi, 2
call _sigdelset
jmp short loc_8908BD
loc_8908A1:
lea rdi, [rbp+var_80]
mov esi, 2
call _sigaddset
lea rdi, [rbp+var_80]
mov esi, 14h
call _sigaddset
loc_8908BD:
mov edi, 2
lea rsi, [rbp+var_80]
xor eax, eax
mov edx, eax
call _sigprocmask
mov edi, 2
lea rsi, [rbp+var_80]
xor eax, eax
mov edx, eax
call _pthread_sigmask
jmp short $+2
loc_8908E3:
add rsp, 470h
pop rbp
retn
| long long init_signals(void)
{
_BYTE v1[128]; // [rsp+0h] [rbp-470h] BYREF
char (*v2)(); // [rsp+80h] [rbp-3F0h] BYREF
_DWORD v3[36]; // [rsp+88h] [rbp-3E8h] BYREF
_BYTE v4[128]; // [rsp+118h] [rbp-358h] BYREF
long long v5; // [rsp+198h] [rbp-2D8h] BYREF
_DWORD v6[36]; // [rsp+1A0h] [rbp-2D0h] BYREF
_QWORD v7[2]; // [rsp+230h] [rbp-240h] BYREF
_BYTE v8[128]; // [rsp+240h] [rbp-230h] BYREF
__va_list_tag *( *v9)(int); // [rsp+2C0h] [rbp-1B0h] BYREF
_DWORD v10[36]; // [rsp+2C8h] [rbp-1A8h] BYREF
__va_list_tag *( *v11)(int); // [rsp+358h] [rbp-118h] BYREF
_BYTE v12[128]; // [rsp+360h] [rbp-110h] BYREF
int v13; // [rsp+3E0h] [rbp-90h]
_BYTE v14[128]; // [rsp+3F0h] [rbp-80h] BYREF
sigemptyset(v8);
v9 = print_signal_warning;
memcpy(v10, v8, 128LL);
v10[32] = 0;
sigaction(14LL, &v9, 0LL);
if ( opt_stack_trace || (test_flags & 0x100) != 0 )
{
v13 = -1073741824;
sigemptyset(v12);
sigprocmask(2LL, v12, 0LL);
v11 = (__va_list_tag *( *)(int))handle_fatal_signal;
sigaction(11LL, &v11, 0LL);
sigaction(6LL, &v11, 0LL);
sigaction(7LL, &v11, 0LL);
sigaction(4LL, &v11, 0LL);
sigaction(8LL, &v11, 0LL);
}
if ( (test_flags & 0x100) != 0 )
{
v7[1] = -1LL;
v7[0] = -1LL;
if ( (unsigned int)setrlimit64(4LL, v7) )
{
if ( qword_1D49460 )
glog_print_warning(
"/workspace/llm4binary/github2025/eloqsql/sql/mysqld.cc",
0xBE0u,
"setrlimit could not change the size of core files to 'infinity'; We may not be able to generate a core file on signals");
}
}
sigemptyset(v14);
sigemptyset(v4);
v5 = 1LL;
memcpy(v6, v4, 128LL);
v6[32] = 0;
sigaction(13LL, &v5, 0LL);
sigaddset(v14, 13LL);
sigaddset(v14, 3LL);
sigaddset(v14, 1LL);
sigaddset(v14, 15LL);
sigemptyset(v12);
v13 = 0;
v11 = print_signal_warning;
sigaction(15LL, &v11, 0LL);
v13 = 0;
v11 = print_signal_warning;
sigaction(1LL, &v11, 0LL);
sigaddset(v14, 14LL);
if ( (test_flags & 0x400) != 0 )
{
sigemptyset(v1);
v2 = end_mysqld_signal;
memcpy(v3, v1, 128LL);
v3[32] = 0;
sigaction(2LL, &v2, 0LL);
sigdelset(v14, 2LL);
}
else
{
sigaddset(v14, 2LL);
sigaddset(v14, 20LL);
}
sigprocmask(2LL, v14, 0LL);
return pthread_sigmask(2LL, v14, 0LL);
}
| __cxx_global_var_init.12:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x1e5a450]
MOV ESI,0x40
CALL 0x008fd550
POP RBP
RET
|
void __cxx_global_var_init_12(void)
{
time_round_mode_t::time_round_mode_t((time_round_mode_t *)&TIME_FRAC_ROUND,0x40);
return;
}
| |
38,488 | nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::parse(bool, 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>&) | msxemulator/build_O3/_deps/picotool-src/lib/nlohmann_json/single_include/nlohmann/json.hpp | void parse(const bool strict, BasicJsonType& result)
{
if (callback)
{
json_sax_dom_callback_parser<BasicJsonType> sdp(result, callback, allow_exceptions);
sax_parse_internal(&sdp);
// in strict mode, input must be completely read
if (strict && (get_token() != token_type::end_of_input))
{
sdp.parse_error(m_lexer.get_position(),
m_lexer.get_token_string(),
parse_error::create(101, m_lexer.get_position(),
exception_message(token_type::end_of_input, "value"), nullptr));
}
// in case of an error, return discarded value
if (sdp.is_errored())
{
result = value_t::discarded;
return;
}
// set top-level value to null if it was discarded by the callback
// function
if (result.is_discarded())
{
result = nullptr;
}
}
else
{
json_sax_dom_parser<BasicJsonType> sdp(result, allow_exceptions);
sax_parse_internal(&sdp);
// in strict mode, input must be completely read
if (strict && (get_token() != token_type::end_of_input))
{
sdp.parse_error(m_lexer.get_position(),
m_lexer.get_token_string(),
parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), nullptr));
}
// in case of an error, return discarded value
if (sdp.is_errored())
{
result = value_t::discarded;
return;
}
}
result.assert_invariant();
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::parse(bool, 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>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp # imm = 0x1B0
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
je 0x650bb
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x64e90
movzbl 0xc0(%r14), %ecx
leaq 0xc8(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x65bd4
movq 0xb8(%rsp), %rax
testq %rax, %rax
je 0x64f5d
leaq 0xa8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xc8(%rsp), %rsi
movq %r14, %rdi
callq 0x65cb6
testb %bpl, %bpl
je 0x65099
leaq 0x28(%r14), %r12
movq %r12, %rdi
callq 0x6559e
movl %eax, 0x20(%r14)
cmpl $0xf, %eax
je 0x65099
movq 0x48(%r14), %r15
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
callq 0x66a0e
leaq 0x48(%r14), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0xa0(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0x90(%rsp)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4a39a(%rip), %rsi # 0xaf366
leaq 0x4a398(%rip), %rdx # 0xaf36b
leaq 0x8(%rsp), %rdi
callq 0x5c00c
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rcx
movq %r14, %rsi
movl $0xf, %edx
callq 0x66cc6
leaq 0x68(%rsp), %rdi
leaq 0x90(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movl $0x65, %esi
xorl %r8d, %r8d
callq 0x66ac8
leaq 0xc8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r15, %rsi
callq 0x669c8
leaq 0x7ba2c(%rip), %rax # 0xe0a60
leaq 0x78(%rsp), %rdi
movq %rax, -0x10(%rdi)
callq 0xf480
leaq 0x68(%rsp), %rdi
callq 0xf888
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x65067
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xf470
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6507e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf470
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x65099
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xf470
cmpb $0x0, 0x140(%rsp)
je 0x65260
movb (%rbx), %al
movb $0x9, (%rbx)
leaq 0x1a0(%rsp), %rdi
movb %al, (%rdi)
jmp 0x65273
movb 0xc0(%r14), %al
leaq 0xc8(%rsp), %rsi
movq %rbx, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
movups %xmm0, 0x18(%rsi)
movb $0x0, 0x28(%rsi)
movb %al, 0x29(%rsi)
movq %r14, %rdi
callq 0x67040
testb %bpl, %bpl
je 0x65213
leaq 0x28(%r14), %r12
movq %r12, %rdi
callq 0x6559e
movl %eax, 0x20(%r14)
cmpl $0xf, %eax
je 0x65213
movq 0x48(%r14), %r15
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
callq 0x66a0e
leaq 0x48(%r14), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0xa0(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0x90(%rsp)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4a220(%rip), %rsi # 0xaf366
leaq 0x4a21e(%rip), %rdx # 0xaf36b
leaq 0x8(%rsp), %rdi
callq 0x5c00c
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rcx
movq %r14, %rsi
movl $0xf, %edx
callq 0x66cc6
leaq 0x68(%rsp), %rdi
leaq 0x90(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movl $0x65, %esi
xorl %r8d, %r8d
callq 0x66ac8
leaq 0xc8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r15, %rsi
callq 0x67d28
leaq 0x7b8b2(%rip), %rax # 0xe0a60
leaq 0x78(%rsp), %rdi
movq %rax, -0x10(%rdi)
callq 0xf480
leaq 0x68(%rsp), %rdi
callq 0xf888
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x651e1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xf470
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x651f8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf470
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x65213
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xf470
cmpb $0x1, 0xf0(%rsp)
jne 0x65241
movb (%rbx), %al
movb $0x9, (%rbx)
leaq 0x180(%rsp), %rdi
movb %al, (%rdi)
movq 0x8(%rbx), %rax
movq $0x0, 0x8(%rbx)
movq %rax, 0x8(%rdi)
callq 0x5c638
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x65295
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0xf470
jmp 0x65295
cmpb $0x9, (%rbx)
jne 0x65288
movb $0x0, (%rbx)
leaq 0x190(%rsp), %rdi
movb $0x9, (%rdi)
movq 0x8(%rbx), %rax
movq $0x0, 0x8(%rbx)
movq %rax, 0x8(%rdi)
callq 0x5c638
leaq 0xc8(%rsp), %rdi
callq 0x66fdc
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x7b7b1(%rip), %rax # 0xe0a60
leaq 0x78(%rsp), %rdi
movq %rax, -0x10(%rdi)
callq 0xf480
leaq 0x68(%rsp), %rdi
callq 0xf888
jmp 0x652cc
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x652ec
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xf470
jmp 0x652ec
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x65308
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf470
jmp 0x65308
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x653b8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xf470
jmp 0x653b8
jmp 0x653b5
movq %rax, %rbx
leaq 0x7b725(%rip), %rax # 0xe0a60
leaq 0x78(%rsp), %rdi
movq %rax, -0x10(%rdi)
callq 0xf480
leaq 0x68(%rsp), %rdi
callq 0xf888
jmp 0x65358
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x65378
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xf470
jmp 0x65378
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x65394
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf470
jmp 0x65394
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x65406
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xf470
jmp 0x65406
jmp 0x65403
jmp 0x653fb
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x65413
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0xf470
jmp 0x65413
movq %rax, %rbx
movq 0xb8(%rsp), %rax
testq %rax, %rax
je 0x65413
leaq 0xa8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x65413
movq %rax, %rdi
callq 0x1d2b2
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x66fdc
movq %rbx, %rdi
callq 0xf7d0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE5parseEbRSF_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 1B0h
mov rbx, rdx
mov ebp, esi
mov r14, rdi
cmp qword ptr [rdi+10h], 0
jz loc_650BB
lea r15, [rsp+1D8h+var_130]
mov rdi, r15
mov rsi, r14
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&)
movzx ecx, byte ptr [r14+0C0h]
lea rdi, [rsp+1D8h+var_110]
mov rsi, rbx
mov rdx, r15
call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_sax_dom_callback_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>&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)>,bool)
mov rax, [rsp+1D8h+var_120]
test rax, rax
jz short loc_64F5D
lea rdi, [rsp+1D8h+var_130]
mov rsi, rdi
mov edx, 3
call rax
loc_64F5D:
lea rsi, [rsp+1D8h+var_110]
mov rdi, r14; int
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE18sax_parse_internalINS1_28json_sax_dom_callback_parserISF_EEEEbPT_; nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::sax_parse_internal<nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>(nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *)
test bpl, bpl
jz loc_65099
lea r12, [r14+28h]
mov rdi, r12; this
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE4scanEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::scan(void)
mov [r14+20h], eax
cmp eax, 0Fh
jz loc_65099
mov r15, [r14+48h]
lea rdi, [rsp+1D8h+var_190]
mov rsi, r12
call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::get_token_string(void)
lea rax, [r14+48h]
mov rcx, [rax+10h]
mov [rsp+1D8h+var_138], rcx
movups xmm0, xmmword ptr [rax]
movaps xmmword ptr [rsp+1D8h+var_148], xmm0; __int64
lea r12, [rsp+1D8h+var_1C0]
mov [r12-10h], r12
lea rsi, aAsn1Asn1TagWas+25h; "value"
lea rdx, aAsn1Asn1TagWas+2Ah; ""
lea rdi, [rsp+1D8h+var_1D0]
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+1D8h+var_1B0]; int
lea rcx, [rsp+1D8h+var_1D0]; int
mov rsi, r14; int
mov edx, 0Fh; int
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_; nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type,std::string const&)
lea rdi, [rsp+1D8h+var_170]; this
lea rdx, [rsp+1D8h+var_148]; int
lea rcx, [rsp+1D8h+var_1B0]
mov esi, 65h ; 'e'; int
xor r8d, r8d
call _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
lea rdi, [rsp+1D8h+var_110]
lea rdx, [rsp+1D8h+var_190]
lea rcx, [rsp+1D8h+var_170]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11parse_errorINS1_11parse_errorEEEbmRKSB_RKT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::parse_error>(ulong,std::string const&,nlohmann::json_abi_v3_11_3::detail::parse_error const&)
lea rax, off_E0A60
lea rdi, [rsp+1D8h+var_160]; this
mov [rdi-10h], rax
call __ZNSt13runtime_errorD1Ev; std::runtime_error::~runtime_error()
lea rdi, [rsp+1D8h+var_170]; this
call _ZNSt9exceptionD2Ev; std::exception::~exception()
lea rax, [rsp+1D8h+var_1A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_65067
mov rsi, [rsp+1D8h+var_1A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65067:
mov rdi, [rsp+1D8h+var_1D0]; void *
cmp rdi, r12
jz short loc_6507E
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6507E:
lea rax, [rsp+1D8h+var_180]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_65099
mov rsi, [rsp+1D8h+var_180]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65099:
cmp [rsp+1D8h+var_98], 0
jz loc_65260
mov al, [rbx]
mov byte ptr [rbx], 9
lea rdi, [rsp+1D8h+var_38]
mov [rdi], al
jmp loc_65273
loc_650BB:
mov al, [r14+0C0h]
lea rsi, [rsp+1D8h+var_110]
mov [rsi], rbx
xorps xmm0, xmm0
movups xmmword ptr [rsi+8], xmm0
movups xmmword ptr [rsi+18h], xmm0
mov byte ptr [rsi+28h], 0
mov [rsi+29h], al
mov rdi, r14; int
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE18sax_parse_internalINS1_19json_sax_dom_parserISF_EEEEbPT_; nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::sax_parse_internal<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::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>> *)
test bpl, bpl
jz loc_65213
lea r12, [r14+28h]
mov rdi, r12; this
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE4scanEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::scan(void)
mov [r14+20h], eax
cmp eax, 0Fh
jz loc_65213
mov r15, [r14+48h]
lea rdi, [rsp+1D8h+var_190]
mov rsi, r12
call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::get_token_string(void)
lea rax, [r14+48h]
mov rcx, [rax+10h]
mov [rsp+1D8h+var_138], rcx
movups xmm0, xmmword ptr [rax]
movaps xmmword ptr [rsp+1D8h+var_148], xmm0; __int64
lea r12, [rsp+1D8h+var_1C0]
mov [r12-10h], r12
lea rsi, aAsn1Asn1TagWas+25h; "value"
lea rdx, aAsn1Asn1TagWas+2Ah; ""
lea rdi, [rsp+1D8h+var_1D0]
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+1D8h+var_1B0]; int
lea rcx, [rsp+1D8h+var_1D0]; int
mov rsi, r14; int
mov edx, 0Fh; int
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_; nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type,std::string const&)
lea rdi, [rsp+1D8h+var_170]; this
lea rdx, [rsp+1D8h+var_148]; int
lea rcx, [rsp+1D8h+var_1B0]
mov esi, 65h ; 'e'; int
xor r8d, r8d
call _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
lea rdi, [rsp+1D8h+var_110]
lea rdx, [rsp+1D8h+var_190]
lea rcx, [rsp+1D8h+var_170]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11parse_errorINS1_11parse_errorEEEbmRKSB_RKT_; 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>>::parse_error<nlohmann::json_abi_v3_11_3::detail::parse_error>(ulong,std::string const&,nlohmann::json_abi_v3_11_3::detail::parse_error const&)
lea rax, off_E0A60
lea rdi, [rsp+1D8h+var_160]; this
mov [rdi-10h], rax
call __ZNSt13runtime_errorD1Ev; std::runtime_error::~runtime_error()
lea rdi, [rsp+1D8h+var_170]; this
call _ZNSt9exceptionD2Ev; std::exception::~exception()
lea rax, [rsp+1D8h+var_1A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_651E1
mov rsi, [rsp+1D8h+var_1A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_651E1:
mov rdi, [rsp+1D8h+var_1D0]; void *
cmp rdi, r12
jz short loc_651F8
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_651F8:
lea rax, [rsp+1D8h+var_180]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_65213
mov rsi, [rsp+1D8h+var_180]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65213:
cmp [rsp+1D8h+var_E8], 1
jnz short loc_65241
mov al, [rbx]
mov byte ptr [rbx], 9
lea rdi, [rsp+1D8h+var_58]
mov [rdi], al
mov rax, [rbx+8]
mov qword ptr [rbx+8], 0
mov [rdi+8], rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_65241:
mov rdi, [rsp+1D8h+var_108]; void *
test rdi, rdi
jz short loc_65295
mov rsi, [rsp+1D8h+var_F8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_65295
loc_65260:
cmp byte ptr [rbx], 9
jnz short loc_65288
mov byte ptr [rbx], 0
lea rdi, [rsp+1D8h+var_48]
mov byte ptr [rdi], 9
loc_65273:
mov rax, [rbx+8]
mov qword ptr [rbx+8], 0
mov [rdi+8], rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_65288:
lea rdi, [rsp+1D8h+var_110]
call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~json_sax_dom_callback_parser()
loc_65295:
add rsp, 1B0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, off_E0A60
lea rdi, [rsp+1D8h+var_160]; this
mov [rdi-10h], rax
call __ZNSt13runtime_errorD1Ev; std::runtime_error::~runtime_error()
lea rdi, [rsp+1D8h+var_170]; this
call _ZNSt9exceptionD2Ev; std::exception::~exception()
jmp short loc_652CC
mov rbx, rax
loc_652CC:
lea rax, [rsp+1D8h+var_1A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_652EC
mov rsi, [rsp+1D8h+var_1A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_652EC
mov rbx, rax
loc_652EC:
mov rdi, [rsp+1D8h+var_1D0]; void *
cmp rdi, r12
jz short loc_65308
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_65308
mov rbx, rax
loc_65308:
lea rax, [rsp+1D8h+var_180]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz loc_653B8
mov rsi, [rsp+1D8h+var_180]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_653B8
jmp loc_653B5
mov rbx, rax
lea rax, off_E0A60
lea rdi, [rsp+1D8h+var_160]; this
mov [rdi-10h], rax
call __ZNSt13runtime_errorD1Ev; std::runtime_error::~runtime_error()
lea rdi, [rsp+1D8h+var_170]; this
call _ZNSt9exceptionD2Ev; std::exception::~exception()
jmp short loc_65358
mov rbx, rax
loc_65358:
lea rax, [rsp+1D8h+var_1A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_65378
mov rsi, [rsp+1D8h+var_1A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_65378
mov rbx, rax
loc_65378:
mov rdi, [rsp+1D8h+var_1D0]; void *
cmp rdi, r12
jz short loc_65394
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_65394
mov rbx, rax
loc_65394:
lea rax, [rsp+1D8h+var_180]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_65406
mov rsi, [rsp+1D8h+var_180]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_65406
jmp short loc_65403
jmp short loc_653FB
loc_653B5:
mov rbx, rax
loc_653B8:
mov rdi, [rsp+1D8h+var_108]; void *
test rdi, rdi
jz short loc_65413
mov rsi, [rsp+1D8h+var_F8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_65413
mov rbx, rax
mov rax, [rsp+1D8h+var_120]
test rax, rax
jz short loc_65413
lea rdi, [rsp+1D8h+var_130]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_65413
loc_653FB:
mov rdi, rax
call __clang_call_terminate
loc_65403:
mov rbx, rax
loc_65406:
lea rdi, [rsp+1D8h+var_110]
call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~json_sax_dom_callback_parser()
loc_65413:
mov rdi, rbx
call __Unwind_Resume
| void nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::parse(
long long a1,
char a2,
long long a3)
{
long long *v5; // rsi
int v6; // eax
long long *v7; // r15
int v8; // r8d
int v9; // r9d
char v10; // al
char *v11; // rdi
char v12; // al
int v13; // eax
long long v14; // r15
int v15; // r8d
int v16; // r9d
char v17; // al
long long v18; // rax
long long v19; // rax
int v20; // [rsp+0h] [rbp-1D8h]
void *v21; // [rsp+0h] [rbp-1D8h]
void *v22; // [rsp+0h] [rbp-1D8h]
void *v23; // [rsp+0h] [rbp-1D8h]
void *v24; // [rsp+0h] [rbp-1D8h]
void *v25; // [rsp+8h] [rbp-1D0h] BYREF
long long v26; // [rsp+10h] [rbp-1C8h]
long long v27; // [rsp+18h] [rbp-1C0h] BYREF
void *v28; // [rsp+20h] [rbp-1B8h]
long long *v29; // [rsp+28h] [rbp-1B0h] BYREF
long long v30; // [rsp+30h] [rbp-1A8h]
long long v31; // [rsp+38h] [rbp-1A0h] BYREF
long long v32; // [rsp+40h] [rbp-198h]
long long *v33; // [rsp+48h] [rbp-190h] BYREF
long long v34; // [rsp+50h] [rbp-188h]
long long v35; // [rsp+58h] [rbp-180h] BYREF
int v36; // [rsp+60h] [rbp-178h]
void ( **v37)(nlohmann::json_abi_v3_11_3::detail::exception *__hidden); // [rsp+68h] [rbp-170h] BYREF
long long v38; // [rsp+70h] [rbp-168h]
int v39; // [rsp+78h] [rbp-160h] BYREF
int v40; // [rsp+80h] [rbp-158h]
int v41; // [rsp+88h] [rbp-150h]
long long v42[2]; // [rsp+90h] [rbp-148h] BYREF
long long v43; // [rsp+A0h] [rbp-138h]
__int128 v44; // [rsp+A8h] [rbp-130h] BYREF
void ( *v45)(__int128 *, __int128 *, long long); // [rsp+B8h] [rbp-120h]
int v46; // [rsp+C0h] [rbp-118h]
long long v47; // [rsp+C8h] [rbp-110h] BYREF
__int128 v48; // [rsp+D0h] [rbp-108h]
__int128 v49; // [rsp+E0h] [rbp-F8h]
char v50; // [rsp+F0h] [rbp-E8h]
char v51; // [rsp+F1h] [rbp-E7h]
char v52; // [rsp+140h] [rbp-98h]
_BYTE v53[8]; // [rsp+180h] [rbp-58h] BYREF
long long v54; // [rsp+188h] [rbp-50h]
char v55; // [rsp+190h] [rbp-48h] BYREF
char v56; // [rsp+1A0h] [rbp-38h] BYREF
if ( *(_QWORD *)(a1 + 16) )
{
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function(
&v44,
a1);
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser(
&v47,
a3,
&v44,
*(unsigned __int8 *)(a1 + 192));
if ( v45 )
v45(&v44, &v44, 3LL);
v5 = &v47;
nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::sax_parse_internal<nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>(
a1,
v20,
(long long)v25,
v26,
v27,
(long long)v28,
(int)v29,
v30,
v31,
v32,
(int)v33,
v34,
v35,
v36,
(int)v37,
v38,
v39,
v40,
v41,
v42[0],
v42[1],
v43,
(void *)v44,
SDWORD2(v44),
(int)v45,
v46,
v47);
if ( a2 )
{
v6 = nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::scan((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)(a1 + 40));
*(_DWORD *)(a1 + 32) = v6;
if ( v6 != 15 )
{
v7 = *(long long **)(a1 + 72);
nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::get_token_string(
&v33,
a1 + 40);
v43 = *(_QWORD *)(a1 + 88);
*(_OWORD *)v42 = *(_OWORD *)(a1 + 72);
v25 = &v27;
std::string::_M_construct<char const*>((long long)&v25, "value", (long long)"");
nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::exception_message(
(int)&v29,
a1,
15,
(int)&v25,
v8,
v9,
v21,
(int)v25,
v26,
v27,
(int)v28,
(int)v29,
v30,
v31,
v32);
ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
(nlohmann::json_abi_v3_11_3::detail::exception *)&v37,
101,
(int)v42,
v22,
(int)v25,
v26,
v27,
v28,
(int)v29,
v30,
v31,
v32,
(int)v33,
v34,
v35,
v36,
(int)v37,
v38,
v39,
v40,
v41,
v42[0]);
v5 = v7;
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::parse_error>(
&v47,
v7,
&v33,
&v37);
v37 = off_E0A60;
std::runtime_error::~runtime_error((std::runtime_error *)&v39);
std::exception::~exception((std::exception *)&v37);
if ( v29 != &v31 )
{
v5 = (long long *)(v31 + 1);
operator delete(v29, v31 + 1);
}
if ( v25 != &v27 )
{
v5 = (long long *)(v27 + 1);
operator delete(v25, v27 + 1);
}
if ( v33 != &v35 )
{
v5 = (long long *)(v35 + 1);
operator delete(v33, v35 + 1);
}
}
}
if ( v52 )
{
v10 = *(_BYTE *)a3;
*(_BYTE *)a3 = 9;
v11 = &v56;
v56 = v10;
}
else
{
if ( *(_BYTE *)a3 != 9 )
{
LABEL_29:
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~json_sax_dom_callback_parser(
&v47,
v5);
return;
}
*(_BYTE *)a3 = 0;
v11 = &v55;
v55 = 9;
}
v19 = *(_QWORD *)(a3 + 8);
*(_QWORD *)(a3 + 8) = 0LL;
*((_QWORD *)v11 + 1) = v19;
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v11);
goto LABEL_29;
}
v12 = *(_BYTE *)(a1 + 192);
v48 = 0LL;
v49 = 0LL;
v50 = 0;
v51 = v12;
nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::sax_parse_internal<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>>>(
a1,
v20,
(long long)v25,
v26,
v27,
(long long)v28,
(int)v29,
v30,
v31,
v32,
(int)v33,
v34,
v35,
v36,
(int)v37,
v38,
v39,
v40,
v41,
v42[0],
v42[1],
v43,
(void *)v44,
SDWORD2(v44),
(int)v45,
v46,
a3);
if ( a2 )
{
v13 = nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::scan((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)(a1 + 40));
*(_DWORD *)(a1 + 32) = v13;
if ( v13 != 15 )
{
v14 = *(_QWORD *)(a1 + 72);
nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::get_token_string(
&v33,
a1 + 40);
v43 = *(_QWORD *)(a1 + 88);
*(_OWORD *)v42 = *(_OWORD *)(a1 + 72);
v25 = &v27;
std::string::_M_construct<char const*>((long long)&v25, "value", (long long)"");
nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::exception_message(
(int)&v29,
a1,
15,
(int)&v25,
v15,
v16,
v23,
(int)v25,
v26,
v27,
(int)v28,
(int)v29,
v30,
v31,
v32);
ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
(nlohmann::json_abi_v3_11_3::detail::exception *)&v37,
101,
(int)v42,
v24,
(int)v25,
v26,
v27,
v28,
(int)v29,
v30,
v31,
v32,
(int)v33,
v34,
v35,
v36,
(int)v37,
v38,
v39,
v40,
v41,
v42[0]);
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>>::parse_error<nlohmann::json_abi_v3_11_3::detail::parse_error>(
&v47,
v14,
&v33,
&v37);
v37 = off_E0A60;
std::runtime_error::~runtime_error((std::runtime_error *)&v39);
std::exception::~exception((std::exception *)&v37);
if ( v29 != &v31 )
operator delete(v29, v31 + 1);
if ( v25 != &v27 )
operator delete(v25, v27 + 1);
if ( v33 != &v35 )
operator delete(v33, v35 + 1);
}
}
if ( v50 == 1 )
{
v17 = *(_BYTE *)a3;
*(_BYTE *)a3 = 9;
v53[0] = v17;
v18 = *(_QWORD *)(a3 + 8);
*(_QWORD *)(a3 + 8) = 0LL;
v54 = v18;
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v53);
}
if ( (_QWORD)v48 )
operator delete((void *)v48, v49 - v48);
}
| parse:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x1b0
MOV RBX,RDX
MOV EBP,ESI
MOV R14,RDI
CMP qword ptr [RDI + 0x10],0x0
JZ 0x001650bb
LEA R15,[RSP + 0xa8]
MOV RDI,R15
MOV RSI,R14
CALL 0x00164e90
MOVZX ECX,byte ptr [R14 + 0xc0]
LAB_00164f2b:
LEA RDI,[RSP + 0xc8]
MOV RSI,RBX
MOV RDX,R15
CALL 0x00165bd4
MOV RAX,qword ptr [RSP + 0xb8]
TEST RAX,RAX
JZ 0x00164f5d
LAB_00164f4b:
LEA RDI,[RSP + 0xa8]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00164f5d:
LEA RSI,[RSP + 0xc8]
MOV RDI,R14
CALL 0x00165cb6
TEST BPL,BPL
JZ 0x00165099
LEA R12,[R14 + 0x28]
MOV RDI,R12
CALL 0x0016559e
MOV dword ptr [R14 + 0x20],EAX
CMP EAX,0xf
JZ 0x00165099
MOV R15,qword ptr [R14 + 0x48]
LAB_00164f93:
LEA RDI,[RSP + 0x48]
MOV RSI,R12
CALL 0x00166a0e
LEA RAX,[R14 + 0x48]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0xa0],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVAPS xmmword ptr [RSP + 0x90],XMM0
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LAB_00164fc5:
LEA RSI,[0x1af366]
LEA RDX,[0x1af36b]
LEA RDI,[RSP + 0x8]
CALL 0x0015c00c
LAB_00164fdd:
LEA RDI,[RSP + 0x28]
LEA RCX,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xf
CALL 0x00166cc6
LAB_00164ff4:
LEA RDI,[RSP + 0x68]
LEA RDX,[RSP + 0x90]
LEA RCX,[RSP + 0x28]
MOV ESI,0x65
XOR R8D,R8D
CALL 0x00166ac8
LAB_00165013:
LEA RDI,[RSP + 0xc8]
LEA RDX,[RSP + 0x48]
LEA RCX,[RSP + 0x68]
MOV RSI,R15
CALL 0x001669c8
LEA RAX,[0x1e0a60]
LEA RDI,[RSP + 0x78]
MOV qword ptr [RDI + -0x10],RAX
CALL 0x0010f480
LEA RDI,[RSP + 0x68]
CALL 0x0010f888
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00165067
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0010f470
LAB_00165067:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0016507e
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0010f470
LAB_0016507e:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00165099
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0010f470
LAB_00165099:
CMP byte ptr [RSP + 0x140],0x0
JZ 0x00165260
MOV AL,byte ptr [RBX]
MOV byte ptr [RBX],0x9
LEA RDI,[RSP + 0x1a0]
MOV byte ptr [RDI],AL
JMP 0x00165273
LAB_001650bb:
MOV AL,byte ptr [R14 + 0xc0]
LEA RSI,[RSP + 0xc8]
MOV qword ptr [RSI],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x8],XMM0
MOVUPS xmmword ptr [RSI + 0x18],XMM0
MOV byte ptr [RSI + 0x28],0x0
MOV byte ptr [RSI + 0x29],AL
LAB_001650df:
MOV RDI,R14
CALL 0x00167040
TEST BPL,BPL
JZ 0x00165213
LEA R12,[R14 + 0x28]
MOV RDI,R12
CALL 0x0016559e
MOV dword ptr [R14 + 0x20],EAX
CMP EAX,0xf
JZ 0x00165213
MOV R15,qword ptr [R14 + 0x48]
LAB_0016510d:
LEA RDI,[RSP + 0x48]
MOV RSI,R12
CALL 0x00166a0e
LEA RAX,[R14 + 0x48]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0xa0],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVAPS xmmword ptr [RSP + 0x90],XMM0
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LAB_0016513f:
LEA RSI,[0x1af366]
LEA RDX,[0x1af36b]
LEA RDI,[RSP + 0x8]
CALL 0x0015c00c
LAB_00165157:
LEA RDI,[RSP + 0x28]
LEA RCX,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xf
CALL 0x00166cc6
LAB_0016516e:
LEA RDI,[RSP + 0x68]
LEA RDX,[RSP + 0x90]
LEA RCX,[RSP + 0x28]
MOV ESI,0x65
XOR R8D,R8D
CALL 0x00166ac8
LAB_0016518d:
LEA RDI,[RSP + 0xc8]
LEA RDX,[RSP + 0x48]
LEA RCX,[RSP + 0x68]
MOV RSI,R15
CALL 0x00167d28
LEA RAX,[0x1e0a60]
LEA RDI,[RSP + 0x78]
MOV qword ptr [RDI + -0x10],RAX
CALL 0x0010f480
LEA RDI,[RSP + 0x68]
CALL 0x0010f888
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001651e1
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0010f470
LAB_001651e1:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x001651f8
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0010f470
LAB_001651f8:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00165213
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0010f470
LAB_00165213:
CMP byte ptr [RSP + 0xf0],0x1
JNZ 0x00165241
MOV AL,byte ptr [RBX]
MOV byte ptr [RBX],0x9
LEA RDI,[RSP + 0x180]
MOV byte ptr [RDI],AL
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x8],0x0
MOV qword ptr [RDI + 0x8],RAX
CALL 0x0015c638
LAB_00165241:
MOV RDI,qword ptr [RSP + 0xd0]
TEST RDI,RDI
JZ 0x00165295
MOV RSI,qword ptr [RSP + 0xe0]
SUB RSI,RDI
CALL 0x0010f470
JMP 0x00165295
LAB_00165260:
CMP byte ptr [RBX],0x9
JNZ 0x00165288
MOV byte ptr [RBX],0x0
LEA RDI,[RSP + 0x190]
MOV byte ptr [RDI],0x9
LAB_00165273:
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x8],0x0
MOV qword ptr [RDI + 0x8],RAX
CALL 0x0015c638
LAB_00165288:
LEA RDI,[RSP + 0xc8]
CALL 0x00166fdc
LAB_00165295:
ADD RSP,0x1b0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::parse(bool,
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>&) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
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::input_stream_adapter>
::parse(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::input_stream_adapter>
*this,bool param_1,basic_json *param_2)
{
ulong uVar1;
int8 uVar2;
int iVar3;
basic_json *this_00;
long *local_1d0 [2];
long local_1c0 [2];
long *local_1b0 [2];
long local_1a0 [2];
long *local_190 [2];
long local_180 [2];
int **local_170 [2];
runtime_error local_160 [24];
int4 local_148;
int4 uStack_144;
int4 uStack_140;
int4 uStack_13c;
int8 local_138;
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
local_130 [16];
code *local_120;
basic_json *local_110;
void *local_108;
int8 uStack_100;
long local_f8;
int8 uStack_f0;
char local_e8;
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::input_stream_adapter>
local_e7;
char local_98;
basic_json local_58 [8];
int8 local_50;
data local_48 [16];
basic_json local_38 [16];
if (*(long *)(this + 0x10) == 0) {
local_e7 = this[0xc0];
local_108 = (void *)0x0;
uStack_100 = 0;
local_f8 = 0;
uStack_f0 = 0;
local_e8 = '\0';
local_110 = param_2;
/* try { // try from 001650df to 001650fb has its CatchHandler @ 001653b5 */
sax_parse_internal<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>>>
(this,(json_sax_dom_parser *)&local_110);
if (param_1) {
iVar3 = lexer<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::input_stream_adapter>
::scan((lexer<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::input_stream_adapter>
*)(this + 0x28));
*(int *)(this + 0x20) = iVar3;
if (iVar3 != 0xf) {
uVar1 = *(ulong *)(this + 0x48);
/* try { // try from 0016510d to 00165119 has its CatchHandler @ 0016532c */
lexer<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::input_stream_adapter>
::get_token_string();
local_138 = *(int8 *)(this + 0x58);
local_148 = *(int4 *)(this + 0x48);
uStack_144 = *(int4 *)(this + 0x4c);
uStack_140 = *(int4 *)(this + 0x50);
uStack_13c = *(int4 *)(this + 0x54);
/* try { // try from 0016513f to 00165156 has its CatchHandler @ 00165305 */
local_1d0[0] = local_1c0;
std::__cxx11::string::_M_construct<char_const*>((string *)local_1d0,"value","");
/* try { // try from 00165157 to 0016516d has its CatchHandler @ 001652e9 */
exception_message(local_1b0,this,0xf,local_1d0);
/* try { // try from 0016516e to 0016518c has its CatchHandler @ 001652c9 */
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(local_170,0x65,&local_148,local_1b0,0);
/* try { // try from 0016518d to 001651a6 has its CatchHandler @ 001652a5 */
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>>
::parse_error<nlohmann::json_abi_v3_11_3::detail::parse_error>
((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>>
*)&local_110,uVar1,(string *)local_190,(parse_error *)local_170);
local_170[0] = &PTR__exception_001e0a60;
std::runtime_error::~runtime_error(local_160);
std::exception::~exception((exception *)local_170);
if (local_1b0[0] != local_1a0) {
operator_delete(local_1b0[0],local_1a0[0] + 1);
}
if (local_1d0[0] != local_1c0) {
operator_delete(local_1d0[0],local_1c0[0] + 1);
}
if (local_190[0] != local_180) {
operator_delete(local_190[0],local_180[0] + 1);
}
}
}
if (local_e8 == '\x01') {
local_58[0] = *param_2;
*param_2 = (basic_json)0x9;
local_50 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_58);
}
if (local_108 == (void *)0x0) {
return;
}
operator_delete(local_108,local_f8 - (long)local_108);
return;
}
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)>
::function(local_130,this);
/* try { // try from 00164f2b to 00164f3d has its CatchHandler @ 001653d7 */
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::json_sax_dom_callback_parser
((json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_110,param_2,local_130,this[0xc0]);
if (local_120 != (code *)0x0) {
/* try { // try from 00164f4b to 00164f5c has its CatchHandler @ 001653b3 */
(*local_120)(local_130,local_130,3);
}
/* try { // try from 00164f5d to 00164f81 has its CatchHandler @ 00165403 */
sax_parse_internal<nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
(this,(json_sax_dom_callback_parser *)&local_110);
if (param_1) {
iVar3 = lexer<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::input_stream_adapter>
::scan((lexer<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::input_stream_adapter>
*)(this + 0x28));
*(int *)(this + 0x20) = iVar3;
if (iVar3 != 0xf) {
uVar1 = *(ulong *)(this + 0x48);
/* try { // try from 00164f93 to 00164f9f has its CatchHandler @ 001653b1 */
lexer<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::input_stream_adapter>
::get_token_string();
local_138 = *(int8 *)(this + 0x58);
local_148 = *(int4 *)(this + 0x48);
uStack_144 = *(int4 *)(this + 0x4c);
uStack_140 = *(int4 *)(this + 0x50);
uStack_13c = *(int4 *)(this + 0x54);
/* try { // try from 00164fc5 to 00164fdc has its CatchHandler @ 00165391 */
local_1d0[0] = local_1c0;
std::__cxx11::string::_M_construct<char_const*>((string *)local_1d0,"value","");
/* try { // try from 00164fdd to 00164ff3 has its CatchHandler @ 00165375 */
exception_message(local_1b0,this,0xf,local_1d0);
/* try { // try from 00164ff4 to 00165012 has its CatchHandler @ 00165355 */
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(local_170,0x65,&local_148,local_1b0,0);
/* try { // try from 00165013 to 0016502c has its CatchHandler @ 00165331 */
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::parse_error<nlohmann::json_abi_v3_11_3::detail::parse_error>
((json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_110,uVar1,(string *)local_190,(parse_error *)local_170);
local_170[0] = &PTR__exception_001e0a60;
std::runtime_error::~runtime_error(local_160);
std::exception::~exception((exception *)local_170);
if (local_1b0[0] != local_1a0) {
operator_delete(local_1b0[0],local_1a0[0] + 1);
}
if (local_1d0[0] != local_1c0) {
operator_delete(local_1d0[0],local_1c0[0] + 1);
}
if (local_190[0] != local_180) {
operator_delete(local_190[0],local_180[0] + 1);
}
}
}
if (local_98 == '\0') {
if (*param_2 != (basic_json)0x9) goto LAB_00165288;
*param_2 = (basic_json)0x0;
this_00 = (basic_json *)local_48;
local_48[0] = (data)0x9;
}
else {
local_38[0] = *param_2;
*param_2 = (basic_json)0x9;
this_00 = local_38;
}
uVar2 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)((data *)this_00 + 8) = uVar2;
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)this_00);
LAB_00165288:
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::~json_sax_dom_callback_parser
((json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_110);
return;
}
| |
38,489 | ma_crypt_set_data_pagecache_callbacks | eloqsql/storage/maria/ma_crypt.c | void ma_crypt_set_data_pagecache_callbacks(PAGECACHE_FILE *file,
MARIA_SHARE *share
__attribute__((unused)))
{
/* Only use encryption if we have defined it */
if (encryption_key_id_exists(get_encryption_key_id(share)))
{
file->pre_read_hook= ma_crypt_pre_read_hook;
file->post_read_hook= ma_crypt_data_post_read_hook;
file->pre_write_hook= ma_crypt_data_pre_write_hook;
file->post_write_hook= ma_crypt_post_write_hook;
}
} | O3 | c | ma_crypt_set_data_pagecache_callbacks:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testb $0x10, 0x720(%rsi)
je 0x51e5f
leaq 0x334273(%rip), %rax # 0x3860c0
movl $0x2, %r14d
movl $0x2, %edi
callq *(%rax)
cmpl $-0x1, %eax
jne 0x51e65
movl $0x1, %r14d
leaq 0x334254(%rip), %rax # 0x3860c0
movl %r14d, %edi
callq *(%rax)
cmpl $-0x1, %eax
je 0x51ea2
leaq 0x2a(%rip), %rax # 0x51ea7
movq %rax, 0x18(%rbx)
leaq 0x59(%rip), %rax # 0x51ee1
movq %rax, 0x20(%rbx)
leaq 0x16c(%rip), %rax # 0x51fff
movq %rax, 0x28(%rbx)
leaq 0x29b(%rip), %rax # 0x52139
movq %rax, 0x30(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
| ma_crypt_set_data_pagecache_callbacks:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
test byte ptr [rsi+720h], 10h
jz short loc_51E5F
lea rax, encryption_handler
mov r14d, 2
mov edi, 2
call qword ptr [rax]
cmp eax, 0FFFFFFFFh
jnz short loc_51E65
loc_51E5F:
mov r14d, 1
loc_51E65:
lea rax, encryption_handler
mov edi, r14d
call qword ptr [rax]
cmp eax, 0FFFFFFFFh
jz short loc_51EA2
lea rax, ma_crypt_pre_read_hook
mov [rbx+18h], rax
lea rax, ma_crypt_data_post_read_hook
mov [rbx+20h], rax
lea rax, ma_crypt_data_pre_write_hook
mov [rbx+28h], rax
lea rax, ma_crypt_post_write_hook
mov [rbx+30h], rax
loc_51EA2:
pop rbx
pop r14
pop rbp
retn
| long long ( * ma_crypt_set_data_pagecache_callbacks(_QWORD *a1, long long a2))()
{
long long ( *result)(); // rax
if ( (*(_BYTE *)(a2 + 1824) & 0x10) != 0 )
encryption_handler();
result = (long long ( *)())encryption_handler();
if ( (_DWORD)result != -1 )
{
a1[3] = ma_crypt_pre_read_hook;
a1[4] = ma_crypt_data_post_read_hook;
a1[5] = ma_crypt_data_pre_write_hook;
result = ma_crypt_post_write_hook;
a1[6] = ma_crypt_post_write_hook;
}
return result;
}
| ma_crypt_set_data_pagecache_callbacks:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
TEST byte ptr [RSI + 0x720],0x10
JZ 0x00151e5f
LEA RAX,[0x4860c0]
MOV R14D,0x2
MOV EDI,0x2
CALL qword ptr [RAX]
CMP EAX,-0x1
JNZ 0x00151e65
LAB_00151e5f:
MOV R14D,0x1
LAB_00151e65:
LEA RAX,[0x4860c0]
MOV EDI,R14D
CALL qword ptr [RAX]
CMP EAX,-0x1
JZ 0x00151ea2
LEA RAX,[0x151ea7]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x151ee1]
MOV qword ptr [RBX + 0x20],RAX
LEA RAX,[0x151fff]
MOV qword ptr [RBX + 0x28],RAX
LEA RAX,[0x152139]
MOV qword ptr [RBX + 0x30],RAX
LAB_00151ea2:
POP RBX
POP R14
POP RBP
RET
|
void ma_crypt_set_data_pagecache_callbacks(long param_1,long param_2)
{
int iVar1;
int8 uVar2;
if ((*(byte *)(param_2 + 0x720) & 0x10) != 0) {
uVar2 = 2;
iVar1 = (*(code *)encryption_handler)(2);
if (iVar1 != -1) goto LAB_00151e65;
}
uVar2 = 1;
LAB_00151e65:
iVar1 = (*(code *)encryption_handler)(uVar2);
if (iVar1 != -1) {
*(code **)(param_1 + 0x18) = ma_crypt_pre_read_hook;
*(code **)(param_1 + 0x20) = ma_crypt_data_post_read_hook;
*(code **)(param_1 + 0x28) = ma_crypt_data_pre_write_hook;
*(code **)(param_1 + 0x30) = ma_crypt_post_write_hook;
}
return;
}
| |
38,490 | bc_get_u64 | bluesky950520[P]quickjs/quickjs.c | static int bc_get_u64(BCReaderState *s, uint64_t *pval)
{
uint64_t v;
if (unlikely(s->buf_end - s->ptr < 8)) {
*pval = 0; /* avoid warning */
return bc_read_error_end(s);
}
v = get_u64(s->ptr);
if (is_be())
v = bswap64(v);
*pval = v;
s->ptr += 8;
return 0;
} | O1 | c | bc_get_u64:
movq %rdi, %rax
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %rdx
subq %rcx, %rdx
cmpq $0x7, %rdx
jle 0x49ca3
movq (%rcx), %rdx
movq %rdx, (%rsi)
addq $0x8, %rcx
movq %rcx, 0x10(%rax)
xorl %eax, %eax
retq
pushq %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x1376b
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
retq
| bc_get_u64:
mov rax, rdi
mov rcx, [rdi+10h]
mov rdx, [rdi+18h]
sub rdx, rcx
cmp rdx, 7
jle short loc_49CA3
mov rdx, [rcx]
mov [rsi], rdx
add rcx, 8
mov [rax+10h], rcx
xor eax, eax
retn
loc_49CA3:
push rax
mov rdi, rsi
mov rsi, rax
call bc_get_u64_cold_1
mov eax, 0FFFFFFFFh
add rsp, 8
retn
| long long bc_get_u64(long long a1, _QWORD *a2, long long a3, long long a4, int a5, int a6)
{
_QWORD *v6; // rcx
long long v7; // rdx
v6 = *(_QWORD **)(a1 + 16);
v7 = *(_QWORD *)(a1 + 24) - (_QWORD)v6;
if ( v7 <= 7 )
{
bc_get_u64_cold_1(a2, a1, v7, (int)v6, a5, a6);
return 0xFFFFFFFFLL;
}
else
{
*a2 = *v6;
*(_QWORD *)(a1 + 16) = v6 + 1;
return 0LL;
}
}
| bc_get_u64:
MOV RAX,RDI
MOV RCX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RDI + 0x18]
SUB RDX,RCX
CMP RDX,0x7
JLE 0x00149ca3
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSI],RDX
ADD RCX,0x8
MOV qword ptr [RAX + 0x10],RCX
XOR EAX,EAX
RET
LAB_00149ca3:
PUSH RAX
MOV RDI,RSI
MOV RSI,RAX
CALL 0x0011376b
MOV EAX,0xffffffff
ADD RSP,0x8
RET
|
int8 bc_get_u64(long param_1,int8 *param_2)
{
int8 *puVar1;
puVar1 = *(int8 **)(param_1 + 0x10);
if (7 < *(long *)(param_1 + 0x18) - (long)puVar1) {
*param_2 = *puVar1;
*(int8 **)(param_1 + 0x10) = puVar1 + 1;
return 0;
}
bc_get_u64_cold_1(param_2,param_1);
return 0xffffffff;
}
| |
38,491 | LefDefParser::lefiLayer::minstepMinBetLength(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp | double
lefiLayer::minstepMinBetLength(int index) const
{
char msg[160];
if (index < 0 || index > numMinstep_) {
sprintf(msg, "ERROR (LEFPARS-1302): The index number %d given for the layer MINSTEP is invalid.\nValid index is from 0 to %d", index, numMinstep_);
lefiError(0, 1302, msg);
return 0;
}
return minstepMinBetLength_[index];
} | O0 | cpp | LefDefParser::lefiLayer::minstepMinBetLength(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 0x41c21
movq 0x8(%rsp), %rcx
movl 0xb4(%rsp), %eax
cmpl 0x278(%rcx), %eax
jle 0x41c65
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0xb4(%rsp), %edx
movl 0x278(%rax), %ecx
leaq 0x5319c(%rip), %rsi # 0x94ddb
movb $0x0, %al
callq 0x2050
leaq 0x10(%rsp), %rdx
xorl %edi, %edi
movl $0x516, %esi # imm = 0x516
callq 0x59060
xorps %xmm0, %xmm0
movsd %xmm0, 0xc0(%rsp)
jmp 0x41c87
movq 0x8(%rsp), %rax
movq 0x2a8(%rax), %rax
movslq 0xb4(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0xc0(%rsp), %xmm0
addq $0xc8, %rsp
retq
nopl (%rax,%rax)
| _ZNK12LefDefParser9lefiLayer19minstepMinBetLengthEi:
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_41C21
mov rcx, [rsp+0C8h+var_C0]
mov eax, [rsp+0C8h+var_14]
cmp eax, [rcx+278h]
jle short loc_41C65
loc_41C21:
mov rax, [rsp+0C8h+var_C0]
lea rdi, [rsp+0C8h+var_B8]
mov edx, [rsp+0C8h+var_14]
mov ecx, [rax+278h]
lea rsi, aErrorLefpars13_19; "ERROR (LEFPARS-1302): The index number "...
mov al, 0
call _sprintf
lea rdx, [rsp+0C8h+var_B8]; int
xor edi, edi; this
mov esi, 516h; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
xorps xmm0, xmm0
movsd [rsp+0C8h+var_8], xmm0
jmp short loc_41C87
loc_41C65:
mov rax, [rsp+0C8h+var_C0]
mov rax, [rax+2A8h]
movsxd rcx, [rsp+0C8h+var_14]
movsd xmm0, qword ptr [rax+rcx*8]
movsd [rsp+0C8h+var_8], xmm0
loc_41C87:
movsd xmm0, [rsp+0C8h+var_8]
add rsp, 0C8h
retn
| double LefDefParser::lefiLayer::minstepMinBetLength(LefDefParser::lefiLayer *this, int a2)
{
const char *v2; // rcx
int v4[41]; // [rsp+10h] [rbp-B8h] BYREF
int v5; // [rsp+B4h] [rbp-14h]
LefDefParser::lefiLayer *v6; // [rsp+B8h] [rbp-10h]
v6 = this;
v5 = a2;
if ( a2 >= 0 && v5 <= *((_DWORD *)this + 158) )
return *(double *)(*((_QWORD *)this + 85) + 8LL * v5);
sprintf(
v4,
"ERROR (LEFPARS-1302): The index number %d given for the layer MINSTEP is invalid.\nValid index is from 0 to %d",
v5,
*((_DWORD *)this + 158));
LefDefParser::lefiError(0LL, 1302, (int)v4, v2);
return 0.0;
}
| minstepMinBetLength:
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 0x00141c21
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0xb4]
CMP EAX,dword ptr [RCX + 0x278]
JLE 0x00141c65
LAB_00141c21:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xb4]
MOV ECX,dword ptr [RAX + 0x278]
LEA RSI,[0x194ddb]
MOV AL,0x0
CALL 0x00102050
LEA RDX,[RSP + 0x10]
XOR EDI,EDI
MOV ESI,0x516
CALL 0x00159060
XORPS XMM0,XMM0
MOVSD qword ptr [RSP + 0xc0],XMM0
JMP 0x00141c87
LAB_00141c65:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x2a8]
MOVSXD RCX,dword ptr [RSP + 0xb4]
MOVSD XMM0,qword ptr [RAX + RCX*0x8]
MOVSD qword ptr [RSP + 0xc0],XMM0
LAB_00141c87:
MOVSD XMM0,qword ptr [RSP + 0xc0]
ADD RSP,0xc8
RET
|
/* LefDefParser::lefiLayer::minstepMinBetLength(int) const */
int8 __thiscall LefDefParser::lefiLayer::minstepMinBetLength(lefiLayer *this,int param_1)
{
char local_b8 [164];
int local_14;
lefiLayer *local_10;
int8 local_8;
if ((param_1 < 0) || (*(int *)(this + 0x278) < param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_b8,
"ERROR (LEFPARS-1302): The index number %d given for the layer MINSTEP is invalid.\nValid index is from 0 to %d"
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x278));
lefiError(0,0x516,local_b8);
local_8 = 0;
}
else {
local_8 = *(int8 *)(*(long *)(this + 0x2a8) + (long)param_1 * 8);
}
return local_8;
}
| |
38,492 | Loader_OneShot::init() | untodesu[P]riteg/riteg/loader_oneshot.cc | void Loader_OneShot::init(void)
{
auto oneshot_path = cmdline::get("ipath");
riteg_force_assert_msg(oneshot_path, "Invalid argument [ipath]");
m_is_done = false;
m_path = oneshot_path;
} | O1 | cpp | Loader_OneShot::init():
pushq %r15
pushq %r14
pushq %rbx
subq $0xf0, %rsp
movq %rdi, %rbx
leaq 0x52b72(%rip), %rdi # 0x622e8
xorl %esi, %esi
callq 0xe0f5
movq %rax, 0x58(%rsp)
testq %rax, %rax
je 0xf7a9
movb $0x0, 0x30(%rbx)
addq $0x8, %rbx
leaq 0x58(%rsp), %rsi
movq %rbx, %rdi
callq 0xd0a2
addq $0xf0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x93840(%rip), %rdi # 0xa2ff0
leaq 0x52976(%rip), %rsi # 0x6212d
movl $0x1, %edx
callq 0xc9e0
leaq 0x52c19(%rip), %rsi # 0x623e1
leaq 0xa0(%rsp), %rbx
movq %rbx, %rdi
movl $0x2, %edx
callq 0xfb54
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0xe21c
movq 0x30(%rsp), %rsi
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0xe3e0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x937d5(%rip), %rdi # 0xa2ff0
callq 0xc9e0
movq %rax, %rbx
leaq 0x79be1(%rip), %rsi # 0x8940b
movl $0x1, %edx
movq %rax, %rdi
callq 0xc9e0
movq %rbx, %rdi
movl $0xb, %esi
callq 0xceb0
movq %rax, %rbx
leaq 0x528e1(%rip), %rsi # 0x6212f
movl $0x3, %edx
movq %rax, %rdi
callq 0xc9e0
leaq 0x528d1(%rip), %rsi # 0x62133
movl $0x15, %edx
movq %rbx, %rdi
callq 0xc9e0
leaq 0x52ac8(%rip), %rsi # 0x6233e
movl $0x12, %edx
movq %rbx, %rdi
callq 0xc9e0
leaq 0x52ba8(%rip), %rsi # 0x62432
movl $0xc, %edx
movq %rbx, %rdi
callq 0xc9e0
leaq 0x52abf(%rip), %rsi # 0x6235d
movl $0x2, %edx
movq %rbx, %rdi
callq 0xc9e0
leaq 0x52aae(%rip), %rsi # 0x62360
movl $0x18, %edx
movq %rbx, %rdi
callq 0xc9e0
movq %rbx, %rdi
callq 0xc3f0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xf8de
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xc8d0
leaq 0x30(%rsp), %rdi
callq 0xe29a
leaq 0xa0(%rsp), %rdi
callq 0xe29a
movq 0x936f4(%rip), %rdi # 0xa2ff0
leaq 0x5282a(%rip), %rsi # 0x6212d
movl $0x1, %edx
callq 0xc9e0
leaq 0x52acd(%rip), %rsi # 0x623e1
leaq 0xa0(%rsp), %rbx
movq %rbx, %rdi
movl $0x2, %edx
callq 0xfb54
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0xe21c
movq 0x30(%rsp), %rsi
leaq 0x90(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x80(%rsp), %rdi
callq 0xe3e0
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0x9367d(%rip), %rdi # 0xa2ff0
callq 0xc9e0
movq %rax, %rbx
leaq 0x79a89(%rip), %rsi # 0x8940b
movl $0x1, %edx
movq %rax, %rdi
callq 0xc9e0
movq %rbx, %rdi
movl $0xb, %esi
callq 0xceb0
movq %rax, %rbx
leaq 0x52789(%rip), %rsi # 0x6212f
movl $0x3, %edx
movq %rax, %rdi
callq 0xc9e0
leaq 0x52779(%rip), %rsi # 0x62133
movl $0x15, %edx
movq %rbx, %rdi
callq 0xc9e0
leaq 0x52a13(%rip), %rsi # 0x623e1
leaq 0xc8(%rsp), %rdi
movl $0x2, %edx
callq 0xfb54
leaq 0x8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0xe21c
movq 0x8(%rsp), %rsi
leaq 0x70(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %rdi
callq 0xe3e0
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
callq 0xc9e0
movq %rax, %rbx
leaq 0x799dd(%rip), %rsi # 0x8940b
movl $0x1, %edx
movq %rax, %rdi
callq 0xc9e0
movq %rbx, %rdi
movl $0xb, %esi
callq 0xceb0
movq %rax, %rdi
callq 0xc3f0
leaq 0x60(%rsp), %rdi
callq 0xc3b0
leaq 0x8(%rsp), %rdi
callq 0xe29a
leaq 0xc8(%rsp), %rdi
callq 0xe29a
leaq 0x80(%rsp), %rdi
callq 0xc3b0
leaq 0x30(%rsp), %rdi
callq 0xe29a
leaq 0xa0(%rsp), %rdi
callq 0xe29a
callq 0xc1e0
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0xfab9
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xc8d0
jmp 0xfab9
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xe29a
jmp 0xfac8
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0xe29a
jmp 0xfadc
jmp 0xfad9
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0xfb16
movq 0x90(%rsp), %rsi
jmp 0xfb09
jmp 0xfb13
jmp 0xfb22
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xfb16
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xc8d0
jmp 0xfb16
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xe29a
jmp 0xfb25
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0xe29a
movq %rbx, %rdi
callq 0xcf00
| _ZN14Loader_OneShot4initEv:
push r15
push r14
push rbx
sub rsp, 0F0h
mov rbx, rdi
lea rdi, aIpath; "ipath"
xor esi, esi; char *
call _ZN7cmdline3getEPKcS1_; cmdline::get(char const*,char const*)
mov [rsp+108h+var_B0], rax
test rax, rax
jz short loc_F7A9
mov byte ptr [rbx+30h], 0
add rbx, 8
lea rsi, [rsp+108h+var_B0]
mov rdi, rbx
call _ZNSt10filesystem7__cxx114pathaSIPKcEERNSt9enable_ifIX13__is_path_srcIT_EES1_E4typeERKS6_
add rsp, 0F0h
pop rbx
pop r14
pop r15
retn
loc_F7A9:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, asc_6212D; "["
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rbx, [rsp+108h+var_68]
mov rdi, rbx; this
mov edx, 2
call _ZNSt10filesystem7__cxx114pathC2IA81_cS1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<char [81],std::filesystem::__cxx11::path>(char [81] const&,std::filesystem::__cxx11::path::format)
lea rdi, [rsp+108h+var_D8]; this
mov rsi, rbx
call _ZNKSt10filesystem7__cxx114path8filenameEv; std::filesystem::__cxx11::path::filename(void)
mov rsi, [rsp+108h+var_D8]
lea r14, [rsp+108h+var_F0]
mov [r14-10h], r14
mov rdx, [rsp+108h+var_D0]
add rdx, rsi
lea rdi, [rsp+108h+var_100]
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 rsi, [rsp+108h+var_100]
mov rdx, [rsp+108h+var_F8]
mov rdi, cs:_ZSt4cerr_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, rax
lea rsi, asc_8940A+1; ":"
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rbx
mov esi, 0Bh
call __ZNSolsEi; std::ostream::operator<<(int)
mov rbx, rax
lea rsi, asc_6212F; "]: "
mov edx, 3
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, a13191mfatal0m; "\x1B[1;31;91mfatal:\x1B[0m "
mov edx, 15h
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)
lea rsi, aAssertionFaile_0; "assertion failed: "
mov edx, 12h
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)
lea rsi, aOneshotPath; "oneshot_path"
mov edx, 0Ch
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)
lea rsi, asc_6235D; "; "
mov edx, 2
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)
lea rsi, aInvalidArgumen; "Invalid argument [ipath]"
mov edx, 18h
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 rdi, rbx
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
mov rdi, [rsp+108h+var_100]; void *
cmp rdi, r14
jz short loc_F8DE
mov rsi, [rsp+108h+var_F0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F8DE:
lea rdi, [rsp+108h+var_D8]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
lea rdi, [rsp+108h+var_68]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, asc_6212D; "["
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rbx, [rsp+108h+var_68]
mov rdi, rbx; this
mov edx, 2
call _ZNSt10filesystem7__cxx114pathC2IA81_cS1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<char [81],std::filesystem::__cxx11::path>(char [81] const&,std::filesystem::__cxx11::path::format)
lea rdi, [rsp+108h+var_D8]; this
mov rsi, rbx
call _ZNKSt10filesystem7__cxx114path8filenameEv; std::filesystem::__cxx11::path::filename(void)
mov rsi, [rsp+108h+var_D8]
lea r14, [rsp+108h+var_78]
mov [r14-10h], r14
mov rdx, [rsp+108h+var_D0]
add rdx, rsi
lea rdi, [rsp+108h+var_88]
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 rsi, [rsp+108h+var_88]
mov rdx, [rsp+108h+var_80]
mov rdi, cs:_ZSt4cerr_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, rax
lea rsi, asc_8940A+1; ":"
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rbx
mov esi, 0Bh
call __ZNSolsEi; std::ostream::operator<<(int)
mov rbx, rax
lea rsi, asc_6212F; "]: "
mov edx, 3
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, a13191mfatal0m; "\x1B[1;31;91mfatal:\x1B[0m "
mov edx, 15h
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)
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+108h+var_40]; this
mov edx, 2
call _ZNSt10filesystem7__cxx114pathC2IA81_cS1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<char [81],std::filesystem::__cxx11::path>(char [81] const&,std::filesystem::__cxx11::path::format)
lea rdi, [rsp+108h+var_100]; this
lea rsi, [rsp+108h+var_40]
call _ZNKSt10filesystem7__cxx114path8filenameEv; std::filesystem::__cxx11::path::filename(void)
mov rsi, [rsp+108h+var_100]
lea r15, [rsp+108h+var_98]
mov [r15-10h], r15
mov rdx, [rsp+108h+var_F8]
add rdx, rsi
lea rdi, [rsp+108h+var_A8]
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 rsi, [rsp+108h+var_A8]
mov rdx, [rsp+108h+var_A0]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, rax
lea rsi, asc_8940A+1; ":"
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rbx
mov esi, 0Bh
call __ZNSolsEi; std::ostream::operator<<(int)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
lea rdi, [rsp+108h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+108h+var_100]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
lea rdi, [rsp+108h+var_40]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
lea rdi, [rsp+108h+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+108h+var_D8]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
lea rdi, [rsp+108h+var_68]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
call __ZSt9terminatev; std::terminate(void)
mov rbx, rax
mov rdi, [rsp+108h+var_A8]; void *
cmp rdi, r15
jz short loc_FAB9
mov rsi, [rsp+108h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_FAB9
mov rbx, rax
loc_FAB9:
lea rdi, [rsp+108h+var_100]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
jmp short loc_FAC8
mov rbx, rax
loc_FAC8:
lea rdi, [rsp+108h+var_40]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
jmp short loc_FADC
jmp short $+2
loc_FAD9:
mov rbx, rax
loc_FADC:
mov rdi, [rsp+108h+var_88]
cmp rdi, r14
jz short loc_FB16
mov rsi, [rsp+108h+var_78]
jmp short loc_FB09
jmp short loc_FB13
jmp short loc_FB22
mov rbx, rax
mov rdi, [rsp+108h+var_100]; void *
cmp rdi, r14
jz short loc_FB16
mov rsi, [rsp+108h+var_F0]
loc_FB09:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_FB16
loc_FB13:
mov rbx, rax
loc_FB16:
lea rdi, [rsp+108h+var_D8]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
jmp short loc_FB25
loc_FB22:
mov rbx, rax
loc_FB25:
lea rdi, [rsp+108h+var_68]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
mov rdi, rbx
call __Unwind_Resume
| long long Loader_OneShot::init(Loader_OneShot *this, long long a2, const char *a3)
{
long long v4; // rbx
long long v5; // rbx
long long v6; // rbx
long long v7; // rbx
long long v8; // rbx
long long v9; // rax
void *v10; // [rsp+8h] [rbp-100h] BYREF
long long v11; // [rsp+10h] [rbp-F8h]
_QWORD v12[3]; // [rsp+18h] [rbp-F0h] BYREF
_BYTE *v13; // [rsp+30h] [rbp-D8h] BYREF
long long v14; // [rsp+38h] [rbp-D0h]
void *v16[2]; // [rsp+60h] [rbp-A8h] BYREF
long long v17; // [rsp+70h] [rbp-98h] BYREF
_QWORD v18[2]; // [rsp+80h] [rbp-88h] BYREF
long long v19; // [rsp+90h] [rbp-78h] BYREF
_QWORD v20[5]; // [rsp+A0h] [rbp-68h] BYREF
_QWORD v21[8]; // [rsp+C8h] [rbp-40h] BYREF
if ( !cmdline::get((cmdline *)"ipath", 0LL, a3) )
{
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "[", 1LL);
std::filesystem::__cxx11::path::path<char [81],std::filesystem::__cxx11::path>((std::filesystem::__cxx11::path *)v20);
std::filesystem::__cxx11::path::filename((std::filesystem::__cxx11::path *)&v13, v20);
v10 = v12;
std::string::_M_construct<char const*>(&v10, v13, (long long)&v13[v14]);
v4 = std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, v10, v11);
std::__ostream_insert<char,std::char_traits<char>>(v4, ":", 1LL);
v5 = std::ostream::operator<<(v4, 11LL);
std::__ostream_insert<char,std::char_traits<char>>(v5, "]: ", 3LL);
std::__ostream_insert<char,std::char_traits<char>>(v5, "\x1B[1;31;91mfatal:\x1B[0m ", 21LL);
std::__ostream_insert<char,std::char_traits<char>>(v5, "assertion failed: ", 18LL);
std::__ostream_insert<char,std::char_traits<char>>(v5, "oneshot_path", 12LL);
std::__ostream_insert<char,std::char_traits<char>>(v5, "; ", 2LL);
std::__ostream_insert<char,std::char_traits<char>>(v5, "Invalid argument [ipath]", 24LL);
std::endl<char,std::char_traits<char>>(v5);
if ( v10 != v12 )
operator delete(v10, v12[0] + 1LL);
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)&v13);
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v20);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "[", 1LL);
std::filesystem::__cxx11::path::path<char [81],std::filesystem::__cxx11::path>((std::filesystem::__cxx11::path *)v20);
std::filesystem::__cxx11::path::filename((std::filesystem::__cxx11::path *)&v13, v20);
v18[0] = &v19;
std::string::_M_construct<char const*>(v18, v13, (long long)&v13[v14]);
v6 = std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, v18[0], v18[1]);
std::__ostream_insert<char,std::char_traits<char>>(v6, ":", 1LL);
v7 = std::ostream::operator<<(v6, 11LL);
std::__ostream_insert<char,std::char_traits<char>>(v7, "]: ", 3LL);
std::__ostream_insert<char,std::char_traits<char>>(v7, "\x1B[1;31;91mfatal:\x1B[0m ", 21LL);
std::filesystem::__cxx11::path::path<char [81],std::filesystem::__cxx11::path>((std::filesystem::__cxx11::path *)v21);
std::filesystem::__cxx11::path::filename((std::filesystem::__cxx11::path *)&v10, v21);
v16[0] = &v17;
std::string::_M_construct<char const*>(v16, v10, (long long)v10 + v11);
v8 = std::__ostream_insert<char,std::char_traits<char>>(v7, v16[0], v16[1]);
std::__ostream_insert<char,std::char_traits<char>>(v8, ":", 1LL);
v9 = std::ostream::operator<<(v8, 11LL);
std::endl<char,std::char_traits<char>>(v9);
std::string::~string(v16);
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)&v10);
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v21);
std::string::~string(v18);
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)&v13);
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v20);
std::terminate();
}
*((_BYTE *)this + 48) = 0;
return std::filesystem::__cxx11::path::operator=<char const*>((long long)this + 8);
}
| init:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xf0
MOV RBX,RDI
LEA RDI,[0x1622e8]
XOR ESI,ESI
CALL 0x0010e0f5
MOV qword ptr [RSP + 0x58],RAX
TEST RAX,RAX
JZ 0x0010f7a9
MOV byte ptr [RBX + 0x30],0x0
ADD RBX,0x8
LEA RSI,[RSP + 0x58]
MOV RDI,RBX
CALL 0x0010d0a2
ADD RSP,0xf0
POP RBX
POP R14
POP R15
RET
LAB_0010f7a9:
MOV RDI,qword ptr [0x001a2ff0]
LEA RSI,[0x16212d]
MOV EDX,0x1
CALL 0x0010c9e0
LEA RSI,[0x1623e1]
LEA RBX,[RSP + 0xa0]
MOV RDI,RBX
MOV EDX,0x2
CALL 0x0010fb54
LAB_0010f7dd:
LEA RDI,[RSP + 0x30]
MOV RSI,RBX
CALL 0x0010e21c
MOV RSI,qword ptr [RSP + 0x30]
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
MOV RDX,qword ptr [RSP + 0x38]
ADD RDX,RSI
LAB_0010f800:
LEA RDI,[RSP + 0x8]
CALL 0x0010e3e0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0010f814:
MOV RDI,qword ptr [0x001a2ff0]
CALL 0x0010c9e0
MOV RBX,RAX
LEA RSI,[0x18940b]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x0010c9e0
MOV RDI,RBX
MOV ESI,0xb
CALL 0x0010ceb0
MOV RBX,RAX
LEA RSI,[0x16212f]
MOV EDX,0x3
MOV RDI,RAX
CALL 0x0010c9e0
LEA RSI,[0x162133]
MOV EDX,0x15
MOV RDI,RBX
CALL 0x0010c9e0
LEA RSI,[0x16233e]
MOV EDX,0x12
MOV RDI,RBX
CALL 0x0010c9e0
LEA RSI,[0x162432]
MOV EDX,0xc
MOV RDI,RBX
CALL 0x0010c9e0
LEA RSI,[0x16235d]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x0010c9e0
LEA RSI,[0x162360]
MOV EDX,0x18
MOV RDI,RBX
CALL 0x0010c9e0
MOV RDI,RBX
CALL 0x0010c3f0
LAB_0010f8c7:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x0010f8de
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0010c8d0
LAB_0010f8de:
LEA RDI,[RSP + 0x30]
CALL 0x0010e29a
LEA RDI,[RSP + 0xa0]
CALL 0x0010e29a
MOV RDI,qword ptr [0x001a2ff0]
LEA RSI,[0x16212d]
MOV EDX,0x1
CALL 0x0010c9e0
LEA RSI,[0x1623e1]
LEA RBX,[RSP + 0xa0]
MOV RDI,RBX
MOV EDX,0x2
CALL 0x0010fb54
LAB_0010f929:
LEA RDI,[RSP + 0x30]
MOV RSI,RBX
CALL 0x0010e21c
MOV RSI,qword ptr [RSP + 0x30]
LEA R14,[RSP + 0x90]
MOV qword ptr [R14 + -0x10],R14
MOV RDX,qword ptr [RSP + 0x38]
ADD RDX,RSI
LAB_0010f94f:
LEA RDI,[RSP + 0x80]
CALL 0x0010e3e0
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
LAB_0010f96c:
MOV RDI,qword ptr [0x001a2ff0]
CALL 0x0010c9e0
MOV RBX,RAX
LEA RSI,[0x18940b]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x0010c9e0
MOV RDI,RBX
MOV ESI,0xb
CALL 0x0010ceb0
MOV RBX,RAX
LEA RSI,[0x16212f]
MOV EDX,0x3
MOV RDI,RAX
CALL 0x0010c9e0
LEA RSI,[0x162133]
MOV EDX,0x15
MOV RDI,RBX
CALL 0x0010c9e0
LAB_0010f9c7:
LEA RSI,[0x1623e1]
LEA RDI,[RSP + 0xc8]
MOV EDX,0x2
CALL 0x0010fb54
LAB_0010f9e0:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0xc8]
CALL 0x0010e21c
MOV RSI,qword ptr [RSP + 0x8]
LEA R15,[RSP + 0x70]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RSP + 0x10]
ADD RDX,RSI
LAB_0010fa08:
LEA RDI,[RSP + 0x60]
CALL 0x0010e3e0
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
LAB_0010fa1c:
MOV RDI,RBX
CALL 0x0010c9e0
MOV RBX,RAX
LEA RSI,[0x18940b]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x0010c9e0
MOV RDI,RBX
MOV ESI,0xb
CALL 0x0010ceb0
MOV RDI,RAX
CALL 0x0010c3f0
LAB_0010fa50:
LEA RDI,[RSP + 0x60]
CALL 0x0010c3b0
LEA RDI,[RSP + 0x8]
CALL 0x0010e29a
LEA RDI,[RSP + 0xc8]
CALL 0x0010e29a
LEA RDI,[RSP + 0x80]
CALL 0x0010c3b0
LEA RDI,[RSP + 0x30]
CALL 0x0010e29a
LEA RDI,[RSP + 0xa0]
CALL 0x0010e29a
CALL 0x0010c1e0
|
/* Loader_OneShot::init() */
void __thiscall Loader_OneShot::init(Loader_OneShot *this)
{
ostream *poVar1;
long *local_100;
long local_f8;
long local_f0 [3];
long local_d8;
long local_d0;
char *local_b0;
char *local_a8;
long local_a0;
char local_98 [16];
char *local_88;
long local_80;
char local_78 [16];
path local_68 [40];
path local_40 [40];
local_b0 = (char *)cmdline::get("ipath",(char *)0x0);
if (local_b0 != (char *)0x0) {
this[0x30] = (Loader_OneShot)0x0;
std::filesystem::__cxx11::path::operator=((path *)(this + 8),&local_b0);
return;
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_001a2ff0,"[",1);
std::filesystem::__cxx11::path::path<char[81],std::filesystem::__cxx11::path>
(local_68,
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/loader_oneshot.cc",2);
/* try { // try from 0010f7dd to 0010f7e9 has its CatchHandler @ 0010fb22 */
std::filesystem::__cxx11::path::filename();
/* try { // try from 0010f800 to 0010f809 has its CatchHandler @ 0010fb13 */
local_100 = local_f0;
std::__cxx11::string::_M_construct<char_const*>(&local_100,local_d8,local_d0 + local_d8);
/* try { // try from 0010f814 to 0010f8c6 has its CatchHandler @ 0010faf7 */
poVar1 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_001a2ff0,(char *)local_100,local_f8);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,":",1);
poVar1 = (ostream *)std::ostream::operator<<(poVar1,0xb);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"]: ",3);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\x1b[1;31;91mfatal:\x1b[0m ",0x15);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"assertion failed: ",0x12);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"oneshot_path",0xc);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"; ",2);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"Invalid argument [ipath]",0x18);
std::endl<char,std::char_traits<char>>(poVar1);
if (local_100 != local_f0) {
operator_delete(local_100,local_f0[0] + 1);
}
std::filesystem::__cxx11::path::~path((path *)&local_d8);
std::filesystem::__cxx11::path::~path(local_68);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_001a2ff0,"[",1);
std::filesystem::__cxx11::path::path<char[81],std::filesystem::__cxx11::path>
(local_68,
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/loader_oneshot.cc",2);
/* try { // try from 0010f929 to 0010f935 has its CatchHandler @ 0010faf5 */
std::filesystem::__cxx11::path::filename();
local_88 = local_78;
/* try { // try from 0010f94f to 0010f95b has its CatchHandler @ 0010faf3 */
std::__cxx11::string::_M_construct<char_const*>(&local_88,local_d8,local_d0 + local_d8);
/* try { // try from 0010f96c to 0010f9c6 has its CatchHandler @ 0010fad9 */
poVar1 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_001a2ff0,local_88,local_80);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,":",1);
poVar1 = (ostream *)std::ostream::operator<<(poVar1,0xb);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"]: ",3);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\x1b[1;31;91mfatal:\x1b[0m ",0x15);
/* try { // try from 0010f9c7 to 0010f9df has its CatchHandler @ 0010fad7 */
std::filesystem::__cxx11::path::path<char[81],std::filesystem::__cxx11::path>
(local_40,
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/loader_oneshot.cc",2);
/* try { // try from 0010f9e0 to 0010f9f1 has its CatchHandler @ 0010fac5 */
std::filesystem::__cxx11::path::filename();
local_a8 = local_98;
/* try { // try from 0010fa08 to 0010fa11 has its CatchHandler @ 0010fab6 */
std::__cxx11::string::_M_construct<char_const*>(&local_a8,local_100,(long)local_100 + local_f8);
/* try { // try from 0010fa1c to 0010fa4f has its CatchHandler @ 0010fa9a */
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(poVar1,local_a8,local_a0);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,":",1);
poVar1 = (ostream *)std::ostream::operator<<(poVar1,0xb);
std::endl<char,std::char_traits<char>>(poVar1);
std::__cxx11::string::~string((string *)&local_a8);
std::filesystem::__cxx11::path::~path((path *)&local_100);
std::filesystem::__cxx11::path::~path(local_40);
std::__cxx11::string::~string((string *)&local_88);
std::filesystem::__cxx11::path::~path((path *)&local_d8);
std::filesystem::__cxx11::path::~path(local_68);
/* WARNING: Subroutine does not return */
std::terminate();
}
| |
38,493 | js_proxy_has | bluesky950520[P]quickjs/quickjs.c | static int js_proxy_has(JSContext *ctx, JSValue obj, JSAtom atom)
{
JSProxyData *s;
JSValue method, ret1, atom_val;
int ret, res;
JSObject *p;
JSValue args[2];
BOOL res2;
s = get_proxy_method(ctx, &method, obj, JS_ATOM_has);
if (!s)
return -1;
if (JS_IsUndefined(method))
return JS_HasProperty(ctx, s->target, atom);
atom_val = JS_AtomToValue(ctx, atom);
if (JS_IsException(atom_val)) {
JS_FreeValue(ctx, method);
return -1;
}
args[0] = s->target;
args[1] = atom_val;
ret1 = JS_CallFree(ctx, method, s->handler, 2, args);
JS_FreeValue(ctx, atom_val);
if (JS_IsException(ret1))
return -1;
ret = JS_ToBoolFree(ctx, ret1);
if (!ret) {
JSPropertyDescriptor desc;
p = JS_VALUE_GET_OBJ(s->target);
res = JS_GetOwnPropertyInternal(ctx, &desc, p, atom);
if (res < 0)
return -1;
if (res) {
res2 = !(desc.flags & JS_PROP_CONFIGURABLE);
js_free_desc(ctx, &desc);
if (res2 || !p->extensible) {
JS_ThrowTypeError(ctx, "proxy: inconsistent has");
return -1;
}
}
}
return ret;
} | O0 | c | js_proxy_has:
subq $0x118, %rsp # imm = 0x118
movq %rsi, 0x100(%rsp)
movq %rdx, 0x108(%rsp)
movq %rdi, 0xf8(%rsp)
movl %ecx, 0xf4(%rsp)
movq 0xf8(%rsp), %rdi
movq 0x100(%rsp), %rdx
movq 0x108(%rsp), %rcx
leaq 0xd8(%rsp), %rsi
movl $0x64, %r8d
callq 0x60070
movq %rax, 0xe8(%rsp)
cmpq $0x0, 0xe8(%rsp)
jne 0x8a794
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
jmp 0x8aa57
movq 0xd8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0x2e260
cmpl $0x0, %eax
je 0x8a7dd
movq 0xf8(%rsp), %rdi
movq 0xe8(%rsp), %rax
movl 0xf4(%rsp), %ecx
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x30ed0
movl %eax, 0x114(%rsp)
jmp 0x8aa57
movq 0xf8(%rsp), %rdi
movl 0xf4(%rsp), %esi
callq 0x28e30
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xb8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x8a85c
movq 0xf8(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x23c90
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
jmp 0x8aa57
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x80(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xf8(%rsp), %rdi
movq 0xe8(%rsp), %r8
leaq 0x80(%rsp), %rax
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
movq 0x10(%r8), %rcx
movq 0x18(%r8), %r8
movl $0x2, %r9d
movq %rax, (%rsp)
callq 0x2e280
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xf8(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
callq 0x23c90
movq 0xc8(%rsp), %rdi
movq 0xd0(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x8a945
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
jmp 0x8aa57
movq 0xf8(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
callq 0x2e330
movl %eax, 0xb4(%rsp)
cmpl $0x0, 0xb4(%rsp)
jne 0x8aa49
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0xf8(%rsp), %rdi
movq 0xa8(%rsp), %rdx
movl 0xf4(%rsp), %ecx
leaq 0x20(%rsp), %rsi
callq 0x301c0
movl %eax, 0xb0(%rsp)
cmpl $0x0, 0xb0(%rsp)
jge 0x8a9cc
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
jmp 0x8aa57
cmpl $0x0, 0xb0(%rsp)
je 0x8aa47
movl 0x20(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x7c(%rsp)
movq 0xf8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x60a00
cmpl $0x0, 0x7c(%rsp)
jne 0x8aa18
movq 0xa8(%rsp), %rax
movb 0x5(%rax), %al
andb $0x1, %al
cmpb $0x0, %al
jne 0x8aa45
movq 0xf8(%rsp), %rdi
leaq 0x84766(%rip), %rsi # 0x10f18d
movb $0x0, %al
callq 0x2d300
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
jmp 0x8aa57
jmp 0x8aa47
jmp 0x8aa49
movl 0xb4(%rsp), %eax
movl %eax, 0x114(%rsp)
movl 0x114(%rsp), %eax
addq $0x118, %rsp # imm = 0x118
retq
nopw %cs:(%rax,%rax)
| js_proxy_has:
sub rsp, 118h
mov [rsp+118h+var_18], rsi
mov [rsp+118h+var_10], rdx
mov [rsp+118h+var_20], rdi
mov [rsp+118h+var_24], ecx
mov rdi, [rsp+118h+var_20]
mov rdx, [rsp+118h+var_18]
mov rcx, [rsp+118h+var_10]
lea rsi, [rsp+118h+var_40]
mov r8d, 64h ; 'd'
call get_proxy_method
mov [rsp+118h+var_30], rax
cmp [rsp+118h+var_30], 0
jnz short loc_8A794
mov [rsp+118h+var_4], 0FFFFFFFFh
jmp loc_8AA57
loc_8A794:
mov rdi, [rsp+118h+var_40]
mov rsi, [rsp+118h+var_38]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_8A7DD
mov rdi, [rsp+118h+var_20]
mov rax, [rsp+118h+var_30]
mov ecx, [rsp+118h+var_24]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_HasProperty
mov [rsp+118h+var_4], eax
jmp loc_8AA57
loc_8A7DD:
mov rdi, [rsp+118h+var_20]
mov esi, [rsp+118h+var_24]
call JS_AtomToValue
mov [rsp+118h+var_B0], rax
mov [rsp+118h+var_A8], rdx
mov rax, [rsp+118h+var_B0]
mov [rsp+118h+var_60], rax
mov rax, [rsp+118h+var_A8]
mov [rsp+118h+var_58], rax
mov rdi, [rsp+118h+var_60]
mov rsi, [rsp+118h+var_58]
call JS_IsException_1
cmp eax, 0
jz short loc_8A85C
mov rdi, [rsp+118h+var_20]
mov rsi, [rsp+118h+var_40]
mov rdx, [rsp+118h+var_38]
call JS_FreeValue
mov [rsp+118h+var_4], 0FFFFFFFFh
jmp loc_8AA57
loc_8A85C:
mov rax, [rsp+118h+var_30]
mov rcx, [rax]
mov [rsp+118h+var_98], rcx
mov rax, [rax+8]
mov [rsp+118h+var_90], rax
mov rax, [rsp+118h+var_60]
mov [rsp+118h+var_88], rax
mov rax, [rsp+118h+var_58]
mov [rsp+118h+var_80], rax
mov rdi, [rsp+118h+var_20]
mov r8, [rsp+118h+var_30]
lea rax, [rsp+118h+var_98]
mov rsi, [rsp+118h+var_40]
mov rdx, [rsp+118h+var_38]
mov rcx, [r8+10h]
mov r8, [r8+18h]
mov r9d, 2
mov [rsp+118h+var_118], rax
call JS_CallFree
mov [rsp+118h+var_C0], rax
mov [rsp+118h+var_B8], rdx
mov rax, [rsp+118h+var_C0]
mov [rsp+118h+var_50], rax
mov rax, [rsp+118h+var_B8]
mov [rsp+118h+var_48], rax
mov rdi, [rsp+118h+var_20]
mov rsi, [rsp+118h+var_60]
mov rdx, [rsp+118h+var_58]
call JS_FreeValue
mov rdi, [rsp+118h+var_50]
mov rsi, [rsp+118h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_8A945
mov [rsp+118h+var_4], 0FFFFFFFFh
jmp loc_8AA57
loc_8A945:
mov rdi, [rsp+118h+var_20]
mov rsi, [rsp+118h+var_50]
mov rdx, [rsp+118h+var_48]
call JS_ToBoolFree
mov [rsp+118h+var_64], eax
cmp [rsp+118h+var_64], 0
jnz loc_8AA49
mov rax, [rsp+118h+var_30]
mov rax, [rax]
mov [rsp+118h+var_70], rax
mov rdi, [rsp+118h+var_20]
mov rdx, [rsp+118h+var_70]
mov ecx, [rsp+118h+var_24]
lea rsi, [rsp+118h+var_F8]
call JS_GetOwnPropertyInternal
mov [rsp+118h+var_68], eax
cmp [rsp+118h+var_68], 0
jge short loc_8A9CC
mov [rsp+118h+var_4], 0FFFFFFFFh
jmp loc_8AA57
loc_8A9CC:
cmp [rsp+118h+var_68], 0
jz short loc_8AA47
mov eax, [rsp+118h+var_F8]
and eax, 1
cmp eax, 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov [rsp+118h+var_9C], eax
mov rdi, [rsp+118h+var_20]
lea rsi, [rsp+118h+var_F8]
call js_free_desc
cmp [rsp+118h+var_9C], 0
jnz short loc_8AA18
mov rax, [rsp+118h+var_70]
mov al, [rax+5]
and al, 1
cmp al, 0
jnz short loc_8AA45
loc_8AA18:
mov rdi, [rsp+118h+var_20]
lea rsi, aProxyInconsist_5; "proxy: inconsistent has"
mov al, 0
call JS_ThrowTypeError
mov [rsp+118h+var_108], rax
mov [rsp+118h+var_100], rdx
mov [rsp+118h+var_4], 0FFFFFFFFh
jmp short loc_8AA57
loc_8AA45:
jmp short $+2
loc_8AA47:
jmp short $+2
loc_8AA49:
mov eax, [rsp+118h+var_64]
mov [rsp+118h+var_4], eax
loc_8AA57:
mov eax, [rsp+118h+var_4]
add rsp, 118h
retn
| long long js_proxy_has(
long long a1,
long long a2,
long long a3,
unsigned int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
long long v13; // rdx
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
char v21; // [rsp+0h] [rbp-118h]
long long v22[7]; // [rsp+20h] [rbp-F8h] BYREF
long long v23; // [rsp+58h] [rbp-C0h]
long long v24; // [rsp+60h] [rbp-B8h]
long long v25; // [rsp+68h] [rbp-B0h]
long long v26; // [rsp+70h] [rbp-A8h]
BOOL v27; // [rsp+7Ch] [rbp-9Ch]
_QWORD v28[5]; // [rsp+80h] [rbp-98h] BYREF
long long v29; // [rsp+A8h] [rbp-70h]
int OwnPropertyInternal; // [rsp+B0h] [rbp-68h]
unsigned int v31; // [rsp+B4h] [rbp-64h]
long long v32; // [rsp+B8h] [rbp-60h]
long long v33; // [rsp+C0h] [rbp-58h]
long long v34; // [rsp+C8h] [rbp-50h]
long long v35; // [rsp+D0h] [rbp-48h]
long long v36; // [rsp+D8h] [rbp-40h] BYREF
long long v37; // [rsp+E0h] [rbp-38h]
long long *proxy_method; // [rsp+E8h] [rbp-30h]
unsigned int v39; // [rsp+F4h] [rbp-24h]
long long v40; // [rsp+F8h] [rbp-20h]
long long v41; // [rsp+100h] [rbp-18h]
long long v42; // [rsp+108h] [rbp-10h]
v41 = a2;
v42 = a3;
v40 = a1;
v39 = a4;
proxy_method = (long long *)get_proxy_method(a1, &v36, a2, a3, 100);
if ( proxy_method )
{
if ( JS_IsUndefined_0(v36, v37) )
{
return (unsigned int)JS_HasProperty(v40, *proxy_method, proxy_method[1], v39);
}
else
{
v25 = JS_AtomToValue(v40, v39);
v26 = v12;
v32 = v25;
v33 = v12;
if ( JS_IsException_1(v25, v12) )
{
JS_FreeValue(v40, v36, v37);
return (unsigned int)-1;
}
else
{
v28[0] = *proxy_method;
v28[1] = proxy_method[1];
v28[2] = v32;
v28[3] = v33;
v23 = JS_CallFree(v40, v36, v37, proxy_method[2], proxy_method[3], 2, (long long)v28);
v24 = v13;
v34 = v23;
v35 = v13;
JS_FreeValue(v40, v32, v33);
if ( !JS_IsException_1(v34, v35) )
{
v31 = JS_ToBoolFree(v40, v34, v35);
if ( !v31 )
{
v29 = *proxy_method;
OwnPropertyInternal = JS_GetOwnPropertyInternal(v40, (long long)v22, v29, v39);
if ( OwnPropertyInternal < 0 )
return (unsigned int)-1;
if ( OwnPropertyInternal )
{
v27 = (v22[0] & 1) == 0;
js_free_desc(v40, v22);
if ( v27 || (*(_BYTE *)(v29 + 5) & 1) == 0 )
{
JS_ThrowTypeError(
v40,
(long long)"proxy: inconsistent has",
v14,
v15,
v16,
v17,
a5,
a6,
a7,
a8,
v18,
v19,
a11,
a12,
v21);
return (unsigned int)-1;
}
}
}
return v31;
}
return (unsigned int)-1;
}
}
}
else
{
return (unsigned int)-1;
}
}
| js_proxy_has:
SUB RSP,0x118
MOV qword ptr [RSP + 0x100],RSI
MOV qword ptr [RSP + 0x108],RDX
MOV qword ptr [RSP + 0xf8],RDI
MOV dword ptr [RSP + 0xf4],ECX
MOV RDI,qword ptr [RSP + 0xf8]
MOV RDX,qword ptr [RSP + 0x100]
MOV RCX,qword ptr [RSP + 0x108]
LEA RSI,[RSP + 0xd8]
MOV R8D,0x64
CALL 0x00160070
MOV qword ptr [RSP + 0xe8],RAX
CMP qword ptr [RSP + 0xe8],0x0
JNZ 0x0018a794
MOV dword ptr [RSP + 0x114],0xffffffff
JMP 0x0018aa57
LAB_0018a794:
MOV RDI,qword ptr [RSP + 0xd8]
MOV RSI,qword ptr [RSP + 0xe0]
CALL 0x0012e260
CMP EAX,0x0
JZ 0x0018a7dd
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xe8]
MOV ECX,dword ptr [RSP + 0xf4]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00130ed0
MOV dword ptr [RSP + 0x114],EAX
JMP 0x0018aa57
LAB_0018a7dd:
MOV RDI,qword ptr [RSP + 0xf8]
MOV ESI,dword ptr [RSP + 0xf4]
CALL 0x00128e30
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0xc0],RAX
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x0018a85c
MOV RDI,qword ptr [RSP + 0xf8]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
CALL 0x00123c90
MOV dword ptr [RSP + 0x114],0xffffffff
JMP 0x0018aa57
LAB_0018a85c:
MOV RAX,qword ptr [RSP + 0xe8]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x80],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0xf8]
MOV R8,qword ptr [RSP + 0xe8]
LEA RAX,[RSP + 0x80]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
MOV RCX,qword ptr [R8 + 0x10]
MOV R8,qword ptr [R8 + 0x18]
MOV R9D,0x2
MOV qword ptr [RSP],RAX
CALL 0x0012e280
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xd0],RAX
MOV RDI,qword ptr [RSP + 0xf8]
MOV RSI,qword ptr [RSP + 0xb8]
MOV RDX,qword ptr [RSP + 0xc0]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0xc8]
MOV RSI,qword ptr [RSP + 0xd0]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x0018a945
MOV dword ptr [RSP + 0x114],0xffffffff
JMP 0x0018aa57
LAB_0018a945:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
CALL 0x0012e330
MOV dword ptr [RSP + 0xb4],EAX
CMP dword ptr [RSP + 0xb4],0x0
JNZ 0x0018aa49
MOV RAX,qword ptr [RSP + 0xe8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xf8]
MOV RDX,qword ptr [RSP + 0xa8]
MOV ECX,dword ptr [RSP + 0xf4]
LEA RSI,[RSP + 0x20]
CALL 0x001301c0
MOV dword ptr [RSP + 0xb0],EAX
CMP dword ptr [RSP + 0xb0],0x0
JGE 0x0018a9cc
MOV dword ptr [RSP + 0x114],0xffffffff
JMP 0x0018aa57
LAB_0018a9cc:
CMP dword ptr [RSP + 0xb0],0x0
JZ 0x0018aa47
MOV EAX,dword ptr [RSP + 0x20]
AND EAX,0x1
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + 0x7c],EAX
MOV RDI,qword ptr [RSP + 0xf8]
LEA RSI,[RSP + 0x20]
CALL 0x00160a00
CMP dword ptr [RSP + 0x7c],0x0
JNZ 0x0018aa18
MOV RAX,qword ptr [RSP + 0xa8]
MOV AL,byte ptr [RAX + 0x5]
AND AL,0x1
CMP AL,0x0
JNZ 0x0018aa45
LAB_0018aa18:
MOV RDI,qword ptr [RSP + 0xf8]
LEA RSI,[0x20f18d]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV dword ptr [RSP + 0x114],0xffffffff
JMP 0x0018aa57
LAB_0018aa45:
JMP 0x0018aa47
LAB_0018aa47:
JMP 0x0018aa49
LAB_0018aa49:
MOV EAX,dword ptr [RSP + 0xb4]
MOV dword ptr [RSP + 0x114],EAX
LAB_0018aa57:
MOV EAX,dword ptr [RSP + 0x114]
ADD RSP,0x118
RET
|
int js_proxy_has(int8 param_1,int8 param_2,int8 param_3,int4 param_4)
{
int iVar1;
uint local_f8 [14];
int1 local_c0 [16];
int1 local_b0 [16];
uint local_9c;
long local_98;
long local_90;
int1 local_88 [16];
long local_70;
int local_68;
int local_64;
int1 local_60 [16];
int1 local_50 [16];
int8 local_40;
int8 local_38;
long *local_30;
int4 local_24;
int8 local_20;
int8 local_18;
int8 local_10;
int local_4;
local_24 = param_4;
local_20 = param_1;
local_18 = param_2;
local_10 = param_3;
local_30 = (long *)get_proxy_method(param_1,&local_40,param_2,param_3,100);
if (local_30 == (long *)0x0) {
local_4 = -1;
}
else {
iVar1 = JS_IsUndefined(local_40,local_38);
if (iVar1 == 0) {
local_b0 = JS_AtomToValue(local_20,local_24);
local_60 = local_b0;
iVar1 = JS_IsException(local_b0._0_8_,local_b0._8_8_);
if (iVar1 == 0) {
local_98 = *local_30;
local_90 = local_30[1];
local_88 = local_60;
local_c0 = JS_CallFree(local_20,local_40,local_38,local_30[2],local_30[3],2,&local_98);
local_50 = local_c0;
JS_FreeValue(local_20,local_60._0_8_,local_60._8_8_);
iVar1 = JS_IsException(local_50._0_8_,local_50._8_8_);
if (iVar1 == 0) {
local_64 = JS_ToBoolFree(local_20,local_50._0_8_,local_50._8_8_);
if (local_64 == 0) {
local_70 = *local_30;
local_68 = JS_GetOwnPropertyInternal(local_20,local_f8,local_70,local_24);
if (local_68 < 0) {
return -1;
}
if (local_68 != 0) {
local_9c = (uint)(((local_f8[0] & 1) != 0 ^ 0xffU) & 1);
js_free_desc(local_20,local_f8);
if ((local_9c != 0) || ((*(byte *)(local_70 + 5) & 1) == 0)) {
JS_ThrowTypeError(local_20,"proxy: inconsistent has");
return -1;
}
}
}
local_4 = local_64;
}
else {
local_4 = -1;
}
}
else {
JS_FreeValue(local_20,local_40,local_38);
local_4 = -1;
}
}
else {
local_4 = JS_HasProperty(local_20,*local_30,local_30[1],local_24);
}
}
return local_4;
}
| |
38,494 | js_proxy_has | bluesky950520[P]quickjs/quickjs.c | static int js_proxy_has(JSContext *ctx, JSValue obj, JSAtom atom)
{
JSProxyData *s;
JSValue method, ret1, atom_val;
int ret, res;
JSObject *p;
JSValue args[2];
BOOL res2;
s = get_proxy_method(ctx, &method, obj, JS_ATOM_has);
if (!s)
return -1;
if (JS_IsUndefined(method))
return JS_HasProperty(ctx, s->target, atom);
atom_val = JS_AtomToValue(ctx, atom);
if (JS_IsException(atom_val)) {
JS_FreeValue(ctx, method);
return -1;
}
args[0] = s->target;
args[1] = atom_val;
ret1 = JS_CallFree(ctx, method, s->handler, 2, args);
JS_FreeValue(ctx, atom_val);
if (JS_IsException(ret1))
return -1;
ret = JS_ToBoolFree(ctx, ret1);
if (!ret) {
JSPropertyDescriptor desc;
p = JS_VALUE_GET_OBJ(s->target);
res = JS_GetOwnPropertyInternal(ctx, &desc, p, atom);
if (res < 0)
return -1;
if (res) {
res2 = !(desc.flags & JS_PROP_CONFIGURABLE);
js_free_desc(ctx, &desc);
if (res2 || !p->extensible) {
JS_ThrowTypeError(ctx, "proxy: inconsistent has");
return -1;
}
}
}
return ret;
} | O1 | c | js_proxy_has:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %ecx, %r14d
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x18(%rsp), %rsi
movl $0x64, %r8d
callq 0x3d3e0
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x4f00a
movq %rax, %r15
movq 0x20(%rsp), %r12
cmpl $0x3, %r12d
je 0x4f01e
movq %rbx, %rdi
movl %r14d, 0xc(%rsp)
movl %r14d, %esi
xorl %edx, %edx
callq 0x2075a
movq %rdx, %r14
cmpl $0x6, %r14d
jne 0x4ef4e
movq 0x18(%rsp), %rsi
movq 0x18(%rbx), %rdi
movq %r12, %rdx
callq 0x1d8c6
jmp 0x4f00a
movq %rax, %r13
movups (%r15), %xmm0
leaq 0x60(%rsp), %rax
movaps %xmm0, (%rax)
movq %r13, 0x10(%rax)
movq %r14, 0x18(%rax)
movq 0x18(%rsp), %rsi
movq 0x10(%r15), %rcx
movq 0x18(%r15), %r8
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r12, %rdx
movl $0x2, %r9d
callq 0x22c9d
movq %rax, 0x10(%rsp)
movq %rdx, %r12
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1d8c6
cmpl $0x6, %r12d
je 0x4f00a
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x22d0d
movl %eax, %ebp
testl %eax, %eax
jne 0x4f00a
movq (%r15), %r14
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
movl 0xc(%rsp), %ecx
callq 0x23bd9
testl %eax, %eax
js 0x4f005
je 0x4f00a
leaq 0x28(%rsp), %rsi
movb (%rsi), %r15b
movq %rbx, %rdi
callq 0x3d8c3
testb $0x1, %r15b
je 0x4eff4
testb $0x1, 0x5(%r14)
jne 0x4f00a
leaq 0x5112e(%rip), %rsi # 0xa0129
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
movl %r14d, %ecx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf753
| js_proxy_has:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14d, ecx
mov rcx, rdx
mov rdx, rsi
mov rbx, rdi
lea rsi, [rsp+0B8h+var_A0]
mov r8d, 64h ; 'd'
call get_proxy_method
mov ebp, 0FFFFFFFFh
test rax, rax
jz loc_4F00A
mov r15, rax
mov r12, [rsp+0B8h+var_98]
cmp r12d, 3
jz loc_4F01E
mov rdi, rbx
mov [rsp+0B8h+var_AC], r14d
mov esi, r14d
xor edx, edx
call __JS_AtomToValue
mov r14, rdx
cmp r14d, 6
jnz short loc_4EF4E
mov rsi, [rsp+0B8h+var_A0]
mov rdi, [rbx+18h]
mov rdx, r12
call JS_FreeValueRT
jmp loc_4F00A
loc_4EF4E:
mov r13, rax
movups xmm0, xmmword ptr [r15]
lea rax, [rsp+0B8h+var_58]
movaps xmmword ptr [rax], xmm0
mov [rax+10h], r13
mov [rax+18h], r14
mov rsi, [rsp+0B8h+var_A0]
mov rcx, [r15+10h]
mov r8, [r15+18h]
mov [rsp+0B8h+var_B8], rax
mov rdi, rbx
mov rdx, r12
mov r9d, 2
call JS_CallFree
mov [rsp+0B8h+var_A8], rax
mov r12, rdx
mov rdi, [rbx+18h]
mov rsi, r13
mov rdx, r14
call JS_FreeValueRT
cmp r12d, 6
jz short loc_4F00A
mov rdi, rbx
mov rsi, [rsp+0B8h+var_A8]
mov rdx, r12
call JS_ToBoolFree
mov ebp, eax
test eax, eax
jnz short loc_4F00A
mov r14, [r15]
lea rsi, [rsp+0B8h+var_90]
mov rdi, rbx
mov rdx, r14
mov ecx, [rsp+0B8h+var_AC]
call JS_GetOwnPropertyInternal
test eax, eax
js short loc_4F005
jz short loc_4F00A
lea rsi, [rsp+0B8h+var_90]
mov r15b, [rsi]
mov rdi, rbx
call js_free_desc
test r15b, 1
jz short loc_4EFF4
test byte ptr [r14+5], 1
jnz short loc_4F00A
loc_4EFF4:
lea rsi, aProxyInconsist_5; "proxy: inconsistent has"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_4F005:
mov ebp, 0FFFFFFFFh
loc_4F00A:
mov eax, ebp
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4F01E:
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
mov ecx, r14d
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_HasProperty
| long long js_proxy_has(
long long a1,
long long a2,
long long a3,
unsigned int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
long long a13,
long long a14)
{
long long *proxy_method; // rax
unsigned int v16; // ebp
long long *v17; // r15
long long v18; // r12
long long v19; // rax
long long v20; // rdx
long long v21; // r14
_DWORD *v22; // r13
__m128 v23; // xmm0
long long v24; // rdx
long long v25; // r12
long long v26; // r14
int OwnPropertyInternal; // eax
char v28; // r15
long long v29; // rdx
long long v30; // rcx
long long v31; // r8
long long v32; // r9
__m128 v33; // xmm4
__m128 v34; // xmm5
char v36; // [rsp+0h] [rbp-B8h]
int v37; // [rsp+Ch] [rbp-ACh]
long long v38; // [rsp+10h] [rbp-A8h]
_DWORD *v39; // [rsp+18h] [rbp-A0h] BYREF
long long v40; // [rsp+20h] [rbp-98h]
_BYTE v41[56]; // [rsp+28h] [rbp-90h] BYREF
__m128 v42; // [rsp+60h] [rbp-58h] BYREF
long long v43; // [rsp+70h] [rbp-48h]
long long v44; // [rsp+78h] [rbp-40h]
proxy_method = (long long *)get_proxy_method(
a1,
(unsigned long long *)&v39,
a2,
a3,
100LL,
a14,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12);
v16 = -1;
if ( !proxy_method )
return v16;
v17 = proxy_method;
v18 = v40;
if ( (_DWORD)v40 != 3 )
{
v37 = a4;
v19 = _JS_AtomToValue(a1, a4, 0);
v21 = v20;
if ( (_DWORD)v20 == 6 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v18);
}
else
{
v22 = (_DWORD *)v19;
v23 = *(__m128 *)v17;
v42 = *(__m128 *)v17;
v43 = v19;
v44 = v20;
v38 = JS_CallFree(a1, v39, v18, v17[2], v17[3], 2, (long long)&v42);
v25 = v24;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v22, v21);
if ( (_DWORD)v25 == 6 )
return v16;
v16 = JS_ToBoolFree(a1, v38, v25);
if ( v16 )
return v16;
v26 = *v17;
OwnPropertyInternal = JS_GetOwnPropertyInternal(a1, (long long)v41, *v17, v37);
if ( OwnPropertyInternal >= 0 )
{
if ( !OwnPropertyInternal )
return v16;
v28 = v41[0];
js_free_desc(a1, (long long)v41);
if ( (v28 & 1) != 0 && (*(_BYTE *)(v26 + 5) & 1) != 0 )
return v16;
JS_ThrowTypeError(
a1,
(long long)"proxy: inconsistent has",
v29,
v30,
v31,
v32,
v23,
a6,
a7,
a8,
v33,
v34,
a11,
a12,
v36);
}
return (unsigned int)-1;
}
return v16;
}
return JS_HasProperty(a1, *proxy_method, proxy_method[1], a4);
}
| |||
38,495 | ma_get_dynamic | eloqsql/libmariadb/libmariadb/ma_array.c | void ma_get_dynamic(DYNAMIC_ARRAY *array, void * element, uint idx)
{
if (idx >= array->elements)
{
memset(element, 0, array->size_of_element);
return;
}
memcpy(element,array->buffer+idx*array->size_of_element,
(size_t) array->size_of_element);
} | O0 | c | ma_get_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jb 0x74965
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x38300
jmp 0x7498e
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
callq 0x380b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_get_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
cmp eax, [rcx+8]
jb short loc_74965
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
xor esi, esi
call _memset
jmp short loc_7498E
loc_74965:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rax]
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
imul eax, [rcx+14h]
mov eax, eax
add rsi, rax
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
call _memcpy
loc_7498E:
add rsp, 20h
pop rbp
retn
| long long ma_get_dynamic(long long a1, long long a2, unsigned int a3)
{
if ( a3 < *(_DWORD *)(a1 + 8) )
return memcpy(a2, *(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, *(unsigned int *)(a1 + 20));
else
return memset(a2, 0LL, *(unsigned int *)(a1 + 20));
}
| ma_get_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x8]
JC 0x00174965
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00138300
JMP 0x0017498e
LAB_00174965:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
CALL 0x001380b0
LAB_0017498e:
ADD RSP,0x20
POP RBP
RET
|
void ma_get_dynamic(long *param_1,void *param_2,uint param_3)
{
if (param_3 < *(uint *)(param_1 + 1)) {
memcpy(param_2,(void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))),
(ulong)*(uint *)((long)param_1 + 0x14));
}
else {
memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14));
}
return;
}
| |
38,496 | js_aggregate_error_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_aggregate_error_constructor(JSContext *ctx,
JSValue errors)
{
JSValue obj;
obj = JS_NewObjectProtoClass(ctx,
ctx->native_error_proto[JS_AGGREGATE_ERROR],
JS_CLASS_ERROR);
if (JS_IsException(obj))
return obj;
JS_DefinePropertyValue(ctx, obj, JS_ATOM_errors, js_dup(errors),
JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE);
return obj;
} | O2 | c | js_aggregate_error_constructor:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x108(%rdi), %rsi
movq 0x110(%rdi), %rdx
pushq $0x3
popq %rcx
callq 0x1b069
movq %rax, %r12
movq %rdx, %r13
cmpl $0x6, %r13d
je 0x48cbf
cmpl $-0x9, %ebx
jb 0x48ca1
incl (%r14)
movl $0x3, (%rsp)
pushq $0x35
popq %rcx
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %r8
movq %rbx, %r9
callq 0x20872
movq %r12, %rax
movq %r13, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| js_aggregate_error_constructor:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rsi, [rdi+108h]
mov rdx, [rdi+110h]
push 3
pop rcx
call JS_NewObjectProtoClass
mov r12, rax
mov r13, rdx
cmp r13d, 6
jz short loc_48CBF
cmp ebx, 0FFFFFFF7h
jb short loc_48CA1
inc dword ptr [r14]
loc_48CA1:
mov [rsp+38h+var_38], 3
push 35h ; '5'
pop rcx
mov rdi, r15
mov rsi, r12
mov rdx, r13
mov r8, r14
mov r9, rbx
call JS_DefinePropertyValue
loc_48CBF:
mov rax, r12
mov rdx, r13
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long js_aggregate_error_constructor(
long long a1,
_DWORD *a2,
long long a3,
double a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v12; // rax
long long v13; // rdx
__m128 v14; // xmm4
__m128 v15; // xmm5
long long v16; // r12
v12 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1 + 264), *(_QWORD *)(a1 + 272), 3u);
v16 = v12;
if ( (_DWORD)v13 != 6 )
{
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
++*a2;
JS_DefinePropertyValue(a1, v12, v13, 53LL, a2, a3, a4, a5, a6, a7, v14, v15, a10, a11, 3);
}
return v16;
}
| js_aggregate_error_constructor:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RSI,qword ptr [RDI + 0x108]
MOV RDX,qword ptr [RDI + 0x110]
PUSH 0x3
POP RCX
CALL 0x0011b069
MOV R12,RAX
MOV R13,RDX
CMP R13D,0x6
JZ 0x00148cbf
CMP EBX,-0x9
JC 0x00148ca1
INC dword ptr [R14]
LAB_00148ca1:
MOV dword ptr [RSP],0x3
PUSH 0x35
POP RCX
MOV RDI,R15
MOV RSI,R12
MOV RDX,R13
MOV R8,R14
MOV R9,RBX
CALL 0x00120872
LAB_00148cbf:
MOV RAX,R12
MOV RDX,R13
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int1 [16] js_aggregate_error_constructor(long param_1,int *param_2,int8 param_3)
{
int1 auVar1 [16];
auVar1 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x108),*(int8 *)(param_1 + 0x110),3);
if (auVar1._8_4_ != 6) {
if (0xfffffff6 < (uint)param_3) {
*param_2 = *param_2 + 1;
}
JS_DefinePropertyValue(param_1,auVar1._0_8_,auVar1._8_8_,0x35,param_2,param_3,3);
}
return auVar1;
}
| |
38,497 | req_header | corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c | static bool req_header(c4_state_t* state, json_t slot, chain_id_t chain_id, json_t* data) {
buffer_t tmp = {0};
if (slot.type == JSON_TYPE_STRING)
bprintf(&tmp, "eth/v1/beacon/headers/%j", slot);
else
bprintf(&tmp, "eth/v1/beacon/headers/head");
data_request_t* req = c4_state_get_data_request_by_url(state, (char*) tmp.data.data);
if (req) buffer_free(&tmp);
if (req && req->response.data) {
json_t res = json_parse((char*) req->response.data);
if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "data");
if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "header");
if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "message");
if (res.type == JSON_TYPE_OBJECT) {
*data = res;
return true;
}
else {
state->error = strdup("Invalid response for header");
return false;
}
}
else if (req && req->error) {
state->error = strdup(req->error);
return false;
}
data_request_t* new_req = safe_calloc(1, sizeof(data_request_t));
new_req->chain_id = chain_id;
new_req->url = (char*) tmp.data.data;
new_req->encoding = C4_DATA_ENCODING_JSON;
new_req->type = C4_DATA_TYPE_BEACON_API;
c4_state_add_request(state, new_req);
return false;
} | O0 | c | req_header:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x5110
movq -0xb0(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x17b42
movq -0xb0(%rbp), %rax
leaq -0x38(%rbp), %rdi
leaq 0x3c270(%rip), %rsi # 0x53d90
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x19740
jmp 0x17b54
leaq -0x38(%rbp), %rdi
leaq 0x3c25c(%rip), %rsi # 0x53da9
movb $0x0, %al
callq 0x19740
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x22360
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x17b75
leaq -0x38(%rbp), %rdi
callq 0x18d90
cmpq $0x0, -0x40(%rbp)
je 0x17cdd
movq -0x40(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x17cdd
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rsi
leaq -0x58(%rbp), %rdi
callq 0x1fd30
cmpl $0x3, -0x48(%rbp)
jne 0x17beb
leaq -0x70(%rbp), %rdi
leaq -0x58(%rbp), %rax
leaq 0x3b473(%rip), %rsi # 0x53028
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20500
movq -0x70(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x3, -0x48(%rbp)
jne 0x17c3c
leaq -0x88(%rbp), %rdi
leaq -0x58(%rbp), %rax
leaq 0x3c1d6(%rip), %rsi # 0x53dd9
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20500
movq -0x88(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x3, -0x48(%rbp)
jne 0x17c93
leaq -0xa0(%rbp), %rdi
leaq -0x58(%rbp), %rax
leaq 0x3ac40(%rip), %rsi # 0x52894
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20500
movq -0xa0(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x3, -0x48(%rbp)
jne 0x17cbd
movq -0x20(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, (%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x10(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x17d70
leaq 0x3c100(%rip), %rdi # 0x53dc4
callq 0x5030
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x17d70
cmpq $0x0, -0x40(%rbp)
je 0x17d0d
movq -0x40(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x17d0d
movq -0x40(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x5030
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x17d70
jmp 0x17d0f
movl $0x1, %edi
movl $0x80, %esi
callq 0x18620
movq %rax, -0xa8(%rbp)
movl -0x14(%rbp), %ecx
movq -0xa8(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rcx
movq -0xa8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0xa8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0xa8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x22400
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
nop
| req_header:
push rbp
mov rbp, rsp
sub rsp, 0D0h
lea rax, [rbp+arg_0]
mov [rbp+var_B0], rax
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
lea rdi, [rbp+var_38]
xor esi, esi
mov edx, 18h
call _memset
mov rax, [rbp+var_B0]
cmp dword ptr [rax+10h], 1
jnz short loc_17B42
mov rax, [rbp+var_B0]
lea rdi, [rbp+var_38]
lea rsi, aEthV1BeaconHea_0; "eth/v1/beacon/headers/%j"
mov rcx, [rax]
mov [rsp+0D0h+var_D0], rcx
mov rcx, [rax+8]
mov [rsp+0D0h+var_C8], rcx
mov rax, [rax+10h]
mov [rsp+0D0h+var_C0], rax
mov al, 0
call bprintf
jmp short loc_17B54
loc_17B42:
lea rdi, [rbp+var_38]
lea rsi, aEthV1BeaconHea_1; "eth/v1/beacon/headers/head"
mov al, 0
call bprintf
loc_17B54:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
call c4_state_get_data_request_by_url
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jz short loc_17B75
lea rdi, [rbp+var_38]
call buffer_free
loc_17B75:
cmp [rbp+var_40], 0
jz loc_17CDD
mov rax, [rbp+var_40]
cmp qword ptr [rax+38h], 0
jz loc_17CDD
mov rax, [rbp+var_40]
mov rsi, [rax+38h]
lea rdi, [rbp+var_58]
call json_parse
cmp dword ptr [rbp+var_48], 3
jnz short loc_17BEB
lea rdi, [rbp+var_70]
lea rax, [rbp+var_58]
lea rsi, aSyncData+5; "data"
mov rcx, [rax]
mov [rsp+0D0h+var_D0], rcx
mov rcx, [rax+8]
mov [rsp+0D0h+var_C8], rcx
mov rax, [rax+10h]
mov [rsp+0D0h+var_C0], rax
call json_get
mov rax, [rbp+var_70]
mov [rbp+var_58], rax
mov rax, [rbp+var_68]
mov [rbp+var_50], rax
mov rax, [rbp+var_60]
mov [rbp+var_48], rax
loc_17BEB:
cmp dword ptr [rbp+var_48], 3
jnz short loc_17C3C
lea rdi, [rbp+var_88]
lea rax, [rbp+var_58]
lea rsi, aInvalidRespons+15h; "header"
mov rcx, [rax]
mov [rsp+0D0h+var_D0], rcx
mov rcx, [rax+8]
mov [rsp+0D0h+var_C8], rcx
mov rax, [rax+10h]
mov [rsp+0D0h+var_C0], rax
call json_get
mov rax, [rbp+var_88]
mov [rbp+var_58], rax
mov rax, [rbp+var_80]
mov [rbp+var_50], rax
mov rax, [rbp+var_78]
mov [rbp+var_48], rax
loc_17C3C:
cmp dword ptr [rbp+var_48], 3
jnz short loc_17C93
lea rdi, [rbp+var_A0]
lea rax, [rbp+var_58]
lea rsi, aMessage; "message"
mov rcx, [rax]
mov [rsp+0D0h+var_D0], rcx
mov rcx, [rax+8]
mov [rsp+0D0h+var_C8], rcx
mov rax, [rax+10h]
mov [rsp+0D0h+var_C0], rax
call json_get
mov rax, [rbp+var_A0]
mov [rbp+var_58], rax
mov rax, [rbp+var_98]
mov [rbp+var_50], rax
mov rax, [rbp+var_90]
mov [rbp+var_48], rax
loc_17C93:
cmp dword ptr [rbp+var_48], 3
jnz short loc_17CBD
mov rax, [rbp+var_20]
mov rcx, [rbp+var_58]
mov [rax], rcx
mov rcx, [rbp+var_50]
mov [rax+8], rcx
mov rcx, [rbp+var_48]
mov [rax+10h], rcx
mov [rbp+var_1], 1
jmp loc_17D70
loc_17CBD:
lea rdi, aInvalidRespons; "Invalid response for header"
call _strdup
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov [rbp+var_1], 0
jmp loc_17D70
loc_17CDD:
cmp [rbp+var_40], 0
jz short loc_17D0D
mov rax, [rbp+var_40]
cmp qword ptr [rax+48h], 0
jz short loc_17D0D
mov rax, [rbp+var_40]
mov rdi, [rax+48h]
call _strdup
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov [rbp+var_1], 0
jmp short loc_17D70
loc_17D0D:
jmp short $+2
loc_17D0F:
mov edi, 1
mov esi, 80h
call safe_calloc
mov [rbp+var_A8], rax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_A8]
mov [rax], ecx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_A8]
mov [rax+10h], rcx
mov rax, [rbp+var_A8]
mov dword ptr [rax+8], 0
mov rax, [rbp+var_A8]
mov dword ptr [rax+4], 0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_A8]
call c4_state_add_request
mov [rbp+var_1], 0
loc_17D70:
mov al, [rbp+var_1]
and al, 1
add rsp, 0D0h
pop rbp
retn
| char req_header(
long long a1,
int a2,
long long *a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
long long a7,
int a8,
int a9)
{
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
int v13; // edx
int v14; // r8d
int v15; // r9d
long long *v16; // rax
long long v17; // rcx
long long v18; // rcx
long long v20; // [rsp+28h] [rbp-A8h]
_QWORD v21[3]; // [rsp+30h] [rbp-A0h] BYREF
_QWORD v22[3]; // [rsp+48h] [rbp-88h] BYREF
_QWORD v23[3]; // [rsp+60h] [rbp-70h] BYREF
long long v24; // [rsp+78h] [rbp-58h] BYREF
long long v25; // [rsp+80h] [rbp-50h]
long long v26; // [rsp+88h] [rbp-48h]
long long data_request_by_url; // [rsp+90h] [rbp-40h]
_BYTE v28[8]; // [rsp+98h] [rbp-38h] BYREF
long long v29; // [rsp+A0h] [rbp-30h]
long long *v30; // [rsp+B0h] [rbp-20h]
int v31; // [rsp+BCh] [rbp-14h]
long long v32; // [rsp+C0h] [rbp-10h]
v32 = a1;
v31 = a2;
v30 = a3;
memset(v28, 0LL, 24LL);
if ( a9 == 1 )
bprintf((unsigned int)v28, (unsigned int)"eth/v1/beacon/headers/%j", v9, a8, v11, v12);
else
bprintf((unsigned int)v28, (unsigned int)"eth/v1/beacon/headers/head", v9, v10, v11, v12);
data_request_by_url = c4_state_get_data_request_by_url(v32, v29);
if ( data_request_by_url && (buffer_free(v28), *(_QWORD *)(data_request_by_url + 56)) )
{
json_parse(&v24, *(_QWORD *)(data_request_by_url + 56));
if ( (_DWORD)v26 == 3 )
{
json_get((unsigned int)v23, (unsigned int)"data", v13, v25, v14, v15, v24, v25, v26);
v24 = v23[0];
v25 = v23[1];
v26 = v23[2];
}
if ( (_DWORD)v26 == 3 )
{
json_get((unsigned int)v22, (unsigned int)"header", v13, v25, v14, v15, v24, v25, v26);
v24 = v22[0];
v25 = v22[1];
v26 = v22[2];
}
if ( (_DWORD)v26 == 3 )
{
json_get((unsigned int)v21, (unsigned int)"message", v13, v25, v14, v15, v24, v25, v26);
v24 = v21[0];
v25 = v21[1];
v26 = v21[2];
}
if ( (_DWORD)v26 == 3 )
{
v16 = v30;
*v30 = v24;
v16[1] = v25;
v16[2] = v26;
return 1;
}
else
{
v17 = strdup("Invalid response for header");
*(_QWORD *)(v32 + 8) = v17;
return 0;
}
}
else if ( data_request_by_url && *(_QWORD *)(data_request_by_url + 72) )
{
v18 = strdup(*(_QWORD *)(data_request_by_url + 72));
*(_QWORD *)(v32 + 8) = v18;
return 0;
}
else
{
v20 = safe_calloc(1LL, 128LL);
*(_DWORD *)v20 = v31;
*(_QWORD *)(v20 + 16) = v29;
*(_DWORD *)(v20 + 8) = 0;
*(_DWORD *)(v20 + 4) = 0;
c4_state_add_request(v32, v20);
return 0;
}
}
| req_header:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0xb0],RAX
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
LEA RDI,[RBP + -0x38]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00105110
MOV RAX,qword ptr [RBP + -0xb0]
CMP dword ptr [RAX + 0x10],0x1
JNZ 0x00117b42
MOV RAX,qword ptr [RBP + -0xb0]
LEA RDI,[RBP + -0x38]
LEA RSI,[0x153d90]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOV AL,0x0
CALL 0x00119740
JMP 0x00117b54
LAB_00117b42:
LEA RDI,[RBP + -0x38]
LEA RSI,[0x153da9]
MOV AL,0x0
CALL 0x00119740
LAB_00117b54:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00122360
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JZ 0x00117b75
LEA RDI,[RBP + -0x38]
CALL 0x00118d90
LAB_00117b75:
CMP qword ptr [RBP + -0x40],0x0
JZ 0x00117cdd
MOV RAX,qword ptr [RBP + -0x40]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x00117cdd
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RAX + 0x38]
LEA RDI,[RBP + -0x58]
CALL 0x0011fd30
CMP dword ptr [RBP + -0x48],0x3
JNZ 0x00117beb
LEA RDI,[RBP + -0x70]
LEA RAX,[RBP + -0x58]
LEA RSI,[0x153028]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120500
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x48],RAX
LAB_00117beb:
CMP dword ptr [RBP + -0x48],0x3
JNZ 0x00117c3c
LEA RDI,[RBP + -0x88]
LEA RAX,[RBP + -0x58]
LEA RSI,[0x153dd9]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120500
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x48],RAX
LAB_00117c3c:
CMP dword ptr [RBP + -0x48],0x3
JNZ 0x00117c93
LEA RDI,[RBP + -0xa0]
LEA RAX,[RBP + -0x58]
LEA RSI,[0x152894]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120500
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x48],RAX
LAB_00117c93:
CMP dword ptr [RBP + -0x48],0x3
JNZ 0x00117cbd
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x10],RCX
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00117d70
LAB_00117cbd:
LEA RDI,[0x153dc4]
CALL 0x00105030
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00117d70
LAB_00117cdd:
CMP qword ptr [RBP + -0x40],0x0
JZ 0x00117d0d
MOV RAX,qword ptr [RBP + -0x40]
CMP qword ptr [RAX + 0x48],0x0
JZ 0x00117d0d
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x48]
CALL 0x00105030
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00117d70
LAB_00117d0d:
JMP 0x00117d0f
LAB_00117d0f:
MOV EDI,0x1
MOV ESI,0x80
CALL 0x00118620
MOV qword ptr [RBP + -0xa8],RAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0xa8]
MOV dword ptr [RAX],ECX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0xa8]
MOV dword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0xa8]
MOV dword ptr [RAX + 0x4],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0xa8]
CALL 0x00122400
MOV byte ptr [RBP + -0x1],0x0
LAB_00117d70:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0xd0
POP RBP
RET
|
int1 req_header(long param_1,int4 param_2,int8 *param_3)
{
char *pcVar1;
int4 *puVar2;
int in_stack_00000018;
int8 local_a8;
int8 local_a0;
int8 local_98;
int8 local_90;
int8 local_88;
int8 local_80;
int8 local_78;
int8 local_70;
int8 local_68;
int8 local_60;
int8 local_58;
int8 local_50;
long local_48;
int1 local_40 [8];
int8 local_38;
int8 *local_28;
int4 local_1c;
long local_18;
int1 local_9;
local_28 = param_3;
local_1c = param_2;
local_18 = param_1;
memset(local_40,0,0x18);
if (in_stack_00000018 == 1) {
bprintf(local_40,"eth/v1/beacon/headers/%j");
}
else {
bprintf(local_40,"eth/v1/beacon/headers/head");
}
local_48 = c4_state_get_data_request_by_url(local_18,local_38);
if (local_48 != 0) {
buffer_free(local_40);
}
if ((local_48 == 0) || (*(long *)(local_48 + 0x38) == 0)) {
if ((local_48 == 0) || (*(long *)(local_48 + 0x48) == 0)) {
puVar2 = (int4 *)safe_calloc(1,0x80);
*puVar2 = local_1c;
*(int8 *)(puVar2 + 4) = local_38;
puVar2[2] = 0;
puVar2[1] = 0;
c4_state_add_request(local_18,puVar2);
local_9 = 0;
}
else {
pcVar1 = strdup(*(char **)(local_48 + 0x48));
*(char **)(local_18 + 8) = pcVar1;
local_9 = 0;
}
}
else {
json_parse(&local_60,*(int8 *)(local_48 + 0x38));
if ((int)local_50 == 3) {
json_get(&local_78,"data");
local_60 = local_78;
local_58 = local_70;
local_50 = local_68;
}
if ((int)local_50 == 3) {
json_get(&local_90,"header");
local_60 = local_90;
local_58 = local_88;
local_50 = local_80;
}
if ((int)local_50 == 3) {
json_get(&local_a8,"message");
local_60 = local_a8;
local_58 = local_a0;
local_50 = local_98;
}
if ((int)local_50 == 3) {
*local_28 = local_60;
local_28[1] = local_58;
local_28[2] = local_50;
local_9 = 1;
}
else {
pcVar1 = strdup("Invalid response for header");
*(char **)(local_18 + 8) = pcVar1;
local_9 = 0;
}
}
return local_9;
}
| |
38,498 | req_header | corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c | static bool req_header(c4_state_t* state, json_t slot, chain_id_t chain_id, json_t* data) {
buffer_t tmp = {0};
if (slot.type == JSON_TYPE_STRING)
bprintf(&tmp, "eth/v1/beacon/headers/%j", slot);
else
bprintf(&tmp, "eth/v1/beacon/headers/head");
data_request_t* req = c4_state_get_data_request_by_url(state, (char*) tmp.data.data);
if (req) buffer_free(&tmp);
if (req && req->response.data) {
json_t res = json_parse((char*) req->response.data);
if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "data");
if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "header");
if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "message");
if (res.type == JSON_TYPE_OBJECT) {
*data = res;
return true;
}
else {
state->error = strdup("Invalid response for header");
return false;
}
}
else if (req && req->error) {
state->error = strdup(req->error);
return false;
}
data_request_t* new_req = safe_calloc(1, sizeof(data_request_t));
new_req->chain_id = chain_id;
new_req->url = (char*) tmp.data.data;
new_req->encoding = C4_DATA_ENCODING_JSON;
new_req->type = C4_DATA_TYPE_BEACON_API;
c4_state_add_request(state, new_req);
return false;
} | O1 | c | req_header:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
cmpl $0x1, 0xb0(%rsp)
jne 0x1212a
leaq 0xa0(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%rsp)
leaq 0x2cc8f(%rip), %rsi # 0x3edb7
jmp 0x12131
leaq 0x2cc9f(%rip), %rsi # 0x3edd0
leaq 0x40(%rsp), %rdi
xorl %eax, %eax
callq 0x13095
movq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x187ac
testq %rax, %rax
je 0x1226d
movq %rax, %r15
leaq 0x40(%rsp), %rdi
callq 0x12a33
movq 0x38(%r15), %rsi
testq %rsi, %rsi
je 0x12259
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x17074
cmpl $0x3, 0x10(%r15)
jne 0x121ba
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x2bea6(%rip), %rsi # 0x3e041
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x174bc
movq 0x10(%r15), %rax
movq %rax, 0x30(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x20(%rsp)
cmpl $0x3, 0x30(%rsp)
jne 0x121fa
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x2cc25(%rip), %rsi # 0x3ee00
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x174bc
movq 0x10(%r15), %rax
movq %rax, 0x30(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x20(%rsp)
cmpl $0x3, 0x30(%rsp)
jne 0x1223a
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x2b692(%rip), %rsi # 0x3d8ad
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x174bc
movq 0x10(%r15), %rax
movq %rax, 0x30(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x20(%rsp)
cmpl $0x3, 0x30(%rsp)
sete %bpl
jne 0x1229e
movq 0x30(%rsp), %rax
movq %rax, 0x10(%r14)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%r14)
jmp 0x122ae
movq 0x48(%r15), %rdi
testq %rdi, %rdi
je 0x1226d
callq 0x5030
movq %rax, 0x8(%rbx)
jmp 0x1229a
movl $0x1, %edi
movl $0x80, %esi
callq 0x1285b
movl %ebp, (%rax)
movq 0x48(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq $0x0, 0x4(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x187f9
xorl %ebp, %ebp
jmp 0x122ae
leaq 0x2cb46(%rip), %rdi # 0x3edeb
callq 0x5030
movq %rax, 0x8(%rbx)
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
| req_header:
push rbp
push r15
push r14
push rbx
sub rsp, 78h
mov r14, rdx
mov ebp, esi
mov rbx, rdi
xorps xmm0, xmm0
movaps [rsp+98h+var_58], xmm0
mov [rsp+98h+var_48], 0
cmp [rsp+98h+arg_10], 1
jnz short loc_1212A
lea rax, [rsp+98h+arg_0]
mov rcx, [rax+10h]
mov [rsp+98h+var_88], rcx
movups xmm0, xmmword ptr [rax]
movups [rsp+98h+var_98], xmm0
lea rsi, aEthV1BeaconHea_0; "eth/v1/beacon/headers/%j"
jmp short loc_12131
loc_1212A:
lea rsi, aEthV1BeaconHea_1; "eth/v1/beacon/headers/head"
loc_12131:
lea rdi, [rsp+98h+var_58]
xor eax, eax
call bprintf
mov rsi, qword ptr [rsp+98h+var_58+8]
mov rdi, rbx
call c4_state_get_data_request_by_url
test rax, rax
jz loc_1226D
mov r15, rax
lea rdi, [rsp+98h+var_58]
call buffer_free
mov rsi, [r15+38h]
test rsi, rsi
jz loc_12259
lea r15, [rsp+98h+var_78]
mov rdi, r15
call json_parse
cmp dword ptr [r15+10h], 3
jnz short loc_121BA
mov rax, [rsp+98h+var_68]
mov [rsp+98h+var_88], rax
movaps xmm0, [rsp+98h+var_78]
movups [rsp+98h+var_98], xmm0
lea rsi, aSyncData+5; "data"
lea r15, [rsp+98h+var_38]
mov rdi, r15
call json_get
mov rax, [r15+10h]
mov [rsp+98h+var_68], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+98h+var_78], xmm0
loc_121BA:
cmp dword ptr [rsp+98h+var_68], 3
jnz short loc_121FA
mov rax, [rsp+98h+var_68]
mov [rsp+98h+var_88], rax
movaps xmm0, [rsp+98h+var_78]
movups [rsp+98h+var_98], xmm0
lea rsi, aInvalidRespons+15h; "header"
lea r15, [rsp+98h+var_38]
mov rdi, r15
call json_get
mov rax, [r15+10h]
mov [rsp+98h+var_68], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+98h+var_78], xmm0
loc_121FA:
cmp dword ptr [rsp+98h+var_68], 3
jnz short loc_1223A
mov rax, [rsp+98h+var_68]
mov [rsp+98h+var_88], rax
movaps xmm0, [rsp+98h+var_78]
movups [rsp+98h+var_98], xmm0
lea rsi, aMessage; "message"
lea r15, [rsp+98h+var_38]
mov rdi, r15
call json_get
mov rax, [r15+10h]
mov [rsp+98h+var_68], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+98h+var_78], xmm0
loc_1223A:
cmp dword ptr [rsp+98h+var_68], 3
setz bpl
jnz short loc_1229E
mov rax, [rsp+98h+var_68]
mov [r14+10h], rax
movaps xmm0, [rsp+98h+var_78]
movups xmmword ptr [r14], xmm0
jmp short loc_122AE
loc_12259:
mov rdi, [r15+48h]
test rdi, rdi
jz short loc_1226D
call _strdup
mov [rbx+8], rax
jmp short loc_1229A
loc_1226D:
mov edi, 1
mov esi, 80h
call safe_calloc
mov [rax], ebp
mov rcx, qword ptr [rsp+98h+var_58+8]
mov [rax+10h], rcx
mov qword ptr [rax+4], 0
mov rdi, rbx
mov rsi, rax
call c4_state_add_request
loc_1229A:
xor ebp, ebp
jmp short loc_122AE
loc_1229E:
lea rdi, aInvalidRespons; "Invalid response for header"
call _strdup
mov [rbx+8], rax
loc_122AE:
mov eax, ebp
add rsp, 78h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long req_header(
long long a1,
unsigned int a2,
long long a3,
int a4,
int a5,
int a6,
long long a7,
long long a8,
long long a9)
{
long long data_request_by_url; // rax
long long v13; // r15
long long v14; // rsi
int v15; // edx
int v16; // ecx
int v17; // r8d
int v18; // r9d
long long v19; // rdi
long long v20; // rax
__int128 v22; // [rsp+20h] [rbp-78h] BYREF
long long v23; // [rsp+30h] [rbp-68h]
__int128 v24; // [rsp+40h] [rbp-58h] BYREF
long long v25; // [rsp+50h] [rbp-48h]
__int128 v26; // [rsp+60h] [rbp-38h] BYREF
long long v27; // [rsp+70h] [rbp-28h]
v24 = 0LL;
v25 = 0LL;
if ( (_DWORD)a9 == 1 )
bprintf((unsigned int)&v24, (unsigned int)"eth/v1/beacon/headers/%j", a3, 1, a5, a6, a7, a8, a9);
else
bprintf((unsigned int)&v24, (unsigned int)"eth/v1/beacon/headers/head", a3, a4, a5, a6);
data_request_by_url = c4_state_get_data_request_by_url(a1, *((_QWORD *)&v24 + 1));
if ( !data_request_by_url )
goto LABEL_16;
v13 = data_request_by_url;
buffer_free(&v24);
v14 = *(_QWORD *)(v13 + 56);
if ( !v14 )
{
v19 = *(_QWORD *)(v13 + 72);
if ( v19 )
{
*(_QWORD *)(a1 + 8) = strdup(v19);
return 0;
}
LABEL_16:
v20 = safe_calloc(1LL, 128LL);
*(_DWORD *)v20 = a2;
*(_QWORD *)(v20 + 16) = *((_QWORD *)&v24 + 1);
*(_QWORD *)(v20 + 4) = 0LL;
c4_state_add_request(a1, v20);
return 0;
}
json_parse(&v22, v14);
if ( (_DWORD)v23 == 3 )
{
json_get((unsigned int)&v26, (unsigned int)"data", v15, v16, v17, v18, v22, v23);
v23 = v27;
v22 = v26;
}
if ( (_DWORD)v23 == 3 )
{
json_get((unsigned int)&v26, (unsigned int)"header", v15, v16, v17, v18, v22, v23);
v23 = v27;
v22 = v26;
}
if ( (_DWORD)v23 == 3 )
{
json_get((unsigned int)&v26, (unsigned int)"message", v15, v16, v17, v18, v22, v23);
v23 = v27;
v22 = v26;
}
LOBYTE(a2) = (_DWORD)v23 == 3;
if ( (_DWORD)v23 == 3 )
{
*(_QWORD *)(a3 + 16) = v23;
*(_OWORD *)a3 = v22;
}
else
{
*(_QWORD *)(a1 + 8) = strdup("Invalid response for header");
}
return a2;
}
| req_header:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x78
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV qword ptr [RSP + 0x50],0x0
CMP dword ptr [RSP + 0xb0],0x1
JNZ 0x0011212a
LEA RAX,[RSP + 0xa0]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x13edb7]
JMP 0x00112131
LAB_0011212a:
LEA RSI,[0x13edd0]
LAB_00112131:
LEA RDI,[RSP + 0x40]
XOR EAX,EAX
CALL 0x00113095
MOV RSI,qword ptr [RSP + 0x48]
MOV RDI,RBX
CALL 0x001187ac
TEST RAX,RAX
JZ 0x0011226d
MOV R15,RAX
LEA RDI,[RSP + 0x40]
CALL 0x00112a33
MOV RSI,qword ptr [R15 + 0x38]
TEST RSI,RSI
JZ 0x00112259
LEA R15,[RSP + 0x20]
MOV RDI,R15
CALL 0x00117074
CMP dword ptr [R15 + 0x10],0x3
JNZ 0x001121ba
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x13e041]
LEA R15,[RSP + 0x60]
MOV RDI,R15
CALL 0x001174bc
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
LAB_001121ba:
CMP dword ptr [RSP + 0x30],0x3
JNZ 0x001121fa
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x13ee00]
LEA R15,[RSP + 0x60]
MOV RDI,R15
CALL 0x001174bc
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
LAB_001121fa:
CMP dword ptr [RSP + 0x30],0x3
JNZ 0x0011223a
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x13d8ad]
LEA R15,[RSP + 0x60]
MOV RDI,R15
CALL 0x001174bc
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
LAB_0011223a:
CMP dword ptr [RSP + 0x30],0x3
SETZ BPL
JNZ 0x0011229e
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [R14 + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [R14],XMM0
JMP 0x001122ae
LAB_00112259:
MOV RDI,qword ptr [R15 + 0x48]
TEST RDI,RDI
JZ 0x0011226d
CALL 0x00105030
MOV qword ptr [RBX + 0x8],RAX
JMP 0x0011229a
LAB_0011226d:
MOV EDI,0x1
MOV ESI,0x80
CALL 0x0011285b
MOV dword ptr [RAX],EBP
MOV RCX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x4],0x0
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001187f9
LAB_0011229a:
XOR EBP,EBP
JMP 0x001122ae
LAB_0011229e:
LEA RDI,[0x13edeb]
CALL 0x00105030
MOV qword ptr [RBX + 0x8],RAX
LAB_001122ae:
MOV EAX,EBP
ADD RSP,0x78
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong req_header(long param_1,int8 param_2,int8 *param_3)
{
long lVar1;
int4 *puVar2;
ulong uVar3;
char *pcVar4;
int in_stack_00000018;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 local_38;
int8 uStack_30;
int8 local_28;
local_58 = 0;
uStack_50 = 0;
local_48 = 0;
if (in_stack_00000018 == 1) {
pcVar4 = "eth/v1/beacon/headers/%j";
}
else {
pcVar4 = "eth/v1/beacon/headers/head";
}
bprintf(&local_58,pcVar4);
lVar1 = c4_state_get_data_request_by_url(param_1,uStack_50);
if (lVar1 != 0) {
buffer_free(&local_58);
if (*(long *)(lVar1 + 0x38) != 0) {
json_parse(&local_78);
if ((int)local_68 == 3) {
json_get(&local_38,"data");
local_68 = local_28;
local_78 = local_38;
uStack_70 = uStack_30;
}
if ((int)local_68 == 3) {
json_get(&local_38,"header");
local_68 = local_28;
local_78 = local_38;
uStack_70 = uStack_30;
}
if ((int)local_68 == 3) {
json_get(&local_38,"message");
local_68 = local_28;
local_78 = local_38;
uStack_70 = uStack_30;
}
uVar3 = CONCAT71((int7)((ulong)param_2 >> 8),(int)local_68 == 3) & 0xffffffff;
if ((int)local_68 != 3) {
pcVar4 = strdup("Invalid response for header");
*(char **)(param_1 + 8) = pcVar4;
return uVar3;
}
param_3[2] = local_68;
*param_3 = local_78;
param_3[1] = uStack_70;
return uVar3;
}
if (*(char **)(lVar1 + 0x48) != (char *)0x0) {
pcVar4 = strdup(*(char **)(lVar1 + 0x48));
*(char **)(param_1 + 8) = pcVar4;
return 0;
}
}
puVar2 = (int4 *)safe_calloc(1,0x80);
*puVar2 = (int)param_2;
*(int8 *)(puVar2 + 4) = uStack_50;
*(int8 *)(puVar2 + 1) = 0;
c4_state_add_request(param_1,puVar2);
return 0;
}
| |
38,499 | req_header | corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c | static bool req_header(c4_state_t* state, json_t slot, chain_id_t chain_id, json_t* data) {
buffer_t tmp = {0};
if (slot.type == JSON_TYPE_STRING)
bprintf(&tmp, "eth/v1/beacon/headers/%j", slot);
else
bprintf(&tmp, "eth/v1/beacon/headers/head");
data_request_t* req = c4_state_get_data_request_by_url(state, (char*) tmp.data.data);
if (req) buffer_free(&tmp);
if (req && req->response.data) {
json_t res = json_parse((char*) req->response.data);
if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "data");
if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "header");
if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "message");
if (res.type == JSON_TYPE_OBJECT) {
*data = res;
return true;
}
else {
state->error = strdup("Invalid response for header");
return false;
}
}
else if (req && req->error) {
state->error = strdup(req->error);
return false;
}
data_request_t* new_req = safe_calloc(1, sizeof(data_request_t));
new_req->chain_id = chain_id;
new_req->url = (char*) tmp.data.data;
new_req->encoding = C4_DATA_ENCODING_JSON;
new_req->type = C4_DATA_TYPE_BEACON_API;
c4_state_add_request(state, new_req);
return false;
} | O3 | c | req_header:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
cmpl $0x1, 0xb0(%rsp)
jne 0x11e69
leaq 0xa0(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%rsp)
leaq 0x2cf4c(%rip), %rsi # 0x3edb3
jmp 0x11e70
leaq 0x2cf5c(%rip), %rsi # 0x3edcc
leaq 0x40(%rsp), %rdi
xorl %eax, %eax
callq 0x12da8
movq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x17f28
testq %rax, %rax
je 0x11fb5
movq %rax, %r15
leaq 0x40(%rsp), %rdi
callq 0x12733
movq 0x38(%r15), %rsi
testq %rsi, %rsi
je 0x11fa1
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x16948
cmpl $0x3, 0x10(%r15)
jne 0x11f98
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x2c163(%rip), %rsi # 0x3e041
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x16d59
movq 0x10(%r15), %rax
movq %rax, 0x30(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x20(%rsp)
cmpl $0x3, %eax
jne 0x11f98
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x2cedc(%rip), %rsi # 0x3edfc
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x16d59
movq 0x10(%r15), %rax
movq %rax, 0x30(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x20(%rsp)
cmpl $0x3, %eax
jne 0x11f98
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x2b94f(%rip), %rsi # 0x3d8ad
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x16d59
movq 0x10(%r15), %rax
movq %rax, 0x30(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x20(%rsp)
cmpl $0x3, %eax
jne 0x11f98
movq 0x30(%rsp), %rax
movq %rax, 0x10(%r14)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%r14)
movb $0x1, %al
jmp 0x11fe4
leaq 0x2ce48(%rip), %rdi # 0x3ede7
jmp 0x11faa
movq 0x48(%r15), %rdi
testq %rdi, %rdi
je 0x11fb5
callq 0x5030
movq %rax, 0x8(%rbx)
jmp 0x11fe2
movl $0x1, %edi
movl $0x80, %esi
callq 0x12563
movl %ebp, (%rax)
movq 0x48(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq $0x0, 0x4(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x17f75
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
| req_header:
push rbp
push r15
push r14
push rbx
sub rsp, 78h
mov r14, rdx
mov ebp, esi
mov rbx, rdi
xorps xmm0, xmm0
movaps [rsp+98h+var_58], xmm0
mov [rsp+98h+var_48], 0
cmp [rsp+98h+arg_10], 1
jnz short loc_11E69
lea rax, [rsp+98h+arg_0]
mov rcx, [rax+10h]
mov [rsp+98h+var_88], rcx
movups xmm0, xmmword ptr [rax]
movups [rsp+98h+var_98], xmm0
lea rsi, aEthV1BeaconHea_0; "eth/v1/beacon/headers/%j"
jmp short loc_11E70
loc_11E69:
lea rsi, aEthV1BeaconHea_1; "eth/v1/beacon/headers/head"
loc_11E70:
lea rdi, [rsp+98h+var_58]
xor eax, eax
call bprintf
mov rsi, qword ptr [rsp+98h+var_58+8]
mov rdi, rbx
call c4_state_get_data_request_by_url
test rax, rax
jz loc_11FB5
mov r15, rax
lea rdi, [rsp+98h+var_58]
call buffer_free
mov rsi, [r15+38h]
test rsi, rsi
jz loc_11FA1
lea r15, [rsp+98h+var_78]
mov rdi, r15
call json_parse
cmp dword ptr [r15+10h], 3
jnz loc_11F98
mov rax, [rsp+98h+var_68]
mov [rsp+98h+var_88], rax
movaps xmm0, [rsp+98h+var_78]
movups [rsp+98h+var_98], xmm0
lea rsi, aSyncData+5; "data"
lea r15, [rsp+98h+var_38]
mov rdi, r15
call json_get
mov rax, [r15+10h]
mov [rsp+98h+var_68], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+98h+var_78], xmm0
cmp eax, 3
jnz loc_11F98
mov rax, [rsp+98h+var_68]
mov [rsp+98h+var_88], rax
movaps xmm0, [rsp+98h+var_78]
movups [rsp+98h+var_98], xmm0
lea rsi, aInvalidRespons+15h; "header"
lea r15, [rsp+98h+var_38]
mov rdi, r15
call json_get
mov rax, [r15+10h]
mov [rsp+98h+var_68], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+98h+var_78], xmm0
cmp eax, 3
jnz short loc_11F98
mov rax, [rsp+98h+var_68]
mov [rsp+98h+var_88], rax
movaps xmm0, [rsp+98h+var_78]
movups [rsp+98h+var_98], xmm0
lea rsi, aMessage; "message"
lea r15, [rsp+98h+var_38]
mov rdi, r15
call json_get
mov rax, [r15+10h]
mov [rsp+98h+var_68], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+98h+var_78], xmm0
cmp eax, 3
jnz short loc_11F98
mov rax, [rsp+98h+var_68]
mov [r14+10h], rax
movaps xmm0, [rsp+98h+var_78]
movups xmmword ptr [r14], xmm0
mov al, 1
jmp short loc_11FE4
loc_11F98:
lea rdi, aInvalidRespons; "Invalid response for header"
jmp short loc_11FAA
loc_11FA1:
mov rdi, [r15+48h]
test rdi, rdi
jz short loc_11FB5
loc_11FAA:
call _strdup
mov [rbx+8], rax
jmp short loc_11FE2
loc_11FB5:
mov edi, 1
mov esi, 80h
call safe_calloc
mov [rax], ebp
mov rcx, qword ptr [rsp+98h+var_58+8]
mov [rax+10h], rcx
mov qword ptr [rax+4], 0
mov rdi, rbx
mov rsi, rax
call c4_state_add_request
loc_11FE2:
xor eax, eax
loc_11FE4:
add rsp, 78h
pop rbx
pop r14
pop r15
pop rbp
retn
| char req_header(long long a1, int a2, long long a3, int a4, int a5, int a6, long long a7, long long a8, long long a9)
{
long long data_request_by_url; // rax
long long v13; // r15
long long v14; // rsi
int v15; // edx
int v16; // ecx
int v17; // r8d
int v18; // r9d
int v19; // edx
int v20; // ecx
int v21; // r8d
int v22; // r9d
int v23; // edx
int v24; // ecx
int v25; // r8d
int v26; // r9d
const char *v28; // rdi
long long v29; // rax
__int128 v30; // [rsp+20h] [rbp-78h] BYREF
long long v31; // [rsp+30h] [rbp-68h]
__int128 v32; // [rsp+40h] [rbp-58h] BYREF
long long v33; // [rsp+50h] [rbp-48h]
__int128 v34; // [rsp+60h] [rbp-38h] BYREF
long long v35; // [rsp+70h] [rbp-28h]
v32 = 0LL;
v33 = 0LL;
if ( (_DWORD)a9 == 1 )
bprintf((unsigned int)&v32, (unsigned int)"eth/v1/beacon/headers/%j", a3, 1, a5, a6, a7, a8, a9);
else
bprintf((unsigned int)&v32, (unsigned int)"eth/v1/beacon/headers/head", a3, a4, a5, a6);
data_request_by_url = c4_state_get_data_request_by_url(a1, *((_QWORD *)&v32 + 1));
if ( !data_request_by_url )
goto LABEL_14;
v13 = data_request_by_url;
buffer_free(&v32);
v14 = *(_QWORD *)(v13 + 56);
if ( v14 )
{
json_parse(&v30, v14);
if ( (_DWORD)v31 == 3 )
{
json_get((unsigned int)&v34, (unsigned int)"data", v15, v16, v17, v18, v30, v31);
v31 = v35;
v30 = v34;
if ( (_DWORD)v35 == 3 )
{
json_get((unsigned int)&v34, (unsigned int)"header", v19, v20, v21, v22, v30, v31);
v31 = v35;
v30 = v34;
if ( (_DWORD)v35 == 3 )
{
json_get((unsigned int)&v34, (unsigned int)"message", v23, v24, v25, v26, v30, v31);
v31 = v35;
v30 = v34;
if ( (_DWORD)v35 == 3 )
{
*(_QWORD *)(a3 + 16) = v31;
*(_OWORD *)a3 = v30;
return 1;
}
}
}
}
v28 = "Invalid response for header";
goto LABEL_13;
}
v28 = *(const char **)(v13 + 72);
if ( !v28 )
{
LABEL_14:
v29 = safe_calloc(1LL, 128LL);
*(_DWORD *)v29 = a2;
*(_QWORD *)(v29 + 16) = *((_QWORD *)&v32 + 1);
*(_QWORD *)(v29 + 4) = 0LL;
c4_state_add_request(a1, v29);
return 0;
}
LABEL_13:
*(_QWORD *)(a1 + 8) = strdup(v28);
return 0;
}
| req_header:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x78
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV qword ptr [RSP + 0x50],0x0
CMP dword ptr [RSP + 0xb0],0x1
JNZ 0x00111e69
LEA RAX,[RSP + 0xa0]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x13edb3]
JMP 0x00111e70
LAB_00111e69:
LEA RSI,[0x13edcc]
LAB_00111e70:
LEA RDI,[RSP + 0x40]
XOR EAX,EAX
CALL 0x00112da8
MOV RSI,qword ptr [RSP + 0x48]
MOV RDI,RBX
CALL 0x00117f28
TEST RAX,RAX
JZ 0x00111fb5
MOV R15,RAX
LEA RDI,[RSP + 0x40]
CALL 0x00112733
MOV RSI,qword ptr [R15 + 0x38]
TEST RSI,RSI
JZ 0x00111fa1
LEA R15,[RSP + 0x20]
MOV RDI,R15
CALL 0x00116948
CMP dword ptr [R15 + 0x10],0x3
JNZ 0x00111f98
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x13e041]
LEA R15,[RSP + 0x60]
MOV RDI,R15
CALL 0x00116d59
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
CMP EAX,0x3
JNZ 0x00111f98
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x13edfc]
LEA R15,[RSP + 0x60]
MOV RDI,R15
CALL 0x00116d59
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
CMP EAX,0x3
JNZ 0x00111f98
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x13d8ad]
LEA R15,[RSP + 0x60]
MOV RDI,R15
CALL 0x00116d59
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
CMP EAX,0x3
JNZ 0x00111f98
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [R14 + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [R14],XMM0
MOV AL,0x1
JMP 0x00111fe4
LAB_00111f98:
LEA RDI,[0x13ede7]
JMP 0x00111faa
LAB_00111fa1:
MOV RDI,qword ptr [R15 + 0x48]
TEST RDI,RDI
JZ 0x00111fb5
LAB_00111faa:
CALL 0x00105030
MOV qword ptr [RBX + 0x8],RAX
JMP 0x00111fe2
LAB_00111fb5:
MOV EDI,0x1
MOV ESI,0x80
CALL 0x00112563
MOV dword ptr [RAX],EBP
MOV RCX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x4],0x0
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00117f75
LAB_00111fe2:
XOR EAX,EAX
LAB_00111fe4:
ADD RSP,0x78
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 req_header(long param_1,int4 param_2,int8 *param_3)
{
long lVar1;
int4 *puVar2;
char *pcVar3;
int in_stack_00000018;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 local_38;
int8 uStack_30;
int8 local_28;
local_58 = 0;
uStack_50 = 0;
local_48 = 0;
if (in_stack_00000018 == 1) {
pcVar3 = "eth/v1/beacon/headers/%j";
}
else {
pcVar3 = "eth/v1/beacon/headers/head";
}
bprintf(&local_58,pcVar3);
lVar1 = c4_state_get_data_request_by_url(param_1,uStack_50);
if (lVar1 == 0) {
LAB_00111fb5:
puVar2 = (int4 *)safe_calloc(1,0x80);
*puVar2 = param_2;
*(int8 *)(puVar2 + 4) = uStack_50;
*(int8 *)(puVar2 + 1) = 0;
c4_state_add_request(param_1,puVar2);
}
else {
buffer_free(&local_58);
if (*(long *)(lVar1 + 0x38) == 0) {
pcVar3 = *(char **)(lVar1 + 0x48);
if (pcVar3 == (char *)0x0) goto LAB_00111fb5;
}
else {
json_parse(&local_78);
if ((int)local_68 == 3) {
json_get(&local_38,"data");
local_68 = local_28;
local_78 = local_38;
uStack_70 = uStack_30;
if ((int)local_28 == 3) {
json_get(&local_38,"header");
local_68 = local_28;
local_78 = local_38;
uStack_70 = uStack_30;
if ((int)local_28 == 3) {
json_get(&local_38,"message");
local_68 = local_28;
local_78 = local_38;
uStack_70 = uStack_30;
if ((int)local_28 == 3) {
param_3[2] = local_28;
*param_3 = local_38;
param_3[1] = uStack_30;
return 1;
}
}
}
}
pcVar3 = "Invalid response for header";
}
pcVar3 = strdup(pcVar3);
*(char **)(param_1 + 8) = pcVar3;
}
return 0;
}
|
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.